:root {
  /* 🌌 Cosmic Interstellar Palette */
  --bg-main: #050212;
  --bg-radial: radial-gradient(circle at 50% 30%, #160738 0%, #09031a 45%, #020108 100%);
  --panel-bg: rgba(14, 6, 32, 0.72);
  --panel-border: rgba(160, 102, 255, 0.3);
  --panel-border-glow: rgba(160, 102, 255, 0.65);
  
  --card-glass: rgba(22, 10, 48, 0.6);
  --card-hover: rgba(36, 16, 76, 0.75);
  
  --violet-neon: #a066ff;
  --violet-bright: #c77dff;
  --violet-glow: rgba(160, 102, 255, 0.45);
  --violet-dim: rgba(160, 102, 255, 0.16);
  
  --aurora-mint: #00f5d4;
  --aurora-mint-glow: rgba(0, 245, 212, 0.45);
  --aurora-mint-dim: rgba(0, 245, 212, 0.14);
  
  --cyan-cosmic: #48cae4;
  --gold-star: #ffd166;
  --ok: #52b788;
  --danger: #ff4d6d;
  
  --text-main: #f8fbff;
  --text-dim: #b8a9d6;
  --text-muted: #6f5f8a;
  
  --font-ui: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", sans-serif;
  --font-hud: "Orbitron", -apple-system, sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-ui);
  overflow: hidden;
  letter-spacing: -0.25px;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* ---- Ambient Cosmic Aurora & Starfield Background ---- */

.space-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--bg-radial);
  pointer-events: none;
}

.space-bg::before {
  content: "";
  position: absolute;
  top: -25%;
  left: 15%;
  width: 70vw;
  height: 70vh;
  background: radial-gradient(circle, rgba(160, 102, 255, 0.16) 0%, rgba(0, 245, 212, 0.08) 45%, transparent 75%);
  filter: blur(90px);
  animation: cosmicAuroraDrift 20s ease-in-out infinite alternate;
  pointer-events: none;
}

.space-bg::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: 15%;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(0, 245, 212, 0.12) 0%, rgba(160, 102, 255, 0.06) 50%, transparent 75%);
  filter: blur(90px);
  animation: cosmicAuroraDrift 24s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

@keyframes cosmicAuroraDrift {
  0% { transform: translate(-10%, -10%) scale(1) rotate(0deg); }
  100% { transform: translate(12%, 12%) scale(1.2) rotate(15deg); }
}

#field {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(2, 0, 8, 0.9) 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(160, 102, 255, 0.015) 4px);
}

/* ---- Boot Screen ---- */

#boot {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 1, 10, 0.96);
  backdrop-filter: blur(28px);
  pointer-events: auto;
  transition: opacity 0.6s ease, visibility 0.6s;
}

#boot.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-frame {
  width: min(480px, 92vw);
  background: rgba(18, 8, 38, 0.88);
  border: 1px solid rgba(160, 102, 255, 0.45);
  border-radius: 24px;
  padding: 42px 38px;
  box-shadow: 0 0 70px rgba(160, 102, 255, 0.25), 0 25px 50px rgba(0, 0, 0, 0.8);
  text-align: center;
  backdrop-filter: blur(24px);
}

.boot-badge {
  display: inline-block;
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  color: var(--aurora-mint);
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.4);
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.2);
}

.boot-frame h1 {
  font-family: var(--font-hud);
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 5px;
  text-shadow: 0 0 25px var(--violet-neon);
  margin-bottom: 8px;
}

.boot-sub {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

#boot-log {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-align: left;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(160, 102, 255, 0.2);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  max-height: 130px;
  overflow-y: auto;
}

#boot-log li {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

#boot-log li .ok {
  color: var(--aurora-mint);
  font-weight: bold;
}

#ignite {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #a066ff, #6a00f4);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0 35px rgba(160, 102, 255, 0.5);
  transition: all 0.25s ease;
}

#ignite:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(199, 125, 255, 0.9);
}

.boot-join {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boot-join.hidden,
#ignite.hidden,
#boot-hud-hint.hidden,
#boot-log.hidden {
  display: none !important;
}

.boot-join-topic {
  font-size: 15px;
  font-weight: 700;
  color: var(--aurora-mint);
  line-height: 1.4;
}

.boot-join-label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #dce7ff;
  margin-bottom: -4px;
}

.boot-join input {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(160, 102, 255, 0.4);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
}

.boot-join input:focus {
  border-color: var(--aurora-mint);
}

#boot-join-enter {
  width: 100%;
  background: linear-gradient(135deg, #00f5d4, #6a00f4);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 18px;
  border-radius: 14px;
  cursor: pointer;
}

.boot-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}

.boot-code-row {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(160, 102, 255, 0.25);
}

.boot-code-row.hidden {
  display: none !important;
}

.boot-or {
  font-size: 14px;
  color: #c9d4f5;
  margin-bottom: 10px;
}

.boot-code-fields {
  display: flex;
  gap: 8px;
}

.boot-code-fields input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(160, 102, 255, 0.45);
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  padding: 12px 12px;
}

#boot-code-enter {
  flex-shrink: 0;
  background: rgba(0, 245, 212, 0.18);
  border: 1px solid var(--aurora-mint);
  color: var(--aurora-mint);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.inapp-warn {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 196, 0, 0.12);
  border: 1px solid rgba(255, 196, 0, 0.45);
  color: #ffe7a3;
  font-size: 14px;
  line-height: 1.45;
}

.inapp-warn.hidden {
  display: none !important;
}

.inapp-warn a {
  display: inline-block;
  margin-top: 8px;
  color: #fff;
  font-weight: 800;
  background: #00c853;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
}

/* ---- Main Dashboard Layout ---- */

#onto-world {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
#onto-world canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#onto-orbit {
  position: fixed;
  top: 72px;
  left: calc(18px + var(--left-rail, 320px) + 16px);
  right: calc(18px + var(--right-rail, 370px) + 16px);
  bottom: 0;
  z-index: 8;
  pointer-events: auto;
  cursor: grab;
  background: transparent;
}
#onto-orbit.is-grabbing {
  cursor: grabbing;
}

.hud {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 12px 18px;
  gap: 12px;
  position: relative;
  z-index: 10;
}

