/* Generated from design/styles/games.css. */
/* Puzzle-specific layout and geometry. */
@media (prefers-reduced-motion:no-preference) {
  @keyframes route-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}
[data-rush] .rot-counter:empty {
  display: none;
}
.rot-main h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-24);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-1-2);
  overflow-wrap: anywhere;
}
.rot-counter {
  color: var(--muted);
}
.rot-feedback {
  margin: var(--space-4) 0;
  color: var(--ink);
  line-height: var(--leading-1-5);
}
.rot-feedback p {
  margin: 0 0 var(--space-2);
}
.rot-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.rot-actions button {
  --rot-actions-flex: 144px;
  width: auto;
  flex: 1 1 var(--rot-actions-flex);
}
.rot-actions .secondary {
  margin: 0;
}
.rot-actions .primary:disabled {
  cursor: default;
}
.rot-map {
  width: 100%;
  border: var(--stroke-1) solid var(--line);
  display: block;
  touch-action: pan-y;
}
.rot-map.rot-picking {
  touch-action: none;
  aspect-ratio: 2;
}
.rot-map.rot-reviewing {
  touch-action: none;
  aspect-ratio: 2;
}
.rot-map-editor {
  min-width: 0;
}
.rot-map-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.rot-map-tools button {
  width: auto;
  min-height: var(--control-size);
  margin: 0;
}
.rot-map-dialog {
  --rot-map-dialog-width: 1000px;
  --rot-map-dialog-max-height: 100dvh;
  width: min(var(--rot-map-dialog-width), calc(100% - var(--space-8)));
  max-width: none;
  max-height: calc(var(--rot-map-dialog-max-height) - var(--space-8));
  padding: var(--space-4);
}
.rot-map-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.rot-map-dialog-heading h2 {
  margin: 0;
  font-size: var(--font-size-18);
}
.rot-map-dialog-heading button {
  width: auto;
  margin: 0;
  min-height: var(--control-size);
}
.rot-map-dialog :is(h2, .rot-coordinate) {
  background: var(--paper);
}
.rot-map-dialog :is(.rot-picking, .rot-reviewing) {
  --rot-reviewing-height-min: 240px;
  --rot-reviewing-height-fluid: 55dvh;
  --rot-reviewing-height-max: 560px;
  height: clamp(var(--rot-reviewing-height-min), var(--rot-reviewing-height-fluid), var(--rot-reviewing-height-max));
  aspect-ratio: auto;
}
:is(.rot-picking, .rot-reviewing) :is(.rot-land, .rot-pin) {
  vector-effect: non-scaling-stroke;
}
.rot-map:focus-visible {
  outline: var(--stroke-2) solid var(--focus-quiet);
  outline-offset: var(--stroke-3);
}
.rot-land {
  stroke-width: 0.33;
}
.rot-pin {
  stroke-width: 1;
}
.rot-zoomed .rot-land {
  vector-effect: non-scaling-stroke;
}
.rot-zoomed .rot-pin {
  vector-effect: non-scaling-stroke;
}
.rot-connector {
  vector-effect: non-scaling-stroke;
}
.rot-zoomed .rot-land {
  stroke-width: 0.7;
}
.rot-zoomed .rot-pin.guess {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}
.rot-connector {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 0 7;
  stroke-linecap: round;
}
.rot-coordinate {
  margin: var(--space-2) 0 0;
  min-height: var(--space-6);
  line-height: var(--leading-1-5);
  color: var(--muted);
}
.rot-timeline {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
  margin: 0;
}
.rot-event {
  display: grid;
  grid-template-columns: var(--space-14) minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  padding: var(--space-3) var(--space-4);
  background: var(--panel);
  border-radius: var(--radius-control-compact);
  line-height: var(--leading-1-5);
}
.rot-event time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rot-year-event {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-18);
  line-height: var(--leading-1-4);
}
.rot-slot {
  width: 100%;
  min-height: var(--control-size-compact);
  padding: var(--space-2) var(--space-4);
}
.rot-chain {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}
.rot-chain li {
  padding: var(--space-2) var(--space-3);
  border: var(--stroke-1) solid var(--line);
  border-radius: var(--radius-control-compact);
  line-height: var(--leading-1-4);
}
.rot-search-label {
  display: block;
  margin: var(--space-4) 0 var(--space-2);
}
.country-search {
  width: 100%;
  min-height: var(--control-size);
  padding: var(--space-2) var(--space-3);
}
.rot-choices {
  margin-top: var(--space-2);
}
.rot-choices p {
  color: var(--muted);
  grid-column: 1 / -1;
}
.rot-copy {
  --rot-copy-min-height: 100px;
  display: block;
  width: 100%;
  min-height: var(--rot-copy-min-height);
  margin-top: var(--space-2);
}
.extra-metric {
  margin: 0 0 var(--space-4);
  color: var(--muted);
}
.extra-form {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.extra-form label {
  color: var(--ink);
  background: var(--paper);
}
.extra-form .primary {
  text-align: center;
}
.ladder-chain li {
  letter-spacing: var(--tracking-event);
}
/* A finished word ladder: each word is a rung of letter tiles between rails. */
.ladder-climb {
  --ladder-climb-face: var(--candy-blue);
  --ladder-climb-rail: var(--space-1);
  display: grid;
  gap: var(--space-2);
  width: max-content;
  max-width: 100%;
  margin: var(--space-4) 0;
  padding: var(--space-2) var(--space-3);
  border-inline: var(--ladder-climb-rail) solid var(--line-strong);
  border-radius: var(--radius-tag);
  list-style: none;
}
.ladder-climb[data-route="solved"] {
  --ladder-climb-face: var(--candy-green);
}
.ladder-rung {
  position: relative;
  display: flex;
  gap: var(--space-1);
}
.ladder-rung-bar {
  position: absolute;
  top: 50%;
  left: calc(-1 * var(--space-3));
  right: calc(-1 * var(--space-3));
  height: var(--ladder-climb-rail);
  translate: 0 -50%;
  background: var(--line-strong);
}
.ladder-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--space-10);
  height: var(--space-10);
  border: var(--stroke-1) solid var(--line);
  border-radius: var(--radius-control-compact);
  background: var(--well);
  color: var(--ink);
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-black);
}
.ladder-tile.is-changed {
  border-color: var(--ladder-climb-face);
  background: var(--ladder-climb-face);
}
/* The replaced letter, on the back of a changed tile while it turns over. */
.ladder-tile-back {
  position: absolute;
  inset: calc(-1 * var(--stroke-1));
  display: grid;
  place-items: center;
  border: var(--stroke-1) solid var(--line);
  border-radius: inherit;
  background: var(--well);
  visibility: hidden;
}
/* The answer to a Clues puzzle, with a pip for every clue. */
.clue-pips {
  --clue-pips-face: var(--candy-blue);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.clue-pips[data-route="solved"] {
  --clue-pips-face: var(--candy-green);
}
.clue-pip {
  width: var(--space-3);
  height: var(--space-3);
  border: var(--stroke-2) solid var(--line-strong);
  border-radius: var(--radius-pill);
}
.clue-pip.is-read {
  border-color: var(--clue-pips-face);
  background: var(--clue-pips-face);
}
.clue-answer {
  --clue-answer-face: var(--candy-blue);
  position: relative;
  margin: var(--space-4) 0;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-panel);
  background: var(--clue-answer-face);
  color: var(--ink);
  text-align: center;
}
.clue-answer[data-route="solved"] {
  --clue-answer-face: var(--candy-green);
}
.clue-answer-text {
  margin: 0;
  font-size: var(--font-size-32);
  font-weight: var(--font-weight-black);
  line-height: var(--leading-1-2);
  overflow-wrap: anywhere;
}
.clue-answer-back {
  position: absolute;
  inset: 0;
  border: var(--stroke-2) solid var(--line-strong);
  border-radius: inherit;
  background: var(--well);
  visibility: hidden;
}
.clue-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-left: var(--space-6);
}
.clue-list li {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control-compact);
  line-height: var(--leading-1-5);
}
.border-map {
  position: relative;
  contain: paint;
  margin-bottom: var(--space-3);
}
.border-marker {
  pointer-events: none;
  position: absolute;
  width: var(--space-2);
  height: var(--space-2);
  border: var(--stroke-1) solid var(--map-marker-edge);
  border-radius: var(--radius-round);
  background: var(--map-marker-fill);
  transform: translate(-50%, -50%);
}
/* An answered route: one line from country to country over the map. */
.border-route-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.border-route {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 0 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.round-verdict-row + .border-map {
  margin-top: var(--space-3);
}
.border-map[data-route="shown"] .border-map-label {
  background: var(--candy-blue);
  border-color: var(--ink);
}
.rot-chain[data-route] li {
  --rot-chain-face: var(--candy-blue);
  background: var(--rot-chain-face);
  border-color: var(--rot-chain-face);
  color: var(--ink);
  font-weight: var(--font-weight-bold);
}
.rot-chain[data-route="solved"] li {
  --rot-chain-face: var(--candy-green);
}
.rot-chain-label {
  margin: var(--space-4) 0 var(--space-2);
  color: var(--muted);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-bold);
}
.border-selectable {
  cursor: pointer;
}
.border-destination {
  background: var(--accent);
}
.border-map-label {
  --border-map-label-left: 11px;
  --border-map-label-max-width: 108px;
  --border-map-label-border-radius: 5px;
  position: absolute;
  z-index: var(--layer-base);
  top: 50%;
  left: var(--border-map-label-left);
  transform: translateY(-50%);
  padding: var(--space-1) var(--space-2);
  width: max-content;
  max-width: var(--border-map-label-max-width);
  overflow-wrap: anywhere;
  border: var(--stroke-1) solid var(--success);
  border-radius: var(--border-map-label-border-radius);
  font-size: var(--font-size-12);
}
.border-label-left .border-map-label {
  --border-map-label-right: 11px;
  left: auto;
  right: var(--border-map-label-right);
}
.practice-settings {
  margin: 0 0 var(--space-4);
  padding: 0;
}
.practice-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.practice-settings label {
  color: var(--ink);
  font-weight: var(--font-weight-bold);
}
.practice-settings select {
  --practice-settings-min-width: 136px;
  min-width: var(--practice-settings-min-width);
  min-height: var(--control-size);
  padding: var(--space-2) var(--space-8) var(--space-2) var(--space-3);
}
.practice-settings p {
  --practice-settings-margin: 10px;
  margin: var(--practice-settings-margin) 0 0;
  color: var(--muted);
  line-height: var(--leading-1-5);
}
.solution-label {
  font-weight: var(--font-weight-bold);
  color: var(--muted);
  margin: var(--space-6) 0 var(--space-3);
}
.solution-review {
  margin: var(--space-6) 0;
  border-block: var(--stroke-1) solid var(--line);
}
.solution-review summary {
  min-height: var(--control-size-large);
  padding: var(--space-4) 0;
  cursor: pointer;
}
.solution-review summary:focus-visible {
  outline: var(--stroke-2) solid var(--ink);
  outline-offset: var(--stroke-3);
}
.solution-review .ladder-chain {
  margin-top: var(--space-2);
}
.rot-review {
  margin: var(--space-6) 0;
}
.rot-review > h3 {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-2);
}
.rot-recap {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rot-recap > li {
  border-bottom: var(--stroke-1) solid var(--line);
}
.rot-recap summary {
  cursor: pointer;
  min-height: var(--control-size-large);
  padding: var(--space-4) var(--space-2);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: baseline;
}
.rot-recap summary::marker {
  content: "";
}
.rot-recap summary:focus-visible {
  outline: var(--stroke-2) solid var(--ink);
  outline-offset: var(--stroke-4);
}
.rot-recap summary > span:first-child {
  overflow-wrap: anywhere;
}
.rot-recap-score {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rot-recap details[open] > summary {
  color: var(--ink);
}
.rot-recap details:not([open]) > summary > span:first-child {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: var(--space-1);
}
.rot-recap-detail {
  padding: var(--space-2) var(--space-2) var(--space-4);
}
.rot-actions .reveal-answer {
  flex: 0 1 auto;
  width: auto;
  min-height: var(--control-size);
  padding: var(--space-2) var(--space-3);
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}
.rot-actions .reveal-answer:hover {
  background: var(--panel);
  color: var(--ink);
}
.solution-label {
  font-size: var(--font-size-14);
}
.rot-map.rot-picking {
  cursor: crosshair;
}
.rot-map.rot-reviewing {
  cursor: grab;
}
.rot-country-outline {
  fill: none;
  stroke: var(--line);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}
.rot-map-surface {
  position: relative;
}
.rot-map-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.rot-country-label {
  --rot-country-label-padding-min: 1px;
  --rot-country-label-padding-fluid: 3px;
  --rot-country-label-border-radius: 2px;
  position: absolute;
  font-size: var(--font-size-12);
  line-height: var(--leading-1-2);
  background: var(--panel);
  padding: var(--rot-country-label-padding-min) var(--rot-country-label-padding-fluid);
  border-radius: var(--rot-country-label-border-radius);
  white-space: nowrap;
}
.rot-city-label {
  --rot-city-label-padding-min: 1px;
  --rot-city-label-padding-fluid: 3px;
  --rot-city-label-border-radius: 2px;
  position: absolute;
  font-size: var(--font-size-12);
  line-height: var(--leading-1-2);
  background: var(--success-surface);
  padding: var(--rot-city-label-padding-min) var(--rot-city-label-padding-fluid);
  border-radius: var(--rot-city-label-border-radius);
}
.rot-country-label {
  color: var(--muted);
  transform: translate(-50%, -50%);
}
.rot-city-label {
  color: var(--success-ink);
  font-weight: var(--font-weight-bold);
  max-width: calc(100% - var(--space-4));
  white-space: normal;
}
.visual-figure {
  margin: 0 0 var(--space-4);
}
:root:not([data-daily-feed]) body[data-game=zoomrot] > .main {
  --board-closeup-max-width: 448px;
  max-width: var(--board-closeup-max-width);
}
body[data-game=zoomrot] #quiz > .visual-reveal {
  margin: var(--space-2) 0;
  padding: var(--space-2) 0;
}
/* City photos and their choices share one column at every puzzle view. */
:root:not([data-daily-feed]) body:is([data-game=skyrot], [data-game=skylinerot]) > .main {
  max-width: var(--layout-city-photo);
}
:root:not([data-rush]) body:is([data-game=skyrot], [data-game=skylinerot]) #quiz > .visual-reveal {
  margin: var(--space-2) 0;
  padding: var(--space-2) 0;
}
:root:not([data-rush]) .visual-viewport:is([data-kind=skyrot], [data-kind=skylinerot]) {
  aspect-ratio: 16 / 10;
}
/* A result can resize its iframe, so its height must not change the clue's position. */
:root[data-daily-feed]:not([data-rush]) body:is([data-game=skyrot], [data-game=skylinerot]) .heading {
  margin-bottom: var(--space-4);
}
.visual-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: var(--stroke-1) solid var(--line);
}
.visual-viewport img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.price-product { --price-product-height: 192px; --price-product-standalone-height: 248px; --price-product-short-height: 96px; --price-product-photo-width: 112px; display: grid; grid-template-columns: minmax(0, 1fr) var(--price-product-photo-width); align-items: center; gap: var(--space-4); min-height: var(--price-product-height); }
.price-description h2 { font-size: var(--font-size-18); margin: 0 0 var(--space-2); }
.price-description p { margin: 0; color: var(--muted); font-size: var(--font-size-13); }
.price-product .visual-figure { margin: 0; }
.price-product .visual-viewport { height: var(--price-product-height); aspect-ratio: auto; background: transparent; border: 0; }
.price-product .visual-viewport img { object-fit: contain; }
@media (max-width: 700px) { .price-product { --price-product-height: 144px; } }

