:root {
  color-scheme: dark;
  --bg: #14110e;
  --panel: #221c16;
  --panel2: #1a2a22;
  --ink: #f4efe6;
  --muted: #b9a992;
  --accent: #f0c24b;
  --line: rgba(255,255,255,.08);
  --danger: #ffb4a8;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { min-height: 100dvh; }
.desk { max-width: 720px; margin: 0 auto; padding: 16px 16px 28px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.brand { flex: 1; font-size: 16px; }
.engine { font-size: 12px; color: var(--muted); }
.setup, .room { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.setup h1 { margin: 0 0 8px; font-size: 24px; }
.lead { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.chip.active { background: var(--accent); color: #241b08; border-color: var(--accent); font-weight: 700; }
.primary, .hold, #joinGuest, #copyLink, #micRetry {
  border: 0; border-radius: 14px; cursor: pointer; font: inherit;
}
.primary { width: 100%; background: var(--accent); color: #241b08; font-weight: 700; padding: 14px 16px; }
.joinRow { display: flex; gap: 8px; margin-top: 12px; }
.joinRow input, .shareRow input {
  flex: 1; border-radius: 12px; border: 1px solid var(--line); background: #100e0b; color: var(--ink);
  padding: 12px; font: inherit;
}
#joinGuest, #copyLink { background: #3a3127; color: var(--ink); padding: 0 14px; }
.status { min-height: 1.4em; color: var(--muted); font-size: 14px; margin: 12px 0; }
.alert { background: #3a221c; border: 1px solid #7a3d32; border-radius: 12px; padding: 12px; color: var(--danger); }
.alert button { margin-top: 8px; background: var(--accent); color: #241b08; padding: 8px 12px; }
.roomMeta { display: grid; gap: 14px; margin-bottom: 14px; }
.roleTag { margin: 0; font-size: 18px; font-weight: 700; }
.roomIdLine { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.shareBox label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.shareRow { display: flex; gap: 8px; }
.feed { display: flex; flex-direction: column; gap: 10px; min-height: 180px; max-height: 42vh; overflow: auto; padding: 4px 0 12px; }
.card { border-radius: 14px; padding: 12px 14px; background: #2a231c; border: 1px solid var(--line); }
.card.mine { background: #1f3329; }
.card .who { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.card .orig { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.card .trans { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 600; }
.card .replay { margin-top: 10px; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.hold {
  width: 100%; min-height: 148px; background: var(--panel2); color: var(--ink);
  display: grid; place-items: center; gap: 4px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  border: 1px solid var(--line);
}
.hold.listening { outline: 3px solid var(--accent); }
.hold.busy { opacity: .7; }
.micIcon { width: 36px; height: 36px; }
.holdLabel { font-size: 18px; font-weight: 700; }
.holdHint, .live { font-size: 13px; color: var(--muted); }
.live { min-height: 1.2em; max-width: 90%; }
.deskHint { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
@media (min-width: 800px) {
  .desk { padding-top: 28px; }
  .hold { min-height: 168px; }
}

.ghost { width:100%; margin-top:12px; background:transparent; color:var(--accent); border:1px solid var(--accent); border-radius:14px; padding:12px; font:inherit; cursor:pointer; }
.fineprint { color:var(--muted); font-size:12px; line-height:1.45; margin:10px 0 0; }
.modeRow { display:flex; gap:8px; margin:0 0 12px; }
.modeBtn { flex:1; border:1px solid var(--line); background:#2a231c; color:var(--ink); border-radius:999px; padding:10px 12px; font:inherit; cursor:pointer; }
.modeBtn.active { background:var(--accent); color:#241b08; font-weight:700; border-color:var(--accent); }
#shareLink { background:#3a3127; color:var(--ink); padding:0 12px; border:0; border-radius:12px; cursor:pointer; font:inherit; }
.hold.liveOn { outline:3px solid #6bcf8e; }
@media (max-width: 520px) {
  .desk { padding: 12px 12px calc(18px + env(safe-area-inset-bottom)); }
  .setup h1 { font-size: 22px; }
  .hold { min-height: 160px; border-radius: 18px; }
  .feed { max-height: 36vh; }
}

.privacyBanner {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(240, 198, 116, 0.12);
  border: 1px solid rgba(240, 198, 116, 0.35);
  color: #f0c674;
  font-size: 12px;
  line-height: 1.4;
}
.ephemeralTag {
  color: #f0c674;
  font-weight: 600;
}
.ghost.danger {
  color: #ffb4a2;
  border-color: #ffb4a2;
}
.card.err .trans { color: #ffb4a2; }
.card .replay:disabled { opacity: 0.45; cursor: not-allowed; }