/* Theme variables are overwritten at runtime from the admin gradient settings */
:root {
  --bg: linear-gradient(160deg, #f6faef, #d9eecb);
  --hdr: linear-gradient(180deg, #ffffff, #e6f4da);
  --btn-from: #86d957;
  --btn-to: #1f9d55;
  --btn-ink: #ffffff;
  --btn-edge: color-mix(in srgb, var(--btn-to) 58%, #000);
  --ink: #12301f;
  --muted: rgba(18, 48, 31, .62);
  --card: rgba(255, 255, 255, .74);
  --card-line: rgba(255, 255, 255, .85);
  --hdr-ink: #12301f;
  --grid: rgba(18, 48, 31, .12);
  --accent: var(--btn-to);
  --radius: 20px;
}
:root[data-mode="dark"] {
  --ink: #f1faed;
  --muted: rgba(241, 250, 237, .64);
  --card: rgba(255, 255, 255, .09);
  --card-line: rgba(255, 255, 255, .14);
  --grid: rgba(255, 255, 255, .14);
}
:root[data-hdr="dark"] { --hdr-ink: #f1faed; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html {
  height: 100%;
  /* the page itself paints the theme, so no strip can ever show below the content */
  background-color: var(--bg-to, #d9eecb);
  background-image: var(--bg);
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- layout ----------
   Phones and installed apps: the page scrolls normally, the header sticks to the top.
   Nothing here depends on measuring the screen height.
   Wide desktop browsers: the app sits inside a phone frame with its own inner scroll. */
#stage, #phone, #app { display: flex; flex-direction: column; flex: 1; width: 100%; }
#app { position: relative; }
#hdr { position: sticky; top: 0; }
#view { flex: 1; }
#view:has(> .gate) { display: flex; flex-direction: column; }
.gate { flex: 1; }

@media (min-width: 640px) and (display-mode: browser) {
  html { background: #0a1a11; }
  #stage {
    flex: none;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at 25% 15%, #24452f 0, #0a1a11 62%);
  }
  #phone {
    flex: none;
    position: relative;
    display: block;
    width: 392px;
    height: min(844px, calc(100vh - 40px));
    border-radius: 54px;
    padding: 11px;
    background: linear-gradient(145deg, #2b2f2d, #0c0e0d);
    box-shadow: 0 0 0 2px #3a3f3c, 0 40px 80px rgba(0, 0, 0, .55), inset 0 0 0 2px #000;
  }
  #phone::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    width: 96px;
    height: 26px;
    margin-left: -48px;
    border-radius: 20px;
    background: #050605;
    z-index: 60;
    pointer-events: none;
  }
  #app {
    height: 100%;
    overflow: hidden;
    border-radius: 44px;
    background: var(--bg);
  }
  #phone #hdr { position: relative; padding-top: 40px; }
  #view { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; scroll-behavior: smooth; }
  #view::-webkit-scrollbar { display: none; }
  .gate { min-height: 100%; }
  #phone .ov, #phone #drawer, #phone .modal-bg, #phone #toast { position: absolute; }
}

/* ---------- header ---------- */
#hdr {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
  background: var(--hdr);
  color: var(--hdr-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 6px 18px rgba(0, 0, 0, .10);
  position: sticky;
  top: 0;
  z-index: 5;
}
.hdr-l { justify-self: start; display: flex; }
.hdr-r { justify-self: end; display: flex; gap: 10px; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .2px;
  color: inherit;
  padding: 4px 8px;
  border-radius: 14px;
  user-select: none;
  -webkit-user-select: none;
}
.brand img { border-radius: 9px; display: block; }

#view {
  padding: 14px 14px calc(env(safe-area-inset-bottom, 0px) + 28px);
  outline: none;
}

/* ---------- 3D buttons ---------- */
.btn, .icon-btn, .chip {
  border: 0;
  font-weight: 650;
  color: var(--btn-ink);
  background: linear-gradient(180deg, var(--btn-from), var(--btn-to));
  box-shadow:
    0 5px 0 var(--btn-edge),
    0 10px 16px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .55);
  transform: translateY(0);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.btn {
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 16px;
  font-size: 16px;
  letter-spacing: .2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn.block { width: 100%; }
.btn.sm { min-height: 44px; padding: 10px 18px; font-size: 14.5px; border-radius: 14px; }
.btn.big { min-height: 60px; padding: 18px 30px; font-size: 20px; border-radius: 20px; box-shadow: 0 7px 0 var(--btn-edge), 0 14px 22px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .55); }
.icon-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 4px 0 var(--btn-edge), 0 8px 12px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.chip {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 15px;
  white-space: nowrap;
  color: #12301f;
  background: linear-gradient(180deg, #ffffff, #e9efe6);
  box-shadow: 0 4px 0 #b9c4b5, 0 7px 10px rgba(0, 0, 0, .12), inset 0 1px 0 #fff;
  text-shadow: none;
}
.chip.on {
  color: var(--btn-ink);
  background: linear-gradient(180deg, var(--btn-from), var(--btn-to));
  box-shadow: 0 4px 0 var(--btn-edge), 0 7px 10px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .55);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.btn.ghost {
  color: #12301f;
  background: linear-gradient(180deg, #ffffff, #e9efe6);
  box-shadow: 0 5px 0 #b9c4b5, 0 10px 14px rgba(0, 0, 0, .12), inset 0 1px 0 #fff;
  text-shadow: none;
}
.btn.danger {
  --btn-from: #ff8f7d;
  --btn-to: #d93a2b;
  --btn-edge: #8f1f15;
  --btn-ink: #fff;
}
.btn:active, .icon-btn:active, .chip:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--btn-edge), 0 3px 6px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn.ghost:active, .chip:not(.on):active { box-shadow: 0 1px 0 #b9c4b5, 0 3px 6px rgba(0, 0, 0, .14), inset 0 1px 0 #fff; }
.btn:disabled { filter: grayscale(.8) opacity(.55); pointer-events: none; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .row:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--btn-to) 55%, #fff);
  outline-offset: 2px;
}

/* ---------- cards & layout ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(15, 50, 28, .10), inset 0 1px 0 rgba(255, 255, 255, .5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 10px; font-size: 15px; letter-spacing: .2px; }
.lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.hero { text-align: center; padding: 22px 16px; }
.hero .big { font-size: 68px; font-weight: 800; line-height: 1.05; margin: 8px 0 4px; }
.hero .sub { color: var(--muted); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { padding: 12px 8px; text-align: center; margin: 0; }
.tile b { display: block; font-size: 22px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .lbl { font-size: 10.5px; }
.chips { display: flex; gap: 10px; margin: 2px 2px 16px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sec-head h2 { margin: 0; font-size: 22px; }
.sec-head .lbl { margin-top: 2px; }

.bubble {
  flex: none;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 32%;
  overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c));
  box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 58%, #000), 0 7px 10px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.bubble img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 10px 4px;
  border-radius: 14px;
  color: inherit;
}
.row + .row { border-top: 1px solid var(--grid); border-radius: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .grow > span { display: block; }
.row .name { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .num { font-weight: 750; font-variant-numeric: tabular-nums; }
.meter { height: 7px; border-radius: 9px; background: var(--grid); margin-top: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 9px; background: var(--c, var(--accent)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }

/* charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 9.5px; }
.chart rect[data-tip] { cursor: pointer; }
.tip { min-height: 20px; margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; font-weight: 600; }
.split { display: flex; height: 14px; border-radius: 9px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18); }
.split i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 4px; background: var(--c); margin-right: 6px; }
.spark { width: 64px; height: 22px; }

/* ---------- drawer ---------- */
.ov {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 20;
}
.ov.on { opacity: 1; pointer-events: auto; }
#drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 84%;
  max-width: 330px;
  z-index: 21;
  transform: translateX(-102%);
  transition: transform .24s cubic-bezier(.3, .8, .3, 1);
  background: var(--bg);
  box-shadow: 10px 0 40px rgba(0, 0, 0, .3);
  display: flex;
  flex-direction: column;
  /* extra bottom room keeps the footer clear of the phone's gesture bar */
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 12px calc(env(safe-area-inset-bottom, 0px) + 32px);
  overflow: hidden;
}
@media (min-width: 640px) and (display-mode: browser) { #phone #drawer { padding-top: 52px; } }
#drawer.on { transform: none; }
#drawer .d-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; padding: 4px 6px 14px; }
#drawer .d-brand img { border-radius: 11px; }
#drawer .d-nav { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; scrollbar-width: none; }
#drawer .d-nav::-webkit-scrollbar { display: none; }
#drawer .row { padding: 7px 8px; }
#drawer .row.active { background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; }
#drawer .row.active + .row { border-top-color: transparent; }
/* footer is always visible: the list above scrolls, this does not */
.d-foot { flex: none; padding-top: 12px; display: grid; gap: 10px; border-top: 1px solid var(--grid); }
.d-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.d-foot .chip { min-height: 44px; padding: 8px 16px; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--card); border: 1px solid var(--card-line); font-variant-numeric: tabular-nums; }
.langs { display: flex; gap: 10px; }
.pill.ok { background: #d3f4de; color: #0b5a2a; border-color: #a7e3bd; }
.pill.skip { background: #ffe5c2; color: #7a3d00; border-color: #f5c88c; max-width: 46%; text-align: center; line-height: 1.25; }

/* ---------- gate ---------- */
.gate { display: grid; place-items: center; min-height: 100%; text-align: center; padding: 10px 6px 30px; }
.gate img { width: 132px; height: 132px; border-radius: 30px; box-shadow: 0 16px 30px rgba(0, 0, 0, .18); user-select: none; -webkit-user-select: none; }
.gate h1 { font-size: 24px; margin: 18px 0 6px; }
.gate p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.gate form { width: 100%; max-width: 300px; display: grid; gap: 16px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 12px; text-align: left; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 13px;
  padding: 12px 14px;
  background: #fff;
  color: #12301f;
  font-size: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .07);
}
.pw { position: relative; display: block; }
.pw input { padding-right: 50px; }
.pw-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #4a6353;
}
.pw-eye:hover { background: rgba(0, 0, 0, .06); }
.pw-eye:active { background: rgba(0, 0, 0, .12); }
textarea { min-height: 96px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
input[type="color"] { width: 46px; height: 40px; padding: 2px; border: 1px solid rgba(0, 0, 0, .18); border-radius: 12px; background: #fff; }
input[type="range"] { width: 100%; accent-color: var(--btn-to); }
.err { color: #d93a2b; font-size: 13.5px; font-weight: 600; min-height: 18px; }
:root[data-mode="dark"] .err { color: #ff9c8f; }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; line-height: 1.4; }
.tabs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.icon-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.icon-grid button { border: 2px solid transparent; background: rgba(255, 255, 255, .7); border-radius: 12px; height: 44px; display: grid; place-items: center; color: #12301f; }
.icon-grid button.on { border-color: var(--btn-to); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--btn-to) 25%, transparent); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); background: var(--c); }
.swatches button.on { outline: 3px solid var(--c); outline-offset: 2px; }
.grad-prev { height: 44px; border-radius: 13px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 3px 0 rgba(0, 0, 0, .12); margin-bottom: 8px; }
.grad-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preset { border: 2px solid transparent; border-radius: 14px; padding: 6px; background: var(--card); text-align: center; font-size: 12px; font-weight: 650; color: var(--ink); }
.preset i { display: block; height: 30px; border-radius: 9px; margin-bottom: 5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.qr-out { display: grid; place-items: center; gap: 12px; padding: 8px 0; }
.qr-out canvas { width: 240px; height: 240px; border-radius: 14px; background: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .15); image-rendering: pixelated; }
.code-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow: auto; margin-top: 8px; }
.code-list code { background: rgba(0, 0, 0, .07); padding: 3px 7px; border-radius: 8px; font-size: 12.5px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- modal & toast ---------- */
.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  background: rgba(0, 0, 0, .5);
  animation: fade .15s;
}
.modal {
  width: 100%;
  max-height: 92%;
  overflow-y: auto;
  background: var(--bg);
  color: var(--ink);
  border-radius: 26px 26px 0 0;
  padding: 20px 18px calc(env(safe-area-inset-bottom, 0px) + 22px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .3);
  animation: rise .22s cubic-bezier(.3, .8, .3, 1);
}
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.modal ol { padding-left: 20px; margin: 0 0 12px; line-height: 1.6; font-size: 14.5px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  transform: translate(-50%, 30px);
  background: #12301f;
  color: #fff;
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 60;
  max-width: 88%;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.loader { display: grid; place-items: center; padding: 60px 0; }
.loader i { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--grid); border-top-color: var(--btn-to); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- live number and lightning effect ---------- */
.zapper { position: relative; display: inline-block; font-weight: 800; font-variant-numeric: tabular-nums; }
/* 3D number: a solid face with a stacked, darkening extrusion and a soft ground shadow.
   Sizes are in em so it scales with the font. */
.zapper .nt {
  display: inline-block;
  color: color-mix(in srgb, var(--btn-from) 88%, #fff);
  -webkit-text-stroke: .012em rgba(255, 255, 255, .55);
  text-shadow:
    0 -.012em 0 rgba(255, 255, 255, .7),
    0 .02em 0 color-mix(in srgb, var(--btn-to) 94%, #000),
    0 .04em 0 color-mix(in srgb, var(--btn-to) 88%, #000),
    0 .06em 0 color-mix(in srgb, var(--btn-to) 80%, #000),
    0 .08em 0 color-mix(in srgb, var(--btn-to) 72%, #000),
    0 .10em 0 color-mix(in srgb, var(--btn-to) 64%, #000),
    0 .12em 0 color-mix(in srgb, var(--btn-to) 56%, #000),
    0 .14em 0 color-mix(in srgb, var(--btn-to) 48%, #000),
    0 .20em .16em rgba(0, 0, 0, .38),
    0 0 .55em color-mix(in srgb, var(--btn-from) 40%, transparent);
}
.hero .big { padding-bottom: .16em; }
.zapper.tl-num { padding-bottom: .16em; }
.zapper .bolt {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240px;
  height: 140px;
  margin: -70px 0 0 -120px;
  pointer-events: none;
  z-index: 3;
}
.zapper .bolt svg { width: 100%; height: 100%; overflow: visible; opacity: 0; }
.zapper .bolt path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.zapper .bolt .bg { stroke: #ffc83a; stroke-width: 8; opacity: .75; filter: blur(3px); }
.zapper .bolt .fg { stroke: #ffffff; stroke-width: 2.6; filter: drop-shadow(0 0 3px #fff6c2) drop-shadow(0 0 9px #ffb400); }
.zapper.zap .bolt svg { animation: boltFlash .7s ease-out forwards; }
.zapper.zap .nt { animation: zapPop .7s ease-out; }
.card.zapflash { animation: cardFlash .7s ease-out; }
@keyframes boltFlash {
  0% { opacity: 0; }
  6% { opacity: 1; }
  16% { opacity: .2; }
  26% { opacity: 1; }
  48% { opacity: .45; }
  100% { opacity: 0; }
}
@keyframes zapPop {
  0% { transform: scale(1); filter: none; }
  14% { transform: scale(1.16); filter: brightness(1.5) drop-shadow(0 0 10px #ffd23f) drop-shadow(0 0 22px #ffb400); }
  100% { transform: scale(1); filter: none; }
}
@keyframes cardFlash {
  0% { box-shadow: 0 0 0 0 rgba(255, 200, 58, .9), 0 10px 26px rgba(15, 50, 28, .10); }
  30% { box-shadow: 0 0 0 4px rgba(255, 210, 63, .75), 0 0 34px 6px rgba(255, 190, 40, .55); }
  100% { box-shadow: 0 0 0 0 rgba(255, 200, 58, 0), 0 10px 26px rgba(15, 50, 28, .10); }
}
.pill.flash { animation: pillFlash .9s ease-out; }
@keyframes pillFlash {
  0% { background: #ffe680; box-shadow: 0 0 0 0 rgba(255, 200, 58, .9); color: #12301f; }
  100% { box-shadow: 0 0 0 12px rgba(255, 200, 58, 0); }
}

.live { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .9px; color: var(--muted); vertical-align: middle; }
.live i, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0 rgba(46, 204, 113, .7); animation: pulse 1.8s ease-out infinite; }
#app[data-live="off"] .live i, #app[data-live="off"] .live-dot { background: #d9503f; animation: none; }
.live-dot { position: absolute; top: 6px; right: 6px; border: 2px solid var(--btn-to); box-sizing: content-box; width: 6px; height: 6px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .65); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
}
#btn-refresh.spin svg { animation: spin .7s linear infinite; }

/* section screen: stats on the top line */
.topline { padding: 14px 14px 12px; }
.tl-head { display: flex; align-items: center; gap: 12px; }
.tl-title { flex: 1; min-width: 0; }
.tl-title h2 { margin: 0; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-title .lbl { margin-top: 3px; font-size: 11px; }
.zapper.tl-num { font-size: 40px; line-height: 1; }
.tl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--grid); }
.tl-stats div { text-align: center; min-width: 0; }
.tl-stats .lbl { display: block; font-size: 9.5px; letter-spacing: .3px; line-height: 1.25; min-height: 24px; }
.tl-stats b { display: block; font-size: 20px; margin-top: 2px; font-variant-numeric: tabular-nums; }

.d-group { margin: 16px 8px 4px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
