/* 样板 v5：三层用同一套材料——黑场、象牙白的纸、琥珀色片边码、红黄蜡笔。 */
:root {
  --void: #050505; --film: #171715; --hole: #000; --paper: #f3f0e6; --ink: #131312;
  --text: #e6e2d5; --mute: #96938a; --dim: #5c5a53; --code: #e9a43c; --wax: #e8402e; --wax-y: #f4c62e;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif; --mast: "Anton", "Noto Sans SC", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace; --hand: "Long Cang", "Noto Sans SC", cursive;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* { box-sizing: border-box; }
html, body { background: var(--void); }
html { overflow-x: hidden; }
body { margin: 0; color: var(--text); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; }
:focus-visible { outline: 2px solid var(--code); outline-offset: 2px; }

/* 三层浮尘：只有首页显示，越靠后的飘得越慢 */
.dust { position: fixed; inset: -200px; pointer-events: none; display: none; z-index: 0; }
body.home .dust { display: block; }
.dust.a { background: radial-gradient(#34322b 1px, transparent 1.4px) 0 0 / 97px 83px; animation: drift 240s linear infinite; }
.dust.b { background: radial-gradient(#57544a 1px, transparent 1.4px) 31px 17px / 151px 127px; animation: drift 150s linear infinite; }
.dust.c { background: radial-gradient(#827d70 1.2px, transparent 1.6px) 60px 44px / 263px 211px; }
@keyframes drift { to { transform: translate3d(-200px, 120px, 0); } }
@media (prefers-reduced-motion: reduce) { .dust { animation: none !important; } * { transition: none !important; } }

/* ── 顶上一行 ─────────────────────────── */
.top { position: relative; z-index: 5; height: 62px; padding: 0 40px; display: flex; align-items: center; gap: 28px; }
.brand { font: 400 24px/1 var(--mast); text-transform: uppercase; letter-spacing: 0.025em; padding-top: 2px; }
.cats { display: flex; gap: 20px; }
.cats a { color: var(--mute); display: flex; align-items: baseline; gap: 6px; padding: 5px 0; white-space: nowrap; transition: color 0.15s; }
.cats a i { font: 400 10.5px/1 var(--mono); font-style: normal; color: var(--code); letter-spacing: 0.06em; }
.cats a:hover { color: var(--text); }
.cats a.on { color: var(--text); font-weight: 700; box-shadow: inset 0 -2px 0 var(--code); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.find { width: 226px; height: 36px; padding: 0 12px; background: var(--film); display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13.5px; }
.find svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.find kbd { margin-left: auto; font: 11px/1 var(--mono); }
.btn { height: 36px; padding: 0 14px; background: var(--film); font-weight: 500; font-size: 13.5px; display: inline-grid; place-items: center; white-space: nowrap; }
.btn:hover { background: #22221f; }
.btn.go { background: var(--code); color: #1a1205; font-weight: 700; }
.btn.go:hover { background: #f3b655; }
.btn.on { box-shadow: inset 0 -2px 0 var(--code); }

/* ── 首页：远近 ───────────────────────── */
.home-head { position: relative; z-index: 4; padding: 26px 40px 0; display: flex; align-items: baseline; gap: 22px; }
.home-head h1 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: 0.02em; }
.home-head p { margin: 0; color: var(--mute); }
.scope { margin-left: auto; display: flex; gap: 2px; background: var(--film); padding: 3px; }
.scope button { height: 30px; padding: 0 14px; color: var(--mute); font-size: 13.5px; }
.scope button[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 700; }
.field { position: relative; height: 820px; margin-top: -20px; }
/* 没有框，没有线：重要程度只靠远近 */
.it { position: absolute; display: block; transition: transform 0.35s var(--ease), filter 0.35s; transform-origin: 50% 60%; }
.it img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.it .nm { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; white-space: nowrap; }
.it b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.it i { font: 400 10.5px/1 var(--mono); font-style: normal; color: var(--code); letter-spacing: 0.05em; flex: none; }
.z3 { width: 400px; z-index: 3; }
.z3 b { font-size: 19px; }
.z2 { width: 236px; z-index: 2; filter: brightness(0.78); }
.z2 b { font-size: 14.5px; color: #cfcbbe; }
.z1 { width: 150px; z-index: 1; filter: brightness(0.52); }
.z1 b { font-size: 12.5px; color: var(--mute); font-weight: 500; }
.z1 i { display: none; }
.it:hover { z-index: 9; filter: none; transform: scale(1.2); }
.z2:hover { transform: scale(1.55); }
.z1:hover { transform: scale(2.35); }
.it:hover b { color: var(--text); }
.scribble { position: absolute; font: 400 27px/1 var(--hand); color: var(--wax); transform: rotate(-5deg); white-space: nowrap; pointer-events: none; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); z-index: 4; }
.home-note { position: relative; z-index: 4; padding: 0 40px 34px; color: var(--dim); font-size: 13px; display: flex; gap: 20px; }
.home-note span { margin-left: auto; font: 400 11px/1.6 var(--mono); letter-spacing: 0.06em; color: var(--mute); }

/* ── 一级分类：杂志架 ─────────────────── */
.page-head { padding: 22px 40px 4px; display: flex; align-items: baseline; gap: 16px; }
.page-head h1 { margin: 0; font-size: 34px; font-weight: 900; letter-spacing: 0.02em; }
.page-head p { margin: 0; color: var(--mute); }
.page-head .back { color: var(--mute); font-size: 13.5px; }
.page-head .back:hover { color: var(--text); }
.tier { padding: 0 40px; }
.tier-head { height: 60px; display: flex; align-items: flex-end; gap: 14px; padding-bottom: 12px; }
.tier-head h2 { margin: 0; font-size: 22px; font-weight: 900; line-height: 1; }
.tier-head h2 a:hover { color: var(--code); }
.tier-head p { margin: 0; color: var(--mute); font-size: 13.5px; }
.tier-head .open { margin-left: auto; color: var(--code); font-size: 13.5px; font-weight: 500; }
.tier-head .open:hover { text-decoration: underline; text-underline-offset: 4px; }
.tier-body { height: 326px; display: grid; grid-template-columns: 732px minmax(0, 1fr); gap: 28px; align-items: end; }
.faceout { display: flex; gap: 18px; align-items: flex-end; }
.cover { position: relative; width: 232px; height: 320px; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; padding: 12px 12px 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6); transition: transform 0.25s var(--ease); }
.cover:hover { transform: translateY(-8px) rotate(-0.6deg); }
.mast { display: block; font: 400 34px/1 var(--mast); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 36px; }
.mast.cjk { font: 900 28px/36px var(--sans); }
.cover .art { display: block; margin-top: 10px; height: 136px; overflow: hidden; background: #dcd8cb; }
.cover .art img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cover .line { margin-top: 10px; font-size: 13px; line-height: 1.45; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 400 10.5px/1 var(--mono); color: #5a574e; border-top: 1.5px solid var(--ink); padding-top: 8px; }
.cover .foot em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keep { font: 700 12px/1 var(--sans); color: var(--ink); border: 1.5px solid var(--ink); padding: 4px 8px; flex: none; }
.keep:hover { background: var(--ink); color: var(--paper); }
.keep.kept { background: var(--wax-y); border-color: var(--wax-y); }
.c1 .mast { color: #cf2f1c; } .c2 .mast { color: #1b3bb0; }
.cover .scribble { right: -18px; top: 122px; left: auto; transform: rotate(6deg); }
/* 瀑布架：只露刊头和截图最上面一条，鼠标移上去整本抽出来 */
.waterfall { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: end; height: 322px; }
.col { display: flex; flex-direction: column; justify-content: flex-end; }
.strip { position: relative; height: 46px; background: var(--paper); color: var(--ink); display: grid; grid-template-columns: 6px minmax(0, 1fr) 132px; box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.5); transition: height 0.28s var(--ease); overflow: hidden; }
.strip:hover { height: 132px; z-index: 2; }
.strip .mast { font-size: 21px; height: 46px; line-height: 46px; padding: 0 12px; }
.strip .mast.cjk { font-size: 17px; line-height: 46px; }
.strip .slice { overflow: hidden; background: #dcd8cb; }
.strip .slice img { width: 100%; height: 132px; object-fit: cover; object-position: top center; }
.strip.more { display: grid; place-items: center; grid-template-columns: 1fr; background: none; box-shadow: inset 0 0 0 1.5px var(--dim); color: var(--mute); font-weight: 700; }
.strip.more:hover { height: 46px; color: var(--code); box-shadow: inset 0 0 0 1.5px var(--code); }
.s0 .spine { background: #cf2f1c; } .s1 .spine { background: #1b3bb0; } .s2 .spine { background: #131312; } .s3 .spine { background: #e2a000; } .s4 .spine { background: #b9417f; }
.rail { height: 12px; margin: 0 -40px; background: var(--film); border-top: 1px solid #2c2c28; }
.noshot .art, .noshot .slice, .noshot.fr::before { background: repeating-linear-gradient(45deg, #e2ddd0 0 6px, #f3f0e6 6px 12px); }

/* ── 二级分类：样片 ───────────────────── */
.sheet { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 34px; padding: 0 40px 60px; align-items: start; }
.sheet-tools { display: flex; align-items: center; gap: 16px; margin: 10px 0 14px; font-size: 13px; color: var(--mute); }
.sheet-tools .on { color: var(--text); font-weight: 700; }
.key { margin-left: auto; display: flex; gap: 20px; }
.key b { font-weight: 400; display: flex; align-items: center; gap: 7px; }
.key b::before { content: ""; width: 16px; height: 10px; border: 2.5px solid var(--wax); border-radius: 50%; }
.key b + b::before { width: 12px; height: 6px; border: 0; border-left: 3px solid var(--wax-y); border-bottom: 3px solid var(--wax-y); border-radius: 0; transform: rotate(-45deg) translateY(-2px); }
.filmstrip { position: relative; background: var(--film); padding: 20px 10px 30px; margin-bottom: 12px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.filmstrip::before, .filmstrip::after { content: ""; position: absolute; left: 0; right: 0; height: 9px; background: repeating-linear-gradient(90deg, var(--hole) 0 13px, transparent 13px 24px); }
.filmstrip::before { top: 6px; } .filmstrip::after { bottom: 15px; }
.fr { position: relative; display: block; }
.fr img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; outline: 1px solid #000; filter: saturate(0.92) brightness(0.9); transition: filter 0.25s; }
.fr.noshot::before { content: ""; display: block; aspect-ratio: 16 / 10; }
.fr:hover img, .fr.cur img { filter: none; box-shadow: 0 0 0 2px var(--code), 0 0 34px 2px rgba(233, 140, 40, 0.45); }
.fr .code { position: absolute; left: 0; right: 0; bottom: -24px; display: flex; gap: 8px; font: 700 10px/1 var(--mono); letter-spacing: 0.08em; color: var(--code); text-transform: uppercase; white-space: nowrap; overflow: hidden; z-index: 1; }
.fr .code i { font-style: normal; font-weight: 400; opacity: 0.75; }
.fr .ring { position: absolute; inset: -9px -8px; pointer-events: none; }
.fr .ring ellipse { fill: none; stroke: var(--wax); stroke-width: 3.2; stroke-linecap: round; }
.fr .tick { position: absolute; right: 6px; top: 4px; width: 34px; height: 30px; pointer-events: none; }
.fr .tick path { fill: none; stroke: var(--wax-y); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.fr .scribble { left: 8px; top: -4px; font-size: 25px; }
.print { position: sticky; top: 22px; margin-top: 46px; }
.photo { background: var(--paper); padding: 12px 12px 14px; box-shadow: 0 22px 44px rgba(0, 0, 0, 0.7); transform: rotate(0.6deg); }
.photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.photo .cap { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--ink); }
.photo .cap b { font: 400 30px/1 var(--hand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo .cap span { font: 400 10.5px/1 var(--mono); color: #6d6a61; flex: none; }
.print p { margin: 20px 2px 0; font-size: 14.5px; line-height: 1.7; min-height: 3.4em; }
.print .acts { display: flex; gap: 10px; margin-top: 16px; }
.print .acts .btn { flex: 1; height: 42px; font-size: 14px; }
.print small { display: block; margin-top: 16px; color: var(--mute); font-size: 12.5px; }

/* ── 搜索 ─────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.72); display: grid; place-items: start center; padding: 11vh 16px 0; }
.overlay[hidden] { display: none; }
.panel { width: min(680px, 100%); background: var(--film); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8); }
.panel-in { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-bottom: 1px solid #2c2c28; }
.panel-in input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: 16px/1 var(--sans); }
.panel-in kbd { font: 11px/1 var(--mono); color: var(--mute); }
.panel-list { max-height: min(60vh, 520px); overflow-y: auto; padding: 6px; }
.grp { margin: 0; padding: 12px 10px 6px; font: 700 10px/1 var(--mono); letter-spacing: 0.08em; color: var(--code); }
.hit { display: grid; grid-template-columns: 64px minmax(0, auto) minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; height: 48px; padding: 0 10px; text-align: left; }
.hit.on { background: #24241f; }
.hit img, .hit .ph { width: 64px; height: 40px; object-fit: cover; object-position: top center; background: #2a2a26; }
.hit b { font-weight: 700; white-space: nowrap; }
.hit span { color: var(--mute); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit i { font: 400 10.5px/1 var(--mono); font-style: normal; color: var(--code); white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80; padding: 10px 16px; background: var(--paper); color: var(--ink); font-weight: 700; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7); }
.toast[hidden] { display: none; }

@media (max-width: 1280px) {
  .top { padding: 0 24px; gap: 18px; }
  .cats { gap: 13px; overflow: hidden; }
  .cats a i { display: none; }
  .find { width: 40px; padding: 0; justify-content: center; font-size: 0; }
  .find kbd { display: none; }
  .tier, .sheet, .page-head, .home-head, .home-note { padding-left: 24px; padding-right: 24px; }
  .rail { margin: 0 -24px; }
  .tier-body { grid-template-columns: 482px minmax(0, 1fr); }
  .faceout .cover:nth-child(3) { display: none; }
  .sheet { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* ── 没有图的格子：一张印着刊头的纸卡 ─── */
.fr .card, .photo .card { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 16 / 10; background: var(--paper); color: var(--ink); padding: 9px 10px 8px; outline: 1px solid #000; overflow: hidden; filter: brightness(0.9); transition: filter 0.25s; }
.fr .card b { font: 400 21px/1.02 var(--mast); text-transform: uppercase; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.fr .card em { font: 400 9.5px/1 var(--mono); font-style: normal; color: #6d6a61; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr:hover .card, .fr.cur .card { filter: none; box-shadow: 0 0 0 2px var(--code), 0 0 34px 2px rgba(233, 140, 40, 0.45); }
.photo .card { filter: none; outline: 1px solid #d5d0c2; padding: 22px; }
.photo .card b { font: 400 52px/1 var(--mast); text-transform: uppercase; word-break: break-word; }
.photo .card em { font: 400 11px/1 var(--mono); font-style: normal; color: #6d6a61; }

/* ── 我的库 ───────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { height: 28px; padding: 0 11px; background: var(--film); color: var(--mute); font-size: 13px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.chip i { font: 400 10.5px/1 var(--mono); font-style: normal; color: var(--code); }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 700; }
.chip[aria-pressed="true"] i { color: #7a5a17; }
.mine-tools { margin: 26px 0 0; align-items: flex-start; }
.sorts { margin-left: auto; display: flex; gap: 14px; flex: none; padding-top: 4px; }
.sorts button { color: var(--mute); }
.sorts button.on { color: var(--text); font-weight: 700; }
.roll-head { display: flex; align-items: baseline; gap: 12px; margin: 24px 0 10px; }
.roll-head h2 { margin: 0; font-size: 20px; font-weight: 900; display: flex; align-items: baseline; gap: 8px; }
.roll-head h2 i { font: 400 11px/1 var(--mono); font-style: normal; color: var(--code); letter-spacing: 0.06em; }
.roll-head span { color: var(--mute); font-size: 13px; }
.roll-more { width: 100%; height: 40px; margin: 0 0 6px; color: var(--mute); box-shadow: inset 0 0 0 1.5px var(--dim); font-weight: 500; font-size: 13.5px; }
.roll-more:hover { color: var(--code); box-shadow: inset 0 0 0 1.5px var(--code); }
.print .meta { margin-top: 14px; font: 400 11px/1.6 var(--mono); color: var(--mute); }
.print .tagset { margin-top: 12px; }
.empty { color: var(--mute); padding: 30px 0; }

/* ── 存一个网址 ───────────────────────── */
.saver { width: min(520px, 100%); }
.s-title { margin: 0; padding: 18px 20px 0; font-size: 18px; font-weight: 900; }
.s-form { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 8px; }
.s-form label { margin-top: 6px; font: 700 10px/1 var(--mono); letter-spacing: 0.08em; color: var(--code); }
.s-form input, .s-form select, .s-form textarea { height: 38px; padding: 0 12px; background: var(--void); color: var(--text); border: 0; box-shadow: inset 0 0 0 1px #33332e; font: 14px/1.4 var(--sans); outline: 0; width: 100%; }
.s-form textarea { height: 60px; padding: 9px 12px; resize: none; }
.s-form input:focus, .s-form select:focus, .s-form textarea:focus { box-shadow: inset 0 0 0 1.5px var(--code); }
.url-row { display: flex; gap: 8px; }
.url-row input { flex: 1; }
.url-row .btn { height: 38px; flex: none; }
.s-preview { display: flex; gap: 12px; align-items: center; background: var(--paper); color: var(--ink); padding: 10px; }
.s-preview img { width: 96px; height: 60px; object-fit: cover; object-position: top center; flex: none; }
.s-preview b { display: block; font: 400 24px/1.05 var(--mast); text-transform: uppercase; }
.s-preview span { font: 400 10.5px/1.8 var(--mono); color: #6d6a61; }
.hint { margin: 2px 0 0; color: var(--mute); font-size: 13px; line-height: 1.6; }
.hint.mark { color: var(--code); }
.tag-input { height: 28px !important; width: 170px !important; padding: 0 10px !important; font-size: 13px !important; }
.s-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #2c2c28; }
