/* お絵描き都道府県 style.css — 構造とクラス名は docs/design.md */

:root {
  --c-ink: #3b2f2f;
  --c-ink-sub: #7a6a5e;
  --c-paper: #fffdf7;
  --c-paper-shade: #f4ecda;
  --c-paper-edge: #d9c9a6;
  --c-bg: #fff3dc;
  --c-desk: #f6e3bd;
  --c-line: #eadcc0;
  --c-grid: rgba(90, 174, 224, 0.13);

  --c-shu: #e8513b;
  --c-shu-deep: #b83a28;
  --c-shu-soft: #fbdcd6;
  --c-ai: #2f4b7c;
  --c-ai-deep: #1e3256;
  --c-ai-soft: #dfe6f2;
  --c-gold: #ffc83d;
  --c-gold-deep: #d99a00;
  --c-gold-soft: #fff1c7;
  --c-mint: #3fbfad;
  --c-mint-deep: #2a9182;
  --c-mint-soft: #d9f3ef;

  --font-base: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "BIZ UDPGothic",
    "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-num: "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "SF Pro Rounded",
    ui-rounded, system-ui, sans-serif;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --border: 3px solid var(--c-ink);
  --shadow-card: 0 4px 0 rgba(59, 47, 47, 0.14), 0 10px 22px rgba(59, 47, 47, 0.08);
  --btn-depth: 6px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --dur-fast: 0.15s;
  --dur-mid: 0.3s;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font-base);
  color: var(--c-ink);
  background-color: var(--c-bg);
  background-image:
    linear-gradient(var(--c-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  touch-action: manipulation;
  line-height: 1.5;
}

button { font: inherit; color: inherit; }

.app {
  position: relative;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
}

@media (min-width: 560px) {
  .app {
    border-left: var(--border);
    border-right: var(--border);
    background: rgba(255, 253, 247, 0.55);
    box-shadow: 0 0 0 10px rgba(246, 227, 189, 0.6);
  }
}

.num {
  font-family: var(--font-num);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 画面切替 ---------- */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: calc(14px + var(--safe-top)) 14px calc(14px + var(--safe-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--dur-mid) ease, transform var(--dur-mid) ease, visibility 0s linear var(--dur-mid);
  overflow-y: auto;
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity var(--dur-mid) ease, transform var(--dur-mid) ease, visibility 0s;
}

/* ---------- ボタン ---------- */

.btn {
  --btn-bg: var(--c-shu);
  --btn-edge: var(--c-shu-deep);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px 26px;
  border: var(--border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 var(--btn-depth) 0 var(--btn-edge), 0 var(--btn-depth) 0 3px var(--c-ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter var(--dur-fast);
}

.btn::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 18%;
  right: 18%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.btn:hover { filter: brightness(1.05); }

.btn:active,
.btn.is-pressed {
  transform: translateY(var(--btn-depth));
  box-shadow: 0 0 0 var(--btn-edge), 0 0 0 3px var(--c-ink);
}

.btn:focus-visible,
.choice:focus-visible {
  outline: 4px solid var(--c-gold);
  outline-offset: 3px;
}

.btn:disabled {
  filter: grayscale(0.8) opacity(0.6);
  cursor: not-allowed;
  transform: translateY(var(--btn-depth));
  box-shadow: 0 0 0 var(--btn-edge), 0 0 0 3px var(--c-ink);
}

.btn--block { display: flex; width: 100%; }
.btn--secondary { --btn-bg: var(--c-ai); --btn-edge: var(--c-ai-deep); }
.btn--mint { --btn-bg: var(--c-mint); --btn-edge: var(--c-mint-deep); }
.btn--gold { --btn-bg: var(--c-gold); --btn-edge: var(--c-gold-deep); --btn-fg: var(--c-ink); }
.btn--ghost { --btn-bg: var(--c-paper); --btn-edge: var(--c-line); --btn-fg: var(--c-ink); }
.btn--small { min-height: 40px; padding: 6px 16px; font-size: 15px; --btn-depth: 4px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--c-ink);
  border-radius: 50%;
  background: var(--c-paper);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--c-ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.icon-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--c-ink); }

.card {
  background: var(--c-paper);
  border: var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 14px;
}

/* ---------- ロゴ ---------- */

.logo {
  margin: 0;
  text-align: center;
  font-weight: 800;
  line-height: 1.1;
}

.logo__sub {
  display: inline-block;
  position: relative;
  padding: 2px 14px;
  font-size: clamp(22px, 7vw, 30px);
  color: var(--c-ink);
  transform: rotate(-3deg);
}

.logo__sub::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 2px;
  height: 10px;
  z-index: -1;
  border-radius: 999px;
  background: var(--c-gold);
  transform: skewX(-12deg);
}

.logo__main {
  display: flex;
  justify-content: center;
  gap: 1px;
  margin-top: 6px;
  font-size: clamp(40px, 13vw, 60px);
}

.logo__char {
  display: inline-block;
  color: #fff;
  text-shadow:
    0 4px 0 var(--c-ink),
    2px 0 0 var(--c-ink), -2px 0 0 var(--c-ink),
    0 2px 0 var(--c-ink), 0 -2px 0 var(--c-ink),
    2px 2px 0 var(--c-ink), -2px 2px 0 var(--c-ink),
    2px -2px 0 var(--c-ink), -2px -2px 0 var(--c-ink);
  animation: logo-wiggle 2.6s ease-in-out infinite;
}

.logo__char:nth-child(1) { color: var(--c-shu); animation-delay: 0s; }
.logo__char:nth-child(2) { color: var(--c-gold); animation-delay: 0.12s; }
.logo__char:nth-child(3) { color: var(--c-mint); animation-delay: 0.24s; }
.logo__char:nth-child(4) { color: #5aaee0; animation-delay: 0.36s; }

/* ---------- タイトル ---------- */

.screen--title {
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.title__bot {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border: var(--border);
  border-radius: 50%;
  background: var(--c-paper);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.title__bot canvas { display: block; width: 100%; height: 100%; }

.title__lead {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.title__lead em {
  font-style: normal;
  color: var(--c-shu);
}

.title__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 300px);
}

.title__best {
  margin: 0;
  font-size: 13px;
  color: var(--c-ink-sub);
}

.title__best .num { font-size: 19px; color: var(--c-shu); }

.credit {
  margin: 0;
  font-size: 10px;
  color: var(--c-ink-sub);
}

/* ---------- ルール ---------- */

.screen--rules {
  justify-content: center;
  gap: 16px;
}

.rules__title {
  margin: 0;
  text-align: center;
  font-size: 24px;
}

.rules__steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.rules__step {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--c-paper);
  border: var(--border);
  border-radius: var(--radius-m);
  font-size: 15px;
  font-weight: 700;
  counter-increment: step;
}

.rules__step::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--c-ink);
  border-radius: 50%;
  background: var(--c-gold);
  font-family: var(--font-num);
  font-weight: 900;
}

