:root {
  --bg: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --line: #dde3ee;
  --line-soft: #e9edf5;
  --text: #10182b;
  --muted: #66718c;
  --accent: #5850ec;
  --accent-soft: #ecebfd;
  --like: #ef4a76;
  --boost: #00a58f;
  --gold: #d99a2b;
  --danger: #d63b3b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 43, .06), 0 8px 24px -16px rgba(16, 24, 43, .3);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #0c0f18;
  --surface: #141926;
  --surface-2: #1b2130;
  --line: #262e40;
  --line-soft: #1f2637;
  --text: #e8ecf5;
  --muted: #8b96af;
  --accent: #8b85ff;
  --accent-soft: #1e2140;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 28px -18px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 640px) 330px; gap: 22px; max-width: 1280px; margin: 0 auto; padding: 0 18px; }
.rail { position: sticky; top: 0; height: 100vh; padding: 22px 0; display: flex; flex-direction: column; gap: 4px; }
.main { min-height: 100vh; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--surface); }
.aside { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 0; display: flex; flex-direction: column; gap: 16px; }

.wordmark { font-family: var(--serif); font-size: 27px; letter-spacing: -.02em; padding: 4px 12px 14px; display: flex; align-items: center; gap: 9px; color: var(--text); }
.wordmark:hover { text-decoration: none; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(140deg, var(--accent), var(--boost)); flex: none; position: relative; }
.mark::after { content: ""; position: absolute; inset: 8px 5px; border-radius: 2px; background: var(--surface); clip-path: polygon(0 60%, 33% 0, 66% 75%, 100% 25%, 100% 100%, 0 100%); }

