:root {
  color-scheme: dark;
  --bg: #0b1014;
  --bg-soft: #10161d;
  --panel: #0f151b;
  --panel-raised: #1d252e;
  --panel-muted: #29313b;
  --side: #151d25;
  --line: #2d3742;
  --line-bright: #15d99d;
  --text: #f3f7f4;
  --muted: #9faab0;
  --faint: #74808a;
  --accent: #83ff22;
  --accent-2: #12f4c2;
  --danger: #ff4b56;
  --danger-line: rgba(201, 109, 104, 0.72);
  --danger-ring: rgba(201, 109, 104, 0.10);
  --shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.26);
  --radius: 6px;
  --font-sans: "PingFang SC", "Noto Sans SC", Inter, "Microsoft YaHei", sans-serif;
  --font: var(--font-sans);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-width: 1024px;
  background: #070b0f;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}

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

button {
  border: 0;
}

.app {
  min-height: 100vh;
}

.compliance-footer {
  position: fixed;
  left: 50%;
  bottom: 8px;
  z-index: 60;
  transform: translateX(-50%);
  max-width: min(640px, calc(100vw - 32px));
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(10, 14, 18, 0.58);
  color: rgba(224, 230, 226, 0.66);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

.compliance-footer a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.compliance-footer a:hover {
  color: rgba(244, 248, 245, 0.9);
  text-decoration: underline;
}

.screen {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(22, 244, 194, 0.065), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(131, 255, 34, 0.045), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 28%),
    var(--bg);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.logo-button {
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.welcome-screen {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 56px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 8, 12, 0.03), rgba(3, 8, 12, 0.2) 42%, rgba(3, 8, 12, 0.56) 100%),
    url("./assets/welcome-neural-bg.png") center / cover no-repeat,
    #070b0f;
}

.welcome-screen::before,
.welcome-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.welcome-screen::before {
  background:
    radial-gradient(circle at 50% 48%, rgba(1, 7, 10, 0.02), rgba(1, 7, 10, 0.44) 34%, rgba(1, 7, 10, 0.76) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.38));
}

.welcome-screen::after {
  background:
    radial-gradient(circle at 50% 45%, rgba(20, 244, 194, 0.062), transparent 13%),
    radial-gradient(circle at 49% 54%, rgba(140, 255, 49, 0.035), transparent 18%);
  opacity: 0.68;
}

.welcome-card {
  width: 100%;
  min-height: calc(100vh - 112px);
  position: relative;
  display: grid;
  place-items: center;
  z-index: 1;
}

.welcome-content {
  position: relative;
  z-index: 1;
  width: min(560px, 70vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(-8px);
}

.welcome-logo {
  position: relative;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin-bottom: 27px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.welcome-logo::after {
  display: none;
}

.welcome-logo-mark {
  position: relative;
  z-index: 1;
  width: 66px;
  height: 66px;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  opacity: 1;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.24));
}

h1,
h2,
h3,
p {
  margin: 0;
}

.welcome-wordmark {
  display: block;
  width: 259px;
  max-width: min(259px, 72vw);
  height: auto;
  filter:
    brightness(1.04)
    contrast(1.02)
    drop-shadow(0 10px 26px rgba(0, 0, 0, 0.24));
}

.welcome-copy {
  margin-top: 18px;
  color: rgba(184, 194, 191, 0.76);
  font-size: 16px;
  font-weight: 440;
  line-height: 1.45;
  text-shadow: none;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  height: 38px;
  border-radius: var(--radius);
  padding: 0 22px;
  color: #07120f;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px rgba(18, 244, 194, 0.08);
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(18, 244, 194, 0.13);
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.35);
}

.primary-btn.welcome-start-btn {
  width: min(244px, 46vw);
  height: 43px;
  margin-top: 33px;
  border: 1px solid rgba(18, 244, 194, 0.34);
  border-radius: 6px;
  color: rgba(234, 255, 248, 0.92);
  font-size: 15px;
  font-weight: 640;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(131, 255, 34, 0.18), rgba(18, 244, 194, 0.28)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(8, 18, 16, 0.78);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    0 0 22px rgba(18, 244, 194, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.primary-btn.welcome-start-btn:hover {
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.24),
    0 0 26px rgba(18, 244, 194, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.secondary-btn {
  color: var(--text);
  background: #242b34;
  box-shadow: inset 0 0 0 1px var(--line);
}

.ghost-btn {
  color: var(--muted);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.plain-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  position: relative;
}

.plain-icon:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.plain-icon.active {
  color: var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.52);
  background: rgba(18, 244, 194, 0.08);
}

.plain-icon.danger {
  color: var(--danger);
}

.icon {
  width: 18px;
  height: 18px;
  display: block;
}

.flow-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background:
    radial-gradient(circle at 13% 9%, rgba(18, 244, 194, 0.075), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(131, 255, 34, 0.052), transparent 26%),
    linear-gradient(180deg, #0b1014, #090e12 62%, #080c10);
}

.flow-logo {
  position: absolute;
  top: 28px;
  left: 34px;
}

.auth-card,
.dna-card {
  width: min(860px, 72vw);
  min-height: 480px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.018), transparent 38%),
    linear-gradient(180deg, rgba(17, 23, 30, 0.98), rgba(12, 17, 22, 0.985));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: var(--radius);
  position: relative;
}

.auth-card > form,
.dna-card > form,
.transition-content {
  position: relative;
  z-index: 1;
}

.onboarding-card {
  overflow: hidden;
}

.onboarding-card::before,
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 36%),
    radial-gradient(circle at 50% 55%, rgba(18, 244, 194, 0.018), transparent 32%);
}

.onboarding-card .primary-btn {
  background: linear-gradient(90deg, #78dc54, #25d4ae);
  color: #07120f;
}

.first-entry-step {
  position: absolute;
  top: 38px;
  right: 44px;
  color: #7e8790;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.form-stack.first-entry-form {
  position: relative;
  z-index: 1;
  width: min(430px, 46vw);
  gap: 0;
}

.form-title.first-entry-title {
  margin-bottom: 31px;
  line-height: 1.45;
}

.input.first-entry-line-input {
  height: 40px;
  padding: 0 2px;
  border-width: 0 0 1px;
  border-radius: 0;
  appearance: none;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none;
  caret-color: var(--text);
  color: #f1f7f4;
}

.input.first-entry-line-input:focus {
  border-color: #39d4ad;
  box-shadow: 0 1px 0 rgba(57, 212, 173, 0.2);
  background: transparent !important;
  background-color: transparent !important;
}

.input.first-entry-line-input:-webkit-autofill,
.input.first-entry-line-input:-webkit-autofill:hover,
.input.first-entry-line-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 999999s ease-out;
  box-shadow: 0 1px 0 rgba(57, 212, 173, 0.2), 0 0 0 1000px var(--panel) inset;
}

.first-entry-form:not(.first-thought-form) .primary-btn {
  margin-top: 25px;
}

.first-entry-skip {
  align-self: center;
  margin-top: 2px;
  padding: 4px 10px;
  background: transparent;
  color: #7f8991;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.16s ease, opacity 0.16s ease;
}

.first-entry-skip:hover {
  color: #b2bcc3;
}

.form-stack.first-thought-form {
  width: min(560px, 58vw);
  gap: 0;
  transform: translateY(5px);
}

.first-entry-form:not(.first-thought-form) .first-entry-skip {
  margin-top: 18px;
}

.first-thought-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  text-align: center;
}

