:root {
  --bg: #050914;
  --card: rgba(15, 23, 42, .78);
  --card2: rgba(2, 6, 23, .62);
  --muted: #8ea3bd;
  --text: #eaf6ff;
  --accent: #38d8ff;
  --accent2: #9f7cff;
  --danger: #fb7185;
  --ok: #34d399;
  --warning: #fbbf24;
  --border: rgba(160, 220, 255, .16);
  --glass: rgba(255,255,255,.08);
  --shadow: 0 24px 80px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(56,216,255,.18), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(159,124,255,.18), transparent 30%),
    radial-gradient(circle at center, #111a2f, var(--bg) 64%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 78%);
}

.shell {
  max-width: 1420px;
  margin: 0 auto;
  padding: 28px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.hero-v04 h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: .9;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #fff, #7ee7ff, #c4b5fd);
  -webkit-background-clip: text;
  color: transparent;
}

.eyebrow {
  color: #8eeaff;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .24em;
  margin-bottom: 10px;
}

h1 { margin: 0; font-size: 42px; }
h2 { margin-top: 0; font-size: 20px; letter-spacing: -.02em; }
h3 { margin-bottom: 8px; }
p { color: var(--muted); }

.card,
.control-card,
.avatar-card {
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.035));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.lisa-dashboard {
  display: grid;
  grid-template-columns: minmax(360px, 540px) 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}

body.guest-mode .owner-only {
  display: none !important;
}

body.guest-mode #provider,
body.guest-mode #onlineModeBtn,
body.guest-mode #webrtcModeBtn,
body.guest-mode #autoListenBtn,
body.guest-mode #speakLastBtn,
body.guest-mode #sendChatBtn,
body.guest-mode .voiceOptions {
  display: none !important;
}

body.guest-mode .voicePanelGrid,
body.guest-mode .voiceMeter {
  display: none;
}

body.guest-mode {
  height: 100dvh;
  overflow: hidden;
}

body.guest-mode .shell {
  width: 100%;
  max-width: 1280px;
  height: 100dvh;
  min-height: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  grid-template-rows: auto minmax(220px, .54fr) minmax(0, .46fr);
  grid-template-areas:
    "hero hero"
    "avatar chat"
    "camera chat";
  gap: 12px;
  overflow: hidden;
}

body.guest-mode .hero {
  grid-area: hero;
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: 0;
  padding: 0 2px;
}

body.guest-mode .hero-v04 h1 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: 0;
  line-height: 1;
}

body.guest-mode .eyebrow {
  margin-bottom: 4px;
}

body.guest-mode .hero p {
  display: none;
}

body.guest-mode .lisa-dashboard {
  display: contents;
}

body.guest-mode .guest-main-grid {
  display: contents;
}

body.guest-mode .avatar-card,
body.guest-mode .card {
  border-radius: 14px;
  padding: 12px;
  margin: 0;
  min-width: 0;
  min-height: 0;
}

body.guest-mode .avatar-card {
  grid-area: avatar;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.guest-mode .camera-card {
  grid-area: camera;
  overflow: auto;
}

body.guest-mode.visitor-verified .shell {
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "hero hero"
    "avatar chat";
}

body.guest-mode.visitor-verified .camera-card {
  display: none !important;
}

body.guest-mode .chat-card {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.guest-mode .avatar-frame {
  min-height: 0;
  flex: 1;
  border-radius: 14px;
}

body.guest-mode .avatar-core {
  width: min(265px, 84%);
}

body.guest-mode .voice-wave {
  flex: 0 0 auto;
  margin: 6px 0 0;
}

body.guest-mode .camera-card h2,
body.guest-mode .chat-card h2 {
  margin-bottom: 8px;
  font-size: 17px;
}

body.guest-mode .camera-card .row,
body.guest-mode .chat-card .row {
  gap: 8px;
}

body.guest-mode #micBtn {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  border-color: rgba(56,216,255,.52);
  background: linear-gradient(135deg, rgba(56,216,255,.34), rgba(159,124,255,.28));
}

body.guest-mode .voicePanel {
  flex: 0 0 auto;
  margin-top: 8px;
}

body.guest-mode .voiceTranscript {
  max-height: 58px;
  min-height: 42px;
}

body.guest-mode .chatInput {
  flex: 0 0 auto;
  min-height: 82px;
  max-height: 96px;
  margin: 8px 0;
  resize: none;
}

body.guest-mode .chatBox {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

body.guest-mode video {
  min-height: 0;
  height: clamp(82px, 16vh, 128px);
  object-fit: cover;
}

body.guest-mode .camera-card .result {
  min-height: 42px;
  max-height: 70px;
  overflow: auto;
}

body.guest-mode .guestEnroll {
  margin-top: 8px;
  padding: 10px;
}

body.guest-mode .guestEnroll h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

body.guest-mode .guestEnroll .hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.3;
}

body.owner-authorized .guestEnroll {
  display: none;
}

.guestEnroll {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2, 6, 23, .38);
}