.hud.graph-stage {
  background: transparent;
  pointer-events: none;
}
.hud.graph-stage .dashboard-grid,
.hud.graph-stage .central-stage {
  pointer-events: none;
}
.hud.graph-stage .topbar,
.hud.graph-stage .panel,
.hud.graph-stage .bento-panel,
.hud.graph-stage .quick-card,
.hud.graph-stage .quick-btn,
.hud.graph-stage .live-ontology-bridge,
.hud.graph-stage .quick-chips,
.hud.graph-stage .chat-input-bar,
.hud.graph-stage .onto-topic-row,
.hud.graph-stage .hud-action-btn,
.hud.graph-stage button,
.hud.graph-stage input,
.hud.graph-stage textarea,
.hud.graph-stage aside,
.hud.graph-stage .hud-panels,
.hud.graph-stage .approval-card {
  pointer-events: auto;
}
body.graph-world {
  cursor: grab;
}
body.graph-world.is-orbiting {
  cursor: grabbing;
}
.hud.graph-stage .central-stage .reactor {
  display: none;
}
.hud.graph-stage .status-box {
  pointer-events: none;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 420px);
  z-index: 11;
}
.hud.graph-stage .status-box button {
  pointer-events: auto;
}
.hud-panels,
.approval-card {
  pointer-events: auto;
}
.hud-panels {
  position: fixed;
  right: 16px;
  top: 86px;
  width: min(380px, 34vw);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hud-panel {
  background: rgba(8, 4, 20, 0.9);
  border: 1px solid rgba(110, 244, 255, 0.35);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.hud-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  font-size: 12px;
  color: #9ef6ff;
}
.hud-panel iframe,
.hud-panel video {
  width: 100%;
  height: 210px;
  border: 0;
  background: #000;
}
.approval-card {
  position: fixed;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  z-index: 45;
  min-width: 260px;
  background: rgba(12, 6, 28, 0.94);
  border: 1px solid rgba(255, 209, 102, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  color: #e8fbff;
}
.approval-card.hidden {
  display: none;
}
.approval-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.approval-actions button {
  flex: 1;
  padding: 6px 8px;
  cursor: pointer;
}
body.graph-world .space-bg,
body.graph-world #field {
  opacity: 0.16;
}

.hud.hidden {
  display: none;
}

/* ---- Top Header Bar ---- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 10px 16px 10px 18px;
  backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.brand-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
}

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

.status-pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--aurora-mint);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--aurora-mint);
  animation: pulse-blink 1.8s infinite ease-in-out;
}

@keyframes pulse-blink {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.85); opacity: 0.35; }
}

.brand-title {
  font-family: var(--font-hud);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 16px var(--violet-neon);
}

.brand-status {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--aurora-mint);
  background: rgba(0, 245, 212, 0.14);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 245, 212, 0.35);
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.brand-status:hover,
.brand-status:focus-visible {
  color: #fff;
  background: rgba(0, 245, 212, 0.28);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.35);
  outline: none;
}

.brand-status.is-paused {
  color: #ffd166;
  background: rgba(255, 92, 92, 0.16);
  border-color: rgba(255, 209, 102, 0.55);
}

.brand-status.is-paused:hover,
.brand-status.is-paused:focus-visible {
  color: #fff;
  background: rgba(255, 92, 92, 0.32);
  box-shadow: 0 0 12px rgba(255, 209, 102, 0.35);
}

.brand-box.is-paused .status-pulse-dot {
  background: #ffd166;
  box-shadow: 0 0 14px #ffd166;
  animation: pulse-blink 2.8s infinite ease-in-out;
}

.clock-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-left: 22px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 209, 102, 0.25);
}

.clock-label {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-star);
}

.clock {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 0;
  min-width: 0;
  justify-content: flex-start;
  gap: 6px;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .top-actions {
    flex: 1 1 100%;
  }
}

.situation-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: linear-gradient(90deg, rgba(165, 0, 52, 0.28), rgba(14, 6, 32, 0.72));
  border: 1px solid rgba(255, 77, 109, 0.45);
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.situation-strip[hidden] {
  display: none;
}

.situation-strip.ticker-board {
  display: block;
  flex-wrap: nowrap;
  overflow: hidden;
  height: 38px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 209, 102, 0.08), transparent 40%),
    linear-gradient(90deg, #1a0508 0%, #2c0b14 42%, #140308 100%);
  border: 1px solid rgba(255, 180, 70, 0.45);
  box-shadow:
    inset 0 0 18px rgba(255, 80, 40, 0.18),
    0 0 14px rgba(255, 77, 109, 0.16);
}
.ticker-viewport {
  overflow: hidden;
  height: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  animation: ticker-rtl 36s linear infinite;
  will-change: transform;
}
.ticker-text {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  padding: 0 36px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #ffcc66;
  text-shadow: 0 0 8px rgba(255, 180, 40, 0.55);
}
.ticker-sep {
  color: rgba(255, 209, 102, 0.55);
}
.ticker-reply {
  color: #7ef9e3;
  text-shadow: 0 0 8px rgba(0, 245, 212, 0.5);
  font-weight: 600;
}
@keyframes ticker-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
.sit-eq, .sit-roll {
  color: #ffd6dc;
}
.sit-gate {
  font-family: var(--font-hud);
  letter-spacing: 1px;
  padding: 2px 9px;
  border-radius: 8px;
}
.sit-gate.hold {
  color: #fff;
  background: #c1121f;
  box-shadow: 0 0 12px rgba(193, 18, 31, 0.55);
}
.sit-metric {
  color: #ffd166;
}
.sit-next {
  color: #00f5d4;
}
.sit-ev {
  color: #95d5b2;
  font-weight: 500;
}

.verdict-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 8px;
}
.verdict-cell {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 77, 109, 0.28);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 0;
}
.verdict-cell .k {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #ff8fab;
  margin-bottom: 4px;
}
.verdict-cell .v {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #f8fbff;
  line-height: 1.4;
  word-break: keep-all;
}
.verdict-cell.verdict .v {
  color: #ff6b6b;
  font-size: 15px;
  font-weight: 800;
}
.verdict-cell.next .v {
  color: #00f5d4;
}
.verdict-cell.source .v {
  color: #ffd166;
}
.verdict-cell.source.scada .v {
  color: #7ef9e3;
}
@media (max-width: 720px) {
  .verdict-card {
    grid-template-columns: 1fr 1fr;
  }

  .heard-line,
  .audit-line {
    font-size: 10px;
    max-width: 92vw;
    padding: 0 10px;
  }
}

.hud-action-btn {
  background: linear-gradient(135deg, rgba(160, 102, 255, 0.18), rgba(106, 0, 244, 0.12));
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.hud-action-btn.lges-highlight-btn {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.25), rgba(82, 183, 136, 0.2));
  border: 1px solid var(--aurora-mint);
  color: var(--aurora-mint);
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.3);
}

.hud-action-btn.lges-highlight-btn:hover {
  background: var(--aurora-mint);
  color: #000;
  box-shadow: 0 0 22px var(--aurora-mint-glow);
}

.select-group {
  display: flex;
  gap: 6px;
}

.theme-select {
  background: rgba(18, 8, 38, 0.85);
  border: 1px solid var(--panel-border);
  color: var(--violet-bright);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.theme-select:hover, .theme-select:focus {
  border-color: var(--violet-bright);
}

.theme-select option {
  background: #0d041c;
  color: #fff;
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
}

.toggle input[type="checkbox"] {
  accent-color: var(--violet-neon);
  cursor: pointer;
}

/* ---- 3-Column Bento Dashboard Grid ---- */

.dashboard-grid {
  flex: 1;
  display: grid;
  grid-template-columns: var(--left-rail, 320px) 8px minmax(240px, 1fr) 8px var(--right-rail, 370px);
  gap: 8px;
  min-height: 0;
}

.dashboard-grid > .panel,
.dashboard-grid > .central-stage {
  min-width: 0;
}

.rail-resizer {
  position: relative;
  width: 8px;
  align-self: stretch;
  cursor: col-resize;
  touch-action: none;
  z-index: 50;
  pointer-events: auto;
  background: transparent;
  overflow: visible;
}

.rail-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8px;
  right: -8px;
}

.rail-resizer::before {
  content: "";
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: rgba(160, 102, 255, 0.28);
  transition: background 0.15s ease, box-shadow 0.15s ease, width 0.15s ease;
}

.rail-resizer:hover::before,
.rail-resizer:focus-visible::before,
.rail-resizer.is-active::before {
  width: 3px;
  background: #c9a6ff;
  box-shadow: 0 0 12px rgba(160, 102, 255, 0.75);
}

.rail-resizer:focus-visible {
  outline: 1px solid rgba(110, 244, 255, 0.7);
  outline-offset: 1px;
}