/* Keep Daily/Rush's compact product layout; group standalone product evidence. */
:root:not([data-daily-feed]) body[data-game=pricerot] #quiz {
  display: grid;
  align-content: start;
  gap: var(--space-6);
}
:root:not([data-daily-feed]) .price-product {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "photo description";
  min-height: 0;
  gap: var(--space-6);
  padding: var(--space-6);
  border: var(--stroke-1) solid var(--line-quiet);
  border-radius: var(--radius-piece-large);
  background: var(--well);
}
:root:not([data-daily-feed]) .price-description { grid-area: description; }
:root:not([data-daily-feed]) .price-description h2 { font-size: var(--font-size-24); }
:root:not([data-daily-feed]) .price-description .price-retailer { margin-top: var(--space-4); }
:root:not([data-daily-feed]) .price-description .price-size { margin-top: var(--space-1); }
:root:not([data-daily-feed]) .price-product .visual-figure { grid-area: photo; }
:root:not([data-daily-feed]) .price-product .visual-viewport { height: var(--price-product-standalone-height); }
:root:not([data-daily-feed]) body[data-game=pricerot] .visual-reveal-actions { margin: 0; }
@media (max-width: 700px) {
  :root:not([data-daily-feed]) body[data-game=pricerot] #quiz { gap: var(--space-4); }
  :root:not([data-daily-feed]) .price-product {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "description";
    gap: var(--space-4);
    padding: var(--space-4);
    text-align: center;
  }
  :root:not([data-daily-feed]) .price-description h2 { font-size: var(--font-size-18); }
  :root:not([data-daily-feed]) .price-description .price-retailer { margin-top: var(--space-2); }
  :root:not([data-daily-feed]) .price-product .visual-viewport { height: var(--price-product-height); }
}