.guestEnroll h3 {
  margin-top: 0;
}

.guestEnroll input,
.guestEnroll button {
  margin-top: 8px;
}

@media (max-width: 1050px) {
  .lisa-dashboard,
  .grid,
  .grid2 { grid-template-columns: 1fr; }
  body.guest-mode .guest-main-grid,
  body.guest-mode .lisa-dashboard { display: contents; }
  .hero { flex-direction: column; align-items: flex-start; }
  .internalDocsToolbar,
  .internalDocLayout { grid-template-columns: 1fr; }
  .internalDocResults,
  .internalDocViewer { max-height: none; }
}

@media (max-width: 760px) {
  body.guest-mode .shell {
    padding: 8px;
    gap: 8px;
    grid-template-columns: 1fr;
    grid-template-rows: auto 148px minmax(0, 1fr) 174px;
    grid-template-areas:
      "hero"
      "avatar"
      "chat"
      "camera";
  }

  body.guest-mode .status {
    font-size: 11px;
    padding: 8px 10px;
  }

  body.guest-mode .hero {
    flex-direction: row;
    align-items: center;
  }

  body.guest-mode .hero-v04 h1 {
    font-size: 24px;
  }

  body.guest-mode .eyebrow {
    font-size: 10px;
    letter-spacing: .14em;
  }

  body.guest-mode .avatar-card,
  body.guest-mode .card {
    padding: 8px;
  }

  body.guest-mode .avatar-frame {
    min-height: 0;
  }

  body.guest-mode .avatar-core {
    width: min(145px, 62%);
  }

  body.guest-mode .avatar-overlay-text {
    padding: 6px 8px;
  }

  body.guest-mode .voice-wave {
    display: none;
  }

  body.guest-mode .chatInput {
    min-height: 56px;
    max-height: 64px;
  }

  body.guest-mode .voicePanel {
    padding: 7px;
  }

  body.guest-mode .voiceTranscript {
    min-height: 34px;
    max-height: 44px;
    font-size: 11px;
  }

  body.guest-mode video {
    height: 58px;
  }

  body.guest-mode .camera-card h2,
  body.guest-mode .chat-card h2 {
    font-size: 14px;
    margin-bottom: 5px;
  }

  body.guest-mode .camera-card .row {
    gap: 6px;
  }

  body.guest-mode .camera-card .row button {
    flex: 1 1 110px;
    min-height: 34px;
    padding: 7px 8px;
    font-size: 12px;
  }

  body.guest-mode .camera-card .result {
    display: none;
  }

  body.guest-mode .guestEnroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 7px;
  }

  body.guest-mode .guestEnroll h3,
  body.guest-mode .guestEnroll .hint {
    display: none;
  }

  body.guest-mode .guestEnroll input,
  body.guest-mode .guestEnroll button {
    margin-top: 0;
    min-height: 34px;
    padding: 7px 8px;
    font-size: 12px;
  }
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wrap { flex-wrap: wrap; }
.top-gap { margin-top: 10px; }

input, textarea, select, button {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  background: rgba(15, 23, 42, .78);
  color: var(--text);
  outline: none;
}

input, textarea, select { width: 100%; }

input[type="checkbox"] {
  width: auto;
  accent-color: var(--ok);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

button {
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border: 0;
  color: #020617;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(56,216,255,.12);
}

button:hover { filter: brightness(1.12); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled {
  cursor: not-allowed;
  filter: grayscale(.35) brightness(.72);
  transform: none;
  opacity: .68;
}

body.guest-mode,
body.guest-mode * {
  box-sizing: border-box;
}

body.guest-mode .avatar-card,
body.guest-mode .camera-card,
body.guest-mode .chat-card,
body.guest-mode .hero {
  max-width: 100%;
}

@media (max-width: 760px) {
  body.guest-mode,
  body.guest-mode .shell {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
  }

  body.guest-mode .avatar-card,
  body.guest-mode .camera-card,
  body.guest-mode .chat-card,
  body.guest-mode .hero {
    min-width: 0;
    max-width: calc(100vw - 16px);
  }

  body.guest-mode .avatar-overlay-text {
    left: 8px;
    right: 8px;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }

  body.guest-mode .avatar-overlay-text small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.guest-mode .camera-card .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  body.guest-mode .camera-card .row > button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  body.guest-mode .guestEnroll input,
  body.guest-mode .guestEnroll button {
    min-width: 0;
  }

  body.guest-mode.visitor-verified .shell {
    grid-template-columns: minmax(108px, 34vw) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "hero hero"
      "avatar chat";
  }

  body.guest-mode.visitor-verified .avatar-card,
  body.guest-mode.visitor-verified .chat-card {
    max-width: none;
    width: 100%;
  }

  body.guest-mode.visitor-verified .avatar-card {
    padding: 6px;
  }

  body.guest-mode.visitor-verified .avatar-frame {
    min-height: 0;
    height: 100%;
  }

  body.guest-mode.visitor-verified .avatar-core {
    width: min(108px, 82%);
  }

  body.guest-mode.visitor-verified .avatar-overlay-text {
    left: 6px;
    right: 6px;
    bottom: 6px;
    justify-content: center;
    padding: 6px 4px;
  }

  body.guest-mode.visitor-verified .avatar-overlay-text small,
  body.guest-mode.visitor-verified .voice-wave {
    display: none !important;
  }

  body.guest-mode.visitor-verified .chat-card {
    padding: 8px;
  }

  body.guest-mode.visitor-verified .chatInput {
    min-height: 66px;
    max-height: 78px;
  }
}

.adminOsLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

#autoListenBtn.is-active,
#onlineModeBtn.is-active,
#micBtn.is-active {
  background: linear-gradient(90deg, var(--ok), #7ee7ff);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, .24), 0 10px 26px rgba(52, 211, 153, .18);
}

video {
  width: 100%;
  min-height: 320px;
  border-radius: 18px;
  background: #020617;
  border: 1px solid var(--border);
  object-fit: cover;
}

.hidden { display: none; }

.status {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(2,6,23,.5);
}

.hint { font-size: 13px; }

.macBridgeStatus {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(2,6,23,.42);
  color: var(--muted);
  font-weight: 700;
}

.macBridgeStatus.ok {
  color: var(--ok);
  border-color: rgba(52,211,153,.35);
}

.macBridgeStatus.warn {
  color: var(--warning);
  border-color: rgba(251,191,36,.32);
}

.result, .chatBox, #persons, #tasks, #knowledge {
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.52);
  padding: 14px;
  min-height: 58px;
  white-space: pre-wrap;
}

