:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --canvas: #030508;
  --canvas-2: #070b10;
  --phone-edge: #141923;
  --phone-rim: #2b3140;
  --screen: #05080d;
  --screen-2: #080d14;
  --panel: #0b111a;
  --panel-strong: #101721;
  --panel-soft: #090e15;
  --hover: #151d29;
  --assistant-bg: #111923;
  --user-bg: #1c2530;
  --user-bg-end: #151e28;
  --text-main: #f1f4f8;
  --text-muted: #8d98a7;
  --text-quiet: #626d7b;
  --assistant-text: #e4eaf2;
  --user-text: #f7f9fc;
  --divider: rgba(156, 170, 190, 0.15);
  --divider-strong: rgba(170, 185, 204, 0.23);
  --vega-blue: #6fa6d8;
  --vega-blue-soft: rgba(111, 166, 216, 0.13);
  --vega-blue-quiet: #8fb4d7;
  --vega-cyan: #a6d2e6;
  --vega-green: #95c9ae;
  --vega-amber: #d2b579;
  --danger: #b74c59;
  --danger-strong: #963945;
  --focus-ring: #8fb4d7;
  --status-offline: #5c6674;
  --status-problem: #d2a364;
  --shadow-soft: 0 28px 70px rgba(0, 0, 0, 0.54);
  --safe-pad: 14px;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    linear-gradient(135deg, rgba(14, 24, 37, 0.88), transparent 42%),
    linear-gradient(315deg, rgba(8, 12, 18, 0.94), transparent 46%),
    linear-gradient(180deg, var(--canvas-2), var(--canvas) 58%, #010203);
  color: var(--text-main);
  display: grid;
  place-items: center;
  padding: 18px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, transparent, black 22%, black 76%, transparent);
}

button,
input,
textarea {
  font: inherit;
  color: var(--text-main);
}

button {
  border: 1px solid var(--divider);
  background: var(--panel-strong);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 10px;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease, color 140ms ease;
}

button:hover {
  background: var(--hover);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button[aria-busy="true"] {
  cursor: wait;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--divider);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 9px 10px;
}

input {
  min-height: 42px;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.phone-frame {
  width: min(430px, 100vw - 24px);
  height: min(932px, 100dvh - 24px);
  min-height: 660px;
  position: relative;
  border-radius: 56px;
  padding: 12px;
  background: linear-gradient(145deg, #2a303c, #090d14 42%, #020305 72%, #2c3341);
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50px;
  pointer-events: none;
}

.phone-button {
  position: absolute;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #293142, #111722);
}

.phone-button-left {
  left: -3px;
  top: 156px;
  height: 88px;
}

.phone-button-right {
  right: -3px;
  top: 222px;
  height: 120px;
}

.phone-screen {
  height: 100%;
  overflow: hidden;
  border-radius: 44px;
  background:
    linear-gradient(180deg, rgba(16, 24, 35, 0.82), transparent 31%),
    linear-gradient(180deg, var(--screen-2), var(--screen) 58%, #030508);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  position: relative;
}

.status-bar {
  height: 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 25px 3px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-main);
  z-index: 2;
}

.dynamic-island {
  width: 108px;
  height: 31px;
  border-radius: 999px;
  background: #010203;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 22px rgba(0, 0, 0, 0.34);
}

.system-icons {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-main);
}

.battery-icon {
  width: 22px;
  height: 11px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.battery-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 5px;
  border-radius: 1px;
  background: currentColor;
}

.battery-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: currentColor;
}

.home-indicator {
  width: 132px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  justify-self: center;
  margin: 7px 0 8px;
}

.app-shell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.app-header {
  min-height: 64px;
  padding: 9px var(--safe-pad) 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-bottom: 1px solid var(--divider);
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  margin: 0;
  min-width: 0;
  text-align: center;
  color: rgba(230, 237, 245, 0.82);
  font-size: 1.02rem;
  line-height: 1;
  font-weight: 680;
  letter-spacing: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border-color: var(--divider);
  background: rgba(12, 18, 27, 0.74);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
}

.icon-btn:hover {
  border-color: var(--divider-strong);
  color: var(--text-main);
}

.icon-btn.subtle {
  color: var(--text-muted);
}

.live-indicator {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(111, 166, 216, 0.18);
  border-radius: 999px;
  background: var(--vega-blue-soft);
  color: var(--vega-blue-quiet);
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.live-indicator.compact {
  min-height: 24px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--vega-blue);
  box-shadow: 0 0 0 3px rgba(111, 166, 216, 0.1), 0 0 10px rgba(111, 166, 216, 0.34);
  flex: 0 0 auto;
}

