/* Welcome, Wardrobe and Sessions: view rules on top of app.css.
   Shared between Welcome and Wardrobe: the lamp-lit stage (.lit), a lamp and Noggin
   standing on a desk band in the lamp's pool, and the option tiles (.tile) and faces
   (.face) that hold Noggin's colours and wear. */

.v-sessions {
  --rain: #377E80; /* rain on the night glass: teal stepped toward glass */
}

/* ---------- The lamp-lit stage (positions come from BD.wardrobe.litStage) ---------- */

:is(.v-welcome, .v-wardrobe) .lit {
  --lamp-s: 1.5; --subj-s: 1;
  height: calc(var(--stage-h, 32) * var(--a)); overflow: hidden;
}
:is(.v-welcome, .v-wardrobe, .v-sessions) h1[tabindex="-1"]:focus { outline: none; }
:is(.v-welcome, .v-wardrobe) .lit .desk-band { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; }
:is(.v-welcome, .v-wardrobe) .lit-lamp {
  position: absolute; z-index: 2; --s: var(--ls, 1);
  left: calc(var(--lamp-x, 0) * var(--a)); bottom: calc(2 * var(--a));
}
:is(.v-welcome, .v-wardrobe) .lit-subject {
  position: absolute; z-index: 2;
  left: calc(var(--subj-x, 0) * var(--a)); bottom: calc(2 * var(--a));
}

/* ---------- Faces: a small Noggin standing on a wood plate ---------- */

/* --px is the screen size of one sprite pixel, so a face stays crisp at any --a */
:is(.v-welcome, .v-wardrobe) .face {
  --px: 2px;
  display: grid; place-items: end center; flex: none;
  padding: 6px 8px 4px; background: var(--wood); clip-path: var(--cut);
}
:is(.v-welcome, .v-wardrobe) .face .sprite { width: calc(var(--w, 22) * var(--px)); height: calc(var(--h, 24) * var(--px)); }
:is(.v-welcome, .v-wardrobe) .is-locked .face { background: var(--wood-edge); }
/* Noggin's head, 12 sprite pixels square */
:is(.v-welcome, .v-wardrobe) .mark { display: block; width: calc(12 * var(--px)); height: calc(12 * var(--px)); }
:is(.v-welcome, .v-wardrobe) .mark svg { display: block; width: 100%; height: 100%; }

/* ---------- Option tiles: a radio drawn as a plate, amber-ringed when chosen ---------- */

:is(.v-welcome, .v-wardrobe) .pick { margin: 0; padding: 0; border: 0; min-width: 0; }
:is(.v-welcome, .v-wardrobe) .pick-legend { padding: 0; margin-bottom: 12px; font: 600 15px/1.2 var(--text); color: var(--chalk); }
:is(.v-welcome, .v-wardrobe) .pick-opts { display: grid; gap: 8px; }
/* five to a row: the five colours fill it, and fewer (or more) keep the same tile size */
:is(.v-welcome, .v-wardrobe) .pick-colours { grid-template-columns: repeat(5, minmax(0, 1fr)); }
:is(.v-welcome, .v-wardrobe) .pick-colours .face { --px: 4px; padding: 0; background: none; }
@media (max-width: 560px) { :is(.v-welcome, .v-wardrobe) .pick-colours .face { --px: 3px; } }

