/* Today: hero, the player's run, and the round cards. The tone classes also colour the round header. */
.hero-row { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: stretch; }
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 36px 38px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, var(--hero-2), var(--hero) 60%);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--indigo) 18%, transparent);
}
.hero > :not(.hero-ghost) { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--on-hero-soft); }
.hero-title { font: 800 clamp(32px, 4.4vw, 54px)/1.04 var(--font-display); letter-spacing: -.035em; margin: 6px 0 12px; max-width: 14ch; }
.hero-lead { font-size: 18px; color: var(--on-hero); margin: 0 0 22px; max-width: 42ch; }
.hero-ghost {
  position: absolute; right: -14px; bottom: -70px; font: 800 230px/1 var(--font-display); letter-spacing: -.06em;
  color: rgba(255, 255, 255, .06); pointer-events: none;
}
.btn.hero-btn { background: #fff; color: var(--hero); border-color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--blue) 30%, var(--white)); font-size: 18px; padding: 14px 26px; }
.btn.hero-btn:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--blue) 30%, var(--white)); }
.hero .mystery { margin: 14px 0 8px; }
.hero .mtile { background: rgba(255, 255, 255, .14); border: 2px solid rgba(255, 255, 255, .3); box-shadow: none; color: #fff; }
.hero .mdash { color: rgba(255, 255, 255, .5); }
.stamp {
  display: inline-block; margin: 12px 0 4px; padding: 6px 16px; border-radius: 12px;
  font: 800 24px var(--font-display); color: var(--hero); background: var(--highlight);
}

.run {
  border-radius: 28px; padding: 28px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 16px;
}
.run-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--muted); border-radius: 16px; padding: 14px 12px; }
.stat b { display: block; font: 800 34px/1 var(--font-display); color: var(--ink); letter-spacing: -.03em; }
.stat b small { font-size: 16px; color: var(--muted-fg); }
.stat span { font-size: 13px; font-weight: 600; color: var(--muted-fg); }
.stat.flame { background: var(--tone-blue); }
.stat.flame b { color: var(--primary); }
.run .meter { margin: 0; }
.root-slots { list-style: none; margin: -8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.root-slots li { display: grid; padding: 8px 12px; border-radius: 12px; border: 2px dashed var(--border); color: var(--muted-fg); min-width: 92px; }
.root-slots b { font: 800 19px var(--font-display); letter-spacing: .02em; }
.root-slots span { font-size: 12px; font-weight: 600; }
.root-slots li.open { border: 2px solid var(--teal); background: var(--tone-teal); color: var(--tone-teal-fg); }
.run-link { font-weight: 700; text-decoration: none; margin-top: auto; }

.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 36px 0 14px; }
.sec-head h2 { font: 800 28px var(--font-display); letter-spacing: -.03em; color: var(--ink); margin: 0; }
.sec-head p { margin: 0; }

.game-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.game-card {
  width: 100%; height: 100%; display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left;
  border: 1px solid var(--border); border-radius: 22px; background: var(--card); color: var(--fg); cursor: pointer;
  font: inherit; box-shadow: var(--shadow);
}
.game-card.is-locked, .game-card.is-done { cursor: default; }
.game-card.is-locked .game-art { filter: saturate(.6); }
.card-go.locked { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-fg); font-weight: 600; }
.card-go.locked svg { width: 14px; height: 14px; fill: currentColor; }
button.game-card { outline-offset: 3px; }
.game-art {
  height: 130px; display: grid; place-items: center; padding: 14px; position: relative;
  background: var(--tone-bg); color: var(--tone-fg); overflow: hidden;
}
.game-copy { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; flex: 1; }
.game-num { font: 800 12px var(--font-sans); letter-spacing: .1em; color: var(--muted-fg); }
.game-name { font: 800 22px/1.1 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.game-line { font-size: 15px; color: var(--muted-fg); }
.card-go { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--tone-fg); }

.tone-indigo { --tone-bg: var(--tone-indigo); --tone-fg: var(--tone-indigo-fg); }
.tone-blue { --tone-bg: var(--tone-blue); --tone-fg: var(--tone-blue-fg); }
.tone-teal { --tone-bg: var(--tone-teal); --tone-fg: var(--tone-teal-fg); }
.tone-deep { --tone-bg: var(--tone-deep); --tone-fg: var(--tone-deep-fg); }
.tone-sky { --tone-bg: var(--tone-sky); --tone-fg: var(--tone-sky-fg); }

