:root {
  --cream: #fff1d0;
  --cream2: #ffe7b0;
  --paper: #ffffff;
  --ink: #2a2438;
  --ink2: #5b5470;
  --coral: #ff6f59;
  --coral-d: #e2503a;
  --sun: #ffc83d;
  --lime: #b7e24b;
  --green: #2fb67c;
  --green-d: #1d8f5d;
  --teal: #17a398;
  --sky: #5bb8f5;
  --grape: #7c5cff;
  --pink: #ff9ec4;
  --r: 18px;
  --bd: 2.5px solid var(--ink);
  --sh: 0 4px 0 var(--ink);
  --font-d: 'Baloo 2', 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --font-b: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 600 16px/1.45 var(--font-b);
  background-image: radial-gradient(circle at 1px 1px, rgba(42, 36, 56, 0.09) 1.5px, transparent 0);
  background-size: 22px 22px;
  overflow-x: hidden;
  min-height: 100vh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
h1,
h2,
h3 {
  font-family: var(--font-d);
  line-height: 1.1;
  margin: 0;
  font-weight: 800;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 6px 16px 20px;
  outline: none;
}
.top {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  --hh: 40px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--hh);
  text-decoration: none;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo small {
  display: none;
  font: 700 11px/1 var(--font-b);
  letter-spacing: 0.2px;
  color: var(--ink2);
  margin-top: -2px;
}
.stars {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: var(--bd);
  border-radius: 999px;
  height: var(--hh);
  padding: 0 12px 0 10px;
  box-shadow: 0 3px 0 var(--ink);
  font: 800 16px var(--font-d);
  text-decoration: none;
}
.stars svg {
  width: 20px;
  height: 20px;
}

/* tabs */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  gap: 4px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: var(--bd);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px 4px;
  text-decoration: none;
  border-radius: 14px;
  font: 800 11px/1.1 var(--font-b);
  color: var(--ink2);
  border: 2.5px solid transparent;
  min-height: 54px;
  justify-content: center;
}
.tab svg {
  width: 26px;
  height: 26px;
}
.tab[aria-current='page'] {
  background: var(--sun);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  transform: translateY(-2px);
}

/* cards & buttons */
.card {
  background: var(--paper);
  border: var(--bd);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--bd);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--sh);
  padding: 12px 18px;
  font: 800 17px var(--font-d);
  text-decoration: none;
  min-height: 50px;
  transition:
    transform 120ms var(--ease-out),
    box-shadow 120ms var(--ease-out);
  user-select: none;
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--ink);
}
.btn.primary {
  background: var(--coral);
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.btn.sun {
  background: var(--sun);
}
.btn.green {
  background: var(--green);
  color: #fff;
}
.btn.sky {
  background: var(--sky);
}
.btn.sm {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 15px;
  border-radius: 13px;
}
.btn.ghost {
  box-shadow: none;
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  min-height: 44px;
}
.btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.wrap {
  flex-wrap: wrap;
}
.spacer {
  height: 14px;
}
.muted {
  color: var(--ink2);
}
.eyebrow {
  font: 800 12px var(--font-b);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink2);
}
.h-title {
  font-size: 30px;
  margin: 6px 0 4px;
}
.lede {
  color: var(--ink2);
  margin: 0 0 12px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 800 15px var(--font-d);
  text-decoration: none;
  padding: 8px 12px 8px 8px;
  margin: 4px 0;
  border-radius: 999px;
  background: var(--paper);
  border: var(--bd);
  box-shadow: 0 3px 0 var(--ink);
}
.back svg {
  width: 20px;
  height: 20px;
}

