:root {
    --bg: #F6EDE0;
    --deep-bg: #EAD7C0;
    --content: #FFFFFF;
    --secondary-bg: #E8D2B4;
    --title: #3A2414;
    --text: #4A3220;
    --muted: #7A5634;
    --soft: #9A7450;
    --gold: #C4843C;
    --gold-light: #D9A05A;
    --gold-dark: #8B5A2B;
    --cream: #FFF6EA;
    --border: rgba(196, 132, 60, 0.18);
    --border-strong: rgba(196, 132, 60, 0.46);
    --shadow: 0 12px 28px rgba(58, 36, 20, 0.08);
    --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}
body.overlay-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 200;
    transform: translateY(-150%);
    background: var(--content);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px 12px;
}
.skip-link:focus { transform: translateY(0); }

.crown-bar {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    right: 0;
    height: 22px;
    background: var(--gold-dark);
    color: var(--cream);
    font-size: 12px;
}
.top-shell,
.palace-shell,
.seat-shell,
.footer-shell,
.page-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}
.top-shell {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-search-button {
    min-height: 22px;
    border: 0;
    background: transparent;
    color: var(--cream);
    cursor: pointer;
    padding: 0 8px;
    font-size: 12px;
}

.palace-bar {
    position: fixed;
    z-index: 99;
    top: 22px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--content);
    border-bottom: 1px solid var(--border);
}
.palace-shell {
    height: 60px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}
.brand-link,
.app-link,
.drawer-trigger {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.brand-link { justify-self: start; min-width: 120px; }
.brand-logo { height: 28px; width: auto; object-fit: contain; }
.brand-fallback { font-size: 16px; font-weight: 800; color: var(--title); }
.drawer-trigger {
    justify-self: center;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--cream);
    color: var(--title);
    padding: 0 16px;
    cursor: pointer;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}
.drawer-mark {
    color: var(--cream);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gold);
    font-size: 11px;
}
.app-link {
    justify-self: end;
    color: var(--gold-dark);
    font-weight: 800;
    font-size: 14px;
    padding: 0 4px;
}

.seat-tabs {
    position: fixed;
    z-index: 98;
    top: 82px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
}
.seat-shell {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
}
.seat-shell a {
    min-width: 108px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}
.seat-shell a.is-current {
    background: var(--gold);
    color: var(--cream);
}

.site-main {
    min-height: 65vh;
    padding-top: 122px;
}
.page-shell { padding: 36px 0 64px; }
.page-hero {
    padding: 34px 0 28px;
    border-bottom: 1px solid var(--border);
}
.page-kicker,
.eyebrow {
    display: inline-block;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
h1, h2, h3 { color: var(--title); margin-top: 0; }
h1 { font-size: 24px; line-height: 1.3; margin-bottom: 14px; }
h2 { font-size: 20px; line-height: 1.35; margin-bottom: 14px; }
h3 { font-size: 16px; line-height: 1.45; margin-bottom: 10px; }
p { margin: 0 0 14px; }
.lead {
    max-width: 820px;
    font-size: 16px;
    color: var(--muted);
}
.section {
    padding: 34px 0;
    border-bottom: 1px solid var(--border);
}
.section:last-child { border-bottom: 0; }
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}
.section-head p { margin: 0; max-width: 620px; color: var(--muted); }

.primary-button,
.secondary-button,
.text-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}
.primary-button {
    background: linear-gradient(135deg, #D9A05A 0%, #C4843C 55%, #8B5A2B 100%);
    color: var(--cream);
    border: 1px solid transparent;
}
.secondary-button {
    background: var(--content);
    color: var(--title);
    border: 1px solid var(--border-strong);
}
.text-link {
    min-height: 40px;
    padding: 0;
    color: var(--gold-dark);
}
a:hover, button:hover { filter: brightness(.98); }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid rgba(196, 132, 60, .36);
    outline-offset: 3px;
}
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.media-slot {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.media-slot.banner-slot { height: 260px; }
.media-slot.card-slot { height: 180px; }
.media-slot.feature-slot { height: 200px; }
.media-slot.app-slot { height: min(360px, 50vw); min-height: 260px; }
.media-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.home-cover { padding: 28px 0 36px; }
.home-cover-copy { max-width: 820px; margin: 22px auto 0; text-align: center; }
.home-cover-copy .brandline { font-size: 13px; color: var(--gold-dark); font-weight: 800; letter-spacing: .1em; }
.home-cover-copy h1 { margin: 8px 0 12px; }
.home-cover-copy .button-row { justify-content: center; margin-top: 20px; }

.cards-3,
.cards-2,
.cards-4,
.info-grid,
.shelf-grid,
.faq-grid,
.footer-groups {
    display: grid;
    gap: 16px;
}
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shelf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card,
.paper-card,
.shelf-card,
.note-card,
.rank-item,
.timeline-item,
.faq-item {
    background: var(--content);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.card { overflow: hidden; }
.card-body { padding: 18px; }
.card-body p:last-child { margin-bottom: 0; }
.paper-card,
.note-card,
.shelf-card,
.rank-item,
.faq-item { padding: 18px; }
.card-label,
.status,
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--secondary-bg);
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 800;
}

