:root {
  color-scheme: dark;
  --ink: #f7f5fb;
  --muted: #a5a0af;
  --quiet: #706b79;
  --night: #07070a;
  --night-soft: #0d0d12;
  --panel: #111116;
  --panel-raised: #17171d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.15);
  --violet: #a78bfa;
  --violet-bright: #c4b5fd;
  --rose: #f1b9c9;
  --gold: #efd49c;
  --success: #83d7ba;
  --warning: #e9c178;
  --danger: #f09298;
  --sidebar-width: 292px;
  --drawer-width: 390px;
  --radius-large: 24px;
  --radius-medium: 16px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--night);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--night);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: 14px;
  left: 14px;
  padding: 10px 14px;
  border-radius: 9px;
  color: #141117;
  background: #f7f2fb;
  font-size: 0.82rem;
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(196, 181, 253, 0.42);
  outline-offset: 3px;
}

.loading-view {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: #8d8795;
  background:
    radial-gradient(circle at center, rgba(94, 72, 124, 0.14), transparent 22rem),
    #050508;
}

.loading-view p {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.loading-ring {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: var(--violet-bright);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.login-view {
  --horizon-x: 60%;
  --horizon-y: 52%;
  --login-ivory: #f3ecdc;
  --login-muted: rgba(226, 216, 197, 0.58);
  --login-gold: #c9a96b;
  --login-gold-soft: rgba(201, 169, 107, 0.34);
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #050403;
}

.cosmic-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    #050403
    url("/assets/black-hole-poster.jpg")
    center / cover no-repeat;
  transform-origin: var(--horizon-x) var(--horizon-y);
  will-change: transform, filter, opacity;
}

.cosmic-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  filter:
    saturate(0.72)
    sepia(0.12)
    brightness(0.74)
    contrast(1.12);
  transform: translate3d(8%, 0, 0) scale(1.18);
  transform-origin: center;
  will-change: transform;
}

.cosmic-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(5, 4, 3, 0.97) 0%,
      rgba(5, 4, 3, 0.88) 24%,
      rgba(5, 4, 3, 0.48) 43%,
      rgba(5, 4, 3, 0.08) 67%,
      rgba(5, 4, 3, 0.2) 100%
    ),
    radial-gradient(
      ellipse 33% 39% at var(--horizon-x) var(--horizon-y),
      transparent 0 45%,
      rgba(5, 4, 3, 0.03) 63%,
      rgba(5, 4, 3, 0.24) 100%
    ),
    linear-gradient(
      0deg,
      rgba(5, 4, 3, 0.72),
      transparent 34%,
      rgba(5, 4, 3, 0.22)
    );
}

.visual-credit {
  position: absolute;
  z-index: 2;
  right: clamp(16px, 2vw, 30px);
  bottom: 18px;
  color: rgba(226, 216, 197, 0.24);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.43rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px #000;
}

.login-view::after {
  content: "";
  position: absolute;
  z-index: 20;
  inset: 0;
  background: #020205;
  opacity: 0;
  pointer-events: none;
}

.workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 730;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gate-content {
  position: relative;
  z-index: 3;
  width: min(100%, 610px);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 92px 24px 108px clamp(32px, 6vw, 112px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 22px;
  color: var(--login-gold);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 25px;
  height: 1px;
  background: var(--login-gold-soft);
}

.gate-copy h1 {
  margin: 0;
  color: var(--login-ivory);
  font-family: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  font-size: clamp(3.7rem, 6.1vw, 7rem);
  font-weight: 400;
  line-height: 0.91;
  letter-spacing: -0.055em;
  text-wrap: balance;
  text-shadow: 0 18px 64px rgba(0, 0, 0, 0.5);
}

.gate-intro {
  max-width: 390px;
  margin: 29px 0 0 3px;
  color: var(--login-muted);
  font-family: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  font-size: clamp(0.9rem, 1.15vw, 1.02rem);
  line-height: 1.72;
}

.login-form {
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px 21px;
  margin-top: 46px;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 169, 107, 0.18);
}

.field {
  display: grid;
  gap: 5px;
}

