/* passenger.css — the passenger page in the new front page's LIGHT look
   (site-redesign, Arthur 2026-11-17: "Make this page light themed pls";
   it was the site's dark look since 2026-10-18): paper under everything with
   the front page's faint dithered sea at the window's foot, the cards paper
   plates with a 2 px ink edge and ink type, the accent on the one primary
   button (black type on it, never bare orange type: an error is ink on an
   orange plate), the figure on its dithered grey and white in an ink frame. Three layouts by mode:
   CODE is a login page — one centred card and nothing else; VIEW is the
   picture and one card; the BUILDER pins the picture to the top of a phone
   as a band, scrolls the pickers under it and keeps ROLL and SAVE in a bar
   at the foot, always under the thumb. From 720 px the picture holds still
   on the left and the card scrolls on the right. */

:root {
  /* the night sea's dark blue-grey (PALETTE 0x262b44), as the dither's dot on the ink */
  --night: #262b44;
  /* the stage's backdrop (the engine's PASSENGER.BACKDROP): an even checker
     of PALETTE's light grey 0xc0cbdc on white at 2 px a dot, here for the
     frame before the picture draws and when it cannot */
  --stage-white: #ffffff;
  --dg50: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%23c0cbdc'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23c0cbdc'/%3E%3C/svg%3E");
  --dn25: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Crect width='1' height='1' fill='%23262b44'/%3E%3C/svg%3E");
}
html { background: var(--paper); }
body[data-page="passenger"] { background: var(--paper); color: var(--ink); }
/* the front page's faint sea (img/sea.png, tools/landing-sea.mjs) at the
   window's foot, under everything; its own layer, so pixelated reaches
   nothing else */
body[data-page="passenger"]::before { content: ""; position: fixed; z-index: 0; left: 0; right: 0; bottom: 0; height: 340px; pointer-events: none;
  background: url("img/sea.png") repeat-x left bottom / 128px 400px; image-rendering: pixelated; image-rendering: crisp-edges; }
/* the shell's dark pieces (site.css), light on this page */
body[data-page="passenger"] .corner a { color: var(--ink); }
body[data-page="passenger"] .gate input { border-color: var(--ink); background: var(--paper); color: var(--ink); }
body[data-page="passenger"] .gate input::placeholder { color: var(--ink); opacity: 0.3; }
body[data-page="passenger"] .gate .err { color: var(--ink); background: var(--accent); padding: 6px 10px; }
body[data-page="passenger"] .gate .err.wait { color: var(--ink); background: none; padding: 0; opacity: 0.75; }
/* the login card (2026-11-21): YOUR CODE as its title, the box under it,
   the ticket drawing right under the box, always in sight, no rule above it */
