:root {
    --page: #F6EDE0;
    --deep: #EAD7C0;
    --surface: #FFFFFF;
    --surface-2: #E8D2B4;
    --title: #3A2414;
    --text: #4A3220;
    --muted: #7A5634;
    --soft: #9A7450;
    --gold: #C4843C;
    --gold-bright: #D9A05A;
    --gold-deep: #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; overflow-x: hidden; }
body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: var(--page);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    padding-top: 82px;
}
body.nav-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; color: var(--title); line-height: 1.35; }
h1 { font-size: 24px; line-height: 1.3; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 999;
    background: var(--cream);
    color: var(--title);
    border: 1px solid var(--border-strong);
    padding: 8px 12px;
    border-radius: 8px;
}
.skip-link:focus { top: 6px; }

.crownbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 120;
    height: 22px;
    background: var(--gold-deep);
    color: var(--cream);
    font-size: 12px;
}
.crownbar-inner,
.palacebar-inner,
.seat-tabs-inner,
.site-main,
.footer-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}
.crownbar-inner {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.crown-search {
    min-width: 44px;
    height: 22px;
    border: 0;
    padding: 0 4px;
    background: transparent;
    color: var(--cream);
    cursor: pointer;
}

.palacebar {
    position: fixed;
    top: 22px;
    left: 0;
    right: 0;
    z-index: 115;
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.palacebar-inner {
    height: 60px;
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
    align-items: center;
    gap: 12px;
}
.brand-home { justify-self: start; min-width: 0; display: inline-flex; align-items: center; min-height: 44px; }
.brand-logo, .drawer-logo, .footer-logo { height: 28px; width: auto; max-width: 180px; object-fit: contain; object-position: center; }
.brand-fallback { font-size: 16px; font-weight: 700; color: var(--title); white-space: nowrap; }
.drawer-trigger,
.header-app-link,
.drawer-close,
.search-close {
    min-height: 44px;
    border-radius: 10px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.drawer-trigger {
    justify-self: center;
    min-width: 86px;
    padding: 0 18px;
    border: 1px solid var(--border-strong);
    background: var(--cream);
    color: var(--title);
    cursor: pointer;
}
.header-app-link {
    justify-self: end;
    min-width: 92px;
    padding: 0 18px;
    background: linear-gradient(135deg,#D9A05A 0%,#C4843C 55%,#8B5A2B 100%);
    color: var(--cream);
    font-weight: 700;
}

.seat-tabs {
    height: 40px;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
}
.seat-tabs-inner { height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.seat-tabs a {
    min-height: 32px;
    padding: 4px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--muted);
}
.seat-tabs a.is-current { background: var(--gold); color: var(--cream); font-weight: 700; }

.site-main { padding: 30px 0 56px; }

.section,
.page-hero,
.notice-panel,
.reading-panel {
    margin-bottom: 24px;
}
.page-hero,
.section-card,
.reading-panel,
.notice-panel,
.article-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.page-hero { padding: 28px; }
.page-hero h1 { margin: 5px 0 12px; }
.page-hero p { max-width: 860px; color: var(--muted); margin-bottom: 0; }
.section-kicker {
    color: var(--gold-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}
.section-heading p { color: var(--muted); max-width: 700px; margin: 0; }
.section-title-wrap h2 { margin-top: 4px; }

.hero-cover-slot,
.media-slot,
.app-media-slot,
.icon-slot {
    width: 100%;
    background: linear-gradient(180deg, var(--cream), var(--deep));
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-cover-slot { height: 260px; margin-bottom: 22px; }
.media-slot { height: 180px; }
.media-slot.tall { height: 200px; }
.app-media-slot { height: 360px; }
.icon-slot { width: 64px; height: 64px; flex: 0 0 64px; }
.hero-cover-slot img,
.media-slot img,
.app-media-slot img,
.icon-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.icon-slot img { width: 48px; height: 48px; }

.home-brandline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.home-brandline strong { font-size: 22px; color: var(--title); }
.home-brandline span { font-size: 12px; color: var(--soft); letter-spacing: .12em; }
.hero-copy h1 { margin-bottom: 12px; }
.hero-copy > p { max-width: 860px; color: var(--muted); }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-primary,
.btn-secondary {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg,#D9A05A 0%,#C4843C 55%,#8B5A2B 100%); color: var(--cream); font-weight: 700; }
.btn-secondary { background: var(--surface); color: var(--title); border: 1px solid var(--border-strong); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-card { padding: 18px; }
.section-card .media-slot { margin-bottom: 14px; }
.section-card h3 { margin-bottom: 8px; }
.section-card p { color: var(--muted); margin-bottom: 0; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--gold-deep); font-weight: 700; }

.feature-block {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.feature-copy { min-width: 0; }
.feature-copy > p { color: var(--muted); }
.numbered-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.numbered-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px;
    border-radius: 10px;
    background: var(--cream);
    border: 1px solid var(--border);
}
.numbered-item .num,
.big-number {
    color: var(--gold-deep);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.numbered-item strong { color: var(--title); }
.numbered-item span { display: block; color: var(--muted); font-size: 13px; }

.shelf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shelf-item {
    min-height: 150px;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--surface), var(--cream));
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.shelf-item .shelf-label { color: var(--gold-deep); font-size: 12px; font-weight: 700; }
.shelf-item h3 { margin: 8px 0; }
.shelf-item p { color: var(--muted); font-size: 14px; margin: 0; }

.rank-list { display: grid; gap: 10px; }
.rank-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.rank-item .big-number { font-size: 24px; }
.rank-item h3 { margin-bottom: 4px; }
.rank-item p { color: var(--muted); margin: 0; }

.timeline { position: relative; margin-left: 8px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--border-strong); }
.timeline-item { position: relative; padding: 0 0 20px 0; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--cream);
    box-shadow: 0 0 0 1px var(--border-strong);
}
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--cream);
    border: 1px solid var(--border);
    color: var(--gold-deep);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}
.timeline-item p { color: var(--muted); margin: 4px 0 0; }

.note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.note-card { padding: 16px; border-radius: 12px; background: var(--cream); border: 1px solid var(--border); }
.note-card h3 { margin-bottom: 6px; }
.note-card p { color: var(--muted); margin: 0; }

.article-panel { padding: 22px; margin-bottom: 18px; }
.article-panel h2 { margin-bottom: 10px; }
.article-panel h3 { margin: 14px 0 6px; }
.article-panel p:last-child { margin-bottom: 0; }
.article-panel ul,
.article-panel ol { margin: 8px 0 0; padding-left: 1.35em; }
.article-panel li { margin-bottom: 7px; }
.article-lead { font-size: 16px; color: var(--muted); }

.definition-list { display: grid; gap: 12px; }
.definition-item { padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.definition-item h3 { margin-bottom: 6px; }
.definition-item p { margin: 0; color: var(--muted); }

.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.faq-item h2 { font-size: 16px; margin-bottom: 8px; }
.faq-item p { margin: 0; color: var(--muted); }

.app-block { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 22px; align-items: start; }
.app-copy { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.app-title-row { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.app-copy p { color: var(--muted); }

.notice-panel,
.reading-panel { padding: 20px; }
.notice-panel { background: var(--cream); }
.reading-panel { background: var(--surface); }
.notice-panel h2,
.reading-panel h2 { margin-bottom: 8px; }

.site-overlay {
    position: fixed;
    inset: 0;
    z-index: 138;
    background: rgba(58,36,20,.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}
.site-overlay.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }

.site-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 150;
    width: 400px;
    max-width: 86vw;
    background: var(--surface);
    box-shadow: -18px 0 40px rgba(58,36,20,.15);
    transform: translateX(104%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .24s ease, visibility .24s ease;
}
.site-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head {
    height: 68px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--cream);
}
.drawer-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.drawer-brand strong { color: var(--title); }
.drawer-logo-fallback, .footer-logo-fallback { font-weight: 800; color: var(--title); }
.drawer-close,
.search-close {
    min-width: 68px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    cursor: pointer;
}
.drawer-scroll { height: calc(100% - 68px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 28px; }
.drawer-group { margin-bottom: 18px; }
.drawer-group h2 { font-size: 13px; color: var(--gold-deep); margin: 0 0 7px; }
.drawer-group a { display: block; padding: 11px 10px; border-radius: 10px; border: 1px solid transparent; }
.drawer-group a:hover,
.drawer-group a:focus-visible { background: var(--cream); border-color: var(--border); }
.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; }

.search-layer {
    position: fixed;
    z-index: 145;
    top: 82px;
    left: 0;
    right: 0;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px);
    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(780px, calc(100% - 32px));
    margin: 12px auto 0;
    padding: 20px;
    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: 16px; margin-bottom: 12px; }
.search-head h2 { margin-top: 3px; }
.search-card label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.search-card input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--cream);
    color: var(--title);
    padding: 0 12px;
    outline: none;
}
.search-card input:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(196,132,60,.12); }
.search-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.search-presets a { min-height: 66px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--title); font-weight: 700; }
.search-presets a span { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.search-empty { color: var(--muted); margin: 12px 0 0; }

.site-footer {
    background: var(--gold-deep);
    color: var(--cream);
    border-top: 1px solid rgba(255,246,234,.35);
    font-size: 13px;
    padding: 30px 0 26px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-brand-link { min-height: 44px; display: inline-flex; align-items: center; }
.footer-brand strong { display: block; color: var(--cream); font-size: 16px; }
.footer-brand span { display: block; color: var(--cream); font-size: 11px; letter-spacing: .12em; }
.footer-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 18px 0; border-top: 1px solid rgba(255,246,234,.24); border-bottom: 1px solid rgba(255,246,234,.24); }
.footer-groups h2 { color: var(--cream); font-size: 13px; margin-bottom: 8px; }
.footer-groups a { display: block; min-height: 30px; color: var(--cream); }
.footer-groups a:hover,
.footer-groups a:focus-visible { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.footer-notice { color: var(--cream); margin: 18px 0 8px; max-width: 920px; }
.footer-copy { margin: 0; color: var(--cream); opacity: .84; }

.mobile-bottom { display: none; }

.btn-primary:hover,
.btn-secondary:hover,
.header-app-link:hover,
.drawer-trigger:hover { filter: brightness(.98); transform: translateY(-1px); }
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

@media (max-width: 820px) {
    body { padding-top: 82px; padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
    .crownbar-inner, .palacebar-inner, .site-main, .footer-inner { width: calc(100% - 32px); }
    .seat-tabs { display: none; }
    .palacebar-inner { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
    .brand-logo { max-width: 118px; }
    .brand-fallback { font-size: 15px; }
    .drawer-trigger { min-width: 70px; padding: 0 12px; }
    .header-app-link { min-width: 74px; padding: 0 12px; font-size: 13px; }
    .site-main { padding-top: 22px; padding-bottom: 34px; }
    .page-hero { padding: 22px 18px; }
    .hero-cover-slot { height: 220px; }
    .card-grid, .card-grid.two, .feature-block, .app-block { grid-template-columns: 1fr; }
    .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .note-grid { grid-template-columns: 1fr; }
    .numbered-list { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
    .app-media-slot { height: 320px; }
    .footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mobile-bottom {
        position: fixed;
        z-index: 110;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(48px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        background: var(--surface);
        border-top: 1px solid var(--border-strong);
    }
    .mobile-bottom a { min-width: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
    .mobile-bottom a.is-current { background: var(--gold); color: var(--cream); font-weight: 700; }
    .site-overlay { z-index: 138; }
    .search-layer { inset: 0; z-index: 160; background: var(--gold-deep); transform: none; overflow-y: auto; }
    .search-card {
        width: 100%;
        min-height: 100%;
        margin: 0;
        padding: 24px 16px calc(78px + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: var(--gold-deep);
        color: var(--cream);
    }
    .search-head h2, .search-card label, .search-empty { color: var(--cream); }
    .search-head .section-kicker { color: var(--gold-bright); }
    .search-close { background: var(--cream); color: var(--title); }
    .search-card input { background: var(--cream); color: var(--title); }
    .search-presets { grid-template-columns: 1fr; }
    .search-presets a { background: var(--cream); color: var(--title); border-color: rgba(196,132,60,.3); }
    .search-presets a span { color: var(--muted); }
}

@media (max-width: 520px) {
    .hero-cover-slot { height: 190px; }
    .media-slot { height: 160px; }
    .media-slot.tall { height: 180px; }
    .shelf-grid { grid-template-columns: 1fr; }
    .rank-item { grid-template-columns: 44px minmax(0, 1fr); }
    .footer-groups { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
}
