/* InnerCredits: public pages, sign-in and member console */

:root {
    --ink: #0b1026;
    --ink-2: #1b2240;
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #f1f3f9;
    --line: #e4e7f0;
    --text: #0b1026;
    --muted: #5b6478;
    --faint: #8a92a6;
    --amber: #ff9800;
    --amber-2: #ffc21a;
    --amber-soft: #fff4dc;
    --grad: linear-gradient(135deg, #ffcc1a 0%, #ff9a00 100%);
    --ok: #15803d;
    --ok-soft: #dcfce7;
    --warn: #a16207;
    --warn-soft: #fef3c7;
    --bad: #b91c1c;
    --bad-soft: #fee2e2;
    --shadow: 0 1px 2px rgba(11, 16, 38, .05), 0 12px 32px -14px rgba(11, 16, 38, .18);
    --radius: 18px;
    --head: 'Sora', 'Inter', system-ui, sans-serif;
    --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #090c1a;
    --surface: #10152b;
    --surface-2: #161c36;
    --line: rgba(255, 255, 255, .09);
    --text: #eef0f7;
    --muted: #a6adc4;
    --faint: #7c84a0;
    --amber-soft: rgba(255, 152, 0, .14);
    --ok-soft: rgba(21, 128, 61, .18);
    --warn-soft: rgba(161, 98, 7, .2);
    --bad-soft: rgba(185, 28, 28, .2);
    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--head); letter-spacing: -.02em; line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden], svg[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons & fields ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
    font: 600 15px/1 var(--head); text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--grad); color: #1b1203; box-shadow: 0 8px 22px -10px rgba(255, 152, 0, .8); }
.btn--quiet { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn--quiet:hover { border-color: var(--amber); }
.btn--danger { background: var(--bad); color: #fff; }
.btn--small { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn--block { width: 100%; }
.link { color: var(--amber); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 152, 0, .15); }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }
.field__hint { font-size: 13px; color: var(--faint); }
.field__error { font-size: 13px; color: var(--bad); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 18px; }
.check input { width: 18px; height: 18px; accent-color: var(--amber); }
.trap { position: absolute; left: -9999px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; margin-bottom: 20px; font-size: 15px; }
.notice--success { background: var(--ok-soft); color: var(--ok); }
.notice--warning { background: var(--warn-soft); color: var(--warn); }
.notice--error { background: var(--bad-soft); color: var(--bad); }
.notice__close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; font-size: 18px; line-height: 1; }

/* ---------- Public header / footer ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top__bar { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.top__nav { display: flex; gap: 6px; margin-left: auto; }
.top__nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 15px; text-decoration: none; }
.top__nav a:hover, .top__nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.top__actions { display: flex; align-items: center; gap: 10px; }
.top__menu-btn { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.top__drawer { display: none; }
@media (max-width: 820px) {
    .top__nav, .top__actions { display: none; }
    .top__menu-btn { display: inline-grid; place-items: center; }
    .top__drawer[data-open] { display: grid; gap: 4px; padding: 10px 20px 18px; border-top: 1px solid var(--line); }
    .top__drawer a { padding: 12px; border-radius: 10px; text-decoration: none; font-weight: 500; }
    .top__drawer a:hover { background: var(--surface-2); }
}

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site > main { flex: 1 0 auto; }
.foot { background: var(--ink); color: #c9cee0; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 40px; padding: 64px 20px 40px; }
.foot__brand img { height: 34px; width: auto; }
.foot__brand p { margin-top: 16px; max-width: 320px; font-size: 15px; color: #9aa2bd; }
.foot h4 { font: 600 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: #7f88a6; margin-bottom: 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { color: #c9cee0; text-decoration: none; font-size: 15px; }
.foot a:hover { color: #fff; }
.foot__base { border-top: 1px solid rgba(255, 255, 255, .08); padding: 22px 20px; font-size: 14px; color: #7f88a6; }
@media (max-width: 720px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: 1 / -1; } }

/* ---------- Auth pages ---------- */
.auth { min-height: calc(100vh - 71px - 280px); display: grid; place-items: center; padding: 56px 20px; background:
    radial-gradient(700px 400px at 85% 0%, rgba(255, 176, 0, .16), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(89, 108, 255, .1), transparent 60%), var(--bg); }