.first-thought-copy span {
  color: #98a2aa;
  font-size: 12px;
  font-weight: 700;
}

.first-thought-copy h1 {
  color: var(--text);
  font-size: clamp(15px, 1.05vw, 18px);
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.first-thought-copy p {
  color: #a3adb5;
  font-size: 12px;
  line-height: 1.6;
}

.textarea.first-thought-textarea {
  min-height: 96px;
  background: rgba(9, 14, 18, 0.28);
}

.first-thought-form .primary-btn {
  width: min(420px, 100%);
  align-self: center;
  margin-top: 22px;
}

.first-thought-form .first-entry-skip {
  margin-top: 18px;
}

.first-thought-textarea::placeholder {
  color: #778189;
  font-weight: 500;
}

.transition-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.transition-content {
  width: min(420px, 62vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(-18px);
}

.transition-core {
  width: 36px;
  height: 36px;
  margin-bottom: 28px;
  display: grid;
  place-items: center;
  position: relative;
}

.transition-core::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(131, 255, 34, 0.22), rgba(18, 244, 194, 0) 68%);
  animation: transitionHalo 1.55s ease-in-out infinite;
}

.status-dot.transition-status-mark {
  width: 36px;
  height: 36px;
  position: relative;
  font-size: 25px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(131, 255, 34, 0.2));
  animation: transitionMarkBreathe 1.55s ease-in-out infinite;
}

.transition-copy {
  display: grid;
  gap: 10px;
}

.transition-copy h1 {
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.35;
}

.transition-copy h2 {
  color: #a8b2b8;
  font-size: 19px;
  font-weight: 760;
  line-height: 1.45;
}

@keyframes transitionHalo {
  0%,
  100% {
    transform: scale(0.86);
    opacity: 0.42;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.72;
  }
}

@keyframes transitionMarkBreathe {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.9;
  }

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

.form-stack {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-stack.wide {
  width: 470px;
}

.form-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.form-subtitle {
  margin-top: -4px;
  margin-bottom: 22px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}

.field-row {
  display: flex;
  gap: 8px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(174, 190, 199, 0.16);
  background: rgba(9, 14, 19, 0.56);
  color: var(--text);
  border-radius: 4px;
  outline: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input,
.select {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.textarea {
  min-height: 74px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
  font-size: 12px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 2px rgba(18, 244, 194, 0.12);
}

.auth-card .input:-webkit-autofill,
.auth-card .input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  border-color: rgba(174, 190, 199, 0.16);
  transition: background-color 999999s ease-out, border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 0 0 1000px rgba(9, 14, 19, 0.92) inset;
}

.auth-card .input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  border-color: var(--line-bright);
  transition: background-color 999999s ease-out, border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 0 0 2px rgba(18, 244, 194, 0.12), 0 0 0 1000px rgba(9, 14, 19, 0.92) inset;
}

.input.is-invalid,
.input.is-invalid:focus {
  border-color: var(--danger-line);
  box-shadow: 0 0 0 2px var(--danger-ring);
}

.auth-card .input.is-invalid:-webkit-autofill,
.auth-card .input.is-invalid:-webkit-autofill:hover,
.auth-card .input.is-invalid:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  border-color: var(--danger-line);
  transition: background-color 999999s ease-out, border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 0 0 2px var(--danger-ring), 0 0 0 1000px rgba(9, 14, 19, 0.92) inset;
}

.country-select {
  width: 70px;
  flex: 0 0 70px;
}

.code-btn {
  flex: 0 0 92px;
  width: 92px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background: linear-gradient(180deg, rgba(45, 53, 64, 0.96), rgba(36, 43, 52, 0.96));
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.invite-code-input {
  width: 100%;
  text-transform: uppercase;
}

.auth-inline-warning {
  min-height: 24px;
  margin-top: -8px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 83, 83, 0.42);
  border-radius: 4px;
  background: rgba(83, 35, 38, 0.24);
  color: #cfaeaa;
  font-size: 11px;
  line-height: 1.28;
  font-weight: 600;
}

.auth-inline-warning-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(201, 109, 104, 0.64);
  border-radius: 50%;
  color: #c96d68;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
}

.agreement {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: flex-start;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.6;
}

.check {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #11171e;
  cursor: pointer;
  position: relative;
}

.check:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check:checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: solid #07120f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.link {
  color: var(--text);
  text-decoration: none;
}

.link:hover {
  color: var(--accent-2);
}

.dna-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dna-main-panel {
  width: min(720px, calc(100% - 48px));
  min-height: 100%;
  margin: 0 auto;
  padding: 56px 0 72px;
  display: grid;
  align-content: start;
  justify-items: center;
}

.dna-main-panel .form-stack {
  width: min(520px, 100%);
}

.dna-main-panel .form-title,
.dna-main-panel .form-subtitle {
  text-align: left;
}

.section-label {
  grid-column: 1 / -1;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  margin-top: 6px;
}

.dictation-field {
  position: relative;
  grid-column: 1 / -1;
}

.dictation-field .input {
  padding-right: 40px;
}

.field-mic {
  position: absolute;
  right: 4px;
  top: 0;
  width: 34px;
  height: 34px;
  color: var(--muted);
}

.checkbox-line {
  display: flex;
  gap: 18px;
  grid-column: 1 / -1;
  margin-top: 2px;
}

.small-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-note {
  grid-column: 1 / -1;
  margin-top: 18px;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
  line-height: 1.7;
}

.voice-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #171a1f;
}

.voice-source-stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #171a1f;
}

.voice-source-artboard {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  visibility: hidden;
  z-index: 0;
  border: 0;
  pointer-events: none;
  user-select: none;
}

.voice-source-artboard.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.voice-hotspots-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.voice-hotspot {
  position: absolute;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.voice-hotspot:focus-visible {
  outline: 0;
}

.voice-hotspot-subtitles,
.voice-hotspot-end {
  border-radius: 8px;
}

.shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
  background: var(--bg);
  overflow: hidden;
  overscroll-behavior: none;
}

.shell.has-dialogue-rail {
  grid-template-columns: 210px minmax(0, 1fr);
}

.shell.has-dialogue-rail.rail-open {
  grid-template-columns: 210px minmax(0, 1fr);
}

.sidebar {
  background:
    radial-gradient(circle at 18% 7%, rgba(18, 244, 194, 0.05), transparent 30%),
    linear-gradient(180deg, rgba(38, 47, 56, 0.96), rgba(23, 31, 39, 0.98));
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.035), 18px 0 44px rgba(0, 0, 0, 0.14);
}

.sidebar .brand-mark {
  width: 100%;
  min-height: 34px;
  padding: 0 4px;
  font-size: 12px;
  justify-content: flex-start;
  letter-spacing: 0;
}

.side-primary {
  display: grid;
}

.side-start-btn,
.side-btn {
  min-width: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.side-start-btn {
  height: 38px;
  justify-content: flex-start;
  padding: 0 11px;
  border: 1px solid rgba(18, 244, 194, 0.18);
  background:
    linear-gradient(180deg, rgba(18, 244, 194, 0.105), rgba(18, 244, 194, 0.045)),
    rgba(18, 244, 194, 0.06);
  color: #effff9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 8px 18px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.side-btn {
  height: 32px;
  justify-content: flex-start;
  padding: 0 10px;
  background: transparent;
  color: #d8dedb;
  font-size: 11px;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.side-start-btn:hover,
.side-btn:hover {
  color: #f3fff8;
  background: rgba(255, 255, 255, 0.035);
}

.side-start-btn span,
.side-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-start-btn.active,
.side-btn.active {
  color: var(--accent);
  background:
    linear-gradient(90deg, rgba(18, 244, 194, 0.13), rgba(18, 244, 194, 0.055)),
    rgba(18, 244, 194, 0.045);
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.62);
}

.sidebar-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 2px;
}

