/* ============ Yuvaap Web — design system ============ */
:root {
  --violet: #703171;
  --violet-600: #5d2760;
  --violet-50: #f6eef6;
  --magenta: #c81a53;
  --magenta-600: #a8133f;
  --mauve: #955a96;
  --lilac: #cebccd;
  --grad: linear-gradient(135deg, #c81a53 0%, #955a96 55%, #703171 100%);
  --grad-soft: linear-gradient(135deg, #fbe7ee 0%, #f3e8f4 100%);

  --bg: #faf7fb;
  --surface: #ffffff;
  --surface-2: #f4eff5;
  --border: #ece4ee;
  --text: #242424;
  --text-2: #5f5866;
  --text-3: #8d8592;
  --success: #2e9d4f;
  --danger: #e2483d;
  --warning: #f29a1e;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(60, 20, 60, .06), 0 1px 1px rgba(60, 20, 60, .04);
  --shadow: 0 6px 24px rgba(80, 30, 80, .08);
  --shadow-lg: 0 20px 50px rgba(60, 20, 60, .18);
  --sidebar-w: 248px;
  --topbar-h: 64px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root[data-theme="dark"] {
  --bg: #120d14;
  --surface: #1c1620;
  --surface-2: #261e2b;
  --border: #33293a;
  --text: #f3eef5;
  --text-2: #c2b8c8;
  --text-3: #8e8396;
  --violet-50: #2a1f2e;
  --grad-soft: linear-gradient(135deg, #2a1622 0%, #231a2b 100%);
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120d14; --surface: #1c1620; --surface-2: #261e2b; --border: #33293a;
    --text: #f3eef5; --text-2: #c2b8c8; --text-3: #8e8396; --violet-50: #2a1f2e;
    --grad-soft: linear-gradient(135deg, #2a1622 0%, #231a2b 100%);
    --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--magenta); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 17px; }
p { margin: 0; }
.ic { flex: none; }
.muted { color: var(--text-2); } .tiny { font-size: 12px; } .small { font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 14.5px; transition: transform .12s, box-shadow .2s, background .2s, opacity .2s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(200, 26, 83, .28); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(200, 26, 83, .38); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--violet-50); }
.btn-outline { border: 1.5px solid var(--violet); color: var(--violet); background: transparent; }
:root[data-theme="dark"] .btn-outline { color: var(--lilac); border-color: var(--mauve); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; transition: background .15s; position: relative; }
.icon-btn:hover { background: var(--surface-2); }
.badge-dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); border: 2px solid var(--surface); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.input, .select, .textarea { width: 100%; height: 48px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); outline: none; transition: border .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--mauve); box-shadow: 0 0 0 4px rgba(149, 90, 150, .15); }
.input-group { position: relative; }
.input-group .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-weight: 500; }
.input-group .input { padding-left: 54px; }
.input-group .suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.otp-boxes { display: flex; gap: 10px; justify-content: center; }
.otp-boxes input { width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 600; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); outline: none; }
.otp-boxes input:focus { border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(200, 26, 83, .12); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--lilac); }
.chip.active { background: var(--violet); border-color: var(--violet); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--violet-50); color: var(--violet); }
:root[data-theme="dark"] .pill { color: var(--lilac); }
.pill-live { background: #e2483d; color: #fff; animation: pulse 1.6s infinite; }
.pill-gold { background: #fff3d6; color: #9a6400; }
@keyframes pulse { 50% { opacity: .7; } }

/* ---------- App shell ---------- */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 14px; z-index: 40; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; padding: 4px 8px 18px; }
.sidebar .brand img { height: 46px; width: auto; }
.nav-section { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 16px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--violet-50); color: var(--violet); font-weight: 600; }
:root[data-theme="dark"] .nav-link.active { color: #e8c9ea; }
.nav-link.active .ic { color: var(--magenta); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .title { font-size: 18px; font-weight: 600; }
.topbar .mobile-logo { display: none; height: 34px; }
.search-box { flex: 1; max-width: 460px; position: relative; }
.search-box input { width: 100%; height: 42px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); padding: 0 16px 0 42px; outline: none; }
.search-box .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.points-badge { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--grad-soft); font-weight: 600; font-size: 13.5px; color: var(--magenta); }

.page { padding: 24px 28px 48px; width: 100%; max-width: 1360px; margin: 0 auto; flex: 1; }
.page-narrow { max-width: 760px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; }

.bottom-nav { display: none; }

/* ---------- Sections, rails, cards ---------- */
.section { margin-top: 32px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 19px; }
.section-head .sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.see-all { font-size: 13.5px; font-weight: 600; color: var(--magenta); display: inline-flex; align-items: center; gap: 2px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px; margin: -4px -2px 0; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-wrap { position: relative; }
.rail-btn { position: absolute; top: 38%; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.rail-wrap:hover .rail-btn { opacity: 1; }
.rail-btn.l { left: -14px; } .rail-btn.r { right: -14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }

.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }

.card-video { display: block; color: inherit; cursor: pointer; }
.card-video .thumb { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.card-video .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-video:hover .thumb img { transform: scale(1.05); }
.card-video .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55)); }
.card-video .play-hover { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; z-index: 1; }
.card-video .play-hover span { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--magenta); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.card-video:hover .play-hover { opacity: 1; }
.card-video .dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.card-video .tag { position: absolute; left: 8px; top: 8px; z-index: 1; }
.card-video .lock { position: absolute; right: 8px; top: 8px; z-index: 1; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.card-video .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .3); z-index: 1; }
.card-video .progress i { display: block; height: 100%; background: var(--magenta); }
.card-video .meta { padding: 10px 2px 0; }
.card-video .meta h4 { font-size: 14.5px; font-weight: 600; }
.card-video .meta p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.card-video.skeleton .thumb, .sk-line { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-line { height: 12px; border-radius: 6px; margin-top: 10px; }
.sk-line.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.card-poster { aspect-ratio: 9/16; border-radius: 16px; overflow: hidden; position: relative; display: block; color: #fff; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-poster:hover img { transform: scale(1.05); }
.card-poster .overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(30, 5, 30, .85)); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; }
.card-poster h4 { font-size: 15px; }