/* court */
.stage {
  position: relative;
  z-index: 5;
  margin-bottom: 12px;
}
.court-card {
  background: var(--paper);
  border: var(--bd);
  border-radius: 22px;
  box-shadow: var(--sh);
  padding: 8px;
  position: relative;
}
.court-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  touch-action: manipulation;
}
.court-svg .hl {
  fill: #fff3a6;
  stroke: #2a2438;
  stroke-width: 0.28;
  stroke-dasharray: 0.7 0.45;
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
  pointer-events: none;
}
.court-svg .hl.on {
  opacity: 0.85;
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}
.court-svg .netglow {
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}
.court-svg .netglow.on {
  opacity: 1;
  animation: pulse 1.1s ease-in-out infinite;
}
.court-svg .zone {
  fill: transparent;
  cursor: pointer;
}
.court-svg.scn .svc {
  display: none;
}
.court-svg .lbl {
  pointer-events: none;
  font-family: var(--font-d);
  font-weight: 800;
  fill: #fff;
  opacity: 0.55;
  letter-spacing: 0.15px;
}
.court-svg .pl-label {
  font-family: var(--font-d);
  font-weight: 800;
  fill: var(--ink);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 0.55;
  stroke-linejoin: round;
}
.court-svg .mark circle {
  fill: none;
  stroke: var(--coral);
  stroke-width: 0.4;
}
.court-svg .mark .x {
  stroke: var(--coral);
  stroke-width: 0.45;
  stroke-linecap: round;
}
.court-svg .mark.new .ring {
  animation: ripple 0.9s ease-out forwards;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes ripple {
  from {
    transform: scale(0.3);
    opacity: 1;
  }
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}
.court-svg .pl.faulty .body {
  fill: var(--coral-d);
}
.court-svg .pl.faulty .fx {
  animation: wig 280ms var(--ease-out) 2;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes wig {
  25% {
    transform: rotate(-14deg);
  }
  75% {
    transform: rotate(14deg);
  }
}
.court-svg .badge text {
  font-family: var(--font-d);
  font-weight: 800;
  fill: #fff;
  text-anchor: middle;
}
.court-svg .ballfx {
  opacity: 0;
}
.court-svg .ballfx.on {
  opacity: 1;
  animation: pop 240ms var(--ease-out);
}
@keyframes pop {
  from {
    transform: scale(0.94);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

.cap {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 8px 6px 4px;
}
.cap .mascot {
  flex: none;
  width: 44px;
  height: 44px;
}
.cap .bubble {
  position: relative;
  flex: 1;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.cap .bubble:before {
  content: '';
  position: absolute;
  left: -9px;
  top: 50%;
  width: 14px;
  height: 14px;
  background: var(--cream);
  border-left: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: translateY(-50%) rotate(45deg);
}
.cap .bubble.pop {
  animation: bpop 0.2s var(--ease-out);
}
@keyframes bpop {
  from {
    transform: scale(0.96);
    opacity: 0.4;
  }
}
.cap .bubble a {
  color: var(--coral-d);
  font-weight: 800;
}
.ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 2px;
}
.ctrl .cb {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: var(--bd);
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  display: grid;
  place-items: center;
  padding: 0;
}
.ctrl .cb:active {
  transform: translateY(3px);
  box-shadow: none;
}
.ctrl .cb svg {
  width: 22px;
  height: 22px;
}
.ctrl .cb.main {
  width: 58px;
  background: var(--coral);
  color: #fff;
}
.ctrl .cb[disabled] {
  opacity: 0.35;
}
.pips {
  flex: 1;
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  padding: 0 4px;
}
.pip {
  height: 12px;
  flex: 1;
  max-width: 30px;
  border-radius: 99px;
  background: #ddd5c3;
  border: 2px solid var(--ink);
  padding: 0;
}
.pip.done {
  background: var(--sun);
}
.pip.cur {
  background: var(--coral);
  transform: scaleY(1.3);
}
.speed {
  font: 800 13px var(--font-d);
  min-width: 46px;
  height: 46px;
  border-radius: 14px;
  border: var(--bd);
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
}
.stamp {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 9px;
  border: var(--bd);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 4px 0 var(--ink);
  transform: translate(-50%, -50%) rotate(-4deg);
  animation:
    stampin 280ms var(--ease-out) both,
    stampout 200ms 2.6s var(--ease-out) forwards;
  line-height: 1;
}
.stamp.legal {
  background: var(--green);
}
.stamp.fault {
  background: var(--coral);
}
.stamp .st-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 800 27px/1 var(--font-d);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 0 var(--ink);
}
.stamp i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: var(--bd);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 2px 0 var(--ink);
  text-shadow: none;
}
.stamp.legal i {
  color: var(--green-d);
}
.stamp.fault i {
  color: var(--coral-d);
}
.stamp i svg {
  width: 16px;
  height: 16px;
}
.stamp small {
  font: 800 13px/1 var(--font-d);
  letter-spacing: 0.3px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 10px 4px;
}
@keyframes stampout {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-4deg) scale(0.9);
  }
}
@keyframes stampin {
  from {
    transform: translate(-50%, -50%) rotate(-12deg) scale(1.6);
    opacity: 0;
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-2deg) scale(0.94);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stamp {
    animation:
      stampfade 0.15s both,
      stampout 0.2s 2.6s forwards;
  }
  @keyframes stampfade {
    from {
      opacity: 0;
    }
  }
  .court-svg .ballfx.on {
    animation: none;
  }
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: var(--bd);
  border-radius: 18px;
  box-shadow: var(--sh);
  padding: 4px 6px 4px 14px;
}
.searchbar svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.searchbar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: 700 18px var(--font-b);
  color: var(--ink);
  padding: 12px 4px;
}
.searchbar input::placeholder {
  color: #9a93ab;
}
.searchbar .x {
  border: 0;
  background: var(--cream2);
  border-radius: 99px;
  width: 34px;
  height: 34px;
  font-weight: 800;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  border-radius: 999px;
  padding: 5px 12px;
  font: 800 14px var(--font-b);
  text-decoration: none;
  box-shadow: 0 3px 0 var(--ink);
  min-height: 36px;
}
.chip:active {
  transform: translateY(3px);
  box-shadow: none;
}
.rid {
  display: inline-block;
  font: 800 13px/1 var(--font-d);
  background: var(--ink);
  color: var(--cream);
  border-radius: 8px;
  padding: 5px 8px;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

/* lookup */
.results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.res {
  display: block;
  text-decoration: none;
  padding: 12px 14px;
  background: var(--paper);
  border: var(--bd);
  border-radius: 16px;
  box-shadow: 0 3px 0 var(--ink);
}
.res:active {
  transform: translateY(3px);
  box-shadow: none;
}
.res .t {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  font: 800 18px/1.15 var(--font-d);
}
.res .s {
  font-size: 14.5px;
  color: #3d3750;
}
.tag {
  flex: none;
  font: 800 11px var(--font-b);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 3px 6px;
  background: var(--lime);
  border: 2px solid var(--ink);
}
.tag.term {
  background: var(--pink);
}
.tag.myth {
  background: var(--sun);
}
mark {
  background: var(--sun);
  color: inherit;
  border-radius: 3px;
  padding: 0;
}
input[type='search']::-webkit-search-cancel-button {
  display: none;
}
.secgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 92px;
  text-decoration: none;
  padding: 12px;
  border: var(--bd);
  border-radius: 16px;
  box-shadow: 0 3px 0 var(--ink);
}
.sec b {
  font: 800 28px/1 var(--font-d);
}
.sec span {
  font: 800 15px/1.15 var(--font-d);
}
.sec small {
  font: 700 12px var(--font-b);
  opacity: 0.75;
  margin-top: auto;
}
.sec:active {
  transform: translateY(3px);
  box-shadow: none;
}
.rulelist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.rl {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 13px;
  padding: 9px 12px;
  font: 800 16px/1.15 var(--font-d);
  min-height: 48px;
}
.rl:active {
  background: var(--cream2);
}
.rl.d2 {
  margin-left: 14px;
}
.rl.d3 {
  margin-left: 28px;
}
.rl.d4 {
  margin-left: 42px;
}
.rule-hero {
  padding: 18px;
}
.rule-hero h1 {
  font-size: 30px;
  margin: 8px 0 10px;
}
.rule-hero .sum {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}
.why {
  margin-top: 14px;
  background: var(--sun);
  border: var(--bd);
  border-radius: 16px;
  padding: 12px 14px 12px 54px;
  position: relative;
  font-weight: 700;
}
.why svg {
  position: absolute;
  left: 12px;
  top: 10px;
  width: 32px;
  height: 32px;
}
.why b {
  display: block;
  font: 800 12px var(--font-b);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.sub {
  margin-top: 20px;
}
.sub h2 {
  font-size: 21px;
  margin-bottom: 8px;
}
.show {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  padding: 12px;
  background: var(--paper);
  border: var(--bd);
  border-radius: 16px;
  box-shadow: 0 3px 0 var(--ink);
  margin-bottom: 10px;
}
.show .play {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 99px;
  background: var(--coral);
  border: var(--bd);
  display: grid;
  place-items: center;
  color: #fff;
}
.show .play svg {
  width: 20px;
  height: 20px;
}
.show b {
  font: 800 17px/1.15 var(--font-d);
  display: block;
}
.show small {
  font-size: 13px;
  color: var(--ink2);
  font-weight: 700;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-weight: 800;
  font-size: 13px;
}
.crumbs a {
  text-decoration: none;
  background: var(--cream2);
  border-radius: 8px;
  padding: 4px 8px;
}
.official {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-weight: 800;
}

.question {
  margin-top: 14px;
  font: 800 21px/1.25 var(--font-d);
  background: var(--paper);
  border: var(--bd);
  border-radius: 18px;
  box-shadow: var(--sh);
  padding: 14px 16px;
}
.question .eyebrow {
  display: block;
  margin-bottom: 4px;
}
.guess {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.gbtn {
  --press: 6px;
  border: var(--bd);
  border-radius: 20px;
  box-shadow: 0 var(--press) 0 var(--ink);
  padding: 16px 8px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 800 26px var(--font-d);
  transition:
    transform 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}
.gbtn:active {
  transform: translateY(var(--press));
  box-shadow: 0 0 0 var(--ink);
  transition-duration: 80ms;
}
@media (prefers-reduced-motion: reduce) {
  .gbtn,
  .gbtn:active {
    transition: none;
  }
}
.gbtn svg {
  width: 38px;
  height: 38px;
}
.gbtn[data-tone='0'] {
  background: var(--green);
  color: #fff;
}
.gbtn[data-tone='1'] {
  background: var(--coral);
  color: #fff;
}
.gbtn[data-tone='2'] {
  background: var(--grape);
  color: #fff;
}
.gbtn[data-tone='3'] {
  background: var(--sun);
  color: var(--ink);
}
.gbtn small {
  font: 700 13px var(--font-b);
  opacity: 0.9;
}
.guess[data-n='3'] .gbtn:last-child {
  grid-column: 1 / -1;
}
.guess[data-n='3'] .gbtn,
.guess[data-n='4'] .gbtn {
  min-height: 84px;
  font-size: 22px;
}
.sheet .guess[data-n='3'] .gbtn,
.sheet .guess[data-n='4'] .gbtn {
  min-height: 62px;
  font-size: 20px;
}
.sheet .guess[data-n='3'] .gbtn svg,
.sheet .guess[data-n='4'] .gbtn svg {
  width: 22px;
  height: 22px;
}
.locked {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.reveal {
  margin-top: 16px;
  border: var(--bd);
  border-radius: 22px;
  box-shadow: var(--sh);
  padding: 16px;
  background: var(--paper);
  animation: rise 260ms var(--ease-out) both;
}
@keyframes rise {
  from {
    transform: translateY(30px) scale(0.96);
    opacity: 0;
  }
}
.reveal.good {
  background: #e6f8d6;
}
.reveal.bad {
  background: #ffe9c7;
}
.reveal .head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reveal .head .replay {
  margin-left: auto;
  flex: none;
  min-width: 46px;
  padding: 8px 10px;
}
.reveal .head .mascot {
  width: 60px;
  height: 60px;
  flex: none;
}
.reveal h2 {
  font-size: 28px;
}
.reveal .v {
  font: 800 14px var(--font-b);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink2);
}
.reveal p {
  margin: 12px 0 4px;
  font-size: 17px;
  font-weight: 700;
}
.cites {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.cite {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 13px;
  padding: 9px 12px;
  font: 800 15px/1.15 var(--font-d);
  min-height: 46px;
}
.cite:active {
  background: var(--cream2);
}
.shake {
  animation: shk 300ms var(--ease-out);
}
@keyframes shk {
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}
.confetti {
  position: fixed;
  left: 0;
  top: 0;
  width: 10px;
  height: 14px;
  z-index: 99;
  pointer-events: none;
  border-radius: 2px;
}

/* walkthrough */
.steps {
  display: flex;
  gap: 5px;
  margin: 6px 0 12px;
}
.steps a {
  flex: 1;
  height: 14px;
  border-radius: 99px;
  border: 2.5px solid var(--ink);
  background: #ddd5c3;
}
.steps a.done {
  background: var(--sun);
}
.steps a.cur {
  background: var(--coral);
  transform: scaleY(1.25);
}
.stepcard h2 {
  font-size: 30px;
  margin: 2px 0 8px;
}
.stepcard p {
  font-size: 18px;
  margin: 0 0 12px;
  font-weight: 700;
  line-height: 1.5;
}
.navrow {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.navrow .btn {
  flex: 0 0 auto;
}
.navrow .btn.next {
  flex: 1 1 0;
  min-width: 0;
}
.navrow .nx {
  display: flex;
  min-width: 0;
  white-space: nowrap;
}
.navrow .nx > * {
  flex: none;
}
.navrow .nx > span:last-child {
  margin-left: 0.3em;
}
.navrow .nx-t {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}

/* myths */
.myths {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}
.myth {
  border: var(--bd);
  border-radius: 20px;
  box-shadow: var(--sh);
  background: var(--paper);
  overflow: hidden;
}
.myth .claim {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  padding: 14px 16px;
  background: var(--pink);
  color: inherit;
  border: 0;
  text-align: left;
  cursor: pointer;
  font: 800 20px/1.2 var(--font-d);
}
.myth .claim:before {
  content: '\201C';
  font-size: 46px;
  line-height: 0.7;
  margin-top: 6px;
}
.myth .q {
  flex: 1;
  min-width: 0;
}
.myth .chev {
  align-self: center;
  flex: none;
  transition: transform 200ms var(--ease-out);
}
.myth.open .chev {
  transform: rotate(180deg);
}
.myth .body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 200ms var(--ease-out);
}
.myth.open .body {
  grid-template-rows: 1fr;
}
.myth .body-in {
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 200ms,
    opacity 200ms var(--ease-out);
}
.myth.open .body-in {
  visibility: visible;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .myth .body,
  .myth .body-in,
  .myth .chev {
    transition-duration: 0.01s;
  }
}
.myth .truth {
  padding: 14px 16px;
  border-top: 3px solid var(--ink);
}
.myth .truth .tl {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font: 800 12px var(--font-b);
  letter-spacing: 0.8px;
  padding: 3px 8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.myth .truth p {
  margin: 0 0 10px;
  font-size: 16.5px;
}
.flash {
  animation: flash 1.6s;
}
@keyframes flash {
  30% {
    box-shadow:
      0 0 0 6px var(--sun),
      var(--sh);
  }
}

.foot {
  max-width: 1040px;
  margin: 96px auto 0;
  padding: 8px 16px 16px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink2);
  text-align: left;
  font-weight: 700;
  text-wrap: pretty;
}
.foot a {
  color: var(--ink);
}
.empty {
  text-align: center;
  padding: 26px 10px;
  color: var(--ink2);
}
.empty .mascot {
  width: 90px;
  height: 90px;
  margin: 0 auto 6px;
  display: block;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 2px;
}

/* tall phones: keep the court in view while reading */
@media (max-width: 899px) and (min-height: 700px) {
  .split.sticky .stage {
    position: sticky;
    top: 0;
    padding: 8px 0 10px;
    background: linear-gradient(var(--cream) 88%, transparent);
  }
  .split.sticky.revealed .stage {
    position: static;
    padding: 0;
    background: none;
  }
}
.reveal {
  scroll-margin-top: 10px;
}
.notfound h1 {
  margin: 6px 0;
}
/* desktop */
@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }
  .top {
    --hh: 48px;
    padding: 18px 16px 16px;
    gap: 16px;
  }
  .logo small {
    display: block;
  }
  .tabs {
    position: static;
    flex: 1;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    gap: 6px;
  }
  .tab {
    flex: none;
    flex-direction: row;
    gap: 8px;
    padding: 6px 14px;
    font-size: 15px;
    min-height: 44px;
  }
  .tab svg {
    width: 22px;
    height: 22px;
  }
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .split .stage {
    position: sticky;
    top: 12px;
    margin-bottom: 0;
    padding: 0;
    background: none;
  }
  .secgrid {
    grid-template-columns: repeat(4, 1fr);
  }
  .myths {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .home {
    max-width: 560px;
    margin: 0 auto;
  }
}

/* stage: full-height court, bottom sheet */
.stagev,
.chost {
  flex: 1;
  min-height: 0;
  display: flex;
  width: 100%;
}
.court-card.sheeted {
  border: 0;
  box-shadow: none;
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #bde98a;
  --sv: 0px;
}
.panbox {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.pan {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  transition: transform 280ms var(--ease-out);
}
.pan .court-svg {
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: visible;
}
.sheeted .stamp-slot {
  position: absolute;
  left: 0;
  right: 0;
  top: 46px;
  bottom: var(--sv);
  pointer-events: none;
}
.sheeted .stamp {
  top: 50%;
}
.stage-top {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.stage-top > * {
  pointer-events: auto;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  min-height: 36px;
  padding: 4px 12px;
  border: var(--bd);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  font: 800 13px var(--font-d);
  text-decoration: none;
  color: var(--ink);
}
.pill svg {
  width: 18px;
  height: 18px;
}
.pill.rp {
  margin-left: auto;
  padding: 4px 8px;
}
.pill.rp:active {
  transform: translateY(3px);
  box-shadow: none;
}
.stage-top .steps {
  flex: 1;
  margin: 0;
  padding: 8px 10px;
  background: var(--paper);
  border: var(--bd);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  gap: 4px;
  pointer-events: auto;
}
.stage-top .steps a {
  height: 12px;
  border-width: 2px;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  background: var(--paper);
  border-top: var(--bd);
  border-radius: 22px 22px 0 0;
  padding: 0 14px 8px;
  transform: translateY(var(--off, 0px));
  transition:
    transform 280ms var(--ease-out),
    background-color 200ms;
}
.sheet.open {
  transform: none;
}
.sheet.dragging {
  transition: none;
}
.sheet.good {
  --sbg: #e6f8d6;
  background: #e6f8d6;
}
.sheet.bad {
  --sbg: #ffe9c7;
  background: #ffe9c7;
}
.grab {
  display: block;
  width: 100%;
  height: 22px;
  border: 0;
  background: none;
  padding: 0;
  touch-action: none;
  cursor: grab;
}
.grab i {
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 9px;
  background: #cfc7b6;
  margin: 9px auto 0;
}
.sheet.noref .grab {
  height: 14px;
  cursor: default;
}
.sheet.noref .grab i {
  margin-top: 7px;
  opacity: 0.6;
}
.sheet .slot:empty {
  display: none;
}
.sheet .slot > * {
  animation: sheetin 220ms var(--ease-out) both;
}
@keyframes sheetin {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
}
@keyframes sheetfade {
  from {
    opacity: 0;
  }
}
.sheet.learn .slot > * {
  animation-name: sheetfade;
}
.sheet .cap {
  min-height: 0;
  padding: 0 0 6px;
  gap: 8px;
}
.sheet .cap .mascot {
  width: 38px;
  height: 38px;
}
.sheet .cap .bubble {
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.28;
  /* every caption fits two lines; reserving both stops the sheet resizing as captions change mid-scene */
  min-height: calc(2.56em + 12px);
  display: flex;
  align-items: center;
}
.sheet .cap .bubble:before {
  width: 12px;
  height: 12px;
  left: -8px;
}
.sheet .ctrl {
  padding: 0 0 6px;
}
.sheet.learn .ctrl {
  display: none;
}
.sheet .ctrl .cb {
  width: 42px;
  height: 42px;
}
.sheet .ctrl .cb.main {
  width: 54px;
}
.sheet .speed {
  height: 42px;
}
.sheet .btn {
  min-height: 46px;
  padding: 8px 12px;
  font-size: 16px;
}
.sheet .navrow {
  margin-top: 8px;
}
.sheet .stepcard h2 {
  font-size: 22px;
  margin: 0 0 4px;
}
.sheet .stepcard p {
  font-size: 14.5px;
  line-height: 1.38;
  margin: 0 0 4px;
}
.sheet .question {
  margin: 0;
  border: 0;
  box-shadow: none;
  background: none;
  padding: 0 0 2px;
  font-size: 18px;
  line-height: 1.22;
}
.sheet .guess {
  margin-top: 8px;
  gap: 10px;
}
.sheet .gbtn {
  min-height: 76px;
  padding: 6px;
  font-size: 22px;
  border-radius: 18px;
  --press: 5px;
  gap: 2px;
}
.sheet .gbtn svg {
  width: 28px;
  height: 28px;
}
.sheet .gbtn small {
  font-size: 12px;
}
.sheet .locked {
  margin: 0 0 6px;
  font-size: 14px;
}
.sheet .reveal {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: none;
  animation: none;
  scroll-margin: 0;
}
.sheet .reveal .head .mascot {
  width: 46px;
  height: 46px;
}
.sheet .reveal h2 {
  font-size: 23px;
}
.sheet .reveal .v {
  font-size: 12px;
}
.sheet .reveal p {
  margin: 6px 0 2px;
  font-size: 15px;
  line-height: 1.35;
}
.refs {
  border-top: 2px dashed #cfc7b6;
  margin-top: 16px;
}
.refs[hidden] {
  display: none;
}
.refs-t {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  border: 0;
  background: none;
  padding: 0 0 14px;
  font: 800 14px var(--font-d);
}
.refs-t .rid {
  margin-left: 4px;
  font-size: 12px;
  padding: 4px 7px;
}
.refs-t .chev {
  transition: transform 280ms var(--ease-out);
}
.sheet.open .chev {
  transform: rotate(180deg);
}
.refs-list {
  max-height: 34vh;
  overflow: auto;
  padding: 2px 0 4px;
}
.refs-list .cites {
  margin-top: 0;
  gap: 6px;
}
.refs-list .cite {
  min-height: 42px;
  padding: 6px 10px;
}

@media (max-width: 899px) {
  body.is-stage {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.is-stage main {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    padding: 2px 10px 10px;
  }
  body.is-stage .foot {
    display: none;
  }
  .court-card.sheeted {
    border: var(--bd);
    border-radius: 22px;
    box-shadow: var(--sh);
  }
}
@media (min-width: 900px) {
  .stagev {
    display: block;
  }
  .court-card.sheeted {
    display: grid;
    grid-template-columns: auto minmax(340px, 1fr);
    grid-template-areas: 'top top' 'court sheet';
    gap: 14px 32px;
    justify-content: stretch;
    align-items: center;
    overflow: visible;
    background: none;
    --sv: 0px;
  }
  .stage-top {
    grid-area: top;
    position: static;
    width: 100%;
    padding: 0;
  }
  .panbox {
    grid-area: court;
    position: relative;
    inset: auto;
    height: clamp(500px, calc(100dvh - 170px), 780px);
    aspect-ratio: 25.2/49.2;
    border: var(--bd);
    border-radius: 22px;
    box-shadow: var(--sh);
    background: #bde98a;
  }
  .pan {
    transform: none !important;
  }
  .sheeted .stamp-slot {
    top: 0;
    bottom: 0;
  }
  .sheet {
    grid-area: sheet;
    position: static;
    transform: none !important;
    border: var(--bd);
    border-radius: 22px;
    box-shadow: var(--sh);
    padding: 18px;
  }
  .grab {
    display: none;
  }
  .refs-t {
    pointer-events: none;
    cursor: default;
  }
  .refs-t .chev {
    display: none;
  }
  .sheet .cap .bubble {
    font-size: 16px;
  }
  .sheet .stepcard h2 {
    font-size: 28px;
  }
  .sheet .stepcard p {
    font-size: 17px;
  }
  .sheet .question {
    font-size: 21px;
  }
  .sheet .reveal p {
    font-size: 16.5px;
  }
  .sheet .gbtn {
    min-height: 92px;
    font-size: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pan,
  .sheet,
  .refs-t .chev {
    transition: none;
  }
}

/* Walkthrough: one court glides between steps */
.court-card.glide .pan {
  transition: transform 520ms var(--ease-in-out);
}
/* the first placement of a stage lands instantly; later changes animate */
.court-card.snap .pan,
.court-card.snap.glide .pan,
.court-card.snap .sheet {
  transition: none;
}
.court-svg .pl.enter {
  animation: plin 240ms var(--ease-out) both;
}
.court-svg .pl.leave {
  animation: plout 200ms var(--ease-out) both;
}
@keyframes plin {
  from {
    opacity: 0;
  }
}
@keyframes plout {
  to {
    opacity: 0;
  }
}
.court-svg .pl .sw {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.court-svg .pl.swing .sw {
  animation: swing 280ms var(--ease-out);
}
.court-svg .pl.team-B.swing .sw {
  animation-name: swingb;
}
@keyframes swing {
  35% {
    transform: rotate(-40deg);
  }
}
@keyframes swingb {
  35% {
    transform: rotate(40deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pan,
  .sheet,
  .court-card.glide .pan {
    transition: none;
  }
}

@property --dy {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}
@media (max-width: 899px) {
  .sheet,
  .sheet.good,
  .sheet.bad {
    background: none;
    border-top: 0;
  }
  .sheet {
    isolation: isolate;
    clip-path: inset(var(--dy) -4px -40px -4px);
    transition:
      transform 280ms var(--ease-out),
      --dy 280ms var(--ease-out);
  }
  .sheet::before {
    content: '';
    position: absolute;
    inset: 0 0 -100vh 0;
    transform: translateY(var(--dy));
    z-index: -1;
    background: var(--sbg, var(--paper));
    border-top: var(--bd);
    border-radius: 22px 22px 0 0;
    transition: background-color 200ms;
  }
  .court-card.hold .sheet {
    transition: --dy 280ms var(--ease-out);
  }
  .court-card .sheet.edge0,
  .court-card.snap .sheet {
    transition: none;
  }
}

/* short phones: give the court room above the sheet */
@media (max-width: 899px) and (max-height: 760px) {
  .sheet .stepcard h2 {
    font-size: 21px;
  }
  .sheet .stepcard p {
    font-size: 14.5px;
    line-height: 1.4;
  }
  .sheet .cap .mascot {
    display: none;
  }
  .sheet .cap .bubble {
    font-size: 13.5px;
    padding: 6px 10px;
  }
  .sheet .cap .bubble:before {
    display: none;
  }
  .sheet .btn {
    min-height: 44px;
    padding: 8px 12px;
  }
}

.more-t {
  display: none;
}
@media (max-width: 899px) {
  .sheet .stepcard,
  .sheet .reveal {
    position: relative;
  }
  .sheet p.clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--lines);
    line-clamp: var(--lines);
    overflow: hidden;
  }
  .sheet .more-t:not([hidden]) {
    display: block;
    border: 0;
    background: none;
    font: 800 14px/1.4 var(--font-d);
    color: var(--coral);
    cursor: pointer;
    padding: 2px 0 4px;
  }
  .sheet p.clamp + .more-t {
    position: absolute;
    right: 0;
    padding: 0 0 0 28px;
    background: linear-gradient(90deg, transparent, var(--sbg, var(--paper)) 55%);
  }
}

@media (max-width: 899px) and (max-height: 680px) {
  .sheet.learn .cap {
    display: none;
  }
}

@keyframes ripplefade {
  to {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .sheet .slot > *,
  .cap .bubble.pop {
    animation-name: sheetfade;
  }
  .shake,
  .court-svg .pl.faulty .fx,
  .court-svg .hl.on,
  .court-svg .netglow.on {
    animation: none;
  }
  .court-svg .mark.new .ring {
    animation-name: ripplefade;
  }
  .sheet,
  .court-card.hold .sheet {
    transition: none;
  }
}
