/* ══════════════════════════════════════════
   MYKAYA — Premium Design System
   Dark · Instagram quality · Moj market
   Single theme. No compromises.
══════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --bg:        #0A0A0A;
  --surface:   #111111;
  --card:      #161616;
  --card2:     #1C1C1C;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.05);

  --text:      #F5F5F5;
  --text2:     #A0A0A0;
  --muted:     #555555;

  --accent:    #D4A853;   /* warm gold — beauty brand */
  --accent2:   #E8C278;
  --accent-dim: rgba(212,168,83,0.12);
  --accent-mid: rgba(212,168,83,0.25);

  --live:      #FF3B30;
  --live-dim:  rgba(255,59,48,0.15);

  --green:     #34C759;
  --blue:      #0A84FF;

  --safe-t:    env(safe-area-inset-top, 0px);
  --safe-b:    env(safe-area-inset-bottom, 0px);

  --r-sm:      10px;
  --r-md:      16px;
  --r-lg:      20px;
  --r-xl:      28px;
  --r-full:    999px;

  --font-body: 'Inter', 'DM Sans', -apple-system, sans-serif;
  --font-head: 'Syne', 'Inter', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; cursor: pointer; }
button { font-family: var(--font-body); cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: var(--font-body); outline: none; }
img { display: block; max-width: 100%; }

/* ══ AGE GATE ══ */
#age-gate {
  position: fixed; inset: 0; z-index: 999999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.ag-wrap { width: 100%; max-width: 380px; }
.ag-logo {
  font-family: var(--font-head); font-size: 28px; font-weight: 800;
  color: var(--accent); letter-spacing: -0.5px; margin-bottom: 24px;
}
.ag-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.ag-sub { font-size: 14px; color: var(--text2); line-height: 1.5; margin-bottom: 24px; }
.ag-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px;
}
.ag-field-label { font-size: 12px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 10px; }
.dob-row { display: flex; gap: 8px; margin-bottom: 16px; }
.dob-sel {
  flex: 1; background: var(--card2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 8px; border-radius: var(--r-sm);
  font-size: 14px; appearance: none;
}
.ag-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text2); line-height: 1.5; cursor: pointer; }
.ag-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.ag-err { font-size: 13px; color: var(--live); min-height: 18px; margin-bottom: 8px; }
.ag-btn {
  width: 100%; padding: 15px; background: var(--accent); color: #000;
  font-size: 15px; font-weight: 700; border-radius: var(--r-full);
  transition: opacity 0.2s;
}
.ag-btn:active { opacity: 0.85; }

/* ══ LEGAL MODAL ══ */
#legal-modal {
  position: fixed; inset: 0; z-index: 999998;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center;
}
#legal-modal.show { display: flex; }
.legal-sheet {
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%; max-width: 430px; max-height: 80dvh;
  display: flex; flex-direction: column;
}
.legal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
  font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text);
}
.legal-hdr button { background: var(--card); border: 1px solid var(--border); color: var(--text2); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.legal-body { flex: 1; overflow-y: auto; padding: 20px; font-size: 14px; color: var(--text2); line-height: 1.7; }
.legal-body h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 16px 0 6px; }

