/* KidWind 線上練習：賽車紅白主題 (Palette A: 賽車紅白) */
:root {
  /* Palette "A 賽車紅白" tokens */
  --paper: #f7f7f5;
  --paper2: #ececea;
  --card: #ffffff;
  --ink: #141414;
  --ink2: #666666;
  --ink3: #888888;
  --red: #e10600;
  --redd: #b80500;
  --red-soft: #ffe8e8;
  --pine: #141414;
  --teal: #141414;
  --mist: #ffe8e8;
  --deep: #141414;
  --gold: #e10600;
  --hair: rgba(20, 20, 20, 0.08);
  --hair2: rgba(20, 20, 20, 0.16);

  /* Quiz review correct/wrong colors */
  --ok: #1a8f3c;
  --ok-soft: #e8f5ec;
  --bad: #e10600;
  --bad-soft: #fde8e8;

  /* Chart tokens */
  --bg: var(--paper);
  --line: var(--hair);
  --muted: var(--ink2);
  --c1: #e10600;
  --c2: #141414;
  --c3: #666666;
  --c4: #888888;

  /* Fonts */
  --fd: "Archivo", "Noto Sans TC", "PingFang TC", -apple-system, sans-serif;
  --fb: "Noto Sans TC", "PingFang TC", -apple-system, sans-serif;
  --fm: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --fr: "Russo One", "Archivo", sans-serif;

  /* Radii & Shadows */
  --r: 4px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 20, 20, 0.12);

  color-scheme: light;
}

/* Base resets & typography */
html, body {
  background: #f7f7f5 !important;
  color: #141414 !important;
  font-family: var(--fb);
  overflow-x: hidden;
}

a {
  color: #e10600;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #e10600 !important;
  outline-offset: 2px !important;
}

/* 1. Big numbers: Russo One italic */
.stats .n,
.brow .rk,
.brow .sc,
.row .sc,
.clock,
.score .big,
.rules b,
.earn b,
.intro .step-n,
.rq .no,
.dots button,
.hist .rk,
.hist .sc,
.links .v em,
.wl .k,
.vprog-txt {
  font-family: var(--fr) !important;
  font-style: italic !important;
}

/* Big number colors */
.stats .n {
  color: #141414;
}
.stats .n.r {
  color: #e10600;
}
.stats .n small {
  font-family: var(--fr);
  font-style: italic;
  color: #666666;
}

.brow .rk {
  color: #141414;
}
.brow.top3 .rk {
  color: #e10600;
}
.brow .sc {
  color: #141414;
}
.brow.top3 .sc {
  color: #e10600;
}

.row .sc {
  color: #e10600;
}
.row .sc small {
  font-family: var(--fr);
  font-style: italic;
  color: #666666;
}

.clock {
  color: #141414;
}
.clock.low {
  color: #e10600;
}

.score .big {
  color: #e10600;
}
.score .big small {
  color: #666666;
}

.rules b {
  color: #141414;
}

.earn b {
  color: #e10600;
}

.intro .step-n {
  color: #e10600;
}

.rq .no {
  color: #141414;
}

.links .v em {
  color: #e10600;
}

.wl .k {
  color: #e10600;
}

/* 2. Stat tiles */
.stats {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  margin: 20px 4px !important;
  border-top: none !important;
  border-bottom: none !important;
}
.stats > div {
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-radius: 4px !important;
  border-bottom: 4px solid #e10600 !important;
  border-left: none !important;
  transform: skewX(-8deg) !important;
  padding: 14px 6px !important;
  text-align: center !important;
}
.stats > div > * {
  transform: skewX(8deg) !important;
}
.stats .label {
  font-family: var(--fb) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #666666 !important;
  letter-spacing: 0.04em !important;
  margin-top: 4px !important;
}

