:root {
  --bg: #07090d;
  --panel: #0f141b;
  --card: #141b25;
  --line: #243040;
  --text: #e8eef6;
  --muted: #8d9bb0;
  --accent: #5ee1ff;
  --warn: #ffb454;
  --danger: #ff6b7a;
  --screen-size: min(72vw, 400px);
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }

.stage { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; padding: 32px; align-items: start; }

.device { display: flex; flex-direction: column; align-items: center; gap: 28px; padding-top: 24px; }

.screen-ring { width: calc(var(--screen-size) + 28px); height: calc(var(--screen-size) + 28px); border-radius: 50%; background: radial-gradient(circle at 30% 25%, #2a3442, #0d1118 70%); display: grid; place-items: center; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 2px #313d4d; }

.screen { width: var(--screen-size); height: var(--screen-size); border-radius: 50%; overflow: hidden; background: #0b0f14; box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8); }

.screen canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

.talk { display: inline-flex; align-items: center; gap: 12px; padding: 18px 34px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--text); font-size: 17px; font-weight: 600; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease; }
.talk:disabled { opacity: 0.45; cursor: not-allowed; }
.talk.recording { background: #2a1116; border-color: var(--danger); transform: scale(0.97); }
.talk.busy { border-color: var(--accent); }
.talk-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.talk.recording .talk-dot { background: var(--danger); box-shadow: 0 0 0 6px rgba(255, 107, 122, 0.25); animation: pulse 1s infinite; }
.talk.busy .talk-dot { background: var(--accent); }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 122, 0.4); } 100% { box-shadow: 0 0 0 14px rgba(255, 107, 122, 0); } }

.hint { color: var(--muted); margin: 0; text-align: center; max-width: 420px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.panel-head { display: flex; align-items: baseline; gap: 10px; }
.brand { font-weight: 800; letter-spacing: 0.08em; font-size: 18px; }
.muted { color: var(--muted); }

.status { padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.status.ok { border-color: #1f5f4a; }
.status.warn { border-color: var(--warn); }
.status.error { border-color: var(--danger); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 16px; }
.card h3 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.card h3:first-child { margin-top: 0; }
.hidden { display: none; }

.qr { width: 220px; height: 220px; margin: 0 auto; padding: 12px; background: #fff; border-radius: 12px; display: grid; place-items: center; }
.qr svg { width: 100%; height: 100%; }
.code { font: 700 30px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.3em; text-align: center; margin: 14px 0 8px; }

.line { margin: 0 0 6px; overflow-wrap: anywhere; }
.reply { color: var(--accent); }
.features { margin: 0; padding-left: 18px; color: var(--warn); }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .panel { order: 2; }
}
