:root {
  --bg: #ffffff;
  --floor: #faf8f5;
  --wall: #ebe6de;
  --wall-strong: #ddd5c9;
  --ink: #2b2530;
  --muted: #8a8290;
  --purple: #6b2d7b;
  --purple-soft: #f4ecf6;
  --orange: #f57c00;
  --orange-soft: #fff3e6;
  --green: #2e9d6a;
  --green-soft: #e9f6ef;
  --red: #c94a4a;
  --red-soft: #fbeeee;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(43,37,48,.04), 0 8px 24px rgba(43,37,48,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.6 "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 16px; }

header { border-bottom: 1px solid var(--wall); background: rgba(255,255,255,.9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
header .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
header img { height: 34px; }
.brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand b { font-size: 16px; }
.brand span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
  border: 1px solid var(--wall); border-radius: 99px; padding: 6px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wall-strong); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot.off { background: var(--red); }

.hero { padding: 24px 0 14px; }
.hero h1 { font-size: clamp(22px, 3vw, 28px); margin: 0 0 2px; letter-spacing: -.01em; }
.hero p { margin: 0 0 14px; color: var(--muted); }
.cmd { border: 1px solid var(--wall); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; padding: 14px; }
.cmd textarea { width: 100%; border: 0; outline: 0; resize: vertical; min-height: 64px; background: transparent; }
.cmd-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--wall); padding-top: 12px; margin-top: 6px; }
.chip { border: 1px solid var(--wall); background: var(--floor); border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--muted); }
.chip:hover { border-color: var(--purple); color: var(--purple); }
.btn { border: 0; border-radius: 12px; padding: 10px 18px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--purple); color: #fff; margin-left: auto; }
.btn-primary:hover { background: #5a2468; }
.btn-primary:disabled { opacity: .5; cursor: wait; }
.btn-ghost { background: var(--floor); border: 1px solid var(--wall); }
.btn-ghost:hover { border-color: var(--wall-strong); }

.steps { display: flex; gap: 8px; margin: 14px 0 0; flex-wrap: wrap; }
.step { font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 99px; background: var(--floor); }
.step.active { color: var(--orange); background: var(--orange-soft); }
.step.done { color: var(--green); background: var(--green-soft); }

/* 3D scene container with proper margins */
.scene-frame-wrap {
  margin-top: 14px;
  margin-bottom: 24px;
}
.scene {
  position: relative;
  width: 100%;
  height: min(620px, 72vh);
  min-height: 440px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--wall);
  box-shadow: 0 10px 30px rgba(43,37,48,.08);
  background: linear-gradient(180deg, #f3f8fc 0%, #ffffff 55%, #f4f1ec 100%);
  touch-action: none;
  scroll-margin-top: 75px;
}
/* .full covers both the real Fullscreen API and the fallback for browsers without it (iPhone). */
.scene.full {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  max-width: none;
  margin: 0;
  border-radius: 0;
  border: 0;
  z-index: 40;
}
body:has(.scene.full) { overflow: hidden; }
.scene-tools { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; gap: 6px; }
.scene-tools button, .views button {
  border: 1px solid var(--wall); background: rgba(255,255,255,.92); border-radius: 10px; padding: 7px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; position: relative; box-shadow: 0 2px 8px rgba(43,37,48,.06);
}
.scene-tools button:hover { border-color: var(--purple); }
.fs-bar { display: none; }
.scene.full .fs-bar {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; width: min(760px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 8px;
}
.fs-bar .steps { margin: 0; justify-content: center; }
.fs-bar .step { background: rgba(255,255,255,.92); }
.fs-row { display: flex; gap: 8px; background: rgba(255,255,255,.96); border: 1px solid var(--wall); border-radius: 14px; padding: 6px; box-shadow: 0 8px 28px rgba(43,37,48,.14); }
.fs-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 10px; font: inherit; }
.fs-row .btn-primary { margin-left: 0; }
.scene.full .hint, .scene.full .addr { bottom: 120px; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.scene canvas:active { cursor: grabbing; }
.overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.views { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; max-width: calc(100% - 240px); }
.views button:hover, .scene-tools button:hover { border-color: var(--purple); }
.views button.on, .scene-tools button.on { background: var(--purple); color: #fff; border-color: var(--purple); }
.views button.ping::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange); box-shadow: 0 0 0 3px rgba(245,124,0,.25); animation: pulse 1.2s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(245,124,0,0); } }
.addr { position: absolute; right: 12px; bottom: 12px; z-index: 2; font-size: 12px; color: var(--ink); background: rgba(255,255,255,.92);
  border: 1px solid var(--wall); border-radius: 10px; padding: 7px 12px; max-width: calc(100% - 24px); }
.hint { position: absolute; left: 12px; bottom: 12px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.88); padding: 5px 10px; border-radius: 99px; z-index: 2; }
.scene-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }

.tag { position: absolute; left: 0; top: 0; will-change: transform; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.tag-name {
  pointer-events: auto; cursor: pointer; border: 0; font-size: 11px; font-weight: 700; color: #fff; line-height: 1.5;
  background: rgba(43,37,48,.55); padding: 1px 7px; border-radius: 6px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center;
}
.tag-name:hover { background: var(--purple); }
.tag-name i { font-style: normal; font-size: 9px; background: #e7b416; color: #2b2530; border-radius: 4px; padding: 0 4px; }
.tag-name i.ga { background: #7cc293; }
.bubble {
  position: relative; max-width: 210px; background: #fff; color: var(--ink); font-size: 12px; line-height: 1.4; font-weight: 500;
  padding: 6px 10px; border-radius: 12px; box-shadow: 0 4px 16px rgba(43,37,48,.16); text-align: center; animation: pop .25s ease-out;
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.bubble[hidden] { display: none; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.typing { margin-right: 4px; }
.typing span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); margin-right: 3px; animation: bounce 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

.analysis { font-size: 14px; background: var(--purple-soft); border-radius: 12px; padding: 12px 16px; margin: 16px 0 0; border: 1px solid rgba(107,45,123,0.15); line-height: 1.5; }

/* ================= Live Department Board ================= */
.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  margin: 20px 0 32px;
}
.dept-card {
  background: #ffffff;
  border: 1px solid var(--wall);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 4px 20px rgba(43, 37, 48, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dept-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(43, 37, 48, 0.08);
  border-color: var(--wall-strong);
}
.dept-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--dept-color, var(--purple));
}
.dept-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dept-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dept-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: var(--dept-soft, var(--purple-soft));
  color: var(--dept-color, var(--purple));
  flex: none;
}
.dept-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.dept-desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.3;
}
.dept-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.dept-status-badge.standby { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.dept-status-badge.working { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; animation: pulse 1.2s infinite; }
.dept-status-badge.done { background: var(--purple-soft); color: var(--purple); border: 1px solid #e9d5ff; }

/* Interactive Team Members */
.team-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--floor);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.03);
}
.team-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.team-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.team-hint {
  font-size: 10.5px;
  color: var(--purple);
  font-weight: 600;
}
.team-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--wall);
  border-radius: 99px;
  padding: 3px 10px 3px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.team-chip:hover {
  border-color: var(--dept-color, var(--purple));
  color: var(--dept-color, var(--purple));
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.team-chip .chip-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  background: var(--dept-color, var(--purple));
}
.team-chip .chip-tag {
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 4px;
}
.team-chip .chip-tag.spv { background: #fef08a; color: #854d0e; }
.team-chip .chip-tag.ga { background: #bbf7d0; color: #166534; }

/* Workboard Feed */
.work-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.empty-workbox {
  background: #fbfbfd;
  border: 1px dashed var(--wall-strong);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-workbox .btn-direct-task {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--purple);
  background: #ffffff;
  border: 1px solid var(--wall);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.empty-workbox .btn-direct-task:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task {
  border: 1px solid var(--wall); border-radius: 12px; padding: 10px 12px; font-size: 13px;
  display: flex; gap: 10px; align-items: flex-start; background: #ffffff;
  transition: all 0.15s ease;
}
.task:hover { border-color: var(--purple); box-shadow: 0 4px 12px rgba(43,37,48,0.06); }
.task small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.task[data-state="done"] { cursor: pointer; }
.task[data-state="done"]:hover { border-color: var(--green); }
.badge { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; flex: none; }
.badge.wait { background: var(--floor); color: var(--muted); border: 1px solid var(--wall); }
.badge.run { background: var(--orange-soft); color: var(--orange); border: 1px solid #fed7aa; }
.badge.done { background: var(--green-soft); color: var(--green); border: 1px solid #bbf7d0; }
.badge.err { background: var(--red-soft); color: var(--red); border: 1px solid #fecaca; }

/* Arsip List */
.arsip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.arsip-item {
  display: flex;
  align-items: stretch;
  gap: 6px;
  position: relative;
}
.arsip-item .btn-arsip-view {
  flex: 1 1 0%;
  min-width: 0;
  text-align: left;
  background: var(--floor);
  border: 1px solid var(--wall);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s ease;
}
.arsip-item .btn-arsip-view:hover {
  border-color: var(--purple);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(107,45,123,0.08);
}
.arsip-item .arsip-title {
  color: var(--ink);
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
}
.arsip-item small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}
.arsip-item .btn-arsip-del {
  flex: 0 0 38px;
  width: 38px;
  background: var(--floor);
  border: 1px solid var(--wall);
  border-radius: 12px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.arsip-item .btn-arsip-del:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
}
.btn-clear-arsip {
  background: #ffffff;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.btn-clear-arsip:hover {
  background: #fee2e2;
  border-color: #ef4444;
}
.btn-del-report,
.btn-del-viewer {
  color: #dc2626 !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-del-report:hover,
.btn-del-viewer:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
}

.report { margin: 24px 0 60px; border: 1px solid var(--wall); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.report-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--wall); }
.report-head b { margin-right: auto; }
.md { padding: 8px 28px 28px; overflow-x: auto; }
.md h1 { font-size: 22px; color: var(--purple); } .md h2 { font-size: 17px; border-bottom: 1px solid var(--wall); padding-bottom: 6px; margin-top: 24px; }
.md table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 12px 0; }
.md th, .md td { border: 1px solid var(--wall); padding: 7px 10px; text-align: left; }
.md th { background: var(--floor); }
.md code { background: var(--floor); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.md pre { background: var(--floor); padding: 12px; border-radius: 10px; overflow-x: auto; }
.md pre code { padding: 0; }
.md details { background: var(--floor); border-radius: 10px; padding: 10px 14px; margin-top: 20px; }
.md summary { cursor: pointer; font-weight: 600; }

/* ================= Modal Scroll Freeze & Backdrop Lock ================= */
html:has(dialog[open]),
body:has(dialog[open]),
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  padding-right: var(--sbw, 0px);
}

/* ================= Standardized Modal Dialogs ================= */
dialog.modal-std {
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(226, 232, 240, 0.95);
  margin: auto;
  max-height: 90vh;
  outline: none;
  overflow: hidden;
  animation: modalScaleUp 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain;
}
@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
dialog.modal-std::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overscroll-behavior: none;
}
.modal-std .modal-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--wall);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
}
.modal-title-wrap,
.modal-agent-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 0%;
  overflow: hidden;
}
.modal-title-box {
  min-width: 0;
  flex: 1 1 0%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--purple-soft);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: none;
}
.modal-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.modal-subtitle {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.modal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.modal-actions .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--wall);
  background: var(--floor);
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.modal-actions .btn-sm:hover {
  background: #ffffff;
  border-color: var(--purple);
  color: var(--purple);
}
.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--wall);
  background: var(--floor);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: none;
}
.modal-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Modal Chat & Direct Tasking */
dialog.modal-chat {
  width: min(720px, calc(100vw - 32px));
  height: min(680px, calc(100vh - 48px));
  max-height: 90vh;
}
dialog.modal-chat[open] {
  display: flex;
  flex-direction: column;
}
.modal-agent-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-av {
  width: 42px;
  height: 42px;
  min-width: 42px;
  max-width: 42px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
  background: var(--purple);
  flex: 0 0 42px !important;
  box-sizing: border-box;
}
.modal-agent-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-role {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  background: #f1e8f7;
  color: #5c246b;
  border: 1px solid rgba(107, 45, 123, 0.25);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.modal-agent-status {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}
.text-online { color: #16a34a; font-weight: 600; }
#chat-btn-gohome {
  background: rgba(90, 85, 214, 0.12) !important;
  color: #5a55d6 !important;
  border-color: rgba(90, 85, 214, 0.3) !important;
  font-weight: 700 !important;
}
#chat-btn-gohome:hover {
  background: #5a55d6 !important;
  color: #ffffff !important;
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}
.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 86%;
}
.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-msg.agent {
  align-self: flex-start;
}
.chat-bubble {
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.chat-msg.user .chat-bubble {
  background: var(--purple);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.chat-msg.agent .chat-bubble {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--wall);
  border-bottom-left-radius: 4px;
}
.chat-bubble .sender-name {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--purple);
}
.chat-msg.user .chat-bubble .sender-name { color: rgba(255,255,255,0.85); }
.chat-bubble .md table { font-size: 12.5px; }
.chat-bubble .md p:last-child { margin-bottom: 0; }
.chat-typing {
  padding: 8px 20px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border-top: 1px solid var(--wall);
}
.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
  animation: typingBounce 1s infinite alternate;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  from { transform: translateY(0); opacity: 0.4; }
  to { transform: translateY(-4px); opacity: 1; }
}