body[data-page="passenger"] .gate h1 { margin: 0; }
body[data-page="passenger"] .gate .row { margin-top: 16px; }
body[data-page="passenger"] .gate .info-box { margin: 16px 0 0; padding: 0; border-top: 0; }
/* scrollbars as on the front page: a square ink bar on a plain panel track, no arrows */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: rgba(18, 21, 26, 0.08); }
::-webkit-scrollbar-thumb { background: var(--ink) padding-box; border: 3px solid transparent; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(18, 21, 26, 0.8); }
::-webkit-scrollbar-thumb:active { background-color: var(--accent); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
@supports not selector(::-webkit-scrollbar) { html { scrollbar-color: var(--ink) rgba(18, 21, 26, 0.08); } }
/* the header floats over the page (site.css): the logo, and the one word back at the right */
body[data-page="passenger"] .top { grid-template-columns: 40px 1fr auto; }
/* BACK is the front page's LOG IN button: a paper plate with an ink edge
   (in view mode the picture runs under the header) */
.top .back { justify-self: end; font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; text-decoration: none; line-height: 1; padding: 13px 14px 12px;
  color: var(--ink); background: var(--paper); border: 2px solid var(--ink); }
.top .back:hover { background: var(--ink); color: var(--paper); }
.top .back[hidden] { display: none; }
body[data-page="passenger"] .corner { position: static; margin: 24px 0 0; justify-content: center; }
/* the login page keeps the terms in sight at the foot of the window */
main[data-mode="login"] ~ .corner { position: fixed; margin: 0; }

.pax { position: relative; z-index: 1; max-width: 420px; padding: calc(var(--top) + 8px) var(--gutter) 24px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
/* code mode: the login card alone, on the window's centre */
main[data-mode="login"] { min-height: 100vh; min-height: 100dvh; justify-content: center; padding-top: var(--top); padding-bottom: 72px; }
/* a hidden part stays hidden whatever layout rule names it below */
.pax .stage[hidden], .pax .card[hidden] { display: none !important; }

/* ---------------------------------------------------------------- the picture */
.stage { display: flex; justify-content: center; }
.frame { position: relative; width: 100%; height: clamp(240px, 40vh, 460px); background: var(--stage-white) var(--dg50) 0 0 / 4px 4px; border: 2px solid var(--ink); overflow: hidden;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.frame:active { cursor: grabbing; }
.frame:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; }
.frame canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: block; }
/* VIEW MODE'S CHEVRONS (Arthur, 2026-10-20): paper squares with an ink rim
   stepping through the passengers who have saved a look, the chevron a
   16-pixel drawing dead centre in the square; on a phone either side of the
   figure halfway down its picture, on a wide window under the card */
.cycle { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); pointer-events: auto; }
.cycle svg { display: block; width: 16px; height: 16px; fill: currentColor; shape-rendering: crispEdges; }
.cycle[hidden] { display: none; }
@media (hover: hover) { .cycle:hover { background: var(--ink); color: var(--paper); } }
.stage .cycle { position: absolute; top: 50%; z-index: 6; margin-top: -22px; }
.stage .cycle.prev { left: 12px; }
.stage .cycle.next { right: 12px; }
.card .cycles { display: none; }
.frame .nopic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
  color: var(--ink); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; line-height: 1.6; }

/* ---------------------------------------------------------------- the cards: paper plates, ink edge */
.card { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); padding: 16px; width: 100%; }
.card .kick { opacity: 0.85; }
.card h1 { font-size: 20px; letter-spacing: 2px; margin: 4px 0 0; }
.card h1.no { font-size: 32px; letter-spacing: 1px; }
.card .name { font-weight: 500; font-size: 16px; letter-spacing: 1px; margin: 4px 0 0; overflow-wrap: anywhere; }
.card .ruler { display: block; flex: none; width: 100%; height: 12px; margin: 12px 0 2px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 10px) 0 100% / 100% 7px no-repeat; }
.card .tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; }
.card .tag[hidden] { display: none; }
.card .tag.paper { box-shadow: inset 0 0 0 2px var(--ink); }
.card .cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.card .cta .btn { flex: 1 1 auto; }

/* code mode: the code box, GO, the error and the ticket drawing are the
   shell's (site.css) */

/* the builder: who this is with ROLL at its right, the pickers as a
   ledger — a label, the choice between two 44 px chevrons, a swatch on a
   colour row, the count under the name — and the bar: the two tabs as
   tags (the list window's) and SAVE */
