/* Theme controls are visible in the top strip and in Settings. */
.ref-entry { display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:20px 0 8px;padding:18px 20px;background:var(--text);color:var(--bg);border:1px solid var(--text);text-align:start; }
.ref-entry span { display:flex;align-items:center;gap:10px;font-size:13px; }
.ref-entry svg,.referrals svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none; }
.ref-entry:hover { transform:translateY(-2px); }
.ref-menu-rate { margin-inline-start:auto;font-size:12px;color:var(--muted); }
.ref-hero { position:relative;overflow:hidden;padding:25px 24px;margin-bottom:16px;background:var(--y);color:#202219;border:1px solid var(--text); }
.ref-hero::after { content:'✦';position:absolute;right:-18px;top:20px;font-size:180px;line-height:1;opacity:.07;pointer-events:none; }
.ref-eyebrow { display:block;font-size:10px;letter-spacing:3px;font-weight:800; }
.ref-hero>strong { display:block;font-size:64px;letter-spacing:-4px;line-height:1.2;margin:12px 0; }
.ref-hero>strong span { font-size:32px;margin-inline-start:5px; }
.ref-hero h2 { position:relative;font-size:19px;line-height:1.35;margin:10px 0;max-width:300px; }
.ref-hero p { position:relative;font-size:13px;line-height:1.65;max-width:390px;margin:0; }
.ref-stats { display:grid;grid-template-columns:1fr 1fr;gap:12px; }
.rewards-tabs { display:flex;gap:6px;background:var(--card2);padding:5px;border:1px solid var(--line);border-radius:12px;margin-bottom:16px; }
.rewards-tabs button { flex:1;padding:11px 6px;border-radius:8px;font-size:12px;font-weight:700;color:var(--muted); }
.rewards-tabs .on { background:var(--y);color:var(--y-ink);box-shadow:0 2px 6px #0001; }
.reward-wallet { border:1px solid var(--line);padding:18px;background:var(--card);margin:0 0 16px;border-radius:12px; }
.reward-wallet>span { font-size:12px;color:var(--muted); }
.reward-wallet>strong { display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:12px 0 16px;font-size:28px;overflow-wrap:anywhere; }
.reward-wallet>strong small { font-size:13px;color:var(--muted); }
.reward-progress { height:5px;background:var(--line);border-radius:4px;overflow:hidden; }
.reward-progress i { display:block;height:100%;background:var(--y); }
.reward-wallet p { font-size:12px;color:var(--muted);line-height:1.6;margin:10px 0 16px; }
.reward-wallet>small { display:block;margin-top:10px;font-size:10px;line-height:1.6;color:var(--muted); }
.ref-stats>div { border:1px solid var(--line);background:var(--card);padding:16px 12px;min-width:0; }
.ref-stats b { display:block;font-size:24px;overflow-wrap:anywhere; }
.ref-stats span { display:block;font-size:11px;color:var(--muted);margin-top:5px; }
.ref-cashback { display:flex;justify-content:space-between;align-items:center;gap:10px;padding:18px 0;margin-bottom:12px;border-bottom:1px solid var(--line);font-size:12px; }
.ref-cashback b { display:flex;align-items:center;gap:5px;overflow-wrap:anywhere; }
.ref-link { display:flex;margin:8px 0 20px;border:1px solid var(--line);background:var(--card);padding:5px;gap:4px; }
.ref-link input { width:0;flex:1;min-width:0;background:transparent;border:0;padding:8px;font-size:12px;color:var(--text);user-select:text; }
.ref-steps { padding-inline-start:22px;margin:0 0 18px;color:var(--text);font-size:13px;line-height:1.6; }
.ref-steps li { padding-inline-start:4px;margin:10px 0; }
html[data-theme="dark"] .ref-hero { background:linear-gradient(125deg,#f4dda1,#c69a43);border-radius:16px;border-color:#eac776; }
html[data-theme="dark"] .ref-entry,html[data-theme="dark"] .ref-stats>div,html[data-theme="dark"] .ref-link { border-radius:12px; }
@media(prefers-reduced-motion:no-preference) { .ref-entry { transition:transform .2s ease; } }
.theme-quick { display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--text);font-size:11px;font-weight:700;letter-spacing:.2px;flex:none;cursor:pointer; }
.theme-quick svg { width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
.theme-quick:hover { background:var(--y);color:var(--y-ink);border-color:var(--y); }
html[data-theme="dark"] .theme-quick { color:var(--y);border-color:#f0ce7d50;background:var(--y-soft); }
html[data-theme="dark"] .theme-quick:hover { background:var(--y);color:var(--y-ink); }
.theme-quick:focus-visible { outline:2px solid currentColor;outline-offset:3px; }
html[data-theme] .inp:focus-within { outline:0;border-color:var(--y);box-shadow:0 0 0 3px #d9b95514; }
.theme-dark-label { display:none; }
html[data-theme="dark"] .theme-light-label { display:none; }
html[data-theme="dark"] .theme-dark-label { display:inline; }
.theme-options { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 18px; }
.theme-choice { display:flex;align-items:center;gap:10px;min-height:70px;padding:12px;border:1px solid var(--line);background:var(--card);border-radius:12px;text-align:start;font-size:13px;font-weight:700;position:relative; }
.theme-choice[aria-pressed="true"] { border-color:var(--text);box-shadow:inset 0 0 0 1px var(--text); }
.theme-choice[aria-pressed="true"]::after { content:'✓';margin-inline-start:auto;color:var(--text);font-size:15px; }
.theme-swatch { width:31px;height:35px;flex:none;border-radius:7px;border:1px solid #8b8a7a50;box-shadow:inset 0 0 0 4px #ffffff14; }
.theme-swatch.light { background:linear-gradient(135deg,#f0efe8 55%,#ffd629 55%); }
.theme-swatch.dark { background:linear-gradient(135deg,#111821 55%,#efce7b 55%); }
.theme-caption { margin:8px 0 0;font-size:12px;color:var(--muted); }
.theme-changing body,.theme-changing .sheet,.theme-changing .lot,.theme-changing .nav,.theme-changing .search,.theme-changing .fb { transition:background-color .22s ease,color .22s ease,border-color .22s ease; }

/* KING / Black & Gold: neutral blacks, warm metallic accents, quieter surfaces. */
html[data-theme="dark"] {
  color-scheme:dark;--bg:#090c10;--bar:#10151c;--card:#131922;--card2:#1b2430;--line:#2b3543;
  --text:#f4f1e9;--muted:#a6afbd;--dim:#818d9e;--y:#f0ce7d;--y-ink:#211a0a;--y-soft:#f0ce7d12;
  --green:#70d7a5;--red:#ff9393;--acid-ink:#0b0e13;--acid-paper:#10151c;
}
html[data-theme="dark"] body { background-image:radial-gradient(ellipse at 90% 0,#b9923f12,transparent 45%),linear-gradient(#090c10f5,#090c10f5),url('brand/king-pattern.svg');background-size:auto,auto,360px 360px; }
html[data-theme="dark"] .king-wall { color:#e8c77d;opacity:.025; }
html[data-theme="dark"] .acid-topline { background:#0e131a;color:#d9be83;border-bottom:1px solid #f0ce7d18; }
html[data-theme="dark"] .hd { border-color:var(--line); }
html[data-theme="dark"] .brand { color:var(--text); }
html[data-theme="dark"] .brand-tag { color:var(--y-ink);background:linear-gradient(120deg,#f8df9c,#dbb75e); }
html[data-theme="dark"] .desktop-nav .on,html[data-theme="dark"] .desktop-nav a:hover { border-color:var(--y); }
html[data-theme="dark"] .ib,html[data-theme="dark"] .balance-withdraw,html[data-theme="dark"] .bal .plus { border-color:var(--line);border-radius:10px;background:var(--card); }
html[data-theme="dark"] .hd>.ib[data-act="cartsheet"] { background:var(--y-soft);color:var(--y);border-color:#f0ce7d40; }
html[data-theme="dark"] .bal .gem { color:var(--y); }
html[data-theme="dark"] .ib .cnt { color:var(--y-ink); }
html[data-theme="dark"] .acid-hero { background:radial-gradient(ellipse at 85% 30%,#dbb46110,transparent 58%); }
html[data-theme="dark"] .acid-eyebrow { color:var(--y); }
html[data-theme="dark"] .acid-eyebrow::before { background:var(--y);border-radius:50%;box-shadow:0 0 14px #f0ce7d60; }
html[data-theme="dark"] .acid-title span { background:linear-gradient(115deg,#f7df9e,#d5b35c);color:var(--y-ink); }
html[data-theme="dark"] .acid-intro { color:var(--muted); }
html[data-theme="dark"] .acid-art::before { background:linear-gradient(145deg,#d5ad5026,#f0ce7d0b); }
html[data-theme="dark"] .acid-featured-image { border-color:#242e3a;box-shadow:12px 16px 38px #0009; }
html[data-theme="dark"] .acid-edition { color:var(--y);border-color:#a78b4d;background:#141b24; }
html[data-theme="dark"] .acid-art-label { color:var(--muted);border:1px solid var(--line);background:#10151c; }
html[data-theme="dark"] .acid-burst { background:var(--y);color:var(--y-ink); }
html[data-theme="dark"] .acid-zero-fees { border:1px solid #f0ce7d60;border-radius:14px;background:linear-gradient(120deg,#f1d486,#d6b361);color:#211a0a;box-shadow:0 6px 24px #0003; }
html[data-theme="dark"] .acid-cta { background:var(--card2);color:var(--text);border:1px solid var(--line);border-radius:11px; }
html[data-theme="dark"] .acid-sell { background:linear-gradient(120deg,#f7dc97,#d6b35f);color:var(--y-ink);border:1px solid #f0ce7d70;border-radius:11px; }
html[data-theme="dark"] .acid-journey { background:#111821;border:1px solid var(--line);border-radius:16px;box-shadow:none; }
html[data-theme="dark"] .acid-journey li>span { color:var(--y);background:var(--y-soft);border:1px solid #f0ce7d38;border-radius:8px; }
html[data-theme="dark"] .acid-catalog-heading h2 span { color:var(--y); }
html[data-theme="dark"] :is(.search,.feedbtn,.fb,.cat,.more,.sel,.save,.saved button) { background:var(--card);border-color:var(--line);border-radius:10px; }
html[data-theme="dark"] :is(.fb.on,.cat.on,.seg2 button.on,.tabs2 button.on) { color:var(--y);border-color:#f0ce7d70;background:var(--y-soft); }
html[data-theme="dark"] .lot { background:var(--card);border-color:var(--line);border-radius:16px;box-shadow:0 6px 20px #0002; }
html[data-theme="dark"] .lot .pic { border-color:var(--line);background:var(--card2); }
html[data-theme="dark"] .lot .mk { color:var(--text);background:#10151ce8;border-color:#ffffff18;border-radius:5px; }
html[data-theme="dark"] .lot .mk.k { color:var(--y-ink);background:var(--y); }
html[data-theme="dark"] .lot .tag { background:var(--card);border-color:var(--line); }
html[data-theme="dark"] .lot .tag.y { color:var(--y-ink);background:var(--y); }
html[data-theme="dark"] .lot .buy { background:var(--y-soft);color:var(--y);border-color:#f0ce7d30;border-radius:9px; }
html[data-theme="dark"] .cartb { border-color:var(--line);border-radius:9px; }
html[data-theme="dark"] .cartb.in { background:var(--y);color:var(--y-ink); }
html[data-theme="dark"] .lot.sk .pic,html[data-theme="dark"] .lot.sk .bd i,html[data-theme="dark"] .gpic { background-image:linear-gradient(90deg,#18212b 25%,#252f3c 50%,#18212b 75%); }
html[data-theme="dark"] .nav { background:#10151cf5;border-color:#f0ce7d30;backdrop-filter:blur(16px);box-shadow:0 -6px 30px #0003; }
html[data-theme="dark"] .shade { background:#000b;backdrop-filter:blur(7px); }
html[data-theme="dark"] .sheet { border:1px solid var(--line);border-radius:20px;background:linear-gradient(135deg,#161d27,#10151c 65%);box-shadow:0 24px 80px #0009; }
html[data-theme="dark"] :is(.sh-h,.item,.tabs2,.copyrow,.tc-account) { border-color:var(--line); }
html[data-theme="dark"] :is(.x,.btn,.gs .side button,.gs-f .sq,.gcard,.lcard,.dep,.tc-card,.promo) { border-color:var(--line);border-radius:10px; }
html[data-theme="dark"] :is(.inp,.arow,.giftline,.agree,.sumcard,.orow,.fev,.copyrow,.tc-destination) { background:var(--card);border-color:var(--line);border-radius:10px; }
html[data-theme="dark"] :is(.btn.y,.gs .side button.y,.gs-f .sq.in,.dep .ic,.tc-icon,.gift-deposit-icon,.mbtns button,.ocard .otop,.promo .pc) { color:var(--y-ink);background:var(--y);border-color:#f0ce7d60; }
html[data-theme="dark"] :is(.btn.g,.mini,.mrow,.mbtns button) { border-radius:10px; }
html[data-theme="dark"] .steps { background:var(--y-soft);color:#d6cbb0;border-color:#f0ce7d35;border-radius:12px; }
html[data-theme="dark"] .withdraw-lock { background:var(--y-soft);border-color:#f0ce7d55;border-radius:12px; }
html[data-theme="dark"] .ck { border-color:#7d899b; }
html[data-theme="dark"] .ck.on { border-color:var(--y);background:var(--y); }
html[data-theme="dark"] .rd.on { border-color:var(--y); }
html[data-theme="dark"] .rd.on::after { background:var(--y); }
html[data-theme="dark"] .item .r,html[data-theme="dark"] .arow .v .r { color:var(--y);background:var(--y-soft);border-color:#f0ce7d50; }
html[data-theme="dark"] :is(.lfloors em,.fev .ev .t.list,.form .lb i,.form label i[style]) { color:var(--y) !important; }
html[data-theme="dark"] .promo span { color:var(--muted); }
html[data-theme="dark"] .qty i { background:var(--card2); }
html[data-theme="dark"] .qty i::after { background:var(--y); }
html[data-theme="dark"] .sw2 { border-color:var(--line);background:var(--card2); }
html[data-theme="dark"] .sw2.on { background:var(--y); }
html[data-theme="dark"] .langs button.on { border-color:var(--y); }
html[data-theme="dark"] .langs button.on i { color:var(--y-ink); }
html[data-theme="dark"] .theme-choice[aria-pressed="true"] { border-color:var(--y);box-shadow:inset 0 0 0 1px var(--y);background:var(--y-soft); }
html[data-theme="dark"] .theme-choice[aria-pressed="true"]::after { color:var(--y); }
html[data-theme="dark"] .mbtns svg { color:var(--y-ink); }
html[data-theme="dark"] .empty { background:#13192280;border-color:var(--line); }
html[data-theme="dark"] #toast>div { background:var(--card2);color:var(--text);border-color:#f0ce7d60;border-radius:12px;box-shadow:0 12px 32px #0005; }
@media(hover:hover) {
  html[data-theme="dark"] .brand:hover .brand-word { color:var(--text); }
  html[data-theme="dark"] .brand:hover .brand-tag { color:var(--y-ink); }
  html[data-theme="dark"] .lot:not(.sk):hover { border-color:#f0ce7d80;box-shadow:0 12px 32px #0005; }
  html[data-theme="dark"] :is(.fev,.item[data-act],.btn.g,.mini,.more,.save):hover { background:var(--card2); }
  html[data-theme="dark"] :is(.fb,.ib,.cartb,.balance-withdraw):hover,html[data-theme="dark"] .bal:hover .plus { color:var(--y-ink);background:var(--y); }
  html[data-theme="dark"] .btn.y:hover { background:#f9de9c; }
}
@media(max-width:600px) {
  .acid-topline { align-items:center;padding-top:max(4px,env(safe-area-inset-top));padding-bottom:4px;gap:8px; }
  .acid-topline>span:first-child { font-size:7px;letter-spacing:.65px; }
  .theme-quick { flex-direction:column;gap:3px;width:42px;min-height:44px;padding:4px 2px;font-size:9px;line-height:1.1; }
  .hd { column-gap:5px; }
  .hd .sp { min-width:0; }
  html[data-theme="dark"] .sheet { border-radius:20px 20px 0 0;border-bottom:0; }
  html[data-theme="dark"] .acid-featured-image { box-shadow:4px 6px 20px #0008; }
}
@media(max-width:359px) {
  .hd { display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px 7px; }
  .hd .brand { grid-column:1;grid-row:1;justify-self:start; }
  .hd .sp { display:none; }
  .hd .theme-quick { grid-column:2/4;grid-row:1;justify-self:end;flex-direction:row;gap:7px;width:auto;padding:7px 12px;font-size:11px; }
  .hd .balance-controls { grid-column:1;grid-row:2;justify-self:start; }
  .hd>[data-act="cartsheet"] { grid-column:2;grid-row:2; }
  .hd>#btnMenu { grid-column:3;grid-row:2; }
}
@media(prefers-reduced-motion:reduce) { .theme-changing body,.theme-changing .sheet,.theme-changing .lot,.theme-changing .nav { transition:none; } }
.web-login { display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:10px 14px;background:var(--y);color:var(--y-ink);border:1px solid var(--line);font-size:12px;font-weight:800;white-space:nowrap; }
.web-login svg { width:18px;height:18px; }
.web-login.connected { background:var(--card);color:var(--text); }
html[data-theme="dark"] .web-login { border-radius:10px; }
.web-auth { text-align:center;padding-top:28px;padding-bottom:28px; }
.web-auth-icon { display:grid;place-items:center;width:60px;height:60px;margin:0 auto 18px;background:var(--y);color:var(--y-ink);border:1px solid var(--line);transform:rotate(-5deg); }
.web-auth-icon svg { width:30px;height:30px; }
.web-auth h3 { font-size:24px;line-height:1.25;margin:0 0 12px;letter-spacing:-.8px; }
.web-auth p { max-width:380px;margin:0 auto 20px;color:var(--muted);font-size:13px;line-height:1.7; }
.web-auth p.small { font-size:11px;margin-top:16px;margin-bottom:0; }
.login-open { display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:20px;text-decoration:none; }
.login-open svg { width:20px;height:20px; }
.login-code-label { color:var(--muted);font-size:12px;margin-top:22px; }
.login-code { display:flex;align-items:center;justify-content:center;gap:4px;width:100%;padding:16px 0;font-size:38px;font-weight:800;letter-spacing:5px;font-variant-numeric:tabular-nums;color:var(--text);user-select:text; }
.login-code svg { width:18px;height:18px;letter-spacing:0;margin-left:8px;color:var(--muted); }
.login-status { display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:var(--muted);margin-top:18px;line-height:1.5; }
.login-status i { width:7px;height:7px;border-radius:50%;background:var(--y);flex:none;box-shadow:0 0 0 4px var(--y-soft); }
html[data-theme="dark"] .web-auth-icon { border-radius:16px; }
@media(max-width:600px) {
  .web-login { padding:8px;gap:4px;min-width:44px; }
  .web-login.connected { display:none; }
}
@media(max-width:359px) {
  .hd>.web-login { grid-column:2;grid-row:1;justify-self:end; }
  .hd .theme-quick { grid-column:3;flex-direction:column;width:42px;padding:4px 2px;font-size:9px; }
}
