/* (FINAL-FIX2 perf) 7 selector lists in this file whose last compound was a bare :is(...) are written out one selector per alternative, so Blink buckets each by its own class / id / tag instead of testing every element on every style recalc. Each alternative is padded with :not(#zz-) / :not(.zz-) / :not(zz-) so its specificity is what the :is() gave (the most specific alternative); one that cannot be padded down is a class / type more specific only where no rule anywhere could tell the difference (checked against every stylesheet and the DOM), otherwise it stays in a :is() with a never-matching alternative of the full specificity. Same elements, same cascade. */
/* The motion pass, round 3: the TV layer (touch ring, glass sheen, one press feel, sounds, idle drift, distance readout). Loaded after css/ux/motion.css.
   The script half is js/ux/motion-tv.js. House rules (css/tokens.css): transform and opacity only, one live backdrop-filter, one loop on screen at a time, one owner per property. */

/* ---------- R01 · touch ring: one fixed layer above everything, no taps. The ring is white with a faint dark edge (it reads on the dusk map and on Day);
   on the paper pages it is ink. The spotlight that dimmed the screen around each tap is gone (17 October): the ring alone shows the TV where the finger is ---------- */
#tv-touch { position: fixed; inset: 0; z-index: 9990; pointer-events: none; overflow: hidden; contain: strict; }
#tv-touch .tv-ring { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; box-sizing: border-box; opacity: 0; pointer-events: none;
  border: 2px solid rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(10, 8, 16, .16), 0 0 16px rgba(255, 255, 255, .45); }
body:is([data-level="home"], [data-level="choose"], [data-level="walk"], [data-level="price"], [data-level="summary"]) #tv-touch .tv-ring { border-color: rgba(22, 22, 27, .5); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 0 14px rgba(22, 22, 27, .14); }
/* ---------- R05 · liquid-glass sheen: the light sits under the fingertip (--x / --y) and follows it while held; 120ms in, 320ms out (--tv-o / --tv-d, js/ux/motion-tv.js).
   It replaces the look of glass.css's flat press overlay (section 5) in the same layer, so nothing stacks. White on the glass; a cool shade on the white prominent pill and the light pages ---------- */
:root { --tv-sh: 255, 255, 255; --tv-sa: .36; }
.lg-prominent, #drawer.ux-setup .pill:not(.on):not(.dark), body:is([data-level="home"], [data-level="choose"], [data-level="walk"], [data-level="price"], [data-level="summary"]) .pill:not(.on):not(.dark), body:is([data-level="home"], [data-level="choose"], [data-level="walk"], [data-level="price"], [data-level="summary"]) .cx-btn:not(.on):not(.dark) { --tv-sh: 112, 136, 196; --tv-sa: .3; }
#drawer .dr-go [data-start] { --tv-sh: 255, 255, 255; --tv-sa: .22; }   /* Begin and Play from the start are dark capsules in the drawer, whatever their class */
/* the glass controls: glass.css's own highlight layer (::after) takes the light */
.lg::after, .lg-thin::after, .lg-prominent::after, .lg-btn::after, body #back:not(.zz-)::after, body #guest:not(.zz-)::after, body #orb .core::after, body :is(#tally button, #zz-.zz-)::after, .lg:active::after, .lg-thin:active::after, .lg-prominent:active::after, .lg-btn:active::after, body #back:not(.zz-):active::after, body #guest:not(.zz-):active::after, body #orb .core:active::after, body :is(#tally button, #zz-.zz-):active::after {
  background: radial-gradient(5.5rem circle at var(--x, 50%) var(--y, 50%), rgba(var(--tv-sh), var(--tv-sa)), rgba(var(--tv-sh), calc(var(--tv-sa) * .3)) 46%, rgba(var(--tv-sh), 0) 72%);
}
.lg::after, .lg-thin::after, .lg-prominent::after, .lg-btn::after, body #back:not(.zz-)::after, body #guest:not(.zz-)::after, body #orb .core::after, body :is(#tally button, #zz-.zz-)::after { opacity: var(--tv-o, 0); transition: opacity var(--tv-d, 256ms) var(--ease-out); }
.lg:active::after, .lg-thin:active::after, .lg-prominent:active::after, .lg-btn:active::after, body #back:not(.zz-):active::after, body #guest:not(.zz-):active::after, body #orb .core:active::after, body :is(#tally button, #zz-.zz-):active::after { opacity: 1; transition-duration: 120ms; }
/* pills, sheet buttons and Play have no highlight layer: one is added under their label (zero specificity for the positioning, so a pill placed elsewhere keeps its place) */
:where(.pill, .cx-btn, .chap-play):where(:not(.lg, .lg-thin, .lg-prominent, .lg-btn)) { position: relative; isolation: isolate; }
:where(.pill, .cx-btn, .chap-play):where(:not(.lg, .lg-thin, .lg-prominent, .lg-btn))::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: var(--tv-o, 0); transition: opacity var(--tv-d, 256ms) var(--ease-out);
  background: radial-gradient(5rem circle at var(--x, 50%) var(--y, 50%), rgba(var(--tv-sh), var(--tv-sa)), rgba(var(--tv-sh), calc(var(--tv-sa) * .3)) 46%, rgba(var(--tv-sh), 0) 72%);
}
/* the stories pill and its chips: their ::after is a larger hit area (css/ux/system.css), so the light uses ::before */
#sdock .sd-cur, #sdock .sd-chip { isolation: isolate; }
#sdock .sd-cur::before, #sdock .sd-chip::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: var(--tv-o, 0); transition: opacity var(--tv-d, 256ms) var(--ease-out);
  background: radial-gradient(4.5rem circle at var(--x, 50%) var(--y, 50%), rgba(var(--tv-sh), var(--tv-sa)), rgba(var(--tv-sh), calc(var(--tv-sa) * .3)) 46%, rgba(var(--tv-sh), 0) 72%); }