.build .id { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.build .id > div { min-width: 0; }
.build .roll { flex: 0 0 auto; margin: 2px 0 0; }
.build .tabs { display: flex; gap: 8px; margin: 0; }
.build .tabs [role="tab"] { flex: 1 1 0; font: inherit; font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; line-height: 1;
  min-height: 44px; padding: 11px 12px 10px; background: transparent; color: var(--paper); border: 2px solid var(--paper); cursor: pointer; }
.build .tabs [role="tab"][aria-selected="true"] { background: var(--paper); color: var(--ink); }
.build .tabs [role="tab"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* each tab's icon before its word (Arthur, 2026-10-20): the bust for
   CHARACTER, the shirt for OUTFIT, drawn on the 16-pixel grid in the tab's
   own color */
.build .tabs [role="tab"] { display: flex; align-items: center; justify-content: center; gap: 8px; }
.build .tabs .ico { flex: 0 0 auto; width: 16px; height: 16px; fill: currentColor; shape-rendering: crispEdges; }
/* the list is one grid and each row takes its columns (subgrid), so the
   label column is as wide as the longest label in every row at once —
   ACCESSORIES ran into its stepper on a narrow phone (Arthur, 2026-10-20) —
   and the steppers still start on one line; a browser without subgrid keeps
   each row's own fractions */
.pickers { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr) 44px; column-gap: 8px; align-content: start; }
.pickers[hidden] { display: none; }
/* every row on one grid — the label, the stepper, and a 44 px column for a
   color button — so the steppers start at one line down the card (Arthur,
   2026-10-20); a row with no color button lets its stepper run on across
   that column, so they end at one line too */
.pick { display: grid; grid-template-columns: minmax(80px, 0.9fr) minmax(0, 2fr) 44px; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.35); }
.pick .sw { grid-column: 2 / -1; }
.pick.tinted .sw { grid-column: 2; }
.pick:first-child { border-top: 0; }
.pick .lbl { font-weight: 500; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; opacity: 0.85; line-height: 1.4; }
/* a narrow phone sets the labels tighter, so the longest leaves the stepper room */
@media (max-width: 399px) { .pick .lbl { letter-spacing: 1px; } }
.pick .sw { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: stretch; min-height: 44px; border: 2px solid var(--paper); }
.pick .sw:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick .chev { width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 400; line-height: 1; color: var(--paper); }
/* the hover fills only where there is a pointer that hovers: on a phone a
   tap left the chevron filled after the finger lifted */
@media (hover: hover) { .pick .chev:hover { background: var(--paper); color: var(--ink); } }
.pick .chev:focus-visible { outline-offset: -3px; }
.pick .val { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4px 2px; min-width: 0; }
.pick .nm { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12px; letter-spacing: 0.5px; line-height: 1.25; overflow-wrap: anywhere; }
.pick .swb { display: contents; }
.pick .cnt { font-weight: 500; font-size: 9px; letter-spacing: 1px; opacity: 0.7; margin-top: 2px; }
.pick .swatch { flex: 0 0 14px; width: 14px; height: 14px; shape-rendering: crispEdges; }
/* THE COLOR BUTTON AND ITS DRAWER (Arthur, 2026-10-20): a square at the
   row's right as tall as the stepper, showing the color the thing wears;
   the drawer under the row the whole width, every color on offer a square
   in a grid, the one on the figure ringed in the accent */
.pick .tint { width: 44px; height: 44px; padding: 6px; border: 2px solid var(--paper); display: flex; }
.pick .tint .swatch { flex: 1 1 auto; width: 100%; height: 100%; }
.pick .tint[aria-expanded="true"] { background: var(--paper); }
@media (hover: hover) { .pick .tint:hover { background: var(--paper); } }
.pick .drawer { grid-column: 1 / -1; margin: 2px 0 4px; padding: 10px; border: 2px solid var(--paper); }
.pick .drawer[hidden] { display: none; }
.drawer .dname { font-weight: 500; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; opacity: 0.85; line-height: 1.4; margin: 0 0 8px; }
.drawer .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.drawer .cell { aspect-ratio: 1 / 1; min-height: 40px; padding: 4px; border: 2px solid transparent; display: flex; }
.drawer .cell .swatch { flex: 1 1 auto; width: 100%; height: 100%; }
@media (hover: hover) { .drawer .cell:hover { border-color: var(--paper); } }
.drawer .cell[aria-pressed="true"] { border-color: var(--accent); }
.drawer .cell:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
@media (prefers-reduced-motion: no-preference) { .pick .drawer:not([hidden]) { animation: drawer-open 160ms ease-out; } }
@keyframes drawer-open { from { opacity: 0; transform: translateY(-4px); } }
.bar { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; }
.bar .acts { display: flex; gap: 8px; }
.bar .acts .tabs { flex: 2 1 0; min-width: 0; }
.bar .acts .btn { flex: 1 1 0; }
/* SAVE's rim in its own accent: on the ink card and bar an ink rim reads as
   no rim, and the button looked 4 px shorter than the paper-rimmed tabs
   beside it (Arthur, 2026-10-20) */
.build #save { border-color: var(--accent); }
.bar .note { font-size: 13px; font-weight: 500; line-height: 1.5; }
.bar .note:empty { display: none; }
.bar .note.bad { color: var(--accent); }
.bar .note a { font-weight: 700; }
/* a phone: the bar fixed to the foot, always under the thumb — HEAD,
   OUTFIT and SAVE in one row (Arthur, 2026-10-20: the tabs always in
   sight; ROLL matters less and rides up by the name) — and the card keeps
   room under it */
