:root { color-scheme: light; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: #eef2f6; color: #17212b; }
.topbar { min-height: 76px; padding: 12px 18px; display: flex; justify-content: space-between; gap: 16px; align-items: center; background: #12324a; color: white; }
h1 { font-size: 19px; margin: 0 0 4px; }
.status { font-size: 13px; color: #c9e4f4; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
button { border: 0; border-radius: 6px; padding: 9px 12px; cursor: pointer; background: #dbe4eb; color: #142332; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: #2bb673; color: white; font-weight: 700; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 10px; height: calc(100vh - 76px); padding: 10px; }
.document-panel { position: relative; min-height: 0; background: white; border-radius: 6px; overflow: hidden; }
#formFrame { border: 0; width: 100%; height: 100%; background: white; }
#loading { padding: 28px; color: #506170; }
.voice-panel { min-height: 0; overflow: auto; background: #f9fbfc; border: 1px solid #d6e0e7; border-radius: 6px; padding: 12px; }
.panel-title { margin: 4px 0 7px; color: #456276; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.partial { min-height: 66px; padding: 10px; border-radius: 6px; background: #edf5f8; color: #264b5c; white-space: pre-wrap; }
.log { display: flex; flex-direction: column; gap: 7px; }
.log-item { border-left: 4px solid #2bb673; background: white; padding: 8px; font-size: 13px; box-shadow: 0 1px 2px #cbd5dc; }
.log-item.low { border-left-color: #e09d24; background: #fff8e8; }
.log-item code { display: block; margin-top: 4px; color: #475b68; white-space: pre-wrap; }
.unmapped { min-height: 44px; padding: 8px; color: #8a4b22; white-space: pre-wrap; }
.save-status { margin-top: 12px; color: #277047; font-size: 13px; }
.voice-ai-low { outline: 3px solid #e09d24 !important; outline-offset: 1px; background-color: #fff6dc !important; }
.voice-ai-high { outline: 2px solid #42ad79 !important; outline-offset: 1px; }
.debug-card { max-width: 520px; margin: 7vh auto; padding: 28px; background: #fff; border: 1px solid #d8e0e8; border-radius: 14px; box-shadow: 0 14px 40px rgba(25, 46, 72, .12); }
.debug-card form { display: grid; gap: 14px; }
.debug-card label { display: grid; gap: 5px; font-weight: 600; }
.debug-card input { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #b9c5d1; border-radius: 7px; }
.debug-note { color: #5b6875; line-height: 1.45; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; height: auto; } .document-panel { height: 80vh; } .voice-panel { max-height: 55vh; } }