.auth__card { width: 100%; max-width: 440px; padding: 36px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth__card h1 { font-size: 26px; }
.auth__card > p { margin: 8px 0 26px; color: var(--muted); }
.auth__alt { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.auth__row .check { margin: 0; }
.auth__code { letter-spacing: .5em; text-align: center; font: 600 24px/1 var(--head); }

/* ---------- Info & support pages ---------- */
.hero-band { padding: 72px 0 40px; background: radial-gradient(800px 360px at 80% -20%, rgba(255, 176, 0, .18), transparent 60%); }
.hero-band__eyebrow { display: inline-block; font: 600 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.hero-band__meta { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.hero-band h1 { font-size: clamp(32px, 4.4vw, 48px); }
.hero-band p { margin-top: 12px; color: var(--muted); max-width: 640px; font-size: 18px; }
.doc { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; padding-bottom: 96px; }
.doc__toc { position: sticky; top: 96px; display: grid; gap: 4px; }
.doc__toc a { padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; }
.doc__toc a[aria-current="page"] { background: var(--amber-soft); color: var(--text); }
.prose { max-width: 760px; font-size: 17px; line-height: 1.75; }
.prose h2 { font-size: 24px; margin: 40px 0 12px; }
.prose h3 { font-size: 19px; margin: 28px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose a { color: var(--amber); }
.prose .faq-list { list-style: none; padding: 0; }
.prose .faq-question { position: relative; margin: 0 0 10px; padding: 14px 44px 14px 18px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; cursor: pointer; }
.prose .faq-question::after { content: '+'; position: absolute; right: 18px; color: var(--amber); }
.prose .faq-question.active { margin-bottom: 0; border-radius: 10px 10px 0 0; background: var(--amber-soft); }
.prose .faq-question.active::after { content: '\2212'; }
.prose .faq-answer { display: none; margin: 0 0 10px; padding: 14px 18px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; }
.prose .faq-answer.show { display: block; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; } .doc__toc { position: static; display: flex; flex-wrap: wrap; } }
.support { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; padding-bottom: 96px; }
.support__aside { display: grid; gap: 14px; }
.tip { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.tip h3 { font-size: 16px; margin-bottom: 6px; }
.tip p { color: var(--muted); font-size: 15px; }
.panel { padding: 30px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (max-width: 860px) { .support { grid-template-columns: 1fr; } }

/* ---------- Member console ---------- */
.console { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; padding: 22px 16px; background: var(--surface); border-right: 1px solid var(--line); }
.rail__brand { padding: 4px 8px 18px; }
.rail__brand img { height: 30px; width: auto; }
.rail__me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); margin-bottom: 10px; }
.avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--head); color: #1b1203; background: var(--grad); }
img.avatar { object-fit: cover; background: var(--surface-2); }
.rail__who { min-width: 0; }
.rail__who strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__who span { display: block; font-size: 13px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__nav { display: grid; gap: 2px; }
.rail__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; border: 0; background: none; color: var(--muted); font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer; text-align: left; }
.rail__item svg { width: 20px; height: 20px; flex: none; }
.rail__item:hover { background: var(--surface-2); color: var(--text); }
.rail__item[aria-current="page"] { background: var(--amber-soft); color: var(--text); }
.rail__item[aria-current="page"] svg { color: var(--amber); }
.rail__sep { height: 1px; margin: 10px 8px; background: var(--line); }

.stage { min-width: 0; }
.stage__top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.stage__toggle { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.stage__title { font: 600 18px/1 var(--head); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; margin-left: auto; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 600 14px/1 var(--head); text-decoration: none; }
.chip svg { width: 16px; height: 16px; color: var(--amber); }
.stage__body { padding: 32px 28px 72px; max-width: 1080px; }
.stage__intro { margin-bottom: 26px; }
.stage__intro h1 { font-size: 28px; }
.stage__intro p { margin-top: 6px; color: var(--muted); }

@media (max-width: 960px) {
    .console { grid-template-columns: 1fr; }
    .rail { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow); }
    .console[data-rail-open] .rail { transform: none; }
    .console[data-rail-open]::after { content: ''; position: fixed; inset: 0; z-index: 50; background: rgba(9, 12, 26, .45); }
    .stage__toggle { display: inline-grid; place-items: center; }
    .stage__top { padding: 0 16px; }
    .stage__body { padding: 24px 16px 64px; }
}

/* Balance banner */
.balance { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 28px; border-radius: 22px; color: #1b1203; background: var(--grad); box-shadow: 0 18px 40px -22px rgba(255, 140, 0, .9); margin-bottom: 18px; }
.balance::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.balance__amount { display: flex; align-items: center; gap: 12px; font: 700 34px/1.1 var(--head); letter-spacing: -.02em; }
.balance__amount svg { width: 30px; height: 30px; }
.balance__label { margin-top: 6px; font-size: 15px; opacity: .8; }
.balance__tabs { position: relative; z-index: 1; display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .35); }
.balance__tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px; font: 600 14px/1 var(--head); text-decoration: none; color: inherit; }
.balance__tab[aria-current="page"] { background: #fff; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .3); }
.balance__tab svg { width: 18px; height: 18px; }
.buy-frame { padding: 8px 0 0; border-radius: 22px; background: #fff; color: #48494a; }
:root[data-theme="dark"] .buy-frame { padding: 8px 12px 0; background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }

/* Activity */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat span { font-size: 13px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { display: block; margin-top: 8px; font: 700 26px/1 var(--head); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 170px; }
.filters .field label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.feed { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.feed__row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); }
.feed__row:first-child { border-top: 0; }
.feed__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.feed__icon svg { width: 22px; height: 22px; }
.feed__icon--out { background: var(--surface-2); color: var(--muted); }
.feed__title { font-weight: 600; }
.feed__meta { font-size: 13px; color: var(--faint); }
.feed__money { text-align: right; }
.feed__money strong { display: block; font: 600 16px/1.3 var(--head); }
.pill { display: inline-block; margin-top: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill--wait { background: var(--warn-soft); color: var(--warn); }
.pill--bad { background: var(--bad-soft); color: var(--bad); }
.pill--back { background: var(--surface-2); color: var(--muted); }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: var(--amber); margin-bottom: 12px; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 14px; }
.pager [aria-current="page"] { background: var(--grad); border-color: transparent; color: #1b1203; }
.pager .is-off { opacity: .45; }
@media (max-width: 720px) { .stats { grid-template-columns: 1fr; } .feed__row { grid-template-columns: 40px 1fr; } .feed__money { grid-column: 2; text-align: left; } }

/* Account */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card-box { padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.card-box h2 { font-size: 19px; margin-bottom: 4px; }
.card-box > p { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.card-box--wide { grid-column: 1 / -1; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { flex: 1; }
.people { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.people time { margin-left: auto; font-size: 13px; color: var(--faint); }
/* Profile picture */
.picture { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.avatar--large { width: 72px; height: 72px; font-size: 26px; }
.picture__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.picture__pick { position: relative; }
.picture__pick:focus-within { outline: 2px solid var(--amber); outline-offset: 2px; }
.picture__error { margin: -8px 0 16px; }
/* Account deletion */
.danger { padding: 0; }
.danger__head { display: flex; align-items: center; gap: 16px; padding: 22px 26px; cursor: pointer; list-style: none; }
.danger__head::-webkit-details-marker { display: none; }
.danger__head > span { display: grid; gap: 2px; }
.danger__head strong { color: var(--bad); font-family: var(--head); }
.danger__head > span > span { color: var(--muted); font-size: 14px; }
.danger__caret { width: 20px; height: 20px; margin-left: auto; flex: none; color: var(--muted); transition: transform .15s; }
.danger[open] .danger__caret { transform: rotate(180deg); }
.danger__body { padding: 0 26px 26px; max-width: 560px; }
.danger__note { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.danger__note strong { color: var(--text); display: block; }
.danger__status { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); margin-bottom: 16px; }
.danger__status > div { display: grid; gap: 2px; flex: 1; min-width: 200px; font-size: 14px; color: var(--muted); }
.danger__status strong { color: var(--text); font-size: 15px; }
.danger__status ul, .danger__status p { flex-basis: 100%; margin: 0; font-size: 14px; }
.danger__status ul { padding-left: 20px; color: var(--bad); }
.danger__status--approved { background: var(--ok-soft); }
.danger__status--blocked { background: var(--bad-soft); }
.danger .badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.danger .check { align-items: flex-start; }
.danger .check input { flex: none; margin-top: 2px; }
.danger__error { margin: -12px 0 16px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* PayPal dialog */
.paydlg { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
.paydlg::backdrop { background: rgba(9, 12, 26, .55); }
/* While PayPal's own checkout is open the dialog leaves the top layer (buy.js setModal) so PayPal's overlay can cover it */
.paydlg--inline { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100vh - 32px); overflow: auto; z-index: 1000; box-shadow: 0 0 0 100vmax rgba(9, 12, 26, .55), 0 30px 80px -20px rgba(0, 0, 0, .5); }
.paydlg__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.paydlg__title { font-size: 18px; }
.paydlg__close { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--surface-2); font-size: 20px; cursor: pointer; }
.paydlg__summary { padding: 22px 22px 6px; text-align: center; }
.paydlg__credits { font: 700 26px/1.2 var(--head); color: var(--amber); }
.paydlg__price { font: 600 18px/1.4 var(--head); margin: 4px 0; }
.paydlg__summary small { color: var(--faint); }
.paydlg__status { margin: 12px 22px 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.paydlg__status[data-tone="info"] { background: var(--surface-2); }
.paydlg__status[data-tone="success"] { background: var(--ok-soft); color: var(--ok); }
.paydlg__status[data-tone="warning"] { background: var(--warn-soft); color: var(--warn); }
.paydlg__status[data-tone="danger"] { background: var(--bad-soft); color: var(--bad); }
.paydlg__buttons { min-height: 150px; padding: 16px 22px 4px; }
.paydlg__buttons[hidden] { display: none; }
.paydlg__note { display: block; padding: 0 22px 20px; text-align: center; color: var(--faint); font-size: 13px; }

/* Language menu */
.lang { position: relative; }
.lang__toggle { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; user-select: none; }
.lang__toggle::-webkit-details-marker { display: none; }
.lang__toggle svg { width: 18px; height: 18px; flex: none; }
.lang__list { list-style: none; margin: 0; padding: 6px; min-width: 170px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 70; }
.lang__list a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; }
.lang__list a:hover { background: var(--surface-2); }
.lang__list a[aria-current] { background: var(--amber-soft); }
.lang--header .lang__toggle { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: 600 13px/1 var(--head); color: var(--muted); }
.lang--header .lang__list, .lang--footer .lang__list { position: absolute; right: 0; top: calc(100% + 8px); }
.lang--footer { display: inline-block; float: right; }
.lang--footer .lang__toggle { color: #c9cee0; font-size: 14px; }
.lang--footer .lang__list { top: auto; bottom: calc(100% + 8px); }
.lang--drawer .lang__toggle, .lang--rail .lang__toggle { width: 100%; padding: 11px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: 15px; }
.lang--rail .lang__toggle svg { width: 20px; height: 20px; }
.lang--drawer .lang__toggle:hover, .lang--rail .lang__toggle:hover { background: var(--surface-2); color: var(--text); }
.lang__current { margin-left: auto; font-size: 13px; color: var(--faint); }
.lang--drawer .lang__list, .lang--rail .lang__list { margin: 4px 0 6px 32px; box-shadow: none; }

/* Voiceover studio */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; margin-bottom: 18px; }
.studio__col { min-width: 0; display: grid; gap: 18px; align-content: start; }
.studio__main, .studio__side, .studio__card { min-width: 0; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.studio__side { position: sticky; top: 88px; }
.studio__side .field { margin-bottom: 18px; }
.studio__side select { max-width: 100%; text-overflow: ellipsis; }
.studio__label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.studio__text { display: block; width: 100%; min-height: 340px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font-size: 17px; line-height: 1.7; resize: vertical; transition: border-color .15s, box-shadow .15s; }
.studio__text:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(255, 152, 0, .15); background: var(--surface); }
.studio__meter { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.studio__bar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.studio__bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s ease; }
.studio[data-over] .studio__bar i { background: var(--bad); }
.studio[data-over] [data-count] { color: var(--bad); }
.studio__speed { float: right; font: 600 14px/1.4 var(--head); color: var(--amber); }
.studio__side input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--amber); box-shadow: none; }
.studio__cost { display: grid; gap: 8px; margin: 4px 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.studio__cost div { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.studio__cost dt { color: var(--muted); }
.studio__cost dd { margin: 0; display: inline-flex; align-items: center; gap: 6px; font: 600 15px/1 var(--head); }
.studio__cost svg { width: 15px; height: 15px; color: var(--amber); }
.studio__hint { margin-top: 10px; font-size: 13px; color: var(--faint); text-align: center; }
.studio__hint[data-problem] { color: var(--bad); }
.studio [data-topup] { margin-top: 10px; }
.studio[aria-busy="true"] .studio__text { opacity: .7; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.takes, .recent { margin-top: 26px; }
.takes__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.takes__head h2 { font-size: 20px; }
.takes__head p { font-size: 14px; color: var(--muted); }
.takes__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.take { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.take:first-child { border-color: var(--amber); }
.take__info { min-width: 0; display: grid; gap: 2px; }
.take__info strong { font-family: var(--head); }
.take__info span { font-size: 13px; color: var(--faint); }
.take__info q { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.take audio { width: 100%; height: 40px; }
@media (max-width: 1100px) { .take { grid-template-columns: 1fr; } .take .btn { justify-self: start; } }
@media (max-width: 900px) { .studio { grid-template-columns: minmax(0, 1fr); } .studio__side { position: static; } .studio__text { min-height: 240px; } }
.stats--four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .stats--four { grid-template-columns: 1fr 1fr; } }
.feed__money .is-void { text-decoration: line-through; color: var(--faint); }

/* Studio: toolbar, help, cast, blender, captions */
.studio__toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.studio__toolbar .studio__label { margin: 0; }
.studio__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 500 13px/1 var(--body); cursor: pointer; }
.tool:hover { color: var(--text); border-color: var(--amber); }
.tool svg { width: 16px; height: 16px; }
.studio__help { margin-top: 14px; font-size: 14px; color: var(--muted); }
.studio__help summary { cursor: pointer; font-weight: 600; color: var(--text); }
.studio__help dl { display: grid; gap: 10px; margin: 12px 0; }
.studio__help dl div { display: grid; grid-template-columns: 190px 1fr; gap: 12px; }
.studio__help dt code, .studio__help code { font: 500 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--amber); }
.studio__help dd { margin: 0; }
@media (max-width: 640px) { .studio__help dl div { grid-template-columns: 1fr; gap: 2px; } }
.studio__card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.studio__card-head h2 { font-size: 18px; }
.studio__card-head p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.studio__empty { font-size: 14px; color: var(--faint); }
.studio__hint--left { text-align: left; margin-top: 0; }
.cast { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cast__row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 1.5fr) minmax(0, 1.2fr) 86px auto 32px; gap: 8px; align-items: center; }
.cast__row input, .cast__row select, .blender select, .blender input[type="text"] { width: 100%; height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.cast__pace { display: flex; align-items: center; gap: 4px; color: var(--faint); font-size: 13px; }
.cast__remove, .blends__remove { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--surface-2); color: var(--muted); font-size: 18px; cursor: pointer; }
.cast__remove:hover, .blends__remove:hover { color: var(--bad); }
@media (max-width: 1180px) { .cast__row { grid-template-columns: minmax(0, 1fr) 86px auto 32px; } .cast__row [data-cast-voice] { grid-column: 1; grid-row: 2; } .cast__row [data-cast-lang] { grid-column: 2 / -1; grid-row: 2; } }
@media (max-width: 720px) { .cast__row { grid-template-columns: 1fr 1fr; } .cast__row select { grid-column: 1 / -1 !important; grid-row: auto !important; } }
.blender__pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.blender__pick .field { margin: 0; }
.blender__range { width: 100%; margin: 16px 0 6px; accent-color: var(--amber); }
.blender__read { display: flex; justify-content: space-between; font: 600 14px/1.4 var(--head); }
.blender__save { display: flex; align-items: flex-end; gap: 10px; margin: 14px 0 8px; }
.blender__save .field { flex: 1; margin: 0; }
.blender__save .btn { height: 40px; }
.blends { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.blends li { display: grid; grid-template-columns: auto 1fr 32px; gap: 10px; align-items: center; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.blends li span { color: var(--muted); }
.studio__captions { align-items: flex-start; margin: 0 0 18px; }
.studio__captions input { margin-top: 2px; }
.studio__captions span { font-weight: 600; }
.studio__captions small { display: block; font-weight: 400; color: var(--faint); font-size: 13px; }
.take__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.take__words { grid-column: 1 / -1; max-height: 180px; overflow: auto; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 15px; line-height: 1.8; }
.take__words span { cursor: pointer; border-radius: 4px; transition: background-color .1s; }
.take__words span.is-now { background: var(--amber-soft); color: var(--text); box-shadow: 0 0 0 2px var(--amber-soft); }
.take__who { display: block; margin-top: 6px; font: 600 12px/1.6 var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--amber); }
.take__who:first-child { margin-top: 0; }
.take__note { grid-column: 1 / -1; font-size: 13px; color: var(--faint); }
@media (max-width: 1100px) { .take__actions { justify-content: flex-start; } }

/* Activity table: Type | Inners | USD */
.ledger { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.ledger__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, .9fr); gap: 16px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.ledger__row:first-child { border-top: 0; }
.ledger__row--head { padding-top: 12px; padding-bottom: 12px; background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ledger__type { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ledger__type strong { font-weight: 600; }
.ledger__date { font-size: 14px; color: var(--muted); white-space: nowrap; }
.ledger__icon { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.ledger__icon svg { width: 19px; height: 19px; }
.ledger__icon--spent { background: var(--surface-2); color: var(--muted); }
.ledger__inners, .ledger__usd { text-align: right; white-space: nowrap; }
.ledger__amount { display: inline-flex; align-items: center; gap: 6px; font: 600 16px/1.3 var(--head); }
.ledger__amount svg { width: 18px; height: 18px; color: var(--amber); }
.ledger__amount.is-void { text-decoration: line-through; color: var(--faint); }
.ledger__usd { font: 600 15px/1.3 var(--head); }
.ledger__none { color: var(--faint); font-weight: 500; }
.ledger__row--head .ledger__usd, .ledger__row--head .ledger__date { font: inherit; color: inherit; }
.ledger__status { text-align: right; }
.ledger__status .pill { margin-top: 0; }
/* Phones: Type + USD on top, date below, then Inners and status */
@media (max-width: 720px) {
    .ledger__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "type usd" "date date" "inners status"; gap: 6px 12px; padding: 14px 16px; }
    .ledger__type { grid-area: type; }
    .ledger__usd { grid-area: usd; }
    .ledger__date { grid-area: date; padding-left: 48px; font-size: 13px; color: var(--faint); }
    .ledger__inners { grid-area: inners; padding-left: 48px; text-align: left; }
    .ledger__status { grid-area: status; }
    .ledger__row--head { grid-template-areas: "type usd"; }
    .ledger__row--head .ledger__date, .ledger__row--head .ledger__inners, .ledger__row--head .ledger__status { display: none; }
}
