/* 色・文字・寸法は tokens.css（= data/design.json）の変数だけを使う */
:root {
  --content-max: 640px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* ダブルタップでの拡大と、長押しのメニュー（iPhone）を止める */
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

/* Android の Chrome で、下に引っぱると再読み込みしてしまうのを止める */
html, body { overscroll-behavior-y: none; }

p, h1, h2, ol { margin: 0; }
ol { padding: 0; list-style: none; }
button { font-family: inherit; color: inherit; }
rt { font-size: .5em; font-weight: var(--fw-regular); }
[hidden] { display: none !important; }

/* 背景の星 */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star { position: absolute; border-radius: 50%; }

.app {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding:
    calc(var(--pad-top) + env(safe-area-inset-top))
    calc(var(--pad-side) + env(safe-area-inset-right))
    calc(var(--pad-bottom) + env(safe-area-inset-bottom))
    calc(var(--pad-side) + env(safe-area-inset-left));
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
}

.screen-title {
  font-size: var(--fs-screen-title);
  font-weight: var(--fw-bold);
  line-height: var(--lh-title);
}

/* ボタン */
.btn {
  min-width: var(--min-touch);
  min-height: var(--min-touch);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-tight);
  background: var(--surface);
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-choice);
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  cursor: pointer;
}
.btn:disabled { cursor: default; }
.btn:active:not(:disabled) { background: var(--surface-active); }

.btn-primary {
  width: 100%;
  min-height: var(--primary-button-height);
  background: var(--cta-bg);
  color: var(--cta-text);
  border: none;
  border-radius: var(--radius-button-primary);
  font-size: var(--fs-primary-button);
}
.btn-primary:active:not(:disabled) { background: var(--text-sub); }

.btn-secondary {
  width: 100%;
  min-height: var(--secondary-button-height);
  background: transparent;
  border-color: var(--border-active);
  border-radius: var(--radius-button-secondary);
}

.icon-btn {
  width: var(--icon-button-size);
  height: var(--icon-button-size);
  padding: 0;
  flex: none;
  border-radius: var(--radius-icon-button);
}
.icon { width: 24px; height: 24px; flex: none; }

.top-bar {
  display: flex;
  align-items: center;
  gap: var(--gap-grid);
}

/* ホーム */
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--gap-grid); }
.month { font-size: var(--fs-sub); color: var(--text-sub); }
.stage { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stage-icon { width: min(176px, 40vw); height: min(176px, 40vw); }
.stage-icon .icon { width: 100%; height: 100%; stroke-width: 1.2; }
.stage-name { font-size: var(--fs-journey-name); font-weight: var(--fw-bold); line-height: var(--lh-title); margin-top: var(--gap-tight); }
.stage-kana { font-size: var(--fs-body); color: var(--text-sub); }
.next-stage { font-size: var(--fs-sub); color: var(--text-sub); margin-top: var(--gap-tight); }

.journey-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 32px;
  padding: 0 4px;
}
.journey-track::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  border-top: var(--bw-emphasis) solid var(--border);
}
.dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: var(--bw-emphasis) solid var(--border);
}
.dot.reached { background: var(--border-active); border-color: var(--border-active); }
.dot.current { width: 24px; height: 24px; background: var(--text); border: 5px solid var(--accent); }

.points { display: flex; flex-direction: column; gap: var(--gap-tight); }
.points-value { font-size: var(--fs-points-big); font-weight: var(--fw-bold); line-height: var(--lh-title); }
.points-unit { font-size: var(--fs-body); margin-left: 4px; }
.gauge {
  height: var(--gauge-bar-height);
  background: var(--surface);
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-gauge);
  overflow: hidden;
  display: flex;
}
.gauge-fill { height: 100%; background: var(--border-active); }
.gauge-gain { height: 100%; background: var(--accent); }
.home-note { font-size: var(--fs-sub); color: var(--text-sub); text-align: center; }
.home-play { margin-top: auto; }