.sidebar-panel-head {
  display: grid;
  gap: 4px;
  padding: 0 2px;
}

.sidebar-panel-head strong {
  color: #eef5f2;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-panel-head span {
  color: #89948f;
  font-size: 10px;
  line-height: 1.45;
}

.sidebar-panel-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-panel-list.is-scrollable {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.sidebar-panel:hover .sidebar-panel-list.is-scrollable,
.sidebar-panel:focus-within .sidebar-panel-list.is-scrollable {
  scrollbar-color: rgba(255, 255, 255, 0.34) rgba(255, 255, 255, 0.04);
}

.sidebar-panel-list.is-scrollable::-webkit-scrollbar {
  width: 8px;
}

.sidebar-panel-list.is-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-panel-list.is-scrollable::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: transparent;
}

.sidebar-panel:hover .sidebar-panel-list.is-scrollable::-webkit-scrollbar-track,
.sidebar-panel:focus-within .sidebar-panel-list.is-scrollable::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-panel:hover .sidebar-panel-list.is-scrollable::-webkit-scrollbar-thumb,
.sidebar-panel:focus-within .sidebar-panel-list.is-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.34);
}

.module-item,
.sidebar-empty {
  min-height: 42px;
  border-radius: 3px;
  padding: 8px 9px;
  color: #ccd2d0;
  background: rgba(255, 255, 255, 0.026);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  font-size: 11px;
  line-height: 1.35;
  position: relative;
}

.module-item {
  display: grid;
  gap: 3px;
  cursor: pointer;
}

.module-item strong {
  color: #eef4f1;
  font-size: 11px;
  font-weight: 700;
  padding-right: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-item span {
  color: #aeb9b5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.trace-graph-shell {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 5px;
  background: rgba(12, 30, 27, 0.72);
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.22);
}

.trace-graph-head {
  display: grid;
  gap: 3px;
}

.trace-graph-head strong {
  color: #f0fff9;
  font-size: 12px;
  font-weight: 800;
}

.trace-graph-head span,
.trace-graph-foot span {
  color: #91a59d;
  font-size: 10px;
  line-height: 1.45;
}

.trace-graph-map {
  display: grid;
  gap: 10px;
}

.trace-graph-center {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(18, 244, 194, 0.24), rgba(18, 244, 194, 0.06) 62%, transparent 64%);
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.34);
}

.trace-graph-center span {
  color: #77f6d1;
  font-size: 10px;
  font-weight: 800;
}

.trace-graph-center strong {
  max-width: 86%;
  color: #f4fff9;
  font-size: 12px;
  line-height: 1.35;
}

.trace-graph-branches {
  display: grid;
  gap: 8px;
}

.trace-graph-branch {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
}

.trace-graph-edge {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 50px;
  color: #62e8cb;
  font-size: 9px;
  line-height: 1.25;
  text-align: center;
}

.trace-graph-edge::before {
  content: "";
  position: absolute;
  left: 50%;
  right: -9px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(18, 244, 194, 0.68), rgba(18, 244, 194, 0.08));
  transform: translateY(-50%);
}

.trace-graph-edge span {
  position: relative;
  z-index: 1;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(10, 18, 20, 0.92);
}

.trace-graph-node {
  min-width: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.052);
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.18);
  color: #d9e8e2;
}

.trace-graph-node summary {
  min-height: 50px;
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  cursor: pointer;
  list-style: none;
}

.trace-graph-node summary::-webkit-details-marker {
  display: none;
}

.trace-graph-node summary span {
  color: #72f1ce;
  font-size: 9px;
  font-weight: 800;
}

.trace-graph-node summary strong {
  color: #f0f7f4;
  font-size: 11px;
  line-height: 1.35;
}

.trace-graph-detail {
  display: grid;
  gap: 4px;
  padding: 0 9px 9px;
}

.trace-graph-detail p {
  color: #9fb2aa;
  font-size: 10px;
  line-height: 1.45;
}

.trace-graph-foot {
  display: grid;
  gap: 3px;
  padding-top: 2px;
}

.trace-main-panel {
  width: min(1360px, 100%);
  min-height: calc(100vh - 32px);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px 20px 14px;
}

.trace-main-head {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.trace-main-head h2 {
  color: #f4fff9;
  font-size: 23px;
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: 0;
  margin: 0;
}

.trace-main-head p {
  max-width: none;
  color: #a5afb6;
  font-size: 12px;
  line-height: 1.22;
  font-weight: 520;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.personal-map-canvas-shell {
  display: grid;
  min-height: 0;
}

.personal-map-canvas {
  position: relative;
  min-height: min(800px, calc(100vh - 92px));
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 48%, rgba(45, 126, 215, 0.095), transparent 18%),
    radial-gradient(circle at 22% 42%, rgba(54, 141, 247, 0.075), transparent 20%),
    radial-gradient(circle at 76% 76%, rgba(125, 255, 42, 0.045), transparent 22%),
    radial-gradient(circle at 36% 75%, rgba(18, 244, 194, 0.04), transparent 20%),
    linear-gradient(135deg, rgba(9, 20, 26, 0.83), rgba(5, 10, 14, 0.91));
  border: 1px solid rgba(255, 255, 255, 0.052);
  box-shadow:
    inset 0 0 0 1px rgba(133, 168, 158, 0.075),
    0 24px 86px rgba(0, 0, 0, 0.18);
}

.personal-map-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.24;
  mask-image: radial-gradient(circle at 50% 52%, black, transparent 78%);
}

.personal-map-life-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: translateY(-4px) scale(1.01);
  transform-origin: center center;
}

.personal-map-region {
  fill: rgba(255, 255, 255, 0.014);
  stroke: rgba(178, 201, 218, 0.07);
  stroke-width: 0.9;
  stroke-dasharray: 3 5;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.1));
}

.personal-map-region-blue {
  stroke: rgba(54, 141, 247, 0.145);
  fill: rgba(54, 141, 247, 0.026);
}

.personal-map-region-orange {
  stroke: rgba(245, 154, 79, 0.13);
  fill: rgba(245, 154, 79, 0.024);
}

.personal-map-region-purple {
  stroke: rgba(155, 120, 240, 0.12);
  fill: rgba(155, 120, 240, 0.022);
}

.personal-map-region-teal {
  stroke: rgba(57, 197, 196, 0.13);
  fill: rgba(57, 197, 196, 0.024);
}

.personal-map-region-yellow {
  stroke: rgba(212, 166, 81, 0.115);
  fill: rgba(212, 166, 81, 0.021);
}

.personal-map-region-rose {
  stroke: rgba(217, 120, 141, 0.115);
  fill: rgba(217, 120, 141, 0.021);
}

.personal-map-region-green {
  stroke: rgba(110, 203, 112, 0.12);
  fill: rgba(110, 203, 112, 0.02);
}

.personal-map-region-steel {
  stroke: rgba(120, 143, 161, 0.11);
  fill: rgba(120, 143, 161, 0.017);
}

.personal-map-center-edge {
  fill: none;
  stroke: rgba(178, 202, 218, 0.2);
  stroke-width: 1;
  stroke-dasharray: 6 8;
}

