/* ==========================================================================
   StreamHub Myanmar — Compact Design System  ·  တီထွင်ဖန်တီးသူ - မောင်သုခ
   Dark glassmorphism · gold accents · indigo depth · high-density layout
   Shared by login.html, portal.html, admin.html
   ========================================================================== */

:root {
  --bg-0: #07060e;
  --bg-1: #0d0b1c;
  --gold: #f5b942;
  --gold-2: #ffd98a;
  --gold-grad: linear-gradient(135deg, #fff1c1 0%, #ffd27a 25%, #f5b942 55%, #d9891c 100%);
  --violet: #8b5cf6;

  --glass: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.07);
  --glass-3: rgba(255, 255, 255, 0.11);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.15);
  --stroke-gold: rgba(245, 185, 66, 0.35);

  --text: #f3f0ff;
  --muted: #a49ec2;
  --dim: #6c6690;

  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --live: #ef4444;

  --r: 14px;
  --r-sm: 10px;
  --r-xs: 8px;
  --shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.8);

  --font: 'Outfit', 'Noto Sans Myanmar', 'Padauk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mm: 'Noto Sans Myanmar', 'Padauk', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 52px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
svg { display: block; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold-2); text-decoration: none; }
code, .mono { font-family: var(--font-mono); font-size: 0.88em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(245, 185, 66, 0.35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.text-gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2); }

/* ---------- Background ---------- */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(55vmax 45vmax at 0% -10%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(40vmax 35vmax at 100% 0%, rgba(245, 185, 66, 0.1), transparent 60%),
    radial-gradient(60vmax 45vmax at 50% 120%, rgba(36, 22, 107, 0.6), transparent 60%),
    linear-gradient(180deg, #07060e, #0c0a1f);
}
.bg-aurora::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}
.orb, .noise { display: none; } /* legacy decorations removed for a cleaner, faster UI */

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.glass--gold { border-color: var(--stroke-gold); }

