:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #202434;
  --ink-soft: #697084;
  --muted: #9aa1b2;
  --line: #e4e7ef;
  --line-strong: #ccd2df;
  --blue: #2763df;
  --blue-soft: #e9f0ff;
  --mint: #0f9f6e;
  --mint-soft: #e8f8f1;
  --gold: #c48619;
  --gold-soft: #fff3d9;
  --rose: #de4f74;
  --rose-soft: #ffe9ef;
  --violet: #7556d9;
  --violet-soft: #f0ecff;
  --amber: #d06b1d;
  --amber-soft: #fff0df;
  --shadow: 0 18px 40px rgba(33, 39, 57, 0.16);
  --tap: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-game: "Nunito", "Segoe UI Rounded", "Aptos", "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-board: "Nunito", "Segoe UI Rounded", "Aptos", "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --text-2xs: 0.75rem;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2rem;
  --text-title: clamp(2.25rem, 9vw, 3rem);
  --text-title-tablet: clamp(3.125rem, 6.8vw, 3.75rem);
  --text-title-desktop: clamp(3.5rem, 4.8vw, 4.75rem);
  --text-title-wide: clamp(4rem, 4.6vw, 5.375rem);
  --text-screen-title-desktop: clamp(2.5rem, 3.1vw, 2.875rem);
  --text-detail-title-desktop: clamp(3.125rem, 4.4vw, 4.5rem);
  --text-board-cell: clamp(1rem, 5.1vw, 1.625rem);
  --text-board-cell-desktop: clamp(1.25rem, 2.2vw, 2rem);
  --text-mini-board: clamp(0.6875rem, 2.8vw, 1rem);
  --text-mini-board-desktop: clamp(0.75rem, 1.2vw, 1.0625rem);
  --leading-tight: 1.08;
  --leading-snug: 1.18;
  --leading-normal: 1.42;
  --weight-body: 600;
  --weight-ui: 700;
  --weight-strong: 800;
  --weight-title: 900;
  --control-sm: 2.125rem;
  --control-md: 2.625rem;
  --control-lg: 3.375rem;
  font-family: var(--font-game);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-body);
  line-height: var(--leading-normal);
  letter-spacing: 0;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
input {
  line-height: var(--leading-snug);
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

button,
[href] {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

[hidden] {
  display: none !important;
}

main {
  min-height: 100svh;
}

:focus-visible {
  outline: 3px solid #f2b84b;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ws-game {
  min-height: 100svh;
  background:
    linear-gradient(180deg, #f8f9fd 0%, #eef2f8 100%);
  overflow: hidden;
}

.ws-shell {
  min-height: 100svh;
  display: grid;
  place-items: stretch center;
}

.ws-surface {
  width: 100%;
  max-width: 430px;
  height: 100svh;
  min-height: 620px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.ws-topbar {
  padding: max(14px, env(safe-area-inset-top)) 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(246, 247, 251, 0.96);
  backdrop-filter: blur(12px);
  z-index: 3;
}

.counter-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.counter-pill {
  height: var(--control-sm);
  min-width: 76px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 7px 18px rgba(34, 40, 59, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: var(--weight-ui);
  font-variant-numeric: tabular-nums;
}

.counter-mark {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.counter-mark::before,
.counter-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.55);
}

.counter-mark::after {
  inset: 7px;
  background: rgba(255, 255, 255, 0.9);
}

.tone-aqua .counter-mark {
  background: #74d7db;
}

.tone-gold .counter-mark {
  background: #f1bc3d;
}

.tone-flame .counter-mark {
  background: #f05e67;
}

.round-action,
.icon-action {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  display: inline-grid;
  place-items: center;
  transition: transform 140ms var(--tap), color 140ms var(--tap), background 140ms var(--tap);
}

.round-action {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 7px 18px rgba(34, 40, 59, 0.08);
}

.round-action svg,
.icon-action svg {
  width: 22px;
  height: 22px;
}

.round-action:active,
.icon-action:active,
.primary-cta:active,
.ghost-cta:active,
.card-play:active,
.difficulty-option:active,
.topic-pill:active,
.nav-item:active {
  transform: scale(0.96);
}

.ws-main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.screen {
  display: none;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 96px;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.is-active {
  display: block;
  animation: screen-in 260ms var(--tap) both;
}

.screen-play.is-active {
  display: flex;
  flex-direction: column;
  padding: 0 10px 14px;
}

.home-mobile-content {
  display: contents;
}

.home-desktop-content {
  display: none;
}

.challenge-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 14px 16px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.challenge-track::-webkit-scrollbar {
  display: none;
}

.challenge-card {
  width: 172px;
  min-height: 196px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 14px;
  box-shadow: 0 12px 30px rgba(34, 40, 59, 0.1);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 8px;
  overflow: hidden;
  position: relative;
  animation: card-rise 420ms var(--tap) both;
  animation-delay: calc(var(--card-index) * 70ms);
}

.challenge-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--card-soft), transparent 54%);
  opacity: 0.85;
}

.challenge-card > * {
  position: relative;
  z-index: 1;
}

.challenge-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: var(--text-2xs);
  font-weight: var(--weight-ui);
}

.challenge-head span:last-child {
  color: var(--ink);
  white-space: nowrap;
}

.challenge-art {
  display: grid;
  place-items: center;
  min-height: 84px;
  position: relative;
}

.art-ring {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 8px solid var(--card-ring);
  animation: soft-float 3.4s ease-in-out infinite;
}

.art-tile {
  position: absolute;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  color: var(--card-ink);
  font-size: var(--text-2xl);
  font-weight: var(--weight-strong);
  box-shadow: 0 10px 22px rgba(32, 36, 52, 0.16);
}

.challenge-card h2 {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.card-play {
  height: var(--control-md);
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--card-ink);
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.1);
  transition: transform 140ms var(--tap), background 140ms var(--tap);
}

.home-hero {
  min-height: 395px;
  padding: 58px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
}

.app-logo-mark {
  width: 96px;
  height: 96px;
  margin-bottom: 30px;
  object-fit: contain;
  border-radius: 22px;
  filter: drop-shadow(0 14px 22px rgba(24, 55, 120, 0.16));
  animation: tile-pop 520ms var(--tap) both;
}

.mode-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  text-transform: uppercase;
}

.home-hero h1 {
  margin: 0 0 58px;
  color: #7d8696;
  font-size: var(--text-title);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.primary-cta,
.ghost-cta,
.card-play,
.tool-button,
.nav-item,
.difficulty-option,
.topic-pill {
  -webkit-tap-highlight-color: transparent;
}

.primary-cta {
  width: min(100%, 320px);
  min-height: var(--control-lg);
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  box-shadow: 0 13px 24px rgba(39, 99, 223, 0.22);
  font-size: var(--text-xl);
  font-weight: var(--weight-title);
  display: inline-grid;
  place-items: center;
  text-align: center;
  transition: transform 140ms var(--tap), filter 140ms var(--tap);
}

.primary-cta.compact {
  min-height: 48px;
  margin: 18px auto 0;
  font-size: var(--text-md);
  display: grid;
}

.primary-cta.mini {
  width: auto;
  min-height: var(--control-md);
  padding: 0 18px;
  font-size: var(--text-sm);
}

.primary-cta:hover {
  filter: brightness(1.03);
}

.ghost-cta {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
}

.play-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px 10px;
}

.icon-action {
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

.icon-action:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
}

.play-streak {
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
}

.play-streak strong {
  color: var(--blue);
}

.play-actions {
  display: flex;
  gap: 4px;
}

.play-score {
  text-align: center;
  padding: 12px 0 8px;
  color: var(--blue);
  font-size: var(--text-lg);
  font-weight: var(--weight-title);
}

.play-score small {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: var(--weight-body);
}

.play-meta {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  padding: 0 0 8px;
}

.board-wrap {
  display: grid;
  place-items: center;
}

.word-board {
  width: min(100%, 410px);
  aspect-ratio: var(--grid-cols) / var(--grid-rows);
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  border: 1px solid rgba(105, 112, 132, 0.28);
  background: rgba(154, 161, 178, 0.28);
  gap: 1px;
  contain: layout paint;
  transform-origin: center center;
  touch-action: none;
}

