:root {
  --card-width: 476px;
  --card-height: 390px;
  --card-pad: 30px;
  --card-radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --overlay-pad-x: calc(22px + var(--safe-left));
  --overlay-pad-right: calc(22px + var(--safe-right));
  --overlay-pad-y: calc(18px + var(--safe-top));
  --overlay-pad-bottom: calc(18px + var(--safe-bottom));
  --picker-strip-width: 114px;
  --picker-main-offset: 136px;
  --surface-1: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-3: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  --intro-aurora-opacity: 1;
  --intro-aurora-blur: 40px;
  --intro-aurora-speed-a: 12s;
  --intro-aurora-speed-b: 16s;
  --intro-aurora-speed-c: 20s;
  --intro-aurora-yellow: rgba(255, 227, 92, 0.97);
  --intro-aurora-violet: rgba(112, 105, 255, 0.86);
  --intro-aurora-orange: rgba(255, 163, 74, 0.82);
  --intro-aurora-cyan: rgba(94, 233, 255, 0.74);
  --font-ui:
    "PingFang TC", "Noto Sans TC", "Heiti TC", "Microsoft JhengHei",
    "Source Han Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-display:
    "PingFang TC", "Noto Sans TC", "Heiti TC", "Microsoft JhengHei",
    "Source Han Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-numeric:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: #000;
  color: #fff;
  font-family: var(--font-ui);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body *,
.board,
.board * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

@keyframes introAuroraDriftA {
  0% {
    transform: translate3d(-8%, 6%, 0) scale(1);
  }

  100% {
    transform: translate3d(10%, -4%, 0) scale(1.18);
  }
}

@keyframes introAuroraDriftB {
  0% {
    transform: translate3d(8%, -2%, 0) scale(1.02);
  }

  100% {
    transform: translate3d(-10%, 8%, 0) scale(1.16);
  }
}

@keyframes introAuroraPulse {
  0% {
    opacity: 0.68;
    transform: translate3d(0, 4%, 0) scale(0.98);
  }

  100% {
    opacity: 0.92;
    transform: translate3d(0, -4%, 0) scale(1.06);
  }
}

[hidden] {
  display: none !important;
}

.dialed-logo,
.desktop-game-nav,
.desktop-footer {
  display: none;
}

.shell {
  min-height: 100dvh;
  padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.board {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  background: #000;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.screen.no-transition {
  transition: none;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

.round-marker {
  position: absolute;
  top: var(--overlay-pad-y);
  left: var(--overlay-pad-x);
  z-index: 10;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.32px;
}

.round-marker-shift {
  left: var(--picker-main-offset);
}

.watermark {
  position: absolute;
  z-index: 10;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.56px;
  opacity: 0.5;
  pointer-events: none;
}

.watermark-top {
  top: var(--overlay-pad-y);
  right: var(--overlay-pad-right);
}

.watermark-bottom {
  right: var(--overlay-pad-right);
  bottom: var(--overlay-pad-bottom);
}

.go-btn {
  position: absolute;
  right: calc(18px + var(--safe-right));
  bottom: calc(18px + var(--safe-bottom));
  z-index: 10;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}

.go-btn svg {
  width: 18px;
  height: 18px;
}

.go-btn:hover {
  transform: scale(1.02);
}

.go-btn:active {
  transform: scale(0.97);
}

.intro-screen,
.summary-screen {
  background: #000;
}

.intro-screen[data-ambient-gradient="aurora"] {
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.02), transparent 26%),
    linear-gradient(180deg, #000 0%, #010203 56%, #020304 100%);
  isolation: isolate;
}

.intro-screen[data-ambient-gradient="aurora"]::before,
.intro-screen[data-ambient-gradient="aurora"]::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -4%;
  height: 220%;
  pointer-events: none;
  filter: blur(var(--intro-aurora-blur));
  mix-blend-mode: screen;
  opacity: var(--intro-aurora-opacity);
  will-change: transform, opacity;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 56%, rgba(0, 0, 0, 0.58) 76%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 56%, rgba(0, 0, 0, 0.58) 76%, rgba(0, 0, 0, 0) 100%);
}

.intro-screen[data-ambient-gradient="aurora"]::before {
  background:
    radial-gradient(ellipse at 24% 72%, var(--intro-aurora-violet) 0, transparent 26%),
    radial-gradient(ellipse at 45% 88%, var(--intro-aurora-yellow) 0, transparent 34%),
    radial-gradient(ellipse at 68% 82%, var(--intro-aurora-orange) 0, transparent 28%);
  animation: introAuroraDriftA var(--intro-aurora-speed-a) ease-in-out infinite alternate;
}

