@font-face {
  font-family: "Satoshi";
  src: url("./fonts/Satoshi-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --panel: rgba(0, 0, 0, 0.96);
  --panel-strong: rgba(0, 0, 0, 0.98);
  --surface: rgba(16, 6, 8, 0.94);
  --surface-soft: rgba(18, 8, 10, 0.78);
  --line: rgba(255, 118, 126, 0.18);
  --line-strong: rgba(255, 134, 142, 0.34);
  --line-hot: rgba(255, 108, 114, 0.54);
  --text: #ffe7e5;
  --text-soft: #ffccc7;
  --text-dim: rgba(255, 211, 207, 0.66);
  --text-faint: rgba(255, 192, 188, 0.44);
  --glow: rgba(255, 103, 112, 0.3);
  --cyan-glow: rgba(255, 145, 90, 0.16);
  --danger-glow: rgba(255, 102, 133, 0.24);
  --vignette: rgba(0, 0, 0, 0.74);
  --accent: #ff7176;
  --accent-strong: #ff565b;
  --accent-hot: #ff7c49;
  --app-height: 100dvh;
  --vv-offset-top: 0px;
  --font-display: "Satoshi", "Helvetica Neue", "Arial", sans-serif;
  --font-mono: "Satoshi", "Helvetica Neue", "Arial", sans-serif;
  color-scheme: dark;
  font-family: var(--font-mono);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  background: #000;
  color: var(--text);
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  display: none;
}

body::after {
  display: none;
}

.screen {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  position: relative;
  z-index: 1;
}

.terminal-shell {
  width: min(920px, 100%);
  height: min(86dvh, 860px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow:
    0 0 0 1px rgba(255, 122, 132, 0.06) inset,
    0 0 82px rgba(122, 24, 38, 0.32),
    0 0 150px rgba(102, 30, 16, 0.2);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  animation: shellPulse 7s ease-in-out infinite;
  isolation: isolate;
}

.terminal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(100% - 1px),
    rgba(255, 118, 126, 0.05) 100%
  );
  background-size: 100% 4px;
  opacity: 0.28;
  pointer-events: none;
}

.terminal-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03),
      transparent 12%,
      transparent 88%,
      rgba(255, 255, 255, 0.018)
    );
  pointer-events: none;
}

.terminal-shell[data-state="matched"] {
  box-shadow:
    0 0 0 1px rgba(255, 166, 207, 0.08) inset,
    0 0 90px rgba(108, 30, 74, 0.42),
    0 0 172px rgba(79, 28, 17, 0.24);
}

.terminal-shell[data-state="sending"] {
  box-shadow:
    0 0 0 1px rgba(255, 154, 198, 0.08) inset,
    0 0 80px rgba(115, 36, 79, 0.4),
    0 0 168px rgba(118, 53, 22, 0.22);
}

.terminal-shell[data-state="reconnecting"] {
  box-shadow:
    0 0 0 1px rgba(255, 167, 185, 0.08) inset,
    0 0 84px rgba(101, 31, 63, 0.38),
    0 0 160px rgba(112, 47, 21, 0.18);
}

.terminal-shell[data-state="error"] {
  box-shadow:
    0 0 0 1px rgba(255, 118, 118, 0.08) inset,
    0 0 64px rgba(64, 18, 18, 0.42),
    0 0 140px rgba(18, 7, 7, 0.78);
}

.terminal-shell[data-state="maintenance"] {
  box-shadow:
    0 0 0 1px rgba(255, 174, 205, 0.08) inset,
    0 0 72px rgba(72, 27, 53, 0.28),
    0 0 140px rgba(61, 24, 18, 0.16);
}

.terminal-head,
.terminal-topbar,
.status-strip,
.composer,
.composer-meta {
  position: relative;
  z-index: 1;
}