.navlink { display: flex; align-items: center; gap: 13px; padding: 10px 14px; border-radius: 999px; color: var(--text); font-weight: 500; position: relative; }
.navlink:hover { background: var(--surface-2); text-decoration: none; }
.navlink.active { font-weight: 700; }
.navlink.active .ico { color: var(--accent); }
.ico { width: 22px; height: 22px; flex: none; color: var(--muted); }
.pip { position: absolute; left: 27px; top: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.compose-btn { margin: 12px 8px 0; padding: 12px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; box-shadow: var(--shadow); }
.compose-btn:hover { filter: brightness(1.08); }
.rail-foot { margin-top: auto; padding: 0 8px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 999px; border: 1px solid var(--line); background: none; width: 100%; text-align: left; }
.me-chip:hover { background: var(--surface-2); }

/* ---------- header + tabs ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 19px; margin: 0; padding: 15px 18px; letter-spacing: -.01em; }
.topbar .sub { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.back { background: none; border: 0; padding: 6px; border-radius: 999px; margin-right: 4px; }
.back:hover { background: var(--surface-2); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; background: none; border: 0; padding: 15px 6px; color: var(--muted); font-weight: 600; font-size: 14.5px; position: relative; }
.tab:hover { background: var(--surface-2); }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 56px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }

/* ---------- composer ---------- */
.composer { display: flex; gap: 12px; padding: 16px 18px; border-bottom: 8px solid var(--bg); }
.composer.inline { border-bottom: 1px solid var(--line); }
.composer-body { flex: 1; min-width: 0; }
.ta-wrap { position: relative; }
.ta-mirror { position: absolute; inset: 0; padding: 8px 0; font: inherit; font-size: 18px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; color: transparent; pointer-events: none; overflow: hidden; }
.ta-mirror mark { background: var(--accent-soft); color: transparent; border-radius: 4px; }
textarea.ta {
  position: relative; width: 100%; border: 0; resize: none; background: transparent; color: var(--text);
  font: inherit; font-size: 18px; line-height: 1.45; padding: 8px 0; min-height: 56px; outline: none;
}
textarea.ta::placeholder { color: var(--muted); }
.composer-tools { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-soft); margin-top: 8px; }
.tool { background: none; border: 0; padding: 7px; border-radius: 999px; color: var(--accent); display: grid; place-items: center; }
.tool:hover { background: var(--accent-soft); }
.ring { width: 26px; height: 26px; margin-left: auto; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 2.5; }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .18s ease; }
.ring.warn .bar { stroke: var(--gold); }
.ring.over .bar { stroke: var(--danger); }
.btn { border: 0; border-radius: 999px; padding: 9px 19px; font-weight: 700; background: var(--accent); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:not(:disabled):hover { filter: brightness(1.08); }
.btn.ghost { background: none; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 6px 15px; font-size: 14px; }
.preview { position: relative; margin-top: 10px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.preview .x { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.65); color: #fff; border: 0; width: 30px; height: 30px; border-radius: 999px; }

/* ---------- posts ---------- */
.post { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.post:hover { background: var(--surface-2); }
.post.focus { cursor: default; }
.post.focus:hover { background: none; }
.avatar { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; background: var(--surface-2); flex: none; border: 1px solid var(--line); }
.avatar.sm { width: 34px; height: 34px; }
.avatar.lg { width: 122px; height: 122px; border: 4px solid var(--surface); }
.avatar.xs { width: 22px; height: 22px; }
.thread-line { width: 2px; background: var(--line); margin: 8px auto 0; flex: 1; }
.post-body { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 5px; font-size: 14.5px; }
.name { font-weight: 700; color: var(--text); }
.name:hover { text-decoration: underline; }
.handle, .dot, .time { color: var(--muted); }
.time:hover { text-decoration: underline; }
.badge { width: 15px; height: 15px; color: var(--accent); flex: none; }
.badge.gold { color: var(--gold); }
.content { white-space: pre-wrap; overflow-wrap: anywhere; margin: 3px 0 0; }
.content.big { font-size: 21px; line-height: 1.4; }
.media { margin-top: 11px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.media img { width: 100%; max-height: 520px; object-fit: contain; }
.media video { width: 100%; max-height: 78vh; object-fit: contain; background: #000; }
.quote { margin-top: 11px; border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px; }
.quote:hover { background: var(--surface-2); }
.ctx { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.actions { display: flex; justify-content: space-between; max-width: 430px; margin-top: 9px; margin-left: -7px; }
.act { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 7px; border-radius: 999px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.act:hover { color: var(--accent); background: var(--accent-soft); }
.act.like:hover, .act.like.on { color: var(--like); }
.act.like:hover { background: color-mix(in srgb, var(--like) 12%, transparent); }
.act.boost:hover, .act.boost.on { color: var(--boost); }
.act.boost:hover { background: color-mix(in srgb, var(--boost) 12%, transparent); }
.act.on svg { fill: currentColor; }
.act svg { width: 18px; height: 18px; }
.stats-row { display: flex; gap: 18px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 12px; font-size: 14px; }
.stats-row b { font-variant-numeric: tabular-nums; }

/* ---------- profile ---------- */
.banner { height: 190px; background: linear-gradient(120deg, var(--accent) 0%, var(--boost) 100%); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-head { padding: 0 18px 14px; border-bottom: 1px solid var(--line); }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; margin-top: -62px; margin-bottom: 12px; }
.profile-name { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 6px; letter-spacing: -.01em; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; color: var(--muted); font-size: 14px; }
.pills span { display: flex; align-items: center; gap: 5px; }
.counts { display: flex; gap: 18px; font-size: 14px; }
.counts b { font-variant-numeric: tabular-nums; }

/* ---------- lists / cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card h3 { margin: 0; padding: 13px 16px 9px; font-size: 16.5px; letter-spacing: -.01em; font-family: var(--serif); font-weight: 600; }
.card-row { display: flex; align-items: center; gap: 11px; padding: 10px 16px; }
.card-row:hover { background: var(--surface-2); }
.card-more { display: block; padding: 11px 16px; font-size: 14px; }
.trend { padding: 9px 16px; display: block; color: var(--text); }
.trend:hover { background: var(--surface-2); text-decoration: none; }
.trend .t { font-weight: 700; }
.trend .c { color: var(--muted); font-size: 13px; }
.searchbox { position: relative; }
.searchbox input { width: 100%; padding: 12px 16px 12px 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; outline: none; }
.searchbox input:focus { border-color: var(--accent); background: var(--surface); }
.searchbox svg { position: absolute; left: 14px; top: 12px; width: 19px; height: 19px; color: var(--muted); }

.empty { padding: 54px 30px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 19px; font-family: var(--serif); font-weight: 600; }
.spinner { width: 24px; height: 24px; margin: 34px auto; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.new-banner { display: block; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ---------- notifications ---------- */
.notif { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--accent-soft); }
.notif-ico { width: 26px; flex: none; display: flex; justify-content: flex-end; }
.notif-ico svg { width: 21px; height: 21px; }

/* ---------- messages ---------- */
.dm { display: flex; flex-direction: column; height: calc(100vh - 54px); }
.dm-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 3px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); align-self: flex-start; overflow-wrap: anywhere; }
.bubble.mine { background: var(--accent); border-color: var(--accent); color: #fff; align-self: flex-end; }
.bubble .meta { font-size: 11px; opacity: .7; margin-top: 3px; }
.bubble img, .bubble video { border-radius: 12px; margin-top: 6px; }
.dm-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: flex-end; }
.dm-form textarea { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; resize: none; font: inherit; background: var(--surface-2); color: var(--text); outline: none; max-height: 120px; }
.typing { padding: 4px 18px; font-size: 12.5px; color: var(--muted); font-style: italic; height: 22px; }
.presence { width: 9px; height: 9px; border-radius: 999px; background: var(--boost); display: inline-block; }

/* ---------- forms / modal ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font: inherit; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.switch input { width: 42px; height: 24px; appearance: none; background: var(--line); border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

.scrim { position: fixed; inset: 0; background: rgba(10, 14, 24, .55); display: grid; place-items: center; z-index: 100; padding: 18px; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal-head h2 { margin: 0; font-size: 18px; flex: 1; font-family: var(--serif); font-weight: 600; }
.modal-body { padding: 18px; }
.menu { position: absolute; right: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 50; overflow: hidden; min-width: 190px; }
.menu button { display: block; width: 100%; text-align: left; padding: 11px 15px; border: 0; background: none; font-size: 14.5px; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: 999px; z-index: 200; box-shadow: var(--shadow); font-size: 14.5px; }

/* ---------- auth ---------- */
.gate { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.gate-art { background: linear-gradient(150deg, var(--accent), var(--boost)); display: grid; place-items: center; padding: 40px; color: #fff; }
.gate-art .quote-lg { font-family: var(--serif); font-size: 40px; line-height: 1.15; letter-spacing: -.02em; max-width: 440px; }
.gate-form { display: grid; place-items: center; padding: 40px 24px; }
.gate-form .inner { width: 100%; max-width: 370px; }
.gate-form h1 { font-family: var(--serif); font-size: 33px; letter-spacing: -.02em; margin: 0 0 6px; font-weight: 600; }
.err { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); padding: 10px 13px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }

/* ---------- admin ---------- */
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; padding: 16px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 25px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin th, table.admin td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.admin th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- responsive ---------- */
.mobilebar { display: none; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 88px minmax(0, 1fr); }
  .aside { display: none; }
  .wordmark span, .navlink span, .me-chip div { display: none; }
  .wordmark, .navlink { justify-content: center; padding-left: 0; padding-right: 0; }
  .compose-btn { padding: 12px 0; }
  .compose-btn span { display: none; }
}
@media (max-width: 700px) {
  .shell { grid-template-columns: 1fr; padding: 0; }
  .rail { display: none; }
  .main { border: 0; padding-bottom: 62px; }
  .mobilebar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line); padding: 7px 0 max(7px, env(safe-area-inset-bottom));
  }
  .mobilebar a { flex: 1; display: grid; place-items: center; padding: 7px; color: var(--muted); position: relative; }
  .mobilebar a.active { color: var(--accent); }
  .mobilebar .pip { left: 50%; margin-left: 3px; top: 2px; }
  .fab { position: fixed; right: 17px; bottom: 78px; width: 55px; height: 55px; border-radius: 999px; background: var(--accent); color: #fff; border: 0; display: grid; place-items: center; box-shadow: var(--shadow); z-index: 30; }
  .gate { grid-template-columns: 1fr; }
  .gate-art { display: none; }
  .avatar.lg { width: 88px; height: 88px; }
  .profile-top { margin-top: -44px; }
  .banner { height: 138px; }
  .actions { max-width: none; }
  .dm { height: calc(100vh - 116px); }
}
@media (min-width: 701px) { .fab { display: none; } }

/* ---------- groups ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--accent);
  font-size: 13px; font-weight: 600; max-width: 190px;
}
.pill:hover { background: var(--accent-soft); border-color: var(--accent); }
.pill .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill svg { width: 15px; height: 15px; flex: none; }
.role-chip {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.role-chip.owner { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.role-chip.moderator { color: var(--boost); border-color: color-mix(in srgb, var(--boost) 45%, transparent); }
.ctx .badge { width: 13px; height: 13px; }

/* ---------- live streaming ---------- */
.golive { background: var(--like) !important; }
.golive:hover { filter: brightness(1.08); }
.golive-btn { background: var(--like); display: inline-flex; align-items: center; justify-content: center; }
.golive-btn:hover { filter: brightness(1.08); }
.live-pill {
  display: flex; align-items: center; gap: 7px; width: 100%; margin-bottom: 8px;
  padding: 9px 12px; border: 0; border-radius: 999px; background: var(--like); color: #fff;
  font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow); animation: livepulse 2s infinite;
}
.live-pill svg { width: 16px; height: 16px; }
.live-pill b { margin-left: auto; }
@keyframes livepulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--like) 55%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 16px; }
.live-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--surface); }
.live-card:hover { border-color: var(--accent); }
.live-thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #1b2130, #0c0f18); overflow: hidden; }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.live-thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.live-thumb-ph svg { width: 40px; height: 40px; }
.live-badge {
  position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; gap: 5px;
  background: var(--like); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 6px;
}
.live-badge svg { width: 12px; height: 12px; }
.live-count, .live-where {
  position: absolute; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.7);
  color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}