/* ジャンルえらび */
.remaining { font-size: var(--fs-body); color: var(--text-sub); }
.remaining-n { font-size: 26px; color: var(--text); font-weight: var(--fw-bold); }
.genre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-grid);
}
.tile {
  min-height: var(--genre-tile-height);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-tight);
  background: var(--surface-active);
  border: var(--bw-emphasis) solid var(--border-active);
  border-radius: var(--radius-tile);
  font-size: var(--fs-genre-label);
  font-weight: var(--fw-bold);
  cursor: pointer;
}
.tile:active { background: var(--border); }
.tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile-icon .icon { width: 28px; height: 28px; }
.tile-label { white-space: nowrap; }
.tile-random { background: var(--cta-bg); color: var(--cta-text); border-color: var(--cta-bg); }
.tile-random:active { background: var(--text-sub); }
.tile-random .tile-icon { background: var(--bg); color: var(--text); }
.tile-random:only-child { grid-column: 1 / -1; }
.genre-foot { font-size: var(--fs-sub); color: var(--text-sub); text-align: center; }

/* クイズ */
.progress { flex: 1; display: flex; gap: 6px; }
.progress li {
  flex: 1;
  height: var(--progress-segments-height);
  border-radius: var(--progress-segments-height);
  background: var(--border);
}
.progress li.done { background: var(--border-active); }
.progress li.current { background: var(--text); }
.progress-count { font-size: var(--fs-sub); color: var(--text-sub); white-space: nowrap; }

.q-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-section);
  padding: 16px;
  background: var(--surface);
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-card);
}
.q-genre {
  align-self: flex-start;
  padding: 2px 12px;
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  color: var(--text-sub);
}
.prompt {
  font-size: var(--fs-question);
  font-weight: var(--fw-bold);
  line-height: 1.8;
  text-align: center;
}

.media { display: flex; justify-content: center; align-items: center; flex: none; }
.media svg { display: block; }
.media-flag svg { height: 100%; width: auto; border-radius: 6px; }
.media-emoji { line-height: 1; font-family: 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI Emoji', sans-serif; }
.media-image img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 6px; -webkit-user-drag: none; }
.media-icon { color: var(--text); }
.media-icon .icon { width: auto; height: 100%; aspect-ratio: 1; stroke-width: 1.3; }

/* 問題カードの図 */
.media-large { height: min(var(--question-media-height), 26dvh); max-width: 100%; }
.media-large.media-emoji { font-size: min(calc(var(--question-media-height) * .8), 21dvh, calc(min(60vw, 400px) / var(--emoji-count, 1))); height: auto; white-space: nowrap; }
.media-large.media-colors { height: auto; }

/* 選択肢・ならびかえカードの中の図 */
.media-small { height: var(--choice-media-size); }
.media-small.media-emoji { font-size: calc(var(--choice-media-size) * .85 / var(--emoji-count, 1)); height: auto; white-space: nowrap; }
.media-small.media-icon .icon { stroke-width: 1.8; }

.media-colors { gap: 10px; font-size: 28px; font-weight: var(--fw-bold); }
.color-dot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--bw-emphasis) solid var(--text);
}
.color-dot.is-unknown { background: transparent; border-style: dashed; border-color: var(--border-active); color: var(--text-sub); }

/* 選択肢 */
.choices { display: grid; grid-template-columns: 1fr; gap: var(--gap-grid); }
.choice {
  position: relative;
  min-height: var(--choice-button-height);
  padding: 8px 48px;
  font-size: var(--fs-choice);
  line-height: 1.6;
}
.choice .mark { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: flex; }
.choice .mark .icon { width: 28px; height: 28px; stroke-width: 2.5; }
.choice.is-correct { border: var(--bw-emphasis) solid var(--correct); }
.choice.is-correct .mark { color: var(--correct); }
.choice.is-tried { border: var(--bw-emphasis) solid var(--try-again); }
.choice.is-tried .mark { color: var(--try-again); }
.choices.compare { grid-template-columns: 1fr 1fr; }
.choices.compare .choice { min-height: 120px; padding: 8px 12px 8px; font-size: 26px; }
.choices.compare .choice .mark { top: 14px; transform: none; }
.choice.has-media { flex-direction: column; gap: 4px; padding-top: 10px; padding-bottom: 10px; }

/* 答えたあとのカード */
.feedback {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap-tight);
  padding: var(--feedback-card-padding);
  background: var(--surface);
  border: var(--bw-emphasis) solid var(--border);
  border-radius: var(--radius-feedback-card);
  animation: feedback-in .25s ease-out;
}
/* 正解のカードは画面の下に止めて、「つぎへ」がいつも見えるようにする */
.feedback.is-correct { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); border-color: var(--correct); }
.feedback.is-try { border-color: var(--try-again); }
.fb-head { display: flex; align-items: center; gap: var(--gap-tight); font-size: 22px; font-weight: var(--fw-bold); }
.fb-head .icon { width: 28px; height: 28px; stroke-width: 2.5; }
.is-correct .fb-head { color: var(--correct); }
.is-try .fb-head { color: var(--try-again); }
.fb-text { font-size: var(--fs-body); line-height: 1.9; }
.feedback .btn-primary { margin-top: var(--gap-tight); }
@keyframes feedback-in {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .feedback { animation: none; }
}
/* 横にしたスマホなど、高さが低い画面では下に止めない（問題と選んだ答えが隠れるため）。出たところまでスクロールする */
@media (max-height: 500px) {
  .feedback.is-correct { position: static; }
}

