@charset "UTF-8";
/**
 * ticket.mme-lab.jp - Classical Concert Ticketing System Stylesheet
 * Fonts: Noto Serif JP (Headings/Program) & Noto Sans JP (Body/UI)
 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@500;600;700&display=swap');

:root {
    /* Classical Hall Palette */
    --bg-ivory: #FAF8F5;
    --bg-paper: #FFFFFF;
    --bg-subtle: #F2EFE9;
    --bg-dark: #141824;
    --bg-dark-card: #1E2436;

    /* Typography Colors */
    --text-primary: #1F1E1C;
    --text-secondary: #5A564F;
    --text-muted: #8C867B;
    --text-on-dark: #F7F4EE;

    /* Accents: Brass Gold & Velvet Burgundy */
    --gold-primary: #B89146;
    --gold-light: #DFC690;
    --gold-pale: #F7F1E3;
    --burgundy: #7A1C24;
    --burgundy-dark: #591218;

    /* Status Colors */
    --status-live: #1F7A4C;
    --status-live-bg: #E8F6EE;
    --status-warn: #B86B11;
    --status-warn-bg: #FEF5E7;
    --status-danger: #A61B29;
    --status-danger-bg: #FDECEC;

    /* Borders & Shadows */
    --border-hairline: #E4DEC9;
    --border-strong: #C9B991;
    --shadow-soft: 0 4px 20px rgba(20, 24, 36, 0.06);
    --shadow-elevated: 0 12px 32px rgba(20, 24, 36, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Font Stacks */
    --font-serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
    --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

/* ==========================================================================
   1. Base Reset & Typography
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-ivory);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.75;
    letter-spacing: 0.02em;
}

h1, h2, h3, h4, .serif-heading {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-top: 0;
}

a {
    color: var(--burgundy);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    color: var(--gold-primary);
}

/* ==========================================================================
   2. Header, Container & Classical Frame
   ========================================================================== */
.site-header {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    border-bottom: 2px solid var(--gold-primary);
    padding: 0.9rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    color: var(--text-on-dark);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-logo:hover {
    color: var(--gold-light);
}

.brand-logo__sub {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--gold-light);
    font-weight: 400;
    letter-spacing: 0.04em;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.container--narrow {
    max-width: 840px;
}

/* クラシックプログラム風カード枠 */
.classic-card {
    background: var(--bg-paper);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    margin-bottom: 1.75rem;
    position: relative;
}

.classic-card--gold-border {
    border: 1px solid var(--border-strong);
    box-shadow: inset 0 0 0 3px var(--bg-paper), inset 0 0 0 4px var(--border-hairline), var(--shadow-soft);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    padding-bottom: 0.65rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.section-title::before {
    content: "◆";
    color: var(--gold-primary);
    font-size: 0.9em;
    margin-right: 0.4rem;
}

/* ==========================================================================
   3. Real-time Liveliness & Status Badges (仕様6: 活気演出)
   ========================================================================== */
.liveliness-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    background: var(--gold-pale);
    border: 1px solid var(--gold-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.pulse-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--burgundy);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--burgundy);
    position: relative;
}

.pulse-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--burgundy);
    animation: pulseRing 1.8s infinite cubic-bezier(0.2, 0.8, 0.4, 1);
}

@keyframes pulseRing {
    0% { transform: scale(0.7); opacity: 1; }
    100% { transform: scale(1.9); opacity: 0; }
}

.recent-sales-pill {
    background: var(--bg-paper);
    border: 1px solid var(--border-strong);
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* 残席・ステータスバッジ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge--available {
    background: var(--status-live-bg);
    color: var(--status-live);
    border: 1px solid rgba(31, 122, 76, 0.25);
}

.badge--low-stock {
    background: var(--status-warn-bg);
    color: var(--status-warn);
    border: 1px solid rgba(184, 107, 17, 0.35);
}

.badge--sold-out {
    background: var(--status-danger-bg);
    color: var(--status-danger);
    border: 1px solid rgba(166, 27, 41, 0.3);
}

.badge--free {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
}

/* ==========================================================================
   4. Seat Map & 10-Min Lock UI (仕様5: 3座席モード対応)
   ========================================================================== */
.stage-ribbon {
    background: linear-gradient(180deg, #2B3147 0%, #181C2B 100%);
    color: var(--gold-light);
    font-family: var(--font-serif);
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 40px 40px 4px 4px;
    margin: 0 auto 1.75rem;
    max-width: 520px;
    letter-spacing: 0.25em;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--gold-primary);
}

.seat-grid-wrapper {
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
}

.seat-grid {
    display: inline-grid;
    gap: 6px;
    min-width: 100%;
    justify-content: center;
}

.seat-btn {
    width: 38px;
    height: 36px;
    border-radius: 6px 6px 3px 3px;
    border: 1px solid var(--border-strong);
    background: var(--bg-paper);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.seat-btn:hover:not(:disabled) {
    border-color: var(--burgundy);
    background: var(--gold-pale);
    transform: translateY(-1px);
}

.seat-btn.is-selected {
    background: var(--burgundy);
    color: #fff;
    border-color: var(--burgundy-dark);
    box-shadow: 0 2px 8px rgba(122, 28, 36, 0.35);
}

.seat-btn.is-locked {
    background: var(--status-warn-bg);
    color: var(--status-warn);
    border-style: dashed;
    cursor: not-allowed;
}

.seat-btn.is-sold,
.seat-btn.is-organizer-hold {
    background: #E5E2DC;
    color: #9E998E;
    border-color: #D2CEC4;
    cursor: not-allowed;
}

/* ==========================================================================
   5. Organizer Simulator & Reception Hybrid UI (仕様4・5)
   ========================================================================== */
.simulator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-hairline);
    border-left: 4px solid var(--gold-primary);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
}

