* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

#jarvis-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.jarvis-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 130% 95% at 50% 42%, transparent 26%, rgba(0, 0, 0, 0.62) 100%);
}

.jarvis-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.jarvis-hud {
  position: fixed;
  top: 14px;
  left: 18px;
  z-index: 30;
  width: min(560px, 92vw);
  pointer-events: none;
}

.jarvis-hud > * {
  pointer-events: auto;
}

.jarvis-hud-glow {
  position: absolute;
  top: 14px;
  left: 8px;
  width: min(520px, 94vw);
  height: 250px;
  pointer-events: none;
  background: radial-gradient(ellipse 48% 70% at 46% 0%, var(--accent-soft), transparent 72%);
  filter: blur(10px);
  transition: opacity 0.5s ease;
}

.jarvis-lamp {
  position: relative;
  height: 40px;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.jarvis-lamp:focus-visible .jarvis-filament {
  box-shadow: 0 0 10px var(--accent), 0 0 26px var(--accent), 0 0 54px var(--accent);
}

.jarvis-filament {
  position: absolute;
  top: 14px;
  left: 8px;
  width: 320px;
  max-width: calc(100vw - 200px);
  height: 2px;
  border-radius: 2px;
  background: var(--accent-bright);
  opacity: 0.55;
  box-shadow: 0 0 10px var(--accent);
  transition: all 0.5s ease;
}

.jarvis-lamp.is-open .jarvis-filament {
  width: 470px;
  max-width: calc(100vw - 200px);
  opacity: 1;
  box-shadow: 0 0 10px var(--accent), 0 0 26px var(--accent), 0 0 54px var(--accent);
}

.jarvis-filament-node {
  position: absolute;
  top: 11px;
  left: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0fbff;
  box-shadow: 0 0 10px var(--accent), 0 0 18px var(--accent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.jarvis-lamp.is-open .jarvis-filament-node {
  left: 474px;
  max-width: calc(100vw - 200px);
}

.jarvis-lamp-label {
  position: absolute;
  top: 20px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.34em;
  opacity: 0.6;
  transition: opacity 0.4s;
}

.jarvis-lamp.is-open .jarvis-lamp-label {
  opacity: 1;
}

.jarvis-hud-body {
  display: flex;
  align-items: flex-end;
  gap: 26px;
  flex-wrap: wrap;
  padding-left: 14px;
  padding-top: 6px;
}

.jarvis-clock {
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1;
}

.jarvis-date {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  margin-top: 4px;
  text-transform: uppercase;
}

.jarvis-temp {
  font-size: 22px;
  font-weight: 300;
  opacity: 0.9;
}

.jarvis-place {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-top: 2px;
  text-transform: uppercase;
}

.jarvis-tiles {
  margin-top: 16px;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jarvis-tile-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jarvis-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  color: var(--ink);
  font: inherit;
}

.jarvis-tile:hover {
  border-color: var(--accent);
  background: rgba(10, 22, 38, 0.82);
}

.jarvis-tile.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-soft);
}

.jarvis-tile-mark {
  font-size: 15px;
  line-height: 1;
  flex: none;
}

.jarvis-tile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jarvis-tile-text b {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.jarvis-tile-text small {
  font-size: 9.5px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

.jarvis-character-pill {
  position: fixed;
  top: 52px;
  right: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  border: 1px solid var(--accent-soft);
  border-radius: 20px;
  padding: 7px 15px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  user-select: none;
  outline: none;
}

.jarvis-character-pill:focus-visible {
  box-shadow: 0 0 0 2px var(--accent-soft), 0 0 22px var(--accent-soft);
}

.jarvis-pill-swap {
  font-size: 0.85rem;
  opacity: 0.7;
}

.jarvis-graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.jv-trace {
  fill: none;
  stroke-width: 0.9;
  opacity: 0.42;
  pointer-events: none;
}

.jv-trace-dim {
  fill: none;
  stroke-width: 0.8;
  stroke-dasharray: 3 5;
  opacity: 0.3;
}

.jv-node {
  cursor: pointer;
}

.jv-node-ring {
  fill: none;
  stroke-width: 2;
  transition: r 0.25s ease, opacity 0.25s ease;
}

.jv-node-hit {
  pointer-events: all;
}

.jv-node-dot {
  opacity: 0.95;
}

.jv-node-label {
  font-size: 13px;
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
  opacity: 0.9;
  pointer-events: all;
  cursor: pointer;
  user-select: none;
}

.jv-node-label-sub {
  font-size: 8.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  fill: var(--ink-faint);
  text-transform: uppercase;
  pointer-events: none;
}

.jv-node.is-missing .jv-node-ring {
  stroke-dasharray: 3 4;
  opacity: 0.75;
}

.jv-node:hover .jv-node-ring {
  r: 11;
}

.jv-node.is-selected .jv-node-ring {
  r: 12;
  stroke-width: 2.6;
}

.jv-node-terminal {
  opacity: 0.55;
  pointer-events: none;
}

.jv-spoke {
  stroke-width: 0.7;
  opacity: 0.18;
}

.jarvis-graph-a11y {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.jarvis-node-list {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.jarvis-node-list button {
  font: inherit;
}

.jarvis-graph-fallback {
  position: absolute;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  color: var(--ink-dim);
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 8px 14px;
}

.jarvis-orb {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: min(46vh, 430px);
  height: min(46vh, 430px);
  cursor: pointer;
  outline: none;
  pointer-events: none;
}

.jarvis-orb .jarvis-core-canvas {
  pointer-events: auto;
}

.jarvis-orb .jarvis-orb-svg {
  pointer-events: none;
}

.jarvis-orb:focus-visible .jv-ring {
  filter: drop-shadow(0 0 14px var(--accent));
}

.jarvis-core-canvas {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  border-radius: 50%;
}

.jarvis-orb-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.jv-wave {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.8;
  opacity: 0;
  transform-origin: center;
}

.jv-orbit-dot {
  filter: drop-shadow(0 0 5px var(--accent));
}

.jv-ring-slow {
  transform-origin: 160px 160px;
  animation: jvSpin 18s linear infinite;
}

.jv-ring-medium {
  transform-origin: 160px 160px;
  animation: jvSpinBack 12s linear infinite;
}

.jv-ring-fast {
  transform-origin: 160px 160px;
  animation: jvSpin 7s linear infinite;
}

@keyframes jvSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes jvSpinBack {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes jvWave {
  0% { r: 118; opacity: 0.22; stroke-width: 0.9; }
  60% { opacity: 0.07; }
  100% { r: 176; opacity: 0; stroke-width: 0.3; }
}

@keyframes jvWaveActive {
  0% { r: 118; opacity: 0.5; stroke-width: 1.5; }
  60% { opacity: 0.18; }
  100% { r: 190; opacity: 0; stroke-width: 0.5; }
}

.jv-wave {
  animation: jvWave 3.6s ease-out infinite;
}

.jv-wave-1 { animation-delay: 0.9s; }
.jv-wave-2 { animation-delay: 1.8s; }

@keyframes jvBreath {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.jv-ambient {
  animation: jvBreath 4s ease-in-out infinite;
}

.jv-center-ring {
  fill: none;
  stroke-width: 1.5;
  stroke-opacity: 0.7;
  animation: jvBreath 2.6s ease-in-out infinite;
}

.jv-center-ball {
  animation: jvBreath 2s ease-in-out infinite;
}

.jv-dot {
  animation: jvBlink 1.2s ease-in-out infinite;
}

.jv-dot-1 { animation-delay: 0.4s; }
.jv-dot-2 { animation-delay: 0.8s; }

@keyframes jvBlink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.jv-bar {
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes jvBarIdle {
  0%, 100% { transform: scaleY(0.34); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 0.55; }
}

.jv-bar {
  animation: jvBarIdle 1.1s ease-in-out infinite;
}

.jv-ext {
  stroke-width: 1;
  stroke-dasharray: 4 3;
  opacity: 0.18;
}

.jv-state-label {
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.4em;
  opacity: 0.75;
}

.jv-hint {
  font-size: 9px;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  opacity: 0.32;
}

.jv-power {
  margin: 6px auto 0;
  max-width: min(1180px, 94vw);
  text-align: center;
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  opacity: 0.78;
  direction: rtl;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.jarvis-statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 18;
  pointer-events: none;
}

.jarvis-console {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 22;
  width: min(620px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.jarvis-chat-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.jarvis-chat-toggle {
  border: 1px solid var(--panel-line);
  background: var(--panel);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.jarvis-chat-hint {
  font-size: 10px;
  color: var(--ink-dim);
  opacity: 0.8;
}

.jarvis-log {
  width: 100%;
  max-height: 30vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}

.jarvis-console[data-chat-mode="compact"] .jarvis-log {
  max-height: 7.5rem;
}

.jarvis-console[data-chat-mode="mini"] .jarvis-log {
  max-height: 3.6rem;
}

.jarvis-console[data-chat-mode="mini"] .jarvis-log-line:not(.is-keep),
.jarvis-console[data-chat-mode="mini"] .jarvis-log-source:not(.is-keep),
.jarvis-console[data-chat-mode="mini"] .jarvis-skill-card:not(.is-keep) {
  display: none;
}

.jarvis-console[data-chat-mode="mini"] .jarvis-log > .is-keep,
.jarvis-console[data-chat-mode="mini"] .jarvis-log > :last-child {
  display: block;
}

.jarvis-console[data-chat-mode="compact"] .jarvis-log > *:nth-last-child(n+11) {
  display: none;
}

.jarvis-log:empty {
  display: none;
}

.jarvis-skill-card {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(79, 216, 255, 0.35);
  background: rgba(8, 24, 36, 0.82);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.jarvis-skill-card.is-learning {
  border-color: rgba(245, 166, 35, 0.45);
}

.jarvis-skill-card.is-ready {
  border-color: rgba(125, 255, 178, 0.45);
}

.jarvis-skill-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.jarvis-skill-card p {
  margin: 0;
  white-space: pre-wrap;
}

.jarvis-skill-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.jarvis-skill-card-actions button {
  border: 1px solid var(--panel-line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.jarvis-log-line {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(8px);
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.jarvis-log-line.is-user {
  border-color: var(--accent-soft);
  color: var(--accent-bright);
  align-self: flex-end;
  max-width: 85%;
}

.jarvis-log-line.is-error {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

.jarvis-log-source {
  align-self: flex-start;
  margin-top: -4px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  line-height: 1.6;
  opacity: 0.85;
  cursor: help;
  white-space: nowrap;
}

.jarvis-mic-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 15px;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.jarvis-mic-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--off);
}

.jarvis-mic-dot[data-mic-state="live"] {
  background: #f87171;
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.7);
  animation: jv-mic-breathe 2.4s ease-in-out infinite;
}

.jarvis-mic-dot[data-mic-state="waiting"] {
  background: var(--idle);
}

.jarvis-mic-dot[data-mic-state="waking"] {
  background: var(--live);
}

.jarvis-mic-state[data-mic-state="blocked"] {
  color: #fca5a5;
}

.jarvis-mic-state[data-mic-state="live"] {
  color: var(--ink-dim);
}

.jarvis-heard {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  text-align: right;
  color: var(--accent-bright);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.jarvis-heard[data-active="true"] {
  opacity: 1;
}

.jarvis-input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px 6px 16px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.jarvis-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-soft);
}

.jarvis-field {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  padding: 8px 0;
}

.jarvis-field::placeholder {
  color: var(--ink-faint);
}

.jarvis-send,
.jarvis-mic {
  flex: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--panel-line);
  background: rgba(8, 18, 32, 0.7);
  cursor: pointer;
  transition: all 0.2s;
}

.jarvis-send:hover,
.jarvis-mic:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-soft);
}

.jarvis-export {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid oklch(0.72 0.12 215 / 0.55);
  background: oklch(0.45 0.08 215 / 0.35);
  color: #9ee7ff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, filter 0.2s;
}

.jarvis-export:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-soft);
  filter: brightness(1.08);
}

.jarvis-export--input {
  height: 30px;
  padding: 0 11px;
}

.jarvis-card {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 34;
  width: min(340px, 88vw);
  padding: 18px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.jarvis-card[hidden] {
  display: none;
}

.jarvis-card-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 13px;
  cursor: pointer;
}

.jarvis-card-close:hover {
  color: var(--ink);
}

.jarvis-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 24px;
}

.jarvis-card-mark {
  font-size: 20px;
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-soft);
}

.jarvis-card-title {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.jarvis-card-sub {
  margin: 3px 0 0;
  font-size: 10.5px;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}

.jarvis-card-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.jarvis-card-badge,
.jarvis-card-tier {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid var(--panel-line);
  color: var(--ink-dim);
}

.jarvis-card-tier {
  border-style: dashed;
}

.jarvis-card-block {
  margin-top: 16px;
}

.jarvis-card-block h3 {
  margin: 0 0 6px;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
  font-weight: 500;
}

.jarvis-card-handles {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink);
}

.jarvis-card-json {
  margin: 0;
  padding: 10px;
  max-height: 180px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink-dim);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.jarvis-card-link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 2px;
}

.jarvis-card-link:hover {
  border-color: var(--accent);
}

html[data-state="thinking"] .jv-ring-slow {
  animation-duration: 6s;
}
html[data-state="thinking"] .jv-ring-medium {
  animation-duration: 4s;
}

html[data-state="thinking"] .jv-wave {
  animation-name: jvWaveActive;
  animation-duration: 2s;
}

html[data-state="thinking"] .jv-bar {
  animation-duration: 0.45s;
}

html[data-state="speaking"] .jv-wave {
  animation-name: jvWaveActive;
  animation-duration: 1.8s;
}

html[data-state="speaking"] .jv-ambient {
  opacity: 0.4;
  animation-duration: 2s;
}

html[data-state="listening"] .jv-wave {
  animation-name: jvWaveActive;
  animation-duration: 1.3s;
}

html[data-state="listening"] .jv-ring-fast {
  animation-duration: 4s;
}

.jv-neurons {
  pointer-events: none;
}

.jv-neuron {
  cursor: pointer;
  pointer-events: all;
}

.jv-neuron-hit {
  pointer-events: all;
}

.jv-neuron-body {
  stroke-width: 0.8;
  transition: r 0.4s ease, fill-opacity 0.4s ease;
}

.jv-neuron-ring {
  fill: none;
  stroke-width: 0.8;
  opacity: 0.65;
  transition: r 0.4s ease;
}

.jv-neuron-ring.is-dead {
  stroke-dasharray: 2 3;
  opacity: 0.4;
}

.jv-neuron-halo {
  fill: none;
  stroke-width: 0.9;
  opacity: 0.75;
  animation: jvNeuronBirth 1.9s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.jv-neuron.is-selected .jv-neuron-body {
  stroke-width: 1.8;
}

.jv-synapse {
  stroke-linecap: round;
  pointer-events: none;
}

.jv-synapse.is-broken {
  stroke-dasharray: 2 4;
}

.jv-flow {
  pointer-events: none;
}

.jv-flow-line {
  stroke-width: 0.6;
  stroke-linecap: round;
  transition: stroke-opacity 0.6s ease;
}

.jv-flow-line.is-newest {
  stroke-width: 1.4;
  stroke-dasharray: 5 7;
  animation: jvFlowDash 1.6s linear infinite;
}

html[data-live-state="BROKEN"] .jv-state-label {
  fill: #f87171;
  opacity: 1;
}

html[data-live-state="SPEAKING"] .jv-state-label,
html[data-live-state="RESPONDING"] .jv-state-label,
html[data-live-state="PROCESSING"] .jv-state-label,
html[data-live-state="LEARNING"] .jv-state-label {
  fill: var(--accent-bright);
  opacity: 1;
}

html[data-live-state="DEGRADED"] .jv-state-label {
  fill: #fbbf24;
  opacity: 1;
}

html[data-live-state="SLEEPING"] .jv-state-label {
  opacity: 0.4;
}

html[data-live-state="BROKEN"] .jv-power {
  color: #f87171;
  opacity: 1;
}

@keyframes jvNeuronBirth {
  0% {
    opacity: 0.85;
    transform: scale(0.72);
  }
  70% {
    opacity: 0.28;
    transform: scale(1.35);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

@keyframes jvFlowDash {
  from {
    stroke-dashoffset: 24;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 1000px) {
  .jarvis-hud {
    width: 100%;
  }

  .jarvis-card {
    top: auto;
    bottom: 150px;
    transform: none;
  }
}

@media (max-width: 700px) {
  .jv-hint {
    display: none;
  }

  .jarvis-console {
    bottom: 96px;
  }

  html[data-character="brain"] .jarvis-console {
    left: 14px;
    right: 14px;
    transform: none;
    width: auto;
    bottom: 58px;
  }

  .jarvis-orb {
    width: min(60vw, 320px);
    height: min(60vw, 320px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jv-ring-slow,
  .jv-ring-medium,
  .jv-ring-fast,
  .jv-wave,
  .jv-bar,
  .jv-dot,
  .jv-ambient,
  .jv-center-ring,
  .jv-center-ball,
  .jv-neuron-halo,
  .jv-flow-line,
  .jarvis-mic.is-live,
  .jarvis-mic-dot[data-mic-state="live"] {
    animation: none;
  }
}