/* 3. Leaderboard rows */
.board {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.brow {
  display: grid !important;
  grid-template-columns: 44px 1fr auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 12px 18px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-radius: 4px !important;
  border-top: none !important;
  transform: skewX(-8deg) !important;
  margin: 0 4px !important;
  min-height: 48px !important;
  transition: transform 0.12s, box-shadow 0.12s !important;
}
.brow > * {
  transform: skewX(8deg) !important;
}
.brow + .brow {
  border-top: none !important;
}
.brow .rk {
  font-size: 18px !important;
}
.brow .sc {
  font-size: 20px !important;
}
.brow.me {
  background: #e10600 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(225, 6, 0, 0.28) !important;
}
.brow.me .rk,
.brow.me .sc,
.brow.me span,
.brow.me .muted {
  color: #ffffff !important;
}
button.brow {
  width: calc(100% - 8px) !important;
  cursor: pointer !important;
  text-align: left !important;
}

/* 4. Episode list items */
.unit {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin-bottom: 20px !important;
  overflow: visible !important;
}
.unit .uh {
  display: flex !important;
  gap: 10px !important;
  align-items: baseline !important;
  padding: 8px 4px 8px !important;
}
.unit .uh .k {
  font-family: var(--fr) !important;
  font-style: italic !important;
  color: #e10600 !important;
  font-size: 15px !important;
  letter-spacing: 0.06em !important;
}
.unit .uh .t {
  font-family: var(--fd) !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  color: #141414 !important;
}

.row {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  gap: 12px !important;
  align-items: center !important;
  width: 100% !important;
  text-align: left !important;
  padding: 14px 18px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-radius: 4px !important;
  border: none !important;
  border-left: 5px solid #141414 !important;
  margin-bottom: 10px !important;
  min-height: 52px !important;
  transition: transform 0.12s, box-shadow 0.12s !important;
}
.row:active {
  background: #f7f7f5 !important;
  transform: translateX(2px) !important;
}
.row .ep {
  font-family: var(--fr) !important;
  font-style: italic !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #141414 !important;
  min-width: 44px !important;
  white-space: nowrap !important;
}
.row .tt {
  font-weight: 700 !important;
  color: #141414 !important;
  line-height: 1.4 !important;
}
.row .sub {
  font-size: 13px !important;
  color: #666666 !important;
}

/* Status chips */
.chip {
  display: inline-block !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  padding: 3px 12px !important;
  white-space: nowrap !important;
  line-height: 1.3 !important;
}
.chip.gold,
.chip.red {
  background: #e10600 !important;
  color: #ffffff !important;
}
.chip.gray {
  background: #ececea !important;
  color: #666666 !important;
}
.chip.pine {
  background: #141414 !important;
  color: #ffffff !important;
}

/* 5. Checkered-flag strip: height 8px under top header */
.bar {
  position: relative !important;
  border-bottom: none !important;
  padding-bottom: 16px !important;
  margin-bottom: 8px !important;
}
.bar::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 8px !important;
  background: conic-gradient(#141414 25%, #fff 0 50%, #141414 0 75%, #fff 0) 0 0/8px 8px !important;
}
.bar.sub {
  border-bottom: none !important;
  padding-bottom: 16px !important;
}

.qtop {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: rgba(247, 247, 245, 0.96) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}
.qtop::after {
  content: '' !important;
  display: block !important;
  width: 100% !important;
  height: 8px !important;
  background: conic-gradient(#141414 25%, #fff 0 50%, #141414 0 75%, #fff 0) 0 0/8px 8px !important;
  margin-top: 10px !important;
}

/* 6. Primary and ghost buttons */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 48px !important;
  padding: 0 22px !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  background: #e10600 !important;
  color: #ffffff !important;
  border: none !important;
  transform: skewX(-8deg) !important;
  box-shadow: 0 2px 6px rgba(225, 6, 0, 0.28) !important;
  transition: transform 0.12s, opacity 0.2s, background 0.2s !important;
  cursor: pointer !important;
}
.btn > * {
  display: inline-block !important;
  transform: skewX(8deg) !important;
}
.btn:active {
  transform: skewX(-8deg) scale(0.97) !important;
}
.btn[disabled] {
  opacity: 0.35 !important;
  cursor: default !important;
  box-shadow: none !important;
}

.btn.pine {
  background: #141414 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(20, 20, 20, 0.25) !important;
}

.btn.ghost {
  background: #ffffff !important;
  color: #141414 !important;
  border: 2px solid #141414 !important;
  box-shadow: none !important;
}
.btn.ghost:active {
  background: #f0f0ee !important;
  transform: skewX(-8deg) scale(0.97) !important;
}

.btn.line {
  background: transparent !important;
  color: #141414 !important;
  border: 2px solid #141414 !important;
  box-shadow: none !important;
}

.btn.sm {
  min-height: 44px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
  border-radius: 4px !important;
}

.btn.block {
  width: 100% !important;
}

/* 交卷 button: prominent primary red button */
#fin,
.btn#fin,
.btn.sm.line#fin {
  background: #e10600 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 8px rgba(225, 6, 0, 0.35) !important;
  transform: skewX(-8deg) !important;
  min-height: 44px !important;
}