.play-cell {
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: #2e3542;
  font-family: var(--font-board);
  font-size: var(--text-board-cell);
  font-weight: var(--weight-strong);
  line-height: 1;
  padding: 0;
  transition: background 120ms var(--tap), color 120ms var(--tap), transform 120ms var(--tap);
  touch-action: none;
  user-select: none;
}

.play-cell.is-found {
  background: var(--wc-bg, var(--mint-soft));
  color: var(--wc-tx, var(--mint));
}

.play-cell.just-found {
  animation: cell-found 280ms var(--tap) both;
}

.play-cell.is-selected {
  background: var(--blue-soft);
  color: var(--blue);
}

.play-cell.is-dragging {
  background: rgba(39, 99, 223, 0.14);
  color: var(--blue);
  transform: scale(0.94);
}

.word-board.is-invalid .play-cell.is-dragging {
  background: rgba(222, 79, 116, 0.12);
  color: var(--rose);
}

.play-cell:active {
  transform: scale(0.92);
}

.word-bank {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 12px 2px 10px;
  scrollbar-width: none;
}

.word-bank::-webkit-scrollbar {
  display: none;
}

.word-chip {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms var(--tap), background 140ms var(--tap), color 140ms var(--tap);
}

.word-chip.is-done {
  background: var(--wc-bg, var(--mint-soft));
  border-color: transparent;
  color: var(--wc-tx, var(--mint));
  text-decoration: line-through;
}

.word-chip.is-failed {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: transparent;
  text-decoration: none;
}

.word-chip.just-found {
  animation: chip-bounce 360ms var(--tap) both;
}

.tool-row {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-top: 8px;
}

.tool-button {
  min-height: 66px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  display: grid;
  place-items: center;
  gap: 4px;
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.08);
  transition: transform 140ms var(--tap), color 140ms var(--tap), background 140ms var(--tap);
}

.tool-button svg {
  width: 24px;
  height: 24px;
}

.tool-primary {
  background: var(--blue);
  color: white;
}

.screen-title {
  padding: 28px 22px 16px;
}

.screen-title p {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
  text-transform: uppercase;
}

.screen-title h1 {
  margin: 0;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.stack-list {
  display: grid;
  gap: 10px;
  padding: 0 16px;
}

.list-card {
  min-height: 78px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.06);
}

.avatar-mark {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--card-soft);
  color: var(--card-ink);
  font-weight: var(--weight-title);
}

.list-card h2,
.collection-card h2 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
}

.list-card p,
.collection-card p,
.profile-card p,
.profile-stats p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}

.list-card strong {
  color: var(--card-ink);
  font-size: var(--text-xs);
  text-align: right;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px;
}

.collection-card {
  min-height: 132px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.06);
  color: var(--ink);
  transition: transform 140ms var(--tap), border-color 140ms var(--tap);
}

.collection-card:hover {
  border-color: var(--card-ink);
}

.collection-card span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--card-ink);
  padding: 0 9px;
  margin-bottom: 18px;
  font-size: var(--text-2xs);
  font-weight: var(--weight-title);
}

.explore-title {
  padding-bottom: 10px;
}

.category-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.category-carousel::-webkit-scrollbar {
  display: none;
}

.category-tile {
  flex: 0 0 176px;
  min-height: 132px;
  scroll-snap-align: start;
  border-radius: 8px;
  border: 1px solid var(--card-ring, var(--line));
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.26)),
    var(--card-soft, var(--surface));
  color: var(--ink);
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 9px;
  box-shadow: 0 10px 22px rgba(34, 40, 59, 0.08);
}

.category-tile span,
.category-result span {
  color: var(--card-ink, var(--blue));
  font-size: var(--text-2xs);
  font-weight: var(--weight-title);
  text-transform: uppercase;
}

.category-tile strong {
  font-size: var(--text-md);
  line-height: var(--leading-tight);
}

.category-tile small,
.category-result small {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}

.category-search-panel {
  margin: 10px 16px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  padding: 14px;
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.06);
}

.category-search-box {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
}

.category-search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-ui);
}

.category-results {
  max-height: min(55svh, 520px);
  overflow-y: auto;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: rgba(97, 107, 125, 0.42) transparent;
}

.category-results::-webkit-scrollbar {
  width: 6px;
}

.category-results::-webkit-scrollbar-track {
  background: transparent;
}

.category-results::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(97, 107, 125, 0.42);
}

.category-result {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 11px 12px;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
}

.category-result span,
.category-result strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-result strong {
  font-size: var(--text-md);
  font-weight: var(--weight-title);
}

.category-result small {
  grid-row: 1 / span 2;
  grid-column: 2;
  white-space: nowrap;
}

.category-result[hidden],
.category-load-more[hidden] {
  display: none;
}

.category-load-more {
  margin: 14px auto 0;
}

.profile-card {
  margin: 26px 16px 12px;
  padding: 22px;
  text-align: center;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.06);
}

.profile-avatar {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: var(--text-3xl);
  font-weight: var(--weight-title);
}

.profile-card h1 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: var(--weight-title);
}

.profile-stats {
  display: grid;
  gap: 10px;
  padding: 0 16px;
}

.profile-stats article {
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
}

.profile-stats span {
  color: var(--ink-soft);
  font-weight: var(--weight-strong);
}

.profile-stats strong {
  color: var(--blue);
  font-size: var(--text-lg);
  font-weight: var(--weight-title);
}

.profile-stats p {
  grid-column: 1 / -1;
}

.bottom-nav {
  height: calc(68px + env(safe-area-inset-bottom));
  padding: 6px 12px max(8px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  z-index: 4;
}

.nav-brand {
  display: none;
}

.nav-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 6px 3px;
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
  transition: transform 140ms var(--tap), background 140ms var(--tap), color 140ms var(--tap);
}

.nav-item svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.2;
}

.nav-item.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.ws-surface.is-playing .bottom-nav {
  display: none;
}

.ws-surface.is-playing .ws-topbar {
  display: none;
}

.sheet-backdrop,
.result-modal {
  position: fixed;
  inset: 0;
}

.sheet-backdrop {
  background: rgba(25, 29, 40, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--tap);
  z-index: 10;
}

.ws-game.sheet-open .sheet-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(430px, calc(100vw - 16px));
  max-height: min(82svh, 720px);
  overflow-y: auto;
  transform: translate(-50%, 110%);
  border-radius: 22px 22px 0 0;
  background: var(--bg);
  padding: 8px 16px max(18px, env(safe-area-inset-bottom));
  box-shadow: 0 -18px 38px rgba(25, 29, 40, 0.18);
  transition: transform 250ms var(--tap);
  z-index: 12;
}

.bottom-sheet.is-open {
  transform: translate(-50%, 0);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  margin: 4px auto 18px;
  background: #d4d8e3;
}

.sheet-title {
  text-align: center;
  margin-bottom: 18px;
}

.sheet-title h2 {
  margin: 0;
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.sheet-title p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-md);
}

.sheet-title strong {
  color: var(--blue);
}

.difficulty-list {
  display: grid;
  gap: 10px;
}

.difficulty-option {
  min-height: 73px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label reward"
    "meta reward"
    "bar bar";
  gap: 4px 12px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.06);
  transition: transform 140ms var(--tap), border-color 140ms var(--tap);
}

.difficulty-option:hover {
  border-color: var(--card-ink);
}

.difficulty-option > span:first-child {
  grid-area: label;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.difficulty-option strong {
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
}

.difficulty-option small {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
}

.difficulty-meta {
  grid-area: meta;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.reward {
  grid-area: reward;
  align-self: center;
  color: var(--card-ink);
  font-weight: var(--weight-title);
}

.difficulty-bar {
  grid-area: bar;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.difficulty-bar span {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: var(--card-ink, var(--blue));
  transition: width 320ms var(--tap);
}

.create-sheet {
  padding-bottom: max(26px, env(safe-area-inset-bottom));
}

.topic-input {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
}

.topic-input input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 14px;
  font-size: var(--text-lg);
  font-weight: var(--weight-strong);
}

.topic-stack {
  display: grid;
  gap: 8px;
}

.topic-stack.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.topic-pill {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  color: var(--ink);
  display: grid;
  align-content: center;
  text-align: left;
  transition: transform 140ms var(--tap), border-color 140ms var(--tap);
}

.topic-pill span {
  color: var(--card-ink);
  font-weight: var(--weight-title);
}

.topic-pill small {
  color: var(--muted);
  font-weight: var(--weight-strong);
}

.creator-preview {
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.creator-preview span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}

.creator-preview strong {
  display: block;
  margin-top: 3px;
}

.result-modal {
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 29, 40, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--tap);
  z-index: 14;
}

.result-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.result-card {
  width: min(100%, 354px);
  border-radius: 18px;
  background: var(--surface);
  padding: 30px 22px 22px;
  text-align: center;
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms var(--tap);
}

.graffiti-card {
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 205, 71, 0.38), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(247, 83, 129, 0.34), transparent 24%),
    radial-gradient(circle at 50% 94%, rgba(45, 219, 118, 0.28), transparent 30%),
    #ffffff;
  box-shadow:
    0 28px 80px rgba(12, 18, 31, 0.34),
    inset 0 0 0 1px rgba(31, 36, 51, 0.08);
}