.chat-foot {
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid var(--wall);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-sugg {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.chip-sugg {
  border: 1px solid var(--wall);
  background: var(--floor);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  flex: none;
}
.chip-sugg:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: #ffffff;
}
.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-input-row textarea {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  border: 1px solid var(--wall);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  outline: none;
  resize: none;
  background: #ffffff;
}
.chat-input-row textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-soft);
}

/* Modal Document & Report Viewer */
dialog.modal-viewer {
  width: min(880px, calc(100vw - 32px));
  height: min(780px, calc(100vh - 48px));
  max-height: 90vh;
}
dialog.modal-viewer[open] {
  display: flex;
  flex-direction: column;
}
.modal-viewer .modal-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 32px;
}

/* Modal Team Profiles: Gaming Roblox Style */
.head-btn { flex: none; border: 1px solid var(--wall); background: #fff; border-radius: 99px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.head-btn:hover { border-color: var(--purple); color: var(--purple); }
dialog.prof { width: min(1080px, calc(100vw - 32px)); height: min(780px, calc(100vh - 48px)); max-height: 90vh; }
dialog.prof[open] { display: flex; flex-direction: column; }
.prof-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px 1fr; background: #ffffff; }

/* Left Roblox Character Panel */
.prof-char-panel {
  border-right: 1px solid var(--wall);
  background: linear-gradient(180deg, #faf8f5 0%, #f3eee7 100%);
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
  overflow: hidden;
  user-select: none;
}
.prof-char-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--wall);
  border-radius: 12px;
  padding: 4px 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.btn-char-arrow {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: var(--floor);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s ease;
  flex: none;
}
.btn-char-arrow:hover {
  background: var(--purple-soft);
  color: var(--purple);
}
.prof-char-select {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-overflow: ellipsis;
}
.prof-stage {
  flex: 1;
  min-height: 280px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 60%, rgba(255,255,255,0.95) 0%, rgba(240,235,225,0.45) 75%);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.03);
  overflow: hidden;
  cursor: grab;
}
.prof-stage:active {
  cursor: grabbing;
}
.prof-stage canvas {
  width: 100% !important;
  height: 100% !important;
  outline: none;
}
.prof-hint-3d {
  position: absolute;
  bottom: 8px;
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  padding: 3px 10px;
  border-radius: 99px;
  pointer-events: none;
  border: 1px solid rgba(0,0,0,0.06);
}
.prof-char-summary {
  background: #ffffff;
  border: 1px solid var(--wall);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.pcs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pcs-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.pcs-dept-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--purple-soft);
  color: var(--purple);
}
.pcs-role {
  font-size: 12px;
  color: var(--muted);
}
.pcs-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.pcs-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--floor);
  color: var(--ink);
  border: 1px solid var(--wall);
}
.pcs-pill.fill-stat {
  color: #16a34a;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.pcs-pill.fill-stat.empty {
  color: var(--muted);
  border-color: var(--wall);
  background: var(--floor);
}