.personal-map-cross-edge {
  fill: none;
  stroke: rgba(178, 202, 218, 0.2);
  stroke-width: 1;
  stroke-dasharray: 6 8;
}

.personal-map-cross-edge-blue {
  stroke: rgba(54, 141, 247, 0.38);
}

.personal-map-cross-edge-orange {
  stroke: rgba(245, 154, 79, 0.28);
}

.personal-map-cross-edge-purple {
  stroke: rgba(155, 120, 240, 0.3);
}

.personal-map-cross-edge-teal {
  stroke: rgba(57, 197, 196, 0.3);
}

.personal-map-cross-edge-yellow {
  stroke: rgba(212, 166, 81, 0.26);
}

.personal-map-cross-edge-rose {
  stroke: rgba(217, 120, 141, 0.26);
}

.personal-map-cross-edge-green {
  stroke: rgba(110, 203, 112, 0.28);
}

.personal-map-cross-edge-steel {
  stroke: rgba(110, 133, 153, 0.26);
}

.personal-map-local-edge {
  stroke-width: 1.12;
  stroke-linecap: round;
  opacity: 0.78;
}

.personal-map-local-edge-blue {
  stroke: rgba(54, 141, 247, 0.64);
}

.personal-map-local-edge-orange {
  stroke: rgba(245, 154, 79, 0.58);
}

.personal-map-local-edge-purple {
  stroke: rgba(155, 120, 240, 0.56);
}

.personal-map-local-edge-teal {
  stroke: rgba(57, 197, 196, 0.58);
}

.personal-map-local-edge-yellow {
  stroke: rgba(212, 166, 81, 0.52);
}

.personal-map-local-edge-rose {
  stroke: rgba(217, 120, 141, 0.52);
}

.personal-map-local-edge-green {
  stroke: rgba(110, 203, 112, 0.52);
}

.personal-map-local-edge-steel {
  stroke: rgba(110, 133, 153, 0.46);
}

.personal-map-cluster-title {
  font-size: 12.8px;
  line-height: 1;
  font-weight: 720;
  letter-spacing: 0;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.72);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.personal-map-cluster-title-blue {
  fill: #368df7;
}

.personal-map-cluster-title-orange {
  fill: #f59a4f;
}

.personal-map-cluster-title-purple {
  fill: #9b78f0;
}

.personal-map-cluster-title-teal {
  fill: #39c5c4;
}

.personal-map-cluster-title-yellow {
  fill: #d4a651;
}

.personal-map-cluster-title-rose {
  fill: #d9788d;
}

.personal-map-cluster-title-green {
  fill: #76d870;
}

.personal-map-cluster-title-steel {
  fill: #9aa7b0;
}

.personal-map-life-node {
  cursor: pointer;
  outline: none;
}

.personal-map-node-hit {
  fill: transparent;
}

.personal-map-dot {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.13));
}

.personal-map-dot-blue {
  fill: #368df7;
}

.personal-map-dot-orange {
  fill: #f59a4f;
}

.personal-map-dot-purple {
  fill: #9b78f0;
}

.personal-map-dot-teal {
  fill: #39c5c4;
}

.personal-map-dot-yellow {
  fill: #d4a651;
}

.personal-map-dot-rose {
  fill: #d9788d;
}

.personal-map-dot-green {
  fill: #6ecb70;
}

.personal-map-dot-steel {
  fill: #6d879d;
}

.personal-map-dot.is-dim {
  opacity: 0.56;
  filter: saturate(0.72) drop-shadow(0 0 7px rgba(255, 255, 255, 0.08));
}

.personal-map-hub-core {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.07));
}

.personal-map-hub-label {
  fill: rgba(6, 14, 18, 0.92);
  font-size: 13px;
  font-weight: 820;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.personal-map-node-label {
  fill: #dce7e8;
  font-size: 9.5px;
  line-height: 1;
  font-weight: 600;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.82);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.personal-map-node-label.is-dim {
  fill: rgba(210, 222, 226, 0.56);
}

.personal-map-sprout-hint {
  fill: rgba(214, 226, 229, 0.46);
  font-size: 8.6px;
  line-height: 1;
  font-weight: 580;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.72);
  stroke-width: 2.5px;
  stroke-linejoin: round;
  pointer-events: none;
}

.personal-map-sprout-hint-orange {
  fill: rgba(245, 154, 79, 0.58);
}

.personal-map-sprout-hint-purple {
  fill: rgba(170, 144, 246, 0.54);
}

.personal-map-sprout-hint-rose {
  fill: rgba(217, 120, 141, 0.52);
}

.personal-map-sprout-hint-green {
  fill: rgba(128, 216, 125, 0.5);
}

.personal-map-center-core {
  fill: url("#personalMapCenterGradient");
  stroke: rgba(114, 184, 255, 0.54);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 26px rgba(54, 141, 247, 0.22));
}

.personal-map-center-ring {
  fill: none;
  stroke: rgba(54, 141, 247, 0.16);
  stroke-width: 13;
}

.personal-map-center-person {
  fill: #f5faf9;
  pointer-events: none;
}

.personal-map-center-label-main {
  fill: #edf5f4;
  font-size: 11.5px;
  font-weight: 730;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.72);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.personal-map-center-label-sub {
  fill: #80b8ff;
  font-size: 10px;
  font-weight: 640;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.72);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.personal-map-life-node.is-selected .personal-map-dot,
.personal-map-life-node.is-selected .personal-map-hub-core,
.personal-map-life-node.is-selected .personal-map-center-core,
.personal-map-life-node:hover .personal-map-dot,
.personal-map-life-node:hover .personal-map-hub-core,
.personal-map-life-node:hover .personal-map-center-core,
.personal-map-life-node:focus-visible .personal-map-dot,
.personal-map-life-node:focus-visible .personal-map-hub-core,
.personal-map-life-node:focus-visible .personal-map-center-core {
  stroke: rgba(125, 255, 42, 0.72);
  stroke-width: 2;
  filter: drop-shadow(0 0 18px rgba(125, 255, 42, 0.24));
}