/* 7. Section headings */
.secH {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  border-bottom: 2px solid #141414 !important;
  padding-bottom: 8px !important;
  margin: 32px 0 14px !important;
}
.secH .t {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: var(--fd) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  color: #141414 !important;
  text-transform: none !important;
}
.secH .t b {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: var(--fr) !important;
  font-style: italic !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  color: #e10600 !important;
  margin-right: 4px !important;
}
.secH .t b::before {
  content: '' !important;
  display: inline-block !important;
  width: 4px !important;
  height: 14px !important;
  background: #e10600 !important;
  transform: skewX(-8deg) !important;
  border-radius: 1px !important;
}
.secH .r {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #666666 !important;
}

/* Inputs & Form controls */
input.text, select.text {
  font: inherit !important;
  font-size: 16px !important;
  padding: 12px 14px !important;
  border-radius: 4px !important;
  border: 2px solid #141414 !important;
  background: #ffffff !important;
  color: #141414 !important;
  min-height: 48px !important;
}

/* Rule divider */
.rule {
  width: 48px !important;
  height: 4px !important;
  background: #e10600 !important;
  transform: skewX(-8deg) !important;
  margin: 16px 0 !important;
}

/* Pick names screen */
.lvsec h3 {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #141414 !important;
  margin: 24px 0 10px !important;
  border-left: 4px solid #e10600 !important;
  padding-left: 8px !important;
}
.names {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  gap: 10px !important;
}
.names button {
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-radius: 4px !important;
  border: 1px solid rgba(20, 20, 20, 0.08) !important;
  border-left: 4px solid #141414 !important;
  padding: 14px 8px !important;
  font-weight: 700 !important;
  font-size: 17px !important;
  color: #141414 !important;
  min-height: 52px !important;
  transition: transform 0.1s, border-left-color 0.1s !important;
}
.names button:active {
  background: #ececea !important;
  border-left-color: #e10600 !important;
}
.names button[disabled] {
  opacity: 0.4 !important;
  border-left-color: #cccccc !important;
  cursor: default !important;
  box-shadow: none !important;
}

/* Intro overlay */
.intro {
  background: #f7f7f5 !important;
}
.intro .skip {
  color: #666666 !important;
  font-weight: 700 !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 10px 16px !important;
}
.intro .pg h1 em {
  color: #e10600 !important;
}
.intro .pip {
  background: #d8d8d6 !important;
  border-radius: 4px !important;
  height: 8px !important;
  width: 8px !important;
  transition: width 0.2s, background 0.2s !important;
}
.intro .pip.on {
  background: #e10600 !important;
  width: 24px !important;
}
.intro .earn div {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-bottom: 3px solid #e10600 !important;
  transform: skewX(-8deg) !important;
}
.intro .earn div > * {
  transform: skewX(8deg) !important;
}

/* Home links & details */
.links {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-left: 5px solid #141414 !important;
  overflow: hidden !important;
  margin-top: 18px !important;
}
.links button {
  min-height: 52px !important;
  padding: 14px 18px !important;
}
.links button:active {
  background: #f7f7f5 !important;
}

.bar .me {
  min-height: 44px !important;
}
.bar .me .av {
  background: #e10600 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  transform: skewX(-8deg) !important;
}
.bar .me .av > svg {
  transform: skewX(8deg) !important;
}
.back {
  color: #141414 !important;
  font-weight: 700 !important;
  min-height: 44px !important;
  padding: 10px 4px !important;
  display: inline-flex !important;
  align-items: center !important;
}
#how {
  color: #e10600 !important;
  font-weight: 700 !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
}

.banner {
  background: #141414 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  border-left: 4px solid #e10600 !important;
}

