:root {
  --bg: #0d0d10;
  --bg-2: #15151a;
  --panel: #1a1a21;
  --line: #2a2a33;
  --text: #f1eee9;
  --muted: #9a97a3;
  --accent: #ff5a5f;
  --accent-2: #ffb347;
  --ok: #3ccf91;
  --warn: #ffb347;
  --danger: #ff5a5f;
  --radius: 14px;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 30px; }
h2 { font-size: 19px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1400px; }
main.wrap { padding-top: 24px; padding-bottom: 64px; min-height: 70vh; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hidden { display: none !important; }
.mt { margin-top: 22px; }
.inline { display: inline; margin: 0; }
.spacer { flex: 1; }
.error-text { color: var(--danger); }

.testbar { background: repeating-linear-gradient(45deg, #2b2210, #2b2210 12px, #33280f 12px, #33280f 24px); color: var(--accent-2); text-align: center; font-size: 12px; font-weight: 600; padding: 5px 16px; letter-spacing: .02em; }

/* header */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(13,13,16,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 62px; }
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.logo-mark { font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: .04em; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #111; padding: 4px 7px; border-radius: 7px; }
.logo-word { font-family: var(--head); font-weight: 700; font-size: 20px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav a.btn { color: #111; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font: 600 15px var(--body); cursor: pointer; text-decoration: none; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-wide { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(255,90,95,.45); }
.nav .btn { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--text); }
.linkbtn.danger { color: var(--danger); }
.linklike { color: var(--accent); cursor: pointer; text-decoration: underline; }

/* flash */
.flash { border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; background: var(--panel); border: 1px solid var(--line); }
.flash.success { border-color: rgba(60,207,145,.5); background: rgba(60,207,145,.08); }
.flash.error { border-color: rgba(255,90,95,.5); background: rgba(255,90,95,.08); }
.flash.warn { border-color: rgba(255,179,71,.5); background: rgba(255,179,71,.08); }

/* hero + tabs */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); }
.hero .accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 560px; font-size: 16px; margin: 0; }
.tabs { display: flex; gap: 6px; margin: 26px 0 18px; overflow-x: auto; padding-bottom: 2px; }
.tab { white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 500; }
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 18px; }
.card { text-decoration: none; display: block; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.thumb.vertical img { object-fit: contain; }
.card:hover .thumb img { transform: scale(1.03); }
.badge { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.78); font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 5px; }
.card-body { padding: 10px 2px 0; }
.card-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-artist { color: var(--muted); font-size: 14px; margin-top: 2px; }
.card-stats { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.card-stats span, .vstats span, .pill { display: inline-flex; align-items: center; gap: 4px; }
.card-stats .supporters { color: var(--accent); font-weight: 600; }
.card-stats .supporters.none, .watch-stats .supporters.none, .watch-stats .supporters.none b { color: var(--muted); font-weight: 500; }
.card-stats span + span::before { content: '·'; margin-right: 8px; color: #55525c; }
.watch-stats { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 15px; margin: -2px 0 14px; }
.watch-stats b { color: var(--text); font-weight: 700; font-size: 17px; }
.watch-stats .supporters { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.watch-stats .supporters b { color: var(--accent); }
.donate-sub { color: var(--muted); font-size: 14px; margin-top: -6px; }

.empty { text-align: center; padding: 60px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty h2, .empty h3 { color: var(--text); }
.empty.small { padding: 26px 16px; }

/* watch */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; }
.player.vertical { aspect-ratio: 16/9; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.watch-title { font-size: 24px; margin: 16px 0 10px; }
.watch-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.artist-chip { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #111; display: inline-grid; place-items: center; font-family: var(--head); font-weight: 700; }
.avatar.big { width: 76px; height: 76px; font-size: 32px; flex: none; }
.pill { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 7px 13px; font: 600 14px var(--body); cursor: pointer; }
.pill.static { cursor: default; color: var(--muted); }
.pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill:disabled { opacity: .6; cursor: not-allowed; }
.desc { background: var(--panel); border-radius: 12px; padding: 14px 16px; margin-top: 16px; color: #d9d5ce; }
.report { margin-top: 16px; color: var(--muted); font-size: 13px; }
.report summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.report form { display: grid; gap: 8px; margin-top: 10px; max-width: 460px; }

.donate { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; position: sticky; top: 80px; }
.donate.disabled { position: static; }
.donate-head { font-family: var(--head); font-weight: 700; font-size: 19px; }
.amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.amt input { position: absolute; opacity: 0; pointer-events: none; }
.amt span { display: block; text-align: center; padding: 10px 0; border-radius: 9px; border: 1px solid var(--line); font-weight: 600; cursor: pointer; font-size: 14px; }
.amt input:checked + span { border-color: var(--accent); background: rgba(255,90,95,.12); color: #fff; }
.amt input:focus-visible + span { outline: 2px solid var(--accent); }
.other-amount { display: none; align-items: center; gap: 6px; }
.donate.show-other .other-amount { display: flex; }
.fine { font-size: 12px; color: var(--muted); margin: 0; }
.side-head { margin: 26px 0 12px; font-size: 16px; }
.side-list { display: grid; gap: 16px; }

/* forms */
input, textarea, select { width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font: 15px var(--body); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
label.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; color: #d9d5ce; }
label.check input { width: auto; margin-top: 3px; accent-color: var(--accent); }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.auth { max-width: 430px; margin: 30px auto; }

/* studio */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-bottom: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.studio .panel { margin-bottom: 0; }
.drop { border: 2px dashed #3a3a46; border-radius: 12px; padding: 30px 16px; text-align: center; display: grid; gap: 8px; justify-items: center; color: var(--muted); transition: border-color .15s, background .15s; cursor: pointer; }
.drop strong { color: var(--text); }
.drop.over { border-color: var(--accent); background: rgba(255,90,95,.06); }
.drop.has-file { border-style: solid; border-color: var(--ok); }
.filename { color: var(--ok); font-weight: 600; word-break: break-all; }
.progress { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.earn { font-family: var(--head); font-size: 34px; font-weight: 700; }
.vrow { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.vrow:first-child { border-top: 0; }
.vthumb img, .vthumb-empty { width: 128px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #000; }
.vtitle { font-weight: 600; text-decoration: none; }
.vstats { display: flex; gap: 10px; color: var(--muted); }
.status { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); }
.s-live { color: var(--ok); border-color: rgba(60,207,145,.5); }
.s-processing, .s-pending_review { color: var(--warn); border-color: rgba(255,179,71,.5); }
.s-failed, .s-rejected, .s-removed, .s-hidden { color: var(--danger); border-color: rgba(255,90,95,.5); }

/* artist */
.artist-head { display: flex; gap: 20px; align-items: center; margin: 10px 0 30px; }
.bio { max-width: 640px; color: #d9d5ce; margin: 10px 0 0; }

/* prose */
.prose { max-width: 720px; }
.prose h2 { margin-top: 30px; }
.prose .lead { font-size: 18px; color: #d9d5ce; }
.prose li { margin: 4px 0; }

/* admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpis div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.kpis b { display: block; font-family: var(--head); font-size: 22px; }
.kpis span { color: var(--muted); font-size: 13px; }
.mod-item { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.mod-item:first-of-type { border-top: 0; }
video.mini { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 10px; }
.mod-info ul { padding-left: 18px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr.excluded td { opacity: .6; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 22px 0; }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .watch, .studio { grid-template-columns: 1fr; }
  .donate { position: static; }
  .mod-item { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav { gap: 12px; font-size: 13px; }
  .nav a[href="/how-it-works"] { display: none; }
  .vrow { grid-template-columns: 96px minmax(0, 1fr); }
  .vthumb img, .vthumb-empty { width: 96px; }
  .vrow .vstats, .vrow .status, .vrow form { grid-column: 2; }
  .grid { grid-template-columns: 1fr; }
  .amounts { grid-template-columns: repeat(3, 1fr); }
}

/* password show/hide eye */
.pwwrap { position: relative; display: block; }
.pwwrap input { padding-right: 46px; }
.pweye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 8px; display: grid; place-items: center; }
.pweye:hover, .pweye[aria-pressed="true"] { color: var(--text); }
.pweye:focus-visible { outline: 2px solid var(--accent); }

/* password reset */
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.forgot-link { text-align: right; margin-top: -6px; font-size: 14px; }
.forgot-link a { color: var(--accent); }
.code-input { font-size: 24px; letter-spacing: .3em; text-align: center; font-family: var(--head); }
.warn-text { color: var(--warn); }
.row.tight { margin-top: 0; }
code { background: var(--bg-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.owner-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; padding-left: 10px; border-left: 2px solid var(--accent); }

/* edit a video's title/description */
.vactions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.vactions form { margin: 0; }
.vedit { grid-column: 1 / -1; display: grid; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
@media (max-width: 640px) { .vactions { grid-column: 2; flex-direction: row; align-items: center; gap: 14px; } }
.vrow .vedit { grid-column: 1 / -1; }

/* legal pages */
.legal h2 { font-size: 18px; margin-top: 28px; }
.legal h3 { font-size: 15px; margin: 18px 0 6px; color: var(--text); }
.legal p, .legal li { color: #d9d5ce; }
.legal a { color: var(--accent); }

/* Contact & support */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 8px 0 24px; }
.help { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.help h3 { margin: 0 0 6px; font-size: 1rem; }
.help p { margin: 0; }

/* Contact an artist (message relay) */
.contact-box { margin-top: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.contact-box summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; list-style: none; }
.contact-box summary::-webkit-details-marker { display: none; }
.contact-box[open] summary { margin-bottom: 12px; }
.contact-label { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255,120,80,.15); color: var(--accent, #ff7a50); }
.contact-box .fine { margin: 0; }
.artist-contact { max-width: 520px; margin: -8px 0 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { border-bottom: 1px solid var(--line); padding: 14px 0; }
.msg:last-child { border-bottom: 0; }
.msg.unread { box-shadow: inset 3px 0 0 var(--accent, #ff7a50); padding-left: 12px; }
.msg-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.msg-body { margin: 8px 0 10px; white-space: normal; line-height: 1.5; }
.msg-actions { flex-wrap: wrap; }
.privacy-note { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); line-height: 1.5; }

/* Share box */
.share-box { margin: 14px 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.share-box summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; list-style: none; }
.share-box summary::-webkit-details-marker { display: none; }
.share-box[open] summary { margin-bottom: 12px; }
.share-native { margin-bottom: 10px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.share-link { display: block; text-align: center; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer; }
.share-link:hover { border-color: var(--accent); color: var(--accent); }
.share-box .fine { margin: 10px 0 0; }
.artist-contact .share-box { margin-top: 0; }

/* Backups panel */
.backup-status { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 10px; }
.backup-status.good { border-color: rgba(60,200,120,.5); }
.backup-status.warn, .backup-status.bad { border-color: rgba(255,180,70,.6); }
.backup-checks { margin: 0 0 12px; padding-left: 18px; line-height: 1.6; }
.launch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.launch-opt { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.partner-link { font-size: .85rem; }
