/* ============================================================
   THE FAMILY GAMES — vacation edition
   A warm print-shop look: cream paper, ink, sun, sea.
   ============================================================ */

:root {
  --paper: #f3ead8;
  --paper-hi: #fcf7ea;
  --paper-dim: #e9ddc6;
  --ink: #132f3f;
  --ink-2: #23495b;
  --muted: #62747b;
  --line: #d6c7ab;
  --line-strong: #132f3f;
  --sun: #ee6c3a;
  --sun-2: #f2aa5f;
  --sea: #237b8a;
  --sea-2: #8bc9cb;
  --leaf: #5c8b5b;
  --plum: #7b5a8b;
  --rose: #c9544e;
  --good: #3f7d58;
  --warn: #b98225;
  --shadow: 6px 6px 0 rgba(19, 47, 63, .14);
  --shadow-hard: 6px 6px 0 var(--ink);
  --radius: 18px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Karla", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 620px at 88% -8%, rgba(238, 108, 58, .14), transparent 62%),
    radial-gradient(900px 520px at -8% 8%, rgba(35, 123, 138, .10), transparent 58%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .14;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

::selection { background: var(--sun); color: var(--paper-hi); }

a { color: inherit; }

button, input { font: inherit; }

button { cursor: pointer; touch-action: manipulation; }

.app {
  flex: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 26px 80px;
}

/* ---------- top bar ---------- */

.topbar {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 26px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  color: var(--sun);
  flex: none;
}

.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  gap: 3px;
}

.brand-text strong {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .16em;
  font-weight: 700;
}

.brand-text span {
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--muted);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.board-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
}

.board-link:hover { border-bottom-color: var(--sun); }

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 9px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-hi);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  box-shadow: 3px 3px 0 rgba(19, 47, 63, .16);
  transition: transform .15s ease, box-shadow .15s ease;
}

.player-chip:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(19,47,63,.16); }

.player-chip #player-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
  flex: none;
}

.player-chip.is-named .player-dot { background: var(--good); }

/* ---------- shared type ---------- */

.eyebrow {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--ink-2);
  text-transform: uppercase;
}

.eyebrow .rule {
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--sun);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 900;
  letter-spacing: -.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 19px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--paper-hi);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(19, 47, 63, .16);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(19,47,63,.2); }

.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(19,47,63,.16); }

.btn-primary { background: var(--sun); color: var(--paper-hi); border-color: var(--ink); }

.btn-ghost { background: transparent; }

.btn-quiet {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--ink-2);
  padding-left: 6px;
  padding-right: 6px;
}

.btn-quiet:hover { background: rgba(19, 47, 63, .06); box-shadow: none; transform: none; }

.btn-wide { width: 100%; }

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 2px 2px 0 rgba(19,47,63,.1);
}

.btn-small { min-height: 38px; padding: 8px 14px; font-size: 10px; }

/* ---------- home hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 44px;
  align-items: end;
  padding: 54px 0 44px;
  border-bottom: 2px solid var(--ink);
}

.hero-title {
  margin: 0;
  font-size: clamp(58px, 10.4vw, 116px);
  line-height: .84;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.hero-title .title-line { display: block; }

.hero-title .title-accent {
  color: var(--sun);
  font-style: italic;
  font-weight: 700;
}

.hero-sub {
  max-width: 52ch;
  margin: 22px 0 0;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.48;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-ticket {
  position: relative;
  padding: 22px 22px 20px;
  background: var(--paper-hi);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-hard);
  transform: rotate(1.2deg);
}

.hero-ticket::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sun-2);
  border: 2px solid var(--ink);
}

.ticket-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  margin-bottom: 16px;
}

.ticket-name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 900;
  line-height: .95;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.ticket-stat strong { font-family: var(--mono); font-size: 26px; }

.ticket-stat span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
}

.ticket-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- games grid ---------- */

.games-section { padding: 46px 0 10px; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head h1, .section-head h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 50px);
  line-height: .95;
}

.section-head .eyebrow { margin-bottom: 8px; }

.section-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 3px;
}

.section-link:hover { color: var(--sun); border-color: var(--sun); }

.games-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-hi);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

.game-card:hover { transform: translate(-2px, -2px) rotate(-.2deg); box-shadow: 9px 9px 0 rgba(19,47,63,.16); }

