:root {
  --bg: #0f0d12; --panel: #1a1720; --panel2: #231f2b; --line: #332d3d;
  --text: #f1edf5; --muted: #a59cb2; --accent: #e8457a; --accent2: #ff7aa2;
  --ok: #3ccf91; --warn: #f5b84a; --err: #ff6b6b; --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent2); }
h1 { font-size: 1.8rem; margin: .4em 0; } h2 { font-size: 1.25rem; margin: .6em 0 .4em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; width: 100%; }
main.wrap { padding-top: 16px; padding-bottom: 32px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.topbar nav { display: flex; gap: 14px; align-items: center; }
.topbar a { color: var(--text); text-decoration: none; }
.brand { font-weight: 700; font-size: 1.15rem; }
.studio-nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 16px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.studio-nav a { color: var(--text); text-decoration: none; padding: 4px 10px; border-radius: 999px; background: var(--panel); font-size: .9rem; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-align: center; padding: 16px; }
.footer a { color: var(--muted); }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent2); }
.btn.small { padding: 5px 12px; font-size: .9rem; }
.btn.danger { background: #b3264a; }
.btn:disabled { opacity: .5; cursor: wait; }
button.link { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 0; }
form.inline { display: inline; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; }
.card.warn { border-color: var(--warn); }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.error { color: var(--err); }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--panel2); color: var(--muted); }
.pill.ok { color: var(--ok); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > label { flex: 1; min-width: 140px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .95rem; }
label.check { flex-direction: row; align-items: flex-start; gap: 8px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; }
input[type=checkbox], input[type=radio] { width: auto; margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
progress { width: 100%; height: 14px; accent-color: var(--accent); }
table { width: 100%; border-collapse: collapse; margin: 12px 0; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
tr.blocked td { opacity: .55; }
.thumbcell img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; }
.hero { margin-bottom: 8px; }
.banner { width: 100%; height: 260px; object-fit: cover; display: block; }
.banner.blank { background: linear-gradient(120deg, #3a1530, #1a1720); }
.hero-row { display: flex; align-items: flex-end; gap: 16px; margin-top: -56px; flex-wrap: wrap; }
.avatar { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--bg); object-fit: cover; background: var(--panel2); }
.avatar.small { width: 56px; height: 56px; border-width: 0; }
.banner-preview { width: 100%; max-height: 120px; object-fit: cover; border-radius: 8px; }
.hero-text { flex: 1; min-width: 200px; } .hero-text h1 { margin-bottom: 0; }
.tagline { color: var(--muted); margin: 0; }
.bio, .desc { white-space: pre-line; }
.preline { white-space: pre-line; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--panel); color: var(--text); text-decoration: none; border: 1px solid var(--line); }
.tile img, .tile .noimg { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--panel2); }
.tile-title { display: block; padding: 8px 10px; font-weight: 600; }
.badge { position: absolute; top: 8px; left: 8px; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: rgba(0,0,0,.7); }
.badge.locked { color: var(--warn); } .badge.open { color: var(--ok); }
.dur { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 6px; font-size: .8rem; background: rgba(0,0,0,.7); }
.watch { display: grid; gap: 16px; }
.player { width: 100%; max-height: 72vh; background: #000; border-radius: var(--radius); display: block; aspect-ratio: 16/9; }
.player.noimg { background: var(--panel2); }
.locked-player { position: relative; }
.preview-tag { position: absolute; top: 10px; left: 10px; background: var(--accent); padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.unlock { max-width: 520px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; color: var(--muted); min-width: 150px; }
.stat span { display: block; color: var(--text); font-size: 1.6rem; font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
details.danger { margin-top: 24px; border: 1px solid #b3264a; border-radius: var(--radius); padding: 12px 16px; }
details.danger summary { cursor: pointer; color: var(--err); }
.prose { max-width: 760px; margin-left: auto; margin-right: auto; }
.draft { color: var(--warn); font-weight: 600; }
.todo { color: var(--warn); font-style: italic; }
address { font-style: normal; margin: 12px 0; }
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  .banner { height: 160px; }
  .hero-row { margin-top: -40px; }
  .avatar { width: 88px; height: 88px; }
  table { display: block; overflow-x: auto; }
  .topbar nav { gap: 10px; font-size: .95rem; }
}
