/* EduWatch — a dark, video-first shell. One column on phones, a centered
   phone-width column on desktop. Green is reserved for the play button and
   primary actions; reactions each keep their own colour. */
:root {
  --ink: #0b0d12;
  --panel: #141821;
  --panel-2: #1c212d;
  --line: #262c3a;
  --text: #f1f3f8;
  --muted: #8d95aa;
  /* Brand: two close, vibrant colours. "--green" is the accent name used throughout (it's violet now). */
  --brand-a: #8f5bff;
  --brand-b: #3f8cff;
  --grad: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  --green: #a07cff;
  --green-ink: #ffffff;
  --accent-rgb: 150, 110, 255;
  /* Liquid Glass */
  --glass: rgba(30, 32, 44, .52);
  --glass-strong: rgba(26, 28, 38, .72);
  --glass-line: rgba(255, 255, 255, .14);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .04);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, .38);
  --glass-blur: blur(24px) saturate(180%);
  --heart: #ff4d6d;
  --repost: #4dabf7;
  --save: #ffc23d;
  --danger: #ff6b6b;
  --display: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: #05060a;
  color: var(--text);
  font: 15px/1.45 var(--body);
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#app {
  position: relative;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 600px) { #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

#view { flex: 1; min-height: 0; position: relative; overflow: hidden; }

/* ---------------- bottom navigation ---------------- */
.nav {
  flex: none;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 0 max(6px, env(safe-area-inset-right, 0px)) var(--safe-b) max(6px, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: var(--ink);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.nav-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--muted);
  font-size: 11px; font-weight: 600;
  padding: 6px 0;
}
.nav-btn svg { width: 23px; height: 23px; }
.nav-btn.on { color: var(--text); }
.nav-btn.on svg { fill: currentColor; stroke-width: 1.5; }
.nav-btn[data-nav="search"].on svg { fill: none; stroke-width: 2.6; }
.badge {
  position: absolute; top: 2px; left: calc(50% + 6px);
  min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: var(--heart); color: #fff;
  font-size: 10.5px; line-height: 17px; font-weight: 700; text-align: center;
}
.play-btn {
  justify-self: center;
  width: 54px; height: 38px;
  border: 0; border-radius: 12px;
  background: var(--green); color: var(--green-ink);
  display: grid; place-items: center;
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
  transition: transform .12s ease, box-shadow .3s ease;
}
.play-btn svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.play-btn:active { transform: scale(.92); }
body[data-mode="fun"] .play-btn { box-shadow: inset 0 0 0 2px rgba(6, 40, 20, .45); }

/* ---------------- feed ---------------- */
.feed-wrap { position: absolute; inset: 0; }
.feed {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
}
.stage { position: absolute; overflow: hidden; background: #000; }
.stage.short { inset: 0; }
.stage.wide {
  left: 8px; right: 72px;
  top: 50%; transform: translateY(-62%);
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line);
}
.poster {
  position: absolute; inset: 0;
  background: #000 center / cover no-repeat;
}
.stage.short .poster { filter: blur(0); }
.player-host, .player-host iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage.short .player-host iframe { pointer-events: none; }
.tap { position: absolute; inset: 0; background: transparent; border: 0; z-index: 2; }
.pause-mark {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%; background: rgba(0,0,0,.45);
  display: grid; place-items: center; pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.pause-mark svg { width: 34px; height: 34px; fill: #fff; stroke: none; margin-left: 4px; }
.slide.paused .pause-mark { opacity: 1; }
.slide-loading {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite;
}
.slide.ready .slide-loading { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.shade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  pointer-events: none; z-index: 3;
}
.meta {
  position: absolute; z-index: 4;
  left: max(14px, env(safe-area-inset-left, 0px)); right: 78px; bottom: 16px;
  display: grid; gap: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.meta .by { font-size: 12.5px; color: #cfd5e3; display: flex; gap: 6px; align-items: center; }
.meta .by a { text-decoration: none; font-weight: 600; }
.meta h2 {
  margin: 0; font: 600 16px/1.3 var(--body);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.meta .tags { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; font-weight: 600; }
.meta .tags button { background: none; border: 0; padding: 0; color: #e8ecf5; }
.meta .yt { font-size: 12px; color: #c6ccda; text-decoration: none; opacity: .85; }
.meta .yt:hover { text-decoration: underline; }

.rail {
  position: absolute; z-index: 4;
  right: max(8px, env(safe-area-inset-right, 0px)); bottom: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.act {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; padding: 0; color: #fff;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.act .ic {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20, 24, 33, .55);
  backdrop-filter: blur(6px);
  transition: transform .12s ease;
}
.act:active .ic { transform: scale(.88); }
.act svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.act.like.on svg { fill: var(--heart); stroke: var(--heart); }
.act.repost.on svg { stroke: var(--repost); }
.act.save.on svg { fill: var(--save); stroke: var(--save); }
.act.pop .ic { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.25); } }

.feed-top {
  position: absolute; z-index: 6; top: 0; left: 0; right: 0;
  padding: calc(10px + var(--safe-t)) max(14px, env(safe-area-inset-right, 0px)) 18px max(14px, env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: linear-gradient(rgba(0,0,0,.55), transparent);
  pointer-events: none;
}
.feed-top > * { pointer-events: auto; }
.brand { font: 800 18px/1 var(--display); letter-spacing: -.02em; }
.brand i { font-style: normal; color: var(--green); }
.feed-tabs { display: flex; gap: 18px; }
.feed-tabs button {
  background: none; border: 0; padding: 4px 0;
  font-weight: 700; font-size: 15.5px; color: rgba(255,255,255,.62);
  border-bottom: 2px solid transparent;
}
.feed-tabs button.on { color: #fff; border-bottom-color: #fff; }
.top-actions { justify-self: end; display: flex; gap: 8px; }
.mute {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: rgba(20,24,33,.6); border: 0; border-radius: 50%;
}
.mute svg { width: 20px; height: 20px; }
.mute.off { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }

.feed-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 0 max(28px, env(safe-area-inset-right, 0px)) 0 max(28px, env(safe-area-inset-left, 0px));
  text-align: center;
}
.feed-empty > div { display: grid; gap: 12px; justify-items: center; max-width: 300px; }
.feed-empty h3 { margin: 0; font: 700 20px/1.2 var(--display); }
.feed-empty p { margin: 0; color: var(--muted); }

/* ---------------- shared page chrome ---------------- */
.page {
  position: absolute; inset: 0;
  overflow-y: auto;
  padding: calc(14px + var(--safe-t)) max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
}
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 40px; }
.page-head h1 { margin: 0; font: 800 24px/1.1 var(--display); letter-spacing: -.02em; flex: 1; }
.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 50%;
  color: var(--text); text-decoration: none;
}
.icon-btn svg { width: 20px; height: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text);
  font-weight: 700; font-size: 14px; text-decoration: none;
}
.btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }

.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  outline: none;
}
.input:focus { border-color: var(--green); }
textarea.input { height: auto; min-height: 90px; padding: 10px 14px; resize: vertical; }
.err { color: var(--danger); font-size: 13.5px; min-height: 1em; margin: 0; }
.muted { color: var(--muted); }

.avatar {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  font: 800 16px/1 var(--display); color: #0b0d12;
  text-transform: uppercase; text-decoration: none;
}
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 88px; height: 88px; font-size: 36px; }
.avatar.md { width: 64px; height: 64px; font-size: 26px; }
.avatar-wrap { position: relative; }
.cam {
  position: absolute; right: -4px; bottom: -4px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green); color: var(--green-ink);
  border: 3px solid var(--ink);
}
.cam svg { width: 16px; height: 16px; }
.photo-row { display: flex; align-items: center; gap: 14px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-av { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px transparent; }
.nav-btn.on .nav-av { box-shadow: 0 0 0 2px var(--text); }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }

/* ---------------- search ---------------- */
.search-bar { position: relative; }
.search-bar svg { position: absolute; left: 13px; top: 12px; width: 20px; height: 20px; color: var(--muted); }
.search-bar .input { padding-left: 42px; }
.seg { display: flex; gap: 6px; margin: 12px 0; }
.seg button {
  flex: 1; height: 36px; border-radius: 9px;
  background: var(--panel); border: 1px solid var(--line);
  font-weight: 700; color: var(--muted);
}
.seg button.on { background: var(--text); color: var(--ink); border-color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 17px;
  background: var(--panel); border: 1px solid var(--line);
  font-weight: 600; font-size: 13.5px;
}
.chip b { color: var(--muted); font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; margin-bottom: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  font-size: 13.5px;
}
.notice .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 6px; flex: none; }
.notice.ai .dot { background: var(--repost); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid.wide { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 9 / 14; border-radius: 6px;
  background: var(--panel) center / cover no-repeat;
  text-decoration: none;
}
.grid.wide .tile { aspect-ratio: 16 / 10; }
.tile span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 7px 0;
  border-bottom: 6px solid transparent;
  background: linear-gradient(transparent, rgba(0,0,0,.8)) border-box;
  font-size: 11.5px; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile .count { position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 700; display: flex; gap: 3px; align-items: center; text-shadow: 0 1px 2px #000; }
.tile .count svg { width: 13px; height: 13px; fill: #fff; stroke: none; }

.people { display: grid; gap: 4px; }
.person {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 4px; border-radius: 10px;
}
.person .who { flex: 1; min-width: 0; text-decoration: none; display: grid; }
.person .who b { font-weight: 700; }
.person .who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- inbox & chat ---------------- */
.thread {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.thread .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.thread .txt b { font-weight: 700; }
.thread .txt small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread.unread .txt small { color: var(--text); font-weight: 600; }
.thread time { font-size: 12px; color: var(--muted); align-self: flex-start; margin-top: 3px; }
.thread .udot { width: 9px; height: 9px; border-radius: 50%; background: var(--heart); }

.chat { position: absolute; inset: 0; display: flex; flex-direction: column; }
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--line);
}
.chat-head a.who { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 1; min-width: 0; }
.chat-head a.who div { display: grid; min-width: 0; }
.chat-head small { color: var(--muted); }
.msgs {
  flex: 1; overflow-y: auto;
  padding: 14px max(12px, env(safe-area-inset-right, 0px)) 14px max(12px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 6px;
}
.msg { max-width: 78%; display: grid; gap: 4px; }
.msg.mine { align-self: flex-end; justify-items: end; }
.bubble {
  padding: 9px 13px; border-radius: 18px;
  background: var(--panel-2); white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.mine .bubble { background: var(--green); color: var(--green-ink); font-weight: 500; }
.msg time { font-size: 11px; color: var(--muted); padding: 0 6px; }
.vcard {
  display: block; width: 190px; overflow: hidden;
  border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  text-decoration: none;
}
.vcard .th { aspect-ratio: 16 / 10; background: #000 center / cover no-repeat; }
.vcard p { margin: 0; padding: 8px 10px; font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.composer {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line);
}
.composer textarea {
  flex: 1; min-height: 42px; max-height: 120px; height: 42px;
  padding: 10px 14px; border-radius: 21px; resize: none;
}
.composer .btn { border-radius: 21px; height: 42px; }
.day { align-self: center; font-size: 11.5px; color: var(--muted); font-weight: 600; margin: 8px 0 2px; }

/* ---------------- profile ---------------- */
.profile-top { display: grid; justify-items: center; gap: 8px; text-align: center; padding-top: 4px; }
.profile-top h2 { margin: 4px 0 0; font: 800 22px/1.15 var(--display); letter-spacing: -.01em; }
.profile-top .handle { color: var(--muted); font-weight: 600; }
.profile-top .bio { max-width: 34ch; margin: 2px 0 0; white-space: pre-wrap; }
.stats { display: flex; gap: 26px; margin: 8px 0 4px; }
.stats button { background: none; border: 0; padding: 0; display: grid; gap: 1px; }
.stats b { font: 800 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.stats small { color: var(--muted); font-size: 12.5px; }
.profile-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin: 18px 0 8px; }
.tabs button {
  flex: 1; height: 42px; background: none; border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-weight: 700; color: var(--muted);
}
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.follows-you { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }

/* ---------------- sheets ---------------- */
.sheet-layer { position: absolute; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: fade .18s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 82%; display: flex; flex-direction: column;
  background: var(--panel); border-radius: 18px 18px 0 0;
  padding-bottom: var(--safe-b);
  animation: rise .22s ease;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px 10px;
}
.sheet-head h3 { margin: 0; font: 700 16px/1.2 var(--body); }
.sheet-body { overflow-y: auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; align-content: start; }
.sheet-foot {
  display: flex; gap: 8px; align-items: center;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line);
}
.sheet-foot .input { height: 42px; border-radius: 21px; }
.sheet-foot .btn { border-radius: 21px; }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.cmt { display: flex; gap: 10px; }
.cmt .c { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cmt .c header { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.cmt .c header a { font-weight: 700; text-decoration: none; color: var(--muted); }
.cmt .c header time { color: var(--muted); font-size: 12px; }
.cmt .c p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt .del { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 0; justify-self: start; }

.auth-tabs { display: flex; gap: 6px; }
.auth-tabs button { flex: 1; height: 38px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; color: var(--muted); }
.auth-tabs button.on { background: var(--text); color: var(--ink); }

/* ---------------- toast ---------------- */
.toast {
  position: absolute; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 60;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px;
  background: var(--text); color: var(--ink);
  font-weight: 700; font-size: 13.5px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .feed { scroll-behavior: auto; }
}

.pick-preview svg { width: 24px; height: 24px; color: var(--muted); }
.avatar-wrap.drag .avatar { box-shadow: 0 0 0 4px var(--green); }

/* photo posts */
.stage.photo { inset: 0; background: #000; }
.stage.photo .ph-bg { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(30px) brightness(.5); transform: scale(1.1); }
.stage.photo img.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.poster-line { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.poster-line > a:not(.avatar) { font-weight: 700; text-decoration: none; }
.poster-line .handle { color: #c6ccda; font-size: 13px; }
.post-actions { display: flex; gap: 14px; }
.post-actions button { background: none; border: 0; padding: 0; color: #c6ccda; font-size: 12.5px; font-weight: 600; }
.post-actions button:hover { color: #fff; text-decoration: underline; }
.post-preview {
  aspect-ratio: 4 / 5; max-height: 42vh; width: 100%;
  border-radius: 14px; overflow: hidden; cursor: pointer;
  background: var(--panel-2); border: 1.5px dashed var(--line);
  display: grid; place-items: center;
}
.post-preview.drag { border-color: var(--green); }
.post-preview img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pick-hint { display: grid; justify-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.pick-hint svg { width: 30px; height: 30px; }

.cam-live { position: relative; width: 100%; height: 100%; background: #000; }
.cam-live video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.shutter {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: #fff; border: 5px solid rgba(255,255,255,.45); background-clip: padding-box;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.shutter:active { transform: translateX(-50%) scale(.92); }
.photo-actions .btn svg { width: 18px; height: 18px; }

/* blocking + message privacy */
.composer.locked { justify-content: center; }
.composer.locked p { margin: 4px 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.profile-top .notice { max-width: 36ch; margin: 6px 0 0; text-align: left; }
select.input { appearance: auto; }

/* admin reports */
.count-pill { margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--heart); color: #fff; font-size: 11.5px; line-height: 20px; }
.reports { display: grid; gap: 10px; }
.report-card { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.report-thumb { flex: none; width: 84px; aspect-ratio: 4 / 5; border-radius: 8px; background: #000 center / cover no-repeat; }
.report-info { flex: 1; min-width: 0; display: grid; gap: 6px; align-content: start; }
.report-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.report-top a { font-weight: 700; text-decoration: none; }
.report-info .caption { margin: 0; overflow-wrap: anywhere; }
.state { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.state.hidden { background: rgba(255,107,107,.15); color: var(--danger); }
.state.live { background: rgba(255,194,61,.15); color: var(--save); }

/* inbox tabs + activity */
.inbox-tabs { margin: 0 0 6px; }
.tab-link {
  flex: 1; height: 42px; display: flex; align-items: center; justify-content: center; gap: 2px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-weight: 700; color: var(--muted); text-decoration: none;
}
.tab-link.on { color: var(--text); border-bottom-color: var(--text); }
.notif { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.notif.unread { background: linear-gradient(90deg, rgba(var(--accent-rgb),.08), transparent 70%); }
.notif-txt { flex: 1; min-width: 0; display: grid; gap: 2px; text-decoration: none; font-size: 14px; line-height: 1.35; }
.notif-txt .quote { color: var(--muted); overflow-wrap: anywhere; }
.notif-txt time { color: var(--muted); font-size: 12px; }
.notif-thumb { flex: none; width: 44px; height: 56px; border-radius: 6px; background: #000 center / cover no-repeat; }

/* pop-up banners */
.banners {
  position: absolute; z-index: 70; left: 0; right: 0;
  top: calc(8px + var(--safe-t));
  padding: 0 max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px));
  display: grid; gap: 8px; pointer-events: none;
}
.banner {
  pointer-events: auto;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 8px 10px 12px; border-radius: 16px;
  background: rgba(28, 33, 45, .96); backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0,0,0,.45);
  text-decoration: none; color: var(--text);
  animation: drop .28s cubic-bezier(.2,.9,.3,1.2);
}
.banner.out { opacity: 0; transform: translateY(-16px); transition: opacity .22s, transform .22s; }
.banner .avatar { flex: none; }
.banner-txt { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 14px; }
.banner-txt small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner-x { flex: none; width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); border-radius: 50%; }
.banner-x svg { width: 16px; height: 16px; }
@keyframes drop { from { opacity: 0; transform: translateY(-24px); } }
.sysnotify { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.sysnotify small { flex: 1; }

/* chat: photos, seen, typing, groups */
.chat-bottom { border-top: 1px solid var(--line); }
.chat-bottom .composer { border-top: 0; }
.composer .photo-btn { width: 42px; height: 42px; flex: none; }
.chat-preview { display: flex; align-items: center; gap: 10px; padding: 8px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); }
.chat-preview img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; }
.chat-preview span { flex: 1; color: var(--muted); font-size: 13px; }
.chat-img { display: block; padding: 0; border: 0; background: var(--panel-2); border-radius: 16px; overflow: hidden; max-width: 230px; cursor: zoom-in; }
.chat-img img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.seen { align-self: flex-end; font-size: 11.5px; color: var(--muted); margin: -2px 6px 2px 0; }
.event { align-self: center; font-size: 12.5px; color: var(--muted); text-align: center; margin: 6px 0; max-width: 90%; }
.msg-sender { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: var(--muted); text-decoration: none; }
.msg-sender .avatar { width: 22px; height: 22px; font-size: 10px; }
.typing { display: flex; align-items: center; gap: 8px; padding: 4px max(14px, env(safe-area-inset-left, 0px)); font-size: 12.5px; color: var(--muted); }
.typing .dots { display: inline-flex; gap: 3px; }
.typing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; }
.typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.group-face { position: relative; flex: none; width: 40px; height: 40px; }
.group-face .avatar { position: absolute; width: 28px; height: 28px; font-size: 12px; border: 2px solid var(--ink); }
.group-face .avatar:first-child { left: 0; top: 0; }
.group-face .avatar:nth-child(2) { right: 0; bottom: 0; }
.group-face.one .avatar { width: 40px; height: 40px; font-size: 16px; border: 0; }
.chat-head .group-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; }
.chat-head .group-who div { display: grid; min-width: 0; }
.chat-head .group-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-actions { display: flex; gap: 8px; }
.rename-row { display: flex; gap: 8px; }
.chips.picked:empty { display: none; }
.person.pick { width: 100%; background: none; border: 0; text-align: left; color: var(--text); }
.person.pick:hover { background: var(--panel-2); }
.person.pick .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.person.pick.on .tick { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.person.pick .tick svg { width: 15px; height: 15px; stroke-width: 3; }
.lightbox { position: absolute; inset: 0; z-index: 80; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox .lb-x { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; }

/* comments: replies + likes */
.cmts { display: grid; gap: 14px; }
.cmt-group { display: grid; gap: 10px; }
.replies { display: grid; gap: 10px; padding-left: 42px; }
.cmt.reply .avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.cmt .c header a { color: var(--muted); }
.cmt-actions { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); }
.cmt-actions button { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.cmt-actions button:hover { color: var(--text); }
.mention { color: var(--repost); font-weight: 600; text-decoration: none; }
.clike { flex: none; display: grid; justify-items: center; gap: 0; background: none; border: 0; padding: 2px 4px; color: var(--muted); }
.clike svg { width: 18px; height: 18px; }
.clike small { font-size: 11px; min-height: 14px; font-variant-numeric: tabular-nums; }
.clike.on { color: var(--heart); }
.clike.on svg { fill: var(--heart); stroke: var(--heart); }
.cmt-foot { flex: 1; display: grid; gap: 8px; min-width: 0; }
.reply-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding: 0 4px; }
.reply-chip button { background: none; border: 0; color: var(--muted); display: grid; place-items: center; padding: 2px; }
.reply-chip button svg { width: 16px; height: 16px; }

/* file pickers: kept in the page but invisible, so every phone will open them */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; }

/* site check */
.diag { display: grid; gap: 8px; }
.diag-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.diag-row div { display: grid; gap: 2px; min-width: 0; }
.diag-row small { color: var(--muted); overflow-wrap: anywhere; }
.diag-row .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.diag-row.pass .mark { background: rgba(var(--accent-rgb),.18); color: var(--green); }
.diag-row.fail .mark { background: rgba(255,107,107,.18); color: var(--danger); }
.diag-row.info .mark { background: var(--panel-2); color: var(--muted); }

/* pull to refresh */
.ptr {
  position: absolute; z-index: 7; left: 50%; top: calc(56px + var(--safe-t));
  transform: translateY(-60px); margin-left: -88px; width: 176px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: 20px;
  background: rgba(20, 24, 33, .85); color: var(--text); font-size: 12.5px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.ptr[style*="translateY"] { opacity: 1; transition: none; }
.ptr.busy { opacity: 1; transform: translateY(0); }
.ptr.busy .ptr-txt::after { content: ''; }
.ptr-spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.3); border-top-color: var(--green); border-radius: 50%; }
.ptr.ready .ptr-spin, .ptr.busy .ptr-spin { animation: spin .7s linear infinite; }

/* calls */
.call-bar { display: flex; align-items: center; gap: 10px; padding: 8px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
  background: rgba(var(--accent-rgb),.1); border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.call-bar svg { width: 18px; height: 18px; color: var(--green); }
.call-bar span { flex: 1; }
.chat-head .head-actions .icon-btn { width: 36px; height: 36px; }
.avatar.xl { width: 104px; height: 104px; font-size: 42px; }
.call-screen, .ring-screen { position: absolute; inset: 0; z-index: 90; overflow: hidden; color: #fff; background: #07080c; user-select: none; -webkit-user-select: none; }
.call-bg { position: absolute; inset: -15%; background-size: cover; background-position: center; filter: blur(50px) saturate(1.25); opacity: .6; transform: scale(1.1); pointer-events: none; }
.call-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(0,0,0,0), rgba(0,0,0,.55)); }
.call-screen.is-video .call-bg { opacity: .3; }

/* the people in the call */
.call-grid { position: absolute; inset: 0; display: grid; gap: 4px; grid-template-columns: 1fr; }
.call-grid:not([data-count="1"]) { padding: calc(72px + var(--safe-t)) 6px calc(104px + var(--safe-b)); }
.call-grid[data-count="2"] { grid-template-rows: 1fr 1fr; }
.call-grid[data-count="3"], .call-grid[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.call-grid[data-count="3"] .call-tile:first-child { grid-column: 1 / -1; }
.call-tile { position: relative; overflow: hidden; border-radius: 20px; display: grid; place-items: center; min-height: 0; background: rgba(255,255,255,.05); transition: box-shadow .15s; }
.call-grid[data-count="1"] .call-tile { border-radius: 0; background: transparent; }
.call-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.call-tile.show-video video { opacity: 1; }
.call-tile.show-video .tile-face { visibility: hidden; }
.tile-face { display: grid; justify-items: center; }
.tile-face .avatar { transition: box-shadow .12s ease-out; box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0); }
.call-grid:not([data-count="1"]) .tile-face .avatar { width: 76px; height: 76px; font-size: 30px; }
.call-grid[data-count="1"] .tile-face .avatar { width: 150px; height: 150px; font-size: 60px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.call-tile.speaking .tile-face .avatar { box-shadow: 0 0 0 3px var(--green), 0 0 0 calc(6px + var(--lvl, 0) * 26px) rgba(var(--accent-rgb),.22); }
.call-tile.speaking.show-video { box-shadow: inset 0 0 0 3px var(--green); }
.call-grid[data-count="1"] .call-tile.speaking.show-video { box-shadow: none; }
.tile-name { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); font-size: 12.5px; font-weight: 700; }
.call-grid[data-count="1"] .call-tile:not(.muted) .tile-name { display: none; }
.call-grid[data-count="1"] .tile-name { left: 50%; transform: translateX(-50%); bottom: calc(120px + var(--safe-b)); }
.tile-mic { display: none; }
.tile-mic svg { width: 14px; height: 14px; color: var(--danger); }
.call-tile.muted .tile-mic { display: inline-flex; }
.tile-note { position: absolute; top: 50%; margin-top: 52px; font-size: 13px; color: rgba(255,255,255,.8); text-align: center; padding: 0 12px; }
.call-grid[data-count="1"] .tile-note { margin-top: 96px; font-size: 14px; }
.call-tile.show-video .tile-note { display: none; }

/* top bar, your camera, controls */
.call-top { position: absolute; z-index: 4; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 8px;
  padding: calc(12px + var(--safe-t)) max(14px, env(safe-area-inset-right, 0px)) 34px max(14px, env(safe-area-inset-left, 0px));
  background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,0)); transition: opacity .25s, transform .25s; }
.call-title { flex: 1; display: grid; justify-items: center; gap: 2px; margin-right: 44px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.call-name { font: 800 19px/1.2 var(--display); }
.call-status { color: rgba(255,255,255,.8); font-size: 13px; font-variant-numeric: tabular-nums; }
.call-mini-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.14); backdrop-filter: blur(12px); }
.call-mini-btn svg { width: 24px; height: 24px; stroke-width: 2.4; }
.call-self { position: absolute; z-index: 5; right: 14px; top: calc(76px + var(--safe-t)); width: 106px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; background: #000;
  box-shadow: 0 8px 26px rgba(0,0,0,.5); touch-action: none; cursor: grab; transition: left .28s cubic-bezier(.2,.9,.3,1.1), top .28s cubic-bezier(.2,.9,.3,1.1), width .3s, border-radius .3s; }
.call-self.dragging { transition: none; cursor: grabbing; transform: scale(1.04); }
.call-self.mirror { transform: scaleX(-1); }
.call-self.mirror.dragging { transform: scaleX(-1) scale(1.04); }
.call-screen.solo .call-self { inset: 0 !important; width: 100% !important; height: 100%; border-radius: 0; aspect-ratio: auto; z-index: 1; box-shadow: none; pointer-events: none; }
.call-screen.solo .call-grid .call-tile { background: rgba(0,0,0,.35); }
.call-controls { position: absolute; z-index: 4; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); display: flex; gap: 14px; padding: 10px 14px;
  border-radius: 999px; background: rgba(18,20,28,.55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: opacity .25s, transform .25s; }
.call-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.16); color: #fff; transition: transform .12s, background .15s; }
.call-btn svg { width: 25px; height: 25px; }
.call-btn.off { background: #fff; color: #0b0d12; }
.call-btn.end { background: #ff3b4e; }
.call-btn.end svg { width: 30px; height: 30px; }
.call-btn.accept { background: var(--green); color: var(--green-ink); }
.call-btn:active { transform: scale(.9); }
.call-screen.idle .call-top { opacity: 0; transform: translateY(-14px); pointer-events: none; }
.call-screen.idle .call-controls { opacity: 0; transform: translate(-50%, 18px); pointer-events: none; }
.call-screen.idle { cursor: none; }

/* minimized: a small bubble you can drag around while using the app */
.call-mini-label { display: none; }
.call-screen.mini { inset: auto; right: 14px; bottom: calc(84px + var(--safe-b)); width: 108px; height: 148px; border-radius: 22px; z-index: 95;
  box-shadow: 0 12px 34px rgba(0,0,0,.6), 0 0 0 2px rgba(255,255,255,.9); cursor: pointer; touch-action: none; animation: pop .3s; transition: left .28s, top .28s; }
.call-screen.mini.dragging { transition: none; }
.call-screen.mini .call-top, .call-screen.mini .call-controls, .call-screen.mini .call-self { display: none; }
.call-screen.mini .call-grid { padding: 0; grid-template: 1fr / 1fr; }
.call-screen.mini .call-tile:not(:first-child) { display: none; }
.call-screen.mini .call-tile { border-radius: 0; }
.call-screen.mini .tile-face .avatar { width: 62px !important; height: 62px !important; font-size: 26px !important; }
.call-screen.mini .tile-name, .call-screen.mini .tile-note { display: none; }
.call-screen.mini .call-mini-label { display: block; position: absolute; z-index: 3; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,.55); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* incoming call */
.ring-screen { display: flex; flex-direction: column; justify-content: space-between; animation: fade .2s ease; }
.ring-app { position: relative; margin: calc(18px + var(--safe-t)) auto 0; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.12); backdrop-filter: blur(12px); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.ring-app svg { width: 15px; height: 15px; color: var(--green); }
.ring-card { position: relative; margin: 0 12px calc(14px + var(--safe-b)); padding: 30px 18px 22px; border-radius: 30px; display: grid; justify-items: center; gap: 22px;
  background: rgba(16,18,26,.7); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: 0 -10px 40px rgba(0,0,0,.35);
  animation: ringrise .45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes ringrise { from { transform: translateY(110%); } }
.ring-who { display: grid; justify-items: center; gap: 6px; text-align: center; }
.ring-who .avatar { margin-bottom: 8px; animation: ringpulse 1.6s infinite, bob 2.4s ease-in-out infinite; }
.ring-who b { font: 800 25px/1.2 var(--display); }
.ring-who small { color: rgba(255,255,255,.75); font-size: 14.5px; }
@keyframes ringpulse { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),.55); } 70% { box-shadow: 0 0 0 28px rgba(var(--accent-rgb),0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb),0); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
.ring-actions { display: flex; justify-content: center; gap: 34px; }
.ring-actions > div { display: grid; justify-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,.85); }
.ring-actions .call-btn { width: 66px; height: 66px; }
.ring-actions .call-btn.accept { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-12deg) scale(1.06); } 86% { transform: rotate(10deg) scale(1.06); } 94% { transform: rotate(-6deg); } }
.call-btn.ring-voice { background: #fff; color: #0b0d12; }
@media (prefers-reduced-motion: reduce) { .ring-who .avatar, .ring-actions .call-btn.accept, .ring-card { animation: none; } }

/* Edit profile: call sounds */
.call-sounds { display: grid; gap: 8px; }
.sound-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 13.5px; }
.sound-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sound-row { display: flex; align-items: center; border-top: 1px solid var(--line); }
.sound-row:first-child { border-top: 0; }
.sound-row.on { background: rgba(var(--accent-rgb),.08); }
.sound-pick { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; background: none; border: 0; color: var(--text); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.sound-pick .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #5b6274; flex: none; }
.sound-row.on .dot { border-color: var(--green); background: radial-gradient(circle, var(--green) 45%, transparent 50%); }
.sound-play { width: 46px; height: 46px; display: grid; place-items: center; background: none; border: 0; color: var(--text); cursor: pointer; }
.sound-play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.sound-play:hover { color: var(--green); }
.seg { display: flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--panel-2); }
.seg button { flex: 1; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--green); color: var(--green-ink); }
.call-sounds .check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; margin-top: 4px; cursor: pointer; }
.call-sounds .check input { width: 18px; height: 18px; accent-color: var(--green); }
.poster-line .added-by { color: #c6ccda; font-size: 13px; }
.meta .yt-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0; color: var(--green); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.link-btn svg { width: 16px; height: 16px; }

/* ---------- rewards: names, checkmarks, titles, banners ---------- */
.uname { display: inline-flex; align-items: center; gap: .28em; max-width: 100%; vertical-align: bottom; }
.uname-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-display .uname-t, .font-sample.f-display { font-family: var(--display); font-weight: 800; }
.f-mono .uname-t, .font-sample.f-mono { font-family: 'Space Mono', ui-monospace, monospace; font-weight: 700; }
.f-hand .uname-t, .font-sample.f-hand { font-family: 'Caveat', cursive; font-weight: 700; font-size: 1.25em; line-height: 1; }
.f-comic .uname-t, .font-sample.f-comic { font-family: 'Bangers', cursive; font-weight: 400; letter-spacing: .04em; font-size: 1.12em; }
.f-elegant .uname-t, .font-sample.f-elegant { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 700; }
.f-marker .uname-t, .font-sample.f-marker { font-family: 'Permanent Marker', cursive; font-weight: 400; }
.f-retro .uname-t, .font-sample.f-retro { font-family: 'Righteous', sans-serif; font-weight: 400; }
.f-pixel .uname-t, .font-sample.f-pixel { font-family: 'Press Start 2P', monospace; font-weight: 400; font-size: .72em; line-height: 1.4; }
.f-neon .uname-t, .font-sample.f-neon { font-family: 'Monoton', cursive; font-weight: 400; font-size: .95em; color: #ff8ad8; text-shadow: 0 0 6px rgba(255,90,200,.7); }
.f-royal .uname-t, .font-sample.f-royal { font-family: 'Cinzel Decorative', serif; font-weight: 700; color: #f3d27a; }

.chk { display: inline-grid; flex: none; width: 1.05em; height: 1.05em; min-width: 14px; min-height: 14px; }
.chk svg { width: 100%; height: 100%; }
.chk-bg { stroke: none; }
.chk-tick { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chk-green .chk-bg { fill: #2fd27a; } .chk-green .chk-tick { stroke: #062814; }
.chk-purple .chk-bg { fill: #9b6bff; }
.chk-gold .chk-bg { fill: #f5b82e; } .chk-gold .chk-tick { stroke: #3a2600; }
.chk-blue .chk-bg { fill: #3b9bff; }

.title-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  background: rgba(var(--accent-rgb),.14); color: var(--green); border: 1px solid rgba(var(--accent-rgb),.35); }
.title-chip.t-influencer, .title-chip.t-icon, .title-chip.t-founder { background: linear-gradient(90deg, rgba(245,184,46,.22), rgba(255,120,90,.22)); color: #ffcf6b; border-color: rgba(245,184,46,.45); }
.title-chip.t-og, .title-chip.t-veteran { background: rgba(155,107,255,.16); color: #c3a6ff; border-color: rgba(155,107,255,.4); }
.title-chip.t-newbie { background: rgba(255,255,255,.07); color: var(--muted); border-color: var(--line); }

/* banners (all drawn with CSS) */
.pbanner { border-radius: 18px; background: var(--panel-2); }
.bn-aurora { background: radial-gradient(120% 90% at 20% 110%, rgba(var(--accent-rgb),.85), transparent 55%), radial-gradient(90% 80% at 85% 0%, rgba(140,90,255,.9), transparent 60%), linear-gradient(160deg, #081a2a, #12324a); }
.bn-sunset { background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(40,10,40,.45)), radial-gradient(60% 70% at 50% 100%, #ffd36e, transparent 70%), linear-gradient(160deg, #ff6a88, #ff9a5a 55%, #ffc46b); }
.bn-ocean { background: radial-gradient(140% 60% at 50% 120%, rgba(255,255,255,.35), transparent 50%), repeating-radial-gradient(circle at 50% 160%, rgba(255,255,255,.08) 0 10px, transparent 10px 22px), linear-gradient(160deg, #0047b3, #2f7cf6 60%, #5fd0ff); }
.bn-neon { background: linear-gradient(transparent 60%, rgba(255,60,200,.35)), repeating-linear-gradient(90deg, rgba(0,240,255,.35) 0 1px, transparent 1px 26px), repeating-linear-gradient(0deg, rgba(255,60,200,.35) 0 1px, transparent 1px 26px), #12061f; }
.bn-forest { background: radial-gradient(50% 80% at 15% 110%, #0d3b22, transparent 70%), radial-gradient(45% 70% at 75% 115%, #11482a, transparent 70%), linear-gradient(180deg, #a9e5a1, #3f9a5d 55%, #1d5c36); }
.bn-candy { background: repeating-linear-gradient(-45deg, #ffb3d9 0 16px, #fff0f7 16px 32px, #b8e6ff 32px 48px, #fff0f7 48px 64px); }
.bn-vintage { background: radial-gradient(circle at 30% 40%, rgba(255,255,255,.25), transparent 50%), repeating-linear-gradient(90deg, rgba(90,60,30,.12) 0 2px, transparent 2px 6px), linear-gradient(160deg, #c8a678, #8a6a45); filter: saturate(.85); }
.bn-galaxy { background: radial-gradient(1.5px 1.5px at 12% 30%, #fff, transparent), radial-gradient(1px 1px at 30% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 20%, #fff, transparent),
  radial-gradient(1px 1px at 70% 60%, #fff, transparent), radial-gradient(2px 2px at 88% 35%, #fff, transparent), radial-gradient(1px 1px at 45% 85%, #fff, transparent),
  radial-gradient(70% 90% at 70% 50%, rgba(160,80,255,.55), transparent 60%), radial-gradient(60% 80% at 20% 60%, rgba(40,120,255,.5), transparent 60%), #0a0620; }
.bn-gold { background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 60%), linear-gradient(135deg, #8a5a12, #f5c451 35%, #fff0b3 50%, #e0a63a 65%, #7a4b0c); background-size: 250% 100%, 100% 100%; animation: shine 4s linear infinite; }
.bn-inferno { background: radial-gradient(40% 90% at 20% 120%, #ffe066, transparent 70%), radial-gradient(40% 100% at 55% 125%, #ffb02e, transparent 70%), radial-gradient(35% 90% at 85% 120%, #ff6a2e, transparent 70%), linear-gradient(180deg, #2a0505, #8a1a0a 60%, #d8380e);
  background-size: 140% 140%; animation: flicker 3s ease-in-out infinite alternate; }
@keyframes shine { from { background-position: 150% 0, 0 0; } to { background-position: -100% 0, 0 0; } }
@keyframes flicker { to { background-position: 30% 60%; } }
@media (prefers-reduced-motion: reduce) { .bn-gold, .bn-inferno { animation: none; } }

/* profile with a banner */
.profile-top { position: relative; }
.profile-top > .pbanner { display: none; }
.profile-top.has-banner > .pbanner { display: block; position: absolute; left: 0; right: 0; top: 0; height: 112px; z-index: 0; box-shadow: inset 0 -30px 40px -30px rgba(0,0,0,.45); }
.profile-top.has-banner { padding-top: 62px; }
.profile-top.has-banner > * { position: relative; }
.profile-top.has-banner > .pbanner { position: absolute; }
.profile-top.has-banner .avatar-wrap .avatar.lg { box-shadow: 0 0 0 4px var(--ink); }
.profile-top h2 .uname { justify-content: center; }
.style-btn { background: linear-gradient(90deg, rgba(var(--accent-rgb),.18), rgba(155,107,255,.2)); border-color: rgba(155,107,255,.45); }

/* Style page */
.style-preview { position: relative; border-radius: 22px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.style-preview .pbanner { height: 104px; border-radius: 0; }
.style-preview .bn-none { background: linear-gradient(160deg, var(--panel-2), var(--panel)); }
.sp-body { display: grid; justify-items: center; gap: 4px; margin-top: -46px; padding: 0 16px 16px; text-align: center; }
.sp-body .avatar.lg { box-shadow: 0 0 0 4px var(--panel); }
.sp-name { font: 800 21px/1.2 var(--display); margin-top: 6px; max-width: 100%; }
.sp-body .handle { color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.style-intro { margin: 14px 2px 6px; font-size: 13.5px; }
.style-page .tabs button { display: inline-flex; align-items: center; gap: 6px; }
.tab-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.reward-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 0 30px; }
@media (min-width: 640px) { .reward-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.reward { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .12s; }
.reward:not(:disabled):hover { border-color: #3a4256; }
.reward:not(:disabled):active { transform: scale(.97); }
.reward.on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.reward b { font-size: 14.5px; }
.reward small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.reward.on small { color: var(--green); font-weight: 600; }
.reward.locked { cursor: default; }
.reward.locked .rw-sample { filter: grayscale(.85) brightness(.6); }
.rw-sample { width: 100%; height: 64px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; background: var(--panel-2); margin-bottom: 4px; padding: 0 8px; }
.rw-sample .pbanner.mini { width: 100%; height: 100%; border-radius: 0; }
.rw-sample .pbanner.mini.bn-none { background: linear-gradient(160deg, var(--panel-2), var(--ink)); }
.chk-big { font-size: 34px; display: inline-flex; }
.font-sample { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rw-bar { position: relative; width: 100%; height: 16px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-top: 4px; }
.rw-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #1f8f55, var(--green)); border-radius: 999px; }
.rw-bar span { position: relative; display: block; text-align: center; font-size: 10.5px; font-weight: 700; line-height: 16px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }

/* ---------- profile header tools: pencil (edit) and ☰ menu ---------- */
.head-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn.plain { background: none; border-color: transparent; width: 40px; height: 40px; }
.icon-btn.plain svg { width: 23px; height: 23px; }
.icon-btn.plain:hover { background: var(--panel); }

.menu-list { display: grid; gap: 6px; padding-bottom: 6px; }
.menu-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; cursor: pointer; }
.menu-row:hover { border-color: var(--muted); }
.menu-row > svg { width: 18px; height: 18px; color: var(--muted); }
.menu-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--panel-2); }
.menu-ic svg { width: 20px; height: 20px; }
.menu-ic.sparkle { background: linear-gradient(135deg, rgba(var(--accent-rgb),.25), rgba(155,107,255,.3)); color: #b994ff; }
.menu-txt { flex: 1; display: grid; gap: 1px; min-width: 0; }
.menu-txt b { font-size: 15px; }
.menu-sub { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch-input:checked + .switch-track { background: var(--green); }
.switch-input:checked + .switch-track::after { transform: translateX(20px); }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- light mode ---------- */
:root[data-theme="light"] {
  --ink: #ffffff;
  --panel: #f3f4f7;
  --panel-2: #e8eaef;
  --line: #dde1e8;
  --text: #12151c;
  --muted: #646d80;
  --brand-a: #7a3ff5;
  --brand-b: #2a74f2;
  --green: #6c3cf0;
  --green-ink: #ffffff;
  --accent-rgb: 108, 60, 240;
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .8);
  --glass-line: rgba(255, 255, 255, .75);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(20, 20, 60, .04);
  --glass-shadow: 0 10px 30px rgba(40, 40, 90, .14);
  color-scheme: light;
}
:root[data-theme="light"] body { background: #e6e8ee; }
/* The video feed, calls and photo viewer always stay dark, like TikTok. */
:root[data-theme="light"]:not(.is-desktop) body[data-page="feed"] #app,
:root[data-theme="light"] #feedPane,
:root[data-theme="light"] .call-screen,
:root[data-theme="light"] .ring-screen,
:root[data-theme="light"] .lightbox {
  --ink: #0b0d12; --panel: #141821; --panel-2: #1c212d; --line: #262c3a; --text: #f1f3f8; --muted: #8d95aa;
  --brand-a: #8f5bff; --brand-b: #3f8cff; --green: #a07cff; --green-ink: #ffffff; --accent-rgb: 150, 110, 255;
  --glass: rgba(30, 32, 44, .52); --glass-strong: rgba(26, 28, 38, .72); --glass-line: rgba(255, 255, 255, .14);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .04); --glass-shadow: 0 10px 34px rgba(0, 0, 0, .38);
  color: var(--text); color-scheme: dark;
}
:root[data-theme="light"] .sheet-backdrop { background: rgba(10,12,18,.35); }
:root[data-theme="light"] .title-chip.t-newbie { background: var(--panel-2); }
:root[data-theme="light"] .title-chip.t-influencer, :root[data-theme="light"] .title-chip.t-icon, :root[data-theme="light"] .title-chip.t-founder { color: #a86500; }
:root[data-theme="light"] .title-chip.t-og, :root[data-theme="light"] .title-chip.t-veteran { color: #6b3fd6; }
:root[data-theme="light"] .f-royal .uname-t, :root[data-theme="light"] .font-sample.f-royal { color: #9a6a00; }
:root[data-theme="light"] .f-neon .uname-t, :root[data-theme="light"] .font-sample.f-neon { color: #d6249f; text-shadow: none; }
:root[data-theme="light"] .menu-ic.sparkle { color: #7a4fe0; }
:root[data-theme="light"] .switch-track { background: #c9ced8; }
:root[data-theme="light"] .avatar { color: #0b0d12; }
:root[data-theme="light"] .banner { box-shadow: 0 8px 26px rgba(15,20,30,.18); }

/* ---------- warnings and bans ---------- */
.warn-screen { position: absolute; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 30%, rgba(255,170,0,.25), rgba(8,8,10,.94) 65%); animation: fade .2s ease; }
.ban-screen { background: radial-gradient(circle at 50% 30%, rgba(255,40,60,.3), rgba(8,8,10,.96) 65%); }
.warn-card { width: 100%; max-width: 380px; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 22px 22px; border-radius: 24px;
  background: #15171f; color: #f1f3f8; border: 2px solid #ffb21a; box-shadow: 0 0 0 6px rgba(255,178,26,.15), 0 20px 60px rgba(0,0,0,.6); animation: ringrise .35s cubic-bezier(.2,.9,.3,1.2); }
.ban-screen .warn-card { border-color: #ff3b4e; box-shadow: 0 0 0 6px rgba(255,59,78,.15), 0 20px 60px rgba(0,0,0,.6); }
.warn-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: #ffb21a; color: #1a1200; animation: warnpulse 1.4s ease-in-out infinite; }
.ban-screen .warn-icon { background: #ff3b4e; color: #fff; }
.warn-icon svg { width: 40px; height: 40px; stroke-width: 2.4; }
@keyframes warnpulse { 50% { transform: scale(1.08); } }
.warn-card h2 { margin: 8px 0 4px; font: 800 26px/1.1 var(--display); letter-spacing: .01em; color: #ffcc4d; }
.ban-screen .warn-card h2 { color: #ff6b78; font-size: 23px; }
.warn-label { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9aa2b5; }
.warn-reason { margin: 0; padding: 12px 14px; width: 100%; border-radius: 14px; background: #1f222c; font-size: 16px; font-weight: 600; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.warn-foot { margin: 6px 0 4px; font-size: 12.5px; color: #9aa2b5; }
.warn-ok { width: 100%; margin-top: 6px; height: 46px; background: #ffb21a; border-color: #ffb21a; color: #1a1200; font-weight: 800; }
.ban-screen .warn-ok { background: #ff3b4e; border-color: #ff3b4e; color: #fff; }
.warn-ok:disabled { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .warn-icon { animation: none; } }

/* ---------- admin panel ---------- */
.menu-ic.shield { background: rgba(59,155,255,.18); color: #3b9bff; }
.ap-search { display: flex; gap: 8px; margin-bottom: 14px; }
.ap-search .input { flex: 1; }
.ap-card { display: grid; gap: 4px; padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 18px; }
.ap-who { display: flex; gap: 12px; align-items: flex-start; }
.ap-who > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ap-name { font-size: 17px; }
.ap-who .handle { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.ap-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--panel-2); color: var(--muted); }
.tag.blue { background: rgba(59,155,255,.16); color: #3b9bff; }
.tag.red { background: rgba(255,59,78,.16); color: #ff5a6a; }
.tag.amber { background: rgba(255,178,26,.18); color: #e09a00; }
.ap-section { display: grid; gap: 8px; padding-top: 14px; margin-top: 10px; border-top: 1px solid var(--line); }
.ap-lists .ap-section:first-child { border-top: 0; margin-top: 0; }
.ap-section h3 { margin: 0; font-size: 14px; letter-spacing: .02em; }
.ap-section .btn { justify-self: start; }
.ap-section .btn svg { width: 18px; height: 18px; }
.ap-row { display: grid; gap: 8px; }
.ap-banned { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(255,59,78,.1); border: 1px solid rgba(255,59,78,.35); }
.ap-banned p { margin: 0; }
.warn-btn { background: rgba(255,178,26,.15); border-color: rgba(255,178,26,.5); color: #e09a00; }
.btn.danger-fill { background: #e5313f; border-color: #e5313f; color: #fff; }
.btn.danger-fill:disabled { opacity: .45; }
.ap-warnlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ap-warnlist li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); font-size: 14px; overflow-wrap: anywhere; }
.ap-warnlist small { color: var(--muted); font-size: 12px; }
.linkish { background: none; border: 0; padding: 0; color: var(--green); font-weight: 700; cursor: pointer; justify-self: start; }
.admin-panel .person { width: 100%; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; }


/* =====================================================================
   Liquid Glass look (iOS 26 style) + the violet/blue brand
   Frosted, see-through surfaces with a bright top edge, floating
   rounded controls, and soft colour behind pages for the glass to show.
   ===================================================================== */
.glass {
  background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hi), var(--glass-shadow);
}

/* soft colour behind every page (not the video feed) */
body[data-page="page"] #app, body[data-page="chat"] #app {
  background:
    radial-gradient(70% 38% at 0% 0%, rgba(143, 91, 255, .26), transparent 70%),
    radial-gradient(60% 34% at 100% 22%, rgba(63, 140, 255, .22), transparent 70%),
    radial-gradient(70% 40% at 50% 105%, rgba(143, 91, 255, .14), transparent 70%),
    var(--ink);
}
:root[data-theme="light"] body[data-page="page"] #app, :root[data-theme="light"] body[data-page="chat"] #app {
  background:
    radial-gradient(70% 38% at 0% 0%, rgba(122, 63, 245, .16), transparent 70%),
    radial-gradient(60% 34% at 100% 22%, rgba(42, 116, 242, .14), transparent 70%),
    radial-gradient(70% 40% at 50% 105%, rgba(122, 63, 245, .10), transparent 70%),
    #f6f5fb;
}

/* the EduWatch wordmark in two colours */
.brand { font: 800 19px/1 var(--display); letter-spacing: -.02em; display: inline-flex; filter: drop-shadow(0 1px 6px rgba(0,0,0,.35)); }
.brand-a { background: linear-gradient(135deg, #b48cff, var(--brand-a)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-b { background: linear-gradient(135deg, #6fb0ff, var(--brand-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* floating glass tab bar */
.nav {
  position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(10px + var(--safe-b)); height: var(--nav-h); padding: 0 6px;
  border-radius: 31px; border: 1px solid var(--glass-line); border-top-color: var(--glass-line);
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hi), var(--glass-shadow); z-index: 30;
}
.nav-btn { margin: 6px 2px; border-radius: 24px; padding: 5px 0; transition: background .2s, color .2s; }
.nav-btn.on { background: rgba(255, 255, 255, .12); color: var(--text); }
:root[data-theme="light"] .nav-btn.on { background: rgba(var(--accent-rgb), .12); color: var(--green); }
.play-btn {
  width: 56px; height: 42px; border-radius: 21px; background: var(--grad); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 18px rgba(110, 90, 255, .5);
}
body[data-mode="fun"] .play-btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 2px rgba(255,255,255,.35), 0 6px 18px rgba(110, 90, 255, .5); }
.badge { box-shadow: 0 0 0 2px var(--ink); }

/* the nav floats over content now, so leave room for it */
.page { padding-bottom: calc(var(--nav-h) + 40px + var(--safe-b)); }
.meta { bottom: calc(var(--nav-h) + 26px + var(--safe-b)); }
.rail { bottom: calc(var(--nav-h) + 28px + var(--safe-b)); }
.shade { height: 58%; }
.toast { bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.call-screen.mini { bottom: calc(var(--nav-h) + 26px + var(--safe-b)); }
/* conversations hide the tab bar (like Messages) so the typing box has the space */
html:not(.is-desktop) body[data-page="chat"] .nav { display: none; }

/* feed: glass controls over the video */
.feed-top { background: linear-gradient(rgba(0,0,0,.45), transparent); }
.feed-tabs { gap: 2px; padding: 3px; border-radius: 999px; background: rgba(30, 32, 44, .38); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.feed-tabs button { padding: 6px 13px; border-radius: 999px; border: 0; font-size: 14px; color: rgba(255,255,255,.7); transition: background .2s, color .2s; }
.feed-tabs button.on { color: #fff; background: rgba(255,255,255,.2); border: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.mute, .act .ic {
  background: rgba(30, 32, 44, .4); border: 1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 14px rgba(0,0,0,.25); color: #fff;
}
.top-actions { gap: 6px; }

/* buttons, inputs, icon buttons */
.btn { border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.btn.sm { border-radius: 999px; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 18px rgba(110, 90, 255, .35); }
.btn.danger-fill { box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.icon-btn { background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.icon-btn.plain { background: none; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.icon-btn.plain:hover { background: var(--glass); }
.input { border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .22); }
textarea.input { border-radius: 16px; }
.sheet-foot .input, .composer textarea { border-radius: 22px; }

/* segmented tabs (profile, inbox, style, leaderboard) */
.tabs { border-bottom: 0; gap: 3px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line);
  box-shadow: var(--glass-hi); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.tabs > button, .tabs > a { flex: 1; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0;
  border: 0; border-radius: 999px; background: none; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; transition: background .2s, color .2s; }
.tabs > button.on, .tabs > a.on { color: #fff; background: var(--grad); border: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 10px rgba(110, 90, 255, .3); }
.tabs > button.on .tab-n { background: rgba(255,255,255,.25); color: #fff; }

/* sheets float as glass cards */
.sheet { left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); padding-bottom: 0; border-radius: 30px;
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi), 0 20px 50px rgba(0,0,0,.45);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.sheet-foot { border-top-color: var(--glass-line); }
.sheet-backdrop { background: rgba(0,0,0,.35); }

/* toast and pop-up banners */
.toast { border-radius: 999px; background: var(--glass-strong); color: var(--text); border: 1px solid var(--glass-line);
  box-shadow: var(--glass-hi), var(--glass-shadow); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.banner { border-radius: 22px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi), var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }

/* cards */
.menu-row, .reward, .ap-card, .style-preview, .lb-row, .lb-hero, .lb-winner { background: var(--glass); border: 1px solid var(--glass-line);
  box-shadow: var(--glass-hi); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.menu-row { border-radius: 20px; }
.reward { border-radius: 20px; }
.reward.on { border-color: var(--green); box-shadow: var(--glass-hi), 0 0 0 1px var(--green) inset, 0 6px 18px rgba(110, 90, 255, .25); }
.rw-bar i { background: var(--grad); }
.ap-card { border-radius: 24px; }

/* chat */
.msg.mine .bubble { background: var(--grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.bubble { background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.msg.mine .bubble { border-color: transparent; }
.chat-head, .composer, .chat-bottom { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-color: var(--glass-line); }

/* switches, chips and accents in the new colours */
.switch-input:checked + .switch-track { background: var(--grad); }
.title-chip { background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .4); color: var(--green); }
.seg button.on { background: var(--grad); color: #fff; }
.call-btn.accept { background: var(--grad); color: #fff; }

/* ---------- quiz pop-up ---------- */
.quiz-layer { position: absolute; inset: 0; z-index: 70; display: grid; align-items: end; padding: 12px 10px calc(14px + var(--safe-b)); background: rgba(0,0,0,.35); animation: fade .2s ease; }
.quiz-layer.out { opacity: 0; transition: opacity .2s; }
.quiz-card { border-radius: 30px; padding: 16px 16px 14px; display: grid; gap: 12px; color: #f1f3f8; animation: ringrise .38s cubic-bezier(.2,.9,.3,1.15);
  --glass: rgba(26, 28, 40, .62); --glass-line: rgba(255,255,255,.16); }
.quiz-card.is-right { box-shadow: var(--glass-hi), 0 0 0 2px rgba(47, 210, 122, .7), var(--glass-shadow); }
.quiz-card.is-wrong { box-shadow: var(--glass-hi), 0 0 0 2px rgba(255, 90, 110, .6), var(--glass-shadow); }
.qz-top { display: flex; align-items: center; gap: 8px; }
.qz-tag { font-size: 12.5px; font-weight: 800; letter-spacing: .03em; padding: 5px 11px; border-radius: 999px; background: var(--grad); color: #fff; }
.qz-points { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: #ffd36b; }
.qz-points svg { width: 16px; height: 16px; }
.qz-points.bump { animation: pop .45s ease; }
.qz-x { color: #fff; }
.quiz-card h2 { margin: 2px 2px 0; font: 800 20px/1.25 var(--display); }
.qz-opts { display: grid; gap: 8px; }
.qz-opt { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 14px; border-radius: 18px; text-align: left; font: 600 15px/1.3 var(--body); color: #f1f3f8;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); cursor: pointer; transition: transform .1s, background .15s; }
.qz-opt:not(:disabled):hover { background: rgba(255,255,255,.14); }
.qz-opt:not(:disabled):active { transform: scale(.98); }
.qz-opt:disabled { cursor: default; }
.qz-letter { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: rgba(255,255,255,.12); }
.qz-opt.right { background: rgba(47, 210, 122, .22); border-color: rgba(47, 210, 122, .8); }
.qz-opt.right .qz-letter { background: #2fd27a; color: #062814; }
.qz-opt.wrong { background: rgba(255, 90, 110, .2); border-color: rgba(255, 90, 110, .75); }
.qz-opt.wrong .qz-letter { background: #ff5a6e; color: #fff; }
.qz-opt:disabled:not(.right):not(.wrong) { opacity: .5; }
.qz-why { padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.07); font-size: 14px; line-height: 1.4; color: #d6dae6; }
.qz-why b { color: #fff; }
.qz-foot { display: flex; gap: 8px; }
.qz-foot:empty { display: none; }
.qz-foot .btn { flex: 1; color: #f1f3f8; }
.qz-foot .btn.primary { color: #fff; }

/* ---------- leaderboard ---------- */
.lb-hero { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 24px; }
.lb-hero-ic { width: 46px; height: 46px; flex: none; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #ffd36b, #ff9f43); color: #3a2200; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.lb-hero-ic svg { width: 26px; height: 26px; }
.lb-hero > div:last-child { display: grid; gap: 2px; }
.lb-hero small { color: var(--muted); font-size: 13px; }
.lb-winners { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.lb-winner { position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 10px 12px; border-radius: 24px; text-decoration: none; color: var(--text); text-align: center; }
.lb-winner .lb-crown { position: absolute; top: 4px; font-size: 22px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.lb-winner b { max-width: 100%; }
.lb-winner small { color: var(--muted); font-size: 12px; }
.lb-how { font-size: 12.5px; margin: 8px 4px 10px; text-align: center; }
.lb-list { display: grid; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 20px; text-decoration: none; color: var(--text); }
.lb-row.mine { border-color: var(--green); box-shadow: var(--glass-hi), 0 0 0 1px var(--green) inset; }
.lb-row.top1 { background: linear-gradient(135deg, rgba(255, 205, 80, .22), rgba(255, 160, 60, .1)), var(--glass); }
.lb-rank { width: 28px; text-align: center; font-weight: 800; font-size: 15px; color: var(--muted); flex: none; }
.lb-row.top1 .lb-rank, .lb-row.top2 .lb-rank, .lb-row.top3 .lb-rank { font-size: 20px; }
.lb-name { flex: 1; min-width: 0; display: grid; }
.lb-name small { color: var(--muted); font-size: 12px; }
.lb-score { font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.lb-score small { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.lb-you { text-align: center; margin: 14px 0 0; font-size: 13.5px; }
.lb-empty { text-align: center; padding: 26px 0; }
.lb-quiz { display: flex; margin: 16px auto 0; }
.lb-quiz svg { width: 18px; height: 18px; }
.lb-page > .lb-list + .lb-row { margin-top: 8px; }
.menu-ic.gold { background: linear-gradient(135deg, rgba(255, 211, 107, .35), rgba(255, 159, 67, .3)); color: #ffb020; }
.crown { font-size: .9em; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
@media (prefers-reduced-motion: reduce) { .quiz-card { animation: none; } }
/* tighter feed top bar so everything fits on phones */
.feed-top { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); column-gap: 8px; }
.feed-top .brand { font-size: 17px; }
.feed-tabs button { white-space: nowrap; padding: 6px 11px; font-size: 13.5px; }
.feed-top .mute { width: 34px; height: 34px; }
.feed-top .mute svg { width: 18px; height: 18px; }
.top-actions { gap: 5px; }
.feed-top { grid-template-columns: auto 1fr auto; }
.feed-top .feed-tabs { justify-self: center; }
.feed-top .mute { width: 32px; height: 32px; }
.feed-tabs button { padding: 6px 10px; }
@media (max-width: 392px) { .feed-top .top-actions a[href="#/leaderboard"] { display: none; } .feed-tabs button { padding: 6px 9px; font-size: 13px; } }
.toast { border-radius: 20px; text-align: center; }
@media (max-width: 350px) { .feed-top .brand { font-size: 14px; } .feed-tabs button { padding: 5px 7px; font-size: 12.5px; } .feed-top .mute { width: 30px; height: 30px; } }

/* ---------- tab bar bubble (slides between tabs, follows your finger when you swipe) ---------- */
.nav { touch-action: none; user-select: none; -webkit-user-select: none; }
.nav > * { position: relative; z-index: 1; }
.nav > .nav-pill { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0; width: 0; opacity: 0; border-radius: 24px; pointer-events: none;
  background: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
  transition: translate .42s cubic-bezier(.3, 1.35, .5, 1), width .3s ease, scale .2s ease, background .2s, opacity .2s; }
.nav > .nav-pill.instant { transition: scale .2s ease, background .2s, opacity .2s; }
.nav-btn.on { background: none; }
:root[data-theme="light"] .nav-btn.on { background: none; }
:root[data-theme="light"] .nav > .nav-pill { background: rgba(var(--accent-rgb), .12); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.nav.dragging > .nav-pill { scale: 1.1 1.18; background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 20px rgba(0,0,0,.3); }
:root[data-theme="light"] .nav.dragging > .nav-pill { background: rgba(var(--accent-rgb), .18); }
.nav-btn.hover { color: var(--text); }
.nav.dragging .nav-btn { transition: color .1s; }

/* ---------- Liquid Glass switched off: solid surfaces, classic flat tab bar ---------- */
:root[data-glass="off"], :root[data-glass="off"] * {
  --glass: var(--panel); --glass-strong: var(--panel); --glass-line: var(--line);
  --glass-hi: 0 0 #0000; --glass-shadow: 0 0 #0000; --glass-blur: none;
}
:root[data-glass="off"] .quiz-card { --glass: #1b1d27; --glass-line: rgba(255, 255, 255, .12); }
:root[data-glass="off"] body[data-page] #app { background: var(--ink); }
:root[data-glass="off"] .nav { left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
  border-radius: 0; border: 0; border-top: 1px solid var(--line); background: var(--ink); box-shadow: none; }
:root[data-glass="off"] .nav > .nav-pill { top: 7px; bottom: calc(7px + var(--safe-b)); background: var(--panel-2); box-shadow: none; }
:root[data-glass="off"] .sheet { left: 0; right: 0; bottom: 0; border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b); border: 0; border-top: 1px solid var(--line); }
:root[data-glass="off"] .meta { bottom: calc(var(--nav-h) + 16px + var(--safe-b)); }
:root[data-glass="off"] .rail { bottom: calc(var(--nav-h) + 18px + var(--safe-b)); }
:root[data-glass="off"] .feed-tabs, :root[data-glass="off"] .mute, :root[data-glass="off"] .act .ic { background: rgba(20, 22, 30, .6); }
.nav a, .nav svg { -webkit-user-drag: none; user-drag: none; }

/* ---------- phones: fit the device's screen exactly ---------- */
html.is-phone, html.is-phone body { overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.is-phone body { background: var(--ink); position: fixed; inset: 0; }
html.is-phone #app {
  position: fixed; left: 0; right: 0; top: var(--app-top, 0px);
  height: var(--app-h, 100dvh); max-width: none; margin: 0; border: 0;
}
/* iPhones zoom in on text boxes smaller than 16px; keep them at 16px */
html.is-phone input, html.is-phone textarea, html.is-phone select { font-size: 16px; }
/* bigger, easier touch targets */
html.is-phone .icon-btn { width: 42px; height: 42px; }
html.is-phone .btn { min-height: 42px; }
/* while the keyboard is open the tab bar steps aside */
html.is-phone.kb-open .nav { display: none; }
html.is-phone.kb-open .page { padding-bottom: 24px; }
/* small phones (iPhone SE / mini and similar) */
html.is-phone.is-small { --nav-h: 58px; }
html.is-phone.is-small .act .ic { width: 42px; height: 42px; }
html.is-phone.is-small .act svg { width: 23px; height: 23px; }
html.is-phone.is-small .rail { gap: 12px; }
html.is-phone.is-small .meta h2 { font-size: 15px; }
html.is-phone.is-small .page-head h1 { font-size: 22px; }
html.is-phone.is-small .nav-btn span { font-size: 10px; }
/* phone turned sideways: a slimmer tab bar and rail so the video has room */
html.is-phone.is-landscape { --nav-h: 48px; }
html.is-phone.is-landscape .nav-btn span { display: none; }
html.is-phone.is-landscape .nav { left: 50%; right: auto; width: min(440px, 70vw); transform: translateX(-50%); }
html.is-phone.is-landscape .rail { gap: 8px; }
html.is-phone.is-landscape .act .ic { width: 38px; height: 38px; }
html.is-phone.is-landscape .act span { font-size: 11px; }
html.is-phone.is-landscape .feed-top { padding-top: calc(6px + var(--safe-t)); }
html.is-phone.is-landscape .meta { right: 70px; }
html.is-phone.is-landscape .meta h2 { -webkit-line-clamp: 1; }
html.is-phone.is-landscape .sheet { max-height: 92%; }
:root[data-glass="off"] html.is-phone.is-landscape .nav, html.is-phone.is-landscape[data-glass="off"] .nav { left: 0; right: 0; width: auto; transform: none; }
/* opened from the home screen: the status bar sits over the app, so leave room at the top */
html.is-app .feed-top { padding-top: calc(14px + var(--safe-t)); }
/* sideways: the short screen can't fit the full button column, so drop the numbers and tighten it */
html.is-phone.is-landscape .rail { gap: 6px; bottom: calc(var(--nav-h) + 18px + var(--safe-b)); right: max(10px, env(safe-area-inset-right, 0px)); }
html.is-phone.is-landscape .act { font-size: 0; gap: 0; }
html.is-phone.is-landscape .act .ic { width: 36px; height: 36px; }
html.is-phone.is-landscape .act svg { width: 20px; height: 20px; }
html.is-phone.is-landscape .feed-top { padding-right: max(12px, env(safe-area-inset-right, 0px)); }


/* =====================================================================
   Desktop: videos on the left, a vertical glass tab bar in the middle,
   and whatever you open (search, inbox, profile, chats…) on the right.
   ===================================================================== */
html.is-desktop body {
  background:
    radial-gradient(45% 50% at 10% 0%, rgba(143, 91, 255, .28), transparent 70%),
    radial-gradient(40% 45% at 95% 15%, rgba(63, 140, 255, .24), transparent 70%),
    radial-gradient(50% 50% at 60% 110%, rgba(143, 91, 255, .16), transparent 70%),
    #07080d;
}
html.is-desktop[data-theme="light"] body {
  background:
    radial-gradient(45% 50% at 10% 0%, rgba(122, 63, 245, .18), transparent 70%),
    radial-gradient(40% 45% at 95% 15%, rgba(42, 116, 242, .16), transparent 70%),
    #eeedf6;
}
html.is-desktop #app, html.is-desktop body[data-page] #app {
  --feed-w: min(calc((100vh - 48px) * 9 / 16), 540px);
  max-width: none; margin: 0; height: 100vh; padding: 24px; border: 0; background: none;
  display: grid; grid-template-columns: var(--feed-w) 92px minmax(420px, 1fr); grid-template-areas: "feed nav view"; gap: 22px; align-items: stretch;
}
html.is-desktop #feedPane { grid-area: feed; position: relative; overflow: hidden; border-radius: 30px; background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08); }
html.is-desktop #view { grid-area: view; position: relative; overflow: hidden; border-radius: 30px;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi), var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
html.is-desktop .page { padding: 26px 28px 30px; }
html.is-desktop .page-head h1 { font-size: 26px; }

/* the vertical tab bar */
html.is-desktop .nav, html.is-desktop[data-glass="off"] .nav {
  grid-area: nav; position: relative; left: auto; right: auto; bottom: auto; transform: none; width: auto;
  align-self: center; height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 8px;
  border-radius: 40px; border: 1px solid var(--glass-line);
}
html.is-desktop[data-glass="off"] .nav { background: var(--panel); box-shadow: none; }
html.is-desktop .nav-btn { margin: 0; padding: 12px 0 10px; border-radius: 28px; gap: 5px; font-size: 11.5px; }
html.is-desktop .nav-btn svg { width: 25px; height: 25px; }
html.is-desktop .nav-btn .nav-av { width: 30px; height: 30px; }
html.is-desktop .play-btn { align-self: center; width: 58px; height: 58px; border-radius: 50%; margin: 6px 0; }
html.is-desktop .play-btn svg { width: 24px; height: 24px; }
html.is-desktop .nav > .nav-pill { top: 0; bottom: auto; left: 8px; right: 8px; width: auto; border-radius: 28px;
  transition: translate .42s cubic-bezier(.3, 1.35, .5, 1), height .3s ease, scale .2s ease, background .2s, opacity .2s; }
html.is-desktop .nav.dragging > .nav-pill { scale: 1.12 1.08; }
html.is-desktop[data-glass="off"] .nav > .nav-pill { top: 0; bottom: auto; }
html.is-desktop .badge { top: 6px; left: calc(50% + 8px); }

/* feed inside its pane: the tab bar isn't floating over it any more */
html.is-desktop #feedPane .meta { bottom: 22px; }
html.is-desktop #feedPane .rail { bottom: 24px; }
html.is-desktop #feedPane .shade { height: 46%; }
html.is-desktop #feedPane .feed-top .brand { font-size: 18px; }

/* pop-ups become centered cards instead of bottom sheets */
html.is-desktop .sheet, html.is-desktop[data-glass="off"] .sheet {
  left: 50%; right: auto; bottom: auto; top: 50%; width: min(520px, calc(100vw - 48px)); max-height: 82vh;
  transform: translate(-50%, -50%); border-radius: 28px; animation: deskpop .2s ease; border: 1px solid var(--glass-line); padding-bottom: 0;
}
@keyframes deskpop { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }
html.is-desktop .toast { bottom: 32px; }
html.is-desktop .quiz-layer { align-items: center; justify-items: center; }
html.is-desktop .quiz-card { width: min(480px, 100%); }
html.is-desktop .banners { left: auto; right: 24px; width: 380px; }
html.is-desktop .call-screen.mini { bottom: 32px; right: 32px; }

/* the Home panel: what's playing and what's next */
.desk-home .page-head { margin-bottom: 12px; }
.np-card { display: flex; gap: 14px; padding: 12px; border-radius: 24px; }
.np-thumb { flex: none; width: 96px; aspect-ratio: 9 / 16; border-radius: 16px; background: #000 center / cover no-repeat; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.np-body { flex: 1; min-width: 0; display: grid; gap: 6px; align-content: start; }
.np-poster { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--text); }
.np-title { font: 700 17px/1.3 var(--display); }
.np-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.np-tags a { color: var(--green); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.np-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.np-actions .btn svg { width: 16px; height: 16px; }
.np-h { margin: 22px 2px 10px; font: 800 16px/1 var(--display); }
.np-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.np-item { display: grid; gap: 6px; padding: 0; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; }
.np-mini { display: block; aspect-ratio: 9 / 12; border-radius: 18px; background: #000 center / cover no-repeat; box-shadow: 0 0 0 1px var(--glass-line); transition: transform .15s; }
.np-item:hover .np-mini { transform: scale(1.03); }
.np-txt { display: grid; gap: 1px; padding: 0 2px; }
.np-txt b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-txt small { color: var(--muted); font-size: 12px; }
.np-links { display: flex; gap: 8px; margin-top: 20px; }
.np-links .btn svg { width: 18px; height: 18px; }
.np-keys { font-size: 12.5px; margin-top: 18px; }
html.is-desktop .nav > .nav-pill.instant { transition: scale .2s ease, background .2s, opacity .2s; }
/* desktop: the tab bar runs the full height, tabs spread evenly like the sketch */
html.is-desktop .nav, html.is-desktop[data-glass="off"] .nav { align-self: stretch; justify-content: space-evenly; padding: 18px 8px; border-radius: 46px; }
html.is-desktop .nav-btn { padding: 14px 0 12px; }
/* desktop option: videos on the right, pages on the left */
html.is-desktop.videos-right #app, html.is-desktop.videos-right body[data-page] #app {
  grid-template-columns: minmax(420px, 1fr) 92px var(--feed-w); grid-template-areas: "view nav feed";
}
html.is-desktop.videos-right .banners { right: auto; left: 24px; }

/* =====================================================================
   Desktop, take 2: Home = the video alone in the middle of the screen.
   Opening a page: the video glides to its side and the page slides in.
   Columns: [page] [tab bar] [video] [spacer]  (or mirrored for "Left").
   The spacer is as wide as the tab bar so the video is exactly centered on Home.
   ===================================================================== */
html.is-desktop #app, html.is-desktop body[data-page] #app {
  --nav-w: 108px;
  grid-template-areas: "ghost feed nav view";
  grid-template-columns: 0px var(--feed-w) var(--nav-w) 1fr;
  justify-content: center;
  transition: grid-template-columns .55s cubic-bezier(.45, 0, .2, 1), column-gap .55s cubic-bezier(.45, 0, .2, 1);
}
html.is-desktop body[data-page="feed"] #app { grid-template-columns: var(--nav-w) var(--feed-w) var(--nav-w) 0fr; }
html.is-desktop.videos-right #app, html.is-desktop.videos-right body[data-page] #app {
  grid-template-areas: "view nav feed ghost"; grid-template-columns: 1fr var(--nav-w) var(--feed-w) 0px;
}
html.is-desktop.videos-right body[data-page="feed"] #app { grid-template-columns: 0fr var(--nav-w) var(--feed-w) var(--nav-w); }
/* on Home the page area folds away completely */
html.is-desktop #view { min-width: 0; transition: opacity .35s ease, border-color .35s; }
html.is-desktop body[data-page="feed"] #view { opacity: 0; pointer-events: none; border-color: transparent; }
html.is-desktop body[data-page="feed"] #app { gap: 22px 0; }
html.is-desktop body[data-page="feed"] .nav { margin: 0 11px; }
html.is-desktop #app { column-gap: 22px; }
/* the page itself slides in from the far side */
html.is-desktop #view.slide-in > * { animation: deskslide .5s cubic-bezier(.2, .8, .2, 1) both .12s; }
html.is-desktop.videos-right #view.slide-in > * { animation-name: deskslide-l; }
@keyframes deskslide { from { opacity: 0; transform: translateX(60px); } }
@keyframes deskslide-l { from { opacity: 0; transform: translateX(-60px); } }
html.is-desktop #view > .page { min-width: 380px; }
@media (prefers-reduced-motion: reduce) { html.is-desktop #app { transition: none; } html.is-desktop #view.slide-in > * { animation: none; } }

/* bigger icons in the full-height tab bar */
html.is-desktop .nav-btn { padding: 16px 0 13px; gap: 7px; font-size: 13px; }
html.is-desktop .nav-btn svg { width: 31px; height: 31px; }
html.is-desktop .nav-btn .nav-av { width: 38px; height: 38px; }
html.is-desktop .play-btn { width: 68px; height: 68px; }
html.is-desktop .play-btn svg { width: 28px; height: 28px; }
html.is-desktop .badge { top: 8px; left: calc(50% + 10px); min-width: 19px; height: 19px; line-height: 19px; font-size: 11px; }

/* menu: Left / Right video side */
.side-row { cursor: default; flex-wrap: wrap; }
.side-seg { flex: none; }
.side-seg button { display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; height: 34px; }
.side-seg button svg { width: 18px; height: 18px; }
/* with a page open, the empty spacer column still leaves a gap; tuck it into the window edge so both sides match */
html.is-desktop:not(.videos-right) body:not([data-page="feed"]) #app { padding-left: 2px; }
html.is-desktop.videos-right body:not([data-page="feed"]) #app { padding-right: 2px; }
html.is-desktop #app { transition: grid-template-columns .55s cubic-bezier(.45, 0, .2, 1), column-gap .55s cubic-bezier(.45, 0, .2, 1), padding .55s cubic-bezier(.45, 0, .2, 1); }

/* =====================================================================
   Classic look: the first EduWatch design (green, flat, one column).
   Everything still works; only the look goes back.
   ===================================================================== */
:root[data-ui="classic"], :root[data-ui="classic"] * {
  --green: #2fd27a; --green-ink: #062814; --accent-rgb: 47, 210, 122;
  --brand-a: #2fd27a; --brand-b: #2fd27a; --grad: #2fd27a;
}
:root[data-ui="classic"][data-theme="light"], :root[data-ui="classic"][data-theme="light"] * { --green: #14a35a; --green-ink: #ffffff; --accent-rgb: 20, 163, 90; --grad: #14a35a; }
:root[data-ui="classic"][data-theme="light"] body[data-page="feed"] #app, :root[data-ui="classic"][data-theme="light"] body[data-page="feed"] #app *,
:root[data-ui="classic"][data-theme="light"] .call-screen *, :root[data-ui="classic"][data-theme="light"] .ring-screen * { --green: #2fd27a; --green-ink: #062814; --grad: #2fd27a; }
:root[data-ui="classic"] body { background: #05060a; }
:root[data-ui="classic"][data-theme="light"] body { background: #e6e8ee; }
@media (min-width: 600px) { :root[data-ui="classic"] #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
/* wordmark: plain, like the first version */
:root[data-ui="classic"] .brand { filter: none; }
:root[data-ui="classic"] .brand-a, :root[data-ui="classic"] .brand-b { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #fff; }
/* tab bar: flat, a small green play button, no sliding bubble */
:root[data-ui="classic"] .nav > .nav-pill { display: none; }
:root[data-ui="classic"] .nav-btn { margin: 0; border-radius: 0; padding: 6px 0; }
:root[data-ui="classic"] .nav-btn.on { background: none; color: var(--text); }
:root[data-ui="classic"] .play-btn { width: 54px; height: 38px; border-radius: 12px; background: var(--green); color: var(--green-ink); box-shadow: none; }
:root[data-ui="classic"] body[data-mode="fun"] .play-btn { box-shadow: inset 0 0 0 2px rgba(6, 40, 20, .45); }
/* feed controls over the video */
:root[data-ui="classic"] .feed-top { background: linear-gradient(rgba(0,0,0,.55), transparent); }
:root[data-ui="classic"] .feed-tabs { gap: 18px; padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="classic"] .feed-tabs button { padding: 4px 0; border-radius: 0; background: none; box-shadow: none; font-size: 15.5px; color: rgba(255,255,255,.62); border-bottom: 2px solid transparent; }
:root[data-ui="classic"] .feed-tabs button.on { color: #fff; background: none; box-shadow: none; border-bottom: 2px solid #fff; }
:root[data-ui="classic"] .mute, :root[data-ui="classic"] .act .ic { background: rgba(20, 24, 33, .55); border: 0; box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
:root[data-ui="classic"] .feed-top .mute { width: 38px; height: 38px; }
/* buttons, inputs, tabs, sheets, toast */
:root[data-ui="classic"] .btn { border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="classic"] .btn.sm { border-radius: 8px; }
:root[data-ui="classic"] .btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); box-shadow: none; }
:root[data-ui="classic"] .btn.danger-fill { background: #e5313f; border-color: #e5313f; color: #fff; }
:root[data-ui="classic"] .icon-btn:not(.plain) { background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
:root[data-ui="classic"] .input { border-radius: 10px; background: var(--panel); box-shadow: none; }
:root[data-ui="classic"] .input:focus { box-shadow: none; }
:root[data-ui="classic"] .sheet-foot .input, :root[data-ui="classic"] .composer textarea { border-radius: 21px; }
:root[data-ui="classic"] .tabs { gap: 0; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="classic"] .tabs > button, :root[data-ui="classic"] .tabs > a { height: 42px; border-radius: 0; background: none; box-shadow: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 15px; }
:root[data-ui="classic"] .tabs > button.on, :root[data-ui="classic"] .tabs > a.on { color: var(--text); background: none; box-shadow: none; border-bottom-color: var(--text); }
:root[data-ui="classic"] .tabs > button.on .tab-n { background: var(--panel-2); color: var(--muted); }
:root[data-ui="classic"] .sheet { border-radius: 18px 18px 0 0; }
:root[data-ui="classic"] .toast { border-radius: 12px; background: var(--text); color: var(--ink); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="classic"] .banner { border-radius: 14px; }
/* chat, switches and other green accents */
:root[data-ui="classic"] .msg.mine .bubble { background: var(--green); color: var(--green-ink); box-shadow: none; }
:root[data-ui="classic"] .bubble { border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="classic"] .switch-input:checked + .switch-track { background: var(--green); }
:root[data-ui="classic"] .seg button.on { background: var(--green); color: var(--green-ink); }
:root[data-ui="classic"] .qz-tag { background: var(--green); color: var(--green-ink); }
:root[data-ui="classic"] .rw-bar i { background: var(--green); }
:root[data-ui="classic"] .call-btn.accept { background: var(--green); color: var(--green-ink); }
:root[data-ui="classic"] .menu-ic.sparkle { background: rgba(47, 210, 122, .18); color: var(--green); }
:root[data-ui="classic"] .reward.on { box-shadow: 0 0 0 1px var(--green) inset; }
.menu-note { font-size: 12.5px; margin: 4px 6px 0; }

/* =====================================================================
   Frutiger Aero: bright sky, grass, clouds and bubbles; glossy aqua and
   green buttons with a shiny top half; soft white glass panels.
   ===================================================================== */
:root[data-ui="aero"] {
  --ink: #eaf7ff;
  --panel: rgba(255, 255, 255, .62);
  --panel-2: rgba(255, 255, 255, .82);
  --line: rgba(120, 180, 215, .45);
  --text: #0d3550;
  --muted: #4d7690;
  --green: #0e93df; --green-ink: #ffffff; --accent-rgb: 14, 147, 223;
  --brand-a: #18a8f0; --brand-b: #4cb82d;
  --grad: linear-gradient(180deg, #8fdcff 0%, #36b2f2 48%, #0d8fdb 52%, #36bdf5 100%);
  --glass: rgba(255, 255, 255, .55); --glass-strong: rgba(255, 255, 255, .78); --glass-line: rgba(255, 255, 255, .9);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 -10px 18px -10px rgba(120, 190, 230, .35);
  --glass-shadow: 0 8px 26px rgba(20, 90, 140, .22);
  --glass-blur: blur(14px) saturate(160%);
  --body: "Segoe UI", "Frutiger", "Frutiger Linotype", "Myriad Pro", "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI", "Frutiger", "Myriad Pro", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* the sky: blue gradient, clouds, floating bubbles and a hint of green hills */
:root[data-ui="aero"] body, :root[data-ui="aero"] body[data-page] #app, :root[data-ui="aero"].is-desktop body {
  background:
    radial-gradient(circle at 12% 78%, rgba(255,255,255,.75) 0 2.2%, rgba(255,255,255,0) 2.5%),
    radial-gradient(circle at 88% 64%, rgba(255,255,255,.55) 0 1.6%, rgba(255,255,255,0) 1.9%),
    radial-gradient(circle at 74% 84%, rgba(255,255,255,.6) 0 3%, rgba(180,230,255,.25) 3.6%, rgba(255,255,255,0) 4%),
    radial-gradient(circle at 26% 58%, rgba(255,255,255,.5) 0 1.2%, rgba(255,255,255,0) 1.5%),
    radial-gradient(60% 18% at 22% 14%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%),
    radial-gradient(50% 15% at 80% 22%, rgba(255,255,255,.85), rgba(255,255,255,0) 70%),
    radial-gradient(120% 40% at 30% 112%, #7fd04f 0 45%, rgba(127,208,79,0) 46%),
    radial-gradient(120% 38% at 85% 115%, #5cbf3a 0 44%, rgba(92,191,58,0) 45%),
    linear-gradient(180deg, #3fb3f2 0%, #8fd6fb 45%, #dff4ff 78%, #f4fbff 100%);
  background-attachment: fixed;
}
:root[data-ui="aero"] #app { background: none; }
:root[data-ui="aero"].is-desktop #view { background: rgba(255,255,255,.5); }
/* wordmark: glossy aqua "Edu" + grass-green "Watch" */
:root[data-ui="aero"] .brand { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; filter: drop-shadow(0 1px 0 rgba(255,255,255,.9)) drop-shadow(0 2px 4px rgba(0,60,110,.35)); }
:root[data-ui="aero"] .brand-a { background: linear-gradient(180deg, #b6ecff, #18a8f0 55%, #0a7fc8); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-ui="aero"] .brand-b { background: linear-gradient(180deg, #d4f7a8, #4cb82d 55%, #2f8c18); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-ui="aero"] .page-head h1, :root[data-ui="aero"] .sp-name, :root[data-ui="aero"] .profile-top h2 { color: #0b3550; text-shadow: 0 1px 0 rgba(255,255,255,.9); }
/* glossy buttons: shiny top half, deeper bottom half */
:root[data-ui="aero"] .btn {
  border-radius: 999px; color: #0b3a55; border: 1px solid rgba(110, 170, 205, .7);
  background: linear-gradient(180deg, #ffffff 0%, #f1f9fe 48%, #dbeffa 52%, #f3fbff 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(20, 90, 140, .25); text-shadow: 0 1px 0 rgba(255,255,255,.8);
}
:root[data-ui="aero"] .btn:hover { background: linear-gradient(180deg, #ffffff 0%, #e6f6ff 48%, #c9e9fb 52%, #ebf8ff 100%); }
:root[data-ui="aero"] .btn.primary, :root[data-ui="aero"] .tabs > .on, :root[data-ui="aero"] .seg button.on, :root[data-ui="aero"] .qz-tag {
  background: var(--grad); color: #fff; border: 1px solid #0b78bf;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 2px 6px rgba(0, 90, 150, .35); text-shadow: 0 -1px 0 rgba(0, 60, 110, .35);
}
:root[data-ui="aero"] .btn.danger { color: #c4232f; }
:root[data-ui="aero"] .btn.danger-fill { background: linear-gradient(180deg, #ffb3b3 0%, #f2525e 48%, #d6303d 52%, #f0606b 100%); border-color: #b51f2b; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.25); }
:root[data-ui="aero"] .icon-btn:not(.plain) { background: linear-gradient(180deg, #fff, #e3f3fc); border: 1px solid rgba(110,170,205,.7); color: #0b3a55; }
:root[data-ui="aero"] .icon-btn.plain { color: #0b3a55; }
:root[data-ui="aero"] .input { background: rgba(255,255,255,.85); border: 1px solid rgba(110,170,205,.7); box-shadow: inset 0 2px 3px rgba(20,90,140,.12); color: var(--text); }
:root[data-ui="aero"] .input:focus { border-color: #18a8f0; box-shadow: inset 0 2px 3px rgba(20,90,140,.12), 0 0 0 3px rgba(24,168,240,.25); }
:root[data-ui="aero"] .tabs { background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.9); }
:root[data-ui="aero"] .tabs > button, :root[data-ui="aero"] .tabs > a { color: #2f5e7a; }
/* tab bar: a glossy glass bar with a green orb play button */
:root[data-ui="aero"] .nav {
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(225,244,255,.7) 48%, rgba(185,226,250,.7) 52%, rgba(220,242,255,.82) 100%);
  border: 1px solid rgba(255,255,255,.95); box-shadow: inset 0 1px 0 #fff, 0 8px 24px rgba(10, 80, 130, .28);
}
:root[data-ui="aero"] .nav-btn { color: #3b6a86; }
:root[data-ui="aero"] .nav-btn.on, :root[data-ui="aero"] .nav-btn.hover { color: #0a5f97; }
:root[data-ui="aero"] .nav > .nav-pill { background: radial-gradient(120% 70% at 50% 0%, rgba(255,255,255,.95), rgba(190,232,255,.65)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 2px 8px rgba(10,90,150,.25); }
:root[data-ui="aero"] .play-btn {
  border-radius: 999px; color: #fff; border: 1px solid #2c8a18;
  background: radial-gradient(70% 45% at 50% 18%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%), linear-gradient(180deg, #b6ef7c 0%, #5cc23b 50%, #3a9f22 51%, #63cc3f 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 10px rgba(40, 130, 20, .45); text-shadow: none;
}
:root[data-ui="aero"] .play-btn svg { filter: drop-shadow(0 1px 1px rgba(0,60,0,.4)); }
/* feed controls over the video: little glossy bubbles */
:root[data-ui="aero"] .mute, :root[data-ui="aero"] .act .ic {
  background: radial-gradient(80% 50% at 50% 12%, rgba(255,255,255,.75), rgba(255,255,255,0) 70%), rgba(60, 160, 220, .45);
  border: 1px solid rgba(255,255,255,.7); box-shadow: inset 0 -6px 10px -6px rgba(0,60,110,.4), 0 3px 10px rgba(0,0,0,.25);
}
:root[data-ui="aero"] .feed-tabs { background: rgba(60, 160, 220, .35); border-color: rgba(255,255,255,.6); }
:root[data-ui="aero"] .feed-tabs button.on { background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.25)); color: #fff; }
/* sheets, cards, toast, banners: white glossy glass */
:root[data-ui="aero"] .sheet { background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(232,246,255,.88)); border: 1px solid #fff; box-shadow: inset 0 1px 0 #fff, 0 16px 44px rgba(10,70,120,.35); color: var(--text); }
:root[data-ui="aero"] .sheet-backdrop { background: rgba(20, 90, 140, .25); }
:root[data-ui="aero"] .menu-row, :root[data-ui="aero"] .reward, :root[data-ui="aero"] .ap-card, :root[data-ui="aero"] .style-preview,
:root[data-ui="aero"] .lb-row, :root[data-ui="aero"] .lb-hero, :root[data-ui="aero"] .lb-winner {
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(240,249,255,.7) 50%, rgba(225,243,253,.7) 51%, rgba(245,251,255,.8) 100%);
  border: 1px solid rgba(255,255,255,.95); box-shadow: inset 0 1px 0 #fff, 0 3px 12px rgba(20, 90, 140, .16);
}
:root[data-ui="aero"] .menu-ic { background: linear-gradient(180deg, #e4f6ff, #bfe6fb); color: #0a6fae; }
:root[data-ui="aero"] .toast { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(225,244,255,.92)); color: #0b3a55; border: 1px solid #fff; }
:root[data-ui="aero"] .banner { background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(228,245,255,.9)); color: #0b3a55; }
/* chat bubbles */
:root[data-ui="aero"] .msg.mine .bubble { background: var(--grad); color: #fff; border: 1px solid #0b78bf; text-shadow: 0 -1px 0 rgba(0,60,110,.3); }
:root[data-ui="aero"] .bubble { background: linear-gradient(180deg, #ffffff, #eaf6fd); border: 1px solid rgba(160,205,230,.8); color: var(--text); }
:root[data-ui="aero"] .chat-head, :root[data-ui="aero"] .composer, :root[data-ui="aero"] .chat-bottom { background: rgba(255,255,255,.6); }
/* switches, chips and accents */
:root[data-ui="aero"] .switch-input:checked + .switch-track { background: linear-gradient(180deg, #a6e2ff, #1fa3ea 55%, #0d8bd6); }
:root[data-ui="aero"] .title-chip { background: linear-gradient(180deg, #ffffff, #dcf1fc); color: #0a6fae; border-color: rgba(110,170,205,.6); }
:root[data-ui="aero"] .rw-bar i { background: linear-gradient(180deg, #b6ef7c, #4cb82d); }
:root[data-ui="aero"] .tag { background: rgba(255,255,255,.7); }
:root[data-ui="aero"] .quiz-card { --glass: rgba(16, 60, 95, .72); }
:root[data-ui="aero"] .look-ic { background: linear-gradient(180deg, #d4f7a8, #7fd04f); color: #2f7d16; }
.look-row { cursor: default; flex-wrap: wrap; }
.look-seg { flex: none; }
.look-seg button { padding: 0 11px; height: 34px; font-size: 13.5px; }
.look-row .menu-txt, .side-row .menu-txt { min-width: 150px; }
.look-row .look-seg, .side-row .side-seg { margin-left: auto; }

/* ---------- Frutiger Aero, take 2: the full scene (sky, sun, clouds, glass globe, hills, bubbles) ---------- */
:root[data-ui="aero"] { --green: #1673e6; --accent-rgb: 22, 115, 230;
  --grad: linear-gradient(180deg, #9fdcff 0%, #3a9cf2 48%, #1673e6 52%, #3fa6f5 100%); }
:root[data-ui="aero"] body, :root[data-ui="aero"] body[data-page] #app, :root[data-ui="aero"].is-desktop body {
  background: #4fa9ef url("aero-bg.jpg") center / cover no-repeat fixed;
}
:root[data-ui="aero"].is-phone body, :root[data-ui="aero"].is-phone body[data-page] #app { background-attachment: scroll; }
:root[data-ui="aero"] #app { background: none !important; }
:root[data-ui="aero"] body[data-page] #app::before { content: none; }
/* pages sit on frosted white glass so text stays easy to read over the scene */
:root[data-ui="aero"] .page {
  background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(240,249,255,.42) 60%, rgba(255,255,255,.3));
  -webkit-backdrop-filter: blur(8px) saturate(140%); backdrop-filter: blur(8px) saturate(140%);
}
:root[data-ui="aero"].is-desktop #view { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.85);
  box-shadow: inset 0 1px 0 #fff, 0 14px 40px rgba(5, 50, 120, .35); }
:root[data-ui="aero"].is-desktop .page { background: linear-gradient(180deg, rgba(255,255,255,.66), rgba(240,249,255,.5)); }
/* the desktop video frame gets a glossy glass rim */
:root[data-ui="aero"].is-desktop #feedPane { box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 18px 50px rgba(5, 50, 120, .45); }
/* brighter, grassier play orb */
:root[data-ui="aero"] .play-btn { background: radial-gradient(70% 45% at 50% 18%, rgba(255,255,255,.95), rgba(255,255,255,0) 70%), linear-gradient(180deg, #a8ef6a 0%, #52c02a 50%, #2f9c14 51%, #5ccb32 100%); }
/* menu rows: let the Look/side buttons drop onto their own line on phones */
.look-row .menu-txt, .side-row .menu-txt { min-width: 150px; }
.look-row .look-seg, .side-row .side-seg { margin-left: auto; }
/* Aero background: the picture in aero-bg.jpg */
:root[data-ui="aero"] body, :root[data-ui="aero"] body[data-page] #app, :root[data-ui="aero"].is-desktop body {
  background: #4fa9ef url("aero-bg.jpg") center / cover no-repeat fixed;
}
:root[data-ui="aero"].is-phone body, :root[data-ui="aero"].is-phone body[data-page] #app { background-attachment: scroll; background-position: 62% center; }

/* =====================================================================
   Chats: voice messages, reactions and replies
   ===================================================================== */
.composer .mic-btn { width: 42px; height: 42px; flex: none; }
.msg { position: relative; }
/* voice message bubble */
.voice-msg { display: flex; align-items: center; gap: 10px; min-width: 210px; max-width: 280px; padding: 8px 12px 8px 8px; border-radius: 22px;
  background: var(--panel-2); border: 1px solid var(--glass-line); }
.voice-msg.mine { background: var(--grad); color: #fff; border-color: transparent; }
:root[data-ui="classic"] .voice-msg.mine { color: var(--green-ink); }
.vp-btn { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--green); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.voice-msg.mine .vp-btn { background: rgba(255,255,255,.95); color: var(--brand-a, #7c4dff); }
:root[data-ui="classic"] .voice-msg.mine .vp-btn { color: #0b8a4a; }
.vp-btn svg { width: 18px; height: 18px; fill: currentColor; stroke: none; margin-left: 2px; }
.vp-btn svg rect { fill: currentColor; }
.vp-bars { flex: 1; height: 28px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.vp-bars i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .35; transition: opacity .15s; }
.vp-bars i.on { opacity: 1; }
.voice-msg:not(.mine) .vp-bars i { background: var(--text); }
.voice-msg:not(.mine) .vp-bars i.on { background: var(--green); }
.vp-time { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; opacity: .9; }
/* recording bar */
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 10px max(12px, env(safe-area-inset-right, 0px)) 12px max(12px, env(safe-area-inset-left, 0px)); }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #ff3b4e; animation: recblink 1s ease-in-out infinite; flex: none; }
@keyframes recblink { 50% { opacity: .3; } }
.rec-time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 38px; }
.rec-bars { flex: 1; height: 30px; display: flex; align-items: center; gap: 3px; }
.rec-bars i { flex: 1; height: 100%; border-radius: 3px; background: var(--green); transform: scaleY(.15); transition: transform .08s linear; }
.rec-cancel { color: #ff5a6a; }
.rec-send { border-radius: 999px; }
.rec-send svg { width: 17px; height: 17px; }
/* reply quote inside a message, and the bar above the typing box */
.reply-quote { display: grid; gap: 1px; max-width: 260px; text-align: left; padding: 6px 10px; margin-bottom: 2px; border-radius: 14px; cursor: pointer;
  background: var(--panel); border: 0; border-left: 3px solid var(--green); color: var(--text); font: inherit; }
.reply-quote b { font-size: 12px; color: var(--green); }
.reply-quote span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px max(12px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px)); }
.reply-bar > svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.reply-bar > div { flex: 1; min-width: 0; display: grid; padding-left: 10px; border-left: 3px solid var(--green); }
.reply-bar b { font-size: 12.5px; color: var(--green); }
.reply-bar span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.flash .bubble, .msg.flash .voice-msg, .msg.flash .chat-img { animation: msgflash 1.2s ease; }
@keyframes msgflash { 20% { box-shadow: 0 0 0 3px var(--green); } }
/* reaction chips under a message */
.rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -6px; z-index: 1; }
.msg.mine .rx { justify-content: flex-end; }
.rx-chip { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 8px; border-radius: 999px; cursor: pointer; font-size: 14px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.rx-chip small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.rx-chip.mine { border-color: var(--green); background: rgba(var(--accent-rgb), .16); }
/* the little react button that appears on hover (computers) */
.msg-act { position: absolute; top: 50%; transform: translateY(-50%); right: -38px; width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--panel); color: var(--muted); opacity: 0; transition: opacity .15s; cursor: pointer; }
.msg.mine .msg-act { right: auto; left: -38px; }
.msg-act svg { width: 18px; height: 18px; }
@media (hover: hover) { .msg:hover .msg-act, .msg.menu-open .msg-act { opacity: 1; } }
@media (hover: none) { .msg-act { display: none; } }
/* reactions + reply menu */
.msg-menu { position: absolute; z-index: 20; bottom: calc(100% + 6px); left: 0; display: grid; gap: 6px; padding: 8px; border-radius: 20px;
  background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi), 0 12px 30px rgba(0,0,0,.35);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); animation: menupop .16s ease; }
.msg.mine .msg-menu { left: auto; right: 0; }
.msg-menu.below { bottom: auto; top: calc(100% + 6px); }
@keyframes menupop { from { opacity: 0; transform: scale(.92); } }
.mm-emojis { display: flex; gap: 2px; }
.mm-emojis button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; font-size: 24px; cursor: pointer; transition: transform .1s, background .15s; }
.mm-emojis button:hover { transform: scale(1.18); }
.mm-emojis button.on { background: rgba(var(--accent-rgb), .22); }
.mm-actions { display: flex; gap: 4px; border-top: 1px solid var(--line); padding-top: 6px; }
.mm-actions button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 12px; border: 0; background: none;
  color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.mm-actions button:hover { background: var(--panel-2); }
.mm-actions svg { width: 17px; height: 17px; }
:root[data-ui="classic"] .msg-menu { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- passwords ---------- */
.pw-screen { position: absolute; inset: 0; z-index: 190; display: grid; place-items: center; padding: 20px; background: rgba(5, 8, 14, .7); animation: fade .2s ease; }
.pw-card { width: 100%; max-width: 380px; display: grid; gap: 12px; padding: 24px 20px 18px; border-radius: 26px; text-align: left; }
.pw-card h2 { margin: 0; font: 800 22px/1.2 var(--display); }
.pw-card p { margin: 0; font-size: 14px; }
.pw-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.pw-ic svg { width: 28px; height: 28px; }
.ap-pw .pw-result { display: grid; gap: 8px; justify-items: start; padding: 12px; border-radius: 14px; background: var(--panel-2); }
.pw-code { font: 800 22px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; padding: 8px 12px; border-radius: 10px; background: var(--panel); user-select: all; }

/* ---------- install the app ---------- */
.menu-row[type="button"] { width: 100%; text-align: left; font: inherit; }
.menu-ic.install-ic { background: var(--grad); color: #fff; }
.inst { display: grid; gap: 14px; }
.inst-head { display: flex; align-items: center; gap: 12px; }
.inst-head img { border-radius: 16px; box-shadow: 0 6px 18px rgba(80, 70, 220, .35); }
.inst-head div { display: grid; gap: 2px; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inst-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--panel-2); font-size: 14.5px; line-height: 1.35; }
.inst-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; background: var(--green); color: var(--green-ink); }
.inst-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel); color: var(--green); }
.inst-ic svg { width: 20px; height: 20px; }
.inst-note { font-size: 13px; margin: 0; }
/* readability: solid backgrounds for the message menu and the password screen */
.msg-menu { background: var(--panel-2); }
:root[data-ui="aero"] .msg-menu { background: rgba(255,255,255,.96); }
.pw-screen { background: rgba(5, 8, 14, .86); animation: none; }
.pw-card { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
:root[data-ui="aero"] .pw-card { background: rgba(255,255,255,.97); }

/* ---------- screen sharing ---------- */
.call-btn.c-screen.sharing { background: var(--green); color: #fff; }
.call-tile.screen { background: #000; }
.call-tile.screen video { object-fit: contain; }
.call-grid:not([data-count="1"]) .call-tile.screen { grid-column: 1 / -1; }
.call-grid[data-count="2"]:has(.screen) { grid-template-rows: 2.4fr 1fr; }
.call-grid[data-count="3"]:has(.screen), .call-grid[data-count="4"]:has(.screen) { grid-template-rows: 2.4fr 1fr; grid-template-columns: repeat(3, 1fr); }
.call-grid[data-count="3"]:has(.screen) .call-tile:not(.screen), .call-grid[data-count="4"]:has(.screen) .call-tile:not(.screen) { grid-column: auto; }
.tile-screen-tag { display: none; position: absolute; z-index: 2; top: 10px; left: 50%; transform: translateX(-50%); align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); font-size: 12.5px; font-weight: 700; white-space: nowrap; color: #fff; }
.tile-screen-tag svg { width: 15px; height: 15px; }
.call-tile.screen .tile-screen-tag { display: inline-flex; }
.call-grid[data-count="1"] .call-tile.screen .tile-screen-tag { top: calc(78px + var(--safe-t)); }
.share-pill { position: absolute; z-index: 5; top: calc(70px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(30, 200, 120, .9); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.share-pill svg { width: 16px; height: 16px; }
.share-pill button { border: 0; border-radius: 999px; padding: 4px 12px; background: #fff; color: #0b6b3c; font: inherit; font-weight: 800; cursor: pointer; }
.call-screen.idle .share-pill { opacity: 1; }
.call-screen.mini .share-pill, .call-screen.mini .tile-screen-tag { display: none; }

/* =====================================================================
   Video calls on wide screens:
   2 people → side by side · 3 people → the other two side by side, you in the corner · 4 → 2×2 grid
   ===================================================================== */
.call-screen.wide .call-grid[data-layout] { padding: calc(78px + var(--safe-t)) 18px calc(108px + var(--safe-b)); gap: 14px; }
.call-screen.wide .call-grid[data-layout="w2"], .call-screen.wide .call-grid[data-layout="w3"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.call-screen.wide .call-grid[data-layout="w4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.call-screen.wide .call-grid[data-layout] .call-tile { grid-column: auto; border-radius: 24px; background: rgba(255,255,255,.05); box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.call-screen.wide .call-grid[data-layout] .tile-face .avatar { width: 120px; height: 120px; font-size: 48px; }
.call-screen.wide .call-grid[data-layout] .call-tile .tile-name { display: flex; left: 14px; bottom: 14px; transform: none; }
.call-screen.wide .call-grid[data-layout] .tile-note { margin-top: 80px; }
.self-tile video.mirror { transform: scaleX(-1); }
/* 3 people: you are the small window in the top-right corner of the right-hand tile */
.call-screen.wide .call-grid[data-layout="w3"] ~ .call-self {
  top: calc(78px + var(--safe-t) + 14px); right: 32px; left: auto; bottom: auto;
  width: clamp(150px, 15vw, 250px); aspect-ratio: 4 / 3; border-radius: 18px; box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 10px 30px rgba(0,0,0,.5);
}
/* a shared screen takes the whole top row; everyone else lines up underneath */
.call-screen.wide .call-grid[data-layout]:has(.screen) { grid-template-columns: repeat(4, 1fr); grid-template-rows: 3fr 1fr; }
.call-screen.wide .call-grid[data-layout] .call-tile.screen { grid-column: 1 / -1; }
.call-screen.wide .call-grid[data-layout]:has(.screen) .call-tile:not(.screen) .tile-face .avatar { width: 56px; height: 56px; font-size: 22px; }
.call-screen.wide .call-grid[data-layout]:has(.screen) .tile-note { display: none; }


/* ================= Halloween look (Profile → menu → Look) =================
   A moonlit purple night with bats; pumpkin orange takes over the accent.
   Always dark. Built on the default look, so every feature works the same. */
:root[data-ui="halloween"] {
  --ink: #120a1f;
  --panel: #1d1231;
  --panel-2: #281a42;
  --line: #3b2858;
  --text: #f7f1ff;
  --muted: #a996c8;
  --brand-a: #ff9a2e; --brand-b: #ff5e1a;
  --grad: linear-gradient(135deg, #ffb347, #ff6a1a);
  --green: #ff9a3c; --green-ink: #1c0a00; --accent-rgb: 255, 138, 31;
  --glass: rgba(40, 22, 66, .55); --glass-strong: rgba(30, 16, 52, .78); --glass-line: rgba(255, 190, 120, .16);
  --glass-hi: inset 0 1px 0 rgba(255, 210, 160, .2), inset 0 -1px 0 rgba(255, 255, 255, .03);
  --glass-shadow: 0 10px 34px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
:root[data-ui="halloween"] {
  --spooky-bg:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20480%20900%22%3E%3Cg%20fill%3D%22%2307030f%22%20opacity%3D%22.85%22%3E%3Cpath%20d%3D%22M0%200%20c10-13%2024-14%2033-5%20c3-8%207-12%209-12%20l3%206%20l3-6%20c2%200%206%204%209%2012%20c9-9%2023-8%2033%205%20c-11-3-18%201-21%208%20c-6-6-13-6-17%202%20c-2-4-5-6-7-6%20c-2%200-5%202-7%206%20c-4-8-11-8-17-2%20c-3-7-10-11-21-8%20z%22%20transform%3D%22translate%28300%20120%29%20rotate%28-8%29%20scale%280.9%29%22/%3E%3Cpath%20d%3D%22M0%200%20c10-13%2024-14%2033-5%20c3-8%207-12%209-12%20l3%206%20l3-6%20c2%200%206%204%209%2012%20c9-9%2023-8%2033%205%20c-11-3-18%201-21%208%20c-6-6-13-6-17%202%20c-2-4-5-6-7-6%20c-2%200-5%202-7%206%20c-4-8-11-8-17-2%20c-3-7-10-11-21-8%20z%22%20transform%3D%22translate%28390%20190%29%20rotate%2810%29%20scale%280.55%29%22/%3E%3Cpath%20d%3D%22M0%200%20c10-13%2024-14%2033-5%20c3-8%207-12%209-12%20l3%206%20l3-6%20c2%200%206%204%209%2012%20c9-9%2023-8%2033%205%20c-11-3-18%201-21%208%20c-6-6-13-6-17%202%20c-2-4-5-6-7-6%20c-2%200-5%202-7%206%20c-4-8-11-8-17-2%20c-3-7-10-11-21-8%20z%22%20transform%3D%22translate%2870%20330%29%20rotate%28-14%29%20scale%280.6%29%22/%3E%3Cpath%20d%3D%22M0%200%20c10-13%2024-14%2033-5%20c3-8%207-12%209-12%20l3%206%20l3-6%20c2%200%206%204%209%2012%20c9-9%2023-8%2033%205%20c-11-3-18%201-21%208%20c-6-6-13-6-17%202%20c-2-4-5-6-7-6%20c-2%200-5%202-7%206%20c-4-8-11-8-17-2%20c-3-7-10-11-21-8%20z%22%20transform%3D%22translate%28360%20560%29%20rotate%286%29%20scale%280.45%29%22/%3E%3Cpath%20d%3D%22M0%200%20c10-13%2024-14%2033-5%20c3-8%207-12%209-12%20l3%206%20l3-6%20c2%200%206%204%209%2012%20c9-9%2023-8%2033%205%20c-11-3-18%201-21%208%20c-6-6-13-6-17%202%20c-2-4-5-6-7-6%20c-2%200-5%202-7%206%20c-4-8-11-8-17-2%20c-3-7-10-11-21-8%20z%22%20transform%3D%22translate%28120%20720%29%20rotate%2812%29%20scale%280.5%29%22/%3E%3C/g%3E%3C/svg%3E") no-repeat right top / min(100%, 480px) auto,
    radial-gradient(circle at 96% 2%, rgba(255, 240, 190, .5) 0 46px, rgba(255, 236, 170, .16) 48px, rgba(255, 236, 170, 0) 150px),
    radial-gradient(70% 40% at 50% 108%, rgba(255, 120, 30, .22), transparent 70%),
    radial-gradient(70% 38% at 0% 0%, rgba(140, 60, 220, .3), transparent 70%),
    linear-gradient(180deg, #24104a 0%, #150a2a 55%, #0d0619 100%);
}
/* The moonlit night fills the whole screen, around the app too. */
:root[data-ui="halloween"] body { background: #0d0619; background-image: none; }
:root[data-ui="halloween"] body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: var(--spooky-bg); pointer-events: none; }
:root[data-ui="halloween"] body[data-page="page"] #app, :root[data-ui="halloween"] body[data-page="chat"] #app { background: var(--spooky-bg); background-attachment: local, local, local, local, local; }
/* computers: the page panel is see-through glass, so the night shows through it */
:root[data-ui="halloween"].is-desktop body[data-page] #app { background: none; }
:root[data-ui="halloween"].is-desktop #view { background: rgba(26, 14, 46, .55); -webkit-backdrop-filter: blur(10px) saturate(130%); backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid rgba(255, 190, 120, .14); }
:root[data-ui="halloween"] .brand-a { background: linear-gradient(135deg, #ffd08a, #ff9a2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-ui="halloween"] .brand-b { background: linear-gradient(135deg, #c99bff, #8f4dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-ui="halloween"] .play-btn { background: var(--grad); box-shadow: 0 6px 22px rgba(255, 120, 20, .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
:root[data-ui="halloween"] .play-btn svg { fill: #2a0f00; }
:root[data-ui="halloween"] .btn.primary { color: #1c0a00; }
:root[data-ui="halloween"] .nav-btn.on { color: #ffb45a; }
:root[data-ui="halloween"] .sheet { background: linear-gradient(180deg, #24143c, #170c29); border-color: rgba(255, 170, 90, .18); }
:root[data-ui="halloween"] .sheet-backdrop { background: rgba(8, 2, 18, .55); }
:root[data-ui="halloween"] .msg.mine .bubble { background: var(--grad); color: #1c0a00; }
:root[data-ui="halloween"] .switch-input:checked + .switch-track { background: var(--grad); }

/* ================= Opening animation =================
   A ring circles the logo, lights it up in the app's colours on the last spin,
   then the logo grows to fill the screen and fades into the app. Plays once per visit. */
#splash {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: #07080d; pointer-events: none;
  animation: sp-out .4s ease 2.3s forwards;
}
:root[data-ui="halloween"] #splash { background: #0d0619; }
:root[data-ui="aero"] #splash { background: #0d5f94; }
.sp-stage { position: relative; width: 190px; height: 190px; }
.sp-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: sp-spin 1.45s cubic-bezier(.4, .05, .3, 1) .12s both; }
.sp-ring circle {
  fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 26 74;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .5));
  animation: sp-ring-lit .35s ease 1.3s forwards, sp-ring-out .3s ease 1.72s forwards;
}
.sp-logo {
  position: absolute; inset: 42px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .32);
  animation: sp-in .5s cubic-bezier(.2, .9, .3, 1.25) both;
}
.sp-fill {
  position: absolute; inset: 0; border-radius: 50%; background: var(--grad); opacity: 0; scale: .55;
  animation: sp-light .45s cubic-bezier(.2, .9, .3, 1.2) 1.38s forwards, sp-grow .62s cubic-bezier(.75, 0, .35, 1) 1.82s forwards;
}
.sp-play {
  position: relative; width: 48px; height: 48px; margin-left: 6px; fill: transparent;
  stroke: rgba(255, 255, 255, .6); stroke-width: 1.4; stroke-linejoin: round;
  animation: sp-play-lit .3s ease 1.42s forwards, sp-play-out .28s ease 1.86s forwards;
}
@keyframes sp-in { from { opacity: 0; transform: scale(.6); } }
@keyframes sp-spin { from { opacity: 0; transform: rotate(-90deg) scale(.82); } 12% { opacity: 1; } to { opacity: 1; transform: rotate(990deg) scale(1); } }
@keyframes sp-ring-lit { to { stroke: var(--brand-a); stroke-dasharray: 100 0; filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), .9)); } }
@keyframes sp-ring-out { to { opacity: 0; } }
@keyframes sp-light { to { opacity: 1; scale: 1; box-shadow: 0 0 60px 10px rgba(var(--accent-rgb), .55); } }
@keyframes sp-grow { to { transform: scale(24); box-shadow: none; } }
@keyframes sp-play-lit { to { fill: #fff; stroke: #fff; } }
@keyframes sp-play-out { to { opacity: 0; transform: scale(1.5); } }
@keyframes sp-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  #splash { animation: sp-out .3s ease .5s forwards; }
  .sp-ring { display: none; }
  .sp-logo, .sp-fill, .sp-play { animation: none; }
  .sp-fill { opacity: 1; scale: 1; }
  .sp-play { fill: #fff; stroke: #fff; }
}


/* "Pssstt… press this 4 times…" bubble that floats up beside the middle play button */
.play-hint {
  position: fixed; z-index: 70; transform: translate(-50%, -100%);
  padding: 9px 14px; border-radius: 16px; white-space: nowrap; pointer-events: none;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow), 0 0 0 1px rgba(var(--accent-rgb), .25);
  color: var(--text); font: 700 14px/1.2 var(--body);
  animation: hint-float 2.6s ease forwards;
}
.play-hint::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px;
  background: inherit; border: inherit; border-top: 0; border-left: 0; transform: rotate(45deg);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.play-hint.side { transform: translate(0, -50%); }
.play-hint.side::after { left: -6px; top: 50%; bottom: auto; margin: -6px 0 0; border: inherit; border-top: 0; border-right: 0; }
@keyframes hint-float {
  0% { opacity: 0; translate: 0 14px; scale: .8; }
  12% { opacity: 1; translate: 0 0; scale: 1; }
  75% { opacity: 1; translate: 0 -16px; }
  100% { opacity: 0; translate: 0 -34px; }
}
@media (prefers-reduced-motion: reduce) { .play-hint { animation: hint-fade 2.6s ease forwards; } @keyframes hint-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } } }


/* ---------------- videos made in the app ---------------- */
.stage.clip { inset: 0; background: #000; }
.stage.clip .ph-bg { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(30px) brightness(.5); transform: scale(1.1); }
.stage.clip .clip-cover, .stage.clip .clip-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage.clip .clip-video { background: transparent; }
.slide.ready .stage.clip .clip-cover { opacity: 0; }
.post-preview.vid { aspect-ratio: 9 / 16; height: min(46vh, 440px); max-height: none; width: auto; max-width: 100%; margin: 0 auto; flex: none; }
.post-preview.vid .vid-preview { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.post-preview.vid .pick-hint .muted { font-weight: 500; font-size: 12.5px; }
.cam-live video.mirror { transform: scaleX(-1); }
.cam-live video:not(.mirror) { transform: none; }
.shutter.rec { background: #ff3b5c; border-color: rgba(255,255,255,.75); }
.shutter.rec.on { border-radius: 18px; animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { box-shadow: 0 0 0 8px rgba(255, 59, 92, .35); } }
.rec-time { white-space: nowrap; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font: 700 13px/1.2 var(--body); font-variant-numeric: tabular-nums; }
.cam-flip { position: absolute; right: 12px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }
.cam-flip svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vid-note { margin: 0; font-size: 13px; }
.up-progress { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.up-bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .25s ease; }

/* Three feed tabs (Following, For you, Posts) on phones: tighter top bar so everything fits.
   The trophy moves out of the bar on phones; the leaderboard is still in the menu. */
@media (max-width: 430px) {
  html:not(.is-desktop) .feed-top .top-actions a[href="#/leaderboard"] { display: none; }
  html:not(.is-desktop) .feed-top { column-gap: 6px; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  html:not(.is-desktop) .feed-top .brand { font-size: 15px; }
  html:not(.is-desktop) .feed-tabs button { padding: 6px 7px; font-size: 12.5px; }
  html:not(.is-desktop) .feed-top .mute { width: 31px; height: 31px; }
}
@media (max-width: 380px) {
  html:not(.is-desktop) .feed-top .brand { font-size: 14px; }
  html:not(.is-desktop) .feed-tabs button { padding: 5px 6px; font-size: 12px; }
}
@media (max-width: 345px) { html:not(.is-desktop) .feed-top .brand { display: none; } }

.err .link-btn.inline { display: inline; padding: 0; margin: 0; border: 0; background: none; color: var(--green); font-weight: 700; text-decoration: underline; cursor: pointer; }
.empty .row-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* feedback */
.fb-seg { margin-bottom: 12px; }
.ap-feedback { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ap-feedback li { padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); display: grid; gap: 6px; }
.ap-feedback li.done { opacity: .55; }
.ap-feedback p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-top small { color: var(--muted); margin-left: auto; }
.fb-kind { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: rgba(var(--accent-rgb), .18); color: var(--text); }
.fb-kind.k-bug { background: rgba(255, 107, 107, .2); }
.fb-actions { display: flex; gap: 8px; }

/* ---------------- quiz mode ---------------- */
.quiz-cta { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .22), rgba(var(--accent-rgb), .08)); border: 1px solid rgba(var(--accent-rgb), .35); }
.quiz-cta-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.quiz-cta-ic svg, .menu-ic svg { width: 20px; height: 20px; }
.quiz-cta-ic svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quiz-cta-txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.quiz-cta-txt small { color: var(--muted); font-size: 12.5px; }
.qzm-intro { margin: 0 0 14px; }
.qzm-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .qzm-grid { grid-template-columns: 1fr 1fr; } }
.qzm-card { padding: 14px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 12px; }
.qzm-head { display: flex; align-items: center; gap: 12px; }
.qzm-head h2 { margin: 0; font: 800 19px/1.1 var(--display); }
.qzm-head small { color: var(--muted); }
.qzm-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.qzm-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-geography .qzm-ic { background: linear-gradient(135deg, #2bb673, #1a8fd8); }
.c-science .qzm-ic { background: linear-gradient(135deg, #8f5bff, #d14bd8); }
.c-history .qzm-ic { background: linear-gradient(135deg, #f0a03c, #d4573b); }
.c-physics .qzm-ic { background: linear-gradient(135deg, #3f8cff, #26c6da); }
.qzm-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qzm-level { display: grid; gap: 4px; padding: 10px; border-radius: 14px; text-decoration: none; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.qzm-level:hover { border-color: rgba(var(--accent-rgb), .6); }
.qzm-level b { font-size: 15px; }
.qzm-level small { color: var(--muted); font-size: 11.5px; }
.qzm-level.lv-e b { color: #3ddc84; } .qzm-level.lv-m b { color: #ffb547; } .qzm-level.lv-h b { color: #ff6b81; }
:root[data-theme="light"] .qzm-level.lv-e b { color: #13915a; } :root[data-theme="light"] .qzm-level.lv-m b { color: #b86e00; } :root[data-theme="light"] .qzm-level.lv-h b { color: #d12f4c; }
.qzm-bar { height: 5px; border-radius: 99px; background: rgba(127,127,127,.25); overflow: hidden; }
.qzm-bar i { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.qzm-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qzm-track { flex: 1; height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.qzm-track i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: inherit; transition: width .3s ease; }
.qzm-n { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.qzm-note { margin: 0 0 12px; }
.qzm-q { font: 800 21px/1.25 var(--display); margin: 4px 0 16px; text-wrap: balance; }
.qzm-play .qz-opts { display: grid; gap: 10px; }
.qzm-why { margin-top: 14px; padding: 12px 14px; border-radius: 14px; line-height: 1.45; }
.qzm-why.ok { background: rgba(52, 211, 153, .14); border: 1px solid rgba(52, 211, 153, .45); }
.qzm-why.no { background: rgba(255, 107, 107, .12); border: 1px solid rgba(255, 107, 107, .4); }
.qzm-next { margin-top: 14px; width: 100%; }
.qzm-done { text-align: center; display: grid; gap: 10px; justify-items: center; padding-top: 12px; }
.qzm-done h2 { margin: 0; font: 800 22px/1.2 var(--display); }
.qzm-score { width: 120px; height: 120px; border-radius: 50%; display: grid; place-content: center; background: var(--grad); color: #fff; box-shadow: 0 12px 40px rgba(var(--accent-rgb), .45); }
.qzm-score b { font: 800 34px/1 var(--display); }
.qzm-score span { font-size: 13px; opacity: .9; }
.qzm-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }

.held-row { display: flex; gap: 12px; align-items: flex-start; }
.held-thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 10px; background: #000 center / cover no-repeat; flex: none; }
.held-info { display: grid; gap: 3px; min-width: 0; }
.held-info b { overflow-wrap: anywhere; }
.held-info small { color: var(--muted); }
.held-why { color: var(--text) !important; opacity: .85; }

/* ---------- admin stats ---------- */
.stats-page .st-h { font: 800 15px/1.2 var(--display); margin: 22px 0 10px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.stats-page .st-h:first-child { margin-top: 4px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line, rgba(255,255,255,.1)); color: inherit; text-decoration: none; min-width: 0; }
.st-tile.link:hover { border-color: var(--brand-a); }
.st-tile.warn .st-num { color: #f59e0b; }
.st-label { font-size: 13px; opacity: .7; }
.st-num { font: 800 28px/1.05 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.st-tile small { font-size: 12px; opacity: .65; }
.st-card { margin-top: 12px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line, rgba(255,255,255,.1)); }
.st-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.st-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; opacity: .8; }
.st-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.st-key i.act, .st-bar.act { background: var(--brand-a); }
.st-key i.new, .st-bar.new { background: #22c55e; }
.st-chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 150px; align-items: end; }
.st-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.st-col small { font-size: 11px; opacity: .6; }
.st-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line, rgba(255,255,255,.12)); }
.st-bar { display: block; width: 42%; max-width: 14px; min-height: 2px; border-radius: 4px 4px 0 0; }
.st-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-top-row { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.st-thumb { width: 40px; height: 56px; flex: none; border-radius: 8px; background: #222 center/cover no-repeat; }
.st-title { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-top-row b { font-variant-numeric: tabular-nums; }
.st-cats { display: flex; flex-direction: column; gap: 10px; }
.st-cat { display: grid; grid-template-columns: 90px 1fr 50px; align-items: center; gap: 10px; font-size: 14px; }
.st-cat b { text-align: right; font-variant-numeric: tabular-nums; }
.st-meter { height: 10px; border-radius: 99px; background: var(--line, rgba(255,255,255,.1)); overflow: hidden; }
.st-meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); }
.st-foot { font-size: 12px; margin: 16px 0 30px; }
:root[data-theme="light"] .st-tile, :root[data-theme="light"] .st-card { background: #fff; border-color: rgba(0,0,0,.08); }
.len-row .menu-txt { min-width: 150px; }
.len-row .len-seg { margin-left: auto; flex: none; }
.len-seg button { padding: 0 12px; height: 34px; font-size: 13.5px; }

/* ---------- quiz duels ---------- */
.duel-box { margin: 4px 0 18px; padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.duel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.duel-head h2 { margin: 0; font: 800 18px/1.2 var(--display); }
.duel-rec { font-size: 13px; opacity: .7; flex: 1; }
.duel-head .btn { margin-left: auto; }
.duel-list { display: flex; flex-direction: column; gap: 6px; }
.duel-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: inherit; text-decoration: none; background: var(--panel-2); }
.duel-row .duel-txt, .duel-card .duel-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.duel-txt small { opacity: .65; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel-st { font-size: 12.5px; font-weight: 700; white-space: nowrap; opacity: .8; }
.duel-row.turn .duel-st { color: var(--brand-a); opacity: 1; }
.duel-row.won .duel-st { color: #22c55e; opacity: 1; }
.duel-row.lost .duel-st { color: #f87171; opacity: 1; }
.duel-seg { flex-wrap: wrap; }
.duel-seg button { min-width: 70px; }
.duel-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; min-width: 220px; max-width: 280px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .22), rgba(var(--accent-rgb), .08)); border: 1px solid rgba(var(--accent-rgb), .4); color: var(--text); text-decoration: none; }
.duel-ic { font-size: 26px; line-height: 1; }
.duel-vs { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 2px 0 6px; }
.duel-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.duel-side b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.duel-x { font: 900 14px/1 var(--display); letter-spacing: .08em; opacity: .55; }
.duel-sub { text-align: center; margin: 0 0 12px; font-size: 13.5px; }
.duel-result { text-align: center; padding: 18px 8px; }
.duel-label { margin: 0 0 6px; opacity: .65; font-size: 14px; }
.duel-result h2 { margin: 0 0 18px; font: 800 28px/1.15 var(--display); }
.duel-result.won h2 { background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.duel-scores { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.duel-score { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); width: 140px; min-width: 0; }
.duel-score b { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-score.win { border-color: var(--brand-a); box-shadow: 0 0 0 1px var(--brand-a), 0 10px 30px rgba(var(--accent-rgb), .25); }
.duel-num { font: 800 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.duel-score small { opacity: .65; }
.duel-result .qzm-actions { justify-content: center; }

/* ---------- video studio (full-screen camera + editor) ---------- */
.cs { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; overscroll-behavior: contain; touch-action: none; }
.cs [hidden] { display: none !important; }
body.cs-open { overflow: hidden; }
body.cs-open .toast { position: fixed; z-index: 1000; top: calc(var(--safe-t, 0px) + 70px); bottom: auto; }
.cs-screen { position: absolute; inset: 0; overflow: hidden; }
.cs-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: #000; }
.cs-live { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-live.mirror { transform: scaleX(-1); }
.cs-camstage .cs-texts { position: absolute; inset: 0; }
.cs-editstage { bottom: calc(96px + var(--safe-b, 0px)); top: 0; }
.cs-box { position: relative; overflow: hidden; border-radius: 14px; }
.cs-edit-vid { width: 100%; height: 100%; display: block; object-fit: cover; }
.cs-box .cs-texts { position: absolute; inset: 0; }
.cs-sticker { position: absolute; transform: translate(-50%, -50%); max-width: 86%; text-align: center; font: 800 1em/1.2 var(--display); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.cs-sticker span { display: inline; padding: .12em .32em; border-radius: .3em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cs-sticker.s-plain span { text-shadow: 0 .04em .18em rgba(0,0,0,.6); padding: 0; }
.cs-sticker.s-outline span { padding: 0; paint-order: stroke fill; }
.cs-sticker:focus-visible { outline: 2px dashed #fff; outline-offset: 4px; }
.cs-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--safe-t, 0px) + 12px) 14px 0; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.cs-top > * { pointer-events: auto; }
.cs-sp { flex: 1; }
.cs-time { margin: 0 auto; padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.45); font: 700 14px/1 var(--display); font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); }
.cs-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; color: #fff; font: 600 11.5px/1 inherit; cursor: pointer; padding: 0; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.cs-btn svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.cs-btn > :first-child:not(span:last-child) { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.35); backdrop-filter: blur(10px); }
.cs-btn.on > :first-child { background: #fff; color: #000; }
.cs-btn.on svg { stroke: #000; }
.cs-btn:disabled { opacity: .4; }
.cs-x { width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.35); display: grid; place-items: center; backdrop-filter: blur(10px); }
.cs-x > :first-child { background: none !important; width: auto; height: auto; }
.cs-aa { font: 900 18px/1 var(--display); }
.cs-timer-ic svg, .cs-scissor svg { width: 24px; height: 24px; }
.cs-rail { position: absolute; right: 12px; top: calc(var(--safe-t, 0px) + 74px); display: flex; flex-direction: column; gap: 16px; transition: opacity .2s; }
.cs-rail.dim { opacity: .25; pointer-events: none; }
.cs-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 18px calc(var(--safe-b, 0px) + 22px); display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.45)); }
.cs-lens { display: flex; gap: 6px; padding: 4px; border-radius: 99px; background: rgba(0,0,0,.4); backdrop-filter: blur(10px); transition: opacity .2s; }
.cs-lens.locked { opacity: 0; pointer-events: none; }
.cs-lens button { border: 0; background: none; color: #fff; font: 700 13px/1 inherit; padding: 8px 14px; border-radius: 99px; cursor: pointer; opacity: .75; }
.cs-lens button.on { background: #fff; color: #000; opacity: 1; }
.cs-row { width: 100%; max-width: 420px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.cs-left { display: flex; gap: 18px; justify-content: flex-start; }
.cs-right { display: flex; justify-content: flex-end; }
.cs-shutter { position: relative; width: 84px; height: 84px; border: 0; border-radius: 50%; background: none; cursor: pointer; padding: 0; display: grid; place-items: center; }
.cs-ring, .cs-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cs-ring svg { transform: rotate(-90deg); }
.cs-ring circle { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 6; }
.cs-ring circle.p { stroke: var(--brand-a); stroke-linecap: round; transition: stroke-dasharray .1s linear; }
.cs-shutter i { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-a), var(--brand-b)); transition: all .2s ease; }
.cs-shutter.on i { width: 30px; height: 30px; border-radius: 8px; background: #ff4d4d; }
.cs-next { width: 52px; height: 52px; border: 0; border-radius: 50%; background: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.cs-next svg { width: 26px; height: 26px; stroke: #000; fill: none; stroke-width: 2.6; }
.cs-count { position: absolute; inset: 0; display: grid; place-items: center; font: 900 120px/1 var(--display); text-shadow: 0 4px 30px rgba(0,0,0,.5); pointer-events: none; animation: cs-pop 1s ease infinite; }
@keyframes cs-pop { 0% { transform: scale(1.3); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 100% { opacity: .8; } }
.cs-nocam { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; text-align: center; background: #0b0d12; }
.cs-nocam p { max-width: 300px; opacity: .85; }
.cs-trash { position: absolute; left: 50%; bottom: calc(var(--safe-b, 0px) + 120px); transform: translateX(-50%); width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.6); transition: transform .15s, background .15s; z-index: 3; pointer-events: none; }
.cs-trash svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2; }
.cs-trash.hot { transform: translateX(-50%) scale(1.25); background: #ff4d4d; border-color: #ff4d4d; }
.cs-editbar { flex-direction: row; justify-content: space-between; gap: 14px; background: #000; padding-top: 14px; }
.cs-hint { margin: 0; font-size: 12.5px; opacity: .6; flex: 1; }
.cs-go { min-width: 120px; }
/* text editor */
.cs-texted { position: absolute; inset: 0; z-index: 5; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); display: flex; flex-direction: column; animation: fade .15s ease; }
.cs-ed-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t, 0px) + 12px) 14px 0; }
.cs-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; border-radius: 99px; padding: 8px 14px; font: 700 14px/1 inherit; cursor: pointer; }
.cs-chip b { font: 900 16px/1 var(--display); }
.cs-ed-mid { flex: 1; display: grid; place-items: center; padding: 20px; }
.cs-input { width: min(86%, 460px); border: 0; outline: none; resize: none; overflow: hidden; text-align: center; font: 800 32px/1.2 var(--display); padding: .15em .4em; border-radius: .3em; background: transparent; caret-color: #fff; }
.cs-input.s-plain { text-shadow: 0 .04em .18em rgba(0,0,0,.6); }
.cs-input::placeholder { color: rgba(255,255,255,.5); }
.cs-ed-bottom { padding: 0 16px calc(var(--safe-b, 0px) + 18px); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.cs-size-row { display: flex; align-items: center; gap: 10px; width: min(100%, 360px); }
.cs-size-row small { font-weight: 800; font-size: 12px; } .cs-size-row b { font-size: 20px; }
.cs-size { flex: 1; accent-color: var(--brand-a); }
.cs-swatches { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cs-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); cursor: pointer; padding: 0; }
.cs-swatches button.on { outline: 3px solid #fff; outline-offset: 2px; transform: scale(1.1); }
/* panels (trim, post) */
.cs-panel { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; background: #151821; color: #fff; color-scheme: dark; border-radius: 22px 22px 0 0; padding: 16px 16px calc(var(--safe-b, 0px) + 18px);
  box-shadow: 0 -10px 40px rgba(0,0,0,.5); animation: cs-up .22s ease; max-height: 80%; overflow: auto; touch-action: auto; }
@keyframes cs-up { from { transform: translateY(30px); opacity: 0; } }
html.is-desktop .cs-panel { left: 50%; right: auto; width: 480px; transform: translateX(-50%); bottom: 16px; border-radius: 22px; animation: none; }
.cs-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cs-panel-head b { font: 800 18px/1.2 var(--display); }
.cs-panel-head small { opacity: .65; }
.cs-track { position: relative; height: 64px; margin: 6px 14px; }
.cs-strip { position: absolute; inset: 0; display: flex; border-radius: 10px; overflow: hidden; background: #222; }
.cs-strip i { flex: 1; background: center/cover no-repeat; }
.cs-sel { position: absolute; top: 0; bottom: 0; border: 3px solid var(--brand-a); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.55); pointer-events: none; }
.cs-clip { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; }
.cs-handle { position: absolute; top: -6px; bottom: -6px; width: 22px; margin-left: -11px; border: 0; border-radius: 8px; background: var(--brand-a); cursor: ew-resize; touch-action: none; }
.cs-handle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 3px; height: 22px; border-radius: 2px; background: #fff; transform: translate(-50%, -50%); }
.cs-trim-info { text-align: center; font-size: 13.5px; opacity: .8; margin: 12px 0 0; font-variant-numeric: tabular-nums; }
.cs-post .input { margin-bottom: 10px; }
.cs-post-form { display: flex; gap: 8px; margin-top: 6px; }
.cs-note { font-size: 12.5px; margin: 0 0 10px; }
.cs-panel .input { background: #0d0f15; color: #fff; border-color: #2a3040; }
.cs-panel label { color: rgba(255,255,255,.75); }

/* ---------- online status ring ---------- */
/* An outline follows the round shape and leaves a see-through gap, so it works on any background. */
.avatar.is-online { outline: 2.5px solid #2fd27a; outline-offset: 2px; }
.avatar.is-offline { outline: 2.5px solid #6b7280; outline-offset: 2px; }
.avatar.lg.is-online, .avatar.lg.is-offline { outline-width: 3.5px; outline-offset: 3px; }
.avatar.md.is-online, .avatar.md.is-offline { outline-width: 3px; outline-offset: 3px; }
.avatar.sm.is-online, .avatar.sm.is-offline { outline-width: 2px; outline-offset: 2px; }
.presence-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted, #9aa3b2); }
.presence-line i { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; }
.presence-line.on i { background: #2fd27a; }

/* ---------- ? button + "take a break" sunset ---------- */
.break-btn { position: fixed; z-index: 40; top: calc(var(--safe-t, 0px) + 12px); right: max(12px, env(safe-area-inset-right, 0px)); width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.22); background: rgba(20,24,33,.6); color: #fff; font: 800 17px/1 var(--display);
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .15s; }
.break-btn:hover { transform: scale(1.06); }
.break-btn:active { transform: scale(.94); }
/* phones: only on the feed (pages have their own buttons up there); the feed's top bar makes room for it */
html:not(.is-desktop) body:not([data-page="feed"]) .break-btn { display: none; }
html:not(.is-desktop) body[data-page="feed"] .feed-top { padding-right: calc(max(10px, env(safe-area-inset-right, 0px)) + 42px); }
html:not(.is-desktop) .break-btn { top: calc(var(--safe-t, 0px) + 10px); width: 31px; height: 31px; border-radius: 9px; font-size: 16px; right: max(10px, env(safe-area-inset-right, 0px)); }
body.cs-open .break-btn { display: none; }
.ss { position: fixed; inset: 0; z-index: 400; background: #0b0a24; color: #fff; animation: fade .3s ease; overflow: hidden; }
.ss.out { opacity: 0; transition: opacity .3s; }
.ss-stage, .ss-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ss-svg { fill: #000; stroke: none; stroke-width: 1; }   /* undo the app's icon style for this picture */
.ss-world { transform-box: view-box; transform-origin: 0 0; }
.ss-lid, .ss-head, .ss-body { transform-box: fill-box; transform-origin: 50% 100%; }
.ss-refl { transform-box: fill-box; transform-origin: 50% 50%; }
.ss-laptop, .ss-sun, .ss-glow, .ss-birds { transform-box: view-box; transform-origin: 0 0; }
.ss-nose, .ss-stars, .ss-dusk, .ss-duskLake { opacity: 0; }
.ss-x { position: absolute; top: calc(var(--safe-t, 0px) + 12px); right: max(12px, env(safe-area-inset-right, 0px)); width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.35); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(8px); }
.ss-x svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; }
.ss-msg { position: absolute; left: 0; right: 0; top: calc(var(--safe-t, 0px) + 13%); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 24px; opacity: 0; }
.ss-msg h2 { margin: 0; font: 800 34px/1.1 var(--display); letter-spacing: -.02em; text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.ss-msg p { margin: 0; font-size: 17px; opacity: .9; text-shadow: 0 2px 16px rgba(0,0,0,.5); max-width: 320px; }
.ss-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.ss-actions .btn:not(.primary) { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
/* computers: whatever sits in the top right corner makes room for the ? button */
html.is-desktop.videos-right body:not([data-page="feed"]) .feed-top { padding-right: 58px; }
html.is-desktop:not(.videos-right) body:not([data-page="feed"]) #view .page-head { padding-right: 46px; }
.sysnotify-btns { display: flex; gap: 8px; flex: none; }
.push-test-out { display: block; margin-top: 8px; padding: 9px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13px; line-height: 1.4; }
.push-test-out.good { background: rgba(47,210,122,.14); color: #7ee2ab; }
.push-test-out.bad { background: rgba(255,77,77,.12); color: #ff9a9a; }

/* =====================================================================
   Special style (admins only): NEON GLOW
   ===================================================================== */
:root[data-ui="neon"] {
  --neon-a: #9b6bff; --neon-b: #3fa0ff; --neon-c: #ff5fd2; --neon-d: #2fe6c8;
  --edge: linear-gradient(135deg, rgba(155,107,255,.75), rgba(63,160,255,.35) 40%, rgba(255,95,210,.55) 75%, rgba(47,230,200,.45));
  --glass-fill: rgba(18, 16, 34, .62);
}
/* 1 · a slowly moving aurora behind everything, plus a little film grain */
:root[data-ui="neon"] body { background: #07061a; }
:root[data-ui="neon"] body::before { content: ''; position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 32% at 20% 25%, rgba(155,107,255,.55), transparent 70%),
    radial-gradient(34% 30% at 80% 20%, rgba(63,160,255,.45), transparent 70%),
    radial-gradient(40% 34% at 70% 80%, rgba(255,95,210,.35), transparent 70%),
    radial-gradient(36% 30% at 15% 85%, rgba(47,230,200,.28), transparent 70%);
  filter: blur(30px) saturate(130%); animation: aurora 26s ease-in-out infinite alternate; }
:root[data-ui="neon"] body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(4%, -3%) rotate(8deg) scale(1.08); }
  100% { transform: translate(-4%, 3%) rotate(-6deg) scale(1.04); }
}
:root[data-ui="neon"] #app, :root[data-ui="neon"] body[data-page] #app { background: transparent; }
:root[data-ui="neon"] body[data-page] #app::before { content: none; }

/* 2 · frosted glass with a glowing gradient edge */
:root[data-ui="neon"] .sheet, :root[data-ui="neon"].is-desktop #view, :root[data-ui="neon"] .menu-row, :root[data-ui="neon"] .qzm-card,
:root[data-ui="neon"] .duel-box, :root[data-ui="neon"] .st-card, :root[data-ui="neon"] .st-tile, :root[data-ui="neon"] .quiz-card,
:root[data-ui="neon"] .ap-section, :root[data-ui="neon"] .duel-score, :root[data-ui="neon"] .duelist, :root[data-ui="neon"] .thread, :root[data-ui="neon"] .notif {
  background: linear-gradient(var(--glass-fill), var(--glass-fill)) padding-box, var(--edge) border-box;
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 40px rgba(10, 4, 40, .45), inset 0 1px 0 rgba(255,255,255,.06);
}
:root[data-ui="neon"] .nav { background: linear-gradient(rgba(16,14,32,.72), rgba(16,14,32,.72)) padding-box, var(--edge) border-box; border: 1px solid transparent;
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); box-shadow: 0 12px 40px rgba(10,4,40,.5); }
:root[data-ui="neon"].is-desktop #feedPane { box-shadow: 0 0 0 1px rgba(155,107,255,.35), 0 20px 60px rgba(63,90,255,.25), 0 0 80px rgba(155,107,255,.12); }

/* 3 · headings with a neon gradient */
:root[data-ui="neon"] .page-head h1, :root[data-ui="neon"] .profile-top h2 {
  background: linear-gradient(100deg, #fff 10%, #d8c8ff 45%, #9fd0ff 75%, #ffc4ef); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-ui="neon"] .brand-a, :root[data-ui="neon"] .brand { text-shadow: 0 0 18px rgba(155,107,255,.45); }

/* 4 · buttons: gradient, glow and a shine that sweeps across on hover */
:root[data-ui="neon"] .btn.primary { position: relative; overflow: hidden; border: 0; color: #fff;
  background: linear-gradient(110deg, var(--neon-a), var(--neon-b) 55%, var(--neon-c));
  background-size: 160% 100%; box-shadow: 0 6px 22px rgba(120, 90, 255, .45), inset 0 1px 0 rgba(255,255,255,.35); transition: background-position .5s, box-shadow .3s, transform .2s cubic-bezier(.34,1.56,.64,1); }
:root[data-ui="neon"] .btn.primary::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); transition: left .6s ease; }
:root[data-ui="neon"] .btn.primary:hover { background-position: 100% 0; box-shadow: 0 8px 30px rgba(140, 100, 255, .65), inset 0 1px 0 rgba(255,255,255,.4); }
:root[data-ui="neon"] .btn.primary:hover::after { left: 120%; }
:root[data-ui="neon"] .btn:not(.primary):not(.danger) { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
:root[data-ui="neon"] .btn:not(.primary):hover { border-color: rgba(155,107,255,.6); box-shadow: 0 0 18px rgba(155,107,255,.25); }
:root[data-ui="neon"] .seg button.on, :root[data-ui="neon"] .tabs > .on { background: linear-gradient(110deg, var(--neon-a), var(--neon-b)); color: #fff; box-shadow: 0 4px 16px rgba(120,90,255,.4); }

/* 5 · the play button pulses with a neon ring */
:root[data-ui="neon"] .play-btn { background: linear-gradient(135deg, var(--neon-a), var(--neon-b) 60%, var(--neon-c)); box-shadow: 0 6px 24px rgba(130,90,255,.55), inset 0 1px 0 rgba(255,255,255,.4); position: relative; }
:root[data-ui="neon"] .play-btn::before { content: ''; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid rgba(155,107,255,.7); animation: playring 2.4s ease-out infinite; pointer-events: none; }
@keyframes playring { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
:root[data-ui="neon"] .nav-btn.on { color: #fff; }
:root[data-ui="neon"] .nav-btn.on svg { filter: drop-shadow(0 0 8px rgba(155,107,255,.8)); }

/* 6 · chips and tiles light up */
:root[data-ui="neon"] .chip { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); transition: transform .2s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s, background .2s; }
:root[data-ui="neon"] .chip:hover { transform: translateY(-2px); border-color: rgba(155,107,255,.7); box-shadow: 0 6px 18px rgba(155,107,255,.3); background: rgba(155,107,255,.12); }
:root[data-ui="neon"] .tile { transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s; }
:root[data-ui="neon"] .tile:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 30px rgba(120,90,255,.35), 0 0 0 1px rgba(155,107,255,.5); z-index: 1; }
:root[data-ui="neon"] .menu-row { transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; }
:root[data-ui="neon"] .menu-row:hover { transform: translateX(3px); box-shadow: 0 8px 26px rgba(120,90,255,.3); }

/* 7 · feed buttons: glass circles with a glow */
:root[data-ui="neon"] .act .ic { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; }
:root[data-ui="neon"] .act:hover .ic { box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 0 20px rgba(155,107,255,.55); transform: scale(1.08); }

/* 8 · toasts: glass with a neon edge, popping in */
:root[data-ui="neon"] .toast { background: linear-gradient(rgba(20,16,40,.88), rgba(20,16,40,.88)) padding-box, var(--edge) border-box; border: 1px solid transparent; color: #fff;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(10,4,40,.5), 0 0 24px rgba(155,107,255,.25); }

/* 9 · thin neon scrollbars */
:root[data-ui="neon"] * { scrollbar-width: thin; scrollbar-color: rgba(155,107,255,.55) transparent; }

/* ---------- motion for every look ---------- */
/* buttons squish when pressed and spring back */
.btn, .icon-btn, .mute, .chip, .menu-row, .nav-btn, .act .ic, .play-btn, .qz-opt { transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .2s, border-color .2s; }
.btn:active, .icon-btn:active, .mute:active, .chip:active, .menu-row:active, .qz-opt:active { transform: scale(.94); }
.nav-btn:active svg, .act:active .ic { transform: scale(.88); }
/* pages arrive piece by piece */
.page > * { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.page > *:nth-child(2) { animation-delay: .04s; } .page > *:nth-child(3) { animation-delay: .08s; } .page > *:nth-child(4) { animation-delay: .12s; }
.page > *:nth-child(5) { animation-delay: .16s; } .page > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; translate: 0 14px; } }
/* sheets slide up with a little bounce */
.sheet-layer:not([hidden]) .sheet { animation: sheetup .42s cubic-bezier(.34,1.3,.64,1) both; }
@keyframes sheetup { from { translate: 0 40px; opacity: 0; } }
html.is-desktop .sheet-layer:not([hidden]) .sheet { animation-name: sheetpop; }
@keyframes sheetpop { from { translate: 0 14px; opacity: 0; } }
/* the toast pops */
.toast.show { animation: toastpop .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes toastpop { from { scale: .9; } }
/* liking: a burst of little hearts */
.heart-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.heart-burst i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; background: var(--heart, #ff4d7d);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 5 6.5 5c2 0 3.6 1.1 4.5 2.6C11.9 6.1 13.5 5 15.5 5 19 5 21.1 8.4 19.6 11.8 17.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 5 6.5 5c2 0 3.6 1.1 4.5 2.6C11.9 6.1 13.5 5 15.5 5 19 5 21.1 8.4 19.6 11.8 17.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center/contain no-repeat;
  animation: heartfly .8s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes heartfly { 0% { transform: translate(0,0) scale(.3); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--r)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  :root[data-ui="neon"] body::before, :root[data-ui="neon"] .play-btn::before { animation: none; }
  .page > *, .sheet-layer:not([hidden]) .sheet, .toast.show { animation: none; }
}
/* cooler, round 2: the inside bits */
:root[data-ui="neon"] .qzm-level { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, border-color .2s; }
:root[data-ui="neon"] .qzm-level:hover { transform: translateY(-3px); border-color: rgba(155,107,255,.6); box-shadow: 0 10px 26px rgba(120,90,255,.3); }
:root[data-ui="neon"] .qzm-bar i { background: linear-gradient(90deg, var(--neon-d), var(--neon-b), var(--neon-a)); box-shadow: 0 0 10px rgba(63,160,255,.6); }
:root[data-ui="neon"] .qz-opt { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); transition: transform .2s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s, background .2s; }
:root[data-ui="neon"] .qz-opt:hover:not([disabled]) { border-color: rgba(155,107,255,.7); background: rgba(155,107,255,.12); box-shadow: 0 0 20px rgba(155,107,255,.25); transform: translateX(3px); }
:root[data-ui="neon"] .qz-opt.right { box-shadow: 0 0 24px rgba(47,210,122,.45); }
:root[data-ui="neon"] .qz-opt.wrong { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
:root[data-ui="neon"] .feed-tabs { background: rgba(10,8,24,.45); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
:root[data-ui="neon"] .feed-tabs button.on { background: linear-gradient(110deg, rgba(155,107,255,.9), rgba(63,160,255,.85)); color: #fff; box-shadow: 0 0 16px rgba(120,90,255,.5); }
:root[data-ui="neon"] .input { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); transition: border-color .2s, box-shadow .2s; }
:root[data-ui="neon"] .input:focus { border-color: rgba(155,107,255,.8); box-shadow: 0 0 0 3px rgba(155,107,255,.22), 0 0 20px rgba(155,107,255,.2); outline: none; }
:root[data-ui="neon"] .profile-top .avatar.lg { box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 0 40px rgba(155,107,255,.45); }
:root[data-ui="neon"] .stats b { background: linear-gradient(100deg, #fff, #c9b6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-ui="neon"] .mute, :root[data-ui="neon"] .icon-btn:not(.plain) { background: rgba(10,8,24,.45); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
:root[data-ui="neon"] .break-btn { background: linear-gradient(rgba(16,14,32,.7), rgba(16,14,32,.7)) padding-box, var(--edge) border-box; border: 1px solid transparent; box-shadow: 0 0 16px rgba(155,107,255,.35); }
/* light mode keeps the cool style, just bright: pastel aurora and white glass */
:root[data-ui="neon"][data-theme="light"] { --glass-fill: rgba(255,255,255,.72);
  --edge: linear-gradient(135deg, rgba(155,107,255,.6), rgba(63,160,255,.3) 40%, rgba(255,95,210,.45) 75%, rgba(47,230,200,.4)); }
:root[data-ui="neon"][data-theme="light"] body { background: #eef0fb; }
:root[data-ui="neon"][data-theme="light"] body::before { opacity: .55; }
:root[data-ui="neon"][data-theme="light"] .nav { background: linear-gradient(rgba(255,255,255,.78), rgba(255,255,255,.78)) padding-box, var(--edge) border-box; }
:root[data-ui="neon"][data-theme="light"] .page-head h1, :root[data-ui="neon"][data-theme="light"] .profile-top h2 { background: linear-gradient(100deg, #1b1340, #5b3bd6 60%, #2a74f2); -webkit-background-clip: text; background-clip: text; }
:root[data-ui="neon"][data-theme="light"] .stats b { background: linear-gradient(100deg, #1b1340, #5b3bd6); -webkit-background-clip: text; background-clip: text; }
:root[data-ui="neon"][data-theme="light"] .btn:not(.primary):not(.danger), :root[data-ui="neon"][data-theme="light"] .chip, :root[data-ui="neon"][data-theme="light"] .qzm-level,
:root[data-ui="neon"][data-theme="light"] .qz-opt, :root[data-ui="neon"][data-theme="light"] .input { background: rgba(255,255,255,.6); border-color: rgba(60,40,140,.14); }
:root[data-ui="neon"][data-theme="light"] .toast { background: linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)) padding-box, var(--edge) border-box; color: #1b1340; }
:root[data-ui="neon"][data-theme="light"] .menu-row, :root[data-ui="neon"][data-theme="light"] .sheet { color: var(--text); }
:root[data-ui="neon"][data-theme="light"] .icon-btn:not(.plain) { background: rgba(255,255,255,.7); border-color: rgba(60,40,140,.14); color: #1b1340; }

/* =====================================================================
   Special style (admins only): PREMIUM GLASS — calm, frosted, polished
   ===================================================================== */
:root[data-ui="glass"] { --pg-fill: rgba(255,255,255,.065); --pg-line: rgba(255,255,255,.13); --pg-accent: #8ab4ff; --green: #f5f7fb; --green-ink: #0b0d12; --accent-rgb: 138, 180, 255; }
:root[data-ui="glass"] body { background: #0a0d14; }
:root[data-ui="glass"] body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% -10%, rgba(255,255,255,.14), transparent 70%),
    radial-gradient(45% 40% at 90% 30%, rgba(110,150,255,.16), transparent 70%),
    radial-gradient(45% 40% at 5% 80%, rgba(160,120,255,.12), transparent 70%),
    linear-gradient(180deg, #0f131d, #090b11); }
:root[data-ui="glass"] #app, :root[data-ui="glass"] body[data-page] #app { background: transparent; }
:root[data-ui="glass"] body[data-page] #app::before { content: none; }
:root[data-ui="glass"] .sheet, :root[data-ui="glass"].is-desktop #view, :root[data-ui="glass"] .menu-row, :root[data-ui="glass"] .qzm-card, :root[data-ui="glass"] .duel-box,
:root[data-ui="glass"] .st-card, :root[data-ui="glass"] .st-tile, :root[data-ui="glass"] .quiz-card, :root[data-ui="glass"] .ap-section, :root[data-ui="glass"] .duel-score,
:root[data-ui="glass"] .duelist, :root[data-ui="glass"] .thread, :root[data-ui="glass"] .notif, :root[data-ui="glass"] .nav {
  background: var(--pg-fill); border: 1px solid var(--pg-line);
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 20px 50px rgba(0,0,0,.35); }
:root[data-ui="glass"] .sheet { background: rgba(22,26,36,.82); }
:root[data-ui="glass"] .page-head h1 { font-weight: 700; letter-spacing: -.03em; }
:root[data-ui="glass"] .btn.primary { background: #f5f7fb; color: #0b0d12; border: 0; box-shadow: 0 6px 20px rgba(0,0,0,.35), inset 0 -1px 0 rgba(0,0,0,.08); }
:root[data-ui="glass"] .btn.primary:hover { background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 0 4px rgba(255,255,255,.08); }
:root[data-ui="glass"] .btn:not(.primary):not(.danger), :root[data-ui="glass"] .chip, :root[data-ui="glass"] .qzm-level, :root[data-ui="glass"] .qz-opt, :root[data-ui="glass"] .input,
:root[data-ui="glass"] .mute, :root[data-ui="glass"] .icon-btn:not(.plain), :root[data-ui="glass"] .feed-tabs, :root[data-ui="glass"] .break-btn {
  background: rgba(255,255,255,.07); border: 1px solid var(--pg-line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
:root[data-ui="glass"] .chip:hover, :root[data-ui="glass"] .qzm-level:hover, :root[data-ui="glass"] .qz-opt:hover:not([disabled]), :root[data-ui="glass"] .menu-row:hover {
  background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.24); }
:root[data-ui="glass"] .input:focus { border-color: rgba(138,180,255,.7); box-shadow: 0 0 0 4px rgba(138,180,255,.15); outline: none; }
:root[data-ui="glass"] .seg button.on, :root[data-ui="glass"] .tabs > .on, :root[data-ui="glass"] .feed-tabs button.on { background: rgba(255,255,255,.92); color: #0b0d12; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
:root[data-ui="glass"] .play-btn { background: linear-gradient(180deg, #ffffff, #dfe5f0); box-shadow: 0 8px 24px rgba(0,0,0,.4), inset 0 1px 0 #fff; }
:root[data-ui="glass"] .play-btn svg { fill: #0b0d12; }
:root[data-ui="glass"] .nav-btn.on { color: #fff; }
:root[data-ui="glass"] .qzm-bar i { background: linear-gradient(90deg, #cfdcff, #8ab4ff); }
:root[data-ui="glass"] .toast { background: rgba(24,28,38,.85); color: #fff; border: 1px solid var(--pg-line); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
:root[data-ui="glass"].is-desktop #feedPane { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 30px 70px rgba(0,0,0,.5); }

/* =====================================================================
   Special style (admins only): PLAYFUL & BOLD — bright, chunky, bouncy
   ===================================================================== */
:root[data-ui="playful"] { --pl-ink: #2b2250; --pl-line: #e7e1f5; --green: #58cc02; --green-ink: #fff; --accent-rgb: 88, 204, 2;
  --text: #2b2250; --muted: #7a7299; --panel: #ffffff; --panel-2: #f6f2ff; --line: #e7e1f5; }
:root[data-ui="playful"] body { background: #fff8ec; }
:root[data-ui="playful"] body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(22% 18% at 12% 18%, rgba(255,200,60,.35), transparent 70%),
    radial-gradient(24% 20% at 88% 14%, rgba(255,110,170,.28), transparent 70%),
    radial-gradient(26% 22% at 82% 82%, rgba(80,200,255,.28), transparent 70%),
    radial-gradient(24% 20% at 10% 86%, rgba(120,230,140,.3), transparent 70%), #fff8ec; }
:root[data-ui="playful"] #app, :root[data-ui="playful"] body[data-page] #app { background: transparent; }
:root[data-ui="playful"] body[data-page] #app::before { content: none; }
:root[data-ui="playful"] .page, :root[data-ui="playful"] .sheet { color: var(--pl-ink); }
:root[data-ui="playful"] .sheet, :root[data-ui="playful"].is-desktop #view, :root[data-ui="playful"] .menu-row, :root[data-ui="playful"] .qzm-card, :root[data-ui="playful"] .duel-box,
:root[data-ui="playful"] .st-card, :root[data-ui="playful"] .st-tile, :root[data-ui="playful"] .quiz-card, :root[data-ui="playful"] .ap-section, :root[data-ui="playful"] .duel-score,
:root[data-ui="playful"] .duelist, :root[data-ui="playful"] .thread, :root[data-ui="playful"] .notif {
  background: #fff; border: 2px solid var(--pl-line); border-radius: 22px; box-shadow: 0 5px 0 var(--pl-line); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="playful"] .nav { background: #fff; border: 2px solid var(--pl-line); box-shadow: 0 5px 0 var(--pl-line), 0 14px 30px rgba(60,40,120,.12); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="playful"] .nav-btn { color: #9a93b8; }
:root[data-ui="playful"] .nav-btn.on { color: #1cb0f6; }
:root[data-ui="playful"] .page-head h1, :root[data-ui="playful"] .profile-top h2 { font-weight: 900; color: var(--pl-ink); letter-spacing: -.02em; }
:root[data-ui="playful"] .btn { border-radius: 16px; font-weight: 800; border: 2px solid var(--pl-line); background: #fff; color: var(--pl-ink); box-shadow: 0 4px 0 var(--pl-line); }
:root[data-ui="playful"] .btn:active, :root[data-ui="playful"] .qz-opt:active, :root[data-ui="playful"] .chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pl-line); }
:root[data-ui="playful"] .btn.primary { background: #58cc02; border-color: #58cc02; color: #fff; box-shadow: 0 4px 0 #46a302; text-transform: uppercase; letter-spacing: .03em; }
:root[data-ui="playful"] .btn.primary:active { box-shadow: 0 1px 0 #46a302; }
:root[data-ui="playful"] .btn.danger { color: #ff4b4b; }
:root[data-ui="playful"] .chip { background: #fff; border: 2px solid var(--pl-line); color: var(--pl-ink); font-weight: 800; box-shadow: 0 3px 0 var(--pl-line); }
:root[data-ui="playful"] .chips .chip:nth-child(5n+1) { background: #fff4cc; border-color: #ffd84d; box-shadow: 0 3px 0 #ffd84d; }
:root[data-ui="playful"] .chips .chip:nth-child(5n+2) { background: #ffe1ee; border-color: #ff8fbf; box-shadow: 0 3px 0 #ff8fbf; }
:root[data-ui="playful"] .chips .chip:nth-child(5n+3) { background: #ddf5ff; border-color: #6fd0ff; box-shadow: 0 3px 0 #6fd0ff; }
:root[data-ui="playful"] .chips .chip:nth-child(5n+4) { background: #e3fbd5; border-color: #8ee05a; box-shadow: 0 3px 0 #8ee05a; }
:root[data-ui="playful"] .chips .chip:nth-child(5n+5) { background: #efe6ff; border-color: #b69bff; box-shadow: 0 3px 0 #b69bff; }
:root[data-ui="playful"] .chip:hover { animation: wiggle .4s ease; }
@keyframes wiggle { 25% { rotate: -3deg; } 75% { rotate: 3deg; } }
:root[data-ui="playful"] .qzm-level, :root[data-ui="playful"] .qz-opt { background: #fff; border: 2px solid var(--pl-line); box-shadow: 0 4px 0 var(--pl-line); color: var(--pl-ink); }
:root[data-ui="playful"] .qzm-level:hover, :root[data-ui="playful"] .qz-opt:hover:not([disabled]) { border-color: #1cb0f6; box-shadow: 0 4px 0 #1899d6; translate: 0 -2px; }
:root[data-ui="playful"] .qz-opt.right { background: #d7ffb8; border-color: #58cc02; box-shadow: 0 4px 0 #58a700; }
:root[data-ui="playful"] .qz-opt.wrong { background: #ffdfe0; border-color: #ff4b4b; box-shadow: 0 4px 0 #ea2b2b; animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
:root[data-ui="playful"] .qzm-bar i { background: #58cc02; }
:root[data-ui="playful"] .input { background: #fff; border: 2px solid var(--pl-line); border-radius: 16px; color: var(--pl-ink); }
:root[data-ui="playful"] .input:focus { border-color: #1cb0f6; box-shadow: none; outline: none; }
:root[data-ui="playful"] .seg, :root[data-ui="playful"] .tabs { background: #f1ecff; }
:root[data-ui="playful"] .seg button.on, :root[data-ui="playful"] .tabs > .on { background: #1cb0f6; color: #fff; box-shadow: 0 3px 0 #1899d6; }
:root[data-ui="playful"] .play-btn { background: #ff9600; box-shadow: 0 5px 0 #e07c00, 0 10px 20px rgba(255,150,0,.35); }
:root[data-ui="playful"] .play-btn:active { translate: 0 3px; box-shadow: 0 2px 0 #e07c00; }
:root[data-ui="playful"] .play-btn svg { fill: #fff; }
:root[data-ui="playful"] .icon-btn:not(.plain) { background: #fff; border: 2px solid var(--pl-line); color: var(--pl-ink); box-shadow: 0 3px 0 var(--pl-line); }
:root[data-ui="playful"] .icon-btn.plain { color: var(--pl-ink); }
:root[data-ui="playful"] .toast { background: #2b2250; color: #fff; border-radius: 16px; box-shadow: 0 5px 0 #1a1438; }
:root[data-ui="playful"] .break-btn { background: #fff; color: var(--pl-ink); border: 2px solid var(--pl-line); box-shadow: 0 3px 0 var(--pl-line); }
:root[data-ui="playful"] .muted, :root[data-ui="playful"] .menu-sub { color: var(--muted); }
:root[data-ui="playful"].is-desktop #feedPane { box-shadow: 0 0 0 3px #fff, 0 8px 0 3px var(--pl-line), 0 24px 40px rgba(60,40,120,.18); }
/* the Special styles picker */
.special-ic { background: linear-gradient(135deg, #9b6bff, #3fa0ff 55%, #ff5fd2) !important; color: #fff; }
.ss-grid { display: grid; gap: 10px; }
.ss-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 18px; border: 2px solid var(--line); background: var(--panel-2); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.ss-card.on { border-color: var(--brand-a); }
.ss-card:hover { border-color: var(--muted); }
.ss-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ss-txt b { font-size: 16px; } .ss-txt small { color: var(--muted); font-size: 13px; }
.ss-on { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--brand-a); color: #fff; }
.ss-prev { position: relative; width: 74px; height: 92px; flex: none; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 8px; box-sizing: border-box; }
.ss-prev i { display: block; border-radius: 6px; }
.ss-prev .pv-bar { height: 8px; width: 60%; } .ss-prev .pv-card { height: 22px; } .ss-prev .pv-card.short { height: 14px; width: 80%; } .ss-prev .pv-btn { height: 12px; width: 70%; border-radius: 99px; margin-top: auto; }
.pv-neon { background: radial-gradient(60% 50% at 20% 20%, rgba(155,107,255,.8), transparent 70%), radial-gradient(60% 50% at 90% 80%, rgba(255,95,210,.6), transparent 70%), #0a0820; }
.pv-neon i { background: rgba(255,255,255,.12); box-shadow: 0 0 0 1px rgba(155,107,255,.7); } .pv-neon .pv-btn { background: linear-gradient(90deg, #9b6bff, #3fa0ff); box-shadow: 0 0 10px rgba(155,107,255,.8); }
.pv-glass { background: radial-gradient(70% 50% at 50% 0%, rgba(255,255,255,.25), transparent 70%), linear-gradient(180deg, #161b27, #0a0d14); }
.pv-glass i { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); } .pv-glass .pv-btn { background: #f5f7fb; }
.pv-playful { background: radial-gradient(40% 35% at 15% 20%, rgba(255,200,60,.6), transparent 70%), radial-gradient(40% 35% at 85% 85%, rgba(80,200,255,.5), transparent 70%), #fff8ec; }
.pv-playful i { background: #fff; box-shadow: 0 2px 0 #e7e1f5, inset 0 0 0 1.5px #e7e1f5; } .pv-playful .pv-btn { background: #58cc02; box-shadow: 0 2px 0 #46a302; }

/* =====================================================================
   Special style (admins only): TINTED GLASS — real-looking glass like Instagram's bottom bar,
   on a clean, calm background with lots of breathing room
   ===================================================================== */
:root[data-ui="liquid"] {
  --text: #0f1420; --muted: #667085; --panel: rgba(255,255,255,.5); --panel-2: rgba(255,255,255,.42); --line: rgba(15,20,32,.08);
  --green: #0a84ff; --green-ink: #fff; --accent-rgb: 10, 132, 255; --brand-a: #0a84ff; --brand-b: #5e5ce6;
  /* the glass recipe: a light tint, a soft sheen from the top-left, bright edges, depth below */
  --lg-tint: rgba(232, 236, 245, .42);
  --lg-sheen: linear-gradient(155deg, rgba(255,255,255,.62), rgba(255,255,255,.1) 42%, rgba(255,255,255,0) 60%, rgba(255,255,255,.22));
  --lg-edge: inset 0 1px 1px rgba(255,255,255,.95), inset 0 -1px 1px rgba(255,255,255,.35), inset 1px 0 1px rgba(255,255,255,.45), inset -1px 0 1px rgba(255,255,255,.25);
  --lg-depth: 0 10px 34px rgba(25, 35, 70, .12), 0 2px 6px rgba(25, 35, 70, .06);
  --lg-blur: blur(24px) saturate(190%) brightness(1.04);
}
:root[data-ui="liquid"] body { background: #eef1f6; }
:root[data-ui="liquid"] body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(45% 35% at 85% 8%, rgba(255, 190, 160, .35), transparent 70%),
    radial-gradient(45% 35% at 8% 30%, rgba(170, 180, 255, .3), transparent 70%),
    radial-gradient(50% 40% at 70% 95%, rgba(150, 220, 230, .3), transparent 70%),
    linear-gradient(180deg, #f8f9fc, #e8ecf3); }
:root[data-ui="liquid"] #app, :root[data-ui="liquid"] body[data-page] #app { background: transparent; }
:root[data-ui="liquid"] body[data-page] #app::before { content: none; }
:root[data-ui="liquid"] .page { color: var(--text); }
/* every surface is a sheet of glass */
:root[data-ui="liquid"] .sheet, :root[data-ui="liquid"].is-desktop #view, :root[data-ui="liquid"] .menu-row, :root[data-ui="liquid"] .qzm-card, :root[data-ui="liquid"] .duel-box,
:root[data-ui="liquid"] .st-card, :root[data-ui="liquid"] .st-tile, :root[data-ui="liquid"] .quiz-card, :root[data-ui="liquid"] .ap-section, :root[data-ui="liquid"] .duel-score,
:root[data-ui="liquid"] .duelist, :root[data-ui="liquid"] .thread, :root[data-ui="liquid"] .notif, :root[data-ui="liquid"] .nav,
:root[data-ui="liquid"] .btn:not(.primary):not(.danger), :root[data-ui="liquid"] .chip, :root[data-ui="liquid"] .qzm-level, :root[data-ui="liquid"] .qz-opt, :root[data-ui="liquid"] .input,
:root[data-ui="liquid"] .icon-btn:not(.plain), :root[data-ui="liquid"] .seg, :root[data-ui="liquid"] .tabs, :root[data-ui="liquid"] .break-btn, :root[data-ui="liquid"] .toast {
  background: var(--lg-sheen), var(--lg-tint); border: 1px solid rgba(255,255,255,.6);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  box-shadow: var(--lg-edge), var(--lg-depth); color: var(--text); }
:root[data-ui="liquid"] .sheet { background: var(--lg-sheen), rgba(240, 243, 249, .72); border-radius: 30px 30px 0 0; }
:root[data-ui="liquid"].is-desktop .sheet { border-radius: 30px; }
:root[data-ui="liquid"] .menu-row, :root[data-ui="liquid"] .qzm-card, :root[data-ui="liquid"] .duel-box, :root[data-ui="liquid"] .st-card { border-radius: 24px; }
/* the tab bar: a floating pill of glass with a bright lens under the current tab */
:root[data-ui="liquid"] .nav { border-radius: 34px; background: var(--lg-sheen), rgba(236, 240, 248, .38); box-shadow: var(--lg-edge), 0 14px 40px rgba(25, 35, 70, .18), 0 2px 6px rgba(25, 35, 70, .08); }
:root[data-ui="liquid"] .nav-btn { color: #4a5263; }
:root[data-ui="liquid"] .nav-btn.on { background: transparent; color: #0a84ff; }
:root[data-ui="liquid"] .nav > .nav-pill { background: linear-gradient(160deg, rgba(255,255,255,.85), rgba(255,255,255,.35)); opacity: 1;
  box-shadow: inset 0 1px 1px #fff, inset 0 -1px 2px rgba(255,255,255,.6), 0 4px 14px rgba(25,35,70,.14); border: 1px solid rgba(255,255,255,.8); }
:root[data-ui="liquid"] .nav.dragging > .nav-pill { background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(255,255,255,.5)); scale: 1.12 1.2; }
:root[data-ui="liquid"] .play-btn { background: linear-gradient(160deg, rgba(255,255,255,.55), rgba(255,255,255,0) 50%), linear-gradient(180deg, #3d9bff, #0a6fe0);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.9), inset 0 -2px 4px rgba(0,40,120,.25), 0 8px 20px rgba(10,110,230,.35); }
/* over videos (the feed), the glass is a darker smoky tint */
:root[data-ui="liquid"] body[data-page="feed"] .nav { background: linear-gradient(155deg, rgba(255,255,255,.28), rgba(255,255,255,.04) 45%, rgba(255,255,255,.1)), rgba(30, 34, 46, .32);
  border-color: rgba(255,255,255,.28); box-shadow: inset 0 1px 1px rgba(255,255,255,.45), inset 0 -1px 1px rgba(255,255,255,.12), 0 12px 34px rgba(0,0,0,.35); }
:root[data-ui="liquid"] body[data-page="feed"] .nav-btn { color: rgba(255,255,255,.75); }
:root[data-ui="liquid"] body[data-page="feed"] .nav-btn.on { color: #fff; }
:root[data-ui="liquid"] body[data-page="feed"] .nav > .nav-pill { background: linear-gradient(160deg, rgba(255,255,255,.4), rgba(255,255,255,.1)); border-color: rgba(255,255,255,.4); }
:root[data-ui="liquid"] .act .ic, :root[data-ui="liquid"] .feed-top .mute, :root[data-ui="liquid"] .feed-tabs {
  background: linear-gradient(155deg, rgba(255,255,255,.32), rgba(255,255,255,.05) 50%, rgba(255,255,255,.12)), rgba(30, 34, 46, .28);
  border: 1px solid rgba(255,255,255,.3); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.5), 0 6px 18px rgba(0,0,0,.25); }
:root[data-ui="liquid"] .feed-tabs button.on { background: linear-gradient(160deg, rgba(255,255,255,.55), rgba(255,255,255,.2)); color: #fff; box-shadow: inset 0 1px 1px rgba(255,255,255,.7); }
/* clean type and calm accents */
:root[data-ui="liquid"] .page-head h1 { font-weight: 700; letter-spacing: -.035em; color: var(--text); }
:root[data-ui="liquid"] .btn.primary { background: linear-gradient(160deg, rgba(255,255,255,.4), rgba(255,255,255,0) 55%), #0a84ff; color: #fff; border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.7), 0 8px 20px rgba(10,132,255,.3); }
:root[data-ui="liquid"] .btn.danger { background: var(--lg-sheen), rgba(255, 235, 238, .5); color: #e5484d; border: 1px solid rgba(255,255,255,.6); }
:root[data-ui="liquid"] .seg button.on, :root[data-ui="liquid"] .tabs > .on { background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(255,255,255,.6)); color: #0a84ff;
  box-shadow: inset 0 1px 1px #fff, 0 3px 10px rgba(25,35,70,.12); }
:root[data-ui="liquid"] .chip:hover, :root[data-ui="liquid"] .qzm-level:hover, :root[data-ui="liquid"] .qz-opt:hover:not([disabled]), :root[data-ui="liquid"] .menu-row:hover {
  background: var(--lg-sheen), rgba(255,255,255,.62); }
:root[data-ui="liquid"] .input:focus { border-color: rgba(10,132,255,.6); box-shadow: var(--lg-edge), 0 0 0 4px rgba(10,132,255,.14); outline: none; }
:root[data-ui="liquid"] .qzm-bar i { background: linear-gradient(90deg, #64d2ff, #0a84ff); }
:root[data-ui="liquid"] .qz-opt.right { background: var(--lg-sheen), rgba(52, 199, 89, .25); border-color: rgba(52,199,89,.6); }
:root[data-ui="liquid"] .qz-opt.wrong { background: var(--lg-sheen), rgba(255, 69, 58, .2); border-color: rgba(255,69,58,.55); }
:root[data-ui="liquid"] .muted, :root[data-ui="liquid"] .menu-sub { color: var(--muted); }
:root[data-ui="liquid"] .page { padding-left: 20px; padding-right: 20px; }
:root[data-ui="liquid"].is-desktop #feedPane { box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 24px 60px rgba(25,35,70,.2); }
:root[data-ui="liquid"] .brand, :root[data-ui="liquid"] .brand-a, :root[data-ui="liquid"] .brand-b { text-shadow: none; }
/* picker preview */
.pv-liquid { background: radial-gradient(60% 40% at 85% 10%, rgba(255,190,160,.6), transparent 70%), radial-gradient(60% 40% at 10% 40%, rgba(170,180,255,.5), transparent 70%), linear-gradient(180deg, #f8f9fc, #e3e8f1); }
.pv-liquid i { background: linear-gradient(155deg, rgba(255,255,255,.8), rgba(255,255,255,.25)); box-shadow: inset 0 1px 1px #fff, 0 2px 6px rgba(25,35,70,.12); }
.pv-liquid .pv-btn { background: #0a84ff; box-shadow: inset 0 1px 1px rgba(255,255,255,.7); }
:root[data-ui="liquid"] body[data-page="feed"] .break-btn { background: linear-gradient(155deg, rgba(255,255,255,.32), rgba(255,255,255,.05) 50%, rgba(255,255,255,.12)), rgba(30, 34, 46, .28);
  border-color: rgba(255,255,255,.3); color: #fff; box-shadow: inset 0 1px 1px rgba(255,255,255,.5), 0 6px 18px rgba(0,0,0,.25); }
/* Tinted glass, dark: smoky glass on a clean deep background */
:root[data-ui="liquid"] {
  --text: #f2f4f8; --muted: #9aa3b5; --panel: rgba(255,255,255,.06); --panel-2: rgba(255,255,255,.05); --line: rgba(255,255,255,.08);
  --green: #3d9bff; --accent-rgb: 61, 155, 255; --brand-a: #3d9bff; --brand-b: #7a78ff;
  --lg-tint: rgba(22, 25, 34, .48);
  --lg-sheen: linear-gradient(155deg, rgba(255,255,255,.16), rgba(255,255,255,.03) 42%, rgba(255,255,255,0) 60%, rgba(255,255,255,.06));
  --lg-edge: inset 0 1px 1px rgba(255,255,255,.28), inset 0 -1px 1px rgba(255,255,255,.07), inset 1px 0 1px rgba(255,255,255,.1), inset -1px 0 1px rgba(255,255,255,.05);
  --lg-depth: 0 12px 36px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
  --lg-blur: blur(26px) saturate(180%);
}
:root[data-ui="liquid"] body { background: #08090d; }
:root[data-ui="liquid"] body::before { background:
    radial-gradient(45% 35% at 85% 6%, rgba(90, 120, 255, .22), transparent 70%),
    radial-gradient(40% 32% at 6% 35%, rgba(150, 90, 255, .14), transparent 70%),
    radial-gradient(50% 40% at 70% 96%, rgba(40, 170, 200, .14), transparent 70%),
    linear-gradient(180deg, #0e1016, #07080b); }
:root[data-ui="liquid"] .sheet, :root[data-ui="liquid"].is-desktop #view, :root[data-ui="liquid"] .menu-row, :root[data-ui="liquid"] .qzm-card, :root[data-ui="liquid"] .duel-box,
:root[data-ui="liquid"] .st-card, :root[data-ui="liquid"] .st-tile, :root[data-ui="liquid"] .quiz-card, :root[data-ui="liquid"] .ap-section, :root[data-ui="liquid"] .duel-score,
:root[data-ui="liquid"] .duelist, :root[data-ui="liquid"] .thread, :root[data-ui="liquid"] .notif, :root[data-ui="liquid"] .nav,
:root[data-ui="liquid"] .btn:not(.primary):not(.danger), :root[data-ui="liquid"] .chip, :root[data-ui="liquid"] .qzm-level, :root[data-ui="liquid"] .qz-opt, :root[data-ui="liquid"] .input,
:root[data-ui="liquid"] .icon-btn:not(.plain), :root[data-ui="liquid"] .seg, :root[data-ui="liquid"] .tabs, :root[data-ui="liquid"] .break-btn, :root[data-ui="liquid"] .toast {
  border-color: rgba(255,255,255,.12); color: var(--text); }
:root[data-ui="liquid"] .sheet { background: var(--lg-sheen), rgba(20, 22, 30, .82); }
:root[data-ui="liquid"] .nav, :root[data-ui="liquid"] body[data-page="feed"] .nav { background: var(--lg-sheen), rgba(24, 27, 36, .5); border-color: rgba(255,255,255,.14);
  box-shadow: var(--lg-edge), 0 16px 44px rgba(0,0,0,.55), 0 2px 6px rgba(0,0,0,.3); }
:root[data-ui="liquid"] .nav-btn, :root[data-ui="liquid"] body[data-page="feed"] .nav-btn { color: rgba(242,244,248,.62); }
:root[data-ui="liquid"] .nav-btn.on, :root[data-ui="liquid"] body[data-page="feed"] .nav-btn.on { color: #fff; }
:root[data-ui="liquid"] .nav > .nav-pill, :root[data-ui="liquid"] body[data-page="feed"] .nav > .nav-pill { background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.2); box-shadow: inset 0 1px 1px rgba(255,255,255,.35), 0 4px 14px rgba(0,0,0,.3); }
:root[data-ui="liquid"] .nav.dragging > .nav-pill { background: linear-gradient(160deg, rgba(255,255,255,.3), rgba(255,255,255,.1)); }
:root[data-ui="liquid"] .page-head h1 { color: #fff; }
:root[data-ui="liquid"] .btn.primary { background: linear-gradient(160deg, rgba(255,255,255,.3), rgba(255,255,255,0) 55%), #2f8cff; border-color: rgba(255,255,255,.2); box-shadow: inset 0 1px 1px rgba(255,255,255,.45), 0 8px 22px rgba(47,140,255,.3); }
:root[data-ui="liquid"] .btn.danger { background: var(--lg-sheen), rgba(255, 70, 80, .12); color: #ff7b82; border: 1px solid rgba(255,120,130,.25); }
:root[data-ui="liquid"] .seg button.on, :root[data-ui="liquid"] .tabs > .on { background: linear-gradient(160deg, rgba(255,255,255,.26), rgba(255,255,255,.08)); color: #fff;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35), 0 3px 10px rgba(0,0,0,.3); }
:root[data-ui="liquid"] .chip:hover, :root[data-ui="liquid"] .qzm-level:hover, :root[data-ui="liquid"] .qz-opt:hover:not([disabled]), :root[data-ui="liquid"] .menu-row:hover {
  background: var(--lg-sheen), rgba(40, 44, 58, .6); border-color: rgba(255,255,255,.22); }
:root[data-ui="liquid"] .input:focus { border-color: rgba(61,155,255,.6); box-shadow: var(--lg-edge), 0 0 0 4px rgba(61,155,255,.16); }
:root[data-ui="liquid"] .play-btn { background: linear-gradient(160deg, rgba(255,255,255,.4), rgba(255,255,255,0) 50%), linear-gradient(180deg, #4aa3ff, #1a6fe0);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.7), inset 0 -2px 4px rgba(0,30,90,.35), 0 8px 22px rgba(30,120,255,.35); }
:root[data-ui="liquid"] .qz-opt.right { background: var(--lg-sheen), rgba(52, 199, 89, .2); border-color: rgba(52,199,89,.5); }
:root[data-ui="liquid"] .qz-opt.wrong { background: var(--lg-sheen), rgba(255, 69, 58, .18); border-color: rgba(255,69,58,.45); }
:root[data-ui="liquid"].is-desktop #feedPane { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 24px 60px rgba(0,0,0,.55); }
:root[data-ui="liquid"] .toast { background: var(--lg-sheen), rgba(24, 27, 36, .85); }
.pv-liquid { background: radial-gradient(60% 40% at 85% 10%, rgba(90,120,255,.45), transparent 70%), radial-gradient(60% 40% at 10% 40%, rgba(150,90,255,.3), transparent 70%), linear-gradient(180deg, #121520, #07080b); }
.pv-liquid i { background: linear-gradient(155deg, rgba(255,255,255,.2), rgba(255,255,255,.05)); box-shadow: inset 0 1px 1px rgba(255,255,255,.3), 0 2px 6px rgba(0,0,0,.4); }
.pv-liquid .pv-btn { background: #2f8cff; }

/* =====================================================================
   Special style (admins only): BLOCKY — a pixel block world. Sky, clouds, a grass-and-dirt
   ground, grey inventory-style panels with bevelled edges, stone buttons, a pixel font.
   All textures are our own (icons/blk-*.png).
   ===================================================================== */
:root[data-ui="blocky"] {
  --body: 'Pixelify Sans', 'Figtree', system-ui, sans-serif; --display: 'Pixelify Sans', 'Figtree', system-ui, sans-serif;
  --text: #2a2a2a; --muted: #555; --panel: #c6c6c6; --panel-2: #b4b4b4; --line: #8b8b8b;
  --green: #4f9a2c; --green-ink: #fff; --accent-rgb: 79, 154, 44; --brand-a: #4f9a2c; --brand-b: #3b7bd6;
  --bk-bevel: inset 3px 3px 0 #fff, inset -3px -3px 0 #555;
  --bk-press: inset 3px 3px 0 #555, inset -3px -3px 0 #fff;
}
:root[data-ui="blocky"] * { border-radius: 0 !important; }
:root[data-ui="blocky"] img, :root[data-ui="blocky"] .avatar { border-radius: 0 !important; }
:root[data-ui="blocky"] body { background: #7fb2ff; image-rendering: pixelated; }
/* sky with square clouds, and the ground along the bottom */
:root[data-ui="blocky"] body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)) 8% 34% / 120px 24px no-repeat, linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)) calc(8% + 24px) calc(34% - 20px) / 64px 20px no-repeat,
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) 92% 58% / 160px 24px no-repeat, linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)) calc(92% - 40px) calc(58% - 22px) / 88px 22px no-repeat,
    linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,.4)) 40% 76% / 96px 18px no-repeat,
    linear-gradient(180deg, #5c9cf5 0%, #8fc0ff 55%, #bcdcff 100%); }
:root[data-ui="blocky"] body::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 112px; z-index: -1; pointer-events: none;
  background: url(icons/blk-grass.png) 0 0 / 48px 48px repeat-x, url(icons/blk-dirt.png) 0 0 / 48px 48px repeat;
  image-rendering: pixelated; box-shadow: 0 -2px 0 rgba(0,0,0,.25); }
:root[data-ui="blocky"] #app, :root[data-ui="blocky"] body[data-page] #app { background: transparent; }
:root[data-ui="blocky"] body[data-page] #app::before { content: none; }
:root[data-ui="blocky"] .page, :root[data-ui="blocky"] .sheet { color: var(--text); }

/* inventory panels */
:root[data-ui="blocky"] .sheet, :root[data-ui="blocky"].is-desktop #view, :root[data-ui="blocky"] .menu-row, :root[data-ui="blocky"] .qzm-card, :root[data-ui="blocky"] .duel-box,
:root[data-ui="blocky"] .st-card, :root[data-ui="blocky"] .st-tile, :root[data-ui="blocky"] .quiz-card, :root[data-ui="blocky"] .ap-section, :root[data-ui="blocky"] .duel-score,
:root[data-ui="blocky"] .duelist, :root[data-ui="blocky"] .thread, :root[data-ui="blocky"] .notif {
  background: #c6c6c6; border: 3px solid #000; box-shadow: var(--bk-bevel); color: var(--text); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="blocky"].is-desktop #view { background: rgba(198,198,198,.94); }
:root[data-ui="blocky"] .sheet { box-shadow: var(--bk-bevel), 0 8px 0 rgba(0,0,0,.35); }
:root[data-ui="blocky"] .menu-row:hover, :root[data-ui="blocky"] .notif:hover, :root[data-ui="blocky"] .thread:hover { background: #d6d6d6; }
:root[data-ui="blocky"] .page-head h1, :root[data-ui="blocky"] .profile-top h2, :root[data-ui="blocky"] .sheet h2 { font-weight: 700; letter-spacing: .01em; color: #fff; text-shadow: 3px 3px 0 #3f3f3f; }
:root[data-ui="blocky"] .sheet h2, :root[data-ui="blocky"] .sheet-head h2 { color: #3f3f3f; text-shadow: none; }
:root[data-ui="blocky"] .muted, :root[data-ui="blocky"] .menu-sub { color: #555; }

/* stone buttons with white pixel text */
:root[data-ui="blocky"] .btn, :root[data-ui="blocky"] .chip, :root[data-ui="blocky"] .qzm-level, :root[data-ui="blocky"] .qz-opt, :root[data-ui="blocky"] .icon-btn:not(.plain), :root[data-ui="blocky"] .break-btn {
  background: url(icons/blk-stone.png) 0 0 / 32px 32px; image-rendering: pixelated; color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
  border: 3px solid #000; box-shadow: inset 3px 3px 0 rgba(255,255,255,.45), inset -3px -3px 0 rgba(0,0,0,.4); font-weight: 600; }
:root[data-ui="blocky"] .btn:hover, :root[data-ui="blocky"] .chip:hover, :root[data-ui="blocky"] .qzm-level:hover, :root[data-ui="blocky"] .qz-opt:hover:not([disabled]), :root[data-ui="blocky"] .icon-btn:not(.plain):hover {
  border-color: #fff; outline: 3px solid #000; outline-offset: -6px; filter: brightness(1.12); }
:root[data-ui="blocky"] .btn:active, :root[data-ui="blocky"] .chip:active, :root[data-ui="blocky"] .qz-opt:active { box-shadow: inset 3px 3px 0 rgba(0,0,0,.4), inset -3px -3px 0 rgba(255,255,255,.3); translate: 0 2px; }
:root[data-ui="blocky"] .btn.primary { background: url(icons/blk-grasstop.png) 0 0 / 32px 32px; }
:root[data-ui="blocky"] .btn.danger { background: #b02e26; }
:root[data-ui="blocky"] .icon-btn.plain { color: #3f3f3f; }
:root[data-ui="blocky"] .qz-opt.right { background: url(icons/blk-grasstop.png) 0 0 / 32px 32px; border-color: #fff; }
:root[data-ui="blocky"] .qz-opt.wrong { background: #b02e26; animation: shake .4s; }
:root[data-ui="blocky"] .qzm-level b, :root[data-ui="blocky"] .qzm-level small { color: #fff !important; text-shadow: 2px 2px 0 #3f3f3f; }
:root[data-ui="blocky"] .qzm-level { border-top: 6px solid #000; }
:root[data-ui="blocky"] .qzm-level.lv-easy { box-shadow: inset 0 4px 0 #6fd23a, inset 3px 3px 0 rgba(255,255,255,.45), inset -3px -3px 0 rgba(0,0,0,.4); }
:root[data-ui="blocky"] .qzm-level.lv-medium { box-shadow: inset 0 4px 0 #f0b400, inset 3px 3px 0 rgba(255,255,255,.45), inset -3px -3px 0 rgba(0,0,0,.4); }
:root[data-ui="blocky"] .qzm-level.lv-hard { box-shadow: inset 0 4px 0 #e0402a, inset 3px 3px 0 rgba(255,255,255,.45), inset -3px -3px 0 rgba(0,0,0,.4); }
:root[data-ui="blocky"] .quiz-cta { background: #c6c6c6; border: 3px solid #000; box-shadow: var(--bk-bevel); color: var(--text); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="blocky"] .quiz-cta small { color: #555; }
:root[data-ui="blocky"] .qzm-bar { background: #3f3f3f; border: 2px solid #000; }
:root[data-ui="blocky"] .qzm-bar i { background: linear-gradient(180deg, #8fe05a 0 50%, #5fae2e 50%); }
:root[data-ui="blocky"] .input { background: #000; color: #e0e0e0; border: 3px solid #a0a0a0; box-shadow: none; }
:root[data-ui="blocky"] .input::placeholder { color: #8a8a8a; }
:root[data-ui="blocky"] .input:focus { border-color: #fff; outline: none; box-shadow: none; }
:root[data-ui="blocky"] .seg, :root[data-ui="blocky"] .tabs { background: #8b8b8b; border: 3px solid #000; box-shadow: var(--bk-press); padding: 3px; }
:root[data-ui="blocky"] .seg button, :root[data-ui="blocky"] .tabs > * { color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
:root[data-ui="blocky"] .seg button.on, :root[data-ui="blocky"] .tabs > .on { background: #c6c6c6; color: #3f3f3f; text-shadow: none; box-shadow: var(--bk-bevel); }
:root[data-ui="blocky"] .toast { background: rgba(16, 0, 16, .92); color: #fff; border: 3px solid #2a0a5e; box-shadow: inset 0 0 0 2px #5000a0; text-shadow: 2px 2px 0 #3f3f3f; }

/* the tab bar is a hotbar: dark slots, the chosen one gets a thick white frame */
:root[data-ui="blocky"] .nav, :root[data-ui="blocky"] body[data-page="feed"] .nav {
  background: rgba(0,0,0,.55); border: 3px solid #000; box-shadow: inset 0 0 0 3px #8b8b8b, 0 6px 0 rgba(0,0,0,.35); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-ui="blocky"] .nav-btn, :root[data-ui="blocky"] body[data-page="feed"] .nav-btn { color: #d0d0d0; text-shadow: 2px 2px 0 #000; }
:root[data-ui="blocky"] .nav-btn.on, :root[data-ui="blocky"] body[data-page="feed"] .nav-btn.on { color: #fff; }
:root[data-ui="blocky"] .nav > .nav-pill, :root[data-ui="blocky"] body[data-page="feed"] .nav > .nav-pill {
  background: rgba(255,255,255,.12); border: 4px solid #fff; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000; opacity: 1; }
:root[data-ui="blocky"] .nav.dragging > .nav-pill { background: rgba(255,255,255,.22); }

/* on top of the videos */
:root[data-ui="blocky"] .feed-tabs { background: rgba(0,0,0,.5); border: 3px solid #000; box-shadow: inset 0 0 0 2px #8b8b8b; }
:root[data-ui="blocky"] .feed-tabs button { color: #ddd; text-shadow: 2px 2px 0 #000; }
:root[data-ui="blocky"] .feed-tabs button.on { background: #c6c6c6; color: #3f3f3f; text-shadow: none; box-shadow: var(--bk-bevel); }
:root[data-ui="blocky"] .act .ic { background: rgba(0,0,0,.5); border: 3px solid #000; box-shadow: inset 0 0 0 2px #8b8b8b; }
:root[data-ui="blocky"] .act span, :root[data-ui="blocky"] .act b { text-shadow: 2px 2px 0 #000; }
:root[data-ui="blocky"] .play-btn { background: url(icons/blk-grasstop.png) 0 0 / 32px 32px; border: 3px solid #000; box-shadow: inset 3px 3px 0 rgba(255,255,255,.45), inset -3px -3px 0 rgba(0,0,0,.4), 0 5px 0 rgba(0,0,0,.4); image-rendering: pixelated; }
:root[data-ui="blocky"] .play-btn svg { fill: #fff; filter: drop-shadow(2px 2px 0 #3f3f3f); }
:root[data-ui="blocky"].is-desktop #feedPane { border: 3px solid #000; box-shadow: inset 0 0 0 3px #8b8b8b, 0 8px 0 rgba(0,0,0,.35); }
:root[data-ui="blocky"] .brand, :root[data-ui="blocky"] .brand-a, :root[data-ui="blocky"] .brand-b { text-shadow: 2px 2px 0 #3f3f3f; }
:root[data-ui="blocky"] .page { padding-bottom: 120px; }
/* a little block-pop when things appear */
@keyframes bk-pop { 0% { scale: .9; } 60% { scale: 1.03; } 100% { scale: 1; } }
:root[data-ui="blocky"] .sheet, :root[data-ui="blocky"] .toast { animation: bk-pop .18s steps(3) both; }
.pv-blocky { background: linear-gradient(180deg, #5c9cf5, #bcdcff 70%, transparent 70%), url(icons/blk-grass.png) 0 100% / 18px 18px repeat-x, url(icons/blk-dirt.png) 0 0 / 18px 18px; image-rendering: pixelated; }
.pv-blocky i { background: #c6c6c6; box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555; border-radius: 0 !important; outline: 1px solid #000; }
.pv-blocky .pv-btn { background: url(icons/blk-grasstop.png) 0 0 / 12px 12px; }

/* ---------- custom layout (admins, computers) ---------- */
html.is-desktop.custom-layout #feedPane, html.is-desktop.custom-layout #view, html.is-desktop.custom-layout .nav,
html.is-desktop.custom-layout body[data-page] #feedPane, html.is-desktop.custom-layout body[data-page] #view {
  position: fixed !important; left: var(--lx) !important; top: var(--ly) !important; width: var(--lw) !important; height: var(--lh) !important;
  margin: 0 !important; grid-area: auto !important; align-self: auto !important; max-width: none; z-index: 5; }
html.is-desktop.custom-layout .nav { z-index: 30; }
html.is-desktop.custom-layout #view > .page { min-width: 0; }
/* the tab bar lying down */
html.is-desktop.custom-layout .nav.nav-h { flex-direction: row; align-items: center; justify-content: space-evenly; padding: 8px 18px; border-radius: 40px; }
html.is-desktop.custom-layout .nav.nav-h .nav-btn { flex: 1; padding: 8px 0 7px; max-width: 120px; }
html.is-desktop.custom-layout .nav.nav-h .play-btn { flex: none; margin: 0 6px; width: 56px; height: 56px; }
html.is-desktop.custom-layout .nav.nav-h > .nav-pill { top: 8px; bottom: 8px; left: 0; right: auto; height: auto !important; }
/* editing: the page area stays visible so it can be placed, and parts don't react to clicks */
html.le-editing body[data-page="feed"] #view { opacity: 1 !important; }
html.le-editing #feedPane, html.le-editing #view, html.le-editing .nav { pointer-events: none; transition: none !important; }
.le-box { position: fixed; z-index: 500; border: 2px dashed rgba(143, 91, 255, .9); border-radius: 26px; background: rgba(143, 91, 255, .08); cursor: grab; touch-action: none; box-sizing: border-box; }
.le-box.active { cursor: grabbing; background: rgba(143, 91, 255, .16); border-style: solid; box-shadow: 0 0 0 4px rgba(143, 91, 255, .25); }
.le-box.le-nav { border-color: rgba(47, 210, 122, .95); background: rgba(47, 210, 122, .08); }
.le-box.le-view { border-color: rgba(63, 140, 255, .95); background: rgba(63, 140, 255, .07); }
.le-label { position: absolute; left: 50%; top: 10px; translate: -50% 0; padding: 5px 12px; border-radius: 99px; background: rgba(10, 8, 24, .82); color: #fff; font: 700 12.5px/1 var(--body, system-ui); white-space: nowrap; pointer-events: none; }
.le-grip { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 10px 0 24px 0; background: #fff; cursor: nwse-resize;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.le-grip::after { content: ''; position: absolute; right: 7px; bottom: 7px; width: 9px; height: 9px; border-right: 2.5px solid #333; border-bottom: 2.5px solid #333; border-radius: 0 0 3px 0; }
.le-bar { position: fixed; z-index: 600; left: 50%; top: 12px; translate: -50% 0; transition: opacity .2s; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 99px;
  background: rgba(14, 12, 28, .9); color: #fff; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 14px 40px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); max-width: calc(100vw - 32px); }
.le-hint { font-size: 13px; opacity: .85; margin-right: 6px; }

html.le-dragging .le-bar { opacity: .15; pointer-events: none; }
.le-bar.at-bottom { top: auto; bottom: 14px; }
.le-hint { font-weight: 700; }

/* ---------- Thanos snap ---------- */
.snap-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 900; pointer-events: none; }
.snap-shield { position: fixed; inset: 0; z-index: 899; }
.snap-flash { position: fixed; inset: 0; z-index: 902; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,40,40,.55) 60%, rgba(60,0,0,.85)); }
.snap-face { position: fixed; left: 50%; top: 56%; z-index: 903; width: min(175vw, 150vh); height: auto; pointer-events: none; opacity: 0; transform: translate(-50%,-50%); filter: drop-shadow(0 20px 60px rgba(0,0,0,.6)); }
.snap-head { position: fixed; left: 0; top: 0; z-index: 903; width: auto; pointer-events: none; opacity: 0; filter: drop-shadow(0 10px 24px rgba(0,0,0,.55)); will-change: transform; }
.snapped { pointer-events: none; opacity: 0 !important; }
.ap-snap .ap-search { margin-top: 8px; }
.ap-snap-more { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ap-help { margin-top: 10px; font-size: 13.5px; }
.ap-help summary { cursor: pointer; font-weight: 700; color: var(--brand-a); }
.ap-help ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }
.ap-storage .up-progress { margin-top: 10px; }