.game-card:nth-child(1) { grid-column: span 7; background: #fff7e4; }
.game-card:nth-child(2) { grid-column: span 5; background: #edf6f2; }
.game-card:nth-child(3) { grid-column: span 5; background: #f4f7e9; }
.game-card:nth-child(4) { grid-column: span 7; background: #07222e; color: #eef7f2; border-color: #061923; }

.game-card:nth-child(4) .card-num,
.game-card:nth-child(4) .card-status,
.game-card:nth-child(4) .card-foot { color: #a9c6c4; border-color: rgba(238,247,242,.22); }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.card-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

.card-status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  padding: 5px 8px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  color: var(--ink-2);
  white-space: nowrap;
}

.card-status.is-played { color: var(--good); }

.game-card h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 54px);
  line-height: .9;
}

.card-tagline {
  max-width: 30ch;
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-2);
}

.game-card:nth-child(4) .card-tagline { color: #b9d3d0; }

.card-art {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 18px 0 8px;
  min-height: 92px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.card-foot .arrow {
  font-family: var(--mono);
  font-size: 18px;
  color: currentColor;
  transition: transform .18s ease;
}

.game-card:hover .arrow { transform: translateX(4px); }

/* card art pieces */

.mini-wordal { display: flex; gap: 6px; }

.mini-wordal span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  background: var(--paper-hi);
}

.mini-wordal span:nth-child(1) { background: var(--good); color: white; border-color: var(--good); }
.mini-wordal span:nth-child(2) { background: var(--warn); color: white; border-color: var(--warn); }
.mini-wordal span:nth-child(3) { background: #596770; color: white; border-color: #596770; }
.mini-wordal span:nth-child(4) { background: var(--good); color: white; border-color: var(--good); }
.mini-wordal span:nth-child(5) { background: transparent; }

.mini-connections {
  display: grid;
  grid-template-columns: repeat(4, 26px);
  gap: 5px;
}

.mini-connections span {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--paper-hi);
}

.mini-connections span:nth-child(1), .mini-connections span:nth-child(6), .mini-connections span:nth-child(11) { background: #f2c14e; }
.mini-connections span:nth-child(2), .mini-connections span:nth-child(7), .mini-connections span:nth-child(12) { background: var(--sea-2); }
.mini-connections span:nth-child(3), .mini-connections span:nth-child(8), .mini-connections span:nth-child(13) { background: #a8c89a; }
.mini-connections span:nth-child(4), .mini-connections span:nth-child(9), .mini-connections span:nth-child(14) { background: #c9b3d6; }

.mini-crossword {
  display: grid;
  grid-template-columns: repeat(6, 24px);
  gap: 2px;
  padding: 4px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
}

.mini-crossword span { width: 24px; height: 24px; background: var(--paper-hi); }
.mini-crossword span.b { background: var(--ink); }
.mini-crossword span.n { background: var(--sun-2); }

.mini-dive {
  position: relative;
  width: 100%;
  height: 70px;
  border: 1.5px solid rgba(238,247,242,.35);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d4557 0%, #07222e 55%, #02090d 100%);
}

.mini-dive::before, .mini-dive::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(139,201,203,.25);
}

.mini-dive::before { top: 28%; }
.mini-dive::after { top: 62%; }

.mini-dive .krill {
  position: absolute;
  left: 18%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 18px rgba(238,108,58,.8);
  transform: translateY(-50%);
}

.mini-dive .depth-mark {
  position: absolute;
  right: 10px;
  bottom: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: #8bc9cb;
}

/* ---------- board preview ---------- */

.board-section { margin-top: 54px; }

.board-panel {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-hi);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.board-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 2px solid var(--ink);
  background: #f8f0df;
}

.board-panel-head h2 { margin: 0; font-size: 26px; }

.board-panel-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.lb-table th {
  padding: 10px 14px;
  text-align: left;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.lb-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.lb-table tr:last-child td { border-bottom: 0; }

.lb-table .rank {
  width: 54px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.lb-table .player-cell { font-weight: 700; }

.lb-table .points-cell {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  text-align: right;
}

.lb-table .meta-cell { color: var(--muted); font-size: 12px; text-align: right; }

.lb-table tr.is-me td { background: rgba(238, 108, 58, .12); }

.lb-table tr.lb-empty td {
  padding: 36px 22px;
  text-align: center;
  color: var(--muted);
}

.podium-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.podium-name .crown {
  width: 18px;
  height: 18px;
  color: var(--sun);
}

.board-preview-foot {
  padding: 14px 22px;
  border-top: 2px solid var(--ink);
  background: #f8f0df;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- game page shell ---------- */

.game-page { padding-top: 28px; }

.game-head {
  padding-bottom: 26px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 30px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-decoration: none;
  color: var(--muted);
  margin-bottom: 22px;
}

.back-link:hover { color: var(--ink); }

.game-head h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 86px);
  line-height: .86;
}

.game-tagline {
  max-width: 58ch;
  margin: 14px 0 0;
  font-size: 17px;
  color: var(--ink-2);
}

.game-head-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.game-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 7px 11px;
  white-space: nowrap;
  color: var(--muted);
}

.game-badge.is-played { color: var(--good); }

/* ---------- wordal ---------- */

.wordal-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.wordal-mode {
  flex: 0 1 190px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: 3px 3px 0 rgba(19, 47, 63, .12);
  transition: background .14s ease, color .14s ease;
}

.wordal-mode strong {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.wordal-mode span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--muted);
}

.wordal-mode:hover { background: #fff3d9; }
.wordal-mode.is-active { background: var(--ink); color: var(--paper-hi); }
.wordal-mode.is-active span { color: var(--sea-2); }

.wordal-layout {
  display: grid;
  grid-template-columns: minmax(0, 410px) minmax(260px, 1fr);
  gap: 46px;
  align-items: start;
}

.wordal-board-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.wordal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 370px;
}

.tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--paper-hi);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(23px, 4.4vw, 31px);
  font-weight: 700;
  text-transform: uppercase;
  user-select: none;
  transition: border-color .12s ease, background .12s ease;
}