/* the plate and its ring are pseudo-elements, so the cut corners never clip the focus outline */
:is(.v-welcome, .v-wardrobe) .tile {
  --ring: transparent; --plate: var(--wood);
  position: relative; isolation: isolate; min-width: 0;
  display: grid; justify-items: center; align-content: start; gap: 8px;
  padding: 12px 6px 12px; text-align: center; cursor: pointer;
}
:is(.v-welcome, .v-wardrobe) .tile::before,
:is(.v-welcome, .v-wardrobe) .tile::after { content: ""; position: absolute; z-index: -1; clip-path: var(--cut); }
:is(.v-welcome, .v-wardrobe) .tile::before { inset: 0; background: var(--ring); }
:is(.v-welcome, .v-wardrobe) .tile::after { inset: 3px; background: var(--plate); }
:is(.v-welcome, .v-wardrobe) .tile:hover { --plate: var(--wood-mid); }
:is(.v-welcome, .v-wardrobe) .tile:has(input:checked) { --ring: var(--amber); --plate: var(--wood-mid); }
:is(.v-welcome, .v-wardrobe) .tile:has(input:focus-visible) { outline: 3px solid var(--chalk); outline-offset: 2px; }
:is(.v-welcome, .v-wardrobe) .tile .face { background: none; padding: 0; }
:is(.v-welcome, .v-wardrobe) .tile.is-locked { cursor: not-allowed; --plate: var(--wood-edge); }
:is(.v-welcome, .v-wardrobe) .tile.is-locked:hover { --plate: var(--wood-edge); }
:is(.v-welcome, .v-wardrobe) .tile-input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
:is(.v-welcome, .v-wardrobe) .tile-name { font: 600 14px/1.2 var(--text); color: var(--chalk-dim); }
:is(.v-welcome, .v-wardrobe) .tile:has(input:checked) .tile-name { color: var(--chalk); }
:is(.v-welcome, .v-wardrobe) .tile-note { margin-top: -4px; font: 500 12px/1.25 var(--text); font-variant-numeric: tabular-nums; color: var(--chalk-faint); }
/* on the lit wood-mid plate chalk-faint drops to 3.7:1, so the note steps up to chalk-dim */
:is(.v-welcome, .v-wardrobe) .tile:is(:hover, :has(input:checked)):not(.is-locked) .tile-note { color: var(--chalk-dim); }
:is(.v-welcome, .v-wardrobe) .tile.is-locked .tile-name { color: var(--chalk-faint); }

/* ---------- Welcome ---------- */

.v-welcome { padding-top: clamp(24px, 3.4vw, 40px); }
.v-welcome .wl {
  display: grid; column-gap: clamp(32px, 4.5vw, 72px); row-gap: 28px;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: 1fr auto auto auto 1fr;
  grid-template-areas: ". stage" "head stage" "body stage" "foot stage" ". stage";
  min-height: calc(100svh - var(--bar-h) - 120px);
}
.v-welcome .wl[data-step="3"] { grid-template-rows: 0 auto auto auto 1fr; }
.v-welcome .wl-head { grid-area: head; gap: 18px; }
.v-welcome .wl-body { grid-area: body; display: grid; gap: 30px; }
.v-welcome .wl-foot { grid-area: foot; }
.v-welcome .wl-stage { grid-area: stage; align-self: center; min-width: 0; }
.v-welcome .wl[data-step="3"] .wl-stage { align-self: start; }

.v-welcome h1 { font-size: clamp(38px, 4.4vw, 60px); line-height: 1.02; }
.v-welcome .wl-head .noggin-line { font-size: 19px; max-width: 30ch; }
.v-welcome .wl-text { font-size: 17px; max-width: 42ch; color: var(--chalk-dim); }

