:root {
    --paper: #FFF6D8;
    --white: #FFFFFF;
    --soft: #F3E4B0;
    --ink: #16140F;
    --body: #2A261C;
    --muted: #5C5648;
    --faint: #8A8370;
    --yellow: #F5C518;
    --yellow-deep: #D4A017;
    --teal: #2A6B6B;
    --red: #E85D4C;
    --black: #111111;
    --line: rgba(17,17,17,.12);
    --shadow: 0 14px 34px rgba(17,17,17,.10);
    --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; color: var(--body); background: var(--paper); 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; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
button { cursor: pointer; }
.site-width { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-fixed-top { position: fixed; inset: 0 0 auto 0; z-index: 900; box-shadow: 0 5px 18px rgba(17,17,17,.08); }
.ink-bar { height: 22px; background: var(--black); color: var(--yellow); font-size: 12px; line-height: 22px; }
.ink-bar-inner { display: flex; justify-content: space-between; align-items: center; height: 22px; }
.ink-brand { font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.ink-search { height: 22px; min-width: 52px; border: 0; background: transparent; color: var(--yellow); padding: 0 2px; font-weight: 800; }
.masthead { height: 70px; background: var(--yellow); border-bottom: 1px solid rgba(17,17,17,.18); }
.masthead-inner { height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
.mast-logo { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; font-weight: 900; font-size: 24px; color: var(--black); }
.mast-logo img { max-height: 38px; max-width: 260px; width: auto; }
.catalog-button, .app-link { min-height: 44px; border: 1px solid var(--black); background: var(--black); color: var(--yellow); padding: 9px 16px; border-radius: 6px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.catalog-button { justify-self: center; }
.app-link { justify-self: end; }
.catalog-button:hover, .app-link:hover, .primary-button:hover { transform: translateY(-1px); box-shadow: 0 7px 0 rgba(17,17,17,.16); }
.issue-bar { height: 42px; background: var(--white); border-bottom: 1px solid rgba(17,17,17,.2); }
.issue-bar-inner { height: 42px; display: flex; align-items: center; gap: 6px; }
.issue-bar a { min-height: 32px; display: inline-flex; align-items: center; padding: 4px 11px; font-weight: 800; color: var(--ink); }
.issue-bar a.active { background: var(--yellow); }
.site-main { padding-top: 162px; padding-bottom: 24px; min-height: 70vh; }
.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto 56px; }
.page-head { display: grid; gap: 16px; margin-bottom: 28px; }
.kicker { display: inline-flex; width: fit-content; background: var(--black); color: var(--yellow); padding: 4px 10px; font-size: 13px; font-weight: 900; letter-spacing: .08em; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 32px); margin-bottom: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(21px, 3vw, 26px); }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.lead { max-width: 860px; color: var(--muted); font-size: 17px; }
.section-block { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 34px); margin: 18px 0; box-shadow: var(--shadow); }
.section-block.flat { box-shadow: none; }
.section-title-row { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-title-row span { color: var(--faint); font-size: 13px; }
.media-slot { background: linear-gradient(135deg, var(--soft), #fff0b8); border: 1px solid var(--line); border-radius: var(--radius); min-height: 170px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.media-slot img { width: 100%; height: 100%; object-fit: cover; }
.media-slot.hero-media { max-height: 320px; min-height: 220px; }
.media-slot.hero-media img { object-fit: contain; max-height: 320px; background: var(--soft); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); gap: 22px; align-items: stretch; }
.hero-copy { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 34px); display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow); }
.hero-copy h1 { margin: 8px 0 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.primary-button, .secondary-button { min-height: 44px; padding: 9px 16px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; }
.primary-button { background: var(--black); color: var(--yellow); }
.secondary-button { background: var(--yellow); color: var(--black); border: 1px solid var(--black); }
.tag-grid, .card-grid-3, .card-grid-2, .genre-grid, .mini-grid { display: grid; gap: 14px; }
.tag-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tag-card, .content-card, .genre-card, .spine-item, .index-item { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.tag-card { position: relative; padding-top: 28px; min-height: 170px; }
.tag-card::before { content: ''; position: absolute; left: 18px; top: 14px; width: 28px; height: 7px; background: var(--yellow); }
.tag-card:nth-child(3n+2)::before { background: var(--teal); }
.tag-card:nth-child(3n)::before { background: var(--red); }
.tag-card h3, .content-card h3, .genre-card h3 { margin: 0 0 8px; }
.text-link { color: var(--teal); font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.number-list { display: grid; gap: 10px; margin-top: 18px; }
.number-item { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.number-item:first-child { border-top: 0; }
.number-item .num { font-weight: 950; font-size: 32px; line-height: 1; color: var(--black); }
.number-item strong { color: var(--ink); }
.split-feature { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.2fr); gap: 20px; align-items: start; }
.spine-list { display: grid; gap: 9px; }
.spine-item { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 14px; min-height: 72px; }
.spine-item::before { content: ''; width: 8px; height: 100%; min-height: 42px; background: var(--teal); border-radius: 4px; }
.spine-item:nth-child(3n+2)::before { background: var(--yellow); }
.spine-item:nth-child(3n)::before { background: var(--red); }
.editor-board { background: var(--yellow); border: 1px solid var(--black); border-radius: var(--radius); overflow: hidden; }
.board-row { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 20px; border-top: 1px solid rgba(17,17,17,.25); }
.board-row:first-child { border-top: 0; }
.board-no { color: var(--black); font-size: 42px; line-height: 1; font-weight: 950; }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--black); opacity: .28; }
.timeline-item { position: relative; padding: 0 0 24px 18px; }
.timeline-item::before { content: ''; position: absolute; left: -24px; top: 7px; width: 12px; height: 12px; background: var(--yellow); border: 2px solid var(--black); border-radius: 50%; }
.status { display: inline-flex; min-height: 30px; align-items: center; padding: 2px 8px; background: var(--black); color: var(--yellow); font-size: 13px; font-weight: 900; }
.long-read p { max-width: 900px; }
.note-box { background: var(--soft); border-left: 5px solid var(--teal); padding: 16px 18px; margin: 18px 0; }
.index-list { display: grid; gap: 12px; }
.index-item { display: grid; grid-template-columns: 130px 1fr auto; gap: 16px; align-items: center; }
.index-item strong { color: var(--ink); }
.article-steps { counter-reset: workstep; display: grid; gap: 14px; }
.step-card { counter-increment: workstep; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.step-card h2::before { content: counter(workstep, decimal-leading-zero) ' '; color: var(--red); }
.faq-list details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; padding: 0 18px; }
.faq-list summary { cursor: pointer; min-height: 54px; display: flex; align-items: center; font-weight: 900; color: var(--ink); }
.faq-list details p { padding-bottom: 18px; }
.site-footer { background: var(--black); color: var(--yellow); padding: 40px 0 calc(30px + env(safe-area-inset-bottom)); margin-top: 36px; }
.footer-brand-row { padding-bottom: 24px; border-bottom: 1px solid rgba(245,197,24,.25); }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { max-height: 38px; width: auto; }
.footer-brand strong { display: block; font-size: 22px; }
.footer-brand span { color: #E8D9A0; font-size: 12px; letter-spacing: .08em; }
.footer-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; padding: 28px 0; }
.footer-grid h2 { color: var(--yellow); font-size: 16px; margin-bottom: 10px; }
.footer-grid a { display: block; min-height: 34px; color: #E8D9A0; }
.footer-grid a:hover { color: #fff; }
.footer-note { color: #E8D9A0; font-size: 14px; border-top: 1px solid rgba(245,197,24,.25); padding-top: 20px; }
.story-drawer, .search-layer { position: fixed; z-index: 1100; visibility: hidden; pointer-events: none; transition: transform .24s ease, opacity .2s ease, visibility .2s; }
.story-drawer { left: 0; top: 0; bottom: 0; width: min(360px, 86vw); background: var(--paper); color: var(--body); transform: translateX(-102%); overflow-y: auto; box-shadow: 18px 0 44px rgba(17,17,17,.2); }
.story-drawer.is-open { visibility: visible; pointer-events: auto; transform: translateX(0); }
.drawer-head { position: sticky; top: 0; z-index: 2; background: var(--yellow); min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(17,17,17,.2); }
.drawer-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.drawer-brand img { max-height: 32px; max-width: 150px; width: auto; }
.drawer-brand strong { color: var(--black); }
.close-button { min-height: 44px; border: 1px solid var(--black); background: var(--black); color: var(--yellow); border-radius: 6px; padding: 8px 12px; font-weight: 900; }
.drawer-groups { padding: 14px 16px 28px; }
.drawer-groups section { padding: 12px 0; border-top: 1px solid var(--line); }
.drawer-groups section:first-child { border-top: 0; }
.drawer-groups h2 { font-size: 14px; margin-bottom: 6px; color: var(--muted); }
.drawer-groups a { display: block; padding: 10px 6px; border-radius: 8px; }
.drawer-groups a:hover { background: var(--white); }
.drawer-groups a strong { display: block; color: var(--ink); }
.drawer-groups a span { display: block; color: var(--muted); font-size: 13px; line-height: 1.55; margin-top: 2px; }
.search-layer { top: 92px; left: 50%; width: min(760px, calc(100% - 32px)); transform: translate(-50%, -16px); opacity: 0; }
.search-layer.is-open { visibility: visible; pointer-events: auto; transform: translate(-50%, 0); opacity: 1; }
.search-card { 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: 14px; margin-bottom: 14px; }
.search-head strong { color: var(--ink); font-size: 20px; }
.search-card label { display: block; font-weight: 900; color: var(--ink); margin-bottom: 8px; }
.search-card input { width: 100%; min-height: 48px; border: 1px solid var(--black); background: var(--white); color: var(--ink); padding: 10px 12px; border-radius: 6px; }
.search-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.search-presets a { min-height: 40px; display: inline-flex; align-items: center; padding: 7px 10px; background: var(--yellow); color: var(--black); border: 1px solid var(--black); font-weight: 900; }
.search-note { color: var(--muted); font-size: 13px; }
.site-mask { position: fixed; inset: 0; z-index: 1000; background: rgba(17,17,17,.54); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s; }
.site-mask.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lock-scroll { overflow: hidden; }
.mobile-bottom-nav { display: none; }
.meta-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip { background: var(--soft); border: 1px solid var(--line); color: var(--ink); padding: 5px 9px; font-weight: 800; font-size: 13px; }
.warning-strip { background: var(--black); color: #fff; border-left: 8px solid var(--yellow); padding: 16px 18px; margin: 18px 0; }
.warning-strip strong { color: var(--yellow); }
@media (max-width: 900px) {
    .tag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid-3, .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-grid, .split-feature { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px) {
    body { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
    .site-width, .page-shell { width: min(100% - 32px, 1180px); }
    .site-main { padding-top: 118px; }
    .issue-bar { display: none; }
    .masthead-inner { grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; }
    .mast-logo { min-width: 0; overflow: hidden; font-size: 18px; white-space: nowrap; }
    .mast-logo img { max-width: 150px; max-height: 34px; }
    .catalog-button, .app-link { min-width: 68px; padding: 7px 9px; font-size: 14px; }
    .ink-brand { max-width: calc(100vw - 86px); overflow: hidden; text-overflow: ellipsis; }
    .search-layer { inset: 0; width: 100%; transform: none; background: var(--paper); opacity: 0; }
    .search-layer.is-open { transform: none; opacity: 1; }
    .search-card { min-height: 100%; border: 0; box-shadow: none; padding: calc(24px + env(safe-area-inset-top)) 16px 90px; }
    .tag-grid, .card-grid-3, .card-grid-2, .genre-grid, .mini-grid { grid-template-columns: 1fr; }
    .index-item { grid-template-columns: 1fr; gap: 5px; }
    .board-row { grid-template-columns: 70px 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
    .mobile-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; 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,.45); }
    .mobile-bottom-nav a { min-height: 50px; color: #E8D9A0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; }
    .mobile-bottom-nav a.active { background: var(--yellow); color: var(--black); }
    .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .number-item { grid-template-columns: 46px 1fr; }
    .spine-item { grid-template-columns: 8px 1fr; }
    .spine-item a { grid-column: 2; }
}
@media (max-width: 420px) {
    .catalog-button { min-width: 64px; }
    .app-link { min-width: 58px; }
    .mast-logo img { max-width: 118px; }
    .footer-grid { grid-template-columns: 1fr; }
}
