/* rohin.me - Now (js/scenes/opening.js), the parts that came with Sky on 14 Nov: the timeline under the map, the rows
   that are not links, the strip of today's highlights and conditions, the Data panel's Spotted list. The map, the rows
   and the shade under the words are in css/scenes.css ("1. now"). The timeline's buttons keep the old Sky class names
   (sky-live, sky-play, scrub-*) so the other looks in css/look.css still dress them. Tokens only. */

/* ---- the timeline: Live, Play, the last days as bars, the moment shown */
.now-time { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-4); align-items: center; }
.scrub-buttons { display: flex; align-items: center; gap: .4rem; }
.sky-live { display: inline-flex; align-items: center; gap: .45rem; height: var(--tap); padding: 0 .95rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--glass); font-size: var(--t-small); font-weight: 500; color: var(--ink-2); transition: border-color var(--fast), color var(--fast), transform var(--fast) var(--ease); }
.sky-live[aria-pressed="true"] { color: var(--ink); border-color: var(--line-strong); }
.sky-live[aria-pressed="false"] .live-dot { background: var(--ink-3); animation: none; }
.sky-live[aria-pressed="false"] { color: var(--ink); border-color: var(--accent); }      /* in a replay: the way back to live, plainly a button */
.sky-play { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--ink); transition: border-color var(--fast), transform var(--fast) var(--ease); }
.sky-play .ico { fill: currentColor; stroke-width: 1; }
.sky-live:hover, .sky-play:hover { border-color: var(--line-strong); }
.sky-live:active, .sky-play:active { transform: scale(.94); }
.scrub-line { display: grid; gap: .1rem; min-width: 0; }
.scrub-track { position: relative; height: calc(var(--tap) + 1px); border-bottom: 1px solid var(--line-strong); }
.scrub-spark { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the slider: a sideways drag here belongs to it, never to the page (core.js leaves form controls alone) */
.scrub-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: ew-resize; touch-action: none; }
.scrub-range::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.scrub-range::-moz-range-track { height: 100%; background: transparent; }
.scrub-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 2.75rem; border: 0; border-radius: 8px; background: linear-gradient(to right, transparent 10px, var(--ink) 10px, var(--ink) 12px, transparent 12px), radial-gradient(circle at 50% 5px, var(--ink) 0 5px, transparent 5.5px); cursor: ew-resize; }
.scrub-range::-moz-range-thumb { width: 22px; height: 2.75rem; border: 0; border-radius: 8px; background: linear-gradient(to right, transparent 10px, var(--ink) 10px, var(--ink) 12px, transparent 12px), radial-gradient(circle at 50% 5px, var(--ink) 0 5px, transparent 5.5px); cursor: ew-resize; }
.scrub-range:focus-visible { outline-offset: 4px; }
.scrub-ends { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3); font-size: .6875rem; line-height: 1.4; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.scrub-at { text-align: center; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-time[data-replay] .scrub-track { border-bottom-color: var(--accent); }
.now-time[data-replay] .scrub-at { color: var(--accent); }

/* ---- the rows: every one a door with a quiet › (Signals on its band, Birds on that bird, Radio); Radio's own ▶ stands
   in the place of its icon and plays the station from here */
.hear-go { display: grid; place-items: center; color: var(--ink-3); transition: color var(--fast), transform var(--fast) var(--ease); }
.hear-go .ico { transform: rotate(-90deg); }
.hearing a:hover .hear-go { color: var(--ink); transform: translateX(2px); }
.hearing li.has-play { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .5rem; }
.scene-opening .hearing li.has-play a { grid-template-columns: minmax(0, 1fr) auto; }      /* over the looks' own columns (css/look.css): no icon here */
.hearing li.has-play .hear-ico { display: none; }
.hear-play { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--accent); transition: border-color var(--fast), transform var(--fast) var(--ease); }
.hear-play .ico { fill: currentColor; stroke-width: 1; }
.hear-play:hover { border-color: var(--line-strong); }
.hear-play:active { transform: scale(.94); }
.hear-play[aria-pressed="true"] { border-color: var(--accent); }
.hear-play[data-busy] .ico { animation: breathe 1.2s var(--ease-in-out) infinite; }