.chatBox {
  height: clamp(240px, 34vh, 420px);
  min-height: 240px;
  overflow-y: auto;
  overflow-anchor: none;
  scroll-behavior: smooth;
}

body.guest-mode .chatBox {
  height: auto;
  min-height: 0;
}

.compact { min-height: 42px; max-height: 180px; overflow: auto; }

.enroll {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.ownerFaceSetup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ownerFaceSetup input {
  min-width: 0;
}

.chatInput { min-height: 120px; margin: 10px 0; }

.voicePanel {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(2,6,23,.36);
  padding: 12px;
}

.voicePanelGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lisaOSGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.lisaOSModule {
  min-height: 104px;
  border: 1px solid rgba(160, 220, 255, .14);
  border-radius: 16px;
  background: rgba(15,23,42,.58);
  padding: 12px;
}

.lisaOSModule b {
  display: block;
  margin-bottom: 7px;
  color: #eaf6ff;
}

.lisaOSModule span {
  display: block;
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.lisaOSModule.ok {
  border-color: rgba(52,211,153,.32);
  background: rgba(6,78,59,.20);
}

.lisaOSModule.limited {
  border-color: rgba(251,191,36,.26);
  background: rgba(113,63,18,.16);
}

.lisaOSModule.blocked {
  border-color: rgba(251,113,133,.30);
  background: rgba(127,29,29,.16);
}

.v11List {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(2,6,23,.42);
  padding: 12px;
  color: var(--muted);
}

.v11TaskItem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(160, 220, 255, .12);
}

.v11TaskItem:last-child {
  border-bottom: 0;
}

.v11TaskItem b {
  color: var(--text);
  overflow-wrap: anywhere;
}

.voiceMetric {
  min-height: 66px;
  border: 1px solid rgba(160, 220, 255, .12);
  border-radius: 14px;
  background: rgba(15,23,42,.58);
  padding: 10px 12px;
}

.voiceMetric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.voiceMetric b {
  display: block;
  color: #eaf6ff;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.voiceMeter {
  height: 8px;
  margin: 12px 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148,163,184,.14);
}

.voiceMeter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ok), var(--accent), var(--accent2));
  transition: width .22s ease;
}

.voiceOptions {
  align-items: stretch;
}

.voiceOptions select {
  max-width: 180px;
}