body.is-resizing-rails {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-rails iframe {
  pointer-events: none;
}

/* Bento Card Base */
.bento-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.widget-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(24px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.widget-card.sys-card,
.widget-card.memory-card {
  overflow: visible;
}

.widget-card:hover {
  border-color: var(--panel-border-glow);
  box-shadow: 0 8px 32px rgba(160, 102, 255, 0.22);
  transform: translateY(-1px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--aurora-mint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-star);
  background: rgba(255, 209, 102, 0.16);
  border: 1px solid rgba(255, 209, 102, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
}

.status-badge-ok {
  font-size: 11px;
  font-weight: 600;
  color: var(--aurora-mint);
  background: rgba(0, 245, 212, 0.14);
  border: 1px solid rgba(0, 245, 212, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
}

.btn-mini-add,
.btn-mini-opt {
  background: rgba(160, 102, 255, 0.18);
  border: 1px solid rgba(160, 102, 255, 0.45);
  color: var(--violet-bright);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mini-add:hover,
.btn-mini-opt:hover {
  background: var(--violet-neon);
  color: #fff;
  box-shadow: 0 0 12px var(--violet-glow);
}

/* Weather Card Body */
.weather-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weather-temp {
  font-family: var(--font-hud);
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 30%, #a066ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.weather-details {
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.45;
}

.dust-tag strong {
  color: var(--aurora-mint);
}

/* Quick App Grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--card-glass);
  border: 1px solid rgba(160, 102, 255, 0.2);
  border-radius: 12px;
  padding: 12px 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-btn:hover {
  background: rgba(160, 102, 255, 0.25);
  border-color: var(--violet-bright);
  box-shadow: 0 0 18px var(--violet-glow);
  transform: translateY(-3px) scale(1.03);
}

.quick-icon {
  font-size: 20px;
}

.quick-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
}

/* Schedule Mini List */
.schedule-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schedule-mini-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--violet-neon);
  font-size: 12px;
}

.sched-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold-star);
  background: rgba(255, 209, 102, 0.16);
  padding: 1px 6px;
  border-radius: 4px;
}

.sched-title {
  color: var(--text-main);
  font-weight: 500;
}

/* System Metric Bars */
.meter-item {
  margin-top: 10px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.meter-val {
  font-family: var(--font-mono);
  font-weight: bold;
  color: var(--aurora-mint);
}

.meter-bar-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6a00f4, #00f5d4);
  border-radius: 4px;
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

.meter-bar-fill.gold-fill {
  background: linear-gradient(90deg, #a066ff, #ffd166);
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
}

.hw-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(160, 102, 255, 0.15);
  font-size: 11px;
}

.hw-node span { color: var(--text-dim); }
.hw-node strong { color: var(--aurora-mint); }

/* Memory Card */
.memory-count-badge {
  font-size: 11px;
  color: var(--text-dim);
}

.memory-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.memory-mini-item {
  font-size: 12px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--gold-star);
  line-height: 1.35;
}

/* ---- Central Stage: Hologram & Visualizer ---- */

.central-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  position: relative;
}

.reactor {
  width: 320px;
  height: 320px;
  position: relative;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transform-origin: center center;
}

.r1 {
  width: 310px;
  height: 310px;
  border: 1px dashed rgba(160, 102, 255, 0.45);
  box-shadow: 0 0 22px rgba(160, 102, 255, 0.2);
  animation: spinR1 24s linear infinite;
}

.r2 {
  width: 256px;
  height: 256px;
  border: 1.5px solid rgba(0, 245, 212, 0.5);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.22);
  animation: spinR2 16s linear infinite;
}

.r3 {
  width: 204px;
  height: 204px;
  border: 1px dotted rgba(255, 209, 102, 0.55);
  animation: spinR3 10s linear infinite;
}

.r4 {
  width: 154px;
  height: 154px;
  border: 2px solid var(--violet-neon);
  box-shadow: 0 0 35px rgba(160, 102, 255, 0.55), inset 0 0 20px rgba(160, 102, 255, 0.25);
}

@keyframes spinR1 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spinR2 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes spinR3 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.avatar-face-img {
  position: absolute;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 42px rgba(165, 0, 52, 0.55), 0 0 18px rgba(0, 245, 212, 0.3);
  border: 1px solid rgba(255, 209, 102, 0.35);
}

.reactor:not(.theme-face) .avatar-face-img,
.reactor:not(.theme-face) .lg-g-layer {
  display: none;
}

.lg-g-layer {
  position: absolute;
  width: 176px;
  height: 176px;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s linear;
}

.reactor.speaking .lg-g-layer {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(110, 244, 255, 0.65));
}

.three-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 320px;
  z-index: 3;
  pointer-events: none;
}

#wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 320px;
  z-index: 2;
  pointer-events: none;
}

.status-box {
  text-align: center;
  margin-top: 10px;
}

.mode {
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 800;
  color: var(--aurora-mint);
  letter-spacing: 3px;
  text-shadow: 0 0 15px var(--aurora-mint);
}

.caption {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.hud-resume-btn {
  margin: 8px auto 0;
  display: inline-block;
  background: rgba(0, 245, 212, 0.16);
  border: 1px solid var(--aurora-mint);
  color: var(--aurora-mint);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.hud-resume-btn.hidden {
  display: none;
}

.heard-line {
  font-family: var(--font-hud);
  font-size: 11px;
  color: rgba(110, 244, 255, 0.78);
  margin: 6px auto 0;
  letter-spacing: 0.3px;
  min-height: 1.25em;
  max-width: 28rem;
  word-break: keep-all;
  line-height: 1.35;
}

.audit-line {
  font-family: var(--font-hud);
  font-size: 10px;
  color: rgba(180, 160, 255, 0.78);
  margin: 3px auto 0;
  letter-spacing: 0.3px;
  max-width: 28rem;
  word-break: keep-all;
}

.cap-lights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cap-dot {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(110, 244, 255, 0.25);
  color: var(--text-dim);
}

.cap-dot.ok {
  color: #0ff2c2;
  border-color: rgba(15, 242, 194, 0.55);
  background: rgba(15, 242, 194, 0.08);
}

.cap-dot.bad {
  color: #ff8aa0;
  border-color: rgba(255, 80, 110, 0.45);
  background: rgba(255, 80, 110, 0.08);
}

.memory-layers {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 8px;
}

.layer-row {
  display: flex;
  gap: 8px;
  font-size: 11px;
  align-items: baseline;
}

.layer-row span {
  flex: 0 0 2.4rem;
  color: var(--aurora-mint);
  font-family: var(--font-hud);
  font-size: 10px;
}

.layer-row b {
  font-weight: 500;
  color: var(--text-main);
  word-break: keep-all;
}

.live-up {
  margin: 8px 0 0;
  font-size: 10px;
  font-family: var(--font-hud);
  color: rgba(110, 244, 255, 0.75);
}

.goals-objective {
  margin: 8px 0 6px;
  font-size: 12px;
  color: var(--text-main);
}

.goals-krs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.goals-card {
  overflow: visible;
}

.tod-line {
  margin: 2px 0 0;
  font-size: 10px;
  color: rgba(110, 244, 255, 0.78);
  font-family: var(--font-hud);
}

.memory-editor {
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px solid rgba(160, 102, 255, 0.2);
  padding-top: 8px;
}

.memory-editor-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.memory-edit-row {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
  align-items: center;
}

.memory-edit-row input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(160, 102, 255, 0.25);
  color: var(--text-main);
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 6px;
}

.memory-edit-row button {
  font-size: 10px;
  padding: 3px 6px;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(110, 244, 255, 0.35);
  color: var(--aurora-mint);
  border-radius: 6px;
}

/* Live 3-Layer Ontology Bridge HUD Bar */
.hud.graph-stage .central-stage {
  justify-content: flex-end;
}
.hud.graph-stage .live-ontology-bridge {
  width: min(92%, 520px);
  max-width: 520px;
  margin-top: 8px;
  margin-bottom: 4px;
}
.live-ontology-bridge {
  width: 94%;
  max-width: 760px;
  background: rgba(14, 6, 32, 0.85);
  border: 1px solid rgba(160, 102, 255, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(160, 102, 255, 0.15);
  backdrop-filter: blur(16px);
}

.bridge-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-hud);
  font-size: 10.5px;
  color: var(--aurora-mint);
  letter-spacing: 1px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(160, 102, 255, 0.18);
  padding-bottom: 4px;
}