.live-count { top: 9px; right: 9px; }
.live-count svg, .live-where svg { width: 13px; height: 13px; }
.live-where { bottom: 9px; left: 9px; max-width: calc(100% - 18px); overflow: hidden; }
.live-meta { display: flex; gap: 10px; padding: 11px 12px; align-items: center; }

.watch { display: flex; flex-direction: column; }
.watch-stage { position: relative; background: #000; aspect-ratio: 16/9; max-height: 82vh; }
.watch-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.watch-overlay { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.watch-overlay .live-badge, .watch-overlay .live-count { position: static; }
.watch-status { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 600; background: rgba(0,0,0,.35); }
.watch-status:empty { display: none; }
.watch-info { padding: 15px 18px; }
.broadcast-controls { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.ctrl { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; color: var(--text); }
.ctrl:hover { background: var(--bg); }
.ctrl.off { background: var(--like); color: #fff; border-color: var(--like); }
.ctrl svg { width: 20px; height: 20px; }
.profile-live {
  display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 4px; padding: 6px 12px;
  border-radius: 999px; background: var(--like); color: #fff; font-weight: 700; font-size: 13px;
}
.profile-live:hover { filter: brightness(1.08); text-decoration: none; }
.profile-live svg { width: 14px; height: 14px; }
@media (max-width: 700px) { .watch-stage { max-height: 56vh; } }

/* ---------- emoji picker ---------- */
.emoji-pop {
  width: 352px; height: 348px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); z-index: 400; display: flex; flex-direction: column; overflow: hidden;
}
.emoji-search { padding: 9px 10px 6px; }
.emoji-search input {
  width: 100%; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; outline: none;
}
.emoji-search input:focus { border-color: var(--accent); }
.emoji-tabs { display: flex; gap: 2px; padding: 0 8px 6px; border-bottom: 1px solid var(--line-soft); }
.etab { flex: 1; min-width: 0; background: none; border: 0; padding: 6px 0; border-radius: 7px; font-size: 15.5px; line-height: 1; opacity: .55; }
.etab:hover { background: var(--surface-2); opacity: 1; }
.etab.active { opacity: 1; background: var(--accent-soft); }
.emoji-grid { flex: 1; overflow-y: auto; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; align-content: start; scrollbar-width: thin; }
.ebtn { background: none; border: 0; font-size: 21px; line-height: 1; padding: 5px 0; border-radius: 7px; }
.ebtn:hover { background: var(--accent-soft); transform: scale(1.15); }
.emoji-none { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 26px 0; font-size: 14px; }

/* ---------- live chat ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
.watch-main { min-width: 0; }
.chat-panel {
  display: flex; flex-direction: column; border-left: 1px solid var(--line);
  height: calc(100vh - 54px); position: sticky; top: 54px; background: var(--surface);
}
.chat-panel.collapsed .chat-log, .chat-panel.collapsed .chat-foot { display: none; }
.chat-panel.collapsed { height: auto; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.chat-head svg { width: 17px; height: 17px; color: var(--muted); }
.chat-head .handle { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 13px; }
.chat-toggle { background: none; border: 0; padding: 3px; border-radius: 999px; color: var(--muted); display: grid; place-items: center; }
.chat-toggle:hover { background: var(--surface-2); }
.chat-toggle svg { width: 15px; height: 15px; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 6px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.chat-empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 26px 12px; }
.chat-msg { display: flex; gap: 8px; padding: 5px 6px 5px 0; border-radius: 8px; align-items: flex-start; position: relative; }
.chat-msg:hover { background: var(--surface-2); }
.chat-body { min-width: 0; flex: 1; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-user { font-weight: 700; color: var(--accent); margin-right: 5px; }
.chat-user:hover { text-decoration: underline; }
.chat-text.jumbo { font-size: 30px; line-height: 1.2; display: inline-block; }
.chat-x { position: absolute; right: 2px; top: 4px; background: none; border: 0; color: var(--muted); padding: 2px; border-radius: 6px; opacity: 0; }
.chat-msg:hover .chat-x { opacity: 1; }
.chat-x:hover { background: var(--line); color: var(--text); }
.chat-x svg { width: 15px; height: 15px; }
.chat-foot { border-top: 1px solid var(--line); padding: 9px 12px 12px; }
.chat-quick { display: flex; gap: 5px; margin-bottom: 8px; }
.qr { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 5px 0; font-size: 17px; line-height: 1.2; }
.qr:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-1px); }
.chat-input-row { display: flex; gap: 6px; align-items: center; }
.chat-input-row input {
  flex: 1; min-width: 0; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; outline: none;
}
.chat-input-row input:focus { border-color: var(--accent); }
.chat-input-row .btn { padding: 8px 12px; }
.chat-input-row .btn svg { width: 16px; height: 16px; }
.chat-signin { color: var(--muted); font-size: 13.5px; text-align: center; padding: 6px 0; }

@media (max-width: 1100px) {
  .watch { grid-template-columns: 1fr; }
  .chat-panel { border-left: 0; border-top: 1px solid var(--line); height: 400px; position: static; }
}
@media (max-width: 700px) {
  .emoji-pop { width: calc(100vw - 16px); left: 8px !important; height: 320px; }
  .emoji-grid { grid-template-columns: repeat(7, 1fr); }
  .chat-panel { height: 340px; }
}
.pill.grouped { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- show pages ---------- */
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding: 16px; }
.show-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--surface); }
.show-card:hover { border-color: var(--accent); }
.show-art { position: relative; aspect-ratio: 1; background: linear-gradient(140deg, var(--accent), var(--boost)); }
.show-art img { width: 100%; height: 100%; object-fit: cover; }
.show-art-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; opacity: .8; }
.show-art-ph svg { width: 42px; height: 42px; }
.show-art .live-badge { top: 8px; left: 8px; }
.show-art .ep-tag { position: absolute; top: 8px; right: 8px; }
.show-avatar {
  width: 122px; height: 122px; border-radius: 18px; border: 4px solid var(--surface); overflow: hidden;
  background: linear-gradient(140deg, var(--accent), var(--boost)); display: grid; place-items: center; color: #fff; flex: none;
}
.show-avatar img { width: 100%; height: 100%; object-fit: cover; }
.show-avatar svg { width: 44px; height: 44px; }
.show-link {
  display: inline-flex; align-items: center; gap: 7px; margin: 10px 0 2px; padding: 6px 13px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-weight: 600; font-size: 13.5px;
}
.show-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.show-link svg { width: 15px; height: 15px; }

