/* Shot preview page (/photo/<spot-id>): templates/photo_shot.html.
   Same colours and card style as the Photographers toolbox (/photo). Sizes in rem; only hairline
   borders and outlines are in px.
   The stage (#ps-stage) keeps the picture and its controls together and fits one phone screen:
   view tabs, picture, plain-words readout, slider with key moments, part-of-day and date row.
   Phones: one column, stage first. From 64rem: stage in the wide left column and staying in sight,
   the text boxes on the right, the timeline below. */
.ps { --ps-ink:#e7e5e4; --ps-muted:#a8a29e; --ps-line:rgba(255,255,255,.09); --ps-amber:#f59e0b; --ps-silver:#cbd5e1;
      --ps-sun:#fde047; --ps-good:#22c55e; color:var(--ps-ink); min-width:0; overflow-wrap:anywhere; }
.ps *, .ps *::before, .ps *::after { box-sizing:border-box; }
.ps [hidden] { display:none !important; }
.ps-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

.ps-head { margin:0 0 0.625rem; }
.ps-back { display:inline-flex; align-items:center; min-height:2.75rem; color:var(--ps-amber); font-size:0.8125rem; text-decoration:none; }
.ps-back:hover { text-decoration:underline; }
.ps-h1 { font-size:clamp(1.5rem,5.5vw,2.25rem); font-weight:800; line-height:1.08; margin:0 0 0.125rem; }
.ps-kinds { font-size:0.75rem; color:var(--ps-muted); }
.ps-summary { margin:0.375rem 0 0; font-size:1rem; line-height:1.4; font-weight:600; }

/* every control: one look, one tap size */
.ps-tabs button, .ps-date a, .ps-date button, .ps-chips button, .ps-ctl button, .ps-jumps button, .ps-links a, .ps-copyrow button,
.ps-align-item a {
  min-height:2.75rem; min-width:2.75rem; display:inline-flex; align-items:center; justify-content:center; gap:0.375rem;
  border:1px solid var(--ps-line); background:rgba(255,255,255,.04); color:var(--ps-ink); border-radius:999px;
  padding:0.375rem 0.75rem; font-size:0.8125rem; line-height:1.2; text-decoration:none; cursor:pointer; font-family:inherit;
  white-space:nowrap; flex:none; }
.ps-tabs button:hover, .ps-date a:hover, .ps-date button:hover, .ps-chips button:hover, .ps-jumps button:hover, .ps-links a:hover,
.ps-copyrow button:hover, .ps-align-item a:hover { border-color:var(--ps-amber); color:var(--ps-amber); }
.ps button[aria-pressed="true"] { border-color:var(--ps-amber); color:#0c0a09; background:var(--ps-amber); font-weight:700; }
.ps button:focus-visible, .ps a:focus-visible, .ps input:focus-visible { outline:2px solid var(--ps-amber); outline-offset:2px; }

.ps-grid { display:flex; flex-direction:column; gap:0.75rem; min-width:0; }
.ps-side, .ps-below { display:flex; flex-direction:column; gap:0.75rem; min-width:0; }

/* ---- the stage ---- */
.ps-stage { display:flex; flex-direction:column; gap:0.375rem; min-width:0; border:1px solid var(--ps-line); border-radius:0.875rem;
  padding:0.375rem; background:rgba(255,255,255,.02); }
.ps-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0.375rem; }
.ps-tabs button { border-radius:0.625rem; font-weight:600; white-space:normal; }
.ps-visual { display:flex; flex-direction:column; gap:0.5rem; min-width:0; }
.ps-panel { position:relative; min-width:0; border-radius:0.625rem; overflow:hidden; background:#0c0a09; }
.ps-svg { display:block; width:100%; height:auto; }
#ps-plan { max-width:24rem; margin:0 auto; }
/* with the script: one picture at a time, in a box of a fixed height so nothing below it jumps */
/* The box takes the drawing's own shape (3:2), so no dead bands sit between the picture and its controls. */
.ps-js .ps-visual { aspect-ratio:3 / 2; width:100%; max-height:26rem; }
.ps-js .ps-panel { height:100%; }
.ps-js .ps-svg, .ps-js #ps-plan { width:100%; height:100%; max-width:none; }
/* without the script the 3D box has nothing to show but its one line */
.ps:not(.ps-js) .ps-map, .ps:not(.ps-js) .ps-3d-cover, .ps:not(.ps-js) .ps-3d-controls { display:none; }

/* By id: MapLibre's own stylesheet sets .maplibregl-map { position:relative }, which loads later and would
   leave this box 0 high (seen live 2026-12-01: a black 3D panel). */
#ps-map { position:absolute; inset:0; width:100%; height:100%; }
.ps-3d-cover { position:absolute; inset:0; margin:0; display:flex; align-items:center; justify-content:center; padding:1rem; text-align:center;
  font-size:0.8125rem; color:var(--ps-muted); }
.ps-map:not(:empty) ~ .ps-3d-cover { display:none; }
.ps-3d-error { position:absolute; inset:0; margin:0; display:flex; align-items:center; justify-content:center; padding:1rem; text-align:center;
  font-size:0.875rem; line-height:1.45; color:#fde68a; background:#0c0a09; z-index:3; }
.ps-3d-controls { position:absolute; left:0; right:0; bottom:0; z-index:2; display:flex; gap:0.75rem; align-items:center; overflow-x:auto;
  padding:0.375rem; background:linear-gradient(to top, rgba(12,10,9,.85), rgba(12,10,9,0)); scrollbar-width:thin; }
/* The map's own credit line and zoom buttons sit above our control row, never under it (the credit must stay readable). */
#ps-map .maplibregl-ctrl-bottom-left, #ps-map .maplibregl-ctrl-bottom-right { bottom:3.5rem; }
.ps-ctl { display:inline-flex; gap:0.375rem; flex:none; }
.ps-ctl button { background:rgba(12,10,9,.8); }
.ps-panel-3d:has(.ps-map:empty) .ps-3d-controls { display:none; }

.ps-readout { min-height:3.75rem; padding:0 0.25rem; }
.ps-readout-words { margin:0; font-size:1.0625rem; line-height:1.3; font-weight:700; }
.ps-readout-nums { margin:0.125rem 0 0; font-size:0.8125rem; color:var(--ps-muted); font-variant-numeric:tabular-nums; }
.ps-slider { display:block; width:100%; height:2.75rem; margin:0; accent-color:var(--ps-sun); touch-action:pan-y; }
.ps-ticks { min-width:0; }
.ps-tickline { position:relative; height:0.5rem; margin:-0.5rem 0.625rem 0.25rem; }
.ps-tickline i { position:absolute; top:0; width:0.125rem; height:0.5rem; margin-left:-0.0625rem; background:var(--ps-sun); }
.ps-jumps { display:flex; gap:0.375rem; overflow-x:auto; scrollbar-width:thin; scrollbar-color:#57534e transparent; padding-bottom:0.125rem; }
.ps-jumps button { border-radius:0.625rem; }
.ps-jumps button span { color:var(--ps-muted); font-variant-numeric:tabular-nums; }
.ps-row { display:flex; flex-wrap:wrap; gap:0.375rem 0.75rem; align-items:center; justify-content:space-between; }
.ps-chips { display:inline-flex; flex-wrap:wrap; gap:0.375rem; align-items:center; }
.ps-date { display:inline-flex; flex-wrap:wrap; gap:0.375rem; align-items:center; margin:0; }
/* with the script the date box sends itself when a day is picked */
.ps-js .ps-date-go { display:none; }
.ps-date input[type=date] { min-height:2.75rem; border:1px solid var(--ps-line); background:rgba(255,255,255,.03);
  color:var(--ps-ink); border-radius:0.625rem; padding:0.25rem 0.5rem; font-size:0.875rem; color-scheme:dark; max-width:100%; }

/* ---- text boxes ---- */
.ps-card { border:1px solid var(--ps-line); border-radius:0.875rem; padding:0.75rem 0.875rem; background:rgba(255,255,255,.02); min-width:0; }
.ps-card h2, .ps-how h2 { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:0.6875rem; letter-spacing:.16em;
  text-transform:uppercase; color:var(--ps-amber); margin:0 0 0.5rem; font-weight:600; }
.ps-archbox { margin:0; border:1px solid rgba(245,158,11,.45); background:rgba(245,158,11,.08); border-radius:0.75rem;
  padding:0.5rem 0.75rem; font-size:0.875rem; line-height:1.4; font-weight:600; }
.ps-archbox-stage { padding:0.375rem 0.625rem; font-size:0.8125rem; line-height:1.4; }

.ps-rows { margin:0; font-size:0.875rem; line-height:1.5; }
.ps-rows > div { border-top:1px solid var(--ps-line); padding:0.375rem 0; }
.ps-rows > div:first-child { border-top:0; padding-top:0; }
.ps-rows dt { color:var(--ps-muted); font-size:0.75rem; }
.ps-rows dd { margin:0; font-weight:600; }
.ps-src { color:var(--ps-muted); font-weight:400; font-size:0.75rem; line-height:1.45; }
p.ps-src { margin:0.375rem 0 0; }
.ps-line { display:block; font-weight:400; font-size:0.8125rem; margin-top:0.25rem; }
.ps-arch { color:var(--ps-amber); font-weight:600; }
.ps-closing { color:#fde68a; }
span.ps-closing { border:1px solid rgba(234,179,8,.45); background:rgba(234,179,8,.08); border-radius:0.625rem; padding:0.375rem 0.5rem; }
.ps-closing b { color:#fcd34d; }
.ps-align-item { display:flex; flex-wrap:wrap; gap:0.5rem; align-items:center; }
.ps-align-item a { color:var(--ps-amber); }

.ps-stand { margin:0 0 0.5rem; font-size:0.875rem; line-height:1.45; padding-left:0.625rem; border-left:2px solid var(--ps-ink); }
.ps-stand-candidate { border-left-style:dashed; }
.ps-stand-none { border-left-style:dotted; border-left-color:var(--ps-muted); }
.ps-copyrow { display:flex; flex-wrap:wrap; align-items:center; gap:0.5rem; }
.ps-copyrow label { flex:1 0 100%; font-size:0.75rem; color:var(--ps-muted); }
.ps-ll { flex:1 1 12rem; min-width:0; min-height:2.75rem; border:1px solid var(--ps-line); background:rgba(0,0,0,.25); color:var(--ps-ink);
  border-radius:0.625rem; padding:0.375rem 0.625rem; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:0.875rem; }
.ps-copied { font-size:0.8125rem; color:var(--ps-good); min-width:3.5rem; }
.ps-facts, .ps-notes { margin:0.5rem 0 0; padding-left:1.125rem; font-size:0.8125rem; line-height:1.5; color:var(--ps-muted); }
.ps-notes { color:var(--ps-ink); }
.ps-notes a, .ps-ban a, .ps-warn a { color:var(--ps-amber); display:inline-flex; align-items:center; min-height:2.75rem; }
.ps-links { display:flex; flex-wrap:wrap; gap:0.5rem; margin-top:0.5rem; }
.ps-links a { color:var(--ps-amber); white-space:normal; }
.ps .get-there { margin-top:0.625rem; gap:0.5rem; }
.ps .get-there-btn { min-height:2.75rem; }

.ps-tablewrap { overflow-x:auto; }
/* the script hides the table of the part of the day that is not picked: its card goes with it */
.ps-card:has(.ps-table[hidden]) { display:none; }
.ps-table { width:100%; border-collapse:collapse; font-size:0.8125rem; line-height:1.35; }
.ps-table th { text-align:left; font-weight:600; color:var(--ps-muted); padding:0.25rem 0.375rem 0.25rem 0; border-bottom:1px solid var(--ps-line); vertical-align:bottom; }
.ps-table td { padding:0.3125rem 0.375rem 0.3125rem 0; border-bottom:1px solid var(--ps-line); vertical-align:top; font-variant-numeric:tabular-nums; }
.ps-table tr.ps-now td, .ps-table tr[aria-current="true"] td { color:var(--ps-sun); font-weight:700; }

.ps-how { font-size:0.8125rem; line-height:1.55; color:var(--ps-muted); margin-top:0.625rem; }
.ps-how h3 { font-size:0.8125rem; font-weight:700; color:var(--ps-ink); margin:0.75rem 0 0.25rem; }
.ps-how ul { margin:0; padding-left:1.125rem; }
.ps-how li { margin-bottom:0.375rem; }
.ps-how .ps-fixed { color:var(--ps-ink); }

.ps-ban { border:1px solid rgba(239,68,68,.5); background:rgba(239,68,68,.08); border-radius:0.625rem; padding:0.625rem 0.75rem;
  margin-top:0.5rem; font-size:0.875rem; line-height:1.45; }
.ps-ban b { color:#fca5a5; }
.ps-warn { border:1px solid rgba(234,179,8,.45); background:rgba(234,179,8,.08); border-radius:0.75rem; padding:0.625rem 0.75rem;
  margin:0; font-size:0.8125rem; line-height:1.45; }

@media (min-width: 64rem) {
  .ps-grid { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:0.875rem; align-items:start; }
  .ps-stage { position:sticky; top:4.5rem; }
  .ps-below { grid-column:1 / -1; }
  .ps-js .ps-visual { max-height:min(26rem,42vh); }   /* the whole stage stays in sight while the text scrolls */
}