.intro-screen[data-ambient-gradient="aurora"]::after {
  background:
    radial-gradient(ellipse at 36% 74%, rgba(255, 255, 255, 0.12) 0, transparent 18%),
    radial-gradient(ellipse at 58% 76%, var(--intro-aurora-violet) 0, transparent 26%),
    radial-gradient(ellipse at 82% 88%, var(--intro-aurora-cyan) 0, transparent 26%);
  animation:
    introAuroraDriftB var(--intro-aurora-speed-b) ease-in-out infinite alternate,
    introAuroraPulse var(--intro-aurora-speed-c) ease-in-out infinite alternate;
}

.challenge-screen {
  background: #000;
}

.intro-panel,
.summary-panel {
  position: relative;
  height: 100%;
  padding:
    calc(var(--card-pad) + var(--safe-top))
    calc(var(--card-pad) + var(--safe-right))
    calc(var(--card-pad) + var(--safe-bottom))
    calc(var(--card-pad) + var(--safe-left));
  z-index: 1;
}

.challenge-panel {
  position: relative;
  height: 100%;
  padding:
    calc(var(--card-pad) + var(--safe-top))
    calc(var(--card-pad) + var(--safe-right))
    calc(var(--card-pad) + var(--safe-bottom))
    calc(var(--card-pad) + var(--safe-left));
  display: grid;
  align-content: start;
  gap: 16px;
}

.intro-brand-mark {
  width: 22px;
  height: 22px;
  margin: 10px auto 18px;
  color: rgba(255, 255, 255, 0.88);
  opacity: 0.9;
  display: none;
}

.intro-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  color: #000;
  --brand-bg: #fff;
  --brand-outline: #000;
  --brand-accent: #fff;
}

.challenge-panel-result {
  gap: 14px;
  height: auto;
  min-height: 100%;
  padding-bottom: calc(var(--card-pad) + 28px + var(--safe-bottom));
}

