:root {
  --bg: #ffffff; --surface: #f4f5f7; --text: #191f28; --muted: #6b7684; --line: #e5e8eb;
  --brand: #3182f6; --brand-press: #1b64da; --ink: #d0162a; --ok: #12a150; --warn: #c27c0e;
  --radius: 18px; --shadow: 0 2px 10px rgba(0, 0, 0, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101215; --surface: #1b1e23; --text: #eef0f3; --muted: #9aa4b2; --line: #2b3038; --brand: #4c93ff; --brand-press: #2f7ae5; --ink: #ff5a69; --shadow: none; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 760px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.gh { color: var(--muted); font-size: 13px; text-decoration: none; }
main { max-width: 760px; margin: 0 auto; padding: 4px 20px 0; }
h1 { font-size: 30px; line-height: 1.25; margin: 12px 0 12px; letter-spacing: -0.5px; }
.lead { font-size: 16px; color: var(--muted); margin: 0 0 28px; }
.lead b { color: var(--text); }
.sec { font-size: 22px; margin: 28px 0 12px; }
.caption { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.center { text-align: center; }
.small { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); font-weight: 400; font-size: 13px; }
.samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sample { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 0; overflow: hidden; cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.sample img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #f7f3ea; }
.sample span { display: block; padding: 8px 10px 10px; font-size: 13px; font-weight: 600; }
.sample:active { transform: scale(.98); }
.how { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.how li { background: var(--surface); border-radius: var(--radius); padding: 14px 16px 14px 52px; position: relative; counter-increment: s; }
.how li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.how b { display: block; font-size: 16px; }
.how span { font-size: 13px; color: var(--muted); }
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; margin: 0 0 24px; box-shadow: var(--shadow); }
.verdict .num { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.verdict.slip .num { color: var(--ink); }
.verdict.ok .num { color: var(--ok); }
.verdict.unsure .num { color: var(--warn); }
.tag.doubtful { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.chip[hidden] { display: none; }
.hero { margin: 0 0 28px; }
.hero img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.verdict .sub { font-size: 16px; color: var(--muted); margin-top: 4px; }
.chip { display: inline-block; margin-top: 14px; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); font-weight: 700; font-size: 13px; }
.explain { margin: 10px 0 0; font-size: 15px; }
.paper { padding: 10px; }
.paper img { width: 100%; height: auto; display: block; border-radius: 12px; background: #fff; }
.paper figcaption { padding: 10px 6px 2px; font-size: 13px; }
.paper a { color: var(--brand); text-decoration: none; font-weight: 600; }
details summary { font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "＋"; float: right; color: var(--muted); }
details[open] summary::after { content: "－"; }
.lines { padding: 0; margin: 14px 0; list-style: none; display: grid; gap: 8px; }
.lines li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; }
.lines .n { font-size: 13px; color: var(--muted); text-align: right; }
.lines input { width: 100%; font: 16px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.tag { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag.equivalent, .tag.start { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.tag.not_equivalent { color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, transparent); }
.tag.unreadable, .tag.unsupported { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.tag.prose { color: var(--muted); background: var(--line); }
button.secondary { width: 100%; height: 52px; border-radius: 14px; border: none; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font: 700 16px inherit; font-family: inherit; cursor: pointer; }
.cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.primary { display: flex; align-items: center; justify-content: center; max-width: 720px; margin: 0 auto; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; font-weight: 700; font-size: 17px; cursor: pointer; user-select: none; }
.primary:active { background: var(--brand-press); }
.spacer, #home { padding-bottom: 110px; }
.error { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 15px; margin: 0 0 120px; }
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--line) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sh 1.2s infinite linear; border-radius: var(--radius); margin: 0 0 16px; }
.skel.big { height: 96px; } .skel.line { height: 24px; width: 60%; } .skel.img { height: 320px; }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (max-width: 420px) { h1 { font-size: 26px; } .samples { gap: 8px; } .sample span { font-size: 12px; padding: 6px 8px 8px; } }