/* ならびかえ */
.order { display: flex; flex-direction: column; gap: var(--gap-section); }
.order-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--gap-grid); }
.order-slot {
  position: relative;
  min-height: 76px;
  display: flex;
  border: var(--bw-emphasis) dashed var(--border);
  border-radius: var(--radius-choice);
}
.order-slot.filled { border-style: solid; border-color: var(--border-active); }
.order-slot.is-over { border-style: solid; border-color: var(--text); background: var(--surface); }
.order-slot.is-correct { border-color: var(--correct); }
.order-slot > .mark { position: absolute; top: -12px; right: -8px; display: flex; color: var(--correct); background: var(--bg); border-radius: 50%; }
.order-slot > .mark .icon { stroke-width: 2.5; }
.slot-no {
  position: absolute;
  top: -12px;
  left: -8px;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  font-size: var(--fs-sub);
  font-weight: var(--fw-bold);
}
.order-slot.filled .slot-no { background: var(--border-active); }
.order-slot .order-card { flex: 1; margin: 6px; }
.order-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap-grid); min-height: var(--min-touch); }
.order-card {
  min-width: 120px;
  min-height: var(--min-touch);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-active);
  border: var(--bw-default) solid var(--border-active);
  border-radius: var(--radius-choice);
  font-size: var(--fs-choice);
  font-weight: var(--fw-bold);
  line-height: 1.5;
  touch-action: none;
  cursor: grab;
}
.order-card:disabled { cursor: default; }
.order-card.has-media { flex-direction: column; gap: 2px; }
.order-card.is-dragging { opacity: .35; }
.order-card.is-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  margin: 0;
  pointer-events: none;
  border-color: var(--text);
}

/* 数字入力 */
.number-input { display: flex; flex-direction: column; align-items: center; gap: var(--gap-section); }
.num-display {
  position: relative;
  min-width: 180px;
  min-height: 72px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: var(--bw-emphasis) solid var(--border-active);
  border-radius: var(--radius-tile);
  font-size: 40px;
  font-weight: var(--fw-bold);
}
.num-display.is-empty { color: var(--text-sub); }
.num-display.is-correct { border-color: var(--correct); }
.num-display .mark { position: absolute; right: 14px; display: flex; color: var(--correct); }
.num-display .mark .icon { width: 28px; height: 28px; stroke-width: 2.5; }
.keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(var(--min-touch), var(--keypad-key-w)));
  gap: var(--gap-grid);
}
.key {
  min-height: var(--keypad-key-h);
  padding: 0;
  border-radius: var(--radius-tile);
  font-size: 30px;
}
.key-clear { font-size: var(--fs-body); background: transparent; }
.key-submit { font-size: var(--fs-body); background: var(--cta-bg); color: var(--cta-text); border-color: var(--cta-bg); }
.key-submit:active:not(:disabled) { background: var(--text-sub); }
.key-submit:disabled { background: var(--surface); color: var(--text-sub); border-color: var(--border); }
.key:disabled:not(.key-submit) { opacity: .45; }