.terminal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.brand-kicker {
  color: rgba(255, 169, 211, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.8rem + 0.9vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 0.94;
  text-transform: lowercase;
  font-weight: 700;
  color: var(--accent);
  text-shadow:
    0 0 24px rgba(255, 130, 184, 0.18),
    0 0 48px rgba(255, 104, 75, 0.08);
}

.brand-logo {
  display: block;
  width: clamp(4.1rem, 8vw, 6rem);
  aspect-ratio: 579 / 333;
  background: linear-gradient(135deg, #ffc1bf 0%, var(--accent) 55%, #ff545e 100%);
  -webkit-mask: url("./jam.svg") center / contain no-repeat;
  mask: url("./jam.svg") center / contain no-repeat;
  filter:
    drop-shadow(0 0 12px rgba(255, 111, 118, 0.16))
    drop-shadow(0 0 20px rgba(255, 91, 69, 0.08));
}

.brand-copy {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 32ch;
}

.terminal-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-menu-toggle {
  display: none;
}

.topbar-icon {
  display: none;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-label {
  display: inline;
}

.topbar-button,
.topbar-menu-toggle,
.audio-toggle,
.composer-button {
  border: 1px solid rgba(255, 120, 128, 0.22);
  background:
    linear-gradient(180deg, rgba(56, 18, 24, 0.96), rgba(20, 8, 10, 0.96));
  color: var(--text-dim);
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.topbar-button,
.topbar-menu-toggle,
.audio-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.topbar-button,
.topbar-menu-toggle,
.composer-button {
  color: var(--text-soft);
  border-color: rgba(255, 120, 128, 0.24);
}

.topbar-button:hover,
.topbar-button:focus-visible,
.topbar-menu-toggle:hover,
.topbar-menu-toggle:focus-visible,
.composer-button:hover,
.composer-button:focus-visible,
.audio-toggle:hover,
.audio-toggle:focus-visible {
  color: var(--text-soft);
  border-color: var(--line-strong);
  box-shadow:
    0 0 18px rgba(255, 102, 110, 0.16),
    0 0 28px rgba(255, 124, 79, 0.08);
  outline: 0;
  transform: translateY(-1px);
}

.topbar-button:disabled,
.topbar-menu-toggle:disabled,
.audio-toggle:disabled,
.composer-button:disabled {
  cursor: default;
  color: rgba(255, 199, 196, 0.34);
  border-color: rgba(255, 120, 128, 0.1);
  box-shadow: none;
  transform: none;
}

.audio-toggle[aria-pressed="true"] {
  color: #fff0ee;
  border-color: rgba(255, 114, 123, 0.28);
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 154, 199, 0.12);
  background: rgba(0, 0, 0, 0.94);
  box-shadow: 0 0 0 1px rgba(255, 149, 196, 0.03) inset;
}

.status-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #ffe7f0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 147, 95, 0.95);
  box-shadow: 0 0 12px rgba(255, 147, 95, 0.38);
  animation: statusPulse 1.6s ease-in-out infinite;
}

.terminal-shell[data-state="matched"] .status-dot {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(255, 143, 184, 0.44);
}

.terminal-shell[data-state="sending"] .status-dot,
.terminal-shell[data-state="searching"] .status-dot,
.terminal-shell[data-state="reconnecting"] .status-dot {
  background: rgba(255, 143, 97, 0.94);
  box-shadow: 0 0 14px rgba(255, 143, 97, 0.34);
}

.terminal-shell[data-state="error"] .status-dot,
.terminal-shell[data-state="offline"] .status-dot,
.terminal-shell[data-state="maintenance"] .status-dot {
  background: rgba(255, 118, 118, 0.92);
  box-shadow: 0 0 14px rgba(255, 118, 118, 0.34);
}

.status-detail {
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: right;
}

.status-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 154, 199, 0.12);
  background: rgba(0, 0, 0, 0.88);
  white-space: nowrap;
}

.status-count-label {
  color: var(--text-faint);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.status-count-value {
  color: #ffe7f0;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(255, 136, 189, 0.18);
}

.terminal-frame {
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 154, 199, 0.08);
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 118, 126, 0.03) inset;
  overflow: hidden;
}

.typing-indicator {
  min-height: 1.1rem;
  padding-inline: 4px;
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-shadow: 0 0 10px rgba(255, 120, 175, 0.16);
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  line-height: 1;
}

.typing-indicator[hidden] {
  display: inline-flex;
  visibility: hidden;
}

.typing-label {
  white-space: nowrap;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  min-width: 1rem;
}

.typing-dot {
  width: 0.24rem;
  height: 0.24rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.26;
  transform: scale(0.78);
  animation: typingDotPulse 1.15s linear infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.18s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.36s;
}

.terminal {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 18px 16px 84px;
  line-height: 1.7;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 150, 198, 0.28) transparent;
  overscroll-behavior: contain;
  background: transparent;
}