.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 16px; }
.ep-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: var(--surface); }
.ep-card:hover { border-color: var(--accent); }
.ep-thumb {
  position: relative; aspect-ratio: 16/9; display: grid; place-items: center;
  background: linear-gradient(135deg, #1b2130, #0c0f18); color: #fff;
}
.ep-thumb.audio { background: linear-gradient(135deg, var(--accent), var(--boost)); }
.ep-thumb svg { width: 34px; height: 34px; opacity: .9; }
.ep-dur, .ep-tag {
  position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.75); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px;
}
.ep-tag { left: 8px; right: auto; background: var(--like); }
.ep-body { padding: 10px 12px; min-width: 0; }
.ep-stage { background: #000; }
.ep-video { width: 100%; max-height: 82vh; display: block; background: #000; }
.ep-audio-player { display: flex; align-items: center; gap: 14px; padding: 28px 20px; background: linear-gradient(135deg, var(--accent), var(--boost)); }
.ep-audio-player svg { width: 40px; height: 40px; color: #fff; flex: none; }

/* ---------- recorder ---------- */
.rec-modes { display: flex; gap: 8px; margin-bottom: 14px; }
.rec-mode {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.rec-mode svg { width: 20px; height: 20px; }
.rec-mode:hover { border-color: var(--accent); color: var(--text); }
.rec-mode.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.rec-stage { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16/9; }
.rec-stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.rec-stage video[hidden] { display: none; }
.rec-audio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--boost)); }
.rec-audio svg { width: 38px; height: 38px; }
.rec-wave { display: flex; gap: 4px; align-items: flex-end; height: 30px; }
.rec-wave i { width: 5px; background: #fff; border-radius: 3px; animation: wave 1s ease-in-out infinite; }
.rec-wave i:nth-child(1) { height: 40%; animation-delay: 0s; }
.rec-wave i:nth-child(2) { height: 75%; animation-delay: .15s; }
.rec-wave i:nth-child(3) { height: 100%; animation-delay: .3s; }
.rec-wave i:nth-child(4) { height: 65%; animation-delay: .45s; }
.rec-wave i:nth-child(5) { height: 35%; animation-delay: .6s; }
@keyframes wave { 0%,100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
.rec-timer {
  position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,.72); color: #fff; padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; font-size: 13px;
}
.rec-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--like); animation: livepulse 1.4s infinite; }
.rec-controls { display: flex; gap: 10px; margin-top: 14px; }
.rec-controls .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; }
.rescue {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 300;
  display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--danger); border-radius: 14px;
  padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px;
}
.rescue .hint { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.rescue .btn { flex: none; }

/* ---------- media protection ---------- */
img, video, audio {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;   /* stops the iOS long-press "Save Image" sheet */
  user-select: none;
  -webkit-user-select: none;
}
/* The recording rescue link is the user's own footage, so it stays saveable. */
.rescue a[download] { -webkit-touch-callout: default; user-select: auto; }

/* ---------- episode management ---------- */
.ep-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.ep-menu {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 999px;
  background: rgba(0,0,0,.62); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .12s;
}
.ep-card:hover .ep-menu, .ep-menu:focus-visible { opacity: 1; }
.ep-menu svg { width: 16px; height: 16px; }
.ep-card.selecting { cursor: pointer; }
.ep-card.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.ep-check { position: absolute; top: 8px; left: 8px; }
.ep-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.ep-check span {
  display: block; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #fff;
  background: rgba(0,0,0,.45); position: relative;
}
.ep-check input:checked + span { background: var(--accent); border-color: var(--accent); }
.ep-check input:checked + span::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ep-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.danger-zone { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone b { color: var(--danger); }
.danger-zone .hint { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
@media (max-width: 700px) { .ep-menu { opacity: 1; } }

/* ---------- capture resolution indicator ---------- */
.res-badge {
  position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.72); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 5px;
}
.res-badge.warn { background: var(--gold); color: #1a1400; }
.rec-stage .res-badge { bottom: 10px; right: 10px; }

/* ---------- multi-attachment gallery ---------- */
.gallery { display: grid; gap: 3px; margin-top: 11px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.gallery.n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 16/9; }
.gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16/9; }
.gallery.n3 .gal-cell:first-child { grid-row: span 2; }
.gallery.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16/10; }
.gal-cell { position: relative; border: 0; padding: 0; background: #0c0f18; overflow: hidden; cursor: zoom-in; min-height: 0; }
.gal-cell img, .gal-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-cell:hover img, .gal-cell:hover video { opacity: .92; }
.gal-more {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55);
  color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.02em;
}
.gal-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; }
.gal-play svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }

/* ---------- composer attachment strip ---------- */
.preview.attach { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; border: 0; }
.preview.attach .att { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.preview.attach .att img, .preview.attach .att video { width: 100%; height: 100%; object-fit: cover; }
.preview.attach .att .x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 999px;
  background: rgba(0,0,0,.7); color: #fff; border: 0; font-size: 12px; line-height: 1; display: grid; place-items: center;
}
.preview.attach .att.add {
  display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line);
  background: none; aspect-ratio: 1; border-radius: 10px; cursor: pointer;
}
.preview.attach .att.add:hover { border-color: var(--accent); color: var(--accent); }
.att-audio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 100%; padding: 6px; color: var(--muted); font-size: 10.5px; text-align: center; }
.att-audio svg { width: 20px; height: 20px; }
.att-audio span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------- lightbox ---------- */
.lightbox { background: rgba(8, 10, 16, .94); display: flex; align-items: center; justify-content: center; gap: 8px; }
.lb-stage { max-width: min(1100px, 92vw); max-height: 88vh; display: grid; place-items: center; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.lb-close { position: absolute; top: 16px; right: 18px; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 38px; height: 38px; border-radius: 999px; font-size: 17px; }
.lb-close:hover { background: rgba(255,255,255,.24); }
.lb-nav { background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 64px; border-radius: 10px; font-size: 30px; line-height: 1; flex: none; }
.lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13.5px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .lb-nav { width: 34px; height: 52px; font-size: 24px; } }