.tile.is-filled { border-color: var(--ink); animation: tile-pop .12s ease; }

.tile[data-state="correct"] { background: var(--good); border-color: var(--good); color: white; }
.tile[data-state="present"] { background: var(--warn); border-color: var(--warn); color: white; }
.tile[data-state="absent"] { background: #596770; border-color: #596770; color: white; }
.tile.shake { animation: shake .4s ease; }

.wordal-keyboard { display: flex; flex-direction: column; gap: 7px; width: 100%; max-width: 480px; }

.key-row { display: flex; justify-content: center; gap: 6px; }

.key {
  flex: 1;
  min-width: 27px;
  height: 46px;
  padding: 0 4px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #fffaf0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 0 rgba(19,47,63,.2);
  transition: transform .08s ease, background .12s ease, color .12s ease;
}

.key:hover { background: #fff3d9; }
.key:active { transform: translateY(2px); box-shadow: none; }
.key.wide { flex: 1.55; font-size: 10px; letter-spacing: .05em; }
.key[data-state="correct"] { background: var(--good); border-color: var(--good); color: white; }
.key[data-state="present"] { background: var(--warn); border-color: var(--warn); color: white; }
.key[data-state="absent"] { background: #596770; border-color: #596770; color: white; }

.wordal-side { padding-top: 4px; }

.side-title {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
}

.side-copy {
  margin: 0 0 22px;
  font-size: 15px;
  color: var(--ink-2);
}

.result-card {
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper-hi);
  box-shadow: var(--shadow);
}

.result-card h2 { margin: 0 0 6px; font-size: 30px; line-height: .95; }

.result-card p { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }

.result-metric {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 14px 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.result-metric strong { font-family: var(--mono); font-size: 36px; line-height: 1; }
.result-metric span { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--muted); }

.result-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }

.save-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.save-note.is-good { color: var(--good); }
.save-note.is-bad { color: var(--rose); }

.legend {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.legend span { display: flex; align-items: center; gap: 8px; }

.legend i {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  display: inline-block;
  border: 1px solid rgba(19,47,63,.2);
}

.legend i[data-demo="correct"] { background: var(--good); }
.legend i[data-demo="present"] { background: var(--warn); }
.legend i[data-demo="absent"] { background: #596770; }

.side-heading {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: .95;
}

.conn-solved-banner span { display: block; }
.conn-solved-banner small {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  opacity: .72;
}

.conn-solved-banner[data-missed="1"] {
  background: var(--paper-dim);
  opacity: .78;
}

.dive .save-note { color: #b9d3d0; }
.dive .save-note.is-good { color: #8bc9cb; }
.dive .save-note.is-bad { color: #f0a49e; }
.dive .result-actions .btn-ghost { color: #eef7f2; border-color: #8bc9cb; }
.dive .result-card { background: rgba(6,25,35,.72); border-color: #8bc9cb; color: #eef7f2; }
.dive .result-card p { color: #b9d3d0; }
.dive .result-card h2 { color: #f7efe1; }
.dive .result-card .result-metric { border-top-color: rgba(139,201,203,.25); }
.dive .result-card .result-metric strong { color: var(--sun-2); }
.dive .result-card .save-note { color: #b9d3d0; }

/* ---------- connections ---------- */

.connections-shell { max-width: 720px; margin: 0 auto; }

.conn-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.mistakes { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); }

.mistake-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent;
}

.mistake-dot.lost { background: var(--rose); border-color: var(--rose); }

.conn-msg {
  min-height: 22px;
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
  text-align: center;
}

.conn-msg.is-good { color: var(--good); }
.conn-msg.is-bad { color: var(--rose); }

.conn-solved { display: grid; gap: 7px; margin-bottom: 8px; }

.conn-solved-banner {
  padding: 11px 14px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink);
  animation: banner-in .3s ease both;
}

.conn-solved-banner[data-color="amber"] { background: #f2c14e; }
.conn-solved-banner[data-color="sea"] { background: var(--sea-2); }
.conn-solved-banner[data-color="leaf"] { background: #a8c89a; }
.conn-solved-banner[data-color="plum"] { background: #c9b3d6; }

.conn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 18px;
}

.conn-tile {
  min-height: 84px;
  padding: 8px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--paper-hi);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(11px, 1.65vw, 15px);
  font-weight: 700;
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .02em;
  transition: transform .1s ease, background .1s ease, color .1s ease;
  word-break: break-word;
}

.conn-tile:hover { background: #fff3d9; }
.conn-tile.is-selected { background: var(--ink); color: var(--paper-hi); transform: translateY(-2px); }
.conn-tile.is-solved { opacity: .2; pointer-events: none; }
.conn-grid.shake { animation: shake .4s ease; }

.conn-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.conn-counter {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
  min-width: 112px;
  text-align: center;
}

/* ---------- crossword ---------- */

.xw-shell { max-width: 760px; margin: 0 auto; }

.xw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.xw-timer {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
}

.xw-timer span { font-size: 9px; color: var(--muted); letter-spacing: .12em; }

.xw-tools { display: flex; gap: 7px; flex-wrap: wrap; }

.xw-clue-bar {
  position: sticky;
  top: 8px;
  z-index: 8;
  box-shadow: 0 3px 0 rgba(19,47,63,.12);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper-hi);
  margin-bottom: 12px;
}

.xw-clue-bar .clue-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--sun-2);
  white-space: nowrap;
}

.xw-clue-bar .clue-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.3;
}

.clue-nav {
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(252,247,234,.4);
  border-radius: 6px;
  background: transparent;
  color: var(--paper-hi);
  font-family: var(--mono);
  font-size: 14px;
  flex: none;
}

.clue-nav:hover { background: rgba(252,247,234,.12); }

.xw-grid-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.xw-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  width: 100%;
  max-width: calc(var(--cols) * 40px);
  border: 2px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow);
  user-select: none;
}

.xw-cell {
  position: relative;
  aspect-ratio: 1;
  background: var(--paper-hi);
  border-right: 1px solid rgba(19,47,63,.28);
  border-bottom: 1px solid rgba(19,47,63,.28);
}

.xw-cell.is-block { background: var(--ink); border: 0; }

.xw-cell .cell-num {
  position: absolute;
  top: 1px;
  left: 2px;
  font-family: var(--mono);
  font-size: clamp(6px, 1.1vw, 9px);
  line-height: 1;
  color: var(--muted);
  pointer-events: none;
  z-index: 2;
}

.xw-cell input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(11px, 2.1vw, 20px);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  padding: 12% 0 0;
  caret-color: transparent;
  outline: none;
}

.xw-cell.is-in-word { background: #e7f1ec; }
.xw-cell.is-active { background: #ffe7a8; }
.xw-cell.is-wrong { background: #f3b3ac; }
.xw-cell.is-revealed input { color: var(--sea); }
.xw-cell.is-correct input { color: var(--ink); }

.xw-clues {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding-top: 8px;
}

.xw-clue-col h3 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  font-weight: 700;
}

.xw-clue-list { list-style: none; margin: 0; padding: 0; }

.xw-clue-list li { border-bottom: 1px dotted var(--line); }

.xw-clue {
  width: 100%;
  display: flex;
  gap: 8px;
  padding: 7px 3px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  line-height: 1.3;
  border-radius: 4px;
}

.xw-clue:hover { background: rgba(238,108,58,.09); }
.xw-clue.is-active { background: #ffe7a8; }

.xw-clue .n {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  min-width: 18px;
  padding-top: 2px;
}

/* ---------- krillion ---------- */

.game-page--krillion .game-head { border-bottom-color: var(--ink); }
.game-page--krillion .game-head h1 { color: var(--ink); }
.game-page--krillion .game-tagline { color: var(--ink-2); }
.game-page--krillion .back-link { color: var(--muted); }
.game-page--krillion .game-badge { color: var(--muted); border-color: currentColor; }

.dive {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 2px solid #061923;
  border-radius: var(--radius);
  background:
    radial-gradient(900px 300px at 30% -10%, rgba(139,201,203,.18), transparent 65%),
    linear-gradient(180deg, #08384a 0%, #062531 42%, #041219 100%);
  color: #eef7f2;
  box-shadow: 8px 8px 0 rgba(19,47,63,.22);
}

.dive::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, transparent 0 39px, rgba(139,201,203,.09) 39px 40px);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 85%);
}

.dive > * { position: relative; }

.dive-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.dive-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: #8bc9cb;
}

.dive-title {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 58px);
  line-height: .88;
  color: #f7efe1;
}

.dive-rules {
  max-width: 42ch;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #b9d3d0;
}

.dive-score {
  text-align: right;
  flex: none;
}

.dive-score strong {
  display: block;
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
  color: var(--sun-2);
}

.dive-score span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: #8bc9cb;
}

.dive-progress {
  display: flex;
  gap: 5px;
  margin-bottom: 26px;
}

.dive-progress i {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: rgba(139,201,203,.22);
}

.dive-progress i.done { background: var(--sea-2); }
.dive-progress i.now { background: var(--sun); }

.dive-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 30px;
  align-items: stretch;
  min-height: 300px;
}