.bridge-icon {
  font-size: 14px;
}

.bridge-layers {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bridge-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
}

.bridge-tag.sem { border-left: 2.5px solid #00f2fe; }
.bridge-tag.kin { border-left: 2.5px solid #ffd166; }
.bridge-tag.dyn { border-left: 2.5px solid #c77dff; }

.spo-layer {
  margin-right: 4px;
  font-size: 12px;
}

.ontology-live-canvas {
  height: 360px;
  margin-top: 8px;
  border: 1px solid rgba(160, 102, 255, 0.28);
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 50%, rgba(0, 242, 254, 0.08), transparent 46%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 209, 102, 0.07), transparent 46%),
    radial-gradient(ellipse at 82% 50%, rgba(199, 125, 255, 0.08), transparent 46%),
    rgba(5, 2, 18, 0.72);
}
.hive-node.node-highlighted .hive-core {
  filter: drop-shadow(0 0 10px #fff);
}
.hive-core.pulse {
  animation: hivePulse 1.8s ease-in-out infinite;
}
@keyframes hivePulse {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}

.tag-layer {
  font-weight: 700;
  font-size: 10.5px;
  white-space: nowrap;
}

.bridge-tag.sem .tag-layer { color: #00f2fe; }
.bridge-tag.kin .tag-layer { color: #ffd166; }
.bridge-tag.dyn .tag-layer { color: #c77dff; }

.tag-content {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick Chips */
.quick-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.chip {
  background: rgba(26, 12, 54, 0.85);
  border: 1px solid rgba(160, 102, 255, 0.35);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.chip:hover {
  background: rgba(160, 102, 255, 0.3);
  border-color: var(--violet-bright);
  color: #fff;
  box-shadow: 0 0 18px var(--violet-glow);
  transform: translateY(-2px);
}

/* ---- Right Panel: Messenger Card Feed (COMMS) ---- */

.comms-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  backdrop-filter: blur(24px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.45);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(160, 102, 255, 0.2);
  margin-bottom: 12px;
}

.comms-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comms-title h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--violet-bright);
  letter-spacing: 0.5px;
}

.btn-clear {
  background: transparent;
  border: none;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.btn-clear:hover { color: var(--text-main); }

.suggest-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(160, 102, 255, 0.18);
}

.suggest-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 2px 0;
  cursor: pointer;
  text-align: left;
}

.suggest-toggle:hover .suggest-label,
.suggest-toggle:focus-visible .suggest-label {
  color: #fff;
}

.suggest-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #ffd166;
}

.suggest-chevron {
  color: #ffd166;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.suggest-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.suggest-chips.is-collapsed .suggest-chip-list {
  display: none;
}

.suggest-chips.is-collapsed .suggest-chevron {
  transform: rotate(-90deg);
}

.suggest-chip {
  background: rgba(165, 0, 52, 0.18);
  border: 1px solid rgba(255, 93, 115, 0.4);
  color: #ffd6dc;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
}

.suggest-chip:hover {
  background: rgba(165, 0, 52, 0.4);
  color: #fff;
  border-color: #ffd166;
}

.onto-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 88px;
  overflow-y: auto;
  padding: 0 2px 6px;
}
.cite-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  background: rgba(149, 213, 178, 0.12);
  border: 1px solid rgba(149, 213, 178, 0.4);
  color: #d8f3dc;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 8px;
  text-decoration: none;
}
.cite-chip strong {
  color: #95d5b2;
  font-size: 10.5px;
}
.cite-chip span {
  color: #cfe7d4;
  line-height: 1.35;
}

.walk-path {
  margin: 6px 0 2px;
  padding: 7px 9px;
  border: 1px solid rgba(0, 242, 254, 0.28);
  background: rgba(0, 30, 40, 0.45);
  border-radius: 8px;
  font-size: 11px;
}
.walk-title {
  color: #7ef9e3;
  font-weight: 700;
  font-size: 10.5px;
  margin-bottom: 4px;
}
.walk-hop {
  color: #d7fff7;
  line-height: 1.4;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.walk-empty {
  color: var(--text-dim);
}

.chat-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 4px;
}

.chat-feed::-webkit-scrollbar {
  width: 4px;
}
.chat-feed::-webkit-scrollbar-thumb {
  background: rgba(160, 102, 255, 0.35);
  border-radius: 2px;
}

/* Speech Bubbles */
.msg {
  display: flex;
  flex-direction: column;
  max-width: 92%;
  animation: msgPop 0.25s ease-out;
}

@keyframes msgPop {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg .who {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}

.msg.user {
  align-self: flex-end;
}

.msg.user .who {
  color: var(--gold-star);
  text-align: right;
}

.msg.user .bubble-body {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.28), rgba(212, 163, 115, 0.22));
  border: 1px solid rgba(255, 209, 102, 0.5);
  color: #fff;
  border-radius: 14px 14px 2px 14px;
  padding: 11px 16px;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.msg.weaid, .msg.jarvis {
  align-self: flex-start;
}

.msg.weaid .who, .msg.jarvis .who {
  color: var(--aurora-mint);
}

.msg.weaid .bubble-body, .msg.jarvis .bubble-body {
  background: var(--card-glass);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  border-radius: 14px 14px 14px 2px;
  padding: 13px 18px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.msg-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-msg-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.btn-msg-action:hover {
  background: rgba(160, 102, 255, 0.25);
  border-color: var(--violet-bright);
  color: #fff;
}

/* Chat Input Bar inside COMMS panel */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(160, 102, 255, 0.3);
  border-radius: 12px;
  padding: 6px 10px;
  margin-top: 10px;
}

.chat-input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13.5px;
  color: #fff;
  padding: 4px 6px;
}

.chat-input-bar input::placeholder {
  color: var(--text-muted);
}

.chat-input-bar button {
  background: linear-gradient(135deg, #a066ff, #6a00f4);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-input-bar button:hover {
  box-shadow: 0 0 14px var(--violet-glow);
}

/* ---- Bottom Dock ---- */

.dock {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 8px 14px;
  backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.mic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(160, 102, 255, 0.18);
  border: 1.5px solid var(--violet-bright);
  color: var(--violet-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.mic svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.mic:hover {
  background: var(--violet-bright);
  color: #000;
  box-shadow: 0 0 25px var(--violet-bright);
  transform: scale(1.05);
}

.mic.hot {
  background: var(--danger);
  border-color: #ff758f;
  color: #fff;
  animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 18px var(--danger); }
  50% { transform: scale(1.08); box-shadow: 0 0 32px var(--danger); }
}

.input-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

#prompt {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: #fff;
  padding: 6px 8px;
}

#prompt::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

#send {
  background: linear-gradient(135deg, #a066ff, #6a00f4);
  border: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 18px rgba(160, 102, 255, 0.4);
}

#send:hover {
  box-shadow: 0 0 25px rgba(199, 125, 255, 0.8);
  transform: translateY(-1px);
}

/* ---- Floating PiP Motion HUD ---- */

.motion-hud-panel {
  position: fixed;
  bottom: 82px;
  right: 22px;
  width: 300px;
  background: rgba(14, 6, 32, 0.95);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  backdrop-filter: blur(28px);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(160, 102, 255, 0.25);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.motion-hud-panel.hidden {
  display: none;
}

.motion-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(160, 102, 255, 0.2);
}