.terminal::-webkit-scrollbar {
  width: 8px;
}

.terminal::-webkit-scrollbar-thumb {
  background: rgba(255, 150, 198, 0.28);
}

.line {
  width: fit-content;
  max-width: min(82%, 520px);
  min-height: auto;
  padding: 10px 12px;
  border-radius: 16px 16px 16px 5px;
  border: 1px solid rgba(255, 120, 128, 0.14);
  background: rgba(20, 10, 16, 0.92);
  box-shadow:
    0 0 0 1px rgba(255, 118, 126, 0.03) inset,
    0 0 24px rgba(67, 15, 22, 0.24);
  text-shadow: 0 0 10px var(--glow);
  letter-spacing: 0.02em;
  white-space: pre-wrap;
  animation: lineEnter 180ms ease-out;
}

.line.self {
  align-self: flex-end;
  margin-left: auto;
  border-radius: 16px 16px 5px 16px;
  color: #fff0f6;
  border-color: rgba(255, 126, 135, 0.24);
  background: linear-gradient(180deg, rgba(86, 23, 34, 0.96), rgba(39, 12, 19, 0.94));
  text-shadow:
    0 0 10px rgba(255, 134, 140, 0.18),
    0 0 20px rgba(255, 105, 115, 0.12);
}

.line.peer {
  align-self: flex-start;
  color: var(--text);
  background: linear-gradient(180deg, rgba(30, 11, 15, 0.96), rgba(16, 7, 9, 0.94));
  text-shadow:
    0 0 10px var(--glow),
    0 0 24px rgba(255, 145, 95, 0.07);
}

.line.system {
  align-self: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  border-color: rgba(255, 120, 128, 0.1);
  background: rgba(49, 14, 20, 0.58);
  color: var(--text-dim);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-width: min(82%, 520px);
}

.media-card {
  display: inline-flex;
  border-radius: 16px 16px 16px 5px;
  padding: 8px;
  border: 1px solid rgba(255, 155, 197, 0.16);
  background: rgba(19, 10, 15, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 149, 196, 0.04) inset,
    0 0 18px rgba(49, 16, 28, 0.34);
}

.media-block.self .media-card {
  border-color: rgba(255, 171, 208, 0.22);
  border-radius: 16px 16px 5px 16px;
  background: linear-gradient(180deg, rgba(62, 20, 43, 0.94), rgba(30, 11, 21, 0.92));
}

.media-block.self {
  align-self: flex-end;
  margin-left: auto;
}

.media-block.peer {
  align-self: flex-start;
}

.chat-image {
  display: block;
  max-width: min(100%, 460px);
  width: auto;
  max-height: 420px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.3);
  filter: saturate(1.02) contrast(1.04) brightness(0.96);
}

.media-fallback {
  display: inline-flex;
  margin-left: 1.7ch;
  margin-top: 3px;
  color: var(--text-dim);
}

.trace-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 120, 128, 0.14);
  background:
    linear-gradient(180deg, rgba(27, 10, 14, 0.96), rgba(14, 6, 8, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 118, 126, 0.03) inset,
    0 12px 24px rgba(20, 6, 8, 0.12);
}

.trace-panel[hidden] {
  display: none;
}