.challenge-screen.active,
.summary-screen.active {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.intro-screen.active {
  overflow: hidden;
  -webkit-overflow-scrolling: auto;
  overscroll-behavior: none;
}

.challenge-close {
  position: absolute;
  top: calc(var(--card-pad) + var(--safe-top));
  right: calc(var(--card-pad) + var(--safe-right));
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.challenge-kicker {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.challenge-title {
  margin: 0;
  max-width: 360px;
  font-size: clamp(38px, 8vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.challenge-body {
  max-width: 344px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.58;
}

.challenge-body p {
  margin: 0 0 10px;
}

.challenge-body p:last-child {
  margin-bottom: 0;
}

.challenge-body-tight {
  display: grid;
  gap: 6px;
}

.challenge-body-tight p {
  margin: 0;
}

.challenge-field {
  display: grid;
  gap: 8px;
  max-width: 344px;
}

.challenge-field span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.challenge-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  outline: none;
}

.challenge-field input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.challenge-status {
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.4;
}

.challenge-share-card {
  max-width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  display: grid;
  gap: 8px;
}

.challenge-share-card-tight {
  min-height: 0;
  margin-top: -2px;
}

.challenge-share-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.challenge-share-link {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #fff;
  word-break: break-word;
}

.challenge-actions {
  display: grid;
  gap: 10px;
}

.challenge-actions-stack {
  margin-top: auto;
  padding-top: 8px;
}

.challenge-button {
  min-height: 48px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.challenge-button:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.challenge-button-primary {
  background: #fff;
  color: #000;
}

.challenge-button-primary:hover {
  background: rgba(255, 255, 255, 0.88);
}

.challenge-button-ghost {
  color: rgba(255, 255, 255, 0.78);
}

.intro-link-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

#introScreen .intro-link-button {
  min-height: 30px;
  padding: 0 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  box-shadow: none;
  font-size: 12px;
}

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

.daily-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.daily-cell::before,
.daily-cell::after {
  content: "";
  position: absolute;
  inset: 0;
}

.daily-cell::before {
  clip-path: polygon(0 0, 100% 0, 0 100%);
  background: var(--target-color);
}

.daily-cell::after {
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  background: var(--guess-color);
}

.daily-cell-label {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  font-family: var(--font-numeric);
  font-size: 11px;
  line-height: 1;
  letter-spacing: -0.22px;
}

.daily-rank-copy {
  color: rgba(255, 255, 255, 0.94);
}

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

.leaderboard-tab {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.leaderboard-tab.active {
  background: #fff;
  color: #000;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.leaderboard-rank {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.leaderboard-name {
  min-width: 0;
  font-size: 14px;
}

.leaderboard-score {
  font-family: var(--font-numeric);
  font-size: 16px;
}

.leaderboard-empty {
  color: rgba(255, 255, 255, 0.52);
  font-size: 14px;
  line-height: 1.5;
}

.multiplayer-result-list {
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.multiplayer-row {
  width: 100%;
  appearance: none;
  text-align: left;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.multiplayer-row.is-me {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--surface-2);
}

.multiplayer-row.is-active {
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--surface-3);
}

.multiplayer-row:hover {
  transform: translateY(-1px);
}

.multiplayer-rank {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
}

.multiplayer-name {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.multiplayer-name strong {
  font-size: 16px;
  line-height: 1.1;
}

.multiplayer-name span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  line-height: 1.2;
}

.multiplayer-score {
  font-family: var(--font-numeric);
  font-size: 18px;
  line-height: 1;
}

.multiplayer-detail {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.multiplayer-detail[hidden] {
  display: none;
}

.multiplayer-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.multiplayer-detail-kicker {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multiplayer-detail-title {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.multiplayer-detail-score {
  font-family: var(--font-numeric);
  font-size: 26px;
  line-height: 1;
}

.multiplayer-detail-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 13px;
  line-height: 1.45;
}

.multiplayer-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.multiplayer-cell {
  display: grid;
  gap: 6px;
}

.multiplayer-cell-label {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multiplayer-cell-swatches {
  position: relative;
}

.multiplayer-cell-score {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  font-family: var(--font-numeric);
  font-size: 11px;
  line-height: 1;
  letter-spacing: -0.22px;
}

.intro-panel h1,
.intro-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: min(78px, 19vw);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.intro-copy {
  position: relative;
  left: 0;
  top: 0;
  max-width: 332px;
  margin-top: 14px;
  margin-left: 0;
  color: #adadad;
  font-size: 14px;
  line-height: 1.58;
  letter-spacing: 0;
}

.intro-copy p {
  margin: 0 0 14px;
}

.intro-analytics {
  position: absolute;
  left: calc(var(--card-pad) + var(--safe-left));
  bottom: calc(124px + var(--safe-bottom));
  z-index: 1;
  width: min(344px, calc(100% - ((var(--card-pad) * 2) + var(--safe-left) + var(--safe-right))));
  max-width: 336px;
}

.intro-analytics-label {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.intro-stats[hidden] {
  display: none;
}

.intro-stat {
  min-height: 48px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  display: grid;
  gap: 6px;
  align-content: start;
}

.intro-stat-label {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.intro-stat-value {
  font-size: 12px;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

.intro-history-empty {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0;
}

.resume-session-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.resume-session-btn[hidden] {
  display: none;
}

.resume-session-btn:hover {
  transform: translateY(-1px);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.resume-session-meta {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
}

.intro-controls {
  position: absolute;
  left: calc(var(--card-pad) + var(--safe-left));
  right: calc(var(--card-pad) + var(--safe-right));
  bottom: calc(var(--card-pad) + var(--safe-bottom));
  display: grid;
  gap: 10px;
}

.intro-meta-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intro-brand-caption {
  margin: -2px 0 10px;
  display: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
}

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

.intro-mode-card {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background: var(--surface-1);
  color: #fff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

#introScreen .intro-mode-card {
  border-color: rgba(202, 220, 247, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.022)),
    rgba(16, 29, 46, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

#introScreen #startButton {
  order: 1;
}

.intro-mode-card-primary {
  min-height: 92px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

#introScreen .intro-mode-card-primary {
  min-height: 90px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.026)),
    rgba(18, 25, 36, 0.94);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 46px rgba(0, 0, 0, 0.24);
}

.intro-mode-card-secondary {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 84px;
  align-items: center;
  padding-top: 15px;
  padding-bottom: 15px;
}

#introScreen .intro-mode-card-secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(14, 24, 38, 0.88);
}

#introScreen .intro-mode-card-primary .intro-mode-card-copy {
  gap: 4px;
  align-content: center;
}

#introScreen .intro-mode-card-primary .intro-mode-card-title {
  font-size: 19px;
}

#introScreen .intro-mode-card-primary .intro-mode-card-desc {
  color: rgba(255, 255, 255, 0.5);
}

#introScreen .intro-mode-card-primary .intro-mode-card-icon {
  background: rgba(255, 255, 255, 0.08);
}

.intro-mode-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.11);
  flex-shrink: 0;
}

#introScreen .intro-mode-card-icon {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  color: rgba(241, 246, 255, 0.96);
}

.intro-mode-card-secondary .intro-mode-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

#introScreen .intro-mode-card-secondary .intro-mode-card-icon {
  background: rgba(255, 255, 255, 0.05);
}

.intro-mode-card svg {
  width: 24px;
  height: 24px;
}

.intro-mode-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
  align-content: center;
}