.personal-map-detail-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
  width: 292px;
  max-height: calc(100% - 36px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  background:
    radial-gradient(circle at 30% 0%, rgba(43, 80, 100, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(14, 24, 31, 0.965), rgba(8, 15, 20, 0.97));
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateX(14px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.personal-map-detail-panel.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.personal-map-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.personal-map-detail-title {
  font-size: 15px;
  font-weight: 760;
}

.personal-map-detail-close {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #aab5bc;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.personal-map-detail-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.personal-map-selected-node {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.personal-map-selected-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #4c91f0, #1f5fa8);
  font-size: 20px;
  font-weight: 800;
}

.personal-map-selected-name {
  color: #f0f7f6;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.25;
}

.personal-map-selected-desc {
  margin-top: 4px;
  color: #9da9b1;
  font-size: 12px;
  font-weight: 520;
}

.personal-map-detail-section {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.personal-map-detail-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.personal-map-section-title {
  color: #edf5f4;
  font-size: 13px;
  font-weight: 760;
}

.personal-map-kv {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 5px 12px;
  color: #9eaab1;
  font-size: 11.5px;
  line-height: 1.45;
}

.personal-map-kv strong {
  color: #dfe8e9;
  font-weight: 650;
}

.personal-map-source-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #aab5bc;
  font-size: 11.5px;
  line-height: 1.4;
}

.personal-map-source-row span:last-child {
  color: #74828c;
  white-space: nowrap;
}

.personal-map-source-link {
  color: #4a99ff;
  font-size: 12px;
  font-weight: 650;
}

.personal-map-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.personal-map-action-btn {
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.026);
  color: #cbd6da;
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
}

.personal-map-action-btn.is-danger {
  grid-column: 1 / -1;
  color: #ff704d;
  border-color: rgba(255, 112, 77, 0.18);
  background: rgba(255, 112, 77, 0.035);
}

.memory-candidate-governance-layer {
  pointer-events: auto;
}

.memory-candidate-node-bubble,
.memory-candidate-node-bubble-tail {
  fill: rgba(11, 24, 27, 0.88);
  stroke: rgba(125, 255, 42, 0.22);
  stroke-width: 0.8;
  filter: drop-shadow(0 0 8px rgba(125, 255, 42, 0.12));
}

.memory-candidate-node-bubble-dot,
.memory-candidate-empty-icon {
  fill: #7dff2a;
  opacity: 0.9;
}

.memory-candidate-node-bubble-pin {
  fill: rgba(222, 246, 234, 0.72);
}

.memory-candidate-node-teal .memory-candidate-node-bubble,
.memory-candidate-node-teal .memory-candidate-node-bubble-tail {
  stroke: rgba(57, 197, 196, 0.24);
  filter: drop-shadow(0 0 8px rgba(57, 197, 196, 0.12));
}

.memory-candidate-node-teal .memory-candidate-node-bubble-dot {
  fill: #39c5c4;
}

.memory-candidate-node-purple .memory-candidate-node-bubble,
.memory-candidate-node-purple .memory-candidate-node-bubble-tail {
  stroke: rgba(155, 120, 240, 0.24);
  filter: drop-shadow(0 0 8px rgba(155, 120, 240, 0.12));
}

.memory-candidate-node-purple .memory-candidate-node-bubble-dot {
  fill: #9b78f0;
}

.memory-candidate-node-orange .memory-candidate-node-bubble,
.memory-candidate-node-orange .memory-candidate-node-bubble-tail {
  stroke: rgba(245, 154, 79, 0.24);
  filter: drop-shadow(0 0 8px rgba(245, 154, 79, 0.12));
}

.memory-candidate-node-orange .memory-candidate-node-bubble-dot {
  fill: #f59a4f;
}

.memory-candidate-node-steel .memory-candidate-node-bubble,
.memory-candidate-node-steel .memory-candidate-node-bubble-tail {
  stroke: rgba(141, 157, 170, 0.22);
  filter: drop-shadow(0 0 8px rgba(141, 157, 170, 0.1));
}

.memory-candidate-node-steel .memory-candidate-node-bubble-dot {
  fill: #8d9daa;
}

.memory-candidate-node-hit {
  cursor: pointer;
}

.memory-candidate-node.is-selected .memory-candidate-node-bubble,
.memory-candidate-node:hover .memory-candidate-node-bubble,
.memory-candidate-node:focus-visible .memory-candidate-node-bubble {
  stroke: rgba(125, 255, 42, 0.52);
  filter: drop-shadow(0 0 11px rgba(125, 255, 42, 0.18));
}

.memory-candidate-governance-detail {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.memory-candidate-policy-note,
.memory-candidate-feedback,
.memory-candidate-confirmation-state {
  border-radius: 7px;
  border: 1px solid rgba(125, 255, 42, 0.14);
  background: rgba(125, 255, 42, 0.045);
  color: #cce6d8;
  font-size: 11.2px;
  font-weight: 650;
  line-height: 1.45;
  padding: 8px 9px;
}

.memory-candidate-feedback {
  border-color: rgba(74, 153, 255, 0.18);
  background: rgba(74, 153, 255, 0.052);
  color: #c9ddf5;
}

.memory-candidate-selected-state {
  display: grid;
  gap: 3px;
}

.memory-candidate-selected-state span {
  color: #8e9aa2;
  font-size: 10.5px;
  font-weight: 650;
}

.memory-candidate-selected-state strong {
  color: #eff7f5;
  font-size: 13px;
  line-height: 1.3;
}

.memory-candidate-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.memory-candidate-badge-row span {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.034);
  color: #dbe7e4;
  font-size: 10.5px;
  font-weight: 680;
  line-height: 1;
  padding: 5px 7px;
}

.memory-candidate-detail-section {
  display: grid;
  gap: 8px;
}

.memory-candidate-source-card {
  display: grid;
  gap: 4px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.026);
  padding: 9px;
}

.memory-candidate-source-card span,
.memory-candidate-source-card em {
  color: #87949d;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 650;
}

.memory-candidate-source-card strong {
  color: #dce8e5;
  font-size: 11.5px;
  line-height: 1.45;
}

.memory-candidate-evidence-list {
  display: grid;
  gap: 5px;
}

.memory-candidate-evidence-list span {
  color: #aab7b2;
  font-size: 11px;
  line-height: 1.4;
}

.memory-candidate-evidence-list span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: #7dff2a;
  vertical-align: 1px;
}

.memory-candidate-usage-list {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5px 10px;
  color: #9aa8ad;
  font-size: 11px;
  line-height: 1.45;
}

.memory-candidate-usage-list strong {
  color: #dce8e5;
  font-weight: 650;
}

.memory-candidate-detail-section p {
  color: #9fb2aa;
  font-size: 11px;
  line-height: 1.42;
  margin: 0;
}

.memory-candidate-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.memory-candidate-action-btn {
  cursor: pointer;
}

.memory-candidate-action-log {
  display: grid;
  gap: 8px;
}

.memory-candidate-action-log.is-empty {
  color: #9aa8ad;
  font-size: 11px;
  line-height: 1.45;
}

.memory-candidate-action-log-item {
  display: grid;
  grid-template-columns: 0.9fr 1.25fr;
  gap: 4px 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.024);
  padding: 8px;
}

.memory-candidate-action-log-item span {
  color: #8d9aa1;
  font-size: 10.5px;
  line-height: 1.35;
}

.memory-candidate-action-log-item strong {
  color: #dbe6e3;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.memory-candidate-empty-state {
  border-radius: 7px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  color: #9aa8ad;
  font-size: 11.5px;
  line-height: 1.45;
  padding: 12px;
}

.trace-graph-shell-main {
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 30, 27, 0.9), rgba(13, 22, 27, 0.92));
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.28), 0 20px 70px rgba(0, 0, 0, 0.18);
}

.trace-graph-shell-main .trace-graph-head strong {
  font-size: 18px;
}

.trace-graph-shell-main .trace-graph-head span,
.trace-graph-shell-main .trace-graph-foot span {
  font-size: 12px;
}

.trace-graph-shell-main .trace-graph-map {
  gap: 16px;
}

.trace-graph-shell-main .trace-graph-center {
  min-height: 118px;
  border-radius: 10px;
}

.trace-graph-shell-main .trace-graph-center span {
  font-size: 12px;
}

.trace-graph-shell-main .trace-graph-center strong {
  font-size: 20px;
}