.graffiti-card::before,
.graffiti-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.graffiti-card::before {
  width: 170px;
  height: 30px;
  left: -36px;
  top: 28px;
  background: rgba(39, 99, 223, 0.22);
  transform: rotate(-10deg);
}

.graffiti-card::after {
  width: 160px;
  height: 24px;
  right: -42px;
  bottom: 78px;
  background: rgba(247, 83, 129, 0.2);
  transform: rotate(-16deg);
}

.graffiti-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.graffiti-burst span {
  position: absolute;
  width: 76px;
  height: 10px;
  border-radius: 999px;
  background: #26c67a;
  box-shadow: 0 8px 20px rgba(20, 132, 96, 0.18);
}

.graffiti-burst span:nth-child(1) {
  left: 20px;
  bottom: 38px;
  background: #f4c34f;
  transform: rotate(-18deg);
}

.graffiti-burst span:nth-child(2) {
  right: 20px;
  top: 64px;
  background: #f75381;
  transform: rotate(22deg);
}

.graffiti-burst span:nth-child(3) {
  left: 36px;
  top: 92px;
  background: #8264ec;
  transform: rotate(12deg);
}

.graffiti-burst span:nth-child(4) {
  right: 44px;
  bottom: 34px;
  background: #3b84ff;
  transform: rotate(14deg);
}

.result-modal.is-open .result-card {
  transform: translateY(0) scale(1);
}

.result-stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.result-stars span {
  width: 42px;
  height: 42px;
  clip-path: polygon(50% 0, 61% 34%, 96% 35%, 67% 56%, 78% 91%, 50% 70%, 22% 91%, 33% 56%, 4% 35%, 39% 34%);
  background: #f4c345;
  box-shadow: 0 8px 14px rgba(196, 134, 25, 0.2);
}

.result-card h2 {
  position: relative;
  margin: 0;
  color: #171d2b;
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
  text-shadow:
    3px 3px 0 rgba(244, 195, 79, 0.44),
    -2px 2px 0 rgba(59, 132, 255, 0.26);
}

.result-card p {
  position: relative;
  color: var(--ink-soft);
  line-height: var(--leading-normal);
}

.result-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.result-grid span {
  border-radius: 8px;
  background: var(--bg);
  padding: 12px;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}

.result-grid strong {
  display: block;
  color: var(--blue);
  font-size: var(--text-lg);
  font-weight: var(--weight-title);
}

.print-page {
  min-height: 100svh;
  background: #eef2f7;
  padding: 22px;
}

.print-toolbar {
  width: min(100%, 1120px);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.print-toolbar span {
  color: var(--blue);
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
  text-transform: uppercase;
}

.print-toolbar h1 {
  margin: 2px 0;
  color: #172033;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.print-toolbar p {
  margin: 0;
  color: var(--muted);
  font-weight: var(--weight-strong);
}

.print-toolbar-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.print-sheet {
  width: min(100%, 920px);
  margin: 0 auto;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(196, 203, 216, 0.82);
  box-shadow: 0 22px 60px rgba(21, 30, 45, 0.12);
  padding: 28px;
}

.print-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.print-sheet-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.print-sheet-head span {
  color: var(--muted);
  font-weight: var(--weight-title);
  text-transform: uppercase;
}

.print-board {
  width: min(100%, 720px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(var(--print-grid-cols), 1fr);
  border: 1px solid rgba(87, 96, 112, 0.48);
  background: rgba(58, 64, 76, 0.16);
  gap: 1px;
}

.print-board span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #232936;
  font-size: clamp(1rem, 3vw, 1.8rem);
  font-weight: var(--weight-title);
}

.print-words {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
}

.print-words span {
  color: #2b3344;
  font-size: var(--text-lg);
  font-weight: var(--weight-title);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .print-page {
    padding: 14px;
  }

  .print-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .print-toolbar-actions {
    flex-wrap: wrap;
  }

  .print-sheet {
    padding: 16px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .print-toolbar {
    display: none;
  }

  .print-page {
    min-height: auto;
    padding: 0;
    background: #ffffff;
  }

  .print-sheet {
    width: 100%;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}

.tone-daily,
.tone-blue,
.tone-sky {
  --card-soft: var(--blue-soft);
  --card-ring: #bdd0ff;
  --card-ink: var(--blue);
}

.tone-event,
.tone-rose {
  --card-soft: var(--rose-soft);
  --card-ring: #ffc2d0;
  --card-ink: var(--rose);
}

.tone-creator,
.tone-mint,
.tone-lime {
  --card-soft: var(--mint-soft);
  --card-ring: #bdebd7;
  --card-ink: var(--mint);
}

.tone-battle,
.tone-amber {
  --card-soft: var(--amber-soft);
  --card-ring: #ffd2a7;
  --card-ink: var(--amber);
}

.tone-violet {
  --card-soft: var(--violet-soft);
  --card-ring: #d2c8ff;
  --card-ink: var(--violet);
}

.tone-ink {
  --card-soft: #eef0f4;
  --card-ring: #cfd4df;
  --card-ink: #293140;
}

.mode-grid {
  display: grid;
  gap: 10px;
  padding: 0 16px 12px;
}

.route-panel,
.detail-hero,
.create-panel {
  margin: 14px 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.06);
}

.detail-hero {
  min-height: 264px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, var(--card-ring), transparent 28%),
    linear-gradient(135deg, var(--card-soft), transparent 62%);
  opacity: 0.9;
}

.detail-hero > * {
  position: relative;
  z-index: 1;
}

.route-kicker {
  color: var(--card-ink, var(--blue));
  font-size: var(--text-2xs);
  font-weight: var(--weight-title);
  text-transform: uppercase;
}

.route-panel h2,
.detail-hero h1 {
  margin: 8px 0 8px;
  line-height: var(--leading-tight);
}

.route-panel h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-title);
}

.detail-hero h1 {
  max-width: 620px;
  font-size: var(--text-title);
  font-weight: var(--weight-title);
}

.route-panel p,
.detail-hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.detail-grid {
  display: grid;
  gap: 0;
}

.create-panel {
  display: grid;
  gap: 14px;
}

.mini-board {
  width: min(100%, 320px);
  aspect-ratio: var(--grid-cols) / var(--grid-rows);
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: 1px;
  border: 1px solid rgba(105, 112, 132, 0.22);
  background: rgba(154, 161, 178, 0.24);
}

.mini-board span {
  display: grid;
  place-items: center;
  background: #fbfcfd;
  color: #394252;
  font-family: var(--font-board);
  font-size: var(--text-mini-board);
  font-weight: var(--weight-title);
  line-height: 1;
}

.word-bank.static {
  flex-wrap: wrap;
  overflow: visible;
  padding: 14px 0 0;
}

.create-layout {
  display: grid;
  gap: 0;
}

.create-hero-panel {
  margin: 14px 16px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(236, 242, 255, 0.78)),
    repeating-linear-gradient(90deg, rgba(39, 99, 223, 0.08) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(39, 99, 223, 0.08) 0 1px, transparent 1px 44px);
  border: 1px solid rgba(191, 205, 239, 0.9);
  padding: 18px;
  display: grid;
  gap: 16px;
  box-shadow: 0 14px 30px rgba(34, 40, 59, 0.08);
}

