/* ==========================================================
   日本退稅新制大冒險（Neo-Brutalism）
   ========================================================== */

:root {
  --bg: #eeeeea;
  --grid: #dadad4;
  --ink: #141414;
  --paper: #ffffff;
  --yellow: #ffd23f;
  --green: #27d07a;
  --red: #ff4b4b;
  --done: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10.5' fill='%2327D07A' stroke='%23141414' stroke-width='2.6'/%3E%3Cpath d='M7 12.5l3.4 3.4L17 8.8' fill='none' stroke='%23141414' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --blue: #5674ff;
  --pink: #ff40b3;
  --bw: 3px;
  --sh: 6px;
  --r: 10px;
  --f-cjk:
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui,
    sans-serif;
  --f-num: "Archivo Black", "Noto Sans TC", Impact, sans-serif;
  --f-mono: "Space Mono", "Noto Sans TC", ui-monospace, monospace;
  --gut: 16px;
  --gut-r: 22px;
  --pl: 16px;
  --pr: 16px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
  margin: 0;
  font-family: var(--f-cjk);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M23.5 0V24M0 23.5H24' stroke='%23DADAD4' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-size: 24px 24px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
button {
  font: inherit;
  color: inherit;
}
svg {
  max-width: 100%;
}

b,
strong {
  font-weight: 900;
}
mark {
  background: var(--yellow);
  color: var(--ink);
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.num {
  font-family: var(--f-num);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  z-index: 200;
  left: 12px;
  top: 12px;
  padding: 12px 18px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
  transform: translateY(-200%);
}
.skip:focus-visible {
  transform: none;
}

:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

/* hero pieces wait for the intro timeline */
html.js:not(.ready) :is(.hs, .hero-pawn, .h1-l, .hero-text > *) {
  opacity: 0;
}

/* buttons that only work once the game script is running */
[hidden] {
  display: none !important;
}
html:not(.has-gsap) .play-only {
  display: none;
}
html:not(.has-gsap) .era-in {
  transform: rotateY(180deg);
}
html:not(.has-gsap) .flip-face.flip-back {
  grid-area: 2 / 1;
  margin-top: 8px;
  transform: none;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
}
html:not(.has-gsap) .flip-btn {
  cursor: default;
}
html:not(.has-gsap) .flip-q {
  display: none;
}
html:not(.has-gsap) .air-out {
  display: block;
}
html:not(.has-gsap) .air-r {
  grid-area: auto;
  margin-bottom: 14px;
  opacity: 1;
  visibility: visible;
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  min-width: 52px;
  padding: 0 26px;
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}
/* cannot be pressed, so it stops looking like a button */
.btn[disabled] {
  cursor: not-allowed;
  color: rgba(20, 20, 20, 0.72);
  background: var(--bg);
  border-style: dashed;
  box-shadow: none;
}
.btn[disabled]:active {
  transform: none;
  box-shadow: none;
}
.btn-xl {
  min-height: 68px;
  padding: 0 44px;
  font-size: 26px;
}
.btn-s {
  min-height: 46px;
  padding: 0 18px;
  font-size: 16px;
}
@media (hover: hover) {
  .btn:hover:not(:active):not([disabled]) {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--ink);
  }
}

/* ---------- Progress board (mobile: top bar) ---------- */
.board {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 10px 3px;
  background: var(--bg);
  border-bottom: var(--bw) solid var(--ink);
  visibility: hidden;
  transform: translateY(-112%);
  transition:
    transform 0.45s cubic-bezier(0.2, 1, 0.3, 1),
    visibility 0s 0.45s;
}
.board.is-on {
  visibility: visible;
  transform: none;
  transition:
    transform 0.45s cubic-bezier(0.2, 1.2, 0.3, 1),
    visibility 0s;
}
.pb-list {
  position: relative;
  display: flex;
}
.pb-list::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: var(--ink);
}
.pb-list li {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.pb-sq {
  appearance: none;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0 -4px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pb-cell {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font: 700 11px/1 var(--f-mono);
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 6px;
}
.pb-sq[data-tone="yellow"] .pb-cell {
  background: var(--yellow);
}
.pb-sq[data-tone="green"] .pb-cell {
  background: var(--green);
}
.pb-sq[data-tone="red"] .pb-cell {
  background: var(--red);
}
.pb-sq[data-tone="blue"] .pb-cell {
  background: var(--blue);
}
.pb-sq[data-tone="pink"] .pb-cell {
  background: var(--pink);
}

.pb-sq[data-done] .pb-cell::after {
  content: "";
  position: absolute;
  right: -7px;
  top: -8px;
  width: 16px;
  height: 16px;
  background: var(--done) center / contain no-repeat;
}
@media (hover: hover) {
  .pb-sq:hover .pb-cell {
    transform: translate(-1px, -2px);
    box-shadow: 2px 3px 0 var(--ink);
  }
}
.pb-say {
  position: absolute;
  z-index: 4;
  left: 10px;
  top: calc(100% + 10px);
  padding: 6px 12px 5px;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.3;
  white-space: nowrap;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
  transform-origin: 16px 0;
  pointer-events: none;
}
.pb-say:empty {
  display: none;
}

/* pawn hopper (shared by board + checklist track) */
.hp {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 40px;
  pointer-events: none;
  will-change: transform;
}
.hp-body {
  position: absolute;
  inset: 0;
  display: block;
  transform-origin: 50% 100%;
}
.hp-body .pawn,
.hero-pawn-body .pawn {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hp-shadow {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -3px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.28;
}
.pb-pawn {
  z-index: 3;
  width: 28px;
  height: 33px;
}

.pawn .f-sad,
.pawn .f-happy {
  display: none;
}
.pawn[data-face="sad"] .f-normal,
.pawn[data-face="happy"] .f-normal {
  display: none;
}
.pawn[data-face="sad"] .f-sad {
  display: inline;
}
.pawn[data-face="happy"] .f-happy {
  display: inline;
}

@media (min-width: 1024px) {
  :root {
    --pl: 214px;
    --pr: 32px;
    --pitch: clamp(36px, calc((100vh - 110px) / 10), 54px);
  }
  html {
    scroll-padding-top: 24px;
  }
  .board {
    top: 50%;
    left: 22px;
    right: auto;
    bottom: auto;
    width: 126px;
    padding: 16px 12px 18px;
    border: var(--bw) solid var(--ink);
    border-radius: var(--r);
    box-shadow: var(--sh) var(--sh) 0 var(--ink);
    transform: translate(-190%, -50%);
  }
  .board.is-on {
    transform: translate(0, -50%);
  }
  .pb-list {
    display: grid;
    grid-template-columns: repeat(2, 42px);
    grid-auto-rows: var(--pitch);
    justify-content: space-between;
  }
  .pb-list::before {
    display: none;
  }
  .pb-list li:nth-child(odd) {
    grid-column: 1;
  }
  .pb-list li:nth-child(even) {
    grid-column: 2;
  }
  .pb-list li:nth-child(1) {
    grid-row: 1;
  }
  .pb-list li:nth-child(2) {
    grid-row: 2;
  }
  .pb-list li:nth-child(3) {
    grid-row: 3;
  }
  .pb-list li:nth-child(4) {
    grid-row: 4;
  }
  .pb-list li:nth-child(5) {
    grid-row: 5;
  }
  .pb-list li:nth-child(6) {
    grid-row: 6;
  }
  .pb-list li:nth-child(7) {
    grid-row: 7;
  }
  .pb-list li:nth-child(8) {
    grid-row: 8;
  }
  .pb-list li:nth-child(9) {
    grid-row: 9;
  }
  .pb-list li:nth-child(10) {
    grid-row: 10;
  }
  .pb-sq {
    margin: -1px;
  }
  .pb-cell {
    width: 42px;
    height: 42px;
    font-size: 13px;
  }
  .pb-pawn {
    width: 44px;
    height: 51px;
  }
  .pb-say {
    left: calc(100% + 14px);
    top: 14px;
    transform-origin: 0 16px;
  }
}

/* ---------- Layout frame ---------- */
.sq {
  position: relative;
  padding: 44px var(--pr) 50px var(--pl);
  scroll-margin-top: 70px;
  overflow-x: clip;
}
.sq:not(.hero)::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: calc(50% + (var(--pl) - var(--pr) - 6px) / 2 - 2px);
  top: -50px;
  height: 96px;
  border-left: 4px dashed var(--ink);
}
/* the clip box keeps the 3D entrance from stretching the document */
.tile-clip {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 6px 6px 0;
  overflow: clip;
  perspective: 1000px;
  perspective-origin: 50% 0;
}
.tile-wrap {
  position: relative;
}
.tile-shadow {
  position: absolute;
  inset: 0;
  background: var(--ink);
  border-radius: var(--r);
  transform: translate(var(--sh), var(--sh));
}
.tile {
  position: relative;
  padding: 20px 18px 30px;
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  overflow-x: clip;
}
@media (min-width: 720px) {
  .tile {
    padding: 34px 40px 44px;
  }
  .sq {
    padding-top: 56px;
    padding-bottom: 64px;
  }
  .sq:not(.hero)::before {
    top: -64px;
    height: 120px;
  }
}
@media (min-width: 1024px) {
  .sq {
    scroll-margin-top: 20px;
  }
}

.tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.chip {
  display: inline-block;
  padding: 5px 9px 4px;
  font: 900 15px/1 var(--f-cjk);
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: 6px;
}
.tag-t {
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.08em;
}
.chip,
.tag-t,
.game-t,
.step-n,
.stk-tag {
  flex: none;
  white-space: nowrap;
}

h1,
h2,
.flip-front b,
.era-face h3,
.ck-t,
.merge h3,
.rates h3,
.dest h3,
.cert h3,
.home2 h3 {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
.nb {
  display: inline-block;
  overflow-wrap: anywhere;
}

h2 {
  font-weight: 900;
  font-size: clamp(34px, 10.2vw, 76px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 8px 0 22px;
}
h3 {
  font-weight: 900;
  line-height: 1.3;
}
.sub {
  display: inline-block;
  margin: -6px 0 22px;
  padding: 6px 14px;
  font-weight: 900;
  font-size: 17px;
  line-height: 1.5;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
}
.sub-d {
  color: var(--ink);
  background: transparent;
  padding: 0;
  margin: -8px 0 22px;
  font-size: 18px;
}
.body-p {
  font-size: clamp(17px, 4.4vw, 20px);
  line-height: 1.8;
  max-width: 34em;
  text-wrap: pretty;
}
.body-p + .body-p {
  margin-top: 14px;
}
.small {
  font-size: 14px;
  line-height: 1.75;
  font-weight: 500;
  text-wrap: pretty;
}
.closer {
  margin-top: 28px;
  font-weight: 900;
  font-size: clamp(21px, 5.8vw, 30px);
  line-height: 1.55;
  text-wrap: pretty;
}
.closer.big {
  font-size: clamp(24px, 7vw, 38px);
  line-height: 1.45;
}
.closer + .small {
  margin-top: 18px;
}
.closer mark {
  display: inline-block;
  max-width: 100%;
}

/* ---------- 阿袋說話 ---------- */
.say {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: -6px 0 24px;
}
.say-pawn {
  display: block;
  flex: none;
  width: 56px;
  height: 65px;
}
.say-pawn .pawn {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.say-b {
  position: relative;
  padding: 9px 14px;
  font-weight: 900;
  font-size: clamp(17px, 4.6vw, 20px);
  line-height: 1.5;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 14px 14px 14px 4px;
  box-shadow: 4px 4px 0 var(--ink);
}
.say-b::before {
  content: "";
  position: absolute;
  left: -10px;
  bottom: 12px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
  transform: rotate(45deg);
}

/* ---------- Hero / 起點 ---------- */
.hero {
  min-height: 100svh;
  padding: 16px var(--gut) 56px;
  perspective: none;
  scroll-margin-top: 0;
  overflow-x: clip;
}
.hero-in {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}
.hero-board {
  position: relative;
  padding-top: 128px;
}
.hb {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  padding-right: 6px;
}
.hs {
  position: relative;
  display: grid;
  place-items: center;
  align-self: start;
  min-width: 0;
  aspect-ratio: 1;
  font: 700 17px/1 var(--f-mono);
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
}
.hs[data-tone="yellow"] {
  background: var(--yellow);
}
.hs[data-tone="green"] {
  background: var(--green);
}
.hs[data-tone="red"] {
  background: var(--red);
}
.hs[data-tone="blue"] {
  background: var(--blue);
}
.hs[data-tone="pink"] {
  background: var(--pink);
}
.hs[data-done]::after {
  content: "";
  position: absolute;
  right: -9px;
  top: -10px;
  width: 26px;
  height: 26px;
  background: var(--done) center / contain no-repeat;
}
.hs {
  cursor: pointer;
}
@media (hover: hover) {
  .hs:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
  }
}
.hs-start,
.hs-end {
  font-family: var(--f-cjk);
  font-weight: 900;
  font-size: 16px;
}
.hs:nth-child(6) {
  grid-row: 2;
  grid-column: 5;
}
.hs:nth-child(7) {
  grid-row: 2;
  grid-column: 4;
}
.hs:nth-child(8) {
  grid-row: 2;
  grid-column: 3;
}
.hs:nth-child(9) {
  grid-row: 2;
  grid-column: 2;
}
.hs:nth-child(10) {
  grid-row: 2;
  grid-column: 1;
}
.hero-pawn {
  position: absolute;
  z-index: 2;
  left: calc(10% - 58px);
  top: 0;
  width: 116px;
  height: 135px;
  pointer-events: none;
}
.hero-pawn-body {
  position: absolute;
  inset: 0;
  display: block;
  transform-origin: 50% 100%;
}
.hero-pawn-shadow {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -4px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.28;
}
.hero-copy {
  margin-top: 24px;
}
.h1 {
  font-weight: 900;
  font-size: clamp(48px, 15.6vw, 176px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}
.h1-l {
  display: block;
  transform-origin: 0 100%;
}
.h1-l + .h1-l {
  margin-top: 0.2em;
}
.hl {
  display: inline-block;
  padding: 0.01em 0.1em 0.07em;
  margin-left: -0.04em;
  background: var(--yellow);
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  transform: rotate(-1.4deg);
  transform-origin: 0 100%;
}
.hero-say {
  position: absolute;
  z-index: 3;
  left: 100px;
  right: 6px;
  top: 4px;
  padding: 9px 12px;
  font-weight: 900;
  font-size: 16px;
  line-height: 1.5;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 14px 14px 14px 4px;
  box-shadow: 4px 4px 0 var(--ink);
  transform-origin: 0 80%;
}
.hero-say::before {
  content: "";
  position: absolute;
  left: -10px;
  bottom: 14px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-left: var(--bw) solid var(--ink);
  border-bottom: var(--bw) solid var(--ink);
  transform: rotate(45deg);
}
.hero-text {
  margin-top: 20px;
  max-width: 32em;
}
.lead {
  font-size: clamp(17px, 4.6vw, 21px);
  line-height: 1.8;
  font-weight: 500;
  text-wrap: pretty;
}
.lead + .lead {
  margin-top: 10px;
}
.hero-text .btn {
  margin-top: 18px;
}

@media (min-width: 720px) {
  .hero {
    padding-top: 36px;
  }
  .hero-board {
    padding-top: 150px;
  }
  .hb {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 10px;
    max-width: 1040px;
  }
  .hs:nth-child(n) {
    grid-row: auto;
    grid-column: auto;
  }
  .hs:nth-child(even) {
    margin-top: 12px;
  }
  .hs {
    font-size: 20px;
  }
  .hs-start,
  .hs-end {
    font-size: 18px;
  }
  .hero-pawn {
    left: max(0px, calc(min(100% - 6px, 1040px) / 20 - 75px));
    width: 150px;
    height: 174px;
  }
  .hero-say {
    left: 172px;
    right: auto;
    top: 26px;
    width: max-content;
    max-width: min(560px, calc(100% - 180px));
    padding: 12px 18px;
    font-size: 20px;
  }
}
@media (min-width: 1024px) {
  .hero {
    display: grid;
    align-items: center;
    padding-top: 28px;
    padding-bottom: 44px;
  }
  .hero-in {
    display: grid;
    gap: 0;
  }
  .hero-board {
    padding-top: 150px;
  }
  .h1 {
    font-size: clamp(54px, 11.2vw, 140px);
  }
  .hero-copy {
    margin-top: 20px;
  }
  .hero-text {
    margin-top: 18px;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 54em) auto;
    column-gap: 40px;
    align-items: end;
    justify-content: space-between;
  }
  .hero-text .lead {
    grid-column: 1;
  }
  .hero-text .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }
}

/* ---------- 第 1 關 ---------- */
.sw-row {
  margin: 4px 0 26px;
}
.sw {
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 380px;
  height: 76px;
  padding: 0;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sw:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}
.sw-knob {
  position: absolute;
  z-index: 0;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 5px);
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.42s cubic-bezier(0.3, 1.45, 0.5, 1);
}
.sw[aria-checked="true"] .sw-knob {
  transform: translateX(100%);
}
.sw-l {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0.12em;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.sw[aria-checked="false"] .sw-old,
.sw[aria-checked="true"] .sw-new {
  opacity: 1;
}

.era-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding-right: 6px;
}
.era-card {
  perspective: 1000px;
}
.era-in {
  display: grid;
  height: 100%;
  transform-style: preserve-3d;
}
.era-face {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  align-content: center;
  padding: 12px 14px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.era-art {
  display: block;
  width: 60px;
  height: 60px;
  overflow: visible;
}
.era-card:not(:first-child) .era-face {
  min-height: 114px;
}
.era-tx {
  min-width: 0;
}
.era-card:first-child .era-face {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 16px;
}
.era-card:first-child .era-art {
  width: 100%;
  height: 100px;
}
.era-card:first-child h3 {
  font-size: clamp(36px, 10.6vw, 52px);
}
.era-card:first-child p {
  font-size: 18px;
}
.era-new {
  transform: rotateY(180deg);
}
.era-old {
  background: var(--bg);
}
.era-face h3 {
  font-size: clamp(24px, 6.4vw, 28px);
  line-height: 1.15;
}
.era-face p {
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.55;
}
.era-old h3,
.era-old p {
  color: rgba(20, 20, 20, 0.88);
}

@media (min-width: 720px) {
  .era-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .era-card:first-child {
    grid-column: 1 / -1;
  }
  .era-card:first-child .era-face {
    grid-template-columns: minmax(0, 1fr) clamp(190px, 30vw, 300px);
    gap: 24px;
    padding: 20px 24px;
  }
  .era-card:first-child .era-art {
    order: 2;
  }
  .era-face {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    align-content: start;
  }
}

/* ---------- 第 2 關 ---------- */
.s2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.bignum {
  font: 400 clamp(50px, 18.4vw, 156px)/0.95 var(--f-num);
  letter-spacing: -0.03em;
  transform-origin: 0 100%;
}
.s2-p {
  font-weight: 900;
  font-size: clamp(19px, 5vw, 24px);
  line-height: 1.55;
  margin-top: 8px;
  text-wrap: pretty;
}
.s2-l .small {
  margin-top: 8px;
}
.game-t {
  display: inline-block;
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 42px;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.1em;
  padding: 0 16px 3px 32px;
  background: var(--pink);
  color: var(--ink);
  border: var(--bw) solid var(--ink);
  border-radius: 6px 14px 14px 6px;
}
.game-t::before,
.step-n::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.game-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 16px;
}
.game-note {
  font-weight: 900;
  font-size: 15px;
  line-height: 1.4;
}
.game-row .say {
  margin: 0;
}
.game-row .say-pawn {
  width: 44px;
  height: 51px;
}
.game-row .say-b {
  font-size: 16px;
  padding: 7px 12px;
}
.shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 8px;
  padding: 0 2px 12px;
}
.slot {
  position: relative;
  height: 92px;
  border: 3px dashed rgba(20, 20, 20, 0.35);
  border-radius: 10px;
}
/* the plank each row of goods stands on */
.slot::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: -12px;
  height: 6px;
  background: var(--ink);
}
.stk {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  width: calc(100% + 6px);
  height: 92px;
  margin: -3px;
  padding: 7px 2px 4px;
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--f-cjk);
}
.bag-in .stk {
  width: 100%;
  margin: 0;
}
.stk .ic {
  width: 38px;
  height: 38px;
  flex: none;
}
.stk-n {
  font-weight: 900;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}