/* Set page */
.step-label {
  font-family: var(--fm) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  color: #e10600 !important;
  margin-bottom: 6px !important;
  margin-top: 20px !important;
  text-transform: uppercase !important;
}
.rules {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  margin: 16px 0 !important;
}
.rules div {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-bottom: 3px solid #141414 !important;
  transform: skewX(-8deg) !important;
  padding: 12px 8px !important;
  text-align: center !important;
}
.rules div > * {
  transform: skewX(8deg) !important;
}
.rules b {
  font-size: 24px !important;
}
.rules span {
  font-size: 13px !important;
  color: #666666 !important;
  font-weight: 700 !important;
}
.concepts {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-left: 5px solid #141414 !important;
  overflow: hidden !important;
}
.concepts .n {
  color: #e10600 !important;
}
.vbox {
  border-radius: 4px !important;
}
.vprog {
  height: 8px !important;
  background: #ececea !important;
  border-radius: 4px !important;
}
.vprog i {
  background: #141414 !important;
  border-radius: 4px !important;
}
.vprog b {
  background: #e10600 !important;
}

/* Quiz screen */
.dots {
  display: flex !important;
  gap: 6px !important;
  margin-top: 8px !important;
}
.dots button {
  flex: 1 !important;
  height: 44px !important;
  border-radius: 4px !important;
  background: #ececea !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #666666 !important;
  transform: skewX(-8deg) !important;
}
.dots button.on {
  background: #141414 !important;
  color: #ffffff !important;
}
.dots button.cur {
  outline: 2px solid #e10600 !important;
  outline-offset: 2px !important;
}
.stim {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-left: 4px solid #141414 !important;
}
.stim .gt, .stim .tg {
  color: #141414 !important;
  font-weight: 700 !important;
}
.qcard {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  padding: 20px !important;
}
.opts {
  display: grid !important;
  gap: 10px !important;
  margin-top: 14px !important;
}
.opt {
  display: grid !important;
  grid-template-columns: 32px 1fr auto !important;
  gap: 12px !important;
  align-items: center !important;
  text-align: left !important;
  padding: 13px 14px !important;
  border-radius: 4px !important;
  border: 2px solid #ececea !important;
  background: #ffffff !important;
  font-size: 17px !important;
  line-height: 1.5 !important;
  min-height: 52px !important;
  transition: border-color 0.15s, background 0.15s !important;
  cursor: pointer !important;
}
.opt .L {
  width: 30px !important;
  height: 30px !important;
  border-radius: 4px !important;
  border: 2px solid #141414 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  font-family: var(--fr) !important;
  font-style: italic !important;
}
.opt[aria-pressed=true] {
  border-color: #141414 !important;
  background: #f0f0ee !important;
}
.opt[aria-pressed=true] .L {
  background: #141414 !important;
  border-color: #141414 !important;
  color: #ffffff !important;
}

/* Quiz review options */
.opt.right {
  border-color: #1a8f3c !important;
  background: #e8f5ec !important;
}
.opt.right .L {
  background: #1a8f3c !important;
  border-color: #1a8f3c !important;
  color: #ffffff !important;
}
.opt.wrong {
  border-color: #e10600 !important;
  background: #fde8e8 !important;
}
.opt.wrong .L {
  background: #e10600 !important;
  border-color: #e10600 !important;
  color: #ffffff !important;
}
.opt .mine {
  color: #e10600 !important;
  font-weight: 700 !important;
}

/* Result page */
.score {
  text-align: center;
  padding: 30px 0 10px;
}
.score .big {
  font-size: 80px !important;
  line-height: 1 !important;
}
.rq {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  margin-bottom: 12px !important;
  overflow: hidden !important;
}
.rq summary {
  padding: 14px 16px !important;
  min-height: 48px !important;
}
.rq .res.ok {
  color: #1a8f3c !important;
  font-weight: 800 !important;
}
.rq .res.bad {
  color: #e10600 !important;
  font-weight: 800 !important;
}
.rq .ex {
  background: #f7f7f5 !important;
  border-radius: 4px !important;
  border-left: 3px solid #141414 !important;
  padding: 12px 14px !important;
}

/* Bottom sheets */
.sheet-bg {
  background: rgba(20, 20, 20, 0.45) !important;
}
.sheet {
  background: #ffffff !important;
  border-radius: 12px 12px 0 0 !important;
  border-top: 4px solid #e10600 !important;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12) !important;
}
.sheet .grab {
  background: #d8d8d6 !important;
  width: 44px !important;
  height: 4px !important;
  border-radius: 2px !important;
}
.sheet h2 {
  color: #141414 !important;
  font-family: var(--fd) !important;
  font-weight: 900 !important;
}
.sheet .who {
  color: #141414 !important;
  font-family: var(--fd) !important;
}
.acct .guide {
  color: #e10600 !important;
  font-weight: 700 !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
}
.earn {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  margin-top: 14px !important;
}
.earn div {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-bottom: 3px solid #e10600 !important;
  transform: skewX(-8deg) !important;
  padding: 12px 8px !important;
  text-align: center !important;
}
.earn div > * {
  transform: skewX(8deg) !important;
}