.v-welcome .wl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding-top: 8px; }
.v-welcome .wl-restore-err { flex-basis: 100%; }
.v-welcome .wl-return { flex-basis: 100%; display: grid; gap: 12px; max-width: 520px; padding: 18px 20px 20px; background: var(--ink); clip-path: var(--cut); --c: 6px; }
.v-welcome .wl-key { display: grid; gap: 8px; }
.v-welcome .wl-key label { font: 600 14px/1.2 var(--text); color: var(--chalk); }
.v-welcome .wl-key-row { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.v-welcome .wl-key-in { flex: 1 1 200px; width: auto; text-transform: uppercase; letter-spacing: 0.06em; }
.v-welcome .wl-key-in[aria-invalid="true"] { border-color: var(--error); }
.v-welcome .wl-key-hint { font: 400 14px/1.4 var(--text); color: var(--chalk-dim); }
.v-welcome .wl-key-done { font: 600 15px/1.4 var(--text); color: var(--teal-light); }
.v-welcome .wl-key-done:empty { display: none; }
.v-welcome .wl-return .link-btn { justify-self: start; }
.v-welcome .wl-progress { display: flex; align-items: center; gap: 12px; font: 600 14px/1 var(--text); font-variant-numeric: tabular-nums; color: var(--chalk-dim); white-space: nowrap; }
.v-welcome .wl-progress .segbar { gap: 4px; }
.v-welcome .wl-progress .segbar i { width: 24px; height: 8px; }

/* step 2: the colours, then what Noggin can earn later, each a quiet silhouette */
.v-welcome .wl-body .pick-colours { max-width: 480px; }
.v-welcome .wl-later { display: grid; gap: 14px; }
.v-welcome .wl-later .wl-text { font-size: 16px; }
.v-welcome .wl-wear { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 480px; }
.v-welcome .wl-item { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; min-width: 0; }
.v-welcome .wl-item .face { background: var(--wood-edge); padding: 8px 10px 4px; }
.v-welcome .wl-item-name { font: 600 13px/1.2 var(--text); color: var(--chalk-dim); }
.v-welcome .wl-item-lv { font: 500 12px/1.2 var(--text); font-variant-numeric: tabular-nums; color: var(--chalk-faint); }

/* step 3: the deck card stands in the lamp's pool on the desk, the lamp just off its corner */
.v-welcome .wl-say { display: flex; align-items: center; gap: 18px; }
.v-welcome .wl-mini { --s: 0.5; }
.v-welcome .wl-say .noggin-line { max-width: 26ch; }
.v-welcome .wl-desk { padding: calc(7 * var(--a)) 0 calc(10 * var(--a)) calc(12 * var(--a)); overflow: hidden; }
.v-welcome .wl-desk-lamp { position: absolute; z-index: 0; left: 0; top: 0; --s: 1.2; }
.v-welcome .wl-desk-band { position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; }
.v-welcome .wl-card { position: relative; z-index: 1; display: grid; gap: 20px; padding: 28px 32px 30px; }
.v-welcome .wl-card h2 { font: 700 28px/1.1 var(--text); letter-spacing: -0.01em; }
.v-welcome .paper .field > label { color: var(--on-chalk); }
.v-welcome .paper .input[aria-invalid="true"] { border-color: var(--error-on-chalk); }
.v-welcome .wl-rows { display: grid; gap: 16px; }
/* a card row: "Card n" and Remove on top, then term and definition, then its error */
.v-welcome .wl-row {
  margin: 0; padding: 10px 0 0; border: 0; border-top: 2px solid var(--chalk-line); min-width: 0;
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px 12px; align-items: end;
}
.v-welcome .wl-row legend { float: left; width: 100%; padding: 0; grid-column: 1; grid-row: 1; align-self: center; font-variant-numeric: tabular-nums; }
.v-welcome .wl-row .wl-remove { grid-column: 2; grid-row: 1; justify-self: end; min-height: 36px; padding: 0 2px; font-size: 14px; }
.v-welcome .wl-row .wl-f-term, .v-welcome .wl-row .wl-f-def { grid-row: 2; }
.v-welcome .wl-row .field > label { font-size: 13px; color: var(--on-chalk-soft); }
.v-welcome .wl-row .wl-row-err { grid-column: 1 / -1; grid-row: 3; }
.v-welcome .wl-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 4px; }
.v-welcome .paper .link-btn { color: var(--on-chalk-soft); }
.v-welcome .paper .link-btn:hover { color: var(--on-chalk); }
.v-welcome .paper .link-btn:focus-visible { outline-color: var(--amber-dark); }

