:root { --ink: #2b211a; --muted: #7a6a5d; --paper: #faf6f0; --card: #fff; --line: #e4d9cc; --accent: #7b4a2b; }
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
main { max-width: 640px; margin: 0 auto; padding: 16px; }
.bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--ink); }
.bar a, .bar .link { color: #fff; text-decoration: none; }
.bar nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; }
h1 { font-size: 1.6rem; margin: 8px 0 12px; }
h2 { font-size: 1.15rem; margin: 28px 0 8px; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: .93rem; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row input { flex: 1; min-width: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
input, textarea { font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
button, .button { font: inherit; padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.big { padding: 16px; font-size: 1.1rem; width: 100%; }
.link { background: none; border: 0; padding: 0; font-size: inherit; }
.inline { display: inline; }
.cards, .plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plain { gap: 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.card p { margin: 4px 0 0; }
.card-title { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.flash, .notice { background: #fff4d6; border: 1px solid #ecd28a; border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.notice p { margin: 4px 0; }
.score { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 12px; }
.big-number { font-size: 2.6rem; font-weight: 800; color: var(--accent); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.wrap { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .9rem; }
.back { margin: 0 0 10px; font-size: .95rem; min-height: 1.2em; }
.back a { text-decoration: none; }
fieldset.choices { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.choices legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: 6px; }
.chip { display: inline-block; font-weight: 400; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.check { display: block; font-weight: 600; font-size: .85rem; color: #8a4b00; background: #fff4d6; border-radius: 6px; padding: 3px 8px; width: fit-content; }
.check.web { color: #2f5d8a; background: #e6f0fa; }
label.doubted input, label.doubted textarea { border-color: #d9a441; border-width: 2px; }
fieldset.choices .check { flex-basis: 100%; }
button:disabled { opacity: 0.6; cursor: progress; }