/* ---- the strip: Farthest, Highest, Fastest, Peak hour, then tide, earthquakes, a satellite pass, Sea-Tac, pressure */
.glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr)); gap: 6px; min-width: 0; }
.gl { display: grid; align-content: start; gap: .05rem; min-width: 0; padding: .45rem .7rem .5rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); }
.gl[hidden] { display: none; }
.gl-k { display: flex; align-items: center; gap: .3rem; min-width: 0; font-size: var(--t-tiny); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-k .ico { flex: none; color: var(--ink-3); }
.gl-v { font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.gl-s { min-height: 1em; font-size: var(--t-tiny); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

/* ---- the timeline in the panel, one 44px row everywhere (round 22; UX review #15): Live, ▶, the bars with the days
   under them (Mon Tue ... Now), the moment replayed written under the thumb in place of the days. The same look as the
   site's other time strips (Live · ▶ · bars with their ticks). */
.now-panel .scrub-line { position: relative; display: block; }
.now-panel .scrub-track { height: var(--tap); border-bottom: 0; }
.now-panel .scrub-spark { inset: 1px 0 auto 0; height: 1.6rem; }
.now-panel .scrub-track::after { content: ''; position: absolute; left: 0; right: 0; top: calc(1.6rem + 1px); height: 1px; background: var(--line-strong); pointer-events: none; }
.now-time[data-replay] .scrub-track::after { background: var(--accent); }
.now-panel .scrub-range::-webkit-slider-thumb { height: calc(1.6rem + 4px); margin-top: 0; }
.now-panel .scrub-range::-moz-range-thumb { height: calc(1.6rem + 4px); }
.scrub-ticks { position: absolute; left: 0; right: 0; bottom: 0; height: .95rem; pointer-events: none; font-size: .6875rem; line-height: .95rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; transition: opacity var(--fast); }
.scrub-ticks span { position: absolute; top: 0; }
.scrub-ticks span:last-child { right: 0; }
.now-time[data-replay] .scrub-ticks { opacity: 0; }
.now-panel .scrub-ends { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: .95rem; pointer-events: none; }
.now-panel .scrub-ends > span:not(.scrub-at) { display: none; }
.now-panel .scrub-at { position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: .6875rem; line-height: .95rem; overflow: visible; }

/* ---- the panel's own buttons: fold (the card to a pill and back), More (the rest of the tiles) */
.np-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-2); min-width: 0; }
.np-bar[hidden], .np-body[hidden], .np-pill[hidden], .np-more[hidden] { display: none; }
.np-body { display: grid; gap: var(--s-2); min-width: 0; }
.np-fold { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; border: 1px solid transparent; color: var(--ink-2); transition: color var(--fast), background var(--fast), border-color var(--fast); }
.np-fold:hover { color: var(--ink); border-color: var(--line); background: var(--glass); }
.np-pill { display: inline-flex; align-items: center; gap: .55rem; height: var(--tap); max-width: 100%; padding: 0 .85rem 0 1rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--glass-strong); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); box-shadow: var(--shadow);
  color: var(--ink); font-size: var(--t-small); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; transition: border-color var(--fast), transform var(--fast) var(--ease); }
.np-pill:hover { border-color: var(--line-strong); }
.np-pill:active, .np-fold:active, .np-more:active { transform: scale(.96); }
.np-pill-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.np-pill .ico { flex: none; color: var(--ink-2); transform: rotate(180deg); }
.scene-opening[data-replay] .np-pill { border-color: var(--accent); }
.scene-opening[data-replay] .np-pill .live-dot { background: var(--accent); animation: none; }
.np-more { min-width: var(--tap); min-height: var(--tap); padding: 0 .9rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--glass); color: var(--ink); font-size: var(--t-small); font-weight: 500; white-space: nowrap; transition: border-color var(--fast), background var(--fast), transform var(--fast) var(--ease); }
.np-more:hover, .np-more[aria-expanded="true"] { border-color: var(--line-strong); }
/* folded, the panel is only its pill: the rest of its row belongs to the map (a craft's card in it on a phone stays live) */
.scene-opening.has-map .now-panel[data-folded] { pointer-events: none; }
.scene-opening.has-map .now-panel[data-folded] > * { pointer-events: auto; }
/* the card or the pill comes in softly when it is folded or opened (none with less motion: css/system.css) */
.now-panel.np-in > :not([hidden]) { animation: np-in var(--med) var(--ease); transform-origin: 0 100%; }
@keyframes np-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ---- phones, upright tablets and small windows: the same parts as a compact strip under the map. The rows two by two;
   every tile in one line that scrolls sideways inside itself (no More: the line holds them all) */