.motion-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-hud);
  font-size: 11px;
  color: var(--aurora-mint);
}

.hud-dot {
  width: 6px;
  height: 6px;
  background: var(--aurora-mint);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--aurora-mint);
}

.motion-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.motion-bg-select {
  background: var(--card-glass);
  border: 1px solid var(--panel-border);
  color: var(--violet-bright);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
}

.motion-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.motion-video-box {
  position: relative;
  width: 100%;
  height: 180px;
  background: #000;
}

#motion-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0.4;
}

#motion-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.gesture-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(14, 6, 32, 0.9);
  border: 1px solid var(--violet-bright);
  color: var(--violet-bright);
  font-family: var(--font-hud);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  z-index: 3;
}

.mode-badge {
  left: auto;
  right: 6px;
  border-color: var(--gold-star);
  color: var(--gold-star);
}

.motion-hud-footer {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 11px;
}

.motion-hint {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
}

/* ---- Air Cursor & Feedback Toast ---- */

.air-cursor {
  position: fixed;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
}

.air-cursor.hidden { display: none; }

.cursor-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--violet-bright);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--violet-bright);
}

.cursor-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.air-cursor.clicking .cursor-ring {
  border-color: var(--gold-star);
  box-shadow: 0 0 24px var(--gold-star);
  transform: scale(0.8);
}

.motion-feedback {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-15px);
  background: rgba(22, 10, 48, 0.96);
  border: 1px solid var(--violet-bright);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 24px;
  border-radius: 30px;
  box-shadow: 0 0 32px rgba(160, 102, 255, 0.55);
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  transition: all 0.25s ease-out;
}

.motion-feedback.pop {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   PALANTIR FOUNDRY ONTOLOGY KNOWLEDGE GRAPH MODAL
   ========================================================= */

.ontology-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 1, 10, 0.88);
  backdrop-filter: blur(28px);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  box-sizing: border-box;
  padding: 16px;
}

.ontology-modal.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ontology-dialog {
  width: min(1500px, 96vw);
  height: min(920px, 94vh);
  background: #0d061f;
  border: 1px solid rgba(160, 102, 255, 0.5);
  border-radius: 20px;
  box-shadow: 0 0 90px rgba(160, 102, 255, 0.45), 0 30px 90px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(28px);
  position: relative;
  box-sizing: border-box;
  margin: auto;
}

.ontology-dialog * {
  box-sizing: border-box;
}

.ontology-dialog-header {
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid rgba(160, 102, 255, 0.2);
  background: rgba(8, 3, 20, 0.85);
  flex-shrink: 0;
  gap: 16px;
  white-space: nowrap;
}

.dialog-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.dialog-icon {
  font-size: 26px;
}

.dialog-title-box h3 {
  font-family: var(--font-hud);
  font-size: 16px;
  color: var(--violet-bright);
  letter-spacing: 1.2px;
  margin: 0;
  white-space: nowrap;
}

.dialog-subtitle {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
}

.dialog-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.domain-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.domain-select-wrapper select {
  min-width: 250px;
  padding: 6px 12px;
  font-size: 12px;
}
.domain-locked {
  font-size: 12px;
  font-weight: 700;
  color: #7ef9e3;
  border: 1px solid rgba(0, 245, 212, 0.35);
  background: rgba(0, 40, 36, 0.45);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.skd-grow-panel {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 10px;
  background: rgba(0, 20, 24, 0.5);
}
.skd-grow-title {
  font-size: 12px;
  font-weight: 800;
  color: #7ef9e3;
  margin-bottom: 6px;
}
.skd-grow-steps {
  margin: 0 0 8px 18px;
  padding: 0;
  font-size: 11px;
  color: #d7fff7;
  line-height: 1.45;
}
.skd-pending-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.skd-pending-row {
  border: 1px dashed rgba(255, 209, 102, 0.45);
  border-radius: 8px;
  padding: 6px 8px;
}
.skd-pending-triple {
  font-size: 11px;
  color: #ffe08a;
  margin-bottom: 4px;
}
.skd-pending-empty {
  font-size: 11px;
  color: var(--text-dim);
}

.owl-download-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-download-owl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.2), rgba(160, 102, 255, 0.15));
  border: 1px solid var(--aurora-mint);
  color: var(--aurora-mint);
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-download-owl:hover {
  background: var(--aurora-mint);
  color: #000;
  box-shadow: 0 0 16px var(--aurora-mint-glow);
}

.layer-filter-bar {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(160, 102, 255, 0.25);
  flex-shrink: 0;
}

.layer-filter-btn {
  background: transparent;
  border: none;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.layer-filter-btn:hover {
  color: #fff;
}

.layer-filter-btn.active {
  background: rgba(160, 102, 255, 0.25);
  color: #fff;
  box-shadow: 0 0 12px rgba(160, 102, 255, 0.35);
}

.layer-filter-btn.sem.active { background: rgba(0, 242, 254, 0.25); color: #00f2fe; }
.layer-filter-btn.kin.active { background: rgba(255, 209, 102, 0.25); color: #ffd166; }
.layer-filter-btn.dyn.active { background: rgba(160, 102, 255, 0.3); color: #c77dff; }

/* Ontology Toolbar Ribbon */
.ontology-toolbar-ribbon {
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: rgba(9, 4, 22, 0.95);
  border-bottom: 1px solid rgba(160, 102, 255, 0.2);
  gap: 16px;
  flex-shrink: 0;
}

.toolbar-left-group, .toolbar-right-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.onto-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(160, 102, 255, 0.35);
  border-radius: 9px;
  padding: 5px 12px;
  flex-shrink: 0;
}

.onto-search-icon {
  font-size: 13px;
  opacity: 0.7;
}

#onto-search-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  width: 180px;
  outline: none;
}
#onto-search-input::placeholder {
  color: var(--text-dim);
}

.btn-ribbon {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-ribbon.primary {
  background: linear-gradient(135deg, rgba(160, 102, 255, 0.3), rgba(0, 245, 212, 0.2));
  border-color: rgba(160, 102, 255, 0.45);
  color: #fff;
}
.btn-ribbon.primary:hover {
  background: rgba(160, 102, 255, 0.5);
  box-shadow: 0 0 14px rgba(160, 102, 255, 0.4);
}

.btn-ribbon.secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-dim);
}
.btn-ribbon.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ai-tools-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 1px solid rgba(160, 102, 255, 0.25);
  padding-left: 10px;
}

.btn-ribbon.ai-tool {
  background: rgba(0, 245, 212, 0.12);
  border-color: rgba(0, 245, 212, 0.35);
  color: #7ef9e3;
}
.btn-ribbon.ai-tool:hover {
  background: rgba(0, 245, 212, 0.28);
  border-color: var(--aurora-mint);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
  color: #fff;
}

.import-label {
  cursor: pointer;
}

/* Submodal Dialogs */
.onto-submodal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s;
}

.onto-submodal.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.onto-submodal-dialog {
  width: min(560px, 92vw);
  background: #0f0822;
  border: 1px solid rgba(160, 102, 255, 0.5);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(160, 102, 255, 0.35);
  overflow: hidden;
}

.onto-submodal-dialog.cad-dialog {
  width: min(840px, 94vw);
}

.cad-toolbar {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(160, 102, 255, 0.2);
  flex-wrap: wrap;
  font-size: 11.5px;
}