.create-hero-copy h1 {
  margin: 8px 0 8px;
  color: var(--ink);
  font-size: clamp(1.9rem, 9vw, 3rem);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.create-hero-copy p {
  max-width: 700px;
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.creator-prompt,
.creator-seeds {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
}

.creator-prompt input {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(143, 162, 210, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  padding: 0 16px;
  font: inherit;
  font-size: var(--text-lg);
  font-weight: var(--weight-title);
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.05);
}

.creator-seeds textarea {
  width: 100%;
  min-height: 124px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-ui);
}

.creator-topic-strip {
  margin: 0;
}

.create-section-head {
  display: grid;
  gap: 4px;
}

.create-section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.create-compose,
.create-difficulty,
.create-ai,
.placement-panel,
.sync-panel {
  align-content: start;
}

.form-row {
  display: grid;
  gap: 12px;
}

.topic-input textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-ui);
}

.seed-mode-grid,
.create-mode-grid {
  display: grid;
  gap: 10px;
}

.seed-mode,
.difficulty-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  display: grid;
  gap: 5px;
  text-align: left;
  transition: transform 140ms var(--tap), border-color 140ms var(--tap), background 140ms var(--tap);
}

.seed-mode input,
.difficulty-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seed-mode strong,
.difficulty-card strong {
  color: var(--card-ink, var(--blue));
  font-size: var(--text-md);
  font-weight: var(--weight-title);
}

.seed-mode span,
.difficulty-card span,
.difficulty-card small,
.difficulty-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}

.seed-mode.is-selected,
.difficulty-card.is-selected {
  border-color: var(--card-ink, var(--blue));
  background: var(--card-soft, var(--blue-soft));
}

.create-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.create-ai-head h2,
.placement-panel h2,
.sync-panel h2 {
  margin: 4px 0 0;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
}

.create-words {
  gap: 8px;
}

.placement-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.placement-stats span {
  border-radius: 8px;
  background: var(--bg);
  padding: 10px;
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}

.placement-stats strong {
  display: block;
  color: var(--card-ink, var(--blue));
  font-size: var(--text-md);
}

.failed-words {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.failed-words span {
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  padding: 6px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}

.sync-panel {
  margin: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: 0 8px 18px rgba(34, 40, 59, 0.05);
}

.sync-panel p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.sync-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.sync-button {
  min-height: var(--control-md);
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--blue);
  font-weight: var(--weight-title);
}

.sync-note {
  color: var(--rose) !important;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .ws-shell {
    padding: 22px;
    align-items: center;
  }

  .ws-surface {
    max-width: 760px;
    height: min(900px, calc(100svh - 44px));
    border-radius: 26px;
    box-shadow: var(--shadow);
  }

  .challenge-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    padding: 18px;
  }

  .challenge-card {
    width: auto;
    min-height: 190px;
  }

  .home-hero {
    min-height: 430px;
  }

  .home-hero h1 {
    max-width: 620px;
    font-size: var(--text-title-tablet);
  }

  .bottom-sheet {
    width: min(720px, calc(100vw - 44px));
  }

  .difficulty-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 18px 16px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero {
    min-height: 320px;
  }
}

@media (min-width: 1024px) {
  .ws-game {
    overflow: auto;
  }

  .ws-shell {
    width: min(100%, 1480px);
    min-height: 100svh;
    margin: 0 auto;
    padding: 24px;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
  }

  .ws-surface {
    max-width: none;
    width: 100%;
    height: auto;
    min-height: calc(100svh - 48px);
    max-height: none;
    border-radius: 28px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .ws-topbar {
    grid-column: 2;
    grid-row: 1;
    min-height: 78px;
    padding: 18px 28px 14px;
    border-bottom: 1px solid var(--line);
  }

  .round-action {
    width: auto;
    min-width: 126px;
    padding: 0 16px;
    display: inline-flex;
    gap: 8px;
    font-weight: var(--weight-title);
  }

  .round-action::after {
    content: "Create";
  }

  .ws-main {
    grid-column: 2;
    grid-row: 2;
  }

  .bottom-nav {
    grid-column: 1;
    grid-row: 1 / 3;
    height: auto;
    padding: 18px 12px;
    border-top: 0;
    border-right: 1px solid var(--line);
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    align-content: start;
    background: rgba(255, 255, 255, 0.68);
  }

  .nav-brand {
    min-height: 84px;
    display: grid;
    place-items: center;
    border-radius: 8px;
  }

  .nav-brand img {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 10px 14px rgba(24, 55, 120, 0.14));
  }

  .nav-item {
    min-height: 72px;
    align-content: center;
  }

  .nav-item svg {
    width: 28px;
    height: 28px;
  }

  .screen {
    padding: 0;
  }

  /* ── Home: mobile/desktop content toggle ────────────── */
  .home-mobile-content {
    display: none;
  }

  .home-desktop-content {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 28px 32px 40px;
    overflow-y: auto;
    flex: 1;
  }

  .screen-home.is-active {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* ── Daily Feature Card ──────────────────────────────── */
  .daily-feature {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(130deg, #141c32 0%, #1e2a48 60%, #0f1a2e 100%);
    border-radius: 18px;
    padding: 28px 32px;
    color: #ffffff;
    box-shadow: 0 24px 56px rgba(10, 15, 38, 0.32);
    flex-shrink: 0;
  }

  .daily-trophy {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 210, 60, 0.12);
    border: 2px solid rgba(255, 210, 60, 0.38);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #ffd43b;
  }

  .daily-trophy svg {
    width: 34px;
    height: 34px;
  }

  .daily-body {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  .daily-tag {
    font-size: var(--text-2xs);
    font-weight: var(--weight-title);
    color: #ffd43b;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  .daily-feature h2 {
    margin: 0;
    font-size: var(--text-2xl);
    color: #ffffff;
    font-weight: var(--weight-title);
    line-height: var(--leading-tight);
  }

  .daily-meta {
    color: rgba(255, 255, 255, 0.55);
    font-size: var(--text-sm);
  }

  .daily-play-cta {
    flex-shrink: 0;
    min-height: 52px;
    padding: 0 30px;
    display: inline-flex;
    align-items: center;
    background: #ffd43b;
    color: #141c32;
    border-radius: 999px;
    font-weight: var(--weight-title);
    font-size: var(--text-md);
    transition: transform 140ms var(--tap), background 140ms var(--tap);
  }

  .daily-play-cta:hover {
    background: #ffe87a;
    transform: translateY(-2px);
  }

  /* ── My Games carousel ───────────────────────────────── */
  .my-games-section {
    min-width: 0;
    flex-shrink: 0;
  }

  .section-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }

  .section-row-head h3 {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: var(--weight-title);
    color: var(--ink);
  }

  .see-all-link {
    font-size: var(--text-sm);
    font-weight: var(--weight-strong);
    color: var(--blue);
  }

  .my-games-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .my-games-track::-webkit-scrollbar {
    display: none;
  }

  .my-game-card {
    flex: 0 0 auto;
    width: 196px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(32, 36, 52, 0.07);
    transition: transform 160ms var(--tap), box-shadow 160ms var(--tap);
    cursor: pointer;
  }

  .my-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(32, 36, 52, 0.14);
  }

  .my-game-thumb {
    height: 108px;
    background: linear-gradient(135deg, #edf1f9 0%, #dce4f3 100%);
    display: grid;
    place-items: center;
  }

  .thumb-grid {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 1.5px solid #c2cde0;
    background: #ffffff;
    border-radius: 6px;
    font-size: var(--text-2xl);
    color: var(--ink-soft);
    font-weight: var(--weight-title);
    letter-spacing: 0.04em;
  }

  .my-game-info {
    padding: 11px 14px 13px;
    display: grid;
    gap: 2px;
  }

  .my-game-info strong {
    font-size: var(--text-sm);
    font-weight: var(--weight-title);
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .my-game-info span {
    font-size: var(--text-2xs);
    color: var(--blue);
    font-weight: var(--weight-strong);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .my-game-info small {
    font-size: var(--text-2xs);
    color: var(--muted);
  }

  /* ── Create CTA ──────────────────────────────────────── */
  .home-create-row {
    display: flex;
    justify-content: flex-start;
    flex-shrink: 0;
  }

  .create-dark-btn {
    min-height: 52px;
    padding: 0 32px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #111827;
    color: #ffffff;
    border-radius: 12px;
    font-size: var(--text-md);
    font-weight: var(--weight-title);
    letter-spacing: 0.02em;
    transition: transform 140ms var(--tap), background 140ms var(--tap);
  }

  .create-dark-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
  }

  .create-dark-btn:hover {
    background: #1f2937;
    transform: translateY(-2px);
  }

  .primary-cta {
    width: min(100%, 360px);
  }

  .topic-stack:not(.compact) {
    gap: 9px;
  }

  .screen-play.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 220px);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 0 24px;
    padding: 20px 28px 24px;
  }

  .play-top {
    grid-column: 1 / -1;
    padding: 0 0 12px;
  }

  .play-score {
    grid-column: 1;
    grid-row: 2;
    padding-top: 0;
  }

  .play-meta {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
  }

  .board-wrap {
    grid-column: 1;
    grid-row: 4;
    align-content: start;
  }

  .word-board {
    width: min(100%, 660px, calc((100svh - 250px) * var(--grid-cols) / var(--grid-rows)));
  }

  .play-cell {
    font-size: var(--text-board-cell-desktop);
  }

  .word-bank {
    grid-column: 2;
    grid-row: 2 / 5;
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 9px;
    overflow: visible;
    padding-top: 44px;
  }

  .word-chip {
    min-height: 38px;
  }

  .tool-row {
    grid-column: 1 / -1;
    grid-row: 5;
    grid-template-columns: repeat(4, minmax(88px, 1fr));
    max-width: 720px;
    margin: 18px auto 0;
    width: 100%;
  }

  .ws-surface.is-playing .bottom-nav {
    display: grid;
  }

  .ws-surface.is-playing .ws-topbar {
    display: flex;
  }

  .screen-title {
    padding: 34px 32px 18px;
  }

  .screen-title h1 {
    font-size: var(--text-screen-title-desktop);
  }

  .stack-list,
  .profile-stats {
    padding: 0 32px;
  }

  .collection-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0 32px;
  }

  .category-carousel {
    padding: 0 32px 18px;
    gap: 14px;
  }

  .category-tile {
    flex-basis: 220px;
    min-height: 154px;
    padding: 18px;
  }

  .category-search-panel {
    margin: 12px 32px 28px;
    padding: 20px;
  }

  .category-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(58svh, 560px);
  }

  .mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 32px 18px;
  }

  .create-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 0;
  }

  .create-hero-panel {
    grid-column: 1 / -1;
    margin: 18px 32px;
    padding: 26px;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 440px);
    align-items: end;
  }

  .create-hero-copy {
    align-self: center;
  }

  .create-hero-copy h1 {
    font-size: clamp(2.8rem, 5vw, 4.6rem);
  }

  .creator-topic-strip {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .create-compose,
  .create-ai {
    grid-column: 1;
  }

  .create-difficulty,
  .placement-panel,
  .sync-panel {
    grid-column: 2;
  }

  .create-difficulty {
    grid-row: 2 / span 2;
  }

  .placement-panel {
    grid-row: 3;
  }

  .sync-panel {
    grid-row: 4;
    margin: 18px 32px 18px 0;
  }

  .create-mode-grid {
    grid-template-columns: 1fr;
  }

  .seed-mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .route-panel,
  .detail-hero,
  .create-panel {
    margin: 18px 32px;
    padding: 22px;
  }

  .detail-grid {
    grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
  }

  .detail-hero {
    min-height: 340px;
  }

  .detail-hero h1 {
    font-size: var(--text-detail-title-desktop);
  }

  .mini-board span {
    font-size: var(--text-mini-board-desktop);
  }

  .profile-card {
    margin: 34px 32px 16px;
  }

  .bottom-sheet {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: min(430px, calc(100vw - 48px));
    max-height: calc(100svh - 48px);
    border-radius: 22px;
    transform: translateX(115%);
  }

  .bottom-sheet.is-open {
    transform: translateX(0);
  }
}