.live-dot {
  animation: livePulse 2.1s ease-in-out infinite;
}

@keyframes livePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(111, 166, 216, 0.1), 0 0 8px rgba(111, 166, 216, 0.28);
  }

  50% {
    transform: scale(1.16);
    box-shadow: 0 0 0 5px rgba(111, 166, 216, 0.045), 0 0 13px rgba(111, 166, 216, 0.38);
  }
}

.app-pages {
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.app-page {
  display: none;
  height: 100%;
  min-height: 0;
  padding: 12px var(--safe-pad);
  overflow: hidden;
}

.app-page.active {
  display: grid;
}

.signal-page {
  position: relative;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 44%),
    linear-gradient(160deg, rgba(111, 166, 216, 0.04), transparent 52%);
}

.tile-field,
.signal-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tile-field {
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  background-image:
    radial-gradient(circle at 18% 24%, rgba(233, 246, 255, 0.72) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 76% 18%, rgba(200, 224, 244, 0.54) 0 0.7px, transparent 1.5px),
    radial-gradient(circle at 62% 58%, rgba(238, 248, 255, 0.45) 0 0.8px, transparent 1.8px),
    radial-gradient(circle at 28% 82%, rgba(184, 210, 232, 0.48) 0 0.7px, transparent 1.5px);
  background-repeat: no-repeat;
  opacity: 0.62;
  animation: starTwinkle 7.5s ease-in-out infinite;
  will-change: opacity;
}

.tile-field::before,
.tile-field::after {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  background-repeat: no-repeat;
}

.tile-field::before {
  background-image:
    radial-gradient(circle at 14% 68%, rgba(235, 247, 255, 0.55) 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 84% 42%, rgba(206, 226, 244, 0.44) 0 0.75px, transparent 1.7px),
    radial-gradient(circle at 48% 12%, rgba(245, 250, 255, 0.5) 0 0.65px, transparent 1.5px);
  opacity: 0.42;
  transform: translate3d(0, 0, 0);
  animation: starTwinkleSlow 9s ease-in-out infinite;
  will-change: opacity;
}

.tile-field::after {
  background-image:
    radial-gradient(circle at 35% 38%, rgba(235, 247, 255, 0.48) 0 0.65px, transparent 1.45px),
    radial-gradient(circle at 70% 78%, rgba(198, 220, 240, 0.38) 0 0.7px, transparent 1.5px);
  opacity: 0.32;
  transform: translate3d(0, 0, 0);
  animation: starTwinkleFar 11s ease-in-out infinite;
  will-change: opacity;
}

.signal-page::before {
  background: linear-gradient(180deg, transparent 0%, rgba(5, 8, 13, 0.26) 58%, rgba(5, 8, 13, 0.88) 100%);
  z-index: 0;
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.45;
  }

  48% {
    opacity: 0.72;
  }

  56% {
    opacity: 0.34;
  }
}

@keyframes starTwinkleSlow {
  0%,
  100% {
    opacity: 0.28;
  }

  42% {
    opacity: 0.52;
  }

  64% {
    opacity: 0.22;
  }
}

@keyframes starTwinkleFar {
  0%,
  100% {
    opacity: 0.2;
  }

  36% {
    opacity: 0.4;
  }

  70% {
    opacity: 0.16;
  }
}

.verse-system,
.verse-panel {
  position: relative;
  z-index: 1;
}

.verse-system {
  min-height: 0;
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(190px, 1.22fr) minmax(128px, 0.76fr) minmax(108px, 0.62fr);
  gap: 9px;
}

.verse-panel {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  border: 1px solid var(--divider-strong);
  border-radius: 8px;
  padding: 12px;
  overflow: hidden;
}

.wisdom-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(9, 14, 21, 0.9) 54%, rgba(5, 8, 13, 0.92)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 28px rgba(0, 0, 0, 0.24);
}

.wisdom-hero::before {
  content: "\2726";
  position: absolute;
  top: -32px;
  right: -4px;
  width: 184px;
  height: 184px;
  display: grid;
  place-items: center;
  color: rgba(222, 240, 255, 0.17);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9.65rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(166, 210, 230, 0.18));
  opacity: 0.96;
  pointer-events: none;
  text-shadow: 0 0 34px rgba(111, 166, 216, 0.2), 0 0 70px rgba(166, 210, 230, 0.08);
  z-index: 0;
}

.wisdom-hero::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 30px;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(166, 210, 230, 0.12), rgba(111, 166, 216, 0.045) 42%, transparent 70%);
  filter: blur(10px);
  opacity: 0.82;
  pointer-events: none;
  z-index: 0;
}