.cad-layer-chk {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

.cad-canvas-wrap {
  background: #060214;
  border: 1px solid rgba(160, 102, 255, 0.25);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.cad-info-card {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

.onto-submodal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(160, 102, 255, 0.2);
}

.onto-submodal-header h4 {
  font-family: var(--font-hud);
  font-size: 14px;
  color: var(--violet-bright);
}

.onto-submodal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submodal-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.submodal-form-group label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.submodal-form-group .req {
  color: #ff5e7e;
}

.submodal-form-group input,
.submodal-form-group select,
.submodal-form-group textarea {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(160, 102, 255, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  outline: none;
}

.submodal-form-group input:focus,
.submodal-form-group select:focus,
.submodal-form-group textarea:focus {
  border-color: var(--violet-bright);
  box-shadow: 0 0 10px rgba(160, 102, 255, 0.3);
}

.submodal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.onto-submodal-footer {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(160, 102, 255, 0.15);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Inspector Action Buttons */
.inspector-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(160, 102, 255, 0.15);
}

.btn-inspect-action {
  flex: 1;
  padding: 7px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-inspect-action.edit {
  background: rgba(0, 245, 212, 0.15);
  border-color: rgba(0, 245, 212, 0.35);
  color: var(--aurora-mint);
}
.btn-inspect-action.edit:hover {
  background: rgba(0, 245, 212, 0.3);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
}

.btn-inspect-action.delete {
  background: rgba(255, 94, 126, 0.15);
  border-color: rgba(255, 94, 126, 0.35);
  color: #ff5e7e;
}
.btn-inspect-action.delete:hover {
  background: rgba(255, 94, 126, 0.3);
  box-shadow: 0 0 12px rgba(255, 94, 126, 0.4);
}

.dialog-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.dialog-close-btn:hover { color: #fff; }

.ontology-dialog-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.ontology-canvas-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.ontology-canvas-box {
  background: radial-gradient(circle at center, #140730 0%, #060212 100%);
  position: relative;
  overflow: hidden;
  cursor: grab;
  width: 100%;
  height: 100%;
}

.ontology-inspector {
  background: rgba(10, 4, 26, 0.9);
  border-left: 1px solid rgba(160, 102, 255, 0.25);
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}



.demo-stage-btn.floor {
  border-color: rgba(255, 93, 115, 0.45);
  color: #ffd6dc;
}

.sop-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(0, 245, 212, 0.07);
  border: 1px solid rgba(0, 245, 212, 0.2);
}

.sop-n {
  font-family: var(--font-hud);
  font-size: 16px;
  color: #ffd166;
}

.sop-action { font-weight: 700; color: #fff; font-size: 12.5px; }
.sop-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.verdict-hold {
  background: rgba(255, 80, 80, 0.16);
  border: 1px solid rgba(255, 80, 80, 0.5);
  color: #ff8a8a;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.verdict-ok {
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.45);
  color: #00f5d4;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 10px;
}

.passport-qr {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: #ffd166;
  background: rgba(0, 0, 0, 0.45);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  border: 1px dashed rgba(255, 209, 102, 0.45);
}

.impact-row {
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(160, 102, 255, 0.12);
}

.obsidian-panel {
  position: absolute;
  top: 64px;
  right: 24px;
  z-index: 1800;
  width: min(420px, 92vw);
  max-height: min(70vh, 640px);
  overflow-y: auto;
  background: rgba(14, 6, 32, 0.96);
  border: 1px solid rgba(255, 209, 102, 0.4);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.obsidian-panel.hidden {
  display: none;
}

.obs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #ffd166;
}

.obs-path {
  font-size: 11px;
  color: var(--text-dim);
  word-break: break-all;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.obs-menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.obs-menu button {
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.4);
  color: #ffd166;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.obs-section { margin-bottom: 12px; }
.obs-sec-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--aurora-mint);
  margin-bottom: 6px;
}
.obs-howto {
  margin: 0 0 0 18px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}
.obs-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}
.obs-table td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(160, 102, 255, 0.15);
  color: var(--text-dim);
}
.obs-table td:first-child { color: #fff; font-weight: 600; width: 38%; }
.obs-recent { display: flex; flex-direction: column; gap: 4px; }
.obs-note {
  font-size: 11.5px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 8px;
  border-radius: 6px;
}
.obs-note span { color: #ffd166; margin-right: 6px; }

.ontology-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  pointer-events: none;
  background: rgba(4, 8, 18, 0.82);
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 0 24px rgba(0, 245, 212, 0.15);
}

.ontology-caption.hidden {
  display: none;
}

.caption-stage {
  font-family: var(--font-hud);
  font-size: 10px;
  letter-spacing: 2px;
  color: #ffd166;
  margin-bottom: 4px;
}

#ontology-caption-text {
  font-size: 14px;
  font-weight: 600;
  color: #f4fbff;
  line-height: 1.45;
}

.reasoner-banner {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
}

.reasoner-banner.ok {
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.45);
  color: #00f5d4;
}

.reasoner-banner.bad {
  background: rgba(255, 80, 80, 0.14);
  border: 1px solid rgba(255, 80, 80, 0.5);
  color: #ff8a8a;
}

.check-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(160, 102, 255, 0.12);
}

.node-item.node-highlighted .node-outer-glow {
  animation: nodePulse 1.1s ease-in-out infinite;
}

@keyframes nodePulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.ontology-canvas-box:active { cursor: grabbing; }

.ontology-canvas-box svg {
  width: 100%;
  height: 100%;
}

.ontology-inspector {
  background: rgba(10, 4, 24, 0.95);
  border-left: 1px solid rgba(160, 102, 255, 0.2);
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inspector-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 40%;
  line-height: 1.5;
}

.inspector-header {
  padding-left: 10px;
}

.inspector-title {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.inspector-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
}

.inspector-aliases {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.claim-line {
  font-size: 12.5px;
  color: #f8fbff;
  line-height: 1.45;
  margin-bottom: 6px;
}
.claim-line em {
  color: #ff8fab;
  font-style: normal;
  font-weight: 700;
  margin-right: 6px;
}

.promo-tag.promo-validated {
  color: #95d5b2;
}
.promo-tag.promo-candidate {
  color: #ffd166;
}
.promo-tag.promo-rejected {
  color: #ff8fab;
}
.promo-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.promo-btn {
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
}
.promo-btn.ok {
  background: rgba(149, 213, 178, 0.2);
  border-color: #95d5b2;
  color: #d8f3dc;
}
.promo-btn.no {
  background: rgba(255, 77, 109, 0.16);
  border-color: #ff4d6d;
  color: #ffd6dc;
}

.inspector-section {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(160, 102, 255, 0.15);
  border-radius: 10px;
  padding: 12px;
}

.sec-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--aurora-mint);
  margin-bottom: 8px;
}

.spo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spo-triple-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  background: rgba(160, 102, 255, 0.1);
  padding: 6px 8px;
  border-radius: 6px;
  border-left: 2px solid var(--violet-neon);
}

.skd-card {
  border: 1px solid rgba(0, 245, 212, 0.35);
  background: rgba(0, 40, 36, 0.45);
}

.skd-card-title {
  font-size: 12px;
  color: #d7fff7;
  margin-bottom: 8px;
}

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

.skd-downloads a {
  font-size: 11px;
  font-weight: 700;
  color: #ffd166;
  text-decoration: none;
  border: 1px solid rgba(255, 209, 102, 0.4);
  padding: 4px 8px;
  border-radius: 6px;
}

.skd-downloads a:hover {
  background: rgba(255, 209, 102, 0.15);
}