/* the next link is plain text (css/ux/map.css hid its glass layers): a soft glow under the finger, behind the words */
body #ui > #cta::after, body #ui > #cta:active::after { display: block; content: ""; position: absolute; inset: -.1rem -.7rem; border-radius: 999px; pointer-events: none; z-index: -1;
  opacity: var(--tv-o, 0); transition: opacity var(--tv-d, 256ms) var(--ease-out);
  background: radial-gradient(4.5rem circle at calc(var(--x, 50%) + .7rem) calc(var(--y, 50%) + .1rem), rgba(255, 255, 255, .26), rgba(255, 255, 255, .07) 46%, rgba(255, 255, 255, 0) 72%); }

/* ---------- R27 · one press feel: js/ux/motion-tv.js scales the pressed control with the individual `scale` property (.97 in 80ms, a spring back in 340ms; cards .985),
   so the scattered per-control :active scales stand down here (each restates its resting value at the same weight, loaded later) ---------- */
body #ui > #back:active, body #ui > #guest:active { scale: none; }                              /* css/ux/motion.css M01 (.96) */
.pl-doc:active, .ask-row:active { transform: none; }                                /* css/plus-place.css (.98), css/plus-presenter.css (.985) */
.gf-all:active, .gf-r:active { transform: none; }                                   /* css/ux/area.css (.96) */
.px-btn:active, .cx-btn:active, .cx-act button:active { transform: none; }          /* css/ux/close.css (.96), css/ux/close2.css (.97, .92) */
:root body #lv-home .ico-btn:active { transform: none; }               /* css/ux/tower-home.css (.94) */
#lv-walk .wk-arrow:active, #lv-walk .wk-go:active { transform: none; }              /* css/ux/walk.css (.94, .97) */
body #cta:active { opacity: .92; }                                                  /* css/ux/map.css dimmed the next link to .6 instead */
/* the map marks: the tap lands on a transparent hit area, so the visible mark answers, at the same .97 (their own transitions stay) */
.gm-hit:active ~ .gm-dot, .pj:active .pj-m, .hero.hg:active .hg-med { transform: scale(.97); }   /* css/ux/area.css (.92), css/ux/markers.css (.94) */
.gm-st .gm-hit:active ~ .gm-med { scale: .97; }                     /* css/ux/area.css (.94) */