.numbered-list { display: grid; gap: 10px; }
.numbered-row,
.rank-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: start;
    gap: 16px;
}
.big-number,
.rank-number {
    color: var(--gold);
    font-weight: 900;
    font-size: 28px;
    line-height: 1;
}
.numbered-row {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.numbered-row:last-child { border-bottom: 0; }

.timeline {
    position: relative;
    display: grid;
    gap: 16px;
    padding-left: 22px;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border-strong);
}
.timeline-item { position: relative; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -21px;
    top: 24px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--cream);
}
.timeline-item h3 { margin-bottom: 6px; }
.timeline-item .status { margin-bottom: 10px; }

.shelf-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
}
.shelf-card .tag { align-self: flex-start; margin-bottom: 12px; }
.shelf-card .text-link { margin-top: auto; justify-content: flex-start; }

.notice {
    border-left: 4px solid var(--gold);
    background: var(--cream);
    padding: 16px 18px;
    border-radius: 0 10px 10px 0;
    color: var(--muted);
}
.prose { max-width: 880px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }

.app-panel {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 28px;
    align-items: center;
}
.app-copy .icon-wrap {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--content);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
}
.app-copy .icon-wrap img { width: 48px; height: 48px; object-fit: contain; }

.inline-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.inline-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    background: var(--content);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--gold-dark);
    font-weight: 700;
}

.site-footer {
    background: var(--gold-dark);
    color: var(--cream);
    border-top: 1px solid rgba(255, 246, 234, .45);
    font-size: 13px;
}
.footer-shell { padding: 34px 0 24px; }
.footer-brand {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 246, 234, .18);
}
.footer-logo-row { display: flex; align-items: center; gap: 12px; }
.footer-logo { height: 28px; width: auto; object-fit: contain; }
.footer-logo-row strong { display: block; color: var(--cream); font-size: 16px; }
.footer-logo-row span { display: block; color: var(--cream); font-size: 12px; }
.footer-brand p { margin: 0; max-width: 720px; }
.footer-groups {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    padding: 24px 0;
}
.footer-groups h2 { color: var(--cream); font-size: 13px; margin-bottom: 10px; }
.footer-groups a { display: block; padding: 4px 0; color: var(--cream); }
.footer-bottom { padding-top: 16px; border-top: 1px solid rgba(255, 246, 234, .18); color: rgba(255, 246, 234, .86); }

