/* Streamer side: landing page, sign-up/login, dashboard. */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.svg-i svg, .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.badge.dark { background: var(--ink); color: #fff; }

/* Super user viewing the dashboard as this streamer. */
.top + .imp-bar { background: var(--orange); color: #fff; font-size: 14px; position: sticky; top: 64px; z-index: 29; }
.top + .imp-bar .wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.top + .imp-bar span { flex: 1; min-width: 200px; }
.top + .imp-bar .btn { background: #fff; color: var(--orange-ink); border-color: #fff; }
.top + .imp-bar.ro { background: #1d2939; }
.top + .imp-bar.ro .btn { color: #1d2939; }
/* Admin's read-only view: no buttons that change things. */
html.ro #add-live, html.ro [data-edit], html.ro [data-del], html.ro .tg-card .btn, html.ro main form button[type="submit"] { display: none !important; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(23, 19, 15, 0.92); backdrop-filter: blur(10px); color: #fff; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 800; letter-spacing: -0.01em; }
.top .brand img { height: 20px; filter: brightness(0) invert(1); }
.top .brand span { padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.25); font-size: 15px; }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top nav a.link { color: rgba(255,255,255,0.8); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.top nav a.link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.top .btn { min-height: 40px; padding: 8px 16px; font-size: 14.5px; }
.top .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
@media (max-width: 700px) { .top nav a.link { display: none; } .top .brand span { display: none; } }

/* ---------- landing ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(255,105,0,0.35), transparent 60%), #17130f; color: #fff; padding: 72px 0 88px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero .kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #ffb27a; }
.hero .kicker i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 4px rgba(255,59,48,0.25); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,59,48,0); } }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.035em; margin: 16px 0 18px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: 19px; color: rgba(255,255,255,0.78); max-width: 520px; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .cta .btn:not(.primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.hero .proof { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero .proof div { display: grid; }
.hero .proof strong { font-size: 26px; letter-spacing: -0.02em; }
.hero .proof small { color: rgba(255,255,255,0.6); font-weight: 600; }
.phone { justify-self: center; width: 300px; aspect-ratio: 9 / 17; border-radius: 38px; background: linear-gradient(160deg, #2a221b, #120e0b); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 0 0 6px #0d0a08; position: relative; padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.phone .live-tag { align-self: flex-start; background: #ff3b30; color: #fff; font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 6px; letter-spacing: 0.05em; }
.phone .viewers { position: absolute; top: 22px; right: 18px; background: rgba(255,255,255,0.12); padding: 3px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700; }
.phone .chart { flex: 1; border-radius: 18px; background: rgba(255,255,255,0.04); display: grid; place-items: center; }
.phone .chart svg { width: 85%; }
.phone .earn { background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 14px; }
.phone .earn small { color: var(--muted); font-weight: 700; font-size: 12px; }
.phone .earn strong { display: block; font-size: 24px; letter-spacing: -0.02em; }
.phone .earn .bar { margin-top: 8px; }
.phone .chat { display: grid; gap: 6px; font-size: 12.5px; color: rgba(255,255,255,0.75); }
.phone .chat b { color: #ffb27a; }

.sec { padding: 80px 0; }
.sec.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 680px; margin-bottom: 36px; }
.sec-head .eyebrow { font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-ink); }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.025em; margin: 8px 0 10px; }
.sec-head p { color: var(--ink-2); font-size: 17px; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 22px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--orange-soft); color: var(--orange-ink); font-weight: 800; margin-bottom: 14px; }
.step h3 { font-size: 17px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }

.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: stretch; }
.tier { padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.tier .name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tier .name h3 { margin: 0; font-size: 20px; }
.tier .price { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tier .price small { font-size: 14px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.tier ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.tier li { display: flex; gap: 8px; align-items: flex-start; }
.tier li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; stroke: var(--green); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tier .req { border-top: 1px dashed var(--line); padding-top: 12px; }
.tier .req b { display: block; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.tier.hot { border: 2px solid var(--orange); box-shadow: 0 10px 30px rgba(255,105,0,0.15); }
.tier.top { background: #17130f; color: #fff; border-color: #17130f; }
.tier.top ul, .tier.top .price small { color: rgba(255,255,255,0.75); }
.tier.top .req { border-color: rgba(255,255,255,0.2); }
.tier.top .req b { color: rgba(255,255,255,0.55); }
.rate-table { margin-top: 18px; padding: 18px 20px; display: grid; gap: 10px; }
.rate-table .row { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: center; }
.rate-table .row strong { font-size: 22px; }

.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.calc .in { padding: 28px; display: grid; gap: 18px; }
.calc .out { padding: 28px; background: #17130f; color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.calc .out small { color: rgba(255,255,255,0.6); font-weight: 700; }
.calc .out .big { font-size: 52px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.calc .out .lines { margin-top: 14px; display: grid; gap: 6px; font-size: 14.5px; color: rgba(255,255,255,0.8); }
.calc .out .lines div { display: flex; justify-content: space-between; gap: 10px; }
.range { display: grid; gap: 6px; }
.range label { display: flex; justify-content: space-between; font-weight: 700; font-size: 14.5px; }
.range label output { color: var(--orange-ink); }
input[type=range] { width: 100%; accent-color: var(--orange); }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { padding: 16px 20px; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--orange-ink); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

.final { background: var(--orange); color: #fff; text-align: center; padding: 72px 0; }
.final h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.025em; }
.final p { font-size: 18px; opacity: 0.9; margin: 0 0 24px; }
.final .btn { background: #fff; color: var(--orange-ink); border-color: #fff; }
.foot { background: #17130f; color: rgba(255,255,255,0.55); font-size: 13px; padding: 28px 0; }
.foot p { margin: 0 0 8px; }

@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phone { display: none; }
  .steps, .tiers { grid-template-columns: 1fr 1fr; }
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps, .tiers { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 60px; }
  .sec { padding: 56px 0; }
}

/* ---------- auth pages ---------- */
.auth { min-height: calc(100vh - 64px); display: grid; place-items: start center; padding: 40px 16px 80px; }
.auth .card { width: 100%; max-width: 560px; padding: 28px; }
.auth .card.narrow { max-width: 420px; }
.auth h1 { font-size: 26px; }
.auth .sub { color: var(--muted); margin: -4px 0 20px; }
.fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.fieldset legend { font-weight: 800; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; padding: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.prefix-input { display: flex; align-items: stretch; }
.prefix-input b { display: grid; place-items: center; padding: 0 14px; background: #f3eee8; border: 1.5px solid var(--line); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-weight: 800; color: var(--ink-2); }
.prefix-input .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; letter-spacing: 0.04em; }
.uid-help {background: var(--orange-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.uid-help a { font-weight: 700; }
.chan-row { display: grid; grid-template-columns: 140px 1fr 110px 40px; gap: 8px; margin-bottom: 8px; }
.chan-row .input { min-height: 42px; font-size: 15px; }
.chan-row button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 20px; }
@media (max-width: 520px) { .chan-row { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin: 6px 0 16px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.alt-link { text-align: center; margin-top: 16px; font-size: 14.5px; color: var(--muted); }

/* ---------- dashboard ---------- */
.dash { padding: 24px 0 100px; }
.tabsbar { display: flex; gap: 4px; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabsbar a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.tabsbar a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabsbar a:hover { background: #efe8e0; }
.tabsbar a.on { background: var(--ink); color: #fff; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { font-size: 28px; margin: 0; letter-spacing: -0.02em; }
.hello p { margin: 2px 0 0; color: var(--muted); }

.tier-card { padding: 24px; background: #17130f; color: #fff; border: 0; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-bottom: 16px; overflow: hidden; position: relative; }
.tier-card::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,105,0,0.45), transparent 70%); }
.tier-card .lbl { font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.tier-card .tier-name { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.tier-card .rate { font-size: 17px; color: rgba(255,255,255,0.8); margin-top: 4px; }
.tier-card .rate strong { color: var(--orange); font-size: 22px; }
.tier-card .earn { position: relative; z-index: 1; text-align: right; align-self: center; }
.tier-card .earn strong { display: block; font-size: 40px; letter-spacing: -0.03em; }
.tier-card .earn small { color: rgba(255,255,255,0.6); font-weight: 600; }
.tier-card .lock { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; background: rgba(18,128,92,0.25); color: #7ee2bb; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }
@media (max-width: 640px) { .tier-card { grid-template-columns: 1fr; } .tier-card .earn { text-align: left; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px 18px; }
.stat small { color: var(--muted); font-weight: 700; font-size: 13px; }
.stat strong { display: block; font-size: 26px; letter-spacing: -0.02em; }
.stat span { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

.goals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.goal { padding: 18px 20px; }
.goal h3 { font-size: 16px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.goal .meter { margin: 12px 0 6px; }
.goal .meter + small { color: var(--muted); font-size: 13.5px; }
.goal .row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-top: 10px; }
.goal .bar { height: 10px; }
@media (max-width: 760px) { .goals { grid-template-columns: 1fr; } }

.panel { padding: 20px; margin-bottom: 16px; }
.panel > h2 { font-size: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ref { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ref code { flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; overflow-wrap: anywhere; }

.lives { display: grid; gap: 10px; }
.live { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; }
.live .pf { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); color: var(--ink); }
.live .pf svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.live .pf.tiktok { background: #111; color: #fff; }
.live .pf.youtube { background: #ffe9e9; color: #e01e1e; }
.live .pf.instagram { background: #fdeaf3; color: #c1357b; }
.live .pf.facebook { background: #e8f0fe; color: #1a5fd0; }
.live .meta { min-width: 0; }
.live .meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live .meta small { color: var(--muted); font-size: 13.5px; }
.live .num { text-align: right; }
.live .num strong { display: block; font-size: 18px; }
.live .note { grid-column: 2 / -1; font-size: 13.5px; background: var(--red-soft); color: var(--red); padding: 6px 10px; border-radius: 8px; }
.live .note.info { background: var(--amber-soft); color: var(--amber); }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty svg { width: 40px; height: 40px; stroke: #cbbfb2; fill: none; stroke-width: 1.6; margin-bottom: 8px; }

table.list { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.list th { text-align: left; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 12px; border-bottom: 1px solid var(--line); }
table.list tr:last-child td { border-bottom: 0; }
table.list .r { text-align: right; }
.scroll { overflow-x: auto; }

.status-hero { padding: 32px; text-align: center; max-width: 640px; margin: 20px auto; }
.status-hero .big-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--amber-soft); color: var(--amber); }
.status-hero .big-ic svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.status-hero.rejected .big-ic { background: var(--red-soft); color: var(--red); }
.timeline { text-align: left; display: grid; gap: 10px; margin: 20px 0; }
.timeline div { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.timeline i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #efe8e0; font-style: normal; font-size: 13px; font-weight: 800; flex: none; }
.timeline .done i { background: var(--green); color: #fff; }
.timeline .now i { background: var(--orange); color: #fff; }

/* ---------- modal (shared with admin) ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(29, 26, 23, 0.5); display: grid; place-items: center; padding: 16px; z-index: 60; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; }
.modal.wide { max-width: 820px; }
.modal h2 { font-size: 20px; }
.modal .foot-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-weight: 700; font-size: 13px; }
.seg span svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.seg input:checked + span { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-ink); }
.seg input:focus-visible + span { outline: 3px solid rgba(255, 105, 0, 0.45); }
.hint { font-size: 13.5px; background: var(--blue-soft); color: var(--blue); padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; }
.shot-thumb { max-height: 120px; border-radius: 8px; border: 1px solid var(--line); margin-top: 6px; }

/* ---------- sign-up: capitals, bot trap, city, slide captcha ---------- */
.caps { text-transform: uppercase; }
.caps::placeholder { text-transform: uppercase; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.city-field { display: grid; gap: 6px; }
.city-field label { display: grid; gap: 6px; }
.city-field label > span { font-weight: 700; font-size: 14px; color: var(--ink-2); }
.link-btn { background: none; border: 0; padding: 0; color: var(--orange-ink); font-weight: 700; cursor: pointer; font-size: 13.5px; }
.slider-captcha { max-width: 300px; display: grid; gap: 10px; margin-bottom: 14px; }
.cap-img { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.cap-img img { width: 100%; height: auto; display: block; }
.cap-piece { position: absolute; left: 0; border: 2px solid #fff; border-radius: 4px; background: rgba(255, 105, 0, 0.55); box-shadow: 0 2px 8px rgba(0,0,0,0.35); pointer-events: none; }
.cap-done { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(18, 128, 92, 0.82); color: #fff; font-weight: 800; font-size: 16px; line-height: 1.4; }
.cap-track { position: relative; height: 44px; border-radius: 999px; background: #efe8e0; overflow: hidden; touch-action: none; user-select: none; }
.cap-fill { position: absolute; inset: 0 auto 0 0; width: 22px; background: var(--orange-soft); }
.cap-text { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 0 50px; text-align: center; line-height: 1.2; pointer-events: none; }
.cap-knob { position: absolute; top: 2px; left: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 18px; cursor: grab; box-shadow: 0 2px 6px rgba(0,0,0,0.2); touch-action: none; }
.cap-knob:active { cursor: grabbing; }
.cap-knob:disabled { background: var(--green); cursor: default; }
.slider-captcha.ok .cap-fill { background: var(--green-soft); width: 100% !important; }
.cap-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.cap-msg { color: var(--red); font-weight: 600; }

/* ---------- Telegram notifications ---------- */
.tg-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-left: 4px solid #2aabee; }
.tg-card > div { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.tg-card small { color: var(--muted); font-size: 13.5px; }
.tg-card.on { border-left-color: var(--green); }
.status-tg { max-width: 640px; margin: 20px auto 0; }
.status-tg .tg-card { margin-bottom: 0; }

/* ---------- streamer dashboard on phones ---------- */
.stats.three { grid-template-columns: repeat(3, 1fr); }
.bottombar { display: none; }
@media (max-width: 760px) {
  .stats.three { grid-template-columns: 1fr 1fr; }
  .stats.three .stat:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  /* Top bar: logo + sign out only (the name is on the Profil tab). */
  .top nav span.link { display: none; }
  /* Tabs move to a bottom bar, like a phone app. */
  .tabsbar { display: none; }
  .bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottombar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 11.5px; text-align: center; }
  .bottombar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .bottombar a.on { color: var(--orange-ink); background: var(--orange-soft); }
  .dash { padding: 16px 0 calc(96px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  /* Page head: title, then the action button full width. */
  .hello { flex-direction: column; align-items: stretch; gap: 12px; }
  .hello h1 { font-size: 24px; }
  .hello .btn { width: 100%; }
  .tier-card { padding: 20px; gap: 14px; }
  .tier-card .tier-name { font-size: 30px; }
  .tier-card .earn strong { font-size: 32px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 22px; }
  .panel { padding: 16px; }
  .panel > h2 { font-size: 17px; }
  .goal { padding: 16px; }
  /* Live list: icon + text, views and status under the text. */
  .live { grid-template-columns: 40px 1fr; gap: 6px 12px; padding: 12px 14px; }
  .live .pf { width: 40px; height: 40px; }
  .live .meta strong { white-space: normal; }
  .live .num { grid-column: 2; text-align: left; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
  .live .num strong { display: inline; font-size: 16px; }
  .live .num > div { margin-top: 0 !important; }
  .live .note { grid-column: 1 / -1; }
  table.list { font-size: 13.5px; }
  table.list th, table.list td { padding: 9px 8px; }
  .ref code { min-width: 0; width: 100%; }
  .ref .btn { width: 100%; }
  .status-hero { padding: 22px 18px; margin: 12px auto; }
  .status-hero h1 { font-size: 22px; }
  .tg-card .btn { width: 100%; }
  .modal-bg { align-items: end; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .modal .foot-btns .btn { flex: 1 1 auto; }
  .seg { grid-template-columns: repeat(2, 1fr); }
  .seg span { flex-direction: row; justify-content: center; padding: 10px 6px; }
  /* Landing + sign-up */
  .hero .cta .btn { width: 100%; }
  .hero .proof { gap: 18px; }
  .auth { padding: 20px 12px 60px; }
  .auth .card { padding: 22px 18px; }
  .slider-captcha { max-width: none; }
  .final .btn { width: 100%; }
}

/* ---------- landing page on phones ---------- */
.tier-dots, .swipe-hint, .sticky-cta { display: none; }
@media (max-width: 640px) {
  .hero { padding: 36px 0 44px; }
  .hero h1 { font-size: 40px; margin: 12px 0 14px; }
  .hero p.lead { font-size: 16.5px; margin-bottom: 22px; }
  .hero .cta { gap: 10px; }
  .hero .proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
  .hero .proof div { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 10px; }
  .hero .proof strong { font-size: 19px; }
  .hero .proof small { font-size: 11.5px; line-height: 1.3; }
  .sec { padding: 48px 0; }
  .sec-head { margin-bottom: 22px; }
  .sec-head h2 { font-size: 26px; }
  .sec-head p { font-size: 15.5px; }
  /* "Cara kerja": compact numbered list instead of four big cards. */
  .steps { gap: 0; }
  .step { display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; padding: 16px; border-radius: 0; box-shadow: none; border-width: 0 0 1px; }
  .step:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .step:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom-width: 0; }
  .steps { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
  .step::before { grid-row: span 2; margin: 0; }
  .step h3 { margin: 4px 0 2px; font-size: 16px; }
  .step p { font-size: 14px; }
  /* Tiers: swipe sideways, next card peeking in. */
  .tiers { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -20px; padding: 6px 20px 10px; scroll-padding: 0 20px; scrollbar-width: none; }
  .tiers::-webkit-scrollbar { display: none; }
  .tier { flex: 0 0 82%; scroll-snap-align: start; }
  .tier-dots { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
  .tier-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d8cfc5; transition: width 0.2s, background 0.2s; }
  .tier-dots i.on { width: 22px; border-radius: 99px; background: var(--orange); }
  .swipe-hint { display: block; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
  /* Rate rules: amount on its own line, divider between rows. */
  .rate-table { gap: 0; padding: 6px 16px; }
  .rate-table .row { grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; align-items: start; }
  .rate-table .row:first-child { border-top: 0; }
  .rate-table .row strong { font-size: 20px; line-height: 1.2; }
  /* Calculator: result first (stays in view while sliding), bigger slider handles. */
  .calc { display: flex; flex-direction: column; }
  .calc .out { order: -1; padding: 20px; }
  .calc .out .big { font-size: 42px; }
  .calc .in { padding: 20px; gap: 16px; }
  input[type=range] { height: 30px; }
  input[type=range]::-webkit-slider-thumb { width: 26px; height: 26px; }
  .faq details { padding: 14px 16px; }
  .faq summary { font-size: 15px; }
  .final { padding: 52px 0; }
  .final h2 { font-size: 26px; }
  /* Sticky sign-up bar (shown by landingMobile() after the hero). */
  .sticky-cta:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,0.06); }
  .sticky-cta .btn { min-height: 50px; font-size: 16px; }
  .foot { padding-bottom: 90px; }
}

/* ---------- Do & Don't guide (streamer view, admin preview and editor) ---------- */
.rt { font-size: 15.5px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.rt > :first-child { margin-top: 0; }
.rt > :last-child { margin-bottom: 0; }
.rt p { margin: 0 0 10px; }
.rt h3 { font-size: 17px; margin: 18px 0 8px; }
.rt h4 { font-size: 15.5px; margin: 14px 0 6px; }
.rt ul, .rt ol { margin: 0 0 12px; padding-left: 22px; }
.rt li { margin: 0 0 8px; padding-left: 2px; }
.rt a { color: var(--orange-ink); text-decoration: underline; font-weight: 600; }
.rt blockquote { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fff7ee; border-left: 4px solid var(--orange); }
.rt hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.guide-intro { margin-bottom: 14px; }
.guide-intro, .guide-col { padding: 22px; }
@media (max-width: 760px) { .guide-intro, .guide-col { padding: 18px 16px; } }
.guide-grid, .guide-ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.guide-col h2, .guide-ed-grid h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 14px; }
.guide-do { border-top: 5px solid var(--green); }
.guide-dont { border-top: 5px solid var(--red); }
.guide-do h2 { color: var(--green); }
.guide-dont h2 { color: var(--red); }
.guide-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none; }
.guide-do .guide-ic { background: var(--green-soft); }
.guide-dont .guide-ic { background: var(--red-soft); }
/* First-level bullets become ticks / crosses so the lists read at a glance. */
:is(.guide-col, .guide-ed-grid) .rt > ul { list-style: none; padding-left: 0; }
:is(.guide-col, .guide-ed-grid) .rt > ul > li { position: relative; padding: 0 0 10px 32px; margin: 0 0 10px; border-bottom: 1px dashed var(--line); }
:is(.guide-col, .guide-ed-grid) .rt > ul > li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
:is(.guide-col, .guide-ed-grid) .rt > ul > li::before { position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.guide-do .rt > ul > li::before { content: "✓"; background: var(--green-soft); color: var(--green); }
.guide-dont .rt > ul > li::before { content: "✕"; background: var(--red-soft); color: var(--red); }
.guide-upd { font-size: 13px; margin-top: 12px; }
.guide-preview { background: var(--bg, #f8f5f1); border-radius: 14px; padding: 14px; margin: 8px 0; }
@media (max-width: 760px) { .guide-grid, .guide-ed-grid { grid-template-columns: 1fr; } }

/* Rich-text editor */
.rte { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.rte:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #fbf9f6; border-radius: 12px 12px 0 0; position: sticky; top: 0; z-index: 2; }
.rte-btn { min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: 14.5px; cursor: pointer; }
.rte-btn:hover { background: #f0ebe4; }
.rte-btn.on { background: var(--ink); color: #fff; }
.rte-sep { width: 1px; margin: 6px 4px; background: var(--line); }
.rte-area { min-height: 170px; padding: 14px 16px; outline: none; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.guide-ed-grid .guide-do .rte-area, .guide-ed-grid .guide-dont .rte-area { min-height: 260px; }
#ed-intro .rte-area { min-height: 90px; }

/* ---------- full-screen image viewer (assets/js/viewer.js) ---------- */
html.vw-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 100; background: #0f0e0d; color: #fff; display: flex; flex-direction: column; }
.vw-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(0, 0, 0, 0.45); flex-wrap: wrap; position: relative; z-index: 2; }
.vw-cap { flex: 1; min-width: 160px; display: flex; flex-direction: column; line-height: 1.3; }
.vw-cap b { font-size: 15px; }
.vw-cap small { color: rgba(255, 255, 255, 0.65); font-size: 12.5px; }
.vw-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vw-btn, .vw-zoom { height: 40px; min-width: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #fff; display: grid; place-items: center; cursor: pointer; font: inherit; font-weight: 700; font-size: 13.5px; }
.vw-zoom { min-width: 62px; font-variant-numeric: tabular-nums; }
.vw-btn:hover, .vw-zoom:hover { background: rgba(255, 255, 255, 0.2); }
.vw-btn:focus-visible, .vw-zoom:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.vw-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.18); margin: 0 4px; }
.vw-stage { flex: 1; position: relative; overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; }
.vw-stage.can-pan { cursor: grab; }
.vw-stage.can-pan:active { cursor: grabbing; }
.vw-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; will-change: transform; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.vw-load { display: none; position: absolute; inset: 0; place-items: center; color: rgba(255, 255, 255, 0.7); }
.viewer.loading .vw-load { display: grid; }
.viewer [data-side] { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); z-index: 2; }
.viewer [data-side="l"] { left: 12px; }
.viewer [data-side="r"] { right: 12px; }
.vw-count { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.55); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.vw-hint { text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); padding: 8px 12px 12px; }
@media (max-width: 640px) {
  .vw-top { padding: 8px 10px; }
  .vw-cap { flex-basis: 100%; }
  .vw-tools { width: 100%; justify-content: space-between; gap: 2px; }
  .vw-btn { min-width: 36px; height: 38px; }
  .vw-sep { display: none; }
  .vw-hint { display: none; }
}
/* Screenshots that open the viewer */
img.shot.zoomable { cursor: zoom-in; }
.shot-wrap { position: relative; }
.shot-wrap .shot-open { position: absolute; right: 8px; bottom: 8px; }

/* ---------- welcome tours (assets/js/tour.js) ---------- */
.tour { position: fixed; inset: 0; z-index: 90; }
.tour-block { position: fixed; inset: 0; background: transparent; }
.tour.no-target .tour-block { background: rgba(20, 17, 14, 0.62); }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(20, 17, 14, 0.62), 0 0 0 3px var(--orange) inset; pointer-events: none; }
.tour-card { position: fixed; width: min(380px, calc(100vw - 24px)); background: var(--card, #fff); color: var(--ink); border-radius: 18px; padding: 18px 18px 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3); }
.tour-card.center { width: min(440px, calc(100vw - 24px)); }
.tour-card.switching { opacity: .6; }
.tour-step { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 4px; }
.tour-title { font-size: 18px; margin: 0 0 6px; line-height: 1.3; }
.tour-body { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.tour-body p { margin: 0 0 8px; }
.tour-body ul { margin: 6px 0 4px; padding-left: 18px; }
.tour-body li { margin-bottom: 5px; }
.tour-body .todo { list-style: none; padding: 0; }
.tour-body .todo li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: #f8f5f1; }
.tour-body .todo li i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12px; background: #fff; border: 1.5px solid var(--line); color: var(--muted); }
.tour-body .todo li.done i { background: var(--green); border-color: var(--green); color: #fff; }
.tour-body .todo li.done span { color: var(--muted); text-decoration: line-through; }
.tour-hero { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.tour-dots { display: flex; gap: 5px; margin: 12px 0 10px; flex-wrap: wrap; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dots i.done { background: #f3c7a6; }
.tour-dots i.on { background: var(--orange); width: 20px; border-radius: 4px; }
.tour-btns { display: flex; gap: 8px; align-items: center; }
.tour-btns > span { flex: 1; }
.tour-skip { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.tour-skip:hover { color: var(--ink); text-decoration: underline; }
html.tour-open { overflow: hidden; }
/* single highlight (admin "Show me") */
.spot { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.spot-ring { position: fixed; border-radius: 14px; border: 3px solid var(--orange); box-shadow: 0 0 0 6px rgba(255, 106, 0, 0.25); animation: spot-pulse 1.3s ease-in-out infinite; }
@keyframes spot-pulse { 50% { box-shadow: 0 0 0 14px rgba(255, 106, 0, 0.08); } }
.spot-card { pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .spot-ring { animation: none; } }
.tour-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; border-left: 4px solid var(--orange); }
.tour-cta > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.tour-cta small { color: var(--muted); font-size: 13.5px; }

/* ---------- guide downloads ---------- */
.guide-files { padding: 22px; margin-top: 14px; }
.guide-files h2 { font-size: 19px; margin: 0 0 4px; }
.guide-files > p { margin: 0 0 14px; font-size: 14px; }
.gf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gf-item { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #fff; }
.gf-item .btn { align-self: flex-start; }
.gf-thumb { display: grid; place-items: center; border-radius: 10px; background: #f3efea; color: var(--muted); aspect-ratio: 16 / 9; overflow: hidden;
  /* checkerboard so transparent PNG lower thirds are visible */
  background-image: linear-gradient(45deg, #e8e2da 25%, transparent 25%), linear-gradient(-45deg, #e8e2da 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e8e2da 75%), linear-gradient(-45deg, transparent 75%, #e8e2da 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.gf-thumb:not(.img) { background-image: none; }
.gf-thumb.img { cursor: zoom-in; }
.gf-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gf-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gf-meta b { font-size: 15px; overflow-wrap: anywhere; }
.gf-meta small { color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.gf-type { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 760px) { .guide-files { padding: 18px 16px; } .gf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .gf-grid { grid-template-columns: 1fr; } }
