:root { --bg:#0a0a0a; --fg:#f5f5f5; --muted:#737373; --soft:#a3a3a3; --line:#2a2a2a; --card:#141414; }
* { box-sizing: border-box; }
html, body { margin:0; background:var(--bg); color:var(--fg); }
body { font-family:"Epilogue","Noto Sans SC","Noto Sans CJK SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans JP",ui-sans-serif,system-ui,sans-serif;
  font-size:16px; line-height:1.7; -webkit-text-size-adjust:100%; overflow-wrap:anywhere; word-break:normal; }
[hidden] { display:none !important; }
a { color:var(--fg); text-underline-offset:3px; text-decoration-color:var(--muted); }
a:hover { text-decoration-color:var(--fg); }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.shell { max-width:52rem; margin:0 auto; padding:0 20px 48px; }
.top { display:flex; align-items:center; justify-content:space-between; min-height:64px; border-bottom:1px solid var(--line); margin-bottom:40px; }
.brand { font-weight:700; letter-spacing:.01em; text-decoration:none; }
h1 { font-size:2rem; line-height:1.25; margin:0 0 12px; font-weight:700; letter-spacing:-.01em; }
.btn, .btn-ghost { font:inherit; font-size:.95rem; border-radius:999px; cursor:pointer; padding:8px 18px; line-height:1.4; }
.btn { background:var(--fg); color:var(--bg); border:1px solid var(--fg); font-weight:600; min-width:96px; }
.btn:disabled { opacity:.6; cursor:progress; }
.btn-ghost { background:transparent; color:var(--fg); border:1px solid var(--line); }
.btn-ghost:hover { border-color:var(--muted); }
.btn:focus-visible, .btn-ghost:focus-visible, input:focus-visible, a:focus-visible { outline:2px solid var(--fg); outline-offset:2px; }

.locked { max-width:28rem; padding-top:8vh; }
.lead { color:var(--soft); margin:0 0 28px; }
.row { display:flex; gap:10px; }
.row input { flex:1; min-width:0; }
input[type=password], .search { font:inherit; color:var(--fg); background:var(--card); border:1px solid var(--line); border-radius:10px; padding:10px 14px; width:100%; }
input::placeholder { color:var(--muted); }
.check { display:flex; align-items:center; gap:8px; color:var(--soft); font-size:.9rem; margin-top:14px; }
.check input { accent-color:#f5f5f5; width:16px; height:16px; margin:0; }
.msg { color:var(--soft); font-size:.95rem; min-height:1.7em; margin:16px 0 0; }
.msg.err { color:#ff6b6b; }

.note { border-left:2px solid var(--fg); padding:2px 0 2px 12px; margin:0 0 16px; font-size:.95rem; color:var(--fg); }
.stats { color:var(--muted); margin:0 0 20px; font-size:.95rem; }
.count { color:var(--muted); font-size:.9rem; margin:10px 0 0; min-height:0; }
.count:empty { display:none; }
.cases { list-style:none; padding:0; margin:16px 0 0; border-top:1px solid var(--line); }
.cases li { border-bottom:1px solid var(--line); }
.cases a { display:block; padding:16px 0; text-decoration:none; }
.cases a:hover .t { text-decoration:underline; text-decoration-color:var(--muted); }
.cases .t { display:block; font-weight:600; font-size:1.05rem; line-height:1.45; }
.cases .m { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; margin-top:8px; color:var(--muted); font-size:.85rem; line-height:1.5; }
.cases .id { font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:.8rem; }
.cases .empty { padding:20px 0; color:var(--muted); }
.badge { display:inline-block; font-size:.75rem; line-height:1; padding:5px 9px; border-radius:999px; font-weight:600; white-space:nowrap; }
.b-full { border:1px solid var(--line); color:var(--soft); }
.b-part { border:1px solid var(--soft); color:var(--fg); }

.back { display:inline-block; color:var(--soft); text-decoration:none; margin-bottom:24px; font-size:.95rem; }
.back:hover { color:var(--fg); }
#article > p:first-child { margin:0 0 12px; }
#article h1 { font-size:1.75rem; }
.meta { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:6px 18px; margin:20px 0 28px; padding:16px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); font-size:.92rem; }
.meta dt { color:var(--muted); margin:0; }
.meta dd { margin:0; min-width:0; overflow-wrap:anywhere; }

.body { min-width:0; }
.body h1 { font-size:1.4rem; margin:32px 0 12px; }
.body h2 { font-size:1.2rem; margin:32px 0 10px; line-height:1.4; }
.body h3, .body h4 { font-size:1.05rem; margin:24px 0 8px; }
.body p, .body li { color:#e4e4e4; }
.body p { margin:0 0 14px; }
.body ul, .body ol { padding-left:1.4em; margin:0 0 14px; }
.body blockquote { margin:0 0 14px; padding:2px 0 2px 16px; border-left:2px solid var(--line); color:var(--soft); }
.body hr { border:0; border-top:1px solid var(--line); margin:24px 0; }
.body code { font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:.88em; background:var(--card); padding:1px 5px; border-radius:4px; }
.body pre { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px 16px; white-space:pre-wrap; overflow-wrap:anywhere; font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:.86rem; line-height:1.65; margin:0 0 16px; }
.body pre code { background:none; padding:0; font-size:inherit; }
.body pre.transcript { font-family:inherit; font-size:.95rem; max-height:none; color:#e4e4e4; }
.body table { display:block; max-width:100%; overflow-x:auto; border-collapse:collapse; margin:0 0 16px; font-size:.9rem; }
.body th, .body td { border:1px solid var(--line); padding:6px 10px; text-align:left; vertical-align:top; }
.body img { display:block; max-width:100%; height:auto; border-radius:8px; background:var(--card); }
.body img:not([src]) { min-height:120px; width:100%; }
.body figure { margin:0 0 18px; }
.body figcaption { color:var(--muted); font-size:.8rem; margin-top:6px; }
.body .gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:16px; }
.body .section { margin-top:8px; }
.body .notice { border:1px solid var(--soft); border-radius:10px; padding:12px 16px; margin:0 0 24px; color:var(--fg); }
.body details { border-top:1px solid var(--line); margin-top:32px; padding-top:12px; color:var(--soft); font-size:.9rem; }
.body details summary { cursor:pointer; color:var(--soft); }
.body details h2 { font-size:1rem; }
.foot { margin-top:56px; padding-top:20px; border-top:1px solid var(--line); color:var(--muted); font-size:.85rem; }

@media (max-width:600px) {
  .shell { padding:0 16px 40px; }
  .top { margin-bottom:28px; min-height:56px; }
  h1 { font-size:1.6rem; }
  #article h1 { font-size:1.4rem; }
  .locked { padding-top:4vh; }
  .meta { gap:6px 14px; }
}