.stk-p {
  font: 400 12px/1.3 var(--f-num);
}
.stk-tag {
  position: absolute;
  z-index: 1;
  top: -15px;
  right: -6px;
  padding: 2px 6px 1px;
  font-weight: 900;
  font-size: 11px;
  line-height: 1.4;
  background: var(--pink);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 5px;
}
.stk:active {
  box-shadow: 1px 1px 0 var(--ink);
}
.ic {
  display: block;
  width: 44px;
  height: 44px;
}
.ic-xl {
  width: 64px;
  height: 64px;
}

.bag {
  position: relative;
  margin-top: 30px;
}
.bag-handle {
  position: absolute;
  left: 50%;
  top: -33px;
  width: 116px;
  height: 40px;
  margin-left: -58px;
}
.bag-body {
  position: relative;
  display: flex;
  gap: 8px;
  min-height: 112px;
  padding: 8px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 6px 6px 16px 16px;
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
}
.goal-num {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}
.gn-line,
.gn-fill {
  -webkit-text-stroke: 9px var(--ink);
  paint-order: stroke fill;
}
.gn-line {
  color: #fff;
  filter: drop-shadow(4px 4px 0 var(--ink));
}
.gn-fill {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--pink);
  clip-path: inset(0% 100% 0% 0%);
  transition: color 0.25s;
  white-space: nowrap;
}
.goal-num.is-ok .gn-fill {
  color: var(--blue);
}
.bag-in {
  flex: 1;
  min-width: 0;
  min-height: 90px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 16px 8px;
  padding: 8px 4px 4px;
}
.stamp {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: 6px 14px 5px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  white-space: nowrap;
  opacity: 0;
}
.stamp-y {
  right: -10px;
  top: -16px;
  font-size: clamp(20px, 5.6vw, 28px);
  background: var(--yellow);
  -webkit-text-stroke: 0;
  font-family: var(--f-cjk);
  letter-spacing: 0;
}
.stamp-r {
  background: var(--red);
}