#introScreen .intro-mode-card-copy {
  gap: 3px;
}

.intro-mode-card-kicker {
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
}

#introScreen .intro-mode-card-kicker {
  color: rgba(255, 255, 255, 0.38);
}

.intro-mode-card-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

#introScreen .intro-mode-card-title {
  color: #fff;
  letter-spacing: -0.03em;
}

.intro-mode-card-secondary .intro-mode-card-title {
  font-size: 16px;
  line-height: 1.08;
}

#introScreen .intro-mode-card-secondary .intro-mode-card-title {
  font-size: 15px;
  line-height: 1.12;
}

.intro-mode-card-desc {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
}

#introScreen .intro-mode-card-desc {
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.34;
}

#introScreen .intro-mode-card-secondary .intro-mode-card-desc {
  color: rgba(255, 255, 255, 0.46);
  line-height: 1.32;
}

.intro-mode-card-arrow {
  align-self: center;
  justify-self: end;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

#introScreen .intro-mode-card-arrow {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  padding: 7px 10px;
}

.intro-mode-card-ring {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.035));
}

#introScreen .intro-mode-card-ring {
  border-color: rgba(202, 220, 247, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(14, 24, 38, 0.88);
}

.intro-mode-card:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.intro-mode-card:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

#introScreen .intro-mode-card:not(:disabled):hover {
  border-color: rgba(223, 235, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(20, 33, 52, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 44px rgba(0, 0, 0, 0.22);
}

.intro-mode-card:not(:disabled):active {
  transform: translateY(0);
  background: var(--surface-3);
}

#introScreen .intro-mode-card:not(:disabled):active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(15, 27, 42, 0.94);
}

.intro-toggle {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.intro-mode-hint {
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.sound-toggle {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.sound-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.72;
}

.sound-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.26);
}

.sound-toggle[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.sound-toggle[aria-pressed="false"] {
  color: rgba(255, 255, 255, 0.56);
}

.sound-toggle:disabled {
  cursor: default;
  transform: none;
  opacity: 0.46;
}

.countdown-screen {
  background: #000;
}

.countdown-tint {
  position: absolute;
  inset: 0;
  opacity: 0;
  filter: saturate(0.98) brightness(0.98);
  will-change: opacity, filter;
  transition:
    opacity 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.12s cubic-bezier(0.2, 0.9, 0.3, 1);
  pointer-events: none;
}

.countdown-word {
  position: absolute;
  top: 14px;
  right: 20px;
  z-index: 1;
  width: 2.6em;
  font-family: var(--font-display);
  font-size: clamp(54px, 14vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-align: right;
  transition:
    opacity 0.15s ease,
    color 0.15s ease;
}

.memorize-screen {
  background: #000;
}

.memorize-color,
.picker-bg {
  position: absolute;
  inset: 0;
}

.timer-value {
  position: absolute;
  top: 14px;
  right: 20px;
  z-index: 2;
  font-family: var(--font-numeric);
  font-size: min(92px, 18vw);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -2.76px;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings:
    "lnum" 1,
    "tnum" 1;
  text-align: right;
}

#timerInt {
  display: inline-block;
  position: relative;
  min-width: 0.62em;
  text-align: right;
}

#timerDec {
  display: inline-block;
  opacity: 0.52;
  min-width: 1.24em;
  text-align: left;
}

.timer-label {
  position: absolute;
  top: 92px;
  right: 20px;
  z-index: 2;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  text-align: right;
  opacity: 0.68;
}

.play-screen,
.result-screen {
  padding: 0;
}

.strip-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  width: calc(var(--picker-strip-width) + var(--safe-left));
  display: flex;
  opacity: 0;
  transform: translateX(-100%);
  transition:
    opacity 0.5s ease-out 0.05s,
    transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1) 0.05s;
}

.play-screen.active .strip-container {
  opacity: 1;
  transform: translateX(0);
}

.strip {
  position: relative;
  flex: 1 1 0;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  touch-action: none;
  min-width: 0;
}

#hStrip {
  padding-left: var(--safe-left);
}

.strip:focus-visible {
  outline: none;
}

.strip-handle {
  position: absolute;
  left: 50%;
  z-index: 2;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: top 0.05s linear;
}

