/* =========================================================
   LiveLooks（demo6-trtc-v2 移植版）
   基础样式照搬 LiveLooks-demo/styles.css（暗色流媒体观看页布局），
   末尾追加移植新增的部分（.rtc-capture / .wait-overlay / 缩略图 <img>）。
   ========================================================= */
:root {
  --bg: #0e0e10; --panel: #18181b; --panel-2: #1f1f23; --panel-3: #26262c; --border: #2c2c33;
  --text: #efeff1; --muted: #adadb8; --dim: #7a7a85;
  --accent: #7b61ff; --accent-hover: #8f79ff; --live: #eb0400; --ok: #3ddc97; --warn: #ffb020;
  --grad: linear-gradient(135deg, #7b61ff 0%, #00e5ff 100%);
  --grad-ea: linear-gradient(135deg, #ff4fa3 0%, #7b61ff 55%, #00c2ff 100%);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --top-h: 52px; --chat-w: 340px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: #bf94ff; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border: 0; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--text); background: var(--panel-3);
  cursor: pointer; transition: background .15s, transform .05s, opacity .15s, box-shadow .2s, filter .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: #323239; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--panel-3); }
.btn-ea { background: var(--grad-ea); color: #fff; }
.btn-ea:hover { background: var(--grad-ea); filter: brightness(1.1); }
.btn-ea.done { background: var(--panel-3); color: var(--ok); filter: none; }
.btn-ea .soon { font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; background: rgba(255,255,255,.22); padding: 2px 6px; border-radius: 999px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 8px; }
.btn-xl { height: 54px; padding: 0 28px; font-size: 17px; border-radius: 10px; box-shadow: 0 8px 30px rgba(123,97,255,.45); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn.full { width: 100%; }
.link-btn { background: none; border: 0; color: #bf94ff; cursor: pointer; font-size: 13px; padding: 2px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* Record button */
.btn-rec { background: #fff; color: #0e0e10; font-weight: 700; }
.btn-rec:hover { background: #e9e9ee; }
.btn-rec .rec-ico { width: 12px; height: 12px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(235,4,0,.18); }
.btn-rec.ready { box-shadow: 0 0 0 0 rgba(235,4,0,.55); animation: recReady 1.8s infinite; }
.btn-rec.is-rec { background: var(--live); color: #fff; animation: none; }
.btn-rec.is-rec:hover { background: #ff2a24; }
.btn-rec.is-rec .rec-ico { border-radius: 2px; background: #fff; box-shadow: none; width: 11px; height: 11px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: 24px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid #000; box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.brand { display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--grad); position: relative; box-shadow: 0 0 18px rgba(123,97,255,.5); }
.logo-mark::after { content: ""; position: absolute; inset: 7px 6px 7px 9px; background: #fff; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.2px; }
.brand-by { color: var(--dim); font-size: 12px; font-weight: 500; }
.top-actions { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.top-link { color: var(--muted); font-weight: 600; }
.top-link:hover { color: var(--text); text-decoration: none; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--chat-w); height: calc(100vh - var(--top-h)); }
.stage { overflow-y: auto; padding-bottom: 40px; background: var(--bg); scroll-behavior: smooth; }
.stage > section { background: var(--bg); }
.chat { background: var(--panel); border-left: 1px solid #000; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- Player ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; width: min(100%, calc((100vh - var(--top-h) - 310px) * 16 / 9)); min-width: min(100%, 480px); margin: 0 auto; }
#out { width: 100%; height: 100%; display: block; background: #000; }
.timebar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.08); z-index: 3; }
.timebar span { display: block; height: 100%; width: 100%; background: var(--grad); transition: width .3s linear; }
.timebar span.low { background: linear-gradient(90deg, #ff4d4d, #ffb020); }
.ov { position: absolute; z-index: 4; display: flex; gap: 8px; align-items: center; }
.ov-tl { top: 12px; left: 12px; }
.ov-tr { top: 12px; right: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 4px; background: rgba(14,14,16,.72); color: #fff; font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }
.pill-time { background: rgba(123,97,255,.88); }
.pill-time.low { background: rgba(235,4,0,.88); }
.toast { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96); z-index: 6; padding: 10px 18px; border-radius: 10px; background: rgba(14,14,16,.82); backdrop-filter: blur(8px); font-weight: 800; font-size: 20px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Recording state */
.player.recording::after { content: ""; position: absolute; inset: 0; border: 3px solid var(--live); z-index: 6; pointer-events: none; animation: recFrame 1.2s ease-in-out infinite; }
.rec-hud {
  position: absolute; z-index: 8; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 14px; border-radius: 19px;
  background: rgba(14,14,16,.9); backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(235,4,0,.6);
  font-size: 13px; overflow: hidden;
}
.rec-hud b { letter-spacing: .6px; color: #ff5a55; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); animation: pulse 1s infinite; }
.rec-time { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.rec-max { font-family: var(--mono); color: var(--dim); font-size: 12px; }
.rec-stop { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; margin-left: 4px; border: 0; border-radius: 14px; background: var(--live); color: #fff; font-weight: 800; font-size: 12px; cursor: pointer; }
.rec-stop:hover { background: #ff2a24; }
.rec-stop .sq { width: 9px; height: 9px; background: #fff; border-radius: 2px; }
.rec-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.1); }
.rec-prog span { display: block; height: 100%; width: 0; background: var(--live); transition: width .2s linear; }

/* Tile labels */
.tile-label { position: absolute; z-index: 4; bottom: 14px; left: 14px; height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 14px; background: rgba(14,14,16,.72); backdrop-filter: blur(6px); font-weight: 700; font-size: 13px; transition: bottom .2s ease; white-space: nowrap; }
.tile-label i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Self view (PiP) */
.pip { position: absolute; z-index: 5; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 8px 24px rgba(0,0,0,.55); cursor: grab; touch-action: none; user-select: none; transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease; }
.pip.dragging { transition: none; cursor: grabbing; box-shadow: 0 0 0 2px var(--accent), 0 14px 34px rgba(0,0,0,.6); }
.pip canvas { width: 100%; height: 100%; display: block; }
.pip-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 10px 4px 4px 8px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.pip-bar span { overflow: hidden; text-overflow: ellipsis; }
.pip-btn { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 0; background: rgba(255,255,255,.16); color: #fff; font-weight: 800; cursor: pointer; line-height: 20px; padding: 0; }
.pip-btn:hover { background: rgba(255,255,255,.3); }
.pip-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.4); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .15s; pointer-events: none; }
@media (hover: hover) { .pip:hover:not(.dragging) .pip-hint { opacity: 1; } }
.pip-restore { position: absolute; z-index: 5; height: 28px; padding: 0 12px; border-radius: 14px; border: 0; background: rgba(14,14,16,.78); color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; backdrop-filter: blur(6px); transition: left .22s ease, top .22s ease; }

/* Gate */
.gate { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; text-align: center; background: radial-gradient(60% 80% at 20% 20%, rgba(123,97,255,.35), transparent 60%), radial-gradient(50% 70% at 85% 80%, rgba(0,229,255,.22), transparent 60%), #0b0b0e; }
.gate-inner { max-width: 600px; padding: 16px 24px; }
.gate h1 { font-size: clamp(26px, 3.6vw, 46px); line-height: 1.08; margin: 0 0 10px; letter-spacing: -1px; font-weight: 800; }
.gate p { color: var(--muted); font-size: 16px; margin: 0 0 20px; }
.gate-sub { margin-top: 12px; color: var(--muted); font-size: 13px; }
.gate-share { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn-share { background: var(--grad); color: #fff; box-shadow: 0 0 0 1px rgba(0,229,255,.25); }
.btn-share:hover { background: var(--grad); filter: brightness(1.12); }
.gate-share .btn { height: auto; min-height: 38px; padding: 8px 14px; white-space: normal; }
.gate-note { font-size: 12px !important; margin: 10px 0 0 !important; color: var(--dim) !important; }
.gate-note.err { color: #ff8a8a !important; }

/* ---------- Look tray ---------- */
.stage .tray { background: var(--panel); border-bottom: 1px solid #000; padding: 8px 20px 10px; }
.tray-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.step { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }
.tray-title { font-size: 16px; font-weight: 800; }
.tray-sub { font-size: 13px; }
.tray.attn .step { animation: ring 1.4s infinite; }
.tray.disabled .tray-row, .tray.disabled .cats { opacity: .45; pointer-events: none; }
.tray.disabled .step { display: none; }
.cats { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 8px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: rgba(255,255,255,.1); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; transition: background .15s; }
.cat:hover { background: rgba(255,255,255,.18); }
.cat.on { background: #f1f1f1; color: #0f0f0f; }
.cat .n { color: var(--dim); font-weight: 600; margin-left: 4px; font-size: 12px; }
.cat.on .n { color: #555; }
.tray-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.look-card { flex: none; width: 96px; border: 0; padding: 0; background: none; color: var(--text); cursor: pointer; text-align: left; animation: fade .2s ease-out; }
.look-card .thumb { position: relative; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--border); transition: transform .12s, box-shadow .15s; }
.look-card:hover .thumb { transform: translateY(-2px); }
.look-card .thumb img { width: 100%; height: 100%; display: block; object-fit: cover; min-width: 0; }
.look-card .name { font-size: 13px; font-weight: 700; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-card .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-card.active .thumb { box-shadow: 0 0 0 3px var(--accent), 0 6px 20px rgba(123,97,255,.4); }
.look-card.orig .thumb::after { content: "Original"; position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 700; background: rgba(14,14,16,.75); padding: 2px 6px; border-radius: 4px; }
.look-card.orig { margin-right: 6px; position: relative; }
.look-card.orig::after { content: ""; position: absolute; right: -10px; top: 8px; bottom: 34px; width: 1px; background: var(--border); }

/* ---------- Stream info ---------- */
.stream-info { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 20px; flex-wrap: wrap; }
.si-left { display: flex; gap: 12px; align-items: center; min-width: 0; flex: 1; }
.si-avatar { width: 40px; height: 40px; border-radius: 50%; padding: 3px; background: var(--grad); flex: none; }
.si-avatar span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #1a1a1f; font-weight: 800; font-size: 11px; letter-spacing: .5px; }
.si-text { min-width: 0; }
.si-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-meta { display: flex; gap: 6px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.si-cat { color: #bf94ff; font-weight: 600; margin-right: 4px; }
.tag { background: var(--panel-3); color: var(--muted); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.si-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.si-actions .btn { height: auto; min-height: 34px; white-space: normal; }

/* ---------- Conversion cards ---------- */
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 20px 0; }
.cta-card { position: relative; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); background: var(--panel); }
.cta-creator { background: radial-gradient(120% 120% at 0% 0%, rgba(255,79,163,.18), transparent 55%), radial-gradient(120% 120% at 100% 100%, rgba(0,194,255,.14), transparent 55%), var(--panel); border-color: rgba(255,79,163,.35); }
.cta-card h3 { margin: 6px 0 0; font-size: 19px; letter-spacing: -.2px; }
.cta-card p { margin: 0; color: var(--muted); }
.cta-card ul { margin: 6px 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; flex: 1; }
.cta-card li { position: relative; padding-left: 20px; color: var(--muted); font-size: 13px; }
.cta-card li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.cta-card li b { color: var(--text); }
.cta-card .btn { align-self: flex-start; }
.cta-badge { align-self: flex-start; display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.soon-badge { background: rgba(255,79,163,.16); color: #ff8cc6; }
.biz-badge { background: rgba(0,194,255,.12); color: #7fdcff; }

/* ---------- FAQ ---------- */
.faq { padding: 28px 20px 0; }
.faq > * { max-width: 900px; }
.faq h2 { font-size: 20px; margin: 0 0 8px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: 14px 32px 14px 0; position: relative; font-weight: 700; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 22px; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: #fff; }
.faq .ans { padding: 0 32px 16px 0; color: var(--muted); line-height: 1.6; }
.faq .ans b { color: var(--text); }

/* ---------- Chat ---------- */
.chat-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; letter-spacing: .4px; }
.pinned { display: flex; gap: 10px; margin: 10px 10px 0; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); font-size: 13px; line-height: 1.4; }
.pin-ico { flex: none; }
.pin-by { font-size: 11px; font-weight: 700; color: var(--dim); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .4px; }
.pinned a { font-weight: 700; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 10px 4px; display: flex; flex-direction: column; gap: 2px; }
.msg { padding: 3px 6px; border-radius: 4px; word-wrap: break-word; font-size: 13px; line-height: 1.5; }
.msg:hover { background: rgba(255,255,255,.04); }
.msg .badge { display: inline-block; width: 16px; height: 16px; border-radius: 3px; vertical-align: -3px; margin-right: 3px; font-size: 10px; text-align: center; line-height: 16px; font-weight: 800; color: #000; }
.badge.sub { background: #bf94ff; } .badge.mod { background: #00ad03; color: #fff; } .badge.vip { background: #e005b9; color: #fff; }
.msg .user { font-weight: 700; }
.msg .emote { font-size: 18px; vertical-align: -3px; }
.msg.system { color: var(--muted); font-style: italic; }
.chat-input { padding: 10px; border-top: 1px solid var(--border); }
.chat-input input { width: 100%; height: 38px; background: var(--panel-2); border-color: var(--panel-2); }

input, select, textarea { height: 38px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
textarea { height: auto; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* ---------- Modals & drawer ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.65); backdrop-filter: blur(4px); animation: fade .15s ease-out; }
.modal-card { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 28px; border-radius: 14px; text-align: center; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal-card.wide { max-width: 680px; }
.modal-card.left { text-align: left; max-width: 520px; }
.modal-card h2 { margin: 8px 0 8px; font-size: 22px; letter-spacing: -.3px; }
.modal-card p { color: var(--muted); margin: 0 0 18px; }
.modal-emoji { font-size: 34px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.modal-actions.col { flex-direction: column; align-items: stretch; }
.modal-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.modal-x:hover { background: var(--panel-3); color: var(--text); }
.timeup-secondary { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.modal-card .reward-note { font-size: 13px; line-height: 1.55; color: var(--muted); margin: 12px 0 10px; }
.reward-note.claimed { color: var(--ok); }
.referral-review { border-top: 1px solid var(--border); padding: 10px 0 12px; }
.modal-card .referral-disclosure { font-size: 11px; line-height: 1.5; color: var(--dim); margin: 0 0 6px; }
.referral-review .link-btn { color: var(--muted); font-size: 12px; font-weight: 500; }
.referral-review .link-btn:disabled { opacity: .45; cursor: not-allowed; text-decoration: none; }
#modalTimeUp .modal-actions .btn { height: auto; min-height: 38px; padding: 10px 14px; white-space: normal; }
#modalTimeUp .modal-actions .btn-primary { min-height: 44px; }
#clipVideo { width: 100%; border-radius: 10px; background: #000; margin-bottom: 14px; aspect-ratio: 16/9; }
.share-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.share-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
.share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border: 0; border-radius: 10px; background: var(--panel-3); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; transition: background .15s, transform .05s; }
.share-btn:hover { background: #34343c; }
.share-btn:active { transform: translateY(1px); }
.sb-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; flex: none; }
.sb-ico.tt { background: #000; text-shadow: -1.5px -1px 0 #25f4ee, 1.5px 1px 0 #fe2c55; box-shadow: inset 0 0 0 1px #333; }
.sb-ico.ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.sb-ico.xx { background: #000; box-shadow: inset 0 0 0 1px #444; }
.sb-ico.more { background: var(--accent); }
.share-steps { text-align: left; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; animation: fade .2s; }
.share-steps .st.ok { color: var(--ok); font-weight: 600; }
.share-steps .st.next { font-weight: 700; color: var(--text); }
.share-steps .st.tip { color: var(--muted); }
.share-steps .st.tip b { color: var(--text); font-family: var(--mono); font-size: 12px; }
.share-steps .btn { justify-self: start; margin-top: 4px; }
.share-steps textarea { width: 100%; font-size: 12px; }
.link-row { display: flex; gap: 6px; margin-bottom: 10px; }
.link-row input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.gate-look { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 5px; border-radius: 18px; margin-bottom: 14px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); font-weight: 700; font-size: 13px; }
.gate-look i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; }
.clip-ea { margin-top: 6px; padding: 12px; border-radius: 10px; background: rgba(255,79,163,.1); border: 1px solid rgba(255,79,163,.3); font-size: 13px; }
.clip-ea a { font-weight: 700; }
.ea-form, .lead { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field input.invalid { outline: 2px solid #ff5c5c; }
.hint { font-size: 12px; color: var(--warn); }
.lead-ok { text-align: center; padding: 24px 0 8px; }
.lead-ok p { color: var(--muted); }

.share-opt { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 12px; background: var(--panel-2); margin-bottom: 10px; }
.share-opt b { font-size: 15px; }
.share-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-3); display: grid; place-items: center; font-size: 20px; }
.copy-row { display: flex; gap: 6px; margin-top: 10px; }
.copy-row input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.share-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
#btnNativeShare { margin-top: 10px; }

.drawer-mask { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.55); animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(480px, 100vw); overflow-y: auto; background: var(--panel); border-left: 1px solid var(--border); padding: 28px 28px 32px; transform: translateX(100%); transition: transform .25s ease; }
.drawer.open { transform: translateX(0); }
.drawer-kicker { font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #7fdcff; }
.drawer h2 { font-size: 26px; line-height: 1.15; margin: 8px 0 16px; letter-spacing: -.5px; }
.drawer-points { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 10px; }
.drawer-points li { padding-left: 22px; position: relative; color: var(--muted); }
.drawer-points li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.drawer-points b { color: var(--text); }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(123,97,255,.7); } 70% { box-shadow: 0 0 0 10px rgba(123,97,255,0); } 100% { box-shadow: 0 0 0 0 rgba(123,97,255,0); } }
@keyframes recReady { 0% { box-shadow: 0 0 0 0 rgba(235,4,0,.5); } 70% { box-shadow: 0 0 0 9px rgba(235,4,0,0); } 100% { box-shadow: 0 0 0 0 rgba(235,4,0,0); } }
@keyframes recFrame { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) { :root { --chat-w: 300px; } .brand-by { display: none; } }
@media (max-width: 960px) { .cta-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .layout { display: block; height: auto; }
  .stage { overflow: visible; }
  .player { width: 100%; min-width: 0; }
  .player.gated { aspect-ratio: auto; }
  .player.gated #out { position: absolute; inset: 0; }
  .player.gated .gate { position: relative; min-height: 360px; }
  .chat { height: 380px; border-left: 0; border-top: 1px solid #000; }
  .stage .tray { padding: 12px 14px; }
  .look-card, .look-card .thumb { width: 88px; }
  .look-card .thumb { height: 88px; }
  .stream-info { padding: 12px 14px 6px; }
  .si-actions { width: 100%; }
  .si-actions .btn { flex: 1; }
  .cta-grid { padding: 14px 14px 0; }
  .faq { padding: 22px 14px 0; }
  .gate p { font-size: 14px; margin-bottom: 16px; }
  .btn-xl { height: 48px; font-size: 16px; }
  .tile-label { height: 24px; font-size: 11px; padding: 0 8px; }
  .pip-bar span { display: none; }
  .pip-bar { justify-content: flex-end; }
  .copy-row { flex-wrap: wrap; }
  .copy-row input { width: 100%; flex-basis: 100%; }
  .modal-card { padding: 24px 18px; }
  .hide-sm { display: none; }
  .top-actions { gap: 8px; }
  .btn-ea .soon { display: none; }
  .rec-max { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .share-row { grid-template-columns: 1fr 1fr; }
  .link-row { flex-wrap: wrap; }
  .link-row input { flex-basis: 100%; }
}

/* ---------- Look picker in left sidebar ---------- */
.look-rail { display: none; }
@media (min-width: 821px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr) var(--chat-w); }
  .look-rail { display: block; overflow-y: auto; background: var(--panel); border-right: 1px solid #000; }
  .look-rail .tray { background: var(--panel); padding: 12px; border-bottom: 0; }
  .look-rail .tray-head { margin-bottom: 8px; }
  .look-rail .tray-sub { flex-basis: 100%; font-size: 12px; }
  .look-rail .cats { flex-wrap: wrap; overflow: visible; }
  /* ⚠️ 必须 minmax(0, 1fr) 而不是 1fr：缩略图 <img> 的 min-content 是自然宽 200px，
     1fr 的隐式 auto 最小值会把轨道撑爆（卡片巨幅溢出左栏）。设计稿用 <canvas> 没暴露，
     换 <img> 后必现 —— minmax(0,1fr) 把轨道最小值钉死为 0。 */
  .look-rail .tray-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: visible; padding: 2px 0 0; }
  .look-rail .look-card .name { font-size: 12px; margin-top: 4px; }
  .look-rail .look-card .sub { font-size: 11px; }
  .look-rail .look-card, .look-rail .look-card .thumb { width: 100%; }
  .look-rail .look-card .thumb { height: auto; aspect-ratio: 1 / 1; }
  .look-rail .look-card.orig { margin-right: 0; }
  .look-rail .look-card.orig::after { display: none; }
  .player { width: min(100%, calc((100vh - var(--top-h) - 70px) * 16 / 9)); }
}
@media (min-width: 821px) and (max-width: 1180px) { .layout { grid-template-columns: 240px minmax(0, 1fr) var(--chat-w); } .look-rail .tray-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.btn-rec.soft-off { opacity: .6; }

/* =========================================================
   以下为移植新增（原设计稿没有的部分）
   ========================================================= */

/* TRTC 渲染宿主：透明但占位 —— 不渲染的 <video> 抓不到帧（demo6 教训） */
.rtc-capture { position: fixed; left: 0; bottom: 0; width: 160px; height: 90px; opacity: 0.001; pointer-events: none; z-index: -1; overflow: hidden; }
.rtc-capture video { width: 100%; height: 100%; object-fit: contain; }

/* 建任务等待态（点 look → ACTIVE 约 11–15s） */
.wait-overlay { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(10, 10, 14, .55); backdrop-filter: blur(3px); animation: fade .2s; }
.wait-card { display: grid; justify-items: center; gap: 8px; padding: 18px 26px; border-radius: 14px; background: rgba(14,14,16,.9); box-shadow: 0 10px 40px rgba(0,0,0,.6); text-align: center; }
.wait-card b { font-size: 16px; }
.wait-card span { font-size: 12px; color: var(--muted); }
.wait-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(123,97,255,.25); border-top-color: var(--accent); animation: spin .8s linear infinite; }