.meter {
  margin-top: 18px;
  padding: 12px 14px 12px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
}
.meter-t {
  display: flex;
  align-items: center;
  min-height: 3.1em;
  font-weight: 900;
  font-size: clamp(20px, 5.4vw, 25px);
  line-height: 1.5;
}
.meter-s {
  min-height: 1.5em;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
}
.meter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 3px dashed rgba(20, 20, 20, 0.22);
}
.sum {
  font: 400 15px/1 var(--f-num);
  white-space: nowrap;
}
.sum b {
  font: 400 25px/1 var(--f-num);
}
.sum span {
  opacity: 0.65;
}
.meter-row .btn {
  flex: none;
  white-space: nowrap;
}

@media (min-width: 720px) {
  .s2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }
  .bignum {
    font-size: clamp(60px, 15vw, 150px);
  }
  .s2-r {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 0 30px;
    align-items: start;
  }
  .s2-r .game-row {
    grid-column: 1 / 3;
  }
  .s2-r .shelf {
    grid-column: 1;
    grid-row: 2 / 4;
    align-content: flex-start;
  }
  .s2-r .bag {
    grid-column: 2;
    grid-row: 2;
    margin-top: 30px;
  }
  .s2-r .meter {
    grid-column: 2;
    grid-row: 3;
    margin-top: 16px;
  }
}