.stat-box--danger {
    border-left-color: var(--status-danger);
    background: var(--status-danger-bg);
}

.stat-box__label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-box__value {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ハイブリッド当日受付（カメラQR＋リスト手チェック1画面） */
.reception-split {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .reception-split {
        grid-template-columns: 1fr;
    }
}

.qr-scanner-viewport {
    background: #0F121A;
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-md);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark);
    overflow: hidden;
    position: relative;
}

/* ==========================================================================
   6. Forms, Buttons & Tables
   ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-paper);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--burgundy);
    box-shadow: 0 0 0 3px rgba(122, 28, 36, 0.14);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn--primary {
    background: var(--burgundy);
    color: #fff;
    border-color: var(--burgundy-dark);
}

.btn--primary:hover {
    background: var(--burgundy-dark);
    color: #fff;
}

.btn--gold {
    background: var(--gold-primary);
    color: #fff;
}

.btn--outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn--outline:hover {
    background: var(--bg-subtle);
}

/* テーブル・法務表 */
.classic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: var(--bg-paper);
}

.classic-table th,
.classic-table td {
    border: 1px solid var(--border-hairline);
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.classic-table th {
    background: var(--bg-subtle);
    font-weight: 700;
    color: var(--text-primary);
}

.classic-table tbody th {
    width: 28%;
}


/* タブナビゲーション */
.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-hairline);
    padding-bottom: 0.75rem;
}

.legal-nav__link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.legal-nav__link:hover,
.legal-nav__link.is-active {
    background: var(--burgundy);
    color: #fff;
}

/* フッター */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    border-top: 2px solid var(--gold-primary);
    padding: 2.5rem 1.25rem;
    margin-top: 4rem;
    font-size: 0.85rem;
}

.site-footer__inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-footer a {
    color: var(--gold-light);
}

/* ==========================================================================
   7. Print Stylesheet (仕様5: 当日受付用の紙名簿・QRチケット印刷最適化)
   ========================================================================== */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 10.5pt;
    }
    .site-header,
    .site-footer,
    .no-print,
    .liveliness-bar,
    .legal-nav,
    .btn {
        display: none !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .classic-card {
        box-shadow: none !important;
        border: 1px solid #999 !important;
        page-break-inside: avoid;
    }
    .classic-table th,
    .classic-table td {
        border: 1px solid #333 !important;
        padding: 6px 8px !important;
    }
}

/* ==========================================================================
   8. Mobile Responsive Fixes (スマホ画面でのヘッダー・表・QRカード最適化)
   ========================================================================== */
section[id] {
    scroll-margin-top: 90px;
}

.btn {
    white-space: nowrap;
}

.tier-qty-select {
    min-width: 78px;
}

@media (max-width: 640px) {
    .site-header {
        padding: 0.65rem 0.9rem;
    }

    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }

    .brand-logo {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
        font-size: 1.15rem;
        line-height: 1.25;
    }

    .brand-logo__sub {
        font-size: 0.72rem;
    }

    .site-header nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .container {
        padding: 1.1rem 0.75rem 3rem;
    }

    .classic-card {
        padding: 1.15rem 0.9rem;
        margin-bottom: 1.25rem;
        overflow-x: auto;
    }

    .section-title {
        font-size: 1.12rem;
        align-items: flex-start;
    }

    .classic-table {
        font-size: 0.82rem;
    }

    .classic-table th,
    .classic-table td {
        padding: 0.55rem 0.5rem;
    }

    .classic-table tbody th {
        width: 32%;
    }

    /* スマホで複数列テーブル（theadあり）が潰れないよう最小幅を確保して横スクロール対応 */
    .classic-table thead th {
        white-space: nowrap;
    }

    .ticket-item-card {
        grid-template-columns: 1fr !important;
        text-align: left;
    }
}
