/* =========================================================
   Stremry — design system
   Signature colors: Sky #51B3D0 (the character's bubble) + Play orange #EE984F, on Night #0B0E13
   (the --ember* names are the old identity's; they now hold the Sky blue)
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #0B0E13;
  --bg-elev: #0F1319;
  --surface: #141921;
  --surface-2: #1A2029;
  --surface-3: #232B36;
  --hover: #2B3440;
  --line: #1E252F;
  --line-2: #2E3742;

  --text: #F2F4F8;
  --text-2: #B4BCC8;
  --text-3: #7A8494;

  --ember: #51B3D0;
  --ember-600: #3A9BBD;
  --ember-300: #7FCBE2;
  --amber: #EE984F;
  --flare: #FF4D5E;
  --ember-soft: rgba(81, 179, 208, .13);
  --ember-ring: rgba(81, 179, 208, .45);
  --grad: linear-gradient(135deg, #2A86A8 0%, #3A9BBD 55%, #51B3D0 100%);
  --grad-text: linear-gradient(120deg, #7FCBE2 0%, #51B3D0 45%, #EE984F 100%);

  --ok: #2BD47D;
  --danger: #FF5468;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --side-w: 250px;
  --top-h: 58px;
  --chat-w: 340px;

  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --display: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.2px; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--ember); color: #fff; }

* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--hover); }

svg.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.flip { transform: scaleX(-1); }
.grad-text { color: var(--ember); }
.muted { color: var(--text-2); }
.w100 { width: 100%; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes drawer { from { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 var(--ember-ring); } 100% { box-shadow: 0 0 0 10px rgba(81,179,208,0); } }

/* ---------- buttons & primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform .15s, filter .15s, background .15s, box-shadow .15s;
}
.btn svg.i { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: none; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-solid { background: var(--surface-3); color: var(--text); }
.btn-solid:hover { background: var(--hover); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: rgba(255, 84, 104, .12); color: #FF8091; border: 1px solid rgba(255, 84, 104, .35); }
.btn-danger:hover { background: rgba(255, 84, 104, .2); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-grid; place-items: center; color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.avatar {
  --h: 20; --s: 36px;
  width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; position: relative;
  font-family: var(--display); font-weight: 700; color: #fff;
  font-size: calc(var(--s) * .42); line-height: 1;
  background: linear-gradient(135deg, hsl(var(--h) 85% 58%), hsl(calc(var(--h) + 40) 80% 38%));
}
.avatar.has-img { background: var(--surface-3) !important; }
.avatar > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.live { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--flare); }
.avatar.live.big { animation: ring 2s infinite; }

.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--flare); color: #fff;
  font-weight: 700; font-size: 11.5px; line-height: 1;
  padding: 4px 7px; border-radius: 5px;
}
.live-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0, 0, 0, .62); backdrop-filter: blur(6px); color: #fff;
  font-size: 12px; font-weight: 500; line-height: 1; padding: 4px 7px; border-radius: 5px;
}
.pill svg.i { width: 13px; height: 13px; }
.pill.new { background: var(--amber); color: #1a1205; font-weight: 700; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; background: var(--surface-3); color: var(--text-2);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
a.tag:hover { background: var(--hover); color: var(--text); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); flex: none; }

.input {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px;
  outline: 0; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
select.input { cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.form-err { color: #FF8091; font-size: 13px; min-height: 18px; margin: -6px 0 10px; }

/* ---------- topbar ---------- */
/* installed app on notched phones: keep clear of the status bar / home indicator */
:root { --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); }
.topbar { height: calc(var(--top-h) + var(--safe-top)) !important; padding-top: var(--safe-top) !important; }
/* the app fills the visible screen as a column: top bar · content · (phones) tab bar.
   No 100vh maths — iPhone Safari counts its own toolbars in vh, which pushed the bottom of the app off-screen. */
body { position: fixed; inset: 0; display: flex; flex-direction: column; overscroll-behavior: none; touch-action: manipulation; }
#view { overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.topbar, .tabbar, .st-bar, .ch-tabs, .st-tabs, .dock { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.topbar { flex: none; }
.chat-input { padding-bottom: calc(12px + var(--safe-bottom)); }

.topbar {
  height: var(--top-h); position: relative; z-index: 50;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: rgba(16, 16, 22, .92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand img { width: 34px; height: 34px; transition: transform .25s; }
.brand:hover img { transform: rotate(-8deg) scale(1.05); }
.wm { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.6px; }
.wm-f { color: var(--ember); }
.brand img.wm-img { width: auto; height: 22px; }
.brand:hover img.wm-img { transform: none; }
.nav { display: flex; gap: 2px; margin-inline-start: 10px; }
.nav a {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px;
  border-radius: 10px; color: var(--text-2); font-weight: 600; position: relative;
}
.nav a svg.i { width: 18px; height: 18px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: ''; position: absolute; inset-inline: 12px; bottom: -10px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--grad);
}
.search { flex: 1; max-width: 460px; margin-inline: auto; position: relative; }
.search-ico { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); display: flex; pointer-events: none; }
.search-ico svg.i { width: 18px; height: 18px; }
.search input {
  width: 100%; height: 38px; padding-inline: 40px 14px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px;
  outline: 0; transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { border-color: var(--ember); background: var(--surface); box-shadow: 0 0 0 3px var(--ember-soft); }
.search-pop {
  position: absolute; top: calc(100% + 8px); inset-inline: 0;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 6px; box-shadow: none; max-height: 440px; overflow: auto; animation: pop .15s;
}
.sp-title { font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 8px 10px 4px; }
.sr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; }
.sr:hover, .sr.active { background: var(--surface-2); }
.sr .meta { flex: 1; min-width: 0; }
.sr .t { font-weight: 600; }
.sr .s { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr .cat-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: hsl(var(--h) 60% 20%); color: hsl(var(--h) 90% 75%); }
.sp-empty { padding: 18px; text-align: center; color: var(--text-3); }

.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.search-btn, .search-x, .top-back { display: none; }
.on-air {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border-radius: 999px; background: var(--ember-soft); color: var(--ember-300);
  border: 1px solid rgba(81, 179, 208, .35); font-weight: 700; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.on-air .dot { animation: pulse 1.4s infinite; }
.user-area { position: relative; }
.user-btn { display: flex; border-radius: 50%; transition: box-shadow .15s; }
.user-btn:hover { box-shadow: 0 0 0 3px var(--surface-3); }
.menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 240px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 6px; box-shadow: none; animation: pop .15s; z-index: 60;
}
.menu-head { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head b { display: block; }
.menu-head small { color: var(--text-3); }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  border-radius: 8px; color: var(--text-2); font-weight: 500; text-align: start;
}
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--text); }
.menu svg.i { width: 18px; height: 18px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); flex: 1; min-height: 0; }
.shell > * { min-height: 0; }
.tabbar { display: none; }
.sidebar { background: var(--bg-elev); border-inline-end: 1px solid var(--line); overflow-y: auto; padding: 10px 8px 20px; }
#view { overflow-y: auto; overflow-x: hidden; position: relative; }
#view.fill { overflow: hidden; }

.side-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text-3); padding: 12px 10px 6px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 2px; min-height: 36px; }
.side-head span { font-family: var(--display); font-weight: 600; font-size: 14px; padding-inline-start: 6px; }
.sb-btn { flex: none; margin-inline-end: -6px; }
.sb-backdrop { display: none; }
.side-nav { display: none; }
/* slim rail: avatars only */
body.sb-rail .shell { --side-w: 66px; }
body.sb-rail .sidebar { padding-inline: 6px; }
body.sb-rail .side-item { justify-content: center; padding: 6px; }
body.sb-rail .side-item .meta, body.sb-rail .side-item .vc, body.sb-rail .side-title span,
body.sb-rail .side-promo, body.sb-rail .side-foot, body.sb-rail .side-head span { display: none; }
body.sb-rail .side-title, body.sb-rail .side-head { justify-content: center; padding-inline: 0; }
body.sb-rail .side-item.current { box-shadow: none; }
/* hidden completely */
body.sb-hidden .shell { grid-template-columns: minmax(0, 1fr); }
body.sb-hidden .sidebar { display: none; }
.side-title svg.i { width: 16px; height: 16px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; transition: background .12s; }
.side-item:hover { background: var(--surface-2); }
.side-item.current { background: var(--surface-2); box-shadow: inset -3px 0 0 var(--ember); }
.side-item .meta { flex: 1; min-width: 0; }
.side-item .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .sub { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .vc { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.side-item.offline .avatar { filter: grayscale(1); opacity: .55; }
.side-item.offline .name { color: var(--text-2); }
.side-promo {
  margin: 18px 4px 6px; padding: 16px; border-radius: 14px;
  background: radial-gradient(120% 110% at 100% 0%, rgba(81, 179, 208, .28), transparent 60%), var(--surface);
  border: 1px solid var(--line);
}
.side-promo h4 { margin: 0 0 4px; font-family: var(--display); font-size: 15px; }
.side-promo p { color: var(--text-2); font-size: 12.5px; margin-bottom: 12px; }
.side-foot { padding: 12px 10px 0; font-size: 12px; color: var(--text-3); }
.side-foot a:hover { color: var(--ember-300); }

/* ---------- page / sections ---------- */
.page { padding: 26px 30px 70px; max-width: 1840px; margin: 0 auto; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 38px 0 14px; }
.sec-head h2 { font-size: 19px; font-weight: 600; }
.sec-head h2 em { font-style: normal; color: var(--ember); }
.sec-head a { color: var(--text-2); font-size: 13px; font-weight: 600; }
.sec-head a:hover { color: var(--ember-300); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px 16px; }
.empty {
  padding: 50px 20px; text-align: center; color: var(--text-2);
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
}
.empty svg.i { width: 34px; height: 34px; color: var(--text-3); margin-bottom: 8px; }

/* stream card */
.card { min-width: 0; }
.thumb-wrap { display: block; position: relative; border-radius: var(--r); background: var(--grad); }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
  background: var(--surface-2); container-type: inline-size;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.card:hover .thumb { transform: translate(6px, -6px); }
.thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-top { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; gap: 5px; }
.t-vc { position: absolute; bottom: 8px; inset-inline-start: 8px; }
.t-up { position: absolute; bottom: 8px; inset-inline-end: 8px; font-variant-numeric: tabular-nums; }
.card-body { display: flex; gap: 10px; margin-top: 11px; }
.card-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.card-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title:hover { color: var(--ember-300); }
.card-name { color: var(--text-2); font-size: 13px; }
.card-cat { color: var(--text-3); font-size: 13px; width: fit-content; }
.card-cat:hover, .card-name:hover { color: var(--ember-300); }
.card-tags { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }

/* generated art for demo channels */
.art {
  --h: 20; position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(60% 85% at 18% 28%, hsl(var(--h) 90% 55% / .55), transparent 62%),
    radial-gradient(55% 75% at 88% 82%, hsl(calc(var(--h) + 50) 90% 50% / .42), transparent 62%),
    linear-gradient(160deg, hsl(var(--h) 45% 16%), hsl(calc(var(--h) + 30) 50% 6%));
}
.art::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 70%); mask-image: linear-gradient(to top, #000, transparent 70%);
}
.art-icon { position: absolute; inset: 0; display: grid; place-items: center; color: hsl(var(--h) 90% 78% / .38); }
.art-icon svg.i { width: 30%; height: auto; stroke-width: 1.15; }
.art-cam {
  position: absolute; bottom: 9%; inset-inline-end: 4%; width: 25%; aspect-ratio: 4 / 3;
  border-radius: 7px; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 70% 38%), hsl(calc(var(--h) + 40) 70% 18%));
  border: 2px solid rgba(255, 255, 255, .16); box-shadow: none;
  font-family: var(--display); font-weight: 700; font-size: 9cqw; color: rgba(255, 255, 255, .92);
}