.trace-graph-shell-main .trace-graph-branches {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.trace-graph-shell-main .trace-graph-branch {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.trace-graph-shell-main .trace-graph-edge {
  min-height: 28px;
  place-items: center start;
  text-align: left;
  font-size: 11px;
}

.trace-graph-shell-main .trace-graph-edge::before {
  left: 12px;
  right: auto;
  top: 100%;
  width: 1px;
  height: 12px;
  background: linear-gradient(180deg, rgba(18, 244, 194, 0.68), rgba(18, 244, 194, 0.08));
  transform: none;
}

.trace-graph-shell-main .trace-graph-node summary {
  min-height: 76px;
  padding: 12px 13px;
}

.trace-graph-shell-main .trace-graph-node summary span {
  font-size: 11px;
}

.trace-graph-shell-main .trace-graph-node summary strong {
  font-size: 13px;
}

.trace-graph-shell-main .trace-graph-detail {
  padding: 0 13px 13px;
}

.trace-graph-shell-main .trace-graph-detail p {
  font-size: 12px;
}

.trace-main-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.trace-main-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.15);
}

.trace-main-card strong {
  color: #effff9;
  font-size: 12px;
}

.trace-main-card span {
  color: #9fb2aa;
  font-size: 11px;
  line-height: 1.5;
}

.module-action {
  width: 100%;
  min-height: 38px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  text-align: left;
}

.module-action span {
  display: block;
}

.module-item:hover,
.module-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.module-item.pinned {
  background: rgba(255, 255, 255, 0.11);
}

.history-more {
  position: absolute;
  right: 3px;
  top: 3px;
  opacity: 0;
  color: var(--accent-2);
}

.module-item:hover .history-more,
.history-item:hover .history-more {
  opacity: 1;
}

.account {
  width: 168.24px;
  margin: auto auto 7px;
  position: relative;
  z-index: 30;
}

.account-btn {
  width: 168.24px;
  height: 25px;
  min-height: 25px;
  display: grid;
  grid-template-columns: 24px minmax(0, 108px) 6px;
  align-items: center;
  justify-content: start;
  column-gap: 15px;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 400;
  line-height: 25px;
  cursor: pointer;
}

.account-mark-icon {
  width: 20px;
  height: 20px;
  display: block;
  justify-self: center;
}

.account-chevron-icon {
  width: 6px;
  height: 6px;
  display: block;
  transform: translateY(-1px);
  transform-origin: center;
  transition: transform 0.16s ease;
}

.account.open .account-chevron-icon {
  transform: translateY(1px) rotate(180deg);
}

.account-menu {
  position: absolute;
  left: -21px;
  bottom: 38px;
  width: 208px;
  height: 66px;
  padding: 10px;
  background: #34363d;
  border: 1px solid #373b43;
  border-radius: 4px;
  box-shadow: none;
  display: none;
  z-index: 20;
}

.account.open .account-menu {
  display: block;
}

.account-menu button {
  width: 188px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #43454f;
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 46px;
}

.account-menu button:hover {
  background: #4a4c57;
}

.account-menu .icon {
  display: none;
}

.main {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  scrollbar-width: none;
}

.main::-webkit-scrollbar {
  display: none;
}

.chat-header {
  height: 52px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(12, 16, 21, 0.96);
  backdrop-filter: blur(14px);
}

.chat-title {
  font-size: 13px;
  color: var(--muted);
  max-width: 460px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-area {
  min-height: 0;
  flex: 1 0 auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  padding: 44px 48px 24px;
  transition: padding-right 0.18s ease;
  background:
    radial-gradient(circle at 62% 4%, rgba(18, 244, 194, 0.018), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.006), transparent 18%);
}

.main.home-default-view .chat-area {
  padding-top: 92px;
}

.main.trace-main-view .chat-area {
  padding-top: 18px;
  padding-bottom: 14px;
}

