:root {
  --maroon: #8e1020;
  --maroon-hot: #cb132a;
  --cream: #f5f0eb;
  --ink: #1c1412;
  --muted: #6b5c56;
  --card: #fff;
  --line: #e2d6cc;
  --s: #d4a017;
  --c: #c0392b;
  --m: #2c5aa0;
  --p: #2e7d4f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--cream); color: var(--ink);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", serif; }
body { padding: 24px 16px 48px; }
header { max-width: 720px; margin: 0 auto 24px; text-align: center; }
header h1 { font-size: 28px; font-weight: 600; color: var(--maroon); letter-spacing: 0.02em; }
header p { color: var(--muted); margin-top: 6px; font-size: 15px; }
.wrap { max-width: 720px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
input[type="password"], input[type="text"], input[type="date"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px; background: #fff; margin-bottom: 14px;
}
button, .btn {
  display: inline-block; padding: 12px 18px; border: 0; border-radius: 10px;
  background: var(--maroon); color: #fff; font-size: 16px; cursor: pointer;
  text-decoration: none; font-family: inherit;
}
button:hover, .btn:hover { background: var(--maroon-hot); }
button.ghost { background: transparent; color: var(--maroon); border: 1px solid var(--maroon); }
button:disabled { opacity: 0.5; cursor: default; }
.err { color: var(--maroon-hot); min-height: 1.2em; font-size: 14px; margin: 6px 0 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }
.progress { height: 4px; background: var(--line); border-radius: 2px; margin: 8px 0 18px; }
.progress > span { display: block; height: 100%; background: var(--maroon); width: 0; }
.q { margin-bottom: 8px; }
.q h2 { font-size: 18px; margin-bottom: 12px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .choices { grid-template-columns: 1fr; } }
.choices button {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  text-align: left; font-size: 16px;
}
.choices button:hover { border-color: var(--maroon); color: var(--maroon); }
.choices button.on { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.bars { margin: 18px 0; }
.bar { display: grid; grid-template-columns: 110px 1fr 2em; gap: 8px; align-items: center; margin: 8px 0; font-size: 14px; }
.bar .track { background: var(--line); height: 12px; border-radius: 6px; overflow: hidden; }
.bar .fill { height: 100%; }
.fill.s { background: var(--s); } .fill.c { background: var(--c); }
.fill.m { background: var(--m); } .fill.p { background: var(--p); }
.kings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
@media (max-width: 600px) { .kings { grid-template-columns: 1fr 1fr; } }
.kings figure { text-align: center; }
.kings img { width: 100%; border-radius: 10px; border: 3px solid transparent; }
.kings figure.win img { border-color: var(--maroon); }
.kings figcaption { font-size: 12px; margin-top: 4px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
code, .mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.copy { font-size: 13px; padding: 6px 10px; }
.nav { display: flex; justify-content: space-between; margin-bottom: 16px; }
a.link { color: var(--maroon); }
.flash { background: #fff7e6; border: 1px solid #e6c98a; padding: 12px; border-radius: 10px; margin-bottom: 16px; }