.visual-viewport[data-zoom="0"] img {
  transform: scale(2.5);
}
.visual-viewport[data-zoom="1"] img {
  transform: scale(1.6);
}
.visual-viewport[data-kind=zoomrot][data-zoom="0"] img {
  transform: scale(4);
}
.visual-viewport[data-kind=zoomrot][data-zoom="1"] img {
  transform: scale(2.2);
}
.visual-reveal .visual-choices {
  margin: var(--space-4) 0;
}
/* The answer stamped onto the photo, like a place name on a postcard. */
.photo-answer-tag {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  z-index: var(--layer-base);
  max-width: calc(100% - var(--space-6));
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-control-compact);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-drop);
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-black);
  letter-spacing: var(--tracking-label);
  line-height: var(--leading-1-2);
  rotate: -3deg;
  transform-origin: left bottom;
  overflow-wrap: anywhere;
}
/* Close-up photos sit on white, so their tag is dark. */
.visual-viewport[data-kind=zoomrot] .photo-answer-tag {
  background: var(--paper);
  color: var(--ink);
}
.visual-figure figcaption {
  color: var(--muted);
  margin-top: var(--space-2);
  line-height: var(--leading-1-5);
}
.visual-note {
  color: var(--muted);
  line-height: var(--leading-1-6);
  margin: 0 0 var(--space-4);
}
.visual-choice:disabled {
  cursor: default;
}
.visual-choice:disabled:not(.correct, .wrong, .is-answer) {
  opacity: var(--opacity-secondary);
}
.visual-order {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
  counter-reset: order;
  margin: var(--space-4) 0;
}
.visual-order li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  counter-increment: order;
  background: var(--well);
  border: var(--stroke-1) solid var(--line);
  border-left: var(--space-1) solid var(--accent);
  border-radius: var(--radius-action);
}
.visual-order li::before {
  content: counter(order);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  width: var(--space-5);
}
.visual-order li span {
  flex: 1;
  line-height: var(--leading-1-5);
  overflow-wrap: anywhere;
}
.visual-order button {
  width: var(--space-14);
  flex: 0 0 var(--space-14);
  min-height: var(--control-size);
  padding: var(--space-2);
  margin: 0;
}
.visual-order button:disabled {
  cursor: default;
}
.visual-reveal {
  margin: var(--space-4) 0;
  line-height: var(--leading-1-6);
}
.visual-reveal h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-bold);
}
.visual-reveal p {
  margin: var(--space-2) 0;
}
.visual-source {
  color: var(--muted);
  font-size: var(--font-size-12);
  overflow-wrap: anywhere;
}
.visual-source summary {
  cursor: pointer;
  min-height: var(--space-9);
  padding: var(--space-2) 0;
}
.visual-source a {
  display: inline-block;
  padding: var(--space-2) 0;
}
/* Ordering result: the cards in the right order, each with its real value. */
.order-reveal {
  display: grid;
  gap: var(--space-2);
  grid-auto-rows: 1fr;
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
  counter-reset: order-reveal;
}
.order-reveal-card {
  --order-reveal-card-tone: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  counter-increment: order-reveal;
  background: var(--well);
  border: var(--stroke-1) solid var(--line);
  border-left: var(--space-1) solid var(--order-reveal-card-tone);
  border-radius: var(--radius-action);
}
.order-reveal-card[data-placed="right"] { --order-reveal-card-tone: var(--success); }
.order-reveal-card[data-placed="wrong"] { --order-reveal-card-tone: var(--error); }
.order-reveal-card::before {
  content: counter(order-reveal);
  flex: none;
  width: var(--space-5);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.order-reveal-body {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: var(--space-1);
}
.order-reveal-name {
  line-height: var(--leading-1-4);
  overflow-wrap: anywhere;
}
.order-reveal-value {
  color: var(--muted);
  font-size: var(--font-size-13);
  font-variant-numeric: tabular-nums;
}
.order-reveal-bar {
  display: block;
  height: var(--space-2);
  margin-top: var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--line-quiet);
  overflow: hidden;
}
.order-reveal-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--order-reveal-card-tone);
  transform-origin: left center;
}
.order-reveal-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--space-20);
  height: var(--space-7);
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--candy-red);
  color: var(--error-ink);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-black);
  white-space: nowrap;
}
.order-reveal-card[data-placed="right"] .order-reveal-chip {
  background: var(--candy-green);
  color: var(--success-ink);
}
.visual-recap {
  margin: var(--space-6) 0;
  padding: 0;
  list-style: none;
}
.visual-recap > li {
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: var(--stroke-1) solid var(--line);
}
.visual-image-error {
  padding: var(--space-6);
  line-height: var(--leading-1-6);
}
@media (max-width: 480px) {
  .visual-viewport {
    position: relative;
    aspect-ratio: 4 / 3;
  }
}
@media (max-width: 480px) {
  .visual-order li {
    padding: var(--space-2);
  }
}
.visual-viewport[data-kind=zoomrot] {
  background: var(--route-ink-light);
}
.visual-viewport:has(.visual-image-error) {
  background: var(--well);
}
.visual-viewport[data-kind=zoomrot] img {
  object-fit: contain;
}
.visual-hint {
  align-items: center;
  text-align: left;
}
.visual-hint-cost {
  flex-shrink: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: var(--font-size-12);
}
@media (max-width: 360px) {
  .visual-hint {
    flex-wrap: wrap;
  }
}
.visual-attempt-feedback:empty {
  display: none;
}
.visual-attempt-feedback {
  margin: 0 0 var(--space-4);
}
.visual-hint {
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-3);
  min-height: var(--control-size);
}
.visual-hint:hover > :first-child {
  text-decoration: underline;
}
.visual-reveal-actions {
  margin-top: var(--space-6);
  justify-content: flex-start;
}
.visual-recap > li {
  display: block;
  padding: 0;
}
.visual-recap summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-2);
  min-height: var(--control-size);
  cursor: pointer;
  line-height: var(--leading-1-5);
}
.visual-recap summary:hover {
  background: var(--panel);
}
.visual-recap summary:focus-visible {
  outline: var(--stroke-2) solid var(--ink);
  outline-offset: var(--stroke-2);
}
.visual-recap summary > span:last-child {
  flex: none;
  white-space: nowrap;
  color: var(--muted);
}
.visual-recap .visual-reveal {
  border: 0;
  margin-top: 0;
}
#quiz > h3 {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-bold);
  margin: var(--space-6) 0 var(--space-2);
}
.review-photo {
  --review-photo-width: 320px;
  --review-photo-max-height: 200px;
  display: block;
  width: min(100%, var(--review-photo-width));
  max-height: var(--review-photo-max-height);
  object-fit: contain;
  object-position: left center;
  margin: var(--space-2) 0;
  border-radius: var(--radius-tag);
}
#quiz > .rot-actions:has(.primary) {
  margin: var(--space-4) 0;
}
.visual-reveal {
  padding: var(--space-4) 0;
  border: 0;
  border-top: var(--stroke-1) solid var(--line);
  border-radius: 0;
  background: transparent;
}
.visual-recap .visual-reveal {
  padding: 0 var(--space-2) var(--space-4);
}
/* The real price hangs above the line; the guess points up from below. */
.price-ruler {
  --price-ruler-tag-height: 44px;
  --price-ruler-rail-height: 14px;
  --price-ruler-notch: 7px;
  --price-ruler-inset: var(--space-5);
  --price-ruler-rail-top: calc(var(--price-ruler-tag-height) + var(--space-5));
  --price-ruler-pin-height: var(--space-9);
  --price-ruler-tone: var(--candy-red);
  --price-ruler-tone-ink: var(--error-ink);
  position: relative;
  height: calc(
    var(--price-ruler-rail-top) + var(--price-ruler-rail-height) +
      var(--space-3) + var(--price-ruler-pin-height)
  );
  margin: var(--space-6) 0 var(--space-4);
}
.price-ruler[data-tone="hit"] {
  --price-ruler-tone: var(--candy-green);
  --price-ruler-tone-ink: var(--success-ink);
}
.price-ruler[data-tone="near"] {
  --price-ruler-tone: var(--accent);
  --price-ruler-tone-ink: var(--action-ink);
}
.price-ruler[data-tone="plain"] {
  height: calc(var(--price-ruler-rail-top) + var(--price-ruler-rail-height));
}
.price-ruler-rail {
  position: absolute;
  inset-inline: 0;
  top: var(--price-ruler-rail-top);
  height: var(--price-ruler-rail-height);
  border-radius: var(--radius-pill);
  background: var(--well);
  box-shadow:
    inset 0 var(--stroke-3) 0 var(--plate-lip),
    0 0 0 var(--stroke-1) var(--line-quiet);
}
.price-ruler-scale {
  position: absolute;
  inset-block: 0;
  inset-inline: var(--price-ruler-inset);
}
.price-ruler-trail {
  position: absolute;
  top: calc(
    var(--price-ruler-rail-top) +
      (var(--price-ruler-rail-height) - var(--stroke-4)) / 2
  );
  height: var(--stroke-4);
  border-radius: var(--radius-pill);
  background: var(--price-ruler-tone);
  transform-origin: left center;
}
.price-ruler-trail[data-toward="start"] {
  transform-origin: right center;
}
.price-ruler-zone {
  position: absolute;
  top: var(--price-ruler-rail-top);
  height: var(--price-ruler-rail-height);
  border-radius: var(--radius-pill);
  background: var(--candy-green);
  box-shadow:
    var(--shadow-gloss),
    0 0 0 var(--stroke-2) var(--success);
}
.price-ruler-tick {
  position: absolute;
  top: calc(var(--price-ruler-rail-top) - var(--space-1));
  width: var(--stroke-3);
  height: calc(var(--price-ruler-rail-height) + var(--space-2));
  translate: -50% 0;
  border-radius: var(--radius-pill);
  background: var(--ink);
}
.price-ruler-tag,
.price-ruler-pin {
  position: absolute;
  top: 0;
  width: 0;
  display: flex;
  justify-content: center;
}
.price-ruler-pin {
  top: calc(
    var(--price-ruler-rail-top) + var(--price-ruler-rail-height) +
      var(--space-3)
  );
}
:is(.price-ruler-tag, .price-ruler-pin)[data-anchor="start"] {
  justify-content: flex-start;
}
:is(.price-ruler-tag, .price-ruler-pin)[data-anchor="end"] {
  justify-content: flex-end;
}
.price-ruler :is(.price-ruler-tag-face, .price-ruler-pin-face) {
  --price-ruler-notch-left: 50%;
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-weight: var(--font-weight-black);
  font-variant-numeric: tabular-nums;
}
.price-ruler
  [data-anchor="start"]
  > :is(.price-ruler-tag-face, .price-ruler-pin-face) {
  --price-ruler-notch-left: var(--price-ruler-inset);
  margin-left: calc(var(--price-ruler-inset) * -1);
}
.price-ruler
  [data-anchor="end"]
  > :is(.price-ruler-tag-face, .price-ruler-pin-face) {
  --price-ruler-notch-left: calc(100% - var(--price-ruler-inset));
  margin-right: calc(var(--price-ruler-inset) * -1);
}
.price-ruler-tag-face {
  height: var(--price-ruler-tag-height);
  padding: 0 var(--space-3);
  border-radius: var(--radius-control-compact);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-drop);
  font-size: var(--font-size-24);
  letter-spacing: var(--tracking-brand);
  transform-origin: var(--price-ruler-notch-left) 0;
}
.price-ruler-tag-face::after,
.price-ruler-pin-face::before {
  content: "";
  position: absolute;
  left: var(--price-ruler-notch-left);
  translate: -50% 0;
  border: var(--price-ruler-notch) solid transparent;
}
.price-ruler-tag-face::after {
  top: 100%;
  border-bottom: 0;
  border-top-color: var(--ink);
}
.price-ruler-pin-face {
  gap: var(--space-1);
  height: var(--price-ruler-pin-height);
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--price-ruler-tone);
  color: var(--price-ruler-tone-ink);
  font-size: var(--font-size-16);
}
.price-ruler-pin-face::before {
  bottom: 100%;
  border-top: 0;
  border-bottom-color: var(--price-ruler-tone);
}
.price-ruler-pin-label { font-weight: var(--font-weight-body); }
#quiz .result>.primary {
  margin-top: var(--space-2);
}
.capital-country {
  text-align: center;
}
.vocabulary-word, .capital-country {
  font-size: var(--font-size-24);
  font-weight: var(--font-weight-bold);
  margin: 0;
  overflow-wrap: anywhere;
}
.rot-counter {
  background: transparent;
}
.extra-metric {
  background: transparent;
}
.visual-viewport {
  background: var(--well);
  border-color: var(--line);
  border-radius: var(--radius-panel);
}
.visual-reveal {
  border-color: var(--line);
}
.rot-feedback {
  border-color: var(--line);
  background: transparent;
}
.visual-order li:nth-child(2n) {
  border-left-color: var(--order-alternate);
}
.visual-hint {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}
.clue-list li {
  background: var(--well);
  border-color: var(--line);
}
.rot-chain li {
  background: var(--well);
  border-color: var(--line);
}
.rot-map {
  background: var(--well);
  border-color: var(--line);
  border-radius: var(--radius-piece-large);
}
.rot-land {
  fill: var(--map-land);
  stroke: var(--map-shore);
}
.rot-pin {
  stroke: var(--well);
}
.rot-pin.guess {
  fill: var(--accent);
}
.rot-pin.answer {
  fill: var(--success);
  stroke: var(--ink);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
}
.city-distance-count {
  position: absolute;
  z-index: var(--layer-base);
  translate: -50% calc(-100% - var(--space-3));
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--action-ink);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-black);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.rot-distance-ring {
  --rot-distance-ring-stroke-width: 1.5px;
  fill: none;
  stroke: var(--accent);
  stroke-opacity: var(--opacity-map-ring);
  stroke-width: var(--rot-distance-ring-stroke-width);
  vector-effect: non-scaling-stroke;
}
.border-map-label {
  background: var(--success-surface);
  border-color: var(--success);
  color: var(--success-ink);
}
[data-rush] .visual-viewport {
  width: 100%;
}
body[data-game=yearrot] .main {
  max-width: var(--layout-playfield);
}
/* Text-led puzzle fields use the shared type scale. */
.extra-metric {
  line-height: normal;
}
/* Each answer sits in its chronological gap between the dated clues. */
.timeline-playfield {
  padding: var(--space-2) 0;
}
.timeline-playfield .rot-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  list-style: none;
}
.timeline-playfield .rot-event {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--well);
  border: var(--stroke-1) solid var(--line);
  border-radius: var(--radius-piece-large);
}
.timeline-playfield .rot-event time {
  font-size: var(--font-size-18);
  color: var(--focus);
}
.timeline-choices .rot-event {
  display: grid;
  grid-template-columns: var(--space-14) minmax(0, 1fr);
  align-items: start;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-control-compact);
  font-size: var(--font-size-13);
}
.timeline-playfield .timeline-choices .rot-event time {
  font-size: var(--font-size-14);
}
/* The answer is one line through time with the event in its true place. */
.timeline-playfield .timeline-result {
  --timeline-result-gutter: var(--space-6);
  --timeline-result-node: var(--space-3);
  --timeline-result-edge: var(--stroke-1);
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  padding-left: var(--timeline-result-gutter);
}
/* Each stop draws its stretch of the line, so it runs from dot to dot. */
/* Offsets start inside each stop's border, so they step back over it. */
.timeline-result > li::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--timeline-result-edge));
  bottom: calc(-1 * (var(--space-2) + var(--timeline-result-edge)));
  left: calc(
    (var(--timeline-result-node) - var(--stroke-2)) / 2 -
      var(--timeline-result-gutter) - var(--timeline-result-edge)
  );
  width: var(--stroke-2);
  background: var(--line-strong);
}
.timeline-result > li:first-child::before {
  top: 50%;
}
.timeline-result > li:last-child::before {
  bottom: 50%;
}
.timeline-result > li::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(-1 * (var(--timeline-result-gutter) + var(--timeline-result-edge)));
  width: var(--timeline-result-node);
  height: var(--timeline-result-node);
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  translate: 0 -50%;
}
.timeline-playfield .timeline-result .rot-event {
  flex-direction: row;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}