/* ---------- branding / appearance panel ---------- */
.brand-logo { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex: none; }
.wordmark .brand-logo { width: 26px; height: 26px; }
.brand-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line-soft);
}
.brand-row .hint { color: var(--muted); font-size: 12.5px; margin-top: 3px; max-width: 46ch; }
.brand-color { display: flex; align-items: center; gap: 8px; flex: none; }
.brand-color input[type=color] {
  width: 42px; height: 34px; padding: 2px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--surface-2); cursor: pointer;
}
.brand-color input[type=text] {
  width: 96px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: 13px; outline: none;
}
.brand-color input[type=text]:focus { border-color: var(--accent); }
.brand-thumb { width: 46px; height: 46px; object-fit: contain; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); }
.brand-thumb.sq { object-fit: cover; }
.brand-preview { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bp-bar { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-family: var(--serif); font-size: 17px; }
.bp-bar img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.bp-body { display: flex; align-items: center; gap: 12px; padding: 16px 14px; flex-wrap: wrap; }
.bp-chip { padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.bp-heart { color: var(--like); font-weight: 700; font-size: 14px; }
#br-custom_css { font-family: var(--mono); font-size: 13px; }

/* ---------- sales funnel ---------- */
body.funnel-mode .rail, body.funnel-mode .aside, body.funnel-mode .mobilebar, body.funnel-mode .fab { display: none; }
body.funnel-mode .shell { grid-template-columns: 1fr; max-width: none; padding: 0; }
body.funnel-mode .main { border: 0; padding-bottom: 0; }
.fn { max-width: 900px; margin: 0 auto; padding: 0 20px 60px; }
.fn-hero { text-align: center; padding: 54px 0 40px; }
.fn-brandline { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 19px; margin-bottom: 30px; }
.fn-brandline img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.fn-eyebrow {
  display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .02em; margin-bottom: 18px;
}
.fn h1 { font-family: var(--serif); font-size: clamp(32px, 5.4vw, 52px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 18px; }
.fn-sub { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.fn-priceline { display: inline-flex; align-items: center; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; justify-content: center; }
.fn-priceline > div { display: flex; flex-direction: column; }
.fn-priceline b { font-size: 30px; letter-spacing: -.02em; }
.fn-priceline span { font-size: 13px; color: var(--muted); }
.fn-priceline .plus { color: var(--muted); font-size: 20px; }
.fn-cta { font-size: 16px; padding: 14px 34px; border-radius: 999px; }
.fn-note { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.fn-testbadge { display: inline-block; margin-top: 14px; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: #1a1400; font-size: 12px; font-weight: 700; }
.fn-section { padding: 34px 0; border-top: 1px solid var(--line); }
.fn-section h2 { font-family: var(--serif); font-size: 26px; letter-spacing: -.02em; margin: 0 0 20px; }
.fn-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.fn-feature { display: flex; gap: 12px; }
.fn-feature p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.fn-tick { width: 26px; height: 26px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.fn-tick svg { width: 15px; height: 15px; }
.fn-pricecard { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; text-align: center; background: var(--surface); }
.fn-big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0; }
.fn-pricecard p { color: var(--muted); margin: 0 0 6px; }
.fn-then { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }
.fn-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.fn-quote { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.fn-quote blockquote { margin: 0 0 10px; font-size: 15.5px; line-height: 1.55; }
.fn-quote figcaption { color: var(--muted); font-size: 13.5px; }
.fn-faq { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
.fn-faq summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.fn-faq p { color: var(--muted); margin: 10px 0 0; line-height: 1.55; }
.fn-contact { text-align: center; }
.fn-leadrow { display: flex; gap: 8px; max-width: 420px; margin: 14px auto 0; }
.fn-leadrow input { flex: 1; padding: 12px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; outline: none; }
.fn-leadrow input:focus { border-color: var(--accent); }
.fn-footer { text-align: center; color: var(--muted); font-size: 13.5px; padding: 30px 0 10px; border-top: 1px solid var(--line); }
.fn-summary { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.fn-summary > div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14.5px; }
.fn-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px !important; font-size: 16px !important; font-weight: 700; }
.fn-pays { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.fn-pay { flex: 1; min-width: 140px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-weight: 600; }
.fn-pay:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.fn-pay:disabled { opacity: .5; }
.fn-pay.loading { opacity: .6; }
.fn-pay svg { width: 19px; height: 19px; }
.fn-done { text-align: center; padding: 70px 20px; }
.fn-check { width: 62px; height: 62px; border-radius: 999px; background: var(--boost); color: #fff; display: grid; place-items: center; margin: 0 auto 20px; }
.fn-check svg { width: 30px; height: 30px; }
.fn-done h1 { font-size: 30px; margin-bottom: 10px; }
.fn-done p { color: var(--muted); max-width: 460px; margin: 0 auto 14px; line-height: 1.55; }
/* admin */
.fn-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fn-item { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.fn-item input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; outline: none; min-width: 0; }
.fn-item input:focus { border-color: var(--accent); }
.fn-provider-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
.fn-provider-box h4 { margin: 0 0 4px; font-size: 16px; }
.fn-slug { display: flex; align-items: center; gap: 4px; color: var(--muted); font-family: var(--mono); }
.fn-slug input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); font: inherit; outline: none; }
.fn-copyrow { display: flex; gap: 8px; align-items: center; }
.fn-copyrow code { flex: 1; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; overflow-x: auto; white-space: nowrap; }
.key-state { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.key-state.on { background: color-mix(in srgb, var(--boost) 15%, transparent); color: var(--boost); border-color: transparent; }
[data-secret] { width: 190px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.ord-paid { color: var(--boost); font-weight: 700; }
.ord-pending { color: var(--gold); font-weight: 700; }
.ord-failed, .ord-refunded, .ord-cancelled { color: var(--danger); font-weight: 700; }
@media (max-width: 700px) { .fn-2col, .fn-item { grid-template-columns: 1fr; } .fn-item { gap: 6px; margin-bottom: 14px; } }