/* 地図タップ */
.map { position: relative; }
.map > svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58dvh;
  margin: 0 auto;
  background: var(--bg);
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-card);
}
.map-sea { fill: var(--bg); }
.map-land { fill: var(--surface); stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-country {
  fill: var(--surface-active);
  stroke: var(--border-active);
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}
.map-country.is-tried { fill: var(--surface); stroke: var(--try-again); stroke-dasharray: 4 3; }
.map-country.is-correct { fill: var(--correct); stroke: var(--text); }
.map-zoom { position: absolute; right: 10px; bottom: 10px; background: var(--surface); }

/* けっか */
.result-title { font-size: var(--fs-result-title); font-weight: var(--fw-bold); line-height: var(--lh-title); text-align: center; margin-top: var(--gap-section); }
.result-dots { display: flex; justify-content: center; gap: 10px; }
.rdot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--bw-emphasis) solid var(--border);
  color: var(--text-sub);
  font-size: var(--fs-sub);
}
.rdot.ok { border-color: var(--correct); color: var(--correct); }
.rdot.ok .icon { stroke-width: 2.5; }
.breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--gap-tight);
  padding: var(--feedback-card-padding);
  background: var(--surface);
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-card);
}
.breakdown-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--gap-grid); }
.breakdown-value { font-weight: var(--fw-bold); }
.breakdown-total { border-top: var(--bw-default) solid var(--border); padding-top: var(--gap-tight); }
.breakdown-total .breakdown-value { font-size: var(--fs-points-big); color: var(--accent); }
.result-actions { margin-top: auto; display: flex; flex-direction: column; gap: var(--gap-grid); }
.result-gauge { display: flex; flex-direction: column; gap: var(--gap-tight); }
.result-gauge-caption { font-size: var(--fs-sub); color: var(--text-sub); text-align: center; }
.result-note { font-size: var(--fs-sub); color: var(--text-sub); text-align: center; }

/* レベルアップ */
.levelup { position: relative; align-items: center; text-align: center; }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkle {
  position: absolute;
  background: var(--accent);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.levelup-title { font-size: var(--fs-result-title); font-weight: var(--fw-bold); color: var(--accent); margin-top: var(--gap-section); }
.levelup-icon {
  width: min(236px, 56vw);
  height: min(236px, 56vw);
  border-radius: 50%;
  border: 6px solid var(--accent);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.levelup-icon .icon { width: 58%; height: 58%; stroke-width: 1.3; }
.levelup-en { font-size: var(--fs-hero-name); font-weight: var(--fw-bold); line-height: var(--lh-title); }
.levelup-arrive { font-size: var(--fs-body); font-weight: var(--fw-bold); margin-top: 4px; }
.stamp-get {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--gap-grid);
  padding: var(--feedback-card-padding);
  background: var(--surface);
  border: var(--bw-emphasis) solid var(--accent);
  border-radius: var(--radius-card);
  text-align: left;
}
.stamp-get-icon { width: 56px; height: 56px; flex: none; border-radius: 50%; border: 1.5px solid var(--accent); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.stamp-get-icon .icon { width: 32px; height: 32px; }
.stamp-get-title { font-weight: var(--fw-bold); }
.stamp-get-sub { font-size: var(--fs-sub); color: var(--text-sub); }
.levelup .result-actions { width: 100%; }
.btn-reward { border-color: var(--accent); }

/* ずかん */
.zukan-month { font-size: var(--fs-body); color: var(--text-sub); }
.zukan-count { font-size: var(--fs-points-big); color: var(--accent); }
.stamp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-grid); }
.stamp-card {
  min-height: var(--stamp-card-height);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--radius-tile);
  text-align: center;
}
.stamp-card.got { background: var(--surface); border: 1.5px solid var(--accent); }
.stamp-card.locked { background: var(--bg); border: 1.5px dashed var(--border); }
.stamp-icon .icon { width: 48px; height: 48px; stroke-width: 1.6; }
.stamp-en { font-size: var(--fs-sub); font-weight: var(--fw-bold); line-height: var(--lh-title); margin-top: 4px; }
.stamp-kana { font-size: var(--fs-caption); color: var(--text-sub); }
.stamp-secret { font-size: 32px; font-weight: var(--fw-bold); color: var(--text-sub); line-height: 1.2; }
.zukan-note { font-size: var(--fs-sub); color: var(--text-sub); line-height: 1.9; }
.zukan-history { display: flex; flex-direction: column; gap: var(--gap-tight); }
.zukan-history-title { font-size: var(--fs-body); font-weight: var(--fw-bold); }
.history-row {
  display: grid;
  grid-template-columns: 4em 1fr auto;
  gap: var(--gap-tight);
  padding: 10px 14px;
  background: var(--surface);
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-choice);
  font-size: var(--fs-sub);
}

/* 幅に余裕があれば、選択肢を2列にする */
@media (min-width: 600px) {
  .choices { grid-template-columns: 1fr 1fr; }
}

/* ホームの右上のボタン */
.head-buttons { display: flex; gap: var(--gap-tight); }
.icon-btn.has-badge { position: relative; }
.icon-btn.has-badge::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
  border: var(--bw-emphasis) solid var(--surface);
}