.timeline-result .rot-event time {
  flex: none;
  min-width: var(--space-14);
}
.timeline-playfield .timeline-result .highlight {
  --timeline-result-card: var(--candy-blue);
  background: var(--timeline-result-card);
  border-color: var(--timeline-result-card);
  color: var(--ink);
  font-weight: var(--font-weight-bold);
}
.timeline-playfield .timeline-result .highlight[data-result="right"] {
  --timeline-result-card: var(--candy-green);
}
.timeline-playfield .timeline-result .highlight time {
  color: var(--ink);
  font-weight: var(--font-weight-black);
}
.timeline-result .highlight::after {
  background: var(--timeline-result-card);
}
.timeline-pick {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--space-10);
  padding: 0 var(--space-4);
  border: var(--stroke-2) dashed var(--error);
  border-radius: var(--radius-piece-large);
  color: var(--error);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-black);
}
.timeline-result > .timeline-pick {
  --timeline-result-edge: var(--stroke-2);
}
.timeline-result > .timeline-pick::after {
  background: var(--error);
}
@media (max-width: 700px) {
  body[data-game=yearrot] .rot-year-event {
    font-size: var(--font-size-18);
  }
}


@media (max-width: 700px) {
  body:has(#practice[aria-pressed="true"]) .prompt {
    min-height: 0;
    margin: var(--space-2) 0 var(--space-4);
    padding: var(--space-3);
  }
  body:not([data-game=skyrot], [data-game=skylinerot]):has(#practice[aria-pressed="true"]) .visual-viewport {
    --visual-viewport-practice-height: 128px;
    height: var(--visual-viewport-practice-height);
    aspect-ratio: auto;
  }
}