@media (min-width: 1440px) {
  .ws-shell {
    width: min(100%, 1560px);
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 28px;
  }

  .ws-surface {
    min-height: calc(100svh - 56px);
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .challenge-track {
    gap: 18px;
    padding: 26px 34px 18px;
  }

  .challenge-card {
    min-height: 230px;
    padding: 16px;
  }

  .home-hero h1 {
    font-size: var(--text-title-wide);
  }

  .word-board {
    width: min(100%, 720px, calc((100svh - 250px) * var(--grid-cols) / var(--grid-rows)));
  }

  .screen-play.is-active {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  }
}

@media (max-width: 370px) {
  .counter-pill {
    min-width: 64px;
    height: 31px;
    font-size: var(--text-base);
    gap: 6px;
  }

  .counter-mark {
    width: 15px;
    height: 15px;
  }

  .challenge-card {
    width: 154px;
  }

  .home-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .tool-row {
    gap: 6px;
  }

  .tool-button {
    min-height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tile-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes soft-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Word color palette */
.wc-0 { --wc-bg: var(--rose-soft);   --wc-tx: var(--rose); }
.wc-1 { --wc-bg: var(--violet-soft); --wc-tx: var(--violet); }
.wc-2 { --wc-bg: var(--amber-soft);  --wc-tx: var(--amber); }
.wc-3 { --wc-bg: var(--mint-soft);   --wc-tx: var(--mint); }
.wc-4 { --wc-bg: var(--gold-soft);   --wc-tx: var(--gold); }
.wc-5 { --wc-bg: var(--blue-soft);   --wc-tx: var(--blue); }
.wc-6 { --wc-bg: #ffe0dc; --wc-tx: #c0391d; }
.wc-7 { --wc-bg: #dff4ff; --wc-tx: #1a7fa8; }
.wc-8 { --wc-bg: #e8fde0; --wc-tx: #3a8a28; }
.wc-9 { --wc-bg: #f5e0ff; --wc-tx: #8a1ab0; }

/* Board compress-and-rotate */
@keyframes board-flip {
  0%   { transform: scale(1)    rotate(0deg);   }
  35%  { transform: scale(0.42) rotate(0deg);   }
  65%  { transform: scale(0.42) rotate(180deg); }
  100% { transform: scale(1)    rotate(0deg);   }
}

.board-wrap.is-flipping .word-board {
  animation: board-flip 680ms cubic-bezier(0.4, 0, 0.2, 1) both;
  pointer-events: none;
}

/* Word found animations */
@keyframes cell-found {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@keyframes chip-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.14); }
  70%  { transform: scale(0.94); }
  100% { transform: scale(1); }
}

/* Full-window play mode */
.ws-game-play {
  --play-board-max: 430px;
  min-height: 100svh;
  background: #f7f8fb;
}

.ws-game-play .ws-shell {
  width: 100%;
  min-height: 100svh;
  display: block;
  padding: 0;
}

.ws-game-play .ws-surface {
  width: 100%;
  max-width: none;
  height: 100svh;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
  display: block;
  overflow: hidden;
  background: #f7f8fb;
}

.ws-game-play .ws-main {
  height: 100svh;
  overflow: hidden;
}

.ws-game-play .ws-topbar,
.ws-game-play .bottom-nav {
  display: none !important;
}

.ws-game-play .screen-play.is-active {
  height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
  background: #f7f8fb;
}

.play-session-topbar {
  display: none;
  min-width: 0;
  border-bottom: 1px solid rgba(57, 66, 82, 0.16);
  background: #ffffff;
  z-index: 5;
}

.screen-play.is-waiting .play-session-topbar {
  display: grid;
  grid-template-rows: auto auto;
}

.screen-play:not(.is-waiting) .play-session-topbar {
  display: none !important;
}

.play-title-strip {
  min-width: 0;
  padding: max(8px, env(safe-area-inset-top)) 12px 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 38%),
    #2c150b;
  color: #ffffff;
}

.play-title-strip h1 {
  max-width: 860px;
  margin: 0;
  color: inherit;
  font-size: clamp(1.5rem, 7vw, 2.45rem);
  line-height: 1.1;
  font-weight: var(--weight-ui);
}

.play-session-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.top-score {
  min-width: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #2e3542;
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  text-align: left;
}

.top-score svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #d9a018;
}

.top-score span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-score strong {
  font-weight: var(--weight-title);
}

.play-session-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.play-command {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: var(--weight-title);
}

.play-command svg {
  width: 18px;
  height: 18px;
}

.print-command {
  background: var(--mint);
}

.score-command {
  background: #dc3545;
}

.play-hud {
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  border-bottom: 1px solid rgba(57, 66, 82, 0.12);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(31, 36, 51, 0.06);
  z-index: 3;
}

.hud-cluster {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-cluster-right {
  justify-content: flex-end;
}

.hud-prog-wrap {
  width: 72px;
  height: 5px;
  border-radius: 999px;
  background: rgba(39, 99, 223, 0.14);
  overflow: hidden;
}

.hud-prog-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  width: var(--prog, 0%);
  transition: width 320ms var(--tap);
}

.hud-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #2b303a;
  font-size: var(--text-md);
  font-weight: var(--weight-title);
  letter-spacing: 0;
  white-space: nowrap;
}

.sound-toggle,
.hud-icon {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #313844;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms var(--tap), color 140ms var(--tap), background 140ms var(--tap);
}

.sound-toggle {
  gap: 7px;
  min-height: 38px;
  padding: 0 2px;
}

.sound-toggle svg {
  width: 22px;
  height: 22px;
}

.toggle-track {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  padding: 3px;
  background: #1f72ff;
  display: inline-flex;
  justify-content: flex-end;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.toggle-track span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 2px 5px rgba(23, 31, 45, 0.22);
}

.sound-toggle.is-muted {
  color: var(--muted);
}

.sound-toggle.is-muted .toggle-track {
  justify-content: flex-start;
  background: #d7dce6;
}

.hud-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.hud-icon:hover {
  background: rgba(39, 99, 223, 0.09);
  color: var(--blue);
}

.hud-icon svg {
  width: 22px;
  height: 22px;
}

.fullscreen-icon {
  background: #20222b;
  color: #ffec3f;
}

.fullscreen-icon:hover {
  background: #11131a;
  color: #ffec3f;
}

.play-timer {
  color: #2e3542;
  font-size: var(--text-md);
  font-weight: var(--weight-title);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.play-progress-rail {
  height: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    #dce3ec;
  border-bottom: 1px solid rgba(57, 66, 82, 0.1);
  box-shadow: inset 0 2px 5px rgba(18, 28, 44, 0.12);
}

.play-progress-rail span {
  width: var(--progress, 0%);
  min-width: 58px;
  height: 100%;
  display: block;
  border-radius: 0 999px 999px 0;
  background:
    linear-gradient(90deg, #f3a532, #f4c34f 52%, #26c67a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 8px 18px rgba(202, 132, 23, 0.26);
  position: relative;
  transition: width 420ms var(--tap);
}

.play-stage {
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 0;
}

.ws-game-play .board-wrap {
  min-height: 0;
  width: 100%;
  grid-column: 1;
  grid-row: 1;
  position: relative;
  display: grid;
  place-items: center;
}

.ws-game-play .word-board {
  width: min(100%, var(--play-board-max), calc((100svh - 326px) * var(--grid-cols) / var(--grid-rows)));
  aspect-ratio: var(--grid-cols) / var(--grid-rows);
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  overflow: hidden;
  gap: 0;
  border: 1px solid rgba(81, 89, 104, 0.42);
  background: #ffffff;
  box-shadow:
    0 18px 34px rgba(31, 36, 51, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.84);
  touch-action: none;
}

.selection-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.selection-line {
  stroke: var(--wc-line, rgba(32, 186, 102, 0.82));
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0.7;
  filter:
    drop-shadow(0 2px 1px rgba(255, 255, 255, 0.72))
    drop-shadow(0 7px 11px rgba(24, 31, 44, 0.18));
}

.selection-line.is-preview {
  stroke: rgba(39, 99, 223, 0.62);
  opacity: 0.62;
}

.selection-line.is-invalid {
  stroke: rgba(222, 79, 116, 0.72);
}

.ws-game-play .play-cell {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(58, 64, 76, 0.16);
  color: #2f343d;
  font-size: clamp(0.875rem, 4.6vw, 1.375rem);
  font-weight: var(--weight-title);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: color 120ms var(--tap), transform 120ms var(--tap), text-shadow 120ms var(--tap);
}

.ws-game-play .play-cell.is-dragging {
  background: transparent;
  color: var(--blue);
  transform: scale(0.94);
}

.ws-game-play .play-cell.is-found {
  background: transparent;
  color: #242a34;
}

.ws-game-play .word-board.is-invalid .play-cell.is-dragging {
  background: transparent;
  color: var(--rose);
}

.play-word-list {
  min-height: 46px;
  max-height: 118px;
  width: 100%;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 4px 11px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 4px 10px;
  scroll-behavior: smooth;
  scrollbar-color: rgba(97, 107, 125, 0.42) transparent;
  scrollbar-width: thin;
}

.play-word-list::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.play-word-list::-webkit-scrollbar-track {
  background: transparent;
}

.play-word-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(97, 107, 125, 0.42);
}

.play-word-list .word-chip {
  min-height: 24px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #1f2633;
  box-shadow: none;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.play-word-list .word-chip.is-done {
  background: transparent;
  color: #6d7482;
  text-decoration: line-through;
  text-decoration-color: var(--wc-line, var(--wc-tx));
  text-decoration-thickness: 3px;
}

.ws-game-play .tool-row {
  display: none;
}

.ws-game-play .tool-button {
  min-height: 54px;
  box-shadow: none;
  border: 1px solid rgba(228, 231, 239, 0.9);
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(30, 34, 43, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--tap);
}

.play-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.leaderboard-overlay {
  z-index: 11;
}

.leaderboard-card {
  position: relative;
  align-content: start;
  justify-items: stretch;
  gap: 14px;
  text-align: left;
}

.leaderboard-card h2 {
  padding-right: 32px;
  font-size: var(--text-xl);
}

.overlay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(31, 36, 51, 0.08);
  color: #2b303a;
}

.overlay-close svg {
  width: 18px;
  height: 18px;
}

.leaderboard-list {
  width: 100%;
  max-height: min(52svh, 360px);
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding: 0 4px 0 0;
  margin: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(97, 107, 125, 0.42) transparent;
}

.leaderboard-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 6px 10px;
  align-items: center;
  border: 1px solid rgba(214, 220, 231, 0.88);
  border-radius: 10px;
  padding: 10px;
  background: #ffffff;
}

.leader-rank {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--blue);
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
}

.leader-player {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #202636;
  font-weight: var(--weight-title);
}

.leaderboard-list strong {
  color: var(--mint);
}

.leaderboard-list time {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}

.play-overlay-card {
  width: min(100%, 486px);
  min-height: 320px;
  border: 1px solid rgba(43, 48, 58, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(16, 23, 36, 0.22);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 20px;
  padding: 30px;
  text-align: center;
}

.overlay-kicker {
  color: var(--blue);
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
  text-transform: uppercase;
}

.overlay-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 12px;
  width: min(100%, 380px);
}

.play-overlay-card h2 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: var(--weight-title);
}

