:root {
    --paper: #FFF6D8;
    --white: #FFFFFF;
    --sand: #F3E4B0;
    --ink: #16140F;
    --body: #2A261C;
    --muted: #5C5648;
    --soft: #8A8370;
    --yellow: #F5C518;
    --yellow-deep: #D4A017;
    --teal: #2A6B6B;
    --red: #E85D4C;
    --black: #111111;
    --line: rgba(17, 17, 17, 0.12);
    --shadow: 0 14px 34px rgba(17, 17, 17, 0.10);
    --radius: 14px;
    --top-desktop: 134px;
    --top-mobile: 92px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.site-top {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(17,17,17,.08);
}
.ink-bar { height: 22px; background: var(--black); color: var(--yellow); }
.ink-inner { height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ink-brand { font-size: 11px; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ink-search {
    height: 22px; min-width: 54px; border: 0; border-left: 1px solid rgba(245,197,24,.3);
    padding: 0 0 0 12px; background: transparent; color: var(--yellow); font-size: 12px;
}
.masthead-bar { height: 70px; background: var(--yellow); color: var(--black); }
.masthead-inner { height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand-lockup { justify-self: start; min-width: 0; display: inline-flex; align-items: center; min-height: 44px; }
.brand-logo { max-height: 38px; width: auto; object-fit: contain; }
.brand-text { font-weight: 900; font-size: 24px; letter-spacing: -.04em; }
.directory-trigger, .app-trigger {
    min-height: 44px; border: 1px solid var(--black); border-radius: 5px; padding: 9px 16px;
    font-weight: 800; background: var(--black); color: var(--yellow); display: inline-flex; align-items: center; justify-content: center;
}
.directory-trigger { justify-self: center; }
.app-trigger { justify-self: end; background: transparent; color: var(--black); }
.issue-bar { height: 42px; background: var(--white); border-bottom: 1px solid var(--line); }
.issue-nav { height: 42px; display: flex; align-items: center; gap: 6px; }
.issue-nav a { min-height: 30px; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 4px; font-size: 14px; font-weight: 700; }
.issue-nav a:hover, .issue-nav a:focus-visible, .issue-nav a.is-current { background: var(--yellow); color: var(--black); outline: none; }

.site-main { padding-top: var(--top-desktop); min-height: 60vh; }
.page-hero { padding: 34px 0 18px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 13px; font-weight: 900; letter-spacing: .08em; }
h1, h2, h3 { color: var(--ink); line-height: 1.24; margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 32px); margin-bottom: 14px; letter-spacing: -.03em; }
h2 { font-size: clamp(22px, 3vw, 26px); margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 8px; }
p { margin: 0 0 14px; }
.lead { max-width: 780px; font-size: 17px; color: var(--muted); }
.section { padding: 24px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.section-head p { max-width: 640px; margin: 0; color: var(--muted); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { min-height: 44px; border-radius: 5px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; border: 1px solid var(--black); }
.btn-primary { background: var(--black); color: var(--yellow); }
.btn-secondary { background: var(--yellow); color: var(--black); }
.btn:hover, .btn:focus-visible { transform: translateY(-1px); box-shadow: 0 5px 0 rgba(17,17,17,.15); outline: 3px solid rgba(42,107,107,.24); outline-offset: 2px; }

.home-cover { padding: 30px 0 24px; }
.cover-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); gap: 26px; align-items: stretch; }
.cover-media, .feature-media { min-height: 240px; background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cover-media .local-media, .feature-media .local-media { width: 100%; height: 100%; max-height: 320px; object-fit: cover; }
.media-slot { min-height: 220px; background:
    linear-gradient(135deg, rgba(245,197,24,.55), rgba(243,228,176,.85)),
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(17,17,17,.04) 44px 45px);
}
.cover-copy { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; }
.cover-copy .micro { color: var(--red); font-weight: 900; font-size: 13px; }
.cover-copy h1 { font-size: clamp(28px, 4vw, 32px); }
.cover-copy p { color: var(--muted); }

.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.topic-card { position: relative; min-height: 142px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px; overflow: hidden; }
.topic-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--yellow); }
.topic-card:nth-child(3n+2)::before { background: var(--teal); }
.topic-card:nth-child(3n+3)::before { background: var(--red); }
.topic-card p { color: var(--muted); font-size: 14px; }
.topic-card a { font-weight: 900; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.feature-split { display: grid; grid-template-columns: minmax(260px,.85fr) minmax(0,1.35fr); gap: 22px; align-items: stretch; }
.feature-copy { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.number-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.number-list li { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: start; padding-top: 10px; border-top: 1px solid var(--line); }
.number-list b { color: var(--black); background: var(--yellow); border-radius: 4px; text-align: center; padding: 2px 4px; }
.number-list a { font-weight: 900; }

.card-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.editorial-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 22px rgba(17,17,17,.06); }
.editorial-card .local-media { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.editorial-card .media-slot { min-height: 170px; }
.editorial-card-body { padding: 18px; }
.editorial-card-body p { color: var(--muted); }
.text-link { font-weight: 900; text-decoration: underline; text-underline-offset: 4px; }

.strip-list { display: grid; gap: 10px; }
.strip-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.strip-row .strip-no { font-weight: 1000; font-size: 22px; color: var(--black); }
.strip-row p { margin: 0; color: var(--muted); }
.strip-row a { font-weight: 900; color: var(--teal); }

.genre-six { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.genre-tile { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-height: 150px; }
.genre-tile .tag { display: inline-block; margin-bottom: 14px; background: var(--yellow); color: var(--black); padding: 2px 8px; font-weight: 900; border-radius: 4px; }
.genre-tile:nth-child(3n+2) .tag { background: var(--teal); color: var(--white); }
.genre-tile:nth-child(3n+3) .tag { background: var(--red); color: var(--white); }

.spine-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spine-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.spine-item:last-child { border-bottom: 0; }
.spine-label { font-weight: 1000; color: var(--black); border-left: 8px solid var(--yellow); padding-left: 10px; }
.spine-item:nth-child(2n) .spine-label { border-left-color: var(--teal); }
.spine-item p { margin: 0; color: var(--muted); }
.spine-item a { font-weight: 900; }

.big-board { display: grid; gap: 10px; }
.board-row { display: grid; grid-template-columns: 88px 1fr; gap: 16px; background: var(--yellow); border: 1px solid var(--black); border-radius: 10px; padding: 18px; }
.board-row b { font-size: 38px; line-height: 1; color: var(--black); letter-spacing: -.06em; }
.board-row p { margin: 0; color: var(--body); }

.timeline { position: relative; margin-left: 14px; padding-left: 28px; border-left: 2px solid var(--black); display: grid; gap: 16px; }
.timeline-item { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.timeline-item::before { content: ""; position: absolute; left: -36px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--black); }
.status { display: inline-block; padding: 2px 7px; border-radius: 4px; background: var(--black); color: var(--yellow); font-weight: 900; font-size: 12px; }

.article-shell { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 26px; align-items: start; }
.article-main { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.article-main section + section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-main p { color: var(--body); }
.article-aside { position: sticky; top: calc(var(--top-desktop) + 18px); background: var(--sand); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.article-aside a { display: block; min-height: 40px; padding: 8px 0; font-weight: 800; border-bottom: 1px solid rgba(17,17,17,.1); }
.article-aside a:last-child { border-bottom: 0; }

.index-box { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.info-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.info-card p { color: var(--muted); }
.info-card a { font-weight: 900; color: var(--teal); }

.steps { counter-reset: step; display: grid; gap: 14px; }
.step-card { counter-increment: step; position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px 20px 20px 76px; }
.step-card::before { content: counter(step, decimal-leading-zero); position: absolute; left: 18px; top: 18px; font-size: 26px; font-weight: 1000; color: var(--black); background: var(--yellow); min-width: 42px; text-align: center; border-radius: 4px; }

.note-box { border-left: 5px solid var(--teal); background: var(--sand); border-radius: 8px; padding: 16px 18px; }
.note-box.red { border-left-color: var(--red); }
.note-box.yellow { border-left-color: var(--yellow-deep); }

.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.faq-item h2 { font-size: 19px; margin-bottom: 8px; }
.faq-item p { margin: 0; color: var(--muted); }

.app-product { display: grid; grid-template-columns: minmax(260px,.75fr) minmax(0,1.25fr); gap: 24px; align-items: center; }
.app-visual { background: var(--black); border-radius: var(--radius); padding: 22px; color: var(--yellow); }
.app-visual .local-media { width: 100%; max-height: 360px; object-fit: contain; border-radius: 10px; }
.app-visual .media-slot { min-height: 320px; background: linear-gradient(145deg, #111, #2A261C); border: 1px solid rgba(245,197,24,.25); }
.app-icon-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.app-icon-row .local-media { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; }
.app-icon-row .media-slot { min-height: 64px; width: 64px; background: var(--yellow); }

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

.story-drawer {
    position: fixed; inset: 0 auto 0 0; z-index: 1300; width: min(360px, 86vw); background: var(--paper); color: var(--body);
    transform: translateX(-102%); transition: transform .22s ease, visibility .22s ease; visibility: hidden; pointer-events: none;
    box-shadow: 18px 0 44px rgba(17,17,17,.20); display: flex; flex-direction: column;
}
.story-drawer.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.drawer-head { min-height: 78px; padding: 14px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--yellow); border-bottom: 1px solid var(--black); }
.drawer-brand img { max-height: 34px; max-width: 110px; }
.drawer-brand span { font-weight: 1000; }
.drawer-head strong { font-size: 14px; }
.drawer-close, .search-head button { min-height: 44px; border: 1px solid var(--black); border-radius: 4px; background: var(--black); color: var(--yellow); padding: 8px 12px; font-weight: 900; }
.drawer-scroll { overflow-y: auto; padding: 16px; }
.drawer-group + .drawer-group { margin-top: 18px; }
.drawer-group h2 { font-size: 15px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 2px solid var(--black); }
.drawer-group a { display: block; min-height: 56px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.drawer-group b { display: block; color: var(--ink); }
.drawer-group span { display: block; color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 2px; }

.search-layer { position: fixed; z-index: 1250; inset: var(--top-desktop) 0 auto 0; visibility: hidden; pointer-events: none; transform: translateY(-12px); opacity: 0; transition: .18s ease; }
.search-layer.is-open { visibility: visible; pointer-events: auto; transform: translateY(0); opacity: 1; }
.search-card { width: min(860px, calc(100% - 32px)); margin: 0 auto; background: var(--paper); border: 1px solid var(--black); box-shadow: var(--shadow); padding: 18px; }
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.search-head strong { font-size: 20px; color: var(--black); }
.search-look { min-height: 52px; display: flex; align-items: center; padding: 12px 14px; background: var(--white); color: var(--soft); border: 1px solid var(--line); }
.search-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.search-presets a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; border: 1px solid var(--black); background: var(--yellow); color: var(--black); font-weight: 900; border-radius: 4px; }

.site-overlay { position: fixed; z-index: 1200; inset: 0; background: rgba(17,17,17,.58); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility .18s ease; }
.site-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.site-footer { margin-top: 44px; background: var(--black); color: var(--yellow); padding: 42px 0 calc(24px + env(safe-area-inset-bottom)); }
.footer-top { display: grid; grid-template-columns: 260px 1fr; gap: 34px; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.footer-brand-link { min-height: 44px; display: inline-flex; align-items: center; }
.footer-logo { max-height: 38px; width: auto; filter: none; }
.footer-logo-text { font-size: 22px; font-weight: 1000; color: var(--yellow); }
.footer-brand span { color: #E8D9A0; font-size: 12px; letter-spacing: .08em; }
.footer-groups { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.footer-groups h2 { color: var(--white); font-size: 15px; margin-bottom: 10px; }
.footer-groups a { display: block; min-height: 34px; padding: 3px 0; color: #E8D9A0; font-size: 14px; }
.footer-groups a:hover, .footer-groups a:focus-visible { color: var(--yellow); text-decoration: underline; outline: none; }
.footer-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(245,197,24,.22); }
.footer-note p { color: #E8D9A0; font-size: 13px; margin-bottom: 8px; }

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

@media (max-width: 900px) {
    .topic-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .card-grid-3 { grid-template-columns: 1fr; }
    .genre-six { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .article-shell { grid-template-columns: 1fr; }
    .article-aside { position: static; }
    .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    body { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
    .shell { width: min(calc(100% - 32px), 1180px); }
    .issue-bar { display: none; }
    .site-main { padding-top: var(--top-mobile); }
    .masthead-inner { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
    .brand-logo { max-width: 120px; max-height: 34px; }
    .brand-text { font-size: 18px; }
    .directory-trigger, .app-trigger { min-width: 44px; padding: 8px 10px; font-size: 13px; }
    .app-trigger { white-space: nowrap; }
    .ink-brand { max-width: calc(100vw - 90px); }
    .cover-grid, .feature-split, .app-product { grid-template-columns: 1fr; }
    .cover-media { min-height: 190px; }
    .cover-copy { padding: 22px; }
    .topic-grid, .genre-six, .index-box, .contact-grid { grid-template-columns: 1fr; }
    .strip-row { grid-template-columns: 46px 1fr; }
    .strip-row a { grid-column: 2; }
    .spine-item { grid-template-columns: 1fr; gap: 8px; }
    .board-row { grid-template-columns: 64px 1fr; }
    .board-row b { font-size: 30px; }
    .article-main { padding: 20px; }
    .search-layer { inset: 0; background: var(--paper); transform: none; }
    .search-card { width: 100%; min-height: 100%; margin: 0; border: 0; box-shadow: none; padding: calc(18px + env(safe-area-inset-top)) 16px 24px; }
    .footer-groups { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .site-footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    .mobile-bottom-nav {
        position: fixed; z-index: 1100; inset: auto 0 0 0; height: calc(50px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        display: grid; grid-template-columns: repeat(5, 1fr); background: var(--black); border-top: 1px solid rgba(245,197,24,.4);
    }
    .mobile-bottom-nav a { min-height: 50px; display: flex; align-items: center; justify-content: center; color: #E8D9A0; font-size: 13px; font-weight: 900; }
    .mobile-bottom-nav a.is-current { background: var(--yellow); color: var(--black); }
    .story-drawer { width: 86vw; }
}

@media (max-width: 420px) {
    .ink-brand { font-size: 10px; }
    .brand-logo { max-width: 104px; }
    .brand-text { font-size: 16px; }
    .directory-trigger, .app-trigger { padding: 7px 8px; font-size: 12px; }
    .page-hero { padding-top: 28px; }
}

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