.toggleLine {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(160, 220, 255, .12);
  border-radius: 14px;
  background: rgba(15,23,42,.58);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.voiceTranscript {
  margin-top: 10px;
  min-height: 42px;
  max-height: 66px;
  border-radius: 14px;
  border: 1px solid rgba(160, 220, 255, .12);
  background: rgba(2,6,23,.38);
  padding: 10px 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
  overflow: auto;
}

.brainPanel {
  margin-top: 12px;
  border: 1px solid rgba(160, 220, 255, .14);
  border-radius: 18px;
  background: rgba(2,6,23,.34);
  padding: 12px;
}

.brainPanelHeader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.brainPanelHeader span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.brainPanelHeader b {
  color: #eaf6ff;
  text-align: right;
  overflow-wrap: anywhere;
}

.brainTrace {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.brainTraceItem {
  border: 1px solid rgba(160, 220, 255, .12);
  border-radius: 12px;
  background: rgba(15,23,42,.48);
  padding: 9px 10px;
}

.brainTraceItem b {
  display: block;
  color: var(--ok);
  margin-bottom: 4px;
}

.brainTraceItem.warn b {
  color: var(--warning);
}

.brainTraceItem span {
  display: block;
  overflow-wrap: anywhere;
}

.brainSelfCheck {
  margin-top: 10px;
  color: var(--ok);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.brainSelfCheck.warn {
  color: var(--warning);
}

.msg {
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 14px;
  background: rgba(148,163,184,.10);
}

.msg.user { border-left: 4px solid var(--accent); }
.msg.lisa { border-left: 4px solid var(--ok); }

.person {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.person:last-child { border-bottom: none; }
.personActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-content: flex-start;
  min-width: 190px;
}

.personActions button {
  padding: 8px 10px;
  font-size: 12px;
  box-shadow: none;
}

.taskSummary {
  margin-top: 10px;
}

.taskStatus {
  color: var(--ok);
}

.taskStatus.done,
.taskStatus.cancelled {
  color: var(--muted);
}

.taskStatus.doing {
  color: var(--warning);
}

#taskStatusFilter {
  max-width: 160px;
}

.small { color: var(--muted); font-size: 13px; }
.danger { color: var(--danger); }

.knowledgeItem {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.knowledgeItem:last-child { border-bottom: none; }

.internalDocsCard {
  overflow: hidden;
}

.internalDocsToolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px) auto auto;
  gap: 10px;
  align-items: center;
}

.internalDocStats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  color: var(--muted);
}

.docStatPill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(160, 220, 255, .14);
  border-radius: 999px;
  background: rgba(15,23,42,.58);
  font-size: 12px;
}

.docStatPill b {
  color: var(--ok);
  font-size: 14px;
}

.internalDocLayout {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  gap: 14px;
  min-height: 420px;
}

.internalDocResults,
.internalDocViewer {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(2,6,23,.46);
  padding: 12px;
  min-height: 360px;
  max-height: 620px;
  overflow: auto;
  color: var(--muted);
}

.internalDocItem + .internalDocItem {
  margin-top: 10px;
}

.internalDocOpen {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid rgba(160, 220, 255, .13);
  border-radius: 14px;
  background: rgba(15,23,42,.64);
  color: var(--text);
  box-shadow: none;
  white-space: normal;
}

.internalDocOpen:hover {
  border-color: rgba(56,216,255,.42);
  background: rgba(15,23,42,.86);
}

.internalDocTitle {
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.internalDocMeta {
  color: #7ee7ff;
  font-size: 12px;
  font-weight: 700;
}

.internalDocPreview {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.internalDocViewerHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(160, 220, 255, .12);
}

.internalDocViewerHead b {
  color: var(--text);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.internalDocViewerHead span {
  flex: 0 0 auto;
  color: var(--ok);
  font-size: 12px;
  font-weight: 800;
}

.internalDocDetail {
  margin: 0;
  color: #dceeff;
  white-space: pre-wrap;
  line-height: 1.48;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56,189,248,.14);
  color: #bae6fd;
  font-size: 12px;
  margin-right: 6px;
}

.okText { color: #34d399; }
.warnText { color: #fbbf24; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}

/* Lisa Avatar UI v0.4 */
.avatar-card {
  position: relative;
  overflow: hidden;
}

.avatar-frame {
  position: relative;
  min-height: 610px;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(79, 213, 255, .24), transparent 20%),
    radial-gradient(circle at 50% 52%, rgba(159, 124, 255, .16), transparent 35%),
    linear-gradient(180deg, rgba(2,6,23,.36), rgba(2,6,23,.9));
  border: 1px solid rgba(146, 226, 255, .18);
  box-shadow: inset 0 0 80px rgba(56,216,255,.09);
}

.scan-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 225, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 225, 255, .08) 1px, transparent 1px);
  background-size: 36px 36px;
  transform: perspective(700px) rotateX(55deg) translateY(80px);
  opacity: .45;
  animation: gridMove 12s linear infinite;
}

@keyframes gridMove {
  from { background-position: 0 0; }
  to { background-position: 0 72px; }
}

.halo {
  position: absolute;
  left: 50%;
  top: 43%;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(127, 229, 255, .34);
  opacity: .65;
}

.halo-one {
  width: 360px;
  height: 360px;
  animation: orbitPulse 4s ease-in-out infinite;
}

.halo-two {
  width: 460px;
  height: 460px;
  animation: orbitPulse 5.5s ease-in-out infinite reverse;
}

@keyframes orbitPulse {
  0%, 100% { transform: scale(.96); opacity: .38; }
  50% { transform: scale(1.04); opacity: .74; }
}

.avatar-core {
  position: absolute;
  left: 50%;
  top: 47%;
  width: min(520px, 92%);
  aspect-ratio: 1 / 1;
  translate: -50% -50%;
  transform-origin: 50% 60%;
  transition: transform .38s ease, filter .38s ease;
  filter: drop-shadow(0 35px 70px rgba(0,0,0,.45));
}