.hue-strip {
  background: linear-gradient(
    180deg,
    #ff0050 0%,
    #db00ff 11%,
    #2200ff 22%,
    #0070ff 33%,
    #00f3ff 44%,
    #00ff33 56%,
    #a2ff00 67%,
    #ffe500 78%,
    #ff9300 89%,
    #ff3000 100%
  );
}

.picker-channel-label {
  display: none;
}

.picker-info {
  display: none;
}

.play-screen.active .picker-info,
.play-screen.active #submitButton {
  opacity: 1;
}

.picker-info div {
  font-size: 12px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: 0;
}

#pickerLabel {
  opacity: 0.5;
}

#submitButton {
  opacity: 0;
  transition:
    opacity 0.3s ease 0.35s,
    transform 0.15s ease;
}

.picker-go-icon {
  width: 18px;
  height: 18px;
}

.result-screen {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.result-half {
  position: relative;
  padding:
    0
    calc(var(--card-pad) + var(--safe-right))
    calc(var(--card-pad) + var(--safe-bottom))
    calc(var(--card-pad) + var(--safe-left));
}

.guess-half {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.result-meta {
  position: absolute;
  left: calc(var(--card-pad) + var(--safe-left));
  bottom: calc(var(--card-pad) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
}

.result-meta-bottom {
  bottom: calc(14px + var(--safe-bottom));
}

.result-label,
.result-hsb {
  font-size: 12px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: 0;
}

.result-label {
  opacity: 0.5;
  margin-bottom: -5px;
}

.score-cluster {
  position: absolute;
  top: calc(var(--card-pad) + var(--safe-top));
  right: calc(var(--card-pad) + var(--safe-right));
  z-index: 10;
  width: min(300px, calc(100% - 232px - var(--safe-left)));
  display: grid;
  justify-items: end;
}

.score-number {
  font-family: var(--font-display);
  font-size: clamp(58px, 17vw, 92px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-align: right;
  white-space: nowrap;
}

.score-copy {
  margin: 8px 0 0;
  min-height: 2.5em;
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 500;
  line-height: 1.26;
  letter-spacing: 0;
  text-align: right;
  opacity: 0;
  max-width: min(520px, 100%);
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.score-int,
.score-dot,
.score-dec {
  display: inline-block;
}

@keyframes numSlideOut {
  0% {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }

  100% {
    transform: translateY(22%);
    filter: blur(4px);
    opacity: 0;
  }
}

@keyframes numSlideIn {
  0% {
    transform: translateY(-22%);
    filter: blur(4px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }
}

@keyframes descFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.num-out {
  animation: numSlideOut 0.12s ease-in forwards;
}

.num-in {
  animation: numSlideIn 0.15s ease-out forwards;
}

.num-out-fast {
  animation: numSlideOut 0.06s ease-in forwards;
}

.num-in-fast {
  animation: numSlideIn 0.07s ease-out forwards;
}

.desc-animate {
  animation: descFadeIn 0.4s ease-out forwards;
}

.summary-screen {
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.12),
      transparent 34%
    ),
    linear-gradient(180deg, #111 0%, #060606 100%);
}

.summary-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.summary-header {
  display: grid;
  gap: 4px;
}

.summary-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  line-height: 19px;
  letter-spacing: 0.08em;
}

.summary-meta {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0;
}

.summary-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.64);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.summary-score {
  font-family: var(--font-display);
  font-size: clamp(50px, 12vw, 72px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.summary-stat-card {
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  display: grid;
  gap: 6px;
  align-content: start;
}

.summary-stat-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.summary-stat-value {
  font-size: 12px;
  line-height: 1.15;
  letter-spacing: 0;
}

.summary-copy {
  margin: 0;
  max-width: 32ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.58;
  letter-spacing: 0;
}

.summary-ad-slot {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.summary-ad-slot-label {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.summary-ad-slot-box {
  width: min(100%, 320px);
  min-height: 100px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.035) 100%
  );
  display: grid;
  gap: 6px;
  align-content: start;
}

.summary-ad-slot-size {
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.summary-ad-slot-title {
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0;
}

.summary-ad-slot-copy,
.summary-ad-slot-meta {
  margin: 0;
}

.summary-ad-slot-copy {
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
}

.summary-ad-slot-meta {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0;
}

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

.summary-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.summary-tile::before,
.summary-tile::after {
  content: "";
  position: absolute;
  inset: 0;
}

.summary-tile::before {
  clip-path: polygon(0 0, 100% 0, 0 100%);
  background: var(--target-color);
}

.summary-tile::after {
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  background: var(--guess-color);
}

.summary-tile-score {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  font-size: 11px;
  line-height: 1;
  letter-spacing: -0.22px;
}

.summary-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.summary-row-swatch {
  width: 36px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--target-color) 0 49%,
    var(--guess-color) 51% 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.summary-row-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.summary-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.summary-row-round {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
}

.summary-row-score {
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
}

.summary-row-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-row-pill {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0;
}

.summary-row-metric {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
}

.summary-status {
  min-height: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.summary-status.visible {
  opacity: 1;
}

.summary-actions {
  display: flex;
  gap: 10px;
}

.summary-button {
  min-width: 120px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

.summary-button:hover {
  transform: translateY(-1px);
}

.summary-button-dark {
  background: #fff;
  border-color: #fff;
  color: #000;
}

@media (min-width: 768px) {
  html,
  body {
    background: #fff;
  }
  

  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: auto;
  }

  .dialed-logo {
    display: block;
    position: fixed;
    top: 21px;
    left: 26px;
    color: #000;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.84px;
    text-decoration: none;
  }

  .desktop-game-nav {
    display: flex;
    position: fixed;
    top: 28px;
    left: 140px;
    right: auto;
    gap: 20px;
    align-items: baseline;
    z-index: 10;
  }

  .desk-game-link {
    color: rgba(0, 0, 0, 0.3);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.3px;
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .desk-game-link:hover {
    color: rgba(0, 0, 0, 0.6);
  }

  .desk-game-link.active {
    color: #000;
  }

  .desktop-footer {
    display: flex;
    position: fixed;
    left: 30px;
    right: 30px;
    bottom: 30px;
    align-items: center;
    justify-content: space-between;
    color: #000;
    font-size: 9px;
    line-height: 24px;
    letter-spacing: -0.18px;
    pointer-events: none;
    z-index: 10;
  }

  .desktop-footer-meta {
    display: flex;
    align-items: center;
    gap: 0;
  }

  .desktop-footer-meta > span + span::before {
    content: "·";
    opacity: 0.3;
    margin: 0 4px;
  }

  .desktop-footer-pill {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.4);
  }

  .desktop-footer-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .desktop-footer-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.66);
  }

  .desktop-footer-icon svg {
    width: 16px;
    height: 16px;
  }

  .shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
  }

  .board {
    width: var(--card-width);
    min-height: var(--card-height);
    height: var(--card-height);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    flex-shrink: 0;
  }

  .screen {
    position: absolute;
    inset: 0;
  }

  .summary-panel {
    gap: 12px;
  }

  .summary-ad-slot-box {
    width: 320px;
    min-height: 100px;
    padding: 12px 14px;
  }
}

@media (max-width: 767px) {
  .intro-brand-mark {
    margin-top: 8px;
    margin-bottom: 16px;
  }

  .challenge-panel {
    gap: 14px;
  }

  .challenge-close {
    top: calc(20px + var(--safe-top));
    right: calc(20px + var(--safe-right));
  }

  .challenge-title {
    max-width: 300px;
    font-size: clamp(34px, 12vw, 52px);
  }

  .challenge-body,
  .challenge-field {
    max-width: 100%;
  }

  .daily-grid {
    gap: 6px;
  }

  .countdown-word {
    width: 2.5em;
    font-size: clamp(46px, 13vw, 62px);
  }

  .intro-stats,
  .summary-stats {
    grid-template-columns: 1fr;
  }

  .intro-toggle,
  .sound-toggle {
    padding: 0 12px;
    font-size: 11px;
  }

  .strip-container {
    width: calc(120px + var(--safe-left));
  }

  .round-marker-shift {
    left: calc(142px + var(--safe-left));
  }

  .picker-info,
  .picker-channel-label {
    left: calc(120px + var(--safe-left));
  }

  .score-cluster {
    position: absolute;
    top: calc(var(--card-pad) + var(--safe-top));
    right: calc(var(--card-pad) + var(--safe-right));
    z-index: 10;
    width: min(520px, calc(100% - 132px - var(--safe-left)));
    display: grid;
    justify-items: end;
  }

  .summary-actions {
    flex-direction: column;
  }

  #hStrip {
    flex: 0 0 40px;
  }

  #sStrip,
  #bStrip {
    flex: 0 0 40px;
  }

  .strip-handle {
    width: 25px;
    height: 25px;
  }

  .go-btn {
    right: calc(30px + var(--safe-right));
    bottom: calc(30px + var(--safe-bottom));
    width: 50px;
    height: 50px;
  }

  .go-btn svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 520px) {
  .intro-brand-mark {
    width: 18px;
    height: 18px;
    margin-bottom: 14px;
  }

  .round-marker {
    top: calc(14px + var(--safe-top));
    left: calc(16px + var(--safe-left));
  }

  .round-marker-shift {
    left: calc(132px + var(--safe-left));
  }

  .watermark-top {
    top: calc(14px + var(--safe-top));
    right: calc(16px + var(--safe-right));
  }

  .watermark-bottom {
    right: calc(16px + var(--safe-right));
    bottom: calc(14px + var(--safe-bottom));
  }

  .daily-cell {
    border-radius: 14px;
  }

  .leaderboard-row {
    padding: 13px 14px;
  }

  .challenge-share-link {
    font-size: 12px;
  }

  .multiplayer-row {
    padding: 13px 14px;
    gap: 10px;
  }

  .multiplayer-name strong {
    font-size: 15px;
  }

  .multiplayer-detail {
    padding: 14px;
  }

  .multiplayer-detail-title {
    font-size: 20px;
  }

  .multiplayer-detail-score {
    font-size: 22px;
  }

  .multiplayer-detail-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .intro-controls {
    gap: 9px;
  }

  .intro-meta-controls {
    gap: 8px;
  }

  .intro-mode-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .intro-mode-card {
    padding: 13px 14px;
  }

  .intro-mode-card-primary {
    min-height: 80px;
  }

  .intro-mode-card-secondary {
    min-height: 76px;
  }

  .intro-mode-card-copy {
    gap: 2px;
  }

  .intro-mode-card-desc {
    line-height: 1.28;
  }

  .intro-toggle,
  .sound-toggle {
    min-height: 36px;
    padding: 0 10px;
    font-size: 10px;
  }

  .resume-session-btn {
    flex-direction: column;
    align-items: flex-start;
  }

  .score-cluster {
    width: min(220px, calc(100% - 126px - var(--safe-left)));
  }

  .score-copy {
    font-size: 14px;
  }

  .summary-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .summary-row-metric {
    grid-column: 2;
  }

  .summary-button {
    width: 100%;
  }
}

@media (max-height: 780px) and (max-width: 767px) {
  .intro-brand-caption {
    margin-bottom: 6px;
  }

  .intro-mode-card-secondary {
    min-height: 70px;
  }
}

@media (max-height: 700px) and (max-width: 767px) {
  .intro-brand-caption {
    margin-bottom: 4px;
    font-size: 9px;
  }

  .intro-mode-card {
    padding: 12px 13px;
  }

  .intro-mode-card-secondary {
    min-height: 64px;
  }

  .intro-mode-card-icon {
    width: 38px;
    height: 38px;
  }

  .intro-mode-card-secondary .intro-mode-card-icon {
    width: 32px;
    height: 32px;
  }

  .intro-mode-card-title {
    font-size: 17px;
  }

  .intro-mode-card-secondary .intro-mode-card-title {
    font-size: 14px;
  }

  .intro-mode-card-desc,
  .intro-mode-card-kicker,
  .intro-mode-hint {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-screen[data-ambient-gradient="aurora"]::before,
  .intro-screen[data-ambient-gradient="aurora"]::after {
    animation: none;
  }
}


/* ===== mobile anti-zoom / anti-scroll restore ===== */
html,
body {
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  overflow: hidden;
}

.board,
.screen,
.intro-screen,
.countdown-screen,
.memorize-screen,
.play-screen,
.result-screen,
.summary-screen {
  overscroll-behavior: none;
}

.board {
  touch-action: manipulation;
}

/* ===== emergency polish: stronger drag absorption feel ===== */
.strip-handle {
  transition: top 0.12s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: top;
}

/* ===== intro prototype layout ===== */
#introScreen {
  --intro-top-pad: 34px;
  --intro-bottom-pad: 34px;
  --intro-title-size: 68px;
  --intro-title-width: 290px;
  --intro-copy-width: 320px;
  --intro-copy-gap: 8px;
  --intro-actions-width: 375px;
  --intro-actions-gap: 8px;
  --intro-primary-height: 88px;
  --intro-secondary-height: 74px;
  --intro-brand-offset: 10px;
  --intro-brand-caption-gap: 2px;
}

#introScreen .intro-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 100%;
  padding:
    calc(var(--intro-top-pad) + var(--safe-top))
    calc(20px + var(--safe-right))
    calc(var(--intro-bottom-pad) + var(--safe-bottom))
    calc(20px + var(--safe-left));
}

#introScreen .intro-title {
  width: 100%;
  max-width: var(--intro-title-width);
  margin: -10px auto 0;
  color: #fff;
  font-size: var(--intro-title-size);
  line-height: 0.92;
  letter-spacing: -0.06em;
  text-align: center;
}

