:root { --bg: #0f172a; --panel: #1e293b; --line: #334155; --text: #e2e8f0; --muted: #94a3b8; --guest: #2dd4bf; --staff: #fbbf24; --danger: #f87171; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 system-ui, sans-serif; }
body { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
.bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--panel); }
.bar.bottom { position: sticky; bottom: 0; justify-content: space-between; }
.lang { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.lang select { width: 100%; font-size: 16px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.lang.guest .tag { color: var(--guest); }
.lang.staff .tag { color: var(--staff); }
button { font: inherit; border: 0; border-radius: 10px; padding: 10px 14px; background: var(--line); color: var(--text); min-height: 44px; }
button.icon { font-size: 20px; padding: 6px 10px; }
button.primary { background: var(--guest); color: #042f2e; font-weight: 600; }
.start { flex: 1; max-width: 260px; font-size: 20px; font-weight: 700; background: var(--guest); color: #042f2e; }
.start.running { background: var(--danger); color: #450a0a; }
.ears { display: flex; gap: 6px; }
.ear { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--muted); font-weight: 700; }
#earL.on { background: var(--guest); color: #042f2e; }
#earR.on { background: var(--staff); color: #451a03; }
.status { min-width: 110px; text-align: right; color: var(--muted); font-size: 14px; }
main { flex: 1; overflow-y: auto; padding: 12px; }
.turns { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.turn { max-width: 85%; padding: 10px 12px; border-radius: 14px; background: var(--panel); }
.turn.from-guest { align-self: flex-start; border-left: 4px solid var(--guest); }
.turn.from-staff { align-self: flex-end; border-right: 4px solid var(--staff); }
.turn .orig { color: var(--muted); font-size: 14px; }
.turn .tr { font-size: 18px; margin-top: 4px; }
.turn .tr:empty::after { content: '…'; color: var(--muted); }
.turn.failed { border-color: var(--danger); }
.notice { margin: 8px 12px; padding: 10px; border-radius: 10px; background: #7f1d1d; color: #fecaca; }
dialog { background: var(--panel); color: var(--text); border: 0; border-radius: 16px; width: min(92vw, 420px); padding: 16px; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog form { display: flex; flex-direction: column; gap: 12px; }
dialog h2 { margin: 0 0 4px; font-size: 18px; }
dialog label { display: flex; flex-direction: column; gap: 4px; }
dialog label.row, dialog .row { flex-direction: row; align-items: center; gap: 8px; display: flex; }
dialog input[type=password] { font-size: 16px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
fieldset { border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
progress { flex: 1; height: 12px; }
small { color: var(--muted); }