@media (max-width: 719px) {
  /* THE BUILDER ON A PHONE (Arthur, 2026-10-19: the whole width, no frame
     in a frame): the picture is the band itself — edge to edge, from the
     very top of the screen (the logo floats on it), no rim — pinned there
     while the pickers scroll under it; the card follows straight under it,
     the whole width too, a paper rule on its top edge the one line between */
  main[data-mode="build"], main[data-mode="view"] { max-width: none; gap: 0; }
  main[data-mode="build"] .stage, main[data-mode="view"] .stage { position: sticky; top: 0; z-index: 5; margin: calc(-1 * (var(--top) + 8px)) calc(-1 * var(--gutter)) 0; }
  main[data-mode="build"] .frame, main[data-mode="view"] .frame { height: clamp(280px, 48vh, 540px); border: 0; }
  main[data-mode="build"] .card.build, main[data-mode="view"] .card.who { width: auto; margin: 0 calc(-1 * var(--gutter)); border-width: 2px 0 0; }
  /* THE TOGGLE (Arthur, 2026-10-20): on a phone the two tabs are one
     element — a paper rim split in two, the open half filled — with the
     icons alone; the words stay for a screen reader */
  main[data-mode="build"] .bar .acts .tabs { flex: 1 1 0; gap: 0; border: 2px solid var(--paper); }
  main[data-mode="build"] .bar .tabs [role="tab"] { min-width: 0; min-height: 40px; padding: 0; border: 0; }
  main[data-mode="build"] .bar .tabs [role="tab"] + [role="tab"] { border-left: 2px solid var(--paper); }
  main[data-mode="build"] .bar .tabs [role="tab"]:focus-visible { outline-offset: -5px; }
  main[data-mode="build"] .bar .tabs .ico { width: 22px; height: 22px; }
  main[data-mode="build"] .bar .tabs .tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  main[data-mode="build"] .bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; margin: 0; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--ink); border-top: 2px solid var(--paper); }
  main[data-mode="build"] { padding-bottom: 112px; }
  /* THE VIEW PAGE ON A PHONE (Arthur, 2026-10-20): the card sits at the foot
     of the screen and the picture takes all the rest — about two thirds on
     a phone — never less than 280 px; the band scrolls with the page here
     (nothing runs under it to pin it over), the terms ride the screen's foot
     on the card */
  main[data-mode="view"] { min-height: 100vh; min-height: 100dvh; padding-bottom: 0; }
  main[data-mode="view"] .stage { position: relative; flex: 1 1 auto; flex-direction: column; min-height: 280px; }
  main[data-mode="view"] .frame { flex: 1 1 auto; height: auto; min-height: 0; }
  main[data-mode="view"] .card.who { flex: 0 0 auto; padding-bottom: 44px; }
  main[data-mode="view"] ~ .corner { position: fixed; margin: 0; }
}
/* a wide window: the picture on the left, held still; the card on the right */
@media (min-width: 720px) {
  .pax { max-width: 760px; flex-direction: row; align-items: flex-start; gap: 24px; padding-top: calc(var(--top) + 16px); }
  main[data-mode="login"] { flex-direction: column; align-items: center; }
  main[data-mode="login"] .card { flex: 0 0 auto; }   /* the card its own height, not the window's */
  .stage { position: sticky; top: calc(var(--top) + 16px); flex: 0 0 300px; }
  .frame { width: 300px; height: 420px; }
  /* THE BUILDER ON A WIDE WINDOW (Arthur, 2026-10-19): the picture fills
     the whole window behind the card, no rim; the stage's own box stays in
     the row as an empty spacer where the frame used to be, so the card
     keeps its place, and the figure stands on the spacer's centre line
     (passenger.js). The spacer is static, not sticky, and lets the pointer
     through: a sticky box would make its own layer and lift the picture
     over the card. The terms go ink on the light picture. */
  main[data-mode="build"] .stage { position: static; pointer-events: none; }
  /* the view's spacer is the figure's column the whole height, so the
     chevrons can stand halfway down either side of the figure */
  main[data-mode="view"] .stage { position: relative; top: auto; align-self: stretch; pointer-events: none; }
  /* a wide window steps from under the card, at its right edge (Arthur,
     2026-10-20); the picture's own pair is the phone's */
  main[data-mode="view"] .stage .cycle { display: none; }
  main[data-mode="view"] .card.who { position: relative; }
  main[data-mode="view"] .card .cycles { position: absolute; top: 100%; right: -2px; display: flex; gap: 8px; margin: 12px 0 0; }
  main[data-mode="build"] .frame, main[data-mode="view"] .frame { position: fixed; inset: 0; z-index: -1; width: auto; height: auto; border: 0; pointer-events: auto; }
  main[data-mode="build"] ~ .corner a, main[data-mode="view"] ~ .corner a { color: var(--ink); }
  .card { flex: 1 1 auto; min-width: 0; max-width: 420px; }
  /* THE ROW GROWS WITH THE WINDOW (Arthur, 2026-10-20: the figure and the
     card sat too close on a wide screen): the spacer the figure stands in
     and the gap after it widen with the window, up to a cap, so a laptop
     gets air between the two and an ultra-wide screen no more than a
     desktop's; the pair stays centred */
  main[data-mode="build"], main[data-mode="view"] { max-width: 1180px; justify-content: center; gap: clamp(24px, 6vw, 120px); }
  main[data-mode="build"] .stage, main[data-mode="view"] .stage { flex: 0 1 clamp(300px, 34vw, 520px); }
  main[data-mode="build"] .card.build, main[data-mode="view"] .card.who { flex: 0 0 420px; }
  /* THE PAGE NEVER SCROLLS (Arthur, 2026-10-20): the builder is exactly the
     window's height, the terms ride the window's foot, and a card taller
     than the window keeps its top and its foot in place while the pickers
     scroll inside it */
  main[data-mode="build"], main[data-mode="view"] { height: 100vh; height: 100dvh; padding-bottom: 40px; }
  main[data-mode="build"] ~ .corner, main[data-mode="view"] ~ .corner { position: fixed; margin: 0; justify-content: flex-start; }
  main[data-mode="build"] .card.build { max-height: 100%; }
  .card.build { display: flex; flex-direction: column; }
  .card.build .pickers { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--paper) transparent; }
  /* THE BAR OPENS UP: the tabs over the pickers, SAVE alone at the foot of
     the card the whole width, its note just above it */
  .card.build .bar, .card.build .acts { display: contents; }
  .card.build .id { order: 1; }
  .card.build .tabs { order: 2; margin: 14px 0 0; }
  .card.build .pickers { order: 3; }
  .card.build .note { order: 4; margin: 12px 0 0; }
  .card.build #save { order: 5; margin: 14px 0 0; }
}