.rules__step small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-ink-sub);
}

/* ---------- プレイ ---------- */

.screen--play {
  gap: 8px;
  padding-top: calc(8px + var(--safe-top));
  padding-bottom: calc(10px + var(--safe-bottom));
  overflow: hidden;
}

.hud {
  flex: none;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 5px;
  align-items: center;
}

.hud__bot {
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  border: 2px solid var(--c-ink);
  border-radius: 50%;
  background: var(--c-paper);
  overflow: hidden;
}

.hud__bot canvas { display: block; width: 100%; height: 100%; }

.hud__streak,
.hud__score {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 1px 10px;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  background: var(--c-paper);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.hud__streak { justify-self: start; background: var(--c-gold-soft); }
.hud__streak .num { font-size: 20px; color: var(--c-shu); }
.hud__score .num { font-size: 18px; }

.hud__streak.is-up { animation: pop 0.4s var(--ease-pop); }

.hud__pause { grid-column: 4; }

.gauge {
  grid-column: 2 / span 3;
  position: relative;
  height: 14px;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  background: var(--c-paper-shade);
  overflow: hidden;
}

.gauge__fill {
  --t: 1;
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--t));
  background: repeating-linear-gradient(-45deg, var(--c-mint) 0 8px, #5fd0c0 8px 16px);
  transition: transform 0.1s linear;
}

.gauge.is-low .gauge__fill {
  background: repeating-linear-gradient(-45deg, var(--c-shu) 0 8px, #f2775f 8px 16px);
  animation: blink 0.5s steps(2) infinite;
}

/* 速さボーナスの残り（任意）: 4枚目まで描き終えたら .is-overtime */
.gauge.is-overtime .gauge__fill { background: var(--c-shu); }

.hud__say {
  grid-column: 2 / span 3;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-ink-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 絵パネル: 残り高さに収まる最大の正方形 */
.board-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  container-type: size;
}

.board {
  position: relative;
  width: min(100cqw, 100cqh);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  padding: 16px 8px 8px;
  border: var(--border);
  border-radius: var(--radius-m);
  background: var(--c-desk);
  box-shadow: var(--shadow-card);
}

/* スケッチブックのリング */
.board::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 242px;
  max-width: calc(100% - 44px);
  transform: translateX(-50%);
  height: 18px;
  background: radial-gradient(circle at 50% 50%, var(--c-paper) 0 3.5px, var(--c-ink) 4px 6.5px, transparent 7px) center 0 / 22px 18px space no-repeat;
  pointer-events: none;
}

.panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 2px solid var(--c-ink);
  border-radius: var(--radius-s);
  background: var(--c-paper);
  overflow: hidden;
  transition: transform var(--dur-mid) var(--ease-pop), box-shadow var(--dur-mid) ease, opacity var(--dur-mid) ease;
}

.panel canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* まだ描いていない */
.panel.is-waiting {
  opacity: 0.55;
  background: var(--c-paper-shade);
}

.panel.is-waiting::after {
  content: "?";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 900;
  color: var(--c-paper-edge);
}

/* 描いている最中 */
.panel.is-drawing {
  z-index: 1;
  border-color: var(--c-ink);
  box-shadow: 0 0 0 3px var(--c-gold), 0 0 0 5px var(--c-ink), 0 6px 14px rgba(59, 47, 47, 0.25);
  transform: scale(1.03) rotate(-0.6deg);
  animation: panel-glow 1.2s ease-in-out infinite;
}

.panel.is-drawing::before {
  content: "かいてる…";
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 0 7px;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  background: var(--c-gold);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.6;
}

.panel.is-done { transform: none; }

/* 回答後のモチーフ名ラベル */
.panel__label {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 1px 4px;
  border: 2px solid var(--c-ink);
  border-radius: 8px;
  background: var(--c-paper);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: label-in 0.25s var(--ease-pop) both;
}

.panel:nth-child(2) .panel__label { animation-delay: 0.05s; }
.panel:nth-child(3) .panel__label { animation-delay: 0.1s; }
.panel:nth-child(4) .panel__label { animation-delay: 0.15s; }

.panel--shape .panel__label { background: var(--c-mint-soft); }

/* 4択 */
.choices {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 10px;
  padding-bottom: 6px;
}

.choice {
  --btn-bg: var(--c-paper);
  --btn-edge: var(--c-paper-edge);
  position: relative;
  min-height: 52px;
  padding: 6px 8px;
  border: var(--border);
  border-radius: var(--radius-m);
  background: var(--btn-bg);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--btn-edge), 0 6px 0 3px var(--c-ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background var(--dur-fast);
}

.choice:active,
.choice.is-pressed {
  transform: translateY(6px);
  box-shadow: 0 0 0 var(--btn-edge), 0 0 0 3px var(--c-ink);
}

.choice.is-correct {
  --btn-bg: var(--c-shu);
  --btn-edge: var(--c-shu-deep);
  color: #fff;
  animation: pop 0.35s var(--ease-pop);
}

.choice.is-wrong {
  --btn-bg: var(--c-ai);
  --btn-edge: var(--c-ai-deep);
  color: #fff;
  animation: shake 0.4s ease;
}

.choice.is-dim { opacity: 0.45; }
.choices.is-locked .choice { pointer-events: none; }

/* 正解演出（短く 0.9s 程度） */
.board.is-ok { animation: board-ok 0.5s var(--ease-pop); }
.board.is-ng { animation: shake 0.4s ease; }

.ok-burst {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.ok-burst canvas {
  width: 62%;
  height: 62%;
  animation: stamp 0.35s var(--ease-pop) both;
}

.ok-burst__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 2px 14px;
  border: var(--border);
  border-radius: 999px;
  background: var(--c-paper);
  font-size: 22px;
  font-weight: 900;
  color: var(--c-shu);
  white-space: nowrap;
  animation: stamp 0.35s var(--ease-pop) 0.12s both;
}

.ok-burst__text .num { font-size: 18px; color: var(--c-ink); }

.ok-burst.is-leaving { animation: fade-out 0.25s ease forwards; }

/* ---------- 結果 ---------- */

.screen--result {
  gap: 12px;
  align-items: stretch;
}

.result__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result__bot {
  flex: none;
  width: 72px;
  height: 72px;
  border: var(--border);
  border-radius: 50%;
  background: var(--c-paper);
  overflow: hidden;
}

.result__bot canvas { display: block; width: 100%; height: 100%; }

.result__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.result__title small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-ink-sub);
}

.result__title.is-clear { color: var(--c-shu); }