/* ══ INSTALL GATE ══ */
.ig-icon { width: 88px; height: 88px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--accent); margin: 0 auto 16px; }
.ig-brand { font-family: var(--font-head); font-size: 30px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.ig-sub { font-size: 13px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 24px; }
.ig-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.ig-desc { font-size: 14px; color: var(--text2); line-height: 1.6; max-width: 300px; margin: 0 auto 24px; }
.ig-btn-primary { width: 100%; max-width: 320px; padding: 15px; background: var(--accent); color: #000; font-size: 16px; font-weight: 700; border-radius: var(--r-full); margin-bottom: 16px; }
.ig-steps { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; text-align: left; }
.ig-step { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 13px; color: var(--text2); }
.ig-step:last-child { margin-bottom: 0; }
.ig-step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.ig-btn-ghost { background: transparent; border: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 12px; text-decoration: underline; margin-top: 8px; }

/* ══ AUTH SHELL ══ */
#auth-shell { display: none; min-height: 100dvh; }
#auth-shell.hidden { display: none !important; }
#auth-shell:not(.hidden) { display: block; }
.auth-view { display: none; min-height: 100dvh; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-view.active { display: flex; }

/* LANDING */
.land-wrap { width: 100%; max-width: 430px; margin: 0 auto; }
.land-nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 0; }
.land-logo { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--accent); }
.land-nav-cta { display: flex; gap: 8px; }
.btn-ghost-sm { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 8px 16px; border-radius: var(--r-full); font-size: 13px; font-weight: 500; }
.btn-primary-sm { background: var(--accent); color: #000; padding: 8px 16px; border-radius: var(--r-full); font-size: 13px; font-weight: 700; }
.land-hero { padding: 40px 20px 32px; }
.land-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-dim); border: 1px solid var(--accent-mid); color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.5px; padding: 5px 14px; border-radius: var(--r-full); margin-bottom: 20px; }
.land-h1 { font-family: var(--font-head); font-size: 38px; font-weight: 800; line-height: 1.1; color: var(--text); margin-bottom: 16px; letter-spacing: -1px; }
.land-h1 em { color: var(--accent); font-style: normal; }
.land-p { font-size: 15px; color: var(--text2); line-height: 1.65; margin-bottom: 28px; }
.land-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.btn-primary-lg { background: var(--accent); color: #000; padding: 14px 24px; border-radius: var(--r-full); font-size: 15px; font-weight: 700; transition: opacity 0.2s; }
.btn-primary-lg:active { opacity: 0.85; }
.btn-outline-lg { background: transparent; border: 1.5px solid var(--border2); color: var(--text); padding: 13px 22px; border-radius: var(--r-full); font-size: 15px; font-weight: 500; }
.land-proof { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text2); }
.proof-avis { display: flex; }
.proof-av { width: 28px; height: 28px; border-radius: 50%; background: var(--card2); border: 1.5px solid var(--bg); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text2); margin-left: -6px; }
.proof-av:first-child { margin-left: 0; }
.land-stats { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ls-cell { padding: 18px 8px; text-align: center; border-right: 1px solid var(--border); }
.ls-cell:last-child { border-right: none; }
.ls-n { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--accent); }
.ls-l { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.land-feats, .land-how { padding: 40px 20px; }
.lf-hdr { margin-bottom: 24px; }
.lf-hdr h2 { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.lf-hdr h2 span { color: var(--accent); }
.lf-hdr p { font-size: 14px; color: var(--text2); }
.lf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lf-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; }
.lf-icon { font-size: 24px; margin-bottom: 10px; }
.lf-card h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.lf-card p { font-size: 12px; color: var(--text2); line-height: 1.5; }
.how-steps { display: flex; flex-direction: column; gap: 16px; }
.how-step { display: flex; align-items: flex-start; gap: 14px; }
.how-n { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-dim); border: 1.5px solid var(--accent-mid); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; color: var(--accent); flex-shrink: 0; }
.how-step h4 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.how-step p { font-size: 13px; color: var(--text2); line-height: 1.5; }
.land-cta { padding: 32px 20px; text-align: center; background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.land-cta h2 { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.land-cta p { font-size: 14px; color: var(--text2); margin-bottom: 20px; }
.land-footer { padding: 24px 20px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.land-footer a { font-size: 12px; color: var(--muted); }

/* AUTH CARD */
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 28px 24px; width: 100%; max-width: 400px; }
.auth-logo { font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--accent); margin-bottom: 20px; }
.auth-h2 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-p { font-size: 14px; color: var(--text2); margin-bottom: 20px; }
.auth-sw { font-size: 13px; color: var(--text2); text-align: center; margin-top: 12px; }
.auth-sw a { color: var(--accent); font-weight: 600; cursor: pointer; }
.back-btn { background: transparent; border: none; color: var(--text2); font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 20px; padding: 0; }
.f-err { background: rgba(255,59,48,0.1); border: 1px solid rgba(255,59,48,0.25); color: #ff6b6b; font-size: 13px; padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; display: none; }
.f-err:not(:empty) { display: block; }
.f-ok { background: rgba(52,199,89,0.1); border: 1px solid rgba(52,199,89,0.25); color: var(--green); font-size: 13px; padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; display: none; }
.f-ok:not(:empty) { display: block; }
.f-row { margin-bottom: 16px; }
.f-lbl { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 7px; letter-spacing: 0.3px; }
.f-inp {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  color: var(--text); padding: 12px 14px; border-radius: var(--r-md);
  font-size: 14px; transition: border-color 0.2s;
}
.f-inp:focus { border-color: var(--accent); }
.f-inp::placeholder { color: var(--muted); }
.f-hint { font-size: 11px; color: var(--muted); margin-top: 5px; }
.f-link { color: var(--accent); font-weight: 500; cursor: pointer; }
.f-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text2); line-height: 1.5; }
.f-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.phone-wrap { display: flex; align-items: stretch; }
.phone-cc { background: var(--card2); border: 1px solid var(--border); border-right: none; border-radius: var(--r-md) 0 0 var(--r-md); padding: 12px 12px; font-size: 14px; color: var(--text2); white-space: nowrap; }
.str-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 8px; }
.str-fill { height: 100%; width: 0; border-radius: 2px; background: var(--live); transition: width 0.3s, background 0.3s; }
.btn-auth { width: 100%; padding: 14px; background: var(--accent); color: #000; font-size: 15px; font-weight: 700; border-radius: var(--r-full); margin-top: 20px; transition: opacity 0.2s; }
.btn-auth:active { opacity: 0.85; }
.otp-wrap { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.otp-box { width: 44px; height: 52px; text-align: center; font-size: 20px; font-weight: 700; background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: var(--r-sm); }
.otp-box:focus { border-color: var(--accent); }

/* ══ MAIN APP ══ */
#app { display: none; height: 100dvh; flex-direction: column; overflow: hidden; }
#app.active { display: flex; }

/* HEADER */
.hdr {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.9); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: calc(var(--safe-t) + 12px) 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.hdr-logo { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.glow-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 6px 14px;
  font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
}
.glow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(0.8)} }
.glow-lbl { font-size: 11px; color: var(--text2); font-weight: 400; }
.hdr-icon-btn { background: var(--card); border: 1px solid var(--border); color: var(--text2); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.hdr-icon-btn svg { width: 18px; height: 18px; }

/* TICKER */
.ticker {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 8px 16px; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden;
  flex-shrink: 0;
}
.ticker-live { background: var(--live); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 4px; letter-spacing: 0.5px; flex-shrink: 0; }
#ticker-msg { overflow: hidden; text-overflow: ellipsis; }

/* MAIN SCROLL */
.main { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.main::-webkit-scrollbar { display: none; }

/* PAGES */
.page { display: none; min-height: 100%; }
.page.active { display: block; }

/* BOTTOM NAV */
.bnav {
  display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr;
  align-items: center;
  background: rgba(10,10,10,0.95); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-b);
  flex-shrink: 0; position: relative; z-index: 50;
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 10px 0 6px; background: none;
  color: var(--muted); font-size: 10px; font-weight: 500;
  transition: color 0.15s;
}
.bnav-item svg { width: 22px; height: 22px; }
.bnav-item.on { color: var(--accent); }
.bnav-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #000;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto; position: relative; bottom: 8px;
  box-shadow: 0 4px 20px rgba(212,168,83,0.4);
  transition: transform 0.15s;
}
.bnav-fab:active { transform: scale(0.93); }
.bnav-fab svg { width: 24px; height: 24px; }