@media (max-width: 899px), (max-aspect-ratio: 9 / 10) {
  .opening-text { gap: var(--s-2); }
  .now-time { gap: var(--s-2); }
  .sky-live { padding: 0 .7rem; }
  .now-panel .hearing { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-3); }
  .now-panel .hearing a { gap: .45rem; min-height: var(--tap); padding: .2rem 0; }
  .now-panel .hear-ico { width: 1.4rem; height: 1.4rem; border: 0; background: none; }
  .now-panel .hear-main { gap: .4rem; }
  .now-panel .hear-main b { font-size: .9375rem; }
  .now-panel .hear-label { min-width: 0; }
  .np-tiles { display: flex; gap: 6px; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; touch-action: pan-x pinch-zoom; }
  .np-tiles::-webkit-scrollbar { display: none; }
  .np-tiles .glance, .np-extra, .np-extra-in { display: contents; }
  .np-tiles .np-more { display: none; }
  .gl { flex: 0 0 auto; min-width: 6.5rem; max-width: 9rem; scroll-snap-align: start; padding: .4rem .6rem .45rem; }
  .gl-v { font-size: .9375rem; }
  .now-panel[data-folded] { justify-items: start; }
}
/* a phone: the bird and the song are named by their icon and their ▶, so their names have the width; a narrower › */
@media (max-width: 480px) {
  .now-panel .hearing li:is([data-kind="yard"], [data-kind="radio"]) .hear-label { display: none; }
  .now-panel .hearing { column-gap: var(--s-2); }
  .scene-opening .now-panel .hearing a { column-gap: .4rem; }
  .now-panel .hearing li.has-play { gap: .35rem; }
  .now-panel .hear-go .ico { width: 12px; height: 12px; }
}
/* a short phone (an iPhone SE, 320 x 568): each tile one line, the label over the figure without the line under it, so
   the map keeps more of the screen */
@media (max-height: 700px) and ((max-width: 899px) or (max-aspect-ratio: 9 / 10)) {
  .now-panel .gl { display: flex; align-items: baseline; gap: .4rem; min-width: 0; max-width: none; padding: .35rem .6rem; }
  .now-panel .gl-s { display: none; }
  .now-panel .gl-v { font-size: .875rem; }
}
/* a craft's card on a phone takes the strip's place (and the bird's and the radio's: css/scenes.css) */
.scene-opening.card-in-text .np-tiles { display: none; }

/* ---- wide screens: one card at the lower left, a third of the map at most (Rohin, 15 Nov: "This is big, make it nicer
   and UX friendly"). The timeline is one slim line, the rows two by two, four tiles in one row, the rest behind More.
   It keeps clear of the map's buttons (top right) and its credit (bottom right). */