.result__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  padding: 6px 4px;
  border: var(--border);
  border-radius: var(--radius-s);
  background: var(--c-paper);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.stat .num { display: block; font-size: 26px; }
.stat--streak { background: var(--c-gold-soft); }
.stat--streak .num { color: var(--c-shu); }
.stat.is-new { position: relative; }

.stat.is-new::after {
  content: "NEW";
  position: absolute;
  top: -10px;
  right: -6px;
  padding: 0 6px;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  background: var(--c-shu);
  color: #fff;
  font-family: var(--font-num);
  font-size: 10px;
  transform: rotate(10deg);
}

.review {
  padding: 10px;
}

.review__q {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
}

.review__answer {
  font-size: 20px;
  color: var(--c-shu);
}

.review__mine {
  font-size: 12px;
  color: var(--c-ai);
}

.review__mine.is-timeout { color: var(--c-ink-sub); }

.review__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: min(100%, calc(100dvh - 350px));
  min-width: 220px;
  margin: 0 auto;
}

.review__item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.review__pic {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid var(--c-ink);
  border-radius: var(--radius-s);
  background: var(--c-paper);
  overflow: hidden;
}

.review__pic canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.review__name {
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  line-height: 1.3;
}

.review__name small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--c-ink-sub);
}

.result__rank {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.result__actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 12px;
  margin-top: auto;
  padding-bottom: 6px;
}

.result__actions .btn { padding-left: 10px; padding-right: 10px; }
.result__actions .btn--block { grid-column: auto; padding-left: 8px; padding-right: 8px; }

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  z-index: 30;
  padding: 6px 16px;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  background: var(--c-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transform: translateX(-50%);
  animation: toast 1.8s ease both;
  pointer-events: none;
}

/* ---------- ポーズ / 横向き警告 ---------- */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: rgba(59, 47, 47, 0.55);
  text-align: center;
}

.overlay.is-open { display: flex; animation: fade-in 0.2s ease both; }

.overlay__card {
  width: min(100%, 300px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overlay__title { margin: 0; font-size: 22px; }

.rotate-guard {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--c-bg);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.rotate-guard__icon {
  width: 46px;
  height: 76px;
  border: 4px solid var(--c-ink);
  border-radius: 10px;
  background: var(--c-paper);
  box-shadow: inset 0 -10px 0 var(--c-gold-soft);
  animation: rotate-hint 1.8s ease-in-out infinite;
}

.rotate-guard small { font-size: 13px; font-weight: 600; color: var(--c-ink-sub); }

@media (orientation: landscape) and (max-height: 500px) {
  .rotate-guard { display: flex; }
}

/* ---------- 低い画面の詰め ---------- */

@media (max-height: 680px) {
  .screen--play { gap: 6px; }
  .board { gap: 6px; padding: 13px 6px 6px; }
  .choice { min-height: 46px; font-size: 17px; }
  .choices { gap: 9px 8px; }
  .hud__say { display: none; }
  .hud__bot { width: 40px; height: 40px; }
  .screen--title { gap: 12px; }
  .title__bot { width: 104px; height: 104px; }
  .screen--result { gap: 9px; }
  .result__bot { width: 60px; height: 60px; }
  .stat .num { font-size: 22px; }
}

@media (min-height: 760px) {
  .screen--play { gap: 14px; padding-top: calc(16px + var(--safe-top)); }
  .choice { min-height: 64px; font-size: 20px; }
  .choices { gap: 14px 12px; }
}

/* ---------- アニメーション ---------- */

@keyframes logo-wiggle {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}

@keyframes panel-glow {
  0%, 100% { box-shadow: 0 0 0 3px var(--c-gold), 0 0 0 5px var(--c-ink), 0 6px 14px rgba(59, 47, 47, 0.25); }
  50% { box-shadow: 0 0 0 5px var(--c-gold), 0 0 0 7px var(--c-ink), 0 8px 18px rgba(59, 47, 47, 0.3); }
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.8) rotate(-8deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-8deg); }
}

.ok-burst canvas { animation-name: stamp-c; }

@keyframes stamp-c {
  0% { opacity: 0; transform: scale(1.6); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes board-ok {
  0% { transform: scale(1); }
  40% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes label-in {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: none; }
}

@keyframes blink {
  50% { opacity: 0.55; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  12%, 80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

@keyframes rotate-hint {
  0%, 30% { transform: rotate(-90deg); }
  60%, 100% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .panel.is-drawing { transform: none; }
  .logo__char { animation: none; }
}