.dive-main { display: flex; flex-direction: column; justify-content: center; }

.dive-prompt-label {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: #8bc9cb;
}

.dive-prompt {
  margin: 0;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.02;
  color: #f7efe1;
  text-wrap: balance;
}

.dive-form {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  align-items: stretch;
}

.dive-input {
  flex: 1;
  min-width: 0;
  padding: 10px 2px;
  border: 0;
  border-bottom: 2px solid #8bc9cb;
  border-radius: 0;
  background: transparent;
  color: #f7efe1;
  font-family: var(--sans);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  text-transform: uppercase;
  outline: none;
}

.dive-input::placeholder { color: rgba(185,211,208,.4); font-weight: 400; }
.dive-input:focus { border-bottom-color: var(--sun); }

.dive-submit {
  flex: none;
  min-width: 88px;
  border: 2px solid #8bc9cb;
  border-radius: 9px;
  background: transparent;
  color: #eef7f2;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 0 14px;
}

.dive-submit:hover { background: rgba(139,201,203,.14); }

.dive-timer-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.timer-ring {
  --p: 100;
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--sun) calc(var(--p) * 1%), rgba(139,201,203,.2) 0);
}

.timer-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #07222e;
}

.timer-ring b {
  position: relative;
  font-family: var(--mono);
  font-size: 16px;
  color: #f7efe1;
}