.wisdom-hero.is-expanded {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.wisdom-hero.is-expanded::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.verse-panel-top,
.wisdom-hero h2,
.wisdom-hero p,
.wisdom-actions,
.verse-source,
.locked-verse h3,
.locked-verse p {
  position: relative;
  z-index: 1;
}

.verse-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.verse-slot-label {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.verse-countdown {
  color: rgba(166, 210, 230, 0.74);
  font-size: 0.66rem;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.verse-clock {
  min-width: 74px;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.verse-multiplier {
  color: rgba(141, 152, 167, 0.7);
  font-size: 0.58rem;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0;
}

.verse-multiplier[data-focus-state="active"] {
  color: rgba(166, 210, 230, 0.78);
}

.verse-multiplier[data-focus-state="boosted"] {
  color: rgba(176, 218, 238, 0.92);
  text-shadow: 0 0 10px rgba(111, 166, 216, 0.18);
}

.wisdom-hero h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 1.08rem;
  line-height: 1.17;
  font-weight: 800;
  letter-spacing: 0;
}

.wisdom-hero p,
.locked-verse p {
  margin: 7px 0 0;
  color: var(--assistant-text);
  font-size: 0.8rem;
  line-height: 1.45;
}

.wisdom-expanded {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
}

.wisdom-expanded[hidden] {
  display: none;
}

.wisdom-expanded p {
  color: var(--vega-cyan);
}

.verse-source {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32em;
  width: fit-content;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.source-link {
  font-family: inherit;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(230, 237, 245, 0.72);
  padding: 0;
  text-align: left;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.source-link:hover {
  background: transparent;
  color: rgba(230, 237, 245, 0.9);
}

.source-link:focus-visible {
  outline: 1px solid rgba(105, 177, 255, 0.42);
  outline-offset: 4px;
}

.source-line-button span:first-child {
  color: rgba(141, 152, 167, 0.86);
}

.source-line-button span:last-child {
  color: rgba(230, 237, 245, 0.74);
  font-weight: 650;
}

.essay-fullscreen {
  position: absolute;
  inset: 12px var(--safe-pad);
  z-index: 4;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--divider-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 18, 27, 0.97), rgba(4, 7, 11, 0.98)),
    var(--panel);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.essay-fullscreen[hidden] {
  display: none;
}

.essay-fullscreen-head {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(170, 185, 204, 0.13);
  padding: 12px;
}

.essay-fullscreen-head p,
.essay-fullscreen-head h2 {
  margin: 0;
}

.essay-fullscreen-head p {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 780;
  line-height: 1.1;
  text-transform: uppercase;
}

.essay-fullscreen-head h2 {
  margin-top: 4px;
  color: rgba(241, 244, 248, 0.92);
  font-size: 1rem;
  font-weight: 720;
  line-height: 1.18;
  letter-spacing: 0;
}

.essay-fullscreen-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 14px 18px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.essay-fullscreen-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.essay-fullscreen-body {
  color: rgba(228, 234, 242, 0.82);
  font-size: 0.9rem;
  line-height: 1.68;
}

.essay-question-link {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  border-color: rgba(111, 166, 216, 0.2);
  background: rgba(111, 166, 216, 0.11);
  color: rgba(230, 237, 245, 0.84);
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.2;
}

.essay-question-link:hover {
  background: rgba(111, 166, 216, 0.17);
}

.locked-verse {
  border-color: rgba(170, 185, 204, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(9, 14, 21, 0.76)),
    rgba(8, 12, 18, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.locked-verse h3 {
  margin: 0;
  color: rgba(230, 237, 245, 0.72);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
}

.locked-verse p {
  color: var(--text-muted);
}

.locked-verse .verse-source,
.beyond-verse .verse-source {
  margin-top: 2px;
}

.beyond-verse {
  opacity: 0.68;
}

.beyond-verse .verse-countdown,
.beyond-verse .verse-multiplier {
  color: rgba(166, 210, 230, 0.56);
}

.wisdom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 13px;
}

.wisdom-actions button {
  min-height: 40px;
  font-size: 0.74rem;
  font-weight: 800;
}

.auth-status {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.account-status {
  min-height: 0;
  text-align: center;
}

.account-status:empty {
  display: none;
}

.vega-page {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.thread-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.thread-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.thread-action,
.archive-card-actions button {
  min-height: 36px;
  border-radius: 999px;
  border-color: rgba(170, 185, 204, 0.12);
  background: rgba(255, 255, 255, 0.028);
  color: rgba(176, 187, 202, 0.78);
  padding: 6px 9px;
  font-size: 0.66rem;
  font-weight: 780;
  line-height: 1;
}

.thread-action:not(:disabled):hover,
.archive-card-actions button:not(:disabled):hover {
  border-color: rgba(166, 210, 230, 0.2);
  background: rgba(166, 210, 230, 0.07);
  color: rgba(230, 237, 245, 0.9);
}

.thread-action:disabled,
.archive-card-actions button:disabled {
  opacity: 0.36;
}

.topbar h2,
.page-head h2 {
  margin: 0;
  color: #edf2f7;
  font-size: 1.08rem;
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: 0;
}

.vega-page .topbar h2 {
  color: rgba(230, 237, 245, 0.76);
  font-size: 0.98rem;
  font-weight: 640;
  line-height: 1.16;
}

.vega-page .thread-meta {
  max-width: 28ch;
  color: rgba(141, 152, 167, 0.82);
}

.thread-meta,
.page-kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.2;
}

.messages {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 2px 1px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.messages::-webkit-scrollbar,
.thread-list::-webkit-scrollbar,
.wisdom-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.msg {
  max-width: 86%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.42;
  letter-spacing: 0;
}

.msg pre,
.msg code,
.msg a {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg.user {
  justify-self: end;
  color: var(--user-text);
  background: linear-gradient(180deg, var(--user-bg), var(--user-bg-end));
  border: 1px solid var(--divider-strong);
  border-radius: 18px 18px 7px 18px;
  padding: 9px 11px;
  font-size: 0.9rem;
}

.msg.assistant {
  justify-self: start;
  color: var(--assistant-text);
  background: rgba(17, 25, 35, 0.94);
  border: 1px solid var(--divider);
  border-radius: 18px 18px 18px 7px;
  padding: 9px 11px;
  font-size: 0.9rem;
}

.msg.is-loading {
  color: rgba(176, 187, 202, 0.74);
  background: rgba(17, 25, 35, 0.64);
  border-color: rgba(170, 185, 204, 0.11);
  font-size: 0.82rem;
}

.msg.assistant .assistant-paragraph {
  margin: 0 0 8px;
}

.msg.assistant .assistant-paragraph:last-of-type {
  margin-bottom: 0;
}

.meta {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.66rem;
  line-height: 1.3;
}

.message-tools,
.feedback-controls {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.message-tool,
.feedback-btn {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.66rem;
}

.message-tool {
  border-color: rgba(170, 185, 204, 0.11);
  background: rgba(255, 255, 255, 0.026);
  color: rgba(165, 177, 191, 0.74);
  font-weight: 720;
}

.message-tool:not(:disabled):hover {
  border-color: rgba(166, 210, 230, 0.2);
  background: rgba(166, 210, 230, 0.07);
  color: rgba(230, 237, 245, 0.88);
}

.message-tool.is-saved {
  border-color: rgba(166, 210, 230, 0.18);
  background: rgba(166, 210, 230, 0.055);
  color: rgba(197, 215, 228, 0.76);
}

.message-tool.is-error {
  border-color: rgba(183, 76, 89, 0.28);
  background: rgba(183, 76, 89, 0.09);
  color: rgba(238, 190, 197, 0.84);
}

.feedback-btn.active {
  border-color: rgba(149, 201, 174, 0.38);
  background: rgba(149, 201, 174, 0.12);
  color: var(--vega-green);
}

.composer {
  padding-bottom: 2px;
}

.composer-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: end;
  gap: 7px;
  border: 1px solid var(--divider-strong);
  border-radius: 28px;
  background: rgba(9, 14, 21, 0.94);
  padding: 7px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}

.message-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

textarea {
  min-height: 36px;
  max-height: 116px;
  resize: none;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--text-main);
  padding: 8px 7px 6px 10px;
  line-height: 1.35;
}

textarea::placeholder {
  color: var(--text-quiet);
}

textarea:focus {
  outline: none;
}

.send-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(111, 166, 216, 0.2);
  background: rgba(111, 166, 216, 0.22);
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.send-button:not(:disabled):hover {
  background: rgba(111, 166, 216, 0.3);
}

.recents-page {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ghost-action {
  min-height: 32px;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.74rem;
  font-weight: 800;
}

.archive-head {
  align-items: flex-start;
}

.archive-subtitle {
  max-width: 30ch;
  margin: 5px 0 0;
  color: rgba(158, 169, 184, 0.78);
  font-size: 0.72rem;
  font-weight: 560;
  line-height: 1.32;
}

.archive-refresh {
  flex: 0 0 auto;
  margin-top: 2px;
}

.saved-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid rgba(170, 185, 204, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.026);
  padding: 4px;
}

.saved-mode-button {
  min-height: 38px;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  color: rgba(158, 169, 184, 0.76);
  padding: 6px 9px;
  font-size: 0.7rem;
  font-weight: 780;
  line-height: 1;
}

.saved-mode-button:hover {
  background: rgba(255, 255, 255, 0.035);
  color: rgba(230, 237, 245, 0.86);
}

.saved-mode-button.active {
  border-color: rgba(166, 210, 230, 0.16);
  background: rgba(166, 210, 230, 0.07);
  color: rgba(230, 237, 245, 0.88);
}

.archive-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.archive-search[hidden],
.thread-list[hidden],
.wisdom-list[hidden] {
  display: none;
}

.archive-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.archive-search input {
  min-height: 44px;
  border-color: rgba(170, 185, 204, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(230, 237, 245, 0.9);
  font-size: 0.78rem;
  font-weight: 620;
}

.archive-search input::placeholder {
  color: rgba(141, 152, 167, 0.72);
}

.archive-search input[aria-busy="true"] {
  border-color: rgba(166, 210, 230, 0.2);
  background: rgba(166, 210, 230, 0.045);
}

.archive-summary {
  color: rgba(160, 171, 185, 0.72);
  font-size: 0.68rem;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.thread-list,
.wisdom-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 1px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.thread-list.is-collapsed {
  display: none;
}

.archive-list {
  padding-bottom: 8px;
}

.archive-group,
.wisdom-group {
  display: grid;
  gap: 8px;
}

.archive-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-inline: 2px;
}

.archive-group-head h3 {
  margin: 0;
  color: rgba(230, 237, 245, 0.74);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.archive-group-head span {
  color: rgba(141, 152, 167, 0.7);
  font-size: 0.66rem;
  font-weight: 720;
}

.archive-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 7px;
  align-items: start;
}

.archive-card-stack {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.archive-card {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: 8px;
  text-align: left;
  border-radius: 8px;
  border-color: rgba(170, 185, 204, 0.14);
  background:
    radial-gradient(circle at 86% 0%, rgba(166, 210, 230, 0.055), transparent 34%),
    rgba(255, 255, 255, 0.028);
  padding: 12px;
}

.archive-card:hover {
  border-color: rgba(170, 185, 204, 0.23);
  background:
    radial-gradient(circle at 86% 0%, rgba(166, 210, 230, 0.075), transparent 34%),
    rgba(255, 255, 255, 0.044);
}

.archive-card.active {
  border-color: rgba(111, 166, 216, 0.34);
  background:
    radial-gradient(circle at 86% 0%, rgba(166, 210, 230, 0.09), transparent 34%),
    rgba(111, 166, 216, 0.065);
}

.archive-card-top,
.archive-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.archive-card-title,
.archive-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-card-title {
  color: rgba(241, 244, 248, 0.92);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.16;
  white-space: nowrap;
}

.archive-type {
  flex: 0 0 auto;
  border: 1px solid rgba(166, 210, 230, 0.12);
  border-radius: 999px;
  background: rgba(166, 210, 230, 0.055);
  color: rgba(196, 207, 220, 0.76);
  padding: 3px 7px;
  font-size: 0.58rem;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.archive-preview {
  color: rgba(179, 190, 204, 0.78);
  font-size: 0.73rem;
  font-weight: 560;
  line-height: 1.32;
  white-space: nowrap;
}

.archive-meta {
  justify-content: flex-start;
  color: rgba(141, 152, 167, 0.72);
  font-size: 0.64rem;
  font-weight: 720;
  line-height: 1.1;
}

.archive-meta span + span::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 7px 1px;
  border-radius: 999px;
  background: rgba(141, 152, 167, 0.48);
}

.archive-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.archive-themes span {
  border: 1px solid rgba(170, 185, 204, 0.11);
  border-radius: 999px;
  color: rgba(166, 178, 192, 0.76);
  padding: 3px 6px;
  font-size: 0.58rem;
  font-weight: 760;
  line-height: 1;
}

.archive-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 2px;
}

.archive-pin {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(170, 185, 204, 0.12);
  background: rgba(255, 255, 255, 0.026);
  color: rgba(170, 185, 204, 0.7);
  font-size: 0.86rem;
  line-height: 1;
}

.archive-card-row.is-pinned .archive-pin {
  border-color: rgba(166, 210, 230, 0.24);
  background: rgba(111, 166, 216, 0.08);
  color: rgba(213, 232, 244, 0.88);
}

.archive-pin:hover {
  background: rgba(255, 255, 255, 0.055);
  color: rgba(230, 237, 245, 0.88);
}

.wisdom-list {
  padding-bottom: 4px;
}

.wisdom-card {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(170, 185, 204, 0.13);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 0%, rgba(166, 210, 230, 0.05), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(7, 11, 17, 0.72));
  padding: 13px 13px 11px;
}

.wisdom-card.is-favorite {
  border-color: rgba(166, 210, 230, 0.28);
  box-shadow: inset 2px 0 0 rgba(166, 210, 230, 0.38);
}

.wisdom-card-top,
.wisdom-card-meta,
.wisdom-card-actions,
.wisdom-themes {
  display: flex;
  align-items: center;
  gap: 7px;
}

.wisdom-card-top {
  justify-content: space-between;
}

.wisdom-source-button {
  min-width: 0;
  max-width: 72%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(176, 187, 202, 0.84);
  padding: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 760;
  line-height: 1.2;
}

.wisdom-source-button:hover {
  background: transparent;
  color: rgba(230, 237, 245, 0.88);
}

.wisdom-favorite-label {
  flex: 0 0 auto;
  border: 1px solid rgba(166, 210, 230, 0.17);
  border-radius: 999px;
  color: rgba(197, 215, 228, 0.76);
  padding: 3px 7px;
  font-size: 0.58rem;
  font-weight: 820;
  line-height: 1;
}

.wisdom-quote {
  margin: 0;
  color: rgba(238, 243, 248, 0.9);
  font-size: 0.9rem;
  font-weight: 620;
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}

.wisdom-card-meta {
  flex-wrap: wrap;
  color: rgba(141, 152, 167, 0.72);
  font-size: 0.64rem;
  font-weight: 720;
  line-height: 1.1;
}

.wisdom-card-meta span + span::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 7px 1px;
  border-radius: 999px;
  background: rgba(141, 152, 167, 0.48);
}

.wisdom-themes {
  flex-wrap: wrap;
}

.wisdom-themes span {
  border: 1px solid rgba(170, 185, 204, 0.11);
  border-radius: 999px;
  color: rgba(166, 178, 192, 0.76);
  padding: 3px 6px;
  font-size: 0.58rem;
  font-weight: 760;
  line-height: 1;
}

.wisdom-card-actions {
  flex-wrap: wrap;
  padding-top: 2px;
}

.wisdom-card-actions button {
  min-height: 36px;
  border-radius: 999px;
  border-color: rgba(170, 185, 204, 0.11);
  background: rgba(255, 255, 255, 0.026);
  color: rgba(165, 177, 191, 0.78);
  padding: 6px 8px;
  font-size: 0.64rem;
  font-weight: 760;
  line-height: 1;
}

.wisdom-card-actions button:hover {
  border-color: rgba(166, 210, 230, 0.2);
  background: rgba(166, 210, 230, 0.065);
  color: rgba(230, 237, 245, 0.88);
}

.account-page {
  min-height: 0;
  overflow: hidden;
}

.account-dock {
  position: relative;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 32%, rgba(166, 210, 230, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(10, 15, 23, 0.76), rgba(5, 8, 13, 0.92)),
    rgba(10, 15, 23, 0.82);
  padding: 18px;
  overflow: hidden;
}

.vega-star-story,
.account-panel {
  position: relative;
  z-index: 1;
}

.vega-star-story {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 5px 4px 2px;
  scrollbar-width: none;
}

.vega-star-story::-webkit-scrollbar {
  display: none;
}

.vega-star-story h2,
.vega-star-story h3,
.vega-star-story p {
  margin: 0;
}

.vega-star-story h2 {
  color: rgba(241, 244, 248, 0.9);
  font-size: 2.05rem;
  font-weight: 820;
  line-height: 0.96;
}

.star-lead {
  max-width: min(34ch, 100%);
  color: rgba(205, 214, 225, 0.84);
  font-size: 1rem;
  font-weight: 610;
  line-height: 1.28;
}

.companion-story {
  max-width: min(35ch, 100%);
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(170, 185, 204, 0.12);
  display: grid;
  gap: 6px;
}

.companion-story h3 {
  max-width: 22ch;
  color: rgba(241, 244, 248, 0.88);
  font-size: 1.06rem;
  font-weight: 760;
  line-height: 1.12;
}

.companion-story p:not(.page-kicker) {
  color: rgba(196, 207, 220, 0.78);
  font-size: 0.82rem;
  line-height: 1.32;
}

.purpose-rail {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
}

.purpose-rail p {
  display: grid;
  gap: 5px;
  align-content: start;
  border-top: 1px solid rgba(170, 185, 204, 0.12);
  padding-top: 8px;
  min-height: 68px;
}

.purpose-rail span:first-child {
  color: rgba(230, 237, 245, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
}

.purpose-rail span:last-child {
  color: rgba(165, 177, 191, 0.8);
  font-size: 0.7rem;
  font-weight: 590;
  line-height: 1.2;
}

.star-chart {
  position: absolute;
  inset: -4% -2% -2%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.76;
  animation: chartShimmer 7.5s ease-in-out infinite;
}

.star-chart::before {
  content: "";
  position: absolute;
  inset: 2% 0 6%;
  background-image:
    radial-gradient(circle at 18% 20%, rgba(230, 237, 245, 0.34) 0 0.6px, transparent 1.3px),
    radial-gradient(circle at 82% 22%, rgba(230, 237, 245, 0.28) 0 0.55px, transparent 1.2px),
    radial-gradient(circle at 68% 58%, rgba(230, 237, 245, 0.25) 0 0.55px, transparent 1.2px),
    radial-gradient(circle at 30% 72%, rgba(230, 237, 245, 0.22) 0 0.5px, transparent 1.1px),
    radial-gradient(circle at 54% 38%, rgba(230, 237, 245, 0.18) 0 0.5px, transparent 1.1px);
}

.chart-star,
.chart-line,
.chart-label {
  position: absolute;
  display: block;
}

.chart-star {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(230, 237, 245, 0.68);
  box-shadow: 0 0 10px rgba(166, 210, 230, 0.28);
}

.chart-star-vega {
  top: 34%;
  left: 64%;
  width: 8px;
  height: 8px;
  background: rgba(238, 248, 255, 0.92);
  box-shadow: 0 0 16px rgba(166, 210, 230, 0.42), 0 0 42px rgba(111, 166, 216, 0.12);
}

.chart-star-deneb {
  top: 58%;
  left: 24%;
}

.chart-star-altair {
  top: 77%;
  left: 74%;
}

.chart-line {
  height: 1px;
  width: 130px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(166, 210, 230, 0.22), rgba(166, 210, 230, 0.03));
}

.chart-line-a {
  top: 36%;
  left: 64%;
  transform: rotate(145deg);
}

.chart-line-b {
  top: 38%;
  left: 65%;
  width: 152px;
  transform: rotate(64deg);
}

.chart-line-c {
  top: 60%;
  left: 25%;
  width: 160px;
  transform: rotate(31deg);
}

.chart-label {
  top: calc(34% + 11px);
  left: calc(64% + 11px);
  color: rgba(230, 237, 245, 0.52);
  font-size: 0.62rem;
  font-weight: 740;
  line-height: 1;
}

@keyframes chartShimmer {
  0%,
  100% {
    opacity: 0.56;
  }

  50% {
    opacity: 0.78;
  }
}

.account-panel {
  align-self: end;
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(170, 185, 204, 0.12);
}

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-title {
  min-width: 0;
  color: rgba(230, 237, 245, 0.84);
  font-size: 0.86rem;
  font-weight: 740;
  line-height: 1.1;
}

.account-session-state {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(170, 185, 204, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.028);
  color: rgba(158, 169, 184, 0.78);
  padding: 5px 9px;
  font-size: 0.66rem;
  font-weight: 760;
  line-height: 1;
}

.account-session-state[data-state="signed-in"] {
  color: rgba(230, 237, 245, 0.82);
}

.account-session-state[data-state="attention"],
.account-session-state[data-state="offline"] {
  color: rgba(210, 181, 121, 0.84);
}

.controls {
  display: grid;
  gap: 8px;
}

.auth-signin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.auth-actions {
  grid-column: 1 / -1;
}

.controls label {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.controls input {
  min-height: 42px;
  padding-block: 7px;
}

.auth-actions,
.auth-session-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-actions button,
.auth-session-actions button {
  min-height: 44px;
}

button.primary {
  border-color: rgba(111, 166, 216, 0.28);
  background: rgba(111, 166, 216, 0.16);
  color: var(--text-main);
}

button.primary:hover {
  background: rgba(111, 166, 216, 0.22);
}

button.secondary {
  background: rgba(255, 255, 255, 0.04);
}

button.danger {
  border-color: transparent;
  background: var(--danger);
  color: #ffffff;
}

button.danger:hover {
  background: var(--danger-strong);
}

.account-dock.signed-in .auth-signin-fields {
  display: none;
}

.account-dock:not(.signed-in) .auth-session-actions {
  display: none;
}

.bottom-nav {
  min-height: 70px;
  padding: 8px 10px 9px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--divider);
  background: rgba(6, 10, 16, 0.82);
  backdrop-filter: blur(18px);
}

.nav-item {
  min-width: 0;
  height: 52px;
  padding: 5px 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  gap: 3px;
  font-size: 0.66rem;
  line-height: 1;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}

.nav-item[data-nav="signal"] .nav-icon {
  font-size: 1.08rem;
}

.nav-item.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--divider);
}

.nav-item.active .nav-icon {
  color: var(--vega-blue-quiet);
}

.empty {
  justify-self: center;
  margin: 0;
  max-width: 88%;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
  color: var(--text-muted);
  padding: 10px 12px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.36;
}

.source-grounding-note {
  justify-self: stretch;
  align-self: start;
  max-width: none;
  margin-top: 4px;
  padding: 14px 15px;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.042), rgba(8, 13, 20, 0.76) 58%),
    rgba(8, 13, 20, 0.72);
  color: rgba(176, 187, 202, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.source-grounding-note h3 {
  margin: 0 0 9px;
  color: rgba(230, 237, 245, 0.8);
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: 0;
}

.source-grounding-note p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.48;
}

.source-grounding-note p + p {
  margin-top: 9px;
  color: rgba(141, 152, 167, 0.78);
}

.ai-consent-manage {
  min-height: 44px;
  width: 100%;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--divider);
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
}

.ai-consent-manage span:last-child {
  color: var(--vega-blue-quiet);
}

.consent-dialog {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
  background: rgba(0, 3, 8, 0.72);
  backdrop-filter: blur(12px);
}

.consent-dialog[hidden] {
  display: none;
}

.consent-panel {
  width: 100%;
  padding: 20px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  background: #0a1018;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48);
}

.consent-panel h2 {
  margin: 7px 0 10px;
  color: var(--text-main);
  font-size: 1.08rem;
  font-weight: 680;
  letter-spacing: 0;
}

.consent-panel > p:not(.page-kicker) {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.52;
}

.consent-panel > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--vega-blue-quiet);
  font-size: 0.76rem;
  text-decoration: none;
}