/* ---------- 第 3 關 ---------- */
/* the three jobs ride one checkout belt */
.steps {
  position: relative;
  display: grid;
  gap: 22px;
  padding-right: 6px;
}
.steps::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 24px;
  bottom: 24px;
  width: 14px;
  background: var(--ink) radial-gradient(circle, #fff 2.6px, transparent 3px)
    center top / 14px 20px repeat-y;
  border-radius: 7px;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  align-content: start;
}
.st-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 50%;
}
.st-dot .ic {
  width: 50px;
  height: 50px;
}
.step-n {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px 3px 30px;
  font: 900 clamp(18px, 5vw, 20px)/1 var(--f-cjk);
  color: var(--ink);
  background: var(--pink);
  border: var(--bw) solid var(--ink);
  border-radius: 6px 14px 14px 6px;
}
.step h3 {
  margin-top: 8px;
  font-size: clamp(26px, 7.4vw, 32px);
  line-height: 1.2;
}
.step p {
  margin-top: 2px;
  font-size: 16px;
  line-height: 1.65;
}
@media (min-width: 720px) {
  .step h3 {
    font-size: clamp(22px, 3.2vw, 30px);
  }
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-right: 0;
  }
  .steps::before {
    left: 20px;
    right: 20px;
    top: 33px;
    bottom: auto;
    width: auto;
    height: 14px;
    background-position: left center;
    background-size: 20px 14px;
    background-repeat: repeat-x;
  }
  .step {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

/* ---------- blocks that are drawn from what they say ---------- */
.more {
  display: grid;
  gap: 34px;
  margin-top: 38px;
  padding-right: 6px;
}
.merge h3,
.rates h3,
.home2 h3 {
  margin-bottom: 12px;
  font-size: clamp(23px, 6.4vw, 28px);
  line-height: 1.25;
}
.rates h3 .num {
  font-size: 1.05em;
}
.merge > p {
  font-size: 16px;
  line-height: 1.7;
}
@media (min-width: 720px) {
  .more {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    align-items: start;
  }
}

/* 百貨合體: three slips become one */
.mg-art {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.mg-rc {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 9px 2px 7px;
  font-size: 14px;
  line-height: 1.25;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-bottom: 0;
}
.mg-rc .num {
  font-size: 15px;
}
.mg-rc::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 100%;
  height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M0 0L7 7L14 0' fill='%23fff' stroke='%23141414' stroke-width='2.6'/%3E%3C/svg%3E")
    center top / 14px 9px repeat-x;
}
.mg-road {
  grid-column: 1 / -1;
  width: 100%;
  height: 34px;
  margin-top: 10px;
  overflow: visible;
}
.mg-road path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-dasharray: 8 8;
  vector-effect: non-scaling-stroke;
}
.mg-sum {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 10px;
  background: var(--pink);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
}
.mg-sum .ic {
  width: 44px;
  height: 44px;
}
.mg-sum .num {
  font-size: 28px;
}

/* 8% and 10%: the same coins as the prize */
.rt-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.rt {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  text-align: center;
}
.rt-coin {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: min(100%, 132px);
  aspect-ratio: 1;
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: 50%;
}
.rt-coin::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 3px dashed var(--ink);
  border-radius: 50%;
}
.rt-coin .ic {
  width: 46px;
  height: 46px;
}
.rt-coin .num {
  font-size: 26px;
  line-height: 1;
}
.rt p {
  font-weight: 900;
  font-size: 16px;
  line-height: 1.4;
}

/* 錢會退到哪: a departures board */
.dest {
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
}
.dest h3 {
  padding: 9px 14px 8px;
  font-size: clamp(21px, 5.8vw, 24px);
  line-height: 1.3;
  background: var(--pink);
  border-bottom: var(--bw) solid var(--ink);
}
.dest li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0 12px;
  align-items: center;
  padding: 8px 14px;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.3;
  border-bottom: 2px dashed var(--ink);
}
.dest .ic {
  grid-row: span 2;
  width: 38px;
  height: 38px;
}
.dest em {
  grid-column: 2;
  justify-self: start;
  margin-top: 3px;
  padding: 1px 7px;
  font-style: normal;
  font-size: 13px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 5px;
}
.dest > p {
  padding: 10px 14px 12px;
  font-size: 15px;
  line-height: 1.6;
}

