:root {
  --bg: #0b0b0f;
  --panel: #15151c;
  --panel-2: #1e1e27;
  --line: #2a2a36;
  --text: #f4f4f6;
  --muted: #9a9aa8;
  --accent: #ff5a36;
  --accent-ink: #fff;
  --accent-2: #6e8bff;
  --danger: #ff4757;
  --ok: #2ed47a;
  --radius: 14px;
  --nav-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: var(--text); }
img { display: block; }
svg.i { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell ---------- */
.shell { display: flex; height: 100dvh; }
#app { flex: 1; min-width: 0; height: 100%; overflow: hidden; position: relative; outline: none; }
.sidebar { display: none; }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: #000; border-top: 1px solid #1a1a22;
}
.bottom-nav a, .bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; color: var(--muted); position: relative;
}
.bottom-nav a.on { color: var(--text); }
.bottom-nav .plus {
  width: 46px; height: 32px; border-radius: 10px; background: var(--accent); color: #fff;
  display: grid; place-items: center; flex: none;
}
.badge {
  position: absolute; top: 6px; left: calc(50% + 4px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.with-nav #app { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }

@media (min-width: 900px) {
  .bottom-nav { display: none; }
  .with-nav #app { padding-bottom: 0; }
  .sidebar {
    display: flex; flex-direction: column; width: 240px; flex: none; padding: 18px 14px; border-right: 1px solid #1a1a22; overflow-y: auto;
  }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; padding: 4px 8px 18px; }
  .side-links a {
    display: flex; align-items: center; gap: 14px; padding: 11px 10px; border-radius: 10px; font-weight: 600; font-size: 16px; position: relative;
  }
  .side-links a:hover { background: var(--panel); }
  .side-links a.on { color: var(--accent); }
  .side-links .badge { position: static; margin-left: auto; }
  .side-links .btn { margin-top: 12px; width: 100%; }
  .side-foot { margin-top: auto; font-size: 12px; color: var(--muted); line-height: 1.9; padding: 8px; }
  .side-foot a:hover { color: var(--text); }
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 10px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: 0.5; cursor: default; filter: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.block { width: 100%; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:hover { background: rgba(255,255,255,0.08); }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, .field input, .field textarea, .field select {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); outline: none;
}
.field textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent-2); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.dob { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 8px; }
.error { color: var(--danger); font-size: 14px; min-height: 0; margin: 0 0 12px; }
.error:empty { display: none; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 14px; transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: 0.5; cursor: default; }

/* ---------- Pages ---------- */
.page { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.page-inner { max-width: 720px; margin: 0 auto; padding: 16px 16px 40px; }
.page-inner.narrow { max-width: 420px; padding-top: 40px; }
.page-head { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 5; background: rgba(11,11,15,0.92); backdrop-filter: blur(10px); padding: 8px 8px; border-bottom: 1px solid #1a1a22; }
.page-head h1 { font-size: 17px; margin: 0; flex: 1; text-align: center; padding-right: 40px; }
h1.title { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 6px; }
h2.section { font-size: 17px; margin: 26px 0 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.list-item + .list-item { border-top: 1px solid #1c1c25; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.chip.on { background: var(--text); color: #000; border-color: var(--text); }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty svg.i { width: 44px; height: 44px; margin-bottom: 8px; opacity: 0.6; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin: 16px 0 2px; }
.tabs button { flex: 1; padding: 12px 0; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.notice { background: rgba(110,139,255,0.12); border: 1px solid rgba(110,139,255,0.35); padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; }
.notice.warn { background: rgba(255,90,54,0.1); border-color: rgba(255,90,54,0.4); }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 44px; }
.searchbar input { flex: 1; background: none; border: 0; outline: none; height: 100%; }

/* ---------- Avatars & grids ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--panel-2); flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; overflow: hidden; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; aspect-ratio: 9 / 16; background: var(--panel-2); overflow: hidden; border-radius: 4px; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .tile-meta { position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.tile .tile-meta svg.i { width: 16px; height: 16px; }
.tile .tile-flag { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 800; background: rgba(0,0,0,0.7); padding: 2px 7px; border-radius: 6px; }
.tile .tile-flag.held { background: #8a5a00; }
.tile .tile-flag.removed { background: #7a1020; }

/* ---------- Profile ---------- */
.profile-head { text-align: center; padding: 18px 0 4px; }
.profile-head .avatar { margin: 0 auto 10px; }
.profile-head .handle { font-size: 20px; font-weight: 800; }
.stats { display: flex; justify-content: center; gap: 28px; margin: 14px 0; }
.stats button { display: flex; flex-direction: column; align-items: center; }
.stats b { font-size: 18px; }
.stats span { font-size: 13px; color: var(--muted); }
.bio { white-space: pre-wrap; max-width: 420px; margin: 0 auto 14px; }

/* ---------- Feed ---------- */
.feed-wrap { position: relative; height: 100%; background: #000; }
.feed { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; overflow: hidden; }
.stage { position: relative; height: 100%; width: 100%; background: #000; }
.stage video, .stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage .poster { filter: blur(0); }
.stage video { background: transparent; }
@media (min-width: 600px) {
  .slide { padding: 14px 0; }
  .stage { width: auto; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 14px; overflow: hidden; }
  .stage video, .stage .poster { object-fit: contain; }
}
.feed-top { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; gap: 22px; padding: 14px 0 22px; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,0.45), transparent); }
.feed-top a { pointer-events: auto; font-weight: 700; font-size: 16px; color: rgba(255,255,255,0.65); padding-bottom: 4px; border-bottom: 2px solid transparent; }
.feed-top a.on { color: #fff; border-bottom-color: #fff; }
.feed-top .live-pill { position: absolute; left: 14px; top: 12px; }
.feed-top .search-pill { position: absolute; right: 10px; top: 8px; }
.live-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--accent); font-weight: 800; font-size: 12px; letter-spacing: 0.04em; }
.overlay-close { position: absolute; top: 10px; left: 10px; z-index: 8; background: rgba(0,0,0,0.4); }
.meta { position: absolute; left: 12px; right: 84px; bottom: 18px; z-index: 3; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.meta .who { font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.meta .caption { margin: 6px 0 8px; white-space: pre-wrap; word-break: break-word; max-height: 4.4em; overflow: hidden; }
.meta .caption.open { max-height: 40vh; overflow-y: auto; }
.meta .caption a { font-weight: 700; }
.meta .sound-line { display: flex; align-items: center; gap: 6px; font-size: 14px; max-width: 260px; overflow: hidden; }
.meta .sound-line svg.i { width: 16px; height: 16px; }
.meta .sound-line .marq { overflow: hidden; flex: 1; min-width: 0; }
.meta .sound-line span { display: inline-block; white-space: nowrap; animation: marquee 9s linear infinite; }
.meta .duet-line { font-size: 13px; opacity: 0.9; margin-bottom: 4px; }
@keyframes marquee { 0%, 15% { transform: translateX(0); } 100% { transform: translateX(-60%); } }
.shade { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,0.6)); pointer-events: none; z-index: 2; }
.rail { position: absolute; right: 8px; bottom: 16px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rail button, .rail a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.rail svg.i { width: 32px; height: 32px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.rail .liked svg.i { color: var(--accent); fill: var(--accent); }
.rail .av-wrap { position: relative; margin-bottom: 8px; }
.rail .av-wrap .avatar { border: 2px solid #fff; }
.rail .follow-dot { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.rail .follow-dot svg.i { width: 14px; height: 14px; stroke-width: 3; filter: none; }
.rail .disc { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle, #444 18%, #111 20%, #222 60%, #111 62%); display: grid; place-items: center; animation: spin 5s linear infinite; border: 6px solid #1a1a1a; }
.rail .disc svg.i { width: 16px; height: 16px; filter: none; }
@media (min-width: 600px) {
  .rail { position: static; justify-content: flex-end; padding: 0 0 8px 14px; }
  .meta { right: 12px; }
}
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; z-index: 5; cursor: pointer; display: flex; align-items: flex-end; }
.progress i { display: block; height: 2px; width: 0; background: rgba(255,255,255,0.85); }
.progress:hover i { height: 4px; }
.center-icon { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 3; }
.center-icon svg.i { width: 64px; height: 64px; opacity: 0.8; fill: rgba(255,255,255,0.8); stroke: none; }
.burst { position: absolute; z-index: 6; pointer-events: none; color: var(--accent); animation: burst .8s ease-out forwards; }
.burst svg.i { width: 90px; height: 90px; fill: var(--accent); stroke: none; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(0.3) rotate(-12deg); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1.15) rotate(-8deg); opacity: 1; } 100% { transform: translate(-50%, -140%) scale(1) rotate(-8deg); opacity: 0; } }
.unmute { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 7; background: rgba(0,0,0,0.6); padding: 8px 14px; border-radius: 20px; display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; }
.feed-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
.status-chip { position: absolute; top: 60px; left: 12px; z-index: 6; background: rgba(0,0,0,0.65); padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }

/* ---------- Layers: sheets, modals, toast ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.backdrop.mid { align-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 80dvh; background: var(--panel); border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: up .2s ease-out; padding-bottom: var(--safe-b); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; padding: 10px 8px 6px 16px; font-weight: 800; }
.sheet-head .grow { text-align: center; padding-left: 32px; }
.sheet-body { overflow-y: auto; padding: 4px 16px 16px; }
.modal { width: 100%; max-width: 440px; max-height: 90dvh; overflow-y: auto; background: var(--panel); border-radius: 16px; padding: 20px; animation: up .2s ease-out; }
.modal h3 { margin: 0 0 8px; font-size: 19px; }
.menu-list button, .menu-list a { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 4px; font-weight: 600; text-align: left; }
.menu-list button + button, .menu-list a + button, .menu-list button + a { border-top: 1px solid #23232d; }
.menu-list .danger { color: var(--danger); }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 8px 0 4px; }
.share-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.share-grid .circle { width: 52px; height: 52px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; }
#toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 100; pointer-events: none; }
#toast div { background: #fff; color: #000; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; margin-bottom: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.4); animation: up .2s; max-width: 90vw; }
#toast div.err { background: var(--danger); color: #fff; }

/* ---------- Comments ---------- */
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment.reply { padding-left: 44px; }
.comment .body { flex: 1; min-width: 0; }
.comment .name { font-size: 13px; color: var(--muted); font-weight: 700; }
.comment .name .creator { color: var(--accent); margin-left: 4px; }
.comment .text { white-space: pre-wrap; word-break: break-word; margin: 2px 0 4px; }
.comment .acts { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.comment-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: center; }
.comment-input input { flex: 1; height: 42px; border-radius: 21px; padding: 0 16px; background: var(--panel-2); border: 1px solid var(--line); outline: none; }
.replying { font-size: 13px; color: var(--muted); padding: 6px 16px 0; display: flex; justify-content: space-between; }

/* ---------- Create studio ---------- */
.studio { position: fixed; inset: 0; z-index: 40; background: #000; display: flex; flex-direction: column; }
.studio-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.studio-canvas-wrap { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; }
.studio-canvas-wrap canvas, .studio-canvas-wrap video.review { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
@media (max-width: 599px) { .studio-canvas-wrap { width: 100%; height: auto; max-height: 100%; } }
.studio-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: flex-start; justify-content: space-between; padding: 10px; padding-top: max(10px, env(safe-area-inset-top)); }
.sound-pick { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.5); padding: 7px 14px; border-radius: 18px; font-weight: 700; font-size: 14px; max-width: 60vw; }
.sound-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools { position: absolute; right: 10px; top: 64px; z-index: 5; display: flex; flex-direction: column; gap: 14px; }
.tools button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.tools button.on { color: var(--accent); }
.tools svg.i { width: 28px; height: 28px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.studio-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 10px 10px calc(16px + var(--safe-b)); background: linear-gradient(transparent, rgba(0,0,0,0.6)); }
.filters { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 12px; scrollbar-width: none; justify-content: safe center; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.filters .sw { width: 50px; height: 50px; border-radius: 12px; border: 2px solid transparent; }
.filters button.on .sw { border-color: #fff; }
.rec-row { display: flex; align-items: center; justify-content: space-around; }
.rec-btn { width: 78px; height: 78px; border-radius: 50%; border: 5px solid rgba(255,255,255,0.85); display: grid; place-items: center; position: relative; }
.rec-btn i { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); transition: all .15s; }
.rec-btn.on i { width: 30px; height: 30px; border-radius: 8px; }
.rec-btn svg { position: absolute; inset: -5px; width: 78px; height: 78px; transform: rotate(-90deg); }
.rec-side { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.rec-side .sq { width: 40px; height: 40px; border-radius: 10px; border: 2px solid #fff; display: grid; place-items: center; }
.durations { display: flex; justify-content: center; gap: 18px; margin-bottom: 12px; font-weight: 700; font-size: 14px; }
.durations button { color: rgba(255,255,255,0.6); }
.durations button.on { color: #fff; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 900; z-index: 6; text-shadow: 0 4px 30px rgba(0,0,0,.6); pointer-events: none; }
.overlay-item { position: absolute; transform: translate(-50%, -50%); cursor: grab; user-select: none; touch-action: none; white-space: pre; text-align: center; font-weight: 800; line-height: 1.15; z-index: 4; }
.overlay-item.text-bg { padding: 0.15em 0.4em; border-radius: 0.3em; }
.processing { position: absolute; inset: 0; z-index: 7; background: rgba(0,0,0,0.75); display: grid; place-items: center; text-align: center; padding: 20px; }
.bar { width: 220px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.2); overflow: hidden; margin: 12px auto 0; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.post-layout { display: grid; gap: 18px; }
@media (min-width: 760px) { .post-layout { grid-template-columns: 240px 1fr; } }
.post-preview { width: 100%; max-width: 240px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #000; margin: 0 auto; }
.post-preview video { width: 100%; height: 100%; object-fit: cover; }
.pick-source { display: grid; gap: 12px; }
.pick-source button { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-align: left; }
.pick-source button svg.i { width: 30px; height: 30px; color: var(--accent); }
.sound-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.sound-row + .sound-row { border-top: 1px solid #23232d; }
.sound-art { width: 48px; height: 48px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; flex: none; }
.sound-art.lib { background: linear-gradient(135deg, #2ed47a, #6e8bff); }

/* ---------- Live ---------- */
.live-stage { position: fixed; inset: 0; z-index: 40; background: #000; }
.live-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 700px) { .live-stage video { object-fit: contain; } }
.live-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px; padding-top: max(12px, env(safe-area-inset-top)); background: linear-gradient(rgba(0,0,0,0.5), transparent); }
.live-count { background: rgba(0,0,0,0.5); padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; }
.live-count svg.i { width: 16px; height: 16px; }
.live-chat { position: absolute; left: 10px; right: 80px; bottom: calc(70px + var(--safe-b)); z-index: 3; max-height: 38%; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  mask-image: linear-gradient(transparent, #000 25%); -webkit-mask-image: linear-gradient(transparent, #000 25%); }
.live-chat .msg { background: rgba(0,0,0,0.35); padding: 5px 10px; border-radius: 12px; width: fit-content; max-width: 100%; font-size: 14px; word-break: break-word; }
.live-chat .msg b { margin-right: 6px; color: #ffd0c4; }
.live-chat .msg.host b { color: var(--accent); }
.live-chat .msg.sys { color: var(--muted); font-style: italic; }
.live-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; gap: 8px; padding: 10px 10px calc(12px + var(--safe-b)); align-items: center; }
.live-bottom input { flex: 1; height: 44px; border-radius: 22px; padding: 0 16px; background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.15); outline: none; }
.hearts { position: absolute; right: 18px; bottom: 90px; width: 60px; height: 300px; pointer-events: none; z-index: 3; }
.hearts span { position: absolute; bottom: 0; left: 20px; animation: floatup 2.4s ease-out forwards; color: var(--accent); }
.hearts svg.i { fill: currentColor; stroke: none; width: 26px; height: 26px; }
@keyframes floatup { to { transform: translate(var(--dx, 0), -280px) scale(1.3); opacity: 0; } }
.live-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; text-align: center; padding: 24px; }
.live-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .live-grid { grid-template-columns: repeat(3, 1fr); } }
.live-card { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #2a1a3a, #13131a); padding: 12px; display: flex; flex-direction: column; justify-content: space-between; }
.live-card .t { font-weight: 800; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 13px; }
.queue-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; }
.queue-item.urgent { border-color: var(--danger); }
.queue-media { display: flex; gap: 12px; align-items: flex-start; }
.queue-media video, .queue-media img { width: 120px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: #000; flex: none; }
.queue-media img.frames { width: 200px; aspect-ratio: 9 / 16; }
.tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.tag.red { background: rgba(255,71,87,0.15); border-color: var(--danger); color: #ff8a95; }
table.simple { width: 100%; border-collapse: collapse; font-size: 14px; }
table.simple td, table.simple th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.simple th { color: var(--muted); font-weight: 600; }
.scroll-x { overflow-x: auto; }