body:not(.daily-feed) > .main.puzzle-main { max-width: var(--layout-dialog); }
.puzzle-grid { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.puzzle-grid.columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.puzzle-grid.columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.path-grid { touch-action: none; user-select: none; }
.puzzle-progress { color: var(--muted); margin: 0; }
.puzzle-status { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.puzzle-feedback { margin: 0; color: var(--ink); font-weight: var(--font-weight-bold); text-align: right; }
.puzzle-clues { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-4); margin-top: var(--space-4); }
.puzzle-clues h3 { font-size: var(--font-size-14); font-weight: var(--font-weight-bold); margin: 0 0 var(--space-2); }
.puzzle-grid.columns-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.puzzle-grid:empty { display: none; }
/* Crossword keeps the clue, word and checking in one working area. */
body[data-game=crossword] > .main.puzzle-main { max-width: var(--layout-board); }
.puzzle-modes { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.puzzle-modes .modes { margin: 0; }
.puzzle-modes .puzzle-progress { font-size: var(--font-size-13); }
.crossword-layout {
  --crossword-layout-board-width: 352px;
  display: grid;
  grid-template-columns: var(--crossword-layout-board-width) minmax(0, 1fr);
  align-items: start;
  gap: var(--space-4) var(--space-6);
}
.crossword-layout > :not(.puzzle-clues) { grid-column: 1; }
.crossword-layout .crossword-grid { margin: 0; }
.crossword-result { display: flex; align-items: center; min-height: var(--space-14); }
.crossword-layout .puzzle-clues { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
.crossword-layout .puzzle-clue:last-child { margin-bottom: 0; }
.crossword-layout .rot-actions { flex-wrap: nowrap; margin: 0; }

.crossword-layout .rot-feedback { margin: 0; }
@media (max-width: 700px) {
  .crossword-layout {
    --crossword-layout-mobile-board-width: 280px;
    grid-template-columns: minmax(0, 1fr);
  }
  .crossword-layout .crossword-grid { width: min(100%, var(--crossword-layout-mobile-board-width)); justify-self: center; }
  .crossword-layout .puzzle-clues { grid-column: 1; grid-row: auto; }
}

/* Sudoku keeps the board, number palette and checking in one working area. */
body[data-game=sudoku] > .main.puzzle-main {
  --puzzle-main-sudoku-width: 400px;
  --puzzle-main-sudoku-board-width: 352px;
  max-width: var(--puzzle-main-sudoku-width);
}
.sudoku-grid, .sudoku-palette { max-width: var(--puzzle-main-sudoku-board-width); margin-inline: auto; }
.sudoku-grid { margin-top: 0; }
.puzzle-result-below { margin-top: var(--space-4); }
@media (max-width: 700px) {
  body[data-game=sudoku] > .main.puzzle-main { --puzzle-main-sudoku-board-width: 320px; }
}

/* Balance keeps the board and its controls in one column. */
body[data-game=balance] > .main.puzzle-main {
  --puzzle-main-balance-width: 400px;
  --puzzle-main-balance-board-width: 352px;
  max-width: var(--puzzle-main-balance-width);
}
.balance-grid { max-width: var(--puzzle-main-balance-board-width); margin: 0 auto; }

/* Word guess keeps the board and keyboard together in one column. */
.wordguess-grid {
  --wordguess-grid-width: 264px;
  width: min(100%, var(--wordguess-grid-width));
  margin-inline: auto;
}
.wordguess-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
.wordguess-keys { display: grid; gap: var(--space-2); margin-top: var(--space-6); }
.wordguess-key-row { --wordguess-key-row-indent: calc((100% + var(--space-2)) / 20); display: flex; gap: var(--space-2); }
.wordguess-key-row:nth-child(2) { padding-inline: var(--wordguess-key-row-indent); }
.wordguess-key-row .wordguess-key { flex: 1; }
.wordguess-key-row .wordguess-key:is([data-key=Enter], [data-key=Backspace]) { flex: 1.5; }
@media (max-width: 700px) {
  .wordguess-keys { margin-top: var(--space-4); margin-inline: calc(-1 * var(--space-3)); }
}
/* Wider screens grow the board and keep the keyboard near its width, so the
   guesses lead and the keys stay within reach of each other. */
@media (min-width: 700px) {
  .wordguess-grid { --wordguess-grid-width: 304px; }
  .wordguess-keys .wordguess-key { --wordguess-key-height: 50px; }
  .wordguess-keys { --wordguess-keys-width: 500px; width: min(100%, var(--wordguess-keys-width)); margin-inline: auto; }
}

/* Letter hive: rank, the word being made, the seven hexagons, controls and
   found words in one column. Six letters ring the centre one; each sits one
   hexagon height (plus a gap) from the centre. */
.quick-main { --quick-main-width: 480px; max-width: var(--quick-main-width); }
.quick-play { display: grid; gap: var(--space-6); margin-top: var(--space-4); }
.quick-play > h2 { margin: 0; }
.quick-answer, .quick-rack { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); }
:is(.quick-answer, .quick-rack)[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.quick-actions { display: flex; gap: var(--space-2); }
.quick-actions > button { flex: 1; min-width: 0; }
.quick-operators { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.quick-equation { margin: 0; font-size: var(--font-size-24); font-weight: var(--font-weight-black); overflow-wrap: anywhere; }
.quick-working { min-height: var(--space-8); font-size: var(--font-size-18); }
.quick-notice { min-height: var(--space-6); margin: 0; color: var(--muted); }
.hive { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.hive-board {
  --hive-board-cell-width: 96px;
  --hive-board-cell-height: calc(var(--hive-board-cell-width) * 0.866);
  --hive-board-reach: calc(var(--hive-board-cell-height) + var(--space-1));
  position: relative;
  margin-top: 0;
  width: calc(var(--hive-board-reach) * 1.732 + var(--hive-board-cell-width));
  height: calc(var(--hive-board-reach) * 2 + var(--hive-board-cell-height));
  margin-inline: auto;
}
.hive-slot {
  --hive-slot-x: 0;
  --hive-slot-y: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hive-board-cell-width);
  height: var(--hive-board-cell-height);
  translate:
    calc(-50% + var(--hive-slot-x) * var(--hive-board-reach))
    calc(-50% + var(--hive-slot-y) * var(--hive-board-reach));
}
.hive-slot[data-slot="1"] { --hive-slot-y: -1; }
.hive-slot[data-slot="2"] { --hive-slot-x: 0.866; --hive-slot-y: -0.5; }
.hive-slot[data-slot="3"] { --hive-slot-x: 0.866; --hive-slot-y: 0.5; }
.hive-slot[data-slot="4"] { --hive-slot-y: 1; }
.hive-slot[data-slot="5"] { --hive-slot-x: -0.866; --hive-slot-y: 0.5; }
.hive-slot[data-slot="6"] { --hive-slot-x: -0.866; --hive-slot-y: -0.5; }
.hive-status { min-height: var(--space-5); }
.hive-controls { display: flex; justify-content: center; gap: var(--space-2); }
.hive-words {
  --hive-words-column: 112px;
}
.hive-words ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--hive-words-column), 1fr)); gap: var(--space-1) var(--space-4); }
@media (max-width: 700px) {
  .hive-board { --hive-board-cell-width: 88px; }
}