/* Wrong-answer book */
.wl {
  background: #ffffff !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-left: 5px solid #141414 !important;
  overflow: hidden !important;
}
.wl button {
  min-height: 48px !important;
  padding: 13px 18px !important;
}
.wl button:active {
  background: #f7f7f5 !important;
}

/* Card fallback & misc components */
.card {
  background: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  border-radius: 4px !important;
}
.note {
  background: #ffffff !important;
  border-left: 4px solid #141414 !important;
  border-radius: 0 4px 4px 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}
.toast {
  background: #141414 !important;
  border-radius: 4px !important;
  border-left: 3px solid #e10600 !important;
}
.foot button, .foot a {
  min-height: 44px !important;
  padding: 10px 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #666666 !important;
}

/* Mobile responsive adjustments */
@media (max-width: 420px) {
  .stats {
    gap: 8px !important;
    margin: 16px 2px !important;
  }
  .stats .n {
    font-size: 26px !important;
  }
  .stats .label {
    font-size: 11px !important;
  }
  .score .big {
    font-size: 64px !important;
  }
  .earn {
    gap: 6px !important;
  }
  .earn div {
    padding: 10px 4px !important;
  }
  .earn b {
    font-size: 20px !important;
  }
  .rules {
    gap: 6px !important;
  }
  .rules b {
    font-size: 20px !important;
  }
}