.play-overlay-card p {
  max-width: 340px;
  margin: -8px 0 0;
  color: var(--ink-soft);
  font-size: var(--text-md);
}

.play-start-button {
  width: auto;
  min-width: 220px;
  display: inline-flex;
  gap: 10px;
  background: var(--mint);
  box-shadow: 0 13px 24px rgba(15, 159, 110, 0.22);
}

.resume-start-button {
  width: auto;
  min-width: 220px;
  display: inline-flex;
  gap: 10px;
  background: var(--blue);
}

.play-start-button svg {
  width: 22px;
  height: 22px;
}

.play-no-fullscreen {
  margin-top: 0;
  color: #d64f27;
  font-size: var(--text-md);
}

.outline-cta {
  min-height: 44px;
  border: 1px solid var(--rose);
  border-radius: 8px;
  background: #ffffff;
  color: var(--rose);
  padding: 0 14px;
  font-size: var(--text-base);
  font-weight: var(--weight-ui);
}

.play-another-cta {
  color: var(--rose);
}

.play-countdown-overlay {
  z-index: 9;
  background: rgba(247, 248, 251, 0.55);
}

.countdown-card {
  width: min(84vw, 300px);
  min-height: 240px;
  border-radius: 30px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 26px 70px rgba(22, 30, 44, 0.2);
}

.countdown-card span {
  color: var(--ink-soft);
  font-size: var(--text-md);
  font-weight: var(--weight-title);
}

.countdown-card strong {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  font-size: clamp(3.4rem, 16vw, 5rem);
  font-weight: var(--weight-title);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.58), transparent 27%),
    linear-gradient(145deg, var(--blue), #12a36d);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.24),
    0 18px 30px rgba(39, 99, 223, 0.24);
  animation: countdown-pop 720ms var(--tap) infinite;
}

.countdown-progress {
  width: min(100%, 220px);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce3ec;
}