/* Right Side: Form Wrap */
.prof-form-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
}
.prof-form {
  padding: 20px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pf-who { display: flex; align-items: center; gap: 14px; }
.pf-who b { font-size: 18px; display: block; line-height: 1.3; }
.pf-who span { color: var(--muted); font-size: 13px; }
.pf-field label, .pf-label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.pf-help { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pf-field textarea, .chip-in input {
  width: 100%; border: 1px solid var(--wall); border-radius: 10px; padding: 8px 10px; background: #fff; outline: 0; resize: vertical; font: inherit; font-size: 14px;
}
.pf-field textarea { min-height: 76px; }
.pf-field textarea:focus, .chip-in input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.seg { display: inline-flex; border: 1px solid var(--wall); border-radius: 10px; padding: 3px; gap: 3px; background: var(--floor); }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 5px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: #fff; color: var(--purple); box-shadow: 0 1px 4px rgba(43,37,48,.12); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chips:empty { display: none; }
.tagc { display: inline-flex; align-items: center; gap: 4px; background: var(--purple-soft); color: var(--purple); border-radius: 99px; padding: 3px 4px 3px 11px; font-size: 13px; font-weight: 600; }
.tagc button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; line-height: 1; font-size: 15px; }
.tagc button:hover { background: rgba(107,45,123,.14); }
.chip-in { margin-bottom: 8px; }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.sugg button { border: 1px dashed var(--wall-strong); background: #fff; border-radius: 99px; padding: 2px 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.sugg button:hover { border-color: var(--purple); color: var(--purple); border-style: solid; }
.pf-foot { position: sticky; bottom: 0; margin: auto -24px 0; padding: 12px 24px; background: rgba(255,255,255,.96); border-top: 1px solid var(--wall); display: flex; align-items: center; gap: 8px; }
.pf-foot .note { color: var(--muted); font-size: 12px; margin-right: auto; }
.pf-foot .note.dirty { color: var(--orange); }
.prof-intro { background: var(--purple-soft); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-size: 13.5px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .md { padding: 4px 16px 20px; }
  .bubble { max-width: 150px; font-size: 11px; }
  .addr { left: 12px; right: auto; }
  .hint { display: none; }
  .scene-tools { top: 56px; }
  .lbl { display: none; }
  .scene.full .fs-bar { bottom: 10px; }
  .fs-bar .steps { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .fs-bar .step { font-size: 11.5px; padding: 4px 10px; white-space: nowrap; flex: none; }
  .fs-row .btn-primary { padding: 10px 14px; }
  .prof .report-head { flex-wrap: nowrap; }
  .prof .report-head small { display: none; }
  .pf-foot .btn { white-space: nowrap; }
  .pf-foot .note { font-size: 11px; line-height: 1.3; }
  .scene.full .addr { display: none; }
  .prof-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .prof-list { max-height: 170px; border-right: 0; border-bottom: 1px solid var(--wall); }
  .prof-form { padding: 14px 16px 0; }
  .pf-foot { margin: auto -16px 0; padding: 10px 16px; }
  .pf-grid { grid-template-columns: 1fr; }
  dialog.modal-std {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 20px) !important;
    height: calc(100vh - 20px) !important;
    border-radius: 12px !important;
  }
  .modal-std .modal-head {
    padding: 10px 14px;
    gap: 10px;
  }
  .modal-actions {
    gap: 4px;
  }
  .modal-actions .btn-sm {
    padding: 5px 8px;
    font-size: 11px;
  }
  .modal-viewer .modal-body {
    padding: 16px 16px !important;
  }
}
@media (max-width: 560px) {
  .modal-actions .btn-sm span.btn-lbl {
    display: none;
  }
  .modal-actions .btn-sm {
    padding: 6px 9px;
  }
}

/* ==========================================================================
   GAMEPLAY MODE: 3D Roblox Adventure & Bubble Chat HUD
   ========================================================================== */
/* Mode Game Buttons */
.head-btn-game {
  flex: none;
  border: 1.5px solid var(--purple) !important;
  background: #fbf5fc !important;
  color: var(--purple) !important;
  border-radius: 99px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 6px rgba(107, 45, 123, 0.08) !important;
  transition: all .15s ease !important;
}
.head-btn-game:hover {
  background: var(--purple) !important;
  color: #ffffff !important;
  border-color: var(--purple) !important;
  box-shadow: 0 4px 12px rgba(107, 45, 123, 0.25) !important;
  transform: translateY(-1px);
}
.head-btn-game svg {
  flex: none;
}

.scene-tools a.sc-btn-game {
  border: 1px solid var(--wall);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(43, 37, 48, 0.06);
  transition: all .15s ease;
}
.scene-tools a.sc-btn-game:hover {
  border-color: var(--purple);
  background: #ffffff;
  color: var(--purple);
}
.scene-tools a.sc-btn-game svg {
  flex: none;
}

body.game-body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: fixed;
  inset: 0;
  background: #0f0d14;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.game-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.game-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* 3D World Overlay Projections */
.game-world-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.game-floating-tag {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: translate(-50%, -100%);
  transition: opacity .15s;
}
.game-floating-tag .gft-interact {
  background: #f57c00;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(245, 124, 0, 0.8);
  animation: pulseInteract 1.2s infinite alternate;
}
@keyframes pulseInteract {
  from { transform: scale(0.95); opacity: 0.9; }
  to { transform: scale(1.08); opacity: 1; }
}

.game-floating-tag .gft-name {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(43, 37, 48, 0.12);
  border-radius: 99px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}
.game-floating-tag .gft-name b {
  font-size: 12px;
  color: var(--ink);
}
.game-floating-tag .gft-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.game-floating-tag .spv-tag {
  font-size: 9.5px;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 4px;
  border-radius: 4px;
}

/* 3D Floating Speech Bubbles */
.game-speech-bubble {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 280px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  animation: popBubble .2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 12;
}
.game-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}
.player-bubble {
  background: #2b2530;
  color: #ffffff;
  border: 1px solid #f57c00;
}
.player-bubble::after {
  border-top: 7px solid #2b2530;
}
.npc-bubble {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid rgba(43, 37, 48, 0.12);
}
.npc-bubble::after {
  border-top: 7px solid #ffffff;
}
@keyframes popBubble {
  from { transform: translate(-50%, -85%) scale(0.7); opacity: 0; }
  to { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}

/* In-Game HUD */
.game-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 18px;
  z-index: 15;
}

/* Unified Gaming HUD Top Bar */
.hud-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: auto;
  background: rgba(14, 11, 20, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 6px 14px;
  min-height: 52px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.42);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.hud-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.16);
  flex: none;
}