.avatar-core img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.eye-glow {
  position: absolute;
  width: 24px;
  height: 14px;
  border-radius: 999px;
  background: rgba(185,248,255,.78);
  box-shadow: 0 0 16px #7ee7ff, 0 0 38px rgba(56,216,255,.8);
  opacity: .48;
  top: 37.5%;
  animation: blink 5.5s infinite;
}

.eye-left { left: 40.2%; }
.eye-right { left: 56.6%; }

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); opacity: .48; }
  94%, 96% { transform: scaleY(.05); opacity: .15; }
}

.mouth-glow {
  position: absolute;
  left: 50%;
  top: 58.2%;
  width: 74px;
  height: 8px;
  translate: -50% -50%;
  border-radius: 999px;
  background: rgba(125, 231, 255, .5);
  box-shadow: 0 0 18px rgba(125, 231, 255, .6);
  opacity: .25;
  transform-origin: center;
}

.voice-ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 420px;
  height: 420px;
  translate: -50% -50%;
  border-radius: 999px;
  border: 1px solid rgba(56,216,255,.18);
  opacity: 0;
  pointer-events: none;
}

.thinking-orbit {
  position: absolute;
  left: 50%;
  top: 44%;
  translate: -50% -50%;
  border-radius: 999px;
  border: 1px dashed rgba(165, 230, 255, .35);
  opacity: 0;
}

.orbit-a { width: 390px; height: 390px; }
.orbit-b { width: 500px; height: 500px; }

.avatar-overlay-text {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(160, 220, 255, .16);
  background: rgba(2,6,23,.58);
  border-radius: 18px;
  padding: 12px 14px;
  backdrop-filter: blur(14px);
}

.avatar-overlay-text span {
  font-weight: 900;
  letter-spacing: .18em;
  color: #a7f3ff;
}

.avatar-overlay-text small {
  color: var(--muted);
  text-align: right;
}

.voice-wave {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 12px 0;
}

.voice-wave i {
  display: block;
  width: 5px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: .55;
  transform-origin: center;
}

.avatar-controls {
  justify-content: center;
}

.avatar-controls button {
  padding: 9px 11px;
  font-size: 12px;
  box-shadow: none;
}

/* States */
body[data-lisa-state="idle"] .avatar-core {
  animation: idleBreath 4.8s ease-in-out infinite;
}

@keyframes idleBreath {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.01); }
}

body[data-lisa-state="listening"] .avatar-core {
  transform: rotate(-1.8deg) translateY(-4px) scale(1.02);
  filter: drop-shadow(0 40px 78px rgba(0,0,0,.5)) saturate(1.1);
}

body[data-lisa-state="listening"] .voice-ring {
  opacity: .9;
  animation: listenRing 1.5s ease-out infinite;
}

@keyframes listenRing {
  from { transform: scale(.72); opacity: .72; }
  to { transform: scale(1.12); opacity: 0; }
}

body[data-lisa-state="thinking"] .avatar-core {
  transform: translateY(-6px) scale(1.015);
  filter: hue-rotate(18deg) brightness(1.08) drop-shadow(0 42px 80px rgba(56,216,255,.15));
}

body[data-lisa-state="thinking"] .thinking-orbit {
  opacity: .68;
  animation: spin 8s linear infinite;
}

body[data-lisa-state="thinking"] .orbit-b { animation-duration: 13s; animation-direction: reverse; }

@keyframes spin { to { transform: rotate(360deg); } }

body[data-lisa-state="speaking"] .avatar-core {
  animation: speakHead 1.25s ease-in-out infinite;
}

body[data-lisa-state="speaking"] .mouth-glow {
  animation: mouthTalk .22s ease-in-out infinite alternate;
  opacity: .9;
}

body[data-lisa-state="speaking"] .voice-wave i {
  animation: waveTalk .55s ease-in-out infinite alternate;
}

body[data-lisa-state="speaking"] .voice-wave i:nth-child(2n) { animation-duration: .37s; }
body[data-lisa-state="speaking"] .voice-wave i:nth-child(3n) { animation-duration: .72s; }

@keyframes speakHead {
  0%, 100% { transform: translateY(0) rotate(.25deg); }
  50% { transform: translateY(-4px) rotate(-.25deg); }
}

@keyframes mouthTalk {
  from { transform: translate(-50%, -50%) scaleX(.76) scaleY(.6); }
  to { transform: translate(-50%, -50%) scaleX(1.22) scaleY(2.7); }
}

@keyframes waveTalk {
  from { height: 10px; opacity: .45; }
  to { height: 48px; opacity: .95; }
}

body[data-lisa-state="confirm"] .avatar-core {
  animation: nod .75s ease-in-out 1;
}

@keyframes nod {
  0%, 100% { transform: rotateX(0deg) translateY(0); }
  32% { transform: perspective(500px) rotateX(10deg) translateY(10px); }
  68% { transform: perspective(500px) rotateX(-4deg) translateY(-5px); }
}