.field label {
  color: rgba(226, 216, 197, 0.42);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.48rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  height: 41px;
  padding: 0 1px;
  border: 0;
  border-bottom: 1px solid rgba(226, 216, 197, 0.25);
  border-radius: 0;
  outline: 0;
  color: var(--login-ivory);
  background: transparent;
  caret-color: var(--login-gold);
  transition:
    border-color 160ms ease,
    color 160ms ease;
}

.field input:hover {
  border-color: rgba(201, 169, 107, 0.48);
}

.field input:focus {
  border-color: var(--login-gold);
  background: transparent;
  box-shadow: none;
}

.form-error {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: #e6aa9c;
  font-size: 0.66rem;
  line-height: 1.45;
}

.journey-button {
  grid-column: 1 / -1;
  width: min(100%, 210px);
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 15px;
  border: 1px solid rgba(201, 169, 107, 0.52);
  border-radius: 0;
  cursor: pointer;
  color: var(--login-ivory);
  background: rgba(5, 4, 3, 0.12);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

.journey-button:hover:not(:disabled) {
  color: #17120b;
  border-color: var(--login-gold);
  background: var(--login-gold);
  transform: translateY(-1px);
}

.journey-button:active:not(:disabled) {
  transform: translateY(0);
}

.journey-button:disabled {
  cursor: wait;
  opacity: 0.52;
}

.button-arrow {
  font-family: sans-serif;
  font-size: 0.9rem;
  line-height: 1;
}

.gate-footer {
  position: absolute;
  z-index: 4;
  bottom: 35px;
  left: clamp(32px, 6vw, 112px);
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(226, 216, 197, 0.3);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-signal {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--login-gold);
  box-shadow: 0 0 0 4px rgba(201, 169, 107, 0.07);
}

.small-lock {
  position: relative;
  width: 13px;
  height: 10px;
  border: 1px solid currentColor;
  border-radius: 3px;
}

.small-lock::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 6px;
  top: -6px;
  left: 2px;
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.login-view.login-entering .gate-content,
.login-view.login-entering .visual-credit {
  animation: editorial-content-fade 620ms ease forwards;
}

.cosmic-stage.cosmic-enter-fallback {
  animation: event-horizon-dive 1.5s cubic-bezier(0.64, 0, 0.76, 1) forwards;
}

.login-view.login-entering::after {
  animation: editorial-curtain-in 1.5s ease-in forwards;
}

.app-view {
  min-height: 100vh;
  background:
    radial-gradient(circle at 79% 12%, rgba(84, 67, 111, 0.08), transparent 30rem),
    #09090c;
}

.workspace-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.prompt-rail {
  position: relative;
  z-index: 40;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 23px 18px 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(165deg, rgba(103, 77, 127, 0.055), transparent 36%),
    #0d0d11;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

/* Keep every rail section at its natural height so the rail scrolls instead of
   compressing section boxes and allowing their contents to overlap. */
.rail-header,
.new-chat-button,
.conversation-history,
.rail-section,
.readiness-card,
.rail-footer {
  flex-shrink: 0;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 5px;
}

.workspace-brand {
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  text-transform: none;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: #aaa4b2;
  background: rgba(255, 255, 255, 0.025);
  font-size: 1.1rem;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.close-rail-button,
.menu-button {
  display: none;
}

.new-chat-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 26px 0 30px;
  padding: 0 14px;
  border: 1px solid rgba(196, 181, 253, 0.18);
  border-radius: 12px;
  cursor: pointer;
  color: #e6dfee;
  background:
    linear-gradient(110deg, rgba(167, 139, 250, 0.09), rgba(237, 185, 201, 0.045)),
    rgba(255, 255, 255, 0.018);
  font-size: 0.73rem;
  font-weight: 680;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.new-chat-button:hover:not(:disabled) {
  border-color: rgba(196, 181, 253, 0.32);
  background:
    linear-gradient(110deg, rgba(167, 139, 250, 0.14), rgba(237, 185, 201, 0.065)),
    rgba(255, 255, 255, 0.025);
  transform: translateY(-1px);
}

.new-chat-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.new-chat-plus {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: var(--violet-bright);
  font-size: 0.9rem;
  font-weight: 400;
}

.conversation-history {
  min-height: 0;
  margin: -12px 0 24px;
}

.conversation-history-heading {
  margin-bottom: 10px;
}

.conversation-list {
  max-height: 208px;
  display: grid;
  gap: 4px;
  overflow-y: auto;
  padding: 0 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.conversation-item {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  color: inherit;
  background: transparent;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.conversation-item:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.032);
  transform: translateX(2px);
}

.conversation-item:disabled {
  cursor: wait;
  opacity: 0.58;
}

.conversation-item-current {
  border-color: rgba(196, 181, 253, 0.15);
  background:
    linear-gradient(110deg, rgba(167, 139, 250, 0.08), transparent),
    rgba(255, 255, 255, 0.02);
}

.conversation-item-title {
  overflow: hidden;
  color: #bbb4c1;
  font-size: 0.66rem;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item-owner {
  overflow: hidden;
  color: #887b94;
  font-size: 0.49rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-item-current .conversation-item-title {
  color: #e0d9e6;
}

.conversation-item-meta,
.conversation-item-status {
  display: flex;
  align-items: center;
}

.conversation-item-meta {
  justify-content: space-between;
  gap: 10px;
  color: #5f5a65;
  font-size: 0.52rem;
}

.conversation-item-status {
  gap: 5px;
}

.conversation-item-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #625d68;
}

.conversation-item-status.status-running {
  color: #a898b5;
}

.status-running .conversation-item-dot {
  background: #b5a1c7;
  box-shadow: 0 0 0 3px rgba(181, 161, 199, 0.08);
  animation: pulse 1.35s ease-in-out infinite;
}

.conversation-list-empty {
  margin: 4px 7px 0;
  color: #5f5a65;
  font-size: 0.58rem;
  line-height: 1.55;
}

.rail-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 7px;
}

.rail-section-heading p {
  margin: 0;
  color: #d6d0dc;
  font-size: 0.7rem;
  font-weight: 710;
}

.rail-section-heading span {
  color: #625e69;
  font-size: 0.58rem;
}

.prompt-list {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.prompt-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 7px;
  padding: 12px 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  color: inherit;
  background: transparent;
  text-align: left;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.prompt-card:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.032);
  transform: translateX(2px);
}

.prompt-card:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.prompt-index {
  padding-top: 1px;
  color: #5f5967;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.54rem;
}

.prompt-card strong,
.prompt-card small {
  display: block;
}

.prompt-card strong {
  overflow: hidden;
  color: #c9c3cf;
  font-size: 0.69rem;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-card small {
  margin-top: 4px;
  overflow: hidden;
  color: #696470;
  font-size: 0.58rem;
  font-weight: 430;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readiness-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

.readiness-heading,
.allowance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.readiness-heading p {
  margin: 0;
  color: #77717f;
  font-size: 0.58rem;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-label {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.52rem;
  font-weight: 700;
}

.status-neutral {
  border-color: var(--line);
  color: #77727e;
  background: rgba(255, 255, 255, 0.025);
}

.status-good {
  border-color: rgba(131, 215, 186, 0.16);
  color: #98d9c3;
  background: rgba(131, 215, 186, 0.055);
}

.status-warning {
  border-color: rgba(233, 193, 120, 0.18);
  color: #e1c78f;
  background: rgba(233, 193, 120, 0.055);
}

.status-danger {
  border-color: rgba(240, 146, 152, 0.18);
  color: #edacb0;
  background: rgba(240, 146, 152, 0.055);
}

.allowance-row {
  margin-top: 14px;
}

.allowance-row div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.allowance-row span {
  color: #68636f;
  font-size: 0.56rem;
}

.allowance-row strong {
  color: #d7d1dc;
  font-size: 0.76rem;
}

.meter {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  appearance: none;
}

.meter::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.meter::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #8f79cc, #d3b9d8);
  transition: width 320ms ease;
}

.meter::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #8f79cc, #d3b9d8);
}

.meter-warning::-webkit-progress-value {
  background: linear-gradient(90deg, #b58952, #e9c178);
}

.meter-warning::-moz-progress-bar {
  background: linear-gradient(90deg, #b58952, #e9c178);
}

.meter-danger::-webkit-progress-value {
  background: linear-gradient(90deg, #ba616a, #f09298);
}

.meter-danger::-moz-progress-bar {
  background: linear-gradient(90deg, #ba616a, #f09298);
}

.readiness-detail {
  margin: 7px 0 0;
  color: #5f5a65;
  font-size: 0.54rem;
}

.guard-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.guard-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid;
  border-radius: 50%;
  font-size: 0.64rem;
  font-weight: 800;
}

.guard-neutral {
  border-color: var(--line);
  color: #78727f;
}

.guard-good {
  border-color: rgba(131, 215, 186, 0.2);
  color: var(--success);
  background: rgba(131, 215, 186, 0.05);
}

.guard-warning {
  border-color: rgba(233, 193, 120, 0.2);
  color: var(--warning);
  background: rgba(233, 193, 120, 0.05);
}

.guard-danger {
  border-color: rgba(240, 146, 152, 0.2);
  color: var(--danger);
  background: rgba(240, 146, 152, 0.05);
}

.guard-row strong {
  display: block;
  color: #aaa4b0;
  font-size: 0.61rem;
  font-weight: 650;
}

.guard-row p {
  margin: 3px 0 0;
  color: #5c5762;
  font-size: 0.52rem;
  line-height: 1.35;
}

.rail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 12px;
  padding: 13px 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.owner-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.owner-chip div {
  min-width: 0;
}

.owner-chip strong,
.owner-chip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-chip strong {
  color: #b9b3bf;
  font-size: 0.62rem;
  font-weight: 650;
}

.owner-chip div span {
  margin-top: 2px;
  color: #5b5661;
  font-size: 0.5rem;
}

.text-button {
  padding: 7px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  color: #66616c;
  background: transparent;
  font-size: 0.56rem;
  transition:
    color 150ms ease,
    background 150ms ease;
}

.text-button:hover:not(:disabled) {
  color: #d1cbd5;
  background: rgba(255, 255, 255, 0.04);
}

.text-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.conversation-shell {
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.conversation-header {
  position: relative;
  z-index: 20;
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px clamp(18px, 3.2vw, 42px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(9, 9, 12, 0.82);
  backdrop-filter: blur(18px);
}

.conversation-title {
  grid-column: 2;
  text-align: center;
}

.conversation-title p {
  margin: 0;
  color: #d8d3dc;
  font-size: 0.75rem;
  font-weight: 650;
}

.conversation-title span {
  display: block;
  max-width: 320px;
  margin-top: 4px;
  overflow: hidden;
  color: #5e5964;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.5rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.ready-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #77717e;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.59rem;
  font-weight: 650;
}

.ready-state > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.025);
}

.ready-good {
  color: #8cd2bb;
  border-color: rgba(131, 215, 186, 0.13);
}

.ready-warning {
  color: #d6b879;
  border-color: rgba(233, 193, 120, 0.13);
}

.ready-neutral {
  color: #77717e;
}

.header-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: #96909d;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.62rem;
  font-weight: 650;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.header-button:hover {
  color: #ded9e2;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.download-glyph {
  color: #a89bb8;
  font-size: 0.78rem;
}

.conversation-body {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 17%, rgba(104, 78, 127, 0.055), transparent 25rem),
    linear-gradient(180deg, #0a0a0e, #09090c);
}

.chat-notice {
  width: min(860px, calc(100% - 36px));
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px auto 0;
  padding: 13px 15px;
  border: 1px solid rgba(233, 193, 120, 0.18);
  border-radius: 13px;
  color: #e6cd9a;
  background: rgba(137, 102, 55, 0.075);
}

.chat-notice strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.72rem;
}

.chat-notice p {
  margin: 0;
  color: #a9936b;
  font-size: 0.66rem;
  line-height: 1.5;
}

.notice-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(233, 193, 120, 0.25);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.7rem;
}

.message-list {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 25px;
  overflow-y: auto;
  padding: 42px max(24px, calc((100% - 860px) / 2)) 34px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.message-list:focus-visible {
  outline-offset: -4px;
}

.empty-chat {
  width: min(100%, 610px);
  margin: auto;
  padding: 28px 20px 48px;
  text-align: center;
}

.empty-eyebrow {
  margin: 0 0 11px;
  color: #82758f;
  font-size: 0.58rem;
  font-weight: 680;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.empty-chat h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 4vw, 3.7rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.empty-copy {
  max-width: 470px;
  margin: 19px auto 0;
  color: #77717f;
  font-size: 0.8rem;
  line-height: 1.65;
}

.starter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.starter-chip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: #8e8796;
  background: rgba(255, 255, 255, 0.018);
  font-size: 0.62rem;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.starter-chip:hover:not(:disabled) {
  color: #d5cedb;
  border-color: rgba(196, 181, 253, 0.19);
  background: rgba(167, 139, 250, 0.055);
}

.starter-chip:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.message {
  width: min(90%, 760px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-self: flex-start;
}

.message-user {
  grid-template-columns: minmax(0, 1fr);
  align-self: flex-end;
  width: min(78%, 650px);
}

.message-content {
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin-bottom: 6px;
  color: #5e5964;
  font-size: 0.55rem;
}

.message-user .message-meta {
  justify-content: flex-end;
  padding-right: 6px;
}

.message-role {
  color: #89838f;
  font-weight: 680;
}

.message-working-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8f7f9d;
}

.message-working-label::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b5a1c7;
  box-shadow: 0 0 0 3px rgba(181, 161, 199, 0.07);
  animation: pulse 1.2s ease-in-out infinite;
  content: "";
}

.message-bubble {
  color: #d3ced7;
  font-size: 0.84rem;
  line-height: 1.72;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-user .message-bubble {
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px 5px 16px 16px;
  color: #ddd8e1;
  background: rgba(255, 255, 255, 0.045);
}

.message-system .message-bubble,
.message-error .message-bubble {
  padding: 12px 14px;
  border: 1px solid rgba(240, 146, 152, 0.13);
  border-radius: 12px;
  color: #daa9ad;
  background: rgba(240, 146, 152, 0.045);
}

.message-pending .message-bubble {
  color: #9c8ca9;
  font-style: italic;
}

.message-image-card {
  width: min(100%, 720px);
  margin: 14px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: #0c0c10;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.message-generated-image {
  display: block;
  width: 100%;
  max-height: min(68vh, 760px);
  object-fit: contain;
  background: #08080b;
}

.message-image-download {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: #c9bdd4;
  font-size: 0.72rem;
  font-weight: 680;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.035);
}

.message-image-download:hover,
.message-image-download:focus-visible {
  color: #f0eaf5;
  background: rgba(167, 139, 250, 0.09);
}

.composer {
  width: min(860px, calc(100% - 36px));
  flex: 0 0 auto;
  margin: 0 auto;
  padding: 15px 15px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.025), transparent 55%),
    #131318;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition:
    border-color 160ms ease,
    opacity 160ms ease,
    box-shadow 160ms ease;
}

.composer:focus-within {
  border-color: rgba(196, 181, 253, 0.28);
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.3),
    0 0 0 4px rgba(167, 139, 250, 0.035);
}

.composer-disabled {
  opacity: 0.52;
}

.composer textarea {
  width: 100%;
  min-height: 34px;
  max-height: 210px;
  display: block;
  resize: none;
  padding: 3px 4px 8px;
  border: 0;
  outline: 0;
  color: #e6e1e9;
  background: transparent;
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-y: auto;
}

.composer textarea::placeholder {
  color: #615c67;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 34px;
}

.composer-footer p {
  margin: 0 0 0 3px;
  color: #56515c;
  font-size: 0.55rem;
}

.send-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  color: #171319;
  background: linear-gradient(145deg, #e8ddeb, #cbbbd8);
  font-size: 0.9rem;
  transition:
    transform 150ms ease,
    filter 150ms ease,
    opacity 150ms ease;
}

.send-button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.privacy-note {
  flex: 0 0 auto;
  margin: 9px auto 13px;
  color: #48444e;
  font-size: 0.52rem;
  text-align: center;
}

.scrim {
  position: fixed;
  z-index: 80;
  inset: 0;
  border: 0;
  cursor: default;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(2px);
}

.downloads-drawer {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(var(--drawer-width), 92vw);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-strong);
  background:
    linear-gradient(155deg, rgba(97, 73, 116, 0.065), transparent 35%),
    #101014;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.38);
  transform: translateX(105%);
  visibility: hidden;
  transition:
    transform 260ms cubic-bezier(0.22, 0.7, 0.2, 1),
    visibility 260ms;
}

.downloads-drawer.drawer-open {
  transform: translateX(0);
  visibility: visible;
}

.admin-drawer {
  width: min(470px, 94vw);
}

.admin-glyph {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.48rem;
  font-weight: 760;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 27px 25px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-eyebrow {
  margin: 0 0 7px;
  color: #776a84;
  font-size: 0.56rem;
  font-weight: 680;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.drawer-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 10px;
}

.drawer-copy p {
  max-width: 235px;
  margin: 0;
  color: #797380;
  font-size: 0.67rem;
  line-height: 1.5;
}

.refresh-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  color: #918a98;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.59rem;
}

.refresh-button:hover:not(:disabled) {
  color: #d2ccd7;
  border-color: var(--line-strong);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.downloads-status {
  margin: 10px 24px 6px;
  color: #5f5965;
  font-size: 0.57rem;
}

.downloads-list {
  display: grid;
  gap: 7px;
  margin: 6px 12px 18px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.download-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.download-link:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.file-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  border: 1px solid rgba(196, 181, 253, 0.13);
  border-radius: 9px;
  color: #a89ab4;
  background: rgba(167, 139, 250, 0.045);
  font-size: 0.5rem;
  font-weight: 750;
  text-transform: uppercase;
}

.file-copy {
  min-width: 0;
}

.file-name,
.file-meta {
  display: block;
}

.file-name {
  overflow: hidden;
  color: #c9c3cd;
  font-size: 0.68rem;
  font-weight: 640;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  margin-top: 5px;
  color: #615b67;
  font-size: 0.54rem;
}

.download-arrow {
  color: #6f6876;
  font-size: 0.8rem;
  text-align: center;
}

.downloads-empty {
  margin: 12px;
  padding: 28px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
}

.downloads-empty strong,
.downloads-empty span {
  display: block;
}

.admin-drawer-content {
  display: grid;
  gap: 17px;
  padding: 18px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.admin-section {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.018);
}

.admin-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.admin-section-heading h3 {
  margin: 0;
  color: #d0cad4;
  font-size: 0.88rem;
  font-weight: 650;
}

.admin-status {
  color: #6e6873;
  font-size: 0.57rem;
}

.admin-user-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-user-form label {
  color: #77717d;
  font-size: 0.55rem;
  font-weight: 650;
}

.admin-user-form input {
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  color: #d9d4dc;
  background: #0c0c10;
  font: inherit;
  font-size: 0.67rem;
}

.admin-user-form input:focus {
  border-color: rgba(196, 181, 253, 0.35);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.06);
}

.admin-field-help {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  color: #625d68;
  font-size: 0.55rem;
  line-height: 1.45;
}

.admin-primary-button,
.admin-danger-button {
  min-height: 38px;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 680;
}

.admin-primary-button {
  grid-column: 1 / -1;
  border: 1px solid rgba(196, 181, 253, 0.18);
  color: #cfc5d7;
  background: rgba(167, 139, 250, 0.08);
}

.admin-primary-button:hover:not(:disabled) {
  border-color: rgba(196, 181, 253, 0.3);
  background: rgba(167, 139, 250, 0.12);
}

.admin-users-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.admin-user-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.admin-user-identity {
  min-width: 0;
}

.admin-user-identity strong,
.admin-user-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-identity strong {
  color: #c7c1cb;
  font-size: 0.67rem;
}

.admin-user-identity span {
  margin-top: 3px;
  color: #645f69;
  font-size: 0.52rem;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.admin-user-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  color: #8c8592;
  background: rgba(255, 255, 255, 0.02);
  font: inherit;
  font-size: 0.51rem;
}

.admin-user-actions button:hover {
  color: #c9c2ce;
  border-color: var(--line-strong);
}

.admin-user-actions .danger-text-button {
  color: #bb777d;
}

.danger-section {
  border-color: rgba(240, 146, 152, 0.13);
}

.admin-section-copy {
  margin: -3px 0 13px;
  color: #726b77;
  font-size: 0.6rem;
  line-height: 1.55;
}

.admin-danger-button {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(240, 146, 152, 0.19);
  color: #c88f94;
  background: rgba(240, 146, 152, 0.045);
}

.admin-danger-button:hover:not(:disabled) {
  border-color: rgba(240, 146, 152, 0.32);
  background: rgba(240, 146, 152, 0.075);
}

.admin-danger-button.danger-strong {
  color: #e2a2a7;
  background: rgba(240, 146, 152, 0.075);
}

.admin-primary-button:disabled,
.admin-danger-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.downloads-empty strong {
  margin-bottom: 6px;
  color: #aaa4af;
  font-size: 0.7rem;
}

.downloads-empty span {
  color: #625d68;
  font-size: 0.6rem;
  line-height: 1.5;
}

.drawer-footer {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: auto 23px 23px;
  padding: 14px;
  border: 1px solid rgba(196, 181, 253, 0.08);
  border-radius: 12px;
  color: #5f5966;
  background: rgba(167, 139, 250, 0.025);
}

.drawer-footer p {
  margin: 0;
  font-size: 0.57rem;
  line-height: 1.45;
}

.small-lock {
  flex: 0 0 auto;
}

.toast-region {
  position: fixed;
  z-index: 250;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 9px;
  width: min(350px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: #d6d0da;
  background: rgba(22, 21, 27, 0.96);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.36);
  font-size: 0.68rem;
  line-height: 1.5;
  animation: toast-in 180ms ease-out;
}

.toast-error {
  border-color: rgba(240, 146, 152, 0.2);
}

.noscript-message {
  position: fixed;
  z-index: 400;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 15px;
  border: 1px solid rgba(240, 146, 152, 0.24);
  border-radius: 12px;
  color: #e8b8bb;
  background: #1b1115;
  text-align: center;
}

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

@keyframes editorial-content-fade {
  to {
    opacity: 0;
    transform: translateY(-12px);
    filter: blur(3px);
  }
}

@keyframes event-horizon-dive {
  0% {
    filter: brightness(1) contrast(1);
    opacity: 1;
    transform: scale(1);
  }

  44% {
    filter: brightness(1.16) contrast(1.08);
    opacity: 1;
    transform: scale(1.42);
  }

  100% {
    filter: brightness(0.04) contrast(1.42) blur(1.5px);
    opacity: 0.16;
    transform: scale(8.2);
  }
}

@keyframes editorial-curtain-in {
  0% {
    opacity: 0;
  }

  64% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 980px) {
  .workspace-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .prompt-rail {
    position: fixed;
    z-index: 100;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(var(--sidebar-width), 88vw);
    height: 100dvh;
    max-height: 100dvh;
    overscroll-behavior-y: contain;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-105%);
    visibility: hidden;
    transition:
      transform 240ms cubic-bezier(0.22, 0.7, 0.2, 1),
      visibility 240ms;
  }

  /* On the off-canvas rail, readiness follows the prompt list in normal flow. */
  .readiness-card {
    margin-top: 18px;
  }

  .prompt-rail.rail-open {
    transform: translateX(0);
    visibility: visible;
  }

  .close-rail-button,
  .menu-button {
    display: inline-grid;
  }

  .conversation-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .menu-button {
    grid-column: 1;
    gap: 5px;
  }

  .menu-button span {
    width: 15px;
    height: 1px;
    background: currentColor;
  }

  .conversation-title {
    grid-column: 2;
    text-align: left;
  }

  .header-actions {
    grid-column: 3;
  }
}