/* Pillar tiles */
.pillars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.pillar { position: relative; border-radius: 18px; padding: 16px; min-height: 120px; color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .2s, box-shadow .2s; }
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pillar .emoji { position: absolute; right: 10px; top: 8px; font-size: 40px; opacity: .9; }
.pillar h4 { font-size: 15px; font-weight: 600; }
.pillar p { font-size: 11.5px; opacity: .85; }

/* Hero */
.hero { position: relative; border-radius: 24px; overflow: hidden; min-height: 340px; display: flex; align-items: flex-end; color: #fff; background: #241226; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 6, 30, .9) 0%, rgba(30, 6, 30, .5) 45%, transparent 75%), linear-gradient(0deg, rgba(20, 4, 20, .7), transparent 50%); }
.hero .content { position: relative; z-index: 1; padding: 36px; max-width: 560px; }
.hero h1 { font-size: 32px; margin: 10px 0 8px; }
.hero p { opacity: .85; }
.hero .actions { display: flex; gap: 10px; margin-top: 20px; }
.hero .btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px); }
.hero-dots { position: absolute; z-index: 2; right: 24px; bottom: 20px; display: flex; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .45); transition: width .25s; }
.hero-dots button.active { width: 24px; background: #fff; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 12px 16px; font-weight: 500; color: var(--text-2); border-bottom: 2.5px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab.active { color: var(--magenta); border-bottom-color: var(--magenta); font-weight: 600; }

.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: inherit; }
.list-item + .list-item { margin-top: 10px; }
.list-item:hover { border-color: var(--lilac); }
.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar-txt { display: inline-grid; place-items: center; background: var(--grad); color: #fff; font-weight: 600; font-size: 13px; }

.stat { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.stat .v { font-size: 26px; font-weight: 700; }
.stat .l { font-size: 12.5px; color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: var(--grad); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: rgba(255, 255, 255, .08); right: -160px; top: -120px; }
.auth-art::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: rgba(255, 255, 255, .06); left: -120px; bottom: -100px; }
.auth-art .logo { background: #fff; border-radius: 16px; padding: 10px 16px; width: fit-content; position: relative; z-index: 1; }
.auth-art .logo img { height: 44px; }
.auth-art h1 { font-size: 40px; line-height: 1.15; position: relative; z-index: 1; }
.auth-art .pillar-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; position: relative; z-index: 1; }
.auth-art .pillar-row span { padding: 8px 14px; background: rgba(255, 255, 255, .16); border-radius: 999px; font-size: 13px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-2); margin-bottom: 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.step-bar { display: flex; gap: 6px; margin-bottom: 26px; }
.step-bar i { flex: 1; height: 5px; border-radius: 5px; background: var(--border); }
.step-bar i.on { background: var(--grad); }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.option { padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); text-align: left; font-weight: 500; font-size: 14px; transition: all .15s; display: flex; align-items: center; gap: 10px; }
.option:hover { border-color: var(--lilac); }
.option.active { border-color: var(--magenta); background: #fdf0f4; color: var(--magenta-600); }
:root[data-theme="dark"] .option.active { background: #34182a; color: #ffb3cb; }
.option img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }

/* ---------- Community ---------- */
.feed { max-width: 640px; margin: 0 auto; }
.post { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; margin-bottom: 16px; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.post-head .name { font-weight: 600; font-size: 14.5px; }
.post-text { padding: 0 16px 12px; white-space: pre-wrap; word-break: break-word; }
.post-media { display: grid; gap: 2px; background: #000; }
.post-media.n2 { grid-template-columns: 1fr 1fr; }
.post-media.n3, .post-media.n4 { grid-template-columns: 1fr 1fr; }
.post-media img, .post-media video { width: 100%; max-height: 520px; object-fit: cover; aspect-ratio: auto; cursor: pointer; }
.post-media.n2 img, .post-media.n3 img, .post-media.n4 img { aspect-ratio: 1; }
.post-media.n1 img { object-fit: contain; }
.post-actions { display: flex; gap: 4px; padding: 6px 8px; border-top: 1px solid var(--border); }
.post-actions button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 13.5px; }
.post-actions button:hover { background: var(--surface-2); }
.post-actions button.liked { color: var(--magenta); }
.composer { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; margin-bottom: 16px; }
.composer textarea { border: 0; outline: none; resize: none; width: 100%; min-height: 60px; background: transparent; }
.composer .previews { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.composer .previews .pv { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #000; }
.composer .previews .pv img, .composer .previews .pv video { width: 100%; height: 100%; object-fit: cover; }
.composer .previews .pv button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment .bubble { background: var(--surface-2); border-radius: 4px 16px 16px 16px; padding: 8px 14px; }
.comment .bubble b { font-size: 13px; }
.progress-bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--grad); transition: width .2s; }

/* ---------- Modal & toast ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(20, 8, 22, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.modal-backdrop.show { opacity: 1; }
.modal { width: 100%; max-width: 460px; max-height: 90vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.98); transition: transform .2s; }
.modal-wide { max-width: 760px; }
.modal-backdrop.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px 18px; }
#toasts { position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #2a1c2d; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: all .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--danger); } .toast-success { background: var(--success); }

.loader-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 0; color: var(--text-2); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--magenta); animation: spin .8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255, 255, 255, .4); border-top-color: #fff; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 48px 16px; color: var(--text-3); }
.empty .ic { width: 44px; height: 44px; margin: 0 auto 10px; display: block; }
.splash { position: fixed; inset: 0; display: grid; place-items: center; background: var(--surface); z-index: 300; transition: opacity .35s; }
.splash img { width: 240px; animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04); } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 39; }
  .main { margin-left: 0; padding-bottom: 72px; }
  .topbar { padding: 0 16px; }
  .topbar .mobile-logo { display: block; }
  .topbar .search-box { display: none; }
  .page { padding: 16px 16px 40px; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; height: 64px; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--text-3); font-weight: 500; }
  .bottom-nav a.active { color: var(--magenta); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .hero { min-height: 260px; border-radius: 18px; }
  .hero .content { padding: 22px; }
  .hero h1 { font-size: 23px; }
  .rail { grid-auto-columns: 72%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
}
@media (max-width: 560px) { .pillars { grid-template-columns: repeat(2, 1fr); } h1 { font-size: 22px; } }

/* Glow Break dice */
.dice { font-size: 72px; display: inline-block; animation: roll .55s linear infinite; }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }
.dice-ic { display: inline-block; transition: transform .3s; }
#dice:hover .dice-ic { transform: rotate(25deg) scale(1.15); }
.list-item.current { background: var(--violet-50); }

/* ---------- Phone polish ---------- */
.topbar .mobile-logo { flex: none; width: auto; max-width: 110px; object-fit: contain; }
.topbar a:has(.mobile-logo) { flex: none; }
.sidebar .theme-row { display: none; }
@media (max-width: 960px) {
  .pillar { min-height: 92px; padding: 14px; border-radius: 16px; }
  .pillar .emoji { font-size: 32px; }
  .section { margin-top: 26px; }
  .page-head h1 { font-size: 21px; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { max-width: 100%; border-radius: 22px 22px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  #toasts { bottom: 84px; }
  .tabs { margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .composer, .post { border-radius: 14px; }
  .feed { margin: 0 -4px; }
  .list-item { padding: 12px; gap: 10px; }
  .list-item .btn-sm { padding: 0 12px; }
  .hero .actions { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .topbar-actions { gap: 0; }
  .topbar-actions #theme { display: none; }
  .sidebar .theme-row { display: flex; }
  .points-badge { padding: 0 10px; height: 32px; font-size: 12.5px; }
  .topbar .icon-btn { width: 36px; height: 36px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid .card-video .meta h4 { font-size: 13px; }
  .rail { grid-auto-columns: 82%; }
  .otp-boxes input { width: 42px; height: 50px; }
  .auth-form { padding: 28px 16px; align-items: flex-start; }
  .watch-info h1 { font-size: 18px; }
  .up-item .t { width: 128px; }
  .row:has(> .field.grow + .field.grow) { flex-wrap: wrap; }
  .row:has(> .field.grow + .field.grow) > .field { flex-basis: 100%; }
}
a.chip { color: var(--text); }
a.chip.active { color: #fff; }

/* ============ Install promo widget ============ */
.app-promo { position: fixed; z-index: 90; right: 24px; bottom: 24px; width: 400px; max-width: calc(100vw - 32px); padding: 2px; border-radius: 24px; overflow: hidden;
  opacity: 0; transform: translateY(30px) scale(.96); transition: opacity .35s ease, transform .5s cubic-bezier(.2, 1.4, .4, 1); pointer-events: none; box-shadow: 0 30px 70px -10px rgba(112, 49, 113, .55); }
.app-promo.show { opacity: 1; transform: none; pointer-events: auto; }
.app-promo::before { content: ''; position: absolute; inset: -60%; background: conic-gradient(from 0deg, #c81a53, #f3c053, #955a96, #5ec8c0, #703171, #c81a53); animation: promoSpin 4s linear infinite; }
@keyframes promoSpin { to { transform: rotate(360deg); } }
.app-promo-inner { position: relative; display: flex; gap: 16px; padding: 18px; border-radius: 22px; background: var(--surface); }
.app-promo-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); background: var(--surface-2); z-index: 2; }
.app-promo-phone { flex: none; width: 104px; height: 188px; border-radius: 22px; background: #1b1020; padding: 6px; position: relative; box-shadow: inset 0 0 0 2px #3a2a40, 0 12px 28px rgba(0, 0, 0, .3); animation: phoneFloat 3.2s ease-in-out infinite; }
@keyframes phoneFloat { 50% { transform: translateY(-6px) rotate(-2deg); } }
.phone-notch { position: absolute; top: 9px; left: 50%; width: 34px; height: 6px; border-radius: 6px; background: #000; transform: translateX(-50%); z-index: 2; }
.phone-screen { position: relative; height: 100%; border-radius: 17px; overflow: hidden; background: linear-gradient(160deg, #c81a53, #955a96 55%, #2b1530); display: grid; place-items: center; }
.phone-icon { width: 56px; height: 56px; border-radius: 16px; background: #fff; padding: 3px; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: iconPulse 2s ease-out infinite; }
.phone-icon img { width: 100%; height: 100%; border-radius: 13px; }
@keyframes iconPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .65); transform: scale(1); } 15% { transform: scale(1.08); } 30% { transform: scale(1); } 70%, 100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); } }
.phone-label { position: absolute; bottom: 52px; left: 0; right: 0; text-align: center; color: #fff; font-size: 11px; font-weight: 600; }
.orbit { position: absolute; top: 50%; left: 50%; font-size: 15px; margin: -10px 0 0 -9px; animation: orbit 6s linear infinite; }
.orbit.o2 { animation-delay: -1.5s; } .orbit.o3 { animation-delay: -3s; } .orbit.o4 { animation-delay: -4.5s; }
@keyframes orbit { from { transform: rotate(0) translateX(40px) rotate(0); } to { transform: rotate(360deg) translateX(40px) rotate(-360deg); } }
.app-promo-copy { min-width: 0; padding-right: 14px; }
.app-promo-kicker { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--magenta); background: #fde8ef; padding: 3px 9px; border-radius: 99px; }
:root[data-theme="dark"] .app-promo-kicker { background: #3a1626; color: #ff8db0; }
.app-promo h3 { font-size: 17px; margin: 8px 0 4px; }
.app-promo p { font-size: 13px; color: var(--text-2); }
.app-promo ul { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 5px; font-size: 12.5px; }
.app-promo li { display: flex; gap: 8px; align-items: center; }
.app-promo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.app-promo-actions .btn { height: 40px; font-size: 13.5px; }
.app-promo-go { position: relative; overflow: hidden; }
.app-promo-go::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: shimmerBtn 2.6s ease-in-out infinite; }
@keyframes shimmerBtn { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@media (max-width: 960px) {
  .app-promo { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; max-width: none; }
  .app-promo-phone { width: 84px; height: 156px; }
}
@media (max-width: 420px) {
  .app-promo-inner { gap: 12px; padding: 16px 14px; }
  .app-promo-phone { width: 70px; height: 128px; border-radius: 18px; align-self: center; }
  .phone-icon { width: 40px; height: 40px; border-radius: 12px; }
  .phone-label { bottom: 12px; font-size: 10px; }
  .orbit { font-size: 12px; animation-name: orbitSm; }
  .app-promo h3 { font-size: 16px; }
  .app-promo ul { font-size: 12px; }
}
@keyframes orbitSm { from { transform: rotate(0) translateX(28px) rotate(0); } to { transform: rotate(360deg) translateX(28px) rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .app-promo::before, .app-promo-phone, .phone-icon, .orbit, .app-promo-go::after { animation: none; } }

/* iOS Add-to-Home-Screen guide */
.ios-guide { position: fixed; inset: 0; z-index: 120; background: rgba(20, 8, 22, .6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .25s; }
.ios-guide.show { opacity: 1; }
.ios-guide-card { position: relative; width: 100%; max-width: 380px; background: var(--surface); border-radius: 22px; padding: 26px 22px 20px; text-align: center; box-shadow: var(--shadow-lg); }
.ios-guide-icon { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 10px; box-shadow: var(--shadow); }
.ios-guide ol { list-style: none; padding: 0; margin: 16px 0 18px; text-align: left; display: grid; gap: 12px; }
.ios-guide li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.ios-guide li b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 13px; }
.ios-pill { display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-weight: 600; background: var(--surface-2); padding: 2px 9px; border-radius: 8px; vertical-align: middle; color: #0a84ff; }
.ios-arrow { position: fixed; left: 50%; bottom: calc(8px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font-size: 12px; font-weight: 600; animation: iosBounce 1.2s ease-in-out infinite; }
.ios-arrow svg { width: 30px; height: 30px; }
@keyframes iosBounce { 50% { transform: translate(-50%, 8px); } }
@media (min-width: 768px) { .ios-arrow { top: 8px; bottom: auto; flex-direction: column-reverse; } }

/* Installed app (standalone): respect notches / status bar */
.is-standalone .topbar { padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); }
.is-standalone .sidebar { padding-top: calc(18px + env(safe-area-inset-top)); }
.is-standalone [data-install] { display: none !important; }
[data-install] { display: none !important; }
.can-install [data-install] { display: flex !important; }
.is-standalone [data-install] { display: none !important; }
.nav-install { margin-bottom: 6px; background: var(--grad-soft); color: var(--magenta) !important; font-weight: 600; box-shadow: inset 0 0 0 1.5px rgba(200, 26, 83, .25); }
.nav-install:hover { background: var(--violet-50); }

/* ============ Home: Today dashboard ============ */
.today { position: relative; overflow: hidden; border-radius: 24px; padding: 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #e2557f 0%, transparent 55%), linear-gradient(135deg, #8a2a6c 0%, #5d2760 55%, #2b1530 100%); box-shadow: 0 18px 40px -18px rgba(112, 49, 113, .7); }
.today::after { content: ''; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(255, 255, 255, .06); }
.today-date { font-size: 12.5px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.today h1 { font-size: 26px; margin-top: 4px; }
.today-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.tstat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .12); color: #fff; backdrop-filter: blur(6px); transition: background .15s; }
.tstat:hover { background: rgba(255, 255, 255, .2); }
.tstat b { font-size: 22px; line-height: 1.1; }
.tstat span { font-size: 11.5px; opacity: .8; }
.today-actions { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: rgba(255, 255, 255, .95); color: #3b2140; font-size: 12px; font-weight: 600; transition: transform .15s; }
.qa span { font-size: 22px; line-height: 1; }
.qa:active { transform: scale(.96); }

/* Up next */
#s-next { margin-top: 22px; }
.next-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); color: inherit; box-shadow: var(--shadow); min-height: 200px; }
.next-card.skeleton-box { min-height: 200px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border: 0; }
.next-media { position: relative; background: #1b1020; }
.next-media { overflow: hidden; height: clamp(240px, 52vw, 360px); }
.next-media img { width: 100%; height: 100%; object-fit: contain; }
.next-media .pill-live { position: absolute; top: 12px; left: 12px; }
.next-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.next-kicker { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--magenta); }
.next-kicker.live { color: var(--danger); }
.next-body h2 { font-size: 20px; }
.next-when { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.next-cta { align-self: flex-start; margin-top: 4px; }

/* Today's schedule timeline */
.sched { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; scroll-snap-type: x mandatory; }
.sched::-webkit-scrollbar { display: none; }
.sched-item { flex: none; width: 168px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; color: inherit; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); position: relative; transition: border-color .15s, transform .15s; }
.sched-item:hover { border-color: var(--lilac); transform: translateY(-2px); }
.sched-time { font-weight: 700; font-size: 15px; }
.sched-dot { position: absolute; top: 16px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--lilac); }
.sched-item.live .sched-dot { background: var(--danger); box-shadow: 0 0 0 0 rgba(226, 72, 61, .6); animation: liveDot 1.6s infinite; }
.sched-item.soon .sched-dot { background: var(--warning); }
.sched-item.done { opacity: .62; }
.sched-item.live { border-color: rgba(226, 72, 61, .5); background: linear-gradient(180deg, rgba(226, 72, 61, .08), var(--surface)); }
@keyframes liveDot { 70% { box-shadow: 0 0 0 9px rgba(226, 72, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(226, 72, 61, 0); } }
.sched-thumb { position: relative; display: block; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.sched-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sched-txt b { font-size: 13px; font-weight: 600; display: block; }
.sched-txt small { font-size: 11.5px; color: var(--text-2); }
.sched-item.live .sched-txt small { color: var(--danger); font-weight: 600; }

/* Pillar tiles with real thumbnails */
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ptile { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; color: #fff; background: var(--pg); isolation: isolate; }
.ptile-img { position: absolute; inset: 0; background: center/cover no-repeat; transition: transform .5s ease; z-index: -2; }
.ptile:hover .ptile-img { transform: scale(1.06); }
.ptile-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(25, 6, 28, .85)); }
.ptile-txt { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; }
.ptile-txt b { font-size: 15px; }
.ptile-txt small { font-size: 11.5px; opacity: .85; }

/* Compact rails & lists */
.rail-sm { grid-auto-columns: minmax(200px, 240px); }
.rail-sq { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.rail-sq::-webkit-scrollbar { display: none; }
.sq-card { display: flex; flex-direction: column; gap: 8px; color: inherit; }
.sq-img { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: var(--grad); }
.sq-img img { width: 100%; height: 100%; object-fit: cover; }
.sq-img i { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--magenta); display: grid; place-items: center; }
.sq-card b { font-size: 13px; font-weight: 600; }
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.blog-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: inherit; }
.blog-item:hover { border-color: var(--lilac); }
.blog-item > span:nth-child(2) { flex: 1; min-width: 0; }
.blog-item b { font-size: 14px; display: block; }
.blog-item small { font-size: 12px; color: var(--text-2); }
.blog-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--grad-soft); color: var(--magenta); display: grid; place-items: center; }
.promo-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; color: inherit; background: var(--grad-soft); border: 1px dashed rgba(149, 90, 150, .45); }
.promo-card > span:nth-child(2) { flex: 1; }
.promo-card b { display: block; font-size: 15px; }
.promo-card small { color: var(--text-2); font-size: 12.5px; }
.promo-emoji { font-size: 36px; }

@media (max-width: 960px) {
  .today { padding: 18px; border-radius: 20px; margin: 0 -2px; }
  .today h1 { font-size: 22px; }
  .tstat { padding: 10px; } .tstat b { font-size: 19px; }
  .next-card { grid-template-columns: 1fr; }
  .next-body { padding: 16px; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ptile { border-radius: 16px; }
  .blog-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .rail-sm { grid-auto-columns: 46%; } .sched-item { width: 150px; } .promo-card .btn { display: none; } }
.qa { white-space: nowrap; font-size: 11.5px; padding: 10px 2px; }
@media (max-width: 360px) { .today-actions { gap: 6px; } .qa { font-size: 10.5px; } }
/* Phones: show toasts at the top so the on-screen keyboard never hides them */
@media (max-width: 960px) { #toasts { top: calc(12px + env(safe-area-inset-top)); bottom: auto; width: calc(100% - 32px); } .toast { width: 100%; text-align: center; transform: translateY(-10px); } .toast.show { transform: none; } }

/* ============ Guest mode ============ */
.guest-pill { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 4px 0 12px; border-radius: 999px; background: var(--grad-soft); color: var(--violet); font-weight: 600; font-size: 13px; border: 1.5px solid rgba(149, 90, 150, .3); }
:root[data-theme="dark"] .guest-pill { color: #e8c9ea; }
.guest-pill .gp-t { font-variant-numeric: tabular-nums; }
.guest-pill b { height: 28px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12.5px; }
.guest-pill i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 100%); background: var(--magenta); transition: width 1s linear; }
.guest-pill.low { color: var(--danger); border-color: rgba(226, 72, 61, .45); animation: pulse 1.6s infinite; }
.guest-pill.low i { background: var(--danger); }
@media (max-width: 420px) { .guest-pill { padding-left: 8px; gap: 4px; } .guest-pill > .ic { display: none; } .guest-pill b { padding: 0 9px; } }

.login-sheet { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 8, 22, .6); backdrop-filter: blur(5px); opacity: 0; transition: opacity .25s; }
.login-sheet.show { opacity: 1; }
.login-sheet.blocking { background: rgba(20, 8, 22, .82); }
.ls-card { position: relative; width: 100%; max-width: 400px; background: var(--surface); border-radius: 24px; padding: 26px 22px 20px; text-align: center; box-shadow: var(--shadow-lg); transform: translateY(16px) scale(.98); transition: transform .3s cubic-bezier(.2, 1.2, .4, 1); }
.login-sheet.show .ls-card { transform: none; }
.ls-card .ls-x { position: absolute; top: 12px; right: 12px; }
.ls-icon { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 10px; box-shadow: var(--shadow); }
.ls-card h3 { font-size: 19px; margin-bottom: 4px; }
.ls-step { text-align: left; }
@media (max-width: 960px) {
  .login-sheet { align-items: flex-end; padding: 0; }
  .ls-card { max-width: none; border-radius: 24px 24px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); }
}

.unlock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.unlock { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); text-align: left; transition: border-color .15s, transform .15s; }
.unlock:hover { border-color: var(--lilac); transform: translateY(-2px); }
.unlock span { font-size: 26px; }
.unlock b { font-size: 14.5px; }
.unlock small { font-size: 12px; color: var(--text-2); }
@media (max-width: 480px) { .unlock-grid { grid-template-columns: 1fr 1fr; } }

/* ============ Yuvaap dice ============ */
.pface { width: 20px; height: 20px; border-radius: 6px; display: inline-block; vertical-align: -4px; object-fit: cover; }
.ptile-txt .pface { width: 22px; height: 22px; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.nav-link .pface { flex: none; }
.dice-btn img.dice-ic { width: 28px; height: 28px; animation: diceIdle 4s ease-in-out infinite; }
.dice-btn:hover img.dice-ic { animation: diceHover .6s ease-in-out; }
@keyframes diceIdle { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-14deg) scale(1.08); } 90% { transform: rotate(12deg) scale(1.08); } 94% { transform: rotate(-6deg); } }
@keyframes diceHover { 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg); } }
.qa img.qa-dice { width: 26px; height: 26px; }

/* 3D cube for the Glow Break roll */
.dice-stage { perspective: 900px; height: 210px; display: grid; place-items: center; }
.dice3d { --s: 120px; position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; transform: rotateX(-25deg) rotateY(35deg); }
.dice3d .df { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; backface-visibility: hidden; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.dice3d .df img { width: 100%; height: 100%; display: block; }
.dice3d .f1 { transform: rotateY(0deg) translateZ(calc(var(--s) / 2)); }
.dice3d .f2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.dice3d .f3 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.dice3d .f4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.dice3d .f5 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.dice3d .f6 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.dice-shadow { width: 110px; height: 18px; margin: -6px auto 0; border-radius: 50%; background: radial-gradient(rgba(60, 10, 60, .35), transparent 70%); animation: diceShadow 2.1s ease-out; }
@keyframes diceShadow { 0%, 60% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1); opacity: 1; } }
.dice-result { text-align: center; min-height: 52px; margin-top: 10px; opacity: 0; transform: translateY(8px); transition: all .35s; }
.dice-result.show { opacity: 1; transform: none; }
.dice-result h3 { font-size: 20px; }
@media (prefers-reduced-motion: reduce) { .dice-btn img.dice-ic { animation: none; } }

/* ============ Scratch & Win ============ */
.sw { max-width: 760px; margin: 0 auto; }
.sw-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 22px; border-radius: 22px; color: #fff; background: linear-gradient(120deg, #bf1c56, #ff416c); box-shadow: 0 16px 36px -16px rgba(191, 28, 86, .7); }
.sw-hero h1 { font-size: 24px; margin: 2px 0 4px; } .sw-hero p { opacity: .9; font-size: 14px; }
.sw-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; opacity: .85; }
.sw-coupons { background: #fff; color: #bf1c56; }
.sw-h { text-align: center; font-size: 16px; margin: 26px 0 14px; }
.sw-none { text-align: center; color: var(--text-3); }
.sw-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.sw-ev { width: 128px; height: 128px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px; text-align: center; color: #fff; background: linear-gradient(135deg, #bf1c56, #ff416c); box-shadow: 0 10px 24px -10px rgba(191, 28, 86, .8); transition: transform .15s; text-transform: capitalize; }
.sw-ev:hover { transform: translateY(-3px) scale(1.03); }
.sw-ev b { font-size: 13px; line-height: 1.25; } .sw-ev small { font-size: 11px; opacity: .85; }
.sw-up { width: 150px; height: 150px; opacity: .85; background: linear-gradient(to bottom right, #955a96, #703171); }
.sw-past { background: linear-gradient(135deg, #8d8592, #5f5866); }
.sw-play h2 { font-size: 20px; }
.sw-hint { text-align: center; color: #bf1c56; font-weight: 700; margin: 14px 0; }
.sw-card { position: relative; width: min(300px, 84vw); aspect-ratio: 1; margin: 0 auto 10px; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px -18px rgba(60, 10, 60, .45); }
.sw-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .5s; z-index: 2; }
.sw-card canvas.gone { opacity: 0; }
.sw-reward { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; color: #242424; z-index: 1; }
.sw-win-emoji { font-size: 44px; }
.sw-won .sw-win-emoji { animation: swPop .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes swPop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.sw-code { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px dashed #bf1c56; border-radius: 12px; color: #e0006d; background: #fff; }
.sw-code b { font-size: 17px; letter-spacing: .06em; }
.sw-desc { color: #2e7d32; font-weight: 600; font-size: 14px; }
.sw-lose { color: #ff1744; font-weight: 700; font-size: 17px; }
.sw-code-box { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; border: 2px dashed #2ecc71; background: #eaffef; color: #1b5e20; }
.sw-code-box b { font-size: 18px; letter-spacing: 1px; }
.sw-table { overflow: hidden; }
.sw-tr { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.sw-th { background: var(--surface-2); font-weight: 600; }
.sw-name { color: #2e7d32; font-weight: 500; } .sw-prize { color: #ff8800; font-weight: 500; text-align: right; }

/* Review build (testapp.yuvaap.com) — a small tag hanging from the top edge on every screen. */
html.is-test body::after { content: 'TEST'; position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 9999; padding: calc(2px + env(safe-area-inset-top)) 12px 3px; border-radius: 0 0 8px 8px; background: #f5b308; color: #111; font: 700 11px/1.2 var(--font); letter-spacing: .12em; pointer-events: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }

/* Thumbnails come in mixed shapes (16:9 videos, 9:16 class posters). One that doesn't fit its box is shown
   whole over a blurred copy of itself instead of having its baked-in text cropped (see fitThumbs in app.js). */
.fit-box { position: relative; display: block; overflow: hidden; }
.img-fit { isolation: isolate; }
.img-fit::before { content: ''; position: absolute; inset: -16px; z-index: -1; background: var(--fit-bg) center/cover no-repeat; filter: blur(16px) brightness(.6); }
.img-fit > img { object-fit: contain !important; background: transparent !important; }
.next-media.img-fit::before { inset: -24px; filter: blur(24px) brightness(.55); }

/* Glowgram: Feed | Groups switch */
.gg-head { margin-bottom: 12px; }
.gg-seg { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.gg-seg a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-2); transition: background .15s, color .15s; }
.gg-seg a.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(200, 26, 83, .25); }

/* ---------- Bottom bar: raised "My Food" centre button ---------- */
.bottom-nav a.bn-center { position: relative; }
.bottom-nav a.bn-center span { width: 50px; height: 50px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 6px 16px rgba(200, 26, 83, .4), 0 0 0 4px var(--surface); }
.bottom-nav a.bn-center.active { color: var(--magenta); }

/* ---------- Me ---------- */
.me, .ex { max-width: 760px; margin: 0 auto; }
.me-head { gap: 10px; }
.me-head h1 { font-size: 22px; }
.me-profile { display: flex; align-items: center; gap: 14px; color: inherit; }
.me-profile h2 { font-size: 19px; }
.me-share { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 10px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--grad-soft); color: var(--magenta); font-size: 13.5px; font-weight: 600; }
.me-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.me-stats a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-align: center; transition: border-color .15s, transform .15s; }
.me-stats a:hover { border-color: var(--lilac); transform: translateY(-1px); }
.me-stats span { font-size: 20px; }
.me-stats b { font-size: 18px; }
.me-stats small { font-size: 11px; color: var(--text-2); }
.me-h { margin: 22px 0 10px; font-size: 16px; }
.me-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.me-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 10px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--magenta); text-align: center; transition: border-color .15s, transform .15s; }
.me-tile span { color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.25; }
.me-tile:hover { border-color: var(--lilac); transform: translateY(-1px); }
.me-row { margin-top: 8px; }
.me-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--violet-50); color: var(--magenta); }
.me-emoji { font-size: 28px; flex: none; }
.me-banner { display: flex; align-items: center; gap: 12px; padding: 20px; background: var(--grad); color: #fff; border: 0; }
.me-banner h2 { font-size: 20px; }
.me-banner p { opacity: .9; font-size: 13.5px; }
.me-banner > span { font-size: 46px; margin-left: auto; }
.me-group summary { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; list-style: none; }
.me-group summary::-webkit-details-marker { display: none; }
.me-course, .me-fav { display: flex; gap: 12px; padding: 10px; align-items: center; }
.me-course img, .me-fav .fit-box { width: 96px; flex: none; aspect-ratio: 1; border-radius: 12px; object-fit: cover; }
.me-fav .fit-box img { width: 100%; height: 100%; object-fit: cover; }
.me-course .btn, .me-fav .btn { margin-top: 8px; }

/* Streak */
.streak-hero { text-align: center; }
.streak-ring { --p: 0; width: 180px; height: 180px; margin: 6px auto 10px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--magenta) calc(var(--p) * 1%), var(--surface-2) 0); }
.streak-ring > div { width: 150px; height: 150px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.streak-ring span { font-size: 26px; }
.streak-ring b { font-size: 40px; line-height: 1; }
.streak-ring small { color: var(--text-2); }
.streak-quote { font-style: italic; color: var(--text-2); font-size: 13.5px; }
.streak-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.streak-stats small { display: block; color: var(--magenta); font-size: 12px; font-weight: 600; }
.streak-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.streak-cal .sc { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.streak-cal .done { background: var(--violet-50); color: var(--magenta); }
.streak-cal .today { background: var(--grad); color: #fff; }
.streak-cal .missed { color: var(--text-3); }
.streak-cal .future { opacity: .35; }
.streak-legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.streak-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.streak-legend i.done { background: var(--violet-50); border: 1px solid var(--magenta); }
.streak-legend i.today { background: var(--magenta); }
.streak-legend i.missed { background: var(--surface-2); }

/* ---------- Explore ---------- */
.ex-hi { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ex-hi h1 { font-size: 21px; }
.ex-fav { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--magenta); font-size: 10.5px; font-weight: 600; text-align: center; }
.ex-search { max-width: none; margin-bottom: 6px; }
.ex-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-door { position: relative; min-height: 104px; padding: 14px; border-radius: 18px; background: var(--g); color: #3a1530; display: flex; overflow: hidden; transition: transform .15s; }
.ex-door:hover { transform: translateY(-2px); }
.ex-door b { display: block; font-size: 16px; }
.ex-door small { font-size: 12px; opacity: .8; }
.ex-door-emoji { position: absolute; right: 10px; bottom: 4px; font-size: 44px; }
.ex-door i { position: absolute; left: 14px; bottom: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .8); color: var(--magenta); }
.ex-more { display: grid; grid-template-columns: 1fr; gap: 8px; }
.ex-concerns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ex-concern { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-align: center; font-size: 12.5px; transition: border-color .15s, transform .15s; }
.ex-concern:hover { border-color: var(--magenta); transform: translateY(-1px); }
.ex-cimg { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--grad-soft); }
.ex-cimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ex-cemoji { font-size: 34px; }
.ex-cemoji.sm { position: absolute; right: 4px; bottom: 2px; font-size: 18px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.ex-hero { position: relative; border-radius: 22px; overflow: hidden; background: var(--grad); color: #fff; }
.ex-hero::before { content: ""; position: absolute; inset: 0; background: var(--bg, none) center/cover; opacity: .35; }
.ex-hero-in { position: relative; padding: 22px; background: linear-gradient(90deg, rgba(60, 10, 50, .75), rgba(60, 10, 50, .2)); }
.ex-hero h2 { font-size: 26px; margin: 4px 0 10px; }
.ex-hero ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 14px; }
.ex-hero li { display: flex; align-items: center; gap: 8px; }
.ex-hero .btn { max-width: 100%; white-space: normal; text-align: left; height: auto; min-height: 44px; padding: 8px 18px; }
@media (min-width: 700px) { .ex-doors { grid-template-columns: repeat(4, 1fr); } .ex-concerns { grid-template-columns: repeat(4, 1fr); } .ex-more { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 400px) { .me-grid { grid-template-columns: repeat(2, 1fr); } }

/* TV browsers: big-screen friendly focus for remote-control navigation */
html.is-tv :focus-visible { outline: 4px solid var(--magenta); outline-offset: 3px; border-radius: 12px; }
html.is-tv body { font-size: 17px; }
html.is-tv .yp-btn { transform: scale(1.2); }

/* Home: weekly leaderboard card */
.lb-card { display: block; padding: 8px 14px; color: inherit; transition: border-color .15s; }
.lb-card:hover { border-color: var(--lilac); }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-weight: 500; }
.lb-row:last-child { border-bottom: 0; }
.lb-row.mine { margin: 0 -14px; padding: 9px 14px; background: var(--violet-50); color: var(--magenta); font-weight: 700; border-radius: 12px; }
.lb-rank { width: 28px; text-align: center; font-size: 18px; }
.lb-gap { text-align: center; color: var(--text-3); padding: 4px 0; }

/* ---------- Trehi Organics store & Real Maharani Results ---------- */
.st-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.st-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; transition: border-color .15s, transform .15s; }
.st-card:hover { border-color: var(--lilac); transform: translateY(-1px); }
.st-img { display: block; aspect-ratio: 1; background: var(--surface-2); }
.st-img img { width: 100%; height: 100%; object-fit: cover; }
.st-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.st-price { color: var(--magenta); font-weight: 700; }
.st-price.big { font-size: 22px; margin-top: 4px; }
.st-stars { color: #f5b308; letter-spacing: 1px; }
.st-stars i { font-style: normal; color: var(--border); }
.st-hero { overflow: hidden; }
.st-hero h2 { font-size: 20px; }
.st-qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.st-qty button { width: 32px; height: 32px; border-radius: 50%; font-size: 18px; font-weight: 600; color: var(--text); }
.st-qty button:hover { background: var(--surface-2); }
.st-qty b { min-width: 22px; text-align: center; }
.st-cart { position: relative; }
.st-cart b { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--magenta); color: #fff; font-size: 11px; display: grid; place-items: center; }
.st-rate { display: flex; gap: 4px; justify-content: center; margin-bottom: 12px; }
.st-rate button { font-size: 32px; color: var(--border); }
.st-rate button.on { color: #f5b308; }
.st-stories { grid-auto-columns: minmax(250px, 80%); }
.st-story { padding: 12px; }
.st-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-ba figure { position: relative; margin: 0; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.st-ba img { width: 100%; height: 100%; object-fit: cover; }
.st-ba figcaption { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; }
.st-quote { margin: 10px 0 4px; font-style: italic; font-size: 13.5px; }
@media (min-width: 700px) { .st-grid { grid-template-columns: repeat(3, 1fr); } .st-hero { display: grid; grid-template-columns: 300px 1fr; } .st-stories { grid-auto-columns: 300px; } }
