:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee9;
  --heavy: #172033;
  --accent: #2667ff;
  --accent-soft: #e8efff;
  --select-soft: #6ea8ff;
  --select-border: #175cd3;
  --intersection: #8a2be2;
  --spot-highlight: #fff4cc;
  --warn: #b42318;
  --warn-soft: #fee4e2;
  --ok: #067647;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  touch-action: manipulation;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: radial-gradient(circle at top left, #e7efff 0, var(--bg) 36rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 0.7rem;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 0.6rem 0.78rem;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button:hover {
  box-shadow: 0 8px 20px rgba(38, 103, 255, 0.22);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

button.secondary,
button.digit,
button.spot {
  background: var(--accent-soft);
  color: var(--accent);
}

button.active {
  background: var(--ink);
  color: white;
}

button.danger {
  background: var(--warn-soft);
  color: var(--warn);
}

.app {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin: 0 auto;
  max-width: min(100%, 1500px);
  min-height: 0;
  overflow-x: hidden;
  padding: 0.8rem 1rem;
  width: 100%;
}

.hero {
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

.hero-title {
  min-width: 0;
}

.board-action-status {
  align-items: stretch;
  container-type: inline-size;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0.55rem;
  min-height: 2.75rem;
  width: 100%;
}

@container (max-width: 19rem) {
  .board-action-status {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
}

.board-action-status .filled-status,
.board-action-status .reset-button {
  box-sizing: border-box;
  margin: 0;
  min-height: 2.75rem;
  min-width: 0;
  width: 100%;
}

.board-action-status .filled-status {
  white-space: nowrap;
}

.board-action-status .reset-button {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 0.45rem 0.6rem;
  white-space: nowrap;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 0.3rem;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
  margin-bottom: 0.35rem;
}

h2 {
  font-size: 1rem;
  margin-bottom: 0.55rem;
}

.dashboard h2 {
  margin-bottom: 0.35rem;
}

.intro,
.help-text,
.summary,
.hint-list,
.result-list {
  color: var(--muted);
}

.status-card {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  display: grid;
  justify-items: center;
  max-width: 100%;
  min-width: 0;
  padding: 0.65rem 0.85rem;
}

.status-card span {
  font-size: 1.6rem;
  font-weight: 800;
}

.reset-button {
  white-space: nowrap;
}

.dashboard {
  align-items: stretch;
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.dashboard-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.spot-results {
  align-items: stretch;
  display: grid;
  gap: 0.35rem;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
}

.hint-panel {
  min-width: 0;
}

.board-panel-board {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 0;
  min-width: 0;
}

.board-panel,
.control-card,
.results {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0.55rem 0.6rem;
}

.board-meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  min-width: 0;
}

.board-meta .help-text {
  flex-shrink: 0;
  margin-bottom: 0;
}

.board-stage {
  align-items: flex-start;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.board {
  aspect-ratio: 1;
  background: var(--heavy);
  border: 3px solid var(--heavy);
  box-sizing: border-box;
  display: grid;
  gap: 0.5px;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-template-rows: repeat(9, minmax(0, 1fr));
  height: auto;
  max-width: 100%;
  width: 100%;
}

.cell {
  aspect-ratio: 1;
  background: #fff;
  cursor: pointer;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.cell:nth-child(3n):not(:nth-child(9n)) {
  border-right: 2px solid var(--heavy);
}

.cell:nth-child(n + 19):nth-child(-n + 27),
.cell:nth-child(n + 46):nth-child(-n + 54) {
  border-bottom: 2px solid var(--heavy);
}

.value-input {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: clamp(1.15rem, min(5.5vmin, 5vw), 2.5rem);
  font-weight: 800;
  height: 100%;
  inset: 0;
  outline: 0;
  position: absolute;
  text-align: center;
  width: 100%;
  z-index: 2;
}

.candidate-grid {
  color: #475467;
  display: grid;
  font-size: clamp(0.68rem, min(2vmin, 2.1vw), 1.05rem);
  font-weight: 300;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  height: 100%;
  line-height: 1;
  opacity: 0.88;
  padding: 0;
  place-items: center;
}

.candidate-grid span {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

@supports (font-size: 1cqw) {
  .cell {
    container-type: size;
  }

  .value-input {
    font-size: clamp(0.9rem, 50cqw, 2.35rem);
  }

  .candidate-grid {
    font-size: clamp(0.7rem, 28cqw, 1.05rem);
  }
}

.cell.solved .candidate-grid {
  visibility: hidden;
}

.cell.digit-match,
.cell.selected {
  background: var(--select-soft);
}

.cell.highlight {
  background: var(--spot-highlight);
}

.cell.advanced-highlight.highlight-group-0 {
  background: #ffe3e3;
}

.cell.advanced-highlight.highlight-group-1 {
  background: #dbeafe;
}

.cell.advanced-highlight.highlight-group-2 {
  background: #dcfce7;
}

.cell.advanced-highlight.highlight-group-3 {
  background: #fef3c7;
}

.cell.advanced-highlight.highlight-group-4 {
  background: #ede9fe;
}

.cell.advanced-highlight.highlight-group-5 {
  background: #cffafe;
}

.cell.advanced-highlight.highlight-group-6 {
  background: #fce7f3;
}

.cell.advanced-highlight.highlight-group-7 {
  background: #e0f2fe;
}

.cell.result-selected-cell {
  background: #ff8a00;
  box-shadow: inset 0 0 0 5px #7a2e00;
}

.cell.cell-color-0 {
  background: #ffc6ff;
}

.cell.cell-color-1 {
  background: #caffbf;
}

.cell.cell-color-2 {
  background: #bdb2ff;
}

.cell.cell-color-3 {
  background: #9bf6ff;
}

.cell.cell-color-4 {
  background: #ffadad;
}

.cell.single-selected {
  box-shadow: inset 0 0 0 4px var(--select-border);
}

.candidate-grid span.digit-active {
  background: var(--select-soft);
  border-radius: 0;
  color: var(--ink);
  font-weight: 300;
}

.cell.conflict {
  background: var(--warn-soft);
}

.controls {
  display: block;
  min-width: 0;
}

.quick-actions {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.advanced-hint-details summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  list-style-position: inside;
}

.advanced-hint-details {
  border-top: 1px solid var(--line);
  margin-top: 0.45rem;
  padding-top: 0.4rem;
}

.advanced-content {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
}

.advanced-spot-details {
  border-top: 1px solid var(--line);
  margin-top: 0.45rem;
  padding-top: 0.4rem;
}

.spot-unit-filter {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.55rem 0.5rem;
}

.spot-unit-filter legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0 0.2rem;
}

.spot-unit-filter-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
}

.spot-unit-option {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  gap: 0.3rem;
}

.advanced-spot-details summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  list-style-position: inside;
}

.advanced-spot-content {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.advanced-tips {
  background: var(--accent-soft);
  border: 1px solid #c7d7fe;
  border-radius: 0.8rem;
  min-height: 0;
  overflow-y: auto;
  padding: 0.65rem;
  -webkit-overflow-scrolling: touch;
}

.advanced-tips dl {
  display: grid;
  gap: 0.4rem 0.8rem;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
}

.advanced-tips div {
  display: grid;
  gap: 0.12rem;
}

.advanced-tips dt {
  color: var(--accent);
  font-weight: 800;
}

.advanced-tips dd {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0;
}

.quick-actions .button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.quick-actions .board-action-buttons {
  margin-bottom: 0.55rem;
}

.play-panel .play-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.45rem;
}

.control-card.quick-actions button,
.control-card.play-panel .play-action-buttons button {
  background: var(--accent-soft);
  color: var(--accent);
}

.spot-output {
  border-top: 1px solid var(--line);
  min-width: 0;
  padding-top: 0.35rem;
}

.filled-status {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 0.75rem;
  color: var(--accent);
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  padding: 0.45rem 0.6rem;
}

.filled-status span {
  font-size: 1.35rem;
  font-weight: 800;
}

.filled-status small {
  color: var(--muted);
  font-weight: 800;
}

.mode-groups {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.color-mode-picker[hidden] {
  display: none;
}

.color-mode-picker {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 0.65rem;
}

button.color-choice {
  color: var(--ink);
  font-size: 0.78rem;
  padding: 0.45rem 0.35rem;
}

button.color-choice-0 {
  background: #ffc6ff;
}

button.color-choice-1 {
  background: #caffbf;
}

button.color-choice-2 {
  background: #bdb2ff;
}

button.color-choice-3 {
  background: #9bf6ff;
}

button.color-choice-4 {
  background: #ffadad;
}

button.color-choice.active {
  box-shadow: inset 0 0 0 3px var(--ink);
}

.color-settings {
  display: none;
}

.mode-group {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  padding: 0.45rem 0.6rem 0.55rem;
}

.mode-group legend {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0 0.25rem;
}

.mode-group label {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 0.35rem;
}

.button-row,
.digit-picker,
.spot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.digit-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.4rem;
}

.digit-hidden {
  pointer-events: none;
  visibility: hidden;
}

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

.spot-grid .spot {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.advanced-pattern-group {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: grid;
  gap: 0.4rem;
  padding: 0.45rem;
}

.advanced-pattern-title {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.puzzle-source-stack {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.puzzle-source-block {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.55rem 0.65rem 0.65rem;
}

.puzzle-source-title {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
}

.puzzle-source-hint {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}

.puzzle-source-hint kbd {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  font-size: 0.78em;
  font-weight: 700;
  padding: 0.05rem 0.28rem;
}

.puzzle-source-block textarea {
  margin-bottom: 0.5rem;
}

.puzzle-source-cta {
  width: 100%;
}

.load-puzzle-actions {
  align-items: stretch;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  margin-top: 0;
  max-width: 100%;
  min-width: 0;
}

.random-puzzle-tier {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  flex: unset;
  font-size: 0.9rem;
  font-weight: 600;
  max-width: none;
  min-width: 0;
  padding: 0.35rem 0.5rem;
}

.load-puzzle-actions > button {
  flex-shrink: unset;
  white-space: nowrap;
}

.puzzle-source-cta-wide {
  width: 100%;
}

.random-puzzle-message {
  margin: 0.35rem 0 0;
  min-height: 1.1em;
}

.color-control {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.86rem;
  font-weight: 700;
  gap: 0.55rem;
  justify-content: space-between;
  margin-top: 0.65rem;
}

.color-control input {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  cursor: pointer;
  height: 2rem;
  padding: 0.15rem;
  width: 3.5rem;
}

textarea {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: block;
  margin-bottom: 0.45rem;
  padding: 0.55rem;
  resize: vertical;
  width: 100%;
}

.hint-list {
  display: grid;
  gap: 0.5rem;
}

.hint-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.badge {
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
}

.badge.yes {
  background: #dcfae6;
  color: var(--ok);
}

.badge.no {
  background: #f2f4f7;
  color: #475467;
}

.result-list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0;
  padding-left: 1.3rem;
}

.result-list li::marker {
  color: var(--accent);
  font-weight: 800;
}

.result-list li {
  cursor: pointer;
}

.result-list li.selected-result {
  background: #ff8a00;
  border-radius: 0.45rem;
  color: #111827;
  font-weight: 800;
  margin-inline: -0.35rem;
  padding-inline: 0.35rem;
}

.solve-celebration {
  margin-top: 0.4rem;
}

.solve-celebration[hidden] {
  display: none !important;
}

.play-panel.is-solved .digit-picker {
  display: none;
}

.solve-celebration-stage {
  align-items: center;
  background: linear-gradient(135deg, #e8efff 0%, #fff8df 48%, #e7f8ef 100%);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  display: grid;
  gap: 0.15rem;
  justify-items: center;
  min-height: 7.35rem;
  overflow: hidden;
  padding: 0.65rem 0.5rem 0.55rem;
  position: relative;
}

.solve-celebration-title {
  animation: solveTitlePop 700ms ease-out both;
  color: var(--ok);
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  z-index: 1;
}

.solve-celebration-subtitle {
  animation: solveSubtitleFade 900ms ease-out 120ms both;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin: 0;
  z-index: 1;
}

.solve-firework {
  animation: solveFireworkBurst 1.1s ease-out infinite;
  background:
    radial-gradient(circle, #fff 0 0.12rem, transparent 0.14rem),
    radial-gradient(circle, #ffdd55 0 0.16rem, transparent 0.18rem),
    radial-gradient(circle, #8fd0ff 0 0.14rem, transparent 0.16rem),
    radial-gradient(circle, #f97066 0 0.13rem, transparent 0.15rem);
  background-position: center, top, right, bottom;
  background-repeat: no-repeat;
  border-radius: 50%;
  height: 3.4rem;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 3.4rem;
}

.solve-firework-one {
  left: 8%;
  top: 10%;
}

.solve-firework-two {
  animation-delay: 220ms;
  right: 10%;
  top: 8%;
}

.solve-firework-three {
  animation-delay: 440ms;
  bottom: 8%;
  left: 44%;
}

@keyframes solveTitlePop {
  0% {
    opacity: 0;
    transform: scale(0.55) translateY(0.35rem);
  }
  70% {
    transform: scale(1.06) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes solveSubtitleFade {
  0% {
    opacity: 0;
    transform: translateY(0.25rem);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes solveFireworkBurst {
  0% {
    opacity: 0;
    transform: scale(0.15);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

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

  .app {
    max-width: min(96vw, 1200px);
    overflow-x: hidden;
    width: min(100%, 96vw);
  }

  .hero {
    max-width: 100%;
    min-width: 0;
  }

  .dashboard {
    align-items: stretch;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    width: 100%;
  }

  .dashboard-col-left,
  .dashboard-col-right {
    contain: inline-size;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .dashboard-col-left > *,
  .dashboard-col-right > * {
    max-width: 100%;
    min-width: 0;
  }

  .board-panel-board,
  .controls,
  .control-card,
  .advanced-tips {
    overflow-x: hidden;
  }

  .board-stage {
    align-items: center;
    justify-content: center;
    max-width: 100%;
    width: 100%;
  }

  .board {
    box-sizing: border-box;
    margin-inline: auto;
    max-width: 88%;
    width: 100%;
  }

  .load-puzzle-actions > button {
    white-space: normal;
  }

  .dashboard-col-left .hint-panel {
    margin-top: auto;
  }

  .dashboard-col-left .advanced-tips {
    max-height: min(28vh, 18rem);
    overflow-x: clip;
    overflow-y: auto;
  }

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

  .intro,
  .help-text {
    font-size: 0.9rem;
  }

  .help-text {
    margin-bottom: 0;
  }

  .hint-list {
    gap: 0.3rem 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-list {
    max-height: 32vh;
    overflow: auto;
  }

  textarea {
    height: 3.2rem;
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  html {
    height: 100%;
    height: -webkit-fill-available;
  }

  body,
  .app {
    overflow-anchor: none;
  }

  body {
    min-height: 100%;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    overflow-x: clip;
    overflow-y: auto;
  }

  .app {
    box-sizing: border-box;
    max-width: 100%;
    padding-bottom: 0.75rem;
    padding-left: max(0.4rem, env(safe-area-inset-left));
    padding-right: max(0.4rem, env(safe-area-inset-right));
    padding-top: 0.75rem;
    width: 100%;
  }

  .board-panel-board .board-stage {
    width: 100%;
  }

  .board-panel-board .board {
    max-width: 100%;
    width: 100%;
  }

  .dashboard-col-left,
  .dashboard-col-right {
    display: contents;
  }

  .board-panel-board {
    order: 1;
  }

  .controls {
    order: 2;
  }

  .quick-actions {
    order: 3;
  }

  .spot-results {
    order: 4;
  }

  .hint-panel {
    order: 5;
  }

  .dashboard .advanced-tips {
    order: 6;
  }

  .dashboard .board-panel-board,
  .dashboard .controls,
  .dashboard .spot-results,
  .dashboard .quick-actions,
  .dashboard .hint-panel,
  .dashboard .advanced-tips {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .board-panel,
  .control-card,
  .results {
    padding: 0.45rem 0.4rem;
  }

  .board-action-status {
    gap: 0.4rem;
    max-width: 100%;
  }

  .mode-groups {
    min-width: 0;
  }

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

  .spot-grid .spot {
    font-size: 0.82rem;
    padding: 0.45rem 0.35rem;
    white-space: normal;
  }

  .board {
    box-sizing: border-box;
    margin-inline: auto;
    max-width: 100%;
    width: 100%;
  }

  .hero,
  .advanced-content,
  .advanced-tips dl {
    display: block;
  }

  .hero .intro {
    display: none;
  }

  .hero .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.12rem;
  }

  .hero h1 {
    font-size: clamp(0.95rem, 3.8vw, 1.32rem);
    line-height: 1.15;
    margin-bottom: 0.2rem;
  }

  .board-panel-board .board-stage {
    min-height: auto;
  }

  .controls {
    margin-top: 0;
    width: 100%;
  }

  .control-card {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }

  .dashboard .advanced-tips {
    padding: 0.45rem 0.5rem;
  }

  .dashboard .hint-panel {
    padding-bottom: 0.35rem;
    padding-top: 0.4rem;
  }

  .mode-group {
    flex-wrap: wrap;
  }
}