/* Card art */
.art-stack { display: grid; gap: 4px; justify-items: center; }
.art-word { font: 800 20px var(--font-display); letter-spacing: -.01em; }
.art-stack .art-word { transform: rotate(calc((var(--i) - 1) * -2deg)); }
.art-word .q { color: var(--card); background: var(--tone-fg); border-radius: 5px; padding: 0 3px; margin: 0 1px; letter-spacing: .08em; }
.art-line { margin: 0; font: 600 14px/1.4 var(--font-serif); text-align: center; color: var(--fg); background: var(--card); padding: 8px 10px; border-radius: 10px; box-shadow: 0 1px 3px var(--border); }
.art-gap { display: inline-block; width: 52px; height: 1.05em; vertical-align: -3px; margin: 0 3px; border-radius: 4px; background: var(--tone-fg); opacity: .8; }
.art-tiles { display: flex; gap: 6px; margin-top: 8px; }
.art-tiles span { width: 42px; height: 20px; border-radius: 6px; background: var(--card); border: 2px solid var(--tone-fg); opacity: .7; }
.art-vs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.art-vs .art-word { background: var(--card); padding: 6px 10px; border-radius: 10px; box-shadow: 0 1px 3px var(--border); font-size: 17px; }
.art-vs i { font: 800 14px var(--font-display); font-style: normal; background: var(--tone-fg); color: var(--card); border-radius: 99px; padding: 4px 8px; }
.art-grid { display: grid; grid-template-columns: repeat(2, 48px); gap: 8px; }
.art-grid span { height: 36px; border-radius: 9px; background: var(--card); box-shadow: 0 1px 3px var(--border); display: grid; place-items: center; }
.art-grid .odd { background: var(--tone-fg); color: var(--card); font: 800 20px var(--font-display); transform: rotate(5deg); }
.art-back { display: grid; justify-items: center; }
.art-num { font: 800 54px/1 var(--font-display); }
.art-back span:last-child { font-weight: 700; }
.card-marks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 160px; }
.card-marks i { width: 26px; height: 26px; border-radius: 7px; background: var(--card); border: 2px solid var(--border); }
.card-marks i.ok { background: var(--primary); border-color: var(--primary); }

@media (prefers-reduced-motion: no-preference) {
  .game-card { transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
  .game-card:is(button):hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--indigo) 12%, transparent); }
  .game-card:is(button):active { transform: scale(.99); }
  .game-cards li { animation: enter .28s var(--ease) both; }
  .game-cards li:nth-child(2) { animation-delay: .04s; } .game-cards li:nth-child(3) { animation-delay: .08s; }
  .game-cards li:nth-child(4) { animation-delay: .12s; } .game-cards li:nth-child(5) { animation-delay: .16s; }
  .stamp { animation: stamp .32s var(--ease) .1s both; }
}

@media (max-width: 860px) {
  .hero-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { padding: 26px 22px; border-radius: 22px; }
  .hero-ghost { font-size: 170px; bottom: -50px; }
  .btn.hero-btn { width: 100%; }
  .run { padding: 20px; border-radius: 22px; }
  .stat b { font-size: 28px; }
  .game-cards { grid-template-columns: 1fr; gap: 10px; }
  .game-card { flex-direction: row; }
  .game-art { width: 128px; height: auto; min-height: 118px; flex: none; padding: 8px; }
  .art-word { font-size: 15px; }
  .art-line { font-size: 11px; padding: 6px; }
  .art-gap { width: 30px; }
  .art-vs .art-word { font-size: 13px; padding: 4px 6px; }
  .game-name { font-size: 19px; }
  .game-line { font-size: 14px; }
}

/* End of board */
.summary-hero { margin-bottom: 8px; }
.summary-hero .hero-title { max-width: none; }
.summary-hero .score { color: var(--on-hero); margin: 0; font-size: 18px; }
.summary-hero .score b { color: #fff; }
.root-reveal { display: inline-block; background: var(--highlight); color: var(--indigo); border-radius: 12px; padding: 0 12px; }
.summary-hero .rank-badge { background: #fff; color: var(--hero); }

/* Word faces */
.face { display: block; width: 56px; height: 56px; flex: none; }
.face.ghost rect { fill: none; stroke: var(--border); stroke-width: 3; stroke-dasharray: 6 5; }
.face.ghost text { font: 800 26px var(--font-display); fill: var(--muted-fg); }
.map-word { display: flex; gap: 14px; align-items: flex-start; }
.map-body { flex: 1; min-width: 0; }
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.member { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; background: var(--muted); text-align: center; font-weight: 700; font-size: 15px; position: relative; }
.member .face { width: 60px; height: 60px; }
.member.learning .face { opacity: .6; }
.member.strong { background: var(--tone-teal); }
.member i { position: absolute; top: 6px; right: 6px; font: 800 10px var(--font-sans); font-style: normal; letter-spacing: .08em; text-transform: uppercase; background: var(--teal); color: #fff; border-radius: 99px; padding: 2px 6px; }
.member.new span:last-child { color: var(--muted-fg); }
@media (prefers-reduced-motion: no-preference) {
  .map-word .face { animation: stamp .3s var(--ease) both; animation-delay: calc(.3s + var(--i) * .07s); }
}
button.member { font: inherit; font-weight: 700; font-size: 15px; color: var(--fg); border: 2px solid transparent; cursor: pointer; }
button.member:hover { border-color: var(--primary); }
button.member.open { border-color: var(--primary); background: var(--tone-blue); }
.word-detail { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--tone-blue); }
.word-detail p { margin: 4px 0 0; }