.timer-caption {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: #8bc9cb;
  line-height: 1.5;
}

.dive-gauge {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.gauge-track {
  position: relative;
  width: 8px;
  flex: none;
  border-radius: 99px;
  background: linear-gradient(180deg, #8bc9cb 0%, #237b8a 28%, #0b3a4a 55%, #02090d 100%);
  opacity: .9;
}

.gauge-marker {
  position: absolute;
  left: 50%;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sun);
  border: 2px solid #f7efe1;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px rgba(238,108,58,.55);
  transition: top .5s ease;
}

.gauge-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
  color: rgba(139,201,203,.7);
  padding: 2px 0;
}

.gauge-labels b { display: block; color: #eef7f2; font-size: 10px; }

.dive-verdict {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1.5px solid rgba(139,201,203,.4);
  border-radius: 10px;
  background: rgba(139,201,203,.08);
  animation: banner-in .25s ease both;
}

.dive-verdict .v-answer {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: #f7efe1;
}

.dive-verdict .v-points {
  margin: 5px 0 0;
  font-size: 13px;
  color: #b9d3d0;
}

.dive-verdict .v-points strong { color: var(--sun-2); font-family: var(--mono); font-size: 22px; }

.dive-intro-actions { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

.dive .btn-ghost { color: #eef7f2; border-color: #8bc9cb; box-shadow: 3px 3px 0 rgba(0,0,0,.3); }
.dive .btn-primary { color: #132f3f; background: var(--sun-2); }

.dive-result-list {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.dive-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid rgba(139,201,203,.18);
  font-size: 13px;
}

.dive-result-row .q { color: #b9d3d0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dive-result-row .a { color: #f7efe1; font-weight: 700; }
.dive-result-row .p { font-family: var(--mono); color: var(--sun-2); font-size: 12px; }

.dive-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1.5px solid rgba(139,201,203,.3);
}

.dive-total strong { font-family: var(--mono); font-size: clamp(40px, 7vw, 64px); line-height: 1; color: var(--sun-2); }
.dive-total span { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: #8bc9cb; }

.dive-mini-depth { display: none; }

/* ---------- leaderboard page ---------- */

.board-page { padding-top: 28px; }

.board-page-head { margin-bottom: 26px; }

.board-page-head h1 { margin: 0; font-size: clamp(48px, 8vw, 84px); line-height: .86; }

.board-page-head p { max-width: 58ch; margin: 12px 0 0; color: var(--ink-2); }

.board-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin: 22px 0; }

.board-tab {
  padding: 9px 13px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.board-tab:hover { background: rgba(19,47,63,.06); }
.board-tab.is-active { background: var(--ink); color: var(--paper-hi); }

.board-table-wrap {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-hi);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.board-table-wrap .lb-table th { background: #f8f0df; }

.board-table-wrap .lb-table td { padding-top: 15px; padding-bottom: 15px; }

.game-result {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.game-result-sub { display: block; font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 2px; }

.points-note {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: rgba(252,247,234,.5);
  font-size: 13px;
  color: var(--ink-2);
}

.points-note strong { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; }

.points-note p { margin: 7px 0 0; }

/* ---------- footer ---------- */

.footer {
  border-top: 2px solid var(--ink);
  margin-top: auto;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 26px 30px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-2);
}

.footer p span { color: var(--sun); }

.footer-small { color: var(--muted) !important; letter-spacing: .04em !important; font-family: var(--sans) !important; font-size: 11px !important; }

/* ---------- dialog ---------- */

.name-dialog {
  width: min(92vw, 450px);
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-hi);
  color: var(--ink);
  box-shadow: 10px 10px 0 rgba(19,47,63,.25);
}

.name-dialog::backdrop {
  background: rgba(19,47,63,.55);
  backdrop-filter: blur(3px);
}

.name-dialog form { padding: 28px; }

.name-dialog h2 {
  margin: 0;
  font-size: 36px;
  line-height: .95;
}

.dialog-copy {
  margin: 12px 0 22px;
  font-size: 14px;
  color: var(--ink-2);
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--muted);
}

#name-input {
  width: 100%;
  padding: 8px 2px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  outline: none;
}

#name-input::placeholder { color: #b9ad97; }
#name-input:focus { border-bottom-color: var(--sun); }

.form-error {
  min-height: 18px;
  margin: 8px 0 14px;
  font-size: 12px;
  color: var(--rose);
}

.dialog-hint {
  margin: 13px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10000;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-hi);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  max-width: 90vw;
  text-align: center;
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.noscript {
  max-width: 640px;
  margin: 40px auto;
  padding: 20px;
  border: 2px solid var(--ink);
  background: var(--paper-hi);
  font-family: var(--sans);
}

/* ---------- skeleton / loading ---------- */

.loading {
  display: grid;
  place-items: center;
  min-height: 50vh;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}

.error-box {
  max-width: 560px;
  margin: 60px auto;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-hi);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-box h2 { margin: 0 0 8px; font-size: 30px; }
.error-box p { margin: 0 0 16px; color: var(--ink-2); }

/* ---------- misc ---------- */

.rule-dash { border: 0; border-top: 1px dashed var(--line); margin: 22px 0; }

.stack-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes tile-pop {
  from { transform: scale(.96); }
  to { transform: scale(1); }
}

@keyframes banner-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 34px; }
  .hero-ticket { max-width: 320px; transform: rotate(.6deg); }
  .wordal-layout { grid-template-columns: 1fr; gap: 30px; }
  .wordal-board-wrap { max-width: 430px; margin: 0 auto; }
  .wordal-side { max-width: 480px; margin: 0 auto; width: 100%; }
  .dive-stage { grid-template-columns: minmax(0, 1fr) 100px; gap: 20px; }
}

@media (max-width: 760px) {
  .app { padding-left: 18px; padding-right: 18px; padding-bottom: 60px; }
  .topbar { padding-left: 18px; padding-right: 18px; }
  .brand-text strong { font-size: 11px; }
  .brand-text span { font-size: 8px; }
  .board-link { display: none; }
  .hero { padding-bottom: 34px; }
  .hero-title { font-size: clamp(54px, 15vw, 84px); }
  .games-grid { grid-template-columns: 1fr; }
  .game-card, .game-card:nth-child(1), .game-card:nth-child(2), .game-card:nth-child(3), .game-card:nth-child(4) { grid-column: auto; }
  .game-card { min-height: 290px; }
  .section-head { align-items: start; flex-direction: column; gap: 10px; }
  .board-panel-head { align-items: start; flex-direction: column; gap: 10px; }
  .lb-table th, .lb-table td { padding-left: 11px; padding-right: 11px; }
  .lb-table .meta-cell { display: none; }
  .lb-table th:last-child { display: none; }
  .game-head-row { align-items: start; flex-direction: column; gap: 12px; }
  .connections-shell { max-width: 100%; }
  .conn-tile { min-height: 68px; font-size: 10px; padding: 5px; }
  .xw-clues { grid-template-columns: 1fr; gap: 20px; }
  .xw-clue-bar { padding: 8px 10px; }
  .xw-clue-bar .clue-text { font-size: 13px; }
  .dive { padding: 18px; }
  .dive-stage { grid-template-columns: 1fr; }
  .dive-gauge { display: none; }
  .dive-mini-depth {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .1em;
    color: #8bc9cb;
  }
  .dive-mini-depth .bar { flex: 1; height: 5px; border-radius: 99px; background: rgba(139,201,203,.2); overflow: hidden; }
  .dive-mini-depth .bar i { display: block; height: 100%; background: var(--sun); }
  .dive-result-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dive-result-row .q { grid-column: 1 / -1; white-space: normal; }
  .dive-form { flex-direction: column; }
  .dive-submit { min-height: 44px; }
  .footer-inner { flex-direction: column; gap: 8px; }
}

@media (max-width: 430px) {
  .topbar { padding-top: 14px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-text strong { font-size: 10px; letter-spacing: .1em; }
  .brand-text span { letter-spacing: .14em; }
  .player-chip { padding: 8px 10px; font-size: 9px; max-width: 150px; }
  .hero-title { font-size: clamp(48px, 14.5vw, 70px); }
  .mini-wordal span { width: 32px; height: 32px; font-size: 15px; }
  .mini-connections { grid-template-columns: repeat(4, 22px); }
  .mini-connections span { width: 22px; height: 22px; }
  .mini-crossword { grid-template-columns: repeat(6, 20px); }
  .mini-crossword span { width: 20px; height: 20px; }
  .wordal-grid { gap: 6px; }
  .key { height: 42px; min-width: 23px; font-size: 10px; }
  .conn-actions { gap: 7px; }
  .conn-counter { order: -1; width: 100%; }
  .xw-grid { max-width: 100%; }
  .xw-cell .cell-num { font-size: 6px; }
  .xw-cell input { font-size: 16px; padding-top: 15%; }
  .xw-toolbar { align-items: flex-start; }
  .xw-tools .btn { padding: 7px 9px; font-size: 9px; min-height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