/* Sol 驗收後補：略過更好找、得分說明字放大 */
.intro .skip { color: #141414 !important; font-size: 16px !important; }
.earn span { font-size: 14px !important; line-height: 1.45 !important; color: #444 !important; }

/* ===== 首頁第三版：大區塊標題、頒獎台排行、單元卡片 ===== */
.hsec { display: flex; align-items: baseline; gap: 10px; margin: 44px 0 16px; padding-bottom: 10px; border-bottom: 3px solid #141414; }
.hsec .hn { font-family: "Russo One", sans-serif; font-style: italic; font-size: 30px; line-height: 1; color: #e10600; }
.hsec h2 { font-size: 28px; font-weight: 900; line-height: 1.1; margin: 0; color: #141414; }
.hsec .hs { margin-left: auto; font-size: 13px; color: #666; font-weight: 700; white-space: nowrap; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin-top: 8px; }
.pd { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.pd .pname { font-weight: 900; font-size: 15px; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd .pname em, .lrow .nm em { font-style: normal; font-size: 11px; font-weight: 900; background: #e10600; color: #fff; padding: 1px 6px; margin-left: 4px; border-radius: 3px; vertical-align: 2px; }
.pd .pscore { font-family: "Russo One", sans-serif; font-style: italic; font-size: 22px; color: #e10600; margin: 2px 0 6px; }
.pd .pblock { width: 100%; background: #141414; color: #fff; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; transform: skewX(-8deg); box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.pd .pblock span { transform: skewX(8deg); font-family: "Russo One", sans-serif; font-style: italic; font-size: 38px; line-height: 1; }
.pd.pl1 .pblock { height: 118px; background: #e10600; }
.pd.pl1 .pname { font-size: 17px; }
.pd.pl1 .pscore { font-size: 28px; color: #141414; }
.pd.pl1 .pblock span { font-size: 54px; }
.pd.pl2 .pblock { height: 86px; }
.pd.pl3 .pblock { height: 64px; }
.pd.me .pblock { outline: 4px solid #e10600; outline-offset: 3px; }
.pd.pl1.me .pblock { outline-color: #141414; }

.lrows { display: grid; gap: 6px; margin-top: 14px; }
.lrow { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; min-height: 48px; padding: 6px 16px; background: #fff; transform: skewX(-8deg); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.lrow > * { transform: skewX(8deg); }
.lrow .rk, .lrow .sc { font-family: "Russo One", sans-serif; font-style: italic; font-size: 20px; }
.lrow .nm { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow.me { background: #e10600; color: #fff; }
.lrow.me .nm em { background: #fff; color: #e10600; }

.chase { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 16px; background: #fff; border-left: 5px solid #e10600; font-size: 15px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.chase b { font-family: "Russo One", sans-serif; font-style: italic; font-size: 22px; color: #e10600; font-weight: 400; }
.chase #how { flex: none; font-size: 14px; font-weight: 900; color: #e10600; min-height: 44px; }

#units { display: grid; gap: 18px; }
.ucard { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); overflow: hidden; }
.ucard .uhd { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px 14px 0; border-bottom: 1px solid #ececea; }
.ucard .unum { align-self: stretch; display: flex; align-items: center; justify-content: center; background: #141414; color: #fff; font-family: "Russo One", sans-serif; font-style: italic; font-size: 34px; margin: -14px 0; }
.ucard.all .unum { background: #e10600; }
.ucard .utt { font-size: 20px; font-weight: 900; line-height: 1.3; }
.ucard .utt small { display: block; font-size: 12px; font-weight: 700; color: #e10600; letter-spacing: .1em; }
.ucard .uprog { font-family: "Russo One", sans-serif; font-style: italic; font-size: 22px; }
.ucard .uprog small { font-size: 14px; color: #666; }
.erow { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px 16px; text-align: left; border-top: 1px solid #f0f0ee; background: #fff; }
.erow:first-of-type { border-top: 0; }
.erow:hover { background: #fafaf8; }
.erow .ep { font-size: 13px; font-weight: 900; color: #666; }
.erow .tt { font-size: 16px; font-weight: 700; line-height: 1.4; }
.erow .st { text-align: right; }
#worlds .erow .ep { font-size: 12px; }
@media (max-width: 420px) {
  .hsec h2 { font-size: 24px; }
  .hsec .hn { font-size: 26px; }
  .ucard .uhd { grid-template-columns: 54px 1fr auto; }
  .ucard .utt { font-size: 18px; }
  .erow { grid-template-columns: 44px 1fr auto; }
}
.erow .sc { font-family: "Russo One", sans-serif; font-style: italic; font-size: 22px; color: #e10600; line-height: 1.1; }
.erow .sc small { font-size: 13px; color: #666; }
.erow .sub { font-size: 12px; color: #666; white-space: nowrap; }
/* Sol 第二輪：區塊標題要比單元編號大；練習次數字放大 */
.hsec h2 { font-size: 32px; }
.hsec .hn { font-size: 34px; }
.ucard .unum { font-size: 26px; }
.ucard .uhd { grid-template-columns: 52px 1fr auto; }
.erow .sub { font-size: 13px; color: #444; }
@media (max-width: 420px) { .hsec h2 { font-size: 28px; } .hsec .hn { font-size: 30px; } .ucard .uhd { grid-template-columns: 48px 1fr auto; } }

/* 登入頁：學生、老師兩個入口 */
.entry { display: grid; gap: 12px; margin-top: 24px; width: 100%; }
.ent { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; padding: 16px 18px; min-height: 76px; text-decoration: none; transform: skewX(-6deg); box-shadow: 0 3px 10px rgba(0,0,0,.10); }
.ent > * { transform: skewX(6deg); }
.ent .who { grid-row: 1 / 3; font-size: 13px; font-weight: 900; letter-spacing: .1em; padding: 6px 8px; border: 2px solid currentColor; }
.ent b { font-size: 20px; font-weight: 900; line-height: 1.2; }
.ent .d { font-size: 13px; font-weight: 700; opacity: .85; }
.ent.stu { background: #e10600; color: #fff; }
.ent.tch { background: #fff; color: #141414; border: 2px solid #141414; }
.ent:disabled { opacity: .6; }
.ent { grid-template-columns: 1fr; }

/* ===== 首頁第四版：依序解鎖、電腦版三欄 ===== */
.hsec .hbar { width: 10px; height: 24px; background: #e10600; transform: skewX(-12deg); align-self: center; }
.hmap { display: none; }
.hgrid, .hmain, .hside { display: contents; }
.home section { display: block; }
.home .o1 { order: 1; } .home .o2 { order: 2; } .home .o3 { order: 3; } .home .o4 { order: 4; } .home .o5 { order: 5; } .home .o6 { order: 6; }
.home .hgrid { display: flex; flex-direction: column; }
.home .hmain, .home .hside { display: contents; }

.next { display: grid; gap: 4px; width: 100%; text-align: left; background: #141414; color: #fff; padding: 18px; box-shadow: 0 6px 16px rgba(0,0,0,.2); border: 0; cursor: pointer; }
.next .tag { justify-self: start; background: #e10600; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .08em; padding: 3px 8px; }
.next .u { font-size: 13px; color: #bdbdbd; font-weight: 700; margin-top: 8px; }
.next .h3 { font-size: 26px; font-weight: 900; line-height: 1.25; margin-bottom: 10px; }
.next .steps { display: grid; gap: 8px; }
.next .step { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; background: rgba(255,255,255,.08); padding: 10px 12px; font-size: 15px; font-weight: 700; }
.next .step b { font-family: "Russo One", sans-serif; font-style: italic; font-weight: 400; font-size: 20px; color: #e10600; }
.next .step.ok b { color: #7fd18b; }
.next .step em { font-style: normal; font-size: 12px; color: #bdbdbd; }
.next .go { display: block; margin-top: 12px; background: #e10600; color: #fff; text-align: center; font-weight: 900; font-size: 17px; padding: 13px; transform: skewX(-6deg); }
.next.fin { cursor: default; }
.next.fin .u { margin-top: 0; }

.done { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.drow { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px 16px; text-align: left; border-top: 1px solid #f0f0ee; background: #fff; }
.drow:first-child { border-top: 0; }
.drow:hover { background: #fafaf8; }
.drow .ep { font-size: 13px; font-weight: 900; color: #666; }
.drow .tt { font-size: 16px; font-weight: 700; line-height: 1.4; }
.drow .st { text-align: right; }
.drow .sc { font-family: "Russo One", sans-serif; font-style: italic; font-size: 22px; color: #e10600; line-height: 1.1; }
.drow .sc small { font-size: 13px; color: #666; }
.drow .sub { font-size: 13px; color: #444; white-space: nowrap; }
.more { display: block; width: 100%; padding: 12px; min-height: 44px; border-top: 1px solid #f0f0ee; font-weight: 900; font-size: 14px; color: #141414; background: #fff; }
.empty-done { background: #fff; padding: 16px; color: #666; font-size: 15px; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.locked { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px dashed #c9c9c6; padding: 16px; color: #666; font-size: 14px; }
.locked svg { flex: none; color: #141414; }
.locked b { display: block; color: #141414; font-size: 17px; font-weight: 900; }

@media (min-width: 1000px) {
  .wrap.home { max-width: 1240px; }
  .home .hgrid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; gap: 28px; align-items: start; margin-top: 18px; }
  .home .hmain, .home .hside { display: block; }
  .home .hside .hsec:first-child, .home .hmain .o1 + section .hsec { margin-top: 24px; }
  .home .hside .o3 .hsec { margin-top: 0; }
  .hmap { display: block; position: sticky; top: 16px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
  .maph { padding: 12px 14px; font-size: 15px; font-weight: 900; border-bottom: 3px solid #141414; }
  .mu { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 10px 14px; min-height: 44px; text-align: left; border-top: 1px solid #ececea; background: #fff; font-size: 14px; font-weight: 700; }
  .mu .n { font-family: "Russo One", sans-serif; font-style: italic; font-size: 18px; }
  .mu .s { font-size: 12px; font-weight: 900; color: #1a8f3c; }
  .mu.cur { background: #fff1f0; box-shadow: inset 4px 0 #e10600; }
  .mu.cur .n, .mu.cur .s { color: #e10600; }
  .mu.lk { opacity: .5; cursor: default; }
  .mu.lk .s { color: #666; }
  .mu.w { border-top: 3px solid #141414; }
  .next .h3 { font-size: 30px; }
}
.pd .pname { white-space: normal; overflow: visible; word-break: keep-all; overflow-wrap: anywhere; }
.pd .pname em { display: inline-block; margin: 2px 0 0 4px; }
.home .o2 .hsec { margin-top: 28px; }
@media (min-width: 1000px) { .home .o2 .hsec { margin-top: 24px; } }

/* 網站名稱：KidWind Road to Worlds */
.brand { display: grid; gap: 2px; margin: 6px 0 4px; }
.brand .k { font-family: "Russo One", sans-serif; font-style: italic; font-size: 20px; letter-spacing: .04em; color: #141414; }
.brand .k i { color: #e10600; }
.brand .n { font-family: "Russo One", sans-serif; font-style: italic; font-size: 52px; line-height: .98; color: #e10600; }
.brand .zh { margin-top: 10px; font-size: 16px; font-weight: 900; color: #141414; }
