:root{color-scheme:light;--page:#f8fafc;--card:#fff;--subtle:#f1f5f9;--ink:#0f172a;--muted:#475569;--border:#e2e8f0;--accent:#0f766e;--accent-soft:#ccfbf1}
html.dark{color-scheme:dark;--page:#0b1120;--card:#111827;--subtle:#1e293b;--ink:#f1f5f9;--muted:#b5c3d4;--border:#334155;--accent:#5eead4;--accent-soft:#134e4a}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;background:var(--page);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;line-height:1.6}a{color:inherit;text-decoration:none}button,input{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #f97316;outline-offset:3px}[hidden]{display:none!important}
.site-header{position:sticky;top:0;z-index:10;background:var(--card);border-bottom:1px solid var(--border)}.bar{max-width:1152px;min-height:68px;margin:auto;padding:0 24px;display:flex;align-items:center;gap:20px}.brand{display:flex;align-items:center;gap:10px;margin-right:auto;line-height:1.2;font-size:1rem;font-weight:700}.brand .logo{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:#0f766e;color:white;font-size:1.15rem}.brand small{display:block;color:var(--muted);font-size:.72rem;font-weight:400;margin-top:4px}#main-nav{display:flex;align-items:center;gap:4px}#main-nav a{padding:9px 13px;border-radius:9px;font-size:.875rem;font-weight:600}#main-nav a:hover{background:var(--subtle)}#main-nav a[aria-current=page]{background:#0f766e;color:#fff}button#theme,button#menu{border:1px solid var(--border);border-radius:9px;background:var(--card);padding:8px 11px;font-size:.85rem}button#menu{display:none}.wrap{width:min(1152px,calc(100% - 48px));margin:0 auto;padding:36px 0}.hero{display:grid;grid-template-columns:1fr 1fr;overflow:hidden;border:1px solid var(--border);background:var(--card);border-radius:18px;box-shadow:0 3px 12px #0f172a0b}.hero-copy{padding:clamp(24px,4vw,46px);align-self:center}.hero h1{font-size:clamp(1.9rem,1.25rem + 2vw,2.9rem);line-height:1.25;letter-spacing:-.035em;margin:0 0 12px}.hero p{color:var(--muted);line-height:1.8}.hero>img{width:100%;height:100%;min-height:245px;object-fit:cover}.filters{margin:32px 0 18px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.filters input{border:1px solid var(--border);border-radius:10px;color:var(--ink);background:var(--card);padding:10px 14px;min-width:220px;flex:1 1 250px}.filters button{background:var(--card);border:1px solid var(--border);padding:8px 13px;border-radius:999px;font-size:.85rem}.filters button[aria-pressed=true]{background:#0f766e;border-color:#0f766e;color:white}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.card{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--border);border-radius:15px;overflow:hidden;box-shadow:0 3px 12px #0f172a0a}.card .cover{display:block;overflow:hidden}.card .cover img{width:100%;height:auto;aspect-ratio:1.9;object-fit:cover;display:block}.card-body{padding:19px 20px 12px;flex:1}.card small,.article-head small{color:var(--accent);font-weight:650}.card h2{font-size:1.15rem;line-height:1.4;margin:.45rem 0}.card h2 a:hover{color:var(--accent)}.card p{color:var(--muted);font-size:.9rem;line-height:1.7}.tags{font-size:.8rem;color:var(--muted)}.card>button[data-bookmark]{align-self:flex-start;margin:0 20px 20px}.card button[data-bookmark],.story button[data-bookmark]{padding:7px 12px;border:1px solid var(--border);border-radius:9px;background:var(--card);font-size:.85rem}.card button[aria-pressed=true],.story button[aria-pressed=true]{color:var(--accent);background:var(--accent-soft)}#empty{padding:28px;border:1px dashed var(--border);border-radius:12px;color:var(--muted);text-align:center}
.reader{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:30px;align-items:start}.story,.toc,.about{background:var(--card);border:1px solid var(--border);border-radius:16px}.story{min-width:0;padding:clamp(22px,4vw,42px)}.article-head h1{font-size:clamp(1.8rem,1.25rem + 1.8vw,2.7rem);line-height:1.25;margin:.5rem 0}.article-head p{color:var(--muted)}.feature{display:block;width:100%;height:auto;max-height:420px;object-fit:cover;margin:24px 0;border-radius:12px}.toc{position:sticky;top:90px;padding:18px;font-size:.875rem}.toc strong{display:block;margin-bottom:9px}.toc a{display:block;color:var(--muted);padding:5px 0}.toc a:hover{color:var(--accent)}.prose-custom{min-width:0;line-height:1.82;overflow-wrap:anywhere}.prose-custom h2{font-size:1.375rem;margin:2rem 0 .75rem;padding-bottom:.4rem;border-bottom:1px solid var(--border);scroll-margin-top:5.5rem}.prose-custom h3{font-size:1.1rem;margin:1.35rem 0 .5rem}.prose-custom p{margin:0 0 .95rem}.prose-custom ul,.prose-custom ol{padding-left:1.35rem}.prose-custom li{margin-bottom:.35rem}.prose-custom a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.prose-custom img{max-width:100%;height:auto}.prose-custom pre{overflow:auto;padding:1rem 1.15rem;font: .84rem/1.65 ui-monospace,monospace;white-space:pre;color:#e2e8f0;background:#0f172a;border-radius:10px}.prose-custom table{display:block;max-width:100%;overflow:auto;border-collapse:collapse}.prose-custom td,.prose-custom th{padding:.6rem;border:1px solid var(--border)}.prose-custom .code-block{margin:1.1rem 0}.prose-custom .code-block pre{margin:0}.prose-custom .code-block button,[data-copy]{background:#334155;color:white;border:0;border-radius:6px;padding:5px 10px}.prose-custom figure{margin:1.4rem 0}.prose-custom figcaption{font-size:.85rem;color:var(--muted);text-align:center}.photo-open{padding:0;border:0;background:none;display:block;max-width:100%;cursor:zoom-in}.photo-open img{display:block;max-width:100%;height:auto}.about{padding:32px}.site-footer{border-top:1px solid var(--border);background:var(--card);color:var(--muted);padding:26px max(24px,calc((100vw - 1104px)/2));font-size:.85rem}
dialog#lightbox{width:min(94vw,1050px);max-height:90vh;border:1px solid var(--border);border-radius:16px;background:var(--card);color:var(--ink);padding:16px}dialog#lightbox img{display:block;max-width:100%;max-height:75vh;height:auto;margin:auto}dialog#lightbox button{display:block;margin:0 0 12px auto;border:1px solid var(--border);border-radius:8px;background:var(--subtle);padding:7px 12px}dialog:modal{overscroll-behavior:contain}dialog::backdrop{background:#020617d9;overflow:hidden;overscroll-behavior:contain}
@media(max-width:750px){.bar{padding:10px 18px;flex-wrap:wrap;gap:8px}.brand small{display:none}button#menu{display:block}#main-nav{display:none;order:3;flex-basis:100%;flex-direction:column;align-items:stretch;padding:7px 0}#main-nav.open{display:flex}#main-nav a{display:block}.wrap{width:calc(100% - 32px);padding:22px 0}.hero{grid-template-columns:1fr}.hero>img{min-height:0;max-height:260px}.cards{grid-template-columns:1fr}.reader{grid-template-columns:1fr}.toc{position:static;grid-row:1}.story{padding:22px}.filters input{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.skip{position:absolute;top:-5rem;left:1rem;background:var(--card);padding:.6rem;z-index:30}.skip:focus{top:.5rem}.pager{display:flex;justify-content:space-between;gap:12px;margin-top:28px;padding-top:18px;border-top:1px solid var(--border)}.pager a{color:var(--accent);font-weight:600}.tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.eyebrow{color:var(--accent);font-size:.8rem;letter-spacing:.04em;font-weight:700}
.prose-custom .fig-card{border:1px solid var(--border);border-radius:16px;padding:12px;background:var(--card);margin:1.5rem 0;box-shadow:0 2px 6px #0f172a0a}.prose-custom .fig-card img{border-radius:8px;width:100%}.prose-custom .fig-card figcaption{margin-top:10px}.prose-custom .code-block>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#1e293b;color:#cbd5e1;padding:.5rem 1rem;font-size:.75rem;border-bottom:1px solid #334155}.prose-custom .rounded-xl{border:1px solid #14b8a64d;border-radius:12px;background:#14b8a619;padding:1rem;margin:1rem 0}.prose-custom .surface-subtle{background:var(--subtle)}.prose-custom .overflow-x-auto{overflow-x:auto}
.tools{margin-bottom:20px}.tools>a{padding:7px 12px;border:1px solid var(--border);border-radius:9px;background:var(--card);font-size:.85rem}.tools>a:hover{color:var(--accent)}.prose-custom section[id],.story section[id]{scroll-margin-top:90px}.card:not([data-category="西西日记"]) .cover img{object-fit:contain;background:#fff}.story>.photo-open{margin:24px auto}.story>.photo-open img{max-height:560px;width:auto;max-width:100%;object-fit:contain;margin:auto;border-radius:12px}.site-footer{padding:0}.site-footer>.wrap{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:26px 0}.site-footer nav{display:flex;gap:16px;flex-wrap:wrap}.site-footer nav a:hover{text-decoration:underline}.prose-custom .fig-card{background:#fff}.prose-custom .fig-card figcaption{color:#475569}
@media(max-width:700px){.site-footer>.wrap{align-items:flex-start;flex-direction:column}.story>.photo-open img{max-height:420px}}