/* ---------------------------------------------------------------- the designer's card stays dark
   (Arthur, 2026-11-17: "this menu should have remained in the dark theme"):
   the page around it light, the card itself the old ink plate; its pickers,
   tabs, SAVE and the phone's bar keep their own dark rules above */
.card.build { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------------------------------------------------------------- the sign-in form (2026-11-18)
   the code box a password box the browser can save and fill in, with SHOW at
   its right edge (Edge's own eye hidden, so there is one); GO beside it, under
   it on a phone (site.css) */
.gate .signin { margin: 0; }
.gate .codebox { position: relative; display: flex; flex: 1 1 auto; min-width: 0; }
.gate .codebox input { width: 100%; padding-right: 48px; }
.gate .codebox input::-ms-reveal, .gate .codebox input::-ms-clear { display: none; }
/* the eye (2026-11-21): 12 x 12 pixels at 2 px each, ink; the slash only while the code shows */
.gate .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 8px; background: none; border: 0; line-height: 0; color: var(--ink); cursor: pointer; }
.gate .eye svg { display: block; width: 24px; height: 24px; fill: currentColor; shape-rendering: crispEdges; }
.gate .eye .slash { display: none; }
.gate .eye[aria-pressed="true"] .slash { display: inline; }
.gate .eye:hover svg { opacity: 0.65; }
.gate .eye:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
