/* ------------------------------------------------------------------
   LifeHUD widgets. These are plain DOM elements placed in 3D space,
   so text stays crisp. Colours come from two theme variables.
------------------------------------------------------------------- */
:root {
  --accent: #d202f5; /* the main colour, where the accent gradient starts */
  --accent-2: #f502ab; /* where it ends: the main colour with its hue turned 27 degrees, as the app works it out (state.js sets all three when the colour is changed) */
  --on-accent: #ffffff; /* what is written on the gradient: white, or near-black where the gradient is a light one */
  --hud-text: #ffffff;
  /* The app's two typefaces. Orbitron carries every piece of interface text. Montserrat is
     only for spoken words: captions, translations and the assistant's replies. Weights on the
     widgets below follow the matching text styles in the app. */
  --hud-font: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --caption-font: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --hud-panel: rgba(9, 13, 22, 0.66);
}

#hud3d { position: absolute; inset: 0; pointer-events: none; }
#hud3d > div { pointer-events: none; }

.w {
  position: absolute;
  font-family: var(--hud-font);
  color: var(--hud-text);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 0 26px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.4);
}
.w button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.w svg { width: 1em; height: 1em; }
.w-inner {
  position: relative;
  transition: opacity 0.55s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.55s ease;
}
/* !important: the 3D renderer sets pointer-events inline on each object */
.w:not(.is-on) { pointer-events: none !important; }
.w:not(.is-on) .w-inner { opacity: 0; transform: translateY(18px) scale(0.94); filter: blur(8px); }
.w.is-dim { pointer-events: none !important; }
.w.is-dim .w-inner { opacity: 0; filter: blur(6px); }
.w.is-focus { cursor: default; }