.countdown-progress span {
  width: 0%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #f3a532, #f4c34f, #26c67a);
  transition: width 260ms var(--tap);
}

.mobile-orientation-lock {
  display: none;
}

.screen-play.is-waiting .word-board,
.screen-play.is-waiting .play-word-list {
  filter: grayscale(0.2);
  opacity: 0.46;
}

.screen-play.is-paused .play-cell,
.screen-play.is-paused .word-chip {
  color: transparent !important;
  text-shadow: none !important;
}

.screen-play.is-paused .selection-layer {
  opacity: 0;
}

.screen-play.is-paused .word-board,
.screen-play.is-paused .play-word-list {
  filter: blur(10px);
  opacity: 0.34;
}

.wc-0 { --wc-line: rgba(247, 83, 129, 0.78); }
.wc-1 { --wc-line: rgba(130, 100, 236, 0.76); }
.wc-2 { --wc-line: rgba(255, 176, 58, 0.78); }
.wc-3 { --wc-line: rgba(45, 219, 118, 0.74); }
.wc-4 { --wc-line: rgba(247, 205, 71, 0.78); }
.wc-5 { --wc-line: rgba(59, 132, 255, 0.74); }
.wc-6 { --wc-line: rgba(255, 113, 91, 0.76); }
.wc-7 { --wc-line: rgba(62, 196, 239, 0.76); }
.wc-8 { --wc-line: rgba(123, 221, 78, 0.76); }
.wc-9 { --wc-line: rgba(211, 100, 241, 0.74); }

