:root {
    --bg: #0C100E;
    --bg-deep: #080A09;
    --surface: #141A16;
    --surface-2: #1A2420;
    --title: #E8F6EE;
    --text: #CDE3D6;
    --muted: #8FB3A0;
    --soft: #6E8F7E;
    --brand: #2A9D5C;
    --bright: #3CB371;
    --dark-green: #146B3A;
    --sand: #EFE6D2;
    --border: rgba(42,157,92,0.18);
    --border-strong: rgba(42,157,92,0.45);
    --shadow: 0 12px 28px rgba(8,10,9,0.35);
    --max: 1120px;
    --radius: 12px;
}

* { 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", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    padding-top: 122px;
}
body.ui-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }
.skip-link {
    position: fixed; left: 16px; top: -60px; z-index: 1000;
    background: var(--sand); color: var(--bg-deep); padding: 8px 12px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

.topline {
    position: fixed; inset: 0 0 auto 0; z-index: 210;
    height: 22px; background: #050706; color: var(--bright);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}
.topline-inner, .masthead-inner, .layer-tabs-inner, .site-main, .footer-inner {
    width: min(100% - 32px, var(--max)); margin: 0 auto;
}
.topline-inner { height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.text-button { border: 0; background: transparent; color: var(--bright); cursor: pointer; min-height: 22px; padding: 0 4px; }

.masthead {
    position: fixed; left: 0; right: 0; top: 22px; z-index: 205;
    height: 60px; background: var(--bg-deep); border-bottom: 1px solid var(--border-strong);
}
.masthead-inner { height: 60px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand-link { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
.brand-logo { height: 28px; width: auto; max-width: 160px; object-fit: contain; object-position: center; }
.brand-fallback { font-size: 16px; font-weight: 800; color: var(--title); letter-spacing: .04em; }
.drawer-trigger {
    justify-self: center; min-height: 44px; min-width: 92px; border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
}
.drawer-trigger:hover { background: var(--surface-2); }
.drawer-bars { width: 18px; display: inline-grid; gap: 3px; }
.drawer-bars i { display: block; height: 1px; background: var(--bright); }
.app-link {
    justify-self: end; min-height: 44px; padding: 8px 14px; border-radius: 10px; display: inline-flex; align-items: center;
    background: linear-gradient(135deg,#3CB371 0%,#2A9D5C 55%,#146B3A 100%); color: #08110C; font-weight: 800;
}
.app-link:hover { filter: brightness(1.06); }

.layer-tabs {
    position: fixed; left: 0; right: 0; top: 82px; z-index: 200; height: 40px;
    background: #0E3D26; border-bottom: 1px solid var(--border-strong);
}
.layer-tabs-inner { height: 40px; display: flex; justify-content: center; align-items: stretch; gap: 8px; }
.layer-tabs a { min-width: 110px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); font-size: 13px; padding: 0 14px; }
.layer-tabs a:hover { background: rgba(42,157,92,.16); }
.layer-tabs a.is-current { background: var(--brand); color: #08110C; font-weight: 800; }

.site-main { padding: 40px 0 72px; min-height: 65vh; }
.page-hero { margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; font-size: 12px; color: var(--bright); letter-spacing: .12em; 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.4; margin-bottom: 12px; }
h3 { font-size: 16px; line-height: 1.45; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lede { max-width: 860px; color: var(--text); font-size: 16px; }
.kicker { color: var(--sand); }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-head p { max-width: 620px; margin-bottom: 0; color: var(--muted); }

.hero-cover { margin-bottom: 30px; }
.hero-copy { padding-top: 20px; max-width: 860px; }
.hero-copy .brand-line { color: var(--bright); font-size: 13px; margin-bottom: 8px; letter-spacing: .08em; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { min-height: 44px; padding: 9px 16px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg,#3CB371 0%,#2A9D5C 55%,#146B3A 100%); color: #08110C; }
.btn-secondary { background: var(--bg-deep); color: var(--text); border: 1px solid var(--border-strong); }
.btn:hover { transform: translateY(-1px); }

.media-slot { background: var(--bg-deep); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 140px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.01); }
.media-slot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.media-slot.banner { width: 100%; height: 260px; }
.media-slot.card-img { height: 180px; }
.media-slot.week-img { height: 200px; }
.media-slot.app-portrait { height: min(360px, 52vw); min-height: 260px; }
.media-slot.icon-slot { width: 48px; height: 48px; min-height: 48px; border-radius: 12px; }

.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)); }
.card-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.card > .media-slot:first-child { margin: -18px -18px 16px; border-radius: 12px 12px 0 0; border-width: 0 0 1px; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--bright); font-weight: 700; }
.card-link:hover { color: var(--sand); }

.numbered-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.numbered-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.numbered-item strong { display: block; color: var(--bright); font-size: 13px; margin-bottom: 6px; }

.feature-band { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0,1.1fr); gap: 18px; align-items: stretch; }
.feature-band.reverse { grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); }
.feature-copy { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.clean-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.clean-list li { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.clean-list strong { color: var(--sand); }

.timeline { position: relative; margin: 0; padding: 0 0 0 24px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--border-strong); }
.timeline li { position: relative; padding: 0 0 24px 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(42,157,92,.14); }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 9px; border-radius: 999px; background: #0E3D26; color: var(--text); border: 1px solid var(--border-strong); font-size: 12px; }

.prose { max-width: 900px; }
.prose section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.prose section:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 10px 0 0; padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.notice { background: rgba(239,230,210,.06); border: 1px solid rgba(239,230,210,.18); color: var(--sand); border-radius: 10px; padding: 14px 16px; }

.index-links { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.index-links a { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; min-height: 96px; }
.index-links a:hover { border-color: var(--border-strong); background: var(--surface-2); }
.index-links strong { display: block; color: var(--title); margin-bottom: 4px; }
.index-links span { color: var(--muted); font-size: 13px; }

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

.app-showcase { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.2fr); gap: 22px; align-items: center; }
.app-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.app-heading h2 { margin-bottom: 0; }

.site-footer { background: #050706; border-top: 1px solid var(--border-strong); color: var(--text); }
.footer-inner { padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.footer-brand-mark { min-width: 44px; }
.footer-brand strong { display: block; color: var(--title); }
.footer-brand span { display: block; color: var(--muted); font-size: 12px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.footer-grid h2 { font-size: 13px; color: var(--bright); margin-bottom: 8px; }
.footer-grid a { display: flex; align-items: center; min-height: 44px; color: var(--text); font-size: 13px; padding: 4px 0; }
.footer-grid a:hover { color: var(--sand); }
.footer-notice, .footer-copy { font-size: 13px; color: var(--muted); }
.footer-notice { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 22px; }
.footer-copy { margin-bottom: 0; }

.screen-mask { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.62); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
.screen-mask.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.site-drawer { position: fixed; z-index: 320; top: 0; left: 0; width: 400px; max-width: 86vw; height: 100dvh; background: var(--bg-deep); border-right: 1px solid var(--border-strong); transform: translateX(-102%); visibility: hidden; pointer-events: none; transition: transform .22s ease, visibility .22s ease; box-shadow: var(--shadow); }
.site-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.drawer-brand { display: flex; align-items: center; gap: 10px; color: var(--title); font-weight: 800; }
.icon-button { min-width: 44px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; }
.drawer-scroll { height: calc(100dvh - 64px); overflow-y: auto; padding: 14px 16px 28px; }
.drawer-group { margin-bottom: 18px; }
.drawer-group h2 { font-size: 13px; color: var(--bright); margin-bottom: 8px; }
.drawer-group a { display: block; min-height: 58px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; }
.drawer-group a:hover { background: var(--surface); border-color: var(--border); }
.drawer-group strong { display: block; color: var(--title); }
.drawer-group span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.search-panel { position: fixed; z-index: 315; top: 82px; left: 50%; width: min(760px, calc(100% - 32px)); transform: translate(-50%, -16px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
.search-panel.is-open { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto; }
.search-card { background: var(--bg-deep); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; }
.search-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.search-head h2 { margin-bottom: 0; }
.search-preset { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 16px; }
.search-preset a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.search-preset a:hover { border-color: var(--border-strong); background: var(--surface-2); }
.search-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.mobile-bottom { display: none; }

@media (max-width: 860px) {
    .card-grid, .card-grid.four { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .numbered-grid { grid-template-columns: repeat(2, 1fr); }
    .index-links { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .feature-band, .feature-band.reverse, .app-showcase { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 640px) {
    body { padding-top: 82px; padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
    .topline-inner, .masthead-inner, .site-main, .footer-inner { width: calc(100% - 32px); }
    .layer-tabs { display: none; }
    .masthead-inner { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
    .brand-logo { max-width: 110px; }
    .drawer-trigger { min-width: 74px; padding: 0 10px; }
    .app-link { padding: 8px 10px; }
    .site-main { padding-top: 28px; }
    .media-slot.banner { height: 260px; }
    .media-slot.card-img { height: 180px; }
    .media-slot.week-img { height: 200px; }
    .card-grid, .card-grid.two, .card-grid.four { grid-template-columns: 1fr; }
    .numbered-grid, .index-links { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .search-panel { top: 0; left: 0; width: 100%; height: 100dvh; transform: none; }
    .search-panel.is-open { transform: none; }
    .search-card { width: 100%; height: 100%; border-radius: 0; border: 0; padding: 22px 16px calc(80px + env(safe-area-inset-bottom)); background: var(--bg-deep); overflow-y: auto; }
    .search-preset { grid-template-columns: 1fr; }
    .mobile-bottom { position: fixed; display: grid; grid-template-columns: repeat(5,1fr); left: 0; right: 0; bottom: 0; z-index: 190; height: calc(48px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #050706; border-top: 1px solid var(--border-strong); }
    .mobile-bottom a { min-height: 48px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text); }
    .mobile-bottom a.is-current { background: var(--brand); color: #08110C; font-weight: 800; }
    .footer-inner { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
    .brand-fallback { font-size: 15px; }
    .drawer-trigger { min-width: 66px; gap: 6px; }
    .drawer-bars { width: 15px; }
    .app-link { font-size: 12px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
