/* ==========================================================================
   billogna.lol/live
   The frame (strip, chat, offline card, popovers) follows the site theme:
   --text / --muted / --border / --panel and the theme's fonts, from
   /shared/css/base.css + the theme sheet. The tracker and the map are a fixed
   graphite object with race.css's --m-* tokens, the same on every theme.
   Nothing animates at rest except the LIVE dot (steps(6)); every other motion
   is a one-off, and prefers-reduced-motion drops all of it.
   ========================================================================== */

[hidden] { display: none !important; }

:root {
  --strip-h: 56px;
  --live-red: #ff5a6e;
  --tw: #9146FF;
  --tt: #25F4EE;
  --yt: #FF4E45;
  --cyan: #5ee6ff;
  --text-dim: #7d8197;
  --frame-bg: rgba(255, 255, 255, .035);
  --frame-bg-solid: #111116;
  --ui: "DM Mono", "IBM Plex Mono", Consolas, monospace;
  --display: "Unbounded", "Inter", system-ui, sans-serif;
  --read: "Inter", system-ui, -apple-system, sans-serif;
}

/* the graphite object (race.css .race tokens) */
.board, .plate {
  --m-bg: #17171A;
  --m-raised: #1D1D21;
  --m-raised2: #26262B;
  --m-well: #121215;
  --m-hair: rgba(255, 255, 255, .075);
  --m-hair-top: rgba(255, 255, 255, .12);
  --m-hair-strong: rgba(255, 255, 255, .18);
  --m-ink: #F3F1EA;
  --m-ink2: #BDBBB3;
  --m-mute: #918F87;
  --m-faint: #5F5E59;
  --m-gold: #E6B143;
  --m-gold-hi: #F1C158;
  --m-gold-wash: rgba(230, 177, 67, .14);
  --m-gold-line: rgba(230, 177, 67, .55);
  --m-pixel: "Press Start 2P", monospace;
}