.dialogue-rail {
  position: fixed;
  top: 72px;
  right: 12px;
  z-index: 24;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.dialogue-rail.open {
  top: 70px;
  bottom: auto;
  width: min(276px, calc(100vw - 336px));
  max-height: calc(100vh - 150px);
  padding: 10px;
  border: 1px solid rgba(18, 244, 194, 0.18);
  border-radius: 8px;
  background: rgba(25, 29, 36, 0.94);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.rail-toggle {
  width: 30px;
  min-height: 84px;
  border: 1px solid rgba(18, 244, 194, 0.3);
  border-radius: 8px;
  color: #a5ffe9;
  background: linear-gradient(180deg, rgba(18, 244, 194, 0.15), rgba(18, 244, 194, 0.06));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  pointer-events: auto;
}

.dialogue-rail.open .rail-toggle {
  align-self: flex-end;
  width: 50px;
  min-height: 28px;
  flex-direction: row;
  gap: 4px;
}

.rail-toggle-icon {
  font-size: 14px;
  line-height: 1;
}

.rail-toggle-text {
  line-height: 1.1;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.dialogue-rail.open .rail-toggle-icon {
  font-size: 13px;
}

.dialogue-rail.open .rail-toggle-text {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
}

.rail-content {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}

.rail-content::-webkit-scrollbar {
  display: none;
}

.rail-card {
  display: grid;
  gap: 8px;
  border-radius: 6px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.12);
}

.rail-card h2 {
  margin: 0;
  color: #eaf8f2;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.rail-card p {
  margin: 0;
  color: #aebbb6;
  font-size: 11.5px;
  line-height: 1.58;
}

.rail-steps {
  display: grid;
  gap: 7px;
}

.rail-step {
  display: grid;
  gap: 3px;
  border-radius: 5px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.rail-step.active {
  background: rgba(18, 244, 194, 0.075);
  box-shadow: inset 0 0 0 1px rgba(18, 244, 194, 0.22);
}

.rail-step span {
  color: #77f6d1;
  font-size: 10.5px;
  font-weight: 500;
}

.rail-step strong {
  color: #edf7f2;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
}

.rail-correction-list {
  display: grid;
  gap: 5px;
}

.rail-correction-list span {
  color: #c9d8d2;
  font-size: 11.5px;
  line-height: 1.5;
}

.path-panel {
  width: min(850px, 78vw);
  margin: 0 auto 24px;
  border: 1px solid rgba(18, 244, 194, 0.18);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(18, 244, 194, 0.08), rgba(255, 255, 255, 0.025));
  padding: 14px 16px 15px;
  color: var(--text);
}

.path-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.stage-chip {
  flex: 0 0 auto;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(131, 255, 34, 0.13);
  color: #bfff7c;
  font-size: 11px;
  font-weight: 800;
}

.path-focus {
  min-width: 0;
  color: #e7eee9;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.path-copy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.path-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.path-steps span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #ccd5d0;
  font-size: 11px;
}

.clarity-line {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #dff9eb;
  font-size: 12px;
  line-height: 1.65;
}

.trace-review {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 9px;
}

.trace-title {
  color: #d9eee6;
  font-size: 12px;
  font-weight: 800;
}

.trace-frame {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 11px;
}

.trace-frame-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.trace-frame-head span {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(18, 244, 194, 0.13);
  color: var(--accent-2);
  font-weight: 800;
}

.trace-frame-head strong {
  color: #edf7f2;
}

.trace-frame-head em {
  color: var(--faint);
  font-style: normal;
}

.trace-frame-body {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  color: #bac5c1;
  font-size: 11px;
  line-height: 1.55;
}

.empty-chat {
  width: min(720px, 100%);
  margin: min(8vh, 48px) auto auto;
  transform: none;
  display: grid;
  gap: 16px;
  color: var(--text);
}

.conversation-hydration-shell {
  width: min(680px, 100%);
  margin: min(8vh, 48px) auto auto;
  display: grid;
  gap: 14px;
  color: var(--text);
}

.conversation-hydration-shell h2 {
  max-width: 560px;
  font-size: 24px;
  line-height: 1.24;
  font-weight: 820;
}

.conversation-hydration-shell p {
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.empty-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e2ebe8;
  font-size: 13px;
  font-weight: 700;
}

.empty-chat h2 {
  max-width: 560px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 850;
}

.empty-chat p {
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.empty-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 590px;
}

.empty-actions button {
  min-height: 42px;
  border-radius: 5px;
  padding: 0 14px;
  text-align: left;
  color: #edf5f1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.024)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.072);
  cursor: pointer;
  font-size: 12px;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.empty-actions button:hover {
  color: var(--accent);
  background: rgba(18, 244, 194, 0.08);
  box-shadow: inset 0 0 0 1px var(--line-bright);
  transform: translateY(-1px);
}

.status-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #07120f;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
}

.status-dot .brand-mark-icon {
  width: 100%;
  height: 100%;
}

.message-list {
  width: min(800px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.shell.rail-open .chat-area {
  padding-right: clamp(238px, 26vw, 304px);
}

.shell.rail-open .message-list {
  width: min(720px, 100%);
}

.message {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message.user {
  align-items: flex-end;
}

.message.assistant {
  align-items: flex-start;
}

.bubble {
  max-width: 620px;
  overflow-wrap: anywhere;
  padding: 15px 18px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(62, 70, 82, 0.96), rgba(54, 61, 71, 0.96));
  color: #eef4f1;
  font-size: 14px;
  line-height: 1.72;
  font-weight: 400;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 10px 28px rgba(0, 0, 0, 0.1);
}

.message.user .bubble {
  background:
    linear-gradient(180deg, rgba(61, 68, 79, 0.98), rgba(51, 58, 68, 0.98));
}

.message.assistant .bubble {
  background:
    linear-gradient(180deg, rgba(58, 65, 75, 0.98), rgba(50, 57, 67, 0.98));
}

.bubble.editing {
  width: 620px;
  max-width: 100%;
  box-shadow: inset 0 0 0 1px var(--line-bright);
}

.frontstage-model-thinking {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  margin-top: 10px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.frontstage-thinking-dots {
  display: inline-flex;
  width: 12px;
  justify-content: flex-start;
}

.frontstage-thinking-dots span {
  animation: frontstage-thinking-dot 1.25s ease-in-out infinite;
  opacity: 0.32;
}

.frontstage-thinking-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.frontstage-thinking-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

.frontstage-model-divider {
  height: 1px;
  margin: 18px 0 16px;
  background: rgba(255, 255, 255, 0.13);
}

.frontstage-model-enhanced-reception {
  display: grid;
  grid-template-columns: 2px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.frontstage-model-rail {
  display: block;
  width: 2px;
  min-height: 100%;
  border-radius: 999px;
  background: rgba(142, 218, 201, 0.36);
}

.frontstage-model-text {
  display: grid;
  gap: 8px;
}

.frontstage-model-text-block {
  margin: 0;
}

.frontstage-model-text-block.item {
  padding-left: 0;
}

.message-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-1px);
  transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
}

.bubble:hover ~ .message-actions,
.message-meta:hover ~ .message-actions,
.message-actions:hover,
.message.action-visible .message-actions,
.message.editing .message-actions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.message-actions button {
  height: 25px;
  padding: 0 8px;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.message-actions button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.message-meta {
  max-width: 620px;
  width: min(620px, 100%);
  display: grid;
  gap: 10px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 11px;
}

.meta-line span:first-child {
  color: var(--accent-2);
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-row button {
  min-height: 30px;
  border: 1px solid rgba(18, 244, 194, 0.26);
  border-radius: 4px;
  padding: 0 10px;
  background: rgba(18, 244, 194, 0.07);
  color: #dffaf1;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.option-row button:hover {
  border-color: rgba(131, 255, 34, 0.55);
  background: rgba(131, 255, 34, 0.12);
  transform: translateY(-1px);
}

.lane-card-stack {
  width: min(620px, 100%);
  display: grid;
  gap: 10px;
}

.lane-card {
  border: 1px solid rgba(18, 244, 194, 0.24);
  border-radius: 6px;
  background: rgba(18, 244, 194, 0.055);
  padding: 14px 15px;
}

.lane-card.option-cluster {
  display: grid;
  gap: 10px;
  background: rgba(18, 244, 194, 0.04);
  border-color: rgba(18, 244, 194, 0.18);
}

.option-cluster-label {
  color: #8fffe0;
  font-size: 12px;
  font-weight: 500;
}

.inline-insight {
  max-width: 620px;
  color: #aaf6dd;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
}

.lane-card.light {
  border-color: rgba(198, 126, 38, 0.35);
  background: rgba(198, 126, 38, 0.08);
}

.lane-card.memo {
  border-color: rgba(82, 142, 210, 0.36);
  background: rgba(82, 142, 210, 0.08);
}

.lane-card.cognitive-soft {
  background: rgba(131, 255, 34, 0.055);
}

.lane-card h3 {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
}

.lane-card.light h3 {
  color: #e2a34f;
}

.lane-card.memo h3 {
  color: #84bbf4;
}

.lane-card p {
  margin: 0;
  color: #d8e2de;
  font-size: 12px;
  line-height: 1.7;
}

.lane-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lane-option-row button {
  min-height: 30px;
  border: 1px solid rgba(18, 244, 194, 0.35);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(12, 20, 24, 0.35);
  color: #dffaf1;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.light .lane-option-row button {
  border-color: rgba(226, 163, 79, 0.45);
  color: #ffd9a1;
}

.memo-card-rows {
  display: grid;
  gap: 9px;
}

.memo-card-rows div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  color: #d7e5f4;
  font-size: 12px;
}

.memo-card-rows span {
  color: #9eb6cf;
}

.memo-card-rows strong {
  color: #eef6ff;
  font-weight: 500;
}

.memo-card-action {
  margin-top: 12px;
  min-height: 30px;
  border: 1px solid rgba(132, 187, 244, 0.48);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(132, 187, 244, 0.1);
  color: #dcebff;
  cursor: pointer;
  font-size: 12px;
}

.composer-wrap {
  position: sticky;
  bottom: 0;
  z-index: 14;
  flex: 0 0 auto;
  padding: 14px 52px 28px;
  background:
    linear-gradient(180deg, rgba(11, 16, 20, 0), rgba(11, 16, 20, 0.92) 32%, rgba(11, 16, 20, 0.985));
  transition: padding-right 0.18s ease;
}

.main.home-default-view .composer-wrap {
  padding-bottom: 72px;
}

.shell.rail-open .composer-wrap {
  padding-right: clamp(238px, 26vw, 304px);
}

.composer {
  width: min(720px, 100%);
  margin: 0 auto;
  min-height: 82px;
  border: 1px solid rgba(174, 190, 199, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(48, 55, 65, 0.98), rgba(41, 48, 57, 0.98));
  display: grid;
  grid-template-rows: auto 32px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.composer.has-attachments {
  min-height: 176px;
  grid-template-rows: auto minmax(48px, 1fr) 40px;
}

.composer.active {
  border-color: var(--line-bright);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(18, 244, 194, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.composer textarea {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  resize: none;
  color: var(--text);
  background: transparent;
  padding: 14px 16px 4px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}

.composer textarea::placeholder {
  color: #78818a;
}

.composer-tools {
  display: flex;
  align-items: center;
  padding: 0 9px 8px 12px;
  gap: 6px;
}

.tool-spacer {
  flex: 1;
}

.send-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #07120f;
  background: transparent;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(18, 244, 194, 0.14);
}

.send-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  filter: grayscale(0.22) saturate(0.72);
}

.send-mark-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.attachment-strip {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  max-height: 74px;
  overflow-y: auto;
  padding: 10px 12px 0;
}

.attachment-strip.visible {
  display: flex;
}

.file-chip {
  min-height: 44px;
  width: fit-content;
  max-width: min(320px, 100%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  border-radius: 4px;
  padding: 6px 26px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(92, 98, 106, 0.72);
  color: #e9efec;
  font-size: 12px;
  line-height: 1.2;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.file-chip:hover,
.file-chip:focus-within {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(98, 104, 113, 0.82);
}

.pending-file-chip {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(100%, clamp(120px, 18vw, 178px));
}

.document-file-chip {
  width: min(154px, 22vw);
}

.image-file-chip {
  min-height: 44px;
  width: 44px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.file-chip-preview {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(18, 244, 194, 0.12);
  color: var(--accent-2);
}

.image-file-chip .file-chip-preview {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 4px;
}

.file-type-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(18, 244, 194, 0.12);
  color: #35ff95;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.file-type-icon span {
  max-width: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip img,
.file-chip-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.file-chip-copy {
  min-width: 0;
  flex: 0 1 auto;
  display: grid;
  gap: 1px;
}

.file-chip-name {
  min-width: 0;
  max-width: min(12ch, 96px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f7fbf7;
  font-weight: 650;
}

.file-chip-type {
  min-width: 0;
  max-width: min(34ch, 220px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(233, 239, 236, 0.58);
  font-size: 10px;
}

.file-chip button {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #4c535d;
  background: rgba(247, 251, 247, 0.95);
  cursor: pointer;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.file-chip:hover button,
.file-chip:focus-within button {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.image-file-chip button {
  top: 4px;
  right: 4px;
}

.message-materials {
  margin-bottom: 9px;
  display: grid;
  gap: 8px;
}

.material-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.material-thumb {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(170, 246, 221, 0.14);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}

.material-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-thumb.file .icon {
  width: 22px;
  height: 22px;
  color: var(--accent-2);
  stroke-width: 1.7;
}

.material-card-body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.material-card-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f7fbf7;
  font-size: 13px;
  line-height: 1.45;
}

.material-card-detail,
.material-card-note,
.material-card-boundary {
  color: rgba(233, 239, 236, 0.78);
  font-size: 12px;
  line-height: 1.55;
}

.material-card-note {
  overflow-wrap: anywhere;
}

.material-card-boundary {
  color: var(--accent-2);
}

.material-continuation-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.material-continuation-row button {
  border-radius: 4px;
  padding: 7px 9px;
  background: rgba(170, 246, 221, 0.13);
  color: #e9efec;
  font-size: 12px;
  line-height: 1.35;
}

.material-user-text {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.message-materials + .material-user-text {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.material-continuation-meta {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.52);
  z-index: 40;
}

.modal {
  width: min(560px, 92vw);
  background: #171c23;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translate(-50%, -18px);
  min-width: 220px;
  max-width: 520px;
  padding: 11px 16px;
  border-radius: 4px;
  background: #29303a;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-size: 12px;
  text-align: center;
  z-index: 80;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes frontstage-thinking-dot {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .frontstage-thinking-dots span {
    animation: none;
  }

  .frontstage-thinking-dots span {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .welcome-screen {
    padding: 24px;
    background-position: 29% center;
  }

  .flow-screen {
    padding: 20px;
  }

  .voice-screen {
    padding: 0;
  }

  .auth-card,
  .onboarding-card,
  .dna-card {
    width: 100%;
  }

  .first-entry-step {
    top: 24px;
    right: 24px;
    font-size: 11px;
  }

  .form-stack.first-thought-form {
    width: min(100%, 520px);
  }

  .first-thought-copy h1 {
    white-space: normal;
  }

  .welcome-card {
    min-height: calc(100vh - 48px);
  }

  .welcome-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 24px;
  }

  .welcome-logo-mark {
    width: 60px;
    height: 60px;
  }

  .welcome-wordmark {
    width: min(232px, 72vw);
  }

  .primary-btn.welcome-start-btn {
    width: min(244px, 72vw);
    height: 42px;
    margin-top: 30px;
    font-size: 14px;
  }

  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .shell.has-dialogue-rail {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .dialogue-rail {
    display: none;
  }

  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .chat-area {
    padding-left: 18px;
    padding-right: 18px;
  }

  .composer-wrap {
    padding-left: 18px;
    padding-right: 18px;
  }

  .main.home-default-view .composer-wrap {
    padding-bottom: 56px;
  }

  .shell.rail-open .chat-area,
  .shell.rail-open .composer-wrap {
    padding-right: 18px;
  }

  .composer,
  .message-list {
    width: 100%;
  }

  .trace-main-panel {
    width: 100%;
    gap: 12px;
  }

  .personal-map-canvas-grid {
    grid-template-columns: 1fr;
  }

  .personal-map-canvas {
    min-height: 700px;
  }

  .trace-main-head h2 {
    font-size: 22px;
  }

  .trace-main-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .empty-chat {
    margin-top: 36px;
  }

  .conversation-hydration-shell {
    margin-top: 36px;
  }

  .empty-chat h2 {
    font-size: 22px;
  }

  .conversation-hydration-shell h2 {
    font-size: 21px;
  }

  .empty-actions {
    grid-template-columns: 1fr;
  }

  .voice-source-stage {
    width: 100vw;
    height: min(100vh, calc(100vw * 9 / 16));
  }
}

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

  .side-btn span,
  .side-start-btn span,
  .account-btn span,
  .sidebar .brand-mark span {
    display: none;
  }

  .account {
    width: 40px;
  }

  .account-btn {
    width: 40px;
    grid-template-columns: 24px;
    justify-content: center;
    column-gap: 0;
  }

  .account-chevron-icon {
    display: none;
  }

  .account-menu {
    left: 0;
    width: 156px;
  }

  .account-menu button {
    width: 136px;
  }

  .sidebar-panel {
    position: fixed;
    left: 74px;
    right: 8px;
    top: 8px;
    bottom: 8px;
    z-index: 28;
    padding: 12px;
    border-radius: 6px;
    background: rgba(15, 20, 27, 0.96);
    box-shadow: var(--shadow);
  }

  .trace-main-head h2 {
    font-size: 20px;
  }

  .trace-main-groups,
  .trace-graph-shell-main .trace-graph-branches {
    grid-template-columns: 1fr;
  }

  .personal-map-canvas {
    min-height: 760px;
    overflow-x: auto;
  }

  .personal-map-life-svg {
    width: 1120px;
    min-width: 1120px;
  }

  .personal-map-detail-panel {
    left: 14px;
    right: auto;
    width: min(292px, calc(100% - 28px));
  }

  .trace-graph-shell-main {
    padding: 12px;
  }

  .trace-graph-shell-main .trace-graph-center {
    min-height: 96px;
  }

  .trace-graph-branch {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .side-start-btn,
  .side-btn {
    justify-content: center;
    padding: 0;
  }

  .side-nav {
    overflow: auto;
    border-bottom: 0;
  }

  .chat-area,
  .composer-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .shell.rail-open .chat-area,
  .shell.rail-open .composer-wrap {
    padding-right: 12px;
  }
}