/* 100 萬以上: a certificate */
.cert {
  position: relative;
  padding: 22px 20px 24px;
  text-align: center;
  background: #fff;
  border: var(--bw) solid var(--ink);
  box-shadow:
    inset 0 0 0 5px #fff,
    inset 0 0 0 8px var(--pink);
  transform: rotate(1deg);
}
.cert h3 {
  font-size: clamp(21px, 5.8vw, 24px);
  line-height: 1.35;
}
.cert p {
  margin-top: 8px;
  padding: 0 30px;
  font-size: 16px;
  line-height: 1.65;
}
.cert-seal {
  position: absolute;
  right: -2px;
  bottom: -22px;
  width: 66px;
  height: 82px;
  overflow: visible;
}

/* ---------- 問號牌 ---------- */
.q-t {
  margin: 34px 0 14px;
  font-weight: 900;
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1.4;
}
.say + .q-t {
  margin-top: 0;
}
.flips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.flip-btn {
  appearance: none;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  perspective: 1000px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.flip-btn[disabled] {
  cursor: default;
}
.flip-in {
  display: grid;
  height: 100%;
  transform-style: preserve-3d;
}
.flip-face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  min-height: 196px;
  padding: 14px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* the unturned side reads as the back of a playing card */
.flip-front {
  position: relative;
  justify-content: space-between;
  gap: 10px;
  background: repeating-linear-gradient(135deg, #fff 0 13px, #fff3c7 13px 26px);
}
.flip-front b {
  font-size: clamp(20px, 5.6vw, 26px);
  line-height: 1.3;
}
.flip-front .ic {
  background: #fff;
  border-radius: 10px;
}
.flip-q {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font: 400 32px/1 var(--f-num);
  color: var(--yellow);
  background: var(--ink);
  border-radius: 0 var(--r) 0 var(--r);
}
@media (hover: hover) {
  .flip-btn:not([disabled]):hover .flip-front {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--ink);
  }
}
.flip-btn:not([disabled]):active .flip-front {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}
.flip-face.flip-back {
  position: relative;
  transform: rotateY(180deg);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  justify-items: center;
  padding: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
  background: #fff;
}
.flip-back::before {
  content: "";
  grid-row: 1 / 3;
  grid-column: 1;
  justify-self: stretch;
  border-bottom: var(--bw) solid var(--ink);
}
.flip-back.is-red::before {
  background: var(--red);
}
.flip-back.is-green::before {
  background: var(--green);
}
.flip-art {
  grid-row: 1;
  grid-column: 1;
  display: block;
  width: 78px;
  height: 78px;
  margin-top: 8px;
  overflow: visible;
}
.no {
  grid-row: 2;
  grid-column: 1;
  display: block;
  padding: 0 4px 9px;
  font-size: clamp(25px, 7.4vw, 32px);
  line-height: 1.15;
  font-weight: 900;
}
.flip-name {
  grid-row: 3;
  grid-column: 1;
  justify-self: stretch;
  padding: 9px 11px 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 900;
}
.flip-why {
  grid-row: 4;
  grid-column: 1;
  justify-self: stretch;
  display: block;
  padding: 3px 11px 12px;
  text-wrap: balance;
}
.flips-s .flip-front b {
  font-size: clamp(16px, 4.4vw, 21px);
}
@media (min-width: 720px) {
  .flips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .flips-s {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flip-face {
    min-height: 210px;
  }
  .flips-s .flip-face {
    min-height: 176px;
  }
}

/* ---------- 第 7 關 ---------- */
.tile-air {
  overflow: hidden;
}
.air-in {
  position: relative;
  z-index: 1;
}
/* 阿袋 stands at a fork, three roads, three things calling it over */
#pickSay {
  position: relative;
  z-index: 6;
  flex-direction: column-reverse;
  align-items: center;
  gap: 12px;
  margin: 0;
}
#pickSay .say-b {
  border-radius: 14px;
  text-align: center;
}
#pickSay .say-b::before {
  left: 50%;
  bottom: -10px;
  margin-left: -8px;
  transform: rotate(-45deg);
}
#pickSay .say-pawn {
  position: relative;
  width: 66px;
  height: 77px;
}
.fork {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 6px 24px 0;
  padding-top: 44px;
}
.fork-road {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 44px;
  overflow: visible;
}
.fork-road path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-dasharray: 8 8;
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
}
.pick {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 216px;
  padding: 12px 6px 14px;
  font-weight: 900;
  font-size: clamp(14px, 4.1vw, 19px);
  line-height: 1.35;
  text-align: center;
  color: var(--ink);
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pick-k {
  position: absolute;
  top: -3px;
  left: -3px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font: 400 19px/1 var(--f-num);
  color: var(--yellow);
  background: var(--ink);
  border-radius: var(--r) 0 var(--r) 0;
}
.pick-line {
  position: relative;
  margin-top: 30px;
  padding: 3px 6px;
  white-space: nowrap;
  font-weight: 900;
  font-size: clamp(12px, 3.4vw, 15px);
  line-height: 1.3;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
}
.pick-line::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 9px;
  height: 9px;
  margin-left: -5px;
  background: #fff;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
}
.ch {
  flex: none;
  display: block;
  width: 68px;
  height: 72px;
  margin-top: 4px;
  overflow: visible;
  transform-origin: 50% 100%;
  animation: chBob 3s ease-in-out infinite;
}
.pick:nth-of-type(2) .ch {
  animation-delay: 0.35s;
}
.pick:nth-of-type(3) .ch {
  animation-delay: 0.7s;
}
.ch-eyes {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: chBlink 4.2s infinite;
}
.pick:nth-of-type(2) .ch-eyes {
  animation-delay: 1.3s;
}
.pick:nth-of-type(3) .ch-eyes {
  animation-delay: 2.4s;
}
@keyframes chBob {
  0%,
  62%,
  100% {
    transform: none;
  }
  72% {
    transform: translateY(-7px) scale(1.03, 0.98);
  }
  84% {
    transform: scale(0.97, 1.03);
  }
}
@keyframes chBlink {
  0%,
  93%,
  100% {
    transform: none;
  }
  96% {
    transform: scaleY(0.1);
  }
}
.pick-t {
  margin-top: auto;
}
.pick:active {
  transform: translate(4px, 4px);
  box-shadow: 2px 2px 0 var(--ink);
}
@media (hover: hover) {
  .pick:hover:not(:active) {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--ink);
  }
}
.fail {
  position: relative;
  margin: 0 6px 22px 0;
  padding: 16px 16px 20px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow:
    inset 0 0 0 5px var(--red),
    var(--sh) var(--sh) 0 var(--ink);
  overflow: hidden;
}
.fail h3 {
  font-size: clamp(25px, 7vw, 34px);
  line-height: 1.2;
  margin-top: 10px;
}
.fail p {
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.7;
  text-wrap: balance;
}
.fail .btn {
  margin-top: 14px;
}
.fail .stamp {
  right: 14px;
  top: 14px;
  font-size: 22px;
  padding: 4px 11px 3px;
  opacity: 1;
  transform: rotate(-8deg);
}
.fail-belt {
  position: relative;
  height: 84px;
}
.fail-pawn {
  position: absolute;
  left: 6px;
  bottom: 8px;
  display: block;
  width: 62px;
  height: 72px;
}
.fail-pawn .pawn {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.fail.is-bag .fail-belt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 14px,
    transparent 14px 22px
  );
  border-radius: 3px;
}
#airGate {
  margin-top: 20px;
}
.air-note {
  margin: 22px 0 14px;
  font-weight: 900;
  font-size: clamp(17px, 4.6vw, 20px);
  line-height: 1.5;
}
.big-rule {
  display: block;
  margin: 0 8px 0 0;
  padding: 12px 16px 14px;
  background: var(--green);
  border: 4px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
  transform: rotate(-1.2deg);
}
.big-rule b {
  display: block;
  font-size: clamp(27px, 8.8vw, 60px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.big-rule > span {
  display: block;
  margin-top: 6px;
  font-weight: 900;
  font-size: clamp(16px, 4.4vw, 20px);
  line-height: 1.5;
}
.wash {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
}

.air-stage {
  position: relative;
}
.k-slide {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 4px auto 0;
}
.kiosk {
  position: relative;
}
.k-body {
  position: relative;
  padding: 14px 14px 16px;
  background: var(--ink);
  border-radius: 22px 22px 14px 14px;
  box-shadow: inset 0 0 0 3px #3b3b3b;
}
.k-lamps {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 0 0 12px;
}
.lamp-s {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #262626;
  border: 3px solid #4b4b4b;
}
.lamp {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  opacity: 0.3;
}
.lamp::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 9px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}
.lamp-r {
  background: var(--red);
}
.lamp-y {
  background: var(--yellow);
}
.lamp-g {
  background: var(--green);
}
.k-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0d0d0d;
  border: 3px solid #fff;
  border-radius: 10px;
}
.k-idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-bottom: 22%;
}
.k-idle-svg {
  width: 42%;
  height: auto;
  animation: kPulse 1.6s ease-in-out infinite;
}
@keyframes kPulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.9;
  }
}
.k-scan {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.k-bar {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  border-bottom: 5px solid #fff;
}
.k-read {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9%;
  text-align: center;
  color: #fff;
  font: 700 19px/1.3 var(--f-mono);
  letter-spacing: 0.04em;
}
.k-res {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
}
.k-res svg {
  width: 50%;
  height: auto;
  transform-origin: 50% 50%;
}
.k-res-g {
  background: var(--green);
}
.k-res-r {
  background: var(--red);
}

.k-reader {
  position: relative;
  height: 92px;
  margin-top: 12px;
  background: #242424;
  border: 3px solid #3d3d3d;
  border-radius: 12px;
}
.k-clip {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.k-clip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 74px;
  margin: -37px 0 0 -30px;
  border: 3px dashed rgba(255, 255, 255, 0.4);
  border-radius: 7px;
}
.k-beam {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 12px;
  width: 66px;
  height: 5px;
  margin-left: -33px;
  background: #fff;
  border-radius: 3px;
  opacity: 0;
}
.k-pass {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 68px;
}
.k-pass svg {
  display: block;
  width: 100%;
  height: 100%;
}
.k-foot {
  margin-top: 14px;
}
.k-foot .btn {
  width: 100%;
}
.k-neck {
  width: 36%;
  height: 24px;
  margin: 0 auto;
  background: var(--ink);
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}
.k-base {
  width: 72%;
  height: 16px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 10px 10px 0 0;
  box-shadow: 8px 8px 0 rgba(20, 20, 20, 0.32);
}
.confetti {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 8;
}
#goalBurst,
#trackBurst {
  left: 0;
  top: 0;
  z-index: 6;
}
.confetti i {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
}