/* category card */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
/* home shows the 12 game categories: two rows of 6, or three rows of 4 — never a lonely one */
@media (min-width: 761px) { #h-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { #h-cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* the game categories' own artwork carries the Stremry mark already */
.cat-art.own-art .cat-mark { display: none; }
.cats-h { font-size: 15px; color: var(--text-2); margin: 26px 0 12px; }
.cats-h:first-child { margin-top: 0; }
.cat { display: block; min-width: 0; }
/* category cover in the Stremry identity: night base, ember glow, fine grid, ember-stroked icon */
.cat-art {
  --gx: 80%; --gy: 20%;
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(85% 60% at var(--gx) var(--gy), rgba(81, 179, 208, .42), transparent 62%),
    radial-gradient(70% 50% at calc(100% - var(--gx)) calc(100% - var(--gy)), rgba(238, 152, 79, .14), transparent 65%),
    linear-gradient(165deg, #1b1220 0%, #110d18 45%, #0B0E13 100%);
  border: 1px solid var(--line);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s;
}
.cat-art::before {  /* fine grid fading towards the top */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 75%); mask-image: linear-gradient(to top, #000 10%, transparent 75%);
}
.cat-art::after {  /* ember baseline */
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--grad); opacity: .9;
}
.cat:hover .cat-art { transform: translateY(-4px); border-color: rgba(81, 179, 208, .55); }
.cat-art .ico { position: absolute; inset: 0; display: grid; place-items: center; }
.cat-art .ico svg.i { width: 42%; height: auto; stroke-width: 1.4; }
.cat-ghost { position: absolute; inset-inline-end: -18%; bottom: -10%; width: 85%; color: rgba(255, 255, 255, .045); transform: rotate(-12deg); pointer-events: none; }
.cat-ghost svg.i { width: 100%; height: auto; stroke-width: 1; }
.cat-mark { position: absolute; top: 9px; inset-inline-end: 9px; width: 20px; height: 20px; opacity: .9; }
.cat-art .cat-live { position: absolute; top: 8px; inset-inline-start: 8px; }
.cat-art .cat-live .dot { width: 6px; height: 6px; }
/* with a photo: the picture fills the card, darkened at the bottom and warmed by the ember glow; the icon becomes a small chip */
.cat-art.has-photo { background: #0B0E13; }
.cat-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.cat:hover .cat-photo { transform: scale(1.05); }
.cat-art.has-photo::before {
  background: linear-gradient(180deg, rgba(11, 11, 15, .35) 0%, transparent 30%, transparent 55%, rgba(11, 11, 15, .8) 100%),
    radial-gradient(85% 60% at var(--gx) var(--gy), rgba(81, 179, 208, .18), transparent 62%);
  background-size: auto; -webkit-mask-image: none; mask-image: none;
}
.cat-art.has-photo .cat-ghost { display: none; }
.cat-art.has-photo .ico {
  inset: auto; bottom: 10px; inset-inline-start: 10px; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(11, 11, 15, .62); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(6px);
}
.cat-art.has-photo .ico svg.i { width: 18px; stroke-width: 2; }
.cat-name { font-weight: 600; margin-top: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat:hover .cat-name { color: var(--ember-300); }
.cat-meta { color: var(--text-3); font-size: 12.5px; }

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; position: relative;
}
.hero[hidden] { display: none; }
.hero-stage { position: relative; aspect-ratio: 16 / 9; background: #000; display: block; overflow: hidden; }
.hero-stage canvas, .hero-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-stage .t-top { top: 14px; inset-inline-start: 14px; }
.hero-stage .t-vc { bottom: 14px; inset-inline-start: 14px; }
.hero-progress { position: absolute; bottom: 0; inset-inline: 0; height: 3px; background: rgba(255,255,255,.08); }
.hero-progress i { display: block; height: 100%; width: 0; background: var(--grad); }
.hero-progress i.run { width: 100%; transition: width 8s linear; }
.hero-info {
  --h: 20; padding: 26px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  background: radial-gradient(110% 70% at 0% 0%, hsl(var(--h) 80% 50% / .16), transparent 60%);
}
.hero-who { display: flex; gap: 12px; align-items: center; }
.hero-who b { font-family: var(--display); font-size: 17px; font-weight: 600; display: block; }
.hero-who a.c { color: var(--ember-300); font-size: 13px; font-weight: 600; }
.hero-info h3 { font-size: 21px; font-weight: 600; line-height: 1.4; }
.hero-info .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.hero-info .desc { color: var(--text-2); font-size: 13.5px; }
.hero-strip { display: flex; gap: 8px; margin-top: auto; }
.hero-strip button {
  flex: 1; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; position: relative;
  outline: 2px solid transparent; outline-offset: 2px; opacity: .55; transition: opacity .15s, outline-color .15s;
  container-type: inline-size;
}
.hero-strip button:hover { opacity: .9; }
.hero-strip button.on { outline-color: var(--ember); opacity: 1; }
.hero-strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* promo */
.promo {
  margin-top: 44px; padding: 30px 34px; border-radius: var(--r-lg); position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 26px;
  background: linear-gradient(110deg, #0D1E2A, #10161E 45%, #0F1319);
  border: 1px solid #1E3A4C;
}
.promo::before {
  content: ''; position: absolute; width: 420px; height: 420px; inset-inline-start: -120px; top: -200px;
  background: radial-gradient(closest-side, rgba(81, 179, 208, .4), transparent); pointer-events: none;
}
.promo img { width: 72px; height: 72px; position: relative; }
.promo .txt { flex: 1; position: relative; }
.promo h3 { font-size: 24px; font-weight: 700; }
.promo p { color: var(--text-2); margin-top: 4px; }
.promo .btn { position: relative; }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); }

/* ---------- channel page ---------- */
.channel-page { display: grid; grid-template-columns: minmax(0, 1fr) var(--chat-w); height: 100%; }
.ch-main { overflow-y: auto; min-width: 0; }
.player {
  position: relative; background: #000; width: 100%; aspect-ratio: 16 / 9;
  max-height: calc(100vh - var(--top-h) - 150px); overflow: hidden;
}
.p-media > video, .p-media > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.p-media > .art-wrap { position: absolute; inset: 0; container-type: inline-size; }
.p-state {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  background: radial-gradient(70% 70% at 50% 40%, rgba(11,11,15,.55), rgba(11,11,15,.92));
}
.p-state .box { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 420px; }
.p-state h3 { font-size: 20px; }
.p-state p { color: var(--text-2); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--ember); animation: spin .8s linear infinite; }
.player-top { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; z-index: 2; }
.player-ctrls {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 4px; padding: 34px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  opacity: 0; transition: opacity .2s;
}
.player:hover .player-ctrls, .player:focus-within .player-ctrls { opacity: 1; }
.player-ctrls .icon-btn { color: #fff; }
.player-ctrls .icon-btn:hover { background: rgba(255,255,255,.12); }
.player-ctrls .spacer { flex: 1; }
.vol { width: 96px; accent-color: var(--ember); cursor: pointer; }
.unmute { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 4; animation: pop .2s; }

.ch-info { display: flex; gap: 16px; padding: 18px 24px; align-items: flex-start; }
.ch-info .who { flex: 1; min-width: 0; }
.ch-tabs { display: none; }
.ch-name { font-family: var(--display); font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.verified { color: var(--ember); display: inline-flex; }
.verified svg.i { width: 19px; height: 19px; }
.ch-title { font-size: 15px; margin-top: 3px; font-weight: 500; }
.ch-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 9px; }
.ch-cat { color: var(--ember-300); font-weight: 600; }
.ch-cat:hover { text-decoration: underline; }
.ch-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex: none; }
.ch-actions .row { display: flex; gap: 8px; }
.ch-stats { display: flex; gap: 16px; color: var(--text-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ch-stats span { display: inline-flex; align-items: center; gap: 5px; }
.ch-stats .v { color: var(--ember-300); font-weight: 600; }
.ch-stats svg.i { width: 16px; height: 16px; }
.btn-follow.on { background: var(--surface-3); color: var(--text); box-shadow: none; }
.btn-follow.on svg.i { fill: var(--ember); stroke: var(--ember); }
/* the channel's own look: --acc is the streamer's accent colour */
.channel-page { --acc: var(--ember); }
.channel-page .btn-follow:not(.on) {
  background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #EE984F));
  box-shadow: none;
}
.channel-page .ch-cat { color: color-mix(in srgb, var(--acc) 70%, #fff); }
.p-media .p-banner { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; }
.p-state.offline { background: linear-gradient(180deg, rgba(11, 11, 15, 0) 30%, rgba(11, 11, 15, .9)); place-items: end center; padding-bottom: 26px; }
.player.is-offline .player-ctrls, .player.is-offline .unmute { display: none; }   /* nothing to play */
.p-blur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(26px) brightness(.45); transform: scale(1.15); }
.p-banner.bnp-img { background: transparent; }
.p-banner.bnp-img > img { object-fit: contain; object-position: center top; }
.p-state .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.next-pill { height: 30px; padding: 0 12px; gap: 6px; background: rgba(11, 11, 15, .72); border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent); color: var(--text-2); }
.next-pill b { color: var(--text); }
.next-pill svg.i { width: 15px; height: 15px; color: var(--acc); }

.ch-extra { padding: 4px 24px 40px; display: flex; flex-direction: column; gap: 16px; }
.about-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.about-banner { aspect-ratio: 4 / 1; }   /* same 4:1 as the upload crop — the whole cover shows */
.about-body { padding: 0 24px 22px; }
.about-h { font-size: 17px; padding-top: 18px; }
.ch-fol { color: var(--text-3); font-size: 13px; }
.ch-fol::before { content: '·'; margin-inline-end: 8px; }
.about-bio { color: var(--text-2); margin-top: 6px; max-width: 760px; white-space: pre-line; overflow-wrap: anywhere; }
/* social accounts — quiet buttons, only the network's mark keeps its colour */
.sb-x, .sb-tiktok { --sb: #EDEDF0; }
.sb-instagram { --sb: #E4407B; }
.sb-youtube { --sb: #FF3B4E; }
.sb-snapchat { --sb: #F5E50A; }
.sb-discord { --sb: #8891F7; }
.socials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.soc-btn {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: var(--text-3); background: var(--surface-2); transition: color .15s, background .15s;
}
.soc-btn:hover { color: var(--text); background: var(--surface-3); }
.soc-btn svg.i { width: 17px; height: 17px; }
/* small round links (customise-page preview) */
.soc-mini { display: flex; gap: 6px; margin-top: 10px; }
.soc-mini .sb { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.soc-mini svg.i { width: 15px; height: 15px; }

.ch-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.ch-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 14px; }
.ch-sec h3 svg.i { color: var(--acc); }
.sched-next {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; margin-bottom: 14px; border-radius: 12px; color: var(--text-2);
  background: color-mix(in srgb, var(--acc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent);
}
.sched-next b { color: var(--text); font-family: var(--display); }
.sched-next svg.i { width: 17px; height: 17px; color: var(--acc); }
.sched-next.now svg.i { animation: pulse 1.6s infinite; }
.sched-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.sd { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; min-height: 96px; display: flex; flex-direction: column; gap: 1px; }
.sd small { color: var(--text-3); font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.sd b { font-family: var(--display); font-size: 16px; }
.sd span { color: var(--text-2); font-size: 12px; }
.sd span.off { color: var(--text-3); margin-top: auto; }
.sd em { font-style: normal; font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--acc) 75%, #fff); margin-top: 4px; }
.sd.on { border-color: color-mix(in srgb, var(--acc) 30%, var(--line)); }
.sd.today { box-shadow: inset 0 3px 0 var(--acc); }
.sd.today small { color: var(--text); }

.ch-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.ch-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 18px 18px; position: relative; overflow: hidden; }
.ch-panel::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--acc), color-mix(in srgb, var(--acc) 40%, #EE984F)); }
.ch-panel h4 { font-family: var(--display); font-size: 15.5px; margin: 0 0 8px; }
.ch-panel p { color: var(--text-2); overflow-wrap: anywhere; }
.pn-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: color-mix(in srgb, var(--acc) 70%, #fff); font-weight: 600; font-size: 13px; }
.pn-link:hover { text-decoration: underline; }
.pn-link svg.i { width: 16px; height: 16px; }

/* banners: uploaded image, or a preset drawn in CSS that takes the channel's accent */
.banner { --acc: #51B3D0; position: relative; overflow: hidden; aspect-ratio: 4 / 1; background-color: #0D0C12; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.banner > i { position: absolute; inset: 0; }
.bnp-ember {
  background:
    radial-gradient(55% 140% at 88% -10%, color-mix(in srgb, var(--acc) 75%, transparent), transparent 62%),
    radial-gradient(45% 120% at 8% 115%, color-mix(in srgb, var(--acc) 40%, #EE984F 25%), transparent 60%),
    linear-gradient(180deg, #131019, #0B0E13);
}
.bnp-ember > i { background: url('/assets/logo.png') no-repeat right 4% center / auto 46%; opacity: .1; filter: grayscale(1) brightness(2); }
.bnp-grid {
  background:
    radial-gradient(50% 110% at 50% 120%, color-mix(in srgb, var(--acc) 65%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--acc) 26%, transparent) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--acc) 26%, transparent) 0 1px, transparent 1px 44px),
    #0C0B11;
}
.bnp-grid > i { background: linear-gradient(180deg, #0C0B11 5%, rgba(12, 11, 17, .4) 55%, transparent); }
.bnp-duo { background: linear-gradient(120deg, color-mix(in srgb, var(--acc) 70%, #000) 0%, var(--acc) 42%, color-mix(in srgb, var(--acc) 45%, #EE984F) 100%); }
.bnp-duo > i { background: linear-gradient(120deg, transparent 38%, rgba(255, 255, 255, .16) 48%, transparent 58%), linear-gradient(0deg, rgba(0, 0, 0, .35), transparent 60%); }
.bnp-stripes {
  background:
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--acc) 24%, transparent) 0 14px, transparent 14px 36px),
    linear-gradient(90deg, #0E0C12 10%, color-mix(in srgb, var(--acc) 34%, #0E0C12));
}
.bnp-stripes > i { background: radial-gradient(70% 140% at 30% 50%, #0E0C12 20%, transparent 75%); }
.bnp-dots {
  background:
    radial-gradient(color-mix(in srgb, var(--acc) 60%, transparent) 1.3px, transparent 1.9px) 0 0 / 18px 18px,
    radial-gradient(60% 130% at 50% 50%, color-mix(in srgb, var(--acc) 30%, transparent), transparent 70%),
    #0C0B11;
}
.bnp-dots > i { background: linear-gradient(90deg, #0C0B11, transparent 28%, transparent 72%, #0C0B11); }
.bnp-horizon {
  background:
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--acc) 30%, transparent) 0 1px, transparent 1px 12px) 0 100% / 100% 32% no-repeat,
    linear-gradient(180deg, #0B0A12 0%, #1B1026 38%, color-mix(in srgb, var(--acc) 72%, #1B1026) 68%, #0B0E13 68.2%);
}
.bnp-horizon > i {
  background:
    radial-gradient(circle at 50% 68%, color-mix(in srgb, var(--acc) 40%, #FFD27A) 0 7%, transparent 7.3%),
    radial-gradient(30% 60% at 50% 68%, color-mix(in srgb, var(--acc) 50%, transparent), transparent 70%);
  clip-path: inset(0 0 32% 0);
}
.bnp-mesh {
  background:
    radial-gradient(40% 95% at 18% 30%, color-mix(in srgb, var(--acc) 62%, transparent), transparent 70%),
    radial-gradient(36% 95% at 76% 72%, color-mix(in srgb, var(--acc) 35%, #7C5CFF 32%), transparent 70%),
    radial-gradient(30% 85% at 56% 6%, color-mix(in srgb, var(--acc) 30%, #EE984F 32%), transparent 70%),
    #0D0C13;
}
.bnp-mesh > i { backdrop-filter: blur(1px); background: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 3px 3px; }
.bnp-plain { background: radial-gradient(40% 90% at 50% 100%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 70%), linear-gradient(180deg, #17161E, #0E0D13); }
.bnp-plain > i { background: linear-gradient(90deg, transparent, var(--acc), transparent) 50% 100% / 70% 2px no-repeat; }

/* ---------- customise channel ---------- */
.cz-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.cz-top .muted { margin-top: 4px; }
.cz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; margin-top: 20px; align-items: start; }
.cz-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.cz-tabs::-webkit-scrollbar { display: none; }
.cz-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; font-weight: 600; color: var(--text-2); position: relative; white-space: nowrap; }
.cz-tabs button svg.i { width: 17px; height: 17px; }
.cz-tabs button:hover { color: var(--text); }
.cz-tabs button.on { color: var(--text); }
.cz-tabs button.on svg.i { color: var(--ember); }
.cz-tabs button.on::after { content: ''; position: absolute; inset-inline: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad); }
.cz-pane { padding-top: 18px; display: flex; flex-direction: column; gap: 16px; animation: fade .15s; }
.cz-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.cz-sec-h { margin-bottom: 16px; }
.cz-sec-h h3 { font-size: 16px; }
.cz-sec-h p { color: var(--text-3); font-size: 13px; margin-top: 3px; }
.cz-sec .field { margin-bottom: 0; }
.cz-count { align-self: flex-end; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cz-cover { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); }
.cz-cover-acts { position: absolute; bottom: 12px; inset-inline-end: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.bn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bn-opt { border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--surface-2); text-align: start; transition: border-color .15s, transform .15s; }
.bn-opt .banner { aspect-ratio: 3 / 1; }
.bn-opt span { display: block; padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.bn-opt:hover { transform: translateY(-2px); border-color: var(--line-2); }
.bn-opt.on { border-color: var(--ember); }
.bn-opt.on span { color: var(--text); }
.cz-av { display: flex; gap: 18px; align-items: center; }
.cz-av .row { display: flex; gap: 8px; flex-wrap: wrap; }
.cz-av .hint { margin-top: 8px; }
.acc-sw { gap: 10px; }
.acc-sw .sw { width: 34px; height: 34px; }
.sw-custom { display: inline-grid; place-items: center; position: relative; cursor: pointer; color: #fff; background: conic-gradient(#FF3D3D, #EE984F, #9BE15D, #22C3E6, #7C5CFF, #E84393, #FF3D3D); }
.sw-custom svg.i { width: 16px; height: 16px; }
.sw-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.soc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.soc-in { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.soc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.soc-in .soc-field { background: var(--surface); }
/* same quiet marks as the channel page */
.soc-ic { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--text-2); }
.soc-ic svg.i { width: 17px; height: 17px; }
.soc-name { font-weight: 600; font-size: 13px; color: var(--text-2); }
.soc-field { display: flex; align-items: center; height: 40px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.soc-field:focus-within { border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.soc-field .pre { color: var(--text-3); font-size: 12.5px; padding-left: 10px; white-space: nowrap; }
.soc-field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; padding: 0 10px 0 1px; }
.pn-list { display: flex; flex-direction: column; gap: 12px; }
.pn-ed { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.pn-ed .input { background: var(--surface); }
.pn-ed-h { display: flex; align-items: center; gap: 2px; }
.pn-ed-h b { flex: 1; font-size: 13px; color: var(--text-2); }
.pn-ed-h .icon-btn { width: 32px; height: 32px; }
.pn-ed-h .icon-btn svg.i { width: 17px; height: 17px; }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }
.icon-btn.danger:hover { color: #FF8091; background: rgba(255, 84, 104, .12); }
.pn-link-in { position: relative; }
.pn-link-in > svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.pn-link-in .input { padding-left: 36px; }
.pn-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.pn-add .chip { display: inline-flex; align-items: center; gap: 5px; }
.pn-add .chip svg.i { width: 14px; height: 14px; }
.pn-empty { padding: 22px; text-align: center; color: var(--text-3); border: 1.5px dashed var(--line-2); border-radius: 14px; }
.sc-list { display: flex; flex-direction: column; gap: 8px; }
.sc-row { display: grid; grid-template-columns: 130px auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .15s; }
.sc-row.on { border-color: rgba(81, 179, 208, .35); }
.sc-row:not(.on) .sc-times, .sc-row:not(.on) .sc-note { opacity: .4; }
.sc-day { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sc-times { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; }
.sc-times .input { width: 124px; height: 38px; background: var(--surface); }
.sc-note { height: 38px; background: var(--surface); }
/* live preview */
.cz-sticky { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px; }
.cz-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-3); margin-top: 4px; }
.cz-label svg.i { width: 15px; height: 15px; }
#cz-prev { display: flex; flex-direction: column; gap: 10px; }
.pv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.pv-body { padding: 14px 16px 16px; }
.pv-head { display: flex; align-items: center; gap: 10px; }
.pv-id { flex: 1; min-width: 0; }
.pv-about { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.pv-about > b { display: block; font-family: var(--display); font-size: 13.5px; }
.pv-about .pv-bio { margin-top: 4px; }
.pv-about .soc-mini .sb { background: var(--surface-3); }
.pv-id b { display: block; font-family: var(--display); font-size: 15px; }
.pv-id small { color: var(--text-3); font-size: 12px; }
.pv-follow { background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 55%, #EE984F)); color: #fff; pointer-events: none; }
.pv-bio { color: var(--text-2); font-size: 13px; margin-top: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.pv-card .soc-mini { margin-top: 12px; }
.pv-panels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pv-panels span { font-size: 11.5px; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); border-top: 2px solid var(--acc); color: var(--text-2); }
.pv-offline { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.pv-offline .banner { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; }
/* same as the real offline player: the text sits low, over a gradient */
.pv-off-box { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; text-align: center; padding: 12px 14px 14px; background: linear-gradient(180deg, rgba(11, 11, 15, 0) 30%, rgba(11, 11, 15, .9)); }
.pv-off-box b { font-size: 14px; font-family: var(--display); }
.pv-off-box small { color: var(--text-2); font-size: 12px; max-width: 280px; }
.pv-off-box .next-pill { height: 24px; font-size: 11px; padding: 0 9px; }
.pv-off-box .next-pill svg.i { width: 13px; height: 13px; }
#cz-prev .msg.welcome { margin: 0; }
.cz-bar {
  position: sticky; bottom: 16px; z-index: 30; max-width: 720px; margin: 22px auto 0;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px;
  background: rgba(28, 28, 37, .94); backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: none; animation: pop .2s;
}
.cz-bar > span { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cz-bar > span svg.i { color: var(--ember); width: 18px; height: 18px; }
/* image cropper */
.modal.modal-crop { width: min(760px, 100%); }
.crop-stage { position: relative; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line-2); touch-action: none; }
.crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-stage.round { width: min(340px, 100%); margin-inline: auto; }
.crop-stage.round::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle closest-side, transparent calc(100% - 2px), rgba(255, 255, 255, .8) calc(100% - 2px), rgba(255, 255, 255, .8) 100%, rgba(0, 0, 0, .6) 100%);
}
.crop-zoom { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--text-3); }
.crop-zoom input { flex: 1; accent-color: var(--ember); cursor: pointer; }
.crop-zoom svg.i:first-child { width: 15px; height: 15px; }
.crop-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* chat */
.chat { display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--bg-elev); border-inline-start: 1px solid var(--line); }
.chat-head {
  height: 50px; flex: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-bottom: 1px solid var(--line); font-weight: 700; font-size: 13px; color: var(--text-2);
}
.chat-head svg.i { width: 17px; height: 17px; }
.chat-body { flex: 1; position: relative; min-height: 0; }
.chat-list { position: absolute; inset: 0; overflow-y: auto; padding: 10px 0; }
.msg { padding: 4px 14px; font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.msg:hover { background: rgba(255,255,255,.03); }
.msg .u { font-weight: 700; unicode-bidi: isolate; cursor: default; }
.msg .colon { margin-inline-end: 5px; }
.msg .txt { unicode-bidi: plaintext; }
.badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; vertical-align: -4px; margin-inline-end: 4px; }
.badge svg.i { width: 12px; height: 12px; stroke: #fff; stroke-width: 2.4; }
.badge.host { background: var(--grad); }
.badge.vip { background: #B78CFF; }
.msg.sys { color: var(--text-3); font-size: 12.5px; text-align: center; padding: 8px 18px; }
.msg.welcome {
  margin: 4px 10px 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--text);
  background: linear-gradient(135deg, rgba(81, 179, 208, .14), rgba(238, 152, 79, .07)); border: 1px solid rgba(81, 179, 208, .3);
}
.msg.welcome:hover { background: linear-gradient(135deg, rgba(81, 179, 208, .14), rgba(238, 152, 79, .07)); }
.msg.event {
  margin: 6px 10px; padding: 9px 12px; border-radius: 9px; font-weight: 600;
  background: var(--ember-soft); border-inline-start: 3px solid var(--ember);
  display: flex; align-items: center; gap: 8px;
}
.msg.event svg.i { color: var(--ember); width: 18px; height: 18px; }
.msg.mentioned { background: rgba(81, 179, 208, .1); box-shadow: inset -3px 0 0 var(--ember); }
.mention { background: rgba(238, 152, 79, .16); color: #FFD28A; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.chat-paused {
  position: absolute; bottom: 10px; inset-inline: 14px; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px;
  background: rgba(21, 21, 28, .92); backdrop-filter: blur(6px); border: 1px solid var(--line-2);
  border-radius: 9px; font-size: 12.5px; font-weight: 600; animation: pop .15s;
}
.chat-paused:hover { border-color: var(--ember); }
.chat-paused svg.i { width: 16px; height: 16px; }
.chat-input { padding: 12px; border-top: 1px solid var(--line); flex: none; position: relative; }
.ci-box {
  display: flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 11px;
  transition: border-color .15s, box-shadow .15s;
}
.ci-box:focus-within { border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.ci-box input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 0 10px; height: 36px; }
.ci-box .icon-btn { width: 34px; height: 34px; }
.ci-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; gap: 8px; }
.ci-foot .as { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-foot .as b { unicode-bidi: isolate; }
.emoji-pop {
  position: absolute; bottom: calc(100% - 4px); inset-inline: 12px; z-index: 5;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: none; animation: pop .15s;
}
.emoji-pop button { font-size: 20px; height: 36px; border-radius: 8px; }
.emoji-pop button:hover { background: var(--surface-3); }
.chat-login { text-align: center; }
.chat-login p { color: var(--text-3); font-size: 12.5px; margin-bottom: 10px; }

/* ---------- browse ---------- */
.page-title { font-size: 34px; font-weight: 700; letter-spacing: -.6px; }
.tabs { display: flex; gap: 4px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--text-2); position: relative; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); }
.tabs a.on::after { content: ''; position: absolute; inset-inline: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad); }
.cat-hero { display: flex; gap: 22px; align-items: flex-end; }
.cat-hero .cat-art { width: 130px; flex: none; }
.cat-hero .cat-art:hover { transform: none; }
.cat-hero .cat-mark { width: 16px; height: 16px; top: 7px; inset-inline-end: 7px; }
.cat-hero .stats { display: flex; gap: 14px; color: var(--text-2); margin-top: 8px; }
.cat-hero .stats b { color: var(--text); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; margin-bottom: 14px; }
.back:hover { color: var(--ember-300); }
.back svg.i { width: 16px; height: 16px; }

/* ---------- studio ---------- */
.studio { padding: 26px 30px 60px; max-width: 1640px; margin: 0 auto; }
.studio-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.studio-head h1 { font-size: 28px; }
.studio-head p { color: var(--text-2); margin-top: 4px; }
.eyebrow { color: var(--ember-300); font-weight: 700; font-size: 12.5px; margin-bottom: 4px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; margin-top: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.panel h3 { font-size: 15px; margin-bottom: 14px; }
.preview { border-radius: var(--r-lg); border: 1px solid var(--line); max-height: none; }
.preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.preview video.mirror { transform: scaleX(-1); }
.preview-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--text-2);
  background: radial-gradient(60% 70% at 50% 40%, rgba(81,179,208,.12), transparent 70%), var(--bg-elev); }
.preview-empty .box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.preview-empty img { width: 64px; opacity: .9; }
.preview-off { position: absolute; inset: 0; display: grid; place-items: center; background: #050507; color: var(--text-3); gap: 8px; }
.src-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.src-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; color: var(--text-2);
  transition: border-color .15s, background .15s, color .15s;
}
.src-btn:hover { color: var(--text); border-color: var(--hover); }
.src-btn.on { border-color: var(--ember); color: var(--text); background: var(--ember-soft); }
.src-btn.off { color: #FF8091; border-color: rgba(255,84,104,.4); background: rgba(255,84,104,.08); }
.src-sep { width: 1px; height: 26px; background: var(--line-2); margin-inline: 4px; }
.meter { width: 70px; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--amber), var(--flare)); transition: width .08s; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat .k { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat .k svg.i { width: 15px; height: 15px; }
.stat .v { font-family: var(--display); font-size: 22px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat.hot { border-color: rgba(81, 179, 208, .45); background: linear-gradient(160deg, rgba(81,179,208,.14), var(--surface) 70%); }
.stat.hot .v { color: var(--ember-300); }
.share-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.share-row code {
  flex: 1; min-width: 0; direction: ltr; text-align: left; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2);
}
.hint { color: var(--text-3); font-size: 12.5px; margin-top: 10px; }
.st-tabs, .st-bar { display: none; }
.studio .chat { height: 470px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: 16px; }
.gate-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gate.app-only { max-width: 560px; }
.app-steps { text-align: start; margin: 18px auto 22px; padding-inline-start: 22px; line-height: 2.1; color: var(--text-2); max-width: 440px; }
.app-steps li::marker { color: var(--ember-400, #51B3D0); font-weight: 700; }
.app-note { margin-top: 14px; font-size: 13px; }

/* settings: streaming from OBS */
.obs-steps { margin: 0 0 12px; padding-inline-start: 20px; color: var(--text-2); }
.obs-steps li { margin: 3px 0; }
.obs-steps b { color: var(--text); }
.obs-field { margin-bottom: 10px; }
.obs-field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 5px; }
.obs-field label small { font-weight: 500; color: var(--text-3); }
.copy-row { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px 3px 3px 12px; }
.copy-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ember-300); text-align: left; }
.copy-row .icon-btn { width: 32px; height: 32px; flex: none; }
.copy-row .icon-btn svg.i { width: 16px; height: 16px; }
/* the own-OBS section: folded away (the app is the way), the exact settings to copy */
.obs-pro > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.obs-pro > summary::-webkit-details-marker { display: none; }
.obs-pro > summary h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.obs-pro > summary h3::after { content: '▾'; margin-inline-start: auto; color: var(--text-3); transition: transform .2s; }
.obs-pro[open] > summary h3::after { transform: rotate(180deg); }
.obs-pro[open] > summary { margin-bottom: 14px; }
.pro-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(238, 152, 79, .14); color: #EE984F; }
.obs-tip { display: flex; gap: 8px; align-items: flex-start; background: rgba(81, 179, 208, .08); border: 1px solid rgba(81, 179, 208, .25); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--text-2); margin: 0 0 14px; }
.obs-tip svg.i { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--ember-400, #51B3D0); }
.obs-h { font-size: 14px; margin: 16px 0 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.obs-h small { color: var(--text-3); font-weight: 500; font-size: 12px; }
.obs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.obs-table th { text-align: start; font-weight: 600; color: var(--text-2); padding: 7px 0; width: 38%; vertical-align: top; direction: ltr; text-align: left; }
.obs-table td { padding: 7px 6px; vertical-align: top; }
.obs-table td code { color: var(--ember-300); font-size: 13px; }
.obs-table td small { display: block; color: var(--text-3); font-size: 11.5px; margin-top: 2px; }
.obs-table td:last-child { width: 36px; padding: 2px 0; }
.obs-table tr + tr { border-top: 1px solid var(--line); }
.obs-limits { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-3); margin: 12px 0; }
.obs-limits svg.i { flex: none; width: 15px; height: 15px; margin-top: 2px; }

/* the platform's own confirmation dialog */
.modal.modal-ask { width: min(400px, 100%); padding: 30px 26px 22px; text-align: center; }
.ask-ico { width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: none; }
.ask-ico svg.i { width: 26px; height: 26px; }
.ask.danger .ask-ico { background: linear-gradient(135deg, #FF5468, #E0324A); box-shadow: none; }
.modal .ask h2 { font-size: 20px; margin-bottom: 6px; }
.modal .ask p { color: var(--text-2); margin: 0; line-height: 1.7; }
.ask-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.ask-acts .btn { width: 100%; }
.btn-danger-solid { background: linear-gradient(135deg, #FF5468, #E0324A); color: #fff; box-shadow: none; }
.btn-danger-solid:hover { filter: brightness(1.08); }

/* stream summary */
.modal.modal-sum { width: min(560px, 100%); padding: 0; }
.sum-hero { text-align: center; padding: 30px 24px 18px; background: radial-gradient(70% 90% at 50% 0%, rgba(81, 179, 208, .22), transparent 70%); }
.sum-hero img { width: 60px; margin-bottom: 10px; animation: pop .5s cubic-bezier(.2, .9, .3, 1.4); }
.modal .sum-hero h2 { font-size: 24px; margin-bottom: 4px; }
.modal .sum-hero p { color: var(--text-2); margin: 0; }
.sum-title { display: inline-block; margin-top: 12px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 6px 24px 0; }
.sum-card { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 14px 10px 12px; text-align: center; animation: pop .35s both; }
.sum-card:nth-child(2) { animation-delay: .05s; } .sum-card:nth-child(3) { animation-delay: .1s; } .sum-card:nth-child(4) { animation-delay: .15s; }
.sum-card:nth-child(5) { animation-delay: .2s; } .sum-card:nth-child(6) { animation-delay: .25s; }
.sum-ic { display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 11px; background: var(--surface-3); color: var(--ember-300); }
.sum-ic svg.i { width: 18px; height: 18px; }
.sum-card b { display: block; font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.sum-card small { color: var(--text-3); font-size: 12px; }
.sum-card.hot { border-color: rgba(81, 179, 208, .5); background: linear-gradient(160deg, rgba(81, 179, 208, .16), var(--surface-2) 70%); }
.sum-card.hot b { color: var(--ember-300); }
.sum-sup { margin: 16px 24px 0; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); }
.sum-sup .fan { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.sum-sup .fan b { flex: 1; }
.sum-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 18px 24px 22px; }
.sum-acts .btn:only-child { grid-column: 1 / -1; }

/* Windows app: the top bar is the window's title bar (drag to move; Windows' buttons sit at its right end) */
/* --wco-l / --wco-r: the space Windows' own buttons take (left on Arabic Windows, right on English) */
html.wco .topbar { -webkit-app-region: drag; app-region: drag; padding-left: calc(14px + var(--wco-l, 0px)); padding-right: calc(14px + var(--wco-r, 0px)); }
html.wco .topbar :is(a, button, input, select, .search, .search-pop, .user-area, .menu, .coin-pill) { -webkit-app-region: no-drag; app-region: no-drag; }
html.wco .modal-back, html.wco .toasts { -webkit-app-region: no-drag; app-region: no-drag; }

/* Windows app: screen / window picker with live thumbnails */
.modal.modal-dp { width: min(980px, 100%); padding: 0; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 22px 24px 14px; padding-inline-end: 64px; }
.modal .dp-head h2 { margin: 0; font-size: 21px; }
.dp-head h2 svg.i { width: 22px; height: 22px; vertical-align: -3px; color: var(--ember); fill: none !important; stroke: var(--ember) !important; }
.dp-tabs { width: auto; }
.dp-tabs button { flex: none; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dp-tabs svg.i { width: 16px; height: 16px; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; padding: 4px 24px 18px; max-height: min(52vh, 460px); overflow-y: auto; min-height: 160px; align-content: start; }
.dp-wait { grid-column: 1 / -1; display: grid; place-items: center; min-height: 150px; }
.dp-empty { grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 40px 10px; }
.dp-item { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 14px; text-align: start; background: var(--surface-2); border: 2px solid transparent; transition: border-color .15s, background .15s; min-width: 0; }
.dp-item:hover { border-color: var(--line-2); background: var(--surface-3); }
.dp-item.on { border-color: var(--ember); background: linear-gradient(160deg, rgba(81, 179, 208, .16), var(--surface-2) 70%); }
.dp-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #050507; display: block; }
.dp-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dp-check { position: absolute; top: 6px; inset-inline-end: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: none; }
.dp-check svg.i { width: 15px; height: 15px; stroke-width: 3; }
.dp-name { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 0 2px; }
.dp-name img, .dp-name svg.i { width: 18px; height: 18px; flex: none; color: var(--text-3); }
.dp-name b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-foot { display: flex; align-items: center; gap: 14px; padding: 14px 24px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-dp .dp-audio { flex: 1; min-width: 240px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.dp-acts { display: flex; gap: 8px; }
.dp-acts .btn { min-width: 130px; }

/* screen-share picker */
.modal.modal-pick { width: min(520px, 100%); }
.modal-pick h2 svg.i { width: 22px; height: 22px; vertical-align: -3px; color: var(--ember); fill: none !important; stroke: var(--ember) !important; }
.sp-kinds { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sp-kind { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; text-align: start; background: var(--surface-2); border: 1.5px solid var(--line-2); transition: border-color .15s, background .15s; }
.sp-kind:hover { border-color: var(--hover); }
.sp-kind.on { border-color: var(--ember); background: linear-gradient(135deg, rgba(81, 179, 208, .14), rgba(238, 152, 79, .04)); }
.sp-txt b { display: block; font-size: 15px; }
.sp-txt small { color: var(--text-3); font-size: 12.5px; }
.sp-art { position: relative; width: 74px; height: 50px; flex: none; border-radius: 9px; background: #0E0D13; border: 1.5px solid var(--line-2); overflow: hidden; }
.sp-kind.on .sp-art { border-color: rgba(81, 179, 208, .6); }
.sp-art i, .sp-art b { position: absolute; display: block; }
.sp-monitor i { inset: 5px; border-radius: 4px; background: linear-gradient(135deg, rgba(81, 179, 208, .7), rgba(238, 152, 79, .5)); }
.sp-monitor b { bottom: 0; left: 30%; right: 30%; height: 3px; background: var(--line-2); }
.sp-window i { inset: 5px; border-radius: 4px; background: #1A2029; }
.sp-window b { top: 11px; left: 14px; right: 10px; bottom: 9px; border-radius: 4px; background: linear-gradient(135deg, rgba(81, 179, 208, .75), rgba(238, 152, 79, .5)); box-shadow: inset 0 5px 0 rgba(255, 255, 255, .25); }
.sp-browser i { top: 5px; left: 5px; width: 26px; height: 7px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, #51B3D0, #EE984F); }
.sp-browser b { top: 12px; left: 5px; right: 5px; bottom: 5px; border-radius: 0 4px 4px 4px; background: rgba(81, 179, 208, .35); }
.modal-pick .sp-audio { margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.sp-note { display: flex; gap: 8px; align-items: flex-start; color: var(--text-3); font-size: 12.5px; margin: 12px 0 0 !important; line-height: 1.6; }
.sp-note svg.i { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.modal-pick .ask-acts { flex-direction: row; margin-top: 18px; }
@media (max-width: 520px) { .sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* safety: report · block · delete account */
.msg .u { cursor: pointer; }
.modal-sheet { padding-top: 24px; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-inline-end: 34px; }
.sheet-head b { font-family: var(--display); font-size: 17px; }
.sheet-quote { color: var(--text-2); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sheet-list { display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.sheet-list button { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 600; text-align: start; border-bottom: 1px solid var(--line-2); }
.sheet-list button:last-child { border-bottom: 0; }
.sheet-list button:hover { background: var(--surface-3); }
.sheet-list button svg.i { color: var(--text-2); }
.sheet-list button.danger, .sheet-list button.danger svg.i { color: #FF8091; }
.rep-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rep-r { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); cursor: pointer; font-weight: 600; font-size: 13.5px; }
.rep-r:has(input:checked) { border-color: var(--ember); background: var(--ember-soft); }
.rep-r input { accent-color: var(--ember); margin: 0; }
.modal h2 svg.i.i { vertical-align: -3px; }
.danger-h, .danger-h svg.i { color: #FF8091; fill: none !important; stroke: #FF8091 !important; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); margin: -4px 0 16px; cursor: pointer; line-height: 1.6; }
.agree input { accent-color: var(--ember); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.agree a { color: var(--ember-300); font-weight: 600; }
.set-links { display: flex; flex-direction: column; gap: 4px; }
.set-links a { display: flex; align-items: center; gap: 6px; padding: 8px 0; color: var(--text-2); font-weight: 600; }
.set-links a:hover { color: var(--ember-300); }
.set-links svg.i { width: 16px; height: 16px; }
.blocked-tag { cursor: pointer; }
.blocked-tag:hover { background: rgba(255, 84, 104, .15); color: #FF8091; }

/* following */
.fl-none { display: flex; gap: 10px; align-items: center; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line-2); color: var(--text-2); }
.fl-none svg.i { color: var(--text-3); }
.fl-list { display: flex; flex-direction: column; gap: 6px; }
.fl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: background .15s; }
.fl-row:hover { background: var(--surface-2); }
.fl-row .meta { flex: 1; min-width: 0; }
.fl-row .meta b { display: block; }
.fl-row .meta small { color: var(--text-3); font-size: 12.5px; }
.fl-row > svg.i { color: var(--text-3); width: 18px; height: 18px; }

/* me (account hub) */
.page.me { max-width: 640px; }
.me-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.me-id { display: flex; align-items: flex-end; gap: 14px; padding: 0 18px; margin-top: -34px; position: relative; }
.me-id .avatar { box-shadow: 0 0 0 4px var(--surface); }
.me-name { min-width: 0; padding-bottom: 4px; }
.me-name h1 { font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-name small { color: var(--text-3); }
.me-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px 18px 18px; }
.me-wallet {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(81, 179, 208, .16), rgba(238, 152, 79, .06)); border: 1px solid rgba(81, 179, 208, .35);
}
.me-wallet > div { flex: 1; }
.me-wallet b { display: block; font-family: var(--display); font-size: 22px; line-height: 1.2; }
.me-wallet small { color: var(--text-2); }
.me-coin { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); }
.me-coin svg.i { color: #fff; fill: rgba(255, 255, 255, .25); }
.me-list { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.me-list a { display: flex; align-items: center; gap: 12px; padding: 15px 16px; font-weight: 600; border-bottom: 1px solid var(--line); transition: background .15s; }
.me-list a:last-child { border-bottom: 0; }
.me-list a:hover { background: var(--surface-2); }
.me-list a > svg.i:first-child { color: var(--ember); }
.me-list a span { flex: 1; }
.me-list .go { color: var(--text-3); width: 18px; height: 18px; }
.me-logout {
  margin-top: 12px; width: 100%; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #FF8091; background: rgba(255, 84, 104, .08); border: 1px solid rgba(255, 84, 104, .25); font-weight: 600;
}
.me-guest { text-align: center; padding: 18px 4px 6px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.me-guest img { width: 76px; }
.me-guest h1 { font-size: 22px; }
.me-guest p { color: var(--text-2); margin-bottom: 6px; }

.gate { max-width: 460px; margin: 10vh auto; text-align: center; }
.gate img { width: 84px; margin-bottom: 18px; }
.gate h1 { font-size: 26px; margin-bottom: 8px; }
.gate p { color: var(--text-2); margin-bottom: 22px; }

/* ---------- brand page ---------- */
.bp-hero {
  display: flex; gap: 30px; align-items: center; padding: 40px; border-radius: 24px; position: relative; overflow: hidden;
  background: radial-gradient(80% 120% at 0% 0%, rgba(81, 179, 208, .22), transparent 60%), radial-gradient(60% 90% at 100% 100%, rgba(238, 152, 79, .12), transparent 60%), var(--surface);
  border: 1px solid var(--line);
}
.bp-hero img { width: 120px; }
.bp-hero h1 { font-size: 40px; font-weight: 700; line-height: 1.25; }
.bp-hero p { color: var(--text-2); font-size: 16px; margin-top: 8px; max-width: 620px; }
.bp-h { font-size: 20px; margin: 44px 0 6px; }
.bp-sub { color: var(--text-2); margin-bottom: 16px; }
.bp-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.bp-logo-tile { aspect-ratio: 16 / 10; border-radius: 16px; display: grid; place-items: center; border: 1px solid var(--line); }
.bp-logo-tile .lockup { display: flex; align-items: center; gap: 12px; }
.bp-logo-tile .lockup img { width: 58px; height: 58px; }
.bp-logo-tile .lockup img.lockup-wm { width: auto; height: 42px; }
.bp-logo-tile .lockup span { font-family: var(--display); font-weight: 700; font-size: 38px; letter-spacing: -1px; }
.bp-colors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }   /* 6 colours: one row, or 3 + 3, or 2 + 2 + 2 */
@media (max-width: 1250px) { .bp-colors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bp-colors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sw-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); text-align: start; transition: transform .15s; }
.sw-card:hover { transform: translateY(-3px); }
.sw-card .chip { height: 110px; }
.sw-card .meta { padding: 12px 14px; }
.sw-card b { display: block; font-family: var(--display); font-size: 15px; }
.sw-card code { color: var(--text-2); font-size: 12.5px; direction: ltr; display: inline-block; }
.sw-card small { display: block; color: var(--text-3); margin-top: 2px; }
.bp-grad { height: 90px; border-radius: 16px; background: var(--grad-text); margin-top: 14px; display: flex; align-items: flex-end; padding: 14px 18px; color: #0B0E13; font-weight: 700; justify-content: space-between; }
.bp-grad code { direction: ltr; font-weight: 500; opacity: .9; font-size: 12.5px; }
.bp-type { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.bp-type .panel .big { font-size: 46px; line-height: 1.2; margin: 6px 0 10px; }
.bp-type .panel .k { color: var(--ember-300); font-weight: 700; font-size: 12.5px; }
.bp-ui { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.bp-voice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.bp-voice .panel b { font-family: var(--display); font-size: 17px; display: block; margin-bottom: 4px; }
.bp-voice .panel p { color: var(--text-2); }

/* ---------- modal & toast ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 100; padding: 16px;
  display: grid; place-items: center; overflow-y: auto;  /* tall dialogs scroll instead of being cut off */
  background: rgba(5, 5, 8, .72); backdrop-filter: blur(6px); animation: fade .15s;
}
.modal {
  width: min(430px, 100%); position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px;
  padding: 30px 28px 24px; box-shadow: none;
  animation: pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.modal::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--grad); }
.modal-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.modal-x + h2, .modal-x + h3 { padding-inline-end: 34px; }   /* a title that starts the dialog never runs under the ✕ */
.modal-logo { width: 54px; margin-bottom: 14px; }
.modal h2 { font-size: 23px; margin-bottom: 6px; }
.modal > p { color: var(--text-2); margin-bottom: 22px; }
.modal .fine { color: var(--text-3); font-size: 12px; text-align: center; margin-top: 12px; }
.swatches { display: flex; gap: 9px; flex-wrap: wrap; }
.sw { width: 30px; height: 30px; border-radius: 50%; transition: transform .12s; }
.sw:hover { transform: scale(1.1); }
.sw.on { outline: 2px solid #fff; outline-offset: 3px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text);
  padding: 11px 18px; border-radius: 12px; box-shadow: none; font-weight: 500;
  animation: pop .2s; transition: opacity .3s, transform .3s;
}
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- auth ---------- */
.auth-btns { display: flex; gap: 6px; }
.seg {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 20px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px;
}
.seg button {
  flex: 1; height: 36px; padding: 0 12px; border-radius: 9px; font-weight: 600; color: var(--text-2); white-space: nowrap;
  transition: background .15s, color .15s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--ember); }
.seg-sm { margin: 0; padding: 3px; }
.seg-sm button { height: 32px; font-size: 13px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-inline-end: 44px; }
.pw-eye { position: absolute; top: 2px; inset-inline-end: 2px; }
.pw-eye.on { color: var(--ember-300); }
.pw-meter { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin: -8px 0 16px; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
/* «الدخول بقوقل», the e-mail code */
.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.g-logo { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.panel h3 .g-logo { width: 17px; height: 17px; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-3); font-size: 12.5px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.cf { text-align: center; }
.cf .cf-code { height: 58px; text-align: center; font: 700 28px/1 Consolas, 'Courier New', monospace; letter-spacing: 10px; margin: 6px 0 4px; }
.cf-acts { display: flex; justify-content: center; gap: 22px; margin-top: 14px; font-size: 13.5px; }
.cf .fine { margin-top: 12px; }
.g-new p .g-logo { width: 16px; height: 16px; margin-inline-end: 4px; }

/* ---------- settings ---------- */
/* cards of different heights pack into columns — no holes between them */
.set-grid { columns: 3 320px; column-gap: 18px; margin-top: 22px; }
.set-grid .panel { padding: 24px; break-inside: avoid; margin: 0 0 18px; }
.set-grid .panel h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 18px; }
.set-grid .panel h3 svg.i { color: var(--ember); }
.profile-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-row b { display: block; font-family: var(--display); font-size: 18px; }
.profile-row small { display: block; color: var(--text-3); }
.profile-row a { color: var(--ember-300); font-size: 13px; font-weight: 600; }

/* ---------- studio compositor ---------- */
.stage { direction: ltr; touch-action: none; user-select: none; }
.comp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cam-box {
  position: absolute; z-index: 3; cursor: grab; border-radius: 10px;
  outline: 2px dashed rgba(255, 255, 255, .0); outline-offset: 2px;
  transition: outline-color .15s;
}
.stage:hover .cam-box, .cam-box.dragging { outline-color: rgba(255, 255, 255, .85); }
.cam-box.dragging { cursor: grabbing; }
.cam-box[data-shape="circle"] { border-radius: 50%; }
.cam-box[data-shape="rect"] { border-radius: 0; }
.cam-box[data-shape="pill"] { border-radius: 999px; }
.cam-box[data-shape="squircle"] { border-radius: 30%; }
.cam-box[data-shape="leaf"] { border-radius: 46% 6% 46% 6%; }
.cam-box[data-shape="arch"] { border-radius: 50% 50% 6% 6% / 40% 40% 6% 6%; }
.cam-tip {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: rgba(11, 11, 15, .85); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 7px; opacity: 0; transition: opacity .15s; pointer-events: none; direction: rtl;
}
.cam-tip svg.i { width: 14px; height: 14px; }
.cam-box[data-hy="b"] .cam-tip { top: auto; bottom: -34px; }
.stage:hover .cam-box .cam-tip { opacity: 1; }
.cam-box.dragging .cam-tip { opacity: 0; }
.rz {
  position: absolute; width: 16px; height: 16px; border-radius: 5px;
  background: var(--ember); border: 2px solid #fff; box-shadow: none;
  opacity: 0; transition: opacity .15s;
}
.stage:hover .rz, .cam-box.dragging .rz { opacity: 1; }
.cam-box[data-hx="l"] .rz { left: -8px; } .cam-box[data-hx="r"] .rz { right: -8px; }
.cam-box[data-hy="t"] .rz { top: -8px; } .cam-box[data-hy="b"] .rz { bottom: -8px; }
.cam-box[data-hx="l"][data-hy="t"] .rz, .cam-box[data-hx="r"][data-hy="b"] .rz { cursor: nwse-resize; }
.cam-box[data-hx="r"][data-hy="t"] .rz, .cam-box[data-hx="l"][data-hy="b"] .rz { cursor: nesw-resize; }
.cam-box:is([data-shape="circle"], [data-shape="squircle"], [data-shape="hexagon"])[data-hx="l"] .rz { left: 7%; }
.cam-box:is([data-shape="circle"], [data-shape="squircle"], [data-shape="hexagon"])[data-hx="r"] .rz { right: 7%; }
.cam-box:is([data-shape="circle"], [data-shape="squircle"], [data-shape="hexagon"])[data-hy="t"] .rz { top: 7%; }
.cam-box:is([data-shape="circle"], [data-shape="squircle"], [data-shape="hexagon"])[data-hy="b"] .rz { bottom: 7%; }

/* ---------- studio control dock + dropdown menus ---------- */
.dock-wrap { position: relative; margin-top: 12px; z-index: 20; }
.dock {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 7px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.dk-group { display: flex; gap: 5px; flex-wrap: wrap; }
.dk-s { display: none; }
.dk-sep { display: none; }
.dk-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; font-size: 13.5px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--text-2); font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.dk-btn:hover, .dk-btn.open { color: var(--text); border-color: var(--hover); background: var(--surface-3); }
.dk-btn svg.i { width: 18px; height: 18px; }
.dk-btn .chev { width: 15px; height: 15px; opacity: .7; transition: transform .15s; }
.dk-btn.open .chev { transform: rotate(180deg); }
.dk-btn.alert { border-color: var(--amber); color: var(--amber); }
.dk-split { display: inline-flex; }
.dk-split .dk-main { border-start-end-radius: 0; border-end-end-radius: 0; }
.dk-split .dk-more { padding: 0 8px; border-start-start-radius: 0; border-end-start-radius: 0; border-inline-start: 0; }
.dk-split.on .dk-btn { background: var(--ember-soft); border-color: rgba(81, 179, 208, .55); color: var(--text); }
.dk-split.on .dk-main svg.i { color: var(--ember); }
.dk-split.dim .dk-main { opacity: .65; }
.dk-split.muted .dk-btn { background: rgba(255, 84, 104, .1); border-color: rgba(255, 84, 104, .45); color: #FF8091; }
.mic-ico { display: inline-flex; }
.dk-main .meter { width: 34px; height: 5px; }
.meter.big { display: block; width: 100%; height: 8px; border-radius: 4px; margin: 6px 0 12px; }

.dk-menu {
  position: relative; display: flex; flex-direction: column; overflow: hidden; direction: rtl;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: none;
}
.mn-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dk-menu > .sx-close { position: absolute; top: 9px; inset-inline-end: 10px; z-index: 3; width: 34px; height: 34px; }
.dk-menu .mn-head { padding-inline-end: 54px; }

/* ---------- studio workspace: everything on one screen, nothing to scroll ---------- */
body[data-route="studio"] .shell { grid-template-columns: minmax(0, 1fr); }   /* focus mode: no site sidebar */
body[data-route="studio"] .sidebar { display: none; }
.studio.sx { --rail: 92px; --pw: 340px; --aw: 340px; padding: 0; max-width: none; height: 100%; display: flex; flex-direction: column; }
.sx-bar { flex: none; display: flex; align-items: center; gap: 14px; padding: 9px 16px; background: var(--bg-elev); border-bottom: 1px solid var(--line); }
.sx-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sx-title img { width: 32px; height: 32px; }
.sx-title b { display: block; font-family: var(--display); font-size: 15px; line-height: 1.25; }
.sx-title small { color: var(--text-3); font-size: 12px; }
.sx-stats { display: flex; gap: 6px; margin: 0 auto; }
.sx-stats .stat { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 14px; border-radius: 999px; }
.sx-stats .stat .k { font-size: 12px; }
.sx-stats .stat .v { font-size: 14.5px; margin: 0; }
.sx-acts { display: flex; align-items: center; gap: 8px; }
.sx-acts .btn-solid { height: 42px; }
.sx-go { height: 42px; min-width: 156px; border-radius: 12px; font-size: 15px; }
.sx-go.btn-primary { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }

.sx-body {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: var(--rail) 0px minmax(0, 1fr) var(--aw);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "rail panel stage aside" "rail panel strip aside";
  transition: grid-template-columns .28s cubic-bezier(.2, .8, .2, 1);
}
.sx-body.panel-open { grid-template-columns: var(--rail) var(--pw) minmax(0, 1fr) var(--aw); }
.sx-tools { display: contents; }

/* tool rail — every tool is a tile in the brand's style; lit tiles show what is running */
.sx-rail {
  grid-area: rail; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; flex-wrap: nowrap;
  padding: 12px 8px; border: 0; border-radius: 0; background: var(--bg-elev); border-inline-end: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: none;
}
.sx-rail::-webkit-scrollbar { display: none; }
.sx-rail .dk-group { flex-direction: column; flex-wrap: nowrap; gap: 6px; }
.sx-rail .dk-sep { display: block; height: 1px; background: var(--line); margin: 6px 12px; }
.sx-rail .dk-btn, .sx-rail .dk-split .dk-main {
  position: relative; flex-direction: column; justify-content: center; gap: 4px; width: 100%; height: 66px; padding: 0 4px;
  border-radius: 14px; background: transparent; border: 1px solid transparent; font-size: 11px; color: var(--text-2);
}
.sx-rail .dk-btn .chev, .sx-rail .dk-s { display: none; }
.sx-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); transition: background .15s, color .15s, box-shadow .15s; }
.sx-ico svg.i { width: 20px; height: 20px; }
.sx-lbl { line-height: 1.2; white-space: nowrap; }
.sx-rail .dk-btn:hover { background: var(--surface); color: var(--text); }
.sx-rail .dk-btn:hover .sx-ico { background: var(--surface-3); color: var(--text); }
.sx-rail .dk-btn.open { background: var(--ember-soft); border-color: rgba(81, 179, 208, .35); color: var(--text); }
.sx-rail .dk-btn.open::before { content: ''; position: absolute; inset-inline-start: -9px; top: 16px; bottom: 16px; width: 3px; border-radius: 3px 0 0 3px; background: var(--grad); }
.sx-rail .dk-btn.open .sx-ico, .sx-rail .dk-split.on .sx-ico { background: var(--grad); color: #fff; box-shadow: none; }
.sx-rail .dk-split { display: block; position: relative; }
.sx-rail .dk-split.on .dk-main { color: var(--text); background: transparent; border-color: transparent; }
.sx-rail .dk-split.dim .sx-ico { opacity: .55; }
.sx-rail .dk-split.muted .dk-btn { background: transparent; border-color: transparent; }
.sx-rail .dk-split.muted .sx-ico { background: rgba(255, 84, 104, .18); color: #FF8091; box-shadow: none; }
.sx-rail .dk-split .dk-more {   /* small gear on the tile corner — opens that source's settings */
  position: absolute; top: 3px; inset-inline-end: 3px; width: 24px; height: 24px; padding: 0; justify-content: center;
  border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-3); opacity: .75;
}
.sx-rail .dk-split .dk-more svg.i { width: 13px; height: 13px; }
.sx-rail .dk-split:hover .dk-more, .sx-rail .dk-more.open { opacity: 1; color: var(--text); }
.sx-rail .dk-more.open { background: var(--ember); border-color: var(--ember); color: #fff; }
.sx-rail .dk-main .meter { width: 30px; height: 4px; margin: -1px 0 1px; }
.sx-rail .dk-split:has([data-toggle="mic"]) .dk-main { height: 72px; }
.sx-rail .dk-btn.alert .sx-ico { background: rgba(238, 152, 79, .18); color: var(--amber); }
.sx-rail .dk-btn.lit .sx-ico { background: rgba(90, 184, 255, .16); color: #5AB8FF; }
.sx-rail .dk-btn.alert, .sx-rail .dk-btn.lit { border-color: transparent; }

/* settings panel (computer): a full-height column beside the tools */
.sx-body .dk-menu {
  grid-area: panel; width: auto; min-width: 0; border: 0; border-radius: 0; box-shadow: none;
  border-inline-end: 1px solid var(--line); animation: sx-panel .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sx-panel { from { opacity: 0; transform: translateX(14px); } }

/* preview: always whole, as large as the space allows */
.sx-stage {
  grid-area: stage; min-width: 0; min-height: 0; container-type: size; display: grid; place-items: center; padding: 18px 18px 12px;
  background: radial-gradient(60% 55% at 50% 45%, rgba(81, 179, 208, .07), transparent 70%);
}
.sx-stage .preview { width: min(100cqw, calc(100cqh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; max-height: none; border-radius: 14px; box-shadow: none; }

/* one-click scenes under the preview */
/* four equal buttons — the size never changes whichever one is chosen (or shows a countdown) */
.sx-scenes {
  grid-area: strip; display: grid; grid-template-columns: repeat(4, minmax(0, 190px)); justify-content: center;
  gap: 10px; padding: 0 18px 16px; min-width: 0;
}
.sx-scene { min-width: 0; }
.sx-scene-txt { flex: 1; min-width: 0; }
.sx-scene-txt b, .sx-scene-txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-body.panel-open .sx-scene-txt small, .sx-body.panel-open .sx-scene kbd { display: none; }   /* compact while a panel is open */
.sx-body.panel-open .sx-scene { padding-block: 6px; }
.sx-scenes::-webkit-scrollbar { display: none; }
.sx-scene {
  display: flex; align-items: center; gap: 10px; flex: none; padding: 7px 10px 7px 8px; border-radius: 14px; text-align: start;
  background: var(--surface); border: 1px solid var(--line-2); transition: border-color .15s, background .15s, box-shadow .15s;
}
.sx-scene:hover { border-color: var(--hover); background: var(--surface-2); }
.sx-scene.on { border-color: var(--ember); background: linear-gradient(135deg, rgba(81, 179, 208, .16), rgba(238, 152, 79, .05)); box-shadow: none; }
.sx-scene-art { width: 46px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #132836, #0C141C); color: var(--text-2); }
.sx-scene-art img { width: 18px; }
.sx-scene-art svg.i { width: 16px; height: 16px; }
.sx-art-live { background: var(--flare); color: #fff; }
.sx-scene-txt b { display: block; font-size: 13px; line-height: 1.25; }
.sx-scene-txt small { color: var(--text-3); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sx-scene.on .sx-scene-txt small { color: var(--ember-300); }
.sx-scene kbd { font: 600 10.5px var(--font); color: var(--text-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; margin-inline-start: 2px; }
.sx-scene.on kbd { color: var(--ember-300); border-color: rgba(81, 179, 208, .4); }

/* stream info / chat column */
.sx-body .st-aside { grid-area: aside; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg-elev); border-inline-start: 1px solid var(--line); }
.sx .st-tabs { display: flex; flex: none; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.st-tabs button { flex: 1; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; font-size: 13.5px; color: var(--text-3); }
.st-tabs button svg.i { width: 17px; height: 17px; }
.st-tabs button:hover { color: var(--text); }
.st-tabs button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--ember); }
.sx-body .st-aside .panel { flex: 1; min-height: 0; overflow-y: auto; border: 0; border-radius: 0; background: transparent; padding: 16px; }
.studio.sx .st-aside .panel h3 { display: none; }
.sx-body .st-aside .chat { flex: 1; min-height: 0; height: auto; margin: 0; border: 0; border-radius: 0; }
.st-aside:not(.tab-chat) .chat, .st-aside.tab-chat .panel { display: none; }
.sx #st-go { display: none; }   /* «ابدأ البث» is in the top bar (and the bottom bar on phones) */
.sx #st-update { margin-top: 0 !important; }
.st-saved { display: flex; align-items: center; gap: 5px; min-height: 18px; margin: -6px 0 10px; font-size: 12.5px; color: var(--text-3); }
.st-saved svg.i { width: 14px; height: 14px; color: var(--ok); }
@media (max-width: 1280px) { .studio.sx { --rail: 84px; --pw: 300px; --aw: 300px; } .sx-stats .stat .k { font-size: 0; gap: 0; } }
@media (min-width: 1001px) and (max-height: 820px) {   /* laptop screens: every tool fits the rail without scrolling */
  .sx-rail { gap: 3px; padding: 8px 7px; }
  .sx-rail .dk-group { gap: 3px; }
  .sx-rail .dk-sep { margin: 4px 12px; }
  .sx-rail .dk-btn, .sx-rail .dk-split .dk-main { height: 56px; gap: 3px; font-size: 10.5px; }
  .sx-rail .dk-split:has([data-toggle="mic"]) .dk-main { height: 62px; }
  .sx-ico { width: 34px; height: 34px; border-radius: 11px; }
  .sx-ico svg.i { width: 18px; height: 18px; }
  .sx-rail .dk-btn.open::before { top: 12px; bottom: 12px; }
}
body[data-route="studio"] .topbar .go-btn { display: none; }   /* the studio has its own «ابدأ البث» */
.mn-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.mn-head b { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 15px; font-weight: 600; }
.mn-head b svg.i { width: 18px; height: 18px; color: var(--ember); }
.mn-state { font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--surface-3); padding: 3px 9px; border-radius: 999px; }
.mn-state.on { color: var(--ok); background: rgba(43, 212, 125, .12); }
.mn-sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mn-sec:last-child { border-bottom: 0; }
.mn-label { font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 9px; }
.mn-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); }
.mn-row b { color: var(--ember-300); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.mn-slider + .mn-slider { margin-top: 12px; }
.mn-slider .range { margin-top: 6px; }
.mn-note { font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.mn-empty { font-size: 12.5px; color: var(--text-3); padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.mn-src { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.mn-src span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-src svg.i { width: 17px; height: 17px; color: var(--ember); }
.mn-foot { display: flex; gap: 8px; justify-content: space-between; padding: 12px 16px; position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); }
.mn-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; padding: 4px 0; }
.mn-toggle + .mn-toggle { margin-top: 10px; }
.mn-toggle b { display: block; font-size: 13.5px; font-weight: 600; }
.mn-toggle small { display: block; font-size: 12px; color: var(--text-3); }
.mn-sec > .input { margin-top: 10px; }
.mn-pos { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.mn-pos .pos-pad { width: 112px; }
.swatches.sm { margin-top: 12px; gap: 7px; }
.swatches.sm .sw { width: 24px; height: 24px; }
.swatches.sm .sw[data-v="#FFFFFF"] { box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }

.switch {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; cursor: pointer;
  width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2);
  transition: background .15s, border-color .15s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: inset-inline-start .15s;
}
.switch:checked { background: var(--ember); border-color: var(--ember); }
.switch:checked::after { inset-inline-start: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.chip:hover { color: var(--text); border-color: var(--hover); }
.chip.on { background: var(--ember-soft); border-color: var(--ember); color: var(--text); }

.shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shape-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.shape-btn:hover { border-color: var(--hover); color: var(--text); }
.shape-btn.on { border-color: var(--ember); background: var(--ember-soft); color: var(--text); }
.shape-btn small { font-size: 11.5px; font-weight: 600; }
.shp { display: block; height: 30px; background: linear-gradient(135deg, #3a3a48, #22222c); border: 2px solid var(--text-3); }
.shape-btn.on .shp { background: var(--grad); border-color: transparent; }
.shp-rect { aspect-ratio: 16 / 10; border-radius: 0; }
.shp-rounded { aspect-ratio: 16 / 10; border-radius: 6px; }
.shp-pill { aspect-ratio: 16 / 9; border-radius: 999px; }
.shp-square { aspect-ratio: 1; border-radius: 5px; }
.shp-squircle { aspect-ratio: 1; border-radius: 34%; }
.shp-circle { aspect-ratio: 1; border-radius: 50%; }
.shp-hexagon { aspect-ratio: .866; border: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--text-3); }
.shp-leaf { aspect-ratio: 1; border-radius: 46% 6% 46% 6%; }
.shp-arch { aspect-ratio: .8; border-radius: 50% 50% 4px 4px / 40% 40% 4px 4px; }

.lay-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lay-card {
  display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 12px; text-align: start;
  background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.lay-card:hover { border-color: var(--hover); color: var(--text); }
.lay-card.on { border-color: var(--ember); background: var(--ember-soft); color: var(--text); }
.lay-art { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; background: #0d0d12; overflow: hidden; direction: ltr; }
.lay-art i, .lay-art b { position: absolute; display: block; border-radius: 3px; }
.lay-art i { background: linear-gradient(135deg, #2b4a6e, #1b2a3e); }
.lay-art b { background: var(--grad); }
.lay-pip i { inset: 0; border-radius: 0; }
.lay-pip b { right: 6%; bottom: 8%; width: 30%; height: 34%; }
.lay-side i { left: 5%; top: 12%; width: 60%; height: 76%; }
.lay-side b { right: 5%; top: 30%; width: 26%; height: 40%; }
.lay-side.flip i { left: auto; right: 5%; }
.lay-side.flip b { right: auto; left: 5%; }
.lay-cam b { inset: 0; border-radius: 0; }
.lay-screen i { inset: 0; border-radius: 0; }

.scene-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.scene-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px; border-radius: 12px; text-align: start;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.scene-card:hover { border-color: var(--hover); color: var(--text); }
.scene-card.on { border-color: var(--ember); background: var(--ember-soft); color: var(--text); }
.scene-card b { font-size: 13px; margin-top: 6px; }
.scene-card small { font-size: 11.5px; color: var(--text-3); }
.scene-art {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 7px; display: grid; place-items: center;
  background: radial-gradient(70% 90% at 50% 40%, rgba(81,179,208,.35), transparent 70%), #0d0d12;
}
.scene-art img { width: 26%; }
.scene-art svg.i { width: 26%; height: auto; color: var(--ember); }
.sc-ending { background: radial-gradient(70% 90% at 50% 40%, rgba(238,152,79,.3), transparent 70%), #0d0d12; }

/* chat overlay editor box (preview only) */
.chat-box {
  position: absolute; z-index: 2; cursor: grab; border-radius: 12px;
  outline: 2px dashed rgba(90, 184, 255, 0); outline-offset: 2px; transition: outline-color .15s, background .15s;
}
.stage:hover .chat-box, .chat-box.dragging { outline-color: rgba(90, 184, 255, .9); background: rgba(90, 184, 255, .06); }
.chat-box.dragging { cursor: grabbing; }
.chat-box .cam-tip { top: 8px; }
.stage:hover .chat-box .cam-tip { opacity: 1; }
.chat-box.dragging .cam-tip { opacity: 0; }
.chat-box .rz { background: #5AB8FF; }
.stage:hover .chat-box .rz, .chat-box.dragging .rz { opacity: 1; }
.chat-box[data-hx="l"] .rz { left: -8px; } .chat-box[data-hx="r"] .rz { right: -8px; }
.chat-box[data-hy="t"] .rz { top: -8px; } .chat-box[data-hy="b"] .rz { bottom: -8px; }
.chat-box[data-hx="l"][data-hy="t"] .rz, .chat-box[data-hx="r"][data-hy="b"] .rz { cursor: nwse-resize; }
.chat-box[data-hx="r"][data-hy="t"] .rz, .chat-box[data-hx="l"][data-hy="b"] .rz { cursor: nesw-resize; }
.dk-btn.lit { border-color: rgba(90, 184, 255, .6); color: var(--text); }
.dk-btn.lit svg.i:first-child { color: #5AB8FF; }

.chat-styles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.chat-style {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.chat-style:hover { border-color: var(--hover); color: var(--text); }
.chat-style.on { border-color: var(--ember); background: var(--ember-soft); color: var(--text); }
.chat-style small { font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.cs { width: 100%; height: 40px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; gap: 3px; padding: 4px; border-radius: 6px; background: linear-gradient(135deg, #2b4a6e, #1b2a3e); }
.cs i { display: block; height: 7px; border-radius: 3px; background: rgba(11,11,15,.8); }
.cs i:nth-child(1) { width: 70%; } .cs i:nth-child(2) { width: 90%; } .cs i:nth-child(3) { width: 55%; }
.cs-panel { background: linear-gradient(135deg, #2b4a6e, #1b2a3e); box-shadow: inset 0 0 0 4px rgba(11,11,15,.75); }
.cs-panel i { background: rgba(255,255,255,.6); height: 4px; }
.cs-brand i { background: rgba(11,11,15,.8); box-shadow: inset -3px 0 0 #51B3D0; }
.cs-glass i { background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.cs-clean i { background: #fff; height: 3px; margin: 2px 0; }

.chat-pos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chat-pos-btn { height: 46px; border-radius: 8px; padding: 5px; background: var(--surface-2); border: 1px solid var(--line-2); }
.chat-pos-btn:hover { border-color: var(--ember); }
.cp { position: relative; display: block; width: 100%; height: 100%; border-radius: 4px; background: #0d0d12; }
.cp::after { content: ''; position: absolute; border-radius: 2px; background: #5AB8FF; }
.cp-tl::after { left: 3px; top: 3px; width: 34%; height: 50%; }
.cp-tr::after { right: 3px; top: 3px; width: 34%; height: 50%; }
.cp-bl::after { left: 3px; bottom: 3px; width: 34%; height: 58%; }
.cp-br::after { right: 3px; bottom: 3px; width: 34%; height: 58%; }
.cp-coll::after { left: 3px; top: 3px; bottom: 3px; width: 26%; }
.cp-colr::after { right: 3px; top: 3px; bottom: 3px; width: 26%; }

.mn-foot-3 { flex-wrap: wrap; justify-content: flex-start; }
.mn-foot-3 .btn:first-child { flex: 1 1 100%; }
.mn-foot-3 .btn:not(:first-child) { flex: 1; }

/* transition picker — each tile loops a tiny preview of its motion */
.fx-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fx-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 7px 4px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
}
.fx-card:hover { border-color: var(--hover); color: var(--text); }
.fx-card.on { border-color: var(--ember); background: var(--ember-soft); color: var(--text); }
.fx-card small { font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.fx-art { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 5px; overflow: hidden; background: linear-gradient(135deg, #2b4a6e, #1b2a3e); }
.fx-art i { position: absolute; inset: 0; display: block; background: linear-gradient(135deg, #4a2a5e, #1d1030); }
.fx-stinger i { background: none; }
.fx-stinger i::after {
  content: ''; position: absolute; top: -20%; bottom: -20%; width: 34%; transform: skewX(-14deg);
  background: var(--grad); animation: fx-sting 1.8s ease-in-out infinite;
}
@keyframes fx-sting { 0% { left: 120%; } 55%, 100% { left: -60%; } }
.fx-fade i { animation: fx-fade 1.8s ease-in-out infinite alternate; }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
.fx-slide i { animation: fx-slide 1.8s ease-in-out infinite alternate; }
@keyframes fx-slide { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.fx-zoom i { animation: fx-zoom 1.8s ease-in-out infinite alternate; }
@keyframes fx-zoom { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.fx-none i { display: none; }
@media (prefers-reduced-motion: reduce) { .fx-art i, .fx-art i::after { animation: none; } }

.mn-state.warn { color: var(--amber); background: rgba(238, 152, 79, .12); }
.mn-timer {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px;
  border-radius: 12px; background: radial-gradient(80% 120% at 50% 0%, rgba(81,179,208,.18), transparent 70%), var(--surface-2);
  border: 1px solid var(--line-2);
}
.mn-timer b {
  font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; direction: ltr;
  font-variant-numeric: tabular-nums; color: var(--ember);
}
.tm-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tm-btns .chip svg.i { width: 14px; height: 14px; vertical-align: -2px; }

/* background picker */
.bg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bg-tile {
  position: relative; aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; outline: 1px solid var(--line-2); outline-offset: -1px;
  display: flex; align-items: flex-end; justify-content: center; transition: transform .12s, border-color .12s;
}
.bg-tile:hover { transform: translateY(-2px); }
.bg-tile.on { border-color: var(--ember); outline-color: transparent; }
.bg-tile small {
  width: 100%; padding: 2px 0 3px; font-size: 10.5px; font-weight: 600; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
}
.bg-upload {
  flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--surface-2); outline-style: dashed; color: var(--text-2);
}
.bg-upload:hover { color: var(--ember-300); outline-color: var(--ember); }
.bg-upload svg.i { width: 18px; height: 18px; }
.bg-upload small { background: none; color: inherit; padding: 0; font-size: 10px; line-height: 1.2; }

/* premium items inside the studio menus */
.fx-card, .chat-style { position: relative; }
.crown { position: absolute; top: 3px; inset-inline-start: 3px; z-index: 1; color: #F3D27A; display: flex; }
.crown svg.i { width: 13px; height: 13px; }
.store-tile { justify-content: center; border-style: dashed; color: var(--ember-300); }
.store-tile svg.i { width: 20px; height: 20px; }
.store-tile:hover { border-color: var(--ember); }
.fx-flame { background: linear-gradient(135deg, #2b4a6e, #1b2a3e); }
.fx-flame i { background: linear-gradient(0deg, #4a2a5e 70%, #EE984F 74%, #51B3D0 80%, transparent 86%); animation: fx-rise 1.8s ease-in-out infinite alternate; }
@keyframes fx-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
.fx-circle i { clip-path: circle(0% at 50% 50%); box-shadow: inset 0 0 0 2px #51B3D0; animation: fx-iris 1.8s ease-in-out infinite alternate; }
@keyframes fx-iris { to { clip-path: circle(75% at 50% 50%); } }
.fx-shutter i { background: repeating-linear-gradient(180deg, #4a2a5e 0 4px, transparent 4px 8px); animation: fx-fade 1.8s steps(4) infinite alternate; }
.fx-glitch i { animation: fx-glitch .9s steps(2) infinite; mix-blend-mode: screen; background: linear-gradient(90deg, #51B3D0 0 30%, #00E5FF 30% 34%, #4a2a5e 34%); }
@keyframes fx-glitch { 0% { transform: translateX(-12%); opacity: .8; } 50% { transform: translateX(10%); opacity: .4; } 100% { transform: translateX(0); opacity: 1; } }
.fx-pixel i { background: repeating-conic-gradient(#4a2a5e 0 25%, #2b4a6e 0 50%) 0 0 / 8px 8px; animation: fx-fade 1.8s steps(3) infinite alternate; }
.fx-spin i { animation: fx-spin 1.8s ease-in-out infinite alternate; }
@keyframes fx-spin { from { transform: rotate(-60deg) scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.cs-neon i { box-shadow: 0 0 0 1px #51B3D0, 0 0 6px #51B3D0; }
.cs-royal i { background: #3a1460; box-shadow: inset 0 0 0 1px #E8C26A; }
.cs-gamer i { background: #06121c; box-shadow: inset 0 0 0 1px #3BE8FF; clip-path: polygon(4px 0, 100% 0, 100% 100%, 0 100%, 0 4px); }
.cs-sunset i { background: linear-gradient(90deg, #FF5E8A, #EE984F); }
.cs-paper i { background: #f6f3ef; }
.cs-minimal i { background: #fff; height: 3px; margin: 2px 0; box-shadow: none; }

/* ---------- wallet / coins ---------- */
.user-area { display: flex; align-items: center; gap: 8px; }
.coin-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--ember-soft); border: 1px solid rgba(81, 179, 208, .35); color: var(--ember-300);
  font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; transition: background .15s;
}
.coin-pill:hover { background: rgba(81, 179, 208, .22); }
.coin-pill svg.i { width: 16px; height: 16px; fill: var(--ember); stroke: var(--ember); }
.menu-coins { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ember-300); font-weight: 700; }
.menu-coins svg.i { width: 13px !important; height: 13px !important; fill: var(--ember); stroke: var(--ember); }

/* ---------- store ---------- */
.store-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 34px 36px; border-radius: 24px; position: relative; overflow: hidden;
  background: radial-gradient(70% 140% at 0% 0%, rgba(81, 179, 208, .28), transparent 60%), radial-gradient(60% 120% at 100% 100%, rgba(238, 152, 79, .14), transparent 60%), var(--surface);
  border: 1px solid var(--line);
}
.store-hero h1 { font-size: 36px; font-weight: 700; line-height: 1.25; }
.store-hero p { color: var(--text-2); margin-top: 8px; max-width: 520px; }
.wallet { display: flex; flex-direction: column; gap: 12px; min-width: 260px; }
.wallet-coins { display: flex; align-items: center; gap: 12px; }
.wallet-coins > svg.i { width: 44px; height: 44px; fill: var(--ember); stroke: var(--amber); }
.wallet-coins b { display: block; font-family: var(--display); font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.wallet-coins small { color: var(--text-2); }
.wallet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wallet-actions .btn[disabled] { opacity: .7; font-variant-numeric: tabular-nums; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-top: 22px; }
.item-card {
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.item-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: none; }
.item-card.owned { border-color: rgba(232, 194, 106, .35); }
.item-prev { position: relative; aspect-ratio: 16 / 9; background: #000; }
.item-prev canvas { display: block; width: 100%; height: 100%; }
.item-type, .item-tag, .item-own {
  position: absolute; top: 10px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(6px);
}
.item-type { inset-inline-start: 10px; background: rgba(11, 11, 15, .72); color: #fff; }
.item-type svg.i, .item-own svg.i { width: 13px; height: 13px; }
.item-tag { inset-inline-end: 10px; background: var(--grad); color: #fff; }
.item-own { inset-inline-end: 10px; background: rgba(232, 194, 106, .92); color: #2a1a00; }
.item-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; flex: 1; }
.item-title b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.item-title p { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.item-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price { display: inline-flex; align-items: center; gap: 5px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ember-300); font-variant-numeric: tabular-nums; }
.price svg.i { width: 18px; height: 18px; fill: var(--ember); stroke: var(--ember); }
.price.owned { font-size: 13px; color: #E8C26A; }
.price.owned svg.i { fill: none; stroke: #E8C26A; }
.item-foot .btn[data-poor] { background: var(--surface-3); box-shadow: none; color: var(--text-2); }
.tx-list { padding: 6px 18px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx span { flex: 1; }
.tx small { color: var(--text-3); }
.tx b { font-family: var(--display); font-variant-numeric: tabular-nums; min-width: 70px; text-align: end; }
.tx b.plus { color: var(--ok); } .tx b.minus { color: var(--ember-300); }

.buy-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.buy-head > svg.i { width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: var(--ember-soft); color: var(--ember); flex: none; }
.buy-head h2 { margin: 0; }
.buy-head p { font-size: 13px; margin: 2px 0 0; }
.buy-sum { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 16px; margin-bottom: 14px; }
.buy-sum > div { display: flex; justify-content: space-between; padding: 9px 0; color: var(--text-2); }
.buy-sum > div + div { border-top: 1px solid var(--line); }
.buy-sum b { color: var(--text); display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.buy-sum b svg.i { width: 16px; height: 16px; fill: var(--ember); stroke: var(--ember); }
.buy-sum .total b { color: var(--ember-300); font-family: var(--display); font-size: 17px; }
.modal h2 svg.i { width: 22px; height: 22px; fill: var(--ember); stroke: var(--ember); vertical-align: -3px; }
.test-note {
  display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #FFD28A; line-height: 1.6;
  background: rgba(238, 152, 79, .1); border: 1px solid rgba(238, 152, 79, .3); border-radius: 12px; padding: 10px 12px; margin-bottom: 16px;
}
.test-note svg.i { width: 18px; height: 18px; flex: none; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 8px 14px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); transition: border-color .15s, transform .15s;
}
.pack:hover { border-color: var(--ember); transform: translateY(-2px); }
.pack-bonus { position: absolute; top: -9px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pack-coins { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 20px; font-weight: 700; }
.pack-coins svg.i { width: 18px; height: 18px; fill: var(--ember); stroke: var(--ember); }
.pack small { color: var(--text-3); font-size: 11.5px; }
.pack-price { margin-top: 10px; font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--text); background: var(--surface-3); padding: 3px 12px; border-radius: 999px; }
.pack:hover .pack-price { background: var(--grad); color: #fff; }
.bonus-tag { font-style: normal; font-size: 11px; background: var(--grad); color: #fff; padding: 1px 7px; border-radius: 999px; margin-inline-start: 4px; }
.pay-ok {
  width: 64px; height: 64px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(43, 212, 125, .14); color: var(--ok); animation: pop .3s cubic-bezier(.2, .9, .3, 1.4);
}
.pay-ok svg.i { width: 32px; height: 32px; stroke-width: 2.6; }
.modal .back { background: none; padding: 0; margin-bottom: 10px; }
#tp .tp-sub { margin: 6px 0 24px; }
#tp h2 + .buy-sum { margin-top: 16px; }
#tp .packs + .fine { margin-top: 18px; }

/* ---------- support («ادعم») ---------- */
.btn-tip {
  background: rgba(238, 152, 79, .12); color: #FFC24D; border: 1px solid rgba(238, 152, 79, .4);
}
.btn-tip:hover { background: rgba(238, 152, 79, .2); }
.btn-tip svg.i { fill: #EE984F; stroke: #EE984F; }
.msg.tip {
  margin: 6px 10px; padding: 10px 12px; border-radius: 12px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(81, 179, 208, .2), rgba(238, 152, 79, .14));
  border: 1px solid rgba(238, 152, 79, .5);
}
.tip-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.tip-head svg.i { width: 18px; height: 18px; fill: var(--ember); stroke: var(--amber); }
.tip-amt { font-family: var(--display); font-size: 16px; color: var(--ember); }
.tip-msg { margin-top: 4px; color: var(--text); overflow-wrap: anywhere; }
.tip-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-inline-end: 30px; }   /* room for the ✕ */
.tip-top h2 { overflow-wrap: anywhere; }
.tip-top h2 { margin: 0 0 2px; }
.tip-top p { margin: 0; font-size: 13.5px; }
.tip-amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.tip-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; height: 42px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--line-2); font-family: var(--display); font-weight: 600; font-size: 14px;
  transition: border-color .15s, background .15s;
}
.tip-chip svg.i { width: 14px; height: 14px; fill: var(--ember); stroke: var(--ember); }
.tip-chip:hover { border-color: var(--hover); }
.tip-chip.on { border-color: var(--ember); background: var(--ember-soft); }
.tip-bal { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--text-2); margin: -4px 0 12px; }
.tip-bal span { display: inline-flex; align-items: center; gap: 4px; }
.tip-bal svg.i { width: 15px; height: 15px; fill: var(--ember); stroke: var(--ember); }
.tip-bal b { color: var(--text); font-variant-numeric: tabular-nums; }
.tip-bal a { color: var(--ember-300); font-weight: 600; }
.tip-stat.hot .k svg.i { fill: var(--ember); }
.earn-panel { grid-column: 1 / -1; }
.earn-total { display: flex; align-items: center; gap: 12px; }
.earn-total > svg.i { width: 40px; height: 40px; fill: var(--ember); stroke: var(--amber); }
.earn-total b { display: block; font-family: var(--display); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.earn-total small { color: var(--text-2); }
.top-fans { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.fan { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.fan .rank { font-family: var(--display); font-weight: 700; color: var(--ember-300); width: 14px; }
.fan b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fan .amt { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fan .amt svg.i { width: 14px; height: 14px; fill: var(--ember); stroke: var(--ember); }
.earn-panel .tx-list { padding: 0; }

/* ---------- alert designer ---------- */
.modal.modal-wide { width: min(1080px, 100%); padding: 24px; }
.ad-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ad-top h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.ad-top h2 svg.i { width: 22px; height: 22px; color: var(--ember); fill: none; stroke: var(--ember); }
.ad-top p { margin: 0; font-size: 13.5px; }
.ad-on { flex: none; margin-inline-end: 40px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); gap: 10px; }
.ad-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.ad-prev { position: sticky; top: 0; }
.ad-canvas { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #000; }
.ad-canvas canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.ad-off { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11, 11, 15, .6); font-weight: 700; color: var(--text-2); }
.ad-test { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ad-side { min-width: 0; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-elev); overflow: hidden; }
.ad-tabs { display: flex; gap: 2px; padding: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.ad-tabs::-webkit-scrollbar { display: none; }
.ad-tabs button {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 10px; border-radius: 9px;
  color: var(--text-3); font-size: 12px; font-weight: 600; transition: background .15s, color .15s;
}
.ad-tabs button svg.i { width: 18px; height: 18px; }
.ad-tabs button:hover { color: var(--text); background: var(--surface-2); }
.ad-tabs button.on { color: var(--text); background: var(--ember-soft); box-shadow: inset 0 -2px 0 var(--ember); }
.ad-panel { padding: 4px 16px 16px; max-height: min(52vh, 460px); overflow-y: auto; }
.ad-sec { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ad-sec:last-child { border-bottom: 0; }
.ad-sec .mn-slider + .mn-slider { margin-top: 12px; }
.ad-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.al-layouts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.al-layout { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 7px 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); }
.al-layout:hover { border-color: var(--hover); color: var(--text); }
.al-layout.on { border-color: var(--ember); background: var(--ember-soft); color: var(--text); }
.al-layout small { font-size: 11px; font-weight: 600; }
.al-art { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 5px; background: linear-gradient(135deg, #2b4a6e, #1b2a3e); overflow: hidden; }
.al-art i, .al-art b { position: absolute; display: block; }
.al-card i { left: 18%; right: 18%; top: 12%; height: 34%; border-radius: 4px; background: #0B0E13; box-shadow: inset 0 0 0 1.5px #51B3D0; }
.al-card b { right: 24%; top: 20%; width: 14%; height: 18%; border-radius: 2px; background: var(--grad); }
.al-banner i { left: 8%; right: 8%; bottom: 12%; height: 20%; border-radius: 3px; background: #0B0E13; box-shadow: inset -3px 0 0 #51B3D0; }
.al-banner b { right: 14%; bottom: 17%; width: 40%; height: 10%; border-radius: 2px; background: #fff; opacity: .7; }
.al-big i { left: 30%; right: 30%; top: 14%; height: 30%; border-radius: 50%; background: radial-gradient(#51B3D0, transparent 70%); }
.al-big b { left: 22%; right: 22%; top: 50%; height: 22%; border-radius: 3px; background: var(--grad); }
.al-pill i { left: 22%; right: 22%; top: 14%; height: 20%; border-radius: 99px; background: #0B0E13; box-shadow: inset 0 0 0 1.5px #EE984F; }
.al-pill b { right: 26%; top: 18%; width: 12%; height: 12%; border-radius: 50%; background: var(--grad); }
.al-minimal i { left: 20%; right: 20%; top: 18%; height: 12%; border-radius: 2px; background: #fff; box-shadow: 0 0 8px #51B3D0; }
.al-minimal b { left: 30%; right: 30%; top: 36%; height: 7%; border-radius: 2px; background: rgba(255,255,255,.5); }
.al-pos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: 168px; padding: 6px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); aspect-ratio: 16 / 10; }
.al-pos button { border-radius: 6px; display: grid; place-items: center; background: rgba(255,255,255,.03); }
.al-pos button i { width: 40%; height: 34%; border-radius: 3px; background: var(--text-3); }
.al-pos button:hover { background: rgba(255,255,255,.07); }
.al-pos button.on i { background: var(--ember); box-shadow: 0 0 10px rgba(81,179,208,.7); }
.al-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.al-theme { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.al-theme i { width: 28px; height: 20px; border-radius: 6px; flex: none; background: var(--bg); box-shadow: inset 0 0 0 2px var(--a1), inset 0 -6px 0 var(--a2); }
.al-theme:hover { border-color: var(--hover); color: var(--text); }
.al-theme.on { border-color: var(--ember); background: var(--ember-soft); color: var(--text); }
.ad-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ad-color { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); cursor: pointer; }
.ad-color input { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.ad-color input::-webkit-color-swatch-wrapper { padding: 0; }
.ad-color input::-webkit-color-swatch { border: 1px solid rgba(255,255,255,.25); border-radius: 7px; }
.ad-tokens { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.ad-tokens button { height: 28px; padding: 0 10px; border-radius: 8px; background: var(--surface-3); color: var(--text); font-size: 12.5px; font-weight: 600; }
.ad-tokens button:hover { background: var(--ember-soft); color: var(--ember-300); }
.ad-num { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; }
.ad-num .input { width: 120px; }
.ad-file { margin-top: 10px; cursor: pointer; }
.ad-panel .chips + .ad-file { display: inline-flex; }
@media (max-width: 900px) {
  .ad-grid { grid-template-columns: 1fr; }
  .ad-prev { position: static; }
  .ad-panel { max-height: none; }
  .al-layouts { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- player: fullscreen + touch ---------- */
.player:fullscreen, .player:-webkit-full-screen { max-height: none; aspect-ratio: auto; width: 100%; height: 100%; }
.player.pseudo-fs, .channel-page .player.pseudo-fs {
  position: fixed !important; inset: 0; z-index: 300 !important; max-height: none;
  aspect-ratio: auto; width: 100vw; height: 100vh; height: 100dvh;
}
body.fs-lock { overflow: hidden; }
.player.ctrls-on .player-ctrls { opacity: 1; }
@media (hover: none) {
  .player-ctrls { padding-bottom: 12px; }
  .player-ctrls .icon-btn { width: 44px; height: 44px; }
  .player-ctrls .vol { display: none; }
}
.src-btn.on svg.i { color: var(--ember); }
.src-btn[disabled] { opacity: .45; pointer-events: none; }
.studio-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.studio-cols .panel h3, .studio aside .panel h3 { display: flex; align-items: center; gap: 8px; }
.studio-cols .panel h3 svg.i { width: 18px; height: 18px; color: var(--ember); }
.lay-hint { margin: -6px 0 14px; }
.lay-row { display: flex; gap: 18px; align-items: flex-start; }
.pos-pad {
  flex: none; width: 128px; aspect-ratio: 16 / 9; padding: 6px; border-radius: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line-2);
}
.pos-pad button { border-radius: 6px; position: relative; background: rgba(255,255,255,.03); transition: background .15s; }
.pos-pad button::after {
  content: ''; position: absolute; width: 42%; height: 46%; border-radius: 3px;
  background: var(--text-3); transition: background .15s;
}
.pos-pad button[data-pos="tl"]::after { top: 3px; left: 3px; }
.pos-pad button[data-pos="tr"]::after { top: 3px; right: 3px; }
.pos-pad button[data-pos="bl"]::after { bottom: 3px; left: 3px; }
.pos-pad button[data-pos="br"]::after { bottom: 3px; right: 3px; }
.pos-pad button:hover { background: rgba(255,255,255,.07); }
.pos-pad button:hover::after { background: var(--text-2); }
.pos-pad button.on::after { background: var(--ember); }
.lay-ctrls { flex: 1; min-width: 0; }
.lay-ctrls .field { margin-bottom: 12px; }
.lay-ctrls label b { color: var(--ember-300); font-variant-numeric: tabular-nums; }
.range { width: 100%; accent-color: var(--ember); cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--ember); width: 16px; height: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .shell { --side-w: 66px; }
  .sidebar { padding-inline: 6px; }
  .side-item { justify-content: center; padding: 6px; }
  .side-item .meta, .side-item .vc, .side-title span, .side-promo, .side-foot { display: none; }
  .side-title { justify-content: center; }
  .side-item.current { box-shadow: none; }
  .side-head { display: none; }  /* narrow screens are already a rail */
}
@media (max-width: 1100px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-cols { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-strip { display: none; }
}
/* tablets: one column — the chat comes right under the player and its info bar, before «عن القناة» */
@media (min-width: 761px) and (max-width: 1000px) {
  #view .channel-page { display: flex; flex-direction: column; }
  .channel-page .ch-main { display: contents; }
  .channel-page .player { order: 1; }
  .channel-page .ch-goal { order: 2; }
  .channel-page .ch-info { order: 3; }
  .channel-page .chat { order: 4; }
  .channel-page .ch-extra { order: 5; padding-top: 20px; }
}
@media (max-width: 1000px) {
  #view.fill { overflow-y: auto; }
  .channel-page { display: block; height: auto; }
  .ch-main { overflow: visible; }
  .chat { height: 560px; border-inline-start: 0; border-top: 1px solid var(--line); }
  .ch-info { flex-wrap: wrap; }
  .ch-actions { width: 100%; flex-direction: row-reverse; justify-content: space-between; align-items: center; }
  .cz-grid { grid-template-columns: minmax(0, 1fr); }
  .cz-side { order: -1; min-width: 0; }
  .cz-sticky { position: static; }
  #cz-prev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  #cz-prev > .cz-label, #cz-prev > .msg.welcome { display: none; }
  /* studio on tablets / phones: stacked — preview, tools, scenes, info/chat; settings open as a bottom sheet */
  .studio.sx { height: 100%; overflow-y: auto; overscroll-behavior-y: contain; }
  .sx-bar { flex-wrap: wrap; padding: 8px 10px; gap: 8px 10px; }
  .sx-body { display: flex; flex-direction: column; gap: 10px; padding: 10px; flex: none; }
  .sx-tools { display: block; order: 2; }
  .sx-stage { order: 1; container-type: normal; padding: 0; background: none; }
  .sx-stage .preview { width: 100%; }
  .sx-rail { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: visible; }
  .sx-rail .dk-group { flex-direction: row; }
  .sx-rail .dk-sep { width: 1px; height: auto; margin: 6px 4px; }
  .sx-rail .dk-btn, .sx-rail .dk-split .dk-main { width: 78px; }
  .sx-rail .dk-btn.open::before { display: none; }
  .sx-scenes { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 0 0; }
  .sx-body .st-aside { order: 3; border: 0; background: none; }
  .sx .st-tabs { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 10px; }
  .sx-body .st-aside .panel { overflow: visible; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .sx-body .st-aside .chat { flex: none; height: 62vh; height: 62dvh; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
  .sx-body .dk-menu {
    position: fixed; inset: auto 8px calc(8px + var(--safe-bottom)) 8px; width: auto; max-height: 74vh; z-index: 120;
    border: 1px solid var(--line-2); border-radius: 18px; box-shadow: none; animation: sheet-up .25s cubic-bezier(.2, .8, .2, 1);
  }
  @keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
}
@media (max-width: 760px) {
  /* minmax(0,…): a plain 1fr column grows to its widest child — in RTL the overflow went off the LEFT edge */
  .shell { grid-template-columns: minmax(0, 1fr); }
  #view, .channel-page, .studio, .page { min-width: 0; max-width: 100vw; }
  #view { overflow-x: hidden; }
  .sidebar { display: none; }
  .nav span, .go-btn span { display: none; }
  .nav { margin: 0; }
  /* phone top bar: ☰ · logo ……… search · go live · account */
  .topbar { gap: 6px; padding: 0 10px; }
  .brand { gap: 7px; margin-inline-end: auto; }
  .brand img { width: 30px; height: 30px; }
  .brand img.wm-img { width: auto; height: 19px; }
  .wm { font-size: 18px; }
  .top-actions { gap: 6px; }
  .search-btn { display: inline-grid; color: var(--text); }
  .go-btn { width: 38px; padding: 0; border-radius: 11px; }
  #onair:not([hidden]) ~ .go-btn { display: none; }   /* already live: the timer pill takes its place */
  .on-air { height: 34px; padding: 0 10px; font-size: 12px; }
  .sb-btn, .topbar .go-btn, .user-btn { display: none; }  /* the tab bar has «بث» and «حسابي» */
  .brand { margin-inline-start: 4px; }
  /* ---- app tab bar ---- */
  /* sized like a native iOS tab bar: 49pt of buttons, then the home-indicator area */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); flex: none; position: relative; z-index: 40;
    height: calc(50px + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
    background: rgba(14, 14, 19, .9); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: .5px solid rgba(255, 255, 255, .12);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding-top: 2px; color: var(--text-3); font-size: 10px; font-weight: 600; position: relative; -webkit-tap-highlight-color: transparent; }
  .tabbar a svg.i { width: 24px; height: 24px; }
  .tabbar a:active { opacity: .6; }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on > svg.i { color: var(--ember); }
  .tabbar a.on:not(.tab-go)::before { content: ''; position: absolute; top: -1px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
  .tabbar .tab-ico { display: grid; place-items: center; height: 23px; }
  .tabbar a.on .tab-ico svg.i { color: var(--ember); }
  .tabbar a.on .tab-ico .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ember); }
  .tab-go i {
    width: 44px; height: 44px; margin-top: -16px; border-radius: 15px; display: grid; place-items: center; color: #fff;
    background: var(--grad); box-shadow: 0 0 0 4px var(--bg);
  }
  .tab-go i svg.i { width: 22px; height: 22px; }
  body[data-route="c"] .tabbar, body[data-route="studio"] .tabbar { display: none; }   /* watching / streaming use the whole screen */
  /* pages outside the tabs get a back arrow — an installed app has no browser back button */
  body:is([data-route="c"], [data-route="studio"], [data-route="settings"], [data-route="customize"], [data-route="store"], [data-route="brand"]) .top-back { display: inline-grid; color: var(--text); margin-inline-end: -4px; }
  .cat-mark { display: none; }
  /* iPhone zooms the whole page into any field with text under 16px (and stays zoomed) */
  input, select, textarea, .input, .ci-box input { font-size: 16px !important; }
  /* chat box: one row — field + send, like the big apps */
  .chat-input { padding: 8px 10px calc(8px + var(--safe-bottom)); }
  .chat-input .ci-form { display: flex; align-items: center; gap: 8px; }
  .chat-input .ci-box { flex: 1; min-width: 0; }
  .chat-input .ci-box input { height: 40px; }
  .chat-input .ci-foot { margin: 0; }
  .chat-input .ci-foot .as { display: none; }
  .chat-input .ci-foot .btn { width: 44px; height: 44px; padding: 0; font-size: 0; gap: 0; border-radius: 12px; }
  .chat-input .ci-foot .btn svg.i { width: 20px; height: 20px; }
  /* ---- home on phones: compact feature card, swipeable rows ---- */
  .hero { border-radius: 16px; }
  .hero-info { padding: 12px 14px 14px; gap: 6px; }
  .hero-who .avatar { --s: 38px !important; }
  .hero-who b { font-size: 15px; }
  .hero-info h3 { font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-info .tags, .hero-info .desc, .hero-info > div:has(> .btn) { display: none; }
  .promo { display: none; }
  .sec-head { margin: 24px 0 12px; }
  .sec-head h2 { font-size: 16.5px; }
  #h-live .grid, #h-chat .grid, #h-comp .grid, #h-cats {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
    gap: 12px; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none;
  }
  #h-live .grid::-webkit-scrollbar, #h-chat .grid::-webkit-scrollbar, #h-comp .grid::-webkit-scrollbar, #h-cats::-webkit-scrollbar { display: none; }
  #h-live .card, #h-chat .card, #h-comp .card { flex: 0 0 82%; scroll-snap-align: start; }
  #h-cats .cat { flex: 0 0 112px; scroll-snap-align: start; }
  /* browse: three category posters a row, like the big apps */
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .cat-name { font-size: 13px; margin-top: 7px; }
  .cat-meta { font-size: 11.5px; }
  .cat .cat-live { font-size: 10.5px; }
  .card-tags { display: none; }
  .auth-btns #reg-btn { display: none; }                /* sign-up is a tab inside the login dialog */
  .auth-btns #login-btn { background: var(--surface-3); color: var(--text); height: 36px; padding: 0 14px; }
  .search { display: none; }
  .topbar.searching .search {
    display: flex; align-items: center; gap: 6px; position: absolute; z-index: 5;
    inset: var(--safe-top) 0 0 0; padding: 0 10px; max-width: none; margin: 0;
    background: var(--bg-elev); animation: fade .15s;
  }
  .topbar.searching .search-ico { inset-inline-start: 22px; }
  .topbar.searching .search input { flex: 1; height: 40px; font-size: 16px; }  /* 16px: no iOS zoom on focus */
  .topbar.searching .search-x { display: inline-grid; flex: none; }
  .topbar.searching .search-pop { inset-inline: 10px; top: calc(100% + 6px); max-height: 70vh; }
  /* sidebar as a slide-in drawer (☰) */
  body.sb-open .sidebar {
    display: block; position: fixed; z-index: 95; top: calc(var(--top-h) + var(--safe-top)); bottom: 0;
    inset-inline-start: 0; width: min(290px, 82vw); padding: 10px 8px 20px;
    box-shadow: none; animation: drawer .22s ease-out;
  }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(5, 5, 8, .6); backdrop-filter: blur(2px); }
  body.sb-open .sidebar .side-item { justify-content: flex-start; padding: 6px 10px; }
  body.sb-open .sidebar .side-item .meta, body.sb-open .sidebar .side-promo, body.sb-open .sidebar .side-foot { display: block; }
  body.sb-open .sidebar .side-item .vc { display: flex; }
  body.sb-open .sidebar .side-title span { display: inline; }
  body.sb-open .sidebar .side-title { justify-content: flex-start; }
  .sb-btn { margin: 0; }
  .topbar .nav { display: none; }  /* on phones the links live in the ☰ drawer */
  body.sb-open .side-nav { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
  .side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; font-weight: 600; color: var(--text-2); }
  .side-nav a:hover { background: var(--surface-2); color: var(--text); }
  .side-nav svg.i { width: 19px; height: 19px; }
  body.sb-open .side-head { display: none; }
  /* keep the top bar inside the screen — an over-wide bar pushed the whole page (and dialogs) sideways */
  .nav a[data-nav="home"] { display: none; }
  .search { min-width: 0; }
  .search input { padding-inline: 34px 8px; }
  .search-ico { inset-inline-start: 10px; }
  .user-area { gap: 6px; }
  .coin-pill { padding: 0 9px; }
  .tip-amounts { grid-template-columns: repeat(6, minmax(0, 1fr)); }   /* 5 amounts: three on top, two wide ones below */
  .tip-amounts > * { grid-column: span 2; }
  .tip-amounts > :nth-child(n+4) { grid-column: span 3; }
  .store-hero { padding: 24px 20px; }
  .store-hero h1 { font-size: 26px; }
  .wallet { min-width: 0; width: 100%; }
  .packs { grid-template-columns: 1fr; }
  /* channel page on phones (like the big apps): player on top, a compact info bar,
     then «الدردشة / عن القناة» tabs filling the rest of the screen — nothing scrolls but the tab itself */
  #view.fill { overflow: hidden; }
  .channel-page { display: flex; flex-direction: column; height: 100%; }
  .ch-main { display: contents; }
  .channel-page .player { order: 1; flex: none; max-height: none; }
  .channel-page .ch-info {
    order: 2; flex: none; margin: 0; padding: 10px 12px; gap: 10px; align-items: center;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; border-bottom: 1px solid var(--line);
  }
  .channel-page .ch-info > .avatar { --s: 40px !important; }
  .channel-page .ch-name { font-size: 15.5px; gap: 4px; }
  .channel-page .ch-name .verified svg.i { width: 16px; height: 16px; }
  .channel-page .ch-title { font-size: 12.5px; margin-top: 1px; color: var(--text-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .channel-page .ch-meta { margin-top: 2px; flex-wrap: nowrap; min-width: 0; }
  .channel-page .ch-meta .tag { display: none; }
  .channel-page .ch-cat { font-size: 12px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .channel-page .ch-fol { flex: none; font-size: 12px; white-space: nowrap; }
  .channel-page .btn-follow.on { width: 34px; padding: 0; justify-content: center; }   /* already following: just the heart */
  .channel-page .btn-follow.on .fl-lbl { display: none; }
  .channel-page .ch-actions { width: auto; flex-direction: row; gap: 0; }
  .channel-page .ch-actions .row { gap: 6px; }
  .channel-page .ch-stats { display: none; }          /* viewers are already on the player */
  .channel-page .ch-actions .btn { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
  .channel-page .ch-actions .btn .lbl { display: none; }
  .channel-page .ch-actions .btn:has(.lbl) { width: 34px; padding: 0; }
  .channel-page .ch-actions .icon-btn { width: 34px; height: 34px; }
  .ch-tabs { order: 3; flex: none; display: flex; background: var(--bg-elev); border-bottom: 1px solid var(--line); }
  .ch-tabs button { flex: 1; height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; font-size: 13.5px; color: var(--text-3); position: relative; }
  .ch-tabs button svg.i { width: 17px; height: 17px; }
  .ch-tabs button.on { color: var(--text); }
  .ch-tabs button.on::after { content: ''; position: absolute; inset-inline: 22%; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad); }
  .channel-page .chat { order: 4; flex: 1; height: auto; min-height: 0; border: 0; }
  .channel-page .chat-head { display: none; }        /* the tab already says it */
  .channel-page .ch-extra { order: 4; flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 30px; display: none; }
  .channel-page.tab-about .chat { display: none; }
  .channel-page.tab-about .ch-extra { display: flex; }
  .channel-page .ch-extra > * { flex-shrink: 0; }     /* scroll the tab instead of squashing its cards */
  /* offline screen inside the small phone player: the avatar is already in the info bar below */
  .p-state.offline { padding: 10px 14px 12px; }
  .p-state.offline .box { gap: 5px; }
  .p-state.offline h3 { font-size: 15px; }
  .p-state.offline p { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .p-state.offline .next-pill { height: 26px; font-size: 11.5px; }
  .p-state.offline .row { margin-top: 2px; }
  .p-state.offline .row .btn { height: 32px; font-size: 12.5px; padding: 0 12px; }
  .about-body { padding: 0 16px 18px; }
  .sched-week { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 104px; overflow-x: auto; padding-bottom: 4px; }
  .ch-sec { padding: 16px; }
  #cz-prev { grid-template-columns: minmax(0, 1fr); }
  #cz-prev > .pv-offline { display: none; }  /* phones: the channel card is enough */
  .cz-sec { padding: 16px; }
  .cz-av { flex-direction: column; align-items: flex-start; }
  .cz-cover-acts { position: static; padding: 10px; background: var(--surface-2); }
  .sc-row { grid-template-columns: 1fr; gap: 8px; }
  .sc-times .input { width: auto; flex: 1; }
  .cz-bar { bottom: 10px; }
  .cz-bar > span { font-size: 12.5px; }
  /* studio on phones: stats row · preview · tools · scenes · tabs (info | chat); «ابدأ البث» fixed at the bottom */
  .studio.sx { padding: 0 0 calc(80px + var(--safe-bottom)); }
  .sx-title, .sx-acts { display: none; }
  .sx-bar { padding: 10px 10px 0; border: 0; background: none; }
  .studio .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .studio .stat { display: block; padding: 8px 4px; text-align: center; border-radius: 12px; }
  .studio .stat .k { justify-content: center; font-size: 0; }   /* icon only */
  .studio .stat .k svg.i { width: 16px; height: 16px; }
  .studio .stat .v { font-size: 14.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sx-rail { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; padding: 6px; }
  .sx-rail .dk-sep { display: none; }
  .sx-rail .dk-src { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .sx-rail .dk-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }   /* 6 tools: two even rows, like the sources above */
  .sx-rail .dk-btn, .sx-rail .dk-split .dk-main { width: 100%; height: 64px; }
  .sx-rail .dk-tools .sx-lbl { display: none; }
  .sx-rail .dk-tools .dk-s { display: block; font-size: 10.5px; font-weight: 600; line-height: 1; }
  .sx-ico { width: 36px; height: 36px; }
  .sx-scene kbd { display: none; }
  .sx-scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .st-bar {
    display: flex; align-items: center; gap: 10px; position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + var(--safe-bottom)); background: rgba(16, 16, 22, .94); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .st-bar .btn { flex: 1; height: 50px; font-size: 16px; border-radius: 14px; }
  .st-bar-time { display: inline-flex; align-items: center; gap: 7px; height: 50px; padding: 0 14px; border-radius: 14px; background: var(--ember-soft); border: 1px solid rgba(81, 179, 208, .4); color: var(--ember-300); font-weight: 700; font-variant-numeric: tabular-nums; }
  .st-bar-time .dot { animation: pulse 1.4s infinite; }
  .lay-row { flex-direction: column; }
  .page, .studio { padding: 18px 16px 50px; }
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo { flex-direction: column; text-align: center; padding: 26px 20px; }
  .hero-info { padding: 18px; }
  .bp-hero { flex-direction: column; text-align: center; padding: 28px 20px; }
  .bp-hero h1 { font-size: 28px; }
  .page-title { font-size: 26px; }
  .cat-hero .cat-art { width: 96px; }
}

/* ================= launch features ================= */
/* notifications bell */
.bell { position: relative; }
.bell > b {
  position: absolute; top: 2px; inset-inline-end: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  display: grid; place-items: center; background: var(--ember); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 2px var(--bg);
}
.bell > b[hidden] { display: none; }
.notif-pop { width: min(360px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-pop .np-head button { width: auto; padding: 4px 8px; font-size: 12px; color: var(--ember-300); }
.np-list { max-height: min(420px, 60vh); overflow-y: auto; padding: 6px; }
.notif-pop a.np-item { align-items: flex-start; gap: 10px; padding: 10px; color: var(--text-2); }
.np-item.new { background: rgba(81, 179, 208, .07); }
.np-item.new .np-txt b::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); margin-inline-start: 6px; vertical-align: 2px; }
.np-ic { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--ember-300); }
.np-ic svg.i { width: 16px !important; height: 16px !important; }
.np-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.np-txt b { color: var(--text); font-size: 13px; }
.np-txt span { font-size: 12.5px; overflow-wrap: anywhere; }
.np-txt small { color: var(--text-3); font-size: 11.5px; }
.np-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 10px; color: var(--text-3); font-size: 13px; }
.np-foot { border-top: 1px solid var(--line); padding: 10px 14px; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.notif-pop .np-foot button:not(.btn) { width: auto; padding: 2px 6px; margin-inline-start: auto; font-size: 12px; }
.notif-pop .np-foot .btn { justify-content: center; color: #fff; }

/* chat: moderators, modes, polls */
.chat-head { position: relative; }
.chat-tools { position: absolute; inset-inline-end: 8px; width: 34px; height: 34px; color: var(--text-3); }
.chat-tools:hover { color: var(--ember-300); }
.chat-pop {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 8px; z-index: 20; width: 270px; text-align: start;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; box-shadow: none;
  animation: pop .15s; font-weight: 400; color: var(--text);
}
.chat-pop .mn-label { margin-bottom: 8px; }
.chat-pop .chips { margin-bottom: 12px; }
.chat-pop .mn-toggle + .mn-toggle { margin-top: 6px; }
.chat-pop-acts { display: flex; gap: 6px; margin-top: 12px; }
.chat-pop-acts .btn { flex: 1; }
.chat-pop .fine { margin: 10px 0 0; font-size: 11.5px; }
.chat-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex: none; }
.chat-modes[hidden] { display: none; }
.chat-modes span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); }
.chat-modes svg.i { width: 13px; height: 13px; }
.badge.mod { background: #2BA86B; }
.badge.sub { background: #C08A1E; }
.msg .mact { display: none; float: inline-end; gap: 2px; margin-inline-start: 6px; }
.chat.is-mod .msg:hover .mact { display: inline-flex; }
.mact button { width: 24px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); }
.mact button:hover { background: var(--surface-3); color: var(--danger); }
.mact svg.i { width: 13px; height: 13px; }
.msg.tip.sub { background: linear-gradient(135deg, rgba(238, 152, 79, .16), rgba(81, 179, 208, .08)); border-color: rgba(238, 152, 79, .45); }
.msg.tip.sub .tip-head svg.i { fill: none; stroke: #FFC24D; }
.chat-poll { flex: none; margin: 8px 10px 0; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); }
.chat-poll[hidden] { display: none; }
.chat-poll.inline { margin: 0; }
.cp-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cp-head svg.i { width: 16px; height: 16px; color: var(--ember); flex: none; }
.cp-head b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cp-time, .cp-done { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cp-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.cp-opt {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 36px; padding: 0 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 13px; text-align: start; transition: border-color .15s;
}
.cp-opt:not(:disabled):hover { border-color: var(--ember); }
.cp-opt i { position: absolute; inset-block: 0; inset-inline-start: 0; background: rgba(81, 179, 208, .16); transition: width .4s; }
.cp-opt.mine { border-color: var(--ember); }
.cp-opt span, .cp-opt b { position: relative; }
.cp-opt b { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.cp-opt:disabled { cursor: default; color: var(--text); }
.cp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.cp-end { font-size: 12px; color: var(--ember-300); }
.pl-opts { display: grid; gap: 6px; }
.sheet-mod { padding: 12px 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sheet-mod .mn-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sheet-mod .mn-label svg.i { width: 14px; height: 14px; }
.chip.danger { color: var(--danger); }
.chip svg.i { width: 13px; height: 13px; vertical-align: -2px; }

/* channel: subscribe, goal, clips, replays, raid */
/* the info bar follows its own width (sidebar + chat can leave the player column narrow on laptops) */
.ch-info { container-type: inline-size; }
.about-share { display: none; }
@media (min-width: 761px) {
  .ch-info { flex-wrap: wrap; }
  .ch-info .who { flex: 1 1 0; }
  @container (max-width: 700px) {
    .ch-actions { width: 100%; flex-direction: row-reverse; justify-content: space-between; align-items: center; }
  }
  @container (max-width: 520px) {
    .ch-actions .btn .lbl { display: none; }
    .ch-actions .btn:has(.lbl) { width: 40px; padding: 0; justify-content: center; }
  }
}
@media (max-width: 760px) {
  .channel-page .ch-goal { order: 2; flex: none; margin: 8px 12px 0; }
  .channel-page .ch-actions [data-a="share"] { display: none; }   /* on phones it sits in «عن القناة» */
  .about-share { display: inline-flex; margin-top: 12px; }
  .channel-page .chat.is-mod .chat-head { display: flex; height: 40px; }   /* moderators keep their tools */
}
.btn-sub { background: rgba(192, 138, 30, .12); color: #FFC24D; border: 1px solid rgba(255, 194, 77, .35); }
.btn-sub:hover { background: rgba(192, 138, 30, .2); }
.btn-sub.on { background: rgba(192, 138, 30, .22); }
.sub-perks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.sub-perks li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.sub-perks svg.i { width: 16px; height: 16px; color: #FFC24D; flex: none; }
.ch-goal { display: flex; align-items: center; gap: 12px; padding: 10px 16px; margin-top: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.ch-goal[hidden] { display: none; }
.g-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.g-t svg.i { width: 15px; height: 15px; color: var(--ember); flex: none; }
.g-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.g-bar i { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .6s; }
.g-n { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.g-n svg.i { width: 13px; height: 13px; fill: var(--ember); stroke: var(--ember); }
.raid-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 61, 61, .18), rgba(238, 152, 79, .12)); border: 1px solid rgba(255, 140, 60, .5); animation: pop .2s;
}
.raid-banner > svg.i { width: 24px; height: 24px; color: var(--amber); flex: none; }
.raid-banner > div { flex: 1; display: flex; flex-direction: column; font-size: 13px; color: var(--text-2); }
.raid-banner b { color: var(--text); font-size: 14.5px; }
.ch-sec h3 small { font-weight: 400; font-size: 12px; color: var(--text-3); margin-inline-start: 6px; }
.vod-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.vod-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vod-card .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); margin-bottom: 6px; }
.vod-card .thumb img, .vod-card .thumb .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vod-card .t-vc { position: absolute; bottom: 8px; inset-inline-end: 8px; font-variant-numeric: tabular-nums; }
.vod-card b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vod-card small { color: var(--text-3); font-size: 12px; }
.vod-card:hover b { color: var(--ember-300); }
.clip-ic { position: absolute; top: 8px; inset-inline-start: 8px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(11, 11, 15, .75); }
.clip-ic svg.i { width: 14px; height: 14px; }
.vod-page { max-width: 1100px; }
.vod-player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-lg); overflow: hidden; }
.vod-player video { width: 100%; height: 100%; display: block; }
.vod-player .p-state[hidden] { display: none; }
.vod-ctrls {
  position: absolute; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 22px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .75)); opacity: 0; transition: opacity .2s;
}
.vod-player:hover .vod-ctrls, .vod-player:focus-within .vod-ctrls { opacity: 1; }
@media (hover: none) { .vod-ctrls { opacity: 1; } }
.vod-ctrls .icon-btn { color: #fff; }
.vod-t, .vod-d { font-size: 12.5px; font-variant-numeric: tabular-nums; color: #fff; min-width: 40px; text-align: center; }
.vod-seek { flex: 1; accent-color: var(--ember); direction: ltr; }
@media (max-width: 760px) {   /* phones: the seek bar gets its own full row, the buttons sit under it */
  .vod-ctrls { flex-wrap: wrap; row-gap: 2px; padding-top: 30px; }
  .vod-seek { order: -1; flex: 1 0 100%; }
  .vod-ctrls [data-a="mute"] { margin-inline-start: auto; }
}
.vod-head { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.vod-head > div:nth-child(2) { flex: 1; min-width: 200px; }
.vod-head h1 { font-size: 20px; margin: 0; }
.vod-head p { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }
.vod-head p a { color: var(--text-2); font-weight: 600; }
.vod-acts { display: flex; gap: 8px; }

/* studio: quality + «المجتمع» */
.q-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-card { padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface-2); text-align: start; display: flex; flex-direction: column; gap: 2px; }
.q-card b { font-family: var(--display); font-size: 15px; }
.q-card small { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.q-card.on { border-color: var(--ember); background: var(--ember-soft); }
.q-card:disabled { opacity: .55; cursor: not-allowed; }
.cm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cm-tags .tag { display: inline-flex; align-items: center; gap: 4px; }
.cm-tags .tag svg.i { width: 12px; height: 12px; }
.cm-tags .tag button { color: var(--text-3); font-size: 11px; padding: 0 2px; }
.cm-tags .tag button:hover { color: var(--danger); }
.cm-add { display: flex; gap: 6px; }
.cm-add .input { flex: 1; }
.cm-goal { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; margin-bottom: 10px; border-radius: 11px; background: var(--surface-2); }
.cm-goal small { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* home: rising channels */
.sec-head small.muted { font-size: 12.5px; }
.rising { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.rise {
  flex: none; width: 138px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; transition: border-color .15s, transform .15s;
}
.rise:hover { border-color: var(--line-2); transform: translateY(-2px); }
.rise b { font-size: 13.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rise small { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 12px; }

/* dashboard + admin */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 18px; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
a.dash-card:hover { border-color: var(--line-2); }
.dash-card .sum-ic { margin: 0 0 8px; }
.dash-card b { font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.dash-card small { color: var(--text-3); font-size: 12px; }
.dash-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.dash-charts .wide { grid-column: 1 / -1; }
.dash-charts h3, .dash h3, .admin h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; margin: 0 0 14px; }
.dash h3 small, .admin h3 small { color: var(--text-3); font-weight: 400; font-size: 12px; margin-inline-start: auto; }
.dash h3 svg.i, .admin h3 svg.i { width: 16px; height: 16px; color: var(--ember); }
.bars { width: 100%; height: 120px; display: block; }
.bars rect { fill: var(--ember); opacity: .85; }
.bars rect:hover { opacity: 1; }
.bars rect.zero { fill: var(--surface-3); }
.dual { display: grid; gap: 6px; }
.dual .bars { height: 80px; }
.dual .bars:last-child rect:not(.zero) { fill: var(--amber); }
.table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th { text-align: start; color: var(--text-3); font-weight: 600; font-size: 12px; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dash-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.dash-table td b { display: block; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-table td small { display: block; color: var(--text-3); font-size: 11.5px; }
.hot { color: var(--ember-300); font-style: normal; }
.tab-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ember); color: #fff; font-size: 11px; margin-inline-start: 4px; }
.tab-n[hidden] { display: none; }
.tabs a svg.i { width: 15px; height: 15px; vertical-align: -3px; }
.admin .tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.admin .tabs::-webkit-scrollbar { display: none; }
.admin .tabs a { white-space: nowrap; }
.adm-seg { max-width: 360px; margin-bottom: 14px; }
.adm-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.adm-top small { flex-basis: 100%; color: var(--text-3); font-size: 12px; }
.adm-who { color: var(--text-2); font-size: 13px; }
.adm-who a { color: var(--text); font-weight: 600; }
.adm-who em { font-style: normal; font-size: 12px; color: var(--danger); margin-inline-start: 4px; }
.adm-sus { margin-inline-end: auto; }
.pill.danger { color: var(--danger); border-color: rgba(255, 84, 104, .4); }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.chk { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); }
.chk svg.i { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.chk.ok svg.i { color: var(--ok); }
.chk.todo svg.i { color: var(--amber); }
.chk b { display: block; font-size: 13.5px; }
.chk small { color: var(--text-3); font-size: 12px; overflow-wrap: anywhere; }
.admin .panel { margin-top: 12px; }

/* auth + settings */
.link-btn { background: none; color: var(--ember-300); font-size: 12.5px; padding: 0; margin: -6px 0 12px; }
.link-btn:hover { text-decoration: underline; }
.link-btn[hidden] { display: none; }
.reset-gate form { max-width: 360px; margin: 18px auto 0; }
.payout-form { margin-top: 6px; }
.payout-form .field small { display: block; margin-top: 4px; }

@media (max-width: 760px) {
  .dash-charts { grid-template-columns: 1fr; }
  .ch-goal { margin-inline: 12px; flex-wrap: wrap; }
  .g-t { max-width: 100%; flex-basis: 100%; }
  .chat-pop { width: min(300px, calc(100vw - 24px)); }
  .vod-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.chart-empty { display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--text-3); font-size: 12.5px; }
@media (min-width: 761px) and (max-width: 1000px) { .sx-bar { position: sticky; top: 0; z-index: 15; } }   /* tablets: «ابدأ البث» stays in reach while scrolling the studio */

/* player: quality menu */
.q-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 9px; color: #fff; font-size: 12px; font-weight: 600; }
.q-btn:hover { background: rgba(255, 255, 255, .12); }
.q-btn svg.i { width: 17px; height: 17px; }
.q-btn[hidden] { display: none; }
.q-pop {
  position: absolute; bottom: 56px; inset-inline-end: 12px; z-index: 8; min-width: 190px; padding: 6px;
  background: rgba(16, 16, 22, .96); backdrop-filter: blur(8px); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: none; animation: pop .15s;
}
.q-pop .q-h { padding: 6px 10px 8px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.q-pop button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text); text-align: start; }
.q-pop button:hover { background: var(--surface-3); }
.q-pop button.on { color: var(--ember-300); }
.q-pop button.on::after { content: '✓'; margin-inline-start: auto; }
.q-pop small { color: var(--text-3); font-size: 11.5px; }
.player:has(.q-pop) .player-ctrls { opacity: 1; }

/* top bar on laptops / tablets: the links shrink to icons so the search box keeps room to type */
@media (min-width: 761px) and (max-width: 1100px) {
  .topbar .nav a { font-size: 0; gap: 0; padding-inline: 9px; }
  .topbar .nav a svg.i { width: 20px; height: 20px; }
  .search { min-width: 170px; }
}
/* welcome after signing up */
.ws { text-align: center; }
.ws h2 { margin: 6px 0 4px; }
.ws > p { margin: 0 0 16px; }
.ws-step {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; text-align: start;
  background: var(--surface-2); border: 1px solid var(--line-2); transition: border-color .15s;
}
.ws-step:hover { border-color: var(--ember); }
.ws-step > svg.i:first-child { width: 22px; height: 22px; color: var(--ember); flex: none; }
.ws-step span { flex: 1; display: flex; flex-direction: column; }
.ws-step small { color: var(--text-3); font-size: 12.5px; }
.ws-step .go { width: 16px; height: 16px; color: var(--text-3); }
.ws .btn-ghost { margin-top: 6px; }
.file-btn { cursor: pointer; }
.earn-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.earn-split > div { padding: 10px 12px; border-radius: 11px; background: var(--surface-2); display: flex; flex-direction: column; }
.earn-split b { font-family: var(--display); font-size: 18px; font-variant-numeric: tabular-nums; }
.earn-split small { color: var(--text-3); font-size: 12px; }
.payout-form [hidden] { display: none; }

/* ================= admin panel ================= */
/* the panel has its own navigation, so the platform's channel list steps aside */
body[data-route="admin"] .shell { grid-template-columns: minmax(0, 1fr); }
body[data-route="admin"] .sidebar { display: none; }
.admin-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; max-width: 100%; }
.adm-nav {
  position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; height: calc(100vh - var(--top-h));
  padding: 18px 12px 14px; border-inline-end: 1px solid var(--line); background: var(--bg-elev); overflow-y: auto;
}
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.adm-brand img { width: 30px; height: 30px; }
.adm-brand b { display: block; font-family: var(--display); font-size: 15px; }
.adm-brand small { color: var(--text-3); font-size: 12px; }
.adm-nav nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.adm-group { padding: 14px 10px 6px; color: var(--text-3); font-size: 11.5px; font-weight: 600; letter-spacing: .2px; }
.adm-nav nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 14px; transition: background .12s, color .12s; }
.adm-nav nav a:hover { background: var(--surface-2); color: var(--text); }
.adm-nav nav a.on { background: var(--ember-soft); color: var(--text); box-shadow: inset -3px 0 0 var(--ember); }
.adm-nav nav a svg.i { width: 18px; height: 18px; flex: none; }
.adm-nav nav a.on svg.i { color: var(--ember); }
.adm-nav nav a span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-me { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 10px 2px; border-top: 1px solid var(--line); }
.adm-me b { display: block; font-size: 13.5px; line-height: 1.3; }
.adm-main { min-width: 0; width: 100%; max-width: 1240px; padding: 26px 32px 80px; }
.adm-main .link-btn { margin: 0; font-size: inherit; font-weight: 600; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.adm-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.adm-title-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--ember-soft); color: var(--ember); }
.adm-title-ic svg.i { width: 22px; height: 22px; }
.adm-head h1 { font-size: 23px; margin: 0; line-height: 1.25; }
.adm-head p { margin: 2px 0 0; color: var(--text-3); font-size: 13.5px; }
.adm-head-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-head-acts:empty { display: none; }
.adm-head-acts .seg { margin: 0; }
.adm-count { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
.adm-count svg.i { width: 15px; height: 15px; color: var(--text-3); }
.adm-search { position: relative; width: min(320px, 100%); }
.adm-search svg.i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.adm-search .input { padding-inline-start: 38px; margin: 0; }
#adm-q { max-width: none; margin: 0; }
#adm > * + * { margin-top: 16px; }
.adm-main .panel { padding: 20px; min-width: 0; }
.adm-main .panel h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 16px; }
.adm-main .panel h3 svg.i { width: 17px; height: 17px; color: var(--ember); }
.adm-main .panel h3 small { color: var(--text-3); font-weight: 400; font-size: 12.5px; margin-inline-start: auto; }
.adm-main .panel.adm-flush { padding: 4px 0; overflow: hidden; }
.adm-main .hint { margin: 10px 2px 0; }
.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.adm-grid.one { grid-template-columns: minmax(0, 1fr); }
.adm-grid > .panel { margin: 0; }

/* number cards */
.adm-kpis { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 12px; }
.adm-kpi { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s; }
a.adm-kpi:hover { border-color: var(--line-2); }
.k-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.k-ic svg.i { width: 20px; height: 20px; }
.k-txt { display: flex; flex-direction: column; min-width: 0; }
.k-txt b { font-family: var(--display); font-size: 21px; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-txt small { color: var(--text-2); font-size: 12.5px; }
.k-txt em { font-style: normal; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-kpi.warn { border-color: rgba(81, 179, 208, .35); background: linear-gradient(135deg, rgba(81, 179, 208, .09), transparent 70%), var(--surface); }
.adm-kpi.warn .k-ic { background: var(--ember-soft); color: var(--ember); }
.adm-kpi.warn em { color: var(--ember-300); }

/* lists of cards (reports, payouts, live) */
.adm-list { display: flex; flex-direction: column; gap: 12px; }
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 0; }
.adm-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-card-head b { font-size: 14.5px; }
.adm-when { margin-inline-start: auto; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.adm-amount { font-family: var(--display); font-size: 19px !important; }
.adm-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; color: var(--text-2); font-size: 13px; }
.adm-meta em { font-style: normal; font-size: 12px; margin-inline-start: 6px; }
.adm-meta a { color: var(--text); font-weight: 600; }
.adm-detail { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; overflow-wrap: anywhere; }
.adm-copy { display: flex; align-items: center; gap: 10px; }
.adm-copy > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-copy small { color: var(--text-3); font-size: 12px; }
.adm-detail .icon-btn { width: 30px; height: 30px; flex: none; }
.adm-detail .icon-btn svg.i { width: 15px; height: 15px; }
.adm-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.adm-acts-sep { flex: 1; }
.adm-card > .hint { margin: 12px 0 0; }
.adm-sus { margin-top: 14px; }
.pill.danger { color: var(--danger); border-color: rgba(255, 84, 104, .4); }
.pill.ok { color: var(--ok); border-color: rgba(43, 212, 125, .35); }
.danger-t { color: var(--danger); }

.adm-live-row { display: flex; align-items: center; gap: 16px; }
.adm-live-thumb { position: relative; flex: none; width: 160px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.adm-live-thumb img, .adm-live-thumb .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adm-live-thumb .live-badge { position: absolute; top: 6px; inset-inline-start: 6px; }
.adm-live-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.adm-live-info > span { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-live-info small { color: var(--text-3); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.adm-live-info small svg.i { width: 13px; height: 13px; }
.adm-live-row .adm-acts { margin: 0; padding: 0; border: 0; flex: none; }

/* tables */
.adm-tbl th { padding: 12px 16px; background: var(--surface-2); font-size: 12px; }
.adm-tbl td { padding: 12px 16px; }
.adm-tbl tr:last-child td { border-bottom: 0; }
.adm-tbl td.end { text-align: end; }
.dash-table tr.clickable { cursor: pointer; }
.dash-table tr.clickable:hover td { background: var(--surface-2); }
.adm-cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-cell-user > div { min-width: 0; }
.adm-cell-user b { display: block; }

/* log + launch checklist */
.adm-more { margin-inline-start: auto; font-size: 12.5px; font-weight: 500; color: var(--ember-300); }
.adm-ready summary { list-style: none; cursor: pointer; }
.adm-ready summary::-webkit-details-marker { display: none; }
.adm-main .adm-ready summary h3 { margin-bottom: 0; }
.adm-main .adm-ready[open] summary h3 { margin-bottom: 16px; }
.adm-log { display: flex; flex-direction: column; }
.adm-log-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.adm-log-row:first-child { padding-top: 0; }
.adm-log-row:last-child { border-bottom: 0; padding-bottom: 0; }
.adm-log-row .pill { flex: none; }
.adm-log-row > span:nth-child(2) { flex: 1; min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.adm-log-row small { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.chk { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); min-width: 0; }
.chk > div { min-width: 0; }
.chk svg.i { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.chk.ok svg.i { color: var(--ok); }
.chk.todo svg.i { color: var(--amber); }
.chk b { display: block; font-size: 13.5px; }
.chk small { color: var(--text-3); font-size: 12px; overflow-wrap: anywhere; }

/* a user's file */
.modal.modal-user { width: min(660px, 100%); }
.adm-user-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-inline-end: 30px; }
.adm-user-head h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 2px; font-size: 20px; }
.adm-user-head small { color: var(--text-3); font-size: 12.5px; }
.adm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 16px; }
.adm-stats > div { padding: 10px 12px; border-radius: 11px; background: var(--surface-2); display: flex; flex-direction: column; min-width: 0; }
.adm-stats b { font-family: var(--display); font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-stats small { color: var(--text-3); font-size: 11.5px; }
.adm-user-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.adm-user .mn-label { margin: 16px 0 8px; }
.adm-mini { display: flex; flex-direction: column; gap: 6px; }
.adm-mini > div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.adm-mini > div > span:nth-child(2) { flex: 1; min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.adm-mini small { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.chips label.chip { cursor: pointer; }

/* the team */
.role-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.role-pill.owner { background: rgba(238, 152, 79, .14); color: var(--amber); }
.role-pill.assistant { background: var(--ember-soft); color: var(--ember-300); }
.role-pill.moderator { background: rgba(80, 160, 255, .13); color: #7CB8FF; }
.adm-me .role-pill { height: 20px; margin-top: 2px; }
.role-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.role-ic svg.i { width: 19px; height: 19px; }
.role-ic.owner { background: rgba(238, 152, 79, .14); color: var(--amber); }
.role-ic.assistant { background: var(--ember-soft); color: var(--ember); }
.role-ic.moderator { background: rgba(80, 160, 255, .13); color: #7CB8FF; }
.adm-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.adm-role { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.adm-role b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.adm-role b em { font-style: normal; font-size: 12px; color: var(--text-3); font-weight: 500; }
.adm-role small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.adm-staff-row { display: grid; grid-template-columns: minmax(170px, 1.1fr) auto minmax(0, 2fr) auto; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.adm-staff-row:last-child { border-bottom: 0; }
.adm-staff-row small { color: var(--text-3); font-size: 12px; }
.adm-perms { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.perm-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; white-space: nowrap; }
.perm-tag.all { color: var(--ember-300); border-color: rgba(81, 179, 208, .3); background: var(--ember-soft); }
.adm-row-acts { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.adm-row-acts .icon-btn { width: 34px; height: 34px; }
.modal.modal-staff { width: min(620px, 100%); }
.staff-form { margin-top: 16px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-opt { cursor: pointer; }
.role-opt input { position: absolute; opacity: 0; pointer-events: none; }
.role-opt > span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); transition: border-color .15s, background .15s; }
.role-opt > span .role-ic { margin-bottom: 6px; }
.role-opt b { font-size: 14px; }
.role-opt small { color: var(--text-3); font-size: 12.5px; white-space: normal; line-height: 1.5; }
.role-opt > span > * { min-width: 0; max-width: 100%; }
.role-opt input:checked + span { border-color: var(--ember); background: var(--ember-soft); }
.role-opt input:focus-visible + span { outline: 2px solid var(--ember-ring); outline-offset: 2px; }
.perm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.perm-head label { margin: 0; }
.perm-head .link-btn { margin: 0; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perm { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.perm:has(input:checked) { border-color: rgba(81, 179, 208, .45); }
.perm input { margin: 3px 0 0; accent-color: var(--ember); width: 16px; height: 16px; flex: none; }
.perm span { display: flex; flex-direction: column; min-width: 0; }
.perm b { font-size: 13px; }
.perm small { color: var(--text-3); font-size: 11.5px; line-height: 1.45; }

/* site-wide banner (set from the admin panel) */
.site-banner { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: rgba(81, 179, 208, .1); border-bottom: 1px solid rgba(81, 179, 208, .3); font-size: 13.5px; }
.site-banner > svg.i { width: 17px; height: 17px; color: var(--ember); flex: none; }
.site-banner > span { flex: 1; min-width: 0; }
.site-banner a { color: var(--ember-300); font-weight: 600; white-space: nowrap; }
.site-banner .icon-btn { width: 28px; height: 28px; }
.site-banner.warn { background: rgba(238, 152, 79, .12); border-color: rgba(238, 152, 79, .4); }
.site-banner.warn > svg.i { color: var(--amber); }
.site-banner.preview { border: 1px solid rgba(81, 179, 208, .3); border-radius: 10px; margin-bottom: 14px; }

/* «حالة النظام» */
.sys-page > * + * { margin-top: 16px; }
.sys-alerts { display: flex; flex-direction: column; gap: 8px; }
.sys-alert { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: 14px; border: 1px solid rgba(81, 179, 208, .35);
  background: linear-gradient(135deg, rgba(81, 179, 208, .1), transparent 70%), var(--surface); }
.sys-alert > svg.i { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--ember); }
.sys-alert > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sys-alert b { font-size: 14.5px; }
.sys-alert span { color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.sys-alert small { color: var(--text-3); font-size: 12px; }
.sys-alert.critical { border-color: rgba(255, 84, 104, .5); background: linear-gradient(135deg, rgba(255, 84, 104, .12), transparent 70%), var(--surface); }
.sys-alert.critical > svg.i { color: var(--danger); }
.sys-alert.ok { border-color: rgba(43, 212, 125, .3); background: linear-gradient(135deg, rgba(43, 212, 125, .08), transparent 70%), var(--surface); }
.sys-alert.ok > svg.i { color: var(--ok); }
.lines { width: 100%; height: 110px; display: block; overflow: visible; }
.lines path.l { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lines path.a { stroke: none; opacity: .12; }
.lines .l0 { stroke: var(--ember); fill: var(--ember); }
.lines .l1 { stroke: var(--amber); fill: var(--amber); }
.lines .l2 { stroke: var(--danger); fill: var(--danger); }
.lines path.l { fill: none; }
.sys-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-3); font-size: 11px; direction: rtl; }
.sys-key { display: inline-flex; gap: 12px; margin-inline-start: 8px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.sys-key i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-inline-end: 5px; vertical-align: middle; }
.sys-key .k0 { background: var(--ember); } .sys-key .k1 { background: var(--amber); } .sys-key .k2 { background: var(--danger); }
.sys-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
.sys-facts > div { padding: 10px 12px; border-radius: 11px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sys-facts small { color: var(--text-3); font-size: 11.5px; }
.sys-facts b { font-size: 15px; overflow-wrap: anywhere; }
.sys-more { margin-top: 14px; }
.sys-more summary, .sys-trace summary { cursor: pointer; color: var(--text-2); font-size: 13px; }
.sys-more .chips { margin-top: 10px; }
.sys-trace pre { margin: 8px 0 0; padding: 10px; border-radius: 8px; background: var(--bg); color: var(--text-2); font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; text-align: left; }
.sys-host { text-align: center; }
.panel code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); }

@media (max-width: 1180px) {
  .adm-kpis[style*="--cols:4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-staff-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .adm-staff-row .adm-perms { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 1000px) {
  .adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-roles { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .adm-nav { position: static; height: auto; padding: 8px 10px; border-inline-end: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .adm-brand, .adm-group, .adm-me { display: none; }
  .adm-nav nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .adm-nav nav::-webkit-scrollbar { display: none; }
  .adm-nav nav a { flex: none; padding: 8px 12px; font-size: 13px; }
  .adm-nav nav a.on { box-shadow: inset 0 -2px 0 var(--ember); }
  .adm-main { padding: 18px 16px 70px; }
  .adm-head { margin-bottom: 16px; padding-bottom: 14px; }
  .adm-title-ic { width: 38px; height: 38px; }
  .adm-head h1 { font-size: 20px; }
  .adm-head-acts { width: 100%; }
  .adm-search { width: 100%; }
  .adm-live-row { flex-wrap: wrap; }
  .adm-live-thumb { width: 120px; }
  .adm-live-row .adm-acts { width: 100%; }
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .adm-kpi { padding: 12px; gap: 10px; }
  .k-ic { width: 36px; height: 36px; }
  .k-txt b { font-size: 18px; }
  .adm-staff-row { grid-template-columns: minmax(0, 1fr) auto; padding: 14px; }
  .adm-staff-row .role-pill { grid-column: 2; grid-row: 1; }
  .adm-staff-row .adm-row-acts { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; }
  .role-pick, .perm-grid { grid-template-columns: 1fr; }
  .adm-card { padding: 14px; }
}

/* ================= wallet «المحفظة» ================= */
.wallet { max-width: 1120px; }
.wallet > .panel, .wallet .wl-grid, .wallet .wl-strip { margin-top: 18px; }
.wl-top-row { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 18px; margin-top: 20px; align-items: stretch; }
.wl-bank-sk { aspect-ratio: 1.586; border-radius: 22px; }

/* the card */
.wl-bank-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wl-bank {
  aspect-ratio: 1.586; width: 100%; border-radius: 20px; padding: 24px 26px; color: #fff;
  display: grid; grid-template-rows: auto 1fr auto auto; row-gap: 14px;
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(81, 179, 208, .5), transparent 60%),
    radial-gradient(70% 70% at 0% 100%, rgba(238, 152, 79, .1), transparent 70%),
    linear-gradient(140deg, #13304A 0%, #0B141D 100%);
  border: 1px solid rgba(255, 255, 255, .08);
}
.wl-bank-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wl-bank-row.end { align-items: flex-end; }
.wl-bank-row > div { display: flex; flex-direction: column; min-width: 0; }
.wl-bank-brand { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: .2px; line-height: 1.2; }
.wl-bank-brand img { display: block; width: auto; height: 20px; }
.wl-bank small { font-size: 11px; color: rgba(255, 255, 255, .55); }
.wl-bank-bal { align-items: flex-end; text-align: end; }
.wl-bank-bal b { font-family: var(--display); font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 2px; }
.wl-bank-bal em { font-style: normal; font-family: var(--font); font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, .6); }
.wl-bank-bal span { font-size: 12px; color: rgba(255, 255, 255, .6); }
.wl-chip {
  align-self: center; width: 42px; height: 32px; border-radius: 7px;
  background: linear-gradient(135deg, #EED79A, #C29B4C 55%, #E8CC86);
  box-shadow: inset 0 0 0 1px rgba(80, 55, 10, .3);
}
.wl-bank-num {
  justify-self: stretch; text-align: start; color: rgba(255, 255, 255, .92); direction: ltr;
  font-family: 'Readex Pro', ui-monospace, monospace; font-size: 20px; font-weight: 500; letter-spacing: 3px; font-variant-numeric: tabular-nums;
}
.wl-bank-num:hover { color: #fff; }
.wl-bank-row.end b { font-size: 14px; font-weight: 600; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-bank-since { flex: none; text-align: end; align-items: flex-end; }
.wl-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.wl-q { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); transition: border-color .15s, color .15s; }
.wl-q svg.i { width: 20px; height: 20px; color: var(--ember); }
.wl-q:hover { border-color: var(--line-2); color: var(--text); }

/* earnings, with a ring toward the withdrawal minimum */
.wl-earn { display: flex; flex-direction: column; min-width: 0; padding: 22px 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.wl-earn-h { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.wl-earn-h svg.i { width: 17px; height: 17px; color: var(--ember); }
.wl-earn-body { flex: 1; display: flex; align-items: center; gap: 26px; margin-top: 14px; }
.wl-ring { position: relative; flex: none; width: 150px; height: 150px; display: grid; place-items: center; }
.wl-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.wl-ring circle { fill: none; stroke-width: 9; }
.wl-ring .bg { stroke: var(--surface-3); }
.wl-ring .fg { stroke: var(--ember); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.wl-ring > div { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 22px; }
.wl-ring b { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.wl-ring small { color: var(--text-3); font-size: 11.5px; line-height: 1.4; margin-top: 2px; }
.wl-earn-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wl-earn-big { font-family: var(--display); font-size: 34px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.wl-earn-txt > small { color: var(--text-3); font-size: 13px; }
.wl-earn-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.wl-earn-rows > div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.wl-earn-rows span { flex: 1; color: var(--text-2); }
.wl-earn-rows b { font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(43, 212, 125, .15); }
.dot.wait { background: var(--amber); box-shadow: 0 0 0 3px rgba(238, 152, 79, .15); }

/* numbers strip */
.wl-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.wl-strip > div { display: flex; flex-direction: column; padding: 16px 20px; min-width: 0; }
.wl-strip > div + div { border-inline-start: 1px solid var(--line); }
.wl-strip small { color: var(--text-3); font-size: 12px; }
.wl-strip b { font-family: var(--display); font-size: 22px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.wl-strip em { font-style: normal; color: var(--text-3); font-size: 12px; }

.wl-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.wallet .panel { padding: 22px; min-width: 0; border-radius: 20px; }
.wallet .panel h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 16px; }
.wallet .panel h3 svg.i { width: 17px; height: 17px; color: var(--ember); }
.wallet .panel h3 small { color: var(--text-3); font-weight: 400; font-size: 12.5px; margin-inline-start: auto; }
.wl-empty { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-3); font-size: 13px; }
.wl-empty svg.i { width: 18px; height: 18px; flex: none; }
.wl-name { font-weight: 700; font-size: 14px; padding: 0; }
.wl-name:hover { text-decoration: underline; }
.wl-msg { margin: 6px 0 0; padding: 7px 11px; border-radius: 4px 12px 12px 12px; background: var(--surface-2); font-size: 13px; color: var(--text); overflow-wrap: anywhere; width: fit-content; max-width: 100%; }
.wl-where { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 4px; color: var(--text-3); font-size: 12px; }
.wl-where svg.i { width: 13px; height: 13px; }
.wl-where a { color: var(--ember-300); font-weight: 500; }
.wl-amt { display: flex; flex-direction: column; align-items: flex-end; flex: none; text-align: end; }
.wl-amt b { font-family: var(--display); font-size: 15px; color: var(--ok); font-variant-numeric: tabular-nums; }
.wl-amt small { color: var(--text-3); font-size: 12px; }
.wl-amt.big b { font-size: 20px; }

/* supporters: the last one, a podium for the top three, then the rest */
.wl-last { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 16px; padding-top: 22px; border-radius: 16px; background: linear-gradient(135deg, rgba(81, 179, 208, .1), transparent 70%), var(--surface-2); border: 1px solid rgba(81, 179, 208, .25); }
.wl-last-tag { position: absolute; top: -10px; inset-inline-start: 14px; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 9px; border-radius: 10px; background: var(--ember); color: #fff; font-size: 11px; font-weight: 700; }
.wl-last-tag svg.i { width: 12px; height: 12px; }
.wl-last-txt { flex: 1; min-width: 0; }
.wl-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 10px; margin-top: 22px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.pod > b { font-size: 13.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-av { position: relative; display: grid; place-items: center; }
.pod.p1 .pod-av .avatar, .pod.p1 .pod-av > *:last-child { box-shadow: 0 0 0 3px var(--amber); border-radius: 50%; }
.pod.p2 .pod-av > *:last-child { box-shadow: 0 0 0 3px #C9CAD6; border-radius: 50%; }
.pod.p3 .pod-av > *:last-child { box-shadow: 0 0 0 3px #CD8A4E; border-radius: 50%; }
.pod-crown { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); color: var(--amber); z-index: 1; }
.pod-crown svg.i { width: 20px; height: 20px; fill: var(--amber); }
.pod-amt { font-family: var(--display); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pod-amt small { display: block; font-family: var(--font); color: var(--text-3); font-size: 11.5px; }
.pod-base { width: 100%; margin-top: 6px; display: grid; place-items: center; border-radius: 12px 12px 4px 4px; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--text-2);
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); }
.pod.p1 .pod-base { height: 70px; color: var(--amber); background: linear-gradient(180deg, rgba(238, 152, 79, .22), rgba(238, 152, 79, .04)); }
.pod.p2 .pod-base { height: 50px; }
.pod.p3 .pod-base { height: 36px; }
button.pod:hover .pod-base { filter: brightness(1.15); }
.pod.none { opacity: .45; }
.pod-ghost { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); }
.wl-rest { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.wl-fan-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); text-align: start; transition: background .12s; }
.wl-fan-row:hover { background: var(--surface-3); }
.wl-rank { width: 22px; flex: none; font-family: var(--display); font-size: 13px; font-weight: 700; color: var(--text-3); text-align: center; }
.wl-fan-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wl-fan-id b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-fan-id small { color: var(--text-3); font-size: 12px; }
.wl-fan-row .wl-amt b { color: var(--text); }

/* withdrawals */
.wl-pay .payout-form { margin: 0; }
.wl-locked { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.wl-locked > svg.i { width: 22px; height: 22px; color: var(--text-3); flex: none; }
.wl-locked b { display: block; font-size: 14px; }
.wl-locked small { color: var(--text-3); font-size: 12.5px; }
.wl-rules { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.wl-rules span { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; }
.wl-rules svg.i { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.wl-pay .tx-list, .wallet .wl-log .tx-list { padding: 0; }
.wl-pay .mn-label { margin: 18px 0 6px; }

/* history: one block per broadcast */
.wl-log-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.wallet .wl-log-h h3 { margin: 0; }
.wl-log-h .seg { margin: 0; }
.wl-log-h .seg button { white-space: nowrap; padding-inline: 14px; }
.wl-stream + .wl-stream { margin-top: 12px; }
.wl-stream { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.wl-stream-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); }
.wl-stream-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--ember-soft); color: var(--ember); }
.wl-stream-ic.off { background: var(--surface-3); color: var(--text-3); }
.wl-stream-ic svg.i { width: 17px; height: 17px; }
.wl-stream-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wl-stream-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.wl-stream-t small { color: var(--text-3); font-size: 12px; }
.wl-stream-t em { font-style: normal; }
.wl-stream-h .icon-btn { width: 34px; height: 34px; flex: none; }
.wl-stream-b { padding: 4px 14px; }
.wl-list { display: flex; flex-direction: column; }
.wl-tx { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wl-tx:last-child { border-bottom: 0; }
.wl-tx-main { flex: 1; min-width: 0; }
.wl-tx-top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.wl-tx-top > span { color: var(--text-2); font-size: 12.5px; }
.wl-tx-top > small { color: var(--text-3); font-size: 11.5px; margin-inline-start: auto; }
.modal.modal-fan { width: min(560px, 100%); }
.wl-fan-head { display: flex; align-items: center; gap: 14px; padding-inline-end: 30px; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.wl-fan-head > div:nth-child(2) { flex: 1; min-width: 0; }
.wl-fan-head h2 { font-size: 19px; margin: 0; }
.wl-fan-head small { color: var(--text-3); font-size: 12.5px; }
.wl-fan-head small a { color: var(--ember-300); }
.wl-fan .wl-list { max-height: 55vh; overflow-y: auto; }
.menu-coins b { font-weight: 700; }
@media (max-width: 980px) {
  .wl-top-row { grid-template-columns: minmax(0, 1fr); }
  .wl-bank-wrap { max-width: 460px; width: 100%; justify-self: center; }
  .wl-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wl-strip { grid-template-columns: 1fr 1fr; }
  .wl-strip > div:nth-child(3) { border-inline-start: 0; }
  .wl-strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .wl-earn { padding: 18px; }
  .wl-earn-body { flex-direction: column; align-items: stretch; gap: 18px; }
  .wl-ring { align-self: center; width: 130px; height: 130px; }
  .wl-earn-txt { align-items: center; text-align: center; }
  .wl-earn-rows { width: 100%; }
}
@media (max-width: 420px) {
  .wl-bank { padding: 18px 20px; row-gap: 10px; }
  .wl-bank-bal b { font-size: 20px; }
  .wl-bank-num { font-size: 16px; letter-spacing: 2px; }
  .wl-chip { width: 36px; height: 27px; }
  .wallet .panel { padding: 16px; }
  .wallet .panel h3 small { display: none; }
  .wl-strip > div { padding: 12px 14px; }
  .wl-strip b { font-size: 19px; }
}

/* coins shown in dollars (100 coins = $1 to the streamer) */
.tip-chip { flex-direction: column; gap: 1px; height: 52px; }
.tip-chip span { display: inline-flex; align-items: center; gap: 3px; }
.tip-chip small { font-family: var(--font); font-weight: 500; font-size: 11px; color: var(--text-3); }
.tip-chip.on small { color: var(--ember-300); }
.tip-usd { color: var(--text-3); font-size: 12px; font-weight: 500; }
.price small, .tip-bal small, .buy-sum small { color: var(--text-3); font-size: 12px; font-weight: 500; }
.tip-fine { margin: -4px 0 12px; }

/* ================= design market «تصاميم المجتمع» ================= */
.cs-custom { background: linear-gradient(135deg, #3a2a5e, #1b2a3e); }
.cs-custom i { background: rgba(16, 16, 22, .85); box-shadow: inset -3px 0 0 #EE984F; border-radius: 3px; }
.store .tabs { overflow-x: auto; scrollbar-width: none; }
.store .tabs::-webkit-scrollbar { display: none; }
.store .tabs a { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.store .tabs a svg.i { width: 15px; height: 15px; }
.market-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.market-head h2 { font-size: 20px; }
.market-head p { margin-top: 4px; font-size: 13.5px; }
.market-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 16px; }
.market-bar .seg { margin: 0; }
.market-bar .seg button { white-space: nowrap; padding-inline: 14px; }
.design-by { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--text-2); font-size: 12.5px; }
.design-by em { font-style: normal; color: var(--text-3); }
.price.free { font-size: 15px; color: var(--ok); }

.sell-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 24px; padding: 24px 26px; border-radius: 20px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(81, 179, 208, .16), transparent 60%), var(--surface); border: 1px solid var(--line); }
.sell-hero > div:first-child { flex: 1; min-width: 260px; }
.sell-hero h2 { font-size: 21px; }
.sell-hero p { color: var(--text-2); margin-top: 6px; max-width: 560px; }
.sell-hero ol { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; padding: 0; list-style: none; counter-reset: s; }
.sell-hero li { counter-increment: s; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.sell-hero li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ember-soft); color: var(--ember-300); font-size: 12px; font-weight: 700; }
.sell-acts { display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
.sell-list { display: flex; flex-direction: column; gap: 12px; }
.sell-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.sell-row canvas { width: 160px; height: 90px; border-radius: 10px; background: #000; display: block; }
.sell-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.sell-info b { font-size: 15px; }
.sell-info small { color: var(--text-3); font-size: 12.5px; }
.sell-note { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2); padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.sell-stats { display: flex; gap: 18px; }
.sell-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.sell-stats b { font-family: var(--display); font-size: 18px; font-variant-numeric: tabular-nums; }
.sell-stats small { color: var(--text-3); font-size: 11.5px; }
.sell-acts-row { display: flex; align-items: center; gap: 6px; }
.sell-acts-row .icon-btn { width: 34px; height: 34px; }

/* publish dialog */
.modal.modal-pub { width: min(560px, 100%); }
.pub > p { margin: 4px 0 14px; }
.pub-prev { border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 16px; }
.pub-prev canvas { display: block; width: 100%; height: auto; }
.pub-prices { flex-wrap: wrap; }
.pub-prices .chip { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.pub-prices .chip svg.i { width: 13px; height: 13px; }
.pub-share { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.pub-share svg.i { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ember); }
.pub-share b { color: var(--text); }
.pub-rights { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 12px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.pub-rights input { margin-top: 3px; accent-color: var(--ember); width: 16px; height: 16px; flex: none; }

/* chat designer presets */
.cd-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-preset { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); text-align: center; transition: border-color .15s; }
.cd-preset:hover { border-color: var(--ember); }
.cd-preset canvas { width: 100%; height: auto; display: block; border-radius: 8px; }
.cd-preset small { font-size: 12px; font-weight: 600; color: var(--text-2); }
canvas.adm-live-thumb { display: block; height: auto; }

@media (max-width: 760px) {
  .sell-row { grid-template-columns: 120px minmax(0, 1fr); }
  .sell-row canvas { width: 120px; height: 68px; }
  .sell-stats, .sell-acts-row { grid-column: 1 / -1; }
  .sell-stats { justify-content: flex-start; }
  .sell-acts { width: 100%; }
  .market-bar { flex-direction: column; align-items: stretch; }
  .market-bar .seg { overflow-x: auto; }
}
/* designer files «ملفاتك» + fonts */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.shelf-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 6px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); cursor: pointer; overflow: hidden; text-align: center; transition: border-color .15s; }
.shelf-item:hover { border-color: var(--hover); color: var(--text); }
.shelf-item.on { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember) inset; color: var(--text); }
.shelf-item svg.i { width: 18px; height: 18px; }
.shelf-item small { font-size: 11px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf-item.up { border-style: dashed; color: var(--ember-300); }
.shelf-thumb { width: 100%; height: 62px; display: grid; place-items: center;
  background: repeating-conic-gradient(#2a2a35 0 25%, #1f1f28 0 50%) 0 0 / 12px 12px; border-radius: 8px; overflow: hidden; }
.shelf-thumb img, .shelf-thumb video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ad-sec .mn-label small { color: var(--text-3); font-weight: 400; font-size: 11.5px; margin-inline-start: 4px; }
.font-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; }
.font-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); }
.font-chip b { font-size: 19px; line-height: 1.35; color: var(--text); }
.font-chip small { font-size: 10.5px; color: var(--text-3); }
.font-chip:hover { border-color: var(--hover); }
.font-chip.on { border-color: var(--ember); background: var(--ember-soft); }
.al-layout[data-v="art"] .al-art { background: radial-gradient(circle at 50% 38%, #EE984F 0 18%, transparent 19%), linear-gradient(135deg, #3a2a5e, #1b2a3e); }
/* the alert's editor frame in the studio preview (never part of the broadcast) */
.alert-box {
  position: absolute; z-index: 4; cursor: grab; border-radius: 12px;
  outline: 2px dashed rgba(238, 152, 79, 0); outline-offset: 2px; transition: outline-color .15s, background .15s;
}
.stage:hover .alert-box, .alert-box.dragging { outline-color: rgba(238, 152, 79, .9); background: rgba(238, 152, 79, .05); }
.alert-box.dragging { cursor: grabbing; }
.alert-box .cam-tip { top: -34px; }
.alert-box[data-hy="b"] .cam-tip { top: auto; bottom: -34px; }
.stage:hover .alert-box .cam-tip { opacity: 1; }
.alert-box.dragging .cam-tip { opacity: 0; }
.alert-box .rz { background: #EE984F; }
.stage:hover .alert-box .rz, .alert-box.dragging .rz { opacity: 1; }
.alert-box[data-hx="l"] .rz { left: -8px; } .alert-box[data-hx="r"] .rz { right: -8px; }
.alert-box[data-hy="t"] .rz { top: -8px; } .alert-box[data-hy="b"] .rz { bottom: -8px; }
.alert-box[data-hx="l"][data-hy="t"] .rz, .alert-box[data-hx="r"][data-hy="b"] .rz { cursor: nwse-resize; }
.alert-box[data-hx="r"][data-hy="t"] .rz, .alert-box[data-hx="l"][data-hy="b"] .rz { cursor: nesw-resize; }
/* a faint copy of the alert while you point at its frame or move it */
.alert-ghost { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .2s; }
.alert-box:hover + .alert-ghost, .alert-box.dragging + .alert-ghost { opacity: .9; }
.alert-ghost[hidden] { display: none; }
/* full design preview (store + admin review) */
.modal.modal-dp { width: min(1000px, 100%); }
.dp-head { display: flex; align-items: center; gap: 12px; padding-inline-end: 30px; margin-bottom: 14px; }
.dp-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--ember-soft); color: var(--ember); }
.dp-ic svg.i { width: 21px; height: 21px; }
.dp-head h2 { font-size: 19px; margin: 0; }
.dp-head small { color: var(--text-3); font-size: 12.5px; }
.dp-canvas { border-radius: 14px; overflow: hidden; background: #000; }
.dp-canvas canvas { display: block; width: 100%; height: auto; }
.dp-ctrl { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dp-ctrl .chips { flex-wrap: wrap; }
.dp-ctrl .chip { display: inline-flex; align-items: center; gap: 5px; }
.dp-ctrl .chip svg.i { width: 14px; height: 14px; }
.dp-about { margin: 12px 0 0; color: var(--text-2); font-size: 13.5px; }
.dp-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.item-prev[data-dpreview] { cursor: zoom-in; }
.item-zoom { position: absolute; bottom: 10px; inset-inline-end: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px;
  background: rgba(11, 11, 15, .8); color: #fff; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .15s; pointer-events: none; }
.item-zoom svg.i { width: 14px; height: 14px; }
.item-prev:hover .item-zoom { opacity: 1; }
canvas.dz-thumb { cursor: zoom-in; }
.mn-note.kit-on { display: flex; align-items: center; gap: 8px; color: var(--ember-300); }
.mn-note.kit-on svg.i { width: 16px; height: 16px; }
.sell-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ad-test .btn.on { border-color: var(--ember); color: var(--text); }
/* bundle builder */
.pack-b > p { margin: 4px 0 14px; }
.pack-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin-bottom: 14px; }
.pack-it { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; }
.pack-it:has(input:checked) { border-color: rgba(81, 179, 208, .5); }
.pack-it input { accent-color: var(--ember); width: 17px; height: 17px; flex: none; }
.pack-it > span { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.pack-it svg.i { width: 17px; height: 17px; color: var(--ember); flex: none; }
.pack-it b { font-size: 14px; }
.pack-it small { color: var(--text-3); font-size: 12px; margin-inline-start: auto; }
/* design reviews & updates */
.ask-note textarea { width: 100%; resize: vertical; min-height: 84px; margin-top: 10px; }
.note-chips { flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.note-chips .chip { font-size: 12.5px; }
.note-count { display: block; text-align: end; color: var(--text-3); font-size: 11.5px; margin-top: 4px; }
.adm-whatsnew { display: flex; align-items: flex-start; gap: 6px; color: var(--ember-300); font-size: 12.5px; }
.adm-whatsnew svg.i { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.dp-new { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--ember-soft); color: var(--text); font-size: 13.5px; }
.dp-new svg.i { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--ember); }

/* the overlay page (OBS browser source): only the see-through layers canvas, edge to edge */
html.overlay-mode, html.overlay-mode body { background: transparent !important; overflow: hidden; }
html.overlay-mode body > *:not(#ov-root) { display: none !important; }
html.overlay-mode #ov-root { position: fixed; inset: 0; }
html.overlay-mode #ov-root canvas { width: 100%; height: 100%; display: block; object-fit: contain; }
.sell-reason { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; padding: 10px 12px; border-radius: 10px; width: 100%;
  background: rgba(255, 84, 104, .1); border: 1px solid rgba(255, 84, 104, .35); }
.sell-reason > svg.i { width: 16px; height: 16px; color: var(--danger); flex: none; margin-top: 3px; }
.sell-reason > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sell-reason b { font-size: 13px; color: var(--danger); }
.sell-reason span { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.sell-reason small { color: var(--text-3); font-size: 11.5px; }
.sell-note { display: flex; align-items: flex-start; gap: 6px; }
.sell-note svg.i { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.item-updated { position: absolute; bottom: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 8px;
  background: rgba(43, 212, 125, .9); color: #06140c; font-size: 11.5px; font-weight: 700; }
.item-updated svg.i { width: 12px; height: 12px; }
/* ================= store: one tidy catalogue ================= */
.store-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.store-head .page-title { margin-bottom: 4px; }
.store-head p { font-size: 14px; }
.store-wallet { display: flex; align-items: center; gap: 8px; }
.sw-bal { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.sw-bal svg.i { width: 17px; height: 17px; color: var(--ember); fill: var(--ember); }
.sw-bal b { font-family: var(--display); font-variant-numeric: tabular-nums; }
.sw-bal small { color: var(--text-3); font-size: 12px; }
.sw-bal:hover { border-color: var(--line-2); }
.store-tabs { margin-top: 18px; }
.store-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.store-tabs a svg.i { width: 16px; height: 16px; }
.store-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.cat-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding-bottom: 2px; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.cat-chip svg.i { width: 15px; height: 15px; }
.cat-chip:hover { color: var(--text); border-color: var(--hover); }
.cat-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.store-sort { flex: none; margin: 0; }
.store-sort { display: inline-flex; }
.store-sort button { white-space: nowrap; padding: 0 14px; flex: none; }
.store-sec { margin-top: 28px; }
.store-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.store-sec-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.store-sec-head h2 svg.i { width: 19px; height: 19px; color: var(--ember); }
.store-sec-head h2 small { color: var(--text-3); font-size: 13px; font-weight: 500; font-family: var(--font); }
.store-more { display: inline-flex; align-items: center; gap: 4px; color: var(--ember-300); font-size: 13.5px; font-weight: 600; }
.store-more svg.i { width: 15px; height: 15px; }
.store-more:hover { text-decoration: underline; }
.store .store-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 14px; }
.store .item-body { gap: 10px; padding: 14px; }
.store .item-title b { font-size: 16.5px; }
.store .item-title p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; margin-top: 6px; }
.store .price { font-size: 16px; }
.design-by.official img { width: 18px; height: 18px; }
.design-by.official svg.i { width: 14px; height: 14px; color: #5AB8FF; }
.store-foot-hint { display: flex; align-items: center; gap: 6px; margin-top: 22px; }
.store-foot-hint svg.i { width: 15px; height: 15px; color: var(--ember); }
.store-foot-hint a { color: var(--ember-300); font-weight: 600; }
@media (max-width: 760px) {
  .store-bar { flex-direction: column; align-items: stretch; }
  .store-sort { align-self: flex-start; }
  .store .store-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
}
/* the camera filling the screen: grab it to make it a box (chat and alert frames stay on top) */
.cam-box.full { z-index: 1; border-radius: 0; }
.cam-box.full .rz { display: none; }
.cam-box.full[data-hy] .cam-tip { top: 12px; bottom: auto; }

/* «فحص الاتصال»: upload speed + response time + the device → the best quality for this streamer */
.modal:has(.nc) { width: min(430px, 100%); padding: 30px 24px 22px; text-align: center; }
.nc-ic { width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: none; }
.nc-ic svg.i { width: 26px; height: 26px; }
.modal .nc h2 { font-size: 20px; margin-bottom: 6px; }
.nc-sub { margin: 0; line-height: 1.7; }
.nc-sub b { color: var(--ember-300); font-family: var(--display); }
.nc-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin: 18px 0 4px; }
.nc-bar[hidden] { display: none; }
.nc-bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.nc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.nc-stats > div { padding: 12px 6px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; }
.nc-stats small { color: var(--text-3); font-size: 11.5px; }
.nc-stats b { font-family: var(--display); font-size: 17px; }
.nc-stats em { font-style: normal; font-size: 11px; font-weight: 600; }
.nc-stats em.ok { color: var(--ok); }
.nc-stats em.bad { color: var(--amber); }
.nc-tips { margin: 14px 0 0; padding: 0; list-style: none; text-align: start; display: flex; flex-direction: column; gap: 6px; }
.nc-tips li { padding: 9px 12px; border-radius: 10px; background: rgba(238, 152, 79, .08); border: 1px solid rgba(238, 152, 79, .22); color: var(--text-2); font-size: 13px; line-height: 1.6; }
.nc-ok { margin: 14px 0 0; color: var(--ok); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }
.nc-ok svg.i { width: 16px; height: 16px; }
.nc-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.nc-acts:empty { display: none; }
.nc-acts .btn { width: 100%; }
.nc-mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: 11px; background: var(--surface-2); border: 1px dashed var(--line-2); font-size: 12.5px; color: var(--text-2); }
.nc-mini span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nc-mini svg.i { width: 15px; height: 15px; color: var(--ember); flex: none; }
.nc-mini .btn { flex: none; }
.q-fit { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ok); display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; }
.q-fit svg.i { width: 12px; height: 12px; }
.q-fit.warn { color: var(--amber); }
.mn-note.nc-srt { margin-top: 10px; display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); }
.mn-note.nc-srt svg.i { width: 14px; height: 14px; color: var(--ember); flex: none; margin-top: 3px; }
.mn-note.nc-srt b { color: var(--text); }

/* «الصوت»: the mixer — one channel per source (mic, game / PC sound), each with its meter, volume and mute */
.mn-sec.mx { display: flex; flex-direction: column; gap: 10px; }
.mx-ch { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.mx-ch .meter.big { margin: 8px 0 10px; }
.mx-ch .mn-note { margin: 8px 0 0; }
.mx-ch .btn { margin-top: 4px; }
.mx-top { display: flex; align-items: center; gap: 8px; }
.mx-top b { flex: 1; font-size: 14px; }
.mx-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ember); flex: none; }
.mx-ic svg.i { width: 16px; height: 16px; }
.mx-mute { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.mx-mute svg.i { width: 16px; height: 16px; }
.mx-mute:hover { color: var(--text); }
.mx-mute.on { background: rgba(255, 84, 104, .14); color: var(--danger); }
.mx-keys { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.mx-keys span { display: flex; align-items: center; gap: 8px; }
.mx-keys kbd { font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); white-space: nowrap; }
/* «ريموت الجوال»: pairing the streamer's phone */
.rm-pair { text-align: center; }
.rm-pair h2 { margin: 10px 0 6px; }
.rm-steps { text-align: start; margin: 14px auto 10px; padding-inline-start: 22px; max-width: 360px; line-height: 2; }
.rm-code { font: 700 46px/1 var(--display), monospace; letter-spacing: .12em; padding: 16px; margin: 4px auto 10px; max-width: 320px;
  border-radius: 18px; background: var(--surface-2, #1D1D26); border: 1.5px solid rgba(81, 179, 208, .45); color: #fff; }
.rm-left b { font-family: var(--display); }
.rm-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.rm-pair h2 { display: flex; align-items: center; justify-content: center; gap: 8px; }
.rm-pair h2 svg { width: 22px; height: 22px; color: var(--ember-400, #51B3D0); }
.rm-qr { width: 248px; max-width: 70vw; margin: 6px auto 10px; padding: 10px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 4px rgba(81, 179, 208, .35); }
.rm-qr svg { display: block; width: 100%; height: auto; }
.rm-code { margin: 10px auto 0; max-width: 380px; color: var(--text-2, #B4BCC8); font-size: 14px; line-height: 1.9; }
.rm-alt { margin: 10px auto 0; max-width: 360px; color: var(--text-2, #B4BCC8); font-size: 14px; }
.rm-alt summary { cursor: pointer; }
.rm-alt p { margin: 8px 0 0; }
.rm-digits { font-family: var(--display); letter-spacing: .08em; font-size: 18px; color: #fff; }
.rm-safe { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px auto 0; font-size: 13px; color: #3DDC97; }
.rm-safe.warn { color: #EE984F; }
.rm-safe svg { width: 15px; height: 15px; }
.rm-devs { max-width: 380px; margin: 14px auto 0; text-align: start; }
.rm-devs h3 { font-size: 14px; color: var(--text-2, #B4BCC8); margin: 0 0 8px; }
.rm-dev { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); margin-bottom: 6px; }
.rm-dev > div { flex: 1; min-width: 0; }
.rm-dev b { display: block; font-size: 14px; }
.rm-dev small { color: var(--text-2, #B4BCC8); font-size: 12px; }
.rm-dev .rm-on { color: #3DDC97; }
.rm-dev-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); }
.rm-dev-ic svg { width: 16px; height: 16px; }
.rm-verify { font: 700 54px/1 var(--display), monospace; letter-spacing: .1em; margin: 6px auto 10px; color: #fff; }

/* the character (mascot() in app.js): blinks, looks at the cursor, its play button breathes */
.mascot { display: block; width: 100%; height: auto; overflow: visible; }
.mascot .m-eye { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .08s ease-in; }
.mascot.blink .m-eye { transform: scaleY(.08); }
.mascot .m-eyes { transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.mascot .m-badge { transform-box: fill-box; transform-origin: 50% 50%; animation: m-badge 2.8s ease-in-out infinite; }
@keyframes m-badge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes m-hop { 0%, 100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-14%) rotate(-6deg); } 65% { transform: translateY(0) rotate(3deg); } }
@keyframes m-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.brand .mascot { width: 36px; flex: none; }
.brand:hover .mascot { animation: m-hop .55s cubic-bezier(.2, .8, .2, 1); }
.gate .mascot { width: 92px; margin: 0 auto 18px; animation: m-float 6s ease-in-out infinite; }
.me-guest .mascot { width: 84px; margin: 0 auto; animation: m-float 6s ease-in-out infinite; }
.sum-hero .mascot { width: 64px; margin: 0 auto 10px; }
.promo .mascot { width: 76px; flex: none; position: relative; }
.bp-hero .mascot { width: 128px; flex: none; animation: m-float 6s ease-in-out infinite; }
@media (max-width: 760px) { .brand .mascot { width: 31px; } }
@media (prefers-reduced-motion: reduce) { .mascot .m-badge, .gate .mascot, .me-guest .mascot, .bp-hero .mascot { animation: none; } }

/* the first run's setup screen stands alone */
body.setup-mode .topbar > :not(.brand), body.setup-mode .sidebar, body.setup-mode .tabbar { display: none !important; }
body.setup-mode .topbar { justify-content: center; }
body.setup-mode .shell { grid-template-columns: minmax(0, 1fr); }
.setup-gate form { margin-top: 8px; }

/* ---------- home: the invitation to go live, the channel's readiness, three steps, the perks ---------- */
.home .sec-head h2 small { font-size: 13px; color: var(--text-3); font-weight: 600; margin-inline-start: 4px; }
.hm-live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--flare); margin-inline-end: 6px; vertical-align: 2px; animation: pulse 1.6s infinite; }
.hm-go {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 34px; align-items: center;
  padding: 40px 42px; border-radius: 22px; border: 1px solid #1E3A4C;
  background: radial-gradient(520px 360px at 85% 10%, rgba(81, 179, 208, .22), transparent 70%),
              radial-gradient(420px 300px at 10% 100%, rgba(238, 152, 79, .12), transparent 70%), linear-gradient(140deg, #0F1D27, #0D1219 55%, #0B0E13);
}
.hm-go[hidden] { display: none; }
.hm-go::before {   /* a fine grid, fading out */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.hm-go-txt { position: relative; }
.hm-eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--ember-300); background: var(--ember-soft); border: 1px solid rgba(81, 179, 208, .28); }
.hm-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--flare); animation: pulse 1.6s infinite; }
.hm-go h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.25; font-weight: 700; margin: 16px 0 12px; }
.hm-go h1 em { font-style: normal; color: var(--ember); }
.hm-go p { color: var(--text-2); font-size: 15.5px; line-height: 1.8; max-width: 520px; margin: 0; }
.hm-go-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hm-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 22px 0 0; color: var(--text-2); font-size: 13px; }
.hm-facts li { display: inline-flex; align-items: center; gap: 7px; }
.hm-facts svg.i { width: 16px; height: 16px; color: var(--ember); }
/* the little stage: a mini watch page — the screen (mascot, viewers, uptime, alerts) and a chat panel that lives */
.hm-stage {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 236px; height: 330px;
  border-radius: 16px; overflow: hidden; border: 1px solid #24465A; background: var(--bg-elev);
}
.hm-screen {
  position: relative; display: grid; place-items: center; min-width: 0;
  background: radial-gradient(closest-side, rgba(81, 179, 208, .18), transparent), linear-gradient(160deg, #10202B, #0B0E13);
}
.hm-screen .mascot { width: 28%; max-width: 120px; animation: m-float 6s ease-in-out infinite; }
.hm-top { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; }
.hm-top .pill b, .hm-up { font-variant-numeric: tabular-nums; }
.hm-up { direction: ltr; }
.hm-you { position: absolute; bottom: 12px; inset-inline: 0; text-align: center; font-size: 12.5px; color: var(--text-3); letter-spacing: .3px; }
.hm-alert {
  position: absolute; top: 50px; left: 50%; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 8px 14px; border-radius: 13px; white-space: nowrap;
  background: rgba(11, 14, 19, .95); border: 2px solid var(--ember); font-size: 12.5px;
  opacity: 0; transform: translate(-50%, -10px) scale(.9); transition: opacity .3s, transform .4s cubic-bezier(.2, .9, .3, 1.35); pointer-events: none;
}
.hm-alert.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.hm-alert svg.i { width: 18px; height: 18px; color: var(--amber); flex: none; }
.hm-alert .mascot { width: 22px; flex: none; animation: none; }
.hm-alert b { color: var(--ember-300); }
.hm-alert em { font-style: normal; font-weight: 700; color: var(--amber); }
.hm-chatp { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-inline-start: 1px solid var(--line); }
.hm-chat-head { height: 40px; flex: none; display: flex; align-items: center; justify-content: center; gap: 7px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--text-2); }
.hm-chat-head svg.i { width: 15px; height: 15px; }
.hm-chat-list {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 6px 0;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 26%); mask-image: linear-gradient(180deg, transparent, #000 26%);
}
.hm-chat-list .msg { font-size: 12px; padding: 3px 11px; line-height: 1.6; flex: none; }
.hm-chat-list .msg:hover { background: none; }
.hm-chat-list .badge { width: 16px; height: 16px; vertical-align: -3px; }
.hm-chat-list .badge svg.i { width: 10px; height: 10px; }
.hm-chat-list .msg.event, .hm-chat-list .msg.tip { margin: 4px 8px; padding: 7px 10px; font-size: 12px; }
.hm-chat-list .tip-amt { font-size: 14px; }
.hm-chat-list .tip-usd { display: none; }
.hm-in { overflow: hidden; opacity: 0; transform: translateY(8px); transition: max-height .38s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, transform .38s cubic-bezier(.2, .8, .2, 1); }
.hm-in.on { opacity: 1; transform: none; }
.hm-ci { padding: 8px; border-top: 1px solid var(--line); flex: none; }
.hm-ci .ci-box { height: 34px; padding: 0 10px; justify-content: space-between; gap: 8px; }
.hm-ci svg.i { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.hm-ci-ph { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hm-ci-ph.typing { color: var(--text); }
.hm-ci-ph.typing::after { content: ''; display: inline-block; width: 1.5px; height: 13px; margin-inline-start: 2px; vertical-align: -2px; background: var(--ember); animation: pulse 1s infinite; }
/* the channel's readiness */
.hm-ready {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 20px; align-items: center; margin-top: 22px;
  padding: 20px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
}
.hm-ring {
  --p: 0; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; grid-row: span 2;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 78% 100%), conic-gradient(var(--ember) calc(var(--p) * 1%), var(--surface-3) 0);
}
.hm-ring b { font-family: var(--display); font-size: 17px; }
.hm-ready-txt h2 { font-size: 18px; }
.hm-ready-txt p { color: var(--text-2); font-size: 13.5px; margin: 2px 0 0; }
.hm-ready-list { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 2; }
.hm-step { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); }
.hm-step svg.i { width: 16px; height: 16px; }
.hm-step .go { width: 14px; height: 14px; color: var(--text-3); }
a.hm-step:hover { border-color: var(--ember-ring); color: var(--ember-300); }
.hm-step.ok { background: transparent; color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(122, 132, 148, .5); }
.hm-step.ok svg.i { color: var(--ok); }
/* three steps + the perks */
.hm-steps { margin-top: 10px; }
.hm-steps-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.hm-card { position: relative; padding: 22px 22px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.hm-card > svg.i { width: 26px; height: 26px; color: var(--ember); }
.hm-card h3 { font-size: 16.5px; }
.hm-card p { color: var(--text-2); font-size: 13.5px; line-height: 1.75; margin: 0 0 6px; flex: 1; }
.hm-n { position: absolute; top: 14px; inset-inline-end: 16px; font-family: var(--display); font-size: 42px; font-weight: 700; line-height: 1; color: rgba(81, 179, 208, .14); }
.hm-done { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: 13px; font-weight: 600; }
.hm-done svg.i { width: 15px; height: 15px; }
.hm-perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 30px; border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.hm-perk { display: flex; gap: 12px; padding: 20px; align-items: flex-start; }
.hm-perk + .hm-perk { border-inline-start: 1px solid var(--line); }
.hm-perk > svg.i { width: 22px; height: 22px; flex: none; color: var(--amber); margin-top: 2px; }
.hm-perk b { font-family: var(--display); font-size: 14.5px; }
.hm-perk p { color: var(--text-2); font-size: 12.5px; line-height: 1.7; margin: 3px 0 0; }
@media (max-width: 1100px) {
  .hm-go { grid-template-columns: minmax(0, 1fr); padding: 30px 26px 44px; }
  .hm-stage { max-width: 520px; width: 100%; margin: 6px auto 0; }
  .hm-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-perk:nth-child(3) { border-inline-start: 0; }
  .hm-perk:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .hm-go { padding: 24px 18px 40px; border-radius: 18px; gap: 26px; }
  .hm-stage { grid-template-columns: minmax(0, 1fr); height: auto; }
  .hm-screen { aspect-ratio: 16 / 9; }
  .hm-chatp { height: 230px; border-inline-start: 0; border-top: 1px solid var(--line); }
  .hm-ready { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .hm-ring { grid-row: auto; width: 62px; height: 62px; }
  .hm-ready-list { grid-column: auto; }
  .hm-steps-row, .hm-perks { grid-template-columns: minmax(0, 1fr); }
  .hm-perk + .hm-perk { border-inline-start: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { .hm-in { transition: none; } .hm-screen .mascot, .hm-live-dot, .hm-eyebrow .dot { animation: none; } }

/* admin → «تسجيل الدخول بقوقل» */
.gg-steps { margin: 0 0 12px; padding-inline-start: 20px; color: var(--text-2); line-height: 1.9; font-size: 13.5px; }
.gg-steps a { color: var(--ember-300); text-decoration: underline; text-underline-offset: 3px; }
.gg-steps b { color: var(--text); }
.gg-copy { margin: 0 0 12px; }
.gg-copy small { display: block; color: var(--text-3); font-size: 12px; margin-bottom: 5px; }
.gg-copy > div { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); }
.gg-copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--text); text-align: left; }
.gg .panel h3 .pill { margin-inline-start: auto; }
