@import './theme.css';

:root {
  --font-display: ui-rounded, 'Nunito', 'Avenir Next', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --cream: #fff8ea;
  --cream-2: #fff0d6;
  --ink: #4a261f;
  --muted: #8c665e;
  --blue: #2476d8;
  --blue-soft: #e5f4ff;
  --blue-border: #55a9ff;
  --pink: #f13d80;
  --pink-soft: #ffe3ef;
  --pink-border: #ff92bd;
  --green: #49bf5b;
  --orange: #ffac2b;
  --red: #f0444d;
  --purple: #9d63ff;
  --shadow: 0 18px 50px rgba(87, 58, 37, 0.16);
  --shadow-tight: 0 8px 20px rgba(87, 58, 37, 0.14);
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(255, 139, 187, 0.35), transparent 24rem),
    radial-gradient(circle at 85% 100%, rgba(76, 157, 247, 0.22), transparent 22rem),
    linear-gradient(180deg, #fffdf8 0%, #fff4dd 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
}

.app-shell {
  width: min(1120px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

.noscript-card {
  margin: 2rem auto;
  width: min(600px, 90vw);
  padding: 1.2rem;
  background: #fff;
  border: 2px solid var(--pink-border);
  border-radius: var(--radius-md);
  text-align: center;
}

.game-board {
  display: grid;
  grid-template-rows: auto minmax(460px, 1fr) auto;
  gap: clamp(10px, 1.6vw, 18px);
}

.player-panel,
.dashboard {
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-panel {
  min-height: 268px;
  border-radius: 34px;
  padding: clamp(10px, 1.6vw, 16px);
  position: relative;
}

.player-panel--blue {
  background: linear-gradient(180deg, #eef9ff 0%, #cfeeff 100%);
  outline: 4px solid rgba(72, 158, 245, 0.65);
}

.player-panel--pink {
  background: linear-gradient(180deg, #ffeaf3 0%, #ffd6e7 100%);
  outline: 4px solid rgba(255, 116, 166, 0.68);
}

.player-panel--top .player-rotator {
  transform: rotate(180deg);
}

.player-panel.is-active::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 3px rgba(255, 203, 80, 0.32);
  pointer-events: none;
  animation: activePulse 1.4s ease-in-out infinite;
}

@keyframes activePulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.95; }
}

.player-rotator {
  display: grid;
  gap: 11px;
  height: 100%;
}

.player-status-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 14px;
}

.heart-bar {
  display: flex;
  gap: clamp(4px, 0.7vw, 9px);
  align-items: center;
  min-height: 40px;
}

.heart-icon {
  width: clamp(28px, 4vw, 44px);
  height: auto;
  filter: drop-shadow(0 5px 4px rgba(130, 30, 40, 0.18));
}

.score-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-tight);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 900;
}

.score-icon,
.tiny-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
}

.tiny-icon {
  width: 22px;
  height: 22px;
}

.player-identity {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  font-weight: 900;
}

.player-panel--pink .player-identity,
.player-panel--pink .score-pill {
  color: #be2c68;
}

.player-panel--blue .player-identity,
.player-panel--blue .score-pill {
  color: #1f67bd;
}

.avatar,
.score-avatar {
  width: clamp(48px, 6vw, 70px);
  aspect-ratio: 1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-tight);
}

.player-word-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 2px;
}

.word-slots {
  display: flex;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 13px);
  flex-wrap: wrap;
}

.word-slot {
  width: clamp(24px, 4.6vw, 48px);
  height: clamp(38px, 6vw, 58px);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-bottom: 4px solid rgba(70, 38, 28, 0.75);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 1000;
  line-height: 1;
  color: var(--blue);
}