.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.consent-actions button {
  min-height: 44px;
}

@media (max-height: 780px) {
  .phone-frame {
    min-height: 0;
  }

  .app-header {
    min-height: 58px;
    padding-block: 7px;
  }

  .verse-system {
    grid-template-rows: minmax(168px, 1.16fr) minmax(112px, 0.7fr) minmax(94px, 0.56fr);
    gap: 8px;
  }

  .verse-panel {
    padding: 10px;
  }

  .wisdom-hero p {
    font-size: 0.78rem;
  }

  .account-dock {
    gap: 10px;
    padding: 13px;
  }

  .vega-star-story {
    gap: 6px;
    padding-top: 2px;
  }

  .vega-star-story h2 {
    font-size: 1.82rem;
  }

  .star-lead {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .companion-story {
    margin-top: 4px;
    padding-top: 8px;
    gap: 5px;
  }

  .companion-story h3 {
    max-width: none;
    font-size: 0.95rem;
    line-height: 1.08;
  }

  .companion-story p:not(.page-kicker) {
    font-size: 0.75rem;
    line-height: 1.24;
  }

  .purpose-rail {
    gap: 6px;
    padding-top: 6px;
  }

  .purpose-rail p {
    min-height: 52px;
    padding-top: 6px;
  }

  .purpose-rail span:first-child,
  .purpose-rail span:last-child {
    font-size: 0.62rem;
  }

  .purpose-rail span:last-child {
    line-height: 1.14;
  }

  .account-panel {
    gap: 6px;
    padding-top: 8px;
  }

  .controls {
    gap: 6px;
  }

  .bottom-nav {
    min-height: 64px;
  }

  .nav-item {
    height: 46px;
  }
}

@media (max-width: 520px), (max-height: 700px) {
  body {
    padding: 0;
  }

  body::before,
  .phone-frame::before,
  .phone-button {
    display: none;
  }

  .phone-frame {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
    padding: 0;
    background: var(--screen);
    box-shadow: none;
  }

  .phone-screen {
    border-radius: 0;
    border: 0;
  }

  .status-bar {
    padding-inline: 18px;
  }

  .dynamic-island {
    width: 96px;
  }

  .verse-system {
    grid-template-rows: minmax(174px, 1.2fr) minmax(116px, 0.72fr) minmax(98px, 0.58fr);
  }

  .msg {
    max-width: 90%;
  }
}

@media (max-width: 374px) {
  :root {
    --safe-pad: 11px;
  }

  .live-indicator:not(.compact) span:last-child {
    display: none;
  }

  .verse-system {
    gap: 7px;
  }

  .wisdom-hero h2 {
    font-size: 1rem;
  }

  .wisdom-actions {
    flex-wrap: wrap;
  }

  .auth-actions,
  .auth-session-actions {
    grid-template-columns: 1fr;
  }

  .auth-signin-fields {
    grid-template-columns: 1fr;
  }
}