.screen-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(58, 36, 20, .38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}
.screen-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.site-drawer {
    position: fixed;
    z-index: 130;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(400px, 86vw);
    background: var(--cream);
    border-left: 1px solid var(--border-strong);
    transform: translateX(102%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .24s ease, visibility .24s ease;
    display: flex;
    flex-direction: column;
}
.site-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head {
    min-height: 72px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--content);
}
.drawer-brand { display: flex; align-items: center; gap: 10px; }
.drawer-logo { height: 28px; width: auto; object-fit: contain; }
.drawer-brand strong { display: block; color: var(--title); }
.drawer-brand span { display: block; font-size: 11px; color: var(--muted); }
.icon-button {
    min-height: 44px;
    min-width: 58px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--content);
    cursor: pointer;
    color: var(--title);
    font-size: 13px;
}
.drawer-scroll { overflow-y: auto; padding: 12px 16px 26px; }
.drawer-group { padding: 14px 0; border-bottom: 1px solid var(--border); }
.drawer-group:last-child { border-bottom: 0; }
.drawer-group h2 { font-size: 13px; color: var(--gold-dark); margin-bottom: 8px; }
.drawer-group a {
    display: block;
    padding: 10px 8px;
    border-radius: 8px;
}
.drawer-group a:hover { background: var(--secondary-bg); }
.drawer-group strong { display: block; color: var(--title); font-size: 14px; }
.drawer-group span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.search-layer {
    position: fixed;
    z-index: 135;
    left: 0;
    right: 0;
    top: 82px;
    padding: 16px;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.search-layer.is-open { visibility: visible; pointer-events: auto; opacity: 1; transform: translateY(0); }
.search-card {
    width: min(720px, 100%);
    margin: 0 auto;
    background: var(--content);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 20px;
}
.search-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.search-head h2 { margin: 4px 0 0; }
.search-label { display: block; margin: 16px 0 6px; font-size: 13px; color: var(--muted); }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.search-row input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--cream);
    color: var(--title);
    padding: 0 12px;
}
.search-go { border: 0; cursor: pointer; }
.search-note { margin: 10px 0 12px; color: var(--muted); font-size: 13px; }
.search-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.search-presets a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--cream);
    color: var(--gold-dark);
    font-weight: 700;
}

.mobile-bottom { display: none; }

@media (max-width: 820px) {
    .seat-tabs { display: none; }
    .site-main { padding-top: 82px; }
    .cards-3, .cards-4, .shelf-grid { grid-template-columns: 1fr 1fr; }
    .app-panel { grid-template-columns: 1fr; }
    .app-panel .media-slot { max-width: 420px; margin: 0 auto; }
    .footer-brand { grid-template-columns: 1fr; gap: 18px; }
    .footer-groups { grid-template-columns: 1fr 1fr; }
    .site-footer { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
    .mobile-bottom {
        position: fixed;
        z-index: 95;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(48px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: var(--content);
        border-top: 1px solid var(--border-strong);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
    }
    .mobile-bottom a {
        min-width: 0;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        color: var(--muted);
        font-weight: 700;
    }
    .mobile-bottom a.is-current { background: var(--gold); color: var(--cream); }
    .search-layer {
        inset: 0;
        top: 0;
        padding: 0;
        background: var(--gold-dark);
    }
    .search-card {
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: var(--gold-dark);
        color: var(--cream);
        padding: 24px 16px;
        overflow-y: auto;
    }
    .search-head h2, .search-label { color: var(--cream); }
    .search-head .eyebrow, .search-note { color: var(--deep-bg); }
    .search-head .icon-button { background: var(--cream); }
    .search-row input { background: var(--cream); }
    .search-presets a { background: var(--cream); color: var(--title); border-color: rgba(255,255,255,.15); }
}

@media (max-width: 620px) {
    .top-shell, .palace-shell, .seat-shell, .footer-shell, .page-shell { width: calc(100% - 32px); }
    .palace-shell { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
    .brand-link { min-width: 0; overflow: hidden; }
    .brand-logo { max-width: 112px; }
    .brand-fallback { font-size: 15px; white-space: nowrap; }
    .drawer-trigger { padding: 0 12px; }
    .drawer-mark { display: none; }
    .app-link { font-size: 13px; white-space: nowrap; }
    .page-shell { padding-top: 26px; }
    .page-hero { padding-top: 26px; }
    .home-cover { padding-top: 18px; }
    .home-cover-copy { text-align: left; }
    .home-cover-copy .button-row { justify-content: flex-start; }
    .section { padding: 28px 0; }
    .section-head { display: block; }
    .section-head p { margin-top: 8px; }
    .cards-3, .cards-2, .cards-4, .info-grid, .shelf-grid, .faq-grid { grid-template-columns: 1fr; }
    .media-slot.banner-slot { height: 260px; }
    .media-slot.card-slot { height: 180px; }
    .media-slot.feature-slot { height: 200px; }
    .numbered-row, .rank-item { grid-template-columns: 46px 1fr; gap: 10px; }
    .footer-groups { grid-template-columns: 1fr 1fr; gap: 18px; }
    .search-row { grid-template-columns: 1fr; }
    .search-go { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