body[data-lisa-state="reject"] .avatar-core {
  animation: shake .6s ease-in-out 1;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-12px) rotate(-2deg); }
  40% { transform: translateX(12px) rotate(2deg); }
  60% { transform: translateX(-8px) rotate(-1deg); }
  80% { transform: translateX(8px) rotate(1deg); }
}

body[data-lisa-state="scanning"] .avatar-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: 0;
  background: linear-gradient(90deg, transparent, #7ee7ff, transparent);
  box-shadow: 0 0 18px #38d8ff;
  animation: scanLine 1.8s ease-in-out infinite;
}

@keyframes scanLine {
  from { top: 8%; opacity: .15; }
  50% { opacity: 1; }
  to { top: 78%; opacity: .15; }
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 680px) {
  body { overflow-x: hidden; }

  .shell {
    width: 100%;
    max-width: 100%;
    padding: 10px;
  }

  .hero {
    gap: 8px;
    margin-bottom: 10px;
  }

  .hero-v04 h1 {
    font-size: 28px;
    line-height: 1;
    letter-spacing: 0;
  }

  .hero p { display: none; }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
    letter-spacing: .12em;
  }

  h2 {
    margin-bottom: 10px;
    font-size: 16px;
  }

  h3 { font-size: 14px; }
  p { margin: 8px 0; }

  .status {
    width: 100%;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 12px;
  }

  .lisa-dashboard,
  .grid,
  .grid2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    min-width: 0;
  }

  .lisa-dashboard > *,
  .grid > *,
  .grid2 > *,
  .card,
  .control-card,
  .avatar-card {
    min-width: 0;
    max-width: 100%;
  }

  .card,
  .control-card,
  .avatar-card {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,.28);
  }

  input,
  textarea,
  select,
  button {
    max-width: 100%;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13px;
  }

  button {
    min-height: 38px;
    white-space: normal;
    line-height: 1.15;
  }

  .row {
    flex-wrap: wrap;
    gap: 7px;
    align-items: stretch;
  }

  .row > input,
  .row > select,
  .row > button {
    width: auto;
    min-width: 0;
    flex: 1 1 128px;
  }

  #ownerPin,
  #deviceKey {
    flex-basis: 100%;
  }

  .top-gap { margin-top: 7px; }
  .divider { margin: 10px 0; }
  .hint, .small { font-size: 12px; line-height: 1.35; }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .metric {
    min-height: 54px;
    padding: 8px;
    border-radius: 12px;
  }

  .metric span {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .metric b {
    font-size: 12px;
    line-height: 1.2;
  }

  .systemStatus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 9px;
    max-height: 230px;
    overflow: auto;
    padding-right: 2px;
  }

  .systemStatusItem {
    min-height: 54px;
    padding: 8px;
    border-radius: 12px;
  }

  .systemStatusItem span {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .systemStatusItem b {
    font-size: 12px;
    line-height: 1.18;
  }

  .macBridgeStatus {
    margin-top: 7px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 12px;
  }

  .avatar-frame {
    min-height: 310px;
    border-radius: 16px;
  }

  .avatar-core {
    top: 44%;
    width: min(300px, 88%);
  }

  .halo-one { width: 230px; height: 230px; }
  .halo-two { width: 300px; height: 300px; }
  .voice-ring { width: 280px; height: 280px; }
  .orbit-a { width: 260px; height: 260px; }
  .orbit-b { width: 330px; height: 330px; }

  .scan-grid {
    background-size: 28px 28px;
    transform: perspective(520px) rotateX(55deg) translateY(50px);
  }

  .eye-glow {
    width: 16px;
    height: 9px;
  }

  .mouth-glow {
    width: 48px;
    height: 6px;
  }

  .avatar-overlay-text {
    left: 8px;
    right: 8px;
    bottom: 8px;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 12px;
  }

  .avatar-overlay-text span {
    font-size: 12px;
    letter-spacing: .12em;
  }

  .avatar-overlay-text small {
    font-size: 11px;
    line-height: 1.2;
  }

  .voice-wave {
    height: 34px;
    gap: 5px;
    margin: 6px 0;
  }

  .voice-wave i {
    width: 4px;
    height: 10px;
  }

  .avatar-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .avatar-controls button {
    width: 100%;
    min-height: 32px;
    padding: 6px 5px;
    font-size: 11px;
  }

  video {
    min-height: 190px;
    border-radius: 14px;
  }

  textarea {
    min-height: 72px;
  }

  .chatInput {
    min-height: 78px;
    margin: 8px 0;
  }

  .voicePanel {
    margin-top: 8px;
    padding: 8px;
    border-radius: 14px;
  }

  .voicePanelGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .voiceMetric {
    min-height: 50px;
    padding: 7px;
    border-radius: 10px;
  }

  .voiceMetric span {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .voiceMetric b {
    font-size: 12px;
    line-height: 1.15;
  }

  .voiceMeter {
    height: 6px;
    margin: 8px 0;
  }

  .voiceOptions {
    gap: 6px;
  }

  .voiceOptions select {
    max-width: none;
    flex-basis: 118px;
  }

  .toggleLine {
    min-height: 36px;
    padding: 8px;
    border-radius: 10px;
    font-size: 12px;
  }

  .voiceTranscript,
  .result,
  .chatBox,
  #persons,
  #tasks,
  #knowledge {
    margin-top: 8px;
    min-height: 44px;
    padding: 9px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.35;
  }

  .chatBox {
    height: 220px;
    min-height: 220px;
  }

  body.guest-mode .chatBox {
    height: auto;
    min-height: 0;
  }

  body.guest-mode .avatar-frame {
    min-height: 0;
  }

  .enroll {
    margin-top: 10px;
    gap: 7px;
  }

  .ownerFaceSetup {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .person {
    display: grid;
    gap: 8px;
  }

  .personActions {
    min-width: 0;
    justify-content: flex-start;
  }

  .personActions button {
    flex: 1 1 90px;
    padding: 7px;
  }

  #taskStatusFilter {
    max-width: none;
  }
}