/* Atlas stage. Embedded sizing depends on width, never its resizing iframe. */
body[data-game=maprot] > .city-main {
  max-width: var(--layout-map);
  margin: 0 auto;
}
.city-main > .heading {
  padding: var(--space-4) var(--space-5) 0;
  margin-bottom: 0;
}
:root:not([data-daily-feed]) .city-main .heading .game-title {
  display: none;
}
.city-main #quiz > h2 {
  margin: var(--space-4) var(--space-5);
}
.city-main .rot-map-surface {
  overflow: hidden;
}
.city-main .rot-map {
  --rot-map-stage-min-height: 320px;
  --rot-map-stage-max-height: 640px;
  --rot-map-stage-clearance: 384px;
  height: clamp(var(--rot-map-stage-min-height), calc(100dvh - var(--rot-map-stage-clearance)), var(--rot-map-stage-max-height));
  aspect-ratio: auto;
  border-radius: 0;
}
:root[data-daily-feed] body[data-game=maprot] > .city-main {
  max-width: var(--layout-map);
  padding: 0;
}
[data-daily-feed] .city-main .rot-map {
  --rot-map-embedded-height: 400px;
  height: auto;
  min-height: var(--rot-map-stage-min-height);
  max-height: var(--rot-map-embedded-height);
  aspect-ratio: 1;
}
.city-main .rot-map-dialog .rot-map {
  --rot-map-expanded-clearance: 156px;
  --rot-map-expanded-min-height: 240px;
  height: max(var(--rot-map-expanded-min-height), calc(100dvh - var(--rot-map-expanded-clearance)));
}
.city-main .rot-map-tools {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  display: grid;
  margin: 0;
}
.city-main .city-overview {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  margin: 0;
}
.city-main .city-expand {
  position: absolute;
  right: var(--space-4);
  top: var(--space-4);
  margin: 0;
}
.city-main .rot-actions {
  padding: var(--space-4) var(--space-5);
  margin: 0;
}
.city-main .city-commit {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2);
}
.city-main .city-commit button {
  width: 100%;
}
.city-main .city-commit .city-clear {
  justify-self: end;
  width: auto;
  min-height: var(--control-size-compact);
}
.city-main .rot-coordinate {
  margin: var(--space-2) var(--space-5) 0;
}
.city-main .rot-feedback:not(.screen-reader-only) {
  margin: 0;
  padding: var(--space-4) var(--space-5) 0;
}
.city-main .rot-pin.guess {
  opacity: 0;
}
.city-main .city-bottom-modes {
  margin-bottom: 0;
}