@media (min-width: 768px) {
  .ws-game-play .screen-play.is-active {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .screen-play.is-waiting .play-session-topbar {
    grid-template-rows: auto auto;
  }

  .play-title-strip {
    padding: 8px 24px 12px;
  }

  .play-title-strip h1 {
    font-size: clamp(2rem, 4vw, 2.9rem);
  }

  .play-session-meta {
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 24px;
  }

  .top-score {
    gap: 8px;
    font-size: var(--text-xl);
  }

  .top-score svg {
    width: 22px;
    height: 22px;
    color: #d9a018;
  }

  .top-score strong {
    font-weight: var(--weight-title);
  }

  .play-command {
    min-height: 46px;
    padding: 0 14px;
    font-size: var(--text-md);
  }

  .play-command svg {
    width: 20px;
    height: 20px;
  }

  .play-hud {
    min-height: 64px;
    padding: 8px 40px;
  }

  .hud-status,
  .play-timer {
    font-size: var(--text-xl);
  }
}

@media (min-width: 1024px) {
  .ws-game-play .ws-shell {
    max-width: none;
  }

  .ws-game-play .screen-play.is-waiting .play-session-topbar {
    display: grid;
  }

  .ws-game-play .screen-play.is-active {
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .ws-game-play .play-hud {
    padding: 0 56px;
    min-height: 68px;
    border-bottom: 1px solid rgba(57, 66, 82, 0.12);
    background: #ffffff;
  }

  .ws-game-play .play-stage {
    grid-template-columns: minmax(0, 4fr) minmax(190px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    gap: 34px;
    overflow: hidden;
    padding: 20px 42px 30px;
    scrollbar-color: rgba(97, 107, 125, 0.42) transparent;
    scrollbar-width: thin;
  }

  .ws-game-play .board-wrap {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    place-items: center;
    overflow: hidden;
  }

  .ws-game-play .word-board {
    --play-board-max: 1040px;
    width: min(100%, var(--play-board-max), calc((100svh - 146px) * var(--grid-cols) / var(--grid-rows)));
    gap: 2px;
    border-width: 2px;
    background: rgba(58, 64, 76, 0.18);
  }

  .ws-game-play .play-cell {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 0 0 1px rgba(58, 64, 76, 0.1);
    font-size: clamp(1.35rem, 2.6vw, 2.9rem);
    letter-spacing: 0.03em;
  }

  .ws-game-play .play-cell.is-found {
    background: rgba(255, 255, 255, 0.94);
  }

  .play-word-list {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    max-height: none;
    height: min(100%, calc(100svh - 122px));
    display: grid;
    grid-auto-rows: min-content;
    align-content: start;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 8px 16px 0;
    scroll-behavior: smooth;
  }

  .play-word-list::-webkit-scrollbar {
    width: 6px;
  }

  .play-word-list .word-chip {
    min-height: 38px;
    width: 100%;
    justify-content: flex-start;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 4px 0;
    color: #1a2035;
    font-size: var(--text-xl);
    font-weight: var(--weight-title);
    letter-spacing: 0.02em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .play-word-list .word-chip.is-done {
    background: transparent;
    color: #a0aab8;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
  }

  .ws-game-play .tool-row {
    display: none;
  }

  .play-overlay {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1440px) {
  .ws-game-play .play-stage {
    grid-template-columns: minmax(0, 4fr) minmax(230px, 1fr);
    gap: 48px;
    padding-left: 58px;
    padding-right: 58px;
  }

  .ws-game-play .word-board {
    --play-board-max: 1180px;
    width: min(100%, var(--play-board-max), calc((100svh - 158px) * var(--grid-cols) / var(--grid-rows)));
  }
}

@media (max-width: 767px) {
  .ws-game-play .screen-play.is-active {
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .play-session-meta {
    gap: 8px;
  }

  .play-command {
    min-height: 34px;
    padding: 0 9px;
  }

  .score-command {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .play-hud {
    min-height: 46px;
    gap: 6px;
    padding: max(6px, env(safe-area-inset-top)) 8px 6px;
    grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 0.9fr);
  }

  .hud-cluster {
    gap: 4px;
  }

  .hud-cluster [data-action="rotate-board"] {
    display: none;
  }

  .sound-toggle {
    min-height: 30px;
    gap: 4px;
  }

  .sound-toggle svg {
    width: 16px;
    height: 16px;
  }

  .toggle-track {
    width: 32px;
    height: 18px;
    padding: 2px;
  }

  .toggle-track span {
    width: 14px;
    height: 14px;
  }

  .hud-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .hud-icon svg {
    width: 17px;
    height: 17px;
  }

  .fullscreen-icon {
    background: rgba(31, 34, 43, 0.08);
    color: #20222b;
  }

  .hud-status {
    gap: 6px;
    font-size: 0.78rem;
    line-height: 1;
  }

  .hud-difficulty {
    font-size: 0.78rem;
  }

  .hud-sep {
    display: none;
  }

  .hud-prog-wrap {
    width: 48px;
    height: 4px;
  }

  .hud-count,
  .play-timer {
    font-size: 0.82rem;
  }

  .play-no-fullscreen {
    display: none;
  }

  .play-stage {
    padding: 8px 12px max(10px, env(safe-area-inset-bottom));
  }

  .ws-game-play .word-board {
    width: min(90vw, var(--play-board-max), calc((100svh - 224px) * var(--grid-cols) / var(--grid-rows)));
  }

  .play-word-list {
    width: min(90vw, 100%);
    justify-self: center;
    gap: 3px 9px;
  }

  .play-word-list .word-chip {
    font-size: 0.78rem;
    font-weight: var(--weight-title);
  }
}

@media (max-width: 767px) and (orientation: landscape),
  (max-height: 520px) and (max-width: 950px) and (orientation: landscape) {
  .mobile-orientation-lock {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 22px;
    background: #172235;
    color: white;
    text-align: center;
  }

  .mobile-orientation-lock div {
    display: grid;
    justify-items: center;
    gap: 10px;
  }

  .mobile-orientation-lock svg {
    width: 48px;
    height: 48px;
    color: #f4c34f;
  }

  .mobile-orientation-lock strong {
    font-size: var(--text-xl);
    font-weight: var(--weight-title);
  }

  .mobile-orientation-lock span {
    color: rgba(255, 255, 255, 0.72);
  }
}

@media (max-width: 370px) {
  .hud-status {
    gap: 8px;
    font-size: var(--text-sm);
  }

  .play-timer {
    font-size: var(--text-sm);
  }

  .hud-icon {
    width: 32px;
    height: 32px;
  }

  .toggle-track {
    width: 36px;
    height: 20px;
  }

  .toggle-track span {
    width: 14px;
    height: 14px;
  }
}

@keyframes countdown-pop {
  0%,
  100% { transform: scale(1); }
  45% { transform: scale(1.08); }
}

/* Home lobby refresh */
.home-lobby-content {
  min-height: 100%;
  display: grid;
  gap: 14px;
  padding: 14px 16px 96px;
}

.home-lobby-content .daily-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 34, 53, 0.98), rgba(31, 55, 86, 0.96)),
    linear-gradient(90deg, rgba(244, 184, 64, 0.9), rgba(64, 191, 129, 0.9));
  color: #ffffff;
  padding: 18px;
  box-shadow: 0 18px 42px rgba(23, 34, 53, 0.24);
  overflow: hidden;
  position: relative;
}

.home-lobby-content .daily-feature::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #f2af34, #61c76f, #2f6be8);
}

.home-lobby-content .daily-trophy {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: #f8c84d;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.home-lobby-content .daily-trophy svg {
  width: 30px;
  height: 30px;
}

.home-lobby-content .daily-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.home-lobby-content .daily-tag {
  color: #f8c84d;
  font-size: var(--text-2xs);
  font-weight: var(--weight-title);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-lobby-content .daily-feature h2 {
  margin: 0;
  color: #ffffff;
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.home-lobby-content .daily-meta {
  color: rgba(255, 255, 255, 0.68);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
}

.home-lobby-content .daily-play-cta {
  grid-column: 1 / -1;
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: #1f5fd5;
  font-size: var(--text-md);
  font-weight: var(--weight-title);
  box-shadow: 0 10px 22px rgba(4, 10, 23, 0.18);
}

.home-lobby-grid {
  display: grid;
  gap: 14px;
}

.home-panel-card,
.home-collections-section {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(209, 216, 229, 0.9);
  box-shadow: 0 12px 30px rgba(34, 40, 59, 0.08);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.home-panel-card h1,
.home-panel-card h2,
.home-collections-section h2 {
  margin: 0;
  color: var(--ink);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.home-panel-card h1 {
  font-size: var(--text-title);
}

.home-panel-card h2,
.home-collections-section h2 {
  font-size: var(--text-xl);
}

.home-panel-card p,
.home-collections-section p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.mode-launch-card {
  color: #ffffff;
  background:
    linear-gradient(140deg, rgba(23, 32, 51, 0.98), rgba(38, 47, 68, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 34px);
}

.mode-launch-card .route-kicker,
.mode-launch-card p {
  color: rgba(255, 255, 255, 0.7);
}

.mode-launch-card h1 {
  color: #ffffff;
}

.home-mode-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-mini-link {
  min-height: 76px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #ffffff;
  padding: 11px;
  display: grid;
  align-content: center;
  gap: 3px;
  transition: transform 140ms var(--tap), background 140ms var(--tap);
}

.mode-mini-link strong {
  font-size: var(--text-md);
  font-weight: var(--weight-title);
}

.mode-mini-link span {
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
}

.mode-mini-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.13);
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-stat-card {
  border-radius: 8px;
  background: var(--card-soft, #f3f6fb);
  border: 1px solid rgba(121, 138, 169, 0.18);
  padding: 12px;
  display: grid;
  gap: 3px;
}

.mode-stat-card strong {
  color: var(--card-ink, var(--blue));
  font-size: var(--text-md);
  font-weight: var(--weight-title);
}

.mode-stat-card span {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-title);
}

.mode-stat-card small {
  color: var(--ink-soft);
  font-size: var(--text-2xs);
  font-weight: var(--weight-strong);
}

.home-topic-row,
.home-collection-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.home-topic-row::-webkit-scrollbar,
.home-collection-strip::-webkit-scrollbar {
  height: 5px;
}

.home-topic-row::-webkit-scrollbar-thumb,
.home-collection-strip::-webkit-scrollbar-thumb {
  background: rgba(143, 152, 168, 0.38);
  border-radius: 999px;
}

.topic-mini,
.collection-chip {
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(121, 138, 169, 0.16);
  background: var(--card-soft, #f4f7fb);
  color: var(--card-ink, var(--blue));
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
}

.topic-mini {
  padding: 9px 12px;
}

.collection-chip {
  width: 168px;
  min-height: 104px;
  padding: 12px;
  display: grid;
  align-content: space-between;
  gap: 4px;
}

.collection-chip strong {
  color: var(--card-ink, var(--blue));
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.collection-chip span {
  color: var(--ink);
  font-size: var(--text-md);
  line-height: var(--leading-tight);
  font-weight: var(--weight-title);
}

.collection-chip small,
.home-top-score {
  color: var(--ink-soft);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}

/* Share controls */
.share-panel {
  gap: 10px;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(130, 143, 166, 0.22);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-title);
  cursor: pointer;
  transition: transform 140ms var(--tap), border-color 140ms var(--tap), background 140ms var(--tap);
}

.share-button:hover,
.share-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(47, 107, 232, 0.45);
}

.share-button.is-copied {
  background: #eaf7ef;
  border-color: rgba(26, 145, 80, 0.28);
  color: #15824a;
}

.share-facebook {
  color: #1f63d6;
}

.share-whatsapp {
  color: #128c53;
}

.share-instagram {
  color: #c03d85;
}

.share-classroom {
  color: #1a8754;
}

.share-teams {
  color: #5357c8;
}

.result-share-actions {
  justify-content: center;
}

/* Create login lock */
.create-auth-alert,
.ai-login-lock {
  border-radius: 8px;
  border: 1px solid rgba(47, 107, 232, 0.22);
  background: rgba(238, 244, 255, 0.84);
  padding: 12px;
  display: grid;
  gap: 7px;
}

.create-auth-alert.is-strong {
  border-color: rgba(216, 71, 86, 0.36);
  background: rgba(255, 238, 240, 0.88);
}

.create-auth-alert strong,
.ai-login-lock strong {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-title);
}

.create-auth-alert span,
.ai-login-lock span {
  color: var(--ink-soft);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
}

.sync-actions.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seed-mode.is-disabled {
  cursor: not-allowed;
  opacity: 0.62;
  background: #f5f7fb;
}

.seed-mode.is-disabled small {
  color: #d84756;
  font-size: var(--text-2xs);
  font-weight: var(--weight-title);
}

.create-ai.is-locked {
  border: 1px solid rgba(47, 107, 232, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 244, 255, 0.76)),
    repeating-linear-gradient(90deg, rgba(47, 107, 232, 0.06) 0 1px, transparent 1px 38px);
  padding: 16px;
  border-radius: 8px;
}

.create-words.is-muted {
  opacity: 0.52;
}

.word-chip.is-placeholder {
  color: rgba(94, 104, 120, 0.68);
  background: rgba(255, 255, 255, 0.72);
  border-style: dashed;
}

.primary-cta[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

@media (min-width: 768px) {
  .home-lobby-content {
    padding: 20px 24px 104px;
    gap: 18px;
  }

  .home-lobby-content .daily-feature {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 22px 24px;
  }

  .home-lobby-content .daily-play-cta {
    grid-column: auto;
    min-width: 128px;
    padding: 0 24px;
  }

  .home-lobby-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-panel-card,
  .home-collections-section {
    padding: 18px;
  }
}

@media (min-width: 1024px) {
  .home-mobile-content,
  .home-desktop-content {
    display: none;
  }

  .home-lobby-content {
    height: 100%;
    overflow-y: auto;
    padding: 28px 32px 40px;
    gap: 22px;
    scrollbar-width: thin;
  }

  .home-lobby-content::-webkit-scrollbar {
    width: 7px;
  }

  .home-lobby-content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(143, 152, 168, 0.34);
  }

  .home-lobby-grid {
    grid-template-columns: minmax(360px, 1.08fr) minmax(300px, 0.92fr);
    align-items: stretch;
  }

  .mode-launch-card {
    grid-row: span 2;
    align-content: space-between;
    min-height: 430px;
    padding: 28px;
  }

  .mode-launch-card h1 {
    max-width: 520px;
    font-size: var(--text-title-tablet);
  }

  .home-mode-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-share-card {
    grid-column: 2;
  }

  .home-collections-section {
    padding: 20px;
  }

  .collection-chip {
    width: 190px;
  }
}

@media (min-width: 1380px) {
  .home-lobby-grid {
    grid-template-columns: minmax(460px, 1.15fr) repeat(2, minmax(280px, 0.8fr));
  }

  .mode-launch-card {
    grid-row: span 2;
  }

  .home-share-card {
    grid-column: auto;
  }
}
