:root {
    --bg: #FBF6EA;
    --bg-deep: #F3E6C8;
    --surface: #FFFFFF;
    --surface-alt: #F0E2BE;
    --title: #3A2A10;
    --text: #4A3A1A;
    --muted: #7A6232;
    --soft: #9A7A44;
    --gold: #C9A227;
    --gold-light: #E0BC4A;
    --gold-deep: #8C6A12;
    --cream: #FFF8E8;
    --border: rgba(201, 162, 39, 0.18);
    --border-strong: rgba(201, 162, 39, 0.46);
    --shadow: 0 12px 28px rgba(58, 42, 16, 0.08);
    --radius: 12px;
    --shell: 1120px;
    --crown-h: 22px;
    --palace-h: 60px;
    --seat-h: 40px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    margin: 0;
    min-width: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { color: inherit; }
.shell { width: min(calc(100% - 32px), var(--shell)); margin: 0 auto; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 9999; background: var(--surface); padding: 8px 12px; border: 1px solid var(--gold); }
.skip-link:focus { top: 8px; }

.crown-line {
    position: fixed; inset: 0 0 auto 0; z-index: 1200;
    height: var(--crown-h); background: var(--title); color: var(--cream); font-size: 12px;
}
.crown-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crown-search { min-height: 22px; padding: 0 8px; border: 0; background: transparent; color: var(--cream); cursor: pointer; }

.palace-bar {
    position: fixed; top: var(--crown-h); left: 0; right: 0; z-index: 1190;
    height: var(--palace-h); background: var(--surface); border-bottom: 1px solid var(--border-strong);
}
.palace-inner { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.palace-brand { justify-self: start; min-width: 0; }
.brand-link { min-height: 44px; display: inline-flex; align-items: center; }
.brand-logo { height: 28px; width: auto; object-fit: contain; object-position: center; }
.brand-wordmark { font-size: 16px; font-weight: 800; color: var(--title); letter-spacing: 0.04em; white-space: nowrap; }
.palace-menu-button,
.palace-app-link,
.button {
    min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.palace-menu-button { padding: 0 22px; border: 1px solid var(--border-strong); background: var(--cream); color: var(--title); }
.palace-app-link { justify-self: end; padding: 0 16px; background: linear-gradient(135deg, #E0BC4A 0%, #C9A227 55%, #8C6A12 100%); color: var(--title); }

.seat-tabs {
    position: fixed; top: calc(var(--crown-h) + var(--palace-h)); left: 0; right: 0; z-index: 1180;
    height: var(--seat-h); background: var(--cream); border-bottom: 1px solid var(--border);
}
.seat-tabs-inner { height: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; }
.seat-tabs a { min-width: 94px; min-height: 30px; padding: 3px 16px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.seat-tabs a.is-active { background: var(--gold); color: var(--title); font-weight: 800; }

.site-main { padding-top: calc(var(--crown-h) + var(--palace-h) + var(--seat-h)); min-height: 72vh; }
.page-section { padding: 46px 0; }
.page-section.compact { padding: 28px 0; }
.page-section.alt { background: var(--bg-deep); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.page-hero { padding: 46px 0 34px; }
.page-kicker { margin: 0 0 8px; color: var(--gold-deep); font-size: 13px; font-weight: 800; letter-spacing: 0.16em; }
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.4; margin-bottom: 14px; }
h3 { font-size: 16px; line-height: 1.45; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { max-width: 820px; color: var(--muted); }
.eyebrow { display: inline-block; margin-bottom: 10px; padding: 4px 9px; border-radius: 999px; background: var(--surface-alt); color: var(--title); font-size: 12px; font-weight: 800; }

.cover-media { height: 260px; border-radius: 14px; background: var(--cream); border: 1px solid var(--border); overflow: hidden; }
.media-slot { height: 180px; border-radius: 12px; background: var(--cream); border: 1px solid var(--border); overflow: hidden; }
.media-slot.medium { height: 200px; }
.media-slot.tall { height: min(360px, 66vw); }
.media-slot.brand { height: 210px; }
.media-slot.icon-slot { width: 48px; height: 48px; border-radius: 10px; }
.spaced-top { margin-top: 18px; }
.app-icon-wrap { margin-top: 12px; width: 48px; }
.media-slot img,
.cover-media img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.media-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--cream), var(--bg-deep)); }

.cover-copy { padding-top: 24px; max-width: 860px; }
.cover-copy h1 { margin-bottom: 10px; }
.cover-sentence { font-size: 20px; color: var(--title); font-weight: 800; margin-bottom: 10px; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.button { padding: 0 18px; border: 1px solid transparent; }
.button.primary { background: linear-gradient(135deg, #E0BC4A 0%, #C9A227 55%, #8C6A12 100%); color: var(--title); }
.button.secondary { background: var(--surface); color: var(--title); border-color: var(--gold); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-body { padding: 18px; }
.card p:last-child { margin-bottom: 0; }
.text-card { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

.number-list { display: grid; gap: 12px; counter-reset: item; }
.number-item { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.number { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-alt); color: var(--gold-deep); font-size: 20px; font-weight: 900; }

.shelf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shelf-item { min-height: 150px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; justify-content: space-between; }
.shelf-item small { color: var(--soft); }

.timeline { position: relative; display: grid; gap: 16px; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 9px; width: 2px; background: var(--border-strong); }
.timeline-item { position: relative; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.timeline-item::before { content: ""; position: absolute; left: -29px; top: 24px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg); }
.status { display: inline-flex; min-height: 28px; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--cream); color: var(--gold-deep); border: 1px solid var(--border-strong); font-size: 12px; font-weight: 800; }

.note-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.note { padding: 18px; background: var(--cream); border: 1px solid var(--border-strong); border-radius: var(--radius); }
.note strong { display: block; color: var(--title); margin-bottom: 8px; }

.prose { max-width: 880px; }
.prose section { margin-bottom: 28px; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 16px; padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.rule-block { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; margin-bottom: 16px; }

.faq-list { display: grid; gap: 12px; }
.faq-list details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; }
.faq-list summary { min-height: 52px; display: flex; align-items: center; color: var(--title); font-weight: 800; cursor: pointer; }
.faq-list details p { padding-bottom: 18px; color: var(--muted); }

.site-footer { background: var(--title); color: var(--bg-deep); border-top: 1px solid var(--gold-deep); padding: 34px 0 86px; font-size: 13px; }
.footer-brand-row { padding-bottom: 24px; }
.footer-brand-mark { display: flex; align-items: center; gap: 12px; }
.footer-brand-mark .brand-logo { height: 28px; }
.footer-brand-mark .brand-wordmark { color: var(--cream); }
.footer-brand-mark strong, .footer-brand-mark span { display: block; }
.footer-brand-mark span { color: var(--soft); font-size: 12px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 24px 0; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-grid h2 { color: var(--cream); font-size: 13px; margin-bottom: 8px; }
.footer-grid a { display: block; min-height: 30px; color: var(--bg-deep); }
.footer-note { padding-top: 20px; color: var(--bg-deep); }
.footer-note p:last-child { margin-bottom: 0; }

.site-overlay { position: fixed; inset: 0; z-index: 1800; background: rgba(58, 42, 16, 0.46); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.site-overlay.is-visible { visibility: visible; opacity: 1; pointer-events: auto; }
.site-drawer { position: fixed; inset: 0 auto 0 0; z-index: 1900; width: min(400px, 86vw); background: var(--surface); transform: translateX(-103%); visibility: hidden; pointer-events: none; transition: transform .24s ease, visibility .24s ease; box-shadow: var(--shadow); }
.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: 14px; border-bottom: 1px solid var(--border); background: var(--cream); }
.drawer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--title); }
.drawer-brand .brand-logo { height: 28px; }
.icon-button { min-width: 44px; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--title); cursor: pointer; }
.drawer-scroll { height: calc(100% - 72px); overflow-y: auto; padding: 14px 16px 28px; }
.drawer-group { padding: 12px 0; border-bottom: 1px solid var(--border); }
.drawer-group:last-child { border-bottom: 0; }
.drawer-group h2 { font-size: 13px; color: var(--gold-deep); margin-bottom: 8px; }
.drawer-group a { display: block; padding: 10px; border-radius: 10px; }
.drawer-group a:hover { background: var(--cream); }
.drawer-group strong { display: block; color: var(--title); font-size: 14px; }
.drawer-group span { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 2px; }

.site-search { position: fixed; z-index: 1950; top: calc(var(--crown-h) + var(--palace-h)); left: 0; right: 0; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.site-search.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.search-card { width: min(calc(100% - 32px), 860px); margin: 12px auto 0; padding: 22px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); }
.search-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.search-head strong { color: var(--title); font-size: 18px; }
.search-head p { color: var(--muted); margin: 4px 0 0; }
.search-field { display: grid; gap: 6px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.search-field input { width: 100%; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 12px; background: var(--cream); color: var(--title); outline: none; }
.search-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.search-presets a { min-height: 40px; padding: 7px 12px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--surface-alt); color: var(--title); }

.mobile-bottom-nav { display: none; }

.button:hover, .palace-app-link:hover { filter: brightness(1.03); }
a:hover { text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid rgba(201, 162, 39, 0.55); outline-offset: 3px; }

.split-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 24px; align-items: start; }
.info-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 22px; }
.info-strip > div { padding: 14px; border-radius: 10px; background: var(--cream); border: 1px solid var(--border); }
.info-strip strong { color: var(--title); display: block; margin-bottom: 4px; }

@media (max-width: 860px) {
    .card-grid, .card-grid.four, .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .note-grid { grid-template-columns: 1fr; }
    .split-intro { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    :root { --seat-h: 0px; }
    .shell { width: min(calc(100% - 32px), var(--shell)); }
    .seat-tabs { display: none; }
    .site-main { padding-top: calc(var(--crown-h) + var(--palace-h)); }
    .palace-inner { grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; }
    .palace-menu-button { padding: 0 14px; }
    .palace-app-link { padding: 0 12px; }
    .brand-wordmark { font-size: 15px; }
    .cover-media { height: 260px; }
    .page-hero { padding-top: 34px; }
    .page-section { padding: 36px 0; }
    .card-grid, .card-grid.two, .card-grid.four, .shelf-grid, .info-strip { grid-template-columns: 1fr; }
    .number-item { grid-template-columns: 44px 1fr; padding: 16px; }
    .number { width: 44px; height: 44px; font-size: 17px; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .mobile-bottom-nav {
        position: fixed; z-index: 1100; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
        height: calc(48px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border-strong);
    }
    .mobile-bottom-nav a { min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
    .mobile-bottom-nav a.is-active { background: var(--gold); color: var(--title); font-weight: 800; }
    .site-search { inset: var(--crown-h) 0 0 0; top: var(--crown-h); background: var(--title); }
    .search-card { width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--title); color: var(--cream); padding: 22px 16px; }
    .search-head strong, .search-head p, .search-field { color: var(--cream); }
    .search-head .icon-button { border-color: var(--gold); background: transparent; color: var(--cream); }
    .search-field input { background: var(--cream); color: var(--title); }
    .search-presets a { background: var(--gold); color: var(--title); }
}

@media (max-width: 430px) {
    .palace-app-link { font-size: 12px; padding: 0 9px; }
    .palace-menu-button { font-size: 12px; padding: 0 11px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}