.trace-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trace-title {
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trace-detail {
  color: var(--text-dim);
  font-size: 0.74rem;
  line-height: 1.45;
}

.trace-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.trace-button {
  border: 1px solid rgba(255, 120, 128, 0.22);
  background:
    linear-gradient(180deg, rgba(56, 18, 24, 0.96), rgba(20, 8, 10, 0.96));
  color: var(--text-dim);
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.trace-button:hover,
.trace-button:focus-visible {
  color: var(--text-soft);
  border-color: var(--line-strong);
  box-shadow:
    0 0 18px rgba(255, 102, 110, 0.16),
    0 0 28px rgba(255, 124, 79, 0.08);
  outline: 0;
  transform: translateY(-1px);
}

.trace-button:disabled {
  cursor: default;
  color: rgba(255, 199, 196, 0.34);
  border-color: rgba(255, 120, 128, 0.1);
  box-shadow: none;
  transform: none;
}

.trace-button-primary {
  color: #fff0ee;
  border-color: rgba(255, 124, 132, 0.26);
  background:
    linear-gradient(180deg, rgba(102, 28, 41, 0.98), rgba(48, 13, 19, 0.98));
}

.composer {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 120, 128, 0.16);
  background:
    linear-gradient(180deg, rgba(24, 8, 10, 0.96), rgba(10, 4, 5, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 118, 126, 0.03) inset,
    0 -8px 24px rgba(38, 10, 15, 0.16);
  margin-top: auto;
}

.composer[hidden] {
  display: none;
}

.composer-button {
  flex: 0 0 auto;
  min-height: 40px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.composer-field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 4px 4px 14px;
  border: 1px solid rgba(255, 120, 128, 0.16);
  border-radius: 999px;
  background: rgba(31, 11, 14, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 118, 126, 0.03),
    0 10px 20px rgba(20, 6, 8, 0.12);
}

.composer-icon-button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(52, 16, 22, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 118, 126, 0.04),
    0 10px 18px rgba(18, 6, 8, 0.14);
}

.composer-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.send-button {
  border-color: rgba(255, 124, 132, 0.26);
  background:
    linear-gradient(180deg, rgba(102, 28, 41, 0.98), rgba(48, 13, 19, 0.98));
}

.prompt {
  color: var(--text);
  text-shadow: 0 0 10px var(--glow);
  animation: blink 1s steps(1, end) infinite;
}

#message-input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  caret-color: var(--text);
}

#message-input::placeholder {
  color: rgba(255, 186, 212, 0.38);
}

.composer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.composer-meta[hidden] {
  display: none;
}

.message-counter {
  color: var(--text-faint);
  white-space: nowrap;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

@keyframes lineEnter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.82;
  }

  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

@keyframes typingDotPulse {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.78);
  }

  35% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shellPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 148, 198, 0.04) inset,
      0 0 78px rgba(87, 25, 58, 0.32),
      0 0 150px rgba(89, 36, 18, 0.16);
  }

  50% {
    box-shadow:
      0 0 0 1px rgba(255, 156, 203, 0.06) inset,
      0 0 92px rgba(109, 31, 71, 0.38),
      0 0 170px rgba(113, 49, 22, 0.2);
  }
}