/* hover affordance: corner ticks + name tag */
.w-frame { position: absolute; inset: -12px -16px; pointer-events: none; opacity: 0; transition: opacity 0.25s ease, inset 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.w-frame::before, .w-frame::after { content: ''; position: absolute; width: 14px; height: 14px; border: 2px solid var(--accent); }
.w-frame::before { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.w-frame::after { right: 0; bottom: 0; border-left: 0; border-top: 0; border-color: var(--accent-2); }
.w-tag {
  position: absolute; left: -16px; bottom: calc(100% + 22px);
  font: 700 11px/1 var(--hud-font); letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap;
  color: var(--accent); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(5px); transition: opacity 0.25s ease, transform 0.3s ease; pointer-events: none;
}
.w:hover .w-frame { opacity: 1; inset: -18px -22px; }
.w:hover .w-tag { opacity: 1; transform: none; }
.w.is-focus .w-frame, .w.is-focus .w-tag, .w.no-hover .w-frame, .w.no-hover .w-tag { display: none; }

/* ---------------------------------------------------------------- text in the accent gradient
   The app draws its small labels (the month, AM/PM, °C, Hz, the names of a reading's sections)
   with the accent gradient as a brush: the start colour at the text's left end, the end colour
   at its right. So does the HUD here, and the labels of the module's card. The letters are cut out of a gradient
   background. Cut-out letters cannot keep the HUD's text shadow (a shadow is painted over a
   background, so it would lie on them), so the element holds the shadow with its own letters
   see-through, and the gradient letters are laid over it from a copy of the text in data-t
   (setText in widgets.js keeps the copy up to date). Without data-t the text is simply the start
   colour. The element should be no wider than its text, or the gradient runs on past it. */
.gt { color: var(--accent); }
.gt[data-t] { color: transparent; }
:where(.gt[data-t]) { position: relative; }
.gt[data-t]::after { content: attr(data-t); position: absolute; inset: 0; color: transparent; text-shadow: none; pointer-events: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; }

/* ---------------------------------------------------------------- the overview
   With no module open the HUD shows twelve of them at once, kept to the edges so the middle of
   the view is clear (the positions are the "slot" of each module in widgets.js). Nothing in it
   can be worked: a click anywhere on a module opens it. Notes, horoscope, news, captions and the
   map have a compact form here and take their full form once opened, fading in across the change. */
/* on a phone there is no room for these in the overview */
.is-narrow .w.w--wide:not(.is-focus), .is-low .w.w--low:not(.is-focus) { pointer-events: none !important; }
.is-narrow .w--wide:not(.is-focus) .w-inner, .is-low .w--low:not(.is-focus) .w-inner { opacity: 0; }
.w:not(.is-focus) .w-body { pointer-events: none; }
/* the small labels under the numbers are a touch larger here, where everything is drawn small */
.w:not(.is-focus) .val__unit { font-size: 16px; }
.w.is-morph .w-body { animation: w-morph 0.5s ease both; }
@keyframes w-morph { from { opacity: 0; } }
/* notes: the open note alone, its title and its list, as the app's collapsed list view */
.w[data-id='notes']:not(.is-focus) .notes { grid-template-columns: 250px; }
.w[data-id='notes']:not(.is-focus) .notes__list { display: none; }
/* news and horoscope: the heading without its buttons, then the three headlines, or today's sign and the start of its reading */
.w[data-id='news']:not(.is-focus) .news { width: 290px; }
.w[data-id='zodiac']:not(.is-focus) .zod { width: 262px; }
/* on the same dark glass as the note beside them, so their small text reads over a bright view */
.w:is([data-id='news'], [data-id='zodiac']):not(.is-focus) :is(.news, .zod) { padding: 14px 4px 16px 16px; border-radius: 16px; background: rgba(9, 13, 22, 0.5); text-shadow: none; }
.w:is([data-id='news'], [data-id='zodiac']):not(.is-focus) .zod__nav { display: none; }
.w:is([data-id='news'], [data-id='zodiac']):not(.is-focus) .zod__title { font-size: 15px; }
.w:is([data-id='news'], [data-id='zodiac']):not(.is-focus) .zod__rule { margin: 8px 20px 10px 0; }
.w[data-id='news']:not(.is-focus) .news__list { min-height: 0; gap: 9px; padding-right: 0; }
.w[data-id='news']:not(.is-focus) .news__row span { display: none; }
.w[data-id='news']:not(.is-focus) .news__row b { font-size: 13.5px; line-height: 1.3; text-align: left; }
.w[data-id='zodiac']:not(.is-focus) .zod__body { padding-right: 0; }
.w[data-id='zodiac']:not(.is-focus) .zod__date { display: none; }
.w[data-id='zodiac']:not(.is-focus) .zod__glyph { font-size: 30px; }
.w[data-id='zodiac']:not(.is-focus) .zod__sign b { font-size: 17px; }
.w[data-id='zodiac']:not(.is-focus) .zod__sign small { margin-top: 2px; font-size: 11px; }
.w[data-id='zodiac']:not(.is-focus) .zod__text { margin-top: 8px; font-size: 12.5px; line-height: 1.45; text-align: left; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
/* captions: one line set like a subtitle, with no frame around it */
.w[data-id='captions']:not(.is-focus) .cap { width: 600px; min-height: 0; padding: 0; border: 0; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 0, 0, 0.6); }
.w[data-id='captions']:not(.is-focus) .cap__text { min-height: 0; }
.w[data-id='captions']:not(.is-focus) .cap__stop { display: none; }
.is-narrow .w[data-id='captions']:not(.is-focus) .cap { width: 520px; } /* a phone is narrower than the subtitle */
/* navigation: a small map of the route under way, with the next turn */
.w[data-id='nav']:not(.is-focus) .nav { width: 330px; height: 210px; }
.w[data-id='nav']:not(.is-focus) .nav__ui { left: 8px; right: 8px; top: 8px; }
.w[data-id='nav']:not(.is-focus) .nav__live { grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 6px 12px 6px 6px; border-radius: 12px; }
.w[data-id='nav']:not(.is-focus) .nav__turn { width: 36px; height: 36px; border-radius: 9px; font-size: 23px; }
.w[data-id='nav']:not(.is-focus) .nav__step b { font-size: 18px; }
.w[data-id='nav']:not(.is-focus) .nav__step span { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w[data-id='nav']:not(.is-focus) .nav__eta, .w[data-id='nav']:not(.is-focus) .nav__live .btn, .w[data-id='nav']:not(.is-focus) .nav__locate { display: none; }

/* ---------------------------------------------------------------- value widgets (clock, date, weather, UV, speed) */
.grp { display: flex; align-items: flex-end; gap: 46px; }
.val { display: inline-flex; flex-direction: column; align-items: flex-start; }
.val__row { display: flex; align-items: center; gap: 10px; padding: 0 4px 0 24px; }
.val__num { font-weight: 700; font-size: 56px; line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.val--xl .val__num { font-size: 84px; }
.val__line {
  align-self: stretch; position: relative; height: 2.5px; margin: 9px 0 6px 22px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}
.val__line::before {
  content: ''; position: absolute; right: calc(100% - 1px); top: 0; width: 28px; height: 2.5px; border-radius: 2px;
  background: var(--accent); transform-origin: 100% 50%; transform: rotate(-40deg);
}
.w:not(.is-on) .val__line { transform: scaleX(0); }
.val__unit { align-self: flex-end; font-weight: 700; font-size: 14px; letter-spacing: 0.08em; color: var(--accent); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); }
.wx-icon { width: 52px; height: 52px; flex: none; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3)); }
.wx-icon svg { width: 100%; height: 100%; display: block; }

/* ---------------------------------------------------------------- location */
.loc { text-align: center; white-space: nowrap; text-shadow: 0 0 20px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.55); }
.loc__city { font-weight: 800; font-size: 34px; letter-spacing: 0.02em; }
.loc__coords { margin-top: 6px; font-weight: 600; font-size: 17px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.loc__alt { margin-top: 5px; font-weight: 400; font-size: 14px; letter-spacing: 0.04em; opacity: 0.86; }

/* ---------------------------------------------------------------- stock ticker */
.tick { width: 620px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.tick__track { display: inline-flex; white-space: nowrap; will-change: transform; }
/* The tape slides left by one copy's length (--loop, set once it has been measured) and starts
   over. The duration is set with it, so the speed is the same whatever is on the tape. */
.tick__track.is-rolling { animation: tick-roll 30s linear infinite; }
@keyframes tick-roll { to { transform: translate3d(calc(-1 * var(--loop)), 0, 0); } }
.tick__item { box-sizing: border-box; flex: none; display: inline-flex; align-items: baseline; gap: 12px; padding: 4px 26px; font-size: 21px; }
.tick__item b { font-weight: 800; letter-spacing: 0.03em; }
.tick__item i { font-style: normal; font-weight: 400; opacity: 0.86; font-variant-numeric: tabular-nums; }
.tick__item em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; transition: filter 0.3s; }
/* the up / down triangle is drawn, since Orbitron has no glyph for it */
.tick__item em svg { width: 0.6em; height: 0.6em; margin-right: 0.38em; fill: currentColor; }
.tick__item em.up { color: #3be28b; }
.tick__item em.dn { color: #ff4d67; }
.tick__item.is-flash em { filter: brightness(1.8); }

/* ---------------------------------------------------------------- audio visualiser */
.viz { display: inline-flex; flex-direction: column; }
/* The bars, as the app paints them (AudioVisualizerWidget.kt): one gradient over the whole
   height, white at the foot and the main colour at the top, of which a bar shows only as much as
   it is tall. So a quiet bar is white, and a loud one climbs into the colour. A bar here is
   stretched to its height (one transform a frame, nothing redrawn: will-change makes each bar a
   layer of its own), which would squeeze the whole gradient into it. So the colour a bar runs up
   to is the colour the full gradient has at that height: data-m, how far into the main colour in
   tenths, set by the module as the bar grows and shrinks. (Rules, not a custom property set on
   each bar: a bar with a property of its own took a third longer to restyle, every frame.) */
.viz__bars { display: flex; align-items: flex-end; gap: 5px; height: 96px; padding: 0 6px 0 24px; }
.viz__bars i { display: block; width: 17px; height: 100%; transform-origin: 50% 100%; transform: scaleY(0.2); border-radius: 1px; will-change: transform;
  background: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 20%, #fff)); }
.viz__bars i[data-m='0'] { background-image: linear-gradient(0deg, #fff, #fff); }
.viz__bars i[data-m='1'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 10%, #fff)); }
.viz__bars i[data-m='2'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 20%, #fff)); }
.viz__bars i[data-m='3'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 30%, #fff)); }
.viz__bars i[data-m='4'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 40%, #fff)); }
.viz__bars i[data-m='5'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 50%, #fff)); }
.viz__bars i[data-m='6'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 60%, #fff)); }
.viz__bars i[data-m='7'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 70%, #fff)); }
.viz__bars i[data-m='8'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 80%, #fff)); }
.viz__bars i[data-m='9'] { background-image: linear-gradient(0deg, #fff, color-mix(in srgb, var(--accent) 90%, #fff)); }
.viz__bars i[data-m='10'] { background-image: linear-gradient(0deg, #fff, var(--accent)); }

/* ---------------------------------------------------------------- shared panel bits */
.card { background: var(--hud-panel); border: 2px solid var(--accent); border-radius: 18px; padding: 22px 26px; text-shadow: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 18px 60px rgba(0, 0, 0, 0.35), 0 0 34px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; height: 40px; padding: 0 22px !important;
  position: relative; border: 2px solid transparent !important; border-radius: 9px; font-weight: 600 !important; font-size: 14px; letter-spacing: 0.06em; transition: filter 0.2s, transform 0.2s, background 0.2s; }
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.btn--fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)) border-box !important; color: var(--on-accent) !important; }
.btn--fill::before { display: none; }

/* ---------------------------------------------------------------- navigation
   The map card, leaning back a little. The map is drawn in the colours of the app's default map
   style (OpenFreeMap Liberty, a light map): warm off-white land, blue water, green parks, white
   streets with grey edges, a yellow main road and an orange expressway. Over it, as in the app:
   a column of dark glass bars, centred and 80% of the map wide, the route in the accent
   gradient, a red dot for the destination and a blue one for you. */
.nav { position: relative; width: 600px; height: 400px; border-radius: 16px; overflow: hidden; cursor: default; text-shadow: none; background: #f8f4f0; opacity: 0.96;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: perspective(1400px) rotateX(20deg); transform-origin: 50% 100%; }
.nav [hidden] { display: none !important; }
.nav .nav__map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.nav__map .m-land { fill: #f8f4f0; }
.nav__map .m-park { fill: #d8e8c8; }
.nav__map .m-water { fill: #9ebdff; }
.nav__map .m-pier { fill: #f8f4f0; }
.nav__map .m-dock { fill: none; stroke: #f8f4f0; stroke-width: 2.4; stroke-linecap: round; }
.nav__map .m-bld rect { fill: #dcd9d5; stroke: #ccc9c6; stroke-width: 0.6; }
/* roads are drawn twice, edges first and then the surface, so that junctions join cleanly */
.nav__map .m-road path { fill: none; stroke: #fff; stroke-linecap: round; }
.nav__map .m-road .m-road--main { stroke: #ffeeaa; }
.nav__map .m-road .m-road--fast { stroke: #ffcc88; }
.nav__map .m-road--edge path { stroke: #cfcdca; }
.nav__map .m-road--edge .m-road--main, .nav__map .m-road--edge .m-road--fast { stroke: #e9ac77; }
.nav__map .m-lbl { font: 700 7.5px/1 var(--hud-font); letter-spacing: 0.9px; fill: #666; paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 2px; stroke-linejoin: round; }
.nav__map .m-lbl--water { font-size: 11px; letter-spacing: 6px; fill: #495e91; stroke: rgba(255, 255, 255, 0.5); font-style: italic; }
.nav__map .m-lbl--trail { font-size: 6.5px; fill: #8a775f; stroke: rgba(248, 244, 240, 0.85); }
.nav__map .m-trail { fill: none; stroke: #fff; stroke-width: 2; stroke-dasharray: 3 2.4; }
.nav__map .m-route { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.nav__map .m-poi { cursor: pointer; }
.nav__map .m-poi circle { fill: #fff; stroke: #5d6672; stroke-width: 1.8; transition: fill 0.2s; }
.nav__map .m-poi .m-poi__hit { fill: transparent; stroke: none; }
.nav__map .m-poi text { font: 700 8px/1 var(--hud-font); letter-spacing: 0.6px; fill: #333; paint-order: stroke; stroke: #fff; stroke-width: 2.8px; stroke-linejoin: round; }
.nav__map .m-poi:hover circle:not(.m-poi__hit) { fill: var(--accent); }
.nav__map .m-pin circle { fill: #e53935; stroke: #fff; stroke-width: 2; }
.nav[data-mode='search'] .m-pin { display: none; }
.nav__map .m-you__dot { fill: #2962ff; stroke: #fff; stroke-width: 2.5; }
.nav__map .m-you__halo { fill: rgba(41, 98, 255, 0.3); }
/* The dot's pulse and the dot are drawings of their own over the map (navmap.js). The pulse is animated as a whole layer, about the dot (the module sets transform-origin): the browser does that without redrawing anything. */
.nav .nav__over { pointer-events: none; }
.nav .nav__halo { will-change: transform, opacity; animation: youPulse 2.2s ease-out infinite; }
.nav__map .m-you__cone { fill: rgba(41, 98, 255, 0.28); opacity: 0; transition: opacity 0.4s; }
.nav[data-mode='live'] .m-you__cone, .nav[data-mode='idle'] .m-you__cone { opacity: 1; }
.nav .nav__halo.is-ping { animation: youPing 0.9s ease-out 2; }
@keyframes youPulse { from { transform: scale(0.45); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
@keyframes youPing { from { transform: scale(0.4); opacity: 1; } to { transform: scale(2.8); opacity: 0; } }

/* the bars: one centred column, 80% of the map wide, as in the app */
.nav__ui { position: absolute; left: 10%; right: 10%; top: 14px; display: grid; gap: 8px; }
/* Dark glass with the accent gradient as its outline: the app's chip (ui/theme/ChipStyle.kt),
   whose outline is the gradient and never one flat colour. The outline is a layer with its
   middle masked out, so the glass can stay see-through. The app runs a chip's gradient from its
   top left corner to its bottom right: --ga is that direction, 90deg (left to right) for the
   wide ones and 135deg for the square ones. */
.nav__box { position: relative; border: 2px solid transparent; border-radius: 16px; background: rgba(0, 0, 0, 0.62); }
.nav__box::before, .web__glass::before, .w .btn::before, .zod__nav button::before, .news .news__back::before, .notes__new::before, .cap__stop::before { content: ''; position: absolute; inset: -2px; padding: 2px; border-radius: inherit; pointer-events: none; background: linear-gradient(var(--ga, 90deg), var(--accent), var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.nav__search { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 18px; border-radius: 12px; }
.nav__search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: #fff; cursor: text;
  font: 600 15px/1 var(--hud-font); letter-spacing: 0.03em; user-select: text; -webkit-user-select: text; }
.nav__search input::placeholder { color: rgba(255, 255, 255, 0.8); }
.nav__search svg { font-size: 21px; flex: none; }
.nav__results { padding: 6px; display: grid; gap: 2px; }
.nav .nav__res { display: grid; gap: 4px; padding: 9px 12px; border-radius: 9px; text-align: left; transition: background 0.15s; }
.nav .nav__res:hover { background: rgba(255, 255, 255, 0.1); }
.nav__res b { font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
.nav__res span { font-size: 11px; opacity: 0.78; letter-spacing: 0.04em; }
.nav__none { margin: 0; padding: 12px; font-size: 13px; opacity: 0.8; }
.nav__dest { padding: 15px 18px 16px; }
.nav__dest h3 { margin: 0; font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.nav__addr { margin: 5px 0 10px; font-size: 12px; opacity: 0.82; letter-spacing: 0.03em; }
.nav__meta { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 7px; font-size: 12.5px; letter-spacing: 0.03em; }
.nav__meta li { display: flex; align-items: center; gap: 10px; }
.nav__meta svg { font-size: 16px; flex: none; }
.nav__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nav__btns .btn { height: 38px; }
.nav__live { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px; padding: 9px 12px 9px 9px; }
.nav__turn { width: 48px; height: 48px; border-radius: 11px; display: grid; place-items: center; font-size: 30px; color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.nav__step b { display: block; font-weight: 700; font-size: 22px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.nav__step span { display: block; margin-top: 3px; font-size: 11.5px; opacity: 0.86; letter-spacing: 0.03em; }
.nav__eta { text-align: right; font-size: 11px; letter-spacing: 0.04em; line-height: 1.5; white-space: nowrap; }
.nav__eta b { display: block; width: fit-content; margin-left: auto; color: var(--accent); font-weight: 600; font-size: 13px; }
.nav__eta span { opacity: 0.8; }
.nav__live .btn { height: 34px; padding: 0 14px !important; font-size: 12px; }
.nav .nav__locate { position: absolute; right: 12px; top: calc(50% - 21px); width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 23px; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transition: transform 0.2s; }
.nav .nav__locate:hover { transform: scale(1.08); }

/* ---------------------------------------------------------------- horoscope
   The app's header, shared with the news: a title on the left and the back / next pair on the
   right, over the accent bar whose chamfer is at the right end. Everything lines up on one edge
   20px in from the right, as in the app: the bar's straight run ends there, the pair's right
   edge sits there, and the text under the bar stops there. */
.zod { width: 500px; }
.zod__head { display: flex; align-items: center; justify-content: space-between; }
.zod__title { font-weight: 800; font-size: 22px; letter-spacing: 0.08em; }
.zod__nav { display: flex; gap: 10px; margin-right: 20px; }
.zod__nav button { --ga: 135deg; position: relative; width: 34px; height: 34px; border: 2px solid transparent !important; border-radius: 8px; display: grid; place-items: center; font-size: 18px; background: rgba(8, 12, 20, 0.5) !important; transition: background 0.2s, color 0.2s; }
.zod__nav button:hover { background: linear-gradient(135deg, var(--accent), var(--accent-2)) border-box !important; color: var(--on-accent); }
.zod__rule { position: relative; height: 2.5px; margin: 12px 20px 16px 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px; }
/* the chamfer: from the end of the straight run down to the widget's right edge */
.zod__rule::after { content: ''; position: absolute; left: calc(100% - 1px); top: 0; width: 27px; height: 2.5px; background: var(--accent-2); border-radius: 2px; transform-origin: 0 50%; transform: rotate(40deg); }

/* One reading, laid out as the app's: an optional picture, then an icon or a character beside
   the subject and its subtitle, an optional line under those, then labelled paragraphs. */
.zod__body { padding-right: 20px; transition: opacity 0.3s; }
.zod__sign { display: flex; align-items: center; gap: 12px; }
/* the sign is one of the app's own zodiac icons (icons.js), sized by this font-size */
.zod__glyph { flex: none; font-size: 44px; line-height: 0; }
/* The day's animal, as its Chinese character. Orbitron has none, so the system's own font draws
   it (and the animal picture beside the name), which is what happens on the device too. */
.zod__char { flex: none; font-weight: 800; font-size: 34px; line-height: 1; }
.zod__sign b { display: block; font-size: 24px; font-weight: 800; }
.zod__sign small { display: block; margin-top: 4px; font-size: 13px; letter-spacing: 0.04em; }
.zod__extra { margin-top: 10px; }
.zod__date { width: fit-content; margin: 14px 0 6px; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.zod__text { margin: 14px 0 0; font-size: 15px; line-height: 1.6; font-weight: 400; text-align: justify; }
.zod__date + .zod__text { margin-top: 0; }
/* Chinese zodiac: the day's element and polarity, in the element's traditional colour (--c) */
.zod__pill { display: inline-block; padding: 3px 10px; border: 1.5px solid color-mix(in srgb, var(--c) 85%, transparent); border-radius: 99px; background: rgba(8, 12, 20, 0.4); font-weight: 600; font-size: 12px; text-transform: uppercase; color: var(--c); text-shadow: none; }
/* Numerology: the day's number in its polygon, and the nine-day cycle filled up to today */
.zod__badge { position: relative; flex: none; width: 48px; height: 48px; display: grid; place-items: center; }
.zod__badge svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: url(#zod-accent); stroke-width: 2; stroke-linejoin: round; }
.zod__badge span { font-weight: 800; font-size: 20px; line-height: 1; color: var(--accent); }
.zod__dots { display: flex; gap: 6px; }
.zod__dots i { box-sizing: border-box; width: 8px; height: 8px; border-radius: 50%; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.zod__dots i.is-on { border: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
/* Tarot: the card of the day. It opens face down on the deck's back (the chip look, with the
   module's mark) and turns over after a beat, as in the app. Each scan keeps its own shape. */
.zod__hero { display: flex; justify-content: center; padding-top: 6px; margin-bottom: 14px; }
.tarot { position: relative; height: 210px; animation: tarot-turn 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.8s both; }
.tarot__face, .tarot__back { box-sizing: border-box; height: 100%; border: 2px solid transparent; border-radius: 10px;
  background: linear-gradient(rgb(22, 23, 28), rgb(22, 23, 28)) padding-box, linear-gradient(90deg, var(--accent), var(--accent-2)) border-box; }
.tarot__face { padding: 3px; animation: tarot-face 0.7s linear 0.8s both; }
.tarot__face img { display: block; height: 100%; width: auto; border-radius: 7px; }
/* the back is mirrored, so it reads the right way round while the card is still turned away */
.tarot__back { position: absolute; inset: 0; display: grid; place-items: center; transform: scaleX(-1); opacity: 0; color: color-mix(in srgb, currentColor 55%, transparent); animation: tarot-back 0.7s linear 0.8s both; }
.tarot__back svg { width: 44px; height: 44px; }
/* The card turns from facing away to facing you. With that easing it is edge-on 35% of the way
   through, and that is the moment the back gives way to the face. */
@keyframes tarot-turn { from { transform: perspective(900px) rotateY(180deg); } to { transform: perspective(900px) rotateY(0deg); } }
@keyframes tarot-back { 0%, 35% { opacity: 1; } 35.1%, 100% { opacity: 0; } }
@keyframes tarot-face { 0%, 35% { opacity: 0; } 35.1%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tarot, .tarot__face, .tarot__back { animation: none; } }

/* ---------------------------------------------------------------- news
   The app's headline list. It shares the horoscope's header: title on the left, the back / next
   pair on the right, over the accent bar whose chamfer is at the right end. Rows stop 20px
   short of the right edge, where that chamfer starts. */
.news { width: 540px; }
.news__lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.news .zod__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news .news__back { --ga: 135deg; position: relative; flex: none; width: 34px; height: 34px; border: 2px solid transparent !important; border-radius: 8px; display: grid; place-items: center; font-size: 18px; background: rgba(8, 12, 20, 0.5) !important; transition: background 0.2s, color 0.2s; }
.news .news__back:hover { background: linear-gradient(135deg, var(--accent), var(--accent-2)) border-box !important; color: var(--on-accent); }
.news__list, .news__story { min-height: 232px; padding-right: 20px; }
.news__list { display: grid; align-content: start; gap: 14px; transition: opacity 0.3s; }
.news .news__row { display: grid; gap: 4px; width: 100%; text-align: left; }
.news__row b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-weight: 600; font-size: 16px; line-height: 1.35; text-align: justify; transition: color 0.2s; }
.news__row span { font-weight: 400; font-size: 12px; letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news .news__row:hover b { color: var(--accent); }
.news__story h3 { margin: 0; font-weight: 600; font-size: 19px; line-height: 1.3; }
.news__story small { display: block; margin: 8px 0 12px; font-size: 12px; letter-spacing: 0.03em; }
.news__story p { margin: 0; font-weight: 400; font-size: 15px; line-height: 1.6; text-align: justify; }

/* ---------------------------------------------------------------- compass
   The app's strip compass, to its measurements: a 120-degree tape with ticks rising from its
   bottom edge and labels hanging from the top, a caret in the accent colour at the centre,
   and the bearing on the accent bar underneath. The tape starts where the bar's chamfer ends. */
.cmp { display: inline-flex; flex-direction: column; width: 448px; }
.cmp__tape { position: relative; width: 426px; height: 52px; margin-left: 22px; overflow: hidden; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45)); }
/* (the caret: the app draws it with the gradient that runs across the tape, and in the middle of the tape that is the colour halfway between the two) */
.cmp__tape::after { content: ''; position: absolute; left: calc(50% - 1.25px); top: 0; bottom: 0; width: 2.5px; background: color-mix(in srgb, var(--accent), var(--accent-2)); }
.w .cmp__strip { display: block; width: 3834px; height: 52px; will-change: transform; }
.cmp__tick { stroke: var(--hud-text); stroke-opacity: 0.35; stroke-width: 1; }
.cmp__tick--mid { stroke-opacity: 0.7; stroke-width: 1.5; }
.cmp__tick--main { stroke-opacity: 1; stroke-width: 2.5; }
.cmp__label { fill: var(--hud-text); fill-opacity: 0.7; font: 700 14px var(--hud-font); text-anchor: middle; }
.cmp__label--main { fill-opacity: 1; font-size: 22px; }

/* ---------------------------------------------------------------- notes */
.notes { display: grid; grid-template-columns: 330px 250px; gap: 22px; align-items: start; text-shadow: none; }
.notes__list { background: rgba(9, 13, 22, 0.5); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.notes__search { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 13px; opacity: 0.7; letter-spacing: 0.04em; }
/* A row in the note list: the note's name, which opens it, and on the open note's row the delete button. */
.notes__item { display: flex; align-items: center; height: 44px; border-radius: 12px; transition: background 0.2s; }
.notes__item:hover { background: rgba(255, 255, 255, 0.08); }
.notes__item.is-sel { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
.notes .notes__open { flex: 1; min-width: 0; height: 100%; padding: 0 16px; font-weight: 500; font-size: 14px; letter-spacing: 0.03em; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes .is-sel .notes__open { padding-right: 4px; font-weight: 600; }
.notes .notes__del { flex: none; width: 40px; height: 100%; display: grid; place-items: center; font-size: 17px; border-radius: 0 12px 12px 0; opacity: 0.8; transition: opacity 0.2s, background 0.2s; }
.notes .notes__del:hover, .notes .notes__del:focus-visible { opacity: 1; background: rgba(6, 18, 28, 0.22); }
.notes__new { position: relative; height: 40px; border: 2px solid transparent !important; border-radius: 10px; font-size: 13px; font-weight: 600 !important; letter-spacing: 0.05em; margin-top: 6px; transition: background 0.2s, color 0.2s; }
.notes__new:hover { background: linear-gradient(90deg, var(--accent), var(--accent-2)) border-box !important; color: var(--on-accent) !important; }
/* the list is full: no more new notes */
.notes__new:disabled { opacity: 0.35; cursor: default; }
.notes__new:disabled:hover { background: none !important; color: inherit !important; }
.notes__body { background: rgba(9, 13, 22, 0.5); border-radius: 16px; padding: 16px 18px 18px; }
.notes__body h3 { margin: 0 0 12px; font-size: 21px; font-weight: 600; letter-spacing: 0.03em; }
.notes__body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.notes__none { font-size: 13px; line-height: 1.6; letter-spacing: 0.03em; opacity: 0.6; }
.notes__check { display: flex !important; align-items: center; gap: 14px; width: 100%; padding: 7px 4px !important; font-size: 15px; letter-spacing: 0.03em; text-align: left; border-radius: 8px; }
.notes__check i { width: 20px; height: 20px; flex: none; border: 2px solid var(--hud-text); border-radius: 6px; display: grid; place-items: center; transition: background 0.2s, border-color 0.2s; }
.notes__check i::after { content: ''; width: 9px; height: 5px; border-left: 2.5px solid var(--on-accent); border-bottom: 2.5px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform 0.2s; }
.notes__check.is-done i { background: linear-gradient(90deg, var(--accent), var(--accent-2)) border-box; border-color: transparent; }
.notes__check.is-done i::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.notes__check.is-done span { opacity: 0.55; text-decoration: line-through; }
/* the other kinds of block: a numbered line (its text lines up with the checklist's) and plain text */
.notes__num { display: flex; align-items: baseline; gap: 14px; padding: 7px 4px; font-size: 15px; letter-spacing: 0.03em; }
.notes__num b { flex: none; width: 20px; font-weight: 400; }
.notes__text { padding: 7px 4px; font-size: 15px; line-height: 1.55; letter-spacing: 0.03em; }

/* ---------------------------------------------------------------- captions + assistant (the outlined frame) */
.cap { position: relative; width: 780px; min-height: 150px; padding: 26px 64px 30px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 2px solid; border-image: linear-gradient(90deg, var(--accent), var(--accent-2)) 1; font-family: var(--caption-font); text-align: center; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.cap__src { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 500; opacity: 0.8; min-height: 1.3em; }
.cap .cap__flag svg { display: block; width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28); }
.cap__flag:empty { display: none; }
/* plain captions are small running text; a translation sits under its source line. Every line is
   Montserrat Medium, the one caption style the app uses. */
.cap:not(.ai):not(.is-translating) .cap__src { display: none; }
.cap:not(.ai):not(.is-translating) .cap__text { font-size: 24px; }
.cap__text { font-size: 27px; font-weight: 500; line-height: 1.32; min-height: 2.64em; display: flex; align-items: center; }
/* each word comes in as it is spoken (a quick fade, so it is not late); a translation arrives whole */
.cap__text span, .cap__said span { opacity: 0; animation: capWord 0.24s ease forwards; }
.cap__text .cap__all { animation-duration: 0.4s; }
.cap__stop { --ga: 135deg; position: absolute; right: 14px; bottom: 12px; width: 26px; height: 26px; border: 2px solid transparent !important; border-radius: 6px; display: grid; place-items: center; background: rgba(8, 12, 20, 0.4) !important; }
.cap__stop::after { content: ''; width: 8px; height: 8px; background: #fff; border-radius: 1.5px; }
.cap__status { position: absolute; left: 16px; top: 12px; display: flex; align-items: center; gap: 8px; font: 700 10.5px/1 var(--hud-font); letter-spacing: 0.18em; color: var(--accent); }
.cap__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes capWord { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------------------------------------------------------------- scanner */
/* In the app the Scanner has no panel. All it shows of itself is a small sign that it is on: four corner brackets round a
   dot, breathing in the accent gradient, which close in while a scan runs (objectscan/ScanIndicator.kt). Until the first
   scan a line under it says what to do. Taps go through both to the view. What a scan puts on a thing is drawn by the
   page, out in the view (main.css, .scanfx). */
.w[data-id='scanner'] { pointer-events: none !important; }
.scan { width: 300px; display: grid; justify-items: center; gap: 10px; }
.w .scan__sign { display: block; width: 56px; height: 56px; overflow: visible; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 55%, transparent)); }
.scan__corners, .scan__corners path, .scan__dot { transform-box: view-box; transform-origin: 50% 50%; }
.scan__corners path { stroke-width: 1.5px; vector-effect: non-scaling-stroke; transition: transform 0.42s ease; }
.w.is-focus .scan__corners { animation: scanBreathe 4.8s ease-in-out infinite; }
.scan__dot { opacity: 0.9; transition: transform 0.42s ease; }
.scan.is-scanning .scan__corners path { transform: scale(0.56); transition-duration: 0.22s; }
.scan.is-scanning .scan__dot { transform: scale(1.57); transition-duration: 0.22s; }
.scan__hint { width: 300px; height: 52px; display: grid; place-items: center; border-radius: 26px; background: rgba(42, 42, 42, 0.6); font: 400 15px/1 var(--hud-font); color: var(--hud-text); transition: opacity 0.3s ease; }
.scan.is-used .scan__hint { opacity: 0; }
@keyframes scanBreathe { 0%, 100% { transform: scale(1); opacity: 0.62; } 50% { transform: scale(1.08); opacity: 0.88; } }

/* ---------------------------------------------------------------- browser
   The app's web browser (browser/WebBrowserWidget.kt): a 720 x 600 panel with 16px corners. The
   main area is 40% black with a row of 40px chips over the page; history is a 60% black pane on
   the left taking two fifths of the width. Chips, the address bar and the favourite cards are
   the app's chip: #2A2A2A at half strength inside a 2px accent outline, and the accent itself
   when a chip is engaged. */
.web { display: flex; width: 720px; height: 600px; border-radius: 16px; overflow: hidden; text-shadow: none; }
.web .web__glass { position: relative; border: 2px solid transparent; background: rgba(42, 42, 42, 0.5); }
/* "border-box": the gradient runs across the whole chip, edge to edge. Left to start inside the
   border, it repeats in the border's two pixels and the fill looks as if it spills over the box. */
.web .web__glass.is-on { background: linear-gradient(var(--ga, 90deg), var(--accent), var(--accent-2)) border-box; }
.web .web__glass.is-on::before { display: none; }
.web button:disabled { cursor: default; }

.web__main { flex: 1; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 16px; background: rgba(0, 0, 0, 0.4); }
.web__bar { display: flex; align-items: center; gap: 8px; flex: none; }
.web .web__chip { --ga: 135deg; flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.web__chip svg { width: 22px; height: 22px; }
.web__chip:disabled svg { opacity: 0.3; }
.web .web__addr { flex: 1; min-width: 0; box-sizing: border-box; height: 40px; border-radius: 12px; display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 16px; }
.web__addr svg { flex: none; width: 18px; height: 18px; opacity: 0.7; }
.web__addr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web__addr.is-empty span { opacity: 0.5; }
.web__page { flex: 1; min-height: 0; container-type: inline-size; }

/* the homepage: favourites four to a row, then the Edit card */
.web__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; animation: webIn 0.25s ease; }
.web .web__card { --ga: 127deg; height: 112px; box-sizing: border-box; border-radius: 16px; }
.web .web__open { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 8px; box-sizing: border-box; }
.web__open b { max-width: 100%; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web__open--tool svg { width: 28px; height: 28px; }
.web__fav { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.web__fav svg { width: 64%; height: 64%; opacity: 0.7; }
.web__fav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; opacity: 0; }
.web__fav.is-in img { opacity: 1; }
.web__fav.is-in svg { visibility: hidden; }
.web .web__del { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); }
.web__del svg { width: 22px; height: 22px; }

/* history */
.web__hist { flex: 0 0 40%; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 20px; background: rgba(0, 0, 0, 0.6); }
.web__hist[hidden] { display: none; }
.web__hist h4 { margin: 0; font-size: 18px; font-weight: 600; }
.web__rows { flex: 1; min-height: 0; overflow: hidden auto; display: grid; gap: 8px; align-content: start; }
.web__none { margin: 0; font-size: 12px; opacity: 0.6; }
.web__row { display: flex; align-items: center; min-width: 0; border-radius: 10px; background: color-mix(in srgb, var(--hud-text) 6%, transparent); }
.web .web__row > button:first-child { flex: 1; min-width: 0; display: grid; gap: 4px; padding: 8px 12px; text-align: left; }
.web__row b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web__row span { font-size: 11px; opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web .web__rowdel { flex: none; width: 40px; height: 40px; display: grid; place-items: center; opacity: 0.7; }
.web__rowdel svg { width: 16px; height: 16px; }
.web .web__clear { flex: none; height: 44px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.web .web__clear:disabled { color: color-mix(in srgb, var(--hud-text) 30%, transparent); }
.web .web__clear:disabled::before { display: none; }

/* A page. These are templates, not the sites themselves: placeholder blocks in the shape of a
   video page, a search, an article and LifeHUD's own home page. Page text is Montserrat, the
   one text face the HUD has besides Orbitron. */
.pg { height: 100%; box-sizing: border-box; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 14px 18px 16px; background: var(--pg); color: var(--ink); font-family: var(--caption-font); font-weight: 500; animation: webIn 0.3s ease; }
.pg--dark { --pg: #101318; --ink: #eef1f6; --sk: rgba(255, 255, 255, 0.12); }
.pg--light { --pg: #f6f7f9; --ink: #1d2128; --sk: rgba(24, 30, 40, 0.12); }
@keyframes webIn { from { opacity: 0; } }
.pg .sk { display: block; flex: none; height: 9px; border-radius: 5px; background: var(--sk); }
.pg .sk--sm { height: 7px; }
.pg .sk--lg { height: 14px; }
.pg .sk--pill { height: 28px; border-radius: 14px; }
.pg .sk--field { height: 30px; border-radius: 15px; margin: 0 auto; }
.pg .sk--thumb { height: auto; aspect-ratio: 16 / 9; border-radius: 8px; }
.pg .sk--img { height: 112px; border-radius: 4px; }
.pg__top { flex: none; display: flex; align-items: center; gap: 10px; height: 34px; }
.pg__top .web__fav { width: 26px; height: 26px; }
.pg__top b { font-size: 15px; font-weight: 500; }
.pg__dot { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sk); }
.pg__dot--lg { width: 36px; height: 36px; }
.pg h5 { margin: 0; font-weight: 500; }

.pg-video__cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 34%; gap: 16px; }
.pg-video__main { min-width: 0; display: grid; gap: 10px; align-content: start; }
.pg-video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.pg-video__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.web .pg-video__play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.28); transition: opacity 0.3s; }
.pg-video__play span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 60%, transparent); }
.web.is-playing .pg-video__play { opacity: 0; }
.web .pg-video__snd { position: absolute; z-index: 2; right: 10px; bottom: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: #fff; background: rgba(8, 11, 18, 0.66); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset; }
.pg-video__prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.16); }
.pg-video__prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.pg-video h5 { font-size: 16px; }
.pg-video__by { display: flex; align-items: center; gap: 10px; }
.pg-video__by span { display: grid; gap: 4px; margin-right: auto; }
.pg-video__by b { font-size: 13px; font-weight: 500; }
.pg-video__by em { font-style: normal; font-size: 11.5px; opacity: 0.6; font-variant-numeric: tabular-nums; }
.pg-video__next { display: grid; gap: 12px; align-content: start; }
.pg-video__next div { display: grid; grid-template-columns: 46% minmax(0, 1fr); gap: 8px; }
.pg-video__next span { display: grid; gap: 7px; align-content: start; padding-top: 3px; }

.pg-search .pg__top { gap: 12px; }
.pg-search__box { flex: 1; max-width: 380px; box-sizing: border-box; height: 34px; padding: 0 12px 0 16px; border-radius: 17px; border: 1px solid rgba(24, 30, 40, 0.2); background: #fff; display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.pg-search__box svg { width: 18px; height: 18px; opacity: 0.55; }
.pg-search__tabs { flex: none; display: flex; gap: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--sk); }
.pg-search__hit { flex: none; width: 100%; max-width: 540px; display: grid; gap: 7px; justify-items: start; text-align: left; }
.pg-search__hit .sk { justify-self: stretch; }
.pg-search__hit em { font-style: normal; font-size: 12px; opacity: 0.7; }
.pg-search__hit b { font-size: 17px; font-weight: 500; color: #1a4fc4; }
.web button.pg-search__hit:hover b { text-decoration: underline; }

.pg-wiki h5 { flex: none; padding-bottom: 8px; font-size: 24px; border-bottom: 1px solid var(--sk); }
.pg-wiki__lead { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 18px; align-items: start; }
.pg-wiki__lead > div, .pg-wiki__more { display: grid; gap: 11px; align-content: start; }
.pg-wiki figure { margin: 0; padding: 8px; display: grid; gap: 8px; border: 1px solid var(--sk); border-radius: 6px; }

.pg-life .pg__top { gap: 14px; }
.pg-life__logo { height: 28px; width: auto; margin-right: auto; }
.pg-life__hero { flex: 1; min-height: 0; display: grid; align-content: center; justify-items: center; gap: 13px; padding: 0 28px; text-align: center; }
.pg-life__hero small { font: 600 10px/1 var(--hud-font); letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.7; }
.pg-life__hero h5 { font: 600 25px/1.22 var(--hud-font); text-wrap: balance; }
.pg-life__hero p { margin: 0; font-size: 13px; line-height: 1.5; opacity: 0.75; }
.web .pg-life__hero button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 14px; border-radius: 12px; background: var(--logo, linear-gradient(90deg, #f77062, #fe5196)); color: #14080d; font: 600 11px/1 var(--hud-font); letter-spacing: 0.12em; text-transform: uppercase; }
.pg-life__hero button svg { width: 15px; height: 15px; }
.pg-life footer { flex: none; font: 500 9.5px/1 var(--hud-font); letter-spacing: 0.2em; text-transform: uppercase; text-align: center; opacity: 0.55; }

/* with history open the page is narrower, and it reflows as a real one would */
@container (max-width: 520px) {
  .pg { padding: 12px 14px 14px; }
  .pg-video__cols { grid-template-columns: minmax(0, 1fr); }
  .pg-video__next { display: none; }
  .pg-wiki__lead { grid-template-columns: minmax(0, 1fr) 130px; gap: 12px; }
  .pg-wiki h5 { font-size: 20px; }
  .pg-life__hero { padding: 0 6px; }
  .pg-life__hero h5 { font-size: 19px; }
  .pg-life .pg__top .sk:not(.sk--pill) { display: none; }
  .pg-search__hit b { font-size: 15px; }
}

/* ---------------------------------------------------------------- theme picker */
.thm { display: grid; gap: 22px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5); }
.thm__row { display: flex; align-items: center; gap: 26px; }
.thm__row > span { width: 170px; font-weight: 700; font-size: 21px; letter-spacing: 0.02em; white-space: nowrap; }
.thm__sw { display: flex; gap: 16px; padding: 12px 20px; border-radius: 30px; background: rgba(18, 20, 26, 0.62); }
.thm__sw button { width: 34px; height: 34px; border-radius: 50%; background: var(--c) !important; box-shadow: 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s; }
.thm__sw button:hover { transform: scale(1.14); }
.thm__sw button.is-sel { box-shadow: 0 0 0 3px #12141a, 0 0 0 6px #fff, 0 0 20px var(--c); }

/* ---------------------------------------------------------------- phone-sized screens: narrower versions of the wide widgets */
.is-narrow .notes { grid-template-columns: 330px; gap: 12px; }
.is-narrow .notes__search, .is-narrow .notes__new { display: none; }
.is-narrow .cap { width: 560px; padding: 30px 34px 30px; }
.is-narrow .thm__row { flex-direction: column; align-items: flex-start; gap: 10px; }
.is-narrow .thm__row > span { width: auto; }
.is-narrow .w-tag, .is-narrow .w-frame { display: none; }

/* ---------------------------------------------------------------- dock */
/* Each tile is the app's menu chip, drawn from the app's own outline (hud.js): three rounded
   corners and a 45-degree chamfer on the bottom-right. Closed, it is dark glass inside an
   accent-gradient outline. Open (its widget is showing), the accent gradient wipes in from the
   left and the outline fades, as in the app. The icon is half the chip and the gap between chips
   is 15% of it, as in the app; the app's red "not opened yet" dots are left out on purpose. */
.dock { display: grid; gap: 7px; pointer-events: auto; font-family: var(--hud-font); }
/* a phone held sideways: two abreast, as there is no height for fifteen in a column (hud.js, dockPlace) */
.is-low .dock { grid-template-columns: repeat(2, 46px); }
.is-low .dock__sep { grid-column: 1 / -1; }
.dock__defs { position: absolute; }
/* 46px tiles, so all fifteen sit comfortably in the column */
.dock__tile { --lit: 1; position: relative; width: 46px; height: 46px; padding: 0; border: 0; background: none; color: var(--hud-text); display: grid; place-items: center; cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s, opacity 0.5s ease; }
/* the chip is drawn 2 units larger all round than its 80-unit outline, to leave room for the outline's stroke */
.dock__chip { position: absolute; left: -2.5%; top: -2.5%; width: 105%; height: 105%; overflow: visible; }
.dock__chip-glass { fill: rgba(42, 42, 42, 0.5); }
.dock__chip-fill { opacity: 0; clip-path: inset(0 100% 0 0); transition: clip-path 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s; }
.dock__chip-edge { transition: opacity 0.4s; }
.dock__ico { position: relative; display: grid; width: 23px; height: 23px; }
.dock__ico svg { width: 100%; height: 100%; }
.dock__chip, .dock__ico { opacity: var(--lit); transition: opacity 0.35s ease; }

/* Which tiles are lit. A tile whose widget is showing is filled with the accent at full
   strength; one whose widget is closed is dark glass at half strength. While one widget is in
   focus it is the only thing on screen, so its tile is the only one lit and every other tile
   drops to the closed look, whatever is open behind. Hovering a tile brings it up to full strength. */
.dock__tile.is-on .dock__chip-fill { opacity: 1; clip-path: inset(0); }
.dock__tile.is-on .dock__chip-edge { opacity: 0; }
.dock.is-focusing .dock__tile:not(.is-focus) .dock__chip-fill { opacity: 0; clip-path: inset(0 100% 0 0); }
.dock.is-focusing .dock__tile:not(.is-focus) .dock__chip-edge { opacity: 1; }
.dock__tile:not(.is-on):is(:not(:hover), .is-quiet), .dock.is-focusing .dock__tile:not(.is-focus):is(:not(:hover), .is-quiet) { --lit: 0.5; }
/* boot: tiles slide in one after another, then lose the stagger so hover feels instant */
.dock:not(.is-on) { pointer-events: none !important; }
.dock:not(.is-on) .dock__tile, .dock:not(.is-on) .dock__sep { opacity: 0; transform: translateX(-28px); }
.dock.is-on:not(.is-ready) .dock__tile { transition-delay: calc(var(--i) * 45ms); transition-duration: 0.7s; }
.dock__sep { transition: opacity 0.6s ease 0.4s; }
/* (A touch screen has nothing to hover with, and leaves "hover" on the last thing touched until
   something else is. So hovering counts only where there is a mouse, and never on a chip a finger
   has just pressed: .is-quiet, set by hud.js.) */
@media (hover: hover) {
  .dock__tile:hover:not(.is-quiet) { transform: translateX(6px) scale(1.06); filter: drop-shadow(0 0 9px color-mix(in srgb, var(--accent) 65%, transparent)); }
}
.dock__tile.is-focus { filter: drop-shadow(0 0 10px var(--accent)); }
.dock__tile:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.dock__label { position: absolute; left: calc(100% + 14px); top: 50%; padding: 7px 11px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  font: 700 11px/1 var(--hud-font); letter-spacing: 0.16em; text-transform: uppercase; color: #fff; background: rgba(8, 11, 17, 0.82); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  opacity: 0; transform: translate(-6px, -50%); transition: opacity 0.2s, transform 0.25s; }
/* A chip's name shows while a mouse is over it. Pressed with a finger, it shows for a moment
   (.is-named, set by hud.js) and then goes: it only says what was picked. */
@media (hover: hover) {
  .dock__tile:hover:not(.is-quiet) .dock__label { opacity: 1; transform: translate(0, -50%); }
}
.dock__tile:focus-visible .dock__label, .dock__tile.is-named .dock__label { opacity: 1; transform: translate(0, -50%); }
.dock__sep { height: 2px; margin: 3px 12px; border-radius: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 50%, transparent), color-mix(in srgb, var(--accent-2) 50%, transparent)); }
