/* LAWS:
   - design only. No copy, no logic, no data — a rule here decides how the chooser LOOKS and nothing
     about which doors exist, what they say, or where they go.
   - colours come from the kit's semantic tokens; geometry from the --ch* raw tokens. No hex, no px
     literal (spelltrail/tools/ui-gate.mjs check ①).
   - IT BORROWS THE HOME DOORS' SHAPE ON PURPOSE. `.doorbtn` is the vocabulary a child already knows
     for "a place you can go"; a chooser door is that door with a painting where the icon was. The
     tokens are index.html's own numbers (see tokens.raw.css --ch*), so the two cannot drift apart
     without somebody noticing they were supposed to match.
   - EVERY SELECTOR HERE IS INSIDE #chooser. The screen owns no global rule.
   History: NOTES.md */

#chooser .chhead{ margin:var(--chHeadGap); }

/* ══ THE ROW ══════════════════════════════════════════════════════════════════════════════════
   Three fixed columns, centred — `.bigrow`'s own declaration with a third column. It stacks below
   --chStack rather than at the app's usual phone step, because the arithmetic decides it: three
   252px doors and two 18px gutters need 828px and there is no width between that and the phone
   where a squeezed three-up is better than a clean one-up. */
#chooser .chrow{
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, var(--chDoor));
  gap:var(--chGap); justify-content:center; align-items:stretch;
}

/* ══ A DOOR ═══════════════════════════════════════════════════════════════════════════════════
   A painting, a title plate and one line. `overflow:hidden` is what lets the painting run flush to
   the rounded top edge; the words carry their own inset so nothing else has to. */
#chooser .door{
  width:auto; min-height:var(--chTap); padding:var(--chPad); border-radius:var(--chR);
  overflow:hidden; cursor:pointer; text-align:center;
  display:flex; flex-direction:column; font:inherit; color:var(--ink);
  background:linear-gradient(180deg,var(--panelHi),var(--panelLo));
  border:var(--chRule) solid var(--line);
  box-shadow:var(--chDrop), var(--chInset);
  transition:transform var(--chMove) ease, border-color var(--chMove) ease, box-shadow var(--chMove) ease;
}
/* HOVER IS A COLOUR (ROADMAP §34.2's ruling, applied here by §34.8's sweep). Owner, of the three
   bars on Camp: *"Don't nudge them up when you hover over it. I don't like that, just change the
   colour."* These doors are the same thing one screen along — a whole card that is one button —
   and they lifted `--chLift`. The gold edge and the ring stay; the move goes. (The reduced-motion
   block below is now saying the same thing twice, and it stays: a rule that survives a token
   change is worth the two lines.) */
@media (hover:hover){ #chooser .door:hover{
  border-color:var(--gold); background:var(--chipOn);
  box-shadow:var(--chDropHi), var(--chRing);
} }
/* the painting. `cover` is the contract the art lane rendered to: the rolls are 21:9 and the door
   crops them from both sides, which is why the subject sits in the middle third (§6 correction 2).
   A missing file paints the plate's own ground and the words below are unchanged. */
#chooser .door .dart{ display:block; line-height:0; background:var(--panelLo); }
#chooser .door .dimg{ display:block; width:100%; height:var(--chArt); object-fit:cover; }
#chooser .door .dt{
  display:block; padding:var(--chTextPad); margin-top:var(--chTitleGap);
  font-family:var(--fdisp); font-weight:900; font-size:var(--chTitle); letter-spacing:var(--chTrack); line-height:1.15;
}
/* TWO LINES, AND THE SECOND ONE ELLIPSES. Not tidiness: door 1's line is the goal card's, which
   names a place AND its pattern AND the weather, and at 280px that is four rows — three doors of
   which do not fit a 640px-tall phone, which is the geometry the whole screen was measured to. */
#chooser .door .dd{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:var(--chLines); overflow:hidden;
  padding:var(--chTextPad); margin-top:var(--chBlurbGap);
  color:var(--mut); font-size:var(--chBlurb); line-height:1.5;
}

#chooser .chfoot{ margin-top:var(--chGap); text-align:center; }
#chooser .chfoot .btn{ min-height:var(--chTap); }

/* ── THE PHONE (and anything too narrow for three) ─────────────────────────────────────────────
   828px, written as 51.75em because a media query cannot read a token — the same note --trStack
   carries. One column, each door capped at the phone's 280, and a slightly shorter painting so
   three doors AND their titles still clear a 640px-tall viewport. */
@media (max-width:51.75em){
  #chooser .chrow{ grid-auto-flow:row; grid-auto-columns:auto; grid-template-columns:minmax(0, var(--chDoorPhone)); }
  #chooser .door .dimg{ height:var(--chArtPhone); }
}

/* ── NO MOTION, PLEASE ─────────────────────────────────────────────────────────────────────────
   This codebase kills animation rather than shortening it. The lift is the only movement on the
   screen and it goes entirely; the border and the shadow still answer a pointer, instantly. */
@media (prefers-reduced-motion: reduce){
  #chooser .door{ transition:none; }
  @media (hover:hover){ #chooser .door:hover{ transform:none; } }
}

/* THE PRESS (polish survey 2026-11-11, item 8): a door settles under a finger; under reduced motion it dims instead. */
#chooser .door:active{ transform:scale(var(--press-card)); }
@media (prefers-reduced-motion:reduce){ #chooser .door:active{ transform:none; opacity:var(--press-dim); } }