@keyframes hazeShift {
  0% {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }

  100% {
    transform: translate3d(1.5%, 1.25%, 0) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .terminal-shell,
  .prompt,
  .status-dot {
    animation: none;
  }

  .line {
    animation: none;
  }
}

@media (max-width: 780px) {
  .screen {
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .terminal-shell {
    width: 100%;
    height: calc(100dvh - 16px);
    padding: 12px;
    gap: 10px;
  }

  .terminal-head {
    align-items: center;
    gap: 10px;
  }

  .terminal-topbar {
    justify-content: flex-end;
  }

  .topbar-button,
  .audio-toggle {
    font-size: 0.72rem;
    padding: 8px 10px;
  }

  .brand-kicker,
  .brand-copy {
    display: none;
  }

  .brand-title {
    font-size: 1.4rem;
    letter-spacing: -0.02em;
  }

  .status-strip {
    gap: 10px;
    padding: 9px 10px;
  }

  .status-meta {
    gap: 10px;
  }

  .status-detail {
    text-align: left;
    font-size: 0.72rem;
  }

  .chat-image {
    max-width: min(100%, 320px);
    max-height: 340px;
  }

  .line,
  .media-block {
    max-width: 88%;
  }

  .trace-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .trace-actions {
    width: 100%;
    justify-content: flex-start;
  }

}

@media (max-width: 560px) {
  html,
  body {
    height: var(--app-height);
    min-height: var(--app-height);
    overflow: hidden;
  }

  .screen {
    position: fixed;
    inset: 0;
    height: var(--app-height);
    min-height: var(--app-height);
    padding: 0;
    overflow: hidden;
  }

  .terminal-shell {
    height: var(--app-height);
    min-height: var(--app-height);
    border: 0;
    padding:
      calc(max(10px, env(safe-area-inset-top)) + var(--vv-offset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    gap: 12px;
    box-shadow: none;
    background: #000;
  }

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

  .brand-block {
    display: flex;
    gap: 0;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .brand-block::before {
    display: none;
  }

  .terminal-topbar {
    width: auto;
    justify-content: flex-end;
    gap: 0;
    flex-wrap: nowrap;
  }

  .topbar-menu-toggle {
    display: inline-flex;
    width: 50px;
    min-width: 50px;
    min-height: 50px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    background: rgba(30, 11, 14, 0.94);
    box-shadow:
      inset 0 0 0 1px rgba(255, 118, 126, 0.03),
      0 12px 24px rgba(18, 5, 8, 0.16);
  }

  .topbar-actions {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 168px;
    padding: 8px;
    border: 1px solid rgba(255, 120, 128, 0.16);
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.96);
    box-shadow:
      inset 0 0 0 1px rgba(255, 118, 126, 0.03),
      0 16px 28px rgba(18, 5, 8, 0.22);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
    z-index: 4;
  }

  .terminal-topbar[data-menu-open="true"] .topbar-actions {
    display: flex;
  }

  .topbar-actions .topbar-button,
  .topbar-actions .audio-toggle {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 0.68rem;
    justify-content: flex-start;
    background: rgba(43, 15, 20, 0.94);
    box-shadow: none;
  }

  .topbar-icon,
  .topbar-actions .topbar-icon {
    display: block;
  }

  .topbar-menu-toggle .topbar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .topbar-actions .topbar-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .audio-toggle[aria-pressed="false"] .audio-wave {
    opacity: 0.24;
  }

  .terminal {
    padding: 8px 2px 96px;
    gap: 8px;
  }

  .brand-title {
    position: relative;
    z-index: 1;
    line-height: 0;
  }

  .brand-logo {
    width: 3.7rem;
    filter:
      drop-shadow(0 0 10px rgba(255, 111, 118, 0.12))
      drop-shadow(0 0 18px rgba(255, 91, 69, 0.06));
  }

  .typing-indicator {
    padding-inline: 2px;
    font-size: 0.68rem;
  }

  .trace-panel {
    gap: 10px;
    padding: 10px 12px;
  }

  .trace-title {
    font-size: 0.76rem;
  }

  .trace-detail {
    font-size: 0.68rem;
  }

  .trace-actions {
    width: 100%;
    gap: 8px;
  }

  .trace-button {
    flex: 1 1 0;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.66rem;
  }

  .line {
    max-width: 92%;
    padding: 9px 11px;
    font-size: 0.94rem;
  }

  .line.system {
    max-width: 100%;
    padding: 2px 8px;
    font-size: 0.68rem;
    border: 0;
    background: rgba(20, 8, 10, 0.44);
    box-shadow: none;
  }

  .terminal-frame {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .composer {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border: 0;
    margin:
      0
      calc(-1 * max(10px, env(safe-area-inset-right)))
      calc(-1 * max(10px, env(safe-area-inset-bottom)))
      calc(-1 * max(10px, env(safe-area-inset-left)));
    padding:
      10px
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    background: transparent;
    box-shadow: none;
  }

  .prompt {
    display: none;
  }

  #message-input {
    min-height: 42px;
    align-self: center;
    padding: 0;
    background: transparent;
  }

  #photo-button {
    align-self: center;
  }

  .composer-field {
    min-height: 50px;
    padding: 4px 4px 4px 14px;
    background: rgba(18, 8, 10, 0.94);
    border-color: rgba(255, 159, 201, 0.14);
    box-shadow:
      inset 0 0 0 1px rgba(255, 149, 196, 0.03),
      0 12px 24px rgba(13, 5, 9, 0.18);
  }

  .composer-button {
    min-height: 44px;
    border-radius: 999px;
  }

  .composer-icon-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .send-button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .composer-meta {
    justify-content: flex-end;
    padding-inline: 4px;
  }

  .status-meta {
    width: auto;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }

  .status-strip {
    display: none;
  }

  .status-count {
    min-height: 34px;
    padding: 5px 10px;
    gap: 6px;
    border-radius: 999px;
    border-color: rgba(255, 159, 201, 0.12);
    background: rgba(0, 0, 0, 0.92);
  }

  .status-strip {
    padding: 8px 10px;
    border-radius: 24px;
    border-color: rgba(255, 159, 201, 0.12);
    background: rgba(0, 0, 0, 0.92);
    box-shadow:
      inset 0 0 0 1px rgba(255, 149, 196, 0.03),
      0 12px 24px rgba(14, 5, 10, 0.14);
  }

  .status-count-label {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .status-count-value {
    font-size: 0.82rem;
  }

  .status-detail {
    display: none;
  }

  .chat-image {
    max-width: min(100%, 280px);
    max-height: 300px;
  }

  #composer-hint {
    display: none;
  }
}