.city-main .rot-map-editor {
  position: relative;
}
.city-main .city-instruction:not(.screen-reader-only) {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  max-width: 50%;
  margin: 0;
  pointer-events: none;
}
.city-main .rot-map:focus-visible {
  outline: var(--stroke-2) solid var(--focus);
  outline-offset: calc(var(--stroke-2) * -1);
}

/* Short phones keep the product alongside its details so wheels remain usable. */
@media (max-width: 700px) and (max-height: 700px) {
  :root:not([data-daily-feed]) body[data-game=pricerot] #quiz { gap: var(--space-2); }
  :root:not([data-daily-feed]) .price-product {
    grid-template-columns: var(--space-20) minmax(0, 1fr);
    grid-template-areas: "photo description";
    gap: var(--space-3);
    padding: var(--space-2);
    text-align: left;
  }
  :root:not([data-daily-feed]) .price-description h2 { font-size: var(--font-size-16); }
  :root:not([data-daily-feed]) .price-product .visual-viewport { height: var(--price-product-short-height); }
}

/* Chess: the board is game content. Flat squares keep pieces legible. */
.chess-play {
  --chess-play-board: 480px;
  display: grid;
  grid-template-columns: minmax(0, var(--chess-play-board)) minmax(0, 1fr);
  grid-template-areas: "board heading" "board panel";
  grid-template-rows: auto 1fr;
  column-gap: var(--space-6);
  row-gap: var(--space-4);
  align-items: start;
}
.chess-play > h2 { grid-area: heading; margin: 0; }
.chess-board-area { grid-area: board; position: relative; }
.chess-panel { grid-area: panel; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); min-width: 0; }
.chess-panel > :is(.round-verdict-row, .visual-source) { align-self: stretch; }
.chess-panel .rot-actions { margin: 0; }
.chess-status { color: var(--muted); }
.chess-status:empty { display: none; }
@media (max-width: 700px) {
  .chess-play {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "board" "panel";
    grid-template-rows: auto;
  }
}
.chess-board {
  position: relative;
  --chess-board-light: #ebe5ff;
  --chess-board-dark: #9583e6;
  --chess-board-last-light: #fff0a6;
  --chess-board-last-dark: #e3c95a;
  --chess-board-selected-light: #a9d6ff;
  --chess-board-selected-dark: #6ea6f2;
  --chess-board-wrong-light: #ffb3c0;
  --chess-board-wrong-dark: #f0738b;
  --chess-board-solved-light: #b6f2cf;
  --chess-board-solved-dark: #5fd296;
  --chess-board-check: #ff3d61b0;
  --chess-board-hint: #170f4066;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-control-compact);
  box-shadow: 0 var(--lip-small) 0 var(--plate-lip), var(--shadow-drop);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.chess-square {
  --chess-square-inset: 4%;
  position: relative;
  cursor: pointer;
  display: block;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--chess-board-light);
}
.chess-square[data-shade="dark"] { background: var(--chess-board-dark); }
.chess-row { display: contents; }
.chess-square[data-corner="top-left"] { border-top-left-radius: var(--radius-control-compact); }
.chess-square[data-corner="top-right"] { border-top-right-radius: var(--radius-control-compact); }
.chess-square[data-corner="bottom-left"] { border-bottom-left-radius: var(--radius-control-compact); }
.chess-square[data-corner="bottom-right"] { border-bottom-right-radius: var(--radius-control-compact); }
.chess-square.chess-is-own { touch-action: none; }
.chess-square.chess-is-last { background: var(--chess-board-last-light); }
.chess-square[data-shade="dark"].chess-is-last { background: var(--chess-board-last-dark); }
.chess-board[data-tone="solved"] .chess-square.chess-is-last { background: var(--chess-board-solved-light); }
.chess-board[data-tone="solved"] .chess-square[data-shade="dark"].chess-is-last { background: var(--chess-board-solved-dark); }
.chess-square.chess-is-wrong { background: var(--chess-board-wrong-light); }
.chess-square[data-shade="dark"].chess-is-wrong { background: var(--chess-board-wrong-dark); }
.chess-square.chess-is-selected { background: var(--chess-board-selected-light); }
.chess-square[data-shade="dark"].chess-is-selected { background: var(--chess-board-selected-dark); }
.chess-square.chess-is-check::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-round);
  background: var(--chess-board-check);
}
.chess-square:is(.chess-is-target, .chess-is-capture)::after {
  content: "";
  position: absolute;
  inset: 36%;
  border-radius: var(--radius-round);
  background: var(--chess-board-hint);
  z-index: var(--layer-map-label);
  pointer-events: none;
}
.chess-square.chess-is-capture::after {
  inset: 3%;
  background: transparent;
  border: var(--stroke-4) solid var(--chess-board-hint);
}
/* A dark edge keeps the yellow focus ring visible on light squares. */
.chess-square:focus-visible {
  outline: var(--stroke-2) solid var(--paper);
  outline-offset: calc(-1 * var(--stroke-2));
  box-shadow: inset 0 0 0 var(--stroke-4) var(--focus), inset 0 0 0 calc(var(--stroke-4) + var(--stroke-2)) var(--paper);
  z-index: var(--layer-help);
}
.chess-piece {
  position: relative;
  z-index: var(--layer-base);
  display: block;
  width: 100%;
  height: 100%;
  padding: var(--chess-square-inset);
  pointer-events: none;
}
.chess-square.chess-is-own .chess-piece { cursor: grab; }
.chess-piece.chess-is-dragging { z-index: var(--layer-navigation); scale: 1.1; }
.chess-coords {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template: repeat(8, minmax(0, 1fr)) / repeat(8, minmax(0, 1fr));
  pointer-events: none;
}
.chess-coords span {
  padding: var(--space-1);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-1);
  color: var(--paper);
}
.chess-coords .chess-file { align-self: end; justify-self: end; }
.chess-promotion {
  position: absolute;
  inset: 0;
  z-index: var(--layer-navigation);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-control-compact);
  background: var(--dialog-backdrop);
}
.chess-promotion[hidden] { display: none; }
.chess-promotion-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.chess-promotion-choice {
  --chess-promotion-choice-width: 72px;
  --chess-promotion-choice-face: #ebe5ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: var(--chess-promotion-choice-width);
  padding: var(--space-2);
  border-radius: var(--radius-control);
  background: var(--chess-promotion-choice-face);
  color: var(--paper);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-bold);
  box-shadow: 0 var(--lip-small) 0 var(--plate-lip);
}
.chess-promotion-choice:focus-visible { outline: var(--stroke-3) solid var(--focus); outline-offset: var(--stroke-2); }
.chess-promotion-choice img { width: 100%; aspect-ratio: 1; }
.chess-promotion .chess-promotion-cancel { width: auto; min-width: 50%; }
.chess-lines { display: grid; gap: var(--space-2); margin: 0; }
.chess-lines dt { color: var(--muted); font-size: var(--font-size-13); }
.chess-lines dd { margin: 0; font-size: var(--font-size-16); font-weight: var(--font-weight-bold); }
.chess-review {
  --chess-review-board: 320px;
  display: grid;
  gap: var(--space-4);
}
.chess-review .chess-board { max-width: var(--chess-review-board); }
.shape-canvas {
  --shape-canvas-max-width: 520px;
  display: block;
  width: 100%;
  max-width: var(--shape-canvas-max-width);
  margin-inline: auto;
  aspect-ratio: 4 / 3;
  margin-bottom: var(--space-4);
  background: var(--well);
  border-radius: var(--radius-panel);
  box-shadow: inset 0 var(--stroke-3) 0 var(--plate-lip);
}
.round-verdict-row + .shape-canvas {
  margin-top: var(--space-3);
}
.shape-answer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.shape-flag {
  --shape-flag-width: 40px;
  --shape-flag-height: 28px;
  flex: none;
  width: var(--shape-flag-width);
  height: var(--shape-flag-height);
  object-fit: contain;
}