@media (max-width: 899px) {
  .v-welcome .wl, .v-welcome .wl[data-step="3"] {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: none;
    grid-template-areas: "head" "stage" "body" "foot"; min-height: 0;
  }
  .v-welcome .wl { row-gap: 22px; }
  .v-welcome .wl-head { gap: 14px; }
  .v-welcome .wl-head .noggin-line { font-size: 18px; }
  .v-welcome .wl-text { font-size: 16px; }
  .v-welcome .wl:is([data-step="1"], [data-step="2"]) .lit { --stage-top: 2; --subj-s: 0.875; }
  .v-welcome .wl-body { gap: 26px; }
  .v-welcome .wl-desk { padding: calc(4 * var(--a)) 0 calc(9 * var(--a)) calc(6 * var(--a)); }
  .v-welcome .wl-desk-lamp { --s: 0.75; }
  .v-welcome .wl-card { padding: 20px 18px 22px; gap: 18px; }
  .v-welcome .wl-card h2 { font-size: 24px; }
  .v-welcome .wl-row { grid-template-columns: minmax(0, 1fr) auto; }
  .v-welcome .wl-row .wl-f-term { grid-column: 1 / -1; grid-row: 2; }
  .v-welcome .wl-row .wl-f-def { grid-column: 1 / -1; grid-row: 3; }
  .v-welcome .wl-row .wl-row-err { grid-row: 4; }
  .v-welcome .wl-foot { flex-direction: column-reverse; align-items: stretch; }
  .v-welcome .wl-foot .row .btn { flex: 1 1 auto; }
}
/* phones: the step-2 stage gives up a little height so the colours sit just under Noggin */
@media (max-width: 560px) {
  .v-welcome .wl[data-step="2"] .lit { --subj-s: 0.75; }
  .v-welcome .wl-wear { gap: 6px; }
  .v-welcome .wl-item .face { padding: 6px 6px 3px; }
}

/* ---------- Wardrobe ---------- */

.v-wardrobe .wd-head { margin-bottom: clamp(24px, 3vw, 40px); }
.v-wardrobe .wd {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 4.5vw, 72px); align-items: start;
}

/* Noggin under the lamp; on a desktop tall enough, it stays in view while the controls scroll */
.v-wardrobe .wd-show { display: grid; gap: 18px; min-width: 0; }
@media (min-width: 900px) and (min-height: 720px) {
  .v-wardrobe .wd-show { position: sticky; top: calc(var(--bar-h) + 24px); }
}
/* Noggin's aside and the dance share a row, so both stay in view beside a grown Noggin */
.v-wardrobe .wd-cap { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 24px; }
.v-wardrobe .wd-cap .noggin-line { flex: 1 1 22ch; max-width: 38ch; min-height: 2.8em; }

.v-wardrobe .wd-controls { display: grid; gap: clamp(36px, 4vw, 48px); min-width: 0; }
.v-wardrobe .wd-sec { display: grid; gap: 14px; min-width: 0; }
/* section titles take the display face, like every other view's h2. At 30px Pixelify's
   pixel lands on whole screen pixels, so its C stays open at 1x at any sub-pixel offset;
   at 22-28px it can close up and "Colour" reads "Oolour" */
.v-wardrobe .wd-sec h2 { font-size: 30px; line-height: 1.1; }
.v-wardrobe .wd-hint { margin-top: -6px; font: 500 15px/1.45 var(--text); color: var(--chalk-faint); }
/* the small Noggins: three screen pixels to a sprite pixel, two in a row on a phone */
.v-wardrobe .face { --px: 3px; }