/* the result only exists once there is one */
.air-out {
  display: none;
  margin-top: 26px;
  padding-right: 6px;
}
.air-stage.has-result .air-out {
  display: block;
}
.air-act {
  min-height: 62px;
  margin-bottom: 18px;
}
.sw-air {
  display: grid;
  margin: 0 auto;
  height: 62px;
  visibility: hidden;
}
.sw-air .sw-l {
  font-size: 22px;
}
.air-res {
  position: relative;
  display: grid;
}
.air-r {
  grid-area: 1 / 1;
  position: relative;
  padding: 18px 16px 18px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--sh) var(--sh) 0 var(--ink);
  opacity: 0;
  visibility: hidden;
}
.air-g {
  background: var(--green);
}
.air-red {
  background: var(--red);
}
/* the size comes from the room actually left beside the lamp, so 海關要看一下 always fits on one line */
.air-hd {
  --lamp: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  container-type: inline-size;
}
.air-hd h3 {
  flex: 1;
  min-width: 0;
  font-size: clamp(26px, 7.5vw, 44px);
  font-size: clamp(18px, calc((100cqw - var(--lamp)) / 6.4), 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.air-lamp {
  flex: none;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  background: var(--ink);
  border-radius: 50%;
}
.air-lamp::after {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 7px var(--green);
}
.air-red .air-lamp::after {
  box-shadow: inset 0 0 0 7px var(--red);
}
.air-calm {
  margin-top: 10px;
  font-weight: 900;
  font-size: clamp(19px, 5.2vw, 23px);
  line-height: 1.4;
}
.route {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.route li {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  font-weight: 900;
  font-size: clamp(17px, 4.7vw, 20px);
  line-height: 1.35;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
}
.route .ic {
  width: 46px;
  height: 46px;
}
.route li + li::before {
  content: "";
  position: absolute;
  left: 32px;
  top: -18px;
  height: 15px;
  border-left: 4px dashed var(--ink);
}
@media (min-width: 720px) {
  .fork {
    gap: 18px;
  }
  .pick {
    min-height: 262px;
    padding: 14px 12px 18px;
  }
  .ch {
    width: 96px;
    height: 101px;
  }
  .route {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .route li {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 6px;
    padding: 12px 10px 14px;
  }
  .route li + li::before {
    left: -24px;
    top: 50%;
    width: 21px;
    height: 0;
    border-left: 0;
    border-top: 4px dashed var(--ink);
  }
}

/* ---------- 第 8 關 ---------- */
.s7 {
  display: grid;
  gap: 24px;
}
.s7 h2 {
  font-size: clamp(38px, 10.4vw, 54px);
}
.s7-art {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.s7-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
@media (min-width: 720px) {
  .s7 {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 36px;
    align-items: center;
  }
  .s7-art {
    max-width: 280px;
  }
}

/* 回到台灣: the red line and the count */
.home2 {
  margin-top: 34px;
  padding-right: 6px;
}
.h2-grid {
  display: grid;
  gap: 26px;
}
.lane {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(17px, 4.6vw, 19px);
  line-height: 1.4;
}
.lane .num {
  font-size: clamp(38px, 11vw, 50px);
  line-height: 1.1;
}
.lane-road {
  display: block;
  width: 100%;
  height: 18px;
  margin: 6px 0;
  background: var(--red);
  border: var(--bw) solid var(--ink);
  border-radius: 5px;
}
.pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.btl {
  display: grid;
  justify-items: center;
  text-align: center;
  font-weight: 900;
  font-size: clamp(14px, 3.9vw, 16px);
  line-height: 1.35;
}
.btl-cap {
  width: 54%;
  height: 20px;
  background: var(--blue);
  border: var(--bw) solid var(--ink);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}
.btl-big .btl-cap {
  background: var(--pink);
}
.btl-body {
  display: grid;
  justify-items: center;
  width: 100%;
  padding: 12px 4px 14px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 14px;
}
.btl .num {
  font-size: clamp(46px, 13.6vw, 58px);
  line-height: 1.08;
}
.btl-big .btl-body {
  padding-top: 20px;
  padding-bottom: 22px;
}
.btl-big .num {
  font-size: clamp(58px, 17vw, 72px);
}
@media (min-width: 720px) {
  .h2-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    align-items: center;
  }
}

/* ---------- 第 5 關 ---------- */
.cal {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 270px);
  margin: 10px auto 0;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 5px 5px 0 var(--ink);
}
.cal::before,
.cal::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 11px;
  height: 26px;
  background: var(--ink);
  border-radius: 6px;
}
.cal::before {
  left: 26%;
}
.cal::after {
  right: 26%;
}
.cal-top {
  justify-self: stretch;
  padding: 12px 0 8px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(20px, 5.4vw, 24px);
  line-height: 1.2;
  background: var(--pink);
  border-bottom: var(--bw) solid var(--ink);
  border-radius: 7px 7px 0 0;
}
.cal-num {
  padding-top: 8px;
  font: 400 clamp(92px, 28vw, 124px)/1 var(--f-num);
  letter-spacing: -0.03em;
}
.cal-end {
  padding: 2px 12px 14px;
  font-weight: 900;
  font-size: clamp(20px, 5.4vw, 24px);
  line-height: 1.3;
  white-space: nowrap;
}
.carry {
  display: grid;
  gap: 22px;
  margin-bottom: 30px;
}
.carry-l {
  font-weight: 900;
  font-size: clamp(22px, 6.2vw, 32px);
  line-height: 1.5;
}
@media (min-width: 720px) {
  .carry {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
  }
  .carry-l {
    font-size: clamp(22px, 2.7vw, 27px);
  }
}

/* ---------- 第 6 關 ---------- */
.checks {
  display: grid;
  gap: 12px;
}
.ck {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 14px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ck input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  margin: 0;
  cursor: pointer;
}
.ck:has(input:focus-visible) {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}
.ck-box {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 8px;
}
.ck-box svg {
  width: 24px;
  height: 24px;
  color: var(--ink);
  transform: scale(0);
}
.ck-t {
  font-weight: 900;
  font-size: clamp(17px, 4.6vw, 21px);
  line-height: 1.45;
}
.ck:has(input:checked) {
  background: var(--green);
}
.ck:has(input:checked) .ck-box {
  background: var(--ink);
}
.ck:has(input:checked) .ck-box svg {
  color: #fff;
  transform: scale(1);
}
.ck:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.track-wrap {
  position: relative;
  margin: 26px 0 0;
  padding: 0 6px 30px 0;
}
.track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.tk {
  position: relative;
  height: 52px;
  font: 900 14px/1 var(--f-cjk);
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
}
.tk span {
  white-space: nowrap;
  position: absolute;
  left: -12px;
  right: -12px;
  top: calc(100% + 9px);
  text-align: center;
}
.tk[data-tone="blue"] {
  background: var(--blue);
}
.tk[data-tone="yellow"] {
  background: var(--yellow);
}
.tk[data-tone="pink"] {
  background: var(--pink);
}
.tk-pawn {
  z-index: 3;
  width: 46px;
  height: 54px;
}
.status {
  margin-top: 20px;
  min-height: 3.1em;
  font-weight: 900;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.55;
  text-wrap: balance;
}
.sq-goal {
  padding-bottom: 28px;
}

/* ---------- 終點 ---------- */
.tile-goal {
  overflow: hidden;
}
.tile-goal.is-won {
  background: var(--green);
}
.goal-in {
  position: relative;
  z-index: 1;
}
.wash-goal {
  background: var(--green);
}
.loot {
  display: grid;
  gap: 20px;
}
.stage {
  position: relative;
  height: 214px;
  margin-right: 6px;
}
.stage-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--ink);
}
.podium {
  position: absolute;
  left: 6%;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 118px;
  height: 56px;
  font-weight: 900;
  font-size: 20px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  box-shadow: 5px 0 0 var(--ink);
}
.st-pawn {
  z-index: 3;
  width: 104px;
  height: 121px;
}
.ghost {
  position: absolute;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  font: 400 16px/1 var(--f-num);
  color: rgba(20, 20, 20, 0.62);
  border: 3px dashed rgba(20, 20, 20, 0.45);
  border-radius: 50%;
}
.ghost[hidden] {
  display: none;
}
.ghost-8 {
  right: 76px;
}
.ghost-10 {
  right: 8px;
}
.coins {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.coin {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  background: var(--yellow);
  border: var(--bw) solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--ink);
  font: 400 17px/1 var(--f-num);
  opacity: 0;
}
.coin b {
  font-weight: 400;
}
.score {
  position: relative;
  min-height: 136px;
  color: var(--ink);
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
}
.score::before,
.score::after {
  content: "";
  position: absolute;
  top: 46px;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: 50%;
  transition: background 0.5s 0.2s;
}
.score::before {
  left: -17px;
}
.score::after {
  right: -17px;
}
.is-paid .score::before,
.is-paid .score::after {
  background: var(--green);
}
.score-l {
  padding: 10px 24px 9px;
  font-weight: 900;
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
  background: var(--pink);
  border-bottom: var(--bw) dashed var(--ink);
}
.score-s {
  min-height: 1.5em;
  margin-top: 2px;
  padding: 0 22px 12px;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
.score-v {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  height: clamp(62px, 18.7vw, 92px);
  margin-top: 4px;
  white-space: nowrap;
  font: 400 clamp(56px, 17vw, 84px)/1.1 var(--f-num);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stamp-w {
  right: 8px;
  top: 26px;
  font-size: clamp(20px, 5.6vw, 26px);
  background: #fff;
}
.claim-slot {
  display: grid;
  align-items: center;
}
.claim-slot > * {
  grid-area: 1 / 1;
}
.claim-slot .btn {
  width: calc(100% - 6px);
}
.claim-slot .say {
  margin: 0;
}
#goalSay .say-b::before {
  left: 30px;
  top: -10px;
  bottom: auto;
  transform: rotate(135deg);
}
.recap {
  position: relative;
  max-width: 440px;
  margin: 34px auto 42px;
  padding: 20px 18px 14px;
  background: #fff;
  border: var(--bw) solid var(--ink);
  border-bottom: 0;
  transform: rotate(-0.8deg);
}
.recap::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 100%;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12'%3E%3Cpath d='M0 0L10 10L20 0' fill='%23fff' stroke='%23141414' stroke-width='3'/%3E%3C/svg%3E")
    center top / 20px 12px repeat-x;
}
.rc-shop {
  text-align: center;
  font: 700 14px/1.4 var(--f-mono);
  font-family: var(--f-mono);
  letter-spacing: 0.3em;
}
.recap h3 {
  margin: 2px 0 12px;
  padding-bottom: 12px;
  text-align: center;
  font-size: clamp(24px, 6.6vw, 30px);
  line-height: 1.3;
  border-bottom: 3px dashed var(--ink);
}
.recap li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  font-weight: 900;
  font-size: clamp(16px, 4.4vw, 18px);
  line-height: 1.45;
}
.recap .ic {
  width: 38px;
  height: 38px;
}
.rc-sum {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 10px;
  font: 700 16px/1.4 var(--f-mono);
  font-family: var(--f-mono);
  border-top: 3px dashed var(--ink);
}
.rc-memo {
  margin-top: 10px;
  padding-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  border-top: 3px dashed var(--ink);
}
.rc-memo b {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
}
.rc-bar {
  display: block;
  width: 100%;
  height: 30px;
  margin-top: 10px;
  fill: var(--ink);
}
#replay {
  margin-top: 22px;
}
.todo {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-right: 6px;
}
.todo:empty {
  display: none;
}
.todo .btn {
  white-space: normal;
  text-align: left;
  line-height: 1.3;
  padding-top: 8px;
  padding-bottom: 8px;
}
@media (min-width: 720px) {
  .loot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 20px 30px;
  }
  .stage {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: auto;
    min-height: 280px;
    margin-right: 0;
  }
  .score {
    grid-column: 2;
    grid-row: 1;
  }
  .score-v {
    font-size: clamp(52px, 6.4vw, 64px);
  }
  .claim-slot {
    grid-column: 2;
    grid-row: 2;
  }
  #goalSay .say-b::before {
    left: -10px;
    top: auto;
    bottom: 12px;
    transform: rotate(45deg);
  }
}