.metric {
  border: 1px solid var(--border);
  background: rgba(2,6,23,.38);
  border-radius: 18px;
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.metric b {
  display: block;
  color: #eaf6ff;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.systemStatus {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.systemStatusItem {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2,6,23,.42);
  padding: 10px 12px;
  min-height: 64px;
}

.systemStatusItem span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.systemStatusItem b {
  display: block;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.systemStatusItem.ok b { color: var(--ok); }
.systemStatusItem.warn b { color: var(--warning); }
.systemStatusItem.danger b { color: var(--danger); }

.toolItem {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2,6,23,.36);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.operatorGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.operatorPlan {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.operatorStep {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2,6,23,.42);
  padding: 12px;
}

.operatorStepIndex {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(56,216,255,.16);
  color: #a7f3ff;
  font-weight: 900;
}

.operatorStep.ok {
  border-color: rgba(52,211,153,.32);
}

.operatorStep.blocked,
.operatorStep.error {
  border-color: rgba(251,191,36,.34);
}

.operatorStep.ok .operatorStepIndex {
  background: rgba(52,211,153,.18);
  color: var(--ok);
}

.operatorStep.blocked .operatorStepIndex,
.operatorStep.error .operatorStepIndex {
  background: rgba(251,191,36,.18);
  color: var(--warning);
}

.platformGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.platformLayer {
  min-height: 148px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2,6,23,.42);
  padding: 12px;
}

.platformLayer b {
  display: block;
  color: #eaf6ff;
  font-size: 15px;
  line-height: 1.25;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.platformLayer span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.platformLayer.ok {
  border-color: rgba(52,211,153,.34);
}

.platformLayer.ok b {
  color: var(--ok);
}

.platformLayer.limited {
  border-color: rgba(251,191,36,.34);
}

.platformLayer.limited b {
  color: var(--warning);
}

.platformLayer.blocked {
  border-color: rgba(251,113,133,.34);
}

.platformLayer.blocked b {
  color: var(--danger);
}

.techGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.techLayer {
  min-height: 144px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2,6,23,.42);
  padding: 12px;
}

.techLayer b {
  display: block;
  color: #eaf6ff;
  font-size: 15px;
  line-height: 1.25;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.techLayer span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.techLayer.ok {
  border-color: rgba(52,211,153,.34);
}

.techLayer.ok b {
  color: var(--ok);
}

.techLayer.limited {
  border-color: rgba(251,191,36,.34);
}

.techLayer.limited b {
  color: var(--warning);
}

.techLayer.blocked {
  border-color: rgba(251,113,133,.34);
}

.techLayer.blocked b {
  color: var(--danger);
}

.toolItem b,
.toolItem .small,
.operatorStep b,
.operatorStep .small,
.platformLayer .small,
.techLayer .small,
.result.compact {
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .platformGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .techGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .systemStatus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operatorGrid { grid-template-columns: 1fr; }
  .operatorStep { grid-template-columns: 32px 1fr; }
  .platformGrid { grid-template-columns: 1fr; }
  .platformLayer { min-height: auto; }
  .techGrid { grid-template-columns: 1fr; }
  .techLayer { min-height: auto; }
  .v11TaskItem { grid-template-columns: 1fr; }
}

body.presentation-mode .shell {
  max-width: none;
  padding: 0;
}

body.presentation-mode .hero,
body.presentation-mode .control-card,
body.presentation-mode .grid,
body.presentation-mode .card:not(:first-child),
body.presentation-mode .avatar-controls {
  display: none !important;
}

body.presentation-mode .lisa-dashboard {
  display: block;
  margin: 0;
}

body.presentation-mode .avatar-card {
  min-height: 100vh;
  border-radius: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.presentation-mode .avatar-frame {
  min-height: calc(100vh - 110px);
  border-radius: 0;
}

body.presentation-mode .avatar-core {
  width: min(70vh, 78vw);
}


/* Lisa UI v0.4.1 - neon human-like AI face update */
.avatar-core img {
  border-radius: 22px;
  filter: saturate(1.06) contrast(1.05);
}

body[data-lisa-state="listening"] .avatar-core {
  animation: listenTilt 2.2s ease-in-out infinite;
}

@keyframes listenTilt {
  0%, 100% { transform: translateY(0) rotate(-.35deg) scale(1); }
  50% { transform: translateY(-3px) rotate(.35deg) scale(1.01); }
}

body[data-lisa-state="confirm"] .avatar-core img,
body[data-lisa-state="speaking"] .avatar-core img,
body[data-lisa-state="listening"] .avatar-core img {
  box-shadow: 0 0 42px rgba(56,216,255,.26);
}

body[data-lisa-state="reject"] .avatar-core img {
  filter: saturate(.92) contrast(1.08) hue-rotate(-10deg);
}

@media (max-width: 760px) {
  html,
  body.guest-mode {
    width: 100%;
    max-width: 100%;
    overflow: hidden !important;
  }

  body.guest-mode .shell {
    width: 100vw !important;
    max-width: 100vw !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto 140px minmax(0, 292px) minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  body.guest-mode .hero,
  body.guest-mode .avatar-card,
  body.guest-mode .chat-card,
  body.guest-mode .camera-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: calc(100vw - 16px) !important;
    overflow-x: hidden !important;
  }

  body.guest-mode .avatar-overlay-text {
    left: 8px !important;
    right: 8px !important;
    max-width: calc(100% - 16px) !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.guest-mode .avatar-overlay-text small {
    max-width: calc(100% - 74px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.guest-mode .camera-card .row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.guest-mode .camera-card .row > button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    line-height: 1.1 !important;
  }

  body.guest-mode:not(.camera-active) .camera-card video {
    display: none !important;
  }

  body.guest-mode .guestEnroll {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.guest-mode #guestEnrollBtn {
    grid-column: 1 / -1;
  }

  body.guest-mode.visitor-verified .shell {
    grid-template-columns: minmax(108px, 34vw) minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    grid-template-areas:
      "hero hero"
      "avatar chat" !important;
  }

  body.guest-mode.visitor-verified .camera-card {
    display: none !important;
  }

  body.guest-mode.visitor-verified .avatar-card,
  body.guest-mode.visitor-verified .chat-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  body.guest-mode.visitor-verified .avatar-card {
    padding: 6px !important;
  }

  body.guest-mode.visitor-verified .avatar-frame {
    height: 100% !important;
    min-height: 0 !important;
  }

  body.guest-mode.visitor-verified .avatar-core {
    width: min(108px, 82%) !important;
  }

  body.guest-mode.visitor-verified .avatar-overlay-text {
    left: 6px !important;
    right: 6px !important;
    bottom: 6px !important;
    justify-content: center !important;
    padding: 6px 4px !important;
  }

  body.guest-mode.visitor-verified .avatar-overlay-text small,
  body.guest-mode.visitor-verified .voice-wave {
    display: none !important;
  }

  body.guest-mode.visitor-verified .chat-card {
    padding: 8px !important;
  }

  body.guest-mode.visitor-verified .chatInput {
    min-height: 66px !important;
    max-height: 78px !important;
  }
}

@media (max-width: 760px) {
  body.guest-mode .shell {
    grid-template-rows: auto 112px minmax(0, 1fr) minmax(0, 136px) !important;
  }

  body.guest-mode .chat-card {
    padding: 10px !important;
    overflow: hidden !important;
  }

  body.guest-mode .chat-card .row {
    flex: 0 0 auto;
  }

  body.guest-mode .voicePanel {
    flex: 0 0 auto;
    margin-top: 6px !important;
    padding: 6px !important;
  }

  body.guest-mode .voiceTranscript {
    min-height: 32px !important;
    max-height: 40px !important;
    overflow: hidden !important;
  }

  body.guest-mode .chatInput,
  body.guest-mode.visitor-verified .chatInput {
    flex: 0 0 auto;
    min-height: 72px !important;
    max-height: 86px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  body.guest-mode .chatBox,
  body.guest-mode.visitor-verified .chatBox {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 176px !important;
    flex: 1 1 auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    font-size: 13px !important;
    line-height: 1.42 !important;
  }

  body.guest-mode .chatBox .msg {
    width: 100%;
    max-width: 100%;
    margin: 7px 0;
    padding: 9px 10px;
    line-height: 1.42;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.guest-mode.visitor-verified .shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto 96px minmax(0, 1fr) !important;
    grid-template-areas:
      "hero"
      "avatar"
      "chat" !important;
  }

  body.guest-mode.visitor-verified .avatar-card {
    min-height: 0 !important;
    padding: 6px !important;
  }

  body.guest-mode.visitor-verified .avatar-frame {
    height: 100% !important;
    min-height: 0 !important;
  }

  body.guest-mode.visitor-verified .avatar-core {
    width: min(112px, 42vw) !important;
  }
}
