/* THE DAILY GAMES' ROOM — the app's rooms on black (SolGnomonView, SolAlmanacView): white
   type by opacity, glass capsules for the verbs, every picture drawn once. Its own sheet, so
   no other page pays for it (tests/weight.cjs). The page wears the site's own chrome — the
   mast, the ground on the page's one edge, the bridge and the signature — and the room stands
   on that edge: one column on a phone, and from 900px two, the picture (the board, or the
   Almanac's clues) beside the column the game is played in. */

body.games, body.games .ground { background: #000; }
body.games .ground-inner { padding-top: clamp(20px, 4vh, 40px); }

.g-room {
  max-width: 560px; display: flex; flex-direction: column; gap: 14px;
  font-family: -apple-system, "SF Pro Rounded", ui-rounded, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
}
.g-head { display: flex; flex-direction: column; gap: 3px; min-height: 96px; }
.g-eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.g-title { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: rgba(255,255,255,.95); }
.g-sub { margin: 0; font-size: 15px; font-weight: 500; color: rgba(255,255,255,.6); }

.g-board { display: block; width: 100%; aspect-ratio: 1 / 1; touch-action: none; cursor: grab; }
.g-board:active { cursor: grabbing; }

.g-credit { align-self: center; margin-top: -10px; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.55); text-decoration: none; }
.g-credit:hover { text-decoration: underline; }
.g-strip { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 92px; text-align: center; }
.g-seats { display: flex; gap: 16px; align-items: center; min-height: 20px; }
.g-seats .seat { width: 20px; height: 20px; display: grid; place-items: center; }
.g-seats .seat::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.2); }
.g-verdict { margin: 0; min-height: 1.5em; font-size: 15px; font-weight: 500; color: rgba(255,255,255,.85); }
.g-clue { margin: 0; min-height: 1.4em; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.55); }
.g-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.g-reading, .g-result { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.g-time { font-size: 40px; font-weight: 300; line-height: 1.1; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.95); }
.g-help { margin: 0; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.5); }
.g-dial { display: flex; align-items: center; gap: 14px; width: 100%; }
.g-step {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.g-step:hover { background: rgba(255,255,255,.14); }
.g-step:disabled, .g-read:disabled { opacity: .45; cursor: default; }
/* The dial carries dir="ltr" on the page: a time axis runs left to right in every language, as a
   clock's figures and the app's dial do, so the day's light on the track, the thumb and the two
   steps keep one direction in Hebrew too. */
.g-dial input[type="range"] {
  flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer;
}
.g-dial input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--track, rgba(255,255,255,.3)); }
.g-dial input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--track, rgba(255,255,255,.3)); }
.g-dial input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 5px solid #1b1d22; box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}
.g-dial input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 5px solid #1b1d22; }
.g-read { font-size: 15px; padding: 12px 26px; cursor: pointer; }

.g-answer { margin: 0; font-size: 40px; font-weight: 300; line-height: 1.1; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.95); }
.g-detail { margin: 0; font-size: 15px; font-weight: 500; color: rgba(255,255,255,.7); }
.g-stats { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; margin: 6px 0; }
.g-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.g-stats strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.92); }
.g-stats span { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.55); }
.g-next { margin: 0; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.55); }
.g-result .chip-dress { font-size: 14px; padding: 11px 22px; cursor: pointer; }
.g-verbs { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* the day's other game, a card at the foot */
.g-also {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; margin-top: 6px; border-radius: 22px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); text-decoration: none; color: rgba(255,255,255,.9);
}
.g-also:hover { background: rgba(255,255,255,.1); }
.g-also .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.g-also .v { font-size: 15px; font-weight: 600; }
.g-also .w { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.5); display: flex; gap: 6px; align-items: center; }

