.topbar{max-width:1600px;margin:auto;padding:22px 36px 0;display:flex;align-items:center;justify-content:space-between;gap:20px}.wordmark{display:flex;align-items:center;gap:9px;color:var(--text);text-decoration:none;font-size:24px;font-weight:800;letter-spacing:1px}.wordmark small{font-size:10px;font-weight:500;letter-spacing:2px;color:#817568;margin-left:4px}.brandeyes{background:var(--orange);border-radius:10px;color:white;padding:0 9px 4px;letter-spacing:4px;font-size:25px;line-height:24px}.topbar nav{display:flex;gap:5px;background:#eee7dc;padding:5px;border-radius:12px;margin:0}.topbar nav a{display:block;color:#76695c;text-decoration:none;font-size:13px;font-weight:500;padding:10px 16px;border-radius:8px}.topbar nav a[aria-current]{background:var(--card);color:var(--orange);box-shadow:0 1px 4px #0001}.console-main{max-width:1480px}.console-main h1{margin-top:8px}.eyebrow{font-size:11px;font-weight:600;letter-spacing:2px;color:var(--orange);margin-bottom:12px}.console-main p{font-size:14px}.console-main .btn,.console-main select,dialog .btn{font-size:13px}.connection-strip{background:#eee9e0;border:1px solid var(--line);border-radius:10px;padding:13px 17px;margin-bottom:22px;display:flex;gap:20px;justify-content:space-between;font-size:13px;color:#746a60}.connection-strip.connected{background:#edf2e8;color:#436e4d}.connection-strip.failed{background:#fceee5;color:#9c4f2f}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.stat{display:flex;flex-direction:column;gap:19px}.stat span{font-size:13px;color:#85796c}.stat strong{font-size:32px;font-weight:600}.stat .time-stat{font-size:23px;padding-top:10px}.actions{display:flex;gap:8px;flex-wrap:wrap}.wrap{flex-wrap:wrap}.log-tools{display:flex;align-items:end;gap:16px;margin:23px 0}.log-tools label,.field{display:flex;flex-direction:column;gap:9px;font-size:13px}.search-label{flex:1}.log-tools input[type=search],.log-tools select,textarea{background:#fdfaf5;border:1px solid var(--line);border-radius:9px;padding:12px;color:var(--text);font:inherit;min-width:0}.log-tools .checkbox{display:flex;align-items:center;flex-direction:row;margin-bottom:12px;white-space:nowrap;font-size:12px}.checkbox input{accent-color:var(--orange)}.terminal{background:#262922;color:#dfe5d9;border-radius:12px;height:410px;overflow:auto;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;padding:18px}.log-empty{display:flex;min-height:360px;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:15px;color:#c2c9b9}.log-empty h3{font-size:16px;font-weight:500}.log-empty p{font-size:13px;color:#a7b09e;line-height:1.9}.terminal-symbol{font-size:36px;color:#a9b597}.log-line{display:grid;grid-template-columns:82px 58px 135px 1fr;gap:10px;font-size:12px;line-height:1.9;padding:6px 0;border-bottom:1px solid #ffffff0c}.log-line[data-source=backend]{background:#ffffff07;border-radius:4px;padding-left:4px;padding-right:4px}.log-line time{color:#a4b298}.log-line .level{font-size:10px;color:#a9cda4}.log-line[data-level=WARN] .level{color:#f2c875}.log-line[data-level=ERROR] .level{color:#ffab99}.log-line .tag{color:#bcb4a2;overflow-wrap:anywhere}.log-line[data-source=backend] .tag{color:#9cc7e8}.log-line[data-tag="Bạn"] .tag,.log-line[data-tag="Bạn"] .message{color:#8fd8ff}.log-line[data-tag="Gemini"] .tag,.log-line[data-tag="Gemini"] .message{color:#72efa1}.log-line .message{white-space:pre-wrap;overflow-wrap:anywhere}.voice-params{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:16px}.voice-params .param{background:#faf6ef;border:1px solid var(--line);border-radius:10px;padding:12px}.voice-params .param .row{font-size:12px;margin-bottom:8px}.status-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:11px;background:#eee7dc;color:#746a60}.status-pill.ok{background:#edf2e8;color:#436e4d}.status-pill.warn{background:#fcf1e1;color:#9c621f}.status-pill.err{background:#fceee5;color:#9c4f2f}.header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.control-state{font-size:10px;color:var(--muted);margin-top:6px;display:block}.terminal-footer{display:flex;justify-content:space-between;font-size:12px;color:#8c8174;margin-top:14px}.voice-layout{display:grid;grid-template-columns:1.5fr 1fr;gap:22px;align-items:start}.voice-side{display:grid;gap:20px}.voice-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:13px;margin:25px 0}.voice-option{display:flex;align-items:center;gap:13px;text-align:left;border:1px solid var(--line);background:#fffcf7;border-radius:12px;padding:18px;position:relative;min-width:0}.voice-option[aria-checked=true]{background:#fff4e8;border-color:var(--orange);box-shadow:0 0 0 1px var(--orange)}.voice-avatar{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:#f2e7d8;color:var(--orange);font-size:21px;flex-shrink:0}.voice-option b{display:block;font-size:15px;font-weight:600;overflow-wrap:anywhere}.voice-option small{display:block;font-size:12px;color:#897b6b;margin-top:6px}.voice-option .check{margin-left:auto;color:var(--orange)}.field{margin-top:22px}textarea{resize:vertical;font-size:14px;line-height:1.7;width:100%}.hint{background:#f3eee5;border-radius:10px;padding:15px;font-size:12px;line-height:1.8;color:#827361;margin-top:20px}.wide{width:100%;margin-top:15px;padding:12px}.voice-side audio{width:100%;margin-top:15px}.voice-side .note{font-size:12px;line-height:1.8}.applied-voice{padding:20px 0 5px}.applied-voice span{display:block;font-size:25px;color:var(--orange);font-weight:600}.applied-voice small{display:block;margin-top:8px;color:#85796c;font-size:12px}button:disabled{opacity:.5;cursor:not-allowed}.console-main .note{font-size:12px}.console-main .badge{white-space:normal}dialog p.note{font-size:12px}#connectionMessage{color:#9c4f2f}.hidden{display:none!important}
@media(min-width:1450px){.topbar{padding:25px 48px 0}}@media(max-width:850px){.voice-layout{grid-template-columns:1fr}.voice-side{grid-template-columns:1fr 1fr}.log-tools{flex-wrap:wrap}.search-label{min-width:50%}.log-line{grid-template-columns:75px 55px 1fr}.log-line .tag{display:none}.topbar{padding:20px 22px 0}.topbar nav a{padding:10px 12px}}@media(max-width:600px){.topbar{flex-direction:column;align-items:flex-start;padding:20px 16px 0;gap:17px}.topbar nav{width:100%;justify-content:space-between}.topbar nav a{font-size:12px;padding:10px;flex:1;text-align:center}.console-main header{flex-direction:column;gap:16px}.console-main h1{font-size:26px}.console-main header p{font-size:13px}.stat-grid{grid-template-columns:1fr 1fr;gap:10px}.stat{padding:17px;gap:12px}.stat strong{font-size:28px}.stat .time-stat{font-size:21px;padding-top:6px}.stat span{font-size:12px}.voice-side{grid-template-columns:1fr}.voice-cards{gap:10px}.voice-option{padding:14px 10px;gap:9px}.voice-avatar{width:33px;height:33px;font-size:17px}.voice-option small{font-size:11px}.voice-option .check{display:none}.connection-strip{font-size:11px;gap:10px;flex-wrap:wrap}.log-tools .checkbox{margin-bottom:0}.terminal{height:390px;padding:12px}.log-line{font-size:11px;grid-template-columns:65px 45px 1fr;gap:5px}.console-main .btn{font-size:12px}.terminal-footer{font-size:10px;gap:10px}.wordmark small{font-size:9px} }
/* Per-question timing stays separate from the raw device log stream. */
.topbar nav { flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { padding: 10px 12px; }
@media (max-width: 1000px) { .topbar { flex-wrap: wrap; } .topbar nav { width: 100%; justify-content: flex-start; } }
.test-section, .test-control { margin-bottom: 22px; padding: 26px; }
.test-control [role="status"] { padding: 14px 0; line-height: 1.6; overflow-wrap: anywhere; }
.expression-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 22px; }
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 22px; }
.expression-option, .scenario-option { border: 1px solid var(--line); border-radius: 12px; padding: 20px 16px; background: #fffcf7; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 10px; font: inherit; }
.expression-option { align-items: center; text-align: center; }
.scenario-option { text-align: left; }
.expression-icon { font-size: 30px; }
.expression-option small, .scenario-option small { color: var(--muted); font-size: 12px; line-height: 1.7; }
.expression-option:hover, .scenario-option:hover, .expression-option.selected, .scenario-option.selected { background: #fff4e8; border-color: var(--orange); }
.expression-option:focus-visible, .scenario-option:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.duration-field { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.duration-field select { width: auto; padding: 8px; }
@media (max-width: 600px) { .test-section, .test-control { padding: 18px; } .topbar nav { flex-wrap: wrap; } .expression-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .scenario-grid { grid-template-columns: 1fr; } }

.turn-card { margin-bottom: 22px; padding: 24px; }
.turn-detail { border-top: 1px solid var(--border, #e5ded3); padding: 18px 0 8px; }
.turn-detail .row { gap: 8px; justify-content: space-between; }
.turn-question, .turn-answer { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; margin: 10px 0; }
.turn-answer { color: #655a50; }
.turn-stages { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0; }
.turn-stage { min-width: 110px; display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 12px; background: #f4f0e9; border: 1px solid transparent; }
.turn-stage[data-status="running"] { border-color: #d87a38; background: #fff1df; }
.turn-stage[data-status="error"], .turn-stage[data-status="cancelled"] { border-color: #c74949; }
.turn-stage strong { font-variant-numeric: tabular-nums; }
.turn-stage small { font-size: 11px; }
.turn-totals { line-height: 1.7; }
@media (max-width: 600px) { .turn-card { padding: 16px; } .turn-stage { flex: 1 1 100px; } }
