/* Super Idol live room. Black and BNB gold, a portrait stage in the middle like a phone live stream, concert light behind
   her. Framework stage: the look gets its real pass in the name-and-visual stage. */
:root {
  --ink: #0b0906; --ink-2: #15110b; --smoke: #262016; --line: rgba(240, 185, 11, .18);
  --gold: #f0b90b; --champagne: #f6e3a1; --pink: #ff5c93; --paper: #f6f0e4; --muted: #a39780;
  --display: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --side: 380px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ink); color: var(--paper); font: 14px/1.6 var(--sans); display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.test-band { background: repeating-linear-gradient(-45deg, #3a2f0a 0 14px, #2a2208 14px 28px); color: var(--champagne); text-align: center; font-size: 13px; padding: 5px 12px; border-bottom: 1px solid var(--line); }

/* top bar */
.top { display: flex; align-items: center; gap: 22px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--ink-2), var(--ink)); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 36px; height: 36px; border-radius: 50%; display: block; object-fit: cover; box-shadow: 0 0 0 1px rgba(240,185,11,.45); }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font: 700 18px/1.1 var(--display); color: var(--champagne); letter-spacing: .08em; }
.brand-name small { color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 3px 10px; border-radius: 99px; background: rgba(255, 92, 147, .14); color: var(--pink); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); animation: pulse 1.8s infinite; }
.live-pill.off { background: rgba(163, 151, 128, .14); color: var(--muted); }
.live-pill.off i, body.offline .live-pill i { background: var(--muted); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 92, 147, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 92, 147, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 92, 147, 0); } }
.top-stats { display: flex; gap: 20px; color: var(--muted); flex: 1; }
.top-stats b { color: var(--champagne); font-weight: 600; margin-left: 2px; }
.top-actions { display: flex; gap: 8px; }
.btn-gold { background: var(--gold); color: #1a1405; border: 0; border-radius: 8px; padding: 7px 16px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-gold:hover { background: #ffcb2b; }
.ca-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(240, 185, 11, .45); background: rgba(240, 185, 11, .08); color: var(--muted); font-size: 12px; cursor: pointer; white-space: nowrap; }
.ca-chip code { color: var(--gold); font: 600 12px ui-monospace, Menlo, monospace; }
.ca-chip:hover { border-color: var(--gold); }
.btn-ghost { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; color: var(--champagne); white-space: nowrap; }
.btn-ghost:hover, .btn-ghost[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; }

/* layout */
.room { flex: 1; display: grid; grid-template-columns: 1fr var(--side); grid-template-rows: auto 1fr; min-height: 0; }
.room > .stage-col { grid-column: 1; grid-row: 1 / span 2; }
.room > .side { grid-column: 2; grid-row: 2; }
.hero { grid-column: 2; grid-row: 1; padding: 16px 18px 14px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); background: radial-gradient(120% 140% at 100% 0%, rgba(240, 185, 11, .2), transparent 60%), var(--ink-2); }
.hero-t { margin: 0 0 6px; font: 700 19px/1.3 var(--display); color: var(--champagne); letter-spacing: .02em; }
.hero-s { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.hero-steps { list-style: none; counter-reset: s; margin: 0 0 12px; padding: 0; display: grid; gap: 5px; font-size: 13px; }
.hero-steps li { counter-increment: s; display: flex; gap: 8px; align-items: center; }
.hero-steps li::before { content: counter(s); flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(240, 185, 11, .16); color: var(--gold); font-weight: 700; font-size: 12px; }
.hero-go { width: 100%; padding: 11px 16px; font-size: 16px; border-radius: 10px; box-shadow: 0 6px 24px rgba(240, 185, 11, .3); }
.req-row.flash { animation: flash 1.2s ease-out 2; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(240, 185, 11, .8); } 100% { box-shadow: 0 0 0 14px rgba(240, 185, 11, 0); } }
.stage-col { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #2c210b 0, #120e07 45%, #070604 80%); }

/* blurred copy of her current look behind the portrait screen (set by app.js as --look) */
.stage-col::before { content: ""; position: absolute; inset: -40px; background: var(--look, none) center / cover no-repeat; filter: blur(26px) brightness(.62) saturate(1.2); transform: scale(1.08); pointer-events: none; transition: background-image .6s; }
.stage-col::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(7, 6, 4, .6) 100%); pointer-events: none; }
.stage-col > .stage { z-index: 1; }