.onto-topic-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 0;
}
.onto-topic-row label {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}
.onto-topic-row input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  color: #d7fff7;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 8px;
}
.spo-review-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.spo-actions {
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: #95d5b2;
}
.spo-act {
  border: 1px solid rgba(0, 245, 212, 0.35);
  background: rgba(0, 0, 0, 0.3);
  color: #d7fff7;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 11px;
}
.spo-act.ok { border-color: rgba(0, 245, 212, 0.7); color: #7ef9e3; }
.spo-act.no { border-color: rgba(255, 77, 109, 0.55); color: #ff8fab; }
.spo-act.warn { border-color: rgba(255, 209, 102, 0.7); color: #ffd166; }
.spo-review-row.spo-done .spo-act { display: none; }
.spo-conflict-box {
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 209, 102, 0.45);
  background: rgba(60, 40, 0, 0.35);
  border-radius: 6px;
  font-size: 11px;
  color: #ffe08a;
}
.spo-conflict-box ul {
  margin: 4px 0 0;
  padding-left: 16px;
}
.spo-conflict-box em { color: #d7fff7; font-style: normal; }

.spo-sub { font-weight: 700; color: #fff; }
.spo-pred { color: var(--gold-star); font-size: 10.5px; font-family: var(--font-mono); }
.spo-obj { color: var(--aurora-mint); }
.spo-attach {
  font-size: 9px;
  margin: 0 4px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(0, 245, 212, 0.45);
  color: #7ef9e3;
  vertical-align: middle;
}
.skd-card-title .spo-attach {
  margin-left: 6px;
}

.props-json {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.5);
  padding: 8px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.ontology-dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  border-top: 1px solid rgba(160, 102, 255, 0.2);
  background: rgba(8, 3, 20, 0.85);
  font-size: 11.5px;
  flex-shrink: 0;
  gap: 16px;
}

.ontology-stats-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.stat-badge {
  color: var(--text-dim);
  font-size: 11.5px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-badge strong { color: #fff; }
.stat-badge.sem strong { color: #00f2fe; }
.stat-badge.kin strong { color: #ffd166; }
.stat-badge.dyn strong { color: #c77dff; }

.dialog-hint {
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* =========================================================
   GOOGLE MEET-STYLE MULTI-PARTY CONFERENCE & SCREEN SHARE MODAL
   ========================================================= */

.meeting-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 12, 0.94);
  backdrop-filter: blur(28px);
  transition: opacity 0.3s, visibility 0.3s;
}

.meeting-modal.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.meeting-dialog {
  width: min(1300px, 96vw);
  height: min(840px, 92vh);
  background: rgba(12, 6, 30, 0.96);
  border: 1px solid rgba(0, 245, 212, 0.45);
  border-radius: 20px;
  box-shadow: 0 0 70px rgba(0, 245, 212, 0.25), 0 25px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(32px);
}

.meeting-dialog.is-sharing {
  width: min(1680px, 98vw);
  height: min(960px, 96vh);
}

.meeting-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(160, 102, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

.meet-header-actions-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.btn-facilitator {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.25), rgba(160, 102, 255, 0.2));
  border: 1px solid var(--aurora-mint);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.3);
  transition: all 0.2s;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.btn-facilitator:hover {
  background: var(--aurora-mint);
  color: #000;
  box-shadow: 0 0 20px var(--aurora-mint-glow);
}

.btn-facilitator.secondary {
  background: rgba(160, 102, 255, 0.2);
  border-color: var(--violet-bright);
  color: var(--violet-bright);
}

.btn-facilitator.secondary:hover {
  background: var(--violet-bright);
  color: #fff;
  box-shadow: 0 0 20px var(--violet-glow);
}

.meet-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meet-pulse-live {
  font-family: var(--font-hud);
  font-size: 11px;
  font-weight: 800;
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.15);
  border: 1px solid rgba(255, 77, 109, 0.4);
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 1px;
  animation: pulse-blink 1.5s infinite;
}

.meet-title-box h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.meet-invite-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 245, 212, 0.3);
  padding: 4px 6px;
  border-radius: 10px;
}

.meet-invite-box input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--aurora-mint);
  width: 260px;
  padding: 4px 8px;
}

.btn-copy-invite {
  background: linear-gradient(135deg, #00f5d4, #00b4d8);
  border: none;
  color: #000;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy-invite:hover {
  box-shadow: 0 0 12px var(--aurora-mint-glow);
}

/* Meeting Body */
.meeting-dialog-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 0;
}

.meet-video-stage {
  padding: 12px 16px;
  overflow-y: auto;
  background: radial-gradient(circle at center, #100628 0%, #060212 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  min-height: 0;
}

.meet-video-stage:not(.is-sharing) .meet-video-grid {
  margin-top: auto;
  margin-bottom: auto;
  max-width: 900px;
  width: 100%;
  align-self: center;
}

.meet-video-stage.is-sharing {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.meet-video-stage.is-sharing .meet-screen-banner {
  position: absolute;
  inset: 0;
  flex: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  border: none;
  z-index: 1;
  cursor: zoom-in;
}

.meet-video-stage.is-sharing .meet-video-grid {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  max-width: none;
  width: 168px;
  max-height: 86%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 6;
  align-self: auto;
  pointer-events: none;
}

.meet-video-stage.is-sharing .meet-video-tile {
  width: 168px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 1px solid rgba(0, 245, 212, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.meet-video-stage.is-sharing .ai-tile {
  display: none;
}

.meet-video-stage.is-sharing .tile-label {
  font-size: 10px;
  padding: 2px 6px;
}

.meet-video-stage:fullscreen,
.meet-video-stage:-webkit-full-screen {
  background: #000;
  width: 100vw;
  height: 100vh;
  padding: 0;
}

.meet-screen-banner {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 180px;
  max-height: 58%;
  aspect-ratio: 16 / 9;
  background: #050208;
  border: 1px solid rgba(0, 245, 212, 0.55);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.meet-screen-banner.hidden,
.meet-video-tile.screen-tile.hidden {
  display: none !important;
}

.meet-screen-banner video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050208;
  transform: none;
}

.meet-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  width: 100%;
  flex: 0 0 auto;
}

.meet-video-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #000;
  border: 1px solid rgba(160, 102, 255, 0.35);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.btn-unmute-remote {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(14, 6, 32, 0.85);
  color: #fff;
  border: 1px solid rgba(0, 245, 212, 0.6);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.btn-unmute-remote:hover {
  background: rgba(0, 245, 212, 0.3);
  border-color: var(--aurora-mint);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.5);
  transform: translateY(-1px);
}

.btn-unmute-remote.unmuted {
  background: rgba(0, 245, 212, 0.25);
  border-color: var(--aurora-mint);
  color: var(--aurora-mint);
}

.meet-video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meet-video-tile.host-tile video {
  transform: scaleX(-1);
}

.tile-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.meet-video-tile.ai-tile {
  background: radial-gradient(circle, #1a083a 0%, #080218 100%);
  border-color: var(--aurora-mint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-tile-core {
  text-align: center;
  padding: 14px;
}

.ai-tile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, #00f5d4 0%, #a066ff 60%, transparent 80%);
  margin: 0 auto 10px;
  box-shadow: 0 0 30px var(--aurora-mint-glow);
  animation: pulse-ring 2s infinite;
}

.ai-tile-name {
  font-family: var(--font-hud);
  font-size: 14px;
  font-weight: 700;
  color: var(--aurora-mint);
  margin-bottom: 4px;
}

.ai-tile-status {
  font-size: 11px;
  color: var(--text-dim);
}

/* Meeting Side Panel */
.meet-side-panel {
  background: rgba(10, 4, 24, 0.95);
  border-left: 1px solid rgba(160, 102, 255, 0.2);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
  gap: 10px;
}

.meet-tab-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--violet-bright);
}

.meet-chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(160, 102, 255, 0.15);
}

.meet-msg-row {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  line-height: 1.4;
}

.meet-spk-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-star);
  margin-bottom: 2px;
}

.meet-msg-row.host .meet-spk-tag { color: var(--aurora-mint); }
.meet-msg-row.ai .meet-spk-tag { color: var(--violet-bright); }
.meet-msg-row.system .meet-spk-tag { color: var(--text-muted); }

.meet-skd-panel {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  max-height: 140px;
  overflow-y: auto;
}

.skd-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--aurora-mint);
  margin-bottom: 6px;
}