.player-panel--pink .word-slot.is-revealed {
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.player-panel--blue .word-slot.is-revealed {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.keyboard {
  display: grid;
  gap: clamp(5px, 0.7vw, 8px);
  justify-items: center;
  width: 100%;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: clamp(4px, 0.75vw, 9px);
  width: 100%;
}

.key {
  width: clamp(30px, 7.2vw, 72px);
  max-width: 72px;
  height: clamp(34px, 5.5vw, 58px);
  border-radius: 13px;
  border: 2px solid rgba(83, 124, 176, 0.35);
  color: #071a55;
  font-weight: 950;
  font-size: clamp(1rem, 2.4vw, 1.75rem);
  background: linear-gradient(180deg, #fff 0%, #eff7ff 100%);
  box-shadow: 0 5px 0 rgba(74, 115, 154, 0.16), 0 8px 16px rgba(74, 115, 154, 0.16);
  transition: transform 120ms ease, opacity 120ms ease, filter 120ms ease;
}

.key:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(74, 115, 154, 0.18), 0 4px 9px rgba(74, 115, 154, 0.14);
}

.player-panel--pink .key {
  color: #9e275e;
  border-color: rgba(237, 75, 132, 0.35);
  background: linear-gradient(180deg, #fff 0%, #fff1f7 100%);
  box-shadow: 0 5px 0 rgba(215, 61, 126, 0.15), 0 8px 16px rgba(215, 61, 126, 0.12);
}

.key.is-correct {
  background: linear-gradient(180deg, #e9fff1 0%, #bff7cc 100%);
  color: #14752a;
}

.key.is-wrong,
.key:disabled {
  opacity: 0.45;
  filter: grayscale(0.25);
}

.solve-form {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}

.solve-input {
  width: min(340px, 60%);
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  font-weight: 900;
  color: var(--ink);
  box-shadow: inset 0 2px 6px rgba(54, 42, 30, 0.08);
}

.solve-button,
.primary-action,
.dev-actions button {
  min-height: 44px;
  border-radius: 999px;
  border: 0;
  padding: 0 20px;
  background: linear-gradient(180deg, #ffca58 0%, #ff9e2c 100%);
  color: #5d2a00;
  font-weight: 950;
  box-shadow: 0 5px 0 rgba(147, 80, 0, 0.18), 0 8px 18px rgba(147, 80, 0, 0.14);
}

.solve-button:disabled {
  opacity: 0.45;
}

.dashboard {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  grid-template-rows: auto 1fr auto auto;
  gap: clamp(12px, 2vw, 20px);
  align-items: center;
  padding: clamp(18px, 3vw, 32px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.9), transparent 28rem),
    linear-gradient(180deg, #fffaf0 0%, #fff0d6 100%);
  outline: 3px solid rgba(255, 221, 169, 0.75);
}

.dashboard-background-sprinkles::before,
.dashboard-background-sprinkles::after {
  content: '• • • • • • • •';
  position: absolute;
  color: rgba(255, 93, 153, 0.36);
  letter-spacing: 8px;
  font-size: 1.3rem;
  pointer-events: none;
}

.dashboard-background-sprinkles::before {
  left: 24px;
  bottom: 22px;
  transform: rotate(-20deg);
}

.dashboard-background-sprinkles::after {
  right: 24px;
  top: 26px;
  transform: rotate(17deg);
}

.logo-card {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  display: grid;
  gap: 16px;
  justify-items: start;
}

.game-logo {
  width: min(270px, 100%);
  max-height: 165px;
  object-fit: contain;
}

.logo-card p {
  margin: 0;
  max-width: 270px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(255, 190, 212, 0.65);
  border-radius: 18px;
  font-weight: 900;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.35;
  box-shadow: var(--shadow-tight);
}

.status-banner {
  grid-column: 2 / 4;
  grid-row: 1;
  justify-self: center;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #ffe0eb 100%);
  border: 2px solid rgba(255, 144, 188, 0.58);
  color: #c43371;
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 1000;
  box-shadow: var(--shadow-tight);
}

.timer-column {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #cf305f;
  font-weight: 1000;
  text-align: center;
}

.timer-badge {
  --timer-deg: 360deg;
  width: clamp(132px, 20vw, 210px);
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #542235 0 53%, transparent 54%),
    conic-gradient(#ff5e9b var(--timer-deg), rgba(255, 189, 213, 0.46) 0deg);
  border: 15px solid #ff99c5;
  box-shadow: inset 0 0 0 5px rgba(255, 236, 244, 0.8), var(--shadow);
  color: #fff;
  line-height: 1;
  position: relative;
}

.timer-badge::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 7px dotted rgba(255, 245, 146, 0.78);
  opacity: 0.7;
}

.timer-badge span {
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 1000;
}

.timer-badge small {
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 900;
  margin-top: 22px;
}

.timer-badge.is-urgent {
  animation: timerPulse 0.7s ease-in-out infinite;
}

@keyframes timerPulse {
  50% { transform: scale(1.04); filter: saturate(1.25); }
}

.center-column {
  grid-column: 2;
  grid-row: 2 / span 2;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.score-card {
  min-height: 178px;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 16px;
  border-radius: 24px;
  border: 3px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-tight);
}

.score-card--blue {
  outline: 2px solid rgba(79, 158, 247, 0.3);
  color: #1e6eca;
}

.score-card--pink {
  outline: 2px solid rgba(255, 103, 161, 0.3);
  color: #d63d79;
}

.score-avatar {
  width: 62px;
}

.score-card span {
  font-weight: 900;
}

.score-card strong {
  font-size: clamp(3rem, 7vw, 5.7rem);
  line-height: 0.9;
  font-weight: 1000;
}

.versus {
  color: #ff9728;
  -webkit-text-stroke: 2px #8a4200;
  text-shadow: 0 5px 0 rgba(133, 62, 0, 0.12);
  font-size: clamp(2.3rem, 4.8vw, 4rem);
  font-weight: 1000;
}

.point-copy {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 950;
}

.rules-card {
  width: min(430px, 100%);
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.73);
  border: 2px solid rgba(209, 151, 87, 0.25);
  box-shadow: var(--shadow-tight);
  font-weight: 850;
}

.rule-icon {
  display: inline-flex;
  width: 35px;
}

.rules-cap {
  color: #9b5b00;
  text-align: center;
}

.icecream-stage {
  grid-column: 3;
  grid-row: 2 / span 2;
  align-self: center;
  justify-self: center;
}

.icecream-art {
  width: min(330px, 100%);
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 20px 18px rgba(116, 58, 56, 0.13));
  animation: floatScoop 3s ease-in-out infinite;
}

@keyframes floatScoop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.info-grid {
  grid-column: 1 / 4;
  grid-row: 4;
  display: grid;
  grid-template-columns: 0.8fr 1fr 2fr;
  gap: 14px;
  width: 100%;
}

.info-chip,
.difficulty-card {
  min-height: 92px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 2px solid rgba(245, 180, 87, 0.3);
  box-shadow: var(--shadow-tight);
}

.info-chip {
  display: grid;
  gap: 5px;
  justify-items: center;
  align-items: center;
}

.info-chip span {
  color: #8c614b;
  font-weight: 850;
}

.info-chip strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  font-weight: 1000;
  color: #c05a1f;
}

.difficulty-card {
  display: grid;
  gap: 10px;
}

.difficulty-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 900;
}

.difficulty-heading strong {
  color: var(--pink);
}

.difficulty-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.difficulty-strip::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 12.5%;
  right: 12.5%;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--orange), var(--red), var(--purple));
  opacity: 0.8;
}