/* stage: a 9:16 screen like a phone live stream, concert light behind */
.stage { position: relative; height: 100%; max-height: 100%; aspect-ratio: 9 / 16; max-width: 100%; }
/* landscape stage (user 10-07): 16:9, as large as the column allows; phones keep 9:16 and crop the middle (she stands centered) */
.stage-col { container-type: size; }
.stage[data-shape="wide"] { aspect-ratio: 16 / 9; height: auto; width: min(100cqw, 100cqh * 16 / 9); }
.stage-glow { position: absolute; inset: -12% -40%; background: conic-gradient(from 200deg at 50% 0%, transparent 0 40deg, rgba(240, 185, 11, .16) 50deg, transparent 70deg, transparent 290deg, rgba(255, 92, 147, .12) 300deg, transparent 320deg); filter: blur(14px); animation: sweep 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes sweep { to { transform: rotate(8deg); } }
.screen { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: #000 center / cover no-repeat; border: 1px solid rgba(240, 185, 11, .35); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 6px rgba(0, 0, 0, .35); }
.idol { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 50% 90%; animation: breathe 4.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.006, 1.012); } }
.screen.talking .idol { animation: breathe 4.6s ease-in-out infinite, nod 1.1s ease-in-out infinite; }
@keyframes nod { 50% { translate: 0 2px; } }
.live-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.volc-view video { width: 100%; height: 100%; object-fit: cover; }
.rtc { position: absolute; inset: auto 0 45% 0; text-align: center; color: var(--champagne); font-size: 13px; }
/* action effects over the placeholder picture */
.screen[data-fx="dance"] .idol { animation: dance .5s ease-in-out 5; }
@keyframes dance { 25% { transform: rotate(-3deg) translateY(-6px); } 75% { transform: rotate(3deg) translateY(-6px); } }
.screen[data-fx="spin"] .idol { animation: spin 1.2s ease-in-out; }
@keyframes spin { 50% { transform: scaleX(-1); } }
.screen[data-fx="bow"] .idol { animation: bow 1.6s ease-in-out; }
@keyframes bow { 40%, 60% { transform: rotateX(18deg) translateY(10px); } }
.screen[data-fx="wave"] .idol, .screen[data-fx="wink"] .idol, .screen[data-fx="pout"] .idol { animation: bounce .45s ease-in-out 3; }
@keyframes bounce { 50% { transform: translateY(-8px); } }
.fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fx i { position: absolute; bottom: 30%; font-size: 30px; font-style: normal; animation: float 2.2s ease-out forwards; opacity: 0; }
@keyframes float { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -320px) scale(1.3); } }
.action-tag { position: absolute; top: 16px; left: 50%; translate: -50% 0; padding: 4px 14px; border-radius: 99px; background: rgba(255, 92, 147, .9); color: #fff; font-weight: 700; font-size: 13px; }
.action-tag.pop { animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* subtitles over the bottom of the screen */
.subtitle { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 60px 18px 18px; border-radius: 0 0 22px 22px; background: linear-gradient(transparent, rgba(0, 0, 0, .78) 45%); pointer-events: none; }
.sub-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sub-meta b { color: var(--gold); }
.sub-line { margin: 0; font-size: 18px; line-height: 1.6; font-weight: 600; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); min-height: 1.6em; max-height: 6.4em; overflow: hidden; }

/* off air */
.offair { position: absolute; inset: 0; z-index: 3; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: rgba(8, 6, 3, .78); backdrop-filter: blur(6px); }
.offair p { margin: 0; }
.offair-k { font: 800 34px/1.1 var(--display); color: var(--champagne); letter-spacing: .18em; }
.offair-t { margin-top: 14px !important; color: var(--muted); }
.offair-t b { color: var(--gold); font-size: 20px; margin-left: 4px; }
.offair-c { margin-top: 6px !important; font: 700 30px/1 ui-monospace, Menlo, monospace; color: var(--paper); letter-spacing: .08em; }
.offair-n { margin-top: 18px !important; max-width: 28em; color: var(--muted); font-size: 13px; }

/* level up banner */
.levelup { position: absolute; z-index: 4; top: 38%; left: 50%; translate: -50% 0; text-align: center; padding: 16px 30px; border-radius: 14px; background: linear-gradient(135deg, #f0b90b, #ffde7a 50%, #f0b90b); color: #1a1405; box-shadow: 0 0 60px rgba(240, 185, 11, .6); }
.levelup small { display: block; font-weight: 700; letter-spacing: .3em; font-size: 12px; }
.levelup strong { font: 800 28px/1.2 var(--display); letter-spacing: .1em; }
.levelup.show { animation: lvl 4.2s ease-in-out forwards; }
@keyframes lvl { 0% { opacity: 0; transform: scale(.5); } 10% { opacity: 1; transform: scale(1.08); } 16%, 85% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }

/* side column */
.side { border-left: 1px solid var(--line); background: var(--ink-2); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.card { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card h2 { margin: 0 0 10px; font-size: 15px; color: var(--champagne); }
.card h2 small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ladder li { border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 5px; display: flex; flex-direction: column; gap: 1px; font-size: 12px; position: relative; }
.ladder .no { font-size: 10px; color: var(--muted); }
.ladder .rung-name { font-weight: 700; color: var(--paper); line-height: 1.3; }
.ladder .rung-usd { font-size: 11px; color: var(--muted); }
.ladder li.done { background: rgba(240, 185, 11, .08); }
.ladder li.done .rung-name { color: var(--champagne); }
.ladder li.now { border-color: var(--gold); background: rgba(240, 185, 11, .16); box-shadow: 0 0 18px rgba(240, 185, 11, .25); }
.ladder li.now .rung-name { color: var(--gold); }
.ladder li.lock { opacity: .55; }
.next { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.next b { color: var(--gold); }
.bar { display: block; height: 5px; border-radius: 3px; background: var(--smoke); margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--pink)); }

.president { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: linear-gradient(135deg, rgba(240, 185, 11, .22), rgba(255, 92, 147, .1)); border: 1px solid rgba(240, 185, 11, .4); }
.p-label { grid-row: span 2; align-self: center; font-size: 12px; font-weight: 700; color: #1a1405; background: var(--gold); padding: 3px 8px; border-radius: 6px; }
.president strong { color: var(--champagne); font-family: ui-monospace, Menlo, monospace; }
.president span:last-child { font-size: 12px; color: var(--muted); }
.board { list-style: none; margin: 8px 0 0; padding: 0; }
.board li { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; padding: 3px 4px; font-size: 12px; color: var(--muted); }
.board .rk { color: var(--champagne); font-weight: 700; text-align: center; }
.board .who { font-family: ui-monospace, Menlo, monospace; color: var(--paper); }
.board .amt { color: var(--champagne); }
.tier { font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--smoke); color: var(--muted); }
.tier-whale .tier, .tier.tier-whale { background: rgba(240, 185, 11, .2); color: var(--gold); }
.tier-fan .tier, .tier.tier-fan { background: rgba(255, 92, 147, .15); color: var(--pink); }
.exes { margin-top: 6px; font-size: 12px; color: var(--muted); }
.exes span { margin-right: 6px; font-family: ui-monospace, Menlo, monospace; text-decoration: line-through; }

.tabs-box { flex: 1; display: flex; flex-direction: column; min-height: 260px; }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--gold); border-color: var(--gold); }
.tab-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat, .feed { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; max-height: 340px; }
.chat li { padding: 6px 0; border-bottom: 1px solid rgba(240, 185, 11, .07); }
.chat .who { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--champagne); margin-right: 6px; }
.chat p { margin: 2px 0 0; }
.chat em { font-style: normal; font-size: 11px; color: var(--pink); }
.feed li { display: flex; gap: 6px; align-items: baseline; padding: 5px 0; font-size: 13px; border-bottom: 1px solid rgba(240, 185, 11, .07); }
.feed li.buy b { color: #3ecf8e; } .feed li.sell b { color: #ff6b6b; }
.feed li.stage, .feed li.top { color: var(--gold); }
.feed .who { font-family: ui-monospace, Menlo, monospace; color: var(--champagne); }
.feed small { color: var(--muted); }
.feed time { margin-left: auto; font-size: 11px; color: var(--muted); }
.empty { color: var(--muted); }
.say { margin-top: 10px; }
.me { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.me b { color: var(--gold); }
.me button { margin-left: auto; background: none; border: 0; color: var(--muted); text-decoration: underline; }
.say-row { display: flex; gap: 6px; }
.say-row input { flex: 1; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.login-row { display: flex; gap: 6px; }
.req-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.req-label { flex: none; font-size: 12px; color: var(--pink); font-weight: 700; padding-top: 5px; }
.req-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.btn-req { background: rgba(255, 92, 147, .1); border: 1px solid rgba(255, 92, 147, .45); border-radius: 999px; padding: 3px 11px; font-size: 12px; color: var(--paper); cursor: pointer; }
.btn-req:hover:not(:disabled) { background: rgba(255, 92, 147, .25); border-color: var(--pink); }
.btn-req:disabled { opacity: .35; cursor: default; }
.chat li.request p { color: var(--pink); }
.chat li.tier-guest .tier { color: var(--muted); }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.hint.bad { color: #ff8a8a; }
.diary-dates { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.diary-dates button { background: var(--smoke); border: 0; border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--muted); }
.diary-dates button.on { background: var(--gold); color: #1a1405; }
.diary { overflow-y: auto; max-height: 340px; }
.diary h3 { margin: 0 0 6px; font-size: 14px; color: var(--champagne); }

.foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 6px 18px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.route { margin-right: 8px; }
.route.ok::before { content: "●"; color: #3ecf8e; margin-right: 3px; }
.route.down::before { content: "●"; color: #ff6b6b; margin-right: 3px; }
.route.off::before { content: "●"; color: #555; margin-right: 3px; }
#testTools button { background: var(--smoke); border: 0; border-radius: 5px; padding: 2px 8px; margin-left: 4px; font-size: 12px; color: var(--champagne); }

/* first visit */
.intro { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); padding: 16px; }
.intro-card { width: min(520px, 100%); background: var(--ink-2); border: 1px solid rgba(240, 185, 11, .45); border-radius: 16px; padding: 26px 26px 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.intro-card h1 { margin: 0; font: 800 28px/1.2 var(--display); color: var(--champagne); letter-spacing: .06em; }
.intro-card h1 small { font-size: 14px; color: var(--gold); letter-spacing: .04em; margin-left: 6px; }
.intro-lead { color: var(--paper); margin: 10px 0 14px; }
.intro-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.intro-steps b { display: block; color: var(--gold); }
.intro-steps span { color: var(--muted); font-size: 13px; }
.intro-status { margin: 14px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--smoke); color: var(--champagne); font-size: 13px; }
.intro-actions { display: flex; gap: 14px; align-items: center; margin-top: 16px; }

/* phone: stage on top, panels below */
@media (max-width: 860px) {
  body { height: auto; min-height: 100dvh; }
  .top { flex-wrap: wrap; gap: 10px; padding: 8px 12px; }
  .top-stats { order: 3; flex-basis: 100%; gap: 14px; font-size: 12px; }
  .top-actions { margin-left: auto; }
  #howBtn { display: none; }
  .room { display: block; }
  .hero { border-left: 0; padding: 12px 14px; }
  .hero-t { font-size: 17px; }
  .hero-steps { grid-template-columns: repeat(3, 1fr); font-size: 11.5px; }
  .hero-steps li { flex-direction: column; text-align: center; gap: 4px; }
  .stage-col { padding: 10px; height: min(78dvh, 720px); }
  .stage[data-shape="wide"] { aspect-ratio: 9 / 16; height: 100%; width: auto; }
  .side { border-left: 0; overflow: visible; }
}
@media (prefers-reduced-motion: reduce) {
  .idol, .stage-glow, .live-pill i { animation: none !important; }
}

/* Idol factory teaser (concept only) */
.soon { background: linear-gradient(160deg, rgba(255, 92, 147, .10), rgba(240, 185, 11, .06) 60%, transparent); }
.soon-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--pink); color: var(--pink) !important; font-size: 11px !important; font-weight: 700 !important; }
.soon-lead { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--paper); }
.soon-steps { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.soon-steps li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--paper); }
.soon-steps b { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1a1405; font-size: 11px; }

/* 马丽 slipping out (user 10-07): her real self, louder and off-script */
#line .slip { color: #ff8a3d; font-weight: 700; }

/* 忘关麦: the show is over but the mic is still on */
.live-pill.mic { background: #c0182a; color: #fff; animation: micBlink 1s steps(2, start) infinite; }
.live-pill.mic i { background: #fff; }
@keyframes micBlink { to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .live-pill.mic { animation: none; } }

/* backstage change between stages: two curtains close over her while the avatar reconnects */
.backstage { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; overflow: hidden; }
.backstage .curtain { position: absolute; top: 0; bottom: 0; width: 51%; background: repeating-linear-gradient(90deg, #6d0f16 0 18px, #8e1820 18px 34px, #5a0b12 34px 44px); box-shadow: inset 0 -60px 80px rgba(0,0,0,.5); animation: curtainIn .9s ease-out both; }
.backstage .curtain.l { left: 0; transform-origin: left; }
.backstage .curtain.r { right: 0; transform-origin: right; }
.backstage p { position: relative; margin: 0; padding: 14px 22px; border-radius: 14px; background: rgba(0,0,0,.55); border: 1px solid rgba(240,185,11,.5); text-align: center; color: #fff; }
.backstage b { display: block; font-size: 22px; color: var(--gold, #F0B90B); letter-spacing: .08em; }
.backstage small { display: block; margin-top: 4px; opacity: .85; }
@keyframes curtainIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