/* rows in an ink panel: wear switches, the hat choice, the moves */
.v-wardrobe .wd-list { padding: 4px 18px; }
.v-wardrobe .wd-row { display: flex; align-items: center; gap: 12px 16px; padding: 14px 0; border-top: 2px solid var(--shadow); }
.v-wardrobe .wd-row:first-child { border-top: 0; }
.v-wardrobe .wd-row-main { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.v-wardrobe .wd-row.is-locked .wd-row-main { cursor: not-allowed; }
.v-wardrobe .wd-row-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.v-wardrobe .wd-name { font: 600 16px/1.2 var(--text); color: var(--chalk); }
.v-wardrobe .wd-row.is-locked .wd-name { color: var(--chalk-dim); }
.v-wardrobe .wd-note { font: 500 13px/1.3 var(--text); font-variant-numeric: tabular-nums; color: var(--chalk-faint); }
.v-wardrobe .wd-row-main:hover .face { background: var(--wood-mid); }
.v-wardrobe .wd-row.is-locked .wd-row-main:hover .face { background: var(--wood-edge); }

/* the hat: a radio group of tiles across the panel */
.v-wardrobe .wd-hat { display: block; }
.v-wardrobe .wd-hat .pick-legend { font-size: 16px; }
.v-wardrobe .pick-hats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v-wardrobe .pick-hats .tile { padding-top: 10px; }

/* the switch: a pixel-cut track with a square knob, amber when on */
.v-wardrobe .wd-switch { position: relative; isolation: isolate; flex: none; width: 52px; height: 28px; }
.v-wardrobe .wd-switch::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--wood-mid); clip-path: var(--cut); }
.v-wardrobe .wd-switch::after { content: ""; position: absolute; left: 5px; top: 5px; width: 18px; height: 18px; background: var(--chalk-dim); }
.v-wardrobe .wd-row-main:hover .wd-switch::before { background: var(--wood-light); }
.v-wardrobe .wd-row-main:has(input:checked) .wd-switch::before { background: var(--amber); }
.v-wardrobe .wd-row-main:has(input:checked) .wd-switch::after { left: 29px; background: var(--ink); }
.v-wardrobe .wd-row-main:has(input:focus-visible) .wd-switch { outline: 3px solid var(--amber); outline-offset: 3px; }
.v-wardrobe .wd-row.is-locked .wd-switch::before { background: var(--wood-edge); }
.v-wardrobe .wd-row.is-locked .wd-switch::after { background: var(--ink-deep); }

/* the move radio: a pixel-cut square, amber with an ink centre when chosen */
.v-wardrobe .wd-radio { position: relative; isolation: isolate; flex: none; width: 24px; height: 24px; }
.v-wardrobe .wd-radio::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--wood-mid); clip-path: var(--cut); }
.v-wardrobe .wd-radio::after { content: ""; position: absolute; inset: 8px; background: var(--ink); visibility: hidden; }
.v-wardrobe .wd-row-main:hover .wd-radio::before { background: var(--wood-light); }
.v-wardrobe .wd-row-main:has(input:checked) .wd-radio::before { background: var(--amber); }
.v-wardrobe .wd-row-main:has(input:checked) .wd-radio::after { visibility: visible; }
.v-wardrobe .wd-row-main:has(input:focus-visible) .wd-radio { outline: 3px solid var(--amber); outline-offset: 3px; }
.v-wardrobe .wd-row.is-locked .wd-radio::before { background: var(--wood-edge); }

/* stages: one plate each, all at the same pixel size so the growth reads */
.v-wardrobe .wd-sec-stages { container-type: inline-size; }
.v-wardrobe .wd-stages { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v-wardrobe .wd-stage { --px: 3px; display: grid; gap: 4px; align-content: start; min-width: 0; }
@container (min-width: 470px) { .v-wardrobe .wd-stage { --px: 4px; } }
.v-wardrobe .wd-stage-face {
  display: flex; align-items: flex-end; justify-content: center; margin-bottom: 8px;
  height: calc(33 * var(--px) + 22px); padding-bottom: 8px;
  background: linear-gradient(to top, var(--wood-light) 0 4px, var(--wood) 4px); clip-path: var(--cut);
}
.v-wardrobe .wd-stage-face .sprite { width: calc(var(--w, 22) * var(--px)); height: calc(var(--h, 24) * var(--px)); }
.v-wardrobe .wd-stage.is-locked .wd-stage-face { background: linear-gradient(to top, var(--wood) 0 4px, var(--wood-edge) 4px); }
.v-wardrobe .wd-stage.is-current .wd-stage-face { background: linear-gradient(to top, var(--amber) 0 4px, var(--wood-mid) 4px); }
.v-wardrobe .wd-stage-name { display: flex; align-items: center; gap: 8px; font: 600 16px/1.2 var(--text); font-variant-numeric: tabular-nums; color: var(--chalk); }
.v-wardrobe .wd-stage.is-locked .wd-stage-name { color: var(--chalk-dim); }
.v-wardrobe .wd-now { padding: 3px 6px 4px; font: 700 12px/1 var(--text); background: var(--amber); color: var(--ink); }

/* next unlock */
.v-wardrobe .wd-next { display: grid; gap: 12px; }
.v-wardrobe .wd-next-line { font: 500 17px/1.45 var(--text); font-variant-numeric: tabular-nums; color: var(--chalk-dim); max-width: 44ch; }
.v-wardrobe .wd-next-line b { font-weight: 700; color: var(--chalk); }
.v-wardrobe .wd-next .xpbar { width: 100%; height: 12px; }
.v-wardrobe .wd-next-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font: 500 14px/1.2 var(--text); font-variant-numeric: tabular-nums; color: var(--chalk-faint); }
.v-wardrobe .wd-next-meta b { font-weight: 700; color: var(--chalk); }