.difficulty-node {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #8d6252;
  font-weight: 850;
}

.difficulty-node .dot {
  width: 36px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  border: 5px solid #e6c49a;
  box-shadow: var(--shadow-tight);
}

.difficulty-node.is-complete .dot {
  background: #d6ffe0;
  border-color: var(--green);
}

.difficulty-node.is-current .dot {
  background: #fff1b7;
  border-color: var(--orange);
  transform: scale(1.12);
}

.turn-banner {
  grid-column: 1 / 4;
  justify-self: center;
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 8px;
  align-items: center;
  padding: 13px 24px;
  border-radius: 999px;
  color: #fff;
  box-shadow: var(--shadow-tight);
}

.turn-banner.blue {
  background: linear-gradient(180deg, #63b2ff 0%, #267bdf 100%);
}

.turn-banner.pink {
  background: linear-gradient(180deg, #ff8fbd 0%, #e94485 100%);
}

.turn-banner span {
  font-weight: 1000;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.turn-banner small {
  grid-column: 2;
  opacity: 0.9;
  font-weight: 750;
}

.round-result,
.result-overlay {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  z-index: 10;
  pointer-events: none;
}

.round-result {
  align-content: center;
  gap: 8px;
  padding: 24px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  border: 3px solid rgba(255, 203, 72, 0.65);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(6px);
}

.round-result strong {
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--pink);
}

.round-result span {
  max-width: 680px;
  font-weight: 900;
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.round-result small {
  color: #bb5c00;
  font-weight: 950;
}

.result-overlay {
  background: rgba(255, 246, 229, 0.8);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.result-card {
  width: min(560px, 92%);
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 32px;
  border-radius: 32px;
  border: 3px solid #ffc64f;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.result-card h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--pink);
}

.result-card p {
  margin: 0 0 8px;
  font-weight: 850;
}

.dev-panel {
  margin-top: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-tight);
}

.dev-panel summary {
  padding: 14px 18px;
  font-weight: 900;
  cursor: pointer;
}

.dev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 12px;
}

.dev-panel pre {
  margin: 0;
  padding: 16px 18px 20px;
  max-height: 240px;
  overflow: auto;
  background: rgba(72, 38, 31, 0.06);
  border-radius: 0 0 16px 16px;
}

.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;
}

@media (max-width: 850px) {
  .app-shell {
    padding: 8px;
  }

  .player-panel {
    min-height: 246px;
  }

  .player-status-row {
    grid-template-columns: 1fr auto;
  }

  .heart-bar {
    grid-column: 1 / 3;
    justify-content: center;
  }

  .player-identity {
    justify-content: flex-end;
  }

  .dashboard {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: auto;
  }

  .logo-card,
  .status-banner,
  .timer-column,
  .center-column,
  .icecream-stage,
  .info-grid,
  .turn-banner {
    grid-column: 1;
    grid-row: auto;
  }

  .logo-card {
    justify-items: center;
    text-align: center;
  }

  .timer-column {
    grid-row: auto;
  }

  .icecream-art {
    max-height: 280px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .game-board {
    gap: 8px;
  }

  .player-panel {
    border-radius: 24px;
    min-height: 230px;
  }

  .keyboard-row {
    gap: 3px;
  }

  .key {
    width: 8.2vw;
    min-width: 26px;
    height: 38px;
    border-radius: 10px;
  }

  .solve-form {
    gap: 5px;
  }

  .solve-input {
    width: 56%;
  }

  .solve-button {
    padding: 0 14px;
  }

  .scoreboard {
    grid-template-columns: 1fr;
  }

  .versus {
    line-height: 1;
  }

  .score-card {
    min-height: 126px;
  }
}

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  body {
    background: #fff6e8;
  }

  .app-shell {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    padding:
      max(4px, env(safe-area-inset-top))
      max(4px, env(safe-area-inset-right))
      max(4px, env(safe-area-inset-bottom))
      max(4px, env(safe-area-inset-left));
    overflow: hidden;
  }

  .game-board {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(150px, 22svh) minmax(0, 1fr) minmax(150px, 22svh);
    gap: 5px;
  }

  .player-panel,
  .dashboard {
    min-height: 0;
    border-width: 2px;
    box-shadow: 0 3px 12px rgba(87, 58, 37, 0.15);
  }

  .player-panel {
    height: 100%;
    padding: 5px;
    border-radius: 16px;
    outline-width: 2px;
  }

  .player-panel.is-active::after {
    inset: 3px;
    border-radius: 12px;
    border-width: 2px;
    box-shadow: inset 0 0 0 2px rgba(255, 203, 80, 0.28);
  }

  .player-rotator {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 25px 25px minmax(0, 1fr) 25px;
    gap: 3px;
  }

  .player-status-row {
    grid-template-columns: 1fr auto 1fr;
    gap: 4px;
    min-width: 0;
  }

  .heart-bar {
    grid-column: auto;
    min-height: 0;
    gap: 2px;
    justify-content: flex-start;
  }

  .heart-icon {
    width: 15px;
  }

  .score-pill {
    min-width: 48px;
    height: 25px;
    gap: 3px;
    padding: 0 7px;
    border-width: 1px;
    font-size: 0.9rem;
    box-shadow: none;
  }

  .score-icon {
    width: 15px;
    height: 15px;
  }

  .player-identity {
    min-width: 0;
    gap: 4px;
    justify-content: flex-end;
    font-size: 0.72rem;
    line-height: 1;
  }

  .player-identity strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .avatar {
    width: 22px;
    border-radius: 7px;
    border-width: 1px;
    box-shadow: none;
  }

  .player-word-row {
    padding: 0;
    min-height: 0;
  }

  .word-slots {
    gap: 3px;
    max-width: 100%;
  }

  .word-slot {
    width: min(22px, 6vw);
    height: 23px;
    border-bottom-width: 2px;
    font-size: 1rem;
  }

  .keyboard {
    align-self: stretch;
    justify-self: stretch;
    gap: 2px;
    min-height: 0;
  }

  .keyboard-row {
    gap: 2px;
  }

  .key {
    width: clamp(22px, 8.2vw, 34px);
    min-width: 0;
    height: clamp(18px, 4.7svh, 25px);
    border-width: 1px;
    border-radius: 7px;
    font-size: 0.67rem;
    box-shadow: 0 2px 0 rgba(74, 115, 154, 0.14);
  }

  .solve-form {
    gap: 4px;
    min-height: 0;
  }

  .solve-input {
    width: min(62%, 210px);
    min-height: 24px;
    height: 24px;
    padding: 0 9px;
    border-width: 1px;
    font-size: 0.66rem;
  }

  .solve-button {
    min-height: 24px;
    height: 24px;
    padding: 0 9px;
    font-size: 0.66rem;
    box-shadow: none;
  }

  .dashboard {
    height: 100%;
    padding: 6px;
    border-radius: 16px;
    display: grid;
    grid-template-columns: 0.38fr 0.62fr;
    grid-template-rows: 30px 96px 92px 82px 32px;
    gap: 5px;
    overflow: hidden;
    outline-width: 2px;
    align-content: space-between;
  }

  .dashboard-background-sprinkles,
  .dashboard-background-sprinkles::before,
  .dashboard-background-sprinkles::after {
    display: none;
  }

  .logo-card {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: stretch;
    justify-items: center;
    align-content: center;
    gap: 0;
  }

  .game-logo {
    width: 68px;
    max-height: 68px;
  }

  .logo-card p,
  .timer-column strong,
  .point-copy,
  .rules-card,
  .score-card span,
  .difficulty-node small,
  .turn-banner small {
    display: none;
  }

  .status-banner {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: stretch;
    padding: 5px 8px;
    min-width: 0;
    border-width: 1px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: none;
  }

  .timer-column {
    grid-column: 1;
    grid-row: 3;
    align-self: center;
    gap: 0;
  }

  .timer-badge {
    width: clamp(76px, 21vw, 92px);
    border-width: 7px;
    box-shadow: inset 0 0 0 2px rgba(255, 236, 244, 0.8), 0 4px 10px rgba(87, 58, 37, 0.14);
  }

  .timer-badge::before {
    inset: -5px;
    border-width: 3px;
  }

  .timer-badge span {
    font-size: 2rem;
  }

  .timer-badge small {
    margin-top: 9px;
    font-size: 0.8rem;
  }

  .center-column {
    grid-column: 2;
    grid-row: 2;
    gap: 4px;
    align-self: stretch;
    min-height: 0;
  }

  .scoreboard {
    grid-template-columns: 1fr auto 1fr;
    gap: 5px;
    align-items: stretch;
    height: 100%;
  }

  .score-card {
    min-height: 0;
    height: 100%;
    gap: 2px;
    padding: 5px;
    border-radius: 11px;
    border-width: 1px;
    box-shadow: none;
  }

  .score-avatar {
    width: clamp(28px, 8vw, 42px);
    border-radius: 9px;
    box-shadow: none;
  }

  .score-card strong {
    font-size: clamp(1.6rem, 8vw, 2.35rem);
  }

  .versus {
    align-self: center;
    font-size: 1.05rem;
    -webkit-text-stroke: 1px #8a4200;
    text-shadow: none;
  }

  .icecream-stage {
    grid-column: 1;
    grid-row: 4;
    align-self: stretch;
    justify-self: stretch;
    display: grid;
    place-items: center;
  }

  .icecream-art {
    width: 58px;
    max-height: 58px;
    animation: none;
    filter: none;
  }

  .info-grid {
    grid-column: 2;
    grid-row: 3 / 5;
    grid-template-columns: 0.8fr 1.2fr;
    grid-template-rows: 34px minmax(0, 1fr);
    gap: 5px;
    align-self: stretch;
    min-height: 0;
  }

  .info-chip,
  .difficulty-card {
    min-height: 0;
    padding: 4px 5px;
    border-radius: 10px;
    border-width: 1px;
    box-shadow: none;
  }

  .info-chip {
    gap: 0;
  }

  .info-chip span,
  .difficulty-heading {
    font-size: 0.58rem;
  }

  .info-chip strong {
    gap: 2px;
    font-size: 0.72rem;
    line-height: 1.05;
  }

  .tiny-icon {
    width: 13px;
    height: 13px;
  }

  .difficulty-card {
    grid-column: 1 / 3;
    grid-row: 2;
    gap: 2px;
    align-self: stretch;
    min-height: 0;
  }

  .difficulty-strip::before {
    top: 7px;
    height: 2px;
  }

  .difficulty-node {
    gap: 0;
  }

  .difficulty-node .dot {
    width: 16px;
    border-width: 2px;
  }

  .turn-banner {
    grid-column: 1 / 3;
    grid-row: 5;
    align-self: stretch;
    justify-self: stretch;
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    box-shadow: none;
  }

  .turn-banner span {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .round-result,
  .result-overlay {
    inset: 6px;
  }

  .round-result {
    gap: 4px;
    padding: 12px;
    border-radius: 16px;
    border-width: 2px;
  }

  .round-result strong {
    font-size: 1.25rem;
  }

  .round-result span,
  .round-result small {
    font-size: 0.75rem;
  }

  .result-card {
    width: 92%;
    gap: 8px;
    padding: 18px;
    border-radius: 18px;
  }

  .result-card h2 {
    font-size: 1.6rem;
  }

  .primary-action {
    min-height: 34px;
  }

  .dev-panel {
    display: none;
  }
}

@media (max-width: 380px) {
  .game-board {
    grid-template-rows: minmax(142px, 21.5svh) minmax(0, 1fr) minmax(142px, 21.5svh);
  }

  .player-rotator {
    grid-template-rows: 23px 22px minmax(0, 1fr) 23px;
  }

  .heart-icon {
    width: 13px;
  }

  .word-slot {
    width: min(19px, 5.8vw);
    height: 20px;
    font-size: 0.86rem;
  }

  .key {
    height: clamp(17px, 4.4svh, 23px);
    font-size: 0.6rem;
  }

  .dashboard {
    grid-template-rows: 28px 86px 82px 72px 30px;
    gap: 4px;
    padding: 5px;
  }

  .game-logo {
    width: 58px;
    max-height: 58px;
  }

  .timer-badge {
    width: 68px;
  }

  .icecream-art {
    width: 48px;
  }
}
