:root {
  color-scheme: dark;
  --ink: #0a2029;
  --ink-soft: #123541;
  --panel: #174350;
  --panel-light: #1d5360;
  --paper: #f4f2e9;
  --paper-deep: #e8e5d8;
  --lime: #f3cc5b;
  --lime-strong: #ffd96b;
  --mint: #54e3d0;
  --coral: #ff806f;
  --text: #fffef7;
  --muted: #b2c7ca;
  --board-line: #27383b;
  --cell-grid-line: rgba(39, 56, 59, 0.21);
  --selected-ring: #263e31;
  --board-shell: rgba(255, 255, 255, 0.07);
  --cell-bg: #f4f2e9;
  --cell-hover: #e7edda;
  --cell-related: #e8eadf;
  --cell-matching: #dcebbf;
  --cell-selected: #72ead9;
  --cell-selected-ink: #0b191d;
  --given-number: #102429;
  --player-number: #007a86;
  --number-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 32px 70px rgba(0, 0, 0, 0.28);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -8%, rgba(84, 227, 208, 0.34), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(243, 204, 91, 0.22), transparent 30rem),
    radial-gradient(circle at 50% 105%, rgba(49, 138, 157, 0.24), transparent 38rem),
    linear-gradient(145deg, #0d2a35 0%, #123744 52%, #09232d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

body[data-board-style="paper"] {
  --board-shell: #cfc4ad;
  --board-line: #45413a;
  --cell-grid-line: rgba(69, 65, 58, 0.22);
  --cell-bg: #fffaf0;
  --cell-hover: #f2eadb;
  --cell-related: #f3ecde;
  --cell-matching: #e8dfca;
  --cell-selected: #f0d77a;
  --cell-selected-ink: #2e2c28;
  --selected-ring: #665f51;
  --given-number: #272624;
  --player-number: #285b87;
}

body[data-board-style="wood"] {
  --board-line: #5a351e;
  --cell-grid-line: rgba(90, 53, 30, 0.28);
  --cell-bg: #e5c18e;
  --cell-hover: #eccb9a;
  --cell-related: #d8b37f;
  --cell-matching: #edbd73;
  --cell-selected: #f5d675;
  --cell-selected-ink: #382313;
  --selected-ring: #704521;
  --given-number: #382313;
  --player-number: #7b311f;
}

body[data-board-style="wood"] .board-wrap {
  background:
    repeating-linear-gradient(92deg, rgba(76, 38, 17, 0.18) 0 2px, transparent 2px 34px),
    linear-gradient(120deg, #8a542c, #bf8148 48%, #754221);
}

body[data-board-style="midnight"] {
  --board-shell: rgba(87, 186, 186, 0.18);
  --board-line: #79b9bd;
  --cell-grid-line: rgba(121, 185, 189, 0.22);
  --cell-bg: #0c2229;
  --cell-hover: #133039;
  --cell-related: #15343c;
  --cell-matching: #1d4a4a;
  --cell-selected: #d8ff5f;
  --cell-selected-ink: #071418;
  --selected-ring: #89a43e;
  --given-number: #edf5f2;
  --player-number: #8ee4d0;
}

body[data-number-style="handwritten"] {
  --number-font: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
}

body[data-number-style="serif"] {
  --number-font: Georgia, "Times New Roman", serif;
}

body[data-number-style="mono"] {
  --number-font: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(216, 255, 95, 0.72);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(2px);
}

.ambient-one {
  top: 20%;
  right: -12rem;
  width: 27rem;
  height: 27rem;
  border: 1px solid rgba(216, 255, 95, 0.08);
  box-shadow: 0 0 0 5rem rgba(216, 255, 95, 0.018), 0 0 0 10rem rgba(216, 255, 95, 0.012);
}

.ambient-two {
  bottom: -16rem;
  left: -12rem;
  width: 30rem;
  height: 30rem;
  background: rgba(50, 124, 119, 0.08);
  filter: blur(80px);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 14px;
}

.topbar {
  position: relative;
  z-index: 1000;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(17, 54, 65, 0.76);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: url("/icons/app-icon.svg") center / cover no-repeat;
  box-shadow: 0 8px 24px rgba(84, 227, 208, 0.24);
  transform: rotate(-2deg);
}

.brand-mark i {
  display: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.12rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.difficulty-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.picker-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.level-buttons {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.level-buttons button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  transition: 160ms ease;
}

.level-buttons button:hover {
  color: var(--text);
}

.level-buttons button.active {
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(216, 255, 95, 0.13);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.site-menu {
  position: relative;
}

.site-menu > summary {
  list-style: none;
}

.site-menu > summary::-webkit-details-marker {
  display: none;
}

.menu-button svg,
.site-menu-panel svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.site-menu[open] .menu-button {
  background: rgba(255, 255, 255, 0.12);
  color: var(--lime);
}

.site-menu-panel {
  position: absolute;
  z-index: 1300;
  top: calc(100% + 9px);
  right: 0;
  width: 245px;
  padding: 8px;
  border: 1px solid rgba(84, 227, 208, 0.28);
  border-radius: 16px;
  background: linear-gradient(145deg, #174350, #0d2a35);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.site-menu-panel a {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--text);
  text-decoration: none;
}

.site-menu-panel a:hover,
.site-menu-panel a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.site-menu-panel svg {
  flex: 0 0 auto;
  color: var(--lime);
}

.site-menu-panel strong,
.site-menu-panel small {
  display: block;
}

.site-menu-panel strong {
  font-size: 0.86rem;
}

.site-menu-panel small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.stats-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}

.stats-button:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}

.stats-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.sign-in-link {
  text-decoration: none;
  white-space: nowrap;
}

.account-button {
  position: relative;
  display: inline-flex;
  width: auto;
  max-width: 164px;
  height: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(84, 227, 208, 0.55);
  background: linear-gradient(145deg, rgba(84, 227, 208, 0.14), rgba(243, 204, 91, 0.07));
  color: var(--text);
}

.account-button span {
  display: block;
  max-width: 138px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-button i {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 24px;
  align-items: start;
}

.board-column {
  min-width: 0;
}

.game-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 8px;
}

.status-copy h1 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.05rem, 4.2vw, 3.55rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.045em;
}

.eyebrow {
  color: var(--lime);
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.19em;
}

.metrics {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 2px;
}

.metric {
  min-width: 58px;
}

.metric span,
.metric strong {
  display: block;
}

.metric span {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.metric strong {
  font-size: 1.06rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.play-icon,
.paused .pause-icon {
  display: none;
}

.paused .play-icon {
  display: block;
}

.board-wrap {
  position: relative;
  width: min(100%, calc(100svh - 150px), 650px);
  padding: 11px;
  border-radius: 23px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(84, 227, 208, 0.28), rgba(243, 204, 91, 0.16)), var(--board-shell);
  box-shadow: 0 30px 68px rgba(0, 0, 0, 0.28), 0 0 52px rgba(84, 227, 208, 0.16);
}

.sudoku-board {
  display: grid;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  border: 3px solid var(--board-line);
  border-radius: 17px;
  background: var(--cell-bg);
}

.cell {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--cell-grid-line);
  border-bottom: 1px solid var(--cell-grid-line);
  background: var(--cell-bg);
  color: #183137;
  cursor: pointer;
  font-family: var(--number-font);
  font-size: clamp(1.15rem, 4.3vw, 2.2rem);
  font-weight: 500;
  line-height: 1;
  transition: background 100ms ease, color 100ms ease, transform 100ms ease;
}

.cell:nth-child(9n) {
  border-right: 0;
}

.cell:nth-child(n+73) {
  border-bottom: 0;
}

.cell:nth-child(9n+3),
.cell:nth-child(9n+6) {
  border-right: 3px solid var(--board-line);
}

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

.cell:hover {
  background: var(--cell-hover);
  transform: scale(0.97);
}

.cell.related {
  background: var(--cell-related);
}

.cell.matching {
  background: var(--cell-matching);
}

.cell.selected {
  z-index: 2;
  background: var(--cell-selected);
  color: var(--cell-selected-ink);
  box-shadow: inset 0 0 0 3px var(--selected-ring), 0 0 0 1px rgba(255,255,255,.5);
}

.cell.given {
  color: var(--given-number);
  font-weight: 640;
}

.cell.user-value {
  color: var(--player-number);
  font-weight: 520;
}

.cell.error {
  background: #ffd8d0;
  color: #c33d2e;
}

.cell.hinted::after {
  position: absolute;
  top: 8%;
  right: 9%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4f8d6d;
  content: "";
}

.notes-grid {
  display: grid;
  width: 82%;
  height: 82%;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
}

.notes-grid span {
  color: var(--player-number);
  font-size: clamp(0.48rem, 1.42vw, 0.82rem);
  font-weight: 720;
  line-height: 1;
}

.pause-screen {
  position: absolute;
  inset: 10px;
  z-index: 10;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 17px;
  background: rgba(11, 25, 29, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: 160ms ease;
}

.choice-screen {
  position: absolute;
  inset: 10px;
  z-index: 9;
  display: flex;
  visibility: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: clamp(22px, 5vw, 48px);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(14, 47, 57, 0.97), rgba(24, 76, 84, 0.98));
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity 160ms ease;
}

.choice-screen.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.choice-kicker {
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.choice-screen h2 {
  margin: 7px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.choice-screen > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.choice-options {
  display: grid;
  width: min(100%, 430px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: clamp(18px, 4vw, 30px);
}

.choice-options button {
  display: flex;
  min-height: 70px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 12px 15px;
  border: 1px solid rgba(216, 255, 95, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.choice-options button:hover,
.choice-options button:focus-visible {
  border-color: rgba(216, 255, 95, 0.62);
  background: rgba(216, 255, 95, 0.12);
  transform: translateY(-1px);
}

.choice-options button strong,
.choice-options button small {
  display: block;
}

.choice-options button strong {
  font-size: 0.98rem;
}

.choice-options button small {
  margin-top: 3px;
  color: #94aaae;
  font-size: 0.7rem;
}

.sudoku-board.awaiting-choice {
  opacity: 0.3;
}

.cell:disabled,
.number-pad button:disabled,
.icon-button:disabled,
.restart-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.pause-screen.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.pause-symbol {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
}

.pause-symbol svg {
  width: 25px;
  margin-left: 3px;
  fill: currentColor;
}

.pause-screen strong {
  margin-bottom: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 400;
}

.pause-screen > span:not(.pause-symbol) {
  color: var(--muted);
}

.pause-screen button {
  min-height: 44px;
  margin-top: 22px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.control-panel {
  position: relative;
  margin-top: 50px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(30, 91, 101, 0.97), rgba(14, 53, 65, 0.98));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,.1);
}

.control-panel::before {
  position: absolute;
  top: -1px;
  right: 28px;
  left: 28px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--mint), var(--lime), transparent);
  content: "";
  opacity: 0.85;
}

.daily-card {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  margin: 0 0 17px;
  padding: 10px;
  border: 1px solid rgba(216, 255, 95, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.daily-card:hover,
.daily-card.active {
  border-color: rgba(216, 255, 95, 0.42);
  background: rgba(216, 255, 95, 0.1);
}

.daily-date {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  align-content: center;
  border-radius: 10px;
  background: var(--lime);
  color: var(--ink);
  line-height: 1;
}

.daily-date small,
.daily-date strong {
  display: block;
}

.daily-date small {
  margin-bottom: 3px;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.daily-date strong {
  font-size: 1.05rem;
}

.daily-copy {
  min-width: 0;
}

.daily-copy strong,
.daily-copy small {
  display: block;
}

.daily-copy strong {
  font-size: 0.77rem;
}

.daily-copy small {
  margin-top: 2px;
  color: #789095;
  font-size: 0.63rem;
}

.daily-streak {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  color: #a8bdc1;
  font-size: 0.58rem;
  font-weight: 760;
  white-space: nowrap;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.step-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  overflow: hidden;
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 220ms ease;
}

.number-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.number-pad button {
  aspect-ratio: 1.38;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255,255,255,.065));
  color: var(--text);
  cursor: pointer;
  font-size: 1.22rem;
  font-weight: 520;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.number-pad button:hover {
  border-color: rgba(216, 255, 95, 0.32);
  background: rgba(84, 227, 208, 0.16);
  transform: translateY(-1px);
}

.number-pad button:active {
  transform: scale(0.96);
}

.number-pad button.complete-number {
  color: #5d7479;
  opacity: 0.5;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-grid button {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
}

.tool-grid button:hover,
.tool-grid button.active {
  color: var(--lime);
}

.tool-grid button:disabled {
  cursor: default;
  opacity: 0.35;
}

.tool-grid button small {
  margin-top: 1px;
  color: #667f84;
  font-size: 0.64rem;
  font-weight: 650;
}

.tool-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 5px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
}

.tool-grid button:hover .tool-icon,
.tool-grid button.active .tool-icon {
  border-color: rgba(216, 255, 95, 0.3);
  background: rgba(216, 255, 95, 0.08);
}

.tool-icon svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.restart-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: transparent;
  color: #c1ced0;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}

.coach-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  padding: 12px 32px 12px 12px;
  border: 1px solid rgba(135, 217, 196, 0.2);
  border-radius: 13px;
  background: rgba(135, 217, 196, 0.07);
}

.coach-card[hidden] {
  display: none;
}

.coach-badge {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(135, 217, 196, 0.13);
  color: var(--mint);
}

.coach-badge svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.coach-card p {
  margin: 0;
}

.coach-card p strong,
.coach-card p span {
  display: block;
}

.coach-card p strong {
  color: #cfebe4;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.coach-card p span {
  margin-top: 2px;
  color: #8fa9a9;
  font-size: 0.67rem;
  line-height: 1.35;
}

.coach-card > button {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #6f898f;
  cursor: pointer;
  font-size: 1.05rem;
}

.restart-button:hover {
  border-color: rgba(255, 128, 111, 0.35);
  color: #ffc0b7;
}

.restart-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.keyboard-tip {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.keyboard-tip svg {
  flex: 0 0 auto;
  width: 20px;
  margin-top: 2px;
  fill: none;
  stroke: var(--mint);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.keyboard-tip p {
  margin: 0;
}

.keyboard-tip strong,
.keyboard-tip span {
  display: block;
}

.keyboard-tip strong {
  color: #cdd8da;
  font-size: 0.7rem;
}

.keyboard-tip span {
  margin-top: 1px;
  color: #789095;
  font-size: 0.66rem;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  color: #6f898f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.88rem;
  font-style: italic;
}

footer nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

footer button,
footer a {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(216, 255, 95, 0.32);
  background: transparent;
  color: #a7bec2;
  cursor: pointer;
  font-family: Inter, ui-sans-serif, sans-serif;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 750;
  text-decoration: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(330px, calc(100vw - 44px));
  padding: 12px 16px;
  border: 1px solid rgba(216, 255, 95, 0.3);
  border-radius: 12px;
  background: #1c3439;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  color: #e9f0e7;
  font-size: 0.82rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.game-dialog {
  width: min(430px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: #142a30;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.5);
  color: var(--text);
}

.game-dialog::backdrop {
  background: rgba(3, 12, 15, 0.76);
  backdrop-filter: blur(5px);
}

.game-dialog form {
  position: relative;
  padding: 34px;
  text-align: center;
}

.dialog-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
}

.dialog-icon.success {
  background: var(--lime);
  color: var(--ink);
}

.dialog-icon.neutral {
  background: rgba(255, 255, 255, 0.07);
  color: var(--mint);
}

.dialog-icon svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.dialog-kicker {
  margin: 0 0 8px !important;
  color: var(--lime) !important;
  font-size: 0.68rem !important;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.game-dialog h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.game-dialog p {
  margin: 12px auto 0;
  color: #91a7ab;
  font-size: 0.88rem;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 26px;
}

.dialog-actions.three-actions {
  grid-template-columns: repeat(3, 1fr);
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.share-button svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dialog-actions button,
.dialog-primary.full {
  min-height: 46px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.dialog-secondary {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: transparent;
  color: var(--text);
}

.dialog-primary {
  border: 0;
  background: var(--lime);
  color: var(--ink);
}

.rules-dialog form {
  text-align: left;
}

.rules-dialog h2,
.rules-dialog > form > p {
  text-align: left;
}

.rules-dialog ul {
  margin: 20px 0 24px;
  padding-left: 20px;
  color: #b7c6c8;
  font-size: 0.86rem;
}

.rules-dialog li + li {
  margin-top: 8px;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.dialog-primary.full {
  width: 100%;
}

.stats-dialog form {
  text-align: left;
}

.stats-dialog h2,
.stats-dialog .dialog-kicker {
  text-align: left !important;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.stats-grid > div {
  padding: 13px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.stats-grid strong,
.stats-grid span {
  display: block;
}

.stats-grid strong {
  color: var(--lime);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.stats-grid span {
  margin-top: 3px;
  color: #789095;
  font-size: 0.59rem;
  font-weight: 700;
}

.best-times {
  margin: 22px 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.best-times h3 {
  margin: 0 0 10px;
  color: #d5e0e1;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.best-times > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  color: #8ea4a8;
  font-size: 0.76rem;
}

.best-times > div + div {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.best-times strong {
  color: #d6e0e1;
  font-variant-numeric: tabular-nums;
}

/* Accounts, tiers and leaderboards */
.points-award {
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(216, 255, 95, 0.2);
  border-radius: 999px;
  background: rgba(216, 255, 95, 0.07);
  color: var(--lime) !important;
  font-weight: 800;
}

.success-tag {
  max-width: 350px;
  margin-top: 8px !important;
  color: #d7ecea !important;
  font-size: 0.92rem !important;
  font-weight: 650;
}

#success-summary {
  margin-top: 7px;
}

#success-dialog .share-button {
  gap: 6px;
  padding-inline: 10px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.community-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(88vh, 860px);
}

.account-dialog {
  width: min(760px, calc(100% - 28px));
  overflow: visible;
}

.account-dialog .community-dialog-body {
  max-height: none;
  overflow: visible;
  padding: 25px 28px 22px;
}

#account-signed-in:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  align-items: end;
  gap: 10px 16px;
}

#account-signed-in .account-summary {
  grid-column: 1 / -1;
}

#account-signed-in .account-tier-grid {
  grid-column: 1 / -1;
}

#account-signed-in .profile-form,
#account-signed-in .personalise-button {
  margin-top: 4px;
}

#account-signed-in .account-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2px;
}

#account-signed-in .account-details > div {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

#account-signed-in .account-privacy-note,
#account-signed-in .account-exit-actions {
  margin-top: 0 !important;
}

.style-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(88vh, 820px);
}

.community-dialog-body {
  position: relative;
  max-height: min(88vh, 860px);
  overflow-y: auto;
  padding: 32px;
  text-align: left;
}

.community-dialog h2,
.community-dialog .dialog-kicker,
.account-dialog h2,
.account-dialog .dialog-kicker {
  text-align: left !important;
}

.community-intro {
  max-width: 620px;
  margin: 10px 0 22px !important;
  text-align: left;
}

.leaderboard-scope-help {
  margin: 0 0 12px !important;
  padding: 10px 12px;
  border-left: 3px solid var(--mint);
  border-radius: 0 9px 9px 0;
  background: rgba(84, 227, 208, 0.07);
  color: #b8d5d6 !important;
  font-size: 0.74rem !important;
  text-align: left;
}

.community-tabs,
.level-filter {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.community-tabs {
  width: fit-content;
  margin-bottom: 10px;
}

.level-filter {
  overflow-x: auto;
  width: 100%;
}

.community-tabs button,
.level-filter button {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8fa4a9;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.community-tabs button.active,
.level-filter button.active {
  background: var(--lime);
  color: var(--ink);
}

.leaderboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 20px 0 9px;
  color: #9cb0b4;
  font-size: 0.73rem;
  font-weight: 750;
}

.tier-key {
  color: #6f898f;
  font-size: 0.64rem;
  font-weight: 650;
  text-align: right;
}

.leaderboard-list {
  overflow: clip;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
}

.leaderboard-row + .leaderboard-row {
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.leaderboard-row.is-you {
  border-left: 4px solid var(--lime);
  background: linear-gradient(90deg,rgba(216,255,95,.18),rgba(84,227,208,.08));
  box-shadow: inset 0 0 24px rgba(216,255,95,.05);
}
.leaderboard-row.is-you .leaderboard-rank,.leaderboard-row.is-you > div:nth-child(2) strong { color:#f7de72; font-weight:900; text-shadow:0 0 18px rgba(247,222,114,.2); }
.leaderboard-row.is-pinned { position:fixed; z-index:780; border:1px solid rgba(243,204,91,.6); border-left:4px solid var(--lime); border-radius:12px; background:linear-gradient(100deg,#213f3f,#143743 70%,#17323a); box-shadow:0 14px 38px rgba(0,0,0,.48),0 0 20px rgba(243,204,91,.12); }
.leaderboard-user-anchor { height:0; }

.leaderboard-rank {
  color: var(--lime);
  font-size: 0.92rem;
  text-align: center;
}

.leaderboard-row > div:nth-child(2) strong,
.leaderboard-row > div:nth-child(2) span {
  display: block;
}

.leaderboard-row > div:nth-child(2) strong {
  color: #e7edeb;
  font-size: 0.84rem;
}

.leaderboard-row > div:nth-child(2) span {
  margin-top: 2px;
  color: #758e93;
  font-size: 0.68rem;
}

.leaderboard-score {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
}

.leaderboard-score > strong {
  color: #dbe5e3;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.tier-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.tier-pearl { color: #d6d9d4 !important; }
.tier-sapphire { color: #77bced !important; }
.tier-emerald { color: #68d6a1 !important; }
.tier-ruby { color: #ff8c9a !important; }
.tier-diamond { color: var(--lime) !important; }

.community-empty,
.friend-empty {
  margin: 0 !important;
  padding: 24px 16px;
  text-align: center;
}
.leaderboard-sign-in { display:grid; min-height:170px; place-items:center; align-content:center; gap:14px; padding:24px; text-align:center; }
.leaderboard-sign-in p { margin:0!important; color:#bcd0d1!important; }

.friends-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(135, 217, 196, 0.16);
  border-radius: 14px;
  background: rgba(135, 217, 196, 0.045);
}

#friends-signed-out {
  text-align: center;
}

#friends-signed-out p,
#account-signed-out p {
  margin: 0 0 16px;
}

.community-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.friend-code-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.13);
}

.friend-code-card span {
  color: #8fa4a9;
  font-size: 0.72rem;
  font-weight: 750;
}

.friend-code-card strong {
  color: var(--lime);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
}

.friend-code-card button,
.friend-form button,
.profile-form button,
.friend-action {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
}

.friend-form,
.profile-form {
  margin-top: 14px;
}

.friend-form label,
.profile-form label {
  display: block;
  margin-bottom: 6px;
  color: #9eb1b4;
  font-size: 0.7rem;
  font-weight: 750;
}

.friend-form > div,
.profile-form > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.friend-form input,
.profile-form input {
  min-width: 0;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  outline: 0;
  background: rgba(0, 0, 0, 0.14);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
}

.friend-form input:focus,
.profile-form input:focus {
  border-color: rgba(216, 255, 95, 0.6);
  box-shadow: 0 0 0 3px rgba(216, 255, 95, 0.1);
}

.form-message {
  min-height: 20px;
  margin: 8px 0 0 !important;
  color: #96aaa9 !important;
  font-size: 0.72rem !important;
  text-align: left;
}

.friend-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.friend-groups > section {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
}

.friend-groups h3 {
  margin: 0 0 7px;
  color: #cbd8d8;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 0;
}

.friend-row + .friend-row {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.friend-row > div:first-child {
  min-width: 0;
}

.friend-row strong,
.friend-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-row strong {
  color: #dbe4e3;
  font-size: 0.7rem;
}

.friend-row small,
.pending-label {
  color: #718b90;
  font-size: 0.6rem;
}

.friend-row > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.friend-action {
  min-height: 29px;
  padding: 0 8px;
  font-size: 0.62rem;
}

.friend-action.secondary {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: transparent;
  color: #acbec0;
}

.account-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.account-summary > div {
  padding: 11px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.account-summary span,
.account-summary strong {
  display: block;
}

.account-summary > div > span {
  margin-bottom: 7px;
  color: #81979b;
  font-size: 0.69rem;
  font-weight: 750;
}

.account-summary > div:first-child strong {
  color: var(--lime);
  font-size: 1.35rem;
}

.account-summary .account-iq-score {
  grid-column: 1 / -1;
}

.account-summary .account-iq-score strong {
  color: var(--mint);
  font-size: 1.1rem;
}

.account-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.account-tier-card {
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  text-align: center;
}

.account-tier-card span,
.account-tier-card strong,
.account-tier-card small {
  display: block;
}

.account-tier-card span {
  color: #81979b;
  font-size: 0.66rem;
}

.account-tier-card strong {
  margin: 4px 0 2px;
  font-size: 0.76rem;
}

.account-tier-card small {
  color: #667f84;
  font-size: 0.61rem;
}

.profile-form {
  margin-top: 12px;
}

.personalise-button {
  width: 100%;
  min-height: 43px;
  margin-top: 12px;
  border: 1px solid rgba(84, 227, 208, 0.28);
  border-radius: 11px;
  background: rgba(84, 227, 208, 0.08);
  color: #c8f5ef;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.personalise-button:hover { background: rgba(84, 227, 208, 0.15); }

.control-personalise {
  display: grid;
  min-height: 48px;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  padding: 7px 12px;
  text-align: left;
}

.control-personalise svg {
  width: 22px;
  grid-row: 1 / -1;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.control-personalise span {
  font-size: 0.73rem;
  line-height: 1.15;
}

.control-personalise small {
  color: #91b9ba;
  font-size: 0.59rem;
  font-weight: 650;
}

.control-personalise:disabled {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: #839da1;
  cursor: not-allowed;
  opacity: 0.72;
}

.control-personalise:disabled:hover {
  background: rgba(255, 255, 255, 0.045);
}

.account-details {
  margin: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.account-details > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.74rem;
}

.account-details dt {
  color: #7f9599;
}

.account-details dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: #d1dddc;
  text-align: right;
}

.account-privacy-note {
  margin: 14px 0 0 !important;
  font-size: 0.7rem !important;
  text-align: left;
}

.sign-out-link {
  display: inline-block;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(159, 179, 182, 0.35);
  background: transparent;
  color: #9fb3b6;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 750;
}

.account-exit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 15px;
}

.delete-account-button {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 128, 111, 0.35);
  background: transparent;
  color: #e9a29a;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 750;
}

.style-intro {
  margin: 10px 0 20px !important;
  text-align: left;
}

.style-options {
  margin: 0;
  padding: 0;
  border: 0;
}

.style-options + .style-options {
  margin-top: 20px;
}

.style-options legend {
  margin-bottom: 8px;
  color: #b9c8c9;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.style-choice-grid button {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: #adbec0;
  cursor: pointer;
  text-align: left;
}

.style-choice-grid button:hover,
.style-choice-grid button[aria-pressed="true"] {
  border-color: rgba(216, 255, 95, 0.62);
  background: rgba(216, 255, 95, 0.07);
  color: var(--text);
}

.style-choice-grid button[aria-pressed="true"] {
  box-shadow: 0 0 0 2px rgba(216, 255, 95, 0.1);
}

.style-choice-grid button strong {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-swatch,
.number-swatch {
  display: grid;
  width: 100%;
  min-height: 54px;
  place-items: center;
  border: 3px solid;
  border-radius: 8px;
  font-size: 1.35rem;
  font-weight: 750;
}

.chamber-swatch { border-color: #27383b; background: #f4f2e9; color: #226f70; }
.paper-swatch { border-color: #45413a; background: #fffaf0; color: #285b87; }
.wood-swatch { border-color: #5a351e; background: #e5c18e; color: #7b311f; }
.midnight-swatch { border-color: #79b9bd; background: #0c2229; color: #8ee4d0; }

.number-swatch {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.13);
  color: var(--lime);
  letter-spacing: 0.06em;
}

.modern-numbers { font-family: Inter, ui-sans-serif, sans-serif; }
.handwritten-numbers { font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; }
.serif-numbers { font-family: Georgia, "Times New Roman", serif; }
.mono-numbers { font-family: "SFMono-Regular", Consolas, monospace; }

.style-save {
  margin-top: 4px;
}

/* Privacy and support pages */
.info-page {
  min-height: 100vh;
}

.info-shell {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 58px;
}

.back-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #c2d0d2;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.back-link:hover {
  border-color: rgba(216, 255, 95, 0.35);
  color: var(--lime);
}

.back-link svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.info-hero {
  margin-bottom: 34px;
}

.info-hero .eyebrow {
  display: block;
  margin-bottom: 10px;
}

.info-hero h1 {
  max-width: 650px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.052em;
}

.info-hero > p {
  max-width: 620px;
  margin: 20px 0 0;
  color: #97aaae;
  font-size: 1rem;
  line-height: 1.7;
}

.updated-label {
  display: inline-block;
  margin-top: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #799095;
  font-size: 0.67rem;
  font-weight: 750;
}

.info-card {
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(24, 50, 57, 0.88), rgba(15, 34, 40, 0.9));
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.2);
}

.policy-section + .policy-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.policy-section h2 {
  margin: 0 0 9px;
  color: #e8efec;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 400;
}

.policy-section p,
.policy-section li {
  color: #91a5a9;
  font-size: 0.9rem;
  line-height: 1.7;
}

.policy-section p {
  margin: 0;
}

.policy-section p + p {
  margin-top: 10px;
}

.policy-section ul,
.policy-section ol {
  margin: 10px 0 0;
  padding-left: 21px;
}

.policy-section a,
.support-contact a {
  color: var(--lime);
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.support-tile {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.support-tile strong {
  display: block;
  margin-bottom: 6px;
  color: #e4ecea;
  font-size: 0.9rem;
}

.support-tile p {
  margin: 0;
  color: #879da1;
  font-size: 0.78rem;
  line-height: 1.55;
}

.support-contact {
  margin-top: 26px;
  padding: 24px;
  border-radius: 18px;
  background: var(--lime);
  color: var(--ink);
}

.support-contact h2 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.support-contact p {
  margin: 0;
  color: #30422c;
  font-size: 0.84rem;
}

.support-contact a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  margin-top: 16px;
  padding: 0 17px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.games-catalog {
  display: grid;
  gap: 14px;
}

.game-catalog-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(26, 70, 80, 0.92), rgba(12, 39, 48, 0.96));
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.game-catalog-card:hover,
.game-catalog-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(216, 255, 95, 0.42);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28), 0 0 24px rgba(216, 255, 95, 0.08);
  outline: none;
}

.game-catalog-icon {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(84, 227, 208, 0.18);
}

.game-catalog-card .eyebrow {
  font-size: 0.65rem;
}

.game-catalog-card h2 {
  margin: 5px 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
}

.game-catalog-card p {
  margin: 0;
  color: #93a9ad;
  font-size: 0.82rem;
  line-height: 1.55;
}

.game-catalog-action {
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
}

.games-coming-soon {
  margin: 18px 0 0;
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: #9cafb2;
  text-align: center;
  line-height: 1.6;
}

.info-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  color: #718a8f;
  font-size: 0.72rem;
}

.info-footer a {
  color: #a9bec2;
}

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: 1fr auto;
    row-gap: 8px;
  }

  .difficulty-picker {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
  }

  .game-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
  }

  .control-panel {
    padding: 16px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 24px, 610px);
    padding-top: 8px;
  }

  .topbar {
    column-gap: 8px;
    margin-bottom: 8px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .stats-button span {
    display: none;
  }

  .stats-button {
    width: 40px;
    justify-content: center;
    padding: 0;
  }

  .difficulty-picker {
    display: block;
  }

  .picker-label {
    display: none;
  }

  .level-buttons {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .level-buttons button {
    padding: 0 8px;
  }

  .game-layout {
    display: block;
  }

  .game-status {
    align-items: center;
    margin-bottom: 6px;
  }

  .status-copy h1 {
    font-size: clamp(1.8rem, 8.5vw, 2.6rem);
  }

  .metrics {
    gap: 12px;
  }

  .metric {
    min-width: 48px;
  }

  .metric span {
    font-size: 0.65rem;
  }

  .metric strong {
    font-size: 0.92rem;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .board-wrap {
    width: min(100%, calc(100svh - 150px));
    margin-inline: auto;
    padding: 8px;
    border-radius: 19px;
  }

  .sudoku-board,
  .pause-screen {
    border-radius: 12px;
  }

  .pause-screen {
    inset: 8px;
  }

  .cell {
    font-size: clamp(1.08rem, 6vw, 1.75rem);
    font-weight: 500;
  }

  .notes-grid span {
    font-size: clamp(0.42rem, 2.1vw, 0.67rem);
  }

  .control-panel {
    margin-top: 12px;
    padding: 14px;
    border-radius: 19px;
  }

  .daily-card {
    margin-bottom: 12px;
  }

  .panel-heading {
    margin-bottom: 12px;
  }

  .number-pad {
    grid-template-columns: repeat(9, 1fr);
    gap: 4px;
  }

  .number-pad button {
    min-width: 0;
    aspect-ratio: 0.8;
    border-radius: 9px;
    font-size: clamp(0.95rem, 4vw, 1.2rem);
  }

  .tool-grid {
    margin-top: 13px;
    padding-top: 13px;
  }

  .restart-button {
    margin-top: 14px;
  }

  .keyboard-tip {
    display: none;
  }

  footer {
    margin-top: 18px;
  }
}

@media (max-width: 430px) {
  .game-status {
    gap: 10px;
  }

  .status-copy h1 {
    font-size: 1.75rem;
  }

  .eyebrow {
    font-size: 0.6rem;
  }

  .metrics {
    gap: 8px;
  }

  .metric span {
    display: none;
  }

  .tool-grid button {
    font-size: 0.7rem;
  }

  footer > span {
    display: none;
  }

  footer {
    justify-content: center;
  }

  footer nav {
    width: 100%;
    justify-content: space-around;
    gap: 8px;
  }

  .dialog-actions.three-actions {
    grid-template-columns: 1fr;
  }

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

  .info-header {
    margin-bottom: 42px;
  }

  .info-header .brand span:last-child {
    display: none;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .info-footer {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .choice-screen {
    inset: 8px;
    padding: 20px;
    border-radius: 12px;
  }

  .choice-screen > p {
    font-size: 0.78rem;
  }

  .choice-options {
    gap: 7px;
    margin-top: 16px;
  }

  .choice-options button {
    min-height: 62px;
    padding: 9px 11px;
  }
}

@media (max-width: 760px) {
  .topbar .brand > span:last-child {
    display: none;
  }

  .account-button span {
    display: block;
  }

  .account-button {
    width: auto;
    max-width: 124px;
    padding: 0 10px;
  }

  .account-button span {
    max-width: 102px;
  }

  .community-dialog-body {
    padding: 26px 20px 22px;
  }

  .account-dialog {
    overflow: hidden;
  }

  .account-dialog .community-dialog-body {
    max-height: min(88vh, 860px);
    overflow-y: auto;
    padding: 24px 20px 20px;
  }

  #account-signed-in:not([hidden]) {
    display: block;
  }

  #account-signed-in .account-details {
    display: block;
    margin-top: 14px;
  }

  #account-signed-in .profile-form,
  #account-signed-in .personalise-button {
    margin-top: 12px;
  }

  #account-signed-in .account-privacy-note,
  #account-signed-in .account-exit-actions {
    margin-top: 14px !important;
  }

  .community-intro {
    padding-right: 22px;
  }

  .tier-key {
    display: none;
  }

  .friend-groups {
    grid-template-columns: 1fr;
  }

  .account-tier-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 430px) {
  .community-dialog h2,
  .account-dialog h2 {
    font-size: 1.72rem;
  }

  .community-tabs,
  .level-filter {
    border-radius: 10px;
  }

  .level-filter button {
    padding: 0 12px;
  }

  .leaderboard-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 10px;
  }

  .friend-code-card {
    grid-template-columns: 1fr auto;
  }

  .friend-code-card span {
    grid-column: 1 / -1;
  }

  .account-details > div {
    grid-template-columns: 84px 1fr;
  }
}

/* Version 16: weekly leagues, compact account and chamber arrival */
.chamber-opening {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  overflow: hidden; pointer-events: auto; perspective:1600px; background:transparent;
  animation: opening-away 1.1s ease 5.2s forwards;
}
.opening-haze { position:absolute; inset:0; z-index:1; background:rgba(4,16,21,.08); backdrop-filter:blur(2.5px) saturate(.88) brightness(.88); animation:haze-clear 1.25s ease 4.85s forwards; }
.opening-frame{position:absolute;inset-block:0;z-index:4;width:13%;background-image:url('/icons/walnut-chamber-closed.webp');background-repeat:no-repeat;background-size:769.24% 100%;filter:drop-shadow(0 0 24px #000c)}
.opening-frame-left{left:0;background-position:left center}.opening-frame-right{right:0;background-position:right center}
.opening-door { position:absolute; inset-block:0; z-index:4; width:37.05%; overflow:hidden; background-image:url('/icons/walnut-chamber-closed.webp'); background-repeat:no-repeat; background-size:269.9% 100%; box-shadow:0 0 90px #000d; animation:door-open 2.45s cubic-bezier(.55,0,.18,1) .3s forwards; backface-visibility:hidden; transform-style:preserve-3d; }
.opening-door-left { left:12.95%; transform-origin:left center; background-position:20.55% center; border-right-width:3px; }
.opening-door-right { right:12.95%; transform-origin:right center; --door-direction:-1; background-position:79.45% center; }
.opening-number-grids { position:absolute; inset:0; z-index:5; overflow:visible; pointer-events:none; }
.opening-number-grid { position:absolute; isolation:isolate; width:clamp(142px,17vw,244px); aspect-ratio:1; overflow:visible; background:transparent; filter:drop-shadow(0 13px 13px #000a); opacity:1; transform:rotate(var(--resting-angle,0deg)); will-change:transform,opacity; }
.opening-number-grid:nth-child(1){left:2%;bottom:8%;--resting-angle:-8deg}.opening-number-grid:nth-child(2){left:14%;bottom:4%;--resting-angle:5deg}.opening-number-grid:nth-child(3){left:27%;bottom:10%;--resting-angle:-3deg}.opening-number-grid:nth-child(4){left:39%;bottom:5%;--resting-angle:7deg}.opening-number-grid:nth-child(5){right:34%;bottom:11%;--resting-angle:-6deg}.opening-number-grid:nth-child(6){right:22%;bottom:5%;--resting-angle:3deg}.opening-number-grid:nth-child(7){right:9%;bottom:9%;--resting-angle:-4deg}.opening-number-grid:nth-child(8){left:43%;bottom:22%;--resting-angle:2deg}
.wing-flight { position:absolute; inset:0; display:block; overflow:visible; will-change:transform; animation:wing-flight-bob .92s linear infinite; }
.wing-flight-1 { animation-delay:-.5s; }
.wing-flight-2 { animation-delay:-1s; }
.wing-flight-frame { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; opacity:0; will-change:opacity,transform; animation:wing-frame-cycle .64s linear infinite; }
.wing-flight-frame:nth-child(1){animation-delay:0s}.wing-flight-frame:nth-child(2){animation-delay:-.32s}
@keyframes door-open { to { transform:rotateY(calc(var(--door-direction,1) * 86deg)) scaleX(.94); opacity:.2; } }
@keyframes opening-away { to { opacity:0; visibility:hidden; } }
@keyframes haze-clear { to { background:transparent; backdrop-filter:blur(0) saturate(1) brightness(1); } }
@keyframes wing-flight-bob { 0%{transform:translateY(1px) rotate(.25deg)} 25%{transform:translateY(-2px) rotate(0)} 50%{transform:translateY(-4px) rotate(-.25deg)} 75%{transform:translateY(-2px) rotate(0)} 100%{transform:translateY(1px) rotate(.25deg)} }
@keyframes wing-frame-cycle { 0%{opacity:1;transform:translateY(0) scaleY(1)} 25%{opacity:.5;transform:translateY(-1px) scaleY(1.012)} 50%{opacity:0;transform:translateY(-2px) scaleY(1.02)} 75%{opacity:.5;transform:translateY(-1px) scaleY(1.012)} 100%{opacity:1;transform:translateY(0) scaleY(1)} }

body.chamber-intro-active { overflow:hidden; }
body.chamber-intro-active .app-shell { pointer-events:none; user-select:none; filter:blur(4px) saturate(.84) brightness(.84); transform:scale(1.01); }
body.chamber-intro-active.chamber-focus .app-shell { filter:blur(3px) saturate(.9) brightness(.92); transform:scale(1.06); }
body.chamber-intro-active.chamber-reveal .app-shell { filter:blur(0) saturate(1) brightness(1); transform:scale(1); }
.app-shell { transition:filter 1.65s ease,transform 2.1s cubic-bezier(.2,.72,.2,1); }

/* Android app: preserve the closed walnut entrance, omit the winged-grid flight. */
.chamber-android-app .opening-number-grids{display:none}
.chamber-android-app .chamber-opening{animation:opening-away .9s ease 3.55s forwards}
.chamber-android-app .opening-haze{animation:haze-clear 1.15s ease 2.9s forwards}
.chamber-android-app .opening-door{animation:door-open 3.35s cubic-bezier(.55,0,.18,1) .3s forwards}
.chamber-android-app{overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
.chamber-android-app footer,.chamber-android-app .info-footer,.chamber-android-app #install-app,.chamber-android-app .more-games-nudge{display:none!important}
.chamber-native-settings{width:min(410px,calc(100vw - 32px));padding:0;border:1px solid #f3cc5b66;border-radius:18px;background:#0c2730;color:#fffef7;box-shadow:0 26px 80px #000b}
.chamber-native-settings::backdrop{background:#001014c9;backdrop-filter:blur(4px)}
.chamber-native-settings form{display:grid;gap:0;padding:24px}.chamber-native-settings h2{margin:7px 0 5px;color:#fffef7;font:400 1.8rem/1.1 Georgia,serif}.chamber-native-settings p{margin:0 0 16px;color:#abc1c3}
.chamber-native-settings label{display:flex;min-height:54px;align-items:center;justify-content:space-between;border-top:1px solid #ffffff14;color:#fffef7;font-weight:750}.chamber-native-settings input{width:22px;height:22px;accent-color:#f3cc5b}
.native-settings-done{min-height:48px;margin-top:17px;border:0;border-radius:999px;background:#f3cc5b;color:#071820;font-weight:850;cursor:pointer}
.site-menu-panel .chamber-native-settings-button{display:flex;width:100%;align-items:center;gap:12px;padding:13px;border:0;border-radius:10px;background:transparent;color:#fffef7;text-align:left;cursor:pointer}.site-menu-panel .chamber-native-settings-button:hover{background:#ffffff0b}.site-menu-panel .chamber-native-settings-button>span:first-child{display:grid;width:34px;aspect-ratio:1;place-items:center;border:1px solid #f3cc5b55;border-radius:9px;color:#f3cc5b}.site-menu-panel .chamber-native-settings-button span:last-child{display:grid;gap:3px}.site-menu-panel .chamber-native-settings-button small{color:#9fb7b9}

.tutorial-popover { position:fixed; z-index:700; right:clamp(14px,3vw,36px); top:clamp(86px,14vh,150px); width:min(370px,calc(100vw - 28px)); padding:22px; border:1px solid #ffe07266; border-radius:20px; background:linear-gradient(145deg,#194b58,#0d2a35); box-shadow:0 24px 80px #0008,0 0 35px #ffd65a18; color:var(--text); }
.tutorial-pointer { position:absolute; top:-7px; width:14px; height:14px; transform:translateX(-50%) rotate(45deg); border-left:1px solid #ffe07266; border-top:1px solid #ffe07266; background:#194b58; }
.tutorial-popover[data-pointer="bottom"] .tutorial-pointer { top:auto; bottom:-7px; transform:translateX(-50%) rotate(225deg); }
.tutorial-target { position:relative; z-index:650; outline:4px solid #ffd65a!important; outline-offset:5px; border-radius:12px; animation:tutorial-pulse 1s ease-in-out infinite; }
@keyframes tutorial-pulse { 0%,100%{box-shadow:0 0 0 5px #ffd65a18,0 0 18px #ffd65a55} 50%{box-shadow:0 0 0 11px #ffd65a2f,0 0 42px #ffd65acc} }
.nudge-action { border-color:#f3cc5b66!important; background:#f3cc5b18!important; color:#f7d76f!important; }
.friend-streak { display:flex!important; align-items:center; gap:5px; margin-top:5px!important; color:#f2c95b!important; }
.friend-streak b { color:#ffd966; font-size:.76rem; font-weight:800; }
.friend-streak.at-risk b { color:#ffca57; }
.streak-nudge { display:inline-grid; width:27px; height:27px; place-items:center; padding:0; border:1px solid #ffd65a77; border-radius:50%; background:#ffd65a16; color:#ffd65a; cursor:pointer; animation:hourglass-alert 1.15s ease-in-out infinite; }
.streak-nudge:hover,.streak-nudge:focus-visible { background:#ffd65a2e; outline:2px solid #ffd65a; outline-offset:2px; }
@keyframes hourglass-alert { 0%,100%{transform:rotate(0);box-shadow:0 0 0 0 #ffd65a44} 50%{transform:rotate(8deg);box-shadow:0 0 0 5px #ffd65a00} }
.tutorial-popover h2 { margin:5px 0 9px; font:400 1.65rem/1.05 Georgia,serif; }
.tutorial-popover > p:not(.dialog-kicker) { margin:0; color:#cae0e1; line-height:1.55; }
.tutorial-progress { float:right; color:#ffd65a; font-size:.72rem; font-weight:800; }
.tutorial-actions { display:grid; grid-template-columns:1fr auto auto; align-items:start; gap:8px; margin-top:18px; }
.tutorial-actions button { min-height:38px; padding:0 13px; border:1px solid #ffffff20; border-radius:999px; background:#ffffff0a; color:#dcebec; font-weight:800; cursor:pointer; }
.tutorial-actions button:last-child { border:0; background:var(--lime); color:var(--ink); }
.tutorial-actions button:disabled { opacity:.35; }
.tutorial-end-group { display:grid; justify-items:start; gap:8px; min-width:0; }
.tutorial-dont-show { display:flex; align-items:center; gap:6px; color:#c7dadc; font-size:.7rem; line-height:1.25; cursor:pointer; }
.tutorial-dont-show input { width:15px; height:15px; margin:0; accent-color:var(--lime); }

.share-code-choice { display:flex; align-items:center; justify-content:center; gap:8px; margin:12px 0 0; color:#a8bec1; font-size:.76rem; }
.share-code-choice input { accent-color:var(--lime); }
.challenge-friend-choice { display:grid; gap:6px; margin:13px 0 0; color:#bed0d2; font-size:.76rem; text-align:left; }
.challenge-friend-choice select { min-height:42px; padding:0 12px; border:1px solid #54e3d044; border-radius:10px; background:#09242d; color:#f4fbf9; }
.notification-inbox { grid-column:1/-1; padding:13px; border:1px solid #ffffff14; border-radius:13px; background:#ffffff06; }
.notification-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.notification-heading h3 { margin:0; color:#f8d96f; font-size:.86rem; }
.notification-heading span { color:#54e3d0; font-size:.7rem; font-weight:800; }
#notification-list { display:grid; gap:7px; }
.notification-card { display:grid; gap:3px; padding:10px 11px; border:1px solid #ffffff12; border-radius:10px; background:#071f27; color:#dbe9e8; text-decoration:none; }
.notification-card.unread { border-color:#f3cc5b66; background:#f3cc5b0d; }
.notification-card strong { color:#fff4bd; font-size:.76rem; }
.notification-card span,.notification-empty { margin:0; color:#b8cbcd; font-size:.72rem; line-height:1.4; }

.player-name-card { grid-column:1; padding:10px 13px; border:1px solid #54e3d033; border-radius:13px; background:linear-gradient(135deg,#54e3d012,#ffffff08); }
.player-name-card > span { color:#8fa7aa; font-size:.69rem; font-weight:750; }
.player-name-card > div { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:5px; }
.player-name-card strong { overflow:hidden; color:#f3fbf8; font-size:1rem; text-overflow:ellipsis; white-space:nowrap; }
.player-name-card > div button { display:grid; width:34px; height:34px; place-items:center; border:1px solid #f3cc5b44; border-radius:50%; background:#f3cc5b10; color:var(--lime); cursor:pointer; }
.player-name-card > div button svg { width:16px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.9; }
.player-name-card .profile-form { margin-top:9px !important; }
.league-note { grid-column:1/-1; margin:0!important; padding:9px 12px; border-left:3px solid #ffd65a; background:#ffd65a0c; color:#b9ccce!important; font-size:.69rem!important; line-height:1.4!important; }
.tutorial-preference { display:flex; align-items:center; gap:16px; min-width:0; margin:0; padding:10px 13px; border:1px solid #ffffff12; border-radius:12px; }
.tutorial-preference legend { float:left; margin-right:auto; color:#a6b9bc; font-size:.72rem; font-weight:750; }
.tutorial-preference label { display:flex; align-items:center; gap:5px; color:#d8e6e5; font-size:.73rem; }
.tutorial-preference input { accent-color:var(--lime); }
#account-signed-in:not([hidden]) { align-items:start; }
#account-signed-in .player-name-card { grid-column:1; grid-row:1; }
#account-signed-in .account-summary { grid-column:2; grid-row:1; margin-top:0; }
#account-signed-in .league-note, #account-signed-in .tutorial-preference, #account-signed-in .account-details, #account-signed-in .account-exit-actions, #account-signed-in .account-privacy-note { grid-column:1/-1; }
#account-signed-in .account-exit-actions { display:flex; justify-content:space-between; align-items:center; }
#account-signed-in .account-privacy-note { text-align:center; white-space:nowrap; }
#account-overall-tier { min-height:0; padding:0; border:0; color:var(--lime)!important; font:800 1.35rem/1 Inter,ui-sans-serif,sans-serif; }
.community-dialog { overflow:hidden; }
.community-dialog-body { scrollbar-gutter:stable; }

body[data-board-style="chamber"] .sudoku-board { background:radial-gradient(circle at 50% 35%,#e9ffff,#b9e6e3 70%,#8ecbc7); box-shadow:inset 0 0 28px #1d8f8950,0 12px 38px #00191f80; }
body[data-board-style="midnight"] .sudoku-board { background:radial-gradient(circle at 50% 40%,#183b58,#071b2e 72%); box-shadow:inset 0 0 40px #54caff26,0 0 32px #368cff2b; }
.style-choice-grid button[aria-pressed="true"] { transform:translateY(-2px); box-shadow:0 10px 24px #0005,0 0 0 1px var(--lime); }

body .cl-modalContent { border:1px solid #d9b95c77!important; border-radius:24px!important; background:linear-gradient(#072d29dc,#061e1dde),url('/icons/emerald-auth-chamber.webp') center/cover!important; box-shadow:0 28px 90px #000c,0 0 55px #d9b95c22!important; }
body .cl-card { border:1px solid #d9b95c66!important; border-radius:24px!important; background:linear-gradient(145deg,#0f4b42f2,#072823f5)!important; box-shadow:0 24px 70px #0009!important; }
body .cl-headerTitle, body .cl-headerSubtitle, body .cl-formFieldLabel, body .cl-footerActionText { color:#fffef7!important; }
body .cl-formButtonPrimary { background:#f3cc5b!important; color:#0a2029!important; box-shadow:none!important; }
body .cl-formFieldInput { border-color:#ffffff24!important; background:#0a2029!important; color:#fffef7!important; }
body .cl-card { border-radius:24px!important; }
body .cl-footerAction[hidden] { display:none!important; }
.sudoku-clerk-inline-action {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:6px;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid rgba(84,227,208,.2);
  color:#d3e0de;
  font-size:.86rem;
}
.sudoku-clerk-inline-action button {
  padding:0;
  border:0;
  background:transparent;
  color:#f3cc5b;
  cursor:pointer;
  font:inherit;
  font-weight:800;
}
.sudoku-clerk-inline-action button:hover { text-decoration:underline; }

.top-actions { position:relative; }
.more-games-nudge { position:absolute; z-index:90; right:-3px; top:calc(100% + 9px); width:max-content; padding:7px 10px; border:1px solid #f3cc5b66; border-radius:10px; background:#12373eee; box-shadow:0 8px 22px #0007; color:#f7d96f; font-size:.64rem; font-weight:850; letter-spacing:.02em; text-decoration:none; animation:games-nudge-float 2.2s ease-in-out infinite; }
.more-games-nudge::before { content:""; position:absolute; right:15px; top:-5px; width:8px; height:8px; transform:rotate(45deg); border-left:1px solid #f3cc5b66; border-top:1px solid #f3cc5b66; background:#12373e; }
.site-menu[open] + .more-games-nudge { opacity:0; pointer-events:none; }
@keyframes games-nudge-float { 50% { transform:translateY(3px); box-shadow:0 5px 16px #0008; } }

.dots-catalog-icon { display:grid!important; grid-template-columns:repeat(3,1fr); gap:10px; padding:15px; }
.dots-catalog-icon i { width:7px; height:7px; align-self:center; justify-self:center; border-radius:50%; background:#ffe071; box-shadow:0 0 11px #ffe07188; }
.killer-catalog-icon,.ttt-catalog-icon,.jigsaw-catalog-icon,.iq-catalog-icon,.crossword-catalog-icon,.chess-catalog-icon{display:grid!important;overflow:hidden;border:1px solid #f3cc5b66;background:linear-gradient(145deg,#173f48,#071c24);color:#f8da6c}
.killer-catalog-icon{grid-template-columns:repeat(3,1fr);padding:7px}.killer-catalog-icon i{display:grid;place-items:center;border:1px dotted #d99a6d;font:700 .55rem Georgia,serif;font-style:normal}
.ttt-catalog-icon{grid-template-columns:repeat(2,1fr);padding:10px;gap:4px}.ttt-catalog-icon i{display:grid;place-items:center;border:1px solid #54e3d044;border-radius:5px;font:800 1rem Georgia,serif;font-style:normal}.ttt-catalog-icon i:nth-child(even){color:#65e0d2}
.iq-catalog-icon{grid-template-columns:repeat(3,1fr);padding:7px;gap:3px}.iq-catalog-icon i,.iq-catalog-icon b{display:grid;place-items:center;min-width:0;border:1px solid #54e3d035;border-radius:4px;background:#ffffff06;font:800 .58rem/1 Inter,sans-serif;font-style:normal}.iq-catalog-icon b{background:#f3cc5b;color:#09242c;font-size:.7rem}.iq-catalog-icon i:nth-child(2n){color:#65e0d2}
.crossword-catalog-icon{place-items:center;padding:4px}.crossword-catalog-icon svg{display:block;width:100%;height:100%;overflow:visible}
.chess-catalog-icon{place-items:center;font:400 3.5rem/1 "Segoe UI Symbol",serif;text-shadow:0 6px 22px #f3cc5b66}
.jigsaw-catalog-icon{grid-template-columns:repeat(2,1fr);padding:8px;gap:3px}.jigsaw-catalog-icon i{background:url('/icons/walnut-chamber-closed.webp') center/220% 220%;border-radius:5px}.jigsaw-catalog-icon i:nth-child(2){background-position:right top}.jigsaw-catalog-icon i:nth-child(3){background-position:left bottom}.jigsaw-catalog-icon i:nth-child(4){background-position:right bottom}

.dots-page { min-height:100vh; margin:0; background:radial-gradient(circle at 50% -20%,#174b4b,#071820 55%,#041218); color:#f4f4e9; font-family:Inter,ui-sans-serif,system-ui,sans-serif; }
.dots-shell { position:relative; z-index:1; width:min(1100px,calc(100% - 28px)); margin:auto; padding:24px 0 60px; }
.dots-intro { max-width:760px; margin:44px auto 28px; text-align:center; }
.dots-intro h1 { margin:8px 0; color:#fffdf3; font:400 clamp(2.8rem,8vw,5rem)/.95 Georgia,serif; }
.dots-intro p { color:#b8cecf; line-height:1.65; }
.dots-setup { width:min(780px,100%); margin:0 auto; padding:clamp(18px,4vw,34px); border:1px solid #54e3d030; border-radius:24px; background:#0d2a33e8; box-shadow:0 26px 80px #0007; }
.dots-game { width:100%; margin:0 auto; }
.dots-setup + .dots-game { margin-top:22px; }
.dots-scoreboard-top { margin:0 0 18px; padding:18px; border:1px solid #54e3d030; border-radius:24px; background:linear-gradient(145deg,#123842ee,#0a252dee); box-shadow:0 24px 70px #0007; }
.dots-scoreboard-top h2 { margin:0 0 14px; color:#fffdf3; font:400 clamp(1.55rem,3vw,2rem)/1 Georgia,serif; }
.dots-play-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:22px; align-items:start; }
.dots-board-tile,.dots-details-tile { border:1px solid #54e3d030; border-radius:24px; background:linear-gradient(145deg,#123842ee,#0a252dee); box-shadow:0 24px 70px #0007; }
.dots-board-tile { min-width:0; padding:clamp(14px,2vw,22px); }
.dots-details-tile { display:grid; gap:16px; padding:18px; }
.dots-rules { padding:16px; border:1px solid #ffffff14; border-radius:16px; background:#ffffff06; }
.dots-rules h3 { margin:0 0 7px; font:400 1.25rem Georgia,serif; }
.dots-rules p { margin:0; color:#a8bec1; font-size:.88rem; line-height:1.55; }
.dots-mode-tabs { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-bottom:22px; padding:5px; border-radius:14px; background:#061b22; }
.dots-mode-tabs button { min-height:44px; border:0; border-radius:10px; background:transparent; color:#9bb1b3; font-weight:800; }
.dots-mode-tabs button.is-active { background:#f3cc5b; color:#09232a; }
.dots-mode { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:end; }
.dots-mode label { display:grid; gap:7px; color:#b9ccce; font-size:.78rem; font-weight:750; }
.dots-mode input,.dots-mode select { min-height:48px; padding:0 14px; border:1px solid #ffffff20; border-radius:12px; background:#071b22; color:#f8f7ee; font:inherit; }
.dots-primary,.dots-secondary,.dots-share button { min-height:48px; padding:0 20px; border:0; border-radius:999px; background:#f3cc5b; color:#09232a; font-weight:850; cursor:pointer; }
.dots-secondary { border:1px solid #ffffff26; background:#ffffff0b; color:#e6f1ee; }
.dots-or { align-self:center; color:#819b9d; font-size:.72rem; text-align:center; }
.dots-message { min-height:20px; margin:14px 0 0; color:#ffd76d; font-size:.8rem; }
.dots-game-head { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.dots-game-head h2 { margin:5px 0 0; font:400 1.6rem Georgia,serif; }
.dots-share { display:flex; align-items:center; gap:10px; }
.dots-share strong { color:#ffe071; letter-spacing:.14em; }
.dots-share button { min-height:38px; padding:0 14px; }
.dots-scoreboard { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.dots-scoreboard > div { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; padding:10px; border:1px solid #ffffff14; border-radius:11px; color:#acc1c2; }
.dots-scoreboard > div.is-turn { border-color:var(--player-color); color:#fff; box-shadow:inset 0 0 18px color-mix(in srgb,var(--player-color) 15%,transparent); }
.dots-scoreboard i { width:10px; height:10px; border-radius:50%; background:var(--player-color); }
.dots-scoreboard span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dots-scoreboard strong { color:var(--player-color); }
.dots-board-wrap { overflow:hidden; border:1px solid #54e3d02f; border-radius:20px; background:radial-gradient(circle,#123d46,#071b22); box-shadow:inset 0 0 45px #0005; }
#dots-board { display:block; width:100%; height:auto; touch-action:none; cursor:crosshair; }
.dots-details-tile > .dots-secondary { width:100%; }

@media (max-width:640px) {
  .more-games-nudge { display:none; }
  .dots-mode { grid-template-columns:1fr; }
  .dots-scoreboard { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dots-game-head { align-items:flex-start; flex-direction:column; }
  .dots-share { width:100%; justify-content:space-between; }
}

@media (max-width:860px) {
  .dots-play-grid { grid-template-columns:1fr; }
}

@media (max-width:560px) {
  .site-menu-panel { width:min(245px, calc(100vw - 28px)); }
  .game-catalog-card { grid-template-columns:64px minmax(0,1fr); gap:14px; padding:18px; }
  .game-catalog-icon { width:64px; height:64px; border-radius:16px; }
  .game-catalog-action { grid-column:1/-1; justify-self:start; margin-left:78px; }
}

@media (max-width:760px) {
  .topbar .brand > span:last-child { display:block; }
  .topbar .brand strong { font-size:.72rem; }
  .topbar .brand small { font-size:.5rem; }
  .topbar .brand { min-width:88px; }
  #account-signed-in .player-name-card, #account-signed-in .account-summary { margin-top:10px; }
  #account-signed-in .account-privacy-note { white-space:normal; }
  .tutorial-popover { top:auto; bottom:14px; }
}

/* Version 38: mobile play order keeps the board, keypad and tools together. */
@media(max-width:760px){
  .control-panel{display:flex;flex-direction:column}
  .number-pad{order:1}
  .tool-grid{order:2}
  .daily-card{order:3;margin:14px 0 0}
  .control-personalise{order:4;margin-top:10px}
  .panel-heading{order:5;margin:14px 0 0}
  .coach-card{order:6}
  .restart-button{order:7}
  .keyboard-tip{order:8}
  .tool-grid #erase{order:1}
  .tool-grid #undo{order:2}
  .tool-grid #hint{order:3}
  .tool-grid #notes{order:4}
}
@media (prefers-reduced-motion: reduce) {
  .chamber-opening { display:none; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Search-friendly content keeps the playable board first and remains useful to readers. */
.homepage-seo{width:min(1040px,100%);margin:48px auto 18px;padding:clamp(22px,4vw,38px);border:1px solid #54e3d025;border-radius:24px;background:linear-gradient(145deg,#123842d9,#0a252ddd);box-shadow:0 24px 70px #0005}
.homepage-seo-intro{max-width:760px}.homepage-seo h1{margin:8px 0 12px;color:#fffdf3;font:400 clamp(2.15rem,5vw,3.5rem)/1 Georgia,serif}.homepage-seo p{color:#b8cecf;line-height:1.65}
.homepage-seo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:26px}.homepage-seo-grid article{padding:20px;border:1px solid #ffffff14;border-radius:17px;background:#ffffff06}.homepage-seo-grid h2{margin:0 0 9px;color:#f5d260;font:700 1.05rem/1.3 inherit}.homepage-seo-grid p{margin:0 0 14px;font-size:.91rem}.homepage-seo-grid a,.homepage-level-links a{color:#65e0d2;font-weight:750;text-decoration:none}.homepage-seo-grid a:hover,.homepage-level-links a:hover{text-decoration:underline}.homepage-level-links{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}.homepage-level-links a{padding:8px 11px;border:1px solid #54e3d02f;border-radius:999px;background:#071b2280;font-size:.79rem}
.seo-page .info-shell{width:min(1040px,calc(100% - 28px))}.seo-breadcrumbs{display:flex;align-items:center;gap:8px;margin:28px 0 10px;color:#91aaac;font-size:.82rem}.seo-breadcrumbs a{color:#65e0d2;text-decoration:none}.seo-landing-hero{max-width:820px;padding:52px 0 30px}.seo-landing-hero h1{margin:10px 0 16px;color:#fffdf3;font:400 clamp(2.65rem,8vw,5.2rem)/.98 Georgia,serif}.seo-landing-hero>p{max-width:730px;color:#b8cecf;font-size:clamp(1rem,2vw,1.2rem);line-height:1.7}.seo-primary-action{display:inline-flex;margin-top:18px;padding:13px 20px;border-radius:999px;background:#f3cc5b;color:#09232a;font-weight:850;text-decoration:none;box-shadow:0 10px 30px #0004}.seo-article-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.seo-article-card{padding:clamp(20px,4vw,30px);border:1px solid #54e3d025;border-radius:20px;background:linear-gradient(145deg,#123842df,#0a252de8);box-shadow:0 18px 50px #0004}.seo-article-card:first-child:last-child{grid-column:1/-1}.seo-article-card h2{margin:0 0 12px;color:#f5d260;font:400 clamp(1.45rem,3vw,2rem)/1.2 Georgia,serif}.seo-article-card p,.seo-article-card li{color:#b8cecf;line-height:1.7}.seo-article-card p:last-child{margin-bottom:0}.seo-article-card ul{margin:0;padding-left:20px}.seo-related-links{margin:34px 0;padding:25px;border:1px solid #ffffff12;border-radius:20px;background:#071b2285}.seo-related-links h2{margin:0 0 16px;color:#fffdf3;font:400 1.6rem Georgia,serif}.seo-related-links>div{display:flex;flex-wrap:wrap;gap:9px}.seo-related-links a{padding:9px 12px;border:1px solid #54e3d033;border-radius:999px;color:#65e0d2;font-size:.82rem;font-weight:750;text-decoration:none}
@media(max-width:760px){.homepage-seo{margin-top:32px}.homepage-seo-grid,.seo-article-grid{grid-template-columns:1fr}.seo-landing-hero{padding:34px 0 20px}.seo-related-links{padding:19px}}