.hud-back-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all .15s;
}
.hud-back-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #f57c00;
  color: #fff;
  transform: translateY(-1px);
}

.hud-player-badge {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  box-shadow: none;
}
.hud-player-av {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #f57c00;
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hud-player-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.hpm-top {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.hpm-top b {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}
.badge-dept {
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  background: #f57c00;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.hud-player-meta .badge-role {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
.hpm-stamina {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}
.stamina-lbl {
  font-size: 9px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.stamina-track {
  width: 76px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.stamina-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #2e9d6a, #7cd3a3);
  transition: width .1s;
}

.hud-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.hud-loc-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: none;
}
.hud-loc-pill .dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e9d6a;
  box-shadow: 0 0 8px #2e9d6a;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-radius: 10px;
  height: 38px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: none;
  transition: transform .12s, border-color .12s, background .12s;
}
.hud-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #f57c00;
  transform: translateY(-1px);
}
.hud-btn-accent {
  background: linear-gradient(135deg, #f57c00, #e0457b);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(245, 124, 0, 0.35);
}
.hud-btn-accent:hover {
  background: linear-gradient(135deg, #ff8b17, #f04e87);
}
.hud-icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
  font-size: 14px;
}
.hud-btn.is-active {
  background: #f57c00 !important;
  color: #ffffff !important;
  border-color: #f57c00 !important;
  box-shadow: 0 0 14px rgba(245, 124, 0, 0.6) !important;
}

/* Touchpad 360 Mode Notification Banner */
.touchpad-hint-banner {
  position: absolute;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 16, 26, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1.5px solid #f57c00;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(245, 124, 0, 0.35);
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  z-index: 50;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  animation: fadeInBanner .2s ease-out;
}
.touchpad-hint-banner[hidden] {
  display: none !important;
}
.touchpad-hint-banner .dot-rec {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f57c00;
  box-shadow: 0 0 8px #f57c00;
  animation: pulseTouchpadDot 1s infinite alternate;
}
@keyframes pulseTouchpadDot {
  from { opacity: 0.4; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.15); }
}
@keyframes fadeInBanner {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Minimap Radar Card */
.hud-radar-card {
  position: absolute;
  top: 72px;
  right: 18px;
  width: 160px;
  background: rgba(28, 24, 34, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.radar-head b {
  font-size: 10px;
  color: #d8d2c9;
  letter-spacing: .06em;
}
.radar-floor {
  font-size: 10px;
  font-weight: 800;
  color: #f57c00;
  background: rgba(245, 124, 0, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
}
.radar-canvas-wrap {
  width: 144px;
  height: 144px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
#radar-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.radar-foot {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #9aa4ad;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bottom Interaction Banner Prompt */
.hud-interact-prompt {
  align-self: center;
  margin-bottom: 12px;
  background: rgba(28, 24, 34, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid #f57c00;
  color: #ffffff;
  border-radius: 99px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(245, 124, 0, 0.4);
  pointer-events: auto;
  cursor: pointer;
  animation: pulsePrompt 1.4s infinite alternate;
}
.hip-key {
  width: 24px;
  height: 24px;
  background: #f57c00;
  color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.hip-text {
  font-size: 13px;
}
.hip-text b {
  color: #f9c06b;
}
@keyframes pulsePrompt {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

/* Bottom Controls Hint Strip */
.hud-controls-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(28, 24, 34, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 8px 20px;
  align-self: center;
  font-size: 11.5px;
  color: #d1c7bc;
  pointer-events: auto;
  flex-wrap: wrap;
}
.hch-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hud-controls-hint kbd {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
}

/* Mobile Virtual Touch Controls */
.hud-touch-controls {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 18;
}
.hud-touch-controls.active {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 24px;
}
.touch-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}
.td-mid {
  display: flex;
  gap: 4px;
}
.td-btn {
  width: 52px;
  height: 52px;
  background: rgba(43, 37, 48, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.td-btn:active {
  background: rgba(245, 124, 0, 0.8);
}
.touch-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}
.ta-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-weight: 800;
  font-size: 11px;
  color: #ffffff;
  cursor: pointer;
}
.ta-jump { background: #6b2d7b; }
.ta-sprint { background: #f57c00; }
.ta-talk { background: #2e9d6a; }

/* Interactive Dialogue Backdrop & Bubble Chat Sheet */
.dialogue-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 11, 20, 0.44);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  z-index: 24;
  animation: fadeInBackdrop .18s ease-out;
}
.dialogue-backdrop[hidden] {
  display: none !important;
}
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dialogue-sheet {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, calc(100vw - 32px));
  max-height: 520px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(43, 37, 48, 0.15);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  z-index: 25;
  overflow: hidden;
  animation: slideUpDialogue .22s ease-out;
  pointer-events: auto;
}
@keyframes slideUpDialogue {
  from { transform: translate(-50%, 40px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.ds-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--wall);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #faf7f2 0%, #ffffff 100%);
}
.ds-agent-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ds-av {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f57c00;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ds-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ds-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ds-name-row b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.ds-name-row .badge-dept {
  font-size: 10px;
  font-weight: 800;
  color: #ffffff !important;
  padding: 2.5px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  line-height: 1.2;
}
.ds-name-row .badge-role {
  background: #f3eaf8 !important;
  color: #581c67 !important;
  border: 1.5px solid rgba(107, 45, 123, 0.28) !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  padding: 2.5px 10px !important;
  border-radius: 99px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: inline-flex !important;
  align-items: center;
  line-height: 1.2;
}
.ds-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.ds-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--wall);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-close-btn:hover {
  background: var(--floor);
  border-color: var(--purple);
}

.ds-feed {
  flex: 1;
  max-height: 240px;
  min-height: 140px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 45, 123, 0.3) transparent;
}
.ds-feed::-webkit-scrollbar {
  width: 6px;
}
.ds-feed::-webkit-scrollbar-track {
  background: transparent;
}
.ds-feed::-webkit-scrollbar-thumb {
  background: rgba(107, 45, 123, 0.3);
  border-radius: 99px;
}
.ds-msg {
  display: flex;
}
.ds-msg.user {
  justify-content: flex-end;
}
.ds-msg.agent {
  justify-content: flex-start;
}
.ds-msg-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.ds-msg.user .ds-msg-bubble {
  background: var(--purple);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.ds-msg.agent .ds-msg-bubble {
  background: var(--floor);
  color: var(--ink);
  border: 1px solid var(--wall);
  border-bottom-left-radius: 4px;
}
.ds-msg-author {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  opacity: 0.85;
}
.ds-msg-author small {
  font-weight: 400;
  margin-left: 4px;
}

.ds-typing {
  padding: 4px 18px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.ds-foot {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--wall);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ds-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.ds-chip {
  background: var(--floor);
  border: 1px solid var(--wall);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  flex: none;
}
.ds-chip:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.ds-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ds-form textarea {
  flex: 1;
  min-height: 40px;
  max-height: 90px;
  border: 1px solid var(--wall);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
  resize: none;
  background: #fafafa;
}
.ds-form textarea:focus {
  border-color: var(--purple);
  background: #ffffff;
}

/* Character Selection Screen */
.char-select-screen {
  position: fixed;
  inset: 0;
  background: rgba(14, 11, 18, 0.88);
  backdrop-filter: blur(18px);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.char-select-screen.visible {
  display: flex;
}
.css-card {
  width: min(1080px, 96vw);
  height: min(720px, 92vh);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.css-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--wall);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #faf8f5 0%, #ffffff 100%);
}
.css-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.css-logo-badge {
  font-size: 26px;
}
.css-title-wrap h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.01em;
}
.css-title-wrap p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.css-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--wall);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.css-tabs {
  padding: 8px 24px;
  border-bottom: 1px solid var(--wall);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #faf8f5;
}
.css-tab {
  background: #fff;
  border: 1px solid var(--wall);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.css-tab.on {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.css-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  background: #ffffff;
}

/* Left preview panel */
.css-preview-panel {
  border-right: 1px solid var(--wall);
  background: linear-gradient(180deg, #faf8f5 0%, #f3eee7 100%);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.css-stage-wrap {
  position: relative;
  background: radial-gradient(circle at 50% 60%, rgba(245, 124, 0, 0.14) 0%, rgba(255, 255, 255, 0.4) 65%);
  border: 1px solid var(--wall);
  border-radius: 14px;
  height: 200px;
  overflow: hidden;
  cursor: grab;
}
.css-stage {
  width: 100%;
  height: 100%;
}
.css-stage-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 8px;
  border-radius: 99px;
  pointer-events: none;
}
.css-stat-card {
  background: #ffffff;
  border: 1px solid var(--wall);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.css-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.css-stat-head b {
  font-size: 16px;
}
.css-stat-role {
  font-size: 12.5px;
  color: var(--muted);
}
.css-stat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.stat-pill {
  font-size: 11px;
  background: var(--floor);
  border: 1px solid var(--wall);
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--ink);
}
.css-stat-bio {
  font-size: 12px;
  line-height: 1.5;
  color: #5d5464;
  margin-top: 6px;
  border-top: 1px dashed var(--wall);
  padding-top: 8px;
}
.css-spawn-btn {
  margin-top: auto;
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  justify-content: center;
  background: linear-gradient(135deg, #f57c00 0%, #e0457b 100%);
  border: none;
  box-shadow: 0 4px 16px rgba(245, 124, 0, 0.4);
}
.css-spawn-btn:hover {
  background: linear-gradient(135deg, #ff8b17 0%, #f04e87 100%);
}

/* Right character cards grid */
.css-grid-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
}
.css-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.css-char-card {
  background: #ffffff;
  border: 1.5px solid var(--wall);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all .15s;
}
.css-char-card:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.css-char-card.selected {
  border-color: #f57c00;
  background: #fff9f2;
  box-shadow: 0 0 0 2px #f57c00;
}
.ccc-av {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f57c00;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ccc-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ccc-name {
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ccc-role {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Help Modal Grid */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 8px 0;
}
.help-card {
  background: var(--floor);
  border: 1px solid var(--wall);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hc-keys {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
}
.help-card kbd {
  background: #fff;
  border: 1px solid var(--wall);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
}
.help-card b {
  font-size: 13.5px;
}
.help-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 820px) {
  .css-body { grid-template-columns: 1fr; }
  .css-preview-panel { max-height: 280px; }
  .hud-radar-card { display: none; }
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 25, 38, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.28);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast[hidden] { display: none !important; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@media print {
  header, .hero, .scene, .board, .analysis, .report-head, .toast { display: none !important; }
  .report { border: 0; box-shadow: none; margin: 0; }
}

/* ==========================================================================
   VOICE ASSISTANT ALSA (voice-to-voice, Jarvis style)
   ========================================================================== */
.head-btn-voice {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--orange); background: var(--orange-soft); color: #c25e00; font-weight: 700;
  transition: all .15s ease;
}
.head-btn-voice:hover { background: var(--orange); border-color: var(--orange); color: #fff; transform: translateY(-1px); }
.head-btn-voice svg { flex: none; }

dialog.modal-voice {
  width: min(560px, calc(100vw - 32px)); max-height: 90vh;
  background: radial-gradient(120% 80% at 50% 0%, #1d2a44 0%, #0b1120 70%); color: #dbe7ff;
  border: 1px solid #22314f; display: none; flex-direction: column;
}
dialog.modal-voice[open] { display: flex; }
.vc-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #1d2b47; }
.vc-brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.vc-brand b { letter-spacing: .32em; color: #7fd3ff; font-size: 15px; }
.vc-brand span { font-size: 12px; color: #7d8fb3; }
.vc-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #9fb0d3; cursor: pointer; white-space: nowrap; }
.vc-toggle input { accent-color: #38bdf8; }
.modal-voice .vc-close { background: transparent; color: #9fb0d3; border-color: #2a3a5c; }
.modal-voice .vc-close:hover { color: #fff; background: #1d2b47; }

.vc-stage { display: flex; flex-direction: column; align-items: center; padding: 26px 18px 14px; gap: 12px; }
.vc-orb { position: relative; width: 150px; height: 150px; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.vc-orb:focus-visible { outline: 2px solid #7fd3ff; outline-offset: 6px; }
.vc-core {
  position: absolute; inset: 30px; border-radius: 50%; display: grid; place-items: center; color: #e6f6ff;
  background: radial-gradient(circle at 35% 30%, #5cc8ff, #1769c2 60%, #0b2f66);
  box-shadow: 0 0 24px rgba(56,189,248,.55), inset 0 0 18px rgba(255,255,255,.18);
  transition: transform .15s ease, box-shadow .2s ease;
  transform: scale(var(--lvl, 1));
}
.vc-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(56,189,248,.35); }
.vc-ring.r2 { inset: 12px; border-style: dashed; border-color: rgba(127,211,255,.4); animation: vcSpin 14s linear infinite; }
.vc-ring.r3 { inset: 22px; border-color: rgba(56,189,248,.18); }
.vc-orb[data-state="listening"] .vc-core { background: radial-gradient(circle at 35% 30%, #ff9f5a, #f57c00 60%, #8a3a00); box-shadow: 0 0 34px rgba(245,124,0,.7); }
.vc-orb[data-state="listening"] .vc-ring.r1 { animation: vcPulse 1.2s ease-out infinite; border-color: rgba(245,124,0,.6); }
.vc-orb[data-state="thinking"] .vc-ring.r2 { animation-duration: 1.4s; border-color: #7fd3ff; }
.vc-orb[data-state="thinking"] .vc-core { animation: vcBreath 1.2s ease-in-out infinite; }
.vc-orb[data-state="speaking"] .vc-ring.r1 { animation: vcPulse .8s ease-out infinite; }
.vc-orb[data-state="speaking"] .vc-core { box-shadow: 0 0 44px rgba(56,189,248,.85); }
@keyframes vcSpin { to { transform: rotate(360deg); } }
@keyframes vcPulse { from { transform: scale(1); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@keyframes vcBreath { 50% { transform: scale(.92); } }
@media (prefers-reduced-motion: reduce) { .vc-ring, .vc-core { animation: none !important; } }

.vc-status { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #7fd3ff; text-align: center; }
.vc-live { min-height: 22px; font-size: 15px; color: #fff; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.vc-log { flex: 1; overflow-y: auto; padding: 4px 18px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 90px; max-height: 34vh; }
.vc-hint { font-size: 13px; color: #7d8fb3; text-align: center; }
.vc-msg { max-width: 86%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.vc-msg.me { align-self: flex-end; background: #1d2b47; color: #dbe7ff; border-bottom-right-radius: 4px; }
.vc-msg.alsa { align-self: flex-start; background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.3); color: #e6f6ff; border-bottom-left-radius: 4px; }
.vc-msg.alsa b { color: #7fd3ff; font-size: 11px; letter-spacing: .2em; display: block; }
.vc-msg.sys { align-self: center; font-size: 12px; color: #9fb0d3; background: none; padding: 2px 8px; }
.vc-type { display: flex; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid #1d2b47; }
.vc-type input { flex: 1; min-width: 0; background: #0f1a30; border: 1px solid #2a3a5c; color: #fff; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; }
.vc-type input:focus { outline: none; border-color: #38bdf8; }
@media (max-width: 560px) {
  dialog.modal-voice { height: auto !important; }
  .vc-toggle { font-size: 11px; }
  .vc-orb { width: 128px; height: 128px; }
}
