:root {
    --bg: #FBF6EA;
    --bg-deep: #F3E6C8;
    --surface: #FFFFFF;
    --surface-soft: #F0E2BE;
    --title: #3A2A10;
    --text: #4A3A1A;
    --muted: #7A6232;
    --quiet: #9A7A44;
    --gold: #C9A227;
    --gold-bright: #E0BC4A;
    --gold-dark: #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);
    --max: 1120px;
    --top-h: 22px;
    --bar-h: 60px;
    --tabs-h: 40px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK 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; }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(201, 162, 39, 0.52); outline-offset: 3px; }

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 8px 12px;
    transition: top .2s ease;
}
.skip-link:focus { top: 8px; }

.crown-line {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 70;
    height: var(--top-h);
    background: var(--title);
    color: var(--cream);
    font-size: 12px;
}
.top-shell, .palace-shell, .seat-shell, .footer-shell, .content-shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}
.top-shell {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.top-search-button {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--cream);
    min-width: 52px;
    height: 22px;
    padding: 0 8px;
    cursor: pointer;
}
.top-search-button::before { content: ""; position: absolute; inset: -11px -8px; }

.palace-bar {
    position: fixed;
    top: var(--top-h);
    left: 0;
    right: 0;
    z-index: 69;
    height: var(--bar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border-strong);
}
.palace-shell {
    height: 100%;
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
    align-items: center;
    gap: 16px;
}
.brand-link {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: 190px;
}
.logo-slot { display: inline-flex; align-items: center; }
.logo-slot-header { min-width: 0; }
.brand-logo { height: 28px; width: auto; object-fit: contain; object-position: center; }
.brand-fallback { display: none; font-size: 16px; font-weight: 700; color: var(--title); white-space: nowrap; }
.logo-slot:empty + .brand-fallback { display: inline; }
.drawer-trigger, .app-entry {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}
.drawer-trigger {
    min-width: 92px;
    border: 1px solid var(--border-strong);
    background: var(--cream);
    color: var(--title);
}
.drawer-trigger:hover { background: var(--bg-deep); }
.app-entry {
    justify-self: end;
    min-width: 94px;
    padding: 0 16px;
    border: 0;
    color: var(--title);
    background: linear-gradient(135deg, #E0BC4A 0%, #C9A227 55%, #8C6A12 100%);
    font-weight: 700;
}
.app-entry:hover { filter: brightness(1.03); }

.seat-tabs {
    position: fixed;
    top: calc(var(--top-h) + var(--bar-h));
    left: 0;
    right: 0;
    z-index: 68;
    height: var(--tabs-h);
    background: var(--cream);
    border-bottom: 1px solid var(--border);
}
.seat-shell { height: 100%; display: flex; justify-content: center; align-items: center; gap: 10px; }
.seat-tabs a {
    min-width: 92px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
}
.seat-tabs a:hover { background: var(--surface-soft); color: var(--title); }
.seat-tabs a.is-current { background: var(--gold); color: var(--title); font-weight: 700; }

.site-main {
    padding-top: calc(var(--top-h) + var(--bar-h) + var(--tabs-h) + 30px);
    min-height: 60vh;
}
.content-shell { padding-bottom: 54px; }

.page-hero {
    margin-bottom: 24px;
    padding: 28px;
    background: linear-gradient(140deg, var(--surface) 0%, var(--cream) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.page-hero .eyebrow, .eyebrow {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}
h1, h2, h3 { margin-top: 0; color: var(--title); line-height: 1.3; }
h1 { margin-bottom: 12px; font-size: 24px; }
h2 { margin-bottom: 12px; font-size: 20px; }
h3 { margin-bottom: 8px; font-size: 16px; }
p { margin: 0 0 14px; }
.page-hero p { max-width: 840px; margin-bottom: 0; color: var(--muted); }

.home-cover {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}
.banner-slot, .image-slot, .app-image-slot {
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.banner-slot { width: 100%; height: 260px; }
.banner-slot img, .image-slot img, .app-image-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.cover-copy { padding: 24px 28px 28px; }
.cover-copy h1 { margin-bottom: 8px; }
.cover-copy .lead { max-width: 850px; color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn {
    min-height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(58, 42, 16, .09); }
.btn-primary { color: var(--title); background: linear-gradient(135deg, #E0BC4A 0%, #C9A227 55%, #8C6A12 100%); }
.btn-secondary { background: var(--surface); border: 1px solid var(--border-strong); color: var(--title); }

.section-block { margin: 0 0 26px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.section-head p { margin: 0; color: var(--muted); max-width: 640px; }
.content-grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-card, .text-card, .legal-card, .method-card, .help-card, .faq-item, .rack-item, .memo-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(58, 42, 16, .045);
}
.feature-card { overflow: hidden; }
.feature-card .image-slot { height: 180px; border-bottom: 1px solid var(--border); }
.feature-card .card-copy { padding: 18px; }
.feature-card p, .text-card p, .method-card p, .help-card p, .memo-card p { color: var(--muted); }
.text-card, .method-card, .help-card, .memo-card, .legal-card { padding: 20px; }
.text-card > *:last-child, .method-card > *:last-child, .help-card > *:last-child, .legal-card > *:last-child, .memo-card > *:last-child { margin-bottom: 0; }

.editorial-panel {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.editorial-panel .image-slot { min-height: 200px; height: 100%; border-right: 1px solid var(--border); }
.home-tiankan .image-slot { height: 200px; min-height: 200px; align-self: start; }
.editorial-copy { padding: 22px; }
.number-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.number-chip { padding: 10px; border-radius: 10px; background: var(--cream); border: 1px solid var(--border); }
.number-chip strong { display: block; color: var(--gold-dark); font-size: 18px; }
.number-chip span { color: var(--muted); font-size: 13px; }

.rack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rack-item { padding: 18px; position: relative; }
.rack-item:before { content: ""; position: absolute; left: 18px; right: 18px; bottom: 12px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .5; }
.rack-item p { color: var(--muted); margin-bottom: 16px; }
.rack-tag { display: inline-block; margin-bottom: 8px; padding: 2px 8px; border-radius: 999px; background: var(--cream); color: var(--gold-dark); font-size: 12px; font-weight: 700; }

.number-list { display: grid; gap: 10px; }
.number-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.number-row .num { color: var(--gold); font-size: 28px; font-weight: 800; line-height: 1; }
.number-row p { margin: 3px 0 0; color: var(--muted); }

.timeline { position: relative; display: grid; gap: 14px; }
.timeline:before { content: ""; position: absolute; left: 18px; top: 14px; bottom: 14px; width: 2px; background: var(--border-strong); }
.timeline-item { position: relative; padding-left: 52px; }
.timeline-dot { position: absolute; left: 11px; top: 18px; width: 16px; height: 16px; border: 4px solid var(--cream); background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 1px var(--border-strong); }
.timeline-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.status { display: inline-flex; margin-bottom: 8px; padding: 2px 9px; border-radius: 999px; background: var(--surface-soft); color: var(--title); font-size: 12px; font-weight: 700; }
.timeline-card p { margin-bottom: 0; color: var(--muted); }

.memo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.memo-card .memo-label { display: inline-block; margin-bottom: 8px; color: var(--gold-dark); font-size: 12px; font-weight: 700; }

.app-panel { display: grid; grid-template-columns: minmax(220px, .62fr) minmax(0, 1.38fr); gap: 22px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.app-image-slot { height: 340px; border-radius: 12px; border: 1px solid var(--border); }
.app-title-row { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.app-icon-slot { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 11px; background: var(--cream); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--border); }
.app-icon-slot img { width: 48px; height: 48px; object-fit: contain; }
.app-copy p { color: var(--muted); }

.longform { display: grid; gap: 18px; }
.longform section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.longform section p:last-child { margin-bottom: 0; }
.longform ul, .longform ol { margin: 8px 0 0; padding-left: 22px; }
.longform li { margin-bottom: 8px; }
.quote-note { margin-top: 12px; padding: 14px 16px; border-left: 4px solid var(--gold); background: var(--cream); color: var(--muted); border-radius: 0 10px 10px 0; }

.catalog-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.catalog-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.catalog-item .catalog-index { color: var(--gold); font-size: 24px; font-weight: 800; }
.catalog-item p { color: var(--muted); margin-bottom: 0; }

.faq-list { display: grid; gap: 12px; }
.faq-item { padding: 20px; }
.faq-item h2 { font-size: 16px; margin-bottom: 8px; }
.faq-item p { margin-bottom: 0; color: var(--muted); }

.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.contact-card p { color: var(--muted); margin-bottom: 0; }

.site-footer {
    background: var(--title);
    color: var(--bg-deep);
    border-top: 1px solid var(--gold-dark);
    font-size: 13px;
}
.footer-shell { padding: 28px 0 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.logo-slot-footer { min-width: 28px; min-height: 28px; }
.footer-brand strong { display: block; color: var(--cream); font-size: 16px; }
.footer-brand span { color: var(--bg-deep); }
.footer-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 20px 0; border-top: 1px solid rgba(224,188,74,.22); border-bottom: 1px solid rgba(224,188,74,.22); }
.footer-links h2 { color: var(--gold-bright); font-size: 13px; margin-bottom: 10px; }
.footer-links a { display: block; min-height: 28px; color: var(--bg-deep); }
.footer-links a:hover { color: var(--cream); }
.footer-notice { max-width: 880px; margin: 18px 0 8px; color: var(--bg-deep); }
.footer-copy { margin: 0; color: #D9C99E; }

.page-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    border: 0;
    background: rgba(58, 42, 16, .34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}
.page-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.site-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    width: min(400px, 86vw);
    background: var(--surface);
    box-shadow: 20px 0 40px rgba(58,42,16,.14);
    transform: translateX(-104%);
    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; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--cream); }
.drawer-brand { display: flex; align-items: center; gap: 10px; color: var(--title); }
.icon-button { min-height: 44px; min-width: 60px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--title); cursor: pointer; }
.icon-button:hover { background: var(--bg-deep); }
.drawer-body { padding: 14px 16px 28px; overflow-y: auto; }
.drawer-group { padding: 8px 0 16px; border-bottom: 1px solid var(--border); }
.drawer-group:last-child { border-bottom: 0; }
.drawer-group h2 { margin: 0 0 8px; color: var(--gold-dark); font-size: 13px; }
.drawer-group a { display: block; padding: 10px 8px; border-radius: 10px; }
.drawer-group a:hover { background: var(--cream); }
.drawer-group span { display: block; color: var(--title); font-weight: 700; line-height: 1.4; }
.drawer-group small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.search-layer {
    position: fixed;
    top: calc(var(--top-h) + var(--bar-h));
    left: 0;
    right: 0;
    z-index: 91;
    padding: 14px 16px;
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.search-layer.is-open { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; }
.search-card { width: min(760px, 100%); margin: 0 auto; padding: 20px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.search-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.search-head h2 { margin-bottom: 0; }
.search-form { margin-top: 14px; }
.search-form label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.search-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.search-input-row input { width: 100%; height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 12px; color: var(--title); background: var(--cream); }
.search-input-row button { min-height: 44px; border: 0; border-radius: 10px; padding: 0 18px; color: var(--title); background: linear-gradient(135deg, #E0BC4A 0%, #C9A227 55%, #8C6A12 100%); cursor: pointer; font-weight: 700; }
.search-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.search-presets a { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--cream); color: var(--title); font-weight: 700; }
.search-presets a span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.search-presets a[hidden] { display: none; }
.search-empty { margin: 12px 0 0; color: var(--muted); }

.mobile-bottom { display: none; }

@media (max-width: 820px) {
    :root { --tabs-h: 0px; }
    .seat-tabs { display: none; }
    .site-main { padding-top: calc(var(--top-h) + var(--bar-h) + 20px); padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    .palace-shell { grid-template-columns: minmax(98px, 1fr) auto minmax(78px, 1fr); gap: 8px; }
    .brand-link { max-width: 120px; }
    .brand-logo { max-width: 118px; }
    .drawer-trigger { min-width: 70px; padding: 0 10px; }
    .app-entry { min-width: 78px; padding: 0 10px; }
    .grid-3, .memo-grid { grid-template-columns: 1fr; }
    .grid-2, .catalog-list, .contact-grid { grid-template-columns: 1fr; }
    .editorial-panel, .app-panel { grid-template-columns: 1fr; }
    .editorial-panel .image-slot { height: 200px; min-height: 200px; border-right: 0; border-bottom: 1px solid var(--border); }
    .rack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .number-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-layer { inset: 0; padding: 0; background: var(--title); color: var(--cream); transform: none; }
    .search-card { min-height: 100dvh; width: 100%; border: 0; border-radius: 0; padding: 24px 16px 86px; background: var(--title); box-shadow: none; }
    .search-head h2, .search-head .eyebrow, .search-form label { color: var(--cream); }
    .search-close { border-color: rgba(255,248,232,.34); color: var(--cream); background: transparent; }
    .search-input-row input { background: var(--cream); color: var(--title); }
    .search-presets { grid-template-columns: 1fr 1fr; }
    .search-presets a { background: var(--cream); color: var(--title); }
    .search-empty { color: var(--bg-deep); }
    .mobile-bottom {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        height: calc(48px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        background: var(--surface);
        border-top: 1px solid var(--border-strong);
        box-shadow: 0 -8px 22px rgba(58,42,16,.06);
    }
    .mobile-bottom a { min-width: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
    .mobile-bottom a.is-current { background: var(--gold); color: var(--title); font-weight: 700; }
    .page-overlay { z-index: 80; }
    .site-drawer { z-index: 90; }
}

@media (max-width: 560px) {
    .top-shell, .palace-shell, .footer-shell, .content-shell { width: calc(100% - 32px); }
    .page-hero { padding: 22px 18px; }
    .cover-copy { padding: 20px 18px 22px; }
    .feature-card .image-slot { height: 170px; }
    .rack-grid { grid-template-columns: 1fr; }
    .number-row { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
    .number-row .num { font-size: 24px; }
    .number-chips { grid-template-columns: 1fr 1fr; }
    .app-image-slot { height: 320px; }
    .footer-links { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
    .search-presets { grid-template-columns: 1fr; }
    .button-row .btn { flex: 1 1 140px; }
}

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