@media (max-width: 899px) {
  .v-wardrobe .wd { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .v-wardrobe .wd-show { gap: 16px; }
  .v-wardrobe .wd-show .lit { --subj-s: 0.875; }
  .v-wardrobe .wd-cap .noggin-line { min-height: 0; }
  .v-wardrobe .wd-list { padding: 2px 14px; }
}
@media (max-width: 560px) {
  .v-wardrobe .wd-show .lit { --subj-s: 0.75; --stage-top: 3; }
  .v-wardrobe .wd-row-main { gap: 12px; }
  .v-wardrobe .wd-row-main .face { --px: 2px; }
  .v-wardrobe .wd[data-stage="3"] .pick-hats .face { --px: 2px; }
  .v-wardrobe .pick-hats { gap: 6px; }
  .v-wardrobe .pick-hats .tile { padding-inline: 2px; }
  .v-wardrobe .wd-stages { gap: 8px; }
}

/* ---------- Sessions: the reset happens in the room's night window ---------- */

.v-sessions .ss {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(32px, 5vw, 80px); row-gap: 28px;
  grid-template-areas: "copy win" "info win"; grid-template-rows: auto 1fr; align-items: start;
}
.v-sessions .ss-copy { grid-area: copy; }
.v-sessions .ss-reset { grid-area: win; }
.v-sessions .ss-info { grid-area: info; gap: 20px; }
.v-sessions .ss-title { margin-top: 20px; }
.v-sessions .ss-how { font-size: 16px; max-width: 46ch; }

.v-sessions .ss-facts { margin: 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 32px; padding-top: 16px; border-top: 2px solid var(--wood); }
.v-sessions .ss-facts div { display: grid; gap: 4px; }
.v-sessions .ss-facts dt { font: 600 13px/1.2 var(--text); color: var(--chalk-faint); }
.v-sessions .ss-facts dd { margin: 0; font: 600 15px/1.3 var(--text); color: var(--chalk); }

.v-sessions .ss-reset { position: relative; width: min(100%, 720px); justify-self: center; padding-inline: calc(1.2 * var(--a)); }
.v-sessions .ss-glass {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr;
  border: calc(1.2 * var(--a)) solid var(--ink);
  background: linear-gradient(to bottom, var(--sky) 0 34%, var(--teal-deep) 34% 67%, var(--glass) 67%);
}
.v-sessions .ss-glass::before {
  content: ""; position: absolute; z-index: 2; top: 0; bottom: 0;
  left: calc(50% - 0.6 * var(--a)); width: calc(1.2 * var(--a)); background: var(--ink);
}
.v-sessions .ss-rain { position: absolute; left: 0; top: 0; z-index: 1; width: var(--rain-w, 0); height: var(--rain-h, 0); pointer-events: none; }
.v-sessions .ss-rain svg { display: block; width: 100%; height: 100%; }
/* the near city in teal, its far blocks in city-near (#133640), lit windows in amber */
.v-sessions .ss-city {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: calc(7 * var(--a));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 7' shape-rendering='crispEdges'%3E%3Cpath fill='%233FA7A0' d='M0 3h3V1h2v2h4V0h2v2h3v2h4V1h3v3h3v3H0z'/%3E%3Cpath fill='%23133640' d='M0 5h2V4h4v1h3V3h3v2h4V4h3v1h3V3h2v4H0z'/%3E%3Cpath fill='%23FFB547' d='M4 2h1v1H4zM10 1h1v1h-1zM19 2h1v1h-1zM7 5h1v1H7zM17 5h1v1h-1z'/%3E%3C/svg%3E") 0 100% / calc(24 * var(--a)) calc(7 * var(--a)) repeat-x;
}
.v-sessions .ss-pane {
  position: relative; z-index: 3;
  display: grid; place-items: center; align-content: center; gap: 14px;
  padding: calc(4 * var(--a)) 20px calc(9 * var(--a));
}
.v-sessions .ss-box { position: relative; width: calc(16 * 1.2 * var(--a)); height: calc(16 * 1.2 * var(--a)); }
.v-sessions .ss-track { position: absolute; inset: 0; border: calc(1.2 * var(--a)) solid var(--teal); }
.v-sessions .ss-dot {
  position: absolute; width: calc(1.2 * var(--a)); height: calc(1.2 * var(--a)); background: var(--amber);
  left: calc(var(--x, 0) * 1.2 * var(--a)); top: calc(var(--y, 0) * 1.2 * var(--a));
}
/* the readout sits inside the square the dot walks, so the dot and its word are read together */
.v-sessions .ss-read {
  position: absolute; inset: calc(1.2 * var(--a) + 6px);
  display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center;
}
/* the phase line and the countdown are set in Figtree: Pixelify's 2 and 5 read as a reversed S and an S */
.v-sessions .ss-say { font: 600 24px/1.15 var(--text); letter-spacing: -0.01em; color: var(--chalk); text-wrap: balance; }
.v-sessions .ss-count { font: 700 44px/1 var(--text); font-variant-numeric: tabular-nums; color: var(--amber); }
.v-sessions .ss-count:empty { display: none; }
.v-sessions .ss-round { font: 600 14px/1.2 var(--text); font-variant-numeric: tabular-nums; color: var(--chalk-dim); min-height: 1.2em; }
.v-sessions .ss-back { color: var(--chalk); visibility: hidden; }
.v-sessions .is-done .ss-back { visibility: visible; }
.v-sessions .ss-sill {
  height: calc(1.6 * var(--a)); margin: 0 calc(-1.2 * var(--a));
  background: linear-gradient(to bottom, var(--wood-light) 0 33%, var(--wood-mid) 33% 66%, var(--wood-edge) 66%);
}
/* Noggin on the sill in front of the other pane, feet on the sill's lit top, watching */
.v-sessions .ss-noggin {
  --s: 0.5; position: absolute; z-index: 4; bottom: calc(1.1 * var(--a));
  left: calc(75% - var(--w, 22) * var(--s) * var(--a) / 2);
}

@media (min-width: 900px) { .v-sessions .ss-glass { min-height: calc(40 * var(--a)); } }
@media (max-width: 899px) {
  .v-sessions .ss { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "win" "info"; grid-template-rows: none; }
  .v-sessions .ss-title { margin-top: 12px; }
}
/* phones: one pane and no mullion; Noggin moves to the sill's right-hand end */
@media (max-width: 560px) {
  .v-sessions .ss-glass { grid-template-columns: 1fr; }
  .v-sessions .ss-glass::before, .v-sessions .ss-view { display: none; }
  .v-sessions .ss-pane { padding-top: calc(3 * var(--a)); }
  .v-sessions .ss-say { font-size: 20px; }
  .v-sessions .ss-count { font-size: 40px; }
  .v-sessions .ss-noggin { --s: 0.375; left: auto; right: calc(2.4 * var(--a)); }
  .v-sessions .ss-facts { grid-template-columns: repeat(2, auto); }
}