/* ---------- R29 · the sound switch in the presenter drawer (Journey tab): a pill with a small track, off by default ---------- */
#drawer .tv-snd { gap: .55rem; }
#drawer .tv-snd svg { width: 1.1rem; height: 1.1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#drawer .tv-snd svg .tv-w { opacity: .3; transition: opacity var(--dur-quick) var(--ease-out); }
#drawer .tv-snd.on svg .tv-w { opacity: 1; }
#drawer .tv-snd .tv-sw { position: relative; flex: none; width: 2rem; height: 1.15rem; margin-left: .3rem; border-radius: 99px; background: rgba(128, 128, 140, .38); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
#drawer .tv-snd .tv-sw::after { content: ""; position: absolute; left: .15rem; top: .15rem; width: .85rem; height: .85rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  transition: transform var(--dur-quick) var(--ease-spring); }
#drawer .tv-snd.on .tv-sw { background: rgba(110, 196, 150, .85); }
#drawer .tv-snd.on .tv-sw::after { transform: translateX(.85rem); }

/* ---------- R13 · idle drift and cloud shadows (js/ux/motion-tv.js): three soft shadows above the map imagery, under the pins and the interface; only transform moves them.
   While it runs the drift is the one ambient loop: the Mirai beacon and the light pillar wait (css/ux/motion.css M06, M06b) ---------- */
#lv-map .mapview > .tv-shadows { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; opacity: 0; }
#lv-map .tv-shadows i { position: absolute; left: 0; top: 0; width: 62vw; height: 48vh; border-radius: 50%; transform: translate3d(-120vw, 0, 0); will-change: transform;
  background: radial-gradient(closest-side, rgb(6, 8, 14), rgba(6, 8, 14, .6) 42%, rgba(6, 8, 14, 0)); }
#lv-map .tv-shadows i:nth-child(2) { width: 84vw; height: 56vh; }
#lv-map .tv-shadows i:nth-child(3) { width: 46vw; height: 36vh; }
body #lv-map.tv-drift .world, #lv-map.tv-drift > .map-veil { will-change: transform, translate, scale; }
body.idle-drift #lv-map .hero.hg::after, body.idle-drift #lv-map .hero.hg::before { animation-play-state: paused; }

/* ---------- R11 · the distance readout, under the place title's lines on the map levels (19 October: it was under the slider's label); it fades with the chrome when idle ---------- */
body #place .tv-dist { display: flex; width: max-content; align-items: baseline; gap: .4em; margin-top: .45rem; font: var(--t-meta); letter-spacing: .01em; color: var(--alt-c); text-shadow: var(--alt-ts);
  font-variant-numeric: tabular-nums; opacity: .72; transition: opacity 200ms var(--ease-out); }
body #place .tv-dist em { font-style: normal; opacity: .62; }
body #place .tv-dist b { font: 600 var(--t-meta-fs)/1.25 var(--sans); }
body:not([data-level="century"]):not([data-level="city"]):not([data-level="market"]):not([data-level="area"]) #place .tv-dist { display: none; }
body.clean #place .tv-dist { opacity: 0; transition: opacity 480ms cubic-bezier(.22, 1, .36, 1); }
body.cine #place .tv-dist { opacity: 0; }
@media (orientation: portrait) and (max-width: 600px) { body #place .tv-dist { display: none; } }   /* phones: it sat in the slider, which phones hide (css/ux/qa-fixes.css), so it stays off there */

/* ---------- the stories pill rolls its name: the old name is a copy laid over the label while it leaves (js/ux/motion-tv.js) ---------- */
#sdock .sd-cur .tv-sdghost { position: absolute; font: inherit; font-style: normal; letter-spacing: inherit; color: inherit; white-space: nowrap; pointer-events: none; line-height: inherit; }


@media (prefers-reduced-motion: reduce) {
  #drawer .tv-snd .tv-sw::after, body #place .tv-dist { transition: none; }
  #lv-map .mapview > .tv-shadows { display: none; }
}