#introScreen .intro-copy {
  width: 100%;
  max-width: var(--intro-copy-width);
  margin: 8px auto 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.46;
  letter-spacing: -0.015em;
  text-align: center;
}

#introScreen .intro-copy p {
  margin-bottom: var(--intro-copy-gap);
}

#introScreen .intro-copy p:last-child {
  margin-bottom: 0;
}

#introScreen .intro-copy-lead {
  font-size: 14px;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

#introScreen .intro-copy-subtle {
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  line-height: 1.25;
}

#introScreen #introAnalytics {
  position: static;
  left: auto;
  bottom: auto;
  width: 340px;
  max-width: 340px;
  margin: 18px auto 0;
  order: 2;
}

#introScreen #introActions {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: var(--intro-actions-width);
  margin: 8px auto 0;
  gap: var(--intro-actions-gap);
}

#introScreen #startButton {
  order: 1;
  min-height: var(--intro-primary-height);
}

#introScreen #introSecondaryGrid {
  order: 2;
}

#introScreen #introSecondaryActions {
  order: 3;
  justify-content: center;
  margin-top: 2px;
}

#introScreen #introBrandMark {
  position: absolute;
  left: 0;
  right: 0;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  bottom: calc(42px + var(--safe-bottom));
  display: block;
  opacity: 0.86;
}

