:root {
  color-scheme: dark;
  --ink: #f9f4e8;
  --muted: #b1b7ca;
  --night: #10142c;
  --panel: rgba(28, 34, 70, .78);
  --line: rgba(255, 255, 255, .12);
  --orange: #ff976f;
  --gold: #ffd166;
  --mint: #9be3cf;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: radial-gradient(circle at 16% 10%, #29335e 0, transparent 30%), radial-gradient(circle at 90% 10%, #322050 0, transparent 25%), var(--night); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(480px, 100%); margin: 0 auto; padding: 12px 12px 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; position: relative; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
.brand-mark span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.brand-mark span:nth-child(1) { transform: translate(-9px, -5px); }
.brand-mark span:nth-child(2) { transform: translate(7px, 7px); background: var(--mint); }
.brand-mark span:nth-child(3) { transform: translate(9px, -8px); background: var(--orange); }
.live-pill { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 8px 13px; color: var(--muted); background: rgba(255,255,255,.06); font-size: 12px; }
.live-pill.ok { color: #d4fff3; border-color: rgba(155,227,207,.5); background: rgba(155,227,207,.12); }
.live-pill.bad { color: #ffd7cf; border-color: rgba(255,151,111,.5); background: rgba(255,151,111,.12); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 34px; align-items: start; padding: 48px 0 30px; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .section-label { margin: 0 0 12px; color: var(--mint); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 16px var(--orange); }
h1 { margin: 0; font-size: clamp(44px, 8vw, 78px); line-height: .97; letter-spacing: -.07em; }
h1 em { color: var(--orange); font-style: normal; }
.intro { max-width: 380px; margin: 22px 0 26px; color: var(--muted); line-height: 1.7; }
.hero-actions, .button-row, .chat-row { display: flex; gap: 10px; }
.button { min-height: 46px; border: 1px solid transparent; border-radius: 14px; padding: 0 18px; color: var(--ink); font-weight: 700; }
.button-primary { background: var(--orange); color: #241426; box-shadow: 0 9px 28px rgba(255,151,111,.22); }
.button-primary:disabled, .action-card:disabled { cursor: not-allowed; opacity: .45; }
.style-picker { display: grid; gap: 6px; max-width: 280px; margin-top: 14px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.style-picker select { min-height: 42px; border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; color: var(--ink); background: rgba(255,255,255,.05); font-size: 14px; letter-spacing: 0; }
.face-choice { margin-top: 14px; }
.face-choice input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.face-choice-button { display: inline-flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 13px; letter-spacing: 0; cursor: pointer; }
.face-choice-button span { font-size: 11px; letter-spacing: .04em; opacity: .8; }
.face-choice-button:hover { color: var(--ink); }
.face-choice-button[hidden], .face-chip[hidden] { display: none; }
.face-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.05); color: var(--ink); font-size: 12px; }
.face-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.face-chip button { border: 0; padding: 0 6px; background: transparent; color: var(--muted); font-size: 12px; }
.face-chip button:hover { color: var(--ink); }
.face-note { margin: 8px 0 0; color: #ffd7cf; font-size: 12px; }
.face-note:empty, .face-note[hidden] { display: none; }
.button-ghost { border-color: var(--line); background: rgba(255,255,255,.05); }
.pet-stage { position: relative; width: min(100%, 420px, calc(min(78vh, 760px) * 9 / 16)); aspect-ratio: 9 / 16; margin-inline: auto; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: #0b0e1c; box-shadow: 0 32px 80px rgba(0,0,0,.23); }
.pet-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 58%, rgba(8,10,20,.72)); }
.orbit, .moon-glow, .pet-shadow { display: none; }
.remote-video { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: #000; }
.remote-video video { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.video-placeholder { position: absolute; inset: 0; z-index: 2; display: grid; color: var(--muted); text-align: center; }
.video-placeholder[hidden] { display: none; }
.avatar-poster, .room-preview-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.room-preview-video[hidden] { display: none; }
.placeholder-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 64px; display: grid; gap: 5px; justify-items: center; padding: 0 18px; }
.video-placeholder strong { color: var(--ink); font-size: 20px; }
.video-placeholder small { font-size: 12px; }
.placeholder-orbit { display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid rgba(255,209,102,.4); border-radius: 50%; color: var(--gold); font-size: 30px; animation: drift 3s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(-8px) rotate(18deg); } }
.floating-note { position: absolute; z-index: 4; left: 16px; right: 16px; bottom: 58px; max-width: none; padding: 10px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(15,19,43,.8); color: var(--gold); font-size: 12px; }
.floating-note:empty { display: none; }
.tap-hint { position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 8px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(15,19,43,.65); color: var(--muted); font-size: 11px; pointer-events: none; transition: opacity .2s ease; }
.pet-stage:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.tap-ripple { position: absolute; z-index: 5; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid var(--gold); border-radius: 50%; pointer-events: none; animation: tap-ripple .7s ease-out forwards; }
@keyframes tap-ripple { 0% { opacity: .95; transform: scale(.5); box-shadow: 0 0 0 0 rgba(255,209,102,.45); } 100% { opacity: 0; transform: scale(4); box-shadow: 0 0 0 18px rgba(255,209,102,0); } }
.control-panel, .debug-panel { border: 1px solid var(--line); border-radius: 24px; background: var(--panel); backdrop-filter: blur(20px); }
.control-panel { padding: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.action-hint { color: var(--muted); font-size: 12px; }
.control-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 12px; margin-bottom: 12px; }
.field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.field input, .field select, .chat-row input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: rgba(0,0,0,.16); color: var(--ink); }
.field input:focus, .field select:focus, .chat-row input:focus { border-color: var(--orange); }
.button-row { margin-bottom: 12px; }
.action-card { flex: 1; display: flex; align-items: center; gap: 11px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: rgba(255,255,255,.055); text-align: left; }
.action-card:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(255,151,111,.5); background: rgba(255,151,111,.1); }
.action-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; background: rgba(255,209,102,.16); color: var(--gold); font-size: 18px; }
.action-card strong, .action-card small { display: block; }
.action-card strong { font-size: 13px; }
.action-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.chat-row input { flex: 1; }
.chat-row .button { flex: 0 0 auto; }
.status-line { display: flex; align-items: center; gap: 9px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.status-dot.ok { background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.status-dot.bad { background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.knowledge-panel { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(28,34,70,.58); color: var(--muted); }
.knowledge-panel summary { cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 700; }
.knowledge-panel p { margin: 12px 0; font-size: 12px; line-height: 1.6; }
.knowledge-row { display: flex; gap: 8px; }
.knowledge-row input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: rgba(0,0,0,.16); color: var(--ink); }
.knowledge-row input:focus { border-color: var(--orange); }
.knowledge-row .button { min-height: 42px; padding: 0 14px; }
.knowledge-status { min-height: 18px; margin-top: 8px; font-size: 11px; color: var(--mint); }
.debug-panel { margin-top: 14px; padding: 15px 18px; }
.debug-panel summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.debug-panel pre { max-height: 260px; margin: 14px 0 0; overflow: auto; color: #c6c9d8; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 20px 3px 0; color: var(--muted); font-size: 11px; letter-spacing: .05em; }
:root {
  --app-h: 100dvh;
  --stage-w: min(100vw, calc(var(--full-h, var(--app-h)) * 9 / 16));
  --rail-w: 72px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
body:has(.app-shell[data-layout="feed"]) { background: #000; }
.app-shell[data-layout="feed"] { width: 100%; max-width: none; min-height: var(--app-h); padding: 0; background: #000; }
.lobby, .room { position: relative; width: var(--stage-w); height: var(--app-h); margin: 0 auto; overflow: hidden; background: #05060c; }
.live-feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; background: #05060c; scrollbar-width: none; }
.live-feed::-webkit-scrollbar { display: none; }
.feed-card { position: relative; display: block; width: 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; padding: 0; border: 0; background: #070910; color: #fff; text-align: left; user-select: none; }
.feed-card img, .feed-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.feed-cover { opacity: 0; transition: opacity .25s ease; }
.feed-cover.on { opacity: 1; }
.feed-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.42) 0, transparent 18%, transparent 62%, rgba(0,0,0,.78) 100%); }
.feed-top, .feed-side, .feed-copy { position: absolute; z-index: 1; }
.feed-top { top: max(14px, var(--safe-t)); left: 14px; right: 14px; display: flex; align-items: center; gap: 8px; }
.feed-live { padding: 3px 8px; border-radius: 4px; background: #fe2c55; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.feed-viewers { color: #fff; font-size: 13px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.feed-side { right: 8px; bottom: calc(16px + var(--safe-b)); display: grid; justify-items: center; gap: 16px; width: 56px; }
.feed-face { position: relative; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #fe2c55; color: #fff; font-size: 18px; font-weight: 800; }
.feed-follow { position: absolute; left: 50%; bottom: -8px; display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; background: #fe2c55; color: #fff; font-size: 14px; font-weight: 800; line-height: 1; transform: translateX(-50%); }
.feed-face.on .feed-follow { background: #fff; color: #111; }
.feed-like { display: grid; justify-items: center; gap: 2px; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: #fff; }
.feed-heart { font-size: 30px; line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.feed-like small { font-size: 12px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.65); }
.feed-like.on .feed-heart { color: #fe2c55; }
.feed-go { min-width: 52px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: #fe2c55; color: #fff; font-size: 12px; font-weight: 800; }
.feed-copy { left: 14px; right: 78px; bottom: calc(18px + var(--safe-b)); display: grid; gap: 6px; }
.feed-copy strong { font-size: 17px; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.feed-kind { justify-self: start; padding: 2px 8px; border-radius: 4px; background: rgba(255,255,255,.16); font-size: 12px; }
.feed-copy small { display: -webkit-box; overflow: hidden; color: rgba(255,255,255,.92); font-size: 14px; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.heart-burst { position: absolute; z-index: 5; color: #fe2c55; font-size: 42px; line-height: 1; pointer-events: none; text-shadow: 0 8px 18px rgba(0,0,0,.35); animation: heart-float .7s ease-out forwards; }
@keyframes heart-float { 0% { opacity: 1; transform: translate(-50%, -40%) scale(.55); } 100% { opacity: 0; transform: translate(-50%, -150%) scale(1.35); } }
.feed-refresh { position: absolute; z-index: 4; top: max(10px, var(--safe-t)); right: 10px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; }
@media (hover: hover) { .lobby:hover .feed-refresh { opacity: 1; pointer-events: auto; } }
.lobby[hidden], .room[hidden] { display: none; }
.lobby-bar, .room-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lobby h1 { margin: 0; font-size: 28px; letter-spacing: -.04em; line-height: 1; }
.lobby .eyebrow { margin-bottom: 4px; }
.lobby-tools, .room-actions { display: flex; gap: 8px; }
.icon-button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.06); color: var(--ink); font-size: 13px; font-weight: 700; }
.pull-status, .lobby-status { position: absolute; z-index: 4; top: calc(14px + var(--safe-t)); left: 50%; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; white-space: nowrap; transform: translateX(-50%); }
.lobby-status { top: calc(52px + var(--safe-t)); }
.pull-status[hidden], .lobby-status[hidden], .lobby-status:empty { display: none; }
.room-grid { display: grid; gap: 8px; }
.app-shell[data-layout="dual"] .room-grid { grid-template-columns: 1fr 1fr; }
.app-shell[data-layout="single"] .room-grid { grid-template-columns: 1fr; }
.room-card { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #070910; color: var(--ink); text-align: left; }
.room-preview { position: relative; display: block; aspect-ratio: 3 / 4; background: #12151f; }
.app-shell[data-layout="single"] .room-preview { aspect-ratio: 3 / 4; max-height: 72vh; }
.room-preview img, .room-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.room-preview video[hidden] { display: none; }
.room-preview::after { content: ""; position: absolute; inset: auto 0 0; height: 46%; background: linear-gradient(180deg, transparent, rgba(5,6,12,.88)); }
.room-live { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; background: #ff3b4e; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.room-meta { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 10px; display: grid; gap: 2px; }
.room-meta strong, .room-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-meta strong { font-size: 14px; }
.room-meta small { color: rgba(249,244,232,.78); font-size: 12px; }
.app-shell[data-view="room"] { width: 100%; max-width: none; padding: 0; }
.room .pet-stage { width: 100%; height: 100%; aspect-ratio: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.room .pet-stage::after { background: linear-gradient(180deg, rgba(0,0,0,.5) 0, transparent 16%, transparent 62%, rgba(0,0,0,.72) 100%); }
.stage-top { position: absolute; z-index: 6; top: max(10px, var(--safe-t)); left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; }
.stage-back { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 28px; line-height: 1; }
.host-pill { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 8px; max-width: none; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(0,0,0,.38); }
.host-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(160deg, #ffb087, #ff3b4e); color: #fff; font-size: 13px; font-weight: 800; }
.host-copy { min-width: 0; display: grid; }
.host-copy strong, .host-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-copy strong { color: #fff; font-size: 14px; }
.host-copy small { color: rgba(255,255,255,.72); font-size: 11px; }
.stage-top .live-pill { flex: 0 1 auto; max-width: 38%; margin-left: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; background: rgba(0,0,0,.35); }
.stage-stack { position: absolute; z-index: 6; left: 12px; right: calc(var(--rail-w) + 4px); bottom: max(10px, var(--safe-b)); display: flex; flex-direction: column; align-items: stretch; gap: 8px; max-height: 46%; pointer-events: none; }
.stage-stack > * { pointer-events: auto; }
.stage-line { display: -webkit-box; margin: 0; overflow: hidden; color: rgba(255,255,255,.9); font-size: 14px; line-height: 1.35; text-shadow: 0 1px 8px rgba(0,0,0,.65); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.connect-wait { max-height: 34vh; overflow: auto; padding: 14px 14px 12px; border-radius: 16px; background: rgba(8,10,18,.82); color: #fff; backdrop-filter: blur(10px); }
.connect-wait[hidden] { display: none; }
.connect-wait[hidden] { display: none; }
.connect-wait-title { margin: 0; font-size: 16px; font-weight: 800; }
.connect-wait-clock { margin: 4px 0 12px; color: rgba(255,255,255,.72); font-size: 12px; font-variant-numeric: tabular-nums; }
.connect-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.connect-steps li { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; color: rgba(255,255,255,.48); }
.connect-steps li span { grid-row: span 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 800; }
.connect-steps strong, .connect-steps small { display: block; }
.connect-steps strong { font-size: 13px; font-weight: 700; }
.connect-steps small { font-size: 11px; }
.connect-steps li.active { color: #fff; }
.connect-steps li.active span { background: #ff3b4e; }
.connect-steps li.done { color: rgba(255,255,255,.82); }
.connect-steps li.done span { background: #7dcea0; color: #10221c; }
.connect-wait-note { min-height: 16px; margin: 10px 0 0; color: #ffd7a8; font-size: 12px; line-height: 1.4; }
.room .floating-note { position: static; left: auto; right: auto; bottom: auto; max-height: 16vh; overflow: auto; background: rgba(0,0,0,.42); color: #fff; }
.room .tap-hint { display: none; }
.room .placeholder-copy { display: none; }
.room #soundButton { align-self: flex-start; min-height: 40px; }
.stage-stack:has(.connect-wait:not([hidden])) .floating-note,
.stage-stack:has(.connect-wait:not([hidden])) .stage-line { display: none; }
.stage-rail { position: absolute; z-index: 6; right: 8px; bottom: max(10px, var(--safe-b)); display: grid; gap: 14px; justify-items: center; width: 56px; }
.rail-button { display: grid; justify-items: center; gap: 4px; width: 52px; padding: 0; border: 0; background: transparent; color: #fff; }
.rail-button:disabled { opacity: .38; }
.rail-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.38); font-size: 15px; font-weight: 800; }
.rail-mark svg { display: block; }
.room .rail-live { display: none; }
.room.is-live .rail-live { display: grid; }
.room.is-live #connectButton { display: none; }
.rail-button small { font-size: 11px; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
#connectButton .rail-mark { background: #ff3b4e; }
#hangupButton:not(:disabled) .rail-mark { background: rgba(255,151,111,.9); color: #241426; }
#micButton[aria-pressed="true"] .rail-mark { background: var(--mint); color: #10221c; }
.stage-chat { display: flex; gap: 8px; }
.room.is-typing .stage-rail { display: none; }
.room.is-typing .stage-stack { right: 12px; }
.stage-chat input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(0,0,0,.38); color: #fff; }
.stage-chat input::placeholder { color: rgba(255,255,255,.62); }
.stage-chat .button { min-height: 42px; padding: 0 16px; border-radius: 999px; }
.room-sheet { position: absolute; z-index: 8; left: 0; right: 0; bottom: 0; max-height: min(72dvh, 640px); overflow: auto; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: rgba(12,14,24,.94); }
.room-sheet[hidden] { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-state { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.room .style-picker { max-width: none; margin: 0 0 12px; }
.room .knowledge-panel, .room .debug-panel { margin-top: 12px; background: rgba(255,255,255,.04); }
@media (max-height: 700px) {
  .stage-rail, .feed-side { gap: 8px; }
  .rail-mark { width: 40px; height: 40px; }
  .feed-face { width: 42px; height: 42px; }
}
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 38px; } .pet-stage { width: 100%; max-height: none; } .control-grid { grid-template-columns: 1fr; } }
@media (max-width: 440px) { h1 { font-size: 48px; } .hero-actions, .button-row, .knowledge-row { flex-direction: column; } .hero-actions .button, .action-card, .knowledge-row .button { width: 100%; } .chat-row { gap: 7px; } .chat-row .button { padding: 0 14px; } .footer { flex-direction: column; gap: 5px; } }

/* One accent across lobby, room and sheets. */
:root { --accent: #ff2d6f; --accent-2: #ff7a59; --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-2)); --glass: rgba(10,10,18,.46); }
.button-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 10px 26px rgba(255,45,111,.28); }
.feed-live { display: inline-flex; align-items: center; gap: 5px; background: var(--accent); }
.feed-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: live-dot 1.4s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .25; } }
.feed-price { margin-left: auto; margin-right: 92px; padding: 3px 9px; border-radius: 999px; background: var(--glass); color: #ffe6a6; font-size: 12px; font-weight: 700; backdrop-filter: blur(8px); }
.feed-go { min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--accent-grad); box-shadow: 0 6px 18px rgba(255,45,111,.45); animation: go-pulse 2.4s ease-in-out infinite; }
@keyframes go-pulse { 50% { box-shadow: 0 6px 28px rgba(255,45,111,.85); } }
.feed-face, .feed-follow { background: var(--accent); }
.feed-copy strong { font-size: 19px; letter-spacing: -.01em; }
.feed-kind { background: rgba(255,255,255,.18); backdrop-filter: blur(6px); }

/* Call time and account: top of the lobby, in the room header. */
.wallet-pill { flex: 0 0 auto; min-height: 32px; padding: 0 12px; border: 1px solid rgba(255,214,120,.35); border-radius: 999px; background: var(--glass); color: #ffe6a6; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; backdrop-filter: blur(8px); }
.lobby-wallet { position: absolute; z-index: 4; top: max(12px, var(--safe-t)); right: 12px; }
.room .stage-top .live-pill { max-width: 26%; font-size: 11px; }

/* In-call controls: frosted buttons, accent for call/end. */
.rail-mark { background: var(--glass); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); font-size: 18px; }
#connectButton .rail-mark { background: var(--accent-grad); border-color: transparent; box-shadow: 0 8px 22px rgba(255,45,111,.45); }
#hangupButton:not(:disabled) .rail-mark { background: #e8394d; color: #fff; border-color: transparent; }
.stage-chat input { background: var(--glass); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); font-size: 16px; }
.stage-chat .button { box-shadow: none; }
.room .floating-note { border: 0; border-radius: 14px; background: var(--glass); backdrop-filter: blur(10px); font-size: 14px; line-height: 1.4; }
.host-pill, .stage-back { background: var(--glass); backdrop-filter: blur(10px); }
.host-avatar { background: var(--accent-grad); }
.connect-steps li.active span { background: var(--accent); }

/* Accounts */
.feed-account { position: absolute; z-index: 3; top: max(14px, var(--safe-t)); right: 70px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; font-size: 13px; font-weight: 700; }
.overlay { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(5,6,12,.86); }
.overlay[hidden] { display: none; }
.overlay-card { display: grid; gap: 12px; width: min(380px, 100%); padding: 24px 20px; border: 1px solid var(--line); border-radius: 22px; background: #141830; color: var(--ink); }
.overlay-card h2 { margin: 0; font-size: 22px; }
.overlay-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.recovery-lines { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); font-size: 13px; }
.recovery-lines dt { color: var(--muted); }
.recovery-lines dd { margin: 0; font-family: ui-monospace, monospace; font-weight: 700; word-break: break-all; }
.account-sheet { position: fixed; z-index: 20; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.account-form { display: grid; gap: 8px; margin-top: 14px; }
.account-form[hidden] { display: none; }
.account-form input { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--ink); background: rgba(255,255,255,.05); font-size: 15px; }
.privacy-toggle { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--ink); cursor: pointer; }
.privacy-toggle input { min-height: 0; width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: #ff2d6f; }
#deleteForm .button-primary { background: #b3263e; box-shadow: none; }
.feed-wallet { right: 140px; }
.call-time { font-variant-numeric: tabular-nums; }
.call-time[hidden] { display: none; }
.product-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product { position: relative; display: grid; gap: 4px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.06); color: var(--ink); font: inherit; text-align: center; }
.product strong { font-size: 18px; }
.product span { color: var(--muted); font-size: 13px; }
.product em { position: absolute; top: -8px; right: 8px; padding: 1px 6px; border-radius: 999px; background: #e0457b; color: #fff; font-size: 10px; font-style: normal; }
.product:disabled { opacity: .5; }

/* Accounts and buying, in the same look as the rest. */
.feed-account { right: auto; left: 12px; top: max(12px, var(--safe-t)); padding: 0 12px; border: 1px solid rgba(255,255,255,.22); background: var(--glass); color: #fff; }
.feed-wallet { right: 12px; }
.feed-refresh { right: auto; left: 50%; transform: translateX(-50%); }
.feed-top { padding-left: 76px; }
.call-time { min-height: 28px; display: inline-flex; align-items: center; }
.overlay { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.overlay-card { border-color: rgba(255,255,255,.1); background: rgba(16,16,28,.96); box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
.room-sheet { border-top: 1px solid rgba(255,255,255,.1); background: rgba(14,14,24,.96); backdrop-filter: blur(16px); }
.wallet-fine { margin: 0; color: rgba(177,183,202,.8); font-size: 12px; line-height: 1.45; }
.product-list { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.product { padding: 18px 6px 12px; border: 1.5px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.04); }
.product:hover, .product:focus-visible { border-color: var(--accent); background: rgba(255,45,111,.12); }
.product strong { color: #ffe6a6; }
.product span { color: #fff; font-size: 15px; font-weight: 800; }
.product em { top: -9px; left: 50%; right: auto; padding: 2px 8px; background: var(--accent-grad); font-weight: 800; white-space: nowrap; transform: translateX(-50%); }

/* Legal links: one quiet row. .lobby-legal pins it under the feed and lifts the card text above it. */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; margin: 4px 0 0; font-size: 11px; line-height: 1.7; }
.legal-links a { color: rgba(177,183,202,.72); text-decoration: none; }
.legal-links a + a::before { content: "·"; padding: 0 6px; color: rgba(177,183,202,.4); }
.legal-links a:hover, .age-legal a:hover { color: #fff; }
.lobby-legal { position: absolute; z-index: 4; left: 0; right: 0; bottom: var(--safe-b); margin: 0; padding: 0 8px 4px; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.lobby:has(.lobby-legal) .feed-copy { bottom: calc(34px + var(--safe-b)); }
.lobby:has(.lobby-legal) .feed-side { bottom: calc(30px + var(--safe-b)); }
.overlay-card .age-legal { font-size: 12px; text-align: center; }
.age-legal a { color: var(--ink); }