/* The expedition is one continuous stage. The form is its cockpit. */
.rare-main {
  --rare-main-width: 1280px;
  max-width: var(--rare-main-width);
  position: relative;
}
.rare-stage {
  --rare-stage-height: 820px;
  --rare-stage-screen-height: 100svh;
  --rare-stage-nav-clearance: 72px;
  --rare-stage-min-height: 620px;
  --rare-stage-question-top: 140px;
  --rare-stage-hud-top: 84px;
  position: relative;
  height: min(var(--rare-stage-height), calc(var(--rare-stage-screen-height) - var(--rare-stage-nav-clearance)));
  min-height: var(--rare-stage-min-height);
  overflow: hidden;
  isolation: isolate;
}
.rare-ocean { position: absolute; inset: 0; width: 100%; height: 100%; }
.rare-stage #quiz { position: absolute; inset: 0; }
.rare-hud { position: absolute; top: var(--rare-stage-hud-top); left: var(--space-8); right: var(--space-8); display: flex; justify-content: space-between; align-items: start; gap: var(--space-4); }
.rare-position { display: grid; gap: var(--space-3); }
.rare-depth { display: grid; gap: var(--space-1); text-align: right; }
.rare-track { display: flex; gap: var(--space-2); padding: 0; margin: 0; list-style: none; }
.rare-question { position: absolute; top: var(--rare-stage-question-top); left: var(--space-6); right: var(--space-6); max-width: var(--layout-city-photo); margin-inline: auto; display: grid; gap: var(--space-3); text-align: center; }
.rare-main .rare-question h2 { margin: 0; }
.rare-dock { position: absolute; bottom: var(--space-8); left: var(--space-6); right: var(--space-6); max-width: var(--layout-dialog); margin-inline: auto; display: grid; gap: var(--space-3); text-align: center; }
.rare-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); }
.rare-form .primary { width: auto; }
.rare-notice { min-height: var(--space-5); }
.rare-question, .rare-dock { transition: opacity var(--duration-reveal) var(--ease-out); }
.rare-stage.is-diving .rare-question { opacity: 0; }
.rare-stage.is-diving .rare-dock { opacity: 0; pointer-events: none; }
.rare-log { max-width: var(--layout-city-photo); margin: var(--space-8) auto; padding: 0 var(--space-6) var(--space-8); }
.rare-log > h2 { margin: 0 0 var(--space-6); }
.rare-log-graph { --rare-log-graph-height: 160px; display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: var(--space-3); height: var(--rare-log-graph-height); margin-bottom: var(--space-8); }
.rare-log-column { display: flex; flex-direction: column; justify-content: end; align-items: center; gap: var(--space-2); }
.rare-log-column i { width: var(--space-3); height: var(--space-1); }
.rare-log-column[data-points="25"] i { height: var(--space-6); }
.rare-log-column[data-points="50"] i { height: var(--space-12); }
.rare-log-column[data-points="75"] i { height: var(--space-18); }
.rare-log-column[data-points="100"] i { height: var(--space-20); }
.rare-recap { display: grid; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.rare-recap > li { display: grid; gap: var(--space-2); }
.rare-answer-list { --rare-answer-list-max-height: 320px; max-height: var(--rare-answer-list-max-height); overflow: auto; display: grid; gap: var(--space-2); margin: var(--space-2) 0; padding: 0 var(--space-2); list-style: none; }
.rare-answer-list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.rare-answer-list li > :last-child { flex-shrink: 0; }
@media (max-width:700px) {
  .rare-stage { --rare-stage-min-height: 600px; --rare-stage-question-top: 144px; }
  .rare-hud { left: var(--space-4); right: var(--space-4); }
  .rare-question { left: var(--space-8); right: var(--space-8); }
  .rare-dock { left: var(--space-4); right: var(--space-4); bottom: var(--space-6); }
}
@media (prefers-reduced-motion:reduce) {
  .rare-question, .rare-dock { transition: none; }
}