#introScreen #introBrandCaption {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  bottom: calc(18px + var(--safe-bottom));
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-align: center;
}

#introScreen .intro-mode-card-primary {
  min-height: var(--intro-primary-height);
  border-radius: 20px;
}

#introScreen .intro-mode-card-secondary {
  min-height: var(--intro-secondary-height);
  border-radius: 18px;
}

#introScreen .intro-mode-card {
  gap: 12px;
  padding: 13px 15px;
}

#introScreen .intro-mode-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

#introScreen .intro-mode-card-secondary .intro-mode-card-icon {
  width: 36px;
  height: 36px;
}

#introScreen .intro-mode-card-title {
  font-size: 17px;
  line-height: 1.04;
}

#introScreen .intro-mode-card-primary .intro-mode-card-title {
  font-size: 18px;
}

#introScreen .intro-mode-card-desc {
  font-size: 10px;
  line-height: 1.26;
}

#introScreen .intro-link-button {
  padding: 9px 18px;
  font-size: 12px;
  line-height: 1;
}

/* Keep current composition as baseline; only nudge on smaller screens. */
@media (max-width: 393px) {
  #introScreen {
    --intro-title-size: 64px;
    --intro-title-width: 270px;
    --intro-copy-width: 304px;
    --intro-actions-width: 348px;
    --intro-primary-height: 84px;
    --intro-secondary-height: 70px;
  }

  #introScreen .intro-copy {
    font-size: 15px;
  }

  #introScreen .intro-copy-lead {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  #introScreen {
    --intro-top-pad: 28px;
    --intro-bottom-pad: 24px;
    --intro-title-size: 58px;
    --intro-title-width: 244px;
    --intro-copy-width: 270px;
    --intro-actions-width: 320px;
    --intro-primary-height: 78px;
    --intro-secondary-height: 64px;
  }

  #introScreen .intro-copy {
    font-size: 14px;
  }

  #introScreen .intro-copy-lead {
    font-size: 12px;
  }

  #introScreen .intro-copy-subtle {
    font-size: 10px;
  }
}

@media (max-height: 760px) and (max-width: 767px) {
  #introScreen {
    --intro-top-pad: 18px;
    --intro-bottom-pad: 18px;
    --intro-actions-gap: 7px;
    --intro-primary-height: 80px;
    --intro-secondary-height: 66px;
  }

  #introScreen #introBrandMark {
    bottom: calc(34px + var(--safe-bottom));
  }

  #introScreen #introBrandCaption {
    bottom: calc(14px + var(--safe-bottom));
  }
}

@media (max-height: 680px) and (max-width: 767px) {
  #introScreen {
    --intro-top-pad: 12px;
    --intro-bottom-pad: 12px;
    --intro-title-size: 56px;
    --intro-actions-gap: 6px;
    --intro-primary-height: 72px;
    --intro-secondary-height: 58px;
  }

  #introScreen .intro-title {
    margin-top: -6px;
  }

  #introScreen #introBrandMark {
    bottom: calc(30px + var(--safe-bottom));
  }

  #introScreen #introBrandCaption {
    bottom: calc(10px + var(--safe-bottom));
  }
}