/* PIN 入力（おうちの ひとへ） */
.pin { align-items: center; text-align: center; }
.pin .top-bar { align-self: stretch; min-height: var(--min-touch); }
.pin-head { display: flex; flex-direction: column; align-items: center; gap: var(--gap-tight); }
.pin-lock .icon { width: 32px; height: 32px; color: var(--text-sub); }
.pin-prompt { font-size: var(--fs-body); color: var(--text-sub); max-width: 26em; }
.pin-problem { font-size: 24px; font-weight: var(--fw-bold); line-height: 1.6; }
.pin-dots { display: flex; gap: 18px; padding: 12px 0; }
.pin-dot {
  width: var(--pin-dots-size);
  height: var(--pin-dots-size);
  border-radius: 50%;
  border: var(--bw-emphasis) solid var(--border-active);
}
.pin-dot.filled { background: var(--text); border-color: var(--text); }
.pin-message { font-size: var(--fs-sub); color: var(--try-again); max-width: 26em; }
.btn-link { background: transparent; border: none; color: var(--text-sub); text-decoration: underline; font-weight: var(--fw-regular); }

/* おやこ設定 */
.parent .setting {
  display: flex;
  flex-direction: column;
  gap: var(--gap-tight);
  padding: 16px;
  background: var(--surface);
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-card);
}
.setting-row { flex-direction: row !important; align-items: center; justify-content: space-between; }
.setting-title { font-size: var(--fs-body); font-weight: var(--fw-bold); }
.setting-text { font-size: var(--fs-sub); color: var(--text-sub); }
.setting-buttons { display: flex; flex-direction: column; gap: var(--gap-tight); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--gap-tight); }
.segment {
  min-height: var(--segmented-option-height);
  padding: 4px;
  background: transparent;
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-choice);
  font-size: var(--fs-sub);
  font-weight: var(--fw-regular);
  cursor: pointer;
}
.segment.selected { background: var(--surface-active); border: var(--bw-emphasis) solid var(--border-active); font-weight: var(--fw-bold); }
.toggle {
  min-width: var(--min-touch);
  min-height: var(--min-touch);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
}
.toggle-track {
  position: relative;
  width: var(--toggle-w);
  height: var(--toggle-h);
  border-radius: var(--toggle-h);
  background: var(--bg);
  border: var(--bw-default) solid var(--border);
}
.toggle.on .toggle-track { background: var(--border-active); border-color: var(--border-active); }
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(var(--toggle-h) - 8px);
  height: calc(var(--toggle-h) - 8px);
  border-radius: 50%;
  background: var(--text);
  transition: transform .15s;
}
.toggle.on .toggle-knob { transform: translateX(calc(var(--toggle-w) - var(--toggle-h))); }
.parent-message, .parent-notice {
  padding: 12px 16px;
  border-radius: var(--radius-choice);
  font-size: var(--fs-sub);
  border: var(--bw-default) solid var(--border-active);
  background: var(--surface-active);
}
.paste summary { min-height: var(--min-touch); display: flex; align-items: center; color: var(--text-sub); cursor: pointer; }
.paste[open] { display: flex; flex-direction: column; gap: var(--gap-tight); }
.paste-area {
  width: 100%;
  padding: 10px;
  background: var(--bg);
  color: var(--text);
  border: var(--bw-default) solid var(--border);
  border-radius: var(--radius-choice);
  font: inherit;
  font-size: 16px;
  -webkit-user-select: text;
  user-select: text;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }

/* 幅320pxでも、4つ並びの設定ボタンを60px以上にする */
@media (max-width: 360px) {
  .parent .setting { padding: 12px; }
  .segmented { gap: 4px; }
}

/* 読み上げボタン */
.prompt-row { display: flex; align-items: center; justify-content: center; gap: var(--gap-tight); width: 100%; }
.prompt-row .prompt { flex: 1; }
.speak-btn { color: var(--text); }

/* ヒント */
.choice.is-removed { opacity: .35; border-style: dashed; }
.order-card.is-hint { border: var(--bw-emphasis) solid var(--text); animation: hint-pulse 1.2s ease-in-out infinite; }
.map-country.is-hint { fill: var(--border-active); stroke: var(--text); animation: hint-blink 1.2s ease-in-out infinite; }
@keyframes hint-pulse {
  50% { transform: scale(1.06); }
}
@keyframes hint-blink {
  50% { fill: var(--surface-active); }
}
@media (prefers-reduced-motion: reduce) {
  .order-card.is-hint, .map-country.is-hint { animation: none; }
}
