/* Onikiri: ink-night theme. One column, canvas is the arena, panels open below. */
:root {
  --bg: #0d0b10; --fg: #f2ece2; --muted: #8f8798; --red: #d8323c; --ink: #17141d;
  --gold: #f0c35a; --blue: #4fb3ff; --violet: #9b6cff; --line: #2b2433;
  --font: "Zen Kaku Gothic New", system-ui, sans-serif;
  color-scheme: dark;
}
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(12px, env(safe-area-inset-top, 0px)); padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
header, .foot, .nav { width: 100%; max-width: 480px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
h1 { margin: 0; font: 900 22px/1 var(--font); letter-spacing: .04em; }
h1 span { color: var(--red); }
.tabs { display: flex; gap: 4px; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.tabs button, .ico, .nav button { all: unset; cursor: pointer; font: 500 13px var(--font); padding: 5px 10px; border-radius: 6px; color: var(--muted); }
.tabs button[aria-pressed="true"], .nav button[aria-pressed="true"] { background: var(--red); color: #fff; }
button:focus-visible { outline: 2px solid var(--gold); }
.ico { border: 1px solid var(--line); background: var(--ink); color: var(--fg); padding: 5px 9px; }
canvas#c { width: 100%; max-width: 480px; aspect-ratio: 3 / 4; border-radius: 12px; background: var(--ink); touch-action: none; display: block; outline: none; }
.foot { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.foot b { color: var(--fg); font-weight: 500; }
.petal { color: var(--gold); font-weight: 900; font-size: 14px; }
.nav { background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 3px; justify-content: stretch; }
.nav button { flex: 1; text-align: center; }
.btn { font: 500 13px var(--font); padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--ink); color: var(--fg); cursor: pointer; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.panel { width: 100%; max-width: 480px; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-sizing: border-box; font-size: 13px; line-height: 1.5; color: var(--muted); }
.panel h2 { margin: 0 0 10px; font: 900 16px var(--font); color: var(--fg); }
.panel h3 { margin: 14px 0 6px; font: 900 12px var(--font); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); min-width: 0; }
.card.on { border-color: var(--gold); }
.card canvas { width: 48px; height: 72px; image-rendering: pixelated; }
.card b { color: var(--fg); font-weight: 900; }
.card small { font-size: 11px; line-height: 1.4; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row b { color: var(--fg); font-weight: 900; }
.row.done b { color: var(--gold); }
.row .t { color: var(--violet); font-size: 11px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--gold); }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.help dt { color: var(--fg); font-weight: 500; white-space: nowrap; }
.help dd { margin: 0; }
kbd { border: 1px solid #3a3542; border-radius: 4px; padding: 0 5px; font-family: inherit; color: var(--fg); }
.lock { opacity: .55; }
.credit { font-size: 11px; color: var(--muted); }
.credit a { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