@media (max-width: 720px) {
  .login-view {
    --horizon-x: 52%;
    --horizon-y: 36%;
    overflow-y: auto;
  }

  .cosmic-video {
    filter:
      saturate(0.72)
      sepia(0.12)
      brightness(0.68)
      contrast(1.12);
    transform: translate3d(2%, -14%, 0) scale(1.32);
  }

  .gate-content {
    width: 100%;
    min-height: 100dvh;
    align-items: center;
    justify-content: flex-start;
    padding: 46vh 20px 34px;
    text-align: center;
  }

  .cosmic-vignette {
    background:
      linear-gradient(
        0deg,
        rgba(5, 4, 3, 0.98) 0%,
        rgba(5, 4, 3, 0.84) 34%,
        rgba(5, 4, 3, 0.18) 68%,
        rgba(5, 4, 3, 0.22) 100%
      ),
      radial-gradient(
        ellipse 46% 27% at var(--horizon-x) var(--horizon-y),
        transparent 0 48%,
        rgba(5, 4, 3, 0.14) 68%,
        rgba(5, 4, 3, 0.45) 100%
      );
  }

  .eyebrow {
    justify-content: center;
    margin-bottom: 13px;
  }

  .gate-copy h1 {
    font-size: clamp(3.15rem, 14vw, 5rem);
  }

  .gate-intro {
    max-width: 360px;
    margin: 20px auto 0;
    line-height: 1.55;
  }

  .login-form {
    width: min(100%, 420px);
    margin-top: 28px;
    text-align: left;
  }

  .visual-credit {
    top: 18px;
    right: 18px;
    bottom: auto;
    font-size: 0.38rem;
  }

  .conversation-header {
    min-height: 64px;
    padding: 10px 12px;
  }

  .conversation-title span {
    max-width: 44vw;
  }

  .ready-state {
    width: 32px;
    min-height: 32px;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .ready-state > span {
    color: #77717e;
  }

  .ready-good > span {
    color: #8cd2bb;
  }

  .ready-warning > span {
    color: #d6b879;
  }

  .header-button {
    width: 34px;
    min-height: 34px;
    justify-content: center;
    padding: 0;
  }

  .header-button-label {
    display: none;
  }

  .message-list {
    padding: 28px 18px 26px;
  }

  .message {
    width: 96%;
  }

  .message-user {
    width: 88%;
  }

  .composer {
    width: calc(100% - 24px);
  }

  .composer-footer p {
    display: none;
  }

  .composer-footer {
    justify-content: flex-end;
  }

  .privacy-note {
    margin-bottom: 9px;
  }
}

@media (max-width: 480px) {
  .gate-content {
    padding: 44vh 18px 28px;
  }

  .gate-copy h1 {
    font-size: clamp(2.85rem, 14vw, 4rem);
  }

  .gate-intro {
    font-size: 0.82rem;
  }

  .login-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    margin-top: 25px;
    padding-top: 14px;
  }

  .form-error,
  .journey-button {
    grid-column: 1;
  }

  .journey-button {
    width: 100%;
  }

  .conversation-title p {
    font-size: 0.69rem;
  }

  .conversation-title span {
    max-width: 38vw;
  }

  .empty-chat {
    padding-inline: 5px;
  }

  .empty-chat h1 {
    font-size: 2.25rem;
  }

  .empty-copy {
    font-size: 0.74rem;
  }

  .starter-row {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 250px);
    margin-inline: auto;
  }

  .admin-drawer-content {
    padding: 12px;
  }

  .admin-section {
    padding: 13px;
  }

  .admin-user-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-user-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-user-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) and (max-height: 720px) {
  .conversation-list {
    max-height: 142px;
  }

  .gate-content {
    padding-top: 38vh;
  }

  .gate-copy h1 {
    font-size: clamp(2.6rem, 11vw, 3.5rem);
  }

  .gate-intro {
    margin-top: 14px;
  }

  .login-form {
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .login-view.login-entering::after {
    animation: editorial-curtain-in 1.1s ease-in forwards !important;
    animation-duration: 1.1s !important;
  }
}
