:root {
  color-scheme: light;
  --paper: #fbf3e7;
  --paper-modal-dim: #c8c0b6;
  --paper-score-dim: #3f3b36;
  --score-overlay: rgba(13, 38, 45, 0.24);
  --score-page-tint: #aab7bb;
  --pause-tint: rgba(251, 243, 231, 0.68);
  --paper-2: #efe1ca;
  --ink: #102b31;
  --muted: #786d5c;
  --line: rgba(75, 54, 35, 0.18);
  --teal: #0d5b63;
  --teal-2: #08727b;
  --deep-teal: #073e46;
  --river-blue: #167fa8;
  --river-blue-dark: #0d6386;
  --brass: #b98234;
  --brass-2: #e6bb70;
  --stone: #d9c9ad;
  --rose: #a34e4d;
  --green: #437659;
  --shadow: 0 22px 60px rgba(47, 31, 17, 0.2);
  --tile-shadow: 0 10px 22px rgba(47, 31, 17, 0.12);
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --app-height: 100vh;
  --app-height: 100svh;
  --visible-height: 100vh;
  --visible-height: 100svh;
  --app-width: 100vw;
  --visible-width: 100vw;
  --computed-desktop-scale: 1;
  --desktop-scale: var(--computed-desktop-scale);
  --display-face: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --copy-face: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ui-face: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fbf3e7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: var(--app-height);
  min-height: 0;
  overflow: hidden;
  font-family: var(--display-face);
  color: var(--ink);
  background: #fbf3e7;
}

html {
  background-color: #fbf3e7;
}

body {
  background-color: #fbf3e7;
}

html.has-modal,
body.has-modal,
html.has-score-modal,
body.has-score-modal {
  background-color: var(--paper-modal-dim);
}

html.has-score-modal,
body.has-score-modal {
  background-color: var(--score-page-tint);
}

body::before {
  content: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.phone-shell {
  width: min(100%, var(--app-width));
  height: var(--app-height);
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: start center;
  padding: max(4px, env(safe-area-inset-top)) 0 max(6px, env(safe-area-inset-bottom));
  background: #fbf3e7;
  touch-action: manipulation;
}

body.has-modal .phone-shell,
body.has-score-modal .phone-shell {
  background: var(--paper-modal-dim);
}

body.has-score-modal .phone-shell {
  background: var(--score-page-tint);
}

body.has-score-modal .topbar,
body.has-score-modal .progress-row,
body.has-score-modal .board-wrap,
body.has-score-modal .answer-dock {
  filter: brightness(0.48) saturate(0.45);
  opacity: 0.72;
}

.game-card {
  --clue-row-size: clamp(48px, 6.4svh, 55px);
  width: min(100%, 460px);
  height: 100%;
  min-height: 0;
  max-height: 900px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 6px;
  padding: 12px 10px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.game-card::before {
  content: none;
}

.topbar,
.progress-row,
.answer-dock,
.board-wrap {
  min-width: 0;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.progress-row,
.board-wrap {
  transition: filter 420ms var(--ease), opacity 420ms var(--ease);
}

body.has-pause-modal .progress-row,
body.has-pause-modal .board-wrap {
  filter: blur(10px) saturate(0.45);
  opacity: 0.58;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  min-height: 66px;
  padding: 0 58px;
  margin-bottom: 7px;
}

.brand-lockup {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0;
  transform: translateY(-3px);
}

.brand-mark {
  width: 68px;
  height: 21px;
  margin-bottom: -4px;
  color: var(--brass);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.date-label {
  margin: 0;
  font-family: var(--ui-face);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--brass);
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(23px, 6.3vw, 33px);
  line-height: 0.86;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.icon-button {
  position: absolute;
  top: -1px;
  right: 3px;
  width: 42px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  color: var(--river-blue);
  background: transparent;
  box-shadow: none;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease);
}

.topbar .ghost-button {
  top: -6px;
  right: auto;
  left: 3px;
}

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

.icon-button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(13, 122, 131, 0.14);
}

.icon-button:active {
  transform: scale(0.94);
}

.icon-button::after {
  content: attr(data-label);
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  color: var(--river-blue);
  font-family: var(--ui-face);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  transform: translateX(-50%);
  pointer-events: none;
}

.ghost-button {
  opacity: 0.96;
}

.game-timer {
  position: absolute;
  top: -1px;
  right: 3px;
  min-width: 54px;
  display: grid;
  justify-items: center;
  color: var(--river-blue);
  font-family: var(--ui-face);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  pointer-events: auto;
}

.timer-digits {
  min-width: 44px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  color: var(--river-blue);
  font-size: 14px;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.pause-button {
  margin: 2px 0 0;
  padding: 0;
  width: 100%;
  border: 0;
  color: currentColor;
  background: transparent;
  font-family: var(--ui-face);
  font-size: clamp(10.5px, 2.8vw, 13px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.pause-button:disabled {
  cursor: default;
  opacity: 0.44;
}

.pause-button:focus-visible {
  outline: 2px solid rgba(13, 122, 131, 0.36);
  outline-offset: 3px;
}

.timer-char {
  width: 0.62em;
  height: 1.05em;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

.timer-char.is-colon {
  width: 0.3em;
  overflow: visible;
}

.timer-roll {
  display: grid;
  grid-template-rows: 1.05em 1.05em;
  animation: timerDigitRoll 380ms cubic-bezier(.2, .84, .18, 1) forwards;
}

.progress-row {
  --keystone-box-h: 38px;
  min-width: 0;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 78px;
  gap: 6px;
  align-items: end;
  min-height: calc(var(--keystone-box-h) + 12px);
  padding: 0 7px 0 10px;
  margin-top: -3px;
  margin-bottom: 18px;
}

.primary-button:active,
.hint-button:active,
.clue-card:active {
  transform: scale(0.97);
}

.progress-copy {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  justify-items: start;
  justify-self: end;
  align-content: end;
  align-self: end;
  gap: 1px;
  height: var(--keystone-box-h);
  min-width: 44px;
  padding-left: 0;
  padding-right: 4px;
  font-family: var(--ui-face);
  font-weight: 900;
  white-space: nowrap;
}

.progress-score {
  display: flex;
  align-items: baseline;
  line-height: 1;
}

#solvedCount {
  font-size: 20px;
  line-height: 1;
}

.progress-total {
  color: var(--muted);
  font-size: 12px;
}

.progress-label {
  margin-top: 0;
  color: rgba(120, 109, 92, 0.78);
  font-size: 10px;
  line-height: 1.02;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.keystone-wrap {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.keystone-label {
  color: rgba(120, 109, 92, 0.78);
  font-family: var(--ui-face);
  font-size: 8.4px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.keystone {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.keystone-letter {
  width: calc(var(--keystone-box-h) * 0.86);
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid rgba(92, 69, 41, 0.25);
  background: rgba(255, 251, 244, 0.68);
  color: rgba(25, 33, 42, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 1px 0 rgba(75, 54, 35, 0.05);
  font-family: var(--ui-face);
  font-size: 17px;
  font-weight: 900;
}

.keystone-letter.is-revealed {
  color: #fff5df;
  background: var(--brass);
  box-shadow: 0 8px 18px rgba(183, 120, 44, 0.26);
  animation: popIn 340ms var(--ease);
}

.keystone-letter.is-hinted {
  color: var(--river-blue);
  border-color: rgba(22, 127, 168, 0.44);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 5px 12px rgba(22, 127, 168, 0.14);
  animation: popIn 280ms var(--ease);
}

.keystone-letter.is-newly-revealed {
  position: relative;
  z-index: 2;
  transform-origin: center;
  will-change: transform;
}

.progress-spacer {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: var(--keystone-box-h);
  align-self: end;
  justify-self: start;
}

.board-wrap {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(74px, 22vw, 94px) minmax(0, 1fr);
  gap: 0;
  padding: 0 4px 2px;
  margin-bottom: 30px;
}

.bank-panel {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 5px;
  padding: 4px 8px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bank-panel-left {
  margin-right: -2px;
}

.bank-panel-right {
  margin-left: -2px;
}

.bank-panel::before,
.bank-panel::after {
  content: none;
}

.bank-panel::before {
  left: 4px;
}

.bank-panel::after {
  right: 4px;
}

.bank-heading {
  min-height: 22px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: var(--ui-face);
  font-size: 10.4px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bank-heading span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 0;
  background: transparent;
  line-height: 1.1;
  white-space: nowrap;
}

.bank-heading span::before,
.bank-heading span::after {
  content: "";
  width: 8px;
  height: 2px;
  flex: 0 0 8px;
  border-radius: 1px;
  background: rgba(185, 130, 52, 0.72);
  opacity: 0.82;
}

.bridge-heading {
  display: none;
}

.bank {
  display: grid;
  grid-template-rows: repeat(5, minmax(48px, 55px));
  gap: 5px;
  min-width: 0;
}

.clue-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 2px;
  border: 1px solid rgba(101, 73, 43, 0.18);
  border-radius: 10px;
  padding: 6px 12px 6px 7px;
  color: var(--ink);
  background: #fffaf0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 -1px 0 rgba(134, 92, 48, 0.06) inset,
    0 9px 18px rgba(47, 31, 17, 0.09);
  text-align: center;
  font-size: clamp(10.5px, 2.8vw, 13.2px);
  line-height: 1.08;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), opacity 220ms var(--ease);
}

.clue-card:disabled {
  opacity: 1;
}

.clue-text {
  min-width: 0;
  text-wrap: pretty;
}

.clue-card::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  pointer-events: none;
}

.bank-left .clue-card::before,
.bank-right .clue-card::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 13px;
  height: 3px;
  border-radius: 1px;
  background: rgba(185, 130, 52, 0.72);
  box-shadow: 0 0 8px rgba(230, 187, 112, 0.3);
  pointer-events: none;
  transform: translateY(-50%);
}

.bank-left .clue-card::before {
  right: -13px;
}

.bank-right .clue-card::before {
  left: -13px;
}

.clue-card.is-row-selected {
  border-color: rgba(185, 130, 52, 0.48);
  box-shadow:
    0 0 0 2px rgba(185, 130, 52, 0.13),
    0 12px 22px rgba(47, 31, 17, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.clue-card.is-dragging {
  z-index: 12;
  cursor: grabbing;
  border-color: rgba(185, 130, 52, 0.58);
  background: #fffdf8;
  box-shadow: 0 24px 38px rgba(47, 31, 17, 0.26), 0 0 0 4px rgba(230, 187, 112, 0.2);
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease), background 120ms var(--ease), opacity 120ms var(--ease);
  animation: cardLift 360ms var(--ease) both;
  will-change: transform;
}

.clue-card.is-preview-shift {
  transition: transform 170ms cubic-bezier(.16, .78, .22, 1), border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 -1px 0 rgba(134, 92, 48, 0.06) inset,
    0 12px 21px rgba(47, 31, 17, 0.12);
  animation: previewSway 260ms var(--ease);
}

.clue-card.is-settling {
  animation: cardSettle 340ms cubic-bezier(.16, .78, .22, 1);
}

.clue-card.is-hint-moving {
  z-index: 12;
}

.clue-card.is-hint-target {
  z-index: 16;
  border-color: rgba(185, 130, 52, 0.54);
  background: #fffdf5;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.84) inset,
    0 0 0 2px rgba(230, 187, 112, 0.22),
    0 13px 24px rgba(47, 31, 17, 0.15);
}

.clue-card.is-hint-locked {
  animation: hintClueLock 460ms cubic-bezier(.16, .78, .22, 1);
}

.clue-card.is-solved {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 7px 8px;
  color: var(--ink);
  border-color: rgba(98, 76, 48, 0.24);
  background: #f4ead6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(116, 80, 39, 0.1),
    0 7px 15px rgba(47, 31, 17, 0.1);
  filter: none;
  cursor: default;
  touch-action: auto;
}

.clue-card.is-solved .clue-text {
  font-size: clamp(11px, 3vw, 14px);
  font-weight: 700;
  line-height: 1.08;
}

.bank-left .clue-card.is-solved::before,
.bank-right .clue-card.is-solved::before {
  opacity: 0.82;
  background: var(--brass);
  box-shadow: 0 0 9px rgba(230, 187, 112, 0.28);
}

.move-medallion,
.lock-medallion {
  width: 11px;
  height: 20px;
  display: grid;
  place-items: center;
  justify-self: center;
  color: var(--teal);
  opacity: 0.86;
  transform: translateX(-2px);
}

.move-medallion svg {
  width: 10px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clue-card.is-partial {
  animation: sidePulse 700ms var(--ease);
}

.bridge-column {
  position: relative;
  display: grid;
  align-items: stretch;
  min-height: 0;
  padding: 36px 4px 9px;
}

.bridge-column::before,
.bridge-column::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  width: 8px;
  border-radius: 4px;
  z-index: 2;
  background: rgba(148, 126, 92, 0.34);
  box-shadow: 0 0 0 1px rgba(76, 54, 33, 0.12), 0 5px 12px rgba(45, 32, 20, 0.14);
  pointer-events: none;
}

.bridge-column::before {
  left: 0;
}

.bridge-column::after {
  right: 0;
}

.waterline {
  position: absolute;
  inset: 0 9px;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--river-blue);
  background-image:
    repeating-linear-gradient(162deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 12px);
  box-shadow:
    0 0 0 8px rgba(198, 184, 157, 0.42),
    0 0 0 9px rgba(91, 69, 44, 0.12);
}

.waterline::before,
.waterline::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.waterline::before {
  inset: -14%;
  opacity: 0.5;
  background:
    repeating-linear-gradient(162deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 18px);
  background-size: 72px 72px;
  animation: waterCurrent 9.6s linear infinite;
}

.waterline::after {
  content: none;
}

.waterline.is-stirred {
  animation: waterPulse 620ms var(--ease) 2;
}

.span-stack {
  position: relative;
  display: grid;
  grid-template-rows: repeat(5, minmax(48px, 55px));
  gap: 5px;
  z-index: 3;
}

.bridge-span {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.bridge-plank {
  width: calc(100% + 12px);
  min-height: 26px;
  position: relative;
  justify-self: center;
  align-self: center;
  display: grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(117, 77, 37, 0.26);
  border-radius: 4px;
  background: #e6bb70;
  color: #3a2515;
  box-shadow:
    0 0 12px rgba(255, 223, 150, 0.28),
    0 11px 20px rgba(82, 47, 22, 0.2);
  font-family: var(--ui-face);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  transform-origin: center;
  transition: transform 170ms var(--ease), border-color 170ms var(--ease), box-shadow 170ms var(--ease), background 170ms var(--ease);
}

.bridge-plank > * {
  position: relative;
  z-index: 2;
}

.bridge-plank::before,
.bridge-plank::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 22px;
  border-radius: 4px;
  background: var(--brass);
  opacity: 0.88;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 1px 4px rgba(50, 32, 18, 0.18);
  transform: translateY(-50%);
}

.bridge-plank::before {
  left: -4px;
}

.bridge-plank::after {
  right: -4px;
}

.bridge-span.is-selected .bridge-plank {
  border-color: rgba(185, 130, 52, 0.94);
  box-shadow:
    inset 0 0 0 2px rgba(255, 246, 211, 0.68),
    0 0 0 3px rgba(185, 130, 52, 0.32),
    0 0 22px rgba(230, 187, 112, 0.34),
    0 16px 26px rgba(82, 47, 22, 0.24);
  transform: scaleX(1.08) scaleY(1.08);
}

.bridge-span.is-selected .bridge-plank::before,
.bridge-span.is-selected .bridge-plank::after {
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 0 0 2px rgba(185, 130, 52, 0.28),
    0 2px 8px rgba(50, 32, 18, 0.22);
}

.word-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  white-space: nowrap;
  flex-wrap: nowrap;
  min-width: 0;
  line-height: 1;
}

.word-label.is-blank-label {
  width: min(56%, 52px);
  height: 22px;
  min-height: 22px;
  align-items: flex-end;
  padding-bottom: 4px;
}

.blank-underline {
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: rgba(72, 55, 35, 0.46);
  box-shadow: 0 1px 0 rgba(255, 246, 222, 0.78), 0 0 0 1px rgba(100, 70, 38, 0.06);
}

.bridge-span.is-selected .blank-underline {
  width: 112%;
  height: 3px;
  background: rgba(84, 55, 26, 0.94);
  box-shadow: 0 0 0 2px rgba(255, 245, 213, 0.62), 0 0 12px rgba(185, 130, 52, 0.34);
}

.bridge-letter {
  display: inline-grid;
  min-width: 0.54em;
  place-items: center;
}

.marked-letter {
  display: inline-grid;
  place-items: center;
  min-width: 1.1em;
  color: #1b5560;
  text-shadow: 0 1px 0 rgba(255, 246, 218, 0.8);
}

.bridge-span.is-built .word-label {
  gap: 0;
}

.bridge-span.is-built .bridge-letter,
.bridge-span.is-built .marked-letter {
  min-width: 0;
}

.bridge-span.is-empty .bridge-plank {
  min-height: 26px;
  opacity: 0.9;
  border-style: solid;
  color: rgba(58, 37, 21, 0.5);
  background: #eee1c8;
  box-shadow: 0 9px 18px rgba(82, 47, 22, 0.14);
}

.bridge-span.is-selected .bridge-plank,
.bridge-span.is-empty.is-selected .bridge-plank {
  border-color: rgba(185, 130, 52, 0.96);
  background: #f3dfaa;
  box-shadow:
    inset 0 0 0 2px rgba(255, 246, 211, 0.78),
    0 0 0 3px rgba(185, 130, 52, 0.45),
    0 0 24px rgba(230, 187, 112, 0.42),
    0 17px 28px rgba(82, 47, 22, 0.26);
  opacity: 1;
  transform: scaleX(1.1) scaleY(1.1);
}

.bridge-span.is-celebrating .bridge-plank {
  animation: buildBridge 520ms var(--ease), goldGlow 760ms var(--ease);
}

.bridge-span.is-hint-pulsing::after {
  content: "";
  position: absolute;
  inset: -8px -15px;
  border-radius: 15px;
  pointer-events: none;
  background: rgba(22, 127, 168, 0.14);
  animation: hintBridgeAura 600ms var(--ease) forwards;
}

.bridge-span.is-hint-pulsing .bridge-plank {
  animation: hintBridgePulse 540ms var(--ease);
}

.bridge-span.is-selecting .bridge-plank {
  animation: bridgeSelectPop 300ms cubic-bezier(.16, .84, .24, 1) both;
}

.bridge-span.is-deselecting .bridge-plank {
  animation: bridgeDeselect 240ms cubic-bezier(.22, .72, .2, 1) both;
}

.bridge-span.is-celebrating::after {
  content: "";
  position: absolute;
  inset: -8px -15px;
  border-radius: 15px;
  pointer-events: none;
  background: rgba(255, 231, 158, 0.22);
  animation: bridgeAura 720ms var(--ease) forwards;
}

.answer-dock {
  display: grid;
  gap: 6px;
  padding: 9px 12px 8px;
  border: 1px solid rgba(89, 78, 62, 0.16);
  border-radius: 8px;
  background: #f7f4ee;
  box-shadow: none;
}

.answer-dock.is-complete .input-row,
.answer-dock.is-complete .keyboard-panel {
  display: none;
}

.answer-dock.is-complete .status-line {
  display: none;
}

.answer-dock.is-complete .dock-footer {
  grid-template-columns: 1fr;
  gap: 8px 12px;
  margin-top: 0;
  align-items: center;
}

.hint-button.is-report-button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  white-space: normal;
  line-height: 1.05;
}

.report-button-title,
.report-button-subtitle {
  display: block;
  pointer-events: none;
}

.report-button-title {
  font-size: 1em;
  line-height: 1;
}

.report-button-subtitle {
  font-size: 0.72em;
  font-weight: 760;
  line-height: 1.08;
}

.answer-dock.is-complete .hint-button.is-report-button {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 8px 12px;
  font-size: 13px;
}

.answer-dock.is-complete .hint-order {
  display: none;
}

.answer-slots {
  min-height: 32px;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.answer-slots.is-freeform {
  display: none;
}

.answer-slot {
  width: 31px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(87, 66, 40, 0.18);
  border-radius: 10px;
  color: var(--ink);
  background: #fffaf2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 5px 12px rgba(47, 31, 17, 0.07);
  font-family: var(--ui-face);
  font-size: 15px;
  font-weight: 900;
}

.answer-slot.is-filled {
  border-color: rgba(13, 91, 99, 0.28);
  color: var(--teal);
}

.answer-slot.is-keyed {
  animation: slotConfirm 190ms var(--ease);
}

.answer-slot.is-keystone {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 0 0 2px rgba(230, 187, 112, 0.18), 0 5px 12px rgba(47, 31, 17, 0.07);
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.answer-input-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
}

.answer-input {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  border: 1px solid rgba(47, 31, 17, 0.14);
  border-radius: 6px;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: inset 0 2px 8px rgba(47, 31, 17, 0.05);
  font-family: var(--ui-face);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  outline: 0;
  transition:
    border-color 320ms var(--ease),
    box-shadow 320ms var(--ease),
    color 160ms var(--ease);
}

.answer-input::placeholder {
  color: rgba(75, 70, 62, 0.44);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.input-notice {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  min-width: 0;
  padding: 0 13px;
  color: #b9403d;
  font-family: var(--ui-face);
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 1;
  transition: opacity 320ms var(--ease);
  pointer-events: none;
}

.input-notice[hidden] {
  display: none;
}

.input-notice.is-hiding {
  opacity: 0;
}

.answer-input.has-input-notice {
  color: transparent;
  caret-color: transparent;
}

.answer-input.has-input-notice::placeholder {
  color: transparent;
}

.answer-input.has-input-notice-error,
.answer-input.has-input-notice-error:focus {
  border-color: rgba(185, 64, 61, 0.72);
  box-shadow: 0 0 0 3px rgba(185, 64, 61, 0.12), inset 0 2px 8px rgba(47, 31, 17, 0.05);
}

.answer-input.has-input-notice-error.is-input-notice-hiding,
.answer-input.has-input-notice-error.is-input-notice-hiding:focus {
  border-color: rgba(47, 31, 17, 0.14);
  box-shadow: inset 0 2px 8px rgba(47, 31, 17, 0.05);
}

.answer-input:focus {
  border-color: rgba(13, 122, 131, 0.62);
  box-shadow: 0 0 0 3px rgba(13, 122, 131, 0.14), inset 0 2px 8px rgba(47, 31, 17, 0.05);
}

.answer-input.has-input-notice-error:focus {
  border-color: rgba(185, 64, 61, 0.72);
  box-shadow: 0 0 0 3px rgba(185, 64, 61, 0.12), inset 0 2px 8px rgba(47, 31, 17, 0.05);
}

.answer-input.is-keyed {
  animation: inputConfirm 180ms var(--ease);
}

.primary-button,
.hint-button,
.howto-button,
.tutorial-sound {
  border: 0;
  border-radius: 5px;
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 900;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), opacity 160ms var(--ease);
}

.howto-button {
  display: none;
}

.primary-button {
  width: 100%;
  min-width: 0;
  color: #fff8e8;
  background: var(--river-blue);
  box-shadow: 0 10px 20px rgba(22, 127, 168, 0.22);
}

.primary-button.is-pressing,
.hint-button.is-pressing,
.howto-button.is-pressing {
  animation: actionButtonPress 260ms cubic-bezier(.16, 1, .3, 1);
}

.hint-button {
  min-width: 62px;
  min-height: 36px;
  color: #fff8e8;
  background: var(--river-blue);
  font-size: 14.5px;
}

.hint-button:disabled {
  opacity: 0.52;
}

.keyboard-panel {
  display: grid;
  gap: 4px;
  padding: 2px 0 0;
  width: 100%;
  min-width: 0;
  touch-action: manipulation;
}

.keyboard-panel.is-hidden {
  display: none;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 2.5px;
  width: 100%;
  min-width: 0;
}

.key-button {
  min-width: 0;
  width: clamp(30px, 8.7vw, 37px);
  height: 36px;
  border: 1px solid rgba(76, 55, 35, 0.14);
  border-radius: 6px;
  color: var(--ink);
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.85), transparent 35%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(233, 221, 203, 0.84));
  box-shadow: 0 5px 10px rgba(47, 31, 17, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-family: var(--ui-face);
  font-size: 15.8px;
  font-weight: 900;
  touch-action: manipulation;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background 120ms var(--ease);
}

.key-button.is-wide {
  width: clamp(50px, 14.2vw, 60px);
}

.key-button.is-delete {
  color: #fff8e8;
  background: linear-gradient(145deg, #8f5148, #63372f);
  box-shadow: 0 5px 10px rgba(101, 55, 47, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.key-button.is-delete.is-pressing {
  animation: deleteButtonPress 220ms cubic-bezier(.16, 1, .3, 1);
}

.key-button:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 5px rgba(47, 31, 17, 0.12);
}

.dock-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  align-items: center;
  margin-top: 4px;
  width: 100%;
  min-width: 0;
}

.hint-order {
  margin: 0;
  min-width: 0;
  color: rgba(75, 70, 62, 0.76);
  font-family: var(--copy-face);
  font-size: 14.4px;
  font-weight: 500;
  line-height: 1.06;
}

.status-line {
  min-height: 32px;
  margin: 0;
  display: flex;
  align-items: center;
  color: rgba(75, 70, 62, 0.84);
  font-family: var(--copy-face);
  font-size: 14.4px;
  font-weight: 400;
  line-height: 1.13;
}

.score-modal {
  --modal-dim: var(--score-overlay);
  position: fixed;
  inset: 0;
  z-index: 22;
  display: none;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  overflow: visible;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.pause-modal {
  position: absolute;
  top: var(--pause-top, 0);
  left: var(--pause-left, 0);
  width: var(--pause-width, 100vw);
  height: var(--pause-height, 100vh);
  z-index: 12;
  display: none;
  place-items: stretch;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.pause-modal::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  border: 1px solid rgba(16, 17, 17, 0.86);
  border-radius: inherit;
  background: var(--pause-tint);
  box-shadow: none;
  backdrop-filter: blur(32px) saturate(0.5);
  -webkit-backdrop-filter: blur(32px) saturate(0.5);
  pointer-events: none;
}

.score-modal::before,
.tutorial-modal::before,
.intro-modal::before {
  content: "";
  position: fixed;
  top: -35vh;
  right: -35vw;
  bottom: -35vh;
  left: -35vw;
  z-index: 0;
  background: var(--modal-dim);
  pointer-events: none;
}

.score-modal.is-visible {
  display: grid;
}

.pause-modal.is-visible {
  display: grid;
  opacity: 0;
}

.pause-modal.is-visible:not(.is-hiding) {
  animation: pausePanelFadeIn 420ms var(--ease) both;
}

.pause-modal.is-hiding {
  display: grid;
  pointer-events: none;
  animation: pausePanelFadeOut 420ms var(--ease) both;
}

.score-modal.is-entering::before {
  animation: modalDimFade 220ms ease-out both;
}

.has-score-modal {
  overflow: hidden;
}

.pause-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 4vh, 34px);
  overflow: hidden;
  padding: clamp(28px, 6.6vh, 62px) clamp(18px, 5vw, 32px) clamp(28px, 6vh, 48px);
  border: 0;
  border-radius: inherit;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.pause-card::before,
.pause-card::after {
  content: none;
  position: absolute;
  right: clamp(18px, 5vw, 32px);
  left: clamp(18px, 5vw, 32px);
  height: 2px;
  border-radius: 999px;
  background: rgba(185, 130, 52, 0.68);
  opacity: 0.7;
}

.pause-card::before {
  top: clamp(18px, 4vh, 32px);
}

.pause-card::after {
  bottom: clamp(84px, 14vh, 118px);
}

.pause-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateY(clamp(10px, 2.6vh, 22px));
}

.pause-title {
  margin: 0;
  color: #0b1116;
  font-family: var(--ui-face);
  font-size: clamp(33px, 8.6vw, 52px);
  font-weight: 850;
  line-height: 0.92;
  letter-spacing: 0;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 28px rgba(16, 43, 49, 0.16);
}

.pause-resume {
  width: min(62%, 240px);
  min-height: 58px;
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  justify-self: center;
  margin-bottom: clamp(10px, 2.8vh, 22px);
  border: 0;
  border-radius: 7px;
  color: #fff8e8;
  background: var(--river-blue);
  box-shadow: 0 4px 0 var(--river-blue-dark), 0 10px 20px rgba(22, 127, 168, 0.18);
  font-family: var(--ui-face);
  font-size: 19.5px;
  font-weight: 850;
  line-height: 1;
}

.pause-resume:active,
.pause-resume.is-pressing,
.pause-button.is-pressing {
  transform: translateY(2px) scale(0.99);
}

.score-card {
  width: min(100%, 392px);
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  overflow: hidden;
  padding: 20px 18px 18px;
  border: 1px solid rgba(126, 88, 45, 0.3);
  border-radius: 16px;
  background: #fff8ec;
  box-shadow:
    0 30px 76px rgba(22, 18, 13, 0.34),
    inset 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.score-card .score-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(101, 73, 43, 0.14);
  border-radius: 10px;
  color: rgba(16, 43, 49, 0.72);
  background: rgba(255, 253, 248, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-family: var(--ui-face);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.score-modal.is-entering .score-card {
  animation: scoreRise 480ms cubic-bezier(.16, 1, .3, 1) both;
  will-change: transform, opacity;
}

.score-card::before {
  content: "";
  width: 112px;
  height: 31px;
  justify-self: center;
  margin-bottom: -7px;
  color: #7f5525;
  background:
    linear-gradient(currentColor, currentColor) 0 24px / 32px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 80px 24px / 32px 2px no-repeat,
    radial-gradient(ellipse at 50% 100%, transparent 0 48%, currentColor 49% 55%, transparent 56%) 31px 2px / 50px 30px no-repeat,
    linear-gradient(currentColor, currentColor) 55px 8px / 2px 26px no-repeat;
  opacity: 0.98;
  transform-origin: center bottom;
}

.score-modal.is-entering .score-card::before {
  animation: scoreBridgeDraw 760ms cubic-bezier(.16, 1, .3, 1) 90ms both;
}

.score-title,
.score-details {
  margin: 0;
}

.score-title {
  color: #183138;
  font-family: var(--ui-face);
  font-size: 29px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

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

.score-details:not(.sr-only) {
  margin: 0 2px;
  color: var(--muted);
  font-family: var(--copy-face);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.18;
  text-align: center;
}

.score-ledger {
  display: grid;
  gap: 0;
  margin-top: 2px;
  padding: 9px 11px;
  border: 1px solid rgba(101, 73, 43, 0.16);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.score-ledger-row {
  min-height: 35px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid rgba(101, 73, 43, 0.12);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-family: var(--ui-face);
}

.score-ledger-row.is-base {
  border-color: rgba(185, 130, 52, 0.22);
  background: transparent;
}

.score-ledger-row:last-child {
  border-bottom: 0;
}

.score-ledger-row span {
  min-width: 0;
  color: rgba(16, 43, 49, 0.82);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.12;
  text-transform: none;
}

.score-ledger-row b {
  color: var(--ink);
  font-weight: 950;
}

.score-ledger-row small {
  display: inline-block;
  margin-left: 5px;
  color: rgba(120, 109, 92, 0.82);
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.score-ledger-row strong {
  color: #99433e;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0;
}

.score-ledger-row.is-base strong {
  color: var(--ink);
}

.score-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 1px;
  padding: 12px 12px;
  border: 1px solid rgba(185, 130, 52, 0.36);
  border-radius: 13px;
  background: #fff1d3;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 9px 20px rgba(145, 85, 31, 0.12);
}

.score-rating {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.score-points {
  display: grid;
  gap: 1px;
  justify-items: end;
  text-align: right;
}

.score-points span {
  color: rgba(75, 70, 62, 0.78);
  font-family: var(--ui-face);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.score-points strong {
  color: var(--ink);
  font-family: var(--ui-face);
  font-size: 34px;
  font-weight: 950;
  line-height: 0.98;
  text-align: right;
}

.score-grade {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff7df;
  background: #c47f13;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 8px 17px rgba(145, 85, 31, 0.22);
  font-family: var(--ui-face);
  font-size: 32px;
  font-weight: 950;
}

.score-rating-title {
  display: grid;
  align-content: center;
  color: rgba(16, 43, 49, 0.78);
  font-family: var(--ui-face);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
}

.score-rating-title span {
  display: block;
}

.score-modal.is-entering .score-ledger-row {
  animation: scoreLedgerIn 540ms cubic-bezier(.16, 1, .3, 1) calc(320ms + (var(--i) * 450ms)) both;
}

.score-modal.is-revealed .score-ledger-row {
  animation: none;
  opacity: 1;
  transform: none;
}

.score-modal.is-entering .score-result {
  animation: scoreSlipIn 560ms cubic-bezier(.16, 1, .3, 1) 2200ms both;
}

.score-modal.is-calculating .score-grade {
  transform: scale(0.78);
  opacity: 0;
}

.score-modal.is-calculating .score-actions {
  pointer-events: none;
  opacity: 0.48;
}

.score-modal.is-revealed .score-grade {
  animation: scoreSealIn 540ms cubic-bezier(.16, 1, .3, 1) both;
}

.score-modal.is-revealed .score-result {
  animation: scoreTotalPulse 620ms cubic-bezier(.16, 1, .3, 1) both;
}

.score-modal.is-revealed .score-actions {
  animation: scoreSlipIn 420ms cubic-bezier(.16, 1, .3, 1) both;
}

.score-share-preview {
  display: none;
  margin: 1px 0 0;
  min-height: 0;
  padding: 11px 12px;
  border: 1px solid rgba(185, 130, 52, 0.28);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 252, 245, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  font-family: var(--copy-face);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.18;
}

.score-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-button,
.copy-button,
.hint-choice,
.hint-cancel {
  border: 0;
  font-family: var(--ui-face);
  font-weight: 900;
}

.share-button,
.copy-button {
  --score-button-edge: var(--river-blue-dark);
  --score-button-shadow: rgba(22, 127, 168, 0.2);
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 8px 7px;
  border-radius: 10px;
  color: #fff8e8;
  background: var(--river-blue);
  box-shadow: 0 4px 0 var(--score-button-edge), 0 10px 20px var(--score-button-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 150ms var(--ease), box-shadow 150ms var(--ease), background 150ms var(--ease), color 150ms var(--ease);
}

.share-button span,
.copy-button span {
  font-size: 15px;
  line-height: 1;
}

.share-button small,
.copy-button small {
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  opacity: 0.78;
}

.copy-button {
  --score-button-edge: rgba(143, 174, 187, 0.78);
  --score-button-shadow: rgba(47, 31, 17, 0.08);
  color: var(--river-blue);
  background: #fff7e9;
  border: 1px solid rgba(22, 127, 168, 0.28);
  box-shadow: 0 4px 0 var(--score-button-edge), 0 8px 16px var(--score-button-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.share-button:active,
.copy-button:active,
.share-button.is-pressing,
.copy-button.is-pressing {
  transform: translateY(3px) scale(0.985);
  box-shadow: 0 1px 0 var(--score-button-edge), 0 3px 8px rgba(47, 31, 17, 0.12), inset 0 2px 6px rgba(0, 0, 0, 0.12);
}

.copy-button.is-copied {
  --score-button-edge: #08664d;
  color: #fff8e8;
  background: var(--river-blue);
  border-color: transparent;
  box-shadow: 0 4px 0 var(--score-button-edge), 0 8px 16px rgba(47, 31, 17, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: copiedConfirm 620ms cubic-bezier(.16, 1, .3, 1) both;
}

.hint-sheet {
  position: absolute;
  left: clamp(10px, 2.8vw, 16px);
  right: clamp(10px, 2.8vw, 16px);
  bottom: clamp(10px, 1.9svh, 16px);
  z-index: 8;
  display: none;
  gap: 10px;
  max-height: min(72svh, 440px);
  padding: 12px;
  overflow: auto;
  border: 2px solid #bed1dc;
  border-radius: 14px;
  color: var(--ink);
  background: var(--selected-clue, #dff7ff);
  box-shadow:
    0 24px 56px rgba(20, 46, 58, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.hint-sheet.is-open {
  display: grid;
  animation: hintSheetIn 220ms cubic-bezier(.16, 1, .3, 1);
}

.hint-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hint-sheet-heading {
  min-width: 0;
}

.hint-sheet h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--ui-face);
  font-size: clamp(20px, 5.2vw, 24px);
  line-height: 0.98;
  font-weight: 850;
  letter-spacing: 0;
  text-align: left;
}

.hint-choice-list {
  display: grid;
  gap: 8px;
}

.hint-choice {
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 10px 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid #bed1dc;
  box-shadow: 0 2px 0 rgba(154, 178, 190, 0.44);
  text-align: left;
  transition:
    transform 140ms cubic-bezier(.16, 1, .3, 1),
    box-shadow 140ms cubic-bezier(.16, 1, .3, 1),
    border-color 140ms cubic-bezier(.16, 1, .3, 1),
    background 140ms cubic-bezier(.16, 1, .3, 1);
}

.hint-choice[hidden] {
  display: none;
}

.hint-choice:active {
  transform: translateY(2px) scale(0.992);
  box-shadow: 0 0 0 rgba(154, 178, 190, 0);
}

.hint-choice-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hint-choice strong {
  color: var(--ink);
  font-family: var(--ui-face);
  font-size: clamp(16px, 4.1vw, 18px);
  font-weight: 800;
  line-height: 1.05;
}

.hint-choice-desc {
  color: #586872;
  font-family: var(--ui-face);
  font-size: clamp(12.5px, 3.35vw, 14.5px);
  font-weight: 650;
  line-height: 1.1;
}

.hint-choice.is-heavy {
  background: #fff6cf;
  border-color: #e8c64d;
  box-shadow: 0 2px 0 rgba(197, 154, 0, 0.34);
}

.hint-choice.is-heavy .hint-choice-desc {
  color: #604c10;
}

.hint-cost {
  min-width: 46px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 2px solid #101418;
  border-radius: 8px;
  color: #101418;
  background: var(--brass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-family: var(--ui-face);
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.hint-cost.is-free {
  color: var(--river-blue-dark);
  background: #dff7ff;
  border-color: var(--river-blue);
}

.hint-choice.is-disabled,
.hint-choice:disabled {
  opacity: 0.46;
}

.hint-choice.is-disabled {
  pointer-events: none;
}

.hint-cancel {
  min-height: 34px;
  padding: 0 12px;
  border: 2px solid #bed1dc;
  border-radius: 9px;
  color: #586872;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 0 rgba(154, 178, 190, 0.34);
  font-size: 13px;
  line-height: 1;
}

.hint-cancel:active {
  transform: translateY(2px) scale(0.99);
  box-shadow: 0 0 0 rgba(154, 178, 190, 0);
}

.shake {
  animation: shake 340ms var(--ease);
}

.spark {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  background: var(--brass-2);
  box-shadow: 0 0 18px rgba(225, 176, 100, 0.8);
  animation: sparkOut 580ms var(--ease) forwards;
}

.row-ripple {
  position: absolute;
  inset: -6px -10px;
  border-radius: 6px;
  border: 1px solid rgba(230, 187, 112, 0.76);
  pointer-events: none;
  animation: rowRipple 520ms var(--ease) forwards;
}

.tutorial-modal {
  --modal-dim: rgba(20, 18, 14, 0.34);
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(8px, env(safe-area-inset-bottom));
  overflow: visible;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.intro-modal {
  --modal-dim: rgba(20, 18, 14, 0.3);
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
  overflow: visible;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.intro-modal.is-open {
  display: grid;
  animation: modalFadeIn 180ms var(--ease);
}

.intro-modal.is-open::before,
.tutorial-modal.is-open::before {
  animation: modalDimFade 180ms var(--ease) both;
}

.tutorial-modal.is-open {
  display: grid;
  animation: modalFadeIn 180ms var(--ease);
}

.has-modal {
  overflow: hidden;
}

.tutorial-card {
  width: min(100%, 398px);
  max-height: calc(var(--app-height) - 20px);
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 18px 14px;
  border: 1px solid rgba(126, 88, 45, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: #fff8ec;
  box-shadow: 0 28px 70px rgba(26, 20, 14, 0.28), inset 0 0 0 3px rgba(255, 255, 255, 0.44);
}

.intro-card {
  width: min(100%, 360px);
  max-height: min(560px, calc(var(--app-height) - 168px));
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 14px;
  border: 1px solid rgba(126, 88, 45, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: #fff8ec;
  box-shadow: 0 22px 60px rgba(26, 20, 14, 0.24), inset 0 0 0 3px rgba(255, 255, 255, 0.42);
}

.tutorial-modal.is-open .tutorial-card {
  animation: tutorialPopIn 260ms var(--ease);
}

.intro-modal.is-open .intro-card {
  animation: tutorialPopIn 260ms var(--ease);
}

.tutorial-card::before {
  content: none;
}

.tutorial-logo-lockup {
  display: none;
}

.tutorial-logo-lockup .brand-mark {
  width: 68px;
  height: 21px;
  margin-bottom: -4px;
}

.tutorial-logo-lockup .date-label {
  font-size: 8.5px;
}

.tutorial-wordmark {
  margin: 0;
  max-width: 100%;
  color: var(--ink);
  font-size: clamp(23px, 7.8vw, 31px);
  line-height: 0.86;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.tutorial-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(101, 73, 43, 0.14);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.78);
  font-family: var(--ui-face);
  font-size: 17px;
  font-weight: 900;
}

.intro-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(101, 73, 43, 0.12);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.78);
  font-family: var(--ui-face);
  font-size: 15px;
  font-weight: 900;
}

.tutorial-kicker {
  margin: 0;
  justify-self: center;
  color: var(--brass);
  font-family: var(--ui-face);
  font-size: clamp(17px, 4.8vw, 22px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.tutorial-author {
  margin: 1px 0 3px;
  justify-self: center;
  color: rgba(120, 109, 92, 0.86);
  font-family: var(--copy-face);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.08;
  text-align: center;
}

.tutorial-author a {
  color: var(--river-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.tutorial-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(23px, 5.9vw, 29px);
  line-height: 0.96;
  font-weight: 600;
  text-align: center;
}

.tutorial-summary,
.tutorial-header-actions {
  display: none;
}

.tutorial-skip-scores {
  justify-self: start;
  border: 0;
  padding: 0;
  color: var(--river-blue);
  background: transparent;
  font-family: var(--ui-face);
  font-size: 12.4px;
  font-weight: 500;
  line-height: 1.1;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tutorial-skip-scores:focus-visible {
  outline: 2px solid rgba(22, 127, 168, 0.36);
  outline-offset: 4px;
}

.tutorial-visual {
  padding: 3px 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mini-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr);
  gap: 5px 0;
  align-items: center;
}

.mini-bank-label {
  min-height: 16px;
  display: grid;
  place-items: center;
  color: rgba(67, 55, 39, 0.72);
  font-family: var(--ui-face);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mini-bank-label-center {
  color: var(--brass);
}

.mini-clue {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 5px 7px 6px;
  border: 1px solid rgba(101, 73, 43, 0.16);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.76);
  box-shadow: 0 5px 10px rgba(47, 31, 17, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 12.6px;
  font-weight: 780;
  line-height: 1.05;
  text-align: center;
}

.mini-clue-left {
  margin-right: -2px;
}

.mini-clue-right {
  margin-left: -2px;
}

.mini-clue.is-active {
  border-color: rgba(185, 130, 52, 0.5);
  background: rgba(255, 251, 243, 0.95);
  box-shadow:
    0 0 0 2px rgba(185, 130, 52, 0.1),
    0 7px 14px rgba(47, 31, 17, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mini-muted {
  opacity: 0.68;
}

.mini-bridge-lane {
  position: relative;
  min-height: 34px;
  display: grid;
  place-items: center;
  background: rgba(45, 150, 160, 0.22);
}

.mini-bridge {
  width: calc(100% + 10px);
  min-height: 25px;
  display: grid;
  place-items: center;
  margin: 0 -5px;
  border: 1px solid rgba(117, 77, 37, 0.28);
  border-radius: 4px;
  color: rgba(58, 37, 21, 0.55);
  background: #eee1c8;
  box-shadow: 0 7px 14px rgba(82, 47, 22, 0.11);
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 900;
}

.mini-bridge.is-selected {
  border-color: rgba(185, 130, 52, 0.9);
  box-shadow:
    inset 0 0 0 2px rgba(255, 246, 211, 0.62),
    0 0 0 3px rgba(185, 130, 52, 0.22),
    0 10px 18px rgba(82, 47, 22, 0.18);
  transform: scaleX(1.06);
}

.mini-blank {
  width: 42px;
  height: 15px;
  display: block;
  border-bottom: 2px solid rgba(75, 53, 29, 0.72);
}

.mini-answer {
  display: inline-block;
  padding: 0 3px 2px;
  border-bottom: 2px solid rgba(75, 53, 29, 0.72);
  color: rgba(58, 37, 21, 0.36);
  font-family: var(--copy-face);
  font-size: 11.6px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.tutorial-copy {
  margin: 0;
  color: rgba(75, 70, 62, 0.86);
  font-family: var(--copy-face);
  font-size: 14.4px;
  line-height: 1.24;
  font-weight: 500;
  text-align: left;
}

.tutorial-copy-small {
  font-size: 14px;
}

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

.tutorial-section-title {
  margin: 0 0 -6px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  font-weight: 600;
  text-align: left;
}

.tutorial-scoring-title {
  font-family: var(--ui-face);
  font-size: 15px;
  font-weight: 900;
}

.player-stats {
  display: grid;
  gap: 5px;
  padding: 8px 0;
  border-top: 1px solid rgba(101, 73, 43, 0.13);
  border-bottom: 1px solid rgba(101, 73, 43, 0.13);
  color: var(--muted);
  background: transparent;
  font-family: var(--ui-face);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
}

.stats-head,
.stats-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.stats-head strong {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-head span,
.stats-foot span {
  color: rgba(75, 70, 62, 0.66);
}

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

.stats-grid span {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 6px 7px;
  border: 1px solid rgba(13, 91, 99, 0.13);
  border-radius: 6px;
  background: rgba(228, 246, 242, 0.46);
}

.stats-grid b {
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
}

.stats-grid small,
.stats-foot {
  color: rgba(75, 70, 62, 0.68);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.stats-foot b {
  color: var(--ink);
  font-weight: 900;
}

.tutorial-scoring {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(101, 73, 43, 0.13);
}

.tutorial-hints {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(101, 73, 43, 0.13);
}

.score-rule,
.hint-rule {
  min-height: 41px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid rgba(101, 73, 43, 0.13);
  border-radius: 0;
  padding: 8px 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.hint-rule {
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 38px;
}

.score-rule strong,
.hint-rule strong {
  color: var(--teal);
  font-family: var(--ui-face);
  font-size: 12.4px;
  font-weight: 900;
  line-height: 1;
}

.hint-rule strong {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(22, 127, 168, 0.28);
  border-radius: 50%;
  color: var(--river-blue);
  font-size: 11.4px;
}

.score-rule span,
.hint-rule span {
  color: rgba(75, 70, 62, 0.82);
  font-family: var(--copy-face);
  font-size: 14.4px;
  font-weight: 500;
  line-height: 1.18;
}

.hint-rule span {
  font-size: 14px;
}

.tutorial-start {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  color: #fff8e8;
  background: var(--river-blue);
  box-shadow: 0 10px 20px rgba(22, 127, 168, 0.2);
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 900;
}

.intro-actions {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.intro-detail {
  min-height: 36px;
  border: 1px solid rgba(22, 127, 168, 0.2);
  border-radius: 6px;
  color: var(--river-blue);
  background: rgba(255, 253, 248, 0.76);
  font-family: var(--ui-face);
  font-size: 12.5px;
  font-weight: 900;
}

.tutorial-sound {
  min-height: 34px;
  color: #775c3b;
  background: rgba(255, 250, 240, 0.8);
  border: 1px solid rgba(101, 73, 43, 0.12);
}

.tutorial-sound.is-muted {
  color: rgba(119, 92, 59, 0.62);
  background: rgba(230, 219, 201, 0.64);
}

@keyframes waterCurrent {
  0% { background-position: 0 0; }
  100% { background-position: 72px 72px; }
}

@keyframes waterGlow {
  0% { transform: translate3d(-1.5%, -0.8%, 0); opacity: 0.28; }
  100% { transform: translate3d(1.5%, 0.8%, 0); opacity: 0.42; }
}

@keyframes waterPulse {
  0%, 100% { filter: brightness(1); }
  48% { filter: brightness(1.24) saturate(1.12); }
}

@keyframes timerDigitRoll {
  0% { transform: translateY(0); }
  58% { transform: translateY(-1.17em); }
  100% { transform: translateY(-1.05em); }
}

@keyframes modalFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes pausePanelFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes pausePanelFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes modalDimFade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes tutorialPopIn {
  0% { transform: translateY(12px) scale(0.97); opacity: 0; }
  68% { transform: translateY(-2px) scale(1.01); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes inputConfirm {
  0%, 100% { box-shadow: 0 0 0 3px rgba(13, 122, 131, 0.14), inset 0 2px 8px rgba(47, 31, 17, 0.05); }
  52% { box-shadow: 0 0 0 5px rgba(13, 122, 131, 0.16), inset 0 2px 8px rgba(47, 31, 17, 0.05); }
}

@keyframes slotConfirm {
  0% { transform: scale(0.92); }
  58% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes actionButtonPress {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 10px 20px rgba(22, 127, 168, 0.22);
    filter: brightness(1);
  }
  38% {
    transform: translateY(3px) scale(0.965, 0.94);
    box-shadow: inset 0 3px 8px rgba(6, 59, 94, 0.22), 0 2px 5px rgba(22, 127, 168, 0.16);
    filter: brightness(0.96);
  }
  68% {
    transform: translateY(-1px) scale(1.025, 1.015);
    box-shadow: 0 12px 22px rgba(22, 127, 168, 0.24);
    filter: brightness(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 10px 20px rgba(22, 127, 168, 0.22);
    filter: brightness(1);
  }
}

@keyframes deleteButtonPress {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 5px 10px rgba(101, 55, 47, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    filter: brightness(1);
  }
  42% {
    transform: translateY(2px) scale(0.96, 0.94);
    box-shadow: inset 0 3px 8px rgba(55, 21, 17, 0.28), 0 1px 3px rgba(101, 55, 47, 0.12);
    filter: brightness(0.94);
  }
  72% {
    transform: translateY(-1px) scale(1.02, 1.01);
    box-shadow: 0 6px 12px rgba(101, 55, 47, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    filter: brightness(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 5px 10px rgba(101, 55, 47, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    filter: brightness(1);
  }
}

@keyframes buildBridge {
  0% { transform: translateY(9px) scaleX(0.22); opacity: 0; filter: brightness(1); }
  48% { transform: translateY(-3px) scaleX(1.07); opacity: 1; filter: brightness(1.12); }
  72% { transform: translateY(1px) scaleX(0.98); filter: brightness(1.05); }
  100% { transform: translateY(0) scaleX(1); }
}

@keyframes bridgeSelectPop {
  0% {
    transform: translateZ(0) scaleX(0.89) scaleY(0.96);
    opacity: 0.86;
  }
  58% {
    transform: translateZ(0) scaleX(1.055) scaleY(1.04);
    opacity: 1;
  }
  100% {
    transform: translateZ(0) scale(1.025);
    opacity: 1;
  }
}

@keyframes bridgeDeselect {
  0% {
    transform: translateZ(0) scaleX(1.15) scaleY(1.025);
    opacity: 1;
  }
  100% {
    transform: translateZ(0) scale(1);
    opacity: 0.88;
  }
}

@keyframes cardLift {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.06); }
}

@keyframes previewSway {
  0% { rotate: 0deg; }
  44% { rotate: var(--preview-sway, 0.8deg); }
  100% { rotate: 0deg; }
}

@keyframes cardSettle {
  0% { transform: translateY(-1.5px) scale(1.01); }
  52% { transform: translateY(0.5px) scale(0.997); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes hintClueLock {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  38% { transform: translateY(-2px) scale(1.025); filter: brightness(1.06); }
  62% { transform: translateY(1px) scale(0.99); filter: brightness(1.02); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes lockSet {
  0% { transform: scale(1); }
  42% { transform: scale(0.97); }
  68% { transform: scale(1.025); }
  100% { transform: scale(1); }
}

@keyframes lockPop {
  0% { transform: scale(0.55) rotate(-12deg); opacity: 0; }
  54% { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes goldGlow {
  0%, 100% { filter: brightness(1); }
  35% { filter: brightness(1.18) saturate(1.12); }
}

@keyframes bridgeAura {
  0% { transform: scaleX(0.45); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: scaleX(1.32); opacity: 0; }
}

@keyframes hintBridgePulse {
  0%, 100% { filter: brightness(1); }
  42% { filter: brightness(1.13) saturate(1.08); }
}

@keyframes hintBridgeAura {
  0% { transform: scaleX(0.55); opacity: 0; }
  35% { opacity: 0.82; }
  100% { transform: scaleX(1.16); opacity: 0; }
}

@keyframes popIn {
  0% { transform: scale(0.7) rotate(-7deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes sidePulse {
  0%, 100% { box-shadow: var(--tile-shadow); }
  45% { box-shadow: 0 0 0 4px rgba(183, 120, 44, 0.18), 0 12px 24px rgba(183, 120, 44, 0.18); }
}

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

@keyframes sparkOut {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}

@keyframes rowRipple {
  0% { transform: scale(0.82); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1.18); opacity: 0; }
}

@keyframes scoreDimIn {
  0% { background: rgba(20, 18, 14, 0); }
  100% { background: rgba(20, 18, 14, 0.48); }
}

@keyframes scoreRise {
  0% { transform: translateY(24px) scale(0.94); opacity: 0; }
  58% { transform: translateY(-3px) scale(1.015); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes scoreBridgeDraw {
  0% { transform: translateY(7px) scaleX(0.32); opacity: 0; }
  58% { transform: translateY(0) scaleX(1.08); opacity: 1; }
  100% { transform: translateY(0) scaleX(1); opacity: 0.92; }
}

@keyframes scoreLedgerIn {
  0% {
    transform: translateY(8px) scale(0.985);
    opacity: 0;
  }
  62% {
    transform: translateY(-1px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes scoreSealIn {
  0% {
    transform: scale(0.56) rotate(-8deg);
    opacity: 0;
  }
  54% {
    transform: scale(1.13) rotate(3deg);
    opacity: 1;
  }
  78% {
    transform: scale(0.98) rotate(-1deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes scoreTotalPulse {
  0% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      0 9px 20px rgba(145, 85, 31, 0.12);
  }
  42% {
    transform: scale(1.018);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      0 13px 28px rgba(145, 85, 31, 0.18);
  }
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      0 9px 20px rgba(145, 85, 31, 0.12);
  }
}

@keyframes copiedConfirm {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 0 var(--score-button-edge), 0 8px 16px rgba(47, 31, 17, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
  36% {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 1px 0 var(--score-button-edge), 0 2px 7px rgba(47, 31, 17, 0.1), inset 0 3px 9px rgba(0, 0, 0, 0.18);
  }
  68% {
    transform: translateY(-1px) scale(1.035);
    box-shadow: 0 5px 0 var(--score-button-edge), 0 12px 22px rgba(8, 120, 191, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 0 var(--score-button-edge), 0 10px 20px rgba(8, 120, 191, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

@keyframes scoreSlipIn {
  0% { transform: translateY(8px) scale(0.98); opacity: 0; }
  68% { transform: translateY(-1px) scale(1); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes sheetIn {
  0% { transform: translateY(14px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes hintSheetIn {
  0% { transform: translateY(16px) scale(0.975); opacity: 0; }
  72% { transform: translateY(-1px) scale(1); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-height: 740px) {
  .game-card {
    gap: 7px;
    padding: 12px 11px;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .bank,
  .span-stack {
    gap: 5px;
  }

  .clue-card {
    padding: 7px 12px 7px 7px;
  }

  .answer-dock {
    padding: 9px;
    gap: 7px;
  }

}

@media (max-width: 430px) {
  html,
  body {
    height: auto;
    min-height: var(--app-height);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.has-modal,
  body.has-score-modal {
    overflow: hidden;
  }

  .phone-shell {
    height: auto;
    min-height: var(--app-height);
    overflow: visible;
    padding: max(4px, env(safe-area-inset-top)) 0 max(6px, env(safe-area-inset-bottom));
  }

  .game-card {
    height: auto;
    min-height: var(--app-height);
    overflow: visible;
    max-height: 100%;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 7px;
    padding: 9px 8px 7px;
  }

  .topbar {
    min-height: 59px;
    padding: 0 54px;
    margin-bottom: 8px;
  }

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

  .brand-mark {
    width: 64px;
    height: 19px;
  }

  h1 {
    font-size: clamp(23px, 7.8vw, 31px);
  }

  .progress-row {
    --keystone-box-h: 42px;
    grid-template-columns: 68px minmax(0, 1fr) 76px;
    min-height: calc(var(--keystone-box-h) + 12px);
    margin-top: -5px;
    margin-bottom: 20px;
    padding: 0 6px 0 9px;
  }

  .keystone-wrap {
    gap: 3px;
  }

  .keystone-label {
    font-size: 8.2px;
  }

  .keystone-letter {
    width: 34px;
    height: 42px;
    font-size: 19px;
  }

  .board-wrap {
    grid-template-columns: minmax(0, 1fr) clamp(70px, 20.5vw, 86px) minmax(0, 1fr);
    padding: 0 6px 1px;
    margin-bottom: 10px;
  }

  .bank-panel {
    gap: 4px;
    padding: 4px 7px;
  }

  .bank-heading {
    min-height: 20px;
    font-size: 10px;
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, minmax(43px, 49px));
    gap: 4px;
  }

  .bridge-column {
    padding: 31px 4px 8px;
  }

  .bridge-plank,
  .bridge-span.is-empty .bridge-plank {
    min-height: 24px;
  }

  .word-label.is-blank-label {
    height: 18px;
    min-height: 18px;
    padding-bottom: 3px;
  }

  .clue-card {
    padding: 5px 12px 5px 7px;
    font-size: clamp(11.4px, 3.25vw, 13.4px);
  }

  .answer-dock {
    gap: 7px;
    padding: 8px 10px;
    margin-top: 0;
  }

  .game-card.is-complete-board {
    gap: 9px;
  }

  .game-card.is-complete-board .progress-row {
    margin-top: 3px;
    margin-bottom: 23px;
  }

  .game-card.is-complete-board .board-wrap {
    margin-top: 6px;
    margin-bottom: 44px;
  }

  .game-card.is-complete-board .answer-dock {
    margin-top: 12px;
  }

  .status-line {
    min-height: 34px;
    font-size: 15.4px;
    line-height: 1.1;
  }

  .answer-input {
    min-height: 35px;
    font-size: 16px;
  }

  .answer-input::placeholder {
    font-size: 12px;
  }

  .primary-button {
    min-height: 35px;
  }

  .keyboard-panel {
    gap: 4px;
    padding-top: 1px;
  }

  .keyboard-row {
    gap: 2px;
  }

  .key-button {
    height: 37px;
    width: clamp(30px, 8.85vw, 37px);
    font-size: 16px;
  }

  .key-button.is-wide {
    width: clamp(51px, 14.3vw, 59px);
  }

  .hint-button {
    min-height: 38px;
    min-width: 66px;
    font-size: 14.5px;
  }

  .hint-order {
    font-size: 14px;
    line-height: 1.06;
  }
}

@media (max-width: 430px) and (max-height: 740px) {
  .game-card {
    gap: 6px;
    padding: 8px 8px 7px;
  }

  .topbar {
    min-height: 55px;
    margin-bottom: 5px;
  }

  .progress-row {
    --keystone-box-h: 39px;
    min-height: calc(var(--keystone-box-h) + 10px);
    margin-bottom: 16px;
  }

  .keystone-letter {
    width: 31px;
    height: 39px;
    font-size: 17px;
  }

  .board-wrap {
    margin-bottom: 12px;
  }

  .bank-panel {
    gap: 4px;
    padding: 3px 7px;
  }

  .bank-heading {
    min-height: 18px;
    font-size: 9.4px;
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, minmax(45px, 48px));
    gap: 4px;
  }

  .bridge-column {
    padding: 27px 4px 7px;
  }

  .bridge-plank,
  .bridge-span.is-empty .bridge-plank {
    min-height: 24px;
  }

  .word-label.is-blank-label {
    height: 18px;
    min-height: 18px;
    padding-bottom: 3px;
  }

  .clue-card {
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: clamp(11.4px, 3.2vw, 12.8px);
  }

  .answer-dock {
    margin-top: 0;
  }
}

@media (max-width: 430px) and (min-height: 780px) {
  .game-card {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 7px;
  }

  .progress-row {
    --keystone-box-h: 44px;
    margin-bottom: 22px;
  }

  .game-card.is-complete-board .progress-row {
    margin-top: 7px;
    margin-bottom: 28px;
  }

  .game-card.is-complete-board .board-wrap {
    margin-top: 10px;
    margin-bottom: 58px;
  }

  .keystone-letter {
    width: 36px;
    height: 44px;
    font-size: 20px;
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, minmax(46px, 1fr));
  }

  .key-button {
    height: 38px;
    width: clamp(31px, 8.9vw, 38px);
    font-size: 16.3px;
  }
}

@media (min-width: 431px) and (max-height: 760px) {
  .game-card {
    gap: 4px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .topbar {
    min-height: 58px;
    margin-bottom: 2px;
  }

  .progress-row {
    margin-bottom: 10px;
  }

  .board-wrap {
    margin-bottom: 22px;
  }

  .bank-heading {
    min-height: 18px;
    font-size: 9.6px;
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, 42px);
    gap: 4px;
  }

  .bridge-column {
    padding: 27px 4px 7px;
  }

  .bridge-plank,
  .bridge-span.is-empty .bridge-plank {
    min-height: 24px;
  }

  .clue-card {
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: clamp(11px, 2.6vw, 12.6px);
  }

  .answer-dock {
    gap: 5px;
    padding-top: 8px;
    padding-bottom: 7px;
  }

  .status-line {
    min-height: 28px;
  }

  .key-button {
    height: 32px;
  }
}

@media (max-width: 360px) {
  .progress-row {
    --keystone-box-h: 31px;
    grid-template-columns: 58px minmax(0, 1fr) 60px;
    padding-left: 7px;
    padding-right: 5px;
  }

  .keystone {
    gap: 4px;
  }

  .keystone-letter {
    width: 24px;
    height: 31px;
    font-size: 14px;
  }

}

@media (min-width: 700px) {
  .game-card {
    transform: translateY(0);
  }
}

/* Redesign v1: flatter editorial board inspired by the provided reference. */
:root {
  --paper: #f8efe3;
  --paper-2: #f1e6d5;
  --pause-tint: rgba(248, 239, 227, 0.68);
  --ink: #101010;
  --muted: #5c5f66;
  --line: rgba(43, 48, 54, 0.22);
  --teal: #0767a9;
  --teal-2: #0878bf;
  --deep-teal: #10222b;
  --river-blue: #0878bf;
  --river-blue-dark: #055f99;
  --brass: #d7c9b8;
  --brass-2: #f2eee6;
  --stone: #e8dfcf;
  --rose: #b9403d;
  --shadow: 0 14px 28px rgba(40, 44, 50, 0.1);
  --tile-shadow: 0 6px 13px rgba(40, 44, 50, 0.1);
  --display-face: Georgia, "Times New Roman", serif;
  --copy-face: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-face: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
}

html,
body,
html,
body,
.phone-shell {
  background: var(--paper);
}

.game-card {
  width: min(100%, 450px);
  max-height: none;
  gap: 8px;
  padding: 14px 13px 12px;
  background: transparent;
}

.topbar {
  min-height: 88px;
  padding: 0 62px;
  margin-bottom: 0;
}

.brand-lockup {
  transform: none;
}

.brand-mark,
.date-label {
  display: none;
}

h1 {
  color: #0c0c0c;
  font-size: clamp(34px, 10.2vw, 46px);
  line-height: 0.95;
  font-weight: 500;
  text-shadow: none;
}

.icon-button,
.game-timer,
.timer-digits,
.icon-button::after {
  color: #0878c8;
}

.icon-button {
  top: 7px;
  left: 4px;
  right: auto;
}

.topbar .ghost-button {
  top: 7px;
  left: 4px;
}

.game-timer {
  top: 15px;
  right: 6px;
}

.timer-digits {
  font-size: 20px;
  font-weight: 500;
  text-shadow: none;
}

.progress-row {
  --keystone-box-h: 43px;
  grid-template-columns: 84px minmax(0, 1fr) 78px;
  min-height: calc(var(--keystone-box-h) + 22px);
  padding: 0 8px;
  margin: -2px 0 28px;
  align-items: start;
}

.progress-spacer {
  position: relative;
  display: block;
  align-self: start;
}

.progress-spacer::before {
  content: "Span 03";
  position: absolute;
  top: 0;
  left: 0;
  color: #56585e;
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.progress-copy {
  align-self: start;
  height: auto;
  padding-top: 0;
  color: #111;
}

#solvedCount {
  font-size: 29px;
  font-weight: 500;
}

.progress-total {
  color: #111;
  font-size: 17px;
  font-weight: 500;
}

.progress-label {
  color: #5d6065;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.keystone-wrap {
  gap: 9px;
}

.keystone-label {
  color: #56585e;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.keystone {
  gap: 10px;
}

.keystone-letter {
  width: 36px;
  height: 43px;
  border-radius: 5px;
  border: 1px solid rgba(43, 48, 54, 0.24);
  background: rgba(255, 255, 255, 0.56);
  color: rgba(15, 18, 22, 0.62);
  box-shadow: none;
  font-size: 19px;
  font-weight: 500;
}

.keystone-letter.is-revealed {
  color: #0b0c0d;
  background: #f2eadf;
  border-color: rgba(43, 48, 54, 0.25);
  box-shadow: none;
}

.keystone-letter.is-hinted {
  color: #0878c8;
  border-color: rgba(8, 120, 200, 0.34);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.board-wrap {
  grid-template-columns: minmax(0, 1fr) clamp(76px, 20vw, 90px) minmax(0, 1fr);
  gap: 13px;
  padding: 0 2px;
  margin-bottom: 22px;
}

.bank-panel {
  gap: 11px;
  padding: 0;
}

.bank-heading {
  min-height: 25px;
  color: #4f5258;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.bank-heading span {
  gap: 10px;
}

.bank-heading span::before,
.bank-heading span::after {
  width: clamp(30px, 9vw, 54px);
  height: 1px;
  flex-basis: clamp(30px, 9vw, 54px);
  background: rgba(43, 48, 54, 0.18);
}

.bank,
.span-stack {
  grid-template-rows: repeat(5, minmax(58px, 66px));
  gap: 10px;
}

.clue-card {
  grid-template-columns: minmax(0, 1fr) 24px;
  padding: 8px 11px 8px 13px;
  border: 1px solid rgba(43, 48, 54, 0.23);
  border-radius: 5px;
  color: #101010;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  font-family: var(--ui-face);
  font-size: clamp(15px, 3.9vw, 18px);
  font-weight: 400;
  line-height: 1.18;
}

.clue-card::after,
.bank-left .clue-card::before,
.bank-right .clue-card::before {
  content: none;
}

.move-medallion,
.lock-medallion {
  width: 20px;
  color: #0878c8;
  opacity: 1;
  transform: none;
}

.move-medallion svg {
  width: 18px;
  height: 25px;
  stroke-width: 1.9;
}

.clue-card.is-row-selected {
  border-color: rgba(8, 120, 200, 0.44);
  box-shadow: 0 0 0 2px rgba(8, 120, 200, 0.12);
}

.clue-card.is-dragging {
  background: #fff;
  border-color: rgba(8, 120, 200, 0.54);
  box-shadow: 0 15px 26px rgba(29, 36, 44, 0.16);
}

.clue-card.is-solved {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(43, 48, 54, 0.26);
  box-shadow: none;
}

.bridge-column {
  padding: 36px 0 0;
}

.bridge-column::before {
  content: "Bridges";
  position: absolute;
  top: 3px;
  left: 50%;
  width: auto;
  height: auto;
  z-index: 5;
  color: #4f5258;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.bridge-column::after {
  content: none;
}

.waterline {
  top: 39px;
  right: 20px;
  bottom: 0;
  left: 20px;
  border-radius: 0;
  background-color: #93d8f1;
  background-image:
    repeating-linear-gradient(164deg, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px 11px);
  box-shadow: none;
}

.waterline::before {
  opacity: 0.33;
  background:
    repeating-linear-gradient(164deg, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px 17px);
}

.bridge-plank,
.bridge-span.is-empty .bridge-plank {
  width: calc(100% + 42px);
  min-height: 34px;
  border: 1px solid rgba(43, 48, 54, 0.2);
  border-radius: 4px;
  color: #0b0c0d;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 3px 7px rgba(22, 28, 35, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.bridge-plank::before,
.bridge-plank::after {
  content: none;
}

.bridge-span.is-selected .bridge-plank,
.bridge-span.is-empty.is-selected .bridge-plank {
  border-color: rgba(8, 120, 200, 0.48);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 2px rgba(8, 120, 200, 0.13), 0 5px 11px rgba(22, 28, 35, 0.2);
  transform: scale(1.04);
}

.blank-underline {
  width: 72%;
  height: 2px;
  border-radius: 0;
  background: #111;
  box-shadow: none;
}

.bridge-span.is-selected .blank-underline {
  width: 100%;
  height: 2px;
  background: #111;
  box-shadow: none;
}

.marked-letter {
  color: #0878c8;
  text-shadow: none;
}

.answer-dock {
  gap: 8px;
  padding: 15px 4px 0;
  border: 0;
  border-top: 1px solid rgba(43, 48, 54, 0.18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.status-line {
  min-height: 42px;
  color: #151515;
  font-family: var(--ui-face);
  font-size: clamp(16px, 4.2vw, 20px);
  font-weight: 400;
  line-height: 1.28;
}

.input-row {
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 13px;
}

.answer-input {
  min-height: 44px;
  border: 1px solid rgba(43, 48, 54, 0.19);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
  font-size: 17px;
}

.answer-input::placeholder {
  color: rgba(67, 72, 80, 0.38);
  font-size: 15px;
  font-weight: 650;
}

.primary-button,
.hint-button {
  border-radius: 4px;
  color: #fff;
  background: #0878c8;
  box-shadow: none;
  font-size: 17px;
  font-weight: 650;
}

.keyboard-panel {
  gap: 8px;
  padding-top: 3px;
}

.keyboard-row {
  gap: 3.5px;
}

.key-button {
  width: clamp(30px, 8.6vw, 39px);
  height: 38px;
  border: 1px solid rgba(43, 48, 54, 0.17);
  border-radius: 4px;
  color: #050505;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  font-size: 18px;
  font-weight: 650;
}

.key-button.is-wide {
  width: clamp(48px, 13.4vw, 58px);
}

.key-button.is-delete {
  color: #fff;
  background: #b9403d;
  border-color: rgba(120, 23, 22, 0.12);
  box-shadow: none;
}

.dock-footer {
  gap: 8px 14px;
  margin-top: 8px;
}

.hint-button {
  min-width: 74px;
  min-height: 44px;
}

.howto-button {
  min-height: 36px;
  border: 1px solid rgba(22, 127, 168, 0.2);
  border-radius: 6px;
  color: var(--river-blue);
  background: rgba(255, 253, 248, 0.72);
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 900;
}

.hint-order {
  color: #55585e;
  font-family: var(--ui-face);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.18;
}

.intro-modal,
.tutorial-modal {
  --modal-dim: rgba(10, 10, 10, 0.22);
}

.tutorial-modal {
  width: var(--app-width);
  height: var(--app-height);
  min-height: 0;
  overflow: hidden;
  background: var(--modal-dim);
  padding: max(18px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom));
}

.intro-modal::before,
.tutorial-modal::before {
  background: var(--modal-dim);
}

.tutorial-modal::before {
  content: none;
}

.intro-card,
.tutorial-card {
  border: 1px solid rgba(43, 48, 54, 0.2);
  border-radius: 6px;
  color: #101010;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(22, 28, 35, 0.18);
}

.intro-card {
  width: min(100%, 372px);
  max-height: min(600px, calc(var(--app-height) - 136px));
  gap: 12px;
  padding: 18px 18px 16px;
}

.tutorial-card {
  width: min(100%, 410px);
  height: min(620px, 72svh, calc(var(--app-height) - 132px));
  max-height: calc(var(--app-height) - 40px);
  gap: 13px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 18px 19px 16px;
}

.tutorial-logo-lockup .brand-mark,
.tutorial-logo-lockup .date-label {
  display: none;
}

.tutorial-wordmark {
  color: #0c0c0c;
  font-family: var(--display-face);
  font-size: clamp(33px, 10vw, 44px);
  line-height: 0.95;
  font-weight: 500;
  text-shadow: none;
}

.tutorial-kicker {
  color: #56585e;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.tutorial-author {
  color: #5d6065;
  font-family: var(--ui-face);
  font-weight: 400;
}

.tutorial-author a,
.tutorial-skip-scores {
  color: #0878c8;
}

.tutorial-close,
.intro-close {
  border: 1px solid rgba(43, 48, 54, 0.18);
  border-radius: 5px;
  color: #55585e;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.tutorial-card h2 {
  color: #101010;
  font-family: var(--display-face);
  font-size: clamp(29px, 8vw, 36px);
  line-height: 0.98;
  font-weight: 500;
}

.tutorial-section-title {
  color: #101010;
  font-family: var(--display-face);
  font-size: clamp(21px, 5.8vw, 26px);
  font-weight: 500;
  line-height: 1.02;
}

.tutorial-scoring-title {
  font-family: var(--ui-face);
  font-size: 16px;
  font-weight: 650;
}

.tutorial-copy,
.tutorial-copy-small,
.intro-copy {
  color: #3f4248;
  font-family: var(--ui-face);
  font-size: clamp(15.5px, 4.2vw, 18px);
  font-weight: 400;
  line-height: 1.28;
}

.tutorial-visual {
  padding: 4px 0;
}

.mini-board {
  grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr);
  gap: 7px 0;
}

.mini-bank-label {
  color: #5d6065;
  font-size: 11px;
  font-weight: 650;
}

.mini-bank-label-center {
  color: #5d6065;
}

.mini-clue {
  min-height: 40px;
  border: 1px solid rgba(43, 48, 54, 0.2);
  border-radius: 5px;
  color: #101010;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
  font-family: var(--ui-face);
  font-size: 13.8px;
  font-weight: 400;
}

.mini-clue.is-active {
  border-color: rgba(8, 120, 200, 0.38);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 0 0 2px rgba(8, 120, 200, 0.1);
}

.mini-bridge-lane {
  min-height: 40px;
  background: rgba(143, 216, 243, 0.75);
}

.mini-bridge {
  width: calc(100% + 18px);
  min-height: 30px;
  border: 1px solid rgba(43, 48, 54, 0.2);
  border-radius: 4px;
  color: #101010;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 3px 7px rgba(22, 28, 35, 0.15);
  font-family: var(--ui-face);
  font-size: 14px;
  font-weight: 650;
}

.mini-bridge.is-selected {
  border-color: rgba(8, 120, 200, 0.46);
  box-shadow: 0 0 0 2px rgba(8, 120, 200, 0.12), 0 4px 9px rgba(22, 28, 35, 0.16);
  transform: scale(1.03);
}

.mini-blank,
.mini-answer {
  border-bottom-color: #111;
}

.mini-answer {
  color: rgba(16, 16, 16, 0.38);
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 400;
}

.tutorial-start,
.intro-detail,
.tutorial-sound {
  border-radius: 4px;
  box-shadow: none;
  font-weight: 650;
}

.tutorial-start {
  min-height: 44px;
  color: #fff;
  background: #0878c8;
  font-size: 16px;
}

.intro-detail {
  min-height: 40px;
  border-color: rgba(8, 120, 200, 0.22);
  color: #0878c8;
  background: rgba(255, 255, 255, 0.66);
  font-size: 14px;
}

.player-stats,
.tutorial-scoring,
.tutorial-hints {
  border-color: rgba(43, 48, 54, 0.14);
}

.stats-grid span {
  border-color: rgba(43, 48, 54, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.6);
}

.score-rule,
.hint-rule {
  border-bottom-color: rgba(43, 48, 54, 0.14);
}

.score-rule strong,
.hint-rule strong {
  color: #0878c8;
}

.hint-rule strong {
  border-color: rgba(8, 120, 200, 0.28);
}

.score-rule span,
.hint-rule span {
  color: #4d5056;
  font-family: var(--ui-face);
  font-weight: 400;
}

@media (max-width: 430px) and (max-height: 740px) {
  .game-card {
    gap: 6px;
    padding: 10px 10px 10px;
  }

  .topbar {
    min-height: 74px;
  }

  h1 {
    font-size: clamp(31px, 9.4vw, 38px);
  }

  .progress-row {
    --keystone-box-h: 36px;
    min-height: calc(var(--keystone-box-h) + 19px);
    margin-bottom: 18px;
  }

  .keystone {
    gap: 7px;
  }

  .keystone-letter {
    width: 30px;
    height: 36px;
    font-size: 17px;
  }

  .board-wrap {
    gap: 9px;
    margin-bottom: 15px;
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, 48px);
    gap: 7px;
  }

  .clue-card {
    font-size: clamp(13px, 3.6vw, 15px);
  }

  .bridge-column {
    padding-top: 31px;
  }

  .waterline {
    top: 34px;
  }

  .bridge-plank,
  .bridge-span.is-empty .bridge-plank {
    min-height: 30px;
  }

  .status-line {
    min-height: 35px;
    font-size: 15px;
  }

  .key-button {
    height: 34px;
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .progress-row {
    grid-template-columns: 64px minmax(0, 1fr) 64px;
  }

  .progress-spacer::before,
  .keystone-label,
  .bank-heading,
  .bridge-column::before {
    font-size: 11px;
  }

  .keystone {
    gap: 5px;
  }

  .keystone-letter {
    width: 25px;
    height: 32px;
    font-size: 15px;
  }

  .input-row {
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 8px;
  }

  .key-button {
    width: clamp(28px, 8.4vw, 33px);
  }

  .key-button.is-wide {
    width: clamp(43px, 13vw, 50px);
  }
}

/* Redesign v1 fit pass: 390x844 iPhone viewport is the primary artboard. */
.game-card {
  --clue-row-size: clamp(51px, 6.6svh, 58px);
  height: var(--app-height);
  max-height: var(--app-height);
  gap: 5px;
  padding: 10px 14px 8px;
}

.topbar {
  min-height: 70px;
  padding: 0 50px;
  margin-bottom: 0;
}

h1 {
  font-size: clamp(30px, 8.8vw, 38px);
}

.icon-button,
.topbar .ghost-button {
  top: 13px;
  left: 4px;
}

.icon-button::after {
  font-size: 12px;
}

.game-timer {
  top: 19px;
  right: 4px;
}

.timer-digits {
  font-size: 17px;
}

.progress-row {
  --keystone-box-h: 38px;
  grid-template-columns: 74px minmax(0, 1fr) 68px;
  min-height: calc(var(--keystone-box-h) + 15px);
  padding: 0 4px;
  margin: -2px 0 14px;
}

.progress-spacer::before,
.keystone-label,
.progress-label {
  font-size: 11px;
}

#solvedCount {
  font-size: 27px;
}

.progress-total {
  font-size: 15px;
}

.keystone {
  gap: 8px;
}

.keystone-letter {
  width: 32px;
  height: 38px;
  font-size: 18px;
}

.board-wrap {
  grid-template-columns: minmax(0, 1fr) clamp(66px, 18vw, 78px) minmax(0, 1fr);
  gap: 10px;
  padding: 0;
  margin-bottom: 12px;
}

.bank-panel {
  gap: 7px;
}

.bank-heading {
  min-height: 22px;
  font-size: 12px;
}

.bank-heading span::before,
.bank-heading span::after {
  width: clamp(23px, 7vw, 42px);
  flex-basis: clamp(23px, 7vw, 42px);
}

.bank,
.span-stack {
  grid-template-rows: repeat(5, 51px);
  gap: 7px;
}

.clue-card {
  grid-template-columns: minmax(0, 1fr) 20px;
  padding: 7px 8px 7px 10px;
  font-size: clamp(13.5px, 3.45vw, 16px);
  line-height: 1.14;
}

.move-medallion,
.lock-medallion {
  width: 18px;
}

.move-medallion svg {
  width: 15px;
  height: 22px;
}

.bridge-column {
  padding-top: 29px;
}

.bridge-column::before {
  top: 3px;
  font-size: 12px;
}

.waterline {
  top: 31px;
  left: 18px;
  right: 18px;
}

.bridge-plank,
.bridge-span.is-empty .bridge-plank {
  width: calc(100% + 34px);
  min-height: 29px;
  font-size: 12px;
}

.answer-dock {
  gap: 6px;
  padding: 10px 4px 0;
}

.status-line {
  min-height: 34px;
  font-size: clamp(14px, 3.8vw, 17px);
  line-height: 1.18;
}

.input-row {
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 9px;
}

.answer-input {
  min-height: 39px;
}

.answer-input::placeholder {
  font-size: 13px;
}

.primary-button,
.hint-button {
  font-size: 16px;
}

.keyboard-panel {
  gap: 5px;
  padding-top: 2px;
}

.keyboard-row {
  gap: 3px;
}

.key-button {
  width: clamp(30px, 8.55vw, 37px);
  height: 35px;
  font-size: 16.5px;
}

.key-button.is-wide {
  width: clamp(47px, 13vw, 56px);
}

.dock-footer {
  gap: 7px 12px;
  margin-top: 4px;
}

.hint-button {
  min-width: 72px;
  min-height: 40px;
}

.hint-order {
  font-size: 14px;
  line-height: 1.14;
}

.intro-card,
.tutorial-card {
  background: #fff;
}

.intro-card {
  width: min(100%, 362px);
  max-height: min(530px, calc(var(--app-height) - 126px));
  gap: 10px;
  padding: 16px 17px 15px;
}

.tutorial-card {
  width: min(100%, 392px);
  height: min(620px, 72svh, calc(var(--app-height) - 132px));
  max-height: calc(var(--app-height) - 40px);
  gap: 11px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 17px 18px 15px;
}

.tutorial-wordmark {
  font-size: clamp(28px, 8.2vw, 37px);
}

.tutorial-card h2 {
  font-size: clamp(24px, 6.8vw, 31px);
  line-height: 1;
}

.tutorial-section-title {
  font-size: clamp(19px, 5.2vw, 23px);
}

.tutorial-copy,
.tutorial-copy-small,
.intro-copy {
  font-size: clamp(14.5px, 3.8vw, 16.5px);
  line-height: 1.26;
}

.mini-board {
  grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
}

.mini-clue {
  min-height: 37px;
  font-size: 13px;
}

.mini-bridge-lane {
  min-height: 37px;
}

.mini-bridge {
  min-height: 28px;
  font-size: 13px;
}

@media (max-width: 430px) and (max-height: 760px) {
  .game-card {
    --clue-row-size: clamp(43px, 6.35svh, 47px);
    padding: 8px 12px 7px;
  }

  .topbar {
    min-height: 62px;
  }

  h1 {
    font-size: clamp(28px, 8.2vw, 35px);
  }

  .progress-row {
    --keystone-box-h: 35px;
    margin-bottom: 10px;
  }

  .keystone {
    gap: 6px;
  }

  .keystone-letter {
    width: 28px;
    height: 35px;
  }

  .board-wrap {
    gap: 8px;
    margin-bottom: 9px;
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, 47px);
    gap: 6px;
  }

  .clue-card {
    font-size: clamp(12.5px, 3.45vw, 14.5px);
  }

  .answer-dock {
    gap: 5px;
  }

  .status-line {
    min-height: 30px;
    font-size: 13.5px;
  }

  .answer-input {
    min-height: 36px;
  }

  .key-button {
    height: 32px;
    font-size: 15.5px;
  }

  .hint-button {
    min-height: 36px;
  }

  .hint-order {
    font-size: 13px;
  }
}

/* Redesign v1 alignment pass. */
.topbar {
  min-height: 66px;
  padding-right: 60px;
}

h1 {
  font-size: clamp(27px, 7.65vw, 34px);
}

.game-timer {
  top: 18px;
  right: 8px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: start;
  padding: 0 4px;
}

.progress-copy {
  position: absolute;
  right: 5px;
  bottom: 0;
  grid-column: auto;
  grid-row: auto;
  align-self: auto;
  justify-self: auto;
  height: var(--keystone-box-h);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: start;
  gap: 0;
}

.progress-score {
  align-items: flex-end;
}

#solvedCount {
  font-size: 27px;
}

.progress-total {
  font-size: 14px;
  line-height: 1;
  padding-bottom: 2px;
}

.progress-label {
  align-self: end;
  font-size: 11px;
  line-height: 1;
}

.progress-spacer,
.progress-spacer::before {
  display: none;
  content: none;
}

.keystone-wrap {
  grid-column: 1;
  grid-row: 1;
  gap: 8px;
}

.keystone-label {
  color: #56585e;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.bridge-plank,
.bridge-span.is-empty .bridge-plank {
  width: calc(100% + 8px);
}

.bridge-span.is-built .bridge-plank {
  width: calc(100% + 30px);
  min-height: 31px;
}

.bridge-span.is-built .word-label {
  font-size: 1.06em;
}

.word-label.is-long-word {
  font-size: 0.86em;
  letter-spacing: -0.01em;
}

.bridge-span.is-built .word-label.is-long-word {
  font-size: 0.94em;
}

.waterline {
  bottom: 0;
  left: 10px;
  right: 10px;
}

.bridge-span.is-selected .bridge-plank,
.bridge-span.is-empty.is-selected .bridge-plank {
  transform: scale(1.015);
}

.key-button.is-delete {
  display: grid;
  place-items: center;
}

.delete-icon {
  width: 28px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intro-card .tutorial-section-title,
.tutorial-card .tutorial-section-title,
.tutorial-card h2 {
  font-family: "Iowan Old Style", Charter, Georgia, serif;
  font-weight: 650;
  letter-spacing: 0;
}

.tutorial-card h2 {
  font-size: clamp(19px, 5vw, 24px);
  line-height: 1.02;
}

.tutorial-card .tutorial-section-title {
  font-size: clamp(16px, 4.15vw, 19px);
  line-height: 1.02;
}

.intro-card .tutorial-section-title {
  font-size: clamp(16px, 4.25vw, 19px);
  line-height: 1.04;
}

.mini-board {
  position: relative;
}

.mini-board::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 0;
  left: 50%;
  width: 76px;
  border-radius: 0;
  background:
    repeating-linear-gradient(164deg, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 12px),
    rgba(143, 216, 243, 0.62);
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

.mini-board > * {
  position: relative;
  z-index: 1;
}

.mini-bridge-lane {
  background: transparent;
  z-index: 3;
}

.mini-clue {
  position: relative;
  z-index: 2;
}

.mini-bridge {
  position: relative;
  z-index: 4;
}

.intro-card {
  width: min(100%, 392px);
  max-height: none;
  gap: 8px;
}

.intro-card .tutorial-visual {
  padding-top: 0;
}

.intro-card .tutorial-section-title {
  font-size: clamp(16px, 4.25vw, 19px);
}

.intro-card .intro-copy {
  font-size: clamp(13.2px, 3.5vw, 15px);
  line-height: 1.18;
}

.intro-actions {
  gap: 7px;
}

.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;
}

.tutorial-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  margin-top: 5px;
  padding-right: 42px;
}

.tutorial-meta-row .tutorial-author {
  justify-self: start;
  margin: 0;
  text-align: left;
}

.tutorial-meta-row .tutorial-skip-scores {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.tutorial-header,
.tutorial-header-copy,
.tutorial-main,
.tutorial-demo-panel,
.tutorial-flow-panel,
.tutorial-score-panel,
.tutorial-hints-panel,
.tutorial-footer,
.tutorial-stats-panel {
  display: grid;
  gap: 9px;
}

.tutorial-header {
  gap: 8px;
}

.tutorial-header-copy h2 {
  margin: 0;
}

.tutorial-summary,
.tutorial-demo-caption {
  margin: 0;
}

.tutorial-demo-panel .tutorial-section-title,
.tutorial-score-panel .tutorial-section-title,
.tutorial-hints-panel .tutorial-section-title,
.tutorial-stats-panel .tutorial-section-title {
  margin-bottom: 0;
}

.tutorial-footer-actions {
  display: grid;
  gap: 8px;
}

.tutorial-header-actions,
.tutorial-header-start {
  display: none;
}

.tutorial-flow-start,
.tutorial-footer-author,
.tutorial-flow-author,
.tutorial-right-author {
  display: none;
}

.bridge-span.is-empty .word-label.is-blank-label {
  width: min(78%, 72px);
}

.bridge-span.is-empty .blank-underline {
  width: 86%;
}

.key-button {
  height: 37px;
  font-size: 18px;
}

.bridge-span.is-selected .bridge-plank,
.bridge-span.is-empty.is-selected .bridge-plank {
  width: calc(100% + 18px);
  transform: translateZ(0) scale(1.025);
  z-index: 4;
  will-change: transform;
}

.bridge-span.is-empty.is-selected .word-label.is-blank-label {
  width: min(86%, 82px);
}

.bridge-span.is-empty.is-selected .blank-underline {
  width: 100%;
}

@media (min-width: 431px) and (max-height: 760px) {
  .game-card {
    --clue-row-size: clamp(43px, 6.6svh, 51px);
    gap: 5px;
    padding: 8px 13px 7px;
  }

  .topbar {
    min-height: 66px;
    padding: 0 56px;
  }

  h1 {
    font-size: clamp(30px, 4vw, 38px);
  }

  .icon-button,
  .topbar .ghost-button {
    top: 7px;
  }

  .game-timer {
    top: 12px;
  }

  .progress-row {
    --keystone-box-h: 36px;
    min-height: calc(var(--keystone-box-h) + 14px);
    margin: -2px 0 10px;
  }

  .keystone-wrap {
    gap: 6px;
  }

  .keystone {
    gap: 8px;
  }

  .keystone-letter {
    width: 31px;
    height: 36px;
    font-size: 17px;
  }

  .progress-spacer::before,
  .keystone-label,
  .progress-label {
    font-size: 11px;
  }

  #solvedCount {
    font-size: 25px;
  }

  .progress-total {
    font-size: 15px;
  }

  .board-wrap {
    grid-template-columns: minmax(0, 1fr) clamp(68px, 16vw, 80px) minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 8px;
  }

  .bank-panel {
    gap: 6px;
  }

  .bank-heading {
    min-height: 20px;
    font-size: 11px;
  }

  .bank-heading span {
    gap: 8px;
  }

  .bank-heading span::before,
  .bank-heading span::after {
    width: clamp(24px, 7vw, 42px);
    flex-basis: clamp(24px, 7vw, 42px);
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, 43px);
    gap: 6px;
  }

  .clue-card {
    padding: 6px 8px 6px 10px;
    font-size: clamp(13px, 1.15vw, 15px);
    line-height: 1.1;
  }

  .bridge-column {
    padding-top: 26px;
  }

  .bridge-column::before {
    top: 2px;
    font-size: 11px;
  }

  .waterline {
    top: 28px;
    right: 14px;
    bottom: -8px;
    left: 14px;
  }

  .bridge-plank,
  .bridge-span.is-empty .bridge-plank {
    width: calc(100% + 22px);
    min-height: 26px;
    font-size: 11px;
  }

  .bridge-span.is-selected .bridge-plank,
  .bridge-span.is-empty.is-selected .bridge-plank {
    width: calc(100% + 30px);
  }

  .answer-dock {
    gap: 4px;
    padding: 8px 4px 0;
  }

  .status-line {
    min-height: 31px;
    font-size: clamp(13px, 1.35vw, 16px);
    line-height: 1.12;
  }

  .input-row {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 9px;
  }

  .answer-input {
    min-height: 35px;
    font-size: 15px;
  }

  .answer-input::placeholder {
    font-size: 12px;
  }

  .primary-button,
  .hint-button {
    font-size: 15px;
  }

  .keyboard-panel {
    gap: 4px;
    padding-top: 1px;
  }

  .keyboard-row {
    gap: 3px;
  }

  .key-button {
    width: clamp(29px, 7.4vw, 35px);
    height: 32px;
    font-size: 15.5px;
  }

  .key-button.is-wide {
    width: clamp(45px, 10vw, 54px);
  }

  .delete-icon {
    width: 24px;
    height: 18px;
  }

  .dock-footer {
    gap: 6px 10px;
    margin-top: 4px;
  }

  .hint-button {
    min-width: 68px;
    min-height: 34px;
  }

  .hint-order {
    font-size: 12.5px;
    line-height: 1.08;
  }
}

@media (max-width: 430px) and (max-height: 760px) {
  .topbar {
    min-height: 62px;
    padding-right: 54px;
  }

  h1 {
    font-size: clamp(26px, 7.35vw, 32px);
  }

  .timer-digits {
    font-size: 16px;
  }

  .bridge-plank,
  .bridge-span.is-empty .bridge-plank {
    width: calc(100% + 6px);
  }

  .key-button {
    height: 36px;
    font-size: 17.5px;
  }
}

@media (max-width: 430px) and (max-height: 700px) {
  .game-card {
    --clue-row-size: clamp(36px, 6.25svh, 42px);
    gap: 4px;
    padding: 7px 10px 6px;
  }

  .topbar {
    min-height: 55px;
    padding-left: 48px;
    padding-right: 48px;
  }

  h1 {
    font-size: clamp(25px, 7.1vw, 30px);
  }

  .icon-button,
  .topbar .ghost-button {
    top: 9px;
    left: 2px;
  }

  .icon-button svg {
    width: 27px;
    height: 27px;
  }

  .icon-button::after {
    font-size: 11px;
  }

  .game-timer {
    top: 14px;
    right: 4px;
  }

  .timer-digits {
    font-size: 15px;
  }

  .progress-row {
    --keystone-box-h: 32px;
    min-height: calc(var(--keystone-box-h) + 12px);
    margin: -1px 0 7px;
    padding: 0 2px;
  }

  .keystone-wrap {
    gap: 5px;
  }

  .keystone-label,
  .progress-label {
    font-size: 10px;
  }

  .keystone {
    gap: 6px;
  }

  .keystone-letter {
    width: 27px;
    height: 32px;
    font-size: 16px;
  }

  .progress-copy {
    right: 2px;
    height: var(--keystone-box-h);
  }

  #solvedCount {
    font-size: 24px;
  }

  .progress-total {
    font-size: 13px;
  }

  .board-wrap {
    grid-template-columns: minmax(0, 1fr) clamp(62px, 17vw, 70px) minmax(0, 1fr);
    gap: 7px;
    margin-bottom: 7px;
  }

  .bank-panel {
    gap: 5px;
  }

  .bank-heading {
    min-height: 19px;
    font-size: 11px;
  }

  .bank-heading span {
    gap: 7px;
  }

  .bank-heading span::before,
  .bank-heading span::after {
    width: clamp(20px, 6.5vw, 34px);
    flex-basis: clamp(20px, 6.5vw, 34px);
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, 42px);
    gap: 5px;
  }

  .clue-card {
    grid-template-columns: minmax(0, 1fr) 18px;
    padding: 6px 7px 6px 8px;
    font-size: clamp(12px, 3.35vw, 13.5px);
    line-height: 1.1;
  }

  .move-medallion,
  .lock-medallion {
    width: 16px;
  }

  .move-medallion svg {
    width: 14px;
    height: 20px;
  }

  .bridge-column {
    padding-top: 25px;
  }

  .bridge-column::before {
    top: 2px;
    font-size: 11px;
  }

  .waterline {
    top: 27px;
    left: 9px;
    right: 9px;
    bottom: -8px;
  }

  .bridge-plank,
  .bridge-span.is-empty .bridge-plank {
    width: calc(100% + 4px);
    min-height: 26px;
    font-size: 11px;
  }

  .bridge-span.is-selected .bridge-plank,
  .bridge-span.is-empty.is-selected .bridge-plank {
    width: calc(100% + 14px);
  }

  .blank-underline {
    width: 82%;
  }

  .answer-dock {
    gap: 4px;
    padding: 6px 0 0;
  }

  .status-line {
    min-height: 28px;
    font-size: clamp(13px, 3.55vw, 14.5px);
    line-height: 1.1;
  }

  .input-row {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 8px;
  }

  .answer-input {
    min-height: 34px;
    font-size: 15px;
  }

  .answer-input::placeholder {
    font-size: 12.5px;
  }

  .primary-button,
  .hint-button {
    font-size: 15px;
  }

  .keyboard-panel {
    gap: 4px;
    padding-top: 1px;
  }

  .keyboard-row {
    gap: 2.5px;
  }

  .key-button {
    width: clamp(29px, 8.4vw, 34px);
    height: 33px;
    font-size: 16px;
  }

  .key-button.is-wide {
    width: clamp(46px, 13vw, 54px);
  }

  .dock-footer {
    gap: 7px 11px;
    margin-top: 4px;
  }

  .hint-button {
    min-width: 70px;
    min-height: 34px;
  }

  .hint-order {
    font-size: 13px;
    line-height: 1.1;
  }
}

@media (max-width: 430px) and (max-height: 590px) {
  .game-card {
    --clue-row-size: clamp(32px, 6.1svh, 36px);
    gap: 3px;
    padding: 6px 10px 5px;
  }

  .topbar {
    min-height: 50px;
    padding-left: 44px;
    padding-right: 44px;
  }

  h1 {
    font-size: clamp(23px, 6.7vw, 28px);
  }

  .icon-button,
  .topbar .ghost-button {
    top: 6px;
    left: 2px;
  }

  .icon-button svg {
    width: 25px;
    height: 25px;
  }

  .icon-button::after {
    font-size: 10px;
  }

  .game-timer {
    top: 10px;
    right: 2px;
  }

  .timer-digits {
    font-size: 14px;
  }

  .progress-row {
    --keystone-box-h: 30px;
    min-height: calc(var(--keystone-box-h) + 9px);
    margin: 0 0 4px;
    padding: 0;
  }

  .keystone-wrap {
    gap: 4px;
  }

  .keystone-label,
  .progress-label {
    font-size: 9.5px;
  }

  .keystone {
    gap: 5px;
  }

  .keystone-letter {
    width: 25px;
    height: 30px;
    font-size: 15px;
  }

  .progress-copy {
    right: 0;
  }

  #solvedCount {
    font-size: 22px;
  }

  .progress-total {
    font-size: 12px;
  }

  .board-wrap {
    grid-template-columns: minmax(0, 1fr) clamp(56px, 16vw, 64px) minmax(0, 1fr);
    gap: 6px;
    margin-bottom: 4px;
  }

  .bank-panel {
    gap: 4px;
  }

  .bank-heading {
    min-height: 16px;
    font-size: 10px;
  }

  .bank-heading span {
    gap: 6px;
  }

  .bank-heading span::before,
  .bank-heading span::after {
    width: clamp(16px, 5.8vw, 29px);
    flex-basis: clamp(16px, 5.8vw, 29px);
  }

  .bank,
  .span-stack {
    grid-template-rows: repeat(5, 36px);
    gap: 4px;
  }

  .clue-card {
    grid-template-columns: minmax(0, 1fr) 15px;
    padding: 4px 5px 4px 6px;
    font-size: clamp(11px, 3.05vw, 12.3px);
    line-height: 1.06;
  }

  .move-medallion,
  .lock-medallion {
    width: 14px;
  }

  .move-medallion svg {
    width: 12px;
    height: 17px;
  }

  .bridge-column {
    padding-top: 20px;
  }

  .bridge-column::before {
    top: 1px;
    font-size: 10px;
  }

  .waterline {
    top: 21px;
    left: 8px;
    right: 8px;
    bottom: -7px;
  }

  .bridge-plank,
  .bridge-span.is-empty .bridge-plank {
    width: calc(100% + 2px);
    min-height: 22px;
    font-size: 10px;
  }

  .bridge-span.is-selected .bridge-plank,
  .bridge-span.is-empty.is-selected .bridge-plank {
    width: calc(100% + 10px);
  }

  .blank-underline {
    width: 80%;
  }

  .answer-dock {
    gap: 3px;
    padding: 4px 0 0;
  }

  .status-line {
    min-height: 25px;
    font-size: clamp(11.6px, 3.2vw, 12.5px);
    line-height: 1.05;
  }

  .input-row {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 7px;
  }

  .answer-input {
    min-height: 31px;
    font-size: 14px;
  }

  .answer-input::placeholder {
    font-size: 11.5px;
  }

  .primary-button,
  .hint-button {
    font-size: 14px;
  }

  .keyboard-panel {
    gap: 3px;
    padding-top: 1px;
  }

  .keyboard-row {
    gap: 2.5px;
  }

  .key-button {
    width: clamp(27px, 8vw, 31px);
    height: 29px;
    font-size: 15px;
  }

  .key-button.is-wide {
    width: clamp(42px, 12.5vw, 48px);
  }

  .delete-icon {
    width: 24px;
    height: 18px;
  }

  .dock-footer {
    gap: 5px 9px;
    margin-top: 3px;
  }

  .hint-button {
    min-width: 66px;
    min-height: 31px;
  }

  .hint-order {
    font-size: 12px;
    line-height: 1.05;
  }
}

@media (max-width: 520px) and (pointer: coarse) {
  html,
  body {
    height: auto;
    min-height: calc(var(--app-height) + 96px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .phone-shell {
    height: auto;
    min-height: calc(var(--app-height) + 96px);
    overflow: visible;
    overscroll-behavior-y: contain;
    padding-bottom: calc(max(6px, env(safe-area-inset-bottom)) + 96px);
  }

  .game-card {
    height: var(--app-height);
    min-height: 0;
    max-height: var(--app-height);
    overflow: hidden;
    touch-action: manipulation;
  }

  .intro-card,
  .tutorial-card,
  .score-card {
    touch-action: pan-y;
  }
}

.bank,
.span-stack {
  grid-template-rows: repeat(5, var(--clue-row-size));
}

.dock-footer {
  margin-top: auto;
}

.game-card.is-complete-board {
  grid-template-rows: auto auto auto auto;
  align-content: start;
}

.game-card.is-complete-board .progress-copy {
  display: none;
}

.game-card.is-complete-board .board-wrap {
  margin-bottom: 18px;
}

.game-card.is-complete-board .answer-dock {
  align-self: start;
  align-content: start;
  align-items: start;
  margin-top: 0;
}

.answer-dock.is-complete .dock-footer {
  align-self: start;
  height: auto;
}

.waterline {
  bottom: calc(-1 * var(--river-extension, 0px));
}

.lesson-demo {
  padding: 2px 0 4px;
}

.align-demo {
  --demo-bridge-width: 78px;
  --demo-shift: -49px;
  --demo-cycle: 10s;
  position: relative;
  display: grid;
  gap: 7px;
  isolation: isolate;
  padding: 2px 0;
}

.demo-labels,
.demo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--demo-bridge-width) minmax(0, 1fr);
  align-items: center;
}

.demo-labels {
  min-height: 16px;
  color: #5d6065;
  font-family: var(--ui-face);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.demo-river {
  position: absolute;
  z-index: -1;
  top: 24px;
  bottom: 2px;
  left: 50%;
  width: var(--demo-bridge-width);
  transform: translateX(-50%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 8px, transparent 9px 22px) 0 0 / 42px 42px,
    linear-gradient(180deg, rgba(90, 202, 232, 0.66), rgba(52, 174, 212, 0.78));
  box-shadow: inset 0 0 0 1px rgba(70, 176, 206, 0.22);
}

.demo-row {
  min-height: 42px;
}

.demo-clue {
  position: relative;
  z-index: 2;
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(43, 48, 54, 0.2);
  border-radius: 5px;
  color: #101010;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 5px 12px rgba(22, 28, 35, 0.09);
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
}

.demo-left {
  margin-right: -2px;
}

.demo-right {
  margin-left: -2px;
}

.demo-muted {
  opacity: 0.54;
}

.demo-span {
  position: relative;
  z-index: 4;
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(43, 48, 54, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 5px 12px rgba(22, 28, 35, 0.09);
}

.demo-blank {
  width: 42px;
  height: 14px;
  border-bottom: 2px solid #111;
}

.demo-target-span {
  animation: demoTargetBridgePulse var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-target-span::after {
  content: "";
  position: absolute;
  inset: -8px -15px;
  border-radius: 15px;
  background: rgba(255, 231, 158, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0.45);
  animation: demoLockRipple var(--demo-cycle) var(--ease) infinite;
}

.demo-source-span {
  animation: demoSourceBridgePulse var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-target-span .demo-blank {
  animation: demoTargetBlank var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-answer {
  position: absolute;
  inset: 0;
  color: #3a2515;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ui-face);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.demo-answer span:first-child {
  color: inherit;
  text-shadow: none;
}

.demo-answer span {
  opacity: 0;
  transform: translateY(4px);
  animation: demoAnswerTypeM var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-answer span:nth-child(2) {
  animation-name: demoAnswerTypeU;
}

.demo-answer span:nth-child(3) {
  animation-name: demoAnswerTypeG;
}

.demo-moving {
  z-index: 2;
  color: #101010;
  animation: demoMoveUp var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-swap-out {
  animation: demoMoveDown var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-target {
  animation: demoTargetPulse var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-cursor {
  position: absolute;
  z-index: 3;
  right: 14px;
  top: 100px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(8, 120, 200, 0.92);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 15px rgba(8, 120, 200, 0.22);
  animation: demoCursorDrag var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.tutorial-steps {
  display: grid;
  gap: 8px;
}

.lesson-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px 11px 10px 42px;
  border: 1px solid rgba(43, 48, 54, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.lesson-number {
  position: absolute;
  top: 11px;
  left: 11px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0878c8;
  font-family: var(--ui-face);
  font-size: 12px;
  font-weight: 900;
}

.lesson-card .tutorial-section-title {
  margin: 0;
}

.lesson-card .tutorial-copy {
  margin: 0;
}

.intro-rules-grid {
  display: grid;
  gap: 8px;
}

.intro-rule-card {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(43, 48, 54, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.intro-rule-card .tutorial-section-title,
.intro-rule-card .tutorial-copy {
  margin: 0;
}

@media (max-width: 430px) {
  .intro-modal {
    --intro-modal-top-offset: clamp(128px, 21svh, 184px);
    place-items: start center;
    padding: max(var(--intro-modal-top-offset), env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .intro-card {
    max-height: calc(var(--app-height) - var(--intro-modal-top-offset) - 10px);
    gap: 6px;
    padding: 12px 14px 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .intro-card .tutorial-kicker {
    font-size: 17px;
  }

  .intro-card .align-demo {
    --demo-bridge-width: 70px;
    --demo-shift: -40px;
    gap: 4px;
  }

  .intro-card .demo-labels {
    min-height: 13px;
    font-size: 9.2px;
  }

  .intro-card .demo-row {
    min-height: 34px;
  }

  .intro-card .demo-clue {
    min-height: 33px;
    padding: 4px 5px;
    font-size: 11.2px;
  }

  .intro-card .demo-span {
    min-height: 24px;
  }

  .intro-card .demo-cursor {
    top: 78px;
    right: 13px;
    width: 16px;
    height: 16px;
  }

  .intro-card .lesson-card {
    min-height: 0;
    padding: 7px 8px 7px 34px;
  }

  .intro-card .lesson-number {
    top: 8px;
    left: 8px;
    width: 19px;
    height: 19px;
    font-size: 10.5px;
  }

  .intro-card .tutorial-section-title {
    font-size: clamp(15px, 4vw, 17px);
  }

  .intro-card .intro-copy {
    font-size: clamp(12.2px, 3.35vw, 14px);
    line-height: 1.12;
  }

  .intro-rule-card {
    padding: 7px;
  }

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

  .intro-rule-card .tutorial-section-title {
    font-size: 14px;
  }

  .intro-rule-card .intro-copy {
    font-size: 10.8px;
    line-height: 1.08;
  }

  .intro-card .intro-actions {
    position: static;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  .intro-card .tutorial-start,
  .intro-card .intro-detail {
    min-height: 34px;
  }

  .intro-card .intro-actions {
    gap: 5px;
  }
}

@keyframes demoMoveUp {
  0%, 8% {
    transform: translateY(0);
    color: #101010;
    font-weight: 400;
    border-color: rgba(43, 48, 54, 0.2);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 5px 12px rgba(22, 28, 35, 0.09);
  }
  14% {
    transform: translateY(0) scale(1.035);
    color: #101010;
    font-weight: 400;
    border-color: rgba(8, 120, 200, 0.56);
    background: #fff;
    box-shadow: 0 15px 26px rgba(29, 36, 44, 0.16), 0 0 0 2px rgba(8, 120, 200, 0.14);
  }
  28%, 30% {
    transform: translateY(var(--demo-shift)) scale(1.035);
    color: #101010;
    font-weight: 400;
    border-color: rgba(8, 120, 200, 0.56);
    background: #fff;
    box-shadow: 0 15px 26px rgba(29, 36, 44, 0.16), 0 0 0 2px rgba(8, 120, 200, 0.14);
  }
  34%, 67.99% {
    transform: translateY(var(--demo-shift)) scale(1);
    color: #101010;
    font-weight: 400;
    border-color: rgba(8, 120, 200, 0.44);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 0 2px rgba(8, 120, 200, 0.12), 0 5px 12px rgba(22, 28, 35, 0.09);
  }
  68% {
    transform: translateY(var(--demo-shift)) scale(1);
    color: #101010;
    font-weight: 400;
    border-color: rgba(8, 120, 200, 0.44);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 0 2px rgba(8, 120, 200, 0.12), 0 5px 12px rgba(22, 28, 35, 0.09);
    filter: brightness(1);
  }
  70.5% {
    transform: translateY(calc(var(--demo-shift) - 2px)) scale(1.025);
    color: #101010;
    font-weight: 650;
    border-color: rgba(98, 76, 48, 0.24);
    background: #f4ead6;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      inset 0 -1px 0 rgba(116, 80, 39, 0.1),
      0 13px 24px rgba(47, 31, 17, 0.16);
    filter: brightness(1.06);
  }
  72.5% {
    transform: translateY(calc(var(--demo-shift) + 1px)) scale(0.99);
    color: #101010;
    font-weight: 700;
    border-color: rgba(98, 76, 48, 0.24);
    background: #f4ead6;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      inset 0 -1px 0 rgba(116, 80, 39, 0.1),
      0 7px 15px rgba(47, 31, 17, 0.1);
    filter: brightness(1.02);
  }
  75.2%, 97% {
    transform: translateY(var(--demo-shift)) scale(1);
    color: #101010;
    font-weight: 700;
    border-color: rgba(98, 76, 48, 0.24);
    background: #f4ead6;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      inset 0 -1px 0 rgba(116, 80, 39, 0.1),
      0 7px 15px rgba(47, 31, 17, 0.1);
    filter: brightness(1);
  }
  100% {
    transform: translateY(0);
    color: #101010;
    font-weight: 400;
    border-color: rgba(43, 48, 54, 0.2);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 5px 12px rgba(22, 28, 35, 0.09);
  }
}

@keyframes demoMoveDown {
  0%, 14% {
    transform: translateY(0);
    opacity: 1;
  }
  28%, 97% {
    transform: translateY(calc(-1 * var(--demo-shift)));
    opacity: 0.58;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes demoTargetPulse {
  0%, 30%, 100% {
    font-weight: 400;
    border-color: rgba(43, 48, 54, 0.2);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 5px 12px rgba(22, 28, 35, 0.09);
    transform: scale(1);
    filter: brightness(1);
  }
  36%, 67.99% {
    font-weight: 400;
    border-color: rgba(8, 120, 200, 0.48);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 0 3px rgba(8, 120, 200, 0.12), 0 6px 15px rgba(22, 28, 35, 0.12);
    transform: scale(1);
    filter: brightness(1);
  }
  68% {
    font-weight: 400;
    border-color: rgba(8, 120, 200, 0.48);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 0 3px rgba(8, 120, 200, 0.12), 0 6px 15px rgba(22, 28, 35, 0.12);
    transform: scale(1);
    filter: brightness(1);
  }
  70.5% {
    font-weight: 650;
    border-color: rgba(98, 76, 48, 0.24);
    background: #f4ead6;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      inset 0 -1px 0 rgba(116, 80, 39, 0.1),
      0 13px 24px rgba(47, 31, 17, 0.16);
    transform: translateY(-2px) scale(1.025);
    filter: brightness(1.06);
  }
  72.5% {
    font-weight: 700;
    border-color: rgba(98, 76, 48, 0.24);
    background: #f4ead6;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      inset 0 -1px 0 rgba(116, 80, 39, 0.1),
      0 7px 15px rgba(47, 31, 17, 0.1);
    transform: translateY(1px) scale(0.99);
    filter: brightness(1.02);
  }
  75.2%, 97% {
    font-weight: 700;
    border-color: rgba(98, 76, 48, 0.24);
    background: #f4ead6;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      inset 0 -1px 0 rgba(116, 80, 39, 0.1),
      0 7px 15px rgba(47, 31, 17, 0.1);
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes demoSourceBridgePulse {
  0%, 18% {
    border-color: rgba(8, 120, 200, 0.5);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 0 3px rgba(8, 120, 200, 0.12), 0 6px 15px rgba(22, 28, 35, 0.12);
    transform: scale(1.05);
  }
  32%, 100% {
    border-color: rgba(43, 48, 54, 0.18);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 5px 12px rgba(22, 28, 35, 0.09);
    transform: scale(1);
  }
}

@keyframes demoTargetBridgePulse {
  0%, 30%, 100% {
    border-color: rgba(43, 48, 54, 0.18);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 5px 12px rgba(22, 28, 35, 0.09);
    transform: scale(1);
  }
  36%, 67.99% {
    border-color: rgba(8, 120, 200, 0.5);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 0 3px rgba(8, 120, 200, 0.12), 0 6px 15px rgba(22, 28, 35, 0.12);
    transform: scale(1.05);
    opacity: 1;
    filter: brightness(1);
  }
  68% {
    border-color: rgba(117, 77, 37, 0.3);
    background: #e6bb70;
    box-shadow: 0 0 12px rgba(255, 223, 150, 0.28), 0 11px 20px rgba(82, 47, 22, 0.2);
    transform: translateY(9px) scaleX(0.22);
    opacity: 0;
    filter: brightness(1);
  }
  70.5% {
    border-color: rgba(117, 77, 37, 0.3);
    background: #e6bb70;
    box-shadow: 0 0 12px rgba(255, 223, 150, 0.28), 0 11px 20px rgba(82, 47, 22, 0.2);
    transform: translateY(-3px) scaleX(1.07);
    opacity: 1;
    filter: brightness(1.12);
  }
  72.5% {
    border-color: rgba(117, 77, 37, 0.3);
    background: #e6bb70;
    box-shadow: 0 0 12px rgba(255, 223, 150, 0.28), 0 11px 20px rgba(82, 47, 22, 0.2);
    transform: translateY(1px) scaleX(0.98);
    opacity: 1;
    filter: brightness(1.05);
  }
  75.2%, 97% {
    border-color: rgba(117, 77, 37, 0.3);
    background: #e6bb70;
    box-shadow: 0 0 12px rgba(255, 223, 150, 0.28), 0 11px 20px rgba(82, 47, 22, 0.2);
    transform: scale(1.08);
    opacity: 1;
    filter: brightness(1);
  }
}

@keyframes demoTargetBlank {
  0%, 64% {
    opacity: 1;
    width: 42px;
    transform: translateY(0);
  }
  67.99% {
    opacity: 1;
    width: 48px;
    transform: translateY(0);
  }
  68%, 97% {
    opacity: 0;
    width: 48px;
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    width: 42px;
    transform: translateY(0);
  }
}

@keyframes demoAnswerTypeM {
  0%, 38% {
    opacity: 0;
    transform: translateY(4px);
  }
  43%, 97% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes demoAnswerTypeU {
  0%, 46% {
    opacity: 0;
    transform: translateY(4px);
  }
  51%, 97% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes demoAnswerTypeG {
  0%, 54% {
    opacity: 0;
    transform: translateY(4px);
  }
  59%, 97% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes demoLockRipple {
  0%, 67.99%, 100% {
    opacity: 0;
    transform: scaleX(0.45);
  }
  68% {
    opacity: 0;
    transform: scaleX(0.45);
  }
  70.52% {
    opacity: 1;
    transform: scaleX(0.76);
  }
  75.2% {
    opacity: 0;
    transform: scaleX(1.32);
  }
}

@keyframes demoCursorDrag {
  0%, 8% {
    opacity: 0;
    transform: translateY(0) scale(0.92);
  }
  14% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  28%, 30% {
    opacity: 1;
    transform: translateY(var(--demo-shift)) scale(1);
  }
  34%, 97% {
    opacity: 0;
    transform: translateY(var(--demo-shift)) scale(0.78);
  }
  100% {
    opacity: 0;
    transform: translateY(0) scale(0.92);
  }
}

@media (min-width: 760px) {
  .intro-modal {
    place-items: start center;
    padding: clamp(34px, 7svh, 72px) 24px 24px;
  }

  .intro-card {
    width: min(1040px, calc(100vw - 48px));
    max-height: min(680px, calc(var(--app-height) - 64px));
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1fr);
    column-gap: 32px;
    row-gap: 14px;
    padding: 26px 30px 24px;
  }

  .intro-card .tutorial-kicker {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .intro-card .lesson-demo {
    grid-column: 1;
    grid-row: 2 / span 2;
    align-self: start;
    padding: 14px;
    border: 1px solid rgba(43, 48, 54, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  .intro-steps,
  .intro-rules-grid,
  .intro-actions {
    grid-column: 2;
  }

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

  .tutorial-card {
    width: min(1080px, calc(100vw - 64px));
    height: min(720px, calc(var(--app-height) - 64px));
    max-height: calc(var(--app-height) - 64px);
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1fr);
    align-content: start;
    column-gap: 34px;
    row-gap: 12px;
    padding: 26px 30px 24px;
  }

  .tutorial-logo-lockup,
  .tutorial-meta-row {
    grid-column: 1 / -1;
  }

  .tutorial-logo-lockup {
    justify-self: start;
  }

  .tutorial-wordmark {
    font-size: 42px;
  }

  .tutorial-card > .lesson-demo {
    grid-column: 1;
    grid-row: 3 / span 5;
    align-self: start;
    position: sticky;
    top: 0;
    min-height: 360px;
    padding: 14px;
    border: 1px solid rgba(43, 48, 54, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  .tutorial-card > .tutorial-steps,
  .tutorial-card > .tutorial-section-title,
  .tutorial-card > .tutorial-copy,
  .tutorial-card > .tutorial-hints,
  .tutorial-card > .tutorial-scoring,
  .tutorial-card > .tutorial-start,
  .tutorial-card > .tutorial-sound,
  .tutorial-card > .player-stats {
    grid-column: 2;
  }

  .tutorial-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lesson-card {
    min-height: 122px;
    padding: 38px 12px 12px;
  }

  .lesson-number {
    top: 11px;
  }

  .align-demo {
    --demo-bridge-width: 92px;
    --demo-shift: -56px;
    gap: 10px;
    padding-top: 4px;
  }

  .demo-row {
    min-height: 48px;
  }

  .demo-clue {
    min-height: 46px;
    font-size: 14.5px;
  }

  .demo-span {
    min-height: 34px;
  }

  .demo-cursor {
    top: 116px;
  }

  body.is-desktop-input .intro-card {
    width: min(1280px, calc(100vw - 40px));
    max-height: min(820px, calc(var(--app-height) - 132px));
    grid-template-columns: minmax(496px, 0.9fr) minmax(0, 1fr);
    column-gap: 44px;
    row-gap: 19px;
    padding: 36px 42px 34px;
    border-radius: 16px;
  }

  body.is-desktop-input .intro-modal {
    padding-top: clamp(104px, 14svh, 136px);
  }

  body.is-desktop-input .tutorial-card {
    width: min(1242px, calc(100vw - 48px));
    height: min(828px, calc(var(--app-height) - 48px));
    max-height: calc(var(--app-height) - 48px);
    grid-template-columns: minmax(414px, 0.9fr) minmax(0, 1fr);
    column-gap: 39px;
    row-gap: 14px;
    padding: 30px 35px 28px;
  }

  body.is-desktop-input .intro-close {
    width: 35px;
    height: 35px;
    font-size: 17.25px;
  }

  body.is-desktop-input .tutorial-close {
    width: 39px;
    height: 39px;
    font-size: 19.55px;
  }

  body.is-desktop-input .tutorial-wordmark {
    font-size: 48.3px;
  }

  body.is-desktop-input .tutorial-kicker {
    font-size: 25.3px;
  }

  body.is-desktop-input .intro-card .tutorial-kicker {
    width: 100%;
    justify-self: center;
    font-size: 30.4px;
    text-align: center;
  }

  body.is-desktop-input .tutorial-author {
    font-size: 16.1px;
  }

  body.is-desktop-input .tutorial-skip-scores {
    font-size: 14.3px;
  }

  body.is-desktop-input .tutorial-card h2 {
    font-size: 33.35px;
  }

  body.is-desktop-input .tutorial-section-title {
    font-size: 19.55px;
  }

  body.is-desktop-input .tutorial-scoring-title {
    font-size: 17.25px;
  }

  body.is-desktop-input .tutorial-copy,
  body.is-desktop-input .score-rule span {
    font-size: 16.56px;
  }

  body.is-desktop-input .tutorial-copy-small,
  body.is-desktop-input .intro-copy,
  body.is-desktop-input .hint-rule span {
    font-size: 16.1px;
  }

  body.is-desktop-input .intro-card .intro-copy {
    font-size: 19.3px;
  }

  body.is-desktop-input .score-rule strong,
  body.is-desktop-input .hint-rule strong {
    font-size: 14.26px;
  }

  body.is-desktop-input .hint-rule strong {
    width: 23px;
    height: 23px;
    font-size: 13.1px;
  }

  body.is-desktop-input .score-rule,
  body.is-desktop-input .hint-rule {
    min-height: 47px;
    grid-template-columns: 85px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
  }

  body.is-desktop-input .hint-rule {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 44px;
  }

  body.is-desktop-input .lesson-card {
    min-height: 140px;
    gap: 5px;
    padding: 44px 14px 14px;
  }

  body.is-desktop-input .intro-card .lesson-card {
    min-height: 168px;
    gap: 6px;
    padding: 53px 17px 17px;
    border-radius: 10px;
  }

  body.is-desktop-input .lesson-number {
    top: 13px;
    left: 13px;
    width: 25px;
    height: 25px;
    font-size: 13.8px;
  }

  body.is-desktop-input .intro-card .lesson-number {
    top: 16px;
    left: 16px;
    width: 30px;
    height: 30px;
    font-size: 16.6px;
  }

  body.is-desktop-input .intro-rule-card {
    gap: 5px;
    padding: 12px 13px;
  }

  body.is-desktop-input .intro-card .intro-rule-card {
    gap: 6px;
    padding: 15px 16px;
    border-radius: 10px;
  }

  body.is-desktop-input .intro-card .tutorial-section-title {
    font-size: 23.5px;
  }

  body.is-desktop-input .intro-actions {
    gap: 16px;
    margin-top: 0;
    padding: 0;
  }

  body.is-desktop-input .intro-card .tutorial-start {
    min-height: 77px;
    border-radius: 12px;
    font-size: 24px;
  }

  body.is-desktop-input .intro-card .intro-detail {
    min-height: 70px;
    border-radius: 12px;
    font-size: 21.6px;
  }

  body.is-desktop-input .tutorial-card .tutorial-start {
    min-height: 46px;
    font-size: 15px;
  }

  body.is-desktop-input .tutorial-sound {
    min-height: 39px;
    font-size: 14.95px;
  }

  body.is-desktop-input .tutorial-card > .lesson-demo {
    min-height: 414px;
    padding: 16px;
  }

  body.is-desktop-input .intro-card .lesson-demo {
    padding: 19px;
    border-radius: 12px;
  }

  body.is-desktop-input .align-demo {
    --demo-bridge-width: 106px;
    --demo-shift: -64px;
    gap: 12px;
    padding-top: 5px;
  }

  body.is-desktop-input .intro-card .align-demo {
    --demo-bridge-width: 127px;
    --demo-shift: -77px;
    gap: 14px;
    padding-top: 6px;
  }

  body.is-desktop-input .demo-labels {
    min-height: 18px;
    font-size: 12.1px;
  }

  body.is-desktop-input .intro-card .demo-labels {
    min-height: 22px;
    font-size: 14.5px;
  }

  body.is-desktop-input .demo-row {
    min-height: 55px;
  }

  body.is-desktop-input .intro-card .demo-row {
    min-height: 66px;
  }

  body.is-desktop-input .demo-clue {
    min-height: 53px;
    padding: 7px 9px;
    font-size: 16.7px;
  }

  body.is-desktop-input .intro-card .demo-clue {
    min-height: 64px;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 20px;
  }

  body.is-desktop-input .demo-span {
    min-height: 39px;
    font-size: 14.95px;
  }

  body.is-desktop-input .intro-card .demo-span {
    min-height: 47px;
    border-radius: 8px;
    font-size: 18px;
  }

  body.is-desktop-input .demo-answer {
    font-size: 14.95px;
  }

  body.is-desktop-input .intro-card .demo-answer {
    font-size: 18px;
  }

  body.is-desktop-input .demo-blank {
    width: 48px;
    height: 16px;
  }

  body.is-desktop-input .intro-card .demo-blank {
    width: 58px;
    height: 19px;
  }

  body.is-desktop-input .demo-cursor {
    top: 133px;
    width: 23px;
    height: 23px;
  }

  body.is-desktop-input .intro-card .demo-cursor {
    top: 160px;
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 760px) and (max-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card {
    max-height: min(720px, calc(var(--app-height) - 132px));
    grid-template-columns: minmax(300px, 0.55fr) minmax(0, 1fr);
    column-gap: 24px;
    row-gap: 16px;
    padding: 30px 34px 28px;
  }

  body.is-desktop-input .intro-card .lesson-card {
    min-height: 138px;
    padding: 45px 14px 14px;
  }

  body.is-desktop-input .intro-card .tutorial-section-title {
    font-size: 20px;
  }

  body.is-desktop-input .intro-card .intro-copy {
    font-size: 16.6px;
  }

  body.is-desktop-input .intro-card .tutorial-start {
    min-height: 62px;
    font-size: 20px;
  }

  body.is-desktop-input .intro-card .intro-detail {
    min-height: 56px;
    font-size: 18px;
  }

  body.is-desktop-input .intro-card .align-demo {
    --demo-bridge-width: 102px;
    --demo-shift: -63px;
    gap: 11px;
  }

  body.is-desktop-input .intro-card .demo-labels {
    font-size: 13px;
  }

  body.is-desktop-input .intro-card .demo-row {
    min-height: 56px;
  }

  body.is-desktop-input .intro-card .demo-clue {
    min-height: 54px;
    font-size: 16.4px;
  }

  body.is-desktop-input .intro-card .demo-span {
    min-height: 40px;
    font-size: 15px;
  }

  body.is-desktop-input .intro-card .demo-answer {
    font-size: 15px;
  }

  body.is-desktop-input .intro-card .demo-blank {
    width: 50px;
    height: 17px;
  }

  body.is-desktop-input .intro-card .demo-cursor {
    top: 140px;
    width: 24px;
    height: 24px;
  }
}

@media (min-width: 760px) and (max-height: 720px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-modal {
    padding-top: clamp(88px, 14svh, 104px);
  }

  body.is-desktop-input .intro-card {
    row-gap: 12px;
    max-height: min(680px, calc(var(--app-height) - 104px));
    padding: 24px 30px 20px;
  }

  body.is-desktop-input .intro-card .lesson-card {
    min-height: 122px;
    padding: 36px 13px 13px;
  }

  body.is-desktop-input .intro-card .lesson-number {
    top: 11px;
    left: 11px;
    width: 24px;
    height: 24px;
    font-size: 12.8px;
  }

  body.is-desktop-input .intro-card .tutorial-section-title {
    font-size: 19px;
  }

  body.is-desktop-input .intro-card .intro-copy {
    font-size: 15.6px;
    line-height: 1.12;
  }

  body.is-desktop-input .intro-card .intro-rule-card {
    padding: 11px 12px;
  }

  body.is-desktop-input .intro-actions {
    gap: 10px;
    padding-top: 10px;
  }

  body.is-desktop-input .intro-card .tutorial-start {
    min-height: 52px;
    font-size: 19px;
  }

  body.is-desktop-input .intro-card .intro-detail {
    min-height: 46px;
    font-size: 17px;
  }
}

@media (min-width: 760px) and (max-height: 640px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-modal {
    padding-top: clamp(78px, 13svh, 94px);
  }

  body.is-desktop-input .intro-card {
    max-height: min(600px, calc(var(--app-height) - 92px));
    column-gap: 18px;
    row-gap: 9px;
    padding: 16px 22px 14px;
  }

  body.is-desktop-input .intro-card .tutorial-kicker {
    font-size: 25px;
  }

  body.is-desktop-input .intro-card .lesson-demo {
    padding: 10px;
    border-radius: 9px;
  }

  body.is-desktop-input .intro-card .align-demo {
    --demo-bridge-width: 82px;
    --demo-shift: -51px;
    gap: 8px;
    padding-top: 3px;
  }

  body.is-desktop-input .intro-card .demo-labels {
    min-height: 16px;
    font-size: 11px;
  }

  body.is-desktop-input .intro-card .demo-row {
    min-height: 42px;
  }

  body.is-desktop-input .intro-card .demo-clue {
    min-height: 40px;
    padding: 6px 8px;
    font-size: 13.8px;
  }

  body.is-desktop-input .intro-card .demo-span {
    min-height: 31px;
    font-size: 12.6px;
  }

  body.is-desktop-input .intro-card .demo-answer {
    font-size: 12.6px;
  }

  body.is-desktop-input .intro-card .demo-blank {
    width: 42px;
    height: 14px;
  }

  body.is-desktop-input .intro-card .demo-cursor {
    top: 108px;
    width: 19px;
    height: 19px;
  }

  body.is-desktop-input .intro-card .lesson-card {
    min-height: 104px;
    gap: 3px;
    padding: 28px 10px 9px;
  }

  body.is-desktop-input .intro-card .lesson-number {
    top: 9px;
    left: 9px;
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  body.is-desktop-input .intro-card .tutorial-section-title {
    font-size: 16.6px;
    line-height: 1.02;
  }

  body.is-desktop-input .intro-card .intro-copy {
    font-size: 13.9px;
    line-height: 1.08;
  }

  body.is-desktop-input .intro-card .intro-rule-card {
    gap: 3px;
    padding: 8px 10px;
  }

  body.is-desktop-input .intro-actions {
    gap: 8px;
    padding-top: 8px;
  }

  body.is-desktop-input .intro-card .tutorial-start {
    min-height: 44px;
    border-radius: 10px;
    font-size: 16.5px;
  }

  body.is-desktop-input .intro-card .intro-detail {
    min-height: 39px;
    border-radius: 10px;
    font-size: 15px;
  }
}

@media (min-width: 760px) and (max-width: 880px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-modal {
    padding-top: clamp(78px, 12svh, 108px);
  }

  body.is-desktop-input .intro-card {
    max-height: min(760px, calc(var(--app-height) - 94px));
    grid-template-columns: minmax(196px, 0.4fr) minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 8px;
    padding: 14px 18px 14px;
  }

  body.is-desktop-input .intro-card .tutorial-kicker {
    font-size: 24px;
  }

  body.is-desktop-input .intro-card .lesson-demo {
    padding: 8px;
    border-radius: 8px;
  }

  body.is-desktop-input .intro-card .align-demo {
    --demo-bridge-width: 72px;
    --demo-shift: -46px;
    gap: 7px;
    padding-top: 2px;
  }

  body.is-desktop-input .intro-card .demo-labels {
    min-height: 14px;
    font-size: 10px;
  }

  body.is-desktop-input .intro-card .demo-row {
    min-height: 36px;
  }

  body.is-desktop-input .intro-card .demo-clue {
    min-height: 35px;
    padding: 5px 7px;
    font-size: 12.4px;
  }

  body.is-desktop-input .intro-card .demo-span {
    min-height: 28px;
    font-size: 12px;
  }

  body.is-desktop-input .intro-card .demo-answer {
    font-size: 12px;
  }

  body.is-desktop-input .intro-card .demo-blank {
    width: 38px;
    height: 13px;
  }

  body.is-desktop-input .intro-card .demo-cursor {
    top: 94px;
    width: 18px;
    height: 18px;
  }

  body.is-desktop-input .intro-card .lesson-card {
    min-height: 0;
    gap: 2px;
    padding: 7px 8px 7px 31px;
  }

  body.is-desktop-input .intro-card .lesson-number {
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  body.is-desktop-input .intro-card .tutorial-section-title {
    font-size: 15.6px;
    line-height: 1.02;
  }

  body.is-desktop-input .intro-card .intro-copy {
    font-size: 13px;
    line-height: 1.07;
  }

  body.is-desktop-input .intro-card .intro-rule-card {
    gap: 2px;
    padding: 7px 8px;
  }

  body.is-desktop-input .intro-actions {
    gap: 7px;
  }

  body.is-desktop-input .intro-card .tutorial-start {
    min-height: 38px;
    border-radius: 9px;
    font-size: 14.8px;
  }

  body.is-desktop-input .intro-card .intro-detail {
    min-height: 34px;
    border-radius: 9px;
    font-size: 13.5px;
  }
}

@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input {
    --desktop-scale: var(--computed-desktop-scale);
  }

  body.is-desktop-input .phone-shell {
    place-items: start center;
    padding: calc(16px * var(--desktop-scale)) 20px;
  }

  body.is-desktop-input:not(.has-modal):not(.has-score-modal) .phone-shell {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 34%),
      var(--paper);
  }

  body.is-desktop-input .game-card {
    --clue-row-size: calc(76px * var(--desktop-scale));
    width: min(calc(1180px * var(--desktop-scale)), calc(100vw - 40px));
    height: min(calc(720px * var(--desktop-scale)), calc(var(--app-height) - 40px));
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) calc(340px * var(--desktop-scale));
    grid-template-rows: auto auto minmax(0, 1fr);
    column-gap: calc(30px * var(--desktop-scale));
    row-gap: calc(14px * var(--desktop-scale));
    align-content: stretch;
    padding: calc(22px * var(--desktop-scale)) calc(28px * var(--desktop-scale));
    border: 1px solid rgba(43, 48, 54, 0.14);
    border-radius: calc(20px * var(--desktop-scale));
    background: rgba(255, 255, 255, 0.36);
    box-shadow: 0 22px 54px rgba(40, 44, 50, 0.13);
  }

  body.is-desktop-input .topbar {
    grid-column: 1 / -1;
    min-height: calc(62px * var(--desktop-scale));
    padding: 0 calc(96px * var(--desktop-scale));
    margin: 0;
    border-bottom: 1px solid rgba(43, 48, 54, 0.14);
  }

  body.is-desktop-input h1 {
    font-size: calc(54px * var(--desktop-scale));
  }

  body.is-desktop-input .game-timer {
    top: calc(15px * var(--desktop-scale));
    right: 0;
  }

  body.is-desktop-input .timer-digits {
    font-size: calc(22px * var(--desktop-scale));
  }

  body.is-desktop-input .pause-button {
    margin-top: calc(4px * var(--desktop-scale));
    font-size: calc(12px * var(--desktop-scale));
  }

  body.is-desktop-input .progress-row {
    --keystone-box-h: calc(60px * var(--desktop-scale));
    grid-column: 1;
    grid-template-columns: calc(104px * var(--desktop-scale)) minmax(0, 1fr) calc(104px * var(--desktop-scale));
    justify-items: stretch;
    min-height: calc(94px * var(--desktop-scale));
    margin: 0;
    padding: 0 2px;
    align-items: center;
  }

  body.is-desktop-input .keystone-wrap {
    grid-column: 2;
    grid-row: 1;
    gap: calc(8px * var(--desktop-scale));
  }

  body.is-desktop-input .keystone-label {
    font-size: calc(14px * var(--desktop-scale));
    letter-spacing: 0.04em;
  }

  body.is-desktop-input .keystone {
    gap: calc(10px * var(--desktop-scale));
  }

  body.is-desktop-input .keystone-letter {
    width: calc(50px * var(--desktop-scale));
    height: calc(60px * var(--desktop-scale));
    border-radius: calc(8px * var(--desktop-scale));
    font-size: calc(30px * var(--desktop-scale));
  }

  body.is-desktop-input .progress-copy {
    display: none;
    position: static;
    right: auto;
    bottom: auto;
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    height: var(--keystone-box-h);
    min-width: calc(66px * var(--desktop-scale));
  }

  body.is-desktop-input #solvedCount {
    font-size: calc(44px * var(--desktop-scale));
  }

  body.is-desktop-input .progress-total {
    font-size: calc(20px * var(--desktop-scale));
  }

  body.is-desktop-input .progress-label {
    font-size: calc(13px * var(--desktop-scale));
    letter-spacing: 0.02em;
  }

  body.is-desktop-input .board-wrap {
    --desktop-bridge-column: calc(132px * var(--desktop-scale));
    --desktop-board-gap: calc(16px * var(--desktop-scale));
    --desktop-bridge-bank-inset: calc(8px * var(--desktop-scale));
    --desktop-bridge-width: calc((var(--desktop-bridge-column) + (2 * (var(--desktop-board-gap) + var(--desktop-bridge-bank-inset)))) / 0.68);
    --desktop-blank-width: calc(var(--desktop-bridge-column) * 0.96);
    --desktop-selected-blank-width: calc(var(--desktop-bridge-column) * 1.12);
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr) var(--desktop-bridge-column) minmax(0, 1fr);
    gap: var(--desktop-board-gap);
    align-self: stretch;
    margin: 0;
    padding: 0;
    min-height: 0;
    max-height: none;
  }

  body.is-desktop-input .bank,
  body.is-desktop-input .span-stack {
    grid-template-rows: repeat(5, var(--clue-row-size));
  }

  body.is-desktop-input .bank-panel,
  body.is-desktop-input .bridge-column {
    min-height: 0;
  }

  body.is-desktop-input .bank-panel {
    grid-template-rows: auto minmax(0, 1fr);
    gap: calc(8px * var(--desktop-scale));
    padding: calc(4px * var(--desktop-scale)) calc(8px * var(--desktop-scale));
  }

  body.is-desktop-input .bank-heading {
    min-height: calc(30px * var(--desktop-scale));
    font-size: calc(14px * var(--desktop-scale));
  }

  body.is-desktop-input .bank-heading span {
    gap: calc(8px * var(--desktop-scale));
  }

  body.is-desktop-input .bank-heading span::before,
  body.is-desktop-input .bank-heading span::after {
    width: calc(42px * var(--desktop-scale));
    flex-basis: calc(42px * var(--desktop-scale));
  }

  body.is-desktop-input .bank {
    height: 100%;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: calc(8px * var(--desktop-scale));
  }

  body.is-desktop-input .clue-card {
    grid-template-columns: minmax(0, 1fr) calc(24px * var(--desktop-scale));
    gap: calc(8px * var(--desktop-scale));
    padding: calc(10px * var(--desktop-scale)) calc(16px * var(--desktop-scale));
    border-radius: calc(14px * var(--desktop-scale));
    font-size: calc(22px * var(--desktop-scale));
    line-height: 1.08;
  }

  body.is-desktop-input .clue-card.is-row-selected {
    border-color: rgba(8, 120, 200, 0.72);
    box-shadow:
      0 0 0 calc(3px * var(--desktop-scale)) rgba(8, 120, 200, 0.2),
      0 0 0 calc(5px * var(--desktop-scale)) rgba(8, 120, 200, 0.06),
      0 12px calc(22px * var(--desktop-scale)) rgba(22, 28, 35, 0.12);
  }

  body.is-desktop-input .clue-card.is-solved .clue-text {
    font-size: calc(22px * var(--desktop-scale));
  }

  body.is-desktop-input .move-medallion,
  body.is-desktop-input .lock-medallion {
    width: calc(18px * var(--desktop-scale));
    height: calc(28px * var(--desktop-scale));
  }

  body.is-desktop-input .move-medallion svg {
    width: calc(16px * var(--desktop-scale));
    height: calc(24px * var(--desktop-scale));
  }

  body.is-desktop-input .bridge-column {
    grid-template-rows: minmax(0, 1fr);
    padding: calc(40px * var(--desktop-scale)) calc(4px * var(--desktop-scale)) calc(8px * var(--desktop-scale));
    z-index: 4;
  }

  body.is-desktop-input .bridge-column::before {
    content: none;
  }

  body.is-desktop-input .bridge-heading {
    position: absolute;
    top: calc(4px * var(--desktop-scale));
    left: 50%;
    z-index: 6;
    display: grid;
    min-height: calc(30px * var(--desktop-scale));
    place-items: center;
    color: #4f5258;
    font-family: var(--ui-face);
    font-size: calc(14px * var(--desktop-scale));
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    pointer-events: none;
    transform: translateX(-50%);
  }

  body.is-desktop-input .bridge-heading span {
    white-space: nowrap;
  }

  body.is-desktop-input .waterline {
    top: calc(42px * var(--desktop-scale));
  }

  body.is-desktop-input .span-stack {
    height: 100%;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: calc(8px * var(--desktop-scale));
  }

  body.is-desktop-input .bridge-plank,
  body.is-desktop-input .bridge-span.is-empty .bridge-plank,
  body.is-desktop-input .bridge-span.is-built .bridge-plank,
  body.is-desktop-input .bridge-span.is-selected .bridge-plank,
  body.is-desktop-input .bridge-span.is-empty.is-selected .bridge-plank {
    left: 50%;
    translate: none;
    margin-left: 0;
    width: var(--desktop-bridge-width);
    min-height: calc(46px * var(--desktop-scale));
    border-radius: calc(12px * var(--desktop-scale));
    padding: 0 calc(18px * var(--desktop-scale));
    font-size: calc(18px * var(--desktop-scale));
    transform: translate(-50%, -50%);
  }

  body.is-desktop-input .bridge-span.is-selected .bridge-plank,
  body.is-desktop-input .bridge-span.is-built.is-selected .bridge-plank,
  body.is-desktop-input .bridge-span.is-empty.is-selected .bridge-plank {
    margin-left: 0;
    width: var(--desktop-bridge-width);
    border-color: rgba(8, 120, 200, 0.72);
    box-shadow:
      inset 0 0 0 calc(2px * var(--desktop-scale)) rgba(255, 255, 255, 0.82),
      0 0 0 calc(3px * var(--desktop-scale)) rgba(8, 120, 200, 0.22),
      0 0 0 calc(5px * var(--desktop-scale)) rgba(8, 120, 200, 0.08),
      0 8px calc(16px * var(--desktop-scale)) rgba(22, 28, 35, 0.18);
    transform: none;
  }

  body.is-desktop-input .bridge-plank::before,
  body.is-desktop-input .bridge-plank::after {
    width: calc(14px * var(--desktop-scale));
    height: calc(34px * var(--desktop-scale));
    border-radius: calc(6px * var(--desktop-scale));
  }

  body.is-desktop-input .bridge-plank::before {
    left: calc(-6px * var(--desktop-scale));
  }

  body.is-desktop-input .bridge-plank::after {
    right: calc(-6px * var(--desktop-scale));
  }

  body.is-desktop-input .bridge-span.is-built .bridge-plank {
    transform: none;
  }

  body.is-desktop-input .word-label.is-blank-label {
    width: min(68%, calc(82px * var(--desktop-scale)));
    height: calc(28px * var(--desktop-scale));
    min-height: calc(28px * var(--desktop-scale));
    padding-bottom: calc(6px * var(--desktop-scale));
  }

  body.is-desktop-input .blank-underline {
    height: calc(3px * var(--desktop-scale));
  }

  body.is-desktop-input .bridge-span.is-selected .blank-underline {
    width: 100%;
    height: calc(4px * var(--desktop-scale));
  }

  body.is-desktop-input .bridge-span.is-built .word-label {
    font-size: 1.12em;
  }

  body.is-desktop-input .answer-dock {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: stretch;
    display: grid;
    align-content: start;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: calc(14px * var(--desktop-scale));
    min-height: 0;
    margin: 0;
    padding: calc(20px * var(--desktop-scale));
    border: 1px solid rgba(43, 48, 54, 0.14);
    border-radius: calc(18px * var(--desktop-scale));
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  body.is-desktop-input .status-line {
    grid-row: 1;
    min-height: 0;
    padding-bottom: calc(13px * var(--desktop-scale));
    border-bottom: 1px solid rgba(43, 48, 54, 0.13);
    font-size: calc(18px * var(--desktop-scale));
    line-height: 1.25;
  }

  body.is-desktop-input .input-row {
    grid-row: 2;
    grid-template-columns: 1fr;
    gap: calc(12px * var(--desktop-scale));
  }

  body.is-desktop-input .answer-input {
    min-height: calc(54px * var(--desktop-scale));
    border-radius: calc(12px * var(--desktop-scale));
    font-size: calc(20px * var(--desktop-scale));
  }

  body.is-desktop-input .answer-input::placeholder {
    font-size: calc(15px * var(--desktop-scale));
  }

  body.is-desktop-input .primary-button {
    min-height: calc(56px * var(--desktop-scale));
    width: 100%;
    border-radius: calc(14px * var(--desktop-scale));
    font-size: calc(18px * var(--desktop-scale));
  }

  body.is-desktop-input .keyboard-panel {
    display: none;
  }

  body.is-desktop-input .dock-footer {
    grid-row: 3;
    align-self: start;
    grid-template-columns: 1fr;
    gap: calc(10px * var(--desktop-scale));
    margin-top: 0;
  }

  body.is-desktop-input .hint-button {
    width: 100%;
    min-height: calc(56px * var(--desktop-scale));
    border-radius: calc(14px * var(--desktop-scale));
    background: var(--river-blue);
    box-shadow: 0 calc(4px * var(--desktop-scale)) 0 var(--river-blue-dark);
    font-size: calc(18px * var(--desktop-scale));
  }

  body.is-desktop-input .hint-order {
    font-size: calc(16.5px * var(--desktop-scale));
    line-height: 1.25;
  }

  body.is-desktop-input .howto-button {
    display: grid;
    place-items: center;
    grid-row: 5;
    align-self: end;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: calc(56px * var(--desktop-scale));
    padding: 0 calc(18px * var(--desktop-scale));
    border: 1px solid rgba(22, 127, 168, 0.3);
    border-radius: calc(14px * var(--desktop-scale));
    color: var(--river-blue-dark);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 20px rgba(40, 44, 50, 0.08);
    font-size: calc(18px * var(--desktop-scale));
  }

  body.is-desktop-input .topbar .ghost-button {
    display: none;
  }

  body.is-desktop-input .howto-button:hover {
    border-color: rgba(22, 127, 168, 0.42);
    background: rgba(255, 255, 255, 0.92);
  }
}

@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .tutorial-modal {
    place-items: start center;
    padding: clamp(76px, 11svh, 104px) 24px 24px;
  }

  body.is-desktop-input .tutorial-card {
    width: min(1220px, calc(100vw - 48px));
    height: auto;
    max-height: calc(var(--app-height) - 92px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow-y: auto;
    padding: 0;
    border-radius: 20px;
    background: #fffdfa;
    box-shadow: 0 24px 62px rgba(22, 28, 35, 0.22);
  }

  body.is-desktop-input .tutorial-close {
    top: 18px;
    right: 18px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 17px;
  }

  body.is-desktop-input .tutorial-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 30px;
    padding: 22px 42px 16px;
    border-bottom: 1px solid rgba(43, 48, 54, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 245, 237, 0.88));
  }

  body.is-desktop-input .tutorial-logo-lockup {
    grid-column: auto;
    justify-self: start;
    margin: 0;
  }

  body.is-desktop-input .tutorial-header .tutorial-meta-row {
    grid-column: auto;
  }

  body.is-desktop-input .tutorial-wordmark {
    color: rgba(16, 16, 16, 0.82);
    font-family: var(--ui-face);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.04em;
  }

  body.is-desktop-input .tutorial-header-copy {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title actions"
      "summary actions"
      "meta actions";
    align-items: center;
    gap: 7px 22px;
    padding-right: 34px;
  }

  body.is-desktop-input .tutorial-header-copy h2 {
    grid-area: title;
    color: #4d5056;
    font-family: var(--ui-face);
    font-size: clamp(26px, 2.25vw, 34px);
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
  }

  body.is-desktop-input .tutorial-summary {
    grid-area: summary;
    max-width: 620px;
    color: #34373d;
    font-size: clamp(15.5px, 1.28vw, 18px);
    line-height: 1.2;
  }

  body.is-desktop-input .tutorial-meta-row {
    grid-area: meta;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 18px;
    margin-top: 2px;
  }

  body.is-desktop-input .tutorial-author {
    font-size: 14.5px;
  }

  body.is-desktop-input .tutorial-skip-scores {
    display: none;
  }

  body.is-desktop-input .tutorial-header-actions {
    grid-area: actions;
    width: min(260px, 22vw);
    gap: 0;
  }

  body.is-desktop-input .tutorial-header-actions .tutorial-start {
    width: 100%;
    min-height: 66px;
    border-radius: 16px;
    font-size: 21px;
  }

  body.is-desktop-input .tutorial-main {
    display: grid;
    grid-template-columns: minmax(290px, 0.66fr) minmax(286px, 0.72fr) minmax(470px, 1.16fr);
    grid-template-areas:
      "demo flow score"
      "demo flow hints";
    align-items: start;
    gap: 18px 26px;
    padding: 22px 42px 18px;
  }

  body.is-desktop-input .tutorial-demo-panel {
    grid-area: demo;
    gap: 12px;
    align-self: stretch;
    align-content: start;
    padding: 0;
  }

  body.is-desktop-input .tutorial-flow-panel {
    grid-area: flow;
    align-content: start;
    gap: 12px;
    padding: 2px 0 0;
  }

  body.is-desktop-input .tutorial-score-panel {
    grid-area: score;
    gap: 10px;
    align-content: start;
    padding: 0;
    border-top: 2px solid rgba(43, 48, 54, 0.2);
    background: transparent;
  }

  body.is-desktop-input .tutorial-hints-panel {
    grid-area: hints;
    gap: 10px;
    align-content: start;
    padding: 0;
    border-top: 2px solid rgba(43, 48, 54, 0.2);
    background: transparent;
  }

  body.is-desktop-input .tutorial-demo-panel .tutorial-section-title,
  body.is-desktop-input .tutorial-flow-title,
  body.is-desktop-input .tutorial-score-panel .tutorial-section-title,
  body.is-desktop-input .tutorial-hints-panel .tutorial-section-title {
    color: #4d5056;
    font-family: var(--ui-face);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
  }

  body.is-desktop-input .tutorial-score-panel .tutorial-section-title,
  body.is-desktop-input .tutorial-hints-panel .tutorial-section-title {
    padding-top: 12px;
    font-size: 18px;
  }

  body.is-desktop-input .tutorial-demo-panel .lesson-demo {
    padding: 14px;
    border: 1px solid rgba(43, 48, 54, 0.11);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
  }

  body.is-desktop-input .tutorial-demo-panel .align-demo {
    --demo-bridge-width: 112px;
    --demo-shift: -63px;
    gap: 10px;
    padding-top: 4px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-labels {
    min-height: 18px;
    font-size: 11.8px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-row {
    min-height: 54px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-clue {
    min-height: 52px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 16px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-span {
    min-height: 38px;
    border-radius: 8px;
    font-size: 14.5px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-answer {
    font-size: 14.5px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-blank {
    width: 50px;
    height: 16px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-cursor {
    top: 130px;
    width: 24px;
    height: 24px;
  }

  body.is-desktop-input .tutorial-demo-caption {
    color: #4d5056;
    font-size: 16.5px;
    line-height: 1.24;
  }

  body.is-desktop-input .tutorial-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid rgba(43, 48, 54, 0.12);
    border-bottom: 1px solid rgba(43, 48, 54, 0.12);
  }

  body.is-desktop-input .tutorial-steps .lesson-card {
    min-height: 0;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-areas:
      "number title"
      "number copy";
    align-items: start;
    gap: 5px 10px;
    padding: 10px 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(43, 48, 54, 0.12);
    border-radius: 0;
    background: transparent;
  }

  body.is-desktop-input .tutorial-steps .lesson-card:last-child {
    border-bottom: 0;
  }

  body.is-desktop-input .tutorial-steps .lesson-number {
    grid-area: number;
    position: static;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    font-size: 12px;
  }

  body.is-desktop-input .tutorial-steps .tutorial-section-title {
    grid-area: title;
    color: #101010;
    font-family: var(--ui-face);
    font-size: 18.5px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
    text-transform: none;
  }

  body.is-desktop-input .tutorial-steps .tutorial-copy {
    grid-area: copy;
    font-size: 16.5px;
    line-height: 1.24;
  }

  body.is-desktop-input .tutorial-scoring,
  body.is-desktop-input .tutorial-hints {
    border-top: 0;
  }

  body.is-desktop-input .tutorial-hints {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }

  body.is-desktop-input .score-rule,
  body.is-desktop-input .hint-rule {
    min-height: 0;
    gap: 13px;
    padding: 9px 0;
  }

  body.is-desktop-input .score-rule {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  body.is-desktop-input .hint-rule {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
  }

  body.is-desktop-input .hint-rule:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  body.is-desktop-input .score-rule strong {
    font-size: 15px;
  }

  body.is-desktop-input .hint-rule strong {
    width: 25px;
    height: 25px;
    font-size: 13px;
  }

  body.is-desktop-input .score-rule span,
  body.is-desktop-input .hint-rule span,
  body.is-desktop-input .tutorial-hints-panel > .tutorial-copy {
    font-size: 17.2px;
    line-height: 1.23;
  }

  body.is-desktop-input .tutorial-footer {
    display: none;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 0;
    padding: 0 42px 18px;
    border-top: 1px solid rgba(43, 48, 54, 0.12);
    background: rgba(248, 251, 252, 0.86);
  }

  body.is-desktop-input .tutorial-footer-actions {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.7fr);
    gap: 12px;
  }

  body.is-desktop-input .tutorial-stats-panel {
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding-top: 14px;
  }

  body.is-desktop-input .tutorial-stats-panel .tutorial-section-title {
    margin: 0;
    color: #4d5056;
    font-family: var(--ui-face);
    font-size: 14px;
    font-weight: 850;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body.is-desktop-input .tutorial-stats-panel .player-stats {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.is-desktop-input .player-stats .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.is-desktop-input .player-stats .stats-grid span {
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
  }
}

@media (min-width: 760px) and (max-width: 1120px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .tutorial-modal {
    padding-top: clamp(78px, 12svh, 104px);
  }

  body.is-desktop-input .tutorial-card {
    max-height: calc(var(--app-height) - 92px);
  }

  body.is-desktop-input .tutorial-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px 30px 18px;
  }

  body.is-desktop-input .tutorial-header-copy {
    padding-right: 38px;
  }

  body.is-desktop-input .tutorial-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "demo"
      "flow"
      "score"
      "hints";
    padding: 18px 30px 20px;
  }

  body.is-desktop-input .tutorial-demo-panel .align-demo {
    --demo-bridge-width: 112px;
    --demo-shift: -66px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-row {
    min-height: 54px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-clue {
    min-height: 52px;
    font-size: 16px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-span {
    min-height: 38px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-cursor {
    top: 138px;
    width: 24px;
    height: 24px;
  }

  body.is-desktop-input .tutorial-footer {
    grid-template-columns: 1fr;
    padding: 18px 30px 22px;
  }
}

@media (min-width: 760px) and (max-height: 680px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .tutorial-modal {
    padding-top: clamp(70px, 11svh, 92px);
  }

  body.is-desktop-input .tutorial-card {
    max-height: calc(var(--app-height) - 84px);
  }

  body.is-desktop-input .tutorial-header {
    padding-top: 20px;
    padding-bottom: 16px;
  }

  body.is-desktop-input .tutorial-main {
    gap: 14px 20px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  body.is-desktop-input .tutorial-wordmark {
    font-size: 15px;
  }

  body.is-desktop-input .tutorial-summary {
    font-size: 16px;
  }

  body.is-desktop-input .tutorial-demo-panel {
    padding: 14px;
  }

  body.is-desktop-input .tutorial-demo-panel .lesson-demo {
    padding: 12px;
  }

  body.is-desktop-input .tutorial-demo-panel .align-demo {
    --demo-bridge-width: 104px;
    --demo-shift: -60px;
    gap: 9px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-labels {
    min-height: 18px;
    font-size: 11.5px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-row {
    min-height: 48px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-clue {
    min-height: 46px;
    font-size: 15px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-span {
    min-height: 34px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-cursor {
    top: 121px;
    width: 22px;
    height: 22px;
  }

  body.is-desktop-input .tutorial-steps .lesson-card {
    padding: 10px 0 12px;
  }

  body.is-desktop-input .tutorial-steps .tutorial-section-title {
    font-size: 17.5px;
  }

  body.is-desktop-input .tutorial-steps .tutorial-copy,
  body.is-desktop-input .score-rule span,
  body.is-desktop-input .hint-rule span,
  body.is-desktop-input .tutorial-hints-panel > .tutorial-copy {
    font-size: 15.8px;
    line-height: 1.22;
  }

  body.is-desktop-input .tutorial-footer {
    padding-top: 14px;
    padding-bottom: 16px;
  }

  body.is-desktop-input .tutorial-card .tutorial-start {
    min-height: 54px;
    border-radius: 14px;
    font-size: 18px;
  }
}

@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .lesson-number {
    top: 15px;
    left: 15px;
    width: 34px;
    height: 34px;
    font-size: 18.5px;
  }

  body.is-desktop-input .intro-card .lesson-card .tutorial-section-title {
    font-size: 24px;
    line-height: 1.05;
  }

  body.is-desktop-input .intro-card .lesson-card .intro-copy {
    font-size: 19px;
    line-height: 1.16;
  }

  body.is-desktop-input .intro-card .intro-rule-card .tutorial-section-title {
    font-size: 20px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .intro-copy {
    font-size: 16.6px;
    line-height: 1.12;
  }
}

@media (min-width: 760px) and (max-height: 720px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .lesson-card {
    padding: 42px 13px 13px;
  }

  body.is-desktop-input .intro-card .lesson-number {
    top: 10px;
    left: 12px;
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  body.is-desktop-input .intro-card .lesson-card .tutorial-section-title {
    font-size: 21.5px;
  }

  body.is-desktop-input .intro-card .lesson-card .intro-copy {
    font-size: 16.4px;
    line-height: 1.12;
  }

  body.is-desktop-input .intro-card .intro-rule-card .tutorial-section-title {
    font-size: 18px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .intro-copy {
    font-size: 15.2px;
    line-height: 1.1;
  }
}

@media (min-width: 760px) and (max-height: 640px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .lesson-card {
    padding: 34px 10px 9px;
  }

  body.is-desktop-input .intro-card .lesson-number {
    top: 7px;
    left: 9px;
    width: 27px;
    height: 27px;
    font-size: 14.5px;
  }

  body.is-desktop-input .intro-card .lesson-card .tutorial-section-title {
    font-size: 19px;
  }

  body.is-desktop-input .intro-card .lesson-card .intro-copy {
    font-size: 14.8px;
    line-height: 1.09;
  }

  body.is-desktop-input .intro-card .intro-rule-card .tutorial-section-title {
    font-size: 16.5px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .intro-copy {
    font-size: 13.8px;
    line-height: 1.08;
  }
}

@media (min-width: 760px) and (max-width: 880px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .lesson-card {
    padding: 8px 8px 8px 42px;
  }

  body.is-desktop-input .intro-card .lesson-number {
    top: 8px;
    left: 8px;
    width: 25px;
    height: 25px;
    font-size: 13.6px;
  }

  body.is-desktop-input .intro-card .lesson-card .tutorial-section-title {
    font-size: 18px;
  }

  body.is-desktop-input .intro-card .lesson-card .intro-copy {
    font-size: 14px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .tutorial-section-title {
    font-size: 15.5px;
  }
}

@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .tutorial-steps .lesson-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 6px 12px;
    padding: 13px 0 14px;
  }

  body.is-desktop-input .intro-card .tutorial-steps .lesson-number {
    width: 34px;
    height: 34px;
    margin-top: 1px;
    font-size: 18.5px;
  }
}

@media (min-width: 760px) and (max-height: 720px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .tutorial-steps .lesson-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 5px 12px;
    padding: 9px 0 10px;
  }

  body.is-desktop-input .intro-card .tutorial-steps .lesson-number {
    width: 30px;
    height: 30px;
    margin-top: 1px;
    font-size: 16px;
  }
}

@media (min-width: 760px) and (max-height: 640px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .tutorial-steps .lesson-card {
    grid-template-columns: 35px minmax(0, 1fr);
    padding: 8px 0 9px;
  }

  body.is-desktop-input .intro-card .tutorial-steps .lesson-number {
    width: 27px;
    height: 27px;
    font-size: 14.5px;
  }
}

@media (min-width: 760px) and (max-width: 880px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .tutorial-steps .lesson-card {
    grid-template-columns: 33px minmax(0, 1fr);
    padding: 7px 0 8px;
  }

  body.is-desktop-input .intro-card .tutorial-steps .lesson-number {
    width: 25px;
    height: 25px;
    font-size: 13.6px;
  }
}

@media (min-width: 881px) and (max-width: 1100px) and (min-height: 641px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card {
    row-gap: 12px;
    max-height: min(680px, calc(var(--app-height) - 104px));
    padding: 24px 30px 20px;
  }

  body.is-desktop-input .intro-card .tutorial-steps .lesson-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 5px 12px;
    padding: 9px 0 10px;
  }

  body.is-desktop-input .intro-card .tutorial-steps .lesson-number {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  body.is-desktop-input .intro-card .lesson-card .tutorial-section-title {
    font-size: 21.5px;
  }

  body.is-desktop-input .intro-card .lesson-card .intro-copy {
    font-size: 16.4px;
    line-height: 1.12;
  }

  body.is-desktop-input .intro-card .intro-rule-card .tutorial-section-title {
    font-size: 18px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .intro-copy {
    font-size: 15.2px;
    line-height: 1.1;
  }

  body.is-desktop-input .intro-card .tutorial-start {
    min-height: 52px;
    font-size: 19px;
  }

  body.is-desktop-input .intro-card .intro-detail {
    min-height: 46px;
    font-size: 17px;
  }
}

@media (min-width: 760px) and (max-width: 880px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-modal {
    padding-top: clamp(72px, 12svh, 100px);
  }

  body.is-desktop-input .intro-card {
    max-height: min(760px, calc(var(--app-height) - 76px));
  }

  body.is-desktop-input .intro-actions {
    gap: 5px;
    padding-top: 6px;
  }

  body.is-desktop-input .intro-card .intro-detail {
    min-height: 32px;
  }
}

@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card {
    grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
    grid-template-areas:
      "title title"
      "steps demo"
      "rules actions";
    align-items: start;
  }

  body.is-desktop-input .intro-card .tutorial-kicker {
    grid-area: title;
  }

  body.is-desktop-input .intro-card .lesson-demo {
    grid-area: demo;
    align-self: start;
  }

  body.is-desktop-input .intro-steps {
    grid-area: steps;
  }

  body.is-desktop-input .intro-rules-grid {
    grid-area: rules;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  body.is-desktop-input .intro-actions {
    grid-area: actions;
    align-self: start;
    padding-top: 0;
  }

  body.is-desktop-input .intro-card .intro-rule-card {
    min-height: 124px;
    padding: 18px 18px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .tutorial-section-title {
    font-size: 22px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .intro-copy {
    font-size: 18px;
    line-height: 1.18;
  }
}

@media (min-width: 760px) and (max-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  }
}

@media (min-width: 760px) and (max-height: 640px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card .intro-rule-card {
    min-height: 0;
    padding: 9px 10px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .tutorial-section-title {
    font-size: 17px;
  }

  body.is-desktop-input .intro-card .intro-rule-card .intro-copy {
    font-size: 14px;
    line-height: 1.1;
  }
}

@media (min-width: 760px) and (max-width: 880px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .intro-card {
    grid-template-columns: minmax(0, 1fr) minmax(196px, 0.72fr);
  }

  body.is-desktop-input .intro-rules-grid {
    gap: 8px;
  }
}

@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .tutorial-modal {
    place-items: start center;
    padding: clamp(86px, 12svh, 116px) 24px 24px;
  }

  body.is-desktop-input .tutorial-card {
    width: min(1240px, calc(100vw - 48px));
    max-height: calc(var(--app-height) - 100px);
    overflow-y: auto;
    border-radius: 20px;
    background: #fffdfa;
  }

  body.is-desktop-input .tutorial-header {
    display: none;
  }

  body.is-desktop-input .tutorial-close {
    top: 16px;
    right: 16px;
  }

  body.is-desktop-input .tutorial-main {
    grid-template-columns: minmax(330px, 0.88fr) minmax(350px, 0.92fr) minmax(430px, 1fr);
    grid-template-areas:
      "demo flow score"
      "demo flow hints";
    gap: 24px 34px;
    padding: 34px 44px 20px;
  }

  body.is-desktop-input .tutorial-demo-panel,
  body.is-desktop-input .tutorial-flow-panel,
  body.is-desktop-input .tutorial-score-panel,
  body.is-desktop-input .tutorial-hints-panel {
    gap: 14px;
  }

  body.is-desktop-input .tutorial-flow-panel {
    grid-template-rows: auto auto minmax(16px, 1fr) auto;
    align-content: stretch;
  }

  body.is-desktop-input .tutorial-score-panel {
    border-top: 0;
  }

  body.is-desktop-input .tutorial-score-panel .tutorial-section-title {
    padding-top: 0;
  }

  body.is-desktop-input .tutorial-demo-panel .tutorial-section-title,
  body.is-desktop-input .tutorial-flow-title,
  body.is-desktop-input .tutorial-score-panel .tutorial-section-title,
  body.is-desktop-input .tutorial-hints-panel .tutorial-section-title {
    font-size: 20px;
    letter-spacing: 0.025em;
  }

  body.is-desktop-input .tutorial-demo-caption {
    display: none;
  }

  body.is-desktop-input .tutorial-demo-panel .lesson-demo {
    padding: 18px;
    border-radius: 16px;
  }

  body.is-desktop-input .tutorial-demo-panel .align-demo {
    --demo-bridge-width: 128px;
    --demo-shift: -72px;
    gap: 13px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-labels {
    min-height: 22px;
    font-size: 13px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-row {
    min-height: 62px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-clue {
    min-height: 60px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 18.5px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-span {
    min-height: 44px;
    border-radius: 10px;
    font-size: 16px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-answer {
    font-size: 16px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-blank {
    width: 56px;
    height: 18px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-cursor {
    top: 148px;
    width: 26px;
    height: 26px;
  }

  body.is-desktop-input .tutorial-steps {
    gap: 0;
  }

  body.is-desktop-input .tutorial-steps .lesson-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 7px 14px;
    padding: 14px 0 16px;
  }

  body.is-desktop-input .tutorial-steps .lesson-number {
    width: 30px;
    height: 30px;
    margin-top: 1px;
    font-size: 16px;
  }

  body.is-desktop-input .tutorial-steps .tutorial-section-title {
    font-size: 21px;
    line-height: 1.06;
  }

  body.is-desktop-input .tutorial-steps .tutorial-copy {
    font-size: 18px;
    line-height: 1.26;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-start {
    display: grid;
    grid-row: 4;
    align-self: end;
    place-items: center;
    width: 100%;
    min-height: 76px;
    margin-top: 0;
    border-radius: 16px;
    font-size: 26px;
    font-weight: 800;
  }

  body.is-desktop-input .score-rule {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  body.is-desktop-input .score-rule,
  body.is-desktop-input .hint-rule {
    gap: 15px;
    padding: 11px 0;
  }

  body.is-desktop-input .score-rule strong {
    font-size: 16px;
  }

  body.is-desktop-input .hint-rule strong {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  body.is-desktop-input .score-rule span,
  body.is-desktop-input .hint-rule span,
  body.is-desktop-input .tutorial-hints-panel > .tutorial-copy {
    font-size: 18px;
    line-height: 1.25;
  }

  body.is-desktop-input .tutorial-hints {
    column-gap: 22px;
  }

  body.is-desktop-input .tutorial-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 0 44px 26px;
    border-top: 0;
    background: transparent;
  }

  body.is-desktop-input .tutorial-footer-author {
    display: block;
    margin: 0;
    color: rgba(75, 70, 62, 0.78);
    font-family: var(--copy-face);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
  }

  body.is-desktop-input .tutorial-footer-author a {
    color: var(--river-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  body.is-desktop-input .tutorial-stats-panel {
    display: none;
  }
}

@media (min-width: 760px) and (max-width: 1120px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .tutorial-card {
    max-height: calc(var(--app-height) - 92px);
  }

  body.is-desktop-input .tutorial-main {
    grid-template-columns: minmax(250px, 0.74fr) minmax(265px, 0.88fr) minmax(270px, 1fr);
    grid-template-areas:
      "demo flow score"
      "demo flow hints";
    gap: 20px 18px;
    padding: 28px 32px 18px;
  }

  body.is-desktop-input .tutorial-demo-panel .align-demo {
    --demo-bridge-width: 116px;
    --demo-shift: -66px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-row {
    min-height: 56px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-clue {
    min-height: 54px;
    font-size: 16.5px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-span {
    min-height: 39px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-cursor {
    top: 136px;
  }

  body.is-desktop-input .tutorial-steps .tutorial-section-title {
    font-size: 19.5px;
  }

  body.is-desktop-input .tutorial-steps .tutorial-copy,
  body.is-desktop-input .score-rule span,
  body.is-desktop-input .hint-rule span,
  body.is-desktop-input .tutorial-hints-panel > .tutorial-copy {
    font-size: 16px;
  }

  body.is-desktop-input .tutorial-footer {
    padding: 0 32px 22px;
  }
}

@media (min-width: 760px) and (max-height: 680px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .tutorial-modal {
    padding-top: clamp(76px, 11svh, 96px);
  }

  body.is-desktop-input .tutorial-card {
    max-height: calc(var(--app-height) - 86px);
  }

  body.is-desktop-input .tutorial-main {
    gap: 18px 24px;
    padding-top: 24px;
    padding-bottom: 16px;
  }

  body.is-desktop-input .tutorial-demo-panel .lesson-demo {
    padding: 14px;
  }

  body.is-desktop-input .tutorial-demo-panel .align-demo {
    --demo-bridge-width: 108px;
    --demo-shift: -61px;
    gap: 9px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-row {
    min-height: 48px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-clue {
    min-height: 46px;
    font-size: 15px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-span {
    min-height: 34px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-cursor {
    top: 120px;
    width: 22px;
    height: 22px;
  }

  body.is-desktop-input .tutorial-demo-panel .tutorial-section-title,
  body.is-desktop-input .tutorial-flow-title,
  body.is-desktop-input .tutorial-score-panel .tutorial-section-title,
  body.is-desktop-input .tutorial-hints-panel .tutorial-section-title {
    font-size: 18px;
  }

  body.is-desktop-input .tutorial-steps .lesson-card {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 10px 0 11px;
  }

  body.is-desktop-input .tutorial-steps .lesson-number {
    width: 25px;
    height: 25px;
    font-size: 13.5px;
  }

  body.is-desktop-input .tutorial-steps .tutorial-section-title {
    font-size: 18px;
  }

  body.is-desktop-input .tutorial-steps .tutorial-copy,
  body.is-desktop-input .score-rule span,
  body.is-desktop-input .hint-rule span,
  body.is-desktop-input .tutorial-hints-panel > .tutorial-copy {
    font-size: 15.5px;
    line-height: 1.2;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-start {
    min-height: 58px;
    margin-top: 0;
    border-radius: 14px;
    font-size: 21px;
  }

  body.is-desktop-input .tutorial-footer-author {
    font-size: 16px;
  }
}

@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .score-modal {
    padding: 32px;
  }

  body.is-desktop-input .score-card {
    width: min(650px, calc(100vw - 80px));
    max-height: calc(var(--app-height) - 72px);
    gap: 18px;
    overflow-y: auto;
    padding: 34px 34px 30px;
    border-radius: 22px;
  }

  body.is-desktop-input .score-card .score-close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 24px;
  }

  body.is-desktop-input .score-card::before {
    width: 154px;
    height: 43px;
    margin-bottom: -10px;
    background:
      linear-gradient(currentColor, currentColor) 0 33px / 44px 3px no-repeat,
      linear-gradient(currentColor, currentColor) 110px 33px / 44px 3px no-repeat,
      radial-gradient(ellipse at 50% 100%, transparent 0 48%, currentColor 49% 55%, transparent 56%) 43px 2px / 68px 42px no-repeat,
      linear-gradient(currentColor, currentColor) 76px 10px / 3px 36px no-repeat;
  }

  body.is-desktop-input .score-title {
    font-size: 46px;
  }

  body.is-desktop-input .score-ledger {
    padding: 15px 20px;
    border-radius: 18px;
  }

  body.is-desktop-input .score-ledger-row {
    min-height: 52px;
    gap: 18px;
    padding: 10px 0;
  }

  body.is-desktop-input .score-ledger-row span {
    font-size: 17px;
  }

  body.is-desktop-input .score-ledger-row small {
    margin-left: 8px;
    font-size: 14px;
  }

  body.is-desktop-input .score-ledger-row strong {
    font-size: 23px;
  }

  body.is-desktop-input .score-result {
    gap: 24px;
    padding: 20px 22px;
    border-radius: 18px;
  }

  body.is-desktop-input .score-rating {
    gap: 17px;
  }

  body.is-desktop-input .score-grade {
    width: 88px;
    height: 88px;
    border-radius: 15px;
    font-size: 44px;
  }

  body.is-desktop-input .score-rating-title {
    font-size: 25px;
  }

  body.is-desktop-input .score-points {
    gap: 4px;
  }

  body.is-desktop-input .score-points span {
    font-size: 15px;
  }

  body.is-desktop-input .score-points strong {
    font-size: 54px;
  }

  body.is-desktop-input .score-actions {
    gap: 14px;
  }

  body.is-desktop-input .share-button,
  body.is-desktop-input .copy-button {
    min-height: 66px;
    border-radius: 14px;
  }

  body.is-desktop-input .share-button span,
  body.is-desktop-input .copy-button span {
    font-size: 20px;
  }
}

@media (min-width: 760px) and (max-height: 660px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .score-card {
    width: min(590px, calc(100vw - 64px));
    max-height: calc(var(--app-height) - 48px);
    gap: 13px;
    padding: 26px 28px 24px;
  }

  body.is-desktop-input .score-title {
    font-size: 39px;
  }

  body.is-desktop-input .score-ledger {
    padding: 11px 16px;
  }

  body.is-desktop-input .score-ledger-row {
    min-height: 44px;
    padding: 7px 0;
  }

  body.is-desktop-input .score-ledger-row span {
    font-size: 14.8px;
  }

  body.is-desktop-input .score-ledger-row small {
    font-size: 12.4px;
  }

  body.is-desktop-input .score-ledger-row strong {
    font-size: 19px;
  }

  body.is-desktop-input .score-result {
    padding: 15px 18px;
  }

  body.is-desktop-input .score-grade {
    width: 72px;
    height: 72px;
    font-size: 36px;
  }

  body.is-desktop-input .score-rating-title {
    font-size: 21px;
  }

  body.is-desktop-input .score-points strong {
    font-size: 45px;
  }

  body.is-desktop-input .share-button,
  body.is-desktop-input .copy-button {
    min-height: 56px;
  }

  body.is-desktop-input .share-button span,
  body.is-desktop-input .copy-button span {
    font-size: 17px;
  }
}

/* Puzzle Book Blue mobile play surface */
body:not(.is-desktop-input) {
  --paper: #f6fbff;
  --pause-tint: rgba(246, 251, 255, 0.68);
  --paper-modal-dim: #c5ced3;
  --paper-score-dim: #30383d;
  --score-overlay: transparent;
  --score-page-tint: #aab7bb;
  --ink: #101418;
  --muted: #5b6870;
  --line: rgba(31, 45, 55, 0.16);
  --river-blue: #048fc7;
  --river-blue-dark: #04759f;
  --teal: #0693c9;
  --brass: #ffca18;
  --brass-2: #fff0b8;
  --solved-clue: #fff1bd;
  --selected-clue: #dff7ff;
  background: var(--paper);
}

body:not(.is-desktop-input),
body:not(.is-desktop-input) html,
body:not(.is-desktop-input) .phone-shell,
body:not(.is-desktop-input) .game-card {
  background: var(--paper);
}

body:not(.is-desktop-input) .game-card {
  --clue-row-size: clamp(55px, 7.35svh, 67px);
  width: min(100%, 470px);
  padding: max(3px, env(safe-area-inset-top)) clamp(14px, 3.7vw, 22px) max(7px, env(safe-area-inset-bottom));
}

body:not(.is-desktop-input) .topbar {
  min-height: clamp(64px, 9.4svh, 78px);
  align-items: start;
  padding: clamp(8px, 1.8svh, 16px) 56px 0;
  margin-bottom: clamp(4px, 0.7svh, 7px);
}

body:not(.is-desktop-input) .brand-lockup {
  transform: none;
}

body:not(.is-desktop-input) .brand-mark,
body:not(.is-desktop-input) .date-label,
body:not(.is-desktop-input) .progress-copy {
  display: none;
}

body:not(.is-desktop-input) h1 {
  font-family: var(--ui-face);
  font-size: clamp(36px, 8.9vw, 46px);
  font-weight: 850;
  line-height: 0.93;
  letter-spacing: 0;
  text-shadow: none;
}

body:not(.is-desktop-input) .icon-button {
  top: clamp(9px, 1.9svh, 18px);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--river-blue);
}

body:not(.is-desktop-input) .topbar .ghost-button {
  left: 3px;
}

body:not(.is-desktop-input) .icon-button::after {
  content: none;
}

body:not(.is-desktop-input) .icon-button svg {
  width: 38px;
  height: 38px;
  stroke-width: 1.9;
}

body:not(.is-desktop-input) .game-timer {
  top: clamp(11px, 2.2svh, 20px);
  right: 4px;
  min-width: 58px;
  align-items: start;
  color: var(--river-blue);
  font-size: clamp(24px, 6.4vw, 32px);
  font-weight: 800;
}

body:not(.is-desktop-input) .progress-row {
  --keystone-box-h: clamp(45px, 6.2svh, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  min-height: calc(var(--keystone-box-h) + clamp(19px, 2.7svh, 26px));
  padding: 0 4px;
  margin-top: clamp(-1px, -0.12svh, 0px);
  margin-bottom: clamp(14px, 2.1svh, 20px);
}

body:not(.is-desktop-input) .keystone-wrap {
  grid-column: 1;
  gap: clamp(6px, 0.95svh, 8px);
}

body:not(.is-desktop-input) .keystone-label {
  color: #586872;
  font-family: var(--ui-face);
  font-size: clamp(14px, 3.25vw, 17px);
  font-weight: 750;
  letter-spacing: 0.03em;
}

body:not(.is-desktop-input) .keystone {
  gap: clamp(7px, 1.6vw, 10px);
}

body:not(.is-desktop-input) .keystone-letter {
  width: clamp(42px, 10vw, 50px);
  height: var(--keystone-box-h);
  border: 2px solid #bed1dc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: rgba(16, 20, 24, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(31, 45, 55, 0.05);
  font-family: var(--ui-face);
  font-size: clamp(24px, 6vw, 31px);
  font-weight: 750;
}

body:not(.is-desktop-input) .keystone-letter.is-revealed {
  color: #111;
  background: #fff;
  border-color: #bed1dc;
  box-shadow: 0 5px 12px rgba(18, 39, 52, 0.08), inset 0 -1px 0 rgba(31, 45, 55, 0.08);
  animation: none;
}

body:not(.is-desktop-input) .keystone-letter.is-newly-revealed {
  animation: none;
}

body:not(.is-desktop-input) .board-wrap {
  grid-template-columns: minmax(0, 1fr) clamp(86px, 21vw, 112px) minmax(0, 1fr);
  gap: 0;
  padding: 0 0 clamp(7px, 0.95svh, 10px);
  margin-bottom: 0;
}

body:not(.is-desktop-input) .bank-panel {
  gap: clamp(6px, 0.95svh, 8px);
  padding: 0;
}

body:not(.is-desktop-input) .bank-heading {
  min-height: clamp(19px, 2.7svh, 24px);
  color: #596872;
  font-family: var(--ui-face);
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 750;
  letter-spacing: 0.04em;
}

body:not(.is-desktop-input) .bank-heading span {
  gap: clamp(8px, 2vw, 12px);
}

body:not(.is-desktop-input) .bank-heading span::before,
body:not(.is-desktop-input) .bank-heading span::after {
  height: 2px;
  background: rgba(120, 141, 153, 0.24);
}

body:not(.is-desktop-input) .bank,
body:not(.is-desktop-input) .span-stack {
  grid-template-rows: repeat(5, var(--clue-row-size));
  gap: clamp(8px, 1.08svh, 11px);
}

body:not(.is-desktop-input) .clue-card {
  grid-template-columns: minmax(0, 1fr) 19px;
  justify-items: center;
  align-items: center;
  min-height: var(--clue-row-size);
  padding: 8px 9px 8px 12px;
  border: 2px solid #2a2f33;
  border-radius: 8px;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  font-family: var(--ui-face);
  font-size: clamp(17px, 4.25vw, 21px);
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
  transition:
    transform 180ms cubic-bezier(.16, .84, .24, 1),
    background 260ms var(--ease),
    border-color 260ms var(--ease),
    box-shadow 260ms var(--ease),
    color 260ms var(--ease);
}

body:not(.is-desktop-input) .clue-card::before,
body:not(.is-desktop-input) .clue-card::after {
  content: none;
}

body:not(.is-desktop-input) .clue-text {
  display: grid;
  place-items: center;
  min-height: 100%;
}

body:not(.is-desktop-input) .clue-card.is-row-selected {
  background: var(--selected-clue);
  border-color: #05a6d8;
  box-shadow: 0 0 0 2px rgba(5, 166, 216, 0.2), 0 8px 18px rgba(5, 121, 160, 0.12);
}

body:not(.is-desktop-input) .clue-card.is-dragging {
  z-index: 18;
  background: #fff;
  border-color: #049fd0;
  box-shadow: 0 18px 32px rgba(10, 41, 57, 0.24), 0 0 0 5px rgba(5, 166, 216, 0.16);
  animation: clueLiftGlow 420ms cubic-bezier(.16, .84, .24, 1) both;
}

body:not(.is-desktop-input) .clue-card.is-dragging-source {
  visibility: hidden;
  transform: none !important;
  box-shadow: none !important;
}

body:not(.is-desktop-input) .clue-card.is-drag-proxy {
  z-index: 10000;
  background: var(--selected-clue);
  border-color: #049fd0;
  box-shadow: 0 18px 32px rgba(10, 41, 57, 0.24), 0 0 0 5px rgba(5, 166, 216, 0.16);
  animation: clueLiftGlow 420ms cubic-bezier(.16, .84, .24, 1) both;
  isolation: isolate;
  contain: paint;
  will-change: transform;
}

body:not(.is-desktop-input).is-mobile-bank-dragging .clue-card.is-row-selected:not(.is-drag-proxy):not(.is-solved) {
  background: #fff;
  border-color: #2a2f33;
  box-shadow: none;
}

body:not(.is-desktop-input) .clue-card.is-preview-shift {
  transform: none !important;
  transition: background 120ms var(--ease), border-color 120ms var(--ease), box-shadow 120ms var(--ease);
  animation: none;
}

body:not(.is-desktop-input) .clue-card.is-settling {
  animation: clueSettleDelight 390ms cubic-bezier(.16, .84, .24, 1);
}

body:not(.is-desktop-input) .clue-card.is-solved {
  grid-template-columns: minmax(0, 1fr);
  padding: 8px 10px;
  color: #111;
  background: var(--solved-clue);
  border-color: #2a2f33;
  box-shadow: inset 0 -1px 0 rgba(30, 32, 34, 0.08);
}

body:not(.is-desktop-input) .clue-card.is-solved .clue-text {
  font-size: inherit;
  font-weight: 500;
  line-height: 1.08;
}

body:not(.is-desktop-input) .clue-card.is-finalizing {
  animation: clueSolveWash 760ms cubic-bezier(.16, .84, .24, 1);
}

body:not(.is-desktop-input) .move-medallion {
  width: 18px;
  color: var(--river-blue);
  opacity: 0.95;
  transform: none;
}

body:not(.is-desktop-input) .move-medallion svg {
  width: 16px;
  height: 24px;
  stroke-width: 2.1;
}

body:not(.is-desktop-input) .bridge-column {
  padding: clamp(27px, 4.1svh, 36px) 0 0;
}

body:not(.is-desktop-input) .bridge-column::before {
  top: 0;
  color: #596872;
  font-family: var(--ui-face);
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 750;
  letter-spacing: 0.04em;
}

body:not(.is-desktop-input) .waterline {
  top: clamp(29px, 4.35svh, 39px);
  right: clamp(13px, 3vw, 18px);
  bottom: 0;
  left: clamp(13px, 3vw, 18px);
  border-radius: 8px;
  background-color: #10bfd0;
  background-image:
    linear-gradient(112deg, rgba(255, 255, 255, 0.26) 0 9%, transparent 9% 26%, rgba(255, 255, 255, 0.2) 26% 32%, transparent 32% 100%),
    repeating-linear-gradient(164deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

body:not(.is-desktop-input) .waterline::before {
  opacity: 0.34;
}

body:not(.is-desktop-input) .bridge-span {
  z-index: 9;
  overflow: visible;
}

body:not(.is-desktop-input) .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty .bridge-plank {
  width: calc(100% + clamp(72px, 18.5vw, 94px));
  min-height: clamp(34px, calc(var(--clue-row-size) * 0.62), 44px);
  padding: 0 clamp(18px, 4.7vw, 24px);
  border: 1.4px solid #2a2f33;
  border-radius: 0;
  clip-path: polygon(0 50%, 16% 0, 84% 0, 100% 50%, 84% 100%, 16% 100%);
  color: #111;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 10px rgba(20, 46, 58, 0.12);
  font-family: var(--ui-face);
  font-size: clamp(17px, 4.15vw, 21px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow: hidden;
  transition:
    transform 260ms cubic-bezier(.16, .84, .24, 1),
    background 300ms var(--ease),
    border-color 300ms var(--ease),
    box-shadow 300ms var(--ease);
}

body:not(.is-desktop-input) .bridge-plank::before,
body:not(.is-desktop-input) .bridge-plank::after {
  content: none;
}

body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank {
  min-height: clamp(38px, calc(var(--clue-row-size) * 0.68), 48px);
  background: var(--selected-clue);
  border-color: #05a6d8;
  box-shadow: 0 0 0 3px rgba(5, 166, 216, 0.16), 0 10px 20px rgba(5, 121, 160, 0.15);
  transform: scaleX(1.045) scaleY(1.045);
}

body:not(.is-desktop-input) .bridge-span.is-built .bridge-plank {
  width: calc(100% + clamp(76px, 19.5vw, 98px));
  min-height: clamp(36px, calc(var(--clue-row-size) * 0.65), 46px);
  border: 2px solid #1c1f22;
  color: #111;
  background: var(--brass);
  box-shadow:
    inset 0 2px 0 #1c1f22,
    inset 0 -2px 0 #1c1f22,
    0 7px 13px rgba(36, 42, 46, 0.12);
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank {
  animation: bridgeFinalizePaint 820ms cubic-bezier(.16, .84, .24, 1) both;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank::before,
body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank::after,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank::before,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  background: rgba(255, 244, 190, 0.56);
  z-index: 1;
  pointer-events: none;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank::before,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank::before {
  left: 0;
  animation: bridgeEdgeZipLeft 520ms cubic-bezier(.22, .72, .2, 1) 130ms forwards;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank::after,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank::after {
  right: 0;
  animation: bridgeEdgeZipRight 520ms cubic-bezier(.22, .72, .2, 1) 130ms forwards;
}

body:not(.is-desktop-input) .word-label {
  width: 100%;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  z-index: 2;
}

body:not(.is-desktop-input) .word-label.is-blank-label {
  width: 72%;
  height: auto;
  min-height: 0;
  align-items: center;
  padding-bottom: 0;
}

body:not(.is-desktop-input) .blank-underline {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: #111;
  box-shadow: none;
  transform: translateY(1px);
}

body:not(.is-desktop-input) .bridge-span.is-selected .blank-underline {
  width: 108%;
  height: 3px;
  background: #111;
  box-shadow: none;
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label {
  gap: 0.015em;
  font-size: clamp(18px, 4.55vw, 22px);
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-long-word {
  font-size: clamp(15px, 3.8vw, 18px);
  letter-spacing: -0.015em;
}

body:not(.is-desktop-input) .marked-letter {
  min-width: 1.02em;
  position: relative;
  color: #111;
  text-shadow: none;
  z-index: 1;
}

body:not(.is-desktop-input) .marked-letter::before {
  content: "";
  position: absolute;
  inset: -0.13em -0.12em -0.11em -0.12em;
  border: 1.5px solid #111;
  border-radius: 0.18em;
  pointer-events: none;
  transform: translate(-0.035em, -0.045em);
  z-index: -1;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .marked-letter::before,
body:not(.is-desktop-input) .bridge-span.is-celebrating .marked-letter::before {
  animation: letterBoxDraw 520ms cubic-bezier(.16, .84, .24, 1) 260ms both;
}

body:not(.is-desktop-input) .answer-dock {
  gap: clamp(8px, 1.08svh, 10px);
  padding: clamp(10px, 1.55svh, 14px) 0 0;
  border-top: 2px solid rgba(120, 141, 153, 0.22);
  background: transparent;
}

body:not(.is-desktop-input) .status-line {
  min-height: 0;
  color: #111;
  font-family: var(--ui-face);
  font-size: clamp(15px, 3.9vw, 18px);
  font-weight: 450;
  line-height: 1.14;
}

body:not(.is-desktop-input) .input-row {
  grid-template-columns: minmax(0, 1fr) clamp(88px, 23vw, 112px);
  gap: clamp(8px, 2vw, 13px);
}

body:not(.is-desktop-input) .answer-input {
  min-height: clamp(44px, 6.1svh, 54px);
  border: 2px solid #bed1dc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  box-shadow: none;
  font-family: var(--ui-face);
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 650;
}

body:not(.is-desktop-input) .answer-input::placeholder {
  color: rgba(88, 104, 114, 0.46);
  font-size: clamp(15px, 3.9vw, 18px);
  font-weight: 750;
}

body:not(.is-desktop-input) .primary-button,
body:not(.is-desktop-input) .hint-button {
  min-height: clamp(44px, 6.2svh, 54px);
  border-radius: 8px;
  color: #fff;
  background: var(--river-blue);
  box-shadow: 0 4px 0 var(--river-blue-dark);
  font-family: var(--ui-face);
  font-size: clamp(19px, 4.9vw, 24px);
  font-weight: 700;
}

body:not(.is-desktop-input) .primary-button.is-pressing,
body:not(.is-desktop-input) .hint-button.is-pressing {
  animation: buttonIndent 260ms cubic-bezier(.16, .84, .24, 1);
}

body:not(.is-desktop-input) .keyboard-panel {
  gap: clamp(7px, 1svh, 9px);
  padding-top: 0;
}

body:not(.is-desktop-input) .keyboard-row {
  gap: clamp(4px, 1vw, 7px);
}

body:not(.is-desktop-input) .key-button {
  width: clamp(32px, 8.5vw, 43px);
  height: clamp(39px, 5.6svh, 47px);
  border: 2px solid #bed1dc;
  border-radius: 7px;
  color: #111;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 0 rgba(154, 178, 190, 0.55);
  font-family: var(--ui-face);
  font-size: clamp(18px, 4.8vw, 24px);
  font-weight: 700;
}

body:not(.is-desktop-input) .key-button.is-delete {
  color: #fff;
  background: #d9273d;
  border-color: #c62034;
  box-shadow: 0 2px 0 #ab1b2d;
}

body:not(.is-desktop-input) .hint-row {
  gap: clamp(11px, 2.6vw, 16px);
}

body:not(.is-desktop-input) .hint-order {
  color: #566872;
  font-family: var(--ui-face);
  font-size: clamp(15px, 3.9vw, 18px);
  line-height: 1.14;
}

body:not(.is-desktop-input) .spark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 16px rgba(255, 202, 24, 0.8);
}

body:not(.is-desktop-input) .row-ripple {
  inset: -7px -15px;
  border: 2px solid rgba(5, 166, 216, 0.42);
  border-radius: 10px;
}

body:not(.is-desktop-input) .is-auto-moving {
  z-index: 24;
  will-change: transform;
}

body:not(.is-desktop-input) .is-hero-auto-moving {
  z-index: 56;
}

body:not(.is-desktop-input).is-board-auto-placing .bank-panel {
  z-index: 18;
}

body:not(.is-desktop-input).is-board-auto-placing .bridge-column {
  z-index: 48;
}

body:not(.is-desktop-input) .clue-card.is-auto-moving {
  z-index: 28;
}

body:not(.is-desktop-input) .clue-card.is-hero-auto-moving {
  position: relative;
  z-index: 72;
}

body:not(.is-desktop-input) .bridge-span.is-auto-moving {
  z-index: 44;
  overflow: visible;
}

body:not(.is-desktop-input) .bridge-span.is-auto-moving .bridge-plank {
  z-index: 44;
}

body:not(.is-desktop-input) .bridge-span.is-hero-auto-moving,
body:not(.is-desktop-input) .bridge-span.is-hero-auto-moving .bridge-plank {
  z-index: 60;
}

@keyframes clueLiftGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.04); }
}

@keyframes clueSettleDelight {
  0% { transform: translateY(-2px) scale(1.012); }
  48% { transform: translateY(1px) scale(0.994); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes clueSolveWash {
  0% { background: var(--selected-clue); border-color: #05a6d8; }
  58% { background: #fff8d5; border-color: #2a2f33; }
  100% { background: var(--solved-clue); border-color: #2a2f33; }
}

@keyframes bridgeFinalizePaint {
  0% {
    background: var(--selected-clue);
    border-color: #05a6d8;
    box-shadow: 0 0 0 3px rgba(5, 166, 216, 0.14);
    transform: translate(-50%, -50%) scaleX(1.05) scaleY(1.07);
  }
  44% {
    background: #ffe37a;
    border-color: #1c1f22;
    box-shadow: 0 0 0 3px rgba(255, 202, 24, 0.22), 0 9px 18px rgba(36, 42, 46, 0.14);
    transform: translate(-50%, -50%) scaleX(1.09) scaleY(1.08);
  }
  100% {
    background: var(--brass);
    border-color: #1c1f22;
    box-shadow: inset 0 2px 0 #1c1f22, inset 0 -2px 0 #1c1f22, 0 7px 13px rgba(36, 42, 46, 0.12);
    transform: translate(-50%, -50%) scaleX(1) scaleY(1);
  }
}

@keyframes bridgeEdgeZipLeft {
  0% { transform: translateX(0) scaleX(1); opacity: 0.95; }
  100% { transform: translateX(98%) scaleX(0.04); opacity: 0; }
}

@keyframes bridgeEdgeZipRight {
  0% { transform: translateX(0) scaleX(1); opacity: 0.95; }
  100% { transform: translateX(-98%) scaleX(0.04); opacity: 0; }
}

@keyframes mobileBridgeSelectJiggle {
  0% { transform: translate(-50%, -50%) scaleX(0.985) scaleY(0.985); }
  48% { transform: translate(-50%, -50%) scaleX(1.045) scaleY(1.06); }
  74% { transform: translate(-50%, -50%) scaleX(0.995) scaleY(0.992); }
  100% { transform: translate(-50%, -50%) scaleX(1) scaleY(1); }
}

@keyframes mobileBridgeSelectRelease {
  0% { transform: translate(-50%, -50%) scaleX(1.015) scaleY(1.025); }
  100% { transform: translate(-50%, -50%) scaleX(1) scaleY(1); }
}

@keyframes mobileBridgeCorrectPop {
  0% { transform: translate(-50%, -50%) scaleX(1.02) scaleY(1.04); }
  42% { transform: translate(-50%, -50%) scaleX(1.075) scaleY(1.11); }
  70% { transform: translate(-50%, -50%) scaleX(0.99) scaleY(0.985); }
  100% { transform: translate(-50%, -50%) scaleX(1) scaleY(1); }
}

@keyframes mobileBridgeCorrectOutline {
  0% {
    background: #05a6d8;
  }
  38% {
    background: #111820;
  }
  100% {
    background: #111820;
  }
}

@keyframes mobileBridgeFillPaint {
  0% { background: var(--selected-clue); }
  36% { background: #fff0a8; }
  100% { background: var(--brass); }
}

@keyframes bridgeUnderlineExit {
  0% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleX(0.08);
  }
}

@keyframes letterBoxDraw {
  0% { opacity: 0; transform: scale(0.62); }
  58% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes buttonIndent {
  0% { transform: translateY(0) scale(1); box-shadow: 0 4px 0 var(--river-blue-dark); }
  45% { transform: translateY(3px) scale(0.975); box-shadow: 0 1px 0 var(--river-blue-dark); }
  100% { transform: translateY(0) scale(1); box-shadow: 0 4px 0 var(--river-blue-dark); }
}

/* Corrections to keep the playable mobile surface aligned with the approved v6 mock. */
body:not(.is-desktop-input) .game-card {
  --clue-row-size: clamp(54px, 6.85svh, 64px);
  padding-right: 12px;
  padding-left: 12px;
}

body:not(.is-desktop-input) .topbar {
  min-height: clamp(48px, 7.35svh, 62px);
  padding: clamp(5px, 1svh, 9px) 48px 0;
  margin-bottom: 0;
}

body:not(.is-desktop-input) h1 {
  font-size: clamp(28px, 7.15vw, 31px);
  font-weight: 820;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

body:not(.is-desktop-input) .icon-button {
  top: clamp(5px, 1.05svh, 10px);
  width: 36px;
  height: 36px;
}

body:not(.is-desktop-input) .icon-button svg {
  width: 33px;
  height: 33px;
  stroke-width: 2.05;
}

body:not(.is-desktop-input) #mobileHelpButton svg {
  display: none;
}

body:not(.is-desktop-input) #mobileHelpButton::before {
  content: "?";
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 3px solid currentColor;
  border-radius: 50%;
  color: var(--river-blue);
  font-family: var(--ui-face);
  font-size: 22px;
  font-weight: 760;
  line-height: 1;
  transform: translateY(-0.02em);
}

body:not(.is-desktop-input) .game-timer {
  top: clamp(7px, 1.2svh, 11px);
  right: 0;
  min-width: 48px;
  font-size: 20px;
  font-weight: 780;
}

body:not(.is-desktop-input) .progress-row {
  --keystone-box-h: 36px;
  min-height: clamp(68px, 10.4svh, 90px);
  margin-top: 0;
  margin-bottom: 0;
}

body:not(.is-desktop-input) .keystone-wrap {
  gap: 6px;
  transform: translateY(clamp(-8px, -0.75svh, -5px));
}

body:not(.is-desktop-input) .keystone-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

body:not(.is-desktop-input) .keystone {
  gap: 6px;
}

body:not(.is-desktop-input) .keystone-letter {
  width: 36px;
  height: 36px;
  border-width: 2px;
  border-radius: 6px;
  font-size: 21px;
  font-weight: 800;
}

body:not(.is-desktop-input) .keystone-letter:not(.is-revealed):not(.is-hinted) {
  font-size: 18px;
}

body:not(.is-desktop-input) .board-wrap {
  --mobile-bridge-column: 74px;
  --mobile-board-gap: 7px;
  --mobile-bridge-width: calc((var(--mobile-bridge-column) + (2 * var(--mobile-board-gap))) / 0.68);
  grid-template-columns: minmax(0, 1fr) var(--mobile-bridge-column) minmax(0, 1fr);
  gap: var(--mobile-board-gap);
  padding-bottom: 5px;
  margin-bottom: -5px;
  isolation: isolate;
}

body:not(.is-desktop-input) .bank-panel {
  position: relative;
  z-index: 2;
  gap: clamp(4px, 0.58svh, 6px);
}

body:not(.is-desktop-input) .bank-heading,
body:not(.is-desktop-input) .bridge-column::before {
  min-height: 17px;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.06em;
}

body:not(.is-desktop-input) .bank,
body:not(.is-desktop-input) .span-stack {
  gap: clamp(4px, 0.56svh, 6px);
}

body:not(.is-desktop-input) .clue-card {
  grid-template-columns: minmax(0, 1fr);
  min-height: var(--clue-row-size);
  padding: 8px 22px;
  font-size: clamp(15.5px, min(4.45vw, 2.35svh), 18px);
  font-weight: 520;
  line-height: 1.02;
}

body:not(.is-desktop-input) .bank-left .clue-card {
  padding-right: 22px;
  padding-left: 22px;
}

body:not(.is-desktop-input) .bank-right .clue-card {
  padding-right: 22px;
  padding-left: 22px;
}

body:not(.is-desktop-input) .move-medallion,
body:not(.is-desktop-input) .lock-medallion {
  display: none;
}

body:not(.is-desktop-input) .clue-card.is-solved .clue-text {
  font-size: inherit;
  font-weight: 520;
}

body:not(.is-desktop-input) .bank-left .clue-card,
body:not(.is-desktop-input) .bank-right .clue-card {
  grid-template-columns: minmax(0, 1fr);
}

body:not(.is-desktop-input) .move-medallion {
  position: absolute;
  top: 50%;
  display: grid;
  width: 14px;
  height: 29px;
  place-items: center;
  color: var(--river-blue);
  opacity: 0.26;
  pointer-events: none;
  transform: translateY(-50%);
}

body:not(.is-desktop-input) .bank-left .move-medallion,
body:not(.is-desktop-input) .clue-card[data-side="left"] .move-medallion {
  left: 7px;
  right: auto;
}

body:not(.is-desktop-input) .bank-right .move-medallion,
body:not(.is-desktop-input) .clue-card[data-side="right"] .move-medallion {
  left: auto;
  right: 7px;
}

body:not(.is-desktop-input) .move-medallion svg {
  width: 12px;
  height: 23px;
  stroke-width: 2;
  transform: scaleY(1.12);
}

body:not(.is-desktop-input) .clue-card.is-row-selected .move-medallion,
body:not(.is-desktop-input) .clue-card.is-drag-proxy .move-medallion {
  opacity: 0.38;
}

body:not(.is-desktop-input) .bridge-column {
  position: relative;
  z-index: 6;
  padding-top: 20px;
}

body:not(.is-desktop-input) .waterline {
  top: 20px;
  right: 0;
  left: 0;
  border-radius: 7px;
}

body:not(.is-desktop-input) .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty .bridge-plank {
  --bridge-fill: rgba(255, 255, 255, 0.96);
  --bridge-outline: #2a2f33;
  --bridge-outline-size: 1.55px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(116px, 34vw, 140px);
  height: 66%;
  min-height: 0;
  padding: 0 18px;
  border: 0;
  clip-path: polygon(0 50%, 16% 0, 84% 0, 100% 50%, 84% 100%, 16% 100%);
  background: transparent;
  box-shadow: none;
  overflow: visible;
  font-size: calc(clamp(15.5px, min(4.45vw, 2.35svh), 18px) * 1.04);
  transform: translate(-50%, -50%);
}

body:not(.is-desktop-input) .bridge-plank::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 50%, 16% 0, 84% 0, 100% 50%, 84% 100%, 16% 100%);
  background: var(--bridge-outline);
  z-index: 0;
  pointer-events: none;
  transition: background 300ms var(--ease);
}

body:not(.is-desktop-input) .bridge-plank::after {
  content: "";
  position: absolute;
  inset: var(--bridge-outline-size);
  clip-path: polygon(0 50%, 16% 0, 84% 0, 100% 50%, 84% 100%, 16% 100%);
  background: var(--bridge-fill);
  z-index: 1;
  pointer-events: none;
  transition: background 300ms var(--ease);
}

body:not(.is-desktop-input) .bridge-plank > * {
  position: relative;
  z-index: 2;
}

body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank {
  --bridge-fill: var(--selected-clue);
  --bridge-outline: #05a6d8;
  --bridge-outline-size: 2px;
  width: clamp(120px, 36vw, 146px);
  height: 72%;
  min-height: 0;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank {
  --bridge-fill: rgba(255, 255, 255, 0.96);
  --bridge-outline: #2a2f33;
  --bridge-outline-size: 1.55px;
  width: clamp(116px, 34vw, 140px);
  height: 66%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: none !important;
  animation: none !important;
  transform: translate(-50%, -50%) !important;
}

body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank::before,
body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank::after {
  transition: none !important;
  animation: none !important;
}

body:not(.is-desktop-input) .bridge-span.is-built .bridge-plank {
  --bridge-fill: var(--brass);
  --bridge-outline: #1c1f22;
  --bridge-outline-size: 2px;
  width: clamp(116px, 34vw, 140px);
  height: 66%;
  min-height: 0;
  box-shadow: none;
}

body:not(.is-desktop-input) .bridge-span.is-selecting .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-deselecting .bridge-plank {
  animation: none;
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label {
  font-size: calc(clamp(15.5px, min(4.45vw, 2.35svh), 18px) * 1.04);
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-long-word {
  font-size: calc(clamp(15.5px, min(4.45vw, 2.35svh), 18px) * 0.9);
}

body:not(.is-desktop-input) .word-label.is-blank-label {
  width: 72%;
  position: relative;
  top: auto;
  left: auto;
  display: flex;
  align-self: stretch;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-height: 100%;
  padding-bottom: 9px;
  transform: none;
  z-index: 2;
}

body:not(.is-desktop-input) .bridge-span.is-selected .word-label.is-blank-label {
  width: 76%;
  padding-bottom: 10px;
}

body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .word-label.is-blank-label {
  width: 72%;
  padding-bottom: 9px;
}

body:not(.is-desktop-input) .blank-underline {
  display: block;
  width: 100%;
  height: 2.05px;
  min-height: 2.05px;
  transform: none;
}

body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .blank-underline {
  height: 2.05px;
  min-height: 2.05px;
  background: rgba(72, 55, 35, 0.46);
  box-shadow: 0 1px 0 rgba(255, 246, 222, 0.78), 0 0 0 1px rgba(100, 70, 38, 0.06);
}

body:not(.is-desktop-input) .bridge-span.is-selecting .bridge-plank {
  animation: mobileBridgeSelectJiggle 310ms cubic-bezier(.16, .84, .24, 1) both;
}

body:not(.is-desktop-input) .bridge-span.is-deselecting .bridge-plank {
  animation: mobileBridgeSelectRelease 230ms cubic-bezier(.22, .72, .2, 1) both;
}

body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selecting .bridge-plank,
body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-deselecting .bridge-plank {
  animation: none !important;
}

body:not(.is-desktop-input) .bridge-span.is-typing-preview .bridge-plank {
  color: #111;
}

body:not(.is-desktop-input) .bridge-span.is-typing-preview .word-label {
  height: 100%;
  padding-bottom: 0;
  position: relative;
  align-items: center;
  font-size: calc(clamp(15.5px, min(4.45vw, 2.35svh), 18px) * 1.02);
  font-weight: 900;
  letter-spacing: 0.02em;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.has-typed-underline,
body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.has-typed-underline {
  height: 100%;
  padding-bottom: 0;
  align-items: center;
}

body:not(.is-desktop-input) .word-label.has-typed-underline .typed-underline {
  position: absolute;
  right: auto;
  bottom: 6px;
  left: 50%;
  width: 74%;
  height: 2.05px;
  min-height: 2.05px;
  background: #111;
  box-shadow: none;
  transform: translateX(-50%);
}

body:not(.is-desktop-input) .bridge-span.is-finalizing::after,
body:not(.is-desktop-input) .bridge-span.is-celebrating::after {
  content: none !important;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: mobileBridgeCorrectPop 900ms cubic-bezier(.16, .84, .24, 1) both;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank::before,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank::before {
  content: "";
  background: #1c1f22;
  animation: none !important;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank::after,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank::after {
  content: "";
  animation: mobileBridgeFillPaint 900ms cubic-bezier(.16, .84, .24, 1) both;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .typed-underline,
body:not(.is-desktop-input) .bridge-span.is-celebrating .typed-underline {
  animation: bridgeUnderlineExit 520ms cubic-bezier(.22, .72, .2, 1) 170ms both;
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label {
  gap: 0.025em;
  letter-spacing: 0.015em;
}

body:not(.is-desktop-input) .bridge-span.is-built .marked-letter {
  min-width: 1.08em;
  margin-right: 0.03em;
}

body:not(.is-desktop-input) .marked-letter::before {
  inset: -0.12em -0.02em -0.1em -0.02em;
  transform: none;
}

body:not(.is-desktop-input) .answer-dock {
  gap: 7px;
  padding-top: clamp(9px, 1.05svh, 11px);
  border-top-width: 1px;
}

body:not(.is-desktop-input) .status-line {
  font-size: clamp(13px, 3.7vw, 16px);
  font-weight: 500;
  line-height: 1.12;
}

body:not(.is-desktop-input) .input-row {
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 7px;
}

body:not(.is-desktop-input) .answer-input,
body:not(.is-desktop-input) .primary-button,
body:not(.is-desktop-input) .hint-button {
  min-height: 44px;
  border-radius: 7px;
}

body:not(.is-desktop-input) .answer-input {
  font-size: 16px;
}

body:not(.is-desktop-input) .answer-input::placeholder {
  font-size: 14px;
}

body:not(.is-desktop-input) .primary-button,
body:not(.is-desktop-input) .hint-button {
  font-size: 17px;
  font-weight: 800;
}

body:not(.is-desktop-input) .keyboard-panel {
  gap: 5px;
}

body:not(.is-desktop-input) .keyboard-row {
  gap: 5px;
}

body:not(.is-desktop-input) .key-button {
  width: clamp(30px, 8.4vw, 36px);
  height: clamp(34px, 9.8vw, 43px);
  border-radius: 6px;
  font-size: clamp(16px, 4.5vw, 20px);
}

body:not(.is-desktop-input) .key-button.is-delete {
  width: clamp(50px, 13.8vw, 60px);
}

body:not(.is-desktop-input) .hint-row {
  gap: 9px;
}

body:not(.is-desktop-input) .hint-button {
  width: 92px;
}

body:not(.is-desktop-input) .hint-order {
  font-size: clamp(13px, 3.55vw, 16px);
  font-weight: 500;
  line-height: 1.08;
}

/* Stabilize mobile notched bridges after the animation prototype pass. */
body:not(.is-desktop-input) .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty .bridge-plank {
  --stable-bridge-fill: rgba(255, 255, 255, 0.96);
  --stable-bridge-outline: #2a2f33;
  --stable-bridge-outline-size: 1.1px;
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--mobile-bridge-width);
  height: 54%;
  min-height: 0;
  padding: 0 18px;
  border: 0 !important;
  clip-path: none;
  color: #111;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
  isolation: isolate;
  transform: translate(-50%, -50%);
}

body:not(.is-desktop-input) .bridge-plank::before,
body:not(.is-desktop-input) .bridge-plank::after {
  content: none !important;
  display: none !important;
}

body:not(.is-desktop-input) .bridge-shape {
  inset: 0;
  position: absolute;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

body:not(.is-desktop-input) .bridge-shape-path {
  fill: var(--stable-bridge-fill);
  stroke: var(--stable-bridge-outline);
  stroke-linejoin: round;
  stroke-width: var(--stable-bridge-outline-size);
  vector-effect: non-scaling-stroke;
  transition:
    fill 280ms var(--ease),
    stroke 280ms var(--ease),
    stroke-width 280ms var(--ease);
}

body:not(.is-desktop-input) .bridge-plank > * {
  position: relative;
  z-index: 2;
}

body:not(.is-desktop-input) .bridge-plank > .word-label {
  display: inline-flex;
  position: relative;
  z-index: 2;
  width: 66%;
  height: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank {
  --stable-bridge-fill: var(--selected-clue);
  --stable-bridge-outline: #05a6d8;
  --stable-bridge-outline-size: 1.35px;
  width: calc(var(--mobile-bridge-width) + 4px);
  height: 58%;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 10px 14px rgba(5, 121, 160, 0.12));
  transform: translate(-50%, -50%);
}

body:not(.is-desktop-input) .bridge-span.is-built .bridge-plank {
  --stable-bridge-fill: var(--brass);
  --stable-bridge-outline: #1c1f22;
  --stable-bridge-outline-size: 2.25px;
  width: var(--mobile-bridge-width);
  height: 58%;
  border: 0 !important;
  color: #111;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 7px 10px rgba(36, 42, 46, 0.12));
}

body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank {
  --stable-bridge-fill: rgba(255, 255, 255, 0.96);
  --stable-bridge-outline: #2a2f33;
  --stable-bridge-outline-size: 1.1px;
  width: var(--mobile-bridge-width);
  height: 54%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 4px 8px rgba(20, 46, 58, 0.08)) !important;
  transform: translate(-50%, -50%) !important;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank {
  --stable-bridge-fill: var(--brass);
  --stable-bridge-outline: #1c1f22;
  --stable-bridge-outline-size: 2.25px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 7px 10px rgba(36, 42, 46, 0.12)) !important;
  animation: mobileBridgeCorrectPop 900ms cubic-bezier(.16, .84, .24, 1) both;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank::before,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank::before {
  content: none !important;
  display: none !important;
}

body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank::after,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank::after {
  content: none !important;
  display: none !important;
}

body:not(.is-desktop-input) .bridge-plank > .word-label,
body:not(.is-desktop-input) .bridge-plank > .word-label.is-blank-label,
body:not(.is-desktop-input) .bridge-plank > .word-label.has-typed-underline {
  position: relative !important;
  inset: auto !important;
  display: inline-flex !important;
  width: 72% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  align-self: center !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
}

body:not(.is-desktop-input) .bridge-plank > .word-label.is-medium-word {
  width: 80% !important;
}

body:not(.is-desktop-input) .bridge-plank > .word-label.is-long-word {
  width: 84% !important;
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label,
body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label,
body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label {
  width: 86% !important;
  gap: 0.024em !important;
  letter-spacing: 0.002em !important;
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-medium-word,
body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.is-medium-word,
body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.is-medium-word {
  width: 89% !important;
  gap: 0.014em !important;
  font-size: clamp(14.4px, 3.62vw, 16.2px) !important;
  letter-spacing: 0.002em !important;
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-long-word,
body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.is-long-word,
body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.is-long-word {
  font-size: clamp(13.4px, 3.34vw, 15px) !important;
}

body:not(.is-desktop-input) .word-label.is-medium-word .bridge-letter {
  min-width: 0.5em;
}

body:not(.is-desktop-input) .word-label.is-medium-word .marked-letter {
  min-width: 1.08em;
  margin-right: 0.01em;
}

body:not(.is-desktop-input) .bridge-span.is-built .marked-letter,
body:not(.is-desktop-input) .bridge-span.is-finalizing .marked-letter,
body:not(.is-desktop-input) .bridge-span.is-celebrating .marked-letter {
  min-width: 0.96em;
  margin-right: 0.04em;
}

body:not(.is-desktop-input) .bridge-span.is-built .marked-letter::before,
body:not(.is-desktop-input) .bridge-span.is-finalizing .marked-letter::before,
body:not(.is-desktop-input) .bridge-span.is-celebrating .marked-letter::before,
body:not(.is-desktop-input) .word-label.is-medium-word .marked-letter::before,
body:not(.is-desktop-input) .word-label.is-long-word .marked-letter::before {
  inset: -0.14em 0.05em -0.12em 0.05em;
}

body:not(.is-desktop-input) .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .word-label {
  gap: 0 !important;
  font-size: clamp(13.8px, 3.55vw, 15.6px) !important;
  font-weight: 520 !important;
  letter-spacing: 0 !important;
}

body:not(.is-desktop-input) .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .word-label.is-long-word {
  font-size: clamp(13px, 3.3vw, 14.6px) !important;
}

body:not(.is-desktop-input) .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .bridge-letter {
  font-weight: 520 !important;
  letter-spacing: 0 !important;
}

body:not(.is-desktop-input) .bridge-plank .blank-underline {
  display: block !important;
  width: 100% !important;
  height: 2.4px !important;
  min-height: 2.4px !important;
  border-radius: 2px;
  background: #111 !important;
  box-shadow: none !important;
  transform: translateY(6px) !important;
}

body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank .blank-underline {
  width: 108% !important;
  height: 2.6px !important;
}

body:not(.is-desktop-input) .bridge-plank .word-label.has-typed-underline {
  padding-bottom: 0 !important;
}

body:not(.is-desktop-input) .bridge-plank .word-label.has-typed-underline .typed-underline {
  position: absolute !important;
  right: auto !important;
  bottom: 6px !important;
  left: 50% !important;
  width: 104% !important;
  height: 2.4px !important;
  min-height: 2.4px !important;
  transform: translateX(-50%) !important;
}

body:not(.is-desktop-input) .bridge-plank > .bridge-shape {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

/* Keep mobile answer controls content-sized instead of stretching with spare viewport height. */
body:not(.is-desktop-input) .game-card {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: start;
  --mobile-stack-shift: clamp(8px, 1.7svh, 16px);
}

body:not(.is-desktop-input) .topbar,
body:not(.is-desktop-input) .progress-row,
body:not(.is-desktop-input) .board-wrap,
body:not(.is-desktop-input) .answer-dock {
  transform: translateY(var(--mobile-stack-shift));
}

body:not(.is-desktop-input) .answer-dock {
  align-self: start;
  align-content: start;
  grid-auto-rows: max-content;
}

body:not(.is-desktop-input) .status-line {
  min-height: 0;
  margin-bottom: -1px;
}

body:not(.is-desktop-input) .input-row {
  min-height: 0;
  align-items: stretch;
}

body:not(.is-desktop-input) .answer-input,
body:not(.is-desktop-input) .primary-button,
body:not(.is-desktop-input) .hint-button {
  height: clamp(45px, 5.4svh, 52px);
  min-height: clamp(45px, 5.4svh, 52px);
  max-height: clamp(45px, 5.4svh, 52px);
}

body:not(.is-desktop-input) .dock-footer {
  margin-top: 0;
}

body:not(.is-desktop-input) .waterline {
  bottom: 0 !important;
}

.game-card.is-endgame-finale .board-wrap {
  animation: none;
}

.game-card.is-endgame-finale .waterline::after {
  content: none !important;
  animation: none !important;
}

.game-card.is-endgame-finale .bridge-span.is-built .bridge-plank {
  animation:
    finaleBridgeSalute 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--row-index, 0) * 120ms);
}

.game-card.is-endgame-finale .bridge-span.is-built .bridge-plank::after {
  content: none !important;
  animation: none !important;
}

.game-card.is-endgame-finale .clue-card.is-solved {
  animation: finaleClueWarm 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--row-index, 0) * 120ms);
}

.game-card.is-endgame-finale .keystone {
  transform-origin: center;
  animation: finaleKeystoneSqueeze 560ms cubic-bezier(0.16, 1, 0.3, 1) 1120ms both;
}

.game-card.is-endgame-finale .keystone-letter.is-revealed {
  animation: finaleKeystoneTilePulse 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--keystone-index, 0) * 120ms);
}

.keystone {
  position: relative;
}

.endgame-confetti {
  position: absolute;
  inset: 0;
  z-index: 140;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  width: var(--confetti-w);
  height: var(--confetti-h);
  border-radius: 1px;
  background: var(--confetti-color);
  box-shadow: 0 1px 0 rgba(16, 20, 24, 0.14);
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.45);
  will-change: transform, opacity;
}

.confetti-piece.is-square {
  border-radius: 1.5px;
}

.confetti-piece.is-wide {
  border-radius: 1px;
}

.confetti-piece.is-ticket {
  border-radius: 2px 0 2px 0;
}

.confetti-piece.is-ribbon {
  border-radius: 999px;
}

@keyframes finaleBridgeSalute {
  0% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
  42% { transform: translate(-50%, -57%) scale(1.16); filter: brightness(1.1); }
  74% { transform: translate(-50%, -49%) scale(0.985); filter: brightness(1.02); }
  100% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@keyframes finaleClueWarm {
  0% { transform: scale(1); filter: brightness(1); }
  42% { transform: scale(1.075); filter: brightness(1.06); }
  74% { transform: scale(0.992); filter: brightness(1.02); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes finaleKeystoneTilePulse {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  42% { transform: translateY(-4px) scale(1.18); filter: brightness(1.1); }
  74% { transform: translateY(1px) scale(0.98); filter: brightness(1.02); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes finaleKeystoneSqueeze {
  0% { transform: scaleX(1) scaleY(1); }
  42% { transform: scaleX(0.78) scaleY(1.1); }
  66% { transform: scaleX(1.12) scaleY(0.95); }
  84% { transform: scaleX(0.97) scaleY(1.025); }
  100% { transform: scaleX(1) scaleY(1); }
}

@media (max-width: 430px) and (min-height: 840px) {
  body:not(.is-desktop-input) .phone-shell {
    padding-top: max(4px, env(safe-area-inset-top));
  }

  body:not(.is-desktop-input) .game-card {
    --clue-row-size: clamp(66px, 7.15svh, 72px);
    --mobile-stack-shift: clamp(6px, 1.2svh, 12px);
    gap: clamp(6px, 0.78svh, 8px);
  }

  body:not(.is-desktop-input) .topbar {
    min-height: clamp(56px, 6.9svh, 64px);
  }

  body:not(.is-desktop-input) .progress-row {
    min-height: clamp(78px, 8.7svh, 88px);
    margin-bottom: clamp(8px, 1svh, 11px);
  }

  body:not(.is-desktop-input) .board-wrap {
    padding-bottom: clamp(8px, 1svh, 10px);
  }

  body:not(.is-desktop-input) .answer-dock {
    padding-top: clamp(7px, 0.9svh, 10px);
  }

  body:not(.is-desktop-input) .status-line {
    font-size: clamp(15px, 3.7vw, 17px);
  }

  body:not(.is-desktop-input) .answer-input,
  body:not(.is-desktop-input) .primary-button,
  body:not(.is-desktop-input) .hint-button {
    height: clamp(48px, 5.5svh, 54px);
    min-height: clamp(48px, 5.5svh, 54px);
    max-height: clamp(48px, 5.5svh, 54px);
  }

  body:not(.is-desktop-input) .key-button {
    height: clamp(43px, 5.05svh, 48px);
  }
}

/* The score report tints the page itself so browser chrome and web content match. */
html.has-score-modal,
body.has-score-modal {
  background-color: var(--score-page-tint);
}

body.has-score-modal .phone-shell,
body.has-score-modal .game-card {
  background: var(--score-page-tint);
}

body.has-score-modal .topbar,
body.has-score-modal .progress-row,
body.has-score-modal .board-wrap,
body.has-score-modal .answer-dock {
  filter: brightness(0.84) saturate(0.72);
  opacity: 0.72;
}

@media (max-width: 430px) and (max-height: 720px) {
  body:not(.is-desktop-input) .phone-shell {
    padding-top: 0;
    padding-bottom: 0;
  }

  body:not(.is-desktop-input) .game-card {
    --mobile-stack-shift: clamp(22px, 4.8svh, 34px);
    --clue-row-size: clamp(47px, 7.1svh, 51px);
    gap: 2px;
    padding-top: max(2px, env(safe-area-inset-top));
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }

  body:not(.is-desktop-input) .topbar {
    min-height: clamp(39px, 6.45svh, 46px);
    padding-top: 3px;
  }

  body:not(.is-desktop-input) h1 {
    font-size: clamp(25px, 6.9vw, 29px);
  }

  body:not(.is-desktop-input) .icon-button {
    top: 3px;
    width: 32px;
    height: 32px;
  }

  body:not(.is-desktop-input) #mobileHelpButton::before {
    width: 25px;
    height: 25px;
    border-width: 2.5px;
    font-size: 19px;
  }

  body:not(.is-desktop-input) .game-timer {
    top: 4px;
    min-width: 44px;
    font-size: 18px;
  }

  body:not(.is-desktop-input) .progress-row {
    --keystone-box-h: 31px;
    min-height: clamp(54px, 8.55svh, 62px);
  }

  body:not(.is-desktop-input) .keystone-wrap {
    gap: 4px;
    transform: translateY(-4px);
  }

  body:not(.is-desktop-input) .keystone-label {
    font-size: 11.5px;
  }

  body:not(.is-desktop-input) .keystone {
    gap: 5px;
  }

  body:not(.is-desktop-input) .keystone-letter {
    width: 31px;
    height: 31px;
    font-size: 19px;
  }

  body:not(.is-desktop-input) .board-wrap {
    --mobile-bridge-column: 70px;
    --mobile-board-gap: 5px;
    padding-bottom: 2px;
    margin-bottom: -4px;
  }

  body:not(.is-desktop-input) .bank-panel {
    gap: 2px;
  }

  body:not(.is-desktop-input) .bank-heading,
  body:not(.is-desktop-input) .bridge-column::before {
    min-height: 15px;
    font-size: 11px;
  }

  body:not(.is-desktop-input) .bank,
  body:not(.is-desktop-input) .span-stack {
    gap: 2px;
  }

  body:not(.is-desktop-input) .clue-card {
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: clamp(14.3px, min(4.1vw, 2.25svh), 16.2px);
  }

  body:not(.is-desktop-input) .bridge-column {
    padding-top: 17px;
  }

  body:not(.is-desktop-input) .waterline {
    top: 17px;
  }

  body:not(.is-desktop-input) .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty .bridge-plank {
    height: 53%;
    padding-right: 16px;
    padding-left: 16px;
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-built .bridge-plank {
    height: 57%;
  }

  body:not(.is-desktop-input) .answer-dock {
    gap: 3px;
    padding-top: 5px;
  }

  body:not(.is-desktop-input) .status-line {
    font-size: clamp(12px, 3.2vw, 13.6px);
    line-height: 1.08;
  }

  body:not(.is-desktop-input) .input-row {
    grid-template-columns: minmax(0, 1fr) 98px;
    gap: 5px;
  }

  body:not(.is-desktop-input) .answer-input,
  body:not(.is-desktop-input) .primary-button,
  body:not(.is-desktop-input) .hint-button {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
  }

  body:not(.is-desktop-input) .answer-input {
    font-size: 14.8px;
  }

  body:not(.is-desktop-input) .answer-input::placeholder {
    font-size: 13px;
  }

  body:not(.is-desktop-input) .primary-button,
  body:not(.is-desktop-input) .hint-button {
    font-size: 15.5px;
  }

  body:not(.is-desktop-input) .keyboard-panel {
    gap: 2px;
  }

  body:not(.is-desktop-input) .keyboard-row {
    gap: 2px;
  }

  body:not(.is-desktop-input) .key-button {
    width: clamp(29px, 8.1vw, 33px);
    height: clamp(29px, 8.05vw, 33px);
    font-size: clamp(15px, 4.15vw, 17.2px);
  }

  body:not(.is-desktop-input) .key-button.is-delete {
    width: clamp(47px, 12.9vw, 54px);
  }

  body:not(.is-desktop-input) .hint-row {
    gap: 7px;
  }

  body:not(.is-desktop-input) .hint-button {
    width: 84px;
  }

  body:not(.is-desktop-input) .hint-order {
    font-size: clamp(11.8px, 3.15vw, 13.4px);
    line-height: 1.07;
  }
}

/* Final mobile sizing layer: continuous scaling by available height and width. */
body:not(.is-desktop-input) .game-card {
  --fluid-w: clamp(-2px, calc((100vw - 375px) * 0.11), 8px);
  --fluid-h: clamp(-6px, calc((var(--app-height) - 730px) * 0.06), 13px);
  --fluid-room: clamp(0px, calc((var(--app-height) - 690px) * 0.05), 10px);
  --clue-row-size: clamp(47px, calc(53px + var(--fluid-w) + var(--fluid-h)), 72px);
  --mobile-stack-shift: clamp(4px, calc(7px + ((var(--app-height) - 760px) * 0.016)), 14px);
  --mobile-control-height: clamp(38px, calc(42px + (var(--fluid-h) * 0.55) + (var(--fluid-w) * 0.18)), 52px);
  --mobile-section-space: clamp(7px, calc(9px + (var(--fluid-room) * 0.55)), 14px);
  --mobile-card-gap: clamp(3px, calc(4px + (var(--fluid-room) * 0.2)), 7px);
  gap: var(--mobile-card-gap);
  padding-top: max(2px, env(safe-area-inset-top));
  padding-bottom: max(5px, env(safe-area-inset-bottom));
}

body:not(.is-desktop-input) .topbar {
  min-height: clamp(43px, calc(48px + (var(--fluid-room) * 0.85)), 64px);
  padding-top: clamp(3px, calc(4px + (var(--fluid-room) * 0.24)), 8px);
}

body:not(.is-desktop-input) h1 {
  font-size: clamp(26px, calc(6.85vw + (var(--fluid-room) * 0.1)), 34px);
}

body:not(.is-desktop-input) .icon-button {
  top: clamp(3px, calc(4px + (var(--fluid-room) * 0.18)), 9px);
  width: clamp(32px, calc(34px + (var(--fluid-room) * 0.12)), 36px);
  height: clamp(32px, calc(34px + (var(--fluid-room) * 0.12)), 36px);
}

body:not(.is-desktop-input) #mobileHelpButton::before {
  width: clamp(25px, calc(27px + (var(--fluid-room) * 0.16)), 29px);
  height: clamp(25px, calc(27px + (var(--fluid-room) * 0.16)), 29px);
  font-size: clamp(19px, calc(20px + (var(--fluid-room) * 0.18)), 22px);
}

body:not(.is-desktop-input) .game-timer {
  top: clamp(4px, calc(5px + (var(--fluid-room) * 0.22)), 10px);
  font-size: clamp(18px, calc(19px + (var(--fluid-room) * 0.12)), 21px);
}

body:not(.is-desktop-input) .progress-row {
  --keystone-box-h: clamp(32px, calc(35px + (var(--fluid-w) * 0.25) + (var(--fluid-h) * 0.45)), 45px);
  min-height: clamp(58px, calc(64px + (var(--fluid-room) * 1.45)), 89px);
  margin-bottom: clamp(2px, calc(var(--fluid-room) * 0.66), 9px);
}

body:not(.is-desktop-input) .keystone-wrap {
  gap: clamp(4px, calc(5px + (var(--fluid-room) * 0.1)), 6px);
  transform: translateY(clamp(-6px, calc(-4px - (var(--fluid-room) * 0.18)), -3px));
}

body:not(.is-desktop-input) .keystone-label {
  font-size: clamp(11.5px, calc(12px + (var(--fluid-room) * 0.09)), 13px);
}

body:not(.is-desktop-input) .keystone {
  gap: clamp(5px, calc(5px + (var(--fluid-room) * 0.12)), 7px);
}

body:not(.is-desktop-input) .keystone-letter {
  width: calc(var(--keystone-box-h) * 0.86);
  height: var(--keystone-box-h);
  font-size: clamp(19px, calc(20px + (var(--fluid-room) * 0.2)), 24px);
}

body:not(.is-desktop-input) .keystone-letter:not(.is-revealed):not(.is-hinted) {
  font-size: clamp(16px, calc(17px + (var(--fluid-room) * 0.08)), 18px);
}

body:not(.is-desktop-input) .board-wrap {
  --mobile-bridge-column: clamp(70px, calc(72px + (var(--fluid-w) * 0.35) + (var(--fluid-h) * 0.16)), 78px);
  --mobile-board-gap: clamp(5px, calc(6px + (var(--fluid-room) * 0.08)), 7px);
  --mobile-bridge-width: clamp(116px, calc((var(--mobile-bridge-column) + (2 * var(--mobile-board-gap))) / 0.68), 142px);
  padding-bottom: var(--mobile-section-space);
  margin-bottom: 0;
}

body:not(.is-desktop-input) .bank-panel,
body:not(.is-desktop-input) .bank,
body:not(.is-desktop-input) .span-stack {
  gap: clamp(3px, calc(4px + (var(--fluid-room) * 0.42)), 9px);
}

body:not(.is-desktop-input) .bank-heading,
body:not(.is-desktop-input) .bridge-column::before {
  min-height: clamp(15px, calc(16px + (var(--fluid-room) * 0.18)), 18px);
  font-size: clamp(11px, calc(11.6px + (var(--fluid-room) * 0.08)), 12.5px);
}

body:not(.is-desktop-input) .clue-card {
  padding-top: clamp(6px, calc(7px + (var(--fluid-room) * 0.14)), 9px);
  padding-bottom: clamp(6px, calc(7px + (var(--fluid-room) * 0.14)), 9px);
  font-size: clamp(14.2px, calc(14.85px + (100vw - 360px) * 0.025 + (var(--fluid-h) * 0.12)), 18px);
}

body:not(.is-desktop-input) .move-medallion {
  width: clamp(12px, calc(13px + (var(--fluid-room) * 0.08)), 14px);
  height: clamp(27px, calc(29px + (var(--fluid-room) * 0.28)), 33px);
}

body:not(.is-desktop-input) .move-medallion svg {
  height: clamp(22px, calc(23px + (var(--fluid-room) * 0.25)), 27px);
}

body:not(.is-desktop-input) .bridge-column {
  padding-top: clamp(17px, calc(18px + (var(--fluid-room) * 0.2)), 21px);
}

body:not(.is-desktop-input) .waterline {
  top: clamp(17px, calc(18px + (var(--fluid-room) * 0.2)), 21px);
  bottom: calc(-1 * (var(--mobile-section-space) + var(--mobile-card-gap))) !important;
}

body:not(.is-desktop-input) .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty .bridge-plank,
body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank {
  width: var(--mobile-bridge-width);
  height: clamp(25px, calc(var(--clue-row-size) * 0.54), 41px);
}

body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-built .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank {
  height: clamp(27px, calc(var(--clue-row-size) * 0.58), 44px);
}

body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank {
  width: calc(var(--mobile-bridge-width) + clamp(3px, calc(3px + (var(--fluid-room) * 0.18)), 5px));
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-medium-word,
body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.is-medium-word,
body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.is-medium-word {
  font-size: clamp(14px, calc(14.2px + (100vw - 360px) * 0.022 + (var(--fluid-h) * 0.08)), 16.3px) !important;
}

body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-long-word,
body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.is-long-word,
body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.is-long-word {
  font-size: clamp(13px, calc(13.1px + (100vw - 360px) * 0.018 + (var(--fluid-h) * 0.06)), 15px) !important;
}

body:not(.is-desktop-input) .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .word-label {
  font-size: clamp(13px, calc(13.45px + (100vw - 360px) * 0.018 + (var(--fluid-h) * 0.06)), 15.4px) !important;
}

body:not(.is-desktop-input) .answer-dock {
  gap: clamp(4px, calc(5px + (var(--fluid-room) * 0.22)), 8px);
  padding-top: clamp(7px, calc(8px + (var(--fluid-room) * 0.36)), 12px);
}

body:not(.is-desktop-input) .status-line {
  font-size: clamp(12.2px, calc(12.7px + (100vw - 360px) * 0.025 + (var(--fluid-h) * 0.08)), 16px);
  line-height: 1.1;
}

body:not(.is-desktop-input) .input-row {
  grid-template-columns: minmax(0, 1fr) clamp(98px, calc(104px + (var(--fluid-w) * 0.6) + (var(--fluid-h) * 0.32)), 118px);
  gap: clamp(5px, calc(5px + (var(--fluid-room) * 0.22)), 8px);
}

body:not(.is-desktop-input) .answer-input,
body:not(.is-desktop-input) .primary-button,
body:not(.is-desktop-input) .hint-button {
  height: var(--mobile-control-height);
  min-height: var(--mobile-control-height);
  max-height: var(--mobile-control-height);
}

body:not(.is-desktop-input) .answer-input {
  font-size: clamp(14.8px, calc(15.1px + (var(--fluid-room) * 0.09)), 16.2px);
}

body:not(.is-desktop-input) .answer-input::placeholder {
  font-size: clamp(13px, calc(13.3px + (var(--fluid-room) * 0.08)), 14.2px);
}

body:not(.is-desktop-input) .primary-button,
body:not(.is-desktop-input) .hint-button {
  font-size: clamp(15.5px, calc(16px + (var(--fluid-room) * 0.14)), 18px);
}

body:not(.is-desktop-input) .primary-button {
  height: calc(var(--mobile-control-height) - 4px);
  min-height: calc(var(--mobile-control-height) - 4px);
  max-height: calc(var(--mobile-control-height) - 4px);
  align-self: start;
}

body:not(.is-desktop-input) .keyboard-panel,
body:not(.is-desktop-input) .keyboard-row {
  gap: clamp(2px, calc(3px + (var(--fluid-room) * 0.22)), 5px);
}

body:not(.is-desktop-input) .keyboard-panel {
  padding-top: clamp(2px, calc(3px + (var(--fluid-room) * 0.2)), 6px);
}

body:not(.is-desktop-input) .key-button {
  width: clamp(29px, 8.4vw, 38px);
  height: clamp(32px, calc(37px + (var(--fluid-h) * 0.72) + (var(--fluid-w) * 0.16)), 48px);
  font-size: clamp(15px, calc(16px + (100vw - 360px) * 0.03 + (var(--fluid-h) * 0.13)), 20px);
}

body:not(.is-desktop-input) .key-button.is-delete {
  width: clamp(47px, 13.8vw, 62px);
}

body:not(.is-desktop-input) .hint-row {
  gap: clamp(7px, calc(8px + (var(--fluid-room) * 0.14)), 10px);
}

body:not(.is-desktop-input) .dock-footer {
  align-items: end;
}

body:not(.is-desktop-input) .hint-button {
  width: clamp(84px, calc(88px + (var(--fluid-w) * 0.72)), 96px);
}

body:not(.is-desktop-input) .hint-order {
  align-self: end;
  padding-bottom: 1px;
  font-size: clamp(11.8px, calc(12.6px + (100vw - 360px) * 0.025 + (var(--fluid-h) * 0.08)), 16px);
  line-height: 1.08;
}

/* Small-height iPhone SE class: the full play surface must fit without a scroll. */
@media (max-width: 390px) and (max-height: 740px) and (pointer: coarse) {
  html,
  body {
    height: var(--app-height);
    min-height: var(--app-height);
    overflow: hidden;
  }

  .phone-shell {
    height: var(--app-height);
    min-height: var(--app-height);
    overflow: hidden;
    padding-bottom: 0;
  }

  body:not(.is-desktop-input) .game-card {
    --mobile-stack-shift: 0px;
    --mobile-card-gap: 1px;
    --mobile-section-space: 3px;
    --mobile-bridge-column: 55px;
    --mobile-board-gap: 2px;
    --mobile-bridge-width: 92px;
    --mobile-control-height: 31px;
    --clue-row-size: 36px;
    gap: var(--mobile-card-gap);
    padding: 0 9px 3px;
  }

  body:not(.is-desktop-input) .topbar,
  body:not(.is-desktop-input) .progress-row,
  body:not(.is-desktop-input) .board-wrap,
  body:not(.is-desktop-input) .answer-dock {
    transform: none;
  }

  body:not(.is-desktop-input) .topbar {
    min-height: 31px;
    padding-top: 0;
  }

  body:not(.is-desktop-input) h1 {
    font-size: 22px;
    letter-spacing: 0;
  }

  body:not(.is-desktop-input) .icon-button {
    top: 2px;
    width: 28px;
    height: 28px;
  }

  body:not(.is-desktop-input) #mobileHelpButton::before {
    width: 22px;
    height: 22px;
    border-width: 2.25px;
    font-size: 16px;
  }

  body:not(.is-desktop-input) .game-timer {
    top: 3px;
    right: 0;
    min-width: 36px;
    font-size: 14px;
  }

  body:not(.is-desktop-input) .timer-digits {
    min-width: 36px;
  }

  body:not(.is-desktop-input) .progress-row {
    --keystone-box-h: 25px;
    min-height: 31px;
    margin-bottom: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.is-desktop-input) .keystone-wrap {
    grid-column: 1;
    justify-self: center;
    width: auto;
    display: grid;
    grid-template-columns: max-content max-content;
    align-items: center;
    column-gap: 5px;
    row-gap: 0;
    transform: translateY(-2px);
  }

  body:not(.is-desktop-input) .keystone-label {
    font-size: 8.2px;
    letter-spacing: 0.065em;
    line-height: 0.98;
    text-align: right;
    white-space: pre-line;
  }

  body:not(.is-desktop-input) .keystone {
    gap: 3px;
  }

  body:not(.is-desktop-input) .keystone-letter {
    width: 24px;
    height: var(--keystone-box-h);
    border-radius: 6px;
    font-size: 15px;
  }

  body:not(.is-desktop-input) .keystone-letter:not(.is-revealed):not(.is-hinted) {
    font-size: 12px;
  }

  body:not(.is-desktop-input) .board-wrap {
    --mobile-bridge-width: 92px;
    grid-template-columns: minmax(0, 1fr) var(--mobile-bridge-column) minmax(0, 1fr);
    column-gap: var(--mobile-board-gap);
    padding-bottom: var(--mobile-section-space);
  }

  body:not(.is-desktop-input) .bank-panel,
  body:not(.is-desktop-input) .bank,
  body:not(.is-desktop-input) .span-stack {
    gap: 3px;
  }

  body:not(.is-desktop-input) .bank-heading,
  body:not(.is-desktop-input) .bridge-column::before {
    min-height: 13px;
    font-size: 9.7px;
    letter-spacing: 0.055em;
  }

  body:not(.is-desktop-input) .bridge-column {
    padding-top: 13px;
  }

  body:not(.is-desktop-input) .waterline {
    top: 13px;
    bottom: calc(-1 * (var(--mobile-section-space) + var(--mobile-card-gap))) !important;
  }

  body:not(.is-desktop-input) .clue-card {
    min-height: var(--clue-row-size);
    padding: 3px 10px;
    border-width: 1.45px;
    border-radius: 7px;
    font-size: 10.4px;
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .bank-left .clue-card,
  body:not(.is-desktop-input) .clue-card[data-side="left"] {
    padding-right: 16px;
    padding-left: 15px;
  }

  body:not(.is-desktop-input) .bank-right .clue-card,
  body:not(.is-desktop-input) .clue-card[data-side="right"] {
    padding-right: 15px;
    padding-left: 16px;
  }

  body:not(.is-desktop-input) .clue-card.is-solved .clue-text {
    font-size: 10.4px;
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .clue-text {
    max-width: 64px;
  }

  body:not(.is-desktop-input) .move-medallion {
    width: 10px;
    height: 24px;
  }

  body:not(.is-desktop-input) .move-medallion svg {
    width: 9px;
    height: 19px;
  }

  body:not(.is-desktop-input) .bank-left .move-medallion,
  body:not(.is-desktop-input) .clue-card[data-side="left"] .move-medallion {
    left: 4px;
  }

  body:not(.is-desktop-input) .bank-right .move-medallion,
  body:not(.is-desktop-input) .clue-card[data-side="right"] .move-medallion {
    right: 4px;
  }

  body:not(.is-desktop-input) .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-deselecting .bridge-plank,
  body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank {
    --stable-bridge-outline-size: 0.9px;
    width: var(--mobile-bridge-width) !important;
    height: 56% !important;
    padding-right: 12px;
    padding-left: 12px;
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-built .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank {
    --stable-bridge-outline-size: 1.45px;
    width: 98px !important;
    height: 61% !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected.is-selecting .bridge-plank {
    --stable-bridge-outline-size: 1.1px;
  }

  body:not(.is-desktop-input) .bridge-plank .blank-underline,
  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank .blank-underline,
  body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank .blank-underline {
    height: 1.35px !important;
    min-height: 1.35px !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank .blank-underline {
    width: 104% !important;
  }

  body:not(.is-desktop-input) .bridge-plank .word-label.has-typed-underline .typed-underline {
    height: 1.35px !important;
    min-height: 1.35px !important;
  }

  body:not(.is-desktop-input) .word-label.is-blank-label {
    width: 74%;
  }

  body:not(.is-desktop-input) .bridge-span.is-built .word-label,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label {
    font-size: 12.2px !important;
    width: 88% !important;
    gap: 0.01em !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-medium-word,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.is-medium-word,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.is-medium-word {
    font-size: 11.3px !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-long-word,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.is-long-word,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.is-long-word,
  body:not(.is-desktop-input) .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .word-label.is-long-word {
    font-size: 10.2px !important;
  }

  body:not(.is-desktop-input) .answer-dock {
    gap: 2px;
    padding-top: 3px;
  }

  body:not(.is-desktop-input) .status-line {
    font-size: 10.8px;
    line-height: 1.02;
    margin-bottom: 0;
  }

  body:not(.is-desktop-input) .input-row {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 4px;
  }

  body:not(.is-desktop-input) .answer-input,
  body:not(.is-desktop-input) .primary-button,
  body:not(.is-desktop-input) .hint-button {
    height: var(--mobile-control-height);
    min-height: var(--mobile-control-height);
    max-height: var(--mobile-control-height);
    border-radius: 7px;
  }

  body:not(.is-desktop-input) .answer-input {
    font-size: 13px;
  }

  body:not(.is-desktop-input) .answer-input::placeholder {
    font-size: 11px;
  }

  body:not(.is-desktop-input) .primary-button,
  body:not(.is-desktop-input) .hint-button {
    font-size: 14px;
  }

  body:not(.is-desktop-input) .primary-button {
    height: calc(var(--mobile-control-height) - 3px);
    min-height: calc(var(--mobile-control-height) - 3px);
    max-height: calc(var(--mobile-control-height) - 3px);
  }

  body:not(.is-desktop-input) .keyboard-panel {
    gap: 2px;
    padding-top: 2px;
  }

  body:not(.is-desktop-input) .keyboard-row {
    gap: 2px;
  }

  body:not(.is-desktop-input) .key-button {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    font-size: 12.5px;
  }

  body:not(.is-desktop-input) .key-button.is-delete {
    width: 39px;
  }

  body:not(.is-desktop-input) .hint-row {
    gap: 7px;
  }

  body:not(.is-desktop-input) .hint-button {
    width: 70px;
  }

  body:not(.is-desktop-input) .hint-order {
    align-self: end;
    padding-bottom: 0;
    font-size: 10.4px;
    line-height: 1.02;
  }
}

@media (min-width: 341px) and (max-width: 390px) and (max-height: 740px) and (pointer: coarse) {
  body:not(.is-desktop-input) .game-card {
    --se-height-room: clamp(0px, calc((var(--app-height) - 600px) * 0.16), 9px);
    --mobile-card-gap: clamp(2px, calc(2px + (var(--se-height-room) * 0.08)), 3px);
    --mobile-section-space: clamp(3px, calc(3px + (var(--se-height-room) * 0.08)), 4px);
    --mobile-bridge-column: clamp(60px, calc(60px + (var(--se-height-room) * 0.22)), 62px);
    --mobile-board-gap: 3px;
    --mobile-bridge-width: clamp(104px, calc(104px + (var(--se-height-room) * 0.25)), 106px);
    --mobile-control-height: clamp(32px, calc(32px + (var(--se-height-room) * 0.18)), 34px);
    --clue-row-size: clamp(47px, calc(47px + (var(--se-height-room) * 0.58)), 52px);
    gap: var(--mobile-card-gap);
    padding: 0 9px 2px;
  }

  body:not(.is-desktop-input) .topbar {
    min-height: clamp(32px, calc(32px + (var(--se-height-room) * 0.18)), 34px);
  }

  body:not(.is-desktop-input) h1 {
    font-size: clamp(23px, calc(23px + (var(--se-height-room) * 0.08)), 23.75px);
  }

  body:not(.is-desktop-input) .icon-button {
    top: 2px;
    width: 29px;
    height: 29px;
  }

  body:not(.is-desktop-input) #mobileHelpButton::before {
    width: 23px;
    height: 23px;
    border-width: 2.25px;
    font-size: 16px;
  }

  body:not(.is-desktop-input) .game-timer {
    top: 3px;
    min-width: 39px;
    font-size: 15px;
  }

  body:not(.is-desktop-input) .timer-digits {
    min-width: 39px;
  }

  body:not(.is-desktop-input) .progress-row {
    --keystone-box-h: clamp(29px, calc(29px + (var(--se-height-room) * 0.24)), 31px);
    min-height: clamp(37px, calc(37px + (var(--se-height-room) * 0.28)), 40px);
  }

  body:not(.is-desktop-input) .keystone-wrap {
    column-gap: 5px;
    transform: translateY(-2px);
  }

  body:not(.is-desktop-input) .keystone-label {
    font-size: 9.4px;
    line-height: 1;
  }

  body:not(.is-desktop-input) .keystone {
    gap: 4px;
  }

  body:not(.is-desktop-input) .keystone-letter {
    width: calc(var(--keystone-box-h) * 0.94);
    height: var(--keystone-box-h);
    border-radius: 6px;
    font-size: clamp(16.4px, calc(16.4px + (var(--se-height-room) * 0.1)), 17.15px);
  }

  body:not(.is-desktop-input) .keystone-letter:not(.is-revealed):not(.is-hinted) {
    font-size: 12.5px;
  }

  body:not(.is-desktop-input) .board-wrap {
    --mobile-bridge-width: clamp(104px, calc(104px + (var(--se-height-room) * 0.25)), 106px);
    column-gap: var(--mobile-board-gap);
    padding-bottom: var(--mobile-section-space);
  }

  body:not(.is-desktop-input) .bank-panel,
  body:not(.is-desktop-input) .bank,
  body:not(.is-desktop-input) .span-stack {
    gap: clamp(3px, calc(3px + (var(--se-height-room) * 0.06)), 3.5px);
  }

  body:not(.is-desktop-input) .bank-heading,
  body:not(.is-desktop-input) .bridge-column::before {
    min-height: 13px;
    font-size: 9.9px;
  }

  body:not(.is-desktop-input) .bridge-column {
    padding-top: 13px;
  }

  body:not(.is-desktop-input) .waterline {
    top: 13px;
  }

  body:not(.is-desktop-input) .clue-card {
    min-height: var(--clue-row-size);
    padding-top: clamp(3px, calc(3px + (var(--se-height-room) * 0.05)), 3.5px);
    padding-bottom: clamp(3px, calc(3px + (var(--se-height-room) * 0.05)), 3.5px);
    border-width: 1.45px;
    border-radius: 8px;
    font-size: clamp(12.8px, calc(12.8px + (var(--se-height-room) * 0.1)), 13.7px);
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .clue-card.is-solved .clue-text,
  body:not(.is-desktop-input) .clue-text {
    max-width: 82px;
    font-size: clamp(12.8px, calc(12.8px + (var(--se-height-room) * 0.1)), 13.7px);
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .move-medallion {
    width: 11px;
    height: 26px;
  }

  body:not(.is-desktop-input) .move-medallion svg {
    width: 10px;
    height: 21px;
  }

  body:not(.is-desktop-input) .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-deselecting .bridge-plank,
  body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank {
    --stable-bridge-outline-size: 0.9px;
    width: var(--mobile-bridge-width) !important;
    height: 58% !important;
    padding-right: 13px;
    padding-left: 13px;
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-built .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank {
    --stable-bridge-outline-size: 1.45px;
    width: clamp(110px, calc(110px + (var(--se-height-room) * 0.24)), 112px) !important;
    height: 62% !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected.is-selecting .bridge-plank {
    --stable-bridge-outline-size: 1.08px;
  }

  body:not(.is-desktop-input) .bridge-plank .blank-underline,
  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank .blank-underline,
  body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank .blank-underline,
  body:not(.is-desktop-input) .bridge-plank .word-label.has-typed-underline .typed-underline {
    height: 1.3px !important;
    min-height: 1.3px !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-built .marked-letter,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .marked-letter,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .marked-letter {
    min-width: 1.02em;
    margin-right: 0.03em;
  }

  body:not(.is-desktop-input) .bridge-span.is-built .marked-letter::before,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .marked-letter::before,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .marked-letter::before {
    inset: -0.14em -0.03em -0.12em -0.03em;
  }

  body:not(.is-desktop-input) .word-label.is-blank-label {
    width: 76%;
  }

  body:not(.is-desktop-input) .answer-dock {
    gap: 2px;
    padding-top: 7px;
  }

  body:not(.is-desktop-input) .status-line {
    font-size: clamp(12.4px, calc(12.4px + (var(--se-height-room) * 0.08)), 13.1px);
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .input-row {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 4px;
  }

  body:not(.is-desktop-input) .answer-input,
  body:not(.is-desktop-input) .primary-button,
  body:not(.is-desktop-input) .hint-button {
    height: var(--mobile-control-height);
    min-height: var(--mobile-control-height);
    max-height: var(--mobile-control-height);
    border-radius: 8px;
  }

  body:not(.is-desktop-input) .primary-button {
    height: calc(var(--mobile-control-height) - 3px);
    min-height: calc(var(--mobile-control-height) - 3px);
    max-height: calc(var(--mobile-control-height) - 3px);
  }

  body:not(.is-desktop-input) .answer-input {
    font-size: clamp(13.4px, calc(13.4px + (var(--se-height-room) * 0.08)), 14.1px);
  }

  body:not(.is-desktop-input) .answer-input::placeholder {
    font-size: clamp(11.6px, calc(11.6px + (var(--se-height-room) * 0.07)), 12.2px);
  }

  body:not(.is-desktop-input) .primary-button,
  body:not(.is-desktop-input) .hint-button {
    font-size: clamp(14px, calc(14px + (var(--se-height-room) * 0.09)), 14.8px);
  }

  body:not(.is-desktop-input) .keyboard-panel {
    gap: 3px;
    padding-top: 3px;
  }

  body:not(.is-desktop-input) .keyboard-row {
    gap: 3px;
  }

  body:not(.is-desktop-input) .key-button {
    width: clamp(30px, calc(30px + (var(--se-height-room) * 0.22)), 32px);
    height: clamp(31px, calc(31px + (var(--se-height-room) * 0.22)), 33px);
    border-radius: 6.5px;
    font-size: clamp(14.4px, calc(14.4px + (var(--se-height-room) * 0.12)), 15.4px);
  }

  body:not(.is-desktop-input) .key-button.is-delete {
    width: clamp(46px, calc(46px + (var(--se-height-room) * 0.32)), 49px);
  }

  body:not(.is-desktop-input) .dock-footer {
    gap: 9px;
    margin-top: 8px;
  }

  body:not(.is-desktop-input) .hint-button {
    width: clamp(72px, calc(72px + (var(--se-height-room) * 0.22)), 74px);
    height: calc(var(--mobile-control-height) - 3px);
    min-height: calc(var(--mobile-control-height) - 3px);
    max-height: calc(var(--mobile-control-height) - 3px);
  }

  body:not(.is-desktop-input) .hint-order {
    font-size: clamp(11.2px, calc(11.2px + (var(--se-height-room) * 0.08)), 11.9px);
    line-height: 1.02;
  }
}

@media (max-width: 340px) and (max-height: 535px) and (pointer: coarse) {
  body:not(.is-desktop-input) .game-card {
    --old-se-room: clamp(0px, calc((var(--app-height) - 500px) * 0.36), 25px);
    --mobile-card-gap: clamp(0px, calc(var(--old-se-room) * 0.02), 1px);
    --mobile-section-space: clamp(2px, calc(2px + var(--old-se-room) * 0.05), 3px);
    --mobile-bridge-column: clamp(54px, calc(54px + var(--old-se-room) * 0.08), 56px);
    --mobile-bridge-width: clamp(88px, calc(90px + var(--old-se-room) * 0.09), 92px);
    --mobile-control-height: clamp(29px, calc(30px + var(--old-se-room) * 0.04), 31px);
    --clue-row-size: clamp(36px, calc(36px + var(--old-se-room) * 0.2), 41px);
    padding: 0 8px 2px;
  }

  body:not(.is-desktop-input) .topbar {
    min-height: 30px;
    padding-top: 0;
  }

  body:not(.is-desktop-input) h1 {
    font-size: 21px;
  }

  body:not(.is-desktop-input) .icon-button {
    top: 1px;
    width: 24px;
    height: 24px;
  }

  body:not(.is-desktop-input) #mobileHelpButton::before {
    width: 20px;
    height: 20px;
    border-width: 2px;
    font-size: 14px;
  }

  body:not(.is-desktop-input) .game-timer {
    top: 2px;
    min-width: 33px;
    font-size: 13px;
  }

  body:not(.is-desktop-input) .timer-digits {
    min-width: 33px;
  }

  body:not(.is-desktop-input) .progress-row {
    --keystone-box-h: 23px;
    min-height: 34px;
    margin-bottom: 0;
  }

  body:not(.is-desktop-input) .keystone-wrap {
    gap: 1px;
    transform: translateY(-3px);
  }

  body:not(.is-desktop-input) .keystone-label {
    font-size: 8.5px;
  }

  body:not(.is-desktop-input) .keystone {
    gap: 3px;
  }

  body:not(.is-desktop-input) .keystone-letter {
    width: 22px;
    height: var(--keystone-box-h);
    border-radius: 5px;
    font-size: 14px;
  }

  body:not(.is-desktop-input) .keystone-letter:not(.is-revealed):not(.is-hinted) {
    font-size: 11.5px;
  }

  body:not(.is-desktop-input) .board-wrap {
    --mobile-bridge-width: clamp(88px, calc(90px + var(--old-se-room) * 0.09), 92px);
  }

  body:not(.is-desktop-input) .bank-panel,
  body:not(.is-desktop-input) .bank,
  body:not(.is-desktop-input) .span-stack {
    gap: 2px;
  }

  body:not(.is-desktop-input) .bank-heading,
  body:not(.is-desktop-input) .bridge-column::before {
    min-height: 13px;
    font-size: 9.5px;
  }

  body:not(.is-desktop-input) .bridge-column {
    padding-top: 13px;
  }

  body:not(.is-desktop-input) .waterline {
    top: 13px;
  }

  body:not(.is-desktop-input) .clue-card {
    padding-top: 3px;
    padding-bottom: 3px;
    border-width: clamp(1.15px, calc(1.15px + var(--old-se-room) * 0.008), 1.35px);
    border-radius: 6px;
    font-size: clamp(10.6px, calc(10.6px + var(--old-se-room) * 0.03), 11.35px);
    line-height: 1;
  }

  body:not(.is-desktop-input) .bank-left .clue-card,
  body:not(.is-desktop-input) .clue-card[data-side="left"] {
    padding-right: 15px;
    padding-left: 13px;
  }

  body:not(.is-desktop-input) .bank-right .clue-card,
  body:not(.is-desktop-input) .clue-card[data-side="right"] {
    padding-right: 13px;
    padding-left: 15px;
  }

  body:not(.is-desktop-input) .clue-card.is-solved .clue-text,
  body:not(.is-desktop-input) .clue-text {
    max-width: clamp(66px, calc(66px + var(--old-se-room) * 0.14), 69px);
    font-size: clamp(10.6px, calc(10.6px + var(--old-se-room) * 0.03), 11.35px);
    line-height: 1;
  }

  body:not(.is-desktop-input) .move-medallion {
    width: 9px;
    height: 21px;
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-built .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .bridge-plank {
    --stable-bridge-outline-size: clamp(1.25px, calc(1.25px + var(--old-se-room) * 0.006), 1.4px);
    width: clamp(96px, calc(97px + var(--old-se-room) * 0.08), 99px) !important;
    height: 61% !important;
  }

  body:not(.is-desktop-input) .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-deselecting .bridge-plank,
  body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank {
    --stable-bridge-outline-size: clamp(0.7px, calc(0.7px + var(--old-se-room) * 0.006), 0.85px);
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-selected.is-selecting .bridge-plank,
  body:not(.is-desktop-input) .bridge-span.is-empty.is-selected.is-selecting .bridge-plank {
    --stable-bridge-outline-size: clamp(0.9px, calc(0.9px + var(--old-se-room) * 0.006), 1.05px);
  }

  body:not(.is-desktop-input) .bridge-plank .blank-underline,
  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank .blank-underline,
  body:not(.is-desktop-input).is-mobile-bank-dragging .bridge-span.is-selected .bridge-plank .blank-underline,
  body:not(.is-desktop-input) .bridge-plank .word-label.has-typed-underline .typed-underline {
    height: clamp(1px, calc(1px + var(--old-se-room) * 0.01), 1.25px) !important;
    min-height: clamp(1px, calc(1px + var(--old-se-room) * 0.01), 1.25px) !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-selected .bridge-plank .blank-underline {
    width: 104% !important;
  }

  body:not(.is-desktop-input) .word-label.is-blank-label {
    width: 76%;
  }

  body:not(.is-desktop-input) .bridge-span.is-built .word-label,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label {
    font-size: 11.2px !important;
    width: 88% !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-medium-word,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.is-medium-word,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.is-medium-word {
    font-size: 10.4px !important;
  }

  body:not(.is-desktop-input) .bridge-span.is-built .word-label.is-long-word,
  body:not(.is-desktop-input) .bridge-span.is-finalizing .word-label.is-long-word,
  body:not(.is-desktop-input) .bridge-span.is-celebrating .word-label.is-long-word,
  body:not(.is-desktop-input) .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .word-label.is-long-word {
    font-size: 9.4px !important;
  }

  body:not(.is-desktop-input) .answer-dock {
    gap: 2px;
    padding-top: 2px;
  }

  body:not(.is-desktop-input) .status-line {
    font-size: 10.8px;
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .input-row {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 4px;
  }

  body:not(.is-desktop-input) .answer-input {
    font-size: 13px;
  }

  body:not(.is-desktop-input) .answer-input::placeholder {
    font-size: 11px;
  }

  body:not(.is-desktop-input) .primary-button,
  body:not(.is-desktop-input) .hint-button {
    font-size: 14px;
  }

  body:not(.is-desktop-input) .primary-button {
    height: calc(var(--mobile-control-height) - 2px);
    min-height: calc(var(--mobile-control-height) - 2px);
    max-height: calc(var(--mobile-control-height) - 2px);
  }

  body:not(.is-desktop-input) .keyboard-panel,
  body:not(.is-desktop-input) .keyboard-row {
    gap: 2px;
  }

  body:not(.is-desktop-input) .key-button {
    width: clamp(25px, calc(25px + var(--old-se-room) * 0.03), 25.75px);
    height: clamp(25px, calc(25px + var(--old-se-room) * 0.03), 25.75px);
    border-radius: 5px;
    font-size: 12.5px;
  }

  body:not(.is-desktop-input) .key-button.is-delete {
    width: clamp(39px, calc(39px + var(--old-se-room) * 0.06), 40.5px);
  }

  body:not(.is-desktop-input) .dock-footer {
    gap: 8px;
    margin-top: 7px;
  }

  body:not(.is-desktop-input) .hint-button {
    width: 70px;
    height: 29px;
    min-height: 29px;
    max-height: 29px;
  }

  body:not(.is-desktop-input) .hint-order {
    font-size: 10.4px;
    line-height: 1.02;
  }
}

/* Mobile gameplay layout contract: fixed chrome, flexible board, fixed answer dock. */
body:not(.is-desktop-input) .game-card {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
}

body:not(.is-desktop-input) .topbar,
body:not(.is-desktop-input) .progress-row,
body:not(.is-desktop-input) .board-wrap,
body:not(.is-desktop-input) .answer-dock {
  transform: none;
}

body:not(.is-desktop-input) .board-wrap,
body:not(.is-desktop-input) .bank-panel,
body:not(.is-desktop-input) .bridge-column,
body:not(.is-desktop-input) .bank,
body:not(.is-desktop-input) .span-stack,
body:not(.is-desktop-input) .clue-card {
  min-height: 0;
}

body:not(.is-desktop-input) .board-wrap {
  align-self: stretch;
}

body:not(.is-desktop-input) .bank-panel,
body:not(.is-desktop-input) .bridge-column,
body:not(.is-desktop-input) .bank,
body:not(.is-desktop-input) .span-stack {
  height: 100%;
}

body:not(.is-desktop-input) .bank,
body:not(.is-desktop-input) .span-stack {
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

body:not(.is-desktop-input) .clue-card {
  height: 100%;
}

/* Tutorial/help surfaces now mirror the notched gameplay redesign. */
.intro-card,
.intro-card *,
.tutorial-card,
.tutorial-card * {
  font-family: var(--ui-face) !important;
}

.intro-card,
.tutorial-card {
  --river-blue: #048fc7;
  --selected-clue: #dff7ff;
  --solved-clue: #fff1bd;
  --brass: #ffca18;
  --brass-2: #fff0b8;
  border-color: rgba(120, 141, 153, 0.28);
  color: #111;
  background: #f8fbfc;
  box-shadow:
    0 28px 72px rgba(20, 46, 58, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.tutorial-kicker,
.tutorial-card h2,
.tutorial-wordmark,
.tutorial-section-title,
.tutorial-flow-title,
.tutorial-scoring-title {
  color: #111;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-transform: none;
}

.tutorial-kicker {
  color: #4d5b63;
  font-size: clamp(18px, 4.8vw, 23px);
  font-weight: 820;
  text-transform: uppercase;
}

.tutorial-copy,
.tutorial-copy-small,
.intro-copy,
.score-rule span,
.hint-rule span,
.tutorial-author,
.tutorial-footer-author {
  color: rgba(16, 16, 16, 0.76);
  font-weight: 480;
}

.lesson-card,
.intro-rule-card {
  border-color: rgba(120, 141, 153, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.lesson-number,
.hint-rule strong {
  color: #fff;
  background: var(--river-blue);
}

.tutorial-start,
.intro-detail {
  border-radius: 8px;
}

.tutorial-visual {
  overflow: visible;
}

.lesson-demo {
  padding: 4px 0 5px;
}

.align-demo {
  --demo-column-width: 90px;
  --demo-river-width: calc(var(--demo-column-width) * 0.68);
  --demo-bridge-overhang: calc(var(--demo-column-width) * 0.19);
  --demo-bridge-width: calc(var(--demo-column-width) + (var(--demo-bridge-overhang) * 2));
  --demo-row-height: 48px;
  --demo-row-gap: 7px;
  --demo-shift: calc(-1 * (var(--demo-row-height) + var(--demo-row-gap)));
  --demo-cycle: 10s;
  position: relative;
  isolation: isolate;
  display: grid;
  gap: var(--demo-row-gap);
  padding: 2px 0 3px;
}

.align-demo::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 30;
  border-radius: 10px;
  background: #f8fbfc;
  opacity: 0;
  pointer-events: none;
  animation: demoLoopVeil var(--demo-cycle) linear infinite;
}

.demo-labels,
.demo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--demo-column-width) minmax(0, 1fr);
  align-items: center;
}

.demo-labels {
  min-height: 17px;
  color: #5d6065;
  font-size: 10.5px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.demo-river {
  position: absolute;
  z-index: -1;
  top: 24px;
  bottom: 2px;
  left: 50%;
  width: var(--demo-river-width);
  border-radius: 7px;
  transform: translateX(-50%);
  background-color: #10bfd0;
  background-image:
    linear-gradient(112deg, rgba(255, 255, 255, 0.26) 0 9%, transparent 9% 26%, rgba(255, 255, 255, 0.2) 26% 32%, transparent 32% 100%),
    repeating-linear-gradient(164deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.demo-row {
  min-height: var(--demo-row-height);
}

.demo-clue {
  position: relative;
  z-index: 2;
  min-height: calc(var(--demo-row-height) - 2px);
  display: grid;
  place-items: center;
  padding: 7px 12px;
  border: 2px solid #2a2f33;
  border-radius: 10px;
  color: #111;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
  font-size: 13.6px;
  font-weight: 520;
  line-height: 1.04;
  text-align: center;
  white-space: nowrap;
}

.demo-left {
  margin-right: -1px;
  padding-right: calc(12px + var(--demo-bridge-overhang));
}

.demo-right {
  margin-left: -1px;
  padding-left: calc(12px + var(--demo-bridge-overhang));
}

.demo-muted {
  opacity: 1;
  animation: demoSourceMatePulse var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-span {
  --demo-bridge-fill: rgba(255, 255, 255, 0.96);
  --demo-bridge-outline: #2a2f33;
  --demo-bridge-outline-width: 1.25px;
  position: relative;
  z-index: 9;
  justify-self: center;
  width: var(--demo-bridge-width);
  height: calc(var(--demo-row-height) * 0.62);
  min-height: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.demo-bridge-shape {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.demo-bridge-shape-path {
  fill: var(--demo-bridge-fill);
  stroke: var(--demo-bridge-outline);
  stroke-linejoin: round;
  stroke-width: var(--demo-bridge-outline-width);
  vector-effect: non-scaling-stroke;
}

.demo-blank {
  position: relative;
  z-index: 2;
  width: 62%;
  height: 100%;
  display: block;
  border: 0;
}

.demo-blank::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 2.2px;
  border-radius: 2px;
  background: #111;
}

.demo-target-span {
  --demo-bridge-fill: rgba(255, 255, 255, 0.96);
  --demo-bridge-outline: #2a2f33;
  --demo-bridge-outline-width: 1.25px;
  height: calc(var(--demo-row-height) * 0.62);
  filter: drop-shadow(0 8px 12px rgba(5, 121, 160, 0.12));
  animation: demoTargetBridgePulse var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-target-span::after {
  content: none;
}

.demo-source-span {
  opacity: 1;
  animation: demoSourceBridgePulse var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-source-span .demo-bridge-shape-path {
  animation: demoSourceBridgeShapePaint var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-target-span .demo-bridge-shape-path {
  animation: demoBridgeShapePaint var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-target-span .demo-blank::after {
  animation: demoTargetBlank var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-answer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #111;
  font-size: 14.6px;
  font-weight: 560;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
  transform-origin: center;
  animation: demoAnswerLockScale var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-answer span {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 0.86em;
  min-width: 0.86em;
  color: #111;
  text-shadow: none;
  opacity: 0;
  transform: translateY(4px);
  animation: demoAnswerTypeM var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-answer span:nth-child(2) {
  animation-name: demoAnswerTypeU;
}

.demo-answer span:nth-child(3) {
  animation-name: demoAnswerTypeG;
}

.demo-marked-letter {
  min-width: 0.86em;
}

.demo-marked-letter::before {
  content: "";
  position: absolute;
  inset: -0.14em -0.09em -0.12em -0.09em;
  z-index: -1;
  border: 1.35px solid #111;
  border-radius: 0.18em;
  opacity: 0;
  transform: scale(0.72);
  animation: demoMarkedLetterBox var(--demo-cycle) cubic-bezier(.16, .84, .24, 1) infinite;
}

.demo-moving {
  z-index: 6;
  animation: demoMoveUp var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-swap-out {
  animation: demoMoveDown var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-target {
  animation: demoTargetPulse var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

.demo-cursor {
  position: absolute;
  z-index: 12;
  top: calc(24px + var(--demo-row-height) + var(--demo-row-gap) + (var(--demo-row-height) * 0.88) - 10px);
  left: calc(50% + (var(--demo-column-width) * 0.5) + ((100% - var(--demo-column-width)) * 0.25) - (var(--demo-column-width) * 0.3) - 10px);
  width: 20px;
  height: 20px;
  border: 2px solid var(--river-blue);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 15px rgba(8, 120, 200, 0.22);
  animation: demoCursorDrag var(--demo-cycle) cubic-bezier(.16, 1, .3, 1) infinite;
}

@keyframes demoMoveUp {
  0%, 10% {
    transform: translateY(0) scale(1);
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
    font-weight: 520;
  }
  12% {
    transform: translateY(0) scale(1);
    border-color: #05a6d8;
    background: var(--selected-clue);
    box-shadow: 0 0 0 3px rgba(5, 166, 216, 0.14), 0 10px 18px rgba(5, 121, 160, 0.14);
    font-weight: 520;
  }
  16% {
    transform: translateY(0) scale(1.035);
    border-color: #05a6d8;
    background: var(--selected-clue);
    box-shadow: 0 0 0 3px rgba(5, 166, 216, 0.14), 0 12px 18px rgba(5, 121, 160, 0.16);
    font-weight: 520;
    animation-timing-function: linear;
  }
  24% {
    transform: translateY(var(--demo-shift)) scale(1.035);
    border-color: #05a6d8;
    background: var(--selected-clue);
    box-shadow: 0 0 0 3px rgba(5, 166, 216, 0.14), 0 14px 20px rgba(5, 121, 160, 0.18);
    font-weight: 520;
    animation-timing-function: cubic-bezier(.2, .72, .22, 1);
  }
  27%, 56% {
    transform: translateY(var(--demo-shift)) scale(1);
    border-color: #05a6d8;
    background: var(--selected-clue);
    box-shadow: 0 0 0 3px rgba(5, 166, 216, 0.14), 0 10px 18px rgba(5, 121, 160, 0.14);
    font-weight: 520;
  }
  58%, 95% {
    transform: translateY(var(--demo-shift)) scale(1);
    border-color: #2a2f33;
    background: var(--solved-clue);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
    font-weight: 720;
  }
  100% {
    transform: translateY(0) scale(1);
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
    font-weight: 520;
  }
}

@keyframes demoMoveDown {
  0%, 20% {
    transform: translateY(0);
    opacity: 1;
    animation-timing-function: linear;
  }
  24.5%, 56% {
    transform: translateY(calc(-1 * var(--demo-shift)));
    opacity: 1;
    animation-timing-function: cubic-bezier(.12, .88, .18, 1);
  }
  58%, 95% {
    transform: translateY(calc(-1 * var(--demo-shift)));
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes demoTargetPulse {
  0%, 25% {
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
    font-weight: 520;
  }
  26%, 56% {
    border-color: #05a6d8;
    background: var(--selected-clue);
    box-shadow: 0 0 0 3px rgba(5, 166, 216, 0.14), 0 10px 18px rgba(5, 121, 160, 0.14);
    font-weight: 520;
  }
  58%, 95% {
    border-color: #2a2f33;
    background: var(--solved-clue);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
    font-weight: 720;
  }
  100% {
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
    font-weight: 520;
  }
}

@keyframes demoSourceBridgePulse {
  0%, 10% {
    opacity: 1;
    transform: none;
  }
  12%, 18% {
    opacity: 1;
    transform: none;
  }
  26%, 56% {
    opacity: 1;
    transform: none;
  }
  58%, 95% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes demoSourceBridgeShapePaint {
  0%, 10% {
    fill: rgba(255, 255, 255, 0.96);
    stroke: #2a2f33;
    stroke-width: 1.25px;
  }
  12%, 18% {
    fill: rgba(255, 255, 255, 0.96);
    stroke: #2a2f33;
    stroke-width: 1.25px;
  }
  26%, 95% {
    fill: rgba(255, 255, 255, 0.96);
    stroke: #2a2f33;
    stroke-width: 1.25px;
  }
  100% {
    fill: rgba(255, 255, 255, 0.96);
    stroke: #2a2f33;
    stroke-width: 1.25px;
  }
}

@keyframes demoSourceMatePulse {
  0%, 10% {
    opacity: 1;
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
  }
  12%, 18% {
    opacity: 1;
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
  }
  26%, 56% {
    opacity: 1;
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
  }
  58%, 84% {
    opacity: 1;
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
  }
  100% {
    opacity: 1;
    border-color: #2a2f33;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 7px 14px rgba(20, 46, 58, 0.1);
  }
}

@keyframes demoTargetBridgePulse {
  0%, 25% {
    height: calc(var(--demo-row-height) * 0.62);
    transform: none;
    filter: none;
  }
  26% {
    height: calc(var(--demo-row-height) * 0.68);
    transform: scaleX(1.085) scaleY(1.09);
    filter: drop-shadow(0 8px 12px rgba(5, 121, 160, 0.12));
  }
  34%, 56% {
    height: calc(var(--demo-row-height) * 0.66);
    transform: scaleX(1.04) scaleY(1.04);
    filter: drop-shadow(0 8px 12px rgba(5, 121, 160, 0.12));
  }
  58%, 95% {
    height: calc(var(--demo-row-height) * 0.65);
    transform: scaleX(1) scaleY(1);
    filter: drop-shadow(0 7px 10px rgba(36, 42, 46, 0.12));
  }
  100% {
    height: calc(var(--demo-row-height) * 0.62);
    transform: none;
    filter: none;
  }
}

@keyframes demoBridgeShapePaint {
  0%, 25% {
    fill: rgba(255, 255, 255, 0.96);
    stroke: #2a2f33;
    stroke-width: 1.25px;
  }
  26%, 54% {
    fill: var(--selected-clue);
    stroke: #05a6d8;
    stroke-width: 1.55px;
  }
  56% {
    fill: #fff0a8;
    stroke: #1c1f22;
    stroke-width: 2.1px;
  }
  58%, 95% {
    fill: var(--brass);
    stroke: #1c1f22;
    stroke-width: 2.1px;
  }
  100% {
    fill: rgba(255, 255, 255, 0.96);
    stroke: #2a2f33;
    stroke-width: 1.25px;
  }
}

@keyframes demoTargetBlank {
  0%, 54% {
    opacity: 1;
    transform: scaleX(1);
  }
  56% {
    opacity: 0.55;
    transform: scaleX(0.16);
  }
  58%, 100% {
    opacity: 0;
    transform: scaleX(0);
  }
}

@keyframes demoAnswerLockScale {
  0%, 56% {
    transform: scale(1);
  }
  58% {
    transform: scale(1.1);
  }
  62%, 95% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes demoAnswerTypeM {
  0%, 40% {
    opacity: 0;
    transform: translateY(4px);
    font-weight: 560;
  }
  44%, 56% {
    opacity: 1;
    transform: translateY(0);
    font-weight: 560;
  }
  58%, 95% {
    opacity: 1;
    transform: translateY(0);
    font-weight: 880;
  }
  100% {
    opacity: 0;
    transform: translateY(4px);
    font-weight: 560;
  }
}

@keyframes demoAnswerTypeU {
  0%, 45% {
    opacity: 0;
    transform: translateY(4px);
    font-weight: 560;
  }
  49%, 56% {
    opacity: 1;
    transform: translateY(0);
    font-weight: 560;
  }
  58%, 95% {
    opacity: 1;
    transform: translateY(0);
    font-weight: 880;
  }
  100% {
    opacity: 0;
    transform: translateY(4px);
    font-weight: 560;
  }
}

@keyframes demoAnswerTypeG {
  0%, 50% {
    opacity: 0;
    transform: translateY(4px);
    font-weight: 560;
  }
  54%, 56% {
    opacity: 1;
    transform: translateY(0);
    font-weight: 560;
  }
  58%, 95% {
    opacity: 1;
    transform: translateY(0);
    font-weight: 880;
  }
  100% {
    opacity: 0;
    transform: translateY(4px);
    font-weight: 560;
  }
}

@keyframes demoMarkedLetterBox {
  0%, 56% {
    opacity: 0;
    transform: scale(0.72);
  }
  58% {
    opacity: 1;
    transform: scale(1.08);
  }
  62%, 95% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.72);
  }
}

@keyframes demoCursorDrag {
  0%, 9% {
    opacity: 0;
    transform: translateY(0) scale(0.84);
  }
  12% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  16% {
    opacity: 1;
    transform: translateY(0) scale(0.88);
    animation-timing-function: linear;
  }
  24% {
    opacity: 1;
    transform: translateY(var(--demo-shift)) scale(0.88);
    animation-timing-function: cubic-bezier(.2, .72, .22, 1);
  }
  26% {
    opacity: 0;
    transform: translateY(var(--demo-shift)) scale(1.05);
  }
  84% {
    opacity: 0;
    transform: translateY(var(--demo-shift)) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
}

@keyframes demoLoopVeil {
  0%, 94% {
    opacity: 0;
  }
  96%, 99.2% {
    opacity: 0.96;
  }
  100% {
    opacity: 0;
  }
}

body.is-desktop-input .intro-card,
body.is-desktop-input .tutorial-card {
  background: #f8fbfc;
}

body.is-desktop-input .tutorial-card .tutorial-main {
  grid-template-columns: minmax(280px, 0.88fr) minmax(300px, 0.94fr) minmax(330px, 1.08fr);
  align-items: stretch;
  gap: 24px 28px;
}

body.is-desktop-input .tutorial-score-panel,
body.is-desktop-input .tutorial-hints-panel,
body.is-desktop-input .tutorial-scoring,
body.is-desktop-input .tutorial-hints,
body.is-desktop-input .score-rule,
body.is-desktop-input .hint-rule {
  min-width: 0;
}

body.is-desktop-input .score-rule {
  grid-template-columns: 88px minmax(0, 1fr);
}

body.is-desktop-input .score-rule span,
body.is-desktop-input .hint-rule span,
body.is-desktop-input .tutorial-hints-panel > .tutorial-copy {
  overflow-wrap: anywhere;
}

body.is-desktop-input .intro-card .lesson-demo,
body.is-desktop-input .tutorial-demo-panel .lesson-demo {
  border-color: rgba(120, 141, 153, 0.22);
  background: rgba(255, 255, 255, 0.66);
}

body.is-desktop-input .intro-card .align-demo,
body.is-desktop-input .tutorial-demo-panel .align-demo {
  --demo-column-width: 124px;
  --demo-river-width: calc(var(--demo-column-width) * 0.68);
  --demo-bridge-overhang: calc(var(--demo-column-width) * 0.19);
  --demo-bridge-width: calc(var(--demo-column-width) + (var(--demo-bridge-overhang) * 2));
  --demo-row-height: 62px;
  --demo-row-gap: 12px;
  --demo-shift: calc(-1 * (var(--demo-row-height) + var(--demo-row-gap)));
  gap: var(--demo-row-gap);
}

body.is-desktop-input .intro-card .demo-row,
body.is-desktop-input .tutorial-demo-panel .demo-row {
  min-height: var(--demo-row-height);
}

body.is-desktop-input .intro-card .demo-clue,
body.is-desktop-input .tutorial-demo-panel .demo-clue {
  min-height: calc(var(--demo-row-height) - 2px);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 520;
}

body.is-desktop-input .intro-card .demo-span,
body.is-desktop-input .tutorial-demo-panel .demo-span {
  min-height: 0;
  border-radius: 0;
}

body.is-desktop-input .intro-card .demo-answer,
body.is-desktop-input .tutorial-demo-panel .demo-answer {
  font-size: 18px;
}

body.is-desktop-input .intro-card .demo-blank,
body.is-desktop-input .tutorial-demo-panel .demo-blank {
  width: 62%;
  height: 100%;
}

body.is-desktop-input .intro-card .demo-cursor,
body.is-desktop-input .tutorial-demo-panel .demo-cursor {
  top: calc(24px + var(--demo-row-height) + var(--demo-row-gap) + (var(--demo-row-height) * 0.88) - 13px);
  left: calc(50% + (var(--demo-column-width) * 0.5) + ((100% - var(--demo-column-width)) * 0.25) - (var(--demo-column-width) * 0.3) - 13px);
  width: 26px;
  height: 26px;
}

/* Full tutorial: keep the instructional sections visually related. */
.tutorial-card {
  border-radius: 14px;
}

.tutorial-card .tutorial-flow-panel,
.tutorial-card .tutorial-score-panel,
.tutorial-card .tutorial-hints-panel {
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(120, 141, 153, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.tutorial-card .tutorial-flow-title,
.tutorial-card .tutorial-score-panel > .tutorial-section-title,
.tutorial-card .tutorial-hints-panel > .tutorial-section-title {
  margin: 0;
  color: #111;
  font-size: clamp(16px, 4.4vw, 20px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: none;
}

.tutorial-card .tutorial-flow-panel .tutorial-steps,
.tutorial-card .tutorial-scoring,
.tutorial-card .tutorial-hints {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(120, 141, 153, 0.2);
  border-bottom: 1px solid rgba(120, 141, 153, 0.2);
}

.tutorial-card .tutorial-flow-panel .lesson-card,
.tutorial-card .score-rule,
.tutorial-card .hint-rule {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tutorial-card .tutorial-flow-panel .lesson-card {
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas:
    "number title"
    "number copy";
  align-items: start;
  gap: 4px 10px;
  padding: 10px 0 11px;
}

.tutorial-card .tutorial-flow-panel .lesson-card + .lesson-card,
.tutorial-card .score-rule + .score-rule,
.tutorial-card .hint-rule + .hint-rule {
  border-top: 1px solid rgba(120, 141, 153, 0.2);
}

.tutorial-card .tutorial-flow-panel .lesson-number {
  grid-area: number;
  position: static;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  font-size: 13px;
}

.tutorial-card .tutorial-flow-panel .lesson-card .tutorial-section-title {
  grid-area: title;
  margin: 0;
  color: #111;
  font-size: clamp(16px, 4.1vw, 19px);
  line-height: 1.08;
  letter-spacing: 0;
  text-transform: none;
}

.tutorial-card .tutorial-flow-panel .lesson-card .tutorial-copy {
  grid-area: copy;
  font-size: clamp(13.5px, 3.65vw, 16px);
  line-height: 1.23;
}

.tutorial-card .score-rule,
.tutorial-card .hint-rule {
  padding: 9px 0;
}

.tutorial-card .tutorial-hints-panel > .tutorial-copy {
  margin: 0;
  font-size: clamp(13.5px, 3.65vw, 16px);
  line-height: 1.23;
}

.tutorial-card .tutorial-flow-start {
  margin-top: 0;
}

body.is-desktop-input .tutorial-modal {
  place-items: start center;
  padding-top: clamp(116px, 15svh, 154px);
}

body.is-desktop-input .tutorial-card {
  border-radius: 18px;
}

body.is-desktop-input .tutorial-card .tutorial-flow-panel,
body.is-desktop-input .tutorial-card .tutorial-score-panel,
body.is-desktop-input .tutorial-card .tutorial-hints-panel {
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(120, 141, 153, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

body.is-desktop-input .tutorial-card .tutorial-main {
  align-items: start;
}

body.is-desktop-input .tutorial-card .tutorial-flow-panel {
  grid-template-rows: none;
  align-content: start;
}

body.is-desktop-input .tutorial-card .tutorial-flow-title,
body.is-desktop-input .tutorial-card .tutorial-score-panel > .tutorial-section-title,
body.is-desktop-input .tutorial-card .tutorial-hints-panel > .tutorial-section-title {
  padding-top: 0;
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
}

body.is-desktop-input .tutorial-card .tutorial-flow-panel .lesson-card {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px 13px;
  padding: 14px 0 15px;
}

body.is-desktop-input .tutorial-card .tutorial-flow-panel .lesson-number {
  width: 29px;
  height: 29px;
  font-size: 15px;
}

body.is-desktop-input .tutorial-card .tutorial-flow-panel .lesson-card .tutorial-section-title {
  font-size: 21px;
  line-height: 1.08;
}

body.is-desktop-input .tutorial-card .tutorial-flow-panel .lesson-card .tutorial-copy,
body.is-desktop-input .tutorial-card .score-rule span,
body.is-desktop-input .tutorial-card .hint-rule span,
body.is-desktop-input .tutorial-card .tutorial-hints-panel > .tutorial-copy {
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: normal;
}

body.is-desktop-input .tutorial-card .score-rule,
body.is-desktop-input .tutorial-card .hint-rule {
  padding: 12px 0;
}

body.is-desktop-input .tutorial-card .score-rule {
  grid-template-columns: 100px minmax(0, 1fr);
}

body.is-desktop-input .tutorial-card .hint-rule {
  grid-template-columns: 32px minmax(0, 1fr);
}

body.is-desktop-input .tutorial-card .tutorial-hints {
  grid-template-columns: 1fr;
  column-gap: 0;
}

body.is-desktop-input .tutorial-card .hint-rule:nth-last-child(-n + 2) {
  border-bottom: 0;
}

body.is-desktop-input .tutorial-card .tutorial-flow-start {
  grid-row: auto;
  align-self: start;
  min-height: 58px;
  margin-top: 4px;
  border-radius: 14px;
  font-size: 21px;
}

@media (max-width: 430px) {
  .intro-card .align-demo {
    --demo-column-width: 82px;
    --demo-river-width: calc(var(--demo-column-width) * 0.68);
    --demo-bridge-overhang: calc(var(--demo-column-width) * 0.19);
    --demo-bridge-width: calc(var(--demo-column-width) + (var(--demo-bridge-overhang) * 2));
    --demo-row-height: 42px;
    --demo-row-gap: 5px;
    --demo-shift: calc(-1 * (var(--demo-row-height) + var(--demo-row-gap)));
  }

  .intro-card .demo-row {
    min-height: var(--demo-row-height);
  }

  .intro-card .demo-clue {
    min-height: calc(var(--demo-row-height) - 2px);
    padding: 5px 8px;
    font-size: 12px;
  }

  .intro-card .demo-span {
    height: calc(var(--demo-row-height) * 0.58);
    min-height: 0;
  }

  .intro-card .demo-answer {
    font-size: 12.7px;
  }

  .intro-card .demo-cursor {
    top: calc(24px + var(--demo-row-height) + var(--demo-row-gap) + (var(--demo-row-height) * 0.88) - 8px);
    left: calc(50% + (var(--demo-column-width) * 0.5) + ((100% - var(--demo-column-width)) * 0.25) - (var(--demo-column-width) * 0.3) - 8px);
    width: 16px;
    height: 16px;
  }
}

@media (min-width: 341px) and (max-width: 390px) and (max-height: 740px) and (pointer: coarse) {
  body:not(.is-desktop-input) .intro-modal,
  body:not(.is-desktop-input) .tutorial-modal,
  body:not(.is-desktop-input) .score-modal {
    place-items: start center;
    padding-right: 10px;
    padding-left: 10px;
    overflow: hidden;
  }

  body:not(.is-desktop-input) .intro-modal {
    --intro-modal-top-offset: clamp(94px, 15svh, 112px);
    padding-top: max(var(--intro-modal-top-offset), env(safe-area-inset-top));
    padding-bottom: max(68px, env(safe-area-inset-bottom));
  }

  body:not(.is-desktop-input) .tutorial-modal,
  body:not(.is-desktop-input) .score-modal {
    padding-top: max(70px, env(safe-area-inset-top));
    padding-bottom: max(68px, env(safe-area-inset-bottom));
  }

  body:not(.is-desktop-input) .intro-card,
  body:not(.is-desktop-input) .tutorial-card,
  body:not(.is-desktop-input) .score-card {
    width: min(100%, 352px);
    max-height: calc(var(--app-height) - 138px);
    border-radius: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.is-desktop-input) .intro-card {
    gap: 6px;
    padding: 12px 13px 11px;
  }

  body:not(.is-desktop-input) .intro-card .tutorial-kicker,
  body:not(.is-desktop-input) .tutorial-card h2 {
    padding-right: 32px;
    font-size: 18px;
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .intro-card .tutorial-author,
  body:not(.is-desktop-input) .tutorial-meta-row .tutorial-author,
  body:not(.is-desktop-input) .tutorial-meta-row .tutorial-skip-scores {
    font-size: 12px;
  }

  body:not(.is-desktop-input) .intro-card .align-demo,
  body:not(.is-desktop-input) .tutorial-card .align-demo {
    --demo-column-width: 74px;
    --demo-river-width: calc(var(--demo-column-width) * 0.66);
    --demo-bridge-overhang: calc(var(--demo-column-width) * 0.19);
    --demo-bridge-width: calc(var(--demo-column-width) + (var(--demo-bridge-overhang) * 2));
    --demo-row-height: 36px;
    --demo-row-gap: 4px;
    --demo-shift: calc(-1 * (var(--demo-row-height) + var(--demo-row-gap)));
  }

  body:not(.is-desktop-input) .intro-card .demo-labels,
  body:not(.is-desktop-input) .tutorial-card .demo-labels {
    min-height: 13px;
    font-size: 8.8px;
  }

  body:not(.is-desktop-input) .intro-card .demo-row,
  body:not(.is-desktop-input) .tutorial-card .demo-row {
    min-height: var(--demo-row-height);
  }

  body:not(.is-desktop-input) .intro-card .demo-clue,
  body:not(.is-desktop-input) .tutorial-card .demo-clue {
    min-height: calc(var(--demo-row-height) - 2px);
    padding: 4px 6px;
    font-size: 10.4px;
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .intro-card .demo-span,
  body:not(.is-desktop-input) .tutorial-card .demo-span {
    height: calc(var(--demo-row-height) * 0.57);
    min-height: 0;
  }

  body:not(.is-desktop-input) .intro-card .demo-answer,
  body:not(.is-desktop-input) .tutorial-card .demo-answer {
    font-size: 11.2px;
  }

  body:not(.is-desktop-input) .intro-card .demo-cursor,
  body:not(.is-desktop-input) .tutorial-card .demo-cursor {
    width: 15px;
    height: 15px;
  }

  body:not(.is-desktop-input) .intro-card .intro-steps {
    gap: 0;
  }

  body:not(.is-desktop-input) .intro-card .lesson-card {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 3px 8px;
    min-height: 0;
    padding: 7px 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:not(.is-desktop-input) .intro-card .lesson-card + .lesson-card {
    border-top: 1px solid rgba(120, 141, 153, 0.18);
  }

  body:not(.is-desktop-input) .intro-card .lesson-number,
  body:not(.is-desktop-input) .tutorial-card .lesson-number {
    width: 21px;
    height: 21px;
    font-size: 11px;
  }

  body:not(.is-desktop-input) .intro-card .tutorial-section-title,
  body:not(.is-desktop-input) .intro-card .intro-rule-card .tutorial-section-title {
    font-size: 14.5px;
    line-height: 1.03;
  }

  body:not(.is-desktop-input) .intro-card .intro-copy,
  body:not(.is-desktop-input) .intro-card .intro-rule-card .intro-copy {
    font-size: 11.8px;
    line-height: 1.12;
  }

  body:not(.is-desktop-input) .intro-card .intro-rules-grid {
    gap: 6px;
  }

  body:not(.is-desktop-input) .intro-card .intro-rule-card {
    padding: 7px 8px;
    border-radius: 9px;
  }

  body:not(.is-desktop-input) .intro-card .tutorial-start,
  body:not(.is-desktop-input) .intro-card .intro-detail {
    min-height: 34px;
    border-radius: 9px;
    font-size: 13px;
  }

  body:not(.is-desktop-input) .tutorial-card {
    gap: 8px;
    padding: 13px 13px 12px;
  }

  body:not(.is-desktop-input) .tutorial-card .tutorial-meta-row {
    gap: 9px;
    margin-top: 2px;
    padding-right: 34px;
  }

  body:not(.is-desktop-input) .tutorial-card .lesson-demo {
    padding: 2px 0 3px;
  }

  body:not(.is-desktop-input) .tutorial-card .tutorial-main,
  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-panel,
  body:not(.is-desktop-input) .tutorial-card .tutorial-score-panel,
  body:not(.is-desktop-input) .tutorial-card .tutorial-hints-panel {
    gap: 8px;
  }

  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-panel,
  body:not(.is-desktop-input) .tutorial-card .tutorial-score-panel,
  body:not(.is-desktop-input) .tutorial-card .tutorial-hints-panel {
    padding: 10px 11px;
    border-radius: 12px;
  }

  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-title,
  body:not(.is-desktop-input) .tutorial-card .tutorial-score-panel > .tutorial-section-title,
  body:not(.is-desktop-input) .tutorial-card .tutorial-hints-panel > .tutorial-section-title {
    font-size: 16.5px;
  }

  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-panel .lesson-card {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 3px 8px;
    padding: 8px 0;
  }

  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-panel .lesson-card .tutorial-section-title {
    font-size: 15.2px;
    line-height: 1.05;
  }

  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-panel .lesson-card .tutorial-copy,
  body:not(.is-desktop-input) .tutorial-card .score-rule span,
  body:not(.is-desktop-input) .tutorial-card .hint-rule span,
  body:not(.is-desktop-input) .tutorial-card .tutorial-hints-panel > .tutorial-copy {
    font-size: 12.6px;
    line-height: 1.15;
  }

  body:not(.is-desktop-input) .tutorial-card .score-rule,
  body:not(.is-desktop-input) .tutorial-card .hint-rule {
    min-height: 0;
    padding: 7px 0;
  }

  body:not(.is-desktop-input) .tutorial-card .score-rule {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }

  body:not(.is-desktop-input) .tutorial-card .hint-rule {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
  }

  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-start {
    min-height: 38px;
    border-radius: 10px;
    font-size: 14px;
  }

  body:not(.is-desktop-input) .hint-sheet {
    left: 24px;
    right: 24px;
    bottom: 18px;
    gap: 5px;
    max-height: min(29svh, 164px);
    padding: 7px;
    border-width: 1.25px;
    border-radius: 12px;
  }

  body:not(.is-desktop-input) .hint-sheet h3 {
    font-size: 15.8px;
    line-height: 1;
  }

  body:not(.is-desktop-input) .hint-choice-list {
    gap: 4px;
  }

  body:not(.is-desktop-input) .hint-choice {
    min-height: 36px;
    gap: 5px;
    padding: 5px 6px 5px 7px;
    border-width: 1.25px;
    border-radius: 8px;
  }

  body:not(.is-desktop-input) .hint-choice strong {
    font-size: 13px;
    line-height: 1;
  }

  body:not(.is-desktop-input) .hint-choice-desc {
    font-size: 10.2px;
    line-height: 1.03;
  }

  body:not(.is-desktop-input) .hint-cost {
    min-width: 32px;
    height: 25px;
    border-width: 1.25px;
    border-radius: 7px;
    font-size: 11px;
  }

  body:not(.is-desktop-input) .hint-cancel {
    min-height: 27px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 11px;
  }

  body:not(.is-desktop-input) .score-card {
    gap: 8px;
    padding: 14px 14px 13px;
  }

  body:not(.is-desktop-input) .score-card .score-close {
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 17px;
  }

  body:not(.is-desktop-input) .score-card::before {
    width: 96px;
    height: 27px;
    margin-bottom: -6px;
    background:
      linear-gradient(currentColor, currentColor) 0 21px / 28px 2px no-repeat,
      linear-gradient(currentColor, currentColor) 68px 21px / 28px 2px no-repeat,
      radial-gradient(ellipse at 50% 100%, transparent 0 48%, currentColor 49% 55%, transparent 56%) 27px 1px / 42px 27px no-repeat,
      linear-gradient(currentColor, currentColor) 47px 7px / 2px 22px no-repeat;
  }

  body:not(.is-desktop-input) .score-title {
    font-size: 25px;
  }

  body:not(.is-desktop-input) .score-ledger {
    padding: 8px 10px;
    border-radius: 12px;
  }

  body:not(.is-desktop-input) .score-ledger-row {
    min-height: 30px;
    gap: 8px;
    padding: 5px 0;
  }

  body:not(.is-desktop-input) .score-ledger-row span {
    font-size: 12.8px;
  }

  body:not(.is-desktop-input) .score-ledger-row small {
    font-size: 9.8px;
  }

  body:not(.is-desktop-input) .score-ledger-row strong {
    font-size: 13.5px;
  }

  body:not(.is-desktop-input) .score-result {
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
  }

  body:not(.is-desktop-input) .score-rating {
    gap: 8px;
  }

  body:not(.is-desktop-input) .score-grade {
    width: 54px;
    height: 54px;
    border-radius: 9px;
    font-size: 28px;
  }

  body:not(.is-desktop-input) .score-rating-title {
    font-size: 15px;
  }

  body:not(.is-desktop-input) .score-points span {
    font-size: 11px;
  }

  body:not(.is-desktop-input) .score-points strong {
    font-size: 29px;
  }

  body:not(.is-desktop-input) .score-actions {
    gap: 7px;
  }

  body:not(.is-desktop-input) .share-button,
  body:not(.is-desktop-input) .copy-button {
    min-height: 42px;
    border-radius: 9px;
    font-size: 13.5px;
  }
}

@media (max-width: 340px) and (max-height: 535px) and (pointer: coarse) {
  body:not(.is-desktop-input) .intro-modal,
  body:not(.is-desktop-input) .tutorial-modal,
  body:not(.is-desktop-input) .score-modal {
    place-items: start center;
    padding-right: 8px;
    padding-left: 8px;
    overflow: hidden;
  }

  body:not(.is-desktop-input) .intro-modal {
    --intro-modal-top-offset: 66px;
    padding-top: max(var(--intro-modal-top-offset), env(safe-area-inset-top));
    padding-bottom: max(50px, env(safe-area-inset-bottom));
  }

  body:not(.is-desktop-input) .tutorial-modal,
  body:not(.is-desktop-input) .score-modal {
    padding-top: max(54px, env(safe-area-inset-top));
    padding-bottom: max(50px, env(safe-area-inset-bottom));
  }

  body:not(.is-desktop-input) .intro-card,
  body:not(.is-desktop-input) .tutorial-card,
  body:not(.is-desktop-input) .score-card {
    width: min(100%, 316px);
    max-height: calc(var(--app-height) - 106px);
    border-radius: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.is-desktop-input) .intro-card,
  body:not(.is-desktop-input) .tutorial-card {
    gap: 5px;
    padding: 10px;
  }

  body:not(.is-desktop-input) .intro-card .tutorial-kicker,
  body:not(.is-desktop-input) .tutorial-card h2 {
    padding-right: 29px;
    font-size: 16.2px;
  }

  body:not(.is-desktop-input) .intro-card .align-demo,
  body:not(.is-desktop-input) .tutorial-card .align-demo {
    --demo-column-width: 64px;
    --demo-river-width: calc(var(--demo-column-width) * 0.64);
    --demo-bridge-overhang: calc(var(--demo-column-width) * 0.18);
    --demo-bridge-width: calc(var(--demo-column-width) + (var(--demo-bridge-overhang) * 2));
    --demo-row-height: 31px;
    --demo-row-gap: 3px;
    --demo-shift: calc(-1 * (var(--demo-row-height) + var(--demo-row-gap)));
  }

  body:not(.is-desktop-input) .intro-card .demo-clue,
  body:not(.is-desktop-input) .tutorial-card .demo-clue {
    min-height: 29px;
    padding: 3px 5px;
    font-size: 9.5px;
  }

  body:not(.is-desktop-input) .intro-card .demo-span,
  body:not(.is-desktop-input) .tutorial-card .demo-span {
    height: 18px;
  }

  body:not(.is-desktop-input) .intro-card .intro-copy,
  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-panel .lesson-card .tutorial-copy,
  body:not(.is-desktop-input) .tutorial-card .score-rule span,
  body:not(.is-desktop-input) .tutorial-card .hint-rule span,
  body:not(.is-desktop-input) .tutorial-card .tutorial-hints-panel > .tutorial-copy {
    font-size: 11.4px;
    line-height: 1.1;
  }

  body:not(.is-desktop-input) .intro-card .tutorial-section-title,
  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-panel .lesson-card .tutorial-section-title,
  body:not(.is-desktop-input) .tutorial-card .tutorial-flow-title,
  body:not(.is-desktop-input) .tutorial-card .tutorial-score-panel > .tutorial-section-title,
  body:not(.is-desktop-input) .tutorial-card .tutorial-hints-panel > .tutorial-section-title {
    font-size: 14px;
  }

  body:not(.is-desktop-input) .hint-sheet {
    left: 12px;
    right: 12px;
    bottom: 10px;
    max-height: min(32svh, 168px);
    gap: 5px;
    padding: 7px;
    border-radius: 11px;
  }

  body:not(.is-desktop-input) .hint-sheet h3 {
    font-size: 15.5px;
    line-height: 1;
  }

  body:not(.is-desktop-input) .hint-choice {
    min-height: 39px;
    padding: 6px 6px 6px 8px;
  }

  body:not(.is-desktop-input) .hint-choice strong {
    font-size: 13px;
  }

  body:not(.is-desktop-input) .hint-choice-desc {
    font-size: 10.4px;
    line-height: 1.02;
  }

  body:not(.is-desktop-input) .hint-cost {
    min-width: 33px;
    height: 25px;
    font-size: 11px;
  }

  body:not(.is-desktop-input) .score-card {
    gap: 7px;
    padding: 12px;
  }

  body:not(.is-desktop-input) .score-title {
    font-size: 22px;
  }

  body:not(.is-desktop-input) .score-ledger-row {
    min-height: 28px;
  }

  body:not(.is-desktop-input) .score-ledger-row span {
    font-size: 12px;
  }

  body:not(.is-desktop-input) .score-grade {
    width: 48px;
    height: 48px;
    font-size: 25px;
  }

  body:not(.is-desktop-input) .score-points strong {
    font-size: 26px;
  }

  body:not(.is-desktop-input) .share-button,
  body:not(.is-desktop-input) .copy-button {
    min-height: 38px;
    font-size: 12.5px;
  }
}

@media (max-width: 430px) and (pointer: coarse) {
  body:not(.is-desktop-input) .intro-card {
    padding-bottom: 92px;
  }

  body:not(.is-desktop-input) .intro-card .lesson-card {
    grid-template-columns: 25px minmax(0, 1fr);
    grid-template-areas:
      "lesson-number lesson-title"
      "lesson-number lesson-copy";
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
  }

  body:not(.is-desktop-input) .intro-card .lesson-number {
    position: static;
    grid-area: lesson-number;
    align-self: center;
    justify-self: center;
  }

  body:not(.is-desktop-input) .intro-card .lesson-card .tutorial-section-title {
    grid-area: lesson-title;
    min-width: 0;
    margin: 0;
    white-space: normal;
    overflow-wrap: break-word;
  }

  body:not(.is-desktop-input) .intro-card .lesson-card .intro-copy {
    grid-area: lesson-copy;
    min-width: 0;
    margin: 0;
  }

  body:not(.is-desktop-input) .intro-card .intro-actions {
    position: absolute;
    right: 12px;
    bottom: 10px;
    left: 12px;
    z-index: 4;
    gap: 6px;
    margin: 0;
    padding-top: 10px;
    background: linear-gradient(
      to bottom,
      rgba(248, 251, 252, 0),
      rgba(248, 251, 252, 0.94) 28%,
      #f8fbfc 100%
    );
  }

  body:not(.is-desktop-input) .intro-card .tutorial-start,
  body:not(.is-desktop-input) .intro-card .intro-detail {
    min-height: 34px;
  }
}

@media (min-width: 341px) and (max-width: 390px) and (max-height: 740px) and (pointer: coarse) {
  body:not(.is-desktop-input) .intro-modal {
    --intro-modal-top-offset: clamp(76px, 12svh, 96px);
    padding-bottom: max(48px, env(safe-area-inset-bottom));
  }

  body:not(.is-desktop-input) .intro-card {
    max-height: calc(var(--app-height) - var(--intro-modal-top-offset) - 48px);
  }

  body:not(.is-desktop-input) .intro-card .intro-rules-grid {
    display: none;
  }
}

.answer-input.has-input-notice {
  color: transparent !important;
  caret-color: transparent !important;
}

.answer-input.has-input-notice::placeholder {
  color: transparent !important;
}

.answer-input.has-input-notice-error,
.answer-input.has-input-notice-error:focus {
  border-color: rgba(185, 64, 61, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(185, 64, 61, 0.12), inset 0 2px 8px rgba(47, 31, 17, 0.05) !important;
}

.answer-input.has-input-notice-error.is-input-notice-hiding,
.answer-input.has-input-notice-error.is-input-notice-hiding:focus {
  border-color: rgba(47, 31, 17, 0.14) !important;
  box-shadow: inset 0 2px 8px rgba(47, 31, 17, 0.05) !important;
}

@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input {
    --paper: #f6fbff;
    --pause-tint: rgba(246, 251, 255, 0.68);
    --paper-modal-dim: #c5ced3;
    --paper-score-dim: #30383d;
    --score-overlay: transparent;
    --score-page-tint: #aab7bb;
    --ink: #101418;
    --muted: #5b6870;
    --line: rgba(31, 45, 55, 0.16);
    --river-blue: #048fc7;
    --river-blue-dark: #04759f;
    --teal: #0693c9;
    --brass: #ffca18;
    --brass-2: #fff0b8;
    --solved-clue: #fff1bd;
    --selected-clue: #dff7ff;
    background: var(--paper);
  }

  body.is-desktop-input,
  body.is-desktop-input .phone-shell,
  body.is-desktop-input .game-card,
  body.is-desktop-input:not(.has-modal):not(.has-score-modal) .phone-shell {
    background: var(--paper);
  }

  body.is-desktop-input .phone-shell {
    padding: calc(18px * var(--desktop-scale)) 20px;
  }

  body.is-desktop-input .game-card {
    width: min(calc(1180px * var(--desktop-scale)), calc(100vw - 40px));
    height: min(calc(720px * var(--desktop-scale)), calc(var(--app-height) - 40px));
    border: 0;
    border-radius: 0;
    background: var(--paper);
    box-shadow: none;
    overflow: visible;
  }

  body.is-desktop-input .topbar {
    min-height: calc(66px * var(--desktop-scale));
    border-bottom: 0;
  }

  body.is-desktop-input .brand-mark,
  body.is-desktop-input .date-label {
    display: none;
  }

  body.is-desktop-input .brand-lockup {
    transform: none;
  }

  body.is-desktop-input h1 {
    color: #101418;
    font-family: var(--ui-face);
    font-size: calc(50px * var(--desktop-scale));
    font-weight: 850;
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-shadow: none;
  }

  body.is-desktop-input .game-timer {
    top: calc(9.25px * var(--desktop-scale));
    right: auto;
    left: calc(8px * var(--desktop-scale));
    min-width: calc(68px * var(--desktop-scale));
    justify-items: start;
    color: var(--river-blue);
    font-weight: 780;
  }

  body.is-desktop-input .timer-digits {
    min-width: calc(58px * var(--desktop-scale));
    justify-content: flex-start;
    color: var(--river-blue);
    font-size: calc(26px * var(--desktop-scale));
    font-weight: 780;
    text-align: left;
    text-shadow: none;
  }

  body.is-desktop-input .pause-button {
    width: auto;
    color: var(--river-blue);
    font-size: calc(17px * var(--desktop-scale));
    font-weight: 850;
    text-align: left;
    text-shadow: none;
  }

  body.is-desktop-input .keystone-label {
    color: #586872;
    font-family: var(--ui-face);
    font-size: calc(14px * var(--desktop-scale));
    font-weight: 750;
    letter-spacing: 0.08em;
  }

  body.is-desktop-input .keystone-letter {
    border: 2px solid #bed1dc;
    border-radius: calc(8px * var(--desktop-scale));
    color: rgba(16, 20, 24, 0.45);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(31, 45, 55, 0.05);
    font-family: var(--ui-face);
    font-weight: 750;
  }

  body.is-desktop-input .keystone-letter.is-revealed {
    color: #111;
    border-color: #bed1dc;
    background: #fff;
    box-shadow: 0 5px 12px rgba(18, 39, 52, 0.08), inset 0 -1px 0 rgba(31, 45, 55, 0.08);
  }

  body.is-desktop-input .progress-copy {
    color: #586872;
    font-family: var(--ui-face);
  }

  body.is-desktop-input #solvedCount,
  body.is-desktop-input .progress-total,
  body.is-desktop-input .progress-label {
    color: #586872;
    text-shadow: none;
  }

  body.is-desktop-input .bank-heading,
  body.is-desktop-input .bridge-heading {
    color: #596872;
    font-family: var(--ui-face);
    font-weight: 750;
    letter-spacing: 0.06em;
  }

  body.is-desktop-input .bank-heading span::before,
  body.is-desktop-input .bank-heading span::after {
    height: 2px;
    background: rgba(120, 141, 153, 0.24);
  }

  body.is-desktop-input .bank-panel {
    z-index: 12;
  }

  body.is-desktop-input .clue-card {
    z-index: 2;
    justify-items: center;
    align-items: center;
    border: 2px solid #2a2f33;
    border-radius: calc(8px * var(--desktop-scale));
    color: #111;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
    font-family: var(--ui-face);
    font-weight: 520;
    text-align: center;
  }

  body.is-desktop-input .clue-card::before,
  body.is-desktop-input .clue-card::after {
    content: none;
  }

  body.is-desktop-input .clue-text {
    display: grid;
    place-items: center;
    min-height: 100%;
  }

  body.is-desktop-input .clue-card.is-row-selected {
    border-color: #05a6d8;
    background: var(--selected-clue);
    box-shadow: 0 0 0 calc(2px * var(--desktop-scale)) rgba(5, 166, 216, 0.2), 0 8px calc(18px * var(--desktop-scale)) rgba(5, 121, 160, 0.12);
  }

  body.is-desktop-input .clue-card.is-solved {
    grid-template-columns: minmax(0, 1fr);
    color: #111;
    border-color: #2a2f33;
    background: var(--solved-clue);
    box-shadow: inset 0 -1px 0 rgba(30, 32, 34, 0.08);
  }

  body.is-desktop-input .clue-card.is-solved .clue-text {
    font-weight: 520;
  }

  body.is-desktop-input .move-medallion,
  body.is-desktop-input .lock-medallion {
    color: var(--river-blue);
    opacity: 0.52;
  }

  body.is-desktop-input .bridge-column {
    z-index: 13;
  }

  body.is-desktop-input .bridge-column::before,
  body.is-desktop-input .bridge-column::after {
    content: none;
  }

  body.is-desktop-input .waterline {
    right: 0;
    left: 0;
    border-radius: calc(8px * var(--desktop-scale));
    background-color: #10bfd0;
    background-image:
      linear-gradient(112deg, rgba(255, 255, 255, 0.26) 0 9%, transparent 9% 26%, rgba(255, 255, 255, 0.2) 26% 32%, transparent 32% 100%),
      repeating-linear-gradient(164deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 20px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  }

  body.is-desktop-input .waterline::before {
    opacity: 0.34;
  }

  body.is-desktop-input .bridge-span {
    z-index: 9;
    overflow: visible;
  }

  body.is-desktop-input .bridge-plank,
  body.is-desktop-input .bridge-span.is-empty .bridge-plank,
  body.is-desktop-input .bridge-span.is-selecting .bridge-plank,
  body.is-desktop-input .bridge-span.is-deselecting .bridge-plank {
    --stable-bridge-fill: rgba(255, 255, 255, 0.96);
    --stable-bridge-outline: #2a2f33;
    --stable-bridge-outline-size: 1.2px;
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--desktop-bridge-width);
    height: calc(48px * var(--desktop-scale));
    min-height: 0;
    margin-left: 0;
    padding: 0 calc(18px * var(--desktop-scale));
    border: 0 !important;
    border-radius: 0;
    color: #111;
    background: transparent !important;
    box-shadow: none !important;
    filter: drop-shadow(0 4px 10px rgba(20, 46, 58, 0.12));
    font-family: var(--ui-face);
    font-size: calc(19px * var(--desktop-scale));
    font-weight: 750;
    letter-spacing: 0.01em;
    overflow: visible;
    isolation: isolate;
    pointer-events: none;
    transform: translate(-50%, -50%);
  }

  body.is-desktop-input .bridge-plank::before,
  body.is-desktop-input .bridge-plank::after {
    content: none !important;
    display: none !important;
  }

  body.is-desktop-input .bridge-shape {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible;
    pointer-events: none;
  }

  body.is-desktop-input .bridge-shape-path {
    fill: var(--stable-bridge-fill);
    stroke: var(--stable-bridge-outline);
    stroke-linejoin: round;
    stroke-width: var(--stable-bridge-outline-size);
    vector-effect: non-scaling-stroke;
    transition:
      fill 280ms var(--ease),
      stroke 280ms var(--ease),
      stroke-width 280ms var(--ease);
  }

  body.is-desktop-input .bridge-plank > * {
    position: relative;
    z-index: 2;
  }

  body.is-desktop-input .bridge-plank > .word-label,
  body.is-desktop-input .bridge-plank > .word-label.is-blank-label,
  body.is-desktop-input .bridge-plank > .word-label.has-typed-underline {
    display: inline-flex;
    width: 72%;
    height: 100%;
    min-height: 100%;
    margin: 0 auto;
    padding: 0;
    align-self: center;
    align-items: center;
    justify-content: center;
    transform: none;
  }

  body.is-desktop-input .bridge-span.is-empty .bridge-plank > .word-label.is-blank-label {
    width: var(--desktop-blank-width);
  }

  body.is-desktop-input .bridge-span.is-empty.is-selected .bridge-plank > .word-label.is-blank-label {
    width: var(--desktop-selected-blank-width);
  }

  body.is-desktop-input .bridge-span.is-selected .bridge-plank,
  body.is-desktop-input .bridge-span.is-empty.is-selected .bridge-plank {
    --stable-bridge-fill: var(--selected-clue);
    --stable-bridge-outline: #05a6d8;
    --stable-bridge-outline-size: 1.45px;
    left: 50%;
    width: var(--desktop-bridge-width);
    height: calc(52px * var(--desktop-scale));
    margin-left: 0;
    filter: drop-shadow(0 10px 18px rgba(5, 121, 160, 0.15));
    translate: none;
    transform: translate(-50%, -50%);
  }

  body.is-desktop-input .bridge-span.is-built .bridge-plank,
  body.is-desktop-input .bridge-span.is-built.is-selected .bridge-plank,
  body.is-desktop-input .bridge-span.is-finalizing .bridge-plank,
  body.is-desktop-input .bridge-span.is-celebrating .bridge-plank {
    --stable-bridge-fill: var(--brass);
    --stable-bridge-outline: #1c1f22;
    --stable-bridge-outline-size: 2.25px;
    left: 50%;
    width: var(--desktop-bridge-width);
    height: calc(52px * var(--desktop-scale));
    margin-left: 0;
    color: #111;
    filter: drop-shadow(0 7px 13px rgba(36, 42, 46, 0.12));
    translate: none;
    transform: translate(-50%, -50%);
  }

  body.is-desktop-input .bridge-span.is-finalizing .bridge-plank,
  body.is-desktop-input .bridge-span.is-celebrating .bridge-plank {
    animation: mobileBridgeCorrectPop 900ms cubic-bezier(.16, .84, .24, 1) both;
  }

  body.is-desktop-input .bridge-span.is-selecting .bridge-plank {
    animation: mobileBridgeSelectJiggle 310ms cubic-bezier(.16, .84, .24, 1) both;
  }

  body.is-desktop-input .bridge-span.is-deselecting .bridge-plank {
    animation: mobileBridgeSelectRelease 230ms cubic-bezier(.22, .72, .2, 1) both;
  }

  body.is-desktop-input .bridge-span.is-built .word-label,
  body.is-desktop-input .bridge-span.is-finalizing .word-label,
  body.is-desktop-input .bridge-span.is-celebrating .word-label {
    width: 86%;
    gap: 0.024em;
    letter-spacing: 0.002em;
  }

  body.is-desktop-input .bridge-span.is-built .word-label.is-medium-word,
  body.is-desktop-input .bridge-span.is-finalizing .word-label.is-medium-word,
  body.is-desktop-input .bridge-span.is-celebrating .word-label.is-medium-word {
    width: 89%;
    font-size: 1.12em !important;
  }

  body.is-desktop-input .bridge-span.is-built .word-label.is-long-word,
  body.is-desktop-input .bridge-span.is-finalizing .word-label.is-long-word,
  body.is-desktop-input .bridge-span.is-celebrating .word-label.is-long-word,
  body.is-desktop-input .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .word-label.is-long-word {
    width: 90%;
    font-size: calc(16px * var(--desktop-scale)) !important;
  }

  body.is-desktop-input .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .word-label.has-typed-underline {
    position: relative;
    width: var(--desktop-selected-blank-width);
    gap: 0.02em;
    font-weight: 680;
    justify-content: center;
  }

  body.is-desktop-input .bridge-span.is-finalizing .word-label.has-typed-underline {
    position: relative;
    width: var(--desktop-selected-blank-width);
    gap: 0.02em;
    justify-content: center;
  }

  body.is-desktop-input .blank-underline,
  body.is-desktop-input .bridge-span.is-selected .blank-underline,
  body.is-desktop-input .word-label.has-typed-underline .typed-underline {
    display: block !important;
    height: calc(2.8px * var(--desktop-scale)) !important;
    min-height: calc(2.8px * var(--desktop-scale)) !important;
    border-radius: 2px;
    background: #111 !important;
    box-shadow: none !important;
  }

  body.is-desktop-input .blank-underline {
    width: 100% !important;
    transform: translateY(calc(7px * var(--desktop-scale))) !important;
  }

  body.is-desktop-input .bridge-span.is-selected .blank-underline {
    width: 108% !important;
  }

  body.is-desktop-input .bridge-span.is-typing-preview:not(.is-finalizing):not(.is-celebrating):not(.is-built) .word-label.has-typed-underline .typed-underline {
    position: absolute;
    right: 0;
    bottom: calc(12px * var(--desktop-scale));
    left: 0;
    width: 100% !important;
    transform: none !important;
  }

  body.is-desktop-input .bridge-span.is-finalizing .word-label.has-typed-underline .typed-underline {
    position: absolute;
    right: 0;
    bottom: calc(12px * var(--desktop-scale));
    left: 0;
    width: 100% !important;
    transform: none !important;
  }

  body.is-desktop-input .marked-letter {
    position: relative;
    z-index: 1;
    min-width: 0.96em;
    margin-right: 0.04em;
    color: #111;
    text-shadow: none;
  }

  body.is-desktop-input .marked-letter::before {
    content: "";
    position: absolute;
    inset: -0.13em -0.12em -0.11em -0.12em;
    border: 1.5px solid #111;
    border-radius: 0.18em;
    pointer-events: none;
    transform-origin: center;
    z-index: -1;
  }

  body.is-desktop-input .bridge-span.is-finalizing .marked-letter::before,
  body.is-desktop-input .bridge-span.is-celebrating .marked-letter::before {
    animation: letterBoxDraw 520ms cubic-bezier(.16, .84, .24, 1) 260ms both;
  }

  body.is-desktop-input .answer-dock {
    border: 2px solid rgba(120, 141, 153, 0.22);
    border-radius: calc(12px * var(--desktop-scale));
    background: rgba(255, 255, 255, 0.42);
    box-shadow: none;
    overflow: visible;
  }

  body.is-desktop-input .status-line,
  body.is-desktop-input .hint-order {
    color: #111;
    font-family: var(--ui-face);
    font-weight: 500;
  }

  body.is-desktop-input .status-line {
    border-bottom: 2px solid rgba(120, 141, 153, 0.22);
  }

  body.is-desktop-input .answer-input {
    border: 2px solid #bed1dc;
    border-radius: calc(8px * var(--desktop-scale));
    color: #111;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    font-family: var(--ui-face);
    font-weight: 650;
  }

  body.is-desktop-input .answer-input::placeholder {
    color: rgba(88, 104, 114, 0.46);
    font-weight: 750;
  }

  body.is-desktop-input .answer-input:focus {
    border-color: #05a6d8;
    box-shadow: 0 0 0 3px rgba(5, 166, 216, 0.14);
  }

  body.is-desktop-input .answer-input.has-input-notice-error,
  body.is-desktop-input .answer-input.has-input-notice-error:focus {
    border-color: rgba(185, 64, 61, 0.72) !important;
    box-shadow: 0 0 0 3px rgba(185, 64, 61, 0.12) !important;
  }

  body.is-desktop-input .answer-input.has-input-notice-error.is-input-notice-hiding,
  body.is-desktop-input .answer-input.has-input-notice-error.is-input-notice-hiding:focus {
    border-color: #bed1dc !important;
    box-shadow: none !important;
  }

  body.is-desktop-input .input-notice {
    color: #b9403d;
    font-family: var(--ui-face);
    font-weight: 900;
  }

  body.is-desktop-input .primary-button,
  body.is-desktop-input .hint-button {
    border-radius: calc(8px * var(--desktop-scale));
    color: #fff;
    background: var(--river-blue);
    box-shadow: 0 calc(4px * var(--desktop-scale)) 0 var(--river-blue-dark);
    font-family: var(--ui-face);
    font-weight: 700;
  }

  body.is-desktop-input .dock-footer {
    position: relative;
    z-index: 24;
  }

  body.is-desktop-input .hint-button.is-menu-open {
    position: relative;
    z-index: 2;
  }

  body.is-desktop-input .hint-button.is-menu-open + .hint-sheet + .hint-order {
    display: none;
  }

  body.is-desktop-input .answer-dock.is-complete .hint-button.is-report-button {
    min-height: calc(70px * var(--desktop-scale));
    font-size: calc(18px * var(--desktop-scale));
  }

  body.is-desktop-input .primary-button:active,
  body.is-desktop-input .hint-button:active,
  body.is-desktop-input .primary-button.is-pressing,
  body.is-desktop-input .hint-button.is-pressing {
    transform: translateY(calc(3px * var(--desktop-scale))) scale(0.975);
    box-shadow: 0 calc(1px * var(--desktop-scale)) 0 var(--river-blue-dark);
  }

  body.is-desktop-input .howto-button {
    border: 2px solid #bed1dc;
    border-radius: calc(8px * var(--desktop-scale));
    color: var(--river-blue-dark);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 0 rgba(154, 178, 190, 0.34);
    font-family: var(--ui-face);
    font-weight: 750;
  }

  body.is-desktop-input .howto-button:hover {
    border-color: #05a6d8;
    background: #fff;
  }

  body.is-desktop-input .hint-sheet {
    position: absolute;
    top: calc(100% + (10px * var(--desktop-scale)));
    right: 0;
    bottom: auto;
    left: auto;
    width: min(calc(408px * var(--desktop-scale)), calc(100vw - 48px));
    min-width: 100%;
    max-height: min(460px, max(260px, calc(var(--app-height) - (430px * var(--desktop-scale)))));
    gap: 14px;
    padding: 18px;
    overflow: auto;
    border-color: #bed1dc;
    border-radius: 12px;
    color: var(--ink);
    background: var(--selected-clue);
    box-shadow:
      0 24px 56px rgba(20, 46, 58, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.86);
  }

  body.is-desktop-input .hint-sheet h3 {
    font-size: 26px;
    line-height: 1;
  }

  body.is-desktop-input .hint-choice-list {
    gap: 12px;
  }

  body.is-desktop-input .hint-choice,
  body.is-desktop-input .hint-cancel {
    border-color: #bed1dc;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 0 rgba(154, 178, 190, 0.44);
  }

  body.is-desktop-input .hint-choice {
    min-height: 96px;
    gap: 14px;
    padding: 15px 14px 15px 16px;
  }

  body.is-desktop-input .hint-choice strong {
    font-size: 23px;
    line-height: 1.05;
  }

  body.is-desktop-input .hint-choice.is-heavy {
    border-color: #e8c64d;
    background: #fff6cf;
    box-shadow: 0 2px 0 rgba(197, 154, 0, 0.34);
  }

  body.is-desktop-input .hint-choice-desc,
  body.is-desktop-input .hint-cancel {
    color: #586872;
    font-family: var(--ui-face);
  }

  body.is-desktop-input .hint-choice-desc {
    font-size: 18px;
    line-height: 1.16;
  }

  body.is-desktop-input .hint-cost {
    min-width: 58px;
    height: 44px;
    border-color: #101418;
    color: #101418;
    background: var(--brass);
    font-size: 18px;
  }

  body.is-desktop-input .hint-cancel {
    min-height: 46px;
    padding: 0 20px;
    font-size: 17px;
  }

  body.is-desktop-input .hint-cost.is-free {
    color: var(--river-blue-dark);
    background: #dff7ff;
    border-color: var(--river-blue);
  }

  body.is-desktop-input .intro-card,
  body.is-desktop-input .tutorial-card,
  body.is-desktop-input .score-card {
    border: 2px solid #bed1dc;
    color: var(--ink);
    background: #f8fbfc;
    box-shadow:
      0 28px 72px rgba(20, 46, 58, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.82);
  }

  body.is-desktop-input .tutorial-modal {
    padding-top: clamp(64px, 8svh, 92px);
    padding-bottom: 16px;
  }

  body.is-desktop-input .tutorial-card {
    max-height: calc(var(--app-height) - 96px);
  }

  body.is-desktop-input .tutorial-header {
    border-bottom: 2px solid rgba(120, 141, 153, 0.22);
    background: #f8fbfc;
  }

  body.is-desktop-input .tutorial-close,
  body.is-desktop-input .intro-close,
  body.is-desktop-input .score-card .score-close,
  body.is-desktop-input .tutorial-sound,
  body.is-desktop-input .intro-detail {
    border: 2px solid #bed1dc;
    color: var(--river-blue-dark);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 0 rgba(154, 178, 190, 0.34);
    font-family: var(--ui-face);
  }

  body.is-desktop-input .tutorial-start {
    color: #fff;
    background: var(--river-blue);
    box-shadow: 0 4px 0 var(--river-blue-dark);
    font-family: var(--ui-face);
  }

  body.is-desktop-input .lesson-card,
  body.is-desktop-input .intro-rule-card,
  body.is-desktop-input .tutorial-card .tutorial-flow-panel,
  body.is-desktop-input .tutorial-card .tutorial-score-panel,
  body.is-desktop-input .tutorial-card .tutorial-hints-panel,
  body.is-desktop-input .score-ledger {
    border-color: rgba(120, 141, 153, 0.24);
    background: rgba(255, 255, 255, 0.64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  }

  body.is-desktop-input .demo-clue {
    position: relative;
    z-index: 4;
  }

  body.is-desktop-input .demo-span {
    z-index: 2;
  }

  body.is-desktop-input .tutorial-scoring,
  body.is-desktop-input .tutorial-hints,
  body.is-desktop-input .player-stats,
  body.is-desktop-input .score-rule,
  body.is-desktop-input .hint-rule,
  body.is-desktop-input .score-rule + .score-rule,
  body.is-desktop-input .hint-rule + .hint-rule,
  body.is-desktop-input .score-ledger-row {
    border-color: rgba(120, 141, 153, 0.2);
  }

  body.is-desktop-input .tutorial-kicker,
  body.is-desktop-input .tutorial-card h2,
  body.is-desktop-input .tutorial-wordmark,
  body.is-desktop-input .tutorial-section-title,
  body.is-desktop-input .tutorial-flow-title,
  body.is-desktop-input .tutorial-scoring-title,
  body.is-desktop-input .score-title,
  body.is-desktop-input .score-rating-title,
  body.is-desktop-input .score-ledger-row span,
  body.is-desktop-input .score-points strong {
    color: #111;
    font-family: var(--ui-face);
  }

  body.is-desktop-input .tutorial-copy,
  body.is-desktop-input .tutorial-copy-small,
  body.is-desktop-input .intro-copy,
  body.is-desktop-input .score-rule span,
  body.is-desktop-input .hint-rule span,
  body.is-desktop-input .tutorial-author,
  body.is-desktop-input .tutorial-footer-author,
  body.is-desktop-input .score-details:not(.sr-only),
  body.is-desktop-input .score-ledger-row small,
  body.is-desktop-input .score-points span,
  body.is-desktop-input .score-share-preview {
    color: rgba(16, 16, 16, 0.76);
    font-family: var(--ui-face);
  }

  body.is-desktop-input .tutorial-card .tutorial-main {
    grid-template-columns: minmax(330px, 0.96fr) minmax(360px, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "flow score"
      "flow hints";
    align-items: stretch;
    gap: 20px 24px;
  }

  body.is-desktop-input .tutorial-demo-panel {
    min-width: 0;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel {
    grid-area: flow;
    align-content: stretch;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel > * {
    grid-area: auto;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel > .tutorial-demo-panel {
    order: 0;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel > .tutorial-flow-title {
    order: 1;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel > .tutorial-steps {
    order: 2;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel > .tutorial-flow-start {
    order: 3;
  }

  body.is-desktop-input .tutorial-card .tutorial-score-panel {
    grid-area: score;
  }

  body.is-desktop-input .tutorial-card .tutorial-hints-panel {
    grid-area: hints;
    align-content: start;
  }

  body.is-desktop-input .tutorial-demo-panel .lesson-demo {
    overflow: hidden;
    padding: 14px 18px 16px;
  }

  body.is-desktop-input .tutorial-demo-panel .align-demo {
    --demo-column-width: 78px;
    --demo-river-width: calc(var(--demo-column-width) * 0.7);
    --demo-bridge-overhang: calc(var(--demo-column-width) * 0.13);
    --demo-bridge-width: calc(var(--demo-column-width) + (var(--demo-bridge-overhang) * 2));
    --demo-row-height: 52px;
    --demo-row-gap: 9px;
    max-width: 100%;
    gap: var(--demo-row-gap);
  }

  body.is-desktop-input .tutorial-demo-panel .demo-labels {
    min-height: 17px;
    font-size: 10.8px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-row {
    min-height: var(--demo-row-height);
  }

  body.is-desktop-input .tutorial-demo-panel .demo-clue {
    min-width: 0;
    min-height: calc(var(--demo-row-height) - 2px);
    padding: 7px 8px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.05;
    white-space: normal;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-span {
    width: var(--demo-bridge-width);
    height: calc(var(--demo-row-height) * 0.6);
  }

  body.is-desktop-input .tutorial-demo-panel .demo-answer {
    font-size: 15.2px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-cursor {
    top: calc(24px + var(--demo-row-height) + var(--demo-row-gap) + (var(--demo-row-height) * 0.88) - 11px);
    left: calc(50% + (var(--demo-column-width) * 0.5) + ((100% - var(--demo-column-width)) * 0.25) - (var(--demo-column-width) * 0.3) - 11px);
    width: 22px;
    height: 22px;
  }

  body.is-desktop-input .tutorial-right-author {
    display: block;
    align-self: end;
    margin: auto 0 0;
    padding-top: 10px;
    color: rgba(16, 16, 16, 0.72);
    font-family: var(--ui-face);
    font-size: 21px;
    font-weight: 820;
    line-height: 1.1;
  }

  body.is-desktop-input .tutorial-right-author a {
    color: var(--river-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  body.is-desktop-input .tutorial-footer {
    display: none;
  }

  body.is-desktop-input .score-card::before {
    color: #101418;
  }

  body.is-desktop-input .score-ledger-row strong {
    color: #b9403d;
  }

  body.is-desktop-input .score-ledger-row.is-base strong {
    color: #111;
  }

  body.is-desktop-input .score-result {
    border: 2px solid #bed1dc;
    background: #dff7ff;
    box-shadow: none;
  }

  body.is-desktop-input .score-grade {
    color: #111;
    background: var(--brass);
    box-shadow:
      inset 0 0 0 2px #1c1f22,
      0 8px 17px rgba(36, 42, 46, 0.14);
  }

  body.is-desktop-input .score-share-preview {
    border-color: #bed1dc;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
  }

  body.is-desktop-input .share-button {
    color: #fff;
    background: var(--river-blue);
    box-shadow: 0 4px 0 var(--river-blue-dark), 0 10px 20px rgba(22, 127, 168, 0.18);
  }

  body.is-desktop-input .copy-button {
    color: var(--river-blue-dark);
    border: 2px solid #bed1dc;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 0 rgba(154, 178, 190, 0.55);
  }

  body.is-desktop-input .pause-modal::before {
    border-color: rgba(16, 17, 17, 0.86);
    background: var(--pause-tint);
  }

  body.is-desktop-input .pause-card {
    color: var(--ink);
    background: transparent;
  }

  body.is-desktop-input .pause-title {
    color: #0b1116;
    font-family: var(--ui-face);
    font-weight: 850;
  }

  body.is-desktop-input .pause-resume {
    width: min(56%, calc(300px * var(--desktop-scale)));
    min-height: calc(72px * var(--desktop-scale));
    border-radius: calc(8px * var(--desktop-scale));
    color: #fff;
    background: var(--river-blue);
    box-shadow: 0 4px 0 var(--river-blue-dark), 0 10px 20px rgba(22, 127, 168, 0.18);
    font-family: var(--ui-face);
    font-size: calc(24px * var(--desktop-scale));
    font-weight: 850;
  }
}

@media (min-width: 760px) and (max-width: 1100px) and (hover: hover) and (pointer: fine) {
  body.is-desktop-input .tutorial-demo-panel .lesson-demo {
    padding: 10px 16px 12px;
  }

  body.is-desktop-input .tutorial-demo-panel .align-demo {
    --demo-row-height: 46px;
    --demo-row-gap: 6px;
  }

  body.is-desktop-input .tutorial-demo-panel .demo-clue {
    font-size: 14px;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel .lesson-card {
    padding: 8px 0 9px;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel .lesson-card .tutorial-section-title {
    font-size: 18px;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-panel .lesson-card .tutorial-copy,
  body.is-desktop-input .tutorial-card .score-rule span,
  body.is-desktop-input .tutorial-card .hint-rule span,
  body.is-desktop-input .tutorial-card .tutorial-hints-panel > .tutorial-copy {
    font-size: 15px;
    line-height: 1.2;
  }

  body.is-desktop-input .tutorial-card .score-rule,
  body.is-desktop-input .tutorial-card .hint-rule {
    padding: 8px 0;
  }

  body.is-desktop-input .tutorial-card .tutorial-flow-start {
    min-height: 44px;
    font-size: 17px;
  }

  body.is-desktop-input .tutorial-right-author {
    padding-top: 0;
    font-size: 18.5px;
  }
}

.score-stats {
  display: grid;
  gap: 8px;
  padding: 10px 11px 11px;
  border: 1px solid rgba(101, 73, 43, 0.16);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.score-stats-title {
  margin: 0;
  color: rgba(16, 43, 49, 0.88);
  font-family: var(--ui-face);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.score-player-stats {
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

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

.score-report-stats-grid span {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 58px;
  padding: 8px 9px;
  border-color: rgba(22, 127, 168, 0.18);
  border-style: solid;
  border-width: 1px;
  border-radius: 8px;
  background: rgba(222, 247, 255, 0.7);
}

.score-report-stats-grid b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 19px;
  line-height: 0.98;
}

.score-report-stats-grid small {
  color: rgba(75, 70, 62, 0.68);
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.score-report-stats-grid span:nth-child(n + 4) {
  border-color: rgba(101, 73, 43, 0.12);
  background: rgba(255, 246, 227, 0.72);
}

.score-report-stats-grid span:nth-child(4) b {
  font-size: 16px;
}

.score-modal.is-calculating .score-stats {
  opacity: 0.48;
}

.score-modal.is-revealed .score-stats {
  animation: scoreSlipIn 420ms cubic-bezier(.16, 1, .3, 1) 80ms both;
}

@media (max-width: 759px), (pointer: coarse) {
  body:not(.is-desktop-input) .score-modal {
    --score-mobile-top: max(92px, calc(env(safe-area-inset-top) + 70px));
    --score-mobile-bottom: max(12px, env(safe-area-inset-bottom));
    place-items: start center;
    align-items: start;
    padding-top: var(--score-mobile-top);
    padding-bottom: var(--score-mobile-bottom);
    overflow: hidden;
  }

  body:not(.is-desktop-input) .score-card {
    width: min(calc(100vw - 20px), 392px);
    max-height: calc(var(--app-height) - var(--score-mobile-top) - var(--score-mobile-bottom));
    gap: 9px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.is-desktop-input) .score-stats {
    gap: 7px;
    padding: 9px 10px 10px;
    border-radius: 12px;
  }

  body:not(.is-desktop-input) .score-stats-title {
    font-size: 14.5px;
  }
}

@media (max-height: 640px) and (pointer: coarse) {
  body:not(.is-desktop-input) .score-modal {
    --score-mobile-top: max(28px, calc(env(safe-area-inset-top) + 16px));
    --score-mobile-bottom: max(4px, env(safe-area-inset-bottom));
  }

  body:not(.is-desktop-input) .score-card {
    gap: 5px;
    padding: 9px 10px 10px;
  }

  body:not(.is-desktop-input) .score-card .score-close {
    top: 7px;
    right: 7px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 16px;
  }

  body:not(.is-desktop-input) .score-card::before {
    transform: scale(0.82);
    margin-bottom: -11px;
  }

  body:not(.is-desktop-input) .score-title {
    font-size: 22px;
  }

  body:not(.is-desktop-input) .score-ledger {
    margin-top: 0;
    padding: 5px 9px;
  }

  body:not(.is-desktop-input) .score-ledger-row {
    min-height: 25px;
    padding: 3px 0;
  }

  body:not(.is-desktop-input) .score-ledger-row span {
    font-size: 11.8px;
  }

  body:not(.is-desktop-input) .score-ledger-row small {
    font-size: 9px;
  }

  body:not(.is-desktop-input) .score-ledger-row strong {
    font-size: 12.8px;
  }

  body:not(.is-desktop-input) .score-result {
    gap: 8px;
    padding: 7px 8px;
  }

  body:not(.is-desktop-input) .score-grade {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  body:not(.is-desktop-input) .score-rating-title {
    font-size: 14px;
  }

  body:not(.is-desktop-input) .score-points span {
    font-size: 10px;
  }

  body:not(.is-desktop-input) .score-points strong {
    font-size: 25px;
  }

  body:not(.is-desktop-input) .score-actions {
    gap: 6px;
  }

  body:not(.is-desktop-input) .share-button,
  body:not(.is-desktop-input) .copy-button {
    min-height: 36px;
    padding: 6px 5px;
    border-radius: 8px;
  }

  body:not(.is-desktop-input) .share-button span,
  body:not(.is-desktop-input) .copy-button span {
    font-size: 13px;
  }

  body:not(.is-desktop-input) .score-stats {
    gap: 5px;
    padding: 6px 8px 7px;
  }

  body:not(.is-desktop-input) .score-stats-title {
    font-size: 13.5px;
  }

  body:not(.is-desktop-input) .score-player-stats {
    gap: 5px;
  }

  body:not(.is-desktop-input) .score-report-stats-grid {
    gap: 5px;
  }

  body:not(.is-desktop-input) .score-report-stats-grid span {
    min-height: 42px;
    padding: 5px 6px;
  }

  body:not(.is-desktop-input) .score-report-stats-grid b {
    font-size: 16px;
  }

  body:not(.is-desktop-input) .score-report-stats-grid span:nth-child(4) b {
    font-size: 13.2px;
  }

  body:not(.is-desktop-input) .score-report-stats-grid small {
    font-size: 8.5px;
  }
}

html.is-mobile-input {
  background: #f6fbff;
}

html.is-mobile-input.has-modal,
html.is-mobile-input.has-modal body.has-modal,
html.is-mobile-input.has-modal body.has-modal .phone-shell,
html.is-mobile-input.has-modal body.has-modal .game-card {
  background: #f6fbff;
  background-color: #f6fbff;
}

html.is-mobile-input:not(.has-modal):not(.has-score-modal),
html.is-mobile-input body:not(.has-modal):not(.has-score-modal),
html.is-mobile-input body:not(.has-modal):not(.has-score-modal) .phone-shell,
html.is-mobile-input body:not(.has-modal):not(.has-score-modal) .game-card {
  background: #f6fbff;
  background-color: #f6fbff;
}

.tutorial-close,
.intro-close,
.score-card .score-close {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  padding: 0;
  text-align: center;
  line-height: 1;
}

body:not(.is-desktop-input) .game-card.is-complete-board {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
}

body:not(.is-desktop-input) .game-card.is-complete-board .board-wrap {
  align-self: stretch;
  margin-bottom: var(--mobile-section-space);
}

body:not(.is-desktop-input) .game-card.is-complete-board .answer-dock {
  align-self: stretch;
}

body:not(.is-desktop-input) .keyboard-panel {
  --keyboard-gap: clamp(3px, 1vw, 5px);
  --keyboard-key: clamp(
    26px,
    calc((var(--visible-width, 100vw) - (2 * clamp(14px, 3.7vw, 22px)) - (9 * var(--keyboard-gap))) / 10),
    38px
  );
  --keyboard-delete-key: clamp(40px, 12.7vw, 52px);
  gap: var(--keyboard-gap);
  justify-items: center;
  overflow: visible;
}

body:not(.is-desktop-input) .keyboard-row {
  width: 100%;
  display: grid;
  justify-content: center;
  gap: var(--keyboard-gap);
}

body:not(.is-desktop-input) .keyboard-row:nth-child(1) {
  grid-template-columns: repeat(10, var(--keyboard-key));
}

body:not(.is-desktop-input) .keyboard-row:nth-child(2) {
  grid-template-columns: repeat(9, var(--keyboard-key));
}

body:not(.is-desktop-input) .keyboard-row:nth-child(3) {
  grid-template-columns: var(--keyboard-delete-key) repeat(7, var(--keyboard-key)) var(--keyboard-delete-key);
}

body:not(.is-desktop-input) .key-button,
body:not(.is-desktop-input) .key-button.is-wide,
body:not(.is-desktop-input) .key-button.is-delete {
  width: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}

body:not(.is-desktop-input) .delete-icon {
  width: clamp(22px, 7vw, 28px);
  height: auto;
  display: block;
  justify-self: center;
  align-self: center;
}

@media (max-width: 759px), (pointer: coarse) {
  body:not(.is-desktop-input) .score-modal {
    --score-mobile-top: max(52px, calc(env(safe-area-inset-top) + 18px));
    --score-mobile-bottom: max(12px, env(safe-area-inset-bottom));
    padding-top: var(--score-mobile-top);
    padding-bottom: var(--score-mobile-bottom);
  }

  body:not(.is-desktop-input) .score-card {
    max-height: calc(min(var(--visible-height), var(--app-height)) - var(--score-mobile-top) - var(--score-mobile-bottom));
  }

  body:not(.is-desktop-input) .intro-modal {
    --intro-mobile-top: max(34px, calc(env(safe-area-inset-top) + 8px));
    --intro-mobile-bottom: max(12px, env(safe-area-inset-bottom));
    place-items: start center;
    align-items: start;
    padding-top: var(--intro-mobile-top);
    padding-right: 14px;
    padding-bottom: var(--intro-mobile-bottom);
    padding-left: 14px;
    overflow: hidden;
  }

  body:not(.is-desktop-input) .intro-card {
    width: min(100%, 392px);
    max-height: calc(min(var(--visible-height), var(--app-height)) - var(--intro-mobile-top) - var(--intro-mobile-bottom));
    padding-bottom: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.is-desktop-input) .intro-card .intro-actions {
    position: static;
    inset: auto;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    margin-top: 2px;
    padding-top: 0;
    background: none;
  }

  body:not(.is-desktop-input) .intro-card .align-demo,
  body:not(.is-desktop-input) .tutorial-card .align-demo {
    --demo-column-width: clamp(64px, 17.6vw, 72px);
    --demo-river-width: calc(var(--demo-column-width) * 0.68);
    --demo-bridge-overhang: clamp(7px, 2.1vw, 9px);
    --demo-bridge-width: calc(var(--demo-column-width) + (var(--demo-bridge-overhang) * 2));
    --demo-row-height: clamp(42px, 11.4vw, 48px);
    --demo-row-gap: 5px;
    --demo-shift: calc(-1 * (var(--demo-row-height) + var(--demo-row-gap)));
    padding: 2px 4px 3px;
  }

  body:not(.is-desktop-input) .intro-card .demo-row,
  body:not(.is-desktop-input) .tutorial-card .demo-row {
    grid-template-columns: minmax(0, 1fr) var(--demo-column-width) minmax(0, 1fr);
    min-height: var(--demo-row-height);
  }

  body:not(.is-desktop-input) .intro-card .demo-clue,
  body:not(.is-desktop-input) .tutorial-card .demo-clue {
    min-width: 0;
    max-width: 100%;
    min-height: calc(var(--demo-row-height) - 2px);
    padding: 5px 7px;
    font-size: clamp(11.2px, 3.05vw, 12.6px);
    line-height: 1.04;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  body:not(.is-desktop-input) .intro-card .demo-left,
  body:not(.is-desktop-input) .tutorial-card .demo-left {
    padding-right: calc(9px + var(--demo-bridge-overhang));
  }

  body:not(.is-desktop-input) .intro-card .demo-right,
  body:not(.is-desktop-input) .tutorial-card .demo-right {
    padding-left: calc(9px + var(--demo-bridge-overhang));
  }

  body:not(.is-desktop-input) .intro-card .demo-span,
  body:not(.is-desktop-input) .tutorial-card .demo-span {
    width: var(--demo-bridge-width);
    height: calc(var(--demo-row-height) * 0.58);
    min-height: 0;
  }

  body:not(.is-desktop-input) .intro-card .demo-answer,
  body:not(.is-desktop-input) .tutorial-card .demo-answer {
    font-size: clamp(12px, 3.25vw, 13px);
  }
}

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

  .demo-moving,
  .demo-swap-out,
  .demo-target,
  .demo-answer,
  .demo-answer span,
  .demo-target-span,
  .demo-target-span::after,
  .demo-source-span,
  .demo-target-span .demo-blank,
  .demo-target-span .demo-blank::after,
  .demo-target-span .demo-bridge-shape-path,
  .demo-source-span .demo-bridge-shape-path,
  .demo-marked-letter::before,
  .demo-cursor {
    animation: none !important;
  }

  .demo-target-span .demo-blank {
    opacity: 0;
  }

  .demo-answer span {
    opacity: 1;
    transform: none;
  }
}