.foot {
  padding: 12px var(--gut) 72px;
  text-align: center;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}
.foot p + p {
  margin-top: 4px;
  font-weight: 500;
}
.foot a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 3px;
  text-decoration-skip-ink: none;
  text-underline-offset: 3px;
}
@media (min-width: 1024px) {
  .foot {
    padding-left: 168px;
  }
}

@media (min-width: 720px) {
  .tk {
    height: 76px;
    font-size: 16px;
  }
  .tk-pawn {
    width: 64px;
    height: 75px;
  }
  .status {
    min-height: 1.6em;
  }
}

/* 第 7 關: what the red light costs, and the three special cases */
.air-tip {
  margin-top: 12px;
  font-weight: 900;
  font-size: clamp(16px, 4.4vw, 18px);
  line-height: 1.45;
}
.cases {
  margin-top: 34px;
  padding-right: 6px;
}
.cases-h {
  margin-bottom: 14px;
  font-size: clamp(26px, 7.4vw, 34px);
  line-height: 1.2;
}
.case {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 3px dashed var(--ink);
}
.case-art {
  display: block;
  width: 64px;
  height: 64px;
  overflow: visible;
}
.case h3 {
  font-size: clamp(23px, 6.4vw, 28px);
  line-height: 1.25;
}
.case-tx {
  grid-column: 1 / -1;
  font-size: 16px;
  line-height: 1.7;
}
.air7 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.air7 li {
  padding: 1px 8px;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.6;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 6px;
}
@media (min-width: 720px) {
  .case {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 4px 20px;
    align-items: start;
    padding: 18px 0;
  }
  .case-art {
    grid-row: span 2;
    width: 92px;
    height: 92px;
  }
  .case-tx {
    grid-column: 2;
  }
}