body.lv {
  margin: 0;
  min-height: 100vh;
  background: #070709;
  color: var(--text);
  font-family: var(--ui);
  line-height: 1.5;
}
.lv-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(62vw 52vh at 4% -12%, rgba(179, 255, 200, .085), transparent 62%),
    radial-gradient(48vw 62vh at 104% 28%, rgba(255, 110, 247, .06), transparent 62%),
    radial-gradient(56vw 50vh at 38% 112%, rgba(94, 173, 255, .075), transparent 62%),
    #070709;
}
.lv button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------------------------------------------------------------- strip */
.strip {
  position: sticky; top: 0; z-index: 60;
  height: var(--strip-h);
  background: rgba(9, 9, 12, .84);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.strip-in {
  max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 18px;
  display: flex; align-items: center; gap: 16px; min-width: 0;
}
.brand {
  font: 700 13px/1 var(--display); letter-spacing: .01em; color: var(--text);
  white-space: nowrap; padding-right: 16px; border-right: 1px solid var(--border);
}
.brand span { color: var(--muted); }
.onair {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 500 12px/1 var(--ui); letter-spacing: .16em; color: var(--muted);
}
.onair b { font-weight: 500; }
.ldot {
  position: relative; display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-dim); flex: none;
}
body[data-state="live"] .onair,
body[data-state="connecting"] .onair { color: #fff; }
body[data-state="live"] .onair .ldot,
body[data-state="connecting"] .onair .ldot { background: var(--live-red); }
/* the one animation at rest: a stepped ring, six frames, no smooth glow */
body[data-state="live"] .onair .ldot::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 1.5px solid var(--live-red);
  animation: lv-ring 1.5s steps(6) infinite;
}
@keyframes lv-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
body[data-state="unavailable"] .onair .ldot,
body[data-state="failed"] .onair .ldot { background: #e0a43a; }
body[data-state="unavailable"] .onair, body[data-state="failed"] .onair { color: #e8c685; }

.runclock {
  font: 500 15px/1 var(--ui); font-variant-numeric: tabular-nums; color: var(--text);
  letter-spacing: .02em;
}
.runclock.paused { color: var(--muted); }
.runclock.done { color: #E6B143; }
.chips {
  font: 400 12px/1 var(--ui); color: var(--muted); min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spacer { flex: 1 1 0; }
.sync-chip {
  background: none; border: 0; padding: 8px 6px; cursor: pointer;
  font: 400 11px/1 var(--ui) !important; letter-spacing: .06em; color: var(--text-dim) !important;
  white-space: nowrap;
}
.sync-chip.off-default { color: var(--text) !important; }
.sync-chip::after { content: " \25BE"; }
.sync-chip.first { padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text) !important; }
.sp-why { margin: -4px 0 12px; font: 400 11px/1.45 var(--ui); color: var(--muted); }
body[data-state="offline"] .sync-chip, body[data-state="loading"] .sync-chip { visibility: hidden; }
body[data-state="offline"] .chips, body[data-state="offline"] .runclock,
body[data-state="unavailable"] .runclock { display: none; }
/* no word from the PC: what is on the page is the last we knew, dimmed */
body[data-state="unavailable"] .col-left, body[data-state="unavailable"] .chat-list { opacity: .6; }
.sync-chip:hover, .sync-chip:focus-visible { color: var(--text) !important; text-decoration: underline; text-underline-offset: 3px; }
.watch { display: flex; gap: 8px; }
.watch a.w, .watch-list a.w {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 13px; border-radius: 999px;
  font: 600 12.5px/1 var(--read); color: var(--text);
  background: rgba(255, 255, 255, .045); border: 1px solid var(--border);
  transition: border-color .15s ease, background .15s ease;
}
.w::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c, #888); }
.w-twitch { --c: var(--tw); }
.w-tiktok { --c: var(--tt); }
.w-youtube { --c: var(--yt); }
.watch a.w:hover, .watch a.w:focus-visible, .watch-list a.w:hover { border-color: var(--c); background: rgba(255, 255, 255, .08); }
.watch-btn, .tabs { display: none; }

.banner {
  position: sticky; top: var(--strip-h); z-index: 55;
  padding: 9px 18px; text-align: center;
  font: 500 12.5px/1.3 var(--ui); color: #f3dcae;
  background: rgba(64, 44, 12, .88); border-bottom: 1px solid rgba(224, 164, 58, .4);
}

/* ---------------------------------------------------------------- head toast
   one moment at a time, inline in the ITEMS head (live.js toast queue) */
.head-toast {
  margin-left: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 5px 11px; border-radius: 999px;
  font: 700 12px/1 var(--display); color: var(--m-ink);
  background: var(--m-well); border: 1px solid var(--m-hair-strong);
  animation: lv-toast .2s ease-out;
}
.head-toast.t-dungeon, .head-toast.t-go { color: var(--m-gold-hi); border-color: var(--m-gold-line); }
@keyframes lv-toast { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- layout */
.lv-main {
  max-width: 1200px; margin: 18px auto 0; padding: 0 18px;
  display: grid; grid-template-columns: minmax(0, 760px) 380px; gap: 24px;
  justify-content: center; align-items: start;
}
.col-left { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.player {
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: #000;
}
.player iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------------- board */
.board {
  position: relative;
  padding: 16px 20px 20px;
  border-radius: 12px;
  border: 1px solid var(--m-hair); border-top-color: var(--m-hair-top);
  background:
    radial-gradient(520px 260px at 96% -16%, rgba(230, 177, 67, .07), transparent 62%),
    linear-gradient(180deg, var(--m-raised), var(--m-bg));
  color: var(--m-ink);
  font: 400 14px/1.45 var(--read);
  box-shadow: 0 30px 70px -36px rgba(0, 0, 0, .8);
  transition: border-color .3s ease;
}
.board.go { border-color: var(--m-gold-line); box-shadow: inset 0 0 0 1px rgba(230, 177, 67, .35), 0 30px 70px -36px rgba(0, 0, 0, .8); }
.board.stale > :not(.board-head) { opacity: .6; transition: opacity .4s ease; }
.board-head {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; min-height: 26px;
}
.board-head h2 small, .dg-k {
  font: 500 11px/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--m-mute);
}
.board-head h2 small { margin-left: 10px; letter-spacing: .12em; }
.dg-k { margin: 22px 0 10px; }
.board-head h2 {
  margin: 0; font: 700 12px/1 var(--display) !important; letter-spacing: .18em; text-transform: uppercase;
  color: var(--m-ink2); text-shadow: none;
}
.stale-chip {
  margin-left: auto; padding: 4px 10px; border-radius: 999px;
  font: 400 11px/1 var(--ui); color: var(--m-ink2);
  background: var(--m-well); border: 1px solid var(--m-hair-strong);
}

.board-top { display: flex; gap: 26px; align-items: flex-start; }
.igrid { display: grid; grid-template-columns: repeat(6, 60px); gap: 5px; flex: none; }
.icell {
  position: relative; width: 60px; height: 60px; padding: 0; margin: 0;
  display: grid; place-items: center; cursor: default;
  background: var(--m-well); border: 1px solid var(--m-hair); border-radius: 8px;
}
.icell img { width: 48px; height: 48px; display: block; pointer-events: none; }
.icell.nf img { filter: grayscale(1); opacity: .28; }
.icell.found { background: #18181c; border-color: var(--m-hair-strong); }
.icell:focus-visible, .dt:focus-visible { outline: 2px solid var(--m-gold); outline-offset: 2px; }
.icell.pop { animation: lv-pop .5s ease-out; z-index: 2; }
.icell.pop::after {
  content: ""; position: absolute; inset: -1px; border-radius: 9px; border: 1px solid var(--m-gold-hi);
  animation: lv-ring-out .5s ease-out forwards; pointer-events: none;
}
@keyframes lv-pop { 0% { transform: scale(1); } 30% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes lv-ring-out { from { transform: scale(1); opacity: 1; } to { transform: scale(1.45); opacity: 0; } }

.crystal { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 2px; }
.cc-k { font: 500 11px/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--m-mute); }
.cc-n { font: 400 24px/1.1 var(--m-pixel); color: var(--m-gold); letter-spacing: .02em; margin: 4px 0 2px; }
.cc-line { margin: 0; max-width: 30ch; font: 400 13px/1.5 var(--read); color: var(--m-mute); }
.here-line { margin: 6px 0 0; font: 500 12px/1.3 var(--ui); color: var(--cyan); }
.here-line:empty { display: none; }

.dgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); gap: 8px;
}
.dt {
  position: relative; height: 82px; padding: 0; margin: 0; cursor: default;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--m-well); border: 1px solid var(--m-hair); border-radius: 9px;
  color: var(--m-ink2);
}
.dt .dl { position: absolute; top: 6px; left: 7px; font: 500 10px/1 var(--ui); letter-spacing: .06em; color: var(--m-mute); }
.dt .boss { width: 32px; height: 32px; margin-top: 8px; }
.dt.nf .boss { filter: grayscale(.85) brightness(.75); opacity: .7; }
.dt .sock {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, .35);
}
.dt .sock img { width: 16px; height: 16px; }
.dt .sock.unk { border: 1px dashed var(--m-faint); background: none; }
.dt .sock.unk img { opacity: .55; width: 12px; height: 12px; }
.dt .cnt { font: 500 11px/1 var(--ui); font-variant-numeric: tabular-nums; color: var(--m-ink2); }
.dt.chests-done .cnt { color: var(--m-gold); }
.dt.done {
  background: linear-gradient(180deg, rgba(230, 177, 67, .26), rgba(230, 177, 67, .08));
  border-color: var(--m-gold-line);
}
.dt.done .dl { color: var(--m-gold-hi); }
.dt .here-tag {
  display: none; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
  font: 500 9px/1.2 var(--ui); color: #071a1f; background: var(--cyan);
}
.dt.here { box-shadow: 0 0 0 2px var(--cyan); border-color: transparent; }
.dt.here .here-tag { display: block; }
.dt.flip { animation: lv-flip .6s ease-in-out; }
@keyframes lv-flip { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }

/* skeleton: the board's shape, no art, while the first update is on its way */
.board.skeleton .icell img, .board.skeleton .dt > *, .board.skeleton .crystal > * { visibility: hidden; }
.board.skeleton .crystal::before {
  content: ""; display: block; width: 110px; height: 22px; border-radius: 6px; background: var(--m-well);
}
.map-board.skeleton .map-layer, .map-board.skeleton .map-wait { visibility: hidden; }
.map-board.skeleton .map-img { opacity: .25; }

/* ---------------------------------------------------------------- map */
.map-note { font: 500 12px/1.2 var(--ui); color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.seg {
  margin-left: auto; display: inline-flex; padding: 2px; border-radius: 8px;
  background: var(--m-well); border: 1px solid var(--m-hair);
}
.seg button {
  padding: 6px 12px; border: 0; border-radius: 6px; background: none; cursor: pointer;
  font: 500 11px/1 var(--ui) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--m-mute) !important;
}
.seg button[aria-pressed="true"] { background: var(--m-raised2); color: var(--m-ink) !important; }
.seg button:focus-visible { outline: 2px solid var(--m-gold); outline-offset: 1px; }

.map {
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: 8px; background: #0c0c0e; border: 1px solid var(--m-hair);
  container-type: inline-size;
  --d: clamp(8px, 1.75cqw, 13px);
}
.map-img {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  image-rendering: pixelated; user-select: none;
}
.map-layer { position: absolute; inset: 0; }
.map-wait {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  font: 400 12px/1 var(--ui); color: var(--m-ink2); background: rgba(18, 18, 21, .88);
}

/* check dots: the helper map.html's "beacon" fills - how full = how sure */
.dot {
  position: absolute; width: var(--d); height: var(--d); border-radius: 50%;
  transform: translate(-50%, -50%); box-sizing: border-box; z-index: 2;
}
.dot.available {
  background: radial-gradient(circle at 36% 30%, #d9ffe6 0, #6dff9e 26%, #2bd367 62%, #149b46 100%);
  border: 1.5px solid #06170c;
  box-shadow: 0 0 0 1px rgba(77, 255, 136, .85), 0 0 7px 1px rgba(77, 255, 136, .5);
}
.dot.possible {
  background: linear-gradient(to top, #ffd23a 0, #ffd23a 52%, rgba(18, 18, 20, .88) 52%);
  border: 1.5px solid #ffd23a; box-shadow: 0 0 0 1px #000;
}
.dot.visible {
  background: radial-gradient(circle, #ff9a1f 0, #ff9a1f 22%, rgba(18, 18, 20, .88) 25%);
  border: 2px solid #ff9a1f; box-shadow: 0 0 0 1px #000;
}
.dot.unavail {
  background: rgba(18, 18, 20, .72); border: 2px solid #ff5a52;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .85); width: calc(var(--d) * .74); height: calc(var(--d) * .74);
}
.dot.cleared {
  background: rgba(18, 18, 20, .6); border: 1px solid rgba(243, 241, 234, .32);
  width: calc(var(--d) * .48); height: calc(var(--d) * .48); z-index: 1;
}
.dng {
  position: absolute; width: calc(var(--d) * 2.1); height: calc(var(--d) * 2.1); border-radius: 50%;
  transform: translate(-50%, -50%); display: grid; place-items: center; z-index: 5;
  background: radial-gradient(circle at 50% 38%, #34343b 0, #17171a 72%);
  box-shadow: inset 0 0 0 2.5px var(--ring, #ff5a52), 0 0 0 1.5px #000, 0 0 9px var(--halo, transparent);
}
.dng img { width: 62%; height: 62%; object-fit: contain; }
.dng.available { --ring: #4dff88; --halo: rgba(77, 255, 136, .55); }
.dng.possible { --ring: #ffd23a; --halo: rgba(255, 215, 0, .3); }
.dng.visible { --ring: #ff9a1f; }
.dng.unavail { --ring: #ff5a52; }
.dng.boss-cleared { --ring: #9bd0f5; --halo: rgba(155, 208, 245, .4); }
.dng.cleared { --ring: #E6B143; background: radial-gradient(circle at 50% 38%, #3a3222 0, #1a160e 72%); }
.dng.here { box-shadow: inset 0 0 0 2.5px var(--ring, #ff5a52), 0 0 0 2px #000, 0 0 0 4.5px var(--cyan); }
.dot .left {
  position: absolute; right: -6px; bottom: -6px; min-width: 11px; height: 11px; padding: 0 2px;
  border-radius: 6px; box-sizing: border-box; text-align: center;
  font: 700 8px/11px var(--read); color: #0E0E10; background: #F3F1EA; box-shadow: 0 0 0 1px #000;
}
.dng .dlab { position: relative; font: 700 calc(var(--d) * .62)/1 var(--ui); letter-spacing: -.02em; color: var(--m-ink); }
/* entrance-shuffle doors: the dots' fills in an arch */
.door {
  position: absolute; z-index: 3; width: calc(var(--d) * .9); height: var(--d);
  transform: translate(-50%, -50%); box-sizing: border-box;
  border-radius: 50% 50% 2px 2px / 60% 60% 2px 2px;
  background: rgba(18, 18, 20, .8); border: 1.5px solid #ff5a52; box-shadow: 0 0 0 1px #000;
}
.door.available { background: #2bd367; border-color: #06170c; box-shadow: 0 0 0 1px rgba(77, 255, 136, .85), 0 0 6px rgba(77, 255, 136, .45); }
.door.possible { background: linear-gradient(to top, #ffd23a 0, #ffd23a 52%, rgba(18, 18, 20, .88) 52%); border-color: #ffd23a; }
.door.visible { border-color: #ff9a1f; }
.door.known { background: #6f7f99; border-color: #1b2130; }
.door.cleared { background: rgba(18, 18, 20, .55); border: 1px solid rgba(243, 241, 234, .3); transform: translate(-50%, -50%) scale(.6); }
.swap {
  position: absolute; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(181, 148, 255, .10) 0 4px, transparent 4px 9px);
  box-shadow: inset 0 0 0 1px rgba(181, 148, 255, .22);
}
/* his own sprite's World-map head in place of the dot, an off-white halo
   so it reads on green and gold pins */
.link-dot.sprite {
  width: auto; height: auto; background: none; border: 0; border-radius: 0; box-shadow: none;
  display: grid; place-items: center;
}
.link-dot.sprite img {
  display: block; height: auto; image-rendering: pixelated;
  filter: drop-shadow(0 0 1px #f4f1e8) drop-shadow(0 0 1px #f4f1e8) drop-shadow(0 1px 3px rgba(0, 0, 0, .7));
}
.link-dot.sprite.indoors { opacity: 1; }
.link-dot.sprite.indoors img { opacity: .55; }
.link-dot.sprite.indoors::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px dashed #f4f1e8; opacity: .8;
}
/* his head speaks for itself: no "Link" tag under the sprite (the plain
   fallback dot keeps it - a green dot alone reads as one more check) */
.link-dot.sprite::after, .room .link-dot.sprite.indoors::after { display: none; }
.stand { display: block; height: auto; image-rendering: pixelated; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); margin: -6px 0; }
.map-note:empty { display: none; }
.link-dot.tag-l::after { left: auto; right: 50%; transform: none; }
.link-dot.tag-r::after { left: 50%; transform: none; }
.link-dot.tag-up::after { top: auto; bottom: calc(100% + 5px); }
.link-dot.indoors { opacity: .55; border-style: dashed; box-shadow: 0 0 0 2px #06170c; }
.link-dot.indoors::after { content: "Link \00b7 inside"; }
.link-dot {
  position: absolute; z-index: 10; width: calc(var(--d) * 1.45); height: calc(var(--d) * 1.45);
  border-radius: 50%; transform: translate(-50%, -50%);
  background: #4dff88; border: 2.5px solid #F3F1EA;
  box-shadow: 0 0 0 2px #06170c, 0 0 14px 3px rgba(77, 255, 136, .7);
  transition: left .26s linear, top .26s linear;
}
.link-dot::after {
  content: "Link"; position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%);
  padding: 1px 5px; border-radius: 4px; font: 500 9px/1.3 var(--ui); color: #06170c; background: #F3F1EA;
  white-space: nowrap;
}
.map-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-top: 12px; font: 400 11px/1.4 var(--ui); color: var(--m-mute);
}
.legend-dots { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.legend-dots .dot {
  position: relative; display: inline-block; transform: none; --d: 10px; margin-left: 6px;
  vertical-align: -1px; box-shadow: none;
}
.legend-dots .dot.available { box-shadow: 0 0 0 1px rgba(77, 255, 136, .85); }

/* ---------------------------------------------------------------- plates */
.plate {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  min-height: 120px; padding: 18px 24px; border-radius: 12px; text-align: left;
  border: 1px solid var(--m-hair); border-top-color: var(--m-hair-top);
  background: linear-gradient(180deg, var(--m-raised), var(--m-bg));
  color: var(--m-ink); box-shadow: 0 30px 70px -36px rgba(0, 0, 0, .8);
}
.plate b { display: block; font: 700 18px/1.2 var(--display); letter-spacing: .04em; }
.plate span { display: block; margin-top: 6px; font: 400 12px/1.3 var(--ui); color: var(--m-mute); }
.plate .mono { margin: 0; font-size: 13px; color: var(--m-ink2); }
.seal-plate { border-color: var(--m-gold-line); }
.seal-plate .lock { width: 30px; height: 30px; fill: var(--m-gold); flex: none; }

/* ---------------------------------------------------------------- chat */
.chat {
  position: sticky; top: calc(var(--strip-h) + 18px);
  height: calc(100vh - var(--strip-h) - 36px); min-height: 420px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--frame-bg); border: 1px solid var(--border); border-radius: 14px;
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px 11px;
  border-bottom: 1px solid var(--border);
}
.chat-head h2 {
  margin: 0; font: 700 12px/1 var(--display) !important; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text); text-shadow: none;
}
.legend { margin-left: auto; display: inline-flex; gap: 12px; font: 400 11px/1 var(--ui); color: var(--muted); }
.legend .lg-s { display: none; }
.pm { display: inline-block; width: 3px; height: 11px; border-radius: 1px; margin-right: 5px; vertical-align: -1px; }
.pm.p-twitch { background: var(--tw); }
.pm.p-tiktok { background: var(--tt); }
.pm.p-youtube { background: var(--yt); }
.pins { display: flex; flex-direction: column; gap: 6px; padding: 0 10px; }
.pins:not(:empty) { padding-top: 10px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.chat-scroll {
  position: relative; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 0 14px;
  /* the line under the top edge dissolves instead of being sliced */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22px); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent;
}
.chat-scroll:focus-visible { outline: 1px solid var(--border-strong); outline-offset: -1px; }
.chat-list { list-style: none; margin: 0; padding: 0 12px 0 12px; display: flex; flex-direction: column; gap: 1px; }
.chat-empty { margin: 32px 16px; text-align: center; font: 400 12px/1.4 var(--ui); color: var(--muted); }

.ln {
  --plat: var(--tw);
  display: flex; gap: 9px; align-items: flex-start;
  padding: 5px 8px 5px 9px; border-left: 3px solid var(--plat); border-radius: 2px 6px 6px 2px;
  font: 400 15px/1.45 var(--read); color: var(--text);
  overflow-wrap: anywhere; word-break: normal;
  transition: height .24s ease, opacity .24s ease, padding .24s ease, margin .24s ease;
}
.ln:hover { background: rgba(255, 255, 255, .03); }
.p-twitch { --plat: var(--tw); }
.p-tiktok { --plat: var(--tt); }
.p-youtube { --plat: var(--yt); }
.ln-b { min-width: 0; max-width: 72ch; }
.ln .nm { font: 600 14px/1.45 var(--read); margin-right: 7px; }
.ln .bdgw { display: inline-block; margin-right: 4px; vertical-align: -1px; }
.ln .bdg { width: 12px; height: 12px; fill: currentColor; display: block; }
.ln .tx { color: var(--text); }
.ln .emo { height: 1.4em; width: auto; vertical-align: middle; margin: -.2em .06em; }
.ln .firsttag {
  display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; vertical-align: 1px;
  font: 500 10px/1.5 var(--ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent, #b3ffc8); border: 1px solid currentColor;
}
.av {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; object-fit: cover;
  background: rgba(255, 255, 255, .06);
}
.av.mono { display: grid; place-items: center; font: 700 11px/1 var(--read); color: #fff; }
.ln.in, .moment.in { animation: lv-in .16s ease-out; }
@keyframes lv-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ln.gone, .moment.gone {
  height: 0 !important; opacity: 0; padding-top: 0 !important; padding-bottom: 0 !important;
  margin-top: 0 !important; margin-bottom: 0 !important; overflow: hidden;
  border-width: 0 0 0 3px;
}

.moment {
  position: relative; list-style: none;
  display: flex; align-items: center; gap: 11px;
  margin: 7px 0; padding: 11px 13px; border-radius: 10px;
  background: var(--panel, rgba(12, 16, 32, .78)); border: 1px solid rgba(230, 177, 67, .55);
  color: var(--text); overflow: hidden;
  transition: height .24s ease, opacity .24s ease, padding .24s ease, margin .24s ease;
}
.moment .mimg { width: 40px; height: 40px; flex: none; object-fit: contain; }
.moment .mt { min-width: 0; }
.moment .mh { display: block; font: 700 16px/1.25 var(--display); letter-spacing: -.005em; overflow-wrap: anywhere; }
.moment .ms { display: block; margin-top: 3px; font: 400 11px/1.2 var(--ui); color: var(--muted); }
.moment.k-follow { padding: 7px 12px; border-color: var(--border-strong); }
.moment.k-follow .mh { font: 600 13px/1.3 var(--read); }
.pins .moment { margin: 0; }
.moment.held { display: none; }
/* a raid or a big gift: the site's aurora ring, once round for its 8 s */
@property --lv-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.moment.big.pinned { border-color: transparent; }
.moment.big.pinned::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--lv-a), #b3ffc8, #8a6bff, #5eadff, #ff6ef7, #b3ffc8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: lv-spin 8s linear 1 forwards;
}
@keyframes lv-spin { to { --lv-a: 720deg; } }

.newchip {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font: 500 12px/1 var(--ui) !important; color: var(--text) !important;
  background: rgba(18, 18, 24, .94); border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8);
}

/* ---------------------------------------------------------------- offline */
.offline { min-height: calc(100vh - var(--strip-h) - 80px); display: grid; place-items: center; padding: 40px 16px; }
.off-card {
  max-width: 560px; text-align: center; padding: 44px 32px 38px; border-radius: 18px;
  background: var(--frame-bg); border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
.off-k { display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.off-card h1 { margin: 18px 0 12px; font: 900 34px/1.15 var(--display); letter-spacing: -.02em; color: var(--text); }
.off-card p { margin: 0 auto 26px; max-width: 42ch; font: 400 15px/1.55 var(--read); color: var(--muted); }
.off-act { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------------------------------------------------------------- sync + sheets */
.sync-pop {
  position: fixed; z-index: 80; top: calc(var(--strip-h) + 6px); right: 18px; width: 280px;
  padding: 14px 16px 14px; border-radius: 14px;
  background: rgba(17, 17, 23, .97); border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .85);
  font: 400 12px/1.4 var(--ui); color: var(--text);
}
.sp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sp-head b { font: 700 11px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.sp-x { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 20px !important; line-height: 1; color: var(--muted) !important; }
.sp-x:hover { background: rgba(255, 255, 255, .06); color: var(--text) !important; }
.sp-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sp-presets button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; cursor: pointer;
  border-radius: 9px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03);
  font: 600 12px/1 var(--read) !important;
}
.sp-presets button i { font: 400 11px/1 var(--ui); font-style: normal; color: var(--muted); }
.sp-presets button[aria-pressed="true"] { border-color: var(--accent, #b3ffc8); background: rgba(179, 255, 200, .1); }
.sp-slider { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.sp-slider button {
  flex: none; padding: 6px 8px; border-radius: 7px; cursor: pointer; border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03); font: 500 11px/1 var(--ui) !important;
}
.sp-slider input { flex: 1; min-width: 0; accent-color: var(--accent, #b3ffc8); }
.sp-val { margin-top: 6px; text-align: center; font: 500 13px/1 var(--ui); font-variant-numeric: tabular-nums; }
.sp-clock { margin-top: 14px; padding: 12px 8px 10px; border-radius: 10px; text-align: center; background: rgba(0, 0, 0, .3); }
.sp-time { display: block; font: 700 30px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.sp-clock small { display: block; margin-top: 6px; font: 400 11px/1.3 var(--ui); color: var(--muted); }
.sp-reset {
  display: block; margin: 10px auto 0; border: 0; background: none; cursor: pointer; padding: 4px;
  font: 400 11px/1 var(--ui) !important; color: var(--muted) !important; text-decoration: underline; text-underline-offset: 3px;
}
.sp-reset:hover { color: var(--text) !important; }
.watch-sheet {
  position: fixed; z-index: 80; left: 0; right: 0; bottom: 0;
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0;
  background: rgba(17, 17, 23, .98); border-top: 1px solid var(--border-strong);
}
.watch-list { display: flex; flex-direction: column; gap: 8px; }
.watch-list a.w { justify-content: center; padding: 13px 16px; font-size: 14px; }
.scrim { position: fixed; inset: 0; z-index: 75; background: rgba(0, 0, 0, .55); }
.tip {
  position: fixed; z-index: 90; pointer-events: none; padding: 5px 9px; border-radius: 6px;
  font: 500 12px/1.2 var(--read); color: #F3F1EA; background: rgba(12, 12, 14, .96);
  border: 1px solid rgba(255, 255, 255, .16); white-space: nowrap;
}

.lv-foot {
  display: flex; justify-content: center; gap: 18px; padding: 28px 16px 32px;
  font: 400 11px/1 var(--ui); color: var(--text-dim);
}
.lv-foot a { color: var(--muted); }
.lv-foot a:hover { color: var(--text); }
body[data-state="live"] .lv-foot, body[data-state="connecting"] .lv-foot { padding-top: 22px; }

/* ---------------------------------------------------------------- inside a dungeon
   The room the helper's map.html shows live, as it painted it: art pieces and
   marks in % of a frame of the room's own aspect. Desktop: the room is the
   board, the overworld a small inset (click either inset to swap). Phone:
   ROOM | WORLD. The marks follow map.html's room panel (chest art, clay pots,
   key drops, hollow-diamond enemies, halos for in-logic / maybe / not yet). */
.stage { position: relative; }
.room {
  position: relative; overflow: hidden; margin: 0 auto;
  width: min(100%, calc(720px * var(--aspect, 1)));
  aspect-ratio: var(--aspect, 1);
  border-radius: 8px; background: #0c0c0e; border: 1px solid var(--m-hair);
  container-type: inline-size;
  --rm: clamp(11px, 3.6cqw, 24px);
}
.room-art .rpiece { position: absolute; display: block; overflow: hidden; pointer-events: none; }
.room-art .rpiece img {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  display: block; image-rendering: pixelated; user-select: none;
}
.room-sub {
  font: 500 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--m-mute);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.room-marks { position: absolute; inset: 0; }
.rm {
  position: absolute; width: var(--rm); height: var(--rm); transform: translate(-50%, -50%);
  box-sizing: border-box; z-index: 2;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  image-rendering: pixelated; filter: drop-shadow(0 0 2px #000);
}
.rm.chest { background-image: url(../img/items/chest0.png); }
.rm.bigchest { background-image: url(../img/items/chest0.png); width: calc(var(--rm) * 1.35); height: calc(var(--rm) * 1.35); }
.rm.drop { background-image: url(../img/items/smallkey0.png); width: calc(var(--rm) * .85); height: calc(var(--rm) * .85); }
.rm.drop.big { background-image: url(../img/items/bigkey1.png); }
.rm.pot {
  width: calc(var(--rm) * .6); height: calc(var(--rm) * .6);
  background: #B8693A; border: 1px solid #4A2812; border-radius: 30%; filter: none; box-shadow: 0 0 2px #000;
}
/* a pot that is only scenery (no check in it): flat and muted, behind the rest */
.rm.pot.scenery { background: #6E5A4B; border-color: #33291F; opacity: .75; box-shadow: none; z-index: 1; }
/* the boss has no identity in the export: a neutral skull, never a face */
.rm.boss {
  width: calc(var(--rm) * 1.25); height: calc(var(--rm) * 1.25); border-radius: 50%;
  background: rgba(18, 18, 20, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23F3F1EA' d='M8 1.5C4.4 1.5 2 3.9 2 7c0 1.9.9 3.4 2.3 4.2V14h1.8v-1.4h1V14h1.8v-1.4h1V14h1.8v-2.8C13.1 10.4 14 8.9 14 7c0-3.1-2.4-5.5-6-5.5z'/%3E%3Ccircle cx='5.6' cy='7.4' r='1.6' fill='%23171512'/%3E%3Ccircle cx='10.4' cy='7.4' r='1.6' fill='%23171512'/%3E%3C/svg%3E") center / 64% no-repeat;
  border: 2px solid #E5928D; box-shadow: 0 0 0 1.5px #000; filter: none;
}
/* doors and stairs come as bars (w x h in % of the frame) */
.rm.door {
  width: calc(var(--rm) * .9); height: calc(var(--rm) * .4); border-radius: 2px; filter: none;
  background: rgba(243, 241, 234, .7); border: 1px solid #0E0E10; box-shadow: 0 0 2px #000;
}
.rm.door.bigkey { background: #9bd0f5; }
.rm.door.locked { background: #e8a33a; }
.rm.stairs {
  width: calc(var(--rm) * .8); height: calc(var(--rm) * .8); border-radius: 2px; filter: none;
  background: repeating-linear-gradient(0deg, rgba(243, 241, 234, .75) 0 2px, rgba(18, 18, 20, .6) 2px 4px);
  border: 1px solid #0E0E10;
}
.rm.sized { transform: none; }        /* a bar: x / y are its centre, w / h its size */
/* states, the panel's words */
.rm.opened, .rm.collected, .rm.dead { opacity: .3; filter: grayscale(1) drop-shadow(0 0 1px #000); }
.rm.chest.opened, .rm.bigchest.opened { background-image: url(../img/items/chest1.png); }
.rm.door.opened { opacity: .25; filter: none; }
.rm.outstanding { filter: drop-shadow(0 0 3px #E6B143) drop-shadow(0 0 1px #E6B143); }
.rm.pot.outstanding { box-shadow: 0 0 0 1px #E6B143, 0 0 5px #E6B143; filter: none; }
.rm.available { filter: drop-shadow(0 0 3px #4dff88) drop-shadow(0 0 1px #4dff88); }
.rm.possible { filter: drop-shadow(0 0 3px #e6b143) drop-shadow(0 0 1px #e6b143); }
.rm.unavail { filter: grayscale(.7) drop-shadow(0 0 3px #ff5c5c); opacity: .75; }
.rm.door.available { box-shadow: 0 0 0 1px #4dff88, 0 0 4px #4dff88; }
.rm.door.unavail { box-shadow: 0 0 0 1px #ff5c5c; }
.room .link-dot { --d: calc(var(--rm) * .75); }
/* never dimmed in the room: he is really there */
.room .link-dot.indoors, .room .link-dot.sprite.indoors img { opacity: 1; }
.room .link-dot.indoors::before { display: none; }
.room .link-dot.indoors::after { content: "Link"; }

.inset-tag {
  display: none; position: absolute; left: 6px; bottom: 6px; z-index: 30; padding: 2px 6px; border-radius: 4px;
  font: 500 9px/1.3 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #F3F1EA; background: rgba(12, 12, 14, .85);
  pointer-events: none;
}
.view-seg { margin-left: 0; }
/* in the room view the title already says where he is */
.map-board.inside:not(.swapped):not([data-view="world"]) .map-note { display: none; }
.map-board .board-head h2 { white-space: nowrap; }

@media (min-width: 1024px) {
  .map-board.inside .room { display: block !important; }
  /* the second view, small in the top-right corner of the first; click to swap */
  .map-board.inside:not(.swapped) .map,
  .map-board.inside.swapped .room {
    position: absolute; right: 12px; top: 12px; z-index: 25; width: 27%; margin: 0;
    border: 2px solid rgba(243, 241, 234, .35); border-radius: 6px; cursor: pointer;
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .85);
  }
  .map-board.inside.swapped .room { width: calc(27% * var(--aspect, 1)); max-width: 27%; }
  .map-board.inside:not(.swapped) .map:hover,
  .map-board.inside.swapped .room:hover { border-color: #E6B143; }
  .map-board.inside:not(.swapped) .map .inset-tag,
  .map-board.inside.swapped .room .inset-tag { display: block; }
  .map-board.inside:not(.swapped) .map .link-dot::after,
  .map-board.inside:not(.swapped) .map .map-wait { display: none; }
  .map-board.inside:not(.swapped) #worldSeg,
  .map-board.inside:not(.swapped) .legend-dots,
  .map-board.inside:not(.swapped) .map-count { visibility: hidden; }
  .map-board.inside .view-seg { display: none !important; }
}

/* ---------------------------------------------------------------- between desktop and phone */
@media (max-width: 1199px) and (min-width: 1024px) {
  .lv-main { grid-template-columns: minmax(0, 1fr) 360px; }
  .igrid { grid-template-columns: repeat(6, 54px); }
  .icell { width: 54px; height: 54px; }
  .icell img { width: 44px; height: 44px; }
  /* ten tiles in one row even with the scrollbar gutter (1100: 625 px) */
  .dgrid { grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 6px; }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 1023px) {
  :root { --strip-h: 48px; }
  .strip-in { padding: 0 16px; gap: 12px; }
  .brand, .chips, .watch { display: none; }
  .watch-btn {
    display: inline-flex; align-items: center; padding: 7px 13px; border-radius: 999px; cursor: pointer;
    font: 600 12.5px/1 var(--read) !important; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .05);
  }
  .tabs {
    position: sticky; top: var(--strip-h); z-index: 58;
    display: grid; grid-template-columns: repeat(3, 1fr); height: 40px;
    background: rgba(9, 9, 12, .9); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .tabs button {
    border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent;
    font: 500 12px/1 var(--ui) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--muted) !important;
  }
  .tabs button[aria-selected="true"] { color: var(--text) !important; border-bottom-color: var(--accent, #b3ffc8); }
  .banner { top: calc(var(--strip-h) + 40px); }
  .tabs button { position: relative; }
  /* a pickup while the viewer is on CHAT or MAP: a gold dot on ITEMS, 3 s */
  .tabs button.ping::after {
    content: ""; position: absolute; top: 11px; right: calc(50% - 38px);
    width: 6px; height: 6px; border-radius: 50%; background: #E6B143;
  }
  body[data-board="sealed"] .tabs button:not([data-tab="chat"]) { opacity: .5; }
  body[data-state="offline"] .watch-btn { display: none; }
  body[data-state="offline"] .watch { display: flex; }
  .legend .lg-l { display: none; }
  .legend .lg-s { display: inline; }
  .moment .mh { font-size: 14px; }
  .items-board .board-head { flex-wrap: wrap; row-gap: 8px; }
  .items-board .board-head h2 { white-space: nowrap; }
  .items-board .head-toast { margin-left: auto; max-width: 100%; }
  .pins .moment { padding: 9px 12px; }

  .lv-main { display: block; margin: 12px auto 0; padding: 0 16px; }
  body[data-tab="chat"] .col-left { display: none; }
  body[data-tab="items"] .chat, body[data-tab="map"] .chat { display: none; }
  body[data-tab="items"] #mapBoard, body[data-tab="map"] #board { display: none; }
  .col-left { gap: 12px; }

  .chat { position: relative; top: 0; height: calc(100dvh - var(--strip-h) - 40px - 24px); min-height: 360px; border-radius: 12px; }
  .ln .av { display: none; }
  .ln { font-size: 15px; }
  .chat-head .legend span { white-space: nowrap; }

  .board { padding: 14px 14px 16px; }
  .board-top { flex-direction: column; gap: 14px; }
  .crystal { order: -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
  .cc-n { margin: 0; font-size: 20px; }
  .cc-line { flex-basis: 100%; font-size: 12.5px; max-width: none; }
  .here-line { margin: 0; }
  .igrid { grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; gap: 5px; }
  .icell { width: auto; height: auto; aspect-ratio: 1 / 1; }
  .icell img { width: 80%; height: 80%; }
  .dgrid {
    display: flex; overflow-x: auto; gap: 8px; margin: 0 -14px; padding: 0 40px 12px 14px;
    scroll-snap-type: x proximity; scrollbar-width: thin;
  }
  .dt { flex: 0 0 60px; scroll-snap-align: start; }

  .map-board { display: flex; flex-direction: column; }
  .map-board .board-head { display: contents; }
  .map-board .board-head h2 { order: 0; margin-bottom: 6px; }
  .map-board .map-note { order: 1; margin-bottom: 10px; }
  .map-board .stand { display: none; }
  .map-board .stale-chip { order: 1; align-self: flex-start; margin: 0 0 10px; }
  .map-board .map { order: 2; }
  .map-board .seg { order: 3; margin: 12px auto 0; }
  .map-board .seg button { padding: 9px 22px; }
  /* ROOM | WORLD: one view at a time, the control sits on top */
  .map-board .view-seg { order: 1; margin: 0 auto 10px; }
  .map-board .stage { order: 2; }
  .map-board.inside[data-view="room"] .room { display: block !important; }
  .map-board.inside[data-view="room"] .map,
  .map-board.inside[data-view="room"] #worldSeg,
  .map-board.inside[data-view="room"] .map-foot { display: none; }
  .room { width: min(100%, calc(64vh * var(--aspect, 1))); }
  .map-board .map-foot { order: 4; justify-content: center; }
  .map-count { width: 100%; text-align: center; }

  .sync-pop {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 18px 18px 0 0;
    padding: 16px 18px calc(20px + env(safe-area-inset-bottom));
    border-width: 1px 0 0; font-size: 13px;
  }
  .sp-presets button { padding: 12px 4px; font-size: 13px !important; }
  .sp-slider button { padding: 10px 12px; }
  .sp-time { font-size: 36px; }
  .off-card h1 { font-size: 27px; }
  .lv-foot { display: none; }
  body[data-state="offline"] .lv-foot { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
