:root {
  --sudoku-accent: var(--nb-blue);
  --sudoku-accent-dark: var(--nb-blue-700);
  --board-max: min(92vw, min(78dvh, 820px));
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 10%, rgba(12,200,186,.10), transparent 25rem),
    radial-gradient(circle at 92% 9%, rgba(245,61,139,.08), transparent 24rem),
    linear-gradient(180deg, #FAFCFE 0%, #F4F9FD 65%, #F7FAFC 100%);
}

.page-orb {
  position: fixed;
  z-index: -1;
  width: 250px;
  height: 250px;
  border-radius: 48% 52% 61% 39% / 44% 47% 53% 56%;
  filter: blur(1px);
  pointer-events: none;
  opacity: .18;
}
.page-orb--one { left: -120px; top: 22vh; background: linear-gradient(145deg, var(--nb-turquoise), #54D3F5); transform: rotate(25deg); }
.page-orb--two { right: -130px; bottom: 8vh; background: linear-gradient(145deg, var(--nb-pink), var(--nb-orange)); transform: rotate(-18deg); }

.brand-splash {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  background: #F7FAFC;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  pointer-events: auto;
}
.brand-splash__media {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-splash__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(1);
  will-change: opacity, transform;
}
.brand-splash.is-playing .brand-splash__img {
  animation:splashOpen 3s cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
.brand-splash.is-skipped {
  display: none !important;
}
body.splash-lock {
  overflow: hidden !important;
  height: 100%;
  height: 100dvh;
  touch-action: none;
}
@keyframes splashOpen {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  22% {
    opacity: 1;
    transform: scale(1.035);
  }
  62% {
    opacity: 1;
    transform: scale(1.045);
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-splash,
  .brand-splash.is-playing .brand-splash__img {
    animation: none !important;
  }
}

.app-shell {
  width: min(1260px, calc(100% - 28px));
  min-height: calc(100dvh - 28px);
  margin: 14px auto 26px;
  overflow: hidden;
  border: 1px solid rgba(211, 225, 237, .95);
  border-radius: 30px;
  background: rgba(255,255,255,.95);
  box-shadow: var(--nb-shadow-sm);
}

.game-header {
  position: relative;
  z-index: 60;
  min-height: 72px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #E8EFF5;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(16px) saturate(1.2);
}
.brand-lockup {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.brand-icon-crop {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 14px;
}
.brand-icon-crop img {
  position: absolute;
  width: 88px;
  height: 88px;
  max-width: none;
  left: -19px;
  top: -11px;
}
.brand-wordmark { display: grid; line-height: .88; }
.brand-wordmark strong {
  font-size: 1.14rem;
  font-weight: 950;
  letter-spacing: -.05em;
  background: linear-gradient(90deg, var(--nb-blue), var(--nb-turquoise) 30%, #EBAE00 51%, var(--nb-coral) 72%, var(--nb-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-wordmark small { margin-top: 6px; color: var(--nb-navy); font-size: .72rem; font-weight: 800; letter-spacing: .01em; }
.game-title {
  padding-left: 14px;
  border-left: 1px solid #DFE8F1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.game-title h1 { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: inherit; color: inherit; }
.game-title span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #EAF6FF;
  color: var(--nb-blue-700);
  font-size: .65rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.header-spacer { flex: 1; }
.header-actions { display: flex; gap: 6px; }
.game-only-action { display: none; }
body.is-playing .game-only-action { display: grid; }
body.is-playing .header-claim { display: none; }
body.is-playing .game-title small { display: none; }

.journey-stage-chip {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #F4EEFF;
  color: var(--nb-purple);
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}
.journey-stage-chip.is-hidden { display: none !important; }

.game-screen { padding: 10px 14px 18px; }
.play-layout {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 360px);
  gap: 14px;
  align-items: start;
}
.game-main-column { min-width: 0; }
.status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.status-item {
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F7FBFF;
  border: 1px solid #E4EEF7;
}
.status-item > svg { width: 16px; height: 16px; color: var(--nb-blue); flex: 0 0 auto; }
.status-errors > svg { color: var(--nb-coral); }
.status-hints > svg { color: #C58A00; }
.status-score > svg { color: var(--nb-purple); }
.status-item span { display: grid; min-width: 0; }
.status-item small { color: var(--nb-muted); font-size: .58rem; line-height: 1.05; }
.status-item strong { margin-top: 2px; color: var(--nb-navy); font-size: .92rem; line-height: 1; font-variant-numeric: tabular-nums; }

.board-card {
  position: relative;
  width: min(100%, var(--board-max));
  margin: 0 auto;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(10,104,255,.14), rgba(12,200,186,.10) 45%, rgba(117,71,220,.12));
  box-shadow: 0 14px 36px rgba(21, 72, 132, .10);
}
.sudoku-grid {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  border: 3px solid var(--nb-navy);
  border-radius: 12px;
  background: #fff;
}
.control-column { display: grid; gap: 10px; position: sticky; top: 12px; }
.game-difficulty,
.side-message,
.session-bar,
.coach-strip,
.notes-help { display: none !important; }
.number-card { padding: 14px; border-radius: 18px; }
.number-card-heading h2 { font-size: 1.05rem; margin: 0; }
.number-pad button { min-height: 52px; }
.edit-actions { gap: 6px; }
.tool-button { min-height: 48px; }
.secondary-actions { gap: 8px; }
.secondary-actions .secondary-button,
.best-card { min-height: 48px; }

.start-screen {
  min-height: 0;
  padding: 16px clamp(16px, 4vw, 44px) 42px;
  display: grid;
  align-items: start;
}
.start-card { width: min(1050px, 100%); margin: 0 auto; }
.start-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .75fr);
  align-items: center;
  gap: clamp(26px, 5vw, 64px);
}
.start-copy { text-align: left; }
.eyebrow,
.section-eyebrow {
  display: inline-block;
  color: var(--nb-blue-700);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .14em;
}
.start-copy h1 {
  margin: 8px 0 10px;
  color: var(--nb-navy);
  font-size: clamp(3.9rem, 9vw, 7.2rem);
  line-height: .88;
  letter-spacing: -.075em;
}
.welcome-copy {
  max-width: 44ch;
  margin: 0;
  color: var(--nb-text-2);
  font-size: clamp(1rem, 2vw, 1.12rem);
}
.brand-promise {
  margin: 18px 0 0;
  color: var(--nb-muted);
  font-size: .9rem;
}
.brand-promise span { color: var(--nb-pink); margin-right: 5px; }
.brand-promise strong { color: var(--nb-navy); }

.preview-panel {
  position: relative;
  min-height: 335px;
  padding: 36px;
  border: 1px solid #DFEAF3;
  border-radius: 34px 54px 34px 54px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 82% 12%, rgba(255,197,26,.20), transparent 100px),
    radial-gradient(circle at 12% 88%, rgba(245,61,139,.15), transparent 120px),
    linear-gradient(145deg, #F8FCFF, #F2F8FF 60%, #F8F4FF);
  box-shadow: var(--nb-shadow-sm);
  overflow: hidden;
}
.preview-panel::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -65px;
  bottom: -55px;
  border: 18px solid rgba(12,200,186,.10);
  border-radius: 50%;
}
.preview-brand-mark {
  position: absolute;
  left: 17px;
  top: 14px;
  width: 52px;
  height: 52px;
  opacity: .9;
}
.preview-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.preview-grid {
  width: min(235px, 80%);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(9,1fr);
  border: 3px solid var(--nb-navy);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(28, 71, 125, .12);
  transform: rotate(2deg);
}
.preview-cell {
  display: grid;
  place-items: center;
  border-right: 1px solid #DCE5EE;
  border-bottom: 1px solid #DCE5EE;
  color: var(--nb-navy);
  font-size: clamp(.42rem, 1vw, .66rem);
  font-weight: 750;
}
.preview-cell:nth-child(9n) { border-right: 0; }
.preview-cell:nth-child(n+73) { border-bottom: 0; }
.preview-cell:nth-child(3n):not(:nth-child(9n)) { border-right: 2px solid #65728C; }
.preview-cell:nth-child(n+19):nth-child(-n+27),
.preview-cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid #65728C; }
.preview-chip {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #DDE9F3;
  color: var(--nb-blue-700);
  font-size: .68rem;
  font-weight: 850;
  box-shadow: var(--nb-shadow-xs);
}

.start-controls {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0;
  border-top: 0;
  display: grid;
  gap: 28px;
}
.start-card--setup { width: min(760px, 100%); }
.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.play-mode-choice {
  position: relative;
  min-height: 96px;
  padding: 16px 18px 16px 16px;
  border: 2px solid transparent;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: #fff;
  box-shadow: 0 10px 28px rgba(28, 71, 125, .08);
  cursor: pointer;
  transition: .16s var(--nb-ease);
}
.play-mode-choice .mode-copy { flex: 1; min-width: 0; }
.play-mode-choice .mode-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
}
.play-mode-choice .mode-icon--free {
  background: linear-gradient(135deg, #FF7B37, #F53D8B);
  box-shadow: 0 8px 18px rgba(245, 61, 139, .28);
}
.play-mode-choice .mode-icon--journey {
  border-radius: 16px;
  background: #EAF4FF;
  color: #0A68FF;
}
.play-mode-choice svg { width: 24px; height: 24px; }
.play-mode-choice b {
  display: block;
  color: var(--nb-navy);
  font-size: 1.05rem;
  font-weight: 800;
}
.play-mode-choice small {
  display: block;
  margin-top: 4px;
  color: var(--nb-text-2);
  font-size: .78rem;
  line-height: 1.35;
}
.play-mode-choice .choice-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: linear-gradient(135deg, #FF7B37, #F53D8B);
  color: #fff;
  box-shadow: 0 4px 10px rgba(245, 61, 139, .3);
}
.play-mode-choice .choice-check svg { width: 12px; height: 12px; }
.play-mode-choice.is-selected {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, #FFC51A, #FF7B37, #F53D8B) border-box;
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(255, 123, 55, .16);
}
.play-mode-choice.is-selected .choice-check { display: grid; }

.start-options { margin-top: 0; }
.options-heading,
.journey-head {
  min-height: 27px;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.options-heading--center {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 16px;
  text-align: center;
}
.options-heading--center .options-label {
  color: var(--nb-navy);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.01em;
  text-transform: none;
}
.options-underline {
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFC51A, #F53D8B, #0A68FF);
}
.options-label {
  color: var(--nb-navy);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .075em;
}
.options-support { color: var(--nb-muted); font-size: .72rem; }
.difficulty-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.difficulty-choice {
  position: relative;
  min-height: 132px;
  padding: 18px 12px 16px;
  border: 2px solid transparent;
  border-radius: 22px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(28, 71, 125, .07);
  transition: .16s var(--nb-ease);
}
.difficulty-choice .difficulty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}
.difficulty-choice .difficulty-icon svg { width: 34px; height: 34px; }
.difficulty-choice .difficulty-copy { display: grid; gap: 2px; }
.difficulty-choice b {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}
.difficulty-choice small {
  display: block;
  font-size: .72rem;
  line-height: 1.25;
  font-weight: 600;
}
.difficulty-choice .choice-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  place-items: center;
  color: #fff;
}
.difficulty-choice .choice-check svg { width: 12px; height: 12px; }
.difficulty-choice.is-selected .choice-check { display: grid; }
.difficulty-choice--easy {
  color: #147A4E;
  background: linear-gradient(160deg, #E8FBF0, #F7FFF4);
}
.difficulty-choice--easy.is-selected {
  border-color: #1BAF72;
  box-shadow: 0 12px 28px rgba(27, 175, 114, .18);
}
.difficulty-choice--easy .choice-check { background: #1BAF72; }
.difficulty-choice--medium {
  color: #0A68FF;
  background: linear-gradient(160deg, #EAF4FF, #F7FBFF);
}
.difficulty-choice--medium.is-selected {
  border-color: #0A68FF;
  box-shadow: 0 12px 28px rgba(10, 104, 255, .16);
}
.difficulty-choice--medium .choice-check { background: #0A68FF; }
.difficulty-choice--hard {
  color: #D12B6E;
  background: linear-gradient(160deg, #FFE8F1, #FFF7FA);
}
.difficulty-choice--hard.is-selected {
  border-color: #F53D8B;
  box-shadow: 0 12px 28px rgba(245, 61, 139, .16);
}
.difficulty-choice--hard .choice-check { background: #F53D8B; }
.difficulty-choice--expert {
  color: #5B35B5;
  background: linear-gradient(160deg, #F0E9FF, #F9F6FF);
}
.difficulty-choice--expert.is-selected {
  border-color: #7547DC;
  box-shadow: 0 12px 28px rgba(117, 71, 220, .16);
}
.difficulty-choice--expert .choice-check { background: #7547DC; }

.journey-head > div { display: grid; gap: 2px; text-align: left; }
.stars-total {
  min-width: 66px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #FFF8DF;
  color: #9B6800;
  font-size: .83rem;
}
.journey-map {
  max-height: 230px;
  overflow: auto;
  padding: 2px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}
.journey-phase {
  min-height: 62px;
  padding: 8px;
  border: 1px solid #DDE8F2;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  align-items: center;
  gap: 7px;
  background: #FCFDFE;
  color: var(--nb-navy);
  text-align: left;
  cursor: pointer;
}
.journey-phase .phase-number {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #EAF4FD;
  color: var(--nb-blue-700);
  font-size: .7rem;
  font-weight: 900;
}
.journey-phase .phase-copy { min-width: 0; }
.journey-phase .phase-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .69rem; }
.journey-phase .phase-copy small { display: block; margin-top: 2px; color: var(--nb-muted); font-size: .61rem; }
.journey-phase .phase-stars { grid-column: 2; color: #AB7200; font-size: .6rem; letter-spacing: .05em; }
.journey-phase.is-selected { border-color: var(--nb-blue); background: #EFF7FF; box-shadow: inset 0 0 0 1px rgba(10,104,255,.25); }
.journey-phase.is-complete .phase-number { background: #EAF8F1; color: var(--nb-success); }
.journey-phase.is-locked { opacity: .6; cursor: not-allowed; }
.journey-hint { margin: 8px 0 0; color: var(--nb-muted); font-size: .72rem; text-align: left; }
.start-actions {
  margin-top: 4px;
  display: grid;
  gap: 12px;
}
.start-play {
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #FFC51A 0%, #FF7B37 28%, #F53D8B 58%, #0A68FF 82%, #0CC8BA 100%);
  box-shadow: 0 16px 34px rgba(245, 61, 139, .28);
}
.start-play__icon,
.start-play__chevron {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
#startGameLabel { flex: 1; text-align: center; }
.continue-button { width: 100%; }

.game-screen { padding: 10px 14px 18px; }

.play-layout {
  width: min(1240px, 100%);
  max-width: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 340px);
  align-items: start;
  gap: 12px;
}
.game-main-column { min-width: 0; }
.status-row {
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.status-item {
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid #E0EAF3;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  background: rgba(255,255,255,.9);
}
.status-item > svg { width: 16px; height: 16px; color: var(--nb-blue); flex: 0 0 auto; }
.status-errors > svg { color: var(--nb-coral); }
.status-hints > svg { color: #C58A00; }
.status-score > svg { color: var(--nb-purple); }
.status-item span { display: grid; min-width: 0; }
.status-item small { color: var(--nb-muted); font-size: .56rem; line-height: 1.05; }
.status-item strong { margin-top: 2px; color: var(--nb-navy); font-size: .88rem; line-height: 1; font-variant-numeric: tabular-nums; }

.board-card {
  position: relative;
  width: min(100%, var(--board-max));
  margin: 0 auto;
  padding: 5px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(10,104,255,.14), rgba(12,200,186,.10) 45%, rgba(117,71,220,.12));
  box-shadow: 0 12px 32px rgba(21, 72, 132, .10);
}
.board-brand { display: none; }
.sudoku-grid {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  border: 3px solid var(--nb-navy);
  border-radius: 12px;
  background: #fff;
}
.sudoku-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid #D7E1EB;
  border-bottom: 1px solid #D7E1EB;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--nb-blue-700);
  cursor: pointer;
  font-size: clamp(1.15rem, 3.1vw, 2rem);
  font-weight: 800;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  transition: background .08s linear, box-shadow .08s linear, color .08s linear;
}
.sudoku-cell:nth-child(9n) { border-right: 0; }
.sudoku-cell:nth-child(n+73) { border-bottom: 0; }
.sudoku-cell:nth-child(3n):not(:nth-child(9n)) { border-right: 2px solid #75829A; }
.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid #75829A; }
.sudoku-cell.is-given { color: var(--nb-navy); font-weight: 850; background: #FCFDFE; }
.sudoku-cell.is-related { background: #F3F8FD; }
.sudoku-cell.is-same { background: #E6F1FF; }
.sudoku-cell.is-selected {
  z-index: 2;
  background: #DCEBFF;
  box-shadow: inset 0 0 0 3px var(--nb-blue);
}
.sudoku-cell.is-hint { animation: hintPulse 1.05s ease 2; }
.sudoku-cell.is-error { animation: errorShake .34s ease; background: var(--nb-error-bg); color: var(--nb-error); }
.cell-notes {
  position: absolute;
  inset: 3px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  grid-template-rows: repeat(3,1fr);
  color: var(--nb-text-2);
  font-size: clamp(.37rem, 1.05vw, .66rem);
  font-weight: 700;
  line-height: 1;
}
.cell-notes span { display: grid; place-items: center; }

.control-column {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
}
.game-difficulty {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 5px;
}
.diff-pill {
  min-height: 38px;
  border: 1px solid #DCE7F0;
  border-radius: 11px;
  background: #fff;
  color: var(--nb-muted);
  font-size: .68rem;
  font-weight: 850;
  cursor: pointer;
}
.diff-pill.is-active { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.diff-pill--easy.is-active { color: var(--nb-green); background: #F0FAF5; }
.diff-pill--medium.is-active { color: var(--nb-blue); background: #EFF7FF; }
.diff-pill--hard.is-active { color: var(--nb-pink); background: #FFF1F7; }
.diff-pill--expert.is-active { color: var(--nb-purple); background: #F5F1FF; }
.game-difficulty.is-journey .diff-pill:not(.is-active) { opacity: .38; }
.mode-badge {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: 1px;
  color: var(--nb-muted);
  font-size: .62rem;
  font-weight: 800;
}

.number-card {
  padding: 16px;
  border: 1px solid #DFE9F2;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--nb-shadow-xs);
}
.number-card-heading { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-kicker { display: block; color: var(--nb-muted); font-size: .58rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.number-card-heading h2 { margin: 2px 0 0; color: var(--nb-navy); font-size: .98rem; line-height: 1.2; }
.notes-state {
  padding: 5px 8px;
  border-radius: 999px;
  background: #EEF6FE;
  color: var(--nb-blue-700);
  font-size: .61rem;
  font-weight: 900;
}
.notes-state.is-active { background: #F1EBFF; color: var(--nb-purple); }
.number-pad {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 7px;
}
.number-pad button {
  min-height: 54px;
  border: 1px solid #D7E4EF;
  border-radius: 13px;
  background: linear-gradient(180deg, #FFFFFF, #F5F9FD);
  color: var(--nb-blue-700);
  cursor: pointer;
  font-size: 1.12rem;
  font-weight: 850;
  transition: .12s var(--nb-ease);
}
.number-pad button:hover:not(:disabled) { transform: translateY(-1px); border-color: #BFD3E6; box-shadow: var(--nb-shadow-xs); }
.number-pad button.is-current {
  border-color: transparent;
  background: linear-gradient(145deg, var(--nb-blue), #4A60E8);
  color: #fff;
}
.number-pad button.is-complete:not(.is-current) { opacity: .35; }
.edit-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 6px;
}
.tool-button {
  min-height: 46px;
  padding: 5px 4px;
  border: 1px solid #DCE7F0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  gap: 1px;
  background: #FAFCFE;
  color: var(--nb-text-2);
  cursor: pointer;
  font-size: .62rem;
  font-weight: 850;
}
.tool-button svg { width: 17px; height: 17px; }
.pencil-symbol { font-size: 1rem; line-height: 1; }
.undo-button { color: #5C46B2; background: #F7F4FF; }
.notes-button.is-active { border-color: #B9A8F3; color: var(--nb-purple); background: #F1ECFF; box-shadow: inset 0 0 0 1px #C7B9F5; }
.erase-button { color: var(--nb-blue-700); }
.hint-button { color: #926000; background: #FFF9E4; border-color: #F1DEA0; }
.tool-button:disabled { opacity: .35; }
.notes-help { margin: 10px 0 0; color: var(--nb-muted); font-size: .67rem; line-height: 1.4; }

.secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.secondary-actions .secondary-button { min-height: 50px; padding: 0 10px; font-size: .76rem; }
.best-card {
  min-height: 50px;
  padding: 7px 10px;
  border: 1px solid #E0E9F1;
  border-radius: 14px;
  display: grid;
  align-content: center;
  text-align: center;
  background: #F9FBFD;
}
.best-card span, .best-card small { color: var(--nb-muted); font-size: .55rem; line-height: 1.1; }
.best-card strong { margin: 2px 0; color: var(--nb-navy); font-size: .88rem; font-variant-numeric: tabular-nums; line-height: 1; }

/* Modals */
.tutorial-card { width: min(610px, 100%); }
.tutorial-steps { margin: 18px 0; padding: 0; display: grid; gap: 8px; list-style: none; text-align: left; }
.tutorial-steps li {
  padding: 11px;
  border: 1px solid #E1EAF2;
  border-radius: 15px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  background: #FAFCFE;
}
.tutorial-steps li > span {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #EAF5FF;
  color: var(--nb-blue-700);
  font-size: .78rem;
  font-weight: 950;
}
.tutorial-steps strong { display: block; color: var(--nb-navy); font-size: .84rem; }
.tutorial-steps small { display: block; margin-top: 2px; color: var(--nb-muted); font-size: .7rem; line-height: 1.35; }
.keyboard-tip { margin: 0 0 16px; padding: 10px 12px; border-radius: 12px; background: #F3F7FB; color: var(--nb-muted); font-size: .68rem; }
.keyboard-tip strong { color: var(--nb-text-2); }
.pause-card { width: min(460px, 100%); }
.modal-icon--pause { color: var(--nb-purple); background: #F1ECFF; }
.pause-actions { display: grid; gap: 8px; }
.modal-icon--restart { color: #B66D00; background: #FFF5D8; }
.confirm-card { width: min(480px, 100%); }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.result-card { width: min(650px, 100%); text-align: center; }
.result-hero {
  position: relative;
  width: 124px;
  height: 124px;
  margin: 4px auto 14px;
  display: grid;
  place-items: center;
}
.result-mascot {
  width: 112px;
  height: 112px;
  margin: 0;
  overflow: visible;
  display: grid;
  place-items: center;
}
.result-mascot img {
  position: static;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.celebration-mark {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 1;
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #FFF2A8, #FFD35B);
  color: #9A6500;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(199, 139, 0, .18);
}
.result-banner {
  margin: 18px 0 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, #EEF7FF, #F6F2FF, #FFF5F8);
  color: var(--nb-navy);
  font-size: .95rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  text-align: center;
}
.result-stats > div {
  min-height: 66px;
  padding: 8px 4px;
  border: 1px solid #E0E9F1;
  border-radius: 13px;
  display: grid;
  align-content: center;
  background: #FAFCFE;
}
.result-stats small { color: var(--nb-muted); font-size: .56rem; }
.result-stats strong { margin-top: 3px; color: var(--nb-navy); font-size: .86rem; font-variant-numeric: tabular-nums; }
.result-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-brand-line {
  margin: 16px 0 0 !important;
  color: #6F7B90 !important;
  font-size: .78rem !important;
  font-weight: 750;
  letter-spacing: .02em;
  line-height: 1.4;
  text-align: center;
}
.result-brand-line span { color: var(--nb-pink); }

.confetti {
  position: fixed;
  z-index: 2100;
  width: 8px;
  height: 12px;
  pointer-events: none;
  animation: confettiFall 1.8s ease-out forwards;
}
@keyframes errorShake { 0%,100% { transform: translateX(0); } 32% { transform: translateX(-3px); } 68% { transform: translateX(3px); } }
@keyframes hintPulse { 0% { box-shadow: inset 0 0 0 0 rgba(255,197,26,.55); } 50% { box-shadow: inset 0 0 0 5px rgba(255,197,26,.5); background: #FFF9E5; } 100% { box-shadow: inset 0 0 0 0 rgba(255,197,26,.55); } }
@keyframes confettiFall { to { transform: translateY(100vh) rotate(620deg); opacity: 0; } }

/* SEO/editorial area stays below the game so it never competes with gameplay. */
.seo-content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 70px;
  color: var(--nb-text);
}
.breadcrumbs {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: var(--nb-muted);
  font-size: .72rem;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--nb-blue-700); text-decoration: underline; }
.seo-intro { max-width: 820px; }
.seo-intro h2,
.faq-heading h2,
.discover-strip h2 {
  margin: 6px 0 9px;
  color: var(--nb-navy);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -.04em;
}
.seo-intro p,
.discover-strip p { margin: 0; color: var(--nb-text-2); }
.seo-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.seo-grid article {
  padding: 22px;
  border: 1px solid #DCE7F0;
  border-radius: 20px;
  background: rgba(255,255,255,.8);
}
.seo-card-number { color: var(--nb-blue); font-size: .66rem; font-weight: 950; letter-spacing: .08em; }
.seo-grid h3 { margin: 7px 0 7px; color: var(--nb-navy); font-size: 1rem; }
.seo-grid p { margin: 0; color: var(--nb-text-2); font-size: .86rem; }
.faq-block {
  margin-top: 42px;
  padding-top: 36px;
  border-top: 1px solid #DDE7EF;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 36px;
}
.faq-list { display: grid; gap: 8px; }
.faq-list details {
  border: 1px solid #DCE7F0;
  border-radius: 15px;
  background: #fff;
}
.faq-list summary {
  min-height: 52px;
  padding: 13px 16px;
  cursor: pointer;
  color: var(--nb-navy);
  font-size: .84rem;
  font-weight: 800;
}
.faq-list details p { margin: 0; padding: 0 16px 15px; color: var(--nb-text-2); font-size: .82rem; }
.discover-strip {
  margin-top: 42px;
  padding: 26px;
  border: 1px solid #DCE7F0;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255,197,26,.15), transparent 130px),
    linear-gradient(135deg, #F3F9FF, #F9F6FF);
}
.discover-strip h2 { font-size: clamp(1.35rem, 2.8vw, 1.9rem); }
.discover-strip .primary-button { flex: 0 0 auto; }
.noscript-note { margin: 16px auto; padding: 12px 16px; width: min(900px, calc(100% - 24px)); border-radius: 12px; background: var(--nb-warning-bg); color: var(--nb-warning); text-align: center; }

@media (hover: hover) {
  .play-mode-choice:hover,
  .difficulty-choice:hover,
  .journey-phase:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--nb-shadow-xs); }
}

/* Tablet */
@media (max-width: 980px), (max-width: 1100px) and (orientation: portrait) {
  .start-hero { grid-template-columns: minmax(0,1fr) 300px; gap: 28px; }
  .preview-panel { min-height: 300px; padding: 28px; }
  .play-layout { grid-template-columns: 1fr; max-width: 760px; }
  .game-main-column { width: min(100%, 720px); margin: 0 auto; }
  .control-column { position: static; width: min(100%, 720px); margin: 0 auto; }
  .number-pad { grid-template-columns: repeat(9,1fr); }
  .number-pad button { min-height: 54px; }
  .edit-actions { max-width: 520px; margin: 8px auto 0; }
  .notes-help { text-align: center; }
  .secondary-actions { max-width: 520px; margin: 0 auto; width: 100%; }
}

@media (max-width: 760px) {
  .app-shell { width: calc(100% - 16px); margin: 8px auto 20px; border-radius: 24px; }
  .game-header { min-height: 64px; padding: 8px 10px; }
  .brand-icon-crop { width: 42px; height: 42px; }
  .brand-icon-crop img { width: 78px; height: 78px; left: -17px; top: -10px; }
  .brand-wordmark strong { font-size: .94rem; }
  .brand-wordmark small { font-size: .61rem; margin-top: 5px; }
  .game-title { display: none; }
  .start-screen { min-height: 0; padding: 12px 16px 32px; }
  .start-hero { grid-template-columns: 1fr; gap: 24px; }
  .start-copy { text-align: center; }
  .welcome-copy { margin-inline: auto; }
  .brand-promise { margin-top: 14px; }
  .preview-panel { width: min(380px, 100%); min-height: 260px; margin: 0 auto; border-radius: 28px 42px 28px 42px; }
  .preview-grid { width: min(205px, 70%); }
  .start-controls { margin-top: 0; padding-top: 0; }
  .difficulty-cards { grid-template-columns: repeat(2, 1fr); }
  .journey-map { grid-template-columns: repeat(2,1fr); max-height: 270px; }
  .start-actions { grid-template-columns: 1fr; }
  .seo-grid { grid-template-columns: 1fr; }
  .faq-block { grid-template-columns: 1fr; gap: 18px; }
  .discover-strip { align-items: flex-start; flex-direction: column; }
  .discover-strip .primary-button { width: 100%; }
}

/* Mobile */
@media (max-width: 520px) {
  body { background: #F8FBFD; }
  .page-orb { display: none; }
  .app-shell { width: 100%; min-height: 100dvh; margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .game-header {
    position: sticky;
    top: 0;
    min-height: 60px;
    z-index: 100;
    padding: 7px 9px;
  }
  .brand-wordmark strong { font-size: .86rem; }
  .brand-wordmark small { font-size: .55rem; }
  .header-actions { gap: 3px; }
  .icon-button { width: 40px; height: 40px; min-width: 40px; }
  .icon-button svg { width: 18px; height: 18px; }

  .start-screen { padding: 10px 12px 30px; }
  .start-copy h1 { font-size: clamp(4rem, 22vw, 5.5rem); }
  .welcome-copy { font-size: .95rem; }
  .preview-panel { min-height: 225px; padding: 24px; }
  .preview-brand-mark { width: 44px; height: 44px; }
  .preview-grid { width: 178px; }
  .preview-chip { right: 12px; bottom: 11px; font-size: .62rem; }
  .mode-switch { gap: 10px; }
  .play-mode-choice { min-height: 88px; padding: 12px; align-items: center; gap: 10px; }
  .play-mode-choice .mode-icon { width: 42px; height: 42px; min-width: 42px; }
  .play-mode-choice svg { width: 20px; height: 20px; }
  .play-mode-choice b { font-size: .9rem; }
  .play-mode-choice small { font-size: .68rem; }
  .options-heading--center .options-label { font-size: 1.05rem; }
  .difficulty-cards { gap: 8px; }
  .difficulty-choice { min-height: 118px; padding: 14px 8px; }
  .difficulty-choice b { font-size: .95rem; }
  .difficulty-choice small { font-size: .66rem; }
  .start-actions { grid-template-columns: 1fr; gap: 10px; }
  .start-play { min-height: 58px; font-size: .95rem; }

  .game-screen { padding: 6px 8px 14px; }
  .status-row { gap: 4px; margin-bottom: 6px; }
  .status-item { min-height: 44px; padding: 5px 6px; border-radius: 10px; }
  .status-item > svg { display: none; }
  .status-item strong { font-size: .82rem; }
  .board-card { padding: 3px; border-radius: 12px; }
  .journey-stage-chip { padding: 6px 9px; font-size: .62rem; }
  .status-item span { justify-items: center; }
  .status-item small { font-size: .51rem; }
  .status-item strong { font-size: .74rem; }
  .board-card { padding: 4px; border-radius: 12px; background: #fff; border: 1px solid #DCE7F0; box-shadow: none; }
  .board-brand { display: none; }
  .sudoku-grid { border-width: 2px; border-radius: 8px; }
  .sudoku-cell { font-size: clamp(1rem, 6.5vw, 1.45rem); }
  .sudoku-cell:nth-child(3n):not(:nth-child(9n)) { border-right-width: 2px; }
  .sudoku-cell:nth-child(n+19):nth-child(-n+27),
  .sudoku-cell:nth-child(n+46):nth-child(-n+54) { border-bottom-width: 2px; }
  .sudoku-cell.is-selected { box-shadow: inset 0 0 0 2px var(--nb-blue); }
  .cell-notes { inset: 1px; font-size: clamp(.29rem, 2.1vw, .52rem); }

  .control-column { gap: 6px; }
  .game-difficulty { gap: 4px; }
  .diff-pill { min-height: 34px; border-radius: 9px; font-size: .61rem; }
  .mode-badge { display: none; }
  .number-card { padding: 8px; border-radius: 12px; box-shadow: none; }
  .number-card-heading { margin-bottom: 7px; }
  .control-kicker { display: none; }
  .number-card-heading h2 { font-size: .8rem; }
  .notes-state { padding: 4px 7px; font-size: .56rem; }
  .number-pad { grid-template-columns: repeat(5,1fr); gap: 4px; }
  .number-pad button { min-height: 46px; border-radius: 9px; font-size: .95rem; }
  .edit-actions { max-width: none; grid-template-columns: repeat(4,1fr); gap: 4px; margin-top: 5px; }
  .tool-button { min-height: 45px; border-radius: 9px; font-size: .58rem; }
  .tool-button svg { width: 15px; height: 15px; }
  .notes-help { display: none; }
  .secondary-actions { max-width: none; grid-template-columns: 1fr 1fr; gap: 5px; }
  .secondary-actions .secondary-button, .best-card { min-height: 45px; border-radius: 10px; }
  .secondary-actions .secondary-button { font-size: .66rem; }
  .best-card span, .best-card small { font-size: .5rem; }
  .best-card strong { font-size: .78rem; }

  .modal-overlay { padding: 10px; align-items: end; }
  .modal-card { width: 100%; max-height: 88dvh; padding: 26px 14px 16px; border-radius: 24px 24px 18px 18px; }
  .modal-card h2 { font-size: 1.55rem; }
  .tutorial-steps li { padding: 9px; grid-template-columns: 32px 1fr; }
  .tutorial-steps li > span { width: 32px; height: 32px; }
  .keyboard-tip { display: none; }
  .result-stats { grid-template-columns: repeat(3,1fr); }
  .result-stats > div:nth-child(4), .result-stats > div:nth-child(5) { grid-column: span 1; }
  .result-actions { grid-template-columns: 1fr; }
  .confirm-actions { grid-template-columns: 1fr; }

  .seo-content { width: calc(100% - 24px); margin-bottom: 48px; }
  .breadcrumbs { margin-top: 26px; }
  .seo-grid article { padding: 18px; }
  .discover-strip { padding: 20px; }
}

@media (max-width: 360px) {
  .brand-wordmark { display: none; }
  .mode-switch { grid-template-columns: 1fr; }
  .play-mode-choice { min-height: 78px; align-items: center; }
  .preview-panel { min-height: 205px; }
  .preview-grid { width: 160px; }
  .difficulty-choice small { display: block; }
  .number-pad { grid-template-columns: repeat(5,1fr); }
  .number-pad button { min-height: 44px; }
  .tool-button { font-size: .54rem; }
}
.difficulty-choice--easy.is-selected { background: linear-gradient(160deg, #E8FBF0, #F7FFF4); }
.difficulty-choice--medium.is-selected { background: linear-gradient(160deg, #EAF4FF, #F7FBFF); }
.difficulty-choice--hard.is-selected { background: linear-gradient(160deg, #FFE8F1, #FFF7FA); }
.difficulty-choice--expert.is-selected { background: linear-gradient(160deg, #F0E9FF, #F9F6FF); }


/* =========================================================
   Vibrant identity update — Maya v2
   ========================================================= */
body {
  background:
    radial-gradient(circle at 4% 7%, rgba(245,61,139,.35), transparent 11rem),
    radial-gradient(circle at 97% 5%, rgba(255,197,26,.34), transparent 12rem),
    radial-gradient(circle at 8% 88%, rgba(10,104,255,.18), transparent 18rem),
    linear-gradient(180deg, #8EDBFF 0%, #CFEFFF 18%, #F7FBFF 46%, #F7FAFE 100%);
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 138px;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background:
    radial-gradient(circle at 8% 30%, rgba(255,255,255,.95) 0 7px, transparent 8px),
    linear-gradient(90deg, #225BFF 0%, #8C46F3 35%, #FF5D93 68%, #FFB650 100%);
  clip-path: ellipse(74% 100% at 50% 100%);
  opacity: .92;
}
body::after {
  height: 160px;
  background:
    radial-gradient(circle at 25% 35%, rgba(255,255,255,.22), transparent 20%),
    radial-gradient(circle at 74% 22%, rgba(255,255,255,.16), transparent 18%),
    linear-gradient(90deg, rgba(34,91,255,.95), rgba(143,70,243,.92), rgba(255,93,147,.88), rgba(255,182,80,.92));
  clip-path: ellipse(90% 100% at 50% 100%);
  opacity: .84;
}
.page-orb { opacity: .42; filter: blur(0); }
.page-orb--one { left: -70px; top: 22vh; background: linear-gradient(145deg, rgba(12,200,186,.95), rgba(84,211,245,.85)); }
.page-orb--two { right: -75px; bottom: 14vh; background: linear-gradient(145deg, rgba(245,61,139,.8), rgba(255,123,55,.88)); }
.app-shell {
  position: relative;
  width: min(1280px, calc(100% - 28px));
  border: 1px solid rgba(205, 227, 240, .85);
  background:
    radial-gradient(circle at 10% 8%, rgba(255,255,255,.8), transparent 16rem),
    radial-gradient(circle at 88% 7%, rgba(255,240,173,.45), transparent 16rem),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.97));
  box-shadow: 0 18px 58px rgba(29, 75, 136, .14);
}
.app-shell::after {
  content: "♥  DESENVOLVENDO MENTES MAIS FELIZES";
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .18em;
  font-size: .66rem;
  font-weight: 900;
  color: #fff;
  min-height: 54px;
  background: linear-gradient(90deg, #225BFF, #8C46F3 35%, #FF5D93 68%, #FFB650);
}
.game-header {
  padding: 14px 18px;
  border-bottom-color: #DCEAF5;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,.88), transparent 13rem),
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(246,251,255,.94));
}
.brand-icon-crop { width: 60px; height: 60px; border-radius: 18px; }
.brand-icon-crop img { width: 110px; height: 110px; left: -24px; top: -14px; }
.brand-wordmark strong { font-size: 1.42rem; }
.brand-wordmark small { font-size: .92rem; }
.game-title { display: grid; gap: 2px; align-items: center; }
.game-title h1 { font-size: clamp(1.6rem, 2.2vw, 2.15rem); line-height: 1; }
.game-title small { color: var(--nb-blue-900); font-size: clamp(.8rem, 1.15vw, 1rem); font-weight: 700; }
.header-claim {
  max-width: 210px;
  padding: 10px 14px;
  border-radius: 26px 26px 8px 26px;
  background: linear-gradient(180deg, #F6FBFF, #EAF4FF);
  color: var(--nb-blue-900);
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.15;
  box-shadow: var(--nb-shadow-xs);
  text-align: center;
}
.header-claim strong { color: var(--nb-navy); }
.header-actions { gap: 10px; }
.icon-button {
  width: 50px; height: 50px; min-width: 50px;
  background: rgba(255,255,255,.9);
  border: 1px solid #D5E3EF;
  box-shadow: var(--nb-shadow-xs);
}
.icon-button svg { width: 22px; height: 22px; }

.start-screen { min-height: 0; padding-block: 14px 36px; }
.start-card { width: min(1180px, 100%); }
.start-hero { grid-template-columns: minmax(0, .9fr) minmax(310px, .7fr); gap: clamp(22px, 3vw, 38px); }
.start-copy {
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid #D7E8F4;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(239,249,255,.95));
  box-shadow: var(--nb-shadow-sm);
  overflow: hidden;
}
.start-copy::before, .start-copy::after { content: ""; position: absolute; border-radius: 50%; z-index: 0; opacity: .9; }
.start-copy::before { width: 240px; height: 240px; left: -70px; bottom: -110px; background: linear-gradient(145deg, rgba(255,197,26,.5), rgba(12,200,186,.18)); }
.start-copy::after { width: 170px; height: 170px; right: -80px; top: -90px; background: linear-gradient(145deg, rgba(245,61,139,.22), rgba(10,104,255,.14)); }
.start-copy > * { position: relative; z-index: 1; }
.eyebrow { padding: 10px 14px; border-radius: 999px; background: #EAF4FF; }
.start-copy h1 { margin-top: 12px; font-size: clamp(4rem, 8vw, 5.4rem); }
.welcome-copy { max-width: 27ch; font-size: clamp(1.08rem, 1.55vw, 1.24rem); color: var(--nb-blue-900); }
.brand-promise { margin-top: 12px; font-size: .96rem; }
.start-mascot-block {
  display: flex; align-items: end; gap: 14px; margin-top: 18px;
}
.start-mascot-crop { position: relative; width: 180px; height: 158px; overflow: hidden; flex: 0 0 auto; }
.start-mascot-crop img { position: absolute; width: 300px; max-width: none; left: -12px; top: -14px; }
.hero-bubble {
  margin: 0 0 18px; padding: 12px 16px; border-radius: 22px 22px 22px 8px; background: rgba(255,255,255,.88);
  box-shadow: var(--nb-shadow-xs); color: var(--nb-blue-900); font-size: 1rem; font-weight: 800; line-height: 1.2;
}
.preview-panel {
  align-content: start;
  min-height: 100%;
  padding: 24px 28px 30px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(246,251,255,.95), rgba(233,246,255,.98));
}
.preview-label { margin: 0 0 14px; color: var(--nb-blue-900); font-size: 1rem; font-weight: 900; }
.preview-brand-mark { display: none; }
.preview-grid { width: min(360px, 100%); transform: none; }
.preview-chip { background: linear-gradient(135deg, #FFF, #EFF7FF); font-size: .76rem; }
.start-controls {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  gap: 28px;
}
.start-card--setup { width: min(760px, 100%); margin: 0 auto; }
.mode-switch { gap: 14px; }
.play-mode-choice {
  min-height: 96px;
  border-radius: 22px;
  background: #fff;
}
.play-mode-choice.is-selected {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(120deg, #FFC51A, #FF7B37, #F53D8B) border-box;
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(255, 123, 55, .16);
}
.play-mode-choice .mode-icon--free { border-radius: 50%; }
.play-mode-choice .mode-icon--journey { border-radius: 16px; background: #EAF4FF; }
.play-mode-choice b { font-size: 1.05rem; }
.play-mode-choice small { font-size: .78rem; }
.options-heading--center .options-label {
  font-size: 1.15rem;
  color: var(--nb-navy);
  text-transform: none;
  letter-spacing: -.01em;
}
.difficulty-cards { gap: 12px; }
.difficulty-choice {
  min-height: 132px;
  border-radius: 22px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}
.difficulty-choice b { font-size: 1.05rem; }
.difficulty-choice small { margin-top: 2px; font-size: .72rem; line-height: 1.25; }
.start-actions {
  grid-template-columns: 1fr;
  gap: 12px;
}
.start-play {
  min-height: 64px;
  border-radius: 999px;
  font-size: 1.05rem;
  background: linear-gradient(90deg, #FFC51A 0%, #FF7B37 28%, #F53D8B 58%, #0A68FF 82%, #0CC8BA 100%);
  box-shadow: 0 16px 34px rgba(245, 61, 139, .28);
}
.continue-button { min-height: 54px; border-radius: 18px; }

.game-screen { padding: 10px 14px 16px; }
.play-layout { grid-template-columns: minmax(0, 1.45fr) minmax(260px, 340px); max-width: none; width: min(1240px, 100%); gap: 12px; }
.status-row { gap: 8px; margin-bottom: 8px; }
.board-card { padding: 5px; border-radius: 16px; background: linear-gradient(145deg, rgba(10,104,255,.14), rgba(12,200,186,.10) 50%, rgba(245,61,139,.10)); }
.control-column { gap: 10px; top: 10px; }
.side-message { display: none !important; }
.game-difficulty { display: none !important; }
.number-card { padding: 14px; border-radius: 18px; background: rgba(255,255,255,.97); }
.number-card-heading h2 { font-size: 1.05rem; }
.number-pad button { min-height: 54px; border-radius: 14px; font-size: 1.3rem; }
.tool-button { min-height: 48px; }
.secondary-actions .secondary-button, .best-card { min-height: 48px; border-radius: 14px; }

.modal-card { border-radius: 32px; }
.tutorial-card, .pause-card, .confirm-card, .result-card {
  background:
    radial-gradient(circle at 8% 5%, rgba(245,61,139,.14), transparent 14rem),
    radial-gradient(circle at 90% 3%, rgba(10,104,255,.12), transparent 14rem),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(251,253,255,.98));
}
.result-card { width: min(700px, 100%); text-align: center; }
.result-hero { width: 132px; height: 132px; margin: 2px auto 16px; }
.result-mascot { width: 120px; height: 120px; }
.result-mascot img { position: static; width: 100%; height: 100%; max-width: 100%; object-fit: contain; left: auto; top: auto; }
.celebration-mark { margin-top: 0; width: 44px; height: 44px; border-radius: 14px; font-size: 1.3rem; }
.result-banner { font-size: 1.05rem; border-radius: 16px; text-align: center; padding: 15px 20px; }
.result-brand-line { font-size: .85rem !important; text-align: center; }
.result-stats { gap: 10px; }
.result-stats > div { min-height: 88px; border-radius: 16px; }
.result-stats > div:nth-child(1) { background: linear-gradient(180deg, #EFF7FF, #F9FCFF); }
.result-stats > div:nth-child(2) { background: linear-gradient(180deg, #FFF0F6, #FFFAFC); }
.result-stats > div:nth-child(3) { background: linear-gradient(180deg, #FFF8D9, #FFFCEF); }
.result-stats > div:nth-child(4) { background: linear-gradient(180deg, #FFF6DE, #FFFDF5); }
.result-stats > div:nth-child(5) { background: linear-gradient(180deg, #EEFAEF, #FAFFFB); }
.result-stats small { font-size: .72rem; }
.result-stats strong { font-size: 1.18rem; }
.result-actions { gap: 12px; }
.result-actions .primary-button, .result-actions .secondary-button { min-height: 58px; border-radius: 20px; font-size: 1.02rem; }

.seo-content { display: none; }

@media (max-width: 980px), (max-width: 1100px) and (orientation: portrait) {
  .header-claim { display: none; }
  .start-hero { grid-template-columns: 1fr; }
  .start-copy { order: 1; }
  .preview-panel { order: 2; }
  .mini-benefits { grid-template-columns: repeat(3, 1fr); }
  .play-layout { grid-template-columns: 1fr; }
  .control-column { position: static; width: min(100%, 760px); margin: 0 auto; }
}

@media (max-width: 760px) {
  .app-shell::after { font-size: .58rem; min-height: 46px; letter-spacing: .12em; }
  .game-header { gap: 10px; padding: 10px 12px; }
  .brand-icon-crop { width: 48px; height: 48px; }
  .brand-icon-crop img { width: 88px; height: 88px; left: -18px; top: -11px; }
  .brand-wordmark strong { font-size: 1.08rem; }
  .brand-wordmark small { font-size: .72rem; }
  .game-title { padding-left: 10px; }
  .game-title h1 { font-size: 1.34rem; }
  .game-title small { display: none; }
  .start-copy { padding: 18px 16px; }
  .start-copy h1 { font-size: clamp(3.2rem, 16vw, 4.4rem); }
  .welcome-copy { max-width: none; }
  .start-mascot-block { justify-content: center; }
  .start-mascot-crop { width: 132px; height: 116px; }
  .start-mascot-crop img { width: 220px; left: -9px; top: -10px; }
  .hero-bubble { margin-bottom: 8px; font-size: .92rem; }
  .preview-panel { padding: 18px; }
  .preview-label { font-size: .92rem; }
  .start-controls { padding: 0; border-radius: 0; }
  .mode-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .difficulty-cards { grid-template-columns: repeat(2, 1fr); }
  .start-actions { grid-template-columns: 1fr; }
  .status-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .status-item { min-height: 76px; padding: 12px 10px; border-radius: 18px; gap: 10px; }
  .status-item strong { font-size: 1.4rem; }
  .side-message { grid-template-columns: 1fr 56px; padding: 12px 14px; border-radius: 18px; }
  .side-message-copy { font-size: .92rem; }
  .side-message-mascot { width: 56px; height: 48px; }
  .side-message-mascot img { width: 92px; left: -9px; top: -3px; }
  .number-card { padding: 14px; border-radius: 18px; }
  .number-pad { grid-template-columns: repeat(5,1fr); }
  .number-pad button { min-height: 58px; border-radius: 14px; font-size: 1.12rem; }
  .edit-actions { grid-template-columns: repeat(4,1fr); }
  .tool-button { min-height: 52px; border-radius: 12px; font-size: .68rem; }
  .result-hero { width: 112px; height: 112px; }
  .result-mascot { width: 100px; height: 100px; }
  .result-mascot img { width: 100%; height: 100%; }
  .celebration-mark { width: 38px; height: 38px; font-size: 1.1rem; }
  .result-banner { font-size: .92rem; }
  .result-brand-line { font-size: .74rem !important; }
}

@media (max-width: 520px) {
  body { background: linear-gradient(180deg, #BCEAFF 0%, #EAF7FF 18%, #F7FBFF 48%, #F7FAFE 100%); }
  body::before { height: 96px; }
  body::after { height: 112px; }
  .app-shell::after { font-size: .53rem; min-height: 44px; }
  .header-actions { gap: 6px; }
  .icon-button { width: 42px; height: 42px; min-width: 42px; }
  .game-header { background: linear-gradient(180deg, rgba(249,253,255,.96), rgba(240,249,255,.96)); }
  .start-screen { padding: 10px 12px 26px; }
  .start-controls { margin-top: 0; }
  .session-bar { border-radius: 16px; }
  .coach-strip { border-radius: 14px; }
  .status-item > svg { display: block; width: 20px; height: 20px; }
  .status-item small { font-size: .7rem; }
  .status-item strong { font-size: 1.1rem; }
  .board-card { padding: 5px; border-radius: 14px; }
  .sudoku-grid { border-width: 3px; border-radius: 10px; }
  .game-difficulty { grid-template-columns: repeat(2, 1fr); }
  .diff-pill { min-height: 40px; font-size: .82rem; }
  .number-card-heading h2 { font-size: 1rem; }
  .notes-state { font-size: .62rem; }
  .number-pad button { min-height: 50px; }
  .secondary-actions { grid-template-columns: 1fr 1fr; }
  .notes-help { display: none; }
}

@media (max-width: 360px) {
  .mode-switch { grid-template-columns: 1fr; }
  .difficulty-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .app-shell { max-width: 100%; }
  .game-header {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .brand-lockup { min-width: 0; flex: 1 1 auto; }
  .brand-wordmark { min-width: 0; overflow: hidden; }
  .brand-wordmark strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand-icon-crop { width: 40px; height: 40px; flex-shrink: 0; }
  .brand-icon-crop img { width: 74px; height: 74px; left: -16px; top: -9px; }
  .game-title {
    flex: 1 1 100%;
    order: 10;
    min-width: 0;
    padding-left: 0;
    border-left: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
  }
  .game-title h1 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(0.88rem, 4.2vw, 1rem);
  }
  .header-spacer { display: none; }
  .journey-stage-chip {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-actions { flex-shrink: 0; margin-left: auto; gap: 4px; }
  .icon-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
  }
}