@media (min-width: 900px) and (min-aspect-ratio: 9 / 10) {
  .now-panel { align-self: flex-start; width: min(37rem, 100%); gap: var(--s-2); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3); border-radius: var(--r-3); border: 1px solid var(--line);
    background: var(--glass-strong); backdrop-filter: blur(var(--blur)) saturate(1.15); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.15); box-shadow: var(--shadow); }
  .now-panel[data-folded] { width: auto; padding: 0; border-color: transparent; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .now-panel .now-time { gap: var(--s-2); }
  .now-panel .scrub-buttons { gap: .3rem; }
  .now-panel .sky-live { padding: 0 .8rem; }
  /* the four rows, two by two */
  .now-panel .hearing { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-4); }
  .now-panel .hearing a { gap: .55rem; min-height: var(--tap); padding: .2rem 0; }
  .now-panel .hear-ico { width: 1.5rem; height: 1.5rem; border: 0; background: none; }
  .now-panel .hear-main { gap: .45rem; }
  .now-panel .hear-main b { font-size: .9375rem; }
  .now-panel .hear-sub { min-height: 0; }
  /* four tiles in a row and More; the rest open under them in place */
  .np-tiles { display: grid; grid-template-columns: minmax(0, 1fr) 4.25rem; gap: 0 6px; align-items: stretch; min-width: 0; }
  .np-tiles .glance { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .np-tiles .gl { padding: .4rem .6rem .45rem; }
  .np-tiles .gl-v { font-size: .9375rem; }
  .np-extra { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
    transition: grid-template-rows var(--med) var(--ease), opacity var(--med) var(--ease), visibility 0s linear var(--med); }
  .now-panel[data-more] .np-extra { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition: grid-template-rows var(--med) var(--ease), opacity var(--med) var(--ease), visibility 0s; }
  .np-extra-in { min-height: 0; overflow: hidden; }
  .np-tiles .glance-more { padding: 6px calc(4.25rem + 6px) 0 0; }      /* under the four, column for column */
  /* the map is the picture: only a breath of shade at the bottom edge, for the credit */
  .scene-opening .opening-stage::after, .scene-opening.has-map .opening-stage::after { background: linear-gradient(to top, color-mix(in srgb, var(--bg) 55%, transparent) 0%, transparent 16%); }
}

/* ---- the Data panel: what was spotted today */
.spotted { display: grid; }
.spotted li { display: grid; grid-template-columns: 4.3rem minmax(0, 1fr); gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--ink-2); line-height: 1.45; }
.spotted li:first-child { border-top: 0; }
.spotted time { color: var(--ink-2); } .spotted b { color: var(--ink); font-weight: 500; }

/* the page's own layer lets taps through to the map (css/scenes.css); the Data panel lies over the map and takes them
   itself: before this its Close button, its scrolling and the life list's rows went to the map under it (15 Nov) */
.scene-opening.has-map .data-panel { pointer-events: auto; }

/* ---- the Data panel: every aircraft type heard, rarest first (js/now-types.js); a row opens that type's last visit */
.types-head, .type-row { display: grid; grid-template-columns: minmax(0, 1fr) 3.6rem 3.2rem; gap: .5rem; align-items: center; }
.types-head { font-size: var(--t-tiny); color: var(--ink-3); padding: 0 .35rem; }
.types-head span:nth-child(n+2), .type-row time, .type-row b { text-align: right; font-variant-numeric: tabular-nums; }
.types-list { display: grid; }
.types-list li { border-top: 1px solid var(--line); }
.types-list li:first-child { border-top: 0; }
.type-row { width: 100%; min-height: var(--tap); padding: .3rem .35rem; border: 0; border-radius: var(--r-1); background: none; color: var(--ink); font: inherit; font-size: var(--t-small); text-align: left; cursor: pointer; }
.type-row:hover, .type-row:focus-visible { background: var(--accent-soft); }
.type-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.type-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.type-row time { color: var(--ink-2); } .type-row b { font-weight: 500; }

/* ---- the card of an earthquake or a weather balloon (js/now-depth.js) */
.nc-ico[data-kind="quake"] { color: var(--c-warn); } .nc-ico[data-kind="balloon"] { color: var(--c-good); } .nc-ico[data-kind="sat"] { color: var(--ink); }

/* the Data panel's parts from onair (2026-11-15, js/now-more.js): rows of a word, a soft bar and a number; chips of call signs */
.hbars { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.hbars li { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr) 2.6rem; align-items: center; column-gap: .6rem; font-size: var(--t-small); color: var(--ink); }
.hb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: .5rem; border-radius: var(--r-pill); background: var(--bg-sunk); overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: inherit; opacity: .85; }
.hb-n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.more-body { min-width: 0; }
.more-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.more-chips li { padding: .2rem .55rem; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: var(--t-small); color: var(--ink); font-variant-numeric: tabular-nums; }