/* ---------- Layout ---------- */
.container { width: min(1320px, 100% - 28px); margin-inline: auto; }
.main { padding: 16px 0 28px; display: grid; gap: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { font-size: 16px; }

/* ==========================================================================
   NAVBAR — single line, compact
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(7, 6, 14, 0.78);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }

.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; white-space: nowrap; }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--gold-grad);
  color: #2b1500;
  box-shadow: 0 0 14px rgba(245, 185, 66, 0.35);
  flex: none;
}
.brand-mark svg { width: 16px; height: 16px; }
.brand-name { font-weight: 800; font-size: 14.5px; letter-spacing: 0.005em; }

/* Creator attribution — tiny inline gold crown + name */
.creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 6px;
  border-radius: 99px;
  border: 1px solid rgba(245, 185, 66, 0.4);
  background: linear-gradient(135deg, rgba(255, 226, 154, 0.12), rgba(245, 185, 66, 0.03));
  white-space: nowrap;
}
.cb-crown { width: 16px; height: 16px; color: var(--gold); filter: drop-shadow(0 0 4px rgba(245, 185, 66, 0.6)); }
.cb-label { font-family: var(--font-mm); font-size: 11px; color: #d9cfb6; line-height: 1; padding-top: 1px; }
.cb-name {
  font-family: var(--font-mm);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1;
  padding: 3px 1px 2px;
  text-rendering: optimizeLegibility;
  background: linear-gradient(180deg, #fff6d8 0%, #ffd987 40%, #f5b942 65%, #e0962a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.creator-inline { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mm); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.creator-inline .cb-crown { width: 14px; height: 14px; }
.creator-inline .cb-name { font-size: 12px; }

.conn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--dim);
  padding: 0 6px;
  white-space: nowrap;
}
.conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.conn.wait i { background: var(--warn); box-shadow: 0 0 6px var(--warn); animation: blink 1s infinite; }
.conn.wait { color: var(--warn); }

.user-chip { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 3px; border-radius: 99px; background: var(--glass); border: 1px solid var(--stroke); min-width: 0; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #2b1500; background: var(--gold-grad); flex: none; }
.user-chip .u-meta { line-height: 1.15; min-width: 0; }
.user-chip strong { display: block; font-size: 12px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip span { display: block; font-size: 10.5px; color: var(--muted); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  --h: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--h);
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--stroke-2);
  background: var(--glass-2);
  color: var(--text);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, filter 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { background: var(--glass-3); border-color: rgba(255, 255, 255, 0.25); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }
.btn-sm { --h: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-xs { --h: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 7px; }
.btn-lg { --h: 42px; padding: 0 18px; font-size: 14px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn-gold { background: var(--gold-grad); color: #2b1500; border-color: rgba(255, 230, 170, 0.6); box-shadow: 0 6px 18px -8px rgba(245, 185, 66, 0.8); }
.btn-gold:hover { background: var(--gold-grad); filter: brightness(1.08); border-color: rgba(255, 240, 200, 0.9); }
.btn-violet { background: linear-gradient(135deg, #8b5cf6, #5b21b6); border-color: rgba(196, 181, 253, 0.4); }
.btn-violet:hover { background: linear-gradient(135deg, #9b6dff, #6d28d9); }
.btn-ghost { background: transparent; }
.btn-danger { color: #ffd4dc; border-color: rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.07); }
.btn-danger:hover { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.6); }
.btn-ok { color: #d1fae5; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.07); }
.btn-ok:hover { background: rgba(52, 211, 153, 0.16); border-color: rgba(52, 211, 153, 0.6); }
.btn.copied { background: rgba(52, 211, 153, 0.18); border-color: rgba(52, 211, 153, 0.7); color: #d1fae5; }
.glow, .shine { position: relative; }
.spinner { display: none; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: 0.6; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 11px; color: var(--dim); }
.input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--stroke-2);
  background: rgba(5, 4, 14, 0.6);
  color: var(--text);
  outline: none;
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.14); }
.input-group { position: relative; }
.input-group .input { padding-left: 32px; }
.input-group > svg { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.form-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-error { display: flex; gap: 8px; padding: 8px 11px; border-radius: 9px; font-size: 12.5px; color: #ffe1e7; background: rgba(251, 113, 133, 0.1); border: 1px solid rgba(251, 113, 133, 0.35); }
.range-row { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Pills / tags / chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 600; border: 1px solid var(--stroke-2); background: var(--glass); color: var(--muted); white-space: nowrap; }
.status-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.status-active { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.09); }
.status-expired { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.09); }
.status-blocked { color: var(--bad); border-color: rgba(251, 113, 133, 0.4); background: rgba(251, 113, 133, 0.09); }
.status-live { color: #fff; border-color: rgba(239, 68, 68, 0.6); background: linear-gradient(135deg, #ef4444, #be123c); }
.status-live .dot { animation: blink 1s infinite; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 10px; font-weight: 700; color: var(--gold-2); background: rgba(245, 185, 66, 0.1); border: 1px solid rgba(245, 185, 66, 0.2); }
.chip { height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--stroke); background: transparent; color: var(--muted); white-space: nowrap; transition: all 0.15s; }
.chip:hover { color: var(--text); border-color: var(--stroke-2); }
.chip.active { color: #2b1500; background: var(--gold-grad); border-color: transparent; }
.chip .count { opacity: 0.65; margin-left: 3px; font-weight: 500; }
.kbd { display: inline-block; padding: 0 5px; border-radius: 5px; font-size: 11px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--stroke-2); font-family: var(--font-mono); }

/* ---------- Meter ---------- */
.meter { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; position: relative; }
.meter > span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #8b5cf6, #f5b942); transition: width 1s var(--ease); }
.meter.warn > span { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.meter.bad > span { background: linear-gradient(90deg, #e11d48, #fb7185); }

/* ==========================================================================
   PORTAL
   ========================================================================== */
.greet { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.greet h1 { font-size: 17px; font-weight: 700; }
.greet h1 b { color: var(--gold-2); }
.greet .sub { font-size: 12px; color: var(--muted); }
.greet-actions { display: flex; gap: 6px; }

.alert-banner { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid; font-size: 12.5px; }
.alert-banner strong { margin-right: 6px; }
.alert-banner.warn { background: rgba(251, 191, 36, 0.07); border-color: rgba(251, 191, 36, 0.3); color: #fef3c7; }
.alert-banner.bad { background: rgba(251, 113, 133, 0.07); border-color: rgba(251, 113, 133, 0.3); color: #ffe4e9; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 12px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kpi-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kpi-value { font-size: 22px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-value small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi-text { font-size: 12px; color: var(--muted); line-height: 1.5; min-width: 0; }
.kpi-text b { color: var(--text); font-weight: 600; }

.mini-ring { position: relative; width: 52px; height: 52px; flex: none; }
.mini-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mini-ring .track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 6; }
.mini-ring .bar { fill: none; stroke: url(#ringGrad); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 138.23; stroke-dashoffset: 138.23; transition: stroke-dashoffset 1.2s var(--ease); }
.mini-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; letter-spacing: -0.02em; font-weight: 700; color: var(--gold-2); }

.cd { display: flex; gap: 4px; font-variant-numeric: tabular-nums; }
.cd span { min-width: 34px; text-align: center; padding: 2px 4px; border-radius: 6px; background: rgba(5, 4, 14, 0.55); border: 1px solid var(--stroke); font-size: 13px; font-weight: 700; line-height: 1.35; }
.cd span small { display: block; font-size: 9px; font-weight: 500; color: var(--dim); }

.live-num { color: #fca5a5; }
.live-num.off { color: var(--dim); }
.streams-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.stream-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--muted); }
.stream-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px var(--live); animation: blink 1.2s infinite; }
.stream-chip b { color: var(--gold-2); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }

/* ---------- Theme catalog ---------- */
.catalog { padding: 14px; }
.cat-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-head h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.cat-head .search { flex: 1 1 220px; max-width: 340px; margin-left: auto; }
.cat-chips { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; flex: 1 1 100%; padding-bottom: 2px; }
.cat-chips::-webkit-scrollbar { display: none; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }
.tcard {
  --a: #f5b942;
  --b: #7c3aed;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
  min-width: 0;
}
.tcard:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--a) 55%, transparent); box-shadow: 0 12px 28px -16px color-mix(in srgb, var(--a) 80%, transparent); }
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--a) 55%, transparent), transparent 60%),
    radial-gradient(circle at 80% 90%, color-mix(in srgb, var(--b) 50%, transparent), transparent 60%),
    #0b0918;
}
.thumb::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.06) 0deg 4deg, transparent 4deg 16deg);
  animation: spin 40s linear infinite;
  pointer-events: none;
}
.thumb .t-emoji { position: relative; font-size: 34px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); transition: transform 0.3s var(--ease); }
.tcard:hover .t-emoji { transform: scale(1.12); }
.thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s; z-index: 1; }
.thumb iframe.ready { opacity: 1; }
.t-badge { position: absolute; top: 6px; left: 6px; z-index: 2; height: 17px; padding: 0 6px; border-radius: 5px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; display: grid; place-items: center; color: #2b1500; background: var(--gold-grad); }
.t-badge.b-NEW { background: linear-gradient(135deg, #6ee7b7, #10b981); color: #022c22; }
.t-badge.b-HOT { background: linear-gradient(135deg, #fda4af, #e11d48); color: #fff; }
.t-badge.b-GAME { background: linear-gradient(135deg, #c4b5fd, #7c3aed); color: #fff; }
.t-prev { position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(7, 6, 14, 0.6); color: #fff; backdrop-filter: blur(6px); transition: background 0.2s; }
.t-prev:hover { background: rgba(245, 185, 66, 0.85); color: #2b1500; }
.t-prev svg { width: 12px; height: 12px; }
.t-num { position: absolute; bottom: 5px; right: 7px; z-index: 2; font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.55); }
.t-body { padding: 9px 10px 10px; display: grid; gap: 6px; flex: 1; align-content: space-between; }
.t-title { font-family: var(--font-mm); font-size: 12.5px; font-weight: 700; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.t-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--muted); min-width: 0; }
.t-meta .en { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-meta .tag { flex: none; font-family: var(--font-mm); font-weight: 600; }
.cat-empty { padding: 26px 10px; text-align: center; color: var(--dim); font-size: 12.5px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 14px; background: rgba(3, 2, 10, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.modal.open { opacity: 1; visibility: visible; }
.modal-card { width: min(560px, 100%); max-height: calc(100dvh - 28px); overflow: auto; padding: 18px; transform: translateY(12px); transition: transform 0.3s var(--ease); }
.modal.open .modal-card { transform: none; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.modal-head h3 { font-size: 16px; margin-top: 2px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.steps { display: grid; gap: 8px; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--stroke); }
.step-num { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #2b1500; background: var(--gold-grad); }
.step h4 { font-size: 13px; }
.step p, .step ul { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.step ul { padding-left: 16px; }
.advanced { margin-top: 10px; border-radius: var(--r-sm); border: 1px solid var(--stroke); background: rgba(124, 58, 237, 0.05); }
.advanced summary { cursor: pointer; padding: 9px 12px; font-weight: 600; font-size: 12.5px; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced .adv-body { padding: 0 12px 12px; display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.link-box { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 9px; border-radius: 8px; background: rgba(5, 4, 14, 0.55); border: 1px solid var(--stroke); font-size: 11px; color: var(--dim); min-width: 0; }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 14px; bottom: 14px; z-index: 200; display: grid; gap: 6px; width: min(320px, calc(100% - 28px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 11px; background: rgba(16, 12, 36, 0.94); border: 1px solid var(--stroke-gold); box-shadow: var(--shadow); font-size: 12.5px; animation: toastIn 0.35s var(--ease) both; pointer-events: auto; }
.toast.out { animation: toastOut 0.3s var(--ease) both; }
.toast .t-ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--gold-grad); color: #2b1500; font-size: 12px; font-weight: 800; flex: none; }
.toast.error { border-color: rgba(251, 113, 133, 0.45); }
.toast.error .t-ico { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; }
.toast small { display: block; color: var(--muted); font-size: 11px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

.page-loader { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: var(--bg-0); transition: opacity 0.35s, visibility 0.35s; }
.page-loader.done { opacity: 0; visibility: hidden; }
.loader-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-grad); color: #2b1500; animation: pulse 1.2s ease-in-out infinite; }
.loader-mark svg { width: 22px; height: 22px; }
@keyframes pulse { 50% { transform: scale(0.88); } }

.footer { padding: 12px 0 16px; border-top: 1px solid var(--stroke); color: var(--dim); font-size: 11.5px; }
.footer .container { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px 14px; }
.auth-shell { width: min(860px, 100%); display: grid; grid-template-columns: 1.05fr 1fr; gap: 14px; }
.auth-hero { padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.auth-hero h1 { font-family: var(--font-mm); font-size: 22px; line-height: 1.6; }
.auth-hero p { color: var(--muted); font-size: 12.5px; }
.hero-art { position: relative; height: 120px; }
.hero-art .pagoda { position: absolute; left: 50%; bottom: 0; width: 70px; transform: translateX(-50%); filter: drop-shadow(0 0 18px rgba(245, 185, 66, 0.5)); }
.hero-art .rays { position: absolute; left: 50%; bottom: 20px; width: 220px; height: 220px; transform: translate(-50%, 50%); border-radius: 50%; background: repeating-conic-gradient(rgba(245, 185, 66, 0.2) 0deg 4deg, transparent 4deg 15deg); -webkit-mask-image: radial-gradient(circle, transparent 15%, #000 25%, transparent 70%); mask-image: radial-gradient(circle, transparent 15%, #000 25%, transparent 70%); animation: spinC 40s linear infinite; }
@keyframes spinC { to { transform: translate(-50%, 50%) rotate(360deg); } }
.feature-list { display: grid; gap: 6px; }
.feature { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.feature i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 12px; background: rgba(245, 185, 66, 0.08); border: 1px solid rgba(245, 185, 66, 0.2); flex: none; }
.auth-card { padding: 24px 22px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.auth-card h2 { font-size: 19px; margin-top: 4px; }
.auth-card > p { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.auth-card form { display: grid; gap: 10px; }
.key-input { font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.divider { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 11px; margin: 8px 0 4px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--stroke); }
.auth-foot { margin-top: 14px; display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--dim); text-align: center; }

/* ==========================================================================
   ADMIN
   ========================================================================== */
.admin-gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.gate-card { width: min(360px, 100%); padding: 22px; display: grid; gap: 12px; }
.gate-card .brand { justify-content: center; flex-wrap: wrap; white-space: normal; }
.gate-card h2 { font-size: 17px; text-align: center; }
.gate-card > p { color: var(--muted); font-size: 12.5px; text-align: center; }
.gate-card form { display: grid; gap: 10px; }
.gate-lock { width: 44px; height: 44px; margin: 0 auto; border-radius: 13px; display: grid; place-items: center; background: rgba(124, 58, 237, 0.14); border: 1px solid rgba(124, 58, 237, 0.4); color: #c4b5fd; }
.gate-lock svg { width: 22px; height: 22px; }

.admin-main { padding: 14px 0 24px; display: grid; gap: 12px; }
.warn-strip { padding: 7px 11px; border-radius: var(--r-sm); font-size: 12px; background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, 0.3); color: #fef3c7; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-card { padding: 11px 13px; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; }
.stat-card .s-ico { grid-row: span 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--stroke); }
.stat-card .s-label { font-size: 11px; color: var(--muted); line-height: 1.3; }
.stat-card .s-value { font-size: 20px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card .s-sub { font-size: 10.5px; color: var(--dim); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card.live .s-value { color: #fca5a5; }

.toolbar { padding: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.toolbar .search { flex: 1 1 200px; }
.toolbar .spacer { flex: 1; }
.filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }

.client-list { display: grid; gap: 6px; }
.client-card { padding: 10px 12px; display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(220px, 1.6fr) minmax(150px, 1fr) auto; gap: 14px; align-items: center; border-radius: 12px; }
.client-card.is-blocked { opacity: 0.72; }
.c-id { display: flex; gap: 9px; align-items: center; min-width: 0; }
.c-id .avatar { width: 32px; height: 32px; font-size: 13px; }
.c-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.c-tt { font-size: 11px; color: var(--muted); line-height: 1.3; }
.c-pills { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.c-keys { display: grid; gap: 4px; min-width: 0; }
.copy-line { display: flex; align-items: center; gap: 5px; min-width: 0; height: 28px; padding: 0 3px 0 8px; border-radius: 8px; background: rgba(5, 4, 14, 0.55); border: 1px solid var(--stroke); }
.copy-line .lbl { font-size: 9.5px; letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; flex: none; width: 40px; }
.copy-line code { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gold-2); font-size: 11px; }
.copy-line .btn { --h: 22px; padding: 0 7px; font-size: 10.5px; border-radius: 6px; }
.c-streams { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-streams .live-count { color: #fca5a5; font-weight: 700; }
.c-usage { display: grid; gap: 4px; }
.c-usage .row { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); gap: 6px; }
.c-usage .row b { color: var(--text); font-weight: 600; }
.c-actions { display: grid; grid-template-columns: repeat(3, auto); gap: 4px; justify-content: end; align-items: center; }
.c-actions .btn { --h: 26px; padding: 0 8px; font-size: 11px; border-radius: 7px; }
.c-actions .switch-wrap { grid-column: span 3; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 99px; background: rgba(52, 211, 153, 0.25); border: 1px solid rgba(52, 211, 153, 0.5); transition: 0.25s; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease); }
.switch input:not(:checked) ~ .track { background: rgba(251, 113, 133, 0.25); border-color: rgba(251, 113, 133, 0.55); }
.switch input:checked ~ .thumb { transform: translateX(16px); }
.switch-label { font-size: 11px; font-weight: 600; }
.empty-state { padding: 30px 16px; text-align: center; color: var(--muted); display: grid; gap: 6px; justify-items: center; }
.empty-state .big-ico { font-size: 30px; }
.empty-state h3 { font-size: 15px; color: var(--text); }
.result-box { padding: 12px; border-radius: var(--r-sm); background: rgba(52, 211, 153, 0.06); border: 1px solid rgba(52, 211, 153, 0.3); display: grid; gap: 6px; }
.result-box h4 { color: #a7f3d0; font-size: 13px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .kpis, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-card { grid-template-columns: 1fr 1fr; }
  .c-actions { grid-column: span 2; grid-template-columns: repeat(6, auto) 1fr; justify-content: start; }
  .c-actions .switch-wrap { grid-column: auto; justify-content: flex-end; }
}
@media (max-width: 860px) {
  .cb-label { display: none; }
  .user-chip .u-meta { display: none; }
  .user-chip { padding: 0 3px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 600px) {
  :root { --nav-h: 48px; }
  body { font-size: 13px; }
  .container { width: calc(100% - 20px); }
  .brand { gap: 6px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 13px; }
  .creator-badge { height: 22px; padding: 0 7px 0 5px; }
  .cb-name { font-size: 11.5px; }
  .conn span, .btn .btn-label-hide { display: none; }
  .topbar .status-tag { display: none; }
  .main { padding-top: 12px; gap: 12px; }
  .greet h1 { font-size: 15px; }
  .kpi { padding: 10px 11px; }
  .kpi-value { font-size: 18px; }
  .mini-ring { width: 44px; height: 44px; }
  .mini-ring span { font-size: 9px; }
  .cd span { min-width: 28px; font-size: 12px; }
  .catalog { padding: 10px; }
  .cat-head .search { max-width: none; flex-basis: 100%; order: 3; }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .thumb .t-emoji { font-size: 28px; }
  .t-title { font-size: 12px; }
  .stat-card .s-value { font-size: 17px; }
  .client-card { grid-template-columns: 1fr; gap: 8px; }
  .c-actions { grid-column: auto; grid-template-columns: repeat(3, 1fr); }
  .c-actions .btn { width: 100%; }
  .c-actions .switch-wrap { grid-column: span 3; }
  .toolbar .spacer { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .toast-stack { left: 10px; right: 10px; width: auto; bottom: 10px; }
}
@media (max-width: 380px) {
  .theme-grid { grid-template-columns: 1fr 1fr; }
  .brand-name { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Test Gift menu ---------- */
.test-menu { position: relative; }
.tm-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: 270px; padding: 6px; display: grid; gap: 2px; background: rgba(16, 12, 36, 0.97); }
.tm-title { font-size: 10.5px; color: var(--dim); padding: 4px 8px 6px; font-family: var(--font-mm); }
.tm-pop button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 12.5px; font-weight: 600; font-family: var(--font-mm); }
.tm-pop button:hover, .tm-pop button:focus-visible { background: rgba(245, 185, 66, 0.12); }
.tm-pop button span { display: grid; line-height: 1.5; }
.tm-pop button small { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.tm-sep { height: 1px; background: var(--stroke); margin: 4px 6px; }

/* ---------- 🛑 Stop All Active Streams ---------- */
.btn-stop { --h: auto; min-height: 34px; padding: 5px 10px; margin-top: 4px; justify-content: flex-start; gap: 8px; text-align: left;
  color: #fff; border-color: rgba(251, 113, 133, 0.7); background: linear-gradient(135deg, rgba(225, 29, 72, 0.85), rgba(159, 18, 57, 0.85)); box-shadow: 0 6px 18px -8px rgba(225, 29, 72, 0.9); }
.btn-stop:hover { background: linear-gradient(135deg, #e11d48, #9f1239); border-color: #fda4af; }
.btn-stop:disabled { opacity: 0.35; box-shadow: none; }
.btn-stop span { display: grid; line-height: 1.35; font-size: 12px; }
.btn-stop small { font-family: var(--font-mm); font-size: 10.5px; font-weight: 500; opacity: 0.9; }
.c-streams .btn-stop-mini { --h: 20px; padding: 0 7px; margin-left: 4px; font-size: 10.5px; border-radius: 6px; color: #fff; border-color: rgba(251, 113, 133, 0.7); background: rgba(225, 29, 72, 0.75); }
.c-streams .btn-stop-mini:hover { background: #e11d48; }

/* ==========================================================================
   👑 PRO plan · Edit / Adjust
   ========================================================================== */
.plan-pro { color: #2b1500; border-color: rgba(255, 230, 170, 0.8); background: linear-gradient(135deg, #fff1c1, #f5b942 55%, #d9891c); font-weight: 800; letter-spacing: 0.04em; box-shadow: 0 0 12px -2px rgba(245, 185, 66, 0.7); }
.plan-admin { color: #e9fbff; border-color: rgba(125, 211, 252, 0.85); background: linear-gradient(135deg, #0e7490, #6d28d9); font-weight: 800; letter-spacing: 0.04em; box-shadow: 0 0 12px -2px rgba(56, 189, 248, 0.7); }
.t-badge.b-OWNER { color: #e9fbff; background: linear-gradient(135deg, #0e7490, #6d28d9); }
.tcard.is-owner { box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.55), 0 0 18px -6px rgba(56, 189, 248, 0.7); }
.plan-std { color: var(--muted); border-color: var(--stroke-2); background: rgba(255, 255, 255, 0.04); letter-spacing: 0.06em; }
.t-badge.b-PRO { padding: 0 7px; background: linear-gradient(135deg, #fff6d8 0%, #ffd27a 30%, #f5b942 60%, #b8650f 100%); color: #2b1500;
  box-shadow: 0 0 0 1px rgba(255, 240, 200, 0.8), 0 0 14px rgba(245, 185, 66, 0.9); letter-spacing: 0.06em; }
.tcard.is-pro { border-color: rgba(245, 185, 66, 0.45); box-shadow: inset 0 0 0 1px rgba(245, 185, 66, 0.12); }
.tcard.is-pro .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 230, 160, 0.22) 50%, transparent 65%); background-size: 250% 100%; animation: proSheen 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes proSheen { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
.tcard.is-locked .thumb .t-emoji { filter: grayscale(0.55) brightness(0.65) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.t-lock { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  background: rgba(7, 6, 14, 0.75); border: 1px solid rgba(245, 185, 66, 0.7); box-shadow: 0 0 18px rgba(245, 185, 66, 0.45); }
.btn-locked { --h: auto; min-height: 26px; padding: 4px 8px; white-space: normal; line-height: 1.45; text-align: center; font-family: var(--font-mm); font-size: 10.5px; font-weight: 600;
  color: #ffe7a8; border: 1px dashed rgba(245, 185, 66, 0.55); background: rgba(245, 185, 66, 0.06); cursor: not-allowed; }
.btn-locked:disabled { opacity: 1; }
.btn-host { margin-top: -2px; color: #e9d5ff; border-color: rgba(168, 85, 247, 0.5); background: rgba(168, 85, 247, 0.12); }
.btn-host:hover { background: rgba(168, 85, 247, 0.24); color: #fff; }

.plan-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 560px) { .plan-pick { grid-template-columns: 1fr; } }
.plan-opt { position: relative; display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--stroke-2); background: rgba(5, 4, 14, 0.5); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.plan-opt input { margin-top: 4px; accent-color: #f5b942; }
.plan-opt span { display: grid; line-height: 1.5; }
.plan-opt b { font-size: 13px; }
.plan-opt small { font-size: 11px; color: var(--muted); font-family: var(--font-mm); }
.plan-opt.sel { border-color: rgba(245, 185, 66, 0.8); background: rgba(245, 185, 66, 0.08); }
.plan-opt.pro b { color: var(--gold-2); }
.plan-opt.admin b { color: #7dd3fc; }
.plan-opt.admin.sel { border-color: rgba(125, 211, 252, 0.85); background: rgba(56, 189, 248, 0.08); }

.btn-edit { color: #fde68a; border-color: rgba(245, 185, 66, 0.45); background: rgba(245, 185, 66, 0.08); }
.btn-edit:hover { background: rgba(245, 185, 66, 0.18); border-color: rgba(245, 185, 66, 0.75); }
.c-actions .btn-edit { grid-column: span 2; }
.c-actions .switch-wrap { grid-column: auto; justify-content: flex-end; }
.adj-row { margin-top: 4px; }
.adj-row .chip { height: 26px; padding: 0 9px; font-size: 11.5px; }
.adj-row .chip.neg { color: #fecdd3; border-color: rgba(251, 113, 133, 0.4); }
.adj-row .chip.neg:hover { background: rgba(251, 113, 133, 0.12); }
.adj-row .chip.pos { color: #bbf7d0; border-color: rgba(52, 211, 153, 0.4); }
.adj-row .chip.pos:hover { background: rgba(52, 211, 153, 0.12); }
.adj-input { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.edit-diff { margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.7; background: rgba(245, 185, 66, 0.07); border: 1px solid rgba(245, 185, 66, 0.35); }
.edit-diff b { color: var(--gold-2); }
@media (max-width: 1100px) {
  .c-actions .btn-edit { grid-column: auto; }
}
@media (max-width: 600px) {
  .plan-pick { grid-template-columns: 1fr; }
  .c-actions .btn-edit { grid-column: span 2; }
  .c-actions .switch-wrap { grid-column: auto; }
}

/* ───────── v14 · Customize Your Live (Beta) ───────── */
.btn-cu { background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(236, 72, 153, 0.3)); border-color: rgba(196, 181, 253, 0.45); color: #fff; margin-top: 5px; }
.btn-cu:hover { filter: brightness(1.12); }
.tcard .cu-done { display: inline-block; margin-left: 4px; font-size: 10px; color: var(--ok); }
.cu-card { width: min(860px, 100%); }
.cu-body { display: grid; grid-template-columns: 1fr 250px; gap: 14px; align-items: start; }
.cu-form { display: grid; gap: 10px; }
.cu-field { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.cu-field > span small, .cu-tog small { color: var(--dim); font-weight: 400; }
.cu-inline { grid-template-columns: 110px 1fr; align-items: center; }
.cu-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cu-tog { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; font-size: 12px; background: var(--glass-2); border: 1px solid var(--stroke); cursor: pointer; }
.cu-tog input { accent-color: var(--gold); }
.cu-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.cu-sw { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 4px; border-radius: 99px; font-size: 11.5px; color: var(--text); background: var(--glass-2); border: 1px solid var(--stroke); cursor: pointer; }
.cu-sw i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: var(--c, #333); }
.cu-sw.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245, 185, 66, 0.25); }
.cu-seg { display: inline-flex; border: 1px solid var(--stroke-2); border-radius: 9px; overflow: hidden; width: max-content; }
.cu-seg button { padding: 6px 14px; font-size: 12px; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.cu-seg button.sel { color: #2b1500; background: var(--gold-grad); font-weight: 700; }
.cu-prev { position: sticky; top: 0; }
.cu-prev-box { position: relative; width: 250px; height: 444px; border-radius: 12px; overflow: hidden; background: repeating-conic-gradient(#1b1830 0 25%, #12101f 0 50%) 0 0 / 22px 22px; border: 1px solid var(--stroke-gold); }
.cu-prev-box iframe { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; border: 0; transform-origin: 0 0; transform: scale(0.2315); background: transparent; }
.cu-note { margin-top: 6px; font-size: 11px; color: var(--dim); text-align: center; }
@media (max-width: 720px) { .cu-body { grid-template-columns: 1fr; } .cu-prev { position: static; justify-self: center; } }
.cu-rand { justify-self: start; background: linear-gradient(135deg, #7c3aed, #db2777); color: #fff; border-color: rgba(255, 255, 255, 0.3); font-weight: 700; box-shadow: 0 6px 18px -8px rgba(219, 39, 119, 0.9); }
.cu-rand small { font-weight: 400; opacity: .85; margin-left: 4px; }
.cu-trig { display: grid; gap: 6px; }
.cu-trig .tr { display: grid; grid-template-columns: 1fr 92px; gap: 6px; align-items: center; }
.cu-trig .tr small { grid-column: 1 / -1; color: var(--dim); font-size: 10.5px; }
.cu-lock { padding: 8px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6; color: #fde68a; background: rgba(245, 185, 66, 0.1); border: 1px dashed rgba(245, 185, 66, 0.55); }
.cu-lock.ok { color: #86efac; background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.45); }
.cu-sw img { width: 22px; height: 22px; object-fit: contain; }
#cuSave:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.btn-linklock { white-space: normal; line-height: 1.45; font-size: 10.5px; }

/* v14.3 · colour wash + brightness sliders */
.cu-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cu-col { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: var(--c); cursor: pointer; padding: 0; }
.cu-col.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.cu-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 3px; border-radius: 99px; font-size: 11.5px; color: var(--text); background: var(--glass-2); border: 1px solid var(--stroke); cursor: pointer; }
.cu-pick input[type=color] { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.cu-pick input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.cu-pick input[type=color]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,.4); border-radius: 50%; }
.cu-pick.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245, 185, 66, 0.25); }
.cu-slide { display: grid; grid-template-columns: auto 1fr 44px; align-items: center; gap: 10px; color: var(--text); font-size: 12px; }
.cu-slide b { font-weight: 600; white-space: nowrap; }
.cu-slide input[type=range] { width: 100%; accent-color: var(--gold, #f5b942); }
.cu-slide output { text-align: right; font-variant-numeric: tabular-nums; color: var(--gold, #f5b942); font-weight: 700; }
.cu-hint { color: var(--dim); font-size: 11px; line-height: 1.6; }
.cu-mini { margin-left: 6px; padding: 1px 8px; font-size: 10.5px; border-radius: 99px; border: 1px solid var(--stroke-2); background: transparent; color: var(--muted); cursor: pointer; }
.cu-sw.off { opacity: .45; cursor: not-allowed; }

/* v14.4 · 📷 custom background photo */
.cu-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; padding: 8px; border-radius: 10px; border: 1px dashed var(--stroke-2); background: rgba(255,255,255,.02); }
.cu-upload .cu-hint { flex-basis: 100%; }
.cu-up-btn { cursor: pointer; background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; border-color: rgba(255,255,255,.3); font-weight: 700; }
.cu-up-btn small { font-weight: 400; opacity: .85; }
.cu-up-btn.is-loading { opacity: .6; pointer-events: none; }
.cu-up-thumb { width: 34px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--stroke-2); }
.cu-up-rm { color: #fecaca; border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.08); }

/* v14.5 · compact pickers (background / sticker / music): one button → scrollable thumbnail grid */
.cu-dd-wrap { position: relative; min-width: 0; flex: 1 1 auto; }
.cu-row-tight { gap: 8px; flex-wrap: nowrap; align-items: stretch; }
.cu-stkpos { flex: 0 0 auto; width: auto; max-width: 46%; }
.cu-dd { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 5px 12px 5px 6px; border-radius: 12px;
  color: var(--text); background: var(--glass-2); border: 1px solid var(--stroke-2); cursor: pointer; text-align: left; font: inherit; font-size: 13px; }
.cu-dd:hover, .cu-dd[aria-expanded="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245, 185, 66, 0.2); }
.cu-dd-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cu-dd-count { color: var(--dim); font-size: 11px; white-space: nowrap; }
.cu-dd-arrow { color: var(--gold); font-size: 11px; transition: transform .15s; }
.cu-dd[aria-expanded="true"] .cu-dd-arrow { transform: rotate(180deg); }
.cu-th { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 8px; overflow: hidden; background: #241d30; border: 1px solid rgba(255,255,255,.14); font-size: 18px; }
.cu-th img, .cu-th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cu-th b { position: absolute; right: 1px; bottom: 0; font-size: 10px; line-height: 1; filter: drop-shadow(0 0 2px #000); }
.cu-th-ic { background: linear-gradient(135deg, #3b2a55, #1d1626); }
.cu-dd-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 330px; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px; border-radius: 14px; background: #17121f; border: 1px solid var(--gold); box-shadow: 0 18px 40px -10px rgba(0,0,0,.8); }
.cu-dd-title { position: sticky; top: -8px; margin: -8px -8px 8px; padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--gold);
  background: #17121f; border-bottom: 1px solid var(--stroke); z-index: 1; }
.cu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.cu-tile { display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 5px; border-radius: 10px; cursor: pointer; font: inherit;
  color: var(--text); background: rgba(255,255,255,.03); border: 1px solid var(--stroke); text-align: center; }
.cu-tile .cu-th { width: 100%; height: auto; aspect-ratio: 9 / 16; max-height: 120px; font-size: 26px; }
.cu-tile .cu-tl { font-size: 11px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.9em; }
.cu-tile:hover { border-color: rgba(245, 185, 66, .6); }
.cu-tile.sel { border-color: var(--gold); background: rgba(245, 185, 66, .12); box-shadow: 0 0 0 2px rgba(245, 185, 66, .25); }
/* stickers: square tiles · music: one-column list */
#cuStkDD .cu-tile .cu-th { aspect-ratio: 1 / 1; max-height: 76px; background: repeating-conic-gradient(#2a2333 0 25%, #211b29 0 50%) 0 0 / 14px 14px; }
#cuStkDD .cu-tile .cu-th img { object-fit: contain; padding: 6px; }
.cu-dd-pop.list .cu-grid { grid-template-columns: 1fr; gap: 4px; }
.cu-dd-pop.list .cu-tile { flex-direction: row; align-items: center; text-align: left; gap: 10px; padding: 6px 10px; }
.cu-dd-pop.list .cu-tile .cu-th { width: 30px; height: 30px; aspect-ratio: auto; font-size: 16px; }
.cu-dd-pop.list .cu-tile .cu-tl { min-height: 0; font-size: 12.5px; -webkit-line-clamp: 1; }
.cu-dd-pop.up { top: auto; bottom: calc(100% + 6px); }
.cu-hex { width: 92px; height: 28px; padding: 0 8px; font-size: 12px; font-family: ui-monospace, monospace; border-radius: 99px; }

/* v14.7 · draggable sticker on the live preview (safe-zone clamped) */
.cu-stk-handle { position: absolute; z-index: 3; border: 2px dashed rgba(255, 220, 120, .95); border-radius: 8px; cursor: grab; touch-action: none;
  background: rgba(255, 220, 120, .08); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.cu-stk-handle b { position: absolute; right: -10px; top: -12px; font-size: 14px; line-height: 1; filter: drop-shadow(0 1px 2px #000); }
.cu-stk-handle.drag { cursor: grabbing; background: rgba(255, 220, 120, .18); }
.cu-safe { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s; }
.cu-safe.show { opacity: 1; }
.cu-safe i { position: absolute; background: repeating-linear-gradient(135deg, rgba(239,68,68,.42) 0 6px, rgba(239,68,68,.18) 6px 12px); }
.cu-safe .b { left: 0; right: 0; top: 72%; bottom: 0; }
.cu-safe .r { left: 90.7%; right: 0; top: 0; bottom: 28%; }
.cu-safe-note { color: #fca5a5; }
.cu-stk-thumb { width: 44px; height: 44px; object-fit: contain; background: repeating-conic-gradient(#2a2333 0 25%, #211b29 0 50%) 0 0 / 10px 10px; }

/* ---------- v15.3 · Live နာရီ ဝယ်ယူရန် (prices · payment accounts · Telegram order) ---------- */
.buy { margin: 0 0 14px; padding: 0; overflow: hidden; border-radius: var(--r);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(245, 185, 66, 0.06) 60%, rgba(255, 255, 255, 0.03)); }
.buy[hidden] { display: none; }
.buy-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: none; border: 0; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.buy-head:hover .buy-cta { filter: brightness(1.1); }
.buy-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: 17px; background: rgba(245, 185, 66, 0.14); border: 1px solid var(--stroke-gold); }
.buy-title { flex: 1; min-width: 0; display: grid; gap: 1px; font-family: var(--font-mm); }
.buy-title b { font-size: 14px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.buy-title small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy-cta { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #2b1500; background: var(--gold-grad); font-family: var(--font-mm); }
.buy-cta svg { transition: transform 0.2s var(--ease); }
.buy-head[aria-expanded="true"] .buy-cta svg { transform: rotate(180deg); }
.buy-body { padding: 2px 14px 14px; border-top: 1px solid var(--stroke); font-family: var(--font-mm); }
.buy-step { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--gold-2); flex-wrap: wrap; }
.buy-step small { font-weight: 500; font-size: 11px; }
.buy-n { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; color: #2b1500; background: var(--gold-grad); }
.buy-groups { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.buy-group-h { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.buy-pkgs { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.buy-pkg { display: grid; gap: 2px; padding: 8px 6px; border-radius: var(--r-sm); border: 1px solid var(--stroke-2); background: var(--glass); color: var(--text); cursor: pointer; font: inherit; text-align: center; transition: all 0.15s; }
.buy-pkg b { font-size: 13px; }
.buy-pkg span { font-size: 12px; color: var(--gold-2); font-weight: 700; }
.buy-pkg:hover { border-color: var(--stroke-gold); background: var(--glass-2); }
.buy-pkg.pro { border-color: rgba(139, 92, 246, 0.45); }
.buy-pkg.on { border-color: var(--gold); background: rgba(245, 185, 66, 0.16); box-shadow: 0 0 0 2px rgba(245, 185, 66, 0.25), 0 6px 18px -10px rgba(245, 185, 66, 0.9); }
.buy-pkg.on b::before { content: '✓ '; color: var(--gold); }
.buy-extra { display: grid; gap: 10px; grid-template-columns: 1fr 2fr; margin-top: 10px; }
.buy-accts { display: grid; gap: 6px; }
.buy-acct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--stroke); background: rgba(0, 0, 0, 0.18); cursor: pointer; transition: all 0.15s; }
.buy-acct:hover { border-color: var(--stroke-2); }
.buy-acct.on { border-color: var(--gold); background: rgba(245, 185, 66, 0.1); }
.buy-radio { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--stroke-2); }
.buy-acct.on .buy-radio { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 45%, transparent 50%); }
.buy-acct-main { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; }
.buy-acct-main b { grid-column: 1 / -1; font-size: 12.5px; }
.buy-acct-main code { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--gold-2); letter-spacing: 0.04em; }
.buy-acct-main small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buy-copy { flex: none; font-family: var(--font-mm); }
.buy-note { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.buy-preview { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(0, 0, 0, 0.28); border: 1px dashed var(--stroke-2); color: var(--text); font-family: var(--font-mm); font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.buy-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.buy-tg { flex: 1 1 260px; justify-content: center; font-family: var(--font-mm); font-weight: 700; }
.buy-actions .btn:not(.buy-tg) { font-family: var(--font-mm); }
@media (max-width: 720px) {
  .buy-groups { grid-template-columns: 1fr; }
  .buy-extra { grid-template-columns: 1fr; }
  .buy-title small { white-space: normal; }
  .buy-acct-main { grid-template-columns: 1fr; }
}