/* ══ STORIES ROW ══ */
.stories-row { display: flex; gap: 10px; padding: 14px 14px 10px; overflow-x: auto; scrollbar-width: none; }
.stories-row::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; cursor: pointer; }
.s-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; cursor: pointer; position: relative; }
.s-ring {
  width: 58px; height: 58px; border-radius: 50%; padding: 2.5px;
  background: conic-gradient(var(--accent) 0deg, var(--accent2) 180deg, var(--accent) 360deg);
  animation: ring-spin 4s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
.s-avi {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--card2); border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text2);
  overflow: hidden;
}
.s-avi img { width: 100%; height: 100%; object-fit: cover; }
.s-add-ring {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--card2); border: 1.5px dashed var(--border2);
  display: flex; align-items: center; justify-content: center;
}
.s-add-ring svg { width: 20px; height: 20px; color: var(--accent); }
.s-name { font-size: 10px; color: var(--text2); font-weight: 500; max-width: 60px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-live-pip {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--live); color: #fff; font-size: 8px; font-weight: 800;
  padding: 1px 5px; border-radius: 3px; letter-spacing: 0.3px;
}

/* FEED DIVIDER */
.feed-divider { display: flex; align-items: center; gap: 10px; padding: 4px 16px 12px; }
.feed-divider span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }

/* ══ FEED POST ══ */
.post {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.p-avi {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--card2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text2);
  border: 1.5px solid var(--border);
}
.p-user { font-size: 13px; font-weight: 700; color: var(--text); }
.p-time { font-size: 11px; color: var(--muted); margin-top: 1px; }
.p-img { width: 100%; aspect-ratio: 1; background: var(--card); overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-cap { padding: 10px 14px 6px; font-size: 13px; color: var(--text2); line-height: 1.5; }
.p-cap strong { color: var(--text); font-weight: 600; }
.p-acts { display: flex; align-items: center; padding: 6px 10px 14px; gap: 4px; }
.act {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; color: var(--text2);
  font-size: 13px; font-weight: 500; padding: 7px 10px;
  border-radius: var(--r-sm); transition: color 0.15s;
}
.act svg { width: 19px; height: 19px; }
.act:active { background: var(--card2); }
.act.liked { color: var(--live); }
.act.liked svg { fill: var(--live); stroke: var(--live); }
.act.pop { animation: act-pop 0.3s ease-out; }
@keyframes act-pop { 0%{transform:scale(1)} 50%{transform:scale(1.3)} 100%{transform:scale(1)} }
.feed-loading { display: flex; justify-content: center; padding: 40px; }
.feed-empty { text-align: center; padding: 48px 16px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.fe-icon { font-size: 36px; margin-bottom: 12px; }

/* SPINNER */
.spinner { width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ EXPLORE ══ */
.expl-head { padding: 16px 16px 12px; }
.pg-title { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.pg-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-full); padding: 10px 16px; }
.search-bar svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search-bar input { background: none; border: none; color: var(--text); font-size: 14px; flex: 1; }
.search-bar input::placeholder { color: var(--muted); }
.contest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.contest-card { border-radius: var(--r-md); overflow: hidden; background: var(--card); border: 1px solid var(--border); margin-bottom: 8px; }
.contest-thumb { aspect-ratio: 1; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 28px; position: relative; overflow: hidden; }
.contest-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%); }
.contest-rank { position: absolute; top: 8px; left: 8px; font-size: 16px; }
.contest-info { padding: 8px 10px; }
.c-name { font-size: 12px; font-weight: 600; color: var(--text); }
.c-votes { font-size: 11px; color: var(--muted); margin-top: 2px; }
.vote-btn { width: 100%; padding: 8px; border-radius: var(--r-sm); background: var(--card2); border: 1px solid var(--border); color: var(--text2); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 5px; }
.vote-btn svg { width: 13px; height: 13px; }
.vote-btn.voted { background: var(--live-dim); border-color: rgba(255,59,48,.3); color: var(--live); }