.meet-skd-stream {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meet-skd-tag {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(160, 102, 255, 0.12);
  padding: 4px 6px;
  border-radius: 6px;
  border-left: 2px solid var(--aurora-mint);
}

.meet-skd-tag .pred { color: var(--gold-star); font-family: var(--font-mono); }

.meet-chat-input-bar {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(160, 102, 255, 0.3);
  border-radius: 10px;
  padding: 4px 6px;
}

.meet-chat-input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 12.5px;
  padding: 4px 6px;
}

.meet-chat-input-bar button {
  background: linear-gradient(135deg, #a066ff, #6a00f4);
  border: none;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* Meeting Footer Controls */
.meeting-dialog-footer {
  padding: 12px 24px;
  border-top: 1px solid rgba(160, 102, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
}

.meet-controls-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.meet-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  flex-shrink: 0;
}

.meet-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.meet-ctrl-btn.screen-btn {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--aurora-mint);
  color: var(--aurora-mint);
}
.meet-ctrl-btn.screen-btn.active {
  background: var(--aurora-mint);
  color: #000;
  box-shadow: 0 0 20px var(--aurora-mint-glow);
}

.meet-ctrl-btn.stop-btn,
.btn-facilitator.meet-silence-btn {
  background: rgba(255, 77, 109, 0.28);
  border-color: #ff4d6d;
  color: #ff8aa0;
  font-weight: 800;
}
.meet-ctrl-btn.stop-btn:hover,
.btn-facilitator.meet-silence-btn:hover {
  background: #ff4d6d;
  color: #fff;
}

.meet-ctrl-btn.leave-btn {
  background: rgba(255, 77, 109, 0.2);
  border-color: #ff4d6d;
  color: #ff4d6d;
}
.meet-ctrl-btn.leave-btn:hover {
  background: #ff4d6d;
  color: #fff;
}

.meet-ctrl-btn.muted,
.meet-ctrl-btn.video-off {
  background: rgba(255, 77, 109, 0.3);
  border-color: #ff4d6d;
  color: #ff4d6d;
}

/* ---- Responsive ---- */

@media (max-width: 1080px) {
  .dashboard-grid {
    grid-template-columns: var(--left-rail, 290px) 8px minmax(200px, 1fr);
  }
  .comms-panel,
  .rail-resizer[data-rail="right"] {
    display: none;
  }
}

@media (max-width: 900px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  html.weaid-invite #boot {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    background: #070214;
  }

  html.weaid-invite .boot-frame {
    width: 100%;
    max-width: none;
    min-height: 72dvh;
    margin: 0;
    border-radius: 28px 28px 0 0;
    padding: 28px 22px calc(28px + env(safe-area-inset-bottom, 0px));
    text-align: left;
  }

  html.weaid-invite .boot-badge,
  html.weaid-invite .boot-frame h1,
  html.weaid-invite .boot-sub {
    text-align: center;
  }

  html.weaid-invite .boot-frame h1 {
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 6px;
  }

  html.weaid-invite .boot-sub {
    font-size: 16px;
    color: #c9d4f5;
    margin-bottom: 18px;
  }

  html.weaid-invite .boot-join-topic {
    font-size: 20px;
    line-height: 1.4;
    color: #ffffff;
    text-align: center;
    margin: 4px 0 8px;
    word-break: keep-all;
  }

  html.weaid-invite .boot-join-label {
    font-size: 16px;
    color: #fff;
  }

  html.weaid-invite .boot-join input {
    font-size: 18px;
    padding: 16px;
    min-height: 54px;
    border-width: 2px;
    color: #fff;
    background: #12082a;
  }

  html.weaid-invite #boot-join-enter {
    font-size: 18px;
    min-height: 56px;
    margin-top: 6px;
  }

  html.weaid-invite .boot-hint {
    font-size: 14px;
    color: #b7c3e6;
    text-align: center;
  }

  .boot-code-fields {
    flex-direction: column;
  }

  .boot-code-fields input,
  #boot-code-enter {
    font-size: 17px;
    min-height: 50px;
  }

  .meeting-modal {
    align-items: stretch;
    justify-content: stretch;
  }

  .meeting-dialog,
  .meeting-dialog.is-sharing {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .meeting-dialog-header {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 8px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    align-items: flex-start;
  }

  .meet-title-box {
    width: 100%;
    min-width: 0;
  }

  .meet-title-box h3 {
    font-size: 16px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    color: #fff;
    font-weight: 800;
  }

  .meet-header-actions-group {
    width: 100%;
    gap: 6px;
  }

  .meeting-dialog.is-guest .meet-header-actions-group {
    display: none;
  }

  .btn-facilitator,
  .btn-facilitator.secondary {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    font-size: 13px;
    padding: 10px 10px;
    text-align: center;
  }

  .meet-invite-box {
    flex: 1 1 100%;
    min-width: 0;
  }

  .meet-invite-box input {
    display: none;
  }

  .btn-copy-invite {
    width: 100%;
    font-size: 14px;
    padding: 10px 12px;
  }

  .meeting-dialog-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(168px, 0.62fr) minmax(240px, 1.4fr);
  }

  .meet-video-stage {
    padding: 8px 10px 4px;
    min-height: 150px;
  }

  .meet-video-stage:not(.is-sharing) .meet-video-grid {
    max-width: none;
    margin: 0;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 8px;
  }

  .meet-video-stage:not(.is-sharing) .ai-tile {
    display: none;
  }

  .meet-video-tile {
    min-height: 132px;
  }

  .tile-label {
    font-size: 12px;
    padding: 4px 8px;
  }

  .meet-video-stage.is-sharing .meet-video-grid {
    right: 8px;
    width: 92px;
    max-height: 70%;
  }

  .meet-video-stage.is-sharing .meet-video-tile {
    width: 92px;
  }

  .meet-side-panel {
    border-left: none;
    border-top: 1px solid rgba(160, 102, 255, 0.25);
    padding: 10px 12px 8px;
    min-height: 0;
    gap: 8px;
  }

  .meet-tab-title {
    font-size: 15px;
    color: #efe7ff;
  }

  .meet-skd-panel {
    display: none;
  }

  .meet-chat-log {
    min-height: 160px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.55);
  }

  .meet-msg-row {
    font-size: 16px;
    line-height: 1.55;
    color: #f4f6ff;
  }

  .meet-spk-tag {
    font-size: 13px;
    margin-bottom: 3px;
  }

  .meet-chat-input-bar {
    padding: 6px;
    border-width: 1.5px;
  }

  .meet-chat-input-bar input {
    font-size: 16px;
    padding: 10px 8px;
    min-height: 44px;
  }

  .meet-chat-input-bar button {
    font-size: 15px;
    font-weight: 800;
    padding: 10px 16px;
    min-height: 44px;
  }

  .meeting-dialog-footer {
    padding: 8px 8px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .meet-controls-bar {
    width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .meet-ctrl-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 52px;
    flex-direction: column;
    gap: 3px;
    padding: 8px 2px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .ontology-dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .ontology-dialog-header,
  .dialog-header-actions {
    flex-wrap: wrap;
  }
}