/* ---------------- the Almanac ---------------- */
.a-seats { display: flex; gap: 14px; min-height: 18px; }
.a-seats .seat { width: 18px; height: 18px; display: grid; place-items: center; }
.a-seats .seat::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.2); }
#al-clues, .a-side { display: flex; flex-direction: column; gap: 14px; }
.a-card {
  padding: 16px; border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; gap: 12px;
}
.a-card-k { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.a-card-row { display: flex; align-items: center; gap: 16px; }
.a-card-row canvas { flex: none; width: 64px; height: 64px; }
.a-card p.s { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.45; color: rgba(255,255,255,.88); }
.a-card canvas.wide { width: 100%; height: 78px; }
.a-card canvas.chart { width: 236px; height: 236px; align-self: center; }
@media (prefers-reduced-motion: no-preference) { .a-card.new { animation: a-arrive .45s ease both; } }
@keyframes a-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.a-guesses { display: flex; flex-direction: column; gap: 4px; }
.a-guesses h2 { margin: 4px 0; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.55); }
.a-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 4px 12px; align-items: start; padding: 6px 0; }
.a-row .n { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.92); }
.a-row .d { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.75); }
.a-row .d svg { direction: ltr; }
.a-row .w { grid-column: 2 / 4; font-size: 13px; font-weight: 500; color: rgba(255,255,255,.55); }
.a-row .phase { margin-top: 2px; }

.a-pick { display: flex; flex-direction: column; gap: 8px; }
.a-pick label { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; background: rgba(255,255,255,.1); }
.a-pick input { flex: 1; min-width: 0; border: none; background: transparent; color: #fff; font: inherit; font-size: 16px; outline: none; }
.a-pick input::placeholder { color: rgba(255,255,255,.55); }
.a-pick ul { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; border-radius: 18px; background: rgba(255,255,255,.04); }
.a-pick li { display: flex; justify-content: space-between; padding: 11px 16px; font-size: 16px; font-weight: 500; color: rgba(255,255,255,.92); cursor: pointer; }
.a-pick li[aria-selected="true"], .a-pick li:hover { background: rgba(255,255,255,.1); }
.a-pick li[aria-disabled="true"] { color: rgba(255,255,255,.5); cursor: default; }
.a-pick li small { font-size: 12px; color: rgba(255,255,255,.55); }
.a-city { margin: 0; font-size: 34px; font-weight: 300; color: rgba(255,255,255,.95); }

/* ---------------- how to play, below the room ---------------- */
.g-how { max-width: 640px; margin: 56px 0 40px; }
.g-how h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; color: rgba(255,255,255,.85); }
.g-how p { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.66); margin: 0 0 10px; }

/* ---------------- two columns from 900px ----------------
   The picture spans the rows the play column fills and the last row takes what is left, so the
   play column's lines keep their own heights beside a tall board. The Almanac's play column
   rides along beside its clues. */
@media (min-width: 900px) {
  .g-room { max-width: none; display: grid; grid-template-columns: minmax(0, 560px) minmax(300px, 400px);
            column-gap: clamp(40px, 5vw, 80px); row-gap: 14px; justify-content: start; align-items: start; }
  .g-gnomon { grid-template-rows: auto auto auto auto 1fr auto; }
  .g-gnomon > .g-board { grid-column: 1; grid-row: 1 / span 5; }
  .g-gnomon > .g-credit { grid-column: 1; grid-row: 6; justify-self: center; margin-top: -4px; }
  .g-gnomon > :not(.g-board):not(.g-credit) { grid-column: 2; }
  .g-almanac { grid-template-rows: auto auto 1fr; }
  .g-almanac > #al-clues { grid-column: 1; grid-row: 1 / -1; }
  .g-almanac > :not(#al-clues) { grid-column: 2; }
  .g-almanac > .a-side { grid-row: 3; position: sticky; top: 24px; }
}

/* in a right-to-left language the corner's arrow leans the way its line reads (and goes on a
   narrow screen, as styles.css takes it away there) */
@media (min-width: 421px) { [dir="rtl"] .sky-corner .chip-dress::after { content: "↖"; margin-left: 0; margin-right: 14px; } }
