:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#111827;background:#eef1f5}*{box-sizing:border-box}body{margin:0;min-height:100vh}main{max-width:820px;margin:auto;padding:18px 16px 60px}header{display:flex;align-items:flex-start;justify-content:space-between;margin:10px 2px 20px}h1{font-size:1.75rem;margin:.15rem 0}h2{font-size:1.15rem;margin:0 0 12px}h3{font-size:1rem;margin:20px 0 8px}.eyebrow{margin:0;color:#6b7280;font-size:.8rem;text-transform:uppercase;letter-spacing:.09em}.subtitle{color:#6b7280;margin:.25rem 0;font-size:.9rem}.card{background:#fff;padding:17px;margin:14px 0;border-radius:16px;box-shadow:0 6px 24px #1118270d;border:1px solid #e5e7eb}.section-title,.row{display:flex;align-items:center;justify-content:space-between;gap:10px}.row>*{flex:1}.grid{display:grid;gap:9px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.action-grid{margin-top:14px}button,input,select{font:inherit;border-radius:10px;border:1px solid #d1d5db;padding:11px 12px;background:#fff}button{cursor:pointer;font-weight:650}button:disabled{opacity:.5;cursor:not-allowed}button:active:not(:disabled){transform:translateY(1px)}button.primary{background:#111827;color:#fff;border-color:#111827}button.accent{background:#4f46e5;color:#fff;border-color:#4f46e5}button.danger{background:#b91c1c;color:#fff;border-color:#b91c1c}button.danger-outline{color:#b91c1c;border-color:#fecaca}.full{width:100%}.small{padding:7px 10px;font-size:.8rem}label{display:block;margin:12px 0;color:#374151;font-size:.9rem}label input,label select{display:block;width:100%;margin-top:6px}label.consent{display:flex;align-items:flex-start;gap:8px}.consent input{width:auto;margin:3px 0}input[type=range]{padding:0}.badge{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#e5e7eb;font-size:.75rem;font-weight:700}.badge.online,.badge.verified{background:#dcfce7;color:#166534}.badge.offline,.badge.failed{background:#fee2e2;color:#991b1b}.badge.processing,.badge.review_required{background:#fef3c7;color:#92400e}.metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:16px}.metrics div{padding:12px;border-radius:12px;background:#f9fafb;border:1px solid #e5e7eb}.metrics span,.audio-item small{display:block;color:#6b7280;font-size:.75rem;margin-bottom:4px}.transcript{max-height:620px;overflow:auto;display:flex;flex-direction:column;gap:9px}.utterance{padding:11px 13px;border-radius:13px;background:#f3f4f6}.utterance.assistant{background:#eef2ff;border-left:4px solid #6366f1}.utterance.human{border-left:4px solid #10b981}.utterance.review_required{border-left-color:#f59e0b;background:#fffbeb}.utterance p{margin:7px 0;line-height:1.45}.utterance-meta{display:flex;justify-content:space-between;gap:10px;font-size:.8rem}.utterance time,.segment-status{color:#6b7280}.segment-status{font-size:.7rem}.speaker-tools{display:grid;grid-template-columns:1fr auto auto;gap:7px;margin-top:9px}.speaker-tools select,.speaker-tools button{padding:7px 9px;font-size:.78rem}.audio-item{padding:12px 0;border-bottom:1px solid #e5e7eb}.audio-item:last-child{border:0}.audio-item audio{width:100%;margin-top:8px}.hint{color:#6b7280;font-size:.85rem}.no-margin{margin:0}.profile-details{padding:10px 0;color:#4b5563;font-size:.88rem}.participant-panel{padding:10px 0 14px}.participants{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.participant{padding:7px 9px;border-radius:999px;background:#f3f4f6;font-size:.78rem}.participant .voice-ok{color:#166534}.participant .voice-missing{color:#92400e}.debug summary{cursor:pointer;font-weight:700}pre{white-space:pre-wrap;overflow:auto;background:#111827;color:#e5e7eb;padding:12px;border-radius:10px;font-size:.78rem}@media(max-width:560px){.grid.three,.grid.two{grid-template-columns:1fr}.section-title{align-items:flex-start}.metrics{grid-template-columns:1fr 1fr}.speaker-tools{grid-template-columns:1fr 1fr}.speaker-tools select{grid-column:1/-1}}
.metrics .wide{grid-column:1/-1}.summary-panel{white-space:pre-wrap;line-height:1.5;padding:13px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0;margin-bottom:12px}.utterance.decision{border-left:4px solid #2563eb}.utterance.action_item{border-left:4px solid #7c3aed}.utterance.open_question{border-left:4px solid #f59e0b}.utterance.risk{border-left:4px solid #dc2626}

/* ---- Mobile app shell: tabs, state-driven controls, readable status ------- */
/* Bottom tab bar so the eight cards stop being one 7000 px scroll. */
main{padding-bottom:92px}
.tab-bar{position:fixed;left:0;right:0;bottom:0;display:flex;background:#fffffff2;
  backdrop-filter:blur(8px);border-top:1px solid #e5e7eb;padding:6px 8px;
  padding-bottom:calc(6px + env(safe-area-inset-bottom));z-index:20}
.tab-button{flex:1;border:0;background:none;border-radius:12px;padding:8px 4px;
  display:flex;flex-direction:column;align-items:center;gap:2px;
  font-size:.72rem;font-weight:650;color:#6b7280;min-height:48px}
.tab-button span{font-size:1.15rem;line-height:1}
.tab-button.active{color:#111827;background:#f3f4f6}

/* Touch targets: 48 px is the floor, and the primary action is taller still. */
button,select,input:not([type=range]):not([type=checkbox]):not([type=file]){min-height:48px}
button.small{min-height:36px}
button.big{min-height:60px;font-size:1.05rem}
.primary-actions{display:grid;gap:9px;margin:4px 0 12px}

/* Persistent state line, and a separate transient toast, so a command
   acknowledgement can never erase who is in the room. */
.status-line{margin:2px 0 8px;color:#374151;font-size:.9rem}
.toast{margin:0 0 10px;padding:9px 12px;border-radius:10px;background:#eef2ff;
  color:#3730a3;font-size:.85rem;font-weight:600}
.toast.error{background:#fee2e2;color:#991b1b}

/* The assistant toggle mirrors the device's sunflower: one control, its state
   written in words and colour rather than inferred from which button is lit. */
.ai-toggle{display:flex;align-items:center;gap:12px;text-align:left;
  padding:12px 14px;border:1px solid #e5e7eb;background:#f9fafb}
.ai-toggle .ai-flower{font-size:1.9rem;filter:grayscale(1) opacity(.45);line-height:1}
.ai-toggle .ai-text{display:flex;flex-direction:column;gap:2px}
.ai-toggle small{color:#6b7280;font-weight:500}
.ai-toggle.on{background:#fffbeb;border-color:#fcd34d}
.ai-toggle.on .ai-flower{filter:none}
.ai-toggle.on strong{color:#92400e}
.ai-row{display:grid;gap:9px}

/* Collapsible extras keep the everyday surface short. */
details.sub{margin:12px 0 0;border-top:1px solid #eef1f5;padding-top:8px}
details.sub summary{cursor:pointer;font-weight:650;font-size:.9rem;color:#374151;min-height:36px;
  display:flex;align-items:center}
.no-margin-top{margin-top:0}
.history-item{cursor:pointer}
.history-item:active{background:#e5e7eb}

/* ---- Participant picker and admin tab ------------------------------------ */
.picker-results{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.picker-item{display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:10px 12px;border-radius:10px;background:#f3f4f6;cursor:pointer;border:1px solid #e5e7eb}
.picker-item:active{background:#e5e7eb}
.picker-item small{color:#6b7280;display:block}
.picker-item .voice-ok{color:#166534;font-size:.75rem;font-weight:700}
.picker-item .voice-missing{color:#92400e;font-size:.75rem;font-weight:700}
.admin-user{padding:11px 13px;border-radius:12px;background:#f9fafb;border:1px solid #e5e7eb;margin-bottom:8px}
.admin-user .row-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.admin-user small{color:#6b7280;display:block;margin-top:2px}
.role-chip{font-size:.72rem;font-weight:700;padding:4px 9px;border-radius:999px;background:#e5e7eb;cursor:pointer;border:0;min-height:32px}
.role-chip.admin{background:#fef3c7;color:#92400e}
.audit-row{padding:9px 12px;border-left:3px solid #c7d2fe;background:#f8fafc;border-radius:8px;margin-bottom:7px;font-size:.85rem}
.audit-row time{color:#6b7280;font-size:.75rem;display:block}

/* Link to the read-only live view, styled as a quiet secondary button. */
.live-link{display:flex;align-items:center;justify-content:center;min-height:44px;margin-top:8px;
  border:1px solid #d1d5db;border-radius:10px;color:#374151;text-decoration:none;font-weight:650;font-size:.9rem}
.live-link:active{background:#f3f4f6}
