:root {
  --bg: #0b0f14; --panel: #121821; --panel2: #0f141b; --line: #1f2a37; --text: #e6edf3; --muted: #7d8b9c;
  --read: #2ecc71; --mutate: #f5b342; --destr: #ff4d4f; --accent: #4ea1ff;
  font-family: "Inter", "Pretendard", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
header { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--line); gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand h1 { font-size: 18px; margin: 0; letter-spacing: .3px; }
.brand .sub { color: var(--muted); font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #555; display: inline-block; align-self: center; }
.dot.on { background: var(--read); box-shadow: 0 0 8px var(--read); }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg input { display: none; }
.seg span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: var(--muted); }
.seg input:checked + span { color: var(--text); border-color: var(--accent); background: #16233a; }
.toggle { display: flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
main { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 16px; padding: 16px 22px; min-height: calc(100vh - 62px); }
@media (max-width: 1100px) { main { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.panel h3 { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.ptt { position: relative; height: 140px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, #16202c, #0f151d); color: var(--text); font-size: 18px; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; }
.ptt .ring { position: absolute; inset: 0; border-radius: 16px; box-shadow: inset 0 0 0 0 var(--accent); transition: box-shadow .2s; }
.ptt.live .ring { box-shadow: inset 0 0 0 3px var(--read), 0 0 24px rgba(46,204,113,.35); animation: pulse 1.2s infinite; }
.ptt.connecting .ring { box-shadow: inset 0 0 0 3px var(--mutate); }
.ptt .label { position: relative; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: .55; } 100% { opacity: 1; } }
.hint { color: var(--muted); font-size: 12px; text-align: center; }
#typed { display: flex; gap: 8px; }
#typed input { flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 8px 10px; border-radius: 6px; }
button, #typed button { background: #1a2634; border: 1px solid var(--line); color: var(--text); padding: 8px 12px; border-radius: 6px; cursor: pointer; }
button.mini { padding: 2px 8px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.transcript { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; min-height: 84px; }
.transcript .partial { color: var(--muted); font-style: italic; min-height: 18px; }
.transcript .final { font-size: 16px; margin-top: 4px; white-space: pre-wrap; }
.hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hud div { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.hud .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.hud .v { font-variant-numeric: tabular-nums; font-size: 14px; word-break: break-all; }
.examples { display: flex; flex-wrap: wrap; gap: 6px; }
.examples span { font-size: 12px; color: var(--muted); border: 1px dashed var(--line); padding: 4px 8px; border-radius: 999px; cursor: pointer; }
.examples span:hover { color: var(--text); border-color: var(--accent); }
.decision { border-radius: 10px; padding: 14px; border: 1px solid var(--line); background: var(--panel2); transition: background .3s, border-color .3s; }
.decision.idle .empty { color: var(--muted); }
.decision.READ { border-color: var(--read); }
.decision.MUTATE { border-color: var(--mutate); background: #1f1a0f; }
.decision.DESTRUCTIVE { border-color: var(--destr); background: #2a1113; animation: flash .6s; }
@keyframes flash { 0% { background: #5a1a1e; } 100% { background: #2a1113; } }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; letter-spacing: 1px; }
.badge.READ { background: var(--read); color: #05210f; }
.badge.MUTATE { background: var(--mutate); color: #2a1a00; }
.badge.DESTRUCTIVE { background: var(--destr); color: #fff; }
.decision .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.decision .say { font-size: 15px; margin: 6px 0; }
.decision .meta { color: var(--muted); font-size: 12px; }
.decision code { background: #0a0e13; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.decision .actions { display: flex; gap: 8px; margin-top: 10px; }
.decision .actions .ok { background: #2b5f3a; border-color: #3f8a55; }
.decision .actions .no { background: #4a2727; border-color: #7a3a3a; }
.result pre { margin: 0; background: #0a0e13; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; max-height: 260px; overflow: auto; white-space: pre-wrap; }
.containers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; }
.card b { display: block; font-size: 13px; margin-bottom: 4px; }
.card .st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.st.running { background: var(--read); } .st.exited, .st.dead { background: var(--destr); } .st.restarting, .st.paused, .st.created { background: var(--mutate); }
.auditList { list-style: none; margin: 0; padding: 0; overflow: auto; max-height: calc(100vh - 160px); display: flex; flex-direction: column; gap: 6px; }
.auditList li { background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 12px; }
.auditList li.READ { border-left-color: var(--read); } .auditList li.MUTATE { border-left-color: var(--mutate); } .auditList li.DESTRUCTIVE { border-left-color: var(--destr); }
.auditList .t { display: flex; justify-content: space-between; color: var(--muted); }
.auditList .q { margin: 4px 0; }
.auditList .h { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: 10px; word-break: break-all; }
.verify { font-size: 11px; text-transform: none; letter-spacing: 0; }
.verify.ok { color: var(--read); } .verify.bad { color: var(--destr); }
.diag { margin-top: 10px; padding: 10px; border-radius: 8px; background: #0a0e13; border: 1px solid var(--line); }
.diag .dk { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 4px; }
.diag.proposal { border-color: var(--mutate); }
.stage { display: flex; gap: 6px; min-height: 22px; justify-content: center; }
.stage span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); }
.stage span.on { color: var(--accent); border-color: var(--accent); animation: pulse 1s infinite; }
.stage span.done { color: var(--read); border-color: var(--read); }
kbd { background: #1a2634; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 11px; }
