:root {
  color-scheme: light;
  --paper: #f8f5ec;
  --ink: #202d26;
  --green: #253e32;
  --line: #cec6b3;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  background: var(--paper);
  color: var(--ink);
  scroll-padding-top: 5rem;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.75; }
main > section { position: relative; isolation: isolate; }
.wood-decorations { position: absolute; top: 0; bottom: 0; left: calc(50% - var(--wood-page-width) / 2); width: var(--wood-page-width); overflow: hidden; z-index: -1; pointer-events: none; user-select: none; }
.wood-piece { position: absolute; top: var(--wood-top); width: clamp(60px, 8vw, 112px); height: auto; opacity: .2; transform: translateY(-50%) rotate(var(--wood-angle)); }
.wood-piece[data-side="left"] { left: var(--wood-edge); }
.wood-piece[data-side="right"] { right: var(--wood-edge); }
@media (max-width: 740px) {
  .wood-piece { width: 64px; opacity: .16; }
}
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible { outline: 2px solid #a05736; outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.site-header-inner, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.2rem;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header-inner { gap: 1rem; padding-block: .5rem; }
.brand { font-weight: 800; text-decoration: none; }
.site-header .brand { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.site-header .brand img { display: block; flex-shrink: 0; }
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3rem, 8vw, 7rem);
}
.course { color: #855135; font-weight: 800; letter-spacing: .15em; margin-bottom: 1rem; }
h1, h2 { font-family: var(--serif); line-height: 1.35; letter-spacing: .025em; }
.hero > div:not(.wood-decorations) { container-type: inline-size; }
h1 { font-size: clamp(2rem, 11.5cqw, 4.75rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); text-wrap: balance; }
.intro { max-width: 26rem; margin-block: 1.25rem 1.8rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  padding: .85rem 1.15rem;
  background: var(--green);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: #375947; }
.site-header .button { min-height: 44px; padding: .45rem 1rem; white-space: nowrap; }
.animal-game {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: #eee7d8;
  box-shadow: 0 12px 30px #253e320d;
}
.game-heading, .game-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.game-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
#game-onboarding[hidden], #game-play[hidden], #game-welcome[hidden], #game-lesson[hidden] { display: none; }
#game-strategy[hidden], #strategy-actions[hidden], #lesson-next[hidden] { display: none; }
#game-strategy { padding-top: 1.2rem; }
#strategy-title { font-size: 1.4rem; margin-bottom: .75rem; }
.strategy-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.strategy-heading #strategy-title { margin-bottom: 0; }
.strategy-badge { display: inline-flex; align-items: center; gap: .35rem; flex-shrink: 0; padding: .25rem .6rem; border: 1px solid #50735a; border-radius: 999px; color: #36573c; background: #e7edde; font-size: .75rem; font-weight: 700; }
.strategy-badge > span { font-size: .6rem; }
.strategy-progress { display: flex; align-items: center; justify-content: center; margin: .5rem 0 1rem; }
.strategy-progress > button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: .4rem; background: transparent; }
.strategy-progress > button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #c6c1b3; }
.strategy-progress > .completed::before { background: #8fa390; }
.strategy-progress > .current::before { width: 22px; background: #36573c; }
#game-strategy p { font-size: .95rem; }
#strategy-actions { margin-top: 1rem; }
#strategy-replay { min-height: 44px; padding: .5rem 1rem; border: 1px solid #b8ac97; border-radius: .5rem; background: var(--paper); }
.strategy-scene {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 300px);
  margin: 1.4rem auto;
  padding: 4px;
  border-radius: .6rem;
  background: #b38a5a;
}
.strategy-cell { position: relative; aspect-ratio: 1; background: #f5dbae; border-radius: .3rem; }
.strategy-piece { position: absolute; inset: 4px; }
.strategy-mover { z-index: 2; }
.strategy-dot { position: absolute; width: 20%; aspect-ratio: 1; left: 40%; top: 40%; background: #4b7951; border-radius: 50%; }
.strategy-exit { box-shadow: inset 0 0 0 4px #4b7951; }
.strategy-cross { position: absolute; inset: 0; display: grid; place-items: center; color: #b76149; font: 900 2rem / 1 sans-serif; opacity: 0; }
.strategy-lines { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); pointer-events: none; }
.strategy-lines path { fill: none; stroke: #50735a; stroke-width: 4; stroke-linecap: round; opacity: 0; }
.strategy-scene:not([data-stage="0"]) .strategy-guard-lines { opacity: 1; }
.strategy-scene:not([data-stage="0"]) .strategy-guard { outline: 3px solid #253e32; outline-offset: 1px; }
.strategy-scene:not([data-stage="0"]) .strategy-covered { box-shadow: inset 0 0 0 4px #b76149; }
.strategy-scene:not([data-stage="0"]) .strategy-covered .strategy-dot,
.strategy-scene[data-stage="3"] .strategy-last-exit .strategy-dot { opacity: 0; }
.strategy-scene:not([data-stage="0"]) .strategy-covered .strategy-cross,
.strategy-scene[data-stage="3"] .strategy-last-exit .strategy-cross,
.strategy-scene[data-stage="3"] .strategy-final-line { opacity: 1; }
.strategy-scene[data-stage="2"] .strategy-mover { outline: 3px solid #253e32; outline-offset: 1px; box-shadow: 0 0 12px 4px #ffd34d; }
.strategy-scene[data-stage="3"] .strategy-mover { transform: translateX(calc(-100% - 12px)); transition: transform 1s ease-in-out; }
.strategy-scene[data-stage="3"] .strategy-last-exit { box-shadow: inset 0 0 0 4px #b76149; }
#strategy-caption { min-height: 6em; }
.animal-board { position: relative; }
.game-interaction { position: relative; }
.opening-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.opening-lines[hidden] { display: none; }
.opening-lines line { stroke: #50735a; stroke-width: 3; stroke-linecap: round; }
.game-status.opening-label { position: relative; z-index: 4; padding: .5rem; border: 1px solid #50735a; border-radius: .5rem; background: var(--paper); text-align: center; min-height: 0; }
#animal-board .animal-token { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .strategy-scene * { transition: none; }
}
.game-welcome { padding: 2rem 0; text-align: center; }
.game-welcome h3 { margin-bottom: 1.4rem; font-size: 1.4rem; }
.welcome-animals { display: flex; justify-content: center; gap: 1rem; margin: 1rem auto 2rem; }
.welcome-animals .animal-art { position: relative; inset: auto; width: 110px; height: 110px; }
.animal-game .button { border: 0; color: white; }
.lesson-count { margin: 1.2rem 0 .5rem; color: #855135; font-weight: 700; }
#lesson-title { font-size: 1.2rem; min-height: 3.5em; }
.lesson-note { font-size: .9rem; min-height: 1.75em; }
.lesson-actions { display: flex; justify-content: space-between; gap: 1rem; }
#lesson-back { min-height: 44px; padding: .5rem 1rem; border: 1px solid #b8ac97; border-radius: .5rem; background: var(--paper); }
.lesson-scene { position: relative; width: min(100%, 248px); height: 265px; margin: 1rem auto; overflow: hidden; }
.demo-cell, .demo-mover, .demo-target { position: absolute; width: 92px; height: 92px; left: calc(50% - 46px); }
.demo-cell { background: #f5dbae; border: 2px solid #b38a5a; border-radius: .5rem; }
.demo-top, .demo-target { top: 20px; }
.demo-bottom, .demo-mover { top: 120px; }
.demo-mover, .demo-target { padding: 10px; }
.demo-mover .animal-token, .demo-target .animal-token { border-width: 4px; }
.demo-finger {
  position: absolute;
  width: 145px;
  height: auto;
  max-width: none;
  left: calc(50% - 65px);
  top: 159px;
  opacity: 0;
  pointer-events: none;
  transform-origin: 44% 2%;
  animation: demo-tap 4.8s infinite;
}
.demo-dot { position: absolute; top: 57px; left: calc(50% - 9px); width: 18px; height: 18px; border-radius: 50%; background: #4b7951; }
.demo-win { position: absolute; top: 55px; left: 0; width: 100%; text-align: center; font-size: 1.8rem; font-weight: 900; color: #fff5b3; text-shadow: 0 2px 4px #253e32; animation: demo-celebrate 4.8s infinite; }
.lesson-scene[data-step="1"] .demo-top, .lesson-scene[data-step="1"] .demo-dot { display: none; }
.lesson-scene[data-step="1"] .demo-bottom,
.lesson-scene[data-step="1"] .demo-mover { left: 14px; top: 80px; }
.lesson-scene[data-step="1"] .demo-bottom { animation: demo-select-cell 7s forwards; }
.demo-red-cell { left: auto; right: 14px; top: 80px; }
.demo-wrong { position: absolute; width: 92px; height: 92px; right: 14px; top: 80px; padding: 10px; }
.demo-wrong .animal-token { border-width: 4px; }
.demo-correct-circle {
  position: absolute;
  display: grid;
  place-items: center;
  left: 14px;
  top: 80px;
  width: 92px;
  height: 92px;
  color: #347344;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 4px white, 0 0 4px white;
  opacity: 0;
  animation: demo-correct-tap 7s forwards;
}
.demo-wrong-cross {
  position: absolute;
  display: grid;
  place-items: center;
  right: 14px;
  top: 80px;
  width: 92px;
  height: 92px;
  color: #bd3526;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 4px white, 0 0 4px white;
  opacity: 0;
  animation: demo-wrong-tap 7s forwards;
}
.lesson-scene[data-step="1"] .demo-mover { animation: demo-identify-select 7s forwards; border-radius: .5rem; }
.lesson-scene[data-step="1"] .demo-finger {
  left: -5px;
  top: 119px;
  animation: demo-identify-tap 7s forwards;
}
.lesson-scene:not([data-step="1"]) .demo-mover { animation: demo-move 4.8s infinite; }
.lesson-scene:not([data-step="1"]) .demo-finger { animation-name: demo-tap-move; }
.lesson-scene:not([data-step="1"]) .demo-dot { animation: demo-destination 4.8s infinite; }
.lesson-scene[data-step="2"] { width: min(100%, 284px); height: auto; aspect-ratio: 1; }
.lesson-scene[data-step="2"] .demo-cell,
.lesson-scene[data-step="2"] .demo-mover {
  width: calc((100% - 8px) / 3);
  height: calc((100% - 8px) / 3);
  left: calc((100% + 4px) / 3);
}
.lesson-scene[data-step="2"] .demo-top { top: 0; }
.lesson-scene[data-step="2"] .demo-bottom,
.lesson-scene[data-step="2"] .demo-mover,
.lesson-scene[data-step="2"] .demo-left,
.lesson-scene[data-step="2"] .demo-right { top: calc((100% + 4px) / 3); }
.lesson-scene[data-step="2"] .demo-left { left: 0; }
.lesson-scene[data-step="2"] .demo-right { left: calc((100% + 4px) * 2 / 3); }
.lesson-scene[data-step="2"] .demo-lower { top: calc((100% + 4px) * 2 / 3); }
.lesson-scene[data-step="2"] .demo-mover { animation-name: demo-fourway-move; }
.lesson-scene[data-step="2"] .demo-finger { top: calc((100% - 8px) / 6 - 7px); animation-name: demo-tap; }
.lesson-scene[data-step="2"] .demo-dot { top: calc(50% - 9px); }
.lesson-scene[data-step="2"] .demo-dot { animation-name: demo-direction-ready; }
.lesson-scene[data-step="2"] .demo-top,
.lesson-scene[data-step="2"] .demo-left,
.lesson-scene[data-step="2"] .demo-right,
.lesson-scene[data-step="2"] .demo-lower { border: 0; box-shadow: inset 0 0 0 4px #4b7951; }
.lesson-scene[data-step="2"] .demo-bottom { outline: 3px solid #253e32; outline-offset: -2px; }
.demo-target { animation: demo-captured 4.8s infinite; }
.lesson-scene[data-step="3"] .demo-bottom { animation: demo-capture-select 4.8s forwards; }
.lesson-scene[data-step="3"] .demo-top { animation: demo-capture-destination 4.8s forwards; }
#lesson-scene * { animation-iteration-count: 1; }
@keyframes demo-capture-select {
  0%, 29.9% { outline: 3px solid transparent; outline-offset: -2px; }
  30%, 100% { outline: 3px solid #253e32; outline-offset: -2px; }
}
@keyframes demo-capture-destination {
  0%, 29.9% { box-shadow: none; }
  30%, 100% { box-shadow: inset 0 0 0 4px #4b7951; }
}
@keyframes demo-tap {
  0%, 12% { opacity: 0; transform: translateY(35px); }
  25%, 35% { opacity: .55; transform: translateY(0) scale(1); }
  40% { opacity: .55; transform: translateY(3px) scale(.92); }
  50% { opacity: .55; transform: translateY(0) scale(1); }
  65%, 100% { opacity: 0; transform: translateY(25px); }
}
@keyframes demo-identify-select {
  0%, 26% { box-shadow: none; }
  30%, 100% { box-shadow: 0 0 10px 4px #ffd34d; }
}
@keyframes demo-select-cell {
  0%, 27% { outline: 3px solid transparent; outline-offset: -2px; }
  30%, 100% { outline: 3px solid #253e32; outline-offset: -2px; }
}
@keyframes demo-identify-tap {
  0%, 8% { opacity: 0; transform: translate(0, 24px); }
  18%, 24% { opacity: .55; transform: translate(0, 0); }
  28% { opacity: .55; transform: translate(0, 3px) scale(.92); }
  34% { opacity: .55; transform: translate(0, 0); }
  43% { opacity: 0; transform: translate(0, 0); }
  48% { opacity: 0; transform: translate(128px, 24px); }
  58%, 67% { opacity: .55; transform: translate(128px, 0); }
  70% { opacity: .55; transform: translate(128px, 3px) scale(.92); }
  76% { opacity: .55; transform: translate(128px, 0); }
  90%, 100% { opacity: 0; transform: translate(128px, 24px); }
}
@keyframes demo-wrong-tap {
  0%, 69% { opacity: 0; transform: scale(.75); }
  75%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes demo-correct-tap {
  0%, 27% { opacity: 0; transform: scale(.75); }
  33%, 100% { opacity: 1; transform: scale(1); }
}
@keyframes demo-tap-move {
  0%, 5% { opacity: 0; transform: translateY(25px); }
  15%, 25% { opacity: .55; transform: translateY(0); }
  30% { opacity: .55; transform: translateY(3px) scale(.92); }
  48% { opacity: .55; transform: translateY(-100px); }
  53% { opacity: .55; transform: translateY(-97px) scale(.92); }
  65%, 100% { opacity: 0; transform: translateY(-100px); }
}
@keyframes demo-move {
  0%, 55% { transform: translateY(0); }
  70%, 92% { transform: translateY(-100px); }
  100% { transform: translateY(0); }
}
@keyframes demo-fourway-move {
  0%, 55% { transform: translateY(0); }
  70%, 92% { transform: translateY(calc(-100% - 4px)); }
  100% { transform: translateY(0); }
}
@keyframes demo-captured {
  0%, 65% { opacity: 1; }
  70%, 96% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes demo-destination {
  0%, 30%, 100% { opacity: 0; }
  35%, 55% { opacity: 1; }
  70%, 96% { opacity: 0; }
}
@keyframes demo-direction-ready {
  0%, 55% { opacity: 1; }
  70%, 100% { opacity: 0; }
}
@keyframes demo-celebrate {
  0%, 69%, 100% { opacity: 0; transform: scale(.8); }
  75%, 92% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .lesson-scene *, .lesson-scene::before { animation: none !important; }
  .demo-finger { opacity: .55; }
  .demo-win { top: 0; }
  .demo-correct-circle, .demo-wrong-cross { opacity: 1; }
  .lesson-scene[data-step="1"] .demo-bottom { outline: 3px solid #253e32; outline-offset: -2px; }
  .lesson-scene[data-step="3"] .demo-bottom { outline: 3px solid #253e32; outline-offset: -2px; }
  .lesson-scene[data-step="3"] .demo-top { box-shadow: inset 0 0 0 4px #4b7951; }
}
.animal-game button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
.animal-game button:focus-visible { outline: 3px solid #855135; outline-offset: 3px; }
.game-heading button, .game-tabs button, .game-actions button {
  min-height: 44px;
  border: 1px solid #b8ac97;
  border-radius: .65rem;
  background: var(--paper);
  padding: .4rem .7rem;
  font-size: .85rem;
}
.game-tabs { display: flex; gap: .5rem; margin-block: .8rem; }
.game-tabs button { flex: 1; }
.game-tabs button[aria-pressed="true"] { background: var(--green); color: white; border-color: var(--green); }
.game-status { min-height: 3.5em; font-size: .9rem; font-weight: 700; }
.game-status:empty { display: none; }
.game-board-wrap { position: relative; isolation: isolate; }
.game-effect {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 5px #253e32;
  background: #253e324d;
  border-radius: .7rem;
  animation: game-result .45s ease-out;
}
.game-effect[hidden] { display: none; }
.game-effect[data-result="won"] { color: #fff5b3; background: #253e3266; }
.game-effect rt { font-size: .42em; }
.game-effect small { display: block; margin-bottom: .5rem; font-size: .8rem; line-height: 1.6; }
.game-effect > span { text-align: center; }
#game-effect-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
}
#game-effect-actions button {
  pointer-events: auto;
  min-height: 44px;
  padding: .5rem 1.2rem;
  border: 2px solid #fff5b3;
  border-radius: .6rem;
  background: var(--green);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: none;
}
#game-effect-actions[hidden] { display: none; }
@keyframes game-result {
  from { opacity: 0; transform: scale(.8); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .game-effect { animation: none; }
}
.animal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  width: min(100%, 330px);
  padding: 5px;
  margin: .5rem auto 1rem;
  border: 2px solid #9b7147;
  border-radius: .7rem;
  background: #b38a5a;
}
.animal-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.12;
  border: 0;
  border-radius: .3rem;
  padding: 4px;
  background: #f5dbae;
  min-width: 0;
}
.animal-cell:nth-child(even) { background: #efd09d; }
.animal-token {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid #50735a;
  border-radius: .55rem;
  background: #fdf9ed;
}
.animal-token.opponent { border-color: #b76149; background: #ffe7db; transform: rotate(180deg); }
#animal-board .animal-token { border-width: 4px; }
.animal-art {
  position: absolute;
  inset: 15%;
  background-image: url("/shogi/assets/animals.png");
  background-size: 200% 200%;
  background-repeat: no-repeat;
}
.art-bear { background-position: left top; }
.art-giraffe { background-position: right top; }
.art-elephant { background-position: left bottom; }
.art-chick { background-position: right bottom; }
.art-hen { background-position: right bottom; }
.art-hen::after { content: "にわとり"; position: absolute; inset: auto 0 0; text-align: center; font-size: .6rem; background: #fff9; }
.move-arrow { position: absolute; color: #36573c; font: 900 clamp(12px, 1.3vw, 16px) / 1 sans-serif; transform: translate(-50%, -50%); }
.opponent .move-arrow { color: #9d4937; }
.arrow-x0-y0 { left: 10%; top: 10%; }
.arrow-x1-y0 { left: 50%; top: 9%; }
.arrow-x2-y0 { left: 90%; top: 10%; }
.arrow-x0-y1 { left: 9%; top: 50%; }
.arrow-x2-y1 { left: 91%; top: 50%; }
.arrow-x0-y2 { left: 10%; top: 90%; }
.arrow-x1-y2 { left: 50%; top: 91%; }
.arrow-x2-y2 { left: 90%; top: 90%; }
.animal-cell.chosen { outline: 3px solid #253e32; outline-offset: -2px; }
.animal-cell.destination { box-shadow: inset 0 0 0 4px #4b7951; }
.animal-cell.destination:empty::before { content: ""; width: 20%; aspect-ratio: 1; background: #4b7951; border-radius: 50%; }
.animal-cell.first-tap {
  z-index: 1;
  outline: 3px solid #fff9c4;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 4px #ffd34d, 0 0 8px 3px #fff4a8, 0 0 20px 6px #ffd34dcc;
  animation: first-tap-glow 1.8s ease-in-out infinite;
}
@keyframes first-tap-glow {
  0%, 100% { box-shadow: inset 0 0 0 4px #ffd34d, 0 0 8px 3px #fff4a8, 0 0 20px 6px #ffd34dcc; }
  50% { box-shadow: inset 0 0 0 4px #ffe990, 0 0 12px 5px #fffbd5, 0 0 28px 9px #ffd34de6; }
}
@media (prefers-reduced-motion: reduce) {
  .animal-cell.first-tap { animation: none; }
}
.animal-cell.first-tap::after,
.animal-cell.destination.tap-destination::after {
  content: "タップ！";
  position: absolute;
  z-index: 3;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  aspect-ratio: auto;
  padding: 0 .3rem;
  border-radius: .3rem;
  font-size: .65rem;
  font-weight: bold;
  color: white;
  background: #855135;
}
.animal-game button:disabled { cursor: default; }
.game-actions { flex-wrap: wrap; justify-content: flex-start; }
#game-confirm {
  max-width: calc(100% - 2rem);
  padding: 1.5rem;
  border: 2px solid var(--green);
  border-radius: 1rem;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}
#game-confirm::backdrop { background: #253e3280; }
#game-confirm-title { font-size: 1.3rem; font-weight: 700; }
.game-confirm-actions { display: flex; gap: .75rem; margin-top: 1rem; }
.game-confirm-actions button {
  min-width: 6rem;
  min-height: 44px;
  padding: .5rem 1rem;
  border: 1px solid var(--green);
  border-radius: .5rem;
  background: var(--paper);
  font-weight: 700;
}
#game-confirm-yes { background: var(--green); color: white; }
.game-actions [hidden] { display: none; }
.game-help { margin-top: 1rem; font-size: .8rem; }
.game-help summary { cursor: pointer; min-height: 32px; }
.game-help p { margin-block: .7rem; }
.animal-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.animal-guide > div { text-align: center; }
.animal-guide .animal-token { height: auto; aspect-ratio: 1; }
.animal-guide .move-arrow { font-size: 12px; }
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-block: clamp(3rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}
.split ol, .lines { list-style: none; padding: 0; margin: 0; }
.split ol { counter-reset: step; }
.split li, .comparison div, .faq details { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.split li:first-child, .comparison div:first-child { padding-top: 0; }
.split ol li { display: flex; gap: 1.2rem; counter-increment: step; }
.split ol li::before { content: "0" counter(step); color: #855135; font: 700 1.15rem / 1.65 var(--serif); }
.split h3 + p, .skills h3 + p { margin-top: .35rem; }
.split p + p, .split h2 + p { margin-top: .85rem; }
.lines li { display: flex; gap: .85rem; align-items: baseline; }
.lines li::before { content: ""; width: .5rem; height: .5rem; flex: 0 0 .5rem; background: #855135; transform: rotate(45deg); }
.band { background: #eae4d6; }
.band-inner, .final { padding-block: clamp(3rem, 7vw, 6rem); }
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.8rem; }
.skills div { border-top: 1px solid #a69a83; padding-top: 1rem; }
.example { border-inline-start: 4px solid #855135; background: #eae4d6; padding: 1.5rem; }
.lesson-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem 1rem; }
.materials-link { font-size: .8rem; color: #855135; }
.video-materials { border-top: 1px solid var(--line); padding-block: clamp(3rem, 7vw, 6rem); }
.video-materials > h2 { font-size: clamp(1.7rem, 4vw, 3rem); margin-bottom: 2rem; }
.video-materials-layout { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.supervisor-photo { margin: 0; }
.supervisor-photo img { display: block; width: 100%; height: auto; border-radius: .75rem; }
.supervisor-photo figcaption { margin-top: .65rem; font-size: .85rem; }
.supervisor-photo strong { display: block; font-size: 1.05rem; }
.video-materials-copy h3 { font-size: 1.3rem; line-height: 1.6; }
.video-materials-copy h3:first-child { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); }
.video-materials-copy p { margin-top: .7rem; }
.video-materials-copy p + h3 { margin-top: 1.6rem; }
.video-learning-flow { display: flex; align-items: stretch; gap: 1.2rem; list-style: none; padding: 0; margin: 1.5rem 0; }
.video-learning-flow li { position: relative; flex: 1; display: grid; place-items: center; padding: .8rem .25rem; border: 1px solid #a69a83; border-radius: .4rem; background: #eae4d6; text-align: center; font-weight: 700; }
.video-learning-flow li + li::before { content: "→"; position: absolute; right: calc(100% + .15rem); width: .9rem; color: #855135; }
@media (max-width: 740px) {
  .video-materials-layout { grid-template-columns: 1fr; }
  .supervisor-photo { width: min(100%, 280px); margin-inline: auto; }
  .video-learning-flow { font-size: .85rem; }
}
.comparison { margin: 0; }
.comparison div { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; }
.comparison dt, .faq summary { font-weight: 700; }
.comparison dd { margin: 0; }
.faq summary { cursor: pointer; padding-block: .2rem; }
.faq details p { margin-top: .5rem; }
.faq-resource-links { display: grid; gap: .6rem; margin-top: 1rem; }
.faq-resource-links a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 44px; padding: .65rem 1rem; border: 1px solid var(--green); border-radius: .4rem; background: var(--paper); color: var(--green); font-size: .9rem; font-weight: 700; text-decoration: none; }
.faq-resource-links a:hover { background: #e7edde; }
.final { text-align: center; }
.final p { margin-block: 1rem 1.5rem; }
.details { background: var(--green); color: var(--paper); padding-block: clamp(3rem, 7vw, 6rem); }
.details-inner { max-width: 720px; }
.details dl { margin: 1.5rem 0 0; }
.details dl div { display: grid; grid-template-columns: 4.5rem 1fr; gap: .75rem; padding-block: .85rem; border-bottom: 1px solid #839085; }
.details dt { font-weight: 700; }
.details dd { margin: 0; }
@media (max-width: 740px) {
  .hero, .split, .skills { grid-template-columns: 1fr; }
  .animal-game { max-width: 32rem; width: 100%; margin-inline: auto; }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 2rem); }
}