/* ══ CAMERA ══ */
.camera-pg { padding: 20px 16px; text-align: center; }
#cam-video { width: 100%; max-width: 340px; border-radius: var(--r-xl); background: var(--card); aspect-ratio: 3/4; object-fit: cover; display: none; border: 1px solid var(--border); }
#cam-video.active { display: block; }
.cam-placeholder {
  width: 100%; max-width: 340px; margin: 0 auto 16px;
  aspect-ratio: 3/4; border-radius: var(--r-xl);
  background: var(--card); border: 1.5px dashed var(--border2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; cursor: pointer; color: var(--muted);
}
.cam-placeholder svg { width: 36px; height: 36px; }
.cam-placeholder span { font-size: 14px; }
.cam-title { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.cam-sub { font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.cam-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.y-btn { background: var(--accent); color: #000; padding: 12px 24px; border-radius: var(--r-full); font-size: 14px; font-weight: 700; transition: opacity 0.2s; }
.y-btn:active { opacity: 0.85; }
.y-btn-ghost { background: transparent; border: 1.5px solid var(--border2); color: var(--text2); padding: 11px 20px; border-radius: var(--r-full); font-size: 14px; font-weight: 500; }
.upload-opt { margin-bottom: 16px; }
.upload-opt-btn { display: inline-block; background: var(--card); border: 1px solid var(--border); color: var(--text2); padding: 10px 20px; border-radius: var(--r-full); font-size: 13px; font-weight: 500; cursor: pointer; }
.kaya-lens-bar { padding: 12px 0; }
.kl-label { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.kaya-lens-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.kaya-lens-scroll::-webkit-scrollbar { display: none; }
.post-preview { display: none; padding: 16px; }
.post-preview.show { display: block; }
.preview-img { width: 100%; max-width: 400px; border-radius: var(--r-lg); object-fit: cover; margin-bottom: 14px; }
.caption-wrap { margin-bottom: 14px; }
.caption-inp { width: 100%; background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; resize: none; }
.post-act-row { display: flex; gap: 10px; }
.btn-discard { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--text2); padding: 12px; border-radius: var(--r-full); font-size: 14px; font-weight: 500; }
.btn-post { flex: 2; background: var(--accent); color: #000; padding: 12px; border-radius: var(--r-full); font-size: 14px; font-weight: 700; }

/* ══ LIVE PAGE ══ */
.live-page-head { padding: 16px 16px 12px; }
.golive-banner {
  margin: 0 16px 20px;
  background: linear-gradient(135deg, #1A0F00 0%, #0D0800 100%);
  border: 1px solid rgba(212,168,83,0.2);
  border-radius: var(--r-lg); padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.glb-left { display: flex; align-items: center; gap: 12px; }
.glb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); animation: blink-dot 1s infinite; flex-shrink: 0; }
@keyframes blink-dot { 0%,100%{opacity:1} 50%{opacity:.3} }
.glb-title { font-size: 15px; font-weight: 700; color: var(--text); }
.glb-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }
.glb-btn { background: var(--live); color: #fff; padding: 9px 20px; border-radius: var(--r-full); font-size: 13px; font-weight: 700; }
.sec-label { padding: 0 16px 10px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 20px; }
.lcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; }
.lcard-thumb { aspect-ratio: 9/12; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 32px; position: relative; }
.lcard-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%); }
.lcard-live { position: absolute; top: 8px; left: 8px; background: var(--live); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.3px; }
.lcard-views { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: var(--r-full); display: flex; align-items: center; gap: 3px; }
.lcard-info { padding: 10px; }
.lcard-name { font-size: 13px; font-weight: 700; color: var(--text); }
.lcard-topic { font-size: 11px; color: var(--text2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══ GAMES ══ */
.wallet-strip {
  margin: 16px; background: linear-gradient(135deg, #1A1000 0%, #0F0A00 100%);
  border: 1px solid rgba(212,168,83,0.2); border-radius: var(--r-lg); padding: 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.ws-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }
.ws-amount { display: flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 26px; font-weight: 800; color: var(--accent); margin: 4px 0; }
.ws-amount svg { width: 20px; height: 20px; }
.ws-sub { font-size: 11px; color: var(--muted); }
.topup-btn { background: var(--accent); color: #000; padding: 9px 20px; border-radius: var(--r-full); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.g-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; margin: 0 16px 12px; }
.g-card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.g-card-title svg { width: 16px; height: 16px; color: var(--accent); }
.challenge { margin-bottom: 14px; }
.challenge:last-child { margin-bottom: 0; }
.ch-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.ch-name { font-size: 13px; color: var(--text); font-weight: 500; }
.ch-status { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-full); }
.ch-status.prog { background: var(--accent-dim); color: var(--accent); }
.ch-status.done { background: rgba(52,199,89,0.12); color: var(--green); }
.prog-track { height: 4px; background: var(--card2); border-radius: 2px; margin-bottom: 5px; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.ch-foot { display: flex; align-items: center; justify-content: space-between; }
.ch-pct { font-size: 11px; color: var(--muted); }
.ch-rew { font-size: 11px; font-weight: 600; color: var(--accent); }
.spin-wrap { text-align: center; }
.wheel-outer { position: relative; width: 200px; height: 200px; margin: 0 auto 14px; }
.wheel-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 14px solid var(--accent); z-index: 2; }
.wheel-canvas { width: 200px; height: 200px; border-radius: 50%; overflow: hidden; }
.wheel-svg { width: 100%; height: 100%; }
.wheel-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--accent); border: 2px solid var(--border); z-index: 2; }
.spin-cost { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.spin-cost span { color: var(--accent); font-weight: 600; }
.spin-result { font-size: 14px; font-weight: 600; color: var(--text); margin: 10px 0; }
.lb-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.lb-item:last-child { border-bottom: none; }
.lb-me { background: var(--accent-dim); margin: 8px -16px -16px; padding: 10px 16px; border-radius: 0 0 var(--r-lg) var(--r-lg); border: none; }
.lb-rank { width: 28px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text2); }
.lb-rank.gold { color: #FFD700; }
.lb-rank.silver { color: #C0C0C0; }
.lb-rank.bronze { color: #CD7F32; }
.lb-avi { width: 34px; height: 34px; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.lb-avi-me { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-dim); border: 1.5px solid var(--accent-mid); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.lb-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
.lb-gems { font-size: 12px; color: var(--text2); font-weight: 500; }
.badges-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 16px; }
.badge-chip { display: flex; align-items: center; gap: 5px; background: var(--card); border: 1px solid var(--border); color: var(--text2); font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: var(--r-full); }
.badge-chip svg { width: 12px; height: 12px; color: var(--accent); }

/* ══ PROFILE ══ */
.profile-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 24px 16px 20px; text-align: center; }
.profile-avi {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 28px; font-weight: 800; color: #000;
  margin: 0 auto 14px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-mid);
}
.p-name { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--text); }
.p-handle { font-size: 13px; color: var(--muted); margin-top: 2px; margin-bottom: 6px; }
.p-bio { font-size: 13px; color: var(--text2); line-height: 1.5; margin-bottom: 16px; }
.p-stats { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 16px; }
.pst { text-align: center; padding: 0 20px; }
.pst-v { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--text); }
.pst-l { font-size: 11px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.pst-div { width: 1px; height: 30px; background: var(--border); }
.p-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.wallet-card {
  margin: 16px; background: linear-gradient(135deg, #1A1000, #0F0A00);
  border: 1px solid rgba(212,168,83,0.2); border-radius: var(--r-lg); padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.wc-lbl { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }
.wc-amt { display: flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--accent); margin: 4px 0; }
.wc-amt svg { width: 18px; height: 18px; }
.wc-sub { font-size: 11px; color: var(--muted); }
.tx-list { padding: 0 16px 8px; }
.photos-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; padding: 0 0 2px; }
.photo-cell { aspect-ratio: 1; background: var(--card2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logout-btn { width: 100%; background: transparent; border: 1px solid rgba(255,59,48,0.2); color: rgba(255,107,107,0.7); padding: 13px; border-radius: var(--r-md); font-size: 14px; font-weight: 600; }

/* ══ CHAT ══ */
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.ch-avi { width: 46px; height: 46px; border-radius: 50%; background: var(--accent-dim); border: 1.5px solid var(--accent-mid); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.ch-info { flex: 1; min-width: 0; }
.ch-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ch-prev { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-time { font-size: 11px; color: var(--muted); }

/* ══ LIVE STREAM VIEW ══ */
#live-stream-view {
  position: fixed; inset: 0; z-index: 99990;
  background: #000; display: none; flex-direction: column;
}
#live-stream-view.show { display: flex; }
.live-vid {
  position: absolute; inset: 0; z-index: 1;
  width: 100% !important; height: 100% !important;
}
.live-vid > div, .live-vid video {
  width: 100% !important; height: 100% !important;
  object-fit: cover !important;
}
#local-video.pip {
  position: absolute !important;
  width: 110px !important; height: 150px !important;
  right: 12px !important; top: 80px !important;
  left: auto !important; bottom: auto !important;
  border-radius: 12px !important; z-index: 5 !important;
  border: 2px solid rgba(255,255,255,0.25) !important;
  inset: auto !important;
}
.live-placeholder {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #444; gap: 12px;
}
.live-placeholder svg { width: 48px; height: 48px; }
.live-placeholder p { font-size: 14px; }
.live-ovr-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: calc(var(--safe-t) + 16px) 16px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
  display: flex; align-items: center; justify-content: space-between;
}
.live-user-row { display: flex; align-items: center; gap: 10px; }
.live-avi { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-dim); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--accent); }
.live-name { font-size: 14px; font-weight: 700; color: #fff; }
.live-badge { background: var(--live); color: #fff; font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 3px; display: inline-block; margin-top: 2px; letter-spacing: 0.3px; }
.live-views { display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,0.5); color: #fff; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: var(--r-full); }
.live-views svg { width: 14px; height: 14px; }
.live-ovr-bot {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  padding: 8px 12px calc(var(--safe-b) + 12px);
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
}
.live-chat-feed { max-height: 32vh; overflow-y: auto; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: none; }
.live-chat-feed::-webkit-scrollbar { display: none; }
.live-chat-msg { background: rgba(0,0,0,0.4); color: rgba(255,255,255,0.9); font-size: 12px; padding: 5px 10px; border-radius: var(--r-full); display: inline-block; align-self: flex-start; max-width: 90%; line-height: 1.4; backdrop-filter: blur(4px); }
.live-chat-msg strong { color: var(--accent); font-weight: 600; }
.live-chat-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.live-chat-inp { flex: 1; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--r-full); padding: 9px 14px; font-size: 13px; color: #fff; backdrop-filter: blur(4px); }
.live-chat-inp::placeholder { color: rgba(255,255,255,0.4); }
.live-send-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.live-send-btn svg { width: 15px; height: 15px; color: #000; }
.live-lens-picker { overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; }
.live-lens-picker::-webkit-scrollbar { display: none; }
.live-ctrls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.lc-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); }
.lc-btn svg { width: 18px; height: 18px; }
.lc-gift { background: var(--accent); color: #000; border: none; }
.lc-gift svg { width: 18px; height: 18px; }
.lc-end { background: var(--live); border-color: transparent; }

/* ══ GIFT MODAL ══ */
.gift-modal { position: fixed; inset: 0; z-index: 99992; background: rgba(0,0,0,0.75); display: none; align-items: flex-end; justify-content: center; }
.gift-modal.show { display: flex; }
.gift-sheet { background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; width: 100%; max-width: 430px; padding: 14px 16px calc(16px + var(--safe-b)); max-height: 70dvh; overflow-y: auto; }
.gift-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 14px; }
.gift-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--text); }
.gift-bal { font-size: 13px; color: var(--accent); font-weight: 600; }
.gift-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 10px 0; }
.gift-tabs::-webkit-scrollbar { display: none; }
.gift-tab { padding: 6px 14px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--card); border: 1px solid var(--border); color: var(--text2); }
.gift-tab.on { background: var(--text); color: var(--bg); border-color: transparent; }
.gift-tab-panel { display: none; }
.gift-tab-panel.on { display: block; }
.gift-scroll { max-height: 260px; overflow-y: auto; scrollbar-width: none; }
.gift-scroll::-webkit-scrollbar { display: none; }
.gift-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; padding: 4px 0; }
.gift-item { background: var(--card); border-radius: var(--r-sm); padding: 10px 6px; text-align: center; cursor: pointer; border: 1.5px solid transparent; position: relative; transition: border-color 0.15s; }
.gift-item.selected { border-color: var(--accent); background: var(--accent-dim); }
.gi-badge { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 3px; margin-bottom: 4px; display: inline-block; }
.gi-badge.new { background: rgba(10,132,255,0.2); color: var(--blue); }
.gi-badge.hot { background: var(--live-dim); color: var(--live); }
.gi-badge.premium { background: var(--accent-dim); color: var(--accent); }
.gi-emoji { font-size: 24px; margin-bottom: 4px; }
.gi-name { font-size: 10px; color: var(--text2); font-weight: 500; }
.gi-cost { font-size: 9px; color: var(--muted); margin-top: 2px; }
.premium-gift { background: linear-gradient(135deg, rgba(212,168,83,0.08), var(--card)); }
.gift-empty { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; }
.ge-icon { font-size: 28px; margin-bottom: 8px; }
.gift-send-btn { width: 100%; padding: 13px; border-radius: var(--r-full); background: var(--accent); color: #000; font-size: 14px; font-weight: 700; }
.gift-anim-wrap { position: fixed; inset: 0; z-index: 99999; pointer-events: none; display: none; align-items: center; justify-content: center; }
.gift-anim-wrap.show { display: flex; }
.gift-anim { font-size: 80px; animation: gift-pop 0.5s ease-out; }
@keyframes gift-pop { 0%{transform:scale(0);opacity:0} 70%{transform:scale(1.2);opacity:1} 100%{transform:scale(1);opacity:1} }
.gift-toast-msg { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13px; padding: 10px 20px; border-radius: var(--r-full); z-index: 99998; display: none; }
.gift-toast-msg.show { display: block; }
.premium-anim-overlay { position: fixed; inset: 0; z-index: 99997; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; }
.premium-anim-overlay.show { display: flex; }
.premium-anim-text { font-size: 48px; animation: gift-pop 0.5s ease-out; }

/* ══ GO LIVE MODAL ══ */
.golive-modal { position: fixed; inset: 0; z-index: 99991; background: rgba(0,0,0,0.75); display: none; align-items: flex-end; justify-content: center; }
.golive-modal.show { display: flex; }
.golive-sheet { background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; width: 100%; max-width: 430px; padding: 20px 20px calc(20px + var(--safe-b)); }
.golive-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 20px; }
.golive-title { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.golive-sub { font-size: 14px; color: var(--text2); margin-bottom: 18px; line-height: 1.5; }
.golive-inp { width: 100%; background: var(--card); border: 1px solid var(--border); color: var(--text); padding: 13px 16px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 16px; }
.golive-inp:focus { border-color: var(--accent); }
.golive-start-btn { width: 100%; padding: 14px; background: var(--live); color: #fff; font-size: 15px; font-weight: 700; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.live-dot-anim { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink-dot 1s infinite; }
.golive-cancel { width: 100%; padding: 13px; background: transparent; border: 1px solid var(--border); color: var(--text2); font-size: 14px; border-radius: var(--r-full); }

/* ══ TOP UP MODAL ══ */
.modal-overlay { position: fixed; inset: 0; z-index: 99992; background: rgba(0,0,0,0.75); display: none; align-items: flex-end; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-sheet { background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; width: 100%; max-width: 430px; padding: 16px 16px calc(16px + var(--safe-b)); max-height: 90dvh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--card); border: 1px solid var(--border); color: var(--text2); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 16px; }
.modal-title { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--text2); margin-bottom: 16px; }
.glow-bal-strip { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.gbs-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.gbs-val { font-size: 18px; font-weight: 700; color: var(--accent); margin-top: 3px; }
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.pack-card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 14px 12px; text-align: center; cursor: pointer; position: relative; transition: border-color 0.15s; }
.pack-card.selected { border-color: var(--accent); background: var(--accent-dim); }
.pack-popular { font-size: 9px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.pack-price { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--text); }
.pack-glow { font-size: 11px; color: var(--text2); margin-top: 3px; }
.pack-bonus { font-size: 10px; color: var(--green); font-weight: 600; margin-top: 4px; }
.pay-btn { width: 100%; padding: 14px; background: var(--accent); color: #000; font-size: 15px; font-weight: 700; border-radius: var(--r-full); margin-bottom: 10px; }
.pay-note { text-align: center; font-size: 11px; color: var(--muted); }

/* ══ INSTALL BANNER ══ */
#install-banner { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%) translateY(100%); width: calc(100% - 32px); max-width: 400px; z-index: 8888; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); transition: transform 0.3s ease; }
#install-banner.show { transform: translateX(-50%) translateY(0); }
.ib-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-dim); border: 1px solid var(--accent-mid); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--accent); flex-shrink: 0; }
.ib-text { flex: 1; }
.ib-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--text); }
.ib-text span { font-size: 11px; color: var(--text2); }
.ib-btn { background: var(--accent); color: #000; padding: 8px 16px; border-radius: var(--r-full); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.ib-close { background: none; border: none; color: var(--muted); padding: 4px; display: flex; align-items: center; }
.ib-close svg { width: 16px; height: 16px; }
.ib-pwa { background: var(--surface); border-top: 1px solid var(--border); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }

/* ══ TOAST ══ */
.toast { position: fixed; bottom: calc(80px + var(--safe-b)); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 500; padding: 10px 20px; border-radius: var(--r-full); z-index: 999990; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; white-space: nowrap; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══ THEME SWITCHER ══ */
.theme-switcher { padding: 0 16px 16px; }
.theme-switcher-title { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 12px; }
.theme-option { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 12px; cursor: pointer; text-align: center; }
.theme-option.active { border-color: var(--accent); }
.theme-preview { aspect-ratio: 2/1; border-radius: var(--r-sm); overflow: hidden; margin-bottom: 6px; }
.tp-hdr { height: 35%; display: flex; align-items: center; gap: 3px; padding: 3px 5px; }
.tp-dot { width: 6px; height: 6px; border-radius: 50%; }
.tp-body { height: 65%; padding: 3px 5px; display: flex; flex-direction: column; gap: 2px; }
.tp-card { height: 45%; border-radius: 2px; }
.theme-name { font-size: 11px; color: var(--text2); font-weight: 500; }
.theme-check { font-size: 12px; margin-top: 2px; }

/* ══ UTILS ══ */
.hidden { display: none !important; }