/* short copy: even lines, no lone trailing characters */
.body-p,
.small,
.closer,
.lead,
.s2-p,
.era-face p,
.step p,
.merge > p,
.dest > p,
.cert p,
.air-r p,
.meter-t > span,
.status,
.ck-t,
.q-t,
.say-b,
.hero-say,
.carry-l,
.air-note {
  text-wrap: balance;
}

/* keep a range on one line at every width; it has to stay after the two-column size above */
.score-v.is-range {
  font-size: clamp(30px, 10vw, 40px);
}

/* ---------- short phones: 開始冒險 still fits the first screen ---------- */
@media (max-width: 719px) and (max-height: 700px) {
  .hs {
    aspect-ratio: 1.4;
  }
  .h1 {
    font-size: clamp(44px, 13vw, 60px);
  }
  .hero-copy {
    margin-top: 16px;
  }
  .hero-text {
    margin-top: 12px;
  }
  .lead {
    font-size: 16px;
    line-height: 1.6;
  }
  .lead + .lead {
    margin-top: 4px;
  }
  .hero-text .btn {
    margin-top: 12px;
    min-height: 58px;
  }
}

/* ---------- small phones ---------- */
@media (max-width: 380px) {
  .flip-back {
    font-size: 15px;
  }
  .flip-face {
    padding: 12px 11px;
  }
}

@media (max-width: 370px) {
  #failT {
    font-size: 24px;
  }
  .shelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .bag-in {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- very narrow phones ---------- */
@media (max-width: 340px) {
  h2 {
    font-size: 32px;
  }
  .air-hd {
    --lamp: 54px;
    gap: 10px;
  }
  .route li {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    font-size: 15px;
  }
  .route .ic {
    width: 36px;
    height: 36px;
  }
  .route li + li::before {
    left: 24px;
  }
  .air-lamp {
    width: 44px;
    height: 44px;
  }
  .air-lamp::after {
    width: 28px;
    height: 28px;
    box-shadow: inset 0 0 0 5px var(--green);
  }
  .air-red .air-lamp::after {
    box-shadow: inset 0 0 0 5px var(--red);
  }
  .pick {
    padding-left: 3px;
    padding-right: 3px;
  }
  .pick-line {
    padding: 3px 4px;
  }
  .ch {
    width: 60px;
    height: 63px;
  }
  .flip-face {
    padding: 10px;
  }
  .flip-front b {
    font-size: 18px;
  }
  .flips-s .flip-front b {
    font-size: 14px;
  }
  .flip-back {
    font-size: 15px;
  }
  .ck {
    gap: 10px;
    padding: 8px 10px;
  }
  .ck-t {
    font-size: 15.5px;
  }
  .stamp-w {
    right: 0;
    top: 4px;
    font-size: 17px;
    padding: 4px 9px 3px;
  }
  .podium {
    left: 0;
    width: 96px;
  }
  .ghost,
  .coin {
    width: 52px;
    height: 52px;
    font-size: 15px;
  }
  .ghost-8 {
    right: 62px;
  }
  .ghost-10 {
    right: 4px;
  }
  .stamp-y {
    top: -14px;
    font-size: 18px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .k-idle-svg {
    animation: none;
    opacity: 0.7;
  }
}
