/* Parallel Me - modern product UI */

:root {
  color-scheme: light;

  --bg-0: #f5f7fb;
  --bg-1: #ffffff;
  --bg-2: #f0f3f8;
  --bg-3: #e8edf5;
  --bg-warm: #fff8ed;

  --ink: #111418;
  --ink-soft: #343a43;
  --ink-dim: #6c7480;
  --ink-faint: #9aa3af;

  --blue: #1a73e8;
  --blue-deep: #1557b0;
  --green: #07c160;
  --red: #fe2c55;
  --cyan: #13b8c8;
  --amber: #f59e0b;
  --violet: #7c3aed;

  --lilac: var(--blue);
  --lilac-deep: var(--blue-deep);
  --lilac-soft: #b7d0ff;
  --lilac-bg: #eef5ff;
  --lilac-line: #cfe0ff;
  --lilac-faint: rgba(26, 115, 232, 0.1);

  --line: #dfe5ee;
  --line-soft: #edf1f6;
  --line-strong: #cfd7e3;

  --warm: var(--amber);
  --danger: var(--red);
  --ok: var(--green);
  --warm-soft: rgba(245, 158, 11, 0.12);
  --danger-soft: rgba(254, 44, 85, 0.1);
  --ok-soft: rgba(7, 193, 96, 0.1);

  --shadow-sm: 0 1px 2px rgba(17, 20, 24, 0.06);
  --shadow: 0 12px 34px rgba(17, 20, 24, 0.08);
  --shadow-lg: 0 24px 70px rgba(17, 20, 24, 0.14);

  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 8px;

  --sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --serif: var(--sans);
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0) 280px),
    linear-gradient(135deg, rgba(26, 115, 232, 0.08) 0, rgba(26, 115, 232, 0) 44%),
    linear-gradient(315deg, rgba(7, 193, 96, 0.06) 0, rgba(7, 193, 96, 0) 38%),
    linear-gradient(90deg, rgba(254, 44, 85, 0.04), rgba(19, 184, 200, 0.04));
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

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

::selection {
  background: rgba(26, 115, 232, 0.18);
  color: var(--ink);
}

.hidden { display: none !important; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(0deg, rgba(17, 20, 24, 0.025) 0, rgba(17, 20, 24, 0.025) 1px, transparent 1px, transparent 5px),
    repeating-linear-gradient(90deg, rgba(17, 20, 24, 0.018) 0, rgba(17, 20, 24, 0.018) 1px, transparent 1px, transparent 6px);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(245, 247, 251, 0) 0, rgba(245, 247, 251, 0.72) 78%, var(--bg-0) 100%),
    linear-gradient(90deg, rgba(17, 20, 24, 0.035), rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 82%, rgba(17, 20, 24, 0.035));
}

main,
.topbar {
  position: relative;
  z-index: 1;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(207, 215, 227, 0.78);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-dot {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--ink) 0 54%, #2a2f38 54% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 20px rgba(17, 20, 24, 0.14);
}

.brand-dot::before,
.brand-dot::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  top: 7px;
}

.brand-dot::before {
  left: 7px;
  background: var(--green);
  box-shadow: 8px 8px 0 var(--red);
}

.brand-dot::after {
  right: 7px;
  background: var(--blue);
}

.brand-name {
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.brand-sub {
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.steps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  background: rgba(232, 237, 245, 0.74);
  border: 1px solid rgba(207, 215, 227, 0.82);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.steps .step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.steps .step em {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
}

.steps .step:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.steps .step.done {
  color: var(--ink-faint);
}

.steps .step.current {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 22px rgba(17, 20, 24, 0.16);
}

.topbar-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.ai-badge {
  font-size: 10px;
  color: var(--ink-faint);
}

.ai-badge.loading { color: var(--blue); animation: blink 1.2s ease-in-out infinite; }
.ai-badge.ok { color: var(--green); }
.ai-badge.error { color: var(--red); }
.ai-badge.off { color: var(--ink-faint); }

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

.reset-btn,
.ghost-btn,
.regen-btn,
.chat-input button,
.primary-btn {
  min-height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.reset-btn,
.ghost-btn {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.reset-btn:hover,
.ghost-btn:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
  background: #fff;
  box-shadow: 0 8px 22px rgba(26, 115, 232, 0.12);
}

.primary-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(17, 20, 24, 0.18);
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(7, 193, 96, 0.26), rgba(26, 115, 232, 0.22), rgba(254, 44, 85, 0.18));
  opacity: 0;
  transition: opacity 0.16s ease;
}

.primary-btn > span {
  position: relative;
  z-index: 1;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(17, 20, 24, 0.22);
}

.primary-btn:hover::after { opacity: 1; }
.primary-btn:active,
.ghost-btn:active,
.reset-btn:active,
.regen-btn:active {
  transform: translateY(0);
}

.btn-arrow {
  transition: transform 0.16s ease;
}

.primary-btn:hover .btn-arrow {
  transform: translateX(3px);
}

.view {
  padding: 56px 28px 84px;
  min-height: calc(100vh - 68px);
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.act-mark {
  margin: 0 0 10px;
  color: var(--blue);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.view-title {
  margin: 0 auto 10px;
  max-width: 820px;
  color: var(--ink);
  text-align: center;
  font-size: 36px;
  line-height: 1.18;
  font-weight: 800;
}

.view-title em {
  font-style: normal;
  color: var(--blue);
}

.view-sub {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--ink-dim);
  text-align: center;
  font-size: 15px;
}

.view-sub em {
  color: var(--red);
  font-style: normal;
  font-weight: 700;
}

.hint {
  color: var(--ink-dim);
  font-size: 13px;
}

.view-input {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 48px;
}

.hero {
  width: min(980px, 100%);
  margin: 0 auto;
  text-align: center;
  animation: rise 0.48s cubic-bezier(0.16, 0.84, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.hero-eyebrow .rule {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.28;
}

.hero-tag {
  max-width: 620px;
  margin: 0 auto 10px;
  color: var(--ink-dim);
  font-size: 18px;
  line-height: 1.55;
}

.hero-title {
  margin: 0 0 26px;
  color: var(--ink);
  font-size: 56px;
  line-height: 1.08;
  font-weight: 800;
}

.hero-title em {
  font-style: normal;
  color: var(--blue);
}

.entry-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.entry-mode-btn {
  min-width: 108px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.entry-mode-btn.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 20px rgba(17, 20, 24, 0.16);
}

.entry-panel {
  animation: rise 0.28s ease both;
}

.input-wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px;
  text-align: left;
  border: 1px solid rgba(207, 215, 227, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.input-wrap:focus-within {
  border-color: rgba(26, 115, 232, 0.78);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1), var(--shadow);
}

.decision-input {
  width: 100%;
  min-height: 132px;
  margin: 0 0 14px;
  padding: 0;
  resize: vertical;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
}

.decision-input::placeholder {
  color: var(--ink-faint);
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.suggest-label {
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 700;
}

.chip {
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  color: var(--blue-deep);
  background: var(--lilac-bg);
}

.choice-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(207, 215, 227, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  text-align: left;
}

.choice-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 700;
}

.choice-panel-head span:first-child {
  color: var(--ink);
  font-size: 15px;
}

.life-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.life-choice-card {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 218px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.life-choice-card:hover,
.life-choice-card.selected {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: 0 16px 38px rgba(17, 20, 24, 0.12);
}

.life-choice-scene {
  position: relative;
  display: block;
  height: 92px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(17, 20, 24, 0.92), rgba(46, 52, 61, 0.94)),
    linear-gradient(90deg, rgba(26, 115, 232, 0.32), rgba(7, 193, 96, 0.24));
}

.scene-city .life-choice-scene { background: linear-gradient(135deg, #101114, #1d2938); }
.scene-town .life-choice-scene { background: linear-gradient(135deg, #102219, #1f3a2d); }
.scene-road .life-choice-scene { background: linear-gradient(135deg, #12232a, #214852); }
.scene-market .life-choice-scene { background: linear-gradient(135deg, #241016, #45212a); }

.scene-mark {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--mono);
}

.scene-line,
.scene-shape {
  position: absolute;
  display: block;
  background: rgba(255, 255, 255, 0.68);
}

.scene-line.one {
  left: 14px;
  right: 14px;
  bottom: 22px;
  height: 2px;
  opacity: 0.55;
}

.scene-line.two {
  left: 38px;
  right: 26px;
  bottom: 34px;
  height: 1px;
  opacity: 0.34;
}

.scene-shape.main {
  right: 14px;
  bottom: 18px;
  width: 34px;
  height: 42px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.28));
}

.scene-shape.aux {
  right: 54px;
  bottom: 18px;
  width: 20px;
  height: 28px;
  border-radius: 5px 5px 0 0;
  background: rgba(255, 255, 255, 0.32);
}

.life-choice-title {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.32;
}

.life-choice-caption {
  display: block;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.5;
}

.life-choice-action {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.choice-followup {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(26, 115, 232, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.08), rgba(7, 193, 96, 0.06)),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  animation: rise 0.28s ease both;
}

.choice-followup-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.choice-followup-head span:first-child {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.choice-followup-head span:last-child {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.choice-followup-sub {
  margin: 0 0 12px;
  color: var(--ink-dim);
  font-size: 13px;
}

.choice-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.choice-detail-input {
  width: 100%;
  min-height: 74px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
}

.choice-detail-input:focus {
  border-color: rgba(26, 115, 232, 0.78);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.choice-start-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.life-judgement {
  padding: 15px 16px;
  border: 1px solid rgba(254, 44, 85, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(254, 44, 85, 0.08), rgba(26, 115, 232, 0.06)),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.life-judgement-label {
  margin-bottom: 7px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.life-judgement p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
}

.hero-foot {
  margin: 18px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.radar-cell {
  position: relative;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: rise 0.38s ease both;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.radar-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cell-color, var(--blue));
}

.radar-cell:nth-child(1) { --cell-color: var(--blue); animation-delay: 0.03s; }
.radar-cell:nth-child(2) { --cell-color: var(--green); animation-delay: 0.08s; }
.radar-cell:nth-child(3) { --cell-color: var(--red); animation-delay: 0.13s; }
.radar-cell:nth-child(4) { --cell-color: var(--cyan); animation-delay: 0.18s; }
.radar-cell:nth-child(5) { --cell-color: var(--amber); animation-delay: 0.23s; }
.radar-cell:nth-child(6) { --cell-color: var(--violet); animation-delay: 0.28s; }

.radar-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(26, 115, 232, 0.42);
  box-shadow: var(--shadow);
}

.radar-label {
  margin-bottom: 8px;
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 800;
}

.radar-value {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 16px;
}

.branch-compare {
  margin: 26px 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.98)),
    linear-gradient(90deg, rgba(26, 115, 232, 0.08), rgba(7, 193, 96, 0.06), rgba(245, 158, 11, 0.08));
  box-shadow: var(--shadow-sm);
}

.compare-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.compare-kicker {
  margin: 0 0 4px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.compare-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 850;
}

.compare-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compare-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.compare-summary b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
}

.compare-table {
  display: grid;
}

.compare-row {
  --brand-color: var(--blue);
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) 94px repeat(4, minmax(96px, 0.66fr)) minmax(190px, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.64);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.compare-row:last-child {
  border-bottom: 0;
}

.compare-row:hover {
  position: relative;
  z-index: 1;
  background: color-mix(in srgb, var(--brand-color) 8%, #fff);
  box-shadow: inset 3px 0 0 var(--brand-color);
}

.compare-identity {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.compare-code {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--brand-color) 14%, #fff);
  color: color-mix(in srgb, var(--brand-color) 82%, var(--ink));
  font-weight: 900;
}

.compare-identity strong,
.compare-identity em,
.compare-index em,
.compare-step {
  overflow-wrap: anywhere;
}

.compare-identity strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.compare-identity em {
  display: block;
  margin-top: 2px;
  color: var(--ink-dim);
  font-size: 12px;
  font-style: normal;
}

.compare-index {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.compare-index b {
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.compare-index em {
  color: var(--ink-dim);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.compare-bar {
  display: grid;
  grid-template-columns: 32px minmax(42px, 1fr) 28px;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.compare-bar-label,
.compare-bar-num {
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 800;
}

.compare-bar-num {
  text-align: right;
}

.compare-bar-track {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.compare-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-color);
}

.compare-bar.pressure .compare-bar-track i {
  background: var(--amber);
}

.compare-step {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.branch-card {
  --brand-color: var(--blue);
  position: relative;
  min-height: 258px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  animation: rise 0.42s ease both;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.branch-card:nth-child(1) { animation-delay: 0.04s; }
.branch-card:nth-child(2) { animation-delay: 0.1s; }
.branch-card:nth-child(3) { animation-delay: 0.16s; }
.branch-card:nth-child(4) { animation-delay: 0.22s; }

.branch-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-color);
}

.branch-card::after {
  content: "";
  position: absolute;
  inset: 4px 0 auto 0;
  height: 72px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-color) 12%, transparent), transparent);
  opacity: 0.86;
  pointer-events: none;
}

.branch-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand-color) 55%, var(--line));
  box-shadow: 0 18px 44px rgba(17, 20, 24, 0.12);
}

.branch-A { --brand-color: var(--blue); }
.branch-B { --brand-color: var(--red); }
.branch-C { --brand-color: var(--green); }
.branch-D { --brand-color: var(--amber); }

.branch-card.branch-D {
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0) 42%),
    #fff;
}

.branch-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 4px 0 18px;
  padding: 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-color) 12%, #fff);
  color: color-mix(in srgb, var(--brand-color) 76%, var(--ink));
  font-size: 12px;
  font-weight: 800;
}

.branch-name {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.28;
  font-weight: 800;
}

.branch-summary {
  position: relative;
  z-index: 1;
  min-height: 72px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.branch-proof {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0 0 14px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--brand-color) 7%, #fff);
}

.branch-proof span {
  min-height: 22px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff;
  color: color-mix(in srgb, var(--brand-color) 76%, var(--ink));
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.branch-proof em {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branch-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-dim);
  font-size: 12px;
}

.branch-stats b {
  color: var(--ink);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.detail-side,
.detail-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.branch-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(31, 38, 50, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, #101114 0, #1f2732 54%, #243746 100%),
    linear-gradient(90deg, rgba(26, 115, 232, 0.28), rgba(7, 193, 96, 0.18));
  box-shadow: var(--shadow);
}

.branch-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
}

.branch-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  animation: fadeIn 0.32s ease both;
}

.branch-image-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  animation: dim 1.8s ease-in-out infinite;
}

@keyframes dim {
  50% { opacity: 0.55; }
}

.branch-image.error .branch-image-placeholder {
  color: #fff;
  background: rgba(254, 44, 85, 0.22);
  animation: none;
}

.image-download-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.branch-image:hover .image-download-btn:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

.image-download-btn:hover {
  background: rgba(17, 20, 24, 0.9);
}

.branch-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid var(--lilac-line);
  border-radius: 999px;
  background: var(--lilac-bg);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
}

.detail-title {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.24;
  font-weight: 800;
}

.detail-summary {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.card.warn {
  border-color: rgba(254, 44, 85, 0.28);
  background:
    linear-gradient(180deg, rgba(254, 44, 85, 0.05), rgba(255, 255, 255, 0) 44%),
    #fff;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.card-title .kicker {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.card-sub {
  margin: 0 0 14px;
  color: var(--ink-dim);
  font-size: 13px;
}

.score-list {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.score-list li {
  display: grid;
  grid-template-columns: minmax(76px, 104px) 1fr 34px;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.score-list li:last-child { border-bottom: 0; }
.score-list .score-label { color: var(--ink-soft); }

.brief-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.brief-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.brief-kicker {
  margin: 0 0 4px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brief-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.brief-fill-btn {
  flex: 0 0 auto;
}

.brief-situation {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

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

.brief-block {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(248, 252, 250, 0.76);
}

.brief-block h3 {
  margin: 0 0 8px;
  color: #158365;
  font-size: 12px;
  font-weight: 800;
}

.brief-block ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brief-block li,
.brief-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.brief-block li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: var(--green);
}

.score-bar,
.risk-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-3);
}

.score-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 0.45s ease;
}

.score-num,
.slider-num {
  color: var(--ink);
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.verdict {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--lilac-bg);
  color: var(--blue-deep);
  font-size: 13px;
  line-height: 1.7;
}

.branch-evidence {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.evidence-confidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.evidence-confidence b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.evidence-block {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.evidence-block h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.evidence-block ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-block li,
.evidence-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.evidence-block li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: var(--green);
}

.action-evidence {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.action-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.action-evidence-head span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.action-evidence-head b {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #effaf5;
  color: #11664f;
  font-family: var(--mono);
  font-size: 12px;
}

.action-evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sliders {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.slider-row {
  display: grid;
  grid-template-columns: 86px 1fr 32px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.slider-row label {
  color: var(--ink-soft);
}

.slider-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  outline: 0;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--red));
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(17, 20, 24, 0.2);
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
}

.risk-meter {
  margin-top: 15px;
}

.risk-fill {
  width: 30%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.32s ease, background 0.32s ease;
}

.risk-fill.warn { background: var(--amber); }
.risk-fill.danger { background: var(--red); }

.risk-tip {
  min-height: 36px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.risk-tip.warn { color: #a16207; }
.risk-tip.danger { color: var(--red); }
.risk-tip.ok { color: #087b42; }
.risk-tip.loading { animation: typing-pulse 1.2s ease-in-out infinite; }

.timeline {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 9px;
  width: 2px;
  border-radius: 999px;
  background: var(--line-strong);
}

.timeline li {
  position: relative;
  padding: 0 0 22px 30px;
  animation: rise 0.32s ease both;
}

.timeline li:last-child { padding-bottom: 2px; }

.timeline li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px #fff;
}

.timeline li.warn::before { border-color: var(--amber); }
.timeline li.danger::before { border-color: var(--red); }

.timeline-day {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.timeline-event {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.timeline-meta {
  margin-top: 4px;
  color: var(--ink-dim);
  font-size: 12px;
}

.chat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-tab {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.chat-tab:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.chat-tab.active {
  border-color: rgba(7, 193, 96, 0.36);
  background: rgba(7, 193, 96, 0.1);
  color: #087b42;
}

.chat-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
  max-height: 340px;
  margin-bottom: 12px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    var(--bg-2);
}

.bubble {
  max-width: min(86%, 560px);
  padding: 10px 13px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.68;
  animation: bubbleIn 0.22s ease both;
  overflow-wrap: anywhere;
}

.bubble.future {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-top-left-radius: 5px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.bubble.me {
  align-self: flex-end;
  border-top-right-radius: 5px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(7, 193, 96, 0.18);
}

.bubble .who {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 800;
}

.bubble.future .who { color: var(--blue); }
.bubble.me .who { color: rgba(255, 255, 255, 0.76); }

.bubble.system {
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-soft);
}

.bubble.typing .bubble-text {
  display: inline-block;
  animation: typing-pulse 1.2s ease-in-out infinite;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typing-pulse {
  50% { opacity: 0.45; }
}

.chat-input {
  display: flex;
  gap: 8px;
}

.chat-input input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.chat-input input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.chat-input input::placeholder {
  color: var(--ink-faint);
}

.chat-input button {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 800;
}

.chat-input button:hover {
  background: var(--blue);
}

.chat-input input:disabled,
.chat-input button:disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chat-quick .chip {
  font-size: 11px;
}

.card.warn .card-title {
  color: var(--red);
}

.card.warn .card-title .kicker {
  color: var(--red);
  background: rgba(254, 44, 85, 0.1);
}

.card.warn p {
  margin: 0;
  padding: 12px;
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
  background: rgba(254, 44, 85, 0.07);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.plan-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-grid li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.plan-grid li:last-child {
  border-bottom: 0;
}

.plan-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--blue);
  border-radius: 3px;
}

.card.warn li::before {
  border-color: var(--red);
  background: rgba(254, 44, 85, 0.12);
}

.plan-loading {
  color: var(--ink-dim);
  animation: typing-pulse 1.2s ease-in-out infinite;
}

.plan-grid li.add-row {
  border-bottom: 0;
  border-radius: var(--radius-sm);
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.plan-grid li.add-row::before {
  content: "+";
  top: 10px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
}

.plan-grid li.add-row:hover {
  background: var(--lilac-bg);
  color: var(--blue);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 99;
  max-width: min(640px, calc(100vw - 28px));
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(70px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
}

.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 20, 24, 0.36);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
}

.drawer-panel {
  position: relative;
  width: 440px;
  max-width: 94vw;
  height: 100%;
  padding: 28px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
  animation: drawerIn 0.24s ease both;
}

@keyframes drawerIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

.drawer-panel h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.28;
  font-weight: 800;
}

.drawer-sub,
.history-empty {
  margin: 0 0 20px;
  color: var(--ink-dim);
  font-size: 13px;
}

.drawer-panel label {
  display: block;
  margin: 14px 0 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.drawer-panel input[type="text"],
.drawer-panel input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}

.drawer-panel input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.drawer-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.toggle {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.toggle input {
  accent-color: var(--blue);
}

.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.drawer-section {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.drawer-section h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 64vh;
  margin: 18px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.history-item {
  position: relative;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.history-item:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: var(--shadow);
}

.history-meta,
.history-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.history-topic {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.history-when,
.history-branches {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
}

.history-input {
  display: -webkit-box;
  margin: 6px 0 8px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-delete {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.history-delete:hover {
  background: var(--danger-soft);
  color: var(--red);
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(245, 247, 251, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: fadeIn 0.18s ease both;
}

.loader-ink {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
}

.ink-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(17, 20, 24, 0.12);
  border-top-color: var(--blue);
  border-right-color: var(--green);
  border-radius: 50%;
  animation: spin 1.05s linear infinite;
}

.ink-sweep {
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(254, 44, 85, 0.16);
  border-bottom-color: var(--red);
  border-radius: 50%;
  animation: spin 1.45s linear infinite reverse;
}

.ink-bloom {
  position: absolute;
  inset: 27px;
  border-radius: 8px;
  background: var(--ink);
  box-shadow:
    -11px -9px 0 var(--green),
    12px -9px 0 var(--blue),
    0 12px 0 var(--red);
  animation: pulse 1.35s ease-in-out infinite;
}

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

@keyframes pulse {
  50% { transform: scale(0.82); opacity: 0.72; }
}

.loader-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.loader-ellipsis {
  display: inline-flex;
  gap: 2px;
}

.loader-ellipsis i {
  color: var(--blue);
  font-style: normal;
  animation: ellipsis-fade 1.2s ease-in-out infinite;
}

.loader-ellipsis i:nth-child(2) { animation-delay: 0.16s; }
.loader-ellipsis i:nth-child(3) { animation-delay: 0.32s; }

@keyframes ellipsis-fade {
  50% { opacity: 0.28; }
}

.loader-sub {
  margin: 0;
  color: var(--ink-dim);
  font-size: 13px;
}

.empty-state {
  padding: 34px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-dim);
  text-align: center;
}

.editable {
  position: relative;
  border-radius: 5px;
  cursor: text;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.editable:hover {
  background: rgba(26, 115, 232, 0.08);
  box-shadow: inset 0 -1px 0 var(--blue);
}

.editable.editing,
.editable[contenteditable="true"]:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(26, 115, 232, 0.1);
}

.editable-multi {
  white-space: pre-wrap;
}

.editable-num {
  display: inline-block;
  min-width: 26px;
  text-align: right;
}

.score-input {
  width: 42px;
  padding: 2px 5px;
  border: 1px solid var(--blue);
  border-radius: 5px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.api-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--lilac-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.api-banner::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 12px 0 0 var(--green), 24px 0 0 var(--red);
  flex: 0 0 auto;
}

.api-banner-text {
  flex: 1;
  color: var(--ink-soft);
  font-size: 13px;
}

.api-banner-text b {
  color: var(--ink);
}

.api-banner .ghost-btn {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
}

.api-banner-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  font-size: 18px;
  cursor: pointer;
}

.api-banner-close:hover {
  background: var(--bg-2);
  color: var(--ink);
}

.regen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.regen-btn::before {
  content: "↻";
  color: var(--amber);
  font-weight: 900;
}

.regen-btn:hover {
  border-color: var(--amber);
  background: var(--warm-soft);
  color: #a16207;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.12);
}

.regen-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.regen-btn.regen-inline {
  min-height: 30px;
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

#counterfactual.loading {
  opacity: 0.68;
  animation: typing-pulse 1.2s ease-in-out infinite;
}

.future-edit-strip {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.future-edit-strip summary {
  cursor: pointer;
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.future-edit-strip[open] summary {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
}

.future-edit-strip .fe-block {
  margin-top: 10px;
  color: var(--ink);
  font-size: 13px;
}

.future-edit-strip .fe-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 800;
}

.future-edit-strip .fe-text {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #fff;
}

.chat-box::-webkit-scrollbar,
.history-list::-webkit-scrollbar,
.drawer-panel::-webkit-scrollbar {
  width: 8px;
}

.chat-box::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.drawer-panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(108, 116, 128, 0.35);
  background-clip: content-box;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .steps {
    grid-column: 1 / -1;
    order: 3;
    justify-self: stretch;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .life-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-row {
    grid-template-columns: minmax(190px, 1.1fr) 90px repeat(3, minmax(92px, 0.8fr));
  }

  .compare-step {
    grid-column: 1 / -1;
    padding-left: 45px;
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 12px 16px;
  }

  .brand-sub {
    display: none;
  }

  .view {
    padding: 42px 16px 70px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-tag {
    font-size: 16px;
  }

  .view-title {
    font-size: 28px;
  }

  .input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .input-row .primary-btn {
    width: 100%;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .compare-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-summary {
    justify-content: flex-start;
  }

  .compare-row {
    grid-template-columns: minmax(0, 1fr) 86px;
  }

  .compare-bar,
  .compare-step {
    grid-column: 1 / -1;
  }

  .compare-step {
    padding-left: 45px;
  }
}

@media (max-width: 640px) {
  .topbar-right {
    gap: 6px;
  }

  .reset-btn {
    padding: 7px 10px;
  }

  .steps .step {
    min-height: 30px;
    padding: 0 11px;
  }

  .hero-title {
    font-size: 34px;
  }

  .hero-eyebrow .rule {
    width: 18px;
  }

  .entry-switch {
    width: 100%;
  }

  .entry-mode-btn {
    flex: 1;
    min-width: 0;
  }

  .choice-wrap,
  .input-wrap {
    padding: 14px;
  }

  .choice-followup-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .brief-head,
  .action-evidence-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .choice-start-row,
  .choice-start-row .primary-btn {
    width: 100%;
  }

  .choice-start-row .primary-btn {
    justify-content: center;
  }

  .life-choice-grid,
  .branch-grid,
  .brief-grid,
  .evidence-grid,
  .action-evidence-grid,
  .plan-grid,
  .radar-grid {
    grid-template-columns: 1fr;
  }

  .branch-stats {
    grid-template-columns: 1fr;
  }

  .branch-proof {
    grid-template-columns: 1fr;
  }

  .branch-proof em {
    white-space: normal;
  }

  .branch-compare {
    margin-top: 18px;
  }

  .compare-head,
  .compare-row {
    padding-left: 14px;
    padding-right: 14px;
  }

  .compare-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .compare-index {
    justify-content: space-between;
    width: 100%;
  }

  .compare-step {
    padding-left: 0;
  }

  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .action-row > * {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .chat-input {
    flex-direction: column;
  }

  .chat-input button {
    width: 100%;
  }

  .score-list li,
  .slider-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .score-num,
  .slider-num {
    text-align: left;
  }

  .drawer-panel {
    width: 100%;
    max-width: 100%;
    padding: 22px 16px;
  }
}

/* Fresh UI refresh */
:root {
  --bg-0: #f7fbf8;
  --bg-1: #ffffff;
  --bg-2: #eef7f4;
  --bg-3: #dcece7;
  --bg-warm: #fff7e8;

  --ink: #18312c;
  --ink-soft: #41534d;
  --ink-dim: #687a74;
  --ink-faint: #9aaba5;

  --blue: #3e86f5;
  --blue-deep: #1f5fbf;
  --green: #22b573;
  --red: #ff6b6b;
  --cyan: #22b8c7;
  --amber: #f5b84b;
  --violet: #8f7aea;

  --lilac: var(--blue);
  --lilac-deep: var(--blue-deep);
  --lilac-soft: #c9dcff;
  --lilac-bg: #edf6ff;
  --lilac-line: #cbe0ff;
  --lilac-faint: rgba(62, 134, 245, 0.1);

  --line: #dbe9e4;
  --line-soft: #edf4f1;
  --line-strong: #c8dcd5;

  --shadow-sm: 0 1px 2px rgba(24, 49, 44, 0.05), 0 8px 22px rgba(24, 49, 44, 0.04);
  --shadow: 0 18px 48px rgba(24, 49, 44, 0.1);
  --shadow-lg: 0 28px 72px rgba(24, 49, 44, 0.16);
}

html {
  background: var(--bg-0);
}

html,
body {
  width: 100%;
  max-width: 100%;
}

body {
  background-color: var(--bg-0);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0.46) 280px, rgba(247, 251, 248, 0) 620px),
    linear-gradient(120deg, rgba(34, 181, 115, 0.12) 0, rgba(34, 181, 115, 0) 34%),
    linear-gradient(300deg, rgba(62, 134, 245, 0.12) 0, rgba(62, 134, 245, 0) 32%),
    linear-gradient(180deg, #f7fbf8 0, #eef7f4 56%, #fffaf0 100%);
}

#app,
#app * {
  min-width: 0;
}

.grain {
  opacity: 0.42;
  background-image:
    repeating-linear-gradient(0deg, rgba(24, 49, 44, 0.035) 0, rgba(24, 49, 44, 0.035) 1px, transparent 1px, transparent 28px),
    repeating-linear-gradient(90deg, rgba(24, 49, 44, 0.025) 0, rgba(24, 49, 44, 0.025) 1px, transparent 1px, transparent 28px);
}

.vignette {
  background:
    linear-gradient(180deg, rgba(247, 251, 248, 0) 0, rgba(247, 251, 248, 0.6) 84%, #f7fbf8 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 82%, rgba(255, 255, 255, 0.42));
}

.topbar {
  min-height: 72px;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(200, 220, 213, 0.78);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(24, 49, 44, 0.06);
}

.brand {
  gap: 11px;
}

.brand-dot {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(34, 181, 115, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff 0 48%, #e9f8f1 48% 100%);
  box-shadow: 0 10px 24px rgba(34, 181, 115, 0.16);
}

.brand-dot::before {
  left: 7px;
  background: var(--blue);
  box-shadow: 9px 9px 0 var(--red);
}

.brand-dot::after {
  right: 7px;
  background: var(--green);
}

.brand-name {
  color: #12312b;
}

.brand-sub {
  color: #78908a;
}

.steps {
  gap: 3px;
  border-color: rgba(200, 220, 213, 0.82);
  background: rgba(238, 247, 244, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 20px rgba(24, 49, 44, 0.04);
}

.steps .step {
  min-height: 34px;
  color: #6e837c;
}

.steps .step.current {
  color: #fff;
  background: linear-gradient(135deg, #1f776a, #2f86df);
  box-shadow: 0 9px 22px rgba(47, 134, 223, 0.2);
}

.reset-btn,
.ghost-btn,
.regen-btn,
.chat-input button,
.primary-btn {
  border-radius: 8px;
}

.reset-btn,
.ghost-btn,
.regen-btn {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.reset-btn:hover,
.ghost-btn:hover {
  border-color: rgba(34, 181, 115, 0.44);
  color: #11664f;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(34, 181, 115, 0.12);
}

.primary-btn {
  min-height: 44px;
  border: 1px solid rgba(31, 119, 106, 0.16);
  background: linear-gradient(135deg, #177d6a, #2f83df);
  box-shadow: 0 16px 34px rgba(47, 131, 223, 0.22);
}

.primary-btn::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
}

.primary-btn:hover {
  box-shadow: 0 20px 44px rgba(47, 131, 223, 0.26);
}

.regen-btn::before {
  color: var(--green);
}

.regen-btn:hover {
  border-color: rgba(245, 184, 75, 0.72);
  background: rgba(255, 247, 232, 0.92);
  color: #9a690c;
  box-shadow: 0 12px 28px rgba(245, 184, 75, 0.16);
}

.view {
  min-height: calc(100vh - 72px);
  padding: 64px 28px 92px;
}

.view-input {
  align-items: flex-start;
  padding-top: 54px;
}

.hero {
  position: relative;
  width: min(1040px, 100%);
}

.hero-eyebrow {
  margin-bottom: 14px;
  color: #1f8c6c;
}

.hero-eyebrow .rule {
  width: 28px;
  opacity: 0.35;
}

.hero-tag {
  color: var(--ink-dim);
  font-size: 18px;
}

.hero-title {
  margin-bottom: 28px;
  color: #112c27;
  font-size: 58px;
  font-weight: 850;
}

.hero-foot {
  color: #78908a;
}

.entry-switch {
  margin-bottom: 18px;
  border-color: rgba(200, 220, 213, 0.9);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.entry-mode-btn {
  color: #667b74;
}

.entry-mode-btn.active {
  color: #fff;
  background: #173f38;
  box-shadow: 0 10px 24px rgba(24, 49, 44, 0.18);
}

.input-wrap,
.choice-wrap {
  border-color: rgba(200, 220, 213, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84)),
    #fff;
  box-shadow: 0 18px 58px rgba(24, 49, 44, 0.1);
}

.input-wrap {
  padding: 22px;
}

.input-wrap:focus-within {
  border-color: rgba(34, 181, 115, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 181, 115, 0.11), 0 18px 58px rgba(24, 49, 44, 0.1);
}

.decision-input {
  min-height: 136px;
  color: var(--ink);
}

.decision-input::placeholder,
.choice-detail-input::placeholder,
.chat-input input::placeholder {
  color: #9aaba5;
}

.input-row {
  border-top-color: var(--line-soft);
}

.suggest-label,
.choice-panel-head,
.choice-followup-sub,
.hint {
  color: var(--ink-dim);
}

.chip {
  border-color: #dcece7;
  background: rgba(255, 255, 255, 0.88);
  color: #41534d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.chip:hover {
  border-color: rgba(34, 181, 115, 0.52);
  color: #0d7055;
  background: #effaf5;
}

.choice-wrap {
  padding: 20px;
}

.choice-panel-head {
  margin-bottom: 16px;
}

.choice-panel-head span:first-child {
  color: var(--ink);
}

.life-choice-grid {
  gap: 14px;
}

.life-choice-card {
  min-height: 236px;
  padding: 14px;
  border-color: #dcece7;
  background:
    linear-gradient(180deg, #ffffff, #f8fcfa),
    #fff;
  box-shadow: var(--shadow-sm);
}

.life-choice-card:hover,
.life-choice-card.selected {
  transform: translateY(-4px);
  border-color: rgba(34, 181, 115, 0.62);
  box-shadow: 0 20px 46px rgba(24, 49, 44, 0.13);
}

.life-choice-card.selected {
  background:
    linear-gradient(180deg, rgba(239, 250, 245, 0.9), rgba(255, 255, 255, 0.96)),
    #fff;
}

.life-choice-scene {
  height: 104px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: linear-gradient(180deg, #e9f8ff, #dff6ec);
  box-shadow: inset 0 -18px 40px rgba(24, 49, 44, 0.06);
}

.scene-city .life-choice-scene {
  background:
    linear-gradient(180deg, #e9f6ff 0, #cfeaff 58%, #e8f7ef 58% 100%);
}

.scene-town .life-choice-scene {
  background:
    linear-gradient(180deg, #fff7d7 0, #f1f9df 48%, #dff3e8 48% 100%);
}

.scene-road .life-choice-scene {
  background:
    linear-gradient(180deg, #dcf7ff 0, #d7f5ec 54%, #fff1df 54% 100%);
}

.scene-market .life-choice-scene {
  background:
    linear-gradient(180deg, #fff0e7 0, #ffe0cf 52%, #f7f3df 52% 100%);
}

.scene-mark {
  background: rgba(255, 255, 255, 0.82);
  color: #173f38;
  box-shadow: 0 6px 14px rgba(24, 49, 44, 0.08);
}

.scene-line {
  background: rgba(24, 49, 44, 0.18);
}

.scene-line.one {
  height: 3px;
  background: rgba(24, 49, 44, 0.2);
}

.scene-line.two {
  background: rgba(24, 49, 44, 0.14);
}

.scene-shape.main {
  right: 16px;
  bottom: 18px;
  width: 38px;
  height: 48px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(34, 181, 115, 0.24));
  box-shadow: -26px 14px 0 rgba(62, 134, 245, 0.22);
}

.scene-shape.aux {
  right: 62px;
  bottom: 18px;
  width: 22px;
  height: 30px;
  border-radius: 8px 8px 2px 2px;
  background: rgba(255, 255, 255, 0.72);
}

.scene-road .scene-shape.main {
  width: 72px;
  height: 14px;
  right: 20px;
  bottom: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: -36px 13px 0 rgba(34, 181, 115, 0.2);
}

.scene-road .scene-shape.aux {
  width: 18px;
  height: 18px;
  right: 32px;
  bottom: 44px;
  border-radius: 50%;
  background: #ff9a7d;
}

.scene-market .scene-shape.main {
  background: linear-gradient(180deg, #fff, rgba(245, 184, 75, 0.36));
  box-shadow: -28px 12px 0 rgba(255, 107, 107, 0.18);
}

.life-choice-title {
  color: #17312c;
  font-size: 17px;
}

.life-choice-caption {
  color: #687a74;
}

.life-choice-action {
  color: #158365;
}

.choice-followup {
  border-color: rgba(34, 181, 115, 0.25);
  background:
    linear-gradient(135deg, rgba(34, 181, 115, 0.1), rgba(62, 134, 245, 0.08)),
    rgba(255, 255, 255, 0.9);
}

.choice-followup-head span:last-child {
  color: #158365;
}

.choice-detail-input,
.chat-input input,
.drawer-panel input[type="text"],
.drawer-panel input[type="password"] {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
}

.choice-detail-input:focus,
.chat-input input:focus,
.drawer-panel input:focus {
  border-color: rgba(34, 181, 115, 0.64);
  box-shadow: 0 0 0 4px rgba(34, 181, 115, 0.11);
}

.act-mark {
  color: #158365;
}

.view-title {
  color: #17312c;
}

.view-sub {
  color: var(--ink-dim);
}

.view-sub em {
  color: #df5f53;
}

.radar-grid,
.branch-grid,
.plan-grid {
  gap: 16px;
}

.radar-cell,
.branch-card,
.card,
.branch-compare,
.empty-state,
.api-banner,
.history-item {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.radar-cell {
  min-height: 138px;
  padding: 20px;
}

.radar-cell::before {
  height: 5px;
  background: linear-gradient(90deg, var(--cell-color, var(--green)), rgba(255, 255, 255, 0));
}

.radar-cell:hover {
  border-color: rgba(34, 181, 115, 0.44);
  box-shadow: var(--shadow);
}

.radar-label {
  color: #1f8c6c;
}

.radar-value {
  color: var(--ink);
}

.branch-compare {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 252, 250, 0.94)),
    #fff;
}

.compare-head {
  border-bottom-color: var(--line-soft);
}

.compare-kicker {
  color: var(--ink-faint);
}

.compare-summary span {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.86);
}

.compare-summary b {
  background: #173f38;
}

.compare-row {
  border-bottom-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.72);
}

.compare-row:hover {
  background: color-mix(in srgb, var(--brand-color) 9%, #ffffff);
}

.compare-code {
  border-radius: 8px;
}

.branch-card {
  min-height: 266px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 250, 0.92)),
    #fff;
}

.branch-card::before {
  height: 5px;
  background: linear-gradient(90deg, var(--brand-color), rgba(255, 255, 255, 0));
}

.branch-card::after {
  top: auto;
  right: 18px;
  bottom: 18px;
  left: auto;
  width: 76px;
  height: 48px;
  border: 1px solid color-mix(in srgb, var(--brand-color) 20%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-color) 14%, transparent), transparent 66%),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--brand-color) 16%, transparent) 0, color-mix(in srgb, var(--brand-color) 16%, transparent) 1px, transparent 1px, transparent 12px);
  opacity: 0.55;
}

.branch-card:hover {
  box-shadow: 0 22px 52px rgba(24, 49, 44, 0.14);
}

.branch-A { --brand-color: #3e86f5; }
.branch-B { --brand-color: #ff6b6b; }
.branch-C { --brand-color: #22b573; }
.branch-D { --brand-color: #f5b84b; }

.branch-card.branch-D {
  background:
    linear-gradient(180deg, rgba(255, 247, 232, 0.74), rgba(255, 255, 255, 0.95) 46%),
    #fff;
}

.branch-tag,
.branch-pill {
  border-color: color-mix(in srgb, var(--brand-color, var(--green)) 20%, #ffffff);
  background: color-mix(in srgb, var(--brand-color, var(--green)) 12%, #ffffff);
  color: color-mix(in srgb, var(--brand-color, var(--green)) 74%, #17312c);
}

.branch-name,
.detail-title,
.card-title,
.compare-head h3 {
  color: #17312c;
}

.branch-summary,
.detail-summary,
.timeline-event,
.risk-tip,
.compare-step {
  color: var(--ink-soft);
}

.branch-stats {
  border-top-color: var(--line-soft);
  color: var(--ink-dim);
}

.detail-layout {
  gap: 24px;
}

.branch-image {
  border-color: rgba(24, 49, 44, 0.12);
  background:
    linear-gradient(180deg, #dff6ff 0, #e9f8ef 54%, #fff3df 54% 100%);
  box-shadow: var(--shadow);
}

.branch-image::before {
  background-image:
    linear-gradient(90deg, rgba(24, 49, 44, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(24, 49, 44, 0.045) 1px, transparent 1px);
  opacity: 0.7;
}

.branch-image-placeholder {
  color: #49665e;
}

.image-download-btn {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(24, 49, 44, 0.76);
}

.detail-summary {
  border-color: var(--line);
  border-left-color: var(--green);
  background: rgba(255, 255, 255, 0.9);
}

.life-judgement {
  border-color: rgba(245, 184, 75, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 247, 232, 0.9), rgba(239, 250, 245, 0.9)),
    #fff;
}

.life-judgement-label {
  color: #b77b12;
}

.card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
}

.card.warn {
  border-color: rgba(255, 107, 107, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 107, 107, 0.06), rgba(255, 255, 255, 0) 44%),
    rgba(255, 255, 255, 0.94);
}

.card-title {
  border-bottom-color: var(--line-soft);
}

.card-title .kicker {
  background: #effaf5;
  color: #158365;
}

.card-sub {
  color: var(--ink-dim);
}

.score-bar,
.risk-meter {
  background: #e3efea;
}

.score-bar > span {
  background: linear-gradient(90deg, #22b573, #3e86f5);
}

.slider-row input[type="range"] {
  background: linear-gradient(90deg, #22b573, #f5b84b, #ff6b6b);
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  background: #173f38;
  box-shadow: 0 7px 16px rgba(24, 49, 44, 0.22);
}

.slider-row input[type="range"]::-moz-range-thumb {
  background: #173f38;
}

.risk-fill {
  background: var(--green);
}

.risk-fill.warn { background: var(--amber); }
.risk-fill.danger { background: var(--red); }

.risk-tip.warn { color: #9a690c; }
.risk-tip.danger { color: #df5f53; }
.risk-tip.ok { color: #0d7055; }

.verdict {
  background: #effaf5;
  color: #11664f;
}

.timeline::before {
  background: #d8ebe4;
}

.timeline li::before {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 5px #fff;
}

.timeline li.warn::before { border-color: var(--amber); }
.timeline li.danger::before { border-color: var(--red); }

.timeline-day {
  color: #158365;
}

.timeline-meta,
.compare-identity em,
.compare-index em,
.compare-bar-label,
.compare-bar-num,
.history-when,
.history-branches {
  color: var(--ink-dim);
}

.chat-tab {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.chat-tab:hover {
  border-color: rgba(62, 134, 245, 0.44);
  color: var(--blue-deep);
}

.chat-tab.active {
  border-color: rgba(34, 181, 115, 0.36);
  background: rgba(34, 181, 115, 0.1);
  color: #0d7055;
}

.chat-box {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.1)),
    repeating-linear-gradient(0deg, rgba(24, 49, 44, 0.035) 0, rgba(24, 49, 44, 0.035) 1px, transparent 1px, transparent 26px),
    #f2f8f5;
}

.bubble {
  border-radius: 8px;
}

.bubble.future {
  border-color: var(--line);
  border-top-left-radius: 3px;
  background: #fff;
}

.bubble.me {
  border-top-right-radius: 3px;
  background: linear-gradient(135deg, #1f9c73, #2f83df);
  box-shadow: 0 12px 26px rgba(47, 131, 223, 0.18);
}

.bubble.future .who {
  color: #158365;
}

.bubble.system {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
}

.chat-input button {
  border: 0;
  background: #173f38;
}

.chat-input button:hover {
  background: #1f776a;
}

.card.warn .card-title {
  color: #df5f53;
}

.card.warn .card-title .kicker {
  color: #df5f53;
  background: rgba(255, 107, 107, 0.12);
}

.card.warn p {
  border-left-color: var(--red);
  background: rgba(255, 107, 107, 0.08);
}

.plan-grid li {
  border-bottom-color: var(--line-soft);
}

.plan-grid li::before {
  border-color: var(--green);
  background: rgba(34, 181, 115, 0.08);
}

.card.warn li::before {
  border-color: var(--red);
  background: rgba(255, 107, 107, 0.12);
}

.plan-grid li.add-row::before {
  color: #158365;
}

.plan-grid li.add-row:hover {
  background: #effaf5;
  color: #0d7055;
}

.toast {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(23, 63, 56, 0.94);
}

.drawer-mask {
  background: rgba(24, 49, 44, 0.28);
}

.drawer-panel {
  border-left-color: var(--line);
  background: rgba(255, 255, 255, 0.95);
}

.drawer-panel h3,
.history-topic {
  color: #17312c;
}

.drawer-sub,
.history-empty,
.history-input {
  color: var(--ink-dim);
}

.history-item:hover {
  border-color: rgba(34, 181, 115, 0.52);
}

.history-delete:hover {
  background: rgba(255, 107, 107, 0.1);
  color: #df5f53;
}

.loading {
  background: rgba(247, 251, 248, 0.82);
}

.ink-ring {
  border-color: rgba(24, 49, 44, 0.12);
  border-top-color: var(--green);
  border-right-color: var(--blue);
}

.ink-sweep {
  border-color: rgba(245, 184, 75, 0.2);
  border-bottom-color: var(--amber);
}

.ink-bloom {
  border-radius: 8px;
  background: #173f38;
  box-shadow:
    -11px -9px 0 var(--green),
    12px -9px 0 var(--blue),
    0 12px 0 var(--red);
}

.loader-ellipsis i {
  color: var(--green);
}

.editable:hover {
  background: rgba(34, 181, 115, 0.08);
  box-shadow: inset 0 -1px 0 var(--green);
}

.editable.editing,
.editable[contenteditable="true"]:focus {
  outline-color: var(--green);
  box-shadow: 0 0 0 5px rgba(34, 181, 115, 0.11);
}

.api-banner {
  border-color: rgba(34, 181, 115, 0.24);
}

.api-banner::before {
  background: var(--green);
  box-shadow: 12px 0 0 var(--blue), 24px 0 0 var(--red);
}

.future-edit-strip {
  border-color: var(--line-strong);
  background: #f2f8f5;
}

.future-edit-strip[open] summary {
  border-bottom-color: var(--line);
  color: #158365;
}

@media (max-width: 1040px) {
  .topbar {
    padding: 12px 20px;
  }

  .hero {
    width: min(920px, 100%);
  }

  .life-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .view {
    padding: 46px 16px 76px;
  }

  .view-input {
    padding-top: 42px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-tag {
    font-size: 16px;
  }

  .view-title {
    font-size: 30px;
  }

  .input-wrap,
  .choice-wrap {
    box-shadow: 0 14px 38px rgba(24, 49, 44, 0.09);
  }
}

@media (max-width: 640px) {
  main,
  .topbar,
  .view {
    width: 100vw;
    max-width: 100vw;
  }

  .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 64px;
    padding: 10px 94px 10px 14px;
    overflow: hidden;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-right {
    display: none;
  }

  .topbar-right .reset-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .topbar-right .reset-btn::before {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
  }

  #historyBtn::before {
    content: "历";
  }

  #resetBtn::before {
    content: "重";
  }

  .steps {
    display: flex;
    flex: 0 0 100%;
    order: 3;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    overflow: hidden;
  }

  .steps .step {
    flex: 0 1 20%;
    width: 20%;
    max-width: 20%;
    min-width: 0;
    padding: 0 4px;
  }

  .steps .step em {
    font-size: 12px;
  }

  .reset-btn {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .brand-dot {
    width: 28px;
    height: 28px;
  }

  .view {
    padding: 36px 14px 64px;
  }

  .view-input {
    padding-top: 34px;
  }

  .hero-title {
    margin-bottom: 22px;
    font-size: 34px;
  }

  .hero,
  .input-wrap,
  .choice-wrap,
  .life-choice-grid,
  .life-choice-card,
  .entry-switch {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
    margin-right: auto;
    margin-left: auto;
  }

  .hero-tag,
  .hero-title {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-tag {
    max-width: 300px;
    padding: 0 10px;
    font-size: 15px;
    line-height: 1.7;
    word-break: break-word;
  }

  .entry-switch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
  }

  .entry-mode-btn {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
  }

  .hero-eyebrow {
    gap: 7px;
    font-size: 12px;
  }

  .hero-eyebrow .rule {
    width: 16px;
  }

  .input-wrap,
  .choice-wrap {
    max-width: calc(100vw - 28px) !important;
    padding: 14px;
    overflow: hidden;
  }

  .choice-panel-head {
    min-width: 0;
  }

  .choice-panel-head span:last-child {
    display: none;
  }

  .life-choice-grid {
    display: flex;
    flex-direction: column;
  }

  .life-choice-card {
    flex: 0 0 auto;
    max-width: calc(100vw - 56px) !important;
    min-height: 224px;
    overflow: hidden;
  }

  .life-choice-scene {
    width: 100%;
    max-width: 100%;
    height: 96px;
  }

  .card,
  .radar-cell,
  .branch-card {
    padding: 16px;
  }

  .branch-card {
    min-height: 238px;
  }
}

/* Premium finish layer */
:root {
  --bg-0: #f3f6f4;
  --bg-1: #ffffff;
  --bg-2: #edf3f0;
  --bg-3: #d7e4df;
  --bg-warm: #fff5e2;

  --ink: #101916;
  --ink-soft: #34423d;
  --ink-dim: #64736e;
  --ink-faint: #99a7a2;

  --blue: #2f72df;
  --blue-deep: #184f9f;
  --green: #168f66;
  --red: #e45f55;
  --cyan: #1fa6b5;
  --amber: #c8871d;
  --violet: #6657cf;

  --lilac-bg: #edf5ff;
  --lilac-line: #c9ddff;
  --line: #d7e1dc;
  --line-soft: #eaf0ed;
  --line-strong: #becdc7;

  --shadow-sm:
    0 1px 1px rgba(16, 25, 22, 0.04),
    0 10px 26px rgba(16, 25, 22, 0.055);
  --shadow:
    0 20px 56px rgba(16, 25, 22, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
  --shadow-lg:
    0 36px 90px rgba(16, 25, 22, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.62) inset;
}

body {
  background-color: var(--bg-0);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0, rgba(255, 255, 255, 0.54) 260px, rgba(243, 246, 244, 0) 680px),
    linear-gradient(112deg, rgba(22, 143, 102, 0.13) 0, rgba(22, 143, 102, 0) 34%),
    linear-gradient(292deg, rgba(47, 114, 223, 0.14) 0, rgba(47, 114, 223, 0) 32%),
    linear-gradient(18deg, rgba(228, 95, 85, 0.055), rgba(31, 166, 181, 0.045)),
    linear-gradient(180deg, #f3f6f4 0, #eef4f1 54%, #f7f2e8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(16, 25, 22, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 25, 22, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.08) 62%, transparent);
}

.grain {
  opacity: 0.34;
  background-image:
    repeating-linear-gradient(0deg, rgba(16, 25, 22, 0.026) 0, rgba(16, 25, 22, 0.026) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.32) 0, rgba(255, 255, 255, 0.32) 1px, transparent 1px, transparent 5px);
}

.vignette {
  background:
    linear-gradient(180deg, rgba(243, 246, 244, 0) 0, rgba(243, 246, 244, 0.52) 84%, #f3f6f4 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 19%, rgba(255, 255, 255, 0) 81%, rgba(255, 255, 255, 0.58));
}

.topbar {
  border-bottom-color: rgba(190, 205, 199, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 252, 250, 0.78));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 16px 38px rgba(16, 25, 22, 0.075);
}

.brand-dot {
  border-color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(135deg, #ffffff 0 45%, #e8f4ee 45% 100%);
  box-shadow:
    0 0 0 1px rgba(22, 143, 102, 0.16),
    0 13px 26px rgba(16, 25, 22, 0.12);
}

.steps {
  border-color: rgba(190, 205, 199, 0.72);
  background: rgba(241, 246, 243, 0.76);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 12px 26px rgba(16, 25, 22, 0.055);
}

.steps .step.current {
  background: linear-gradient(135deg, #10221d, #1a7561 52%, #2f72df);
  box-shadow: 0 12px 26px rgba(47, 114, 223, 0.22);
}

.reset-btn,
.ghost-btn,
.regen-btn {
  border-color: rgba(190, 205, 199, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 248, 0.82));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 10px 24px rgba(16, 25, 22, 0.055);
}

.primary-btn {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #101916 0, #176e5b 54%, #2f72df 100%);
  box-shadow:
    0 18px 38px rgba(47, 114, 223, 0.22),
    0 10px 24px rgba(16, 25, 22, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.primary-btn:hover {
  box-shadow:
    0 24px 52px rgba(47, 114, 223, 0.26),
    0 12px 28px rgba(16, 25, 22, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

.view {
  padding-top: 66px;
}

.view-input {
  padding-top: 44px;
}

.hero {
  width: min(1080px, 100%);
}

.hero-eyebrow {
  color: #176e5b;
}

.hero-title {
  margin-bottom: 24px;
  color: #0f211d;
  font-size: 64px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
}

.hero-tag {
  color: #52635d;
}

.entry-switch {
  margin-bottom: 20px;
  border-color: rgba(190, 205, 199, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 247, 0.76));
}

.hero-shell {
  position: relative;
  width: min(940px, 100%);
  margin: 0 auto;
}

.hero-instrument {
  position: relative;
  height: 174px;
  margin: 0 auto -28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #101916 0, #17352e 52%, #1e4260 100%);
  box-shadow:
    0 28px 66px rgba(16, 25, 22, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.hero-instrument::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.46) 72%, transparent);
}

.hero-instrument::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(22, 143, 102, 0.22), transparent 34%),
    linear-gradient(270deg, rgba(47, 114, 223, 0.24), transparent 38%),
    linear-gradient(180deg, transparent 68%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.instrument-map {
  position: absolute;
  left: 34px;
  top: 30px;
  z-index: 1;
  width: 410px;
  height: 112px;
}

.map-line,
.map-node {
  position: absolute;
  display: block;
}

.map-line {
  left: 58px;
  top: 55px;
  width: 250px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.08));
  transform-origin: left center;
}

.map-line-a { transform: rotate(-23deg); }
.map-line-b { transform: rotate(0deg); width: 282px; }
.map-line-c { transform: rotate(22deg); }
.map-line-d { transform: rotate(42deg); width: 220px; opacity: 0.72; }

.map-node {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: #101916;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.075);
}

.map-node-core {
  left: 48px;
  top: 48px;
  width: 20px;
  height: 20px;
  border-color: #ffffff;
  background: #168f66;
}

.map-node-a { left: 268px; top: 0; border-color: #61a0ff; }
.map-node-b { left: 336px; top: 49px; border-color: #ff8d82; }
.map-node-c { left: 270px; top: 98px; border-color: #56d6a4; }
.map-node-d { left: 218px; top: 122px; border-color: #f4bd61; }

.instrument-cards {
  position: absolute;
  top: 28px;
  right: 226px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(94px, 1fr));
  gap: 10px;
  width: 240px;
}

.instrument-card {
  min-height: 52px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.instrument-card b {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--mono);
  font-size: 12px;
}

.instrument-card i {
  display: block;
  height: 4px;
  margin-top: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.instrument-card i:first-of-type { width: 74%; }
.instrument-card i:last-of-type { width: 48%; }
.card-a { border-top-color: rgba(97, 160, 255, 0.72); }
.card-b { border-top-color: rgba(255, 141, 130, 0.72); }
.card-c { border-top-color: rgba(86, 214, 164, 0.72); }
.card-d { border-top-color: rgba(244, 189, 97, 0.72); }

.instrument-metrics {
  position: absolute;
  top: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
  width: 168px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.085);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.instrument-metrics span {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
}

.instrument-metrics b {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.instrument-metrics i {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.instrument-metrics i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, #56d6a4, #61a0ff);
}

.input-wrap,
.choice-wrap {
  position: relative;
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 250, 0.88)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 30px 76px rgba(16, 25, 22, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 0 0 1px rgba(190, 205, 199, 0.38);
}

.input-wrap::before,
.choice-wrap::before,
.card::before,
.radar-cell::after,
.brief-panel::before,
.action-evidence::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
  pointer-events: none;
}

.input-wrap:focus-within {
  border-color: rgba(22, 143, 102, 0.52);
  box-shadow:
    0 0 0 4px rgba(22, 143, 102, 0.11),
    0 30px 76px rgba(16, 25, 22, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

.decision-input {
  font-size: 18px;
}

.choice-wrap {
  max-width: 940px;
}

.life-choice-card,
.radar-cell,
.branch-card,
.card,
.brief-panel,
.branch-compare,
.action-evidence,
.empty-state,
.api-banner,
.history-item {
  position: relative;
  border-color: rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 252, 250, 0.82)),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    0 16px 38px rgba(16, 25, 22, 0.085),
    0 1px 0 rgba(255, 255, 255, 0.74) inset,
    0 0 0 1px rgba(190, 205, 199, 0.28);
}

.life-choice-card:hover,
.life-choice-card.selected,
.radar-cell:hover,
.branch-card:hover,
.history-item:hover {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 26px 62px rgba(16, 25, 22, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.76) inset,
    0 0 0 1px rgba(22, 143, 102, 0.18);
}

.life-choice-scene,
.branch-image {
  border-color: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 14px 34px rgba(16, 25, 22, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.56) inset;
}

.radar-cell::before {
  height: 4px;
  background: linear-gradient(90deg, var(--cell-color, var(--green)), rgba(255, 255, 255, 0) 78%);
}

.brief-block,
.evidence-block,
.evidence-confidence,
.compare-summary span,
.branch-proof,
.verdict,
.future-edit-strip,
.choice-followup {
  border-color: rgba(190, 205, 199, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 249, 247, 0.72));
}

.branch-card {
  min-height: 278px;
  padding: 24px;
}

.branch-card::before {
  inset: 0 auto 0 0;
  width: 5px;
  height: auto;
  background: linear-gradient(180deg, var(--brand-color), color-mix(in srgb, var(--brand-color) 16%, transparent));
}

.branch-card::after {
  right: 18px;
  bottom: 18px;
  width: 92px;
  height: 58px;
  border-color: color-mix(in srgb, var(--brand-color) 26%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-color) 15%, transparent), transparent 68%),
    linear-gradient(90deg, color-mix(in srgb, var(--brand-color) 18%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--brand-color) 12%, transparent) 1px, transparent 1px);
  background-size: auto, 13px 13px, 13px 13px;
  opacity: 0.68;
}

.branch-tag,
.branch-pill {
  border-color: color-mix(in srgb, var(--brand-color, var(--green)) 28%, #ffffff);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-color, var(--green)) 13%, #ffffff), rgba(255, 255, 255, 0.72));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

.branch-name,
.detail-title,
.view-title,
.card-title,
.compare-head h3 {
  color: #10211d;
}

.card {
  overflow: hidden;
}

.card-title {
  position: relative;
  z-index: 1;
}

.card-title .kicker {
  background:
    linear-gradient(180deg, #ffffff, #edf5f0);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 0 0 1px rgba(190, 205, 199, 0.45);
}

.chat-box {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.12)),
    linear-gradient(90deg, rgba(16, 25, 22, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 25, 22, 0.03) 1px, transparent 1px),
    #f1f6f3;
  background-size: auto, 28px 28px, 28px 28px, auto;
}

.bubble.future {
  box-shadow:
    0 10px 24px rgba(16, 25, 22, 0.075),
    0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

.bubble.me {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #176e5b, #2f72df);
}

.toast {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    rgba(16, 25, 22, 0.94);
}

@media (max-width: 1040px) {
  .hero-title {
    font-size: 54px;
  }

  .instrument-map {
    left: 24px;
    width: 360px;
  }

  .instrument-cards {
    right: 210px;
    width: 220px;
  }

  .instrument-metrics {
    right: 22px;
    width: 156px;
  }
}

@media (max-width: 900px) {
  .hero-title {
    font-size: 44px;
  }

  .hero-instrument {
    height: 150px;
    margin-bottom: -24px;
  }

  .instrument-map {
    transform: scale(0.84);
    transform-origin: left top;
  }

  .instrument-cards {
    right: 24px;
    width: 244px;
  }

  .instrument-metrics {
    display: none;
  }

  .input-wrap,
  .choice-wrap {
    box-shadow:
      0 22px 54px rgba(16, 25, 22, 0.13),
      0 1px 0 rgba(255, 255, 255, 0.82) inset;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .topbar {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 3px;
  }

  .steps .step {
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0 2px;
  }

  .steps .step em {
    font-size: 11px;
  }

  .hero-title {
    font-size: 36px;
  }

  .entry-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-mode-btn {
    padding: 0 4px;
    font-size: 12px;
  }

  .hero-shell {
    width: 100%;
  }

  .hero-instrument {
    height: 118px;
    margin-bottom: -18px;
  }

  .instrument-map {
    left: 10px;
    top: 22px;
    transform: scale(0.62);
    transform-origin: left top;
  }

  .instrument-cards {
    top: 18px;
    right: 12px;
    grid-template-columns: repeat(2, 76px);
    gap: 7px;
    width: auto;
  }

  .instrument-card {
    min-height: 40px;
    padding: 8px;
  }

  .instrument-card b {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .instrument-card i {
    height: 3px;
    margin-top: 4px;
  }

  .input-wrap,
  .choice-wrap {
    width: 100%;
    max-width: 100% !important;
  }

  .decision-input {
    font-size: 16px;
  }

  .hero-foot {
    max-width: 310px;
    margin-right: auto;
    margin-left: auto;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .branch-card {
    min-height: 246px;
    padding: 18px 18px 18px 20px;
  }
}

/* Premium homepage polish */
:root {
  --premium-ink: #0d1c18;
  --premium-ink-2: #132e28;
  --premium-jade: #168f66;
  --premium-mint: #5ed9ac;
  --premium-blue: #4f8df7;
  --premium-sky: #8bbcff;
  --premium-coral: #ff8b7d;
  --premium-amber: #f4c76a;
  --premium-surface: rgba(255, 255, 255, 0.86);
  --premium-line: rgba(173, 194, 186, 0.46);
  --premium-shadow: 0 34px 86px rgba(12, 30, 25, 0.16);
}

body {
  background-color: #f4f8f5;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0, rgba(246, 250, 248, 0.84) 34%, rgba(244, 248, 245, 0) 70%),
    linear-gradient(115deg, rgba(22, 143, 102, 0.13) 0, rgba(22, 143, 102, 0.02) 36%, transparent 62%),
    linear-gradient(288deg, rgba(79, 141, 247, 0.15) 0, rgba(79, 141, 247, 0.03) 34%, transparent 60%),
    linear-gradient(180deg, #f5faf7 0, #edf5f2 58%, #fbf7ec 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(13, 28, 24, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(13, 28, 24, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.16) 48%, transparent 82%);
}

.grain {
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(13, 28, 24, 0.12) 0, rgba(13, 28, 24, 0.12) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(13, 28, 24, 0.08) 0, rgba(13, 28, 24, 0.08) 1px, transparent 1px, transparent 5px);
}

.vignette {
  background:
    linear-gradient(180deg, rgba(244, 248, 245, 0) 0, rgba(244, 248, 245, 0.58) 76%, #f4f8f5 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0) 18%, rgba(255, 255, 255, 0) 82%, rgba(255, 255, 255, 0.68));
}

.topbar {
  min-height: 74px;
  border-bottom-color: rgba(173, 194, 186, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 252, 250, 0.74));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 44px rgba(13, 28, 24, 0.075);
}

.brand-dot {
  background:
    linear-gradient(135deg, #ffffff 0 43%, #e4f5ee 43% 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9) inset,
    0 0 0 1px rgba(22, 143, 102, 0.17),
    0 14px 30px rgba(13, 28, 24, 0.13);
}

.brand-name {
  color: var(--premium-ink);
  font-weight: 900;
}

.brand-sub {
  color: #70867d;
}

.steps {
  border-color: rgba(173, 194, 186, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(237, 245, 242, 0.76));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 12px 30px rgba(13, 28, 24, 0.06);
}

.steps .step.current {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 46%),
    linear-gradient(135deg, #0b1d19 0, #156d5a 58%, #386fd7 100%);
  box-shadow:
    0 13px 28px rgba(42, 111, 215, 0.22),
    0 7px 18px rgba(13, 28, 24, 0.18);
}

.reset-btn,
.ghost-btn,
.regen-btn {
  border-color: rgba(173, 194, 186, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 248, 0.8));
  color: #2d443c;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.84) inset,
    0 11px 25px rgba(13, 28, 24, 0.06);
}

.view-input {
  padding-top: 34px;
  padding-bottom: 90px;
}

.hero {
  width: min(1180px, 100%);
}

.hero-eyebrow {
  gap: 12px;
  margin-bottom: 16px;
  color: var(--premium-jade);
  font-size: 13px;
  text-transform: none;
}

.hero-eyebrow .rule {
  width: 44px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.hero-eyebrow .rule:last-child {
  background: linear-gradient(90deg, currentColor, transparent);
}

.hero-tag {
  max-width: 720px;
  margin-bottom: 8px;
  color: #53675f;
  font-size: 20px;
  font-weight: 500;
  text-wrap: balance;
}

.hero-title {
  margin-bottom: 26px;
  color: var(--premium-ink);
  font-size: 72px;
  line-height: 1.04;
  font-weight: 950;
  text-wrap: balance;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 24px 56px rgba(13, 28, 24, 0.13);
}

.entry-switch {
  margin-bottom: 24px;
  padding: 5px;
  border-color: rgba(173, 194, 186, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 247, 244, 0.72));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 14px 34px rgba(13, 28, 24, 0.08);
}

.entry-mode-btn {
  min-width: 118px;
  min-height: 40px;
  color: #5e746b;
}

.entry-mode-btn.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(135deg, #0d201b, #176e5b);
  color: #fff;
  box-shadow:
    0 11px 24px rgba(13, 28, 24, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.hero-shell {
  width: min(1080px, 100%);
}

.hero-shell::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 46px;
  height: 38px;
  border-radius: 50%;
  background: rgba(13, 28, 24, 0.16);
  filter: blur(24px);
  pointer-events: none;
}

.hero-instrument {
  height: 278px;
  margin-bottom: -78px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 46%),
    linear-gradient(110deg, rgba(94, 217, 172, 0.18) 0, transparent 35%),
    linear-gradient(290deg, rgba(139, 188, 255, 0.2) 0, transparent 34%),
    linear-gradient(135deg, #081914 0, #0f2b25 42%, #17364b 72%, #1e477d 100%);
  box-shadow:
    0 42px 95px rgba(13, 28, 24, 0.28),
    0 18px 42px rgba(49, 111, 209, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.hero-instrument::before {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.062) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.68) 68%, rgba(0, 0, 0, 0.28));
}

.hero-instrument::after {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.16) 0, transparent 24%, transparent 100%),
    linear-gradient(90deg, rgba(94, 217, 172, 0.18), transparent 32%),
    linear-gradient(270deg, rgba(139, 188, 255, 0.24), transparent 38%),
    linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.32));
}

.instrument-map {
  left: 46px;
  top: 50px;
  width: 500px;
  height: 172px;
}

.instrument-map::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 34px;
  width: 94px;
  height: 94px;
  border: 1px solid rgba(94, 217, 172, 0.18);
  border-radius: 50%;
  background: rgba(94, 217, 172, 0.035);
}

.map-line {
  left: 70px;
  top: 76px;
  width: 330px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.78), rgba(139, 188, 255, 0.34), rgba(255, 255, 255, 0.05));
  box-shadow: 0 0 18px rgba(139, 188, 255, 0.1);
}

.map-line-a { transform: rotate(-25deg); width: 340px; }
.map-line-b { transform: rotate(0deg); width: 380px; }
.map-line-c { transform: rotate(20deg); width: 330px; }
.map-line-d { transform: rotate(43deg); width: 280px; opacity: 0.72; }

.map-node {
  width: 18px;
  height: 18px;
  border-width: 3px;
  background: #0b1d19;
  box-shadow:
    0 0 0 7px rgba(255, 255, 255, 0.07),
    0 10px 22px rgba(0, 0, 0, 0.2);
}

.map-node-core {
  left: 58px;
  top: 66px;
  width: 26px;
  height: 26px;
  background: var(--premium-jade);
  box-shadow:
    0 0 0 7px rgba(94, 217, 172, 0.16),
    0 0 0 14px rgba(94, 217, 172, 0.07),
    0 14px 28px rgba(0, 0, 0, 0.22);
}

.map-node-a { left: 380px; top: 12px; border-color: var(--premium-sky); }
.map-node-b { left: 452px; top: 69px; border-color: var(--premium-coral); }
.map-node-c { left: 356px; top: 138px; border-color: var(--premium-mint); }
.map-node-d { left: 278px; top: 162px; border-color: var(--premium-amber); }

.instrument-cards {
  top: 38px;
  right: 274px;
  gap: 14px;
  width: 312px;
}

.instrument-card {
  min-height: 76px;
  padding: 14px;
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.instrument-card b {
  margin-bottom: 11px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.instrument-card i {
  height: 5px;
  background: rgba(255, 255, 255, 0.22);
}

.instrument-metrics {
  top: 38px;
  right: 34px;
  bottom: 38px;
  width: 204px;
  padding: 20px;
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.07);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.instrument-metrics span {
  grid-template-columns: 42px 1fr;
}

.instrument-metrics b {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.instrument-metrics i {
  height: 8px;
}

.instrument-metrics i::before {
  background: linear-gradient(90deg, var(--premium-mint), var(--premium-sky));
}

.input-wrap,
.choice-wrap {
  max-width: 930px;
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 249, 0.88)),
    var(--premium-surface);
  box-shadow:
    var(--premium-shadow),
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0 0 1px var(--premium-line);
}

.input-wrap {
  padding: 24px;
}

.input-wrap::after,
.choice-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.72), transparent 18%, transparent 78%, rgba(255, 255, 255, 0.34));
  opacity: 0.54;
}

.input-wrap:focus-within {
  border-color: rgba(94, 217, 172, 0.68);
  box-shadow:
    0 0 0 4px rgba(94, 217, 172, 0.14),
    var(--premium-shadow),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.decision-input {
  min-height: 154px;
  color: var(--premium-ink);
  font-size: 19px;
  line-height: 1.75;
}

.decision-input::placeholder,
.choice-detail-input::placeholder,
.chat-input input::placeholder {
  color: #8ea098;
}

.input-row {
  position: relative;
  z-index: 1;
  padding-top: 18px;
  border-top-color: rgba(173, 194, 186, 0.38);
}

.primary-btn {
  min-height: 48px;
  padding: 12px 22px;
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #071713 0, #156d5a 52%, #366fd7 100%);
  box-shadow:
    0 22px 48px rgba(53, 111, 215, 0.24),
    0 12px 28px rgba(13, 28, 24, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 28px 60px rgba(53, 111, 215, 0.28),
    0 15px 34px rgba(13, 28, 24, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.26) inset;
}

.btn-arrow {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-foot {
  margin-top: 24px;
  color: #6d8279;
  font-weight: 600;
}

.choice-wrap {
  padding: 24px;
}

.life-choice-grid {
  gap: 16px;
}

.life-choice-card {
  min-height: 258px;
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 249, 0.86)),
    rgba(255, 255, 255, 0.9);
  box-shadow:
    0 18px 42px rgba(13, 28, 24, 0.09),
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 0 0 1px rgba(173, 194, 186, 0.26);
}

.life-choice-card:hover,
.life-choice-card.selected {
  transform: translateY(-5px);
  box-shadow:
    0 30px 68px rgba(13, 28, 24, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 0 0 1px rgba(22, 143, 102, 0.24);
}

.life-choice-scene {
  height: 116px;
  overflow: hidden;
  box-shadow:
    0 16px 34px rgba(13, 28, 24, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.scene-mark {
  min-height: 27px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--premium-ink-2);
  box-shadow:
    0 8px 18px rgba(13, 28, 24, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

.life-choice-title {
  margin-top: 2px;
  color: var(--premium-ink-2);
}

.life-choice-action {
  color: #116f58;
}

.choice-followup {
  box-shadow:
    0 18px 42px rgba(13, 28, 24, 0.09),
    0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

.choice-detail-input,
.chat-input input,
.drawer-panel input[type="text"],
.drawer-panel input[type="password"] {
  background:
    linear-gradient(180deg, #ffffff, #f8fbf9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 0 0 1px rgba(173, 194, 186, 0.18);
}

.radar-cell,
.branch-card,
.card,
.brief-panel,
.branch-compare,
.action-evidence {
  box-shadow:
    0 20px 48px rgba(13, 28, 24, 0.095),
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 0 0 1px rgba(173, 194, 186, 0.24);
}

@media (prefers-reduced-motion: no-preference) {
  .map-node-core {
    animation: nodePulse 3.8s ease-in-out infinite;
  }

  .map-node-a,
  .map-node-b,
  .map-node-c,
  .map-node-d {
    animation: nodeGlow 4.8s ease-in-out infinite;
  }

  .map-node-b { animation-delay: 0.45s; }
  .map-node-c { animation-delay: 0.9s; }
  .map-node-d { animation-delay: 1.35s; }
}

@keyframes nodePulse {
  0%, 100% {
    box-shadow:
      0 0 0 7px rgba(94, 217, 172, 0.14),
      0 0 0 14px rgba(94, 217, 172, 0.06),
      0 14px 28px rgba(0, 0, 0, 0.22);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(94, 217, 172, 0.2),
      0 0 0 22px rgba(94, 217, 172, 0.05),
      0 16px 34px rgba(0, 0, 0, 0.24);
  }
}

@keyframes nodeGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.26); }
}

@media (max-width: 1040px) {
  .hero-title {
    font-size: 58px;
  }

  .hero-instrument {
    height: 252px;
    margin-bottom: -70px;
  }

  .instrument-map {
    left: 34px;
    transform: scale(0.88);
    transform-origin: left top;
  }

  .instrument-cards {
    right: 236px;
    width: 278px;
  }

  .instrument-metrics {
    right: 26px;
    width: 184px;
  }
}

@media (max-width: 900px) {
  .view-input {
    padding-top: 30px;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-tag {
    font-size: 18px;
  }

  .hero-instrument {
    height: 214px;
    margin-bottom: -58px;
  }

  .instrument-map {
    left: 24px;
    top: 42px;
    transform: scale(0.72);
  }

  .instrument-cards {
    top: 30px;
    right: 26px;
    width: 260px;
  }

  .instrument-card {
    min-height: 68px;
  }

  .instrument-metrics {
    display: none;
  }

  .input-wrap,
  .choice-wrap {
    max-width: 760px;
  }
}

@media (max-width: 640px) {
  .view-input {
    padding-top: 24px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-eyebrow {
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
  }

  .hero-eyebrow .rule {
    width: 24px;
  }

  .hero-title {
    font-size: 38px;
    line-height: 1.12;
  }

  .hero-tag {
    max-width: 360px;
    font-size: 16px;
  }

  .entry-switch {
    width: min(320px, 100%);
    margin-bottom: 18px;
  }

  .entry-mode-btn {
    min-width: 0;
    min-height: 38px;
  }

  .hero-shell::before {
    bottom: 28px;
    height: 28px;
  }

  .hero-instrument {
    height: 156px;
    margin-bottom: -38px;
  }

  .instrument-map {
    left: 8px;
    top: 32px;
    transform: scale(0.5);
  }

  .instrument-cards {
    top: 22px;
    right: 10px;
    grid-template-columns: repeat(2, 78px);
    gap: 8px;
  }

  .instrument-card {
    min-height: 46px;
    padding: 8px;
  }

  .instrument-card b {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .input-wrap,
  .choice-wrap {
    padding: 16px;
    box-shadow:
      0 22px 52px rgba(13, 28, 24, 0.13),
      0 1px 0 rgba(255, 255, 255, 0.86) inset,
      0 0 0 1px rgba(173, 194, 186, 0.24);
  }

  .decision-input {
    min-height: 126px;
    font-size: 16px;
    line-height: 1.65;
  }

  .input-row {
    justify-content: stretch;
  }

  .input-row .primary-btn,
  .choice-start-row .primary-btn {
    width: 100%;
  }

  .life-choice-grid {
    gap: 12px;
  }

  .life-choice-card {
    min-height: 226px;
  }

  .life-choice-scene {
    height: 96px;
  }
}

/* Homepage proportion and color refinement */
:root {
  --premium-ink: #0b1d18;
  --premium-ink-2: #152d27;
  --premium-jade: #126f5a;
  --premium-mint: #7bc9af;
  --premium-blue: #3f75b6;
  --premium-sky: #78a9df;
  --premium-surface: rgba(255, 255, 255, 0.9);
  --premium-line: rgba(145, 170, 160, 0.36);
  --premium-shadow: 0 24px 64px rgba(17, 35, 29, 0.13);
}

body {
  background-color: #f5f8f6;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0, rgba(249, 252, 250, 0.82) 38%, rgba(245, 248, 246, 0) 72%),
    linear-gradient(118deg, rgba(18, 111, 90, 0.08) 0, rgba(18, 111, 90, 0.02) 34%, transparent 62%),
    linear-gradient(292deg, rgba(63, 117, 182, 0.1) 0, rgba(63, 117, 182, 0.02) 32%, transparent 60%),
    linear-gradient(180deg, #f7faf8 0, #eef4f1 58%, #f8f4e9 100%);
}

body::before {
  opacity: 0.72;
  background:
    linear-gradient(90deg, rgba(15, 31, 26, 0.026) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 31, 26, 0.022) 1px, transparent 1px);
  background-size: 56px 56px;
}

.grain {
  opacity: 0.12;
}

.hero {
  width: min(1120px, 100%);
}

.hero-title {
  margin-bottom: 22px;
  color: #0b201b;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86),
    0 18px 46px rgba(17, 35, 29, 0.1);
}

.hero-tag {
  color: #52645f;
}

.entry-switch {
  margin-bottom: 22px;
  border-color: rgba(153, 176, 167, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 248, 246, 0.76));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 10px 28px rgba(17, 35, 29, 0.07);
}

.entry-mode-btn.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(135deg, #0e241f, #156955 72%, #2c698f 100%);
  box-shadow:
    0 9px 20px rgba(17, 35, 29, 0.17),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.hero-shell {
  width: min(1040px, 100%);
}

.hero-shell::before {
  left: 9%;
  right: 9%;
  bottom: 36px;
  height: 30px;
  background: rgba(17, 35, 29, 0.12);
  filter: blur(22px);
}

.hero-instrument {
  height: 238px;
  margin-bottom: -58px;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0) 48%),
    linear-gradient(110deg, rgba(123, 201, 175, 0.14) 0, transparent 36%),
    linear-gradient(292deg, rgba(120, 169, 223, 0.15) 0, transparent 36%),
    linear-gradient(135deg, #0a1a16 0, #14342c 46%, #1c3d4e 72%, #2f5578 100%);
  box-shadow:
    0 30px 72px rgba(17, 35, 29, 0.24),
    0 12px 34px rgba(47, 85, 120, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.hero-instrument::before {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.058) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.052) 1px, transparent 1px);
  background-size: 46px 46px;
}

.hero-instrument::after {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.11) 0, transparent 24%, transparent 100%),
    linear-gradient(90deg, rgba(123, 201, 175, 0.14), transparent 32%),
    linear-gradient(270deg, rgba(120, 169, 223, 0.17), transparent 38%),
    linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.24));
}

.instrument-map {
  left: 42px;
  top: 42px;
  transform: scale(0.9);
  transform-origin: left top;
}

.map-line {
  background: linear-gradient(90deg, rgba(230, 242, 238, 0.7), rgba(120, 169, 223, 0.24), rgba(255, 255, 255, 0.04));
  box-shadow: none;
}

.map-node-core {
  background: #15906d;
  box-shadow:
    0 0 0 7px rgba(123, 201, 175, 0.13),
    0 0 0 14px rgba(123, 201, 175, 0.045),
    0 12px 24px rgba(0, 0, 0, 0.18);
}

.map-node-a { border-color: #83b2e6; }
.map-node-b { border-color: #ee9085; }
.map-node-c { border-color: #76d1af; }
.map-node-d { border-color: #e8c575; }

.instrument-cards {
  top: 34px;
  right: 250px;
  width: 298px;
  gap: 12px;
}

.instrument-card {
  min-height: 66px;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.052);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.13) inset;
}

.instrument-metrics {
  top: 34px;
  right: 30px;
  bottom: 34px;
  width: 190px;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.13) inset;
}

.instrument-metrics i::before {
  background: linear-gradient(90deg, #74c9ae, #77aadb);
}

.input-wrap,
.choice-wrap {
  max-width: 860px;
  border-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 250, 0.92)),
    var(--premium-surface);
  box-shadow:
    0 24px 64px rgba(17, 35, 29, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 0 0 1px rgba(145, 170, 160, 0.28);
}

.input-wrap {
  padding: 20px;
}

.input-wrap::before,
.choice-wrap::before {
  left: 18px;
  right: 18px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
}

.input-wrap::after,
.choice-wrap::after {
  opacity: 0.2;
}

.input-wrap:focus-within {
  border-color: rgba(93, 154, 132, 0.52);
  box-shadow:
    0 0 0 3px rgba(93, 154, 132, 0.105),
    0 24px 64px rgba(17, 35, 29, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.decision-input {
  min-height: 118px;
  margin-bottom: 12px;
  color: #172b26;
  font-size: 17px;
  line-height: 1.68;
}

.decision-input::placeholder,
.choice-detail-input::placeholder,
.chat-input input::placeholder {
  color: #8a9d96;
}

.input-row {
  min-height: 62px;
  padding-top: 14px;
  border-top-color: rgba(153, 176, 167, 0.32);
}

.primary-btn {
  min-height: 46px;
  padding: 11px 21px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 44%),
    linear-gradient(135deg, #0d211c 0, #176b57 58%, #2d6ca7 100%);
  box-shadow:
    0 16px 36px rgba(45, 108, 167, 0.2),
    0 9px 22px rgba(17, 35, 29, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.primary-btn:hover {
  box-shadow:
    0 20px 44px rgba(45, 108, 167, 0.24),
    0 11px 25px rgba(17, 35, 29, 0.19),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.btn-arrow {
  background: rgba(255, 255, 255, 0.16);
}

.hero-foot {
  margin-top: 20px;
  color: #6d7f78;
}

.choice-wrap {
  max-width: 900px;
  padding: 22px;
}

.life-choice-card {
  min-height: 238px;
  box-shadow:
    0 14px 36px rgba(17, 35, 29, 0.075),
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 0 0 1px rgba(145, 170, 160, 0.22);
}

.life-choice-card:hover,
.life-choice-card.selected {
  box-shadow:
    0 22px 54px rgba(17, 35, 29, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 0 0 1px rgba(18, 111, 90, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .map-node-core {
    animation-name: nodePulseSoft;
  }
}

@keyframes nodePulseSoft {
  0%, 100% {
    box-shadow:
      0 0 0 7px rgba(123, 201, 175, 0.12),
      0 0 0 14px rgba(123, 201, 175, 0.04),
      0 12px 24px rgba(0, 0, 0, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 9px rgba(123, 201, 175, 0.16),
      0 0 0 18px rgba(123, 201, 175, 0.035),
      0 14px 28px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 1040px) {
  .hero {
    width: min(980px, 100%);
  }

  .hero-instrument {
    height: 224px;
    margin-bottom: -54px;
  }

  .instrument-map {
    left: 28px;
    top: 38px;
    transform: scale(0.78);
  }

  .instrument-cards {
    right: 214px;
    width: 262px;
  }

  .instrument-metrics {
    width: 172px;
  }
}

@media (max-width: 900px) {
  .hero-instrument {
    height: 188px;
    margin-bottom: -46px;
  }

  .instrument-map {
    left: 18px;
    top: 34px;
    transform: scale(0.64);
  }

  .instrument-cards {
    top: 26px;
    right: 24px;
    width: 242px;
  }

  .instrument-card {
    min-height: 58px;
  }

  .input-wrap,
  .choice-wrap {
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .hero {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }

  .hero-title {
    margin-bottom: 20px;
  }

  .entry-switch {
    width: min(322px, 100%);
    margin-bottom: 18px;
  }

  .hero-instrument {
    height: 138px;
    margin-bottom: -28px;
  }

  .instrument-map {
    left: 6px;
    top: 26px;
    transform: scale(0.44);
  }

  .instrument-cards {
    top: 18px;
    right: 9px;
    grid-template-columns: repeat(2, 76px);
    gap: 7px;
  }

  .input-wrap,
  .choice-wrap {
    padding: 15px;
    box-shadow:
      0 18px 44px rgba(17, 35, 29, 0.115),
      0 1px 0 rgba(255, 255, 255, 0.9) inset,
      0 0 0 1px rgba(145, 170, 160, 0.24);
  }

  .decision-input {
    min-height: 106px;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.62;
  }

  .input-row {
    min-height: auto;
    padding-top: 12px;
  }
}

/* Refined notification system */
.toast {
  left: 50%;
  right: auto;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0)),
    rgba(14, 34, 29, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
  box-shadow:
    0 18px 44px rgba(17, 35, 29, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transform: translateX(-50%) translateY(18px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-card {
  left: auto;
  right: 28px;
  bottom: 28px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: min(448px, calc(100vw - 40px));
  max-width: min(448px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: 16px;
  border-color: rgba(145, 170, 160, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 248, 0.88)),
    rgba(255, 255, 255, 0.9);
  color: #1b342d;
  text-align: left;
  box-shadow:
    0 24px 58px rgba(17, 35, 29, 0.17),
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 0 0 1px rgba(255, 255, 255, 0.42);
  transform: translateY(18px);
}

.toast-card.show {
  transform: translateY(0);
}

.toast-card.toast-error {
  border-color: rgba(179, 112, 82, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 246, 241, 0.9)),
    rgba(255, 255, 255, 0.92);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(18, 111, 90, 0.1);
  color: #126f5a;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(18, 111, 90, 0.1) inset;
}

.toast-error .toast-icon {
  background: rgba(178, 94, 59, 0.1);
  color: #9c4b2c;
  box-shadow: 0 0 0 1px rgba(178, 94, 59, 0.12) inset;
}

.toast-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.toast-copy strong {
  color: #10231e;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.toast-copy span {
  color: #60736c;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .toast,
  .toast-card {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    max-width: none;
    transform: translateY(18px);
  }

  .toast.show,
  .toast-card.show {
    transform: translateY(0);
  }
}

/* Structural redesign: split decision workspace */
.view-input {
  padding-top: 28px;
}

.hero {
  width: min(1180px, 100%);
}

.hero-eyebrow {
  margin-bottom: 12px;
}

.hero-tag {
  margin-bottom: 4px;
  font-size: 18px;
}

.hero-title {
  margin-bottom: 22px;
  font-size: 66px;
}

.entry-switch {
  margin-bottom: 22px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  align-items: stretch;
  gap: 18px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero-shell::before {
  display: none;
}

.input-wrap,
.choice-wrap,
.hero-instrument {
  margin: 0;
}

.input-wrap,
.choice-wrap {
  order: 1;
  width: 100%;
  max-width: none;
  min-height: 100%;
  padding: 22px;
  border-radius: 8px;
  box-shadow:
    0 20px 54px rgba(17, 35, 29, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 0 0 1px rgba(145, 170, 160, 0.25);
}

.hero-instrument {
  order: 2;
  height: auto;
  min-height: 458px;
  border-radius: 8px;
  margin-bottom: 0;
  overflow: hidden;
}

.input-wrap {
  display: grid;
  grid-template-rows: auto minmax(170px, 1fr) auto;
}

.input-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(153, 176, 167, 0.26);
}

.input-panel-head span:first-child {
  color: #10231e;
  font-size: 18px;
  font-weight: 850;
}

.input-panel-head span:last-child {
  color: #71827b;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.decision-input {
  min-height: 170px;
  margin-bottom: 0;
  padding: 4px 2px 0;
}

.input-row {
  min-height: 68px;
  align-self: end;
}

.choice-wrap {
  display: grid;
  gap: 16px;
}

.choice-panel-head {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(153, 176, 167, 0.26);
}

.choice-panel-head span:first-child {
  font-size: 18px;
  letter-spacing: 0;
}

.choice-panel-head span:last-child {
  color: #71827b;
}

.life-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.life-choice-card {
  min-height: 190px;
  padding: 14px;
  border-radius: 8px;
}

.life-choice-scene {
  height: 82px;
  margin-bottom: 12px;
}

.life-choice-title {
  margin-bottom: 5px;
  font-size: 16px;
}

.life-choice-caption {
  font-size: 12px;
  line-height: 1.55;
}

.life-choice-action {
  padding-top: 11px;
}

.choice-followup {
  margin-top: 0;
  padding: 14px;
}

.instrument-map {
  left: 24px;
  top: 34px;
  transform: scale(0.62);
  transform-origin: left top;
}

.instrument-cards {
  top: 168px;
  right: 24px;
  left: 24px;
  width: auto;
  gap: 10px;
}

.instrument-card {
  min-height: 58px;
  padding: 11px;
}

.instrument-card b {
  margin-bottom: 7px;
  font-size: 12px;
}

.instrument-metrics {
  top: auto;
  right: 24px;
  bottom: 24px;
  left: 24px;
  width: auto;
  padding: 16px;
  gap: 11px;
}

.hero-foot {
  margin-top: 18px;
}

@media (max-width: 1040px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
    width: min(960px, 100%);
  }

  .hero-title {
    font-size: 56px;
  }

  .hero-instrument {
    min-height: 438px;
  }

  .instrument-map {
    left: 18px;
    top: 32px;
    transform: scale(0.56);
  }

  .instrument-cards,
  .instrument-metrics {
    right: 18px;
    left: 18px;
  }

  .life-choice-card {
    min-height: 184px;
  }
}

@media (max-width: 900px) {
  .hero-shell {
    grid-template-columns: 1fr;
    width: min(720px, 100%);
  }

  .hero-title {
    font-size: 48px;
  }

  .input-wrap,
  .choice-wrap {
    order: 1;
  }

  .hero-instrument {
    order: 2;
    min-height: 168px;
  }

  .input-wrap {
    min-height: auto;
    grid-template-rows: auto minmax(140px, auto) auto;
  }

  .decision-input {
    min-height: 140px;
  }

  .instrument-map {
    left: 18px;
    top: 30px;
    transform: scale(0.54);
  }

  .instrument-cards {
    top: 24px;
    right: 20px;
    left: auto;
    width: 250px;
  }

  .instrument-metrics {
    display: none;
  }
}

@media (max-width: 640px) {
  .view-input {
    padding-top: 22px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-shell {
    width: 100%;
    max-width: 100%;
    gap: 12px;
  }

  .input-wrap,
  .choice-wrap {
    padding: 16px;
  }

  .input-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .life-choice-grid {
    grid-template-columns: 1fr;
  }

  .life-choice-card {
    min-height: 208px;
  }

  .life-choice-scene {
    height: 92px;
  }

  .hero-instrument {
    min-height: 132px;
  }

  .instrument-map {
    left: 6px;
    top: 24px;
    transform: scale(0.42);
  }

  .instrument-cards {
    top: 18px;
    right: 10px;
    width: 162px;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }
}

/* Desktop split layout: visual panel left, action panel right */
@media (min-width: 901px) {
  .hero-shell {
    grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
  }

  .hero-instrument {
    order: 1;
  }

  .input-wrap,
  .choice-wrap {
    order: 2;
  }
}

/* Decision preview refinement */
.hero-instrument {
  isolation: isolate;
  min-height: 464px;
  padding: 22px;
  background:
    radial-gradient(circle at 18% 17%, rgba(125, 214, 179, 0.2), transparent 28%),
    radial-gradient(circle at 86% 86%, rgba(122, 168, 220, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0) 44%),
    linear-gradient(135deg, #081b16 0, #15372e 48%, #1f4356 74%, #375d85 100%);
  box-shadow:
    0 26px 64px rgba(17, 35, 29, 0.22),
    0 12px 32px rgba(47, 85, 120, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.hero-instrument::before {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.052) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.046) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.88;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55) 74%, rgba(0, 0, 0, 0.2));
}

.hero-instrument::after {
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.13) 0, transparent 24%, transparent 100%),
    linear-gradient(90deg, rgba(117, 207, 173, 0.14), transparent 38%),
    linear-gradient(270deg, rgba(129, 176, 231, 0.19), transparent 42%),
    linear-gradient(180deg, transparent 60%, rgba(2, 9, 14, 0.26));
}

.instrument-map {
  left: 22px;
  right: 22px;
  top: 20px;
  width: auto;
  height: 150px;
  transform: none;
  transform-origin: left top;
}

.instrument-map::before {
  left: 18px;
  top: 52px;
  width: 78px;
  height: 78px;
  border-color: rgba(124, 214, 180, 0.2);
  background:
    radial-gradient(circle, rgba(124, 214, 180, 0.13), rgba(124, 214, 180, 0.035) 58%, transparent 60%);
}

.map-line {
  left: 52px;
  top: 91px;
  height: 2px;
  background: linear-gradient(90deg, rgba(232, 244, 240, 0.78), rgba(127, 174, 225, 0.3), rgba(255, 255, 255, 0.02));
}

.map-line-a { width: 252px; transform: rotate(-25deg); }
.map-line-b { width: 282px; transform: rotate(0deg); }
.map-line-c { width: 236px; transform: rotate(18deg); }
.map-line-d { width: 198px; transform: rotate(40deg); opacity: 0.5; }

.map-node {
  width: 18px;
  height: 18px;
  border-width: 3px;
  background: #0c201a;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.065),
    0 10px 20px rgba(0, 0, 0, 0.2);
}

.map-node-core {
  left: 39px;
  top: 78px;
  width: 25px;
  height: 25px;
  background: #17a477;
  box-shadow:
    0 0 0 7px rgba(124, 214, 180, 0.15),
    0 0 0 16px rgba(124, 214, 180, 0.052),
    0 12px 24px rgba(0, 0, 0, 0.2);
}

.map-node-a { left: 266px; top: 22px; border-color: #8fbeef; }
.map-node-b { left: 312px; top: 83px; border-color: #f29a8f; }
.map-node-c { left: 258px; top: 126px; border-color: #7dd9b8; }
.map-node-d { left: 204px; top: 118px; border-color: #efd27d; }

.instrument-cards {
  top: 176px;
  right: 22px;
  left: 22px;
  width: auto;
  gap: 10px;
}

.instrument-card {
  --accent: #8fbeef;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 9px;
  align-items: start;
  min-height: 62px;
  padding: 10px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 68%),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.13) inset;
}

.instrument-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.8;
}

.instrument-card b {
  display: grid;
  grid-row: 1 / span 3;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, rgba(255, 255, 255, 0.1));
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent) inset;
}

.instrument-card strong {
  min-width: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
}

.instrument-card i {
  grid-column: 2;
  height: 4px;
  margin-top: 5px;
  background: rgba(235, 246, 242, 0.2);
}

.card-a { --accent: #8fbeef; border-top-color: color-mix(in srgb, #8fbeef 72%, transparent); }
.card-b { --accent: #f29a8f; border-top-color: color-mix(in srgb, #f29a8f 72%, transparent); }
.card-c { --accent: #7dd9b8; border-top-color: color-mix(in srgb, #7dd9b8 72%, transparent); }
.card-d { --accent: #efd27d; border-top-color: color-mix(in srgb, #efd27d 72%, transparent); }

.instrument-metrics {
  top: auto;
  right: 22px;
  bottom: 22px;
  left: 22px;
  width: auto;
  padding: 14px 16px;
  gap: 10px;
  border-color: rgba(255, 255, 255, 0.17);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.052)),
    rgba(255, 255, 255, 0.065);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.instrument-metrics span {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
}

.instrument-metrics b {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 850;
}

.instrument-metrics i {
  height: 8px;
  background: rgba(235, 246, 242, 0.17);
}

.instrument-metrics i::before {
  background: linear-gradient(90deg, #79d7b7, #8fbeef);
}

@media (max-width: 1040px) {
  .hero-instrument {
    min-height: 442px;
    padding: 18px;
  }

  .instrument-map {
    left: 18px;
    right: 18px;
    top: 20px;
    height: 150px;
  }

  .map-line {
    left: 46px;
    top: 88px;
  }

  .map-line-a { width: 216px; transform: rotate(-25deg); }
  .map-line-b { width: 244px; transform: rotate(0deg); }
  .map-line-c { width: 204px; transform: rotate(18deg); }
  .map-line-d { width: 172px; transform: rotate(40deg); }

  .map-node-core {
    left: 34px;
    top: 76px;
  }

  .map-node-a { left: 226px; top: 26px; }
  .map-node-b { left: 270px; top: 80px; }
  .map-node-c { left: 220px; top: 124px; }
  .map-node-d { left: 178px; top: 116px; }

  .instrument-cards {
    top: 166px;
    right: 18px;
    left: 18px;
  }

  .instrument-metrics {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }
}

@media (max-width: 900px) {
  .hero-instrument {
    min-height: 188px;
    padding: 16px;
  }

  .instrument-map {
    left: 18px;
    top: 18px;
    width: 344px;
    right: auto;
    height: 160px;
    transform: scale(0.78);
  }

  .instrument-cards {
    top: 24px;
    right: 18px;
    left: auto;
    width: 260px;
  }

  .instrument-metrics {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-instrument {
    min-height: 150px;
    padding: 12px;
  }

  .instrument-map {
    left: 10px;
    top: 24px;
    width: 344px;
    transform: scale(0.42);
  }

  .instrument-cards {
    top: 18px;
    right: 10px;
    width: 166px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .instrument-card {
    min-height: 48px;
    padding: 8px;
    column-gap: 6px;
  }

  .instrument-card b {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .instrument-card strong {
    display: none;
  }

  .instrument-card i {
    height: 3px;
    margin-top: 4px;
  }
}

@media (max-width: 360px) {
  .instrument-map {
    transform: scale(0.36);
  }

  .instrument-cards {
    width: 150px;
  }
}

/* Warm pale-yellow theme override */
:root {
  --bg-0: #fff6cc;
  --bg-1: #fffdf3;
  --bg-2: #fff0bd;
  --bg-3: #ead28a;
  --bg-warm: #fff1b8;

  --ink: #332515;
  --ink-soft: #654d29;
  --ink-dim: #8d7142;
  --ink-faint: #b8a06f;

  --blue: #c77927;
  --blue-deep: #8f4d12;
  --green: #9a7b17;
  --red: #c85b3b;
  --cyan: #b98622;
  --amber: #d99a1c;
  --violet: #a86a36;

  --lilac: var(--amber);
  --lilac-deep: var(--blue-deep);
  --lilac-soft: #f4d987;
  --lilac-bg: #fff4c9;
  --lilac-line: #e7c76f;
  --lilac-faint: rgba(217, 154, 28, 0.12);

  --line: #ead698;
  --line-soft: #f5e7b6;
  --line-strong: #d9bc65;

  --warm: var(--amber);
  --danger: var(--red);
  --ok: var(--green);
  --warm-soft: rgba(217, 154, 28, 0.14);
  --danger-soft: rgba(200, 91, 59, 0.11);
  --ok-soft: rgba(154, 123, 23, 0.1);

  --premium-ink: #332515;
  --premium-ink-2: #4b361c;
  --premium-jade: #a77e15;
  --premium-mint: #e7bd4a;
  --premium-blue: #c77927;
  --premium-sky: #e4b554;
  --premium-coral: #c8613d;
  --premium-amber: #d99a1c;
  --premium-surface: rgba(255, 251, 237, 0.9);
  --premium-line: rgba(217, 188, 101, 0.46);
  --premium-shadow: 0 30px 76px rgba(105, 72, 20, 0.16);

  --shadow-sm:
    0 1px 1px rgba(83, 57, 16, 0.04),
    0 10px 24px rgba(105, 72, 20, 0.06);
  --shadow:
    0 20px 54px rgba(105, 72, 20, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  --shadow-lg:
    0 34px 84px rgba(83, 57, 16, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.62) inset;
}

html {
  background: var(--bg-0);
}

body {
  background-color: var(--bg-0);
  background-image:
    linear-gradient(180deg, rgba(255, 253, 243, 0.98) 0, rgba(255, 248, 216, 0.82) 34%, rgba(255, 246, 204, 0) 72%),
    linear-gradient(115deg, rgba(217, 154, 28, 0.18) 0, rgba(217, 154, 28, 0.03) 38%, transparent 64%),
    linear-gradient(288deg, rgba(200, 91, 59, 0.12) 0, rgba(200, 91, 59, 0.03) 34%, transparent 60%),
    linear-gradient(180deg, #fff9dd 0, #fff2bd 58%, #fff8db 100%);
}

body::before {
  background:
    linear-gradient(90deg, rgba(83, 57, 16, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(83, 57, 16, 0.026) 1px, transparent 1px);
}

::selection {
  background: rgba(217, 154, 28, 0.28);
  color: var(--ink);
}

.grain {
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(83, 57, 16, 0.12) 0, rgba(83, 57, 16, 0.12) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(83, 57, 16, 0.08) 0, rgba(83, 57, 16, 0.08) 1px, transparent 1px, transparent 6px);
}

.vignette {
  background:
    linear-gradient(180deg, rgba(255, 246, 204, 0) 0, rgba(255, 246, 204, 0.58) 78%, var(--bg-0) 100%),
    linear-gradient(90deg, rgba(255, 253, 243, 0.66), rgba(255, 253, 243, 0) 18%, rgba(255, 253, 243, 0) 82%, rgba(255, 253, 243, 0.66));
}

.topbar {
  border-bottom-color: rgba(217, 188, 101, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.94), rgba(255, 246, 204, 0.78));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.76) inset,
    0 16px 38px rgba(105, 72, 20, 0.08);
}

.brand-dot {
  border-color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(135deg, #fffdf3 0 46%, #f5d572 46% 100%);
  box-shadow:
    0 0 0 1px rgba(185, 133, 22, 0.18),
    0 14px 28px rgba(105, 72, 20, 0.14);
}

.brand-dot::before {
  background: var(--amber);
  box-shadow: 9px 9px 0 var(--red);
}

.brand-dot::after {
  background: var(--green);
}

.brand-name,
.hero-title,
.view-title,
.branch-name,
.detail-title,
.card-title,
.compare-head h3,
.input-panel-head span:first-child {
  color: var(--ink);
}

.brand-sub,
.hero-tag,
.hero-foot,
.view-sub,
.hint,
.choice-panel-head,
.choice-followup-sub,
.branch-summary,
.detail-summary,
.timeline-event,
.compare-step,
.history-input,
.drawer-sub,
.history-empty {
  color: var(--ink-dim);
}

.steps {
  border-color: rgba(217, 188, 101, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.78), rgba(255, 240, 189, 0.78));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 12px 28px rgba(105, 72, 20, 0.06);
}

.steps .step {
  color: var(--ink-dim);
}

.steps .step:hover {
  background: rgba(255, 253, 243, 0.78);
  color: var(--ink);
}

.steps .step.current,
.entry-mode-btn.active,
.primary-btn,
.chat-input button {
  color: #fffdf3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #5a3717 0, #b87718 58%, #d99a1c 100%);
  box-shadow:
    0 16px 34px rgba(185, 133, 22, 0.22),
    0 8px 18px rgba(83, 57, 16, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.primary-btn:hover {
  box-shadow:
    0 22px 48px rgba(185, 133, 22, 0.26),
    0 11px 24px rgba(83, 57, 16, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

.primary-btn::after {
  background: linear-gradient(135deg, rgba(255, 246, 204, 0.22), rgba(255, 255, 255, 0));
}

.reset-btn,
.ghost-btn,
.regen-btn,
.entry-switch {
  border-color: rgba(217, 188, 101, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.96), rgba(255, 246, 204, 0.82));
  color: var(--ink-soft);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 11px 25px rgba(105, 72, 20, 0.065);
}

.reset-btn:hover,
.ghost-btn:hover,
.regen-btn:hover,
.chat-input button:hover {
  border-color: rgba(185, 133, 22, 0.76);
  background: rgba(255, 251, 237, 0.96);
  color: var(--blue-deep);
  box-shadow: 0 14px 34px rgba(185, 133, 22, 0.16);
}

.regen-btn::before,
.act-mark,
.hero-eyebrow,
.view-title em,
.life-choice-action,
.timeline-day,
.bubble.future .who,
.future-edit-strip[open] summary,
.plan-grid li.add-row::before {
  color: var(--blue-deep);
}

.view-sub em,
.card.warn .card-title,
.card.warn .card-title .kicker,
.risk-tip.danger,
.history-delete:hover {
  color: var(--red);
}

.hero-title {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86),
    0 20px 48px rgba(105, 72, 20, 0.13);
}

.hero-eyebrow .rule {
  background: currentColor;
}

.input-wrap,
.choice-wrap,
.life-choice-card,
.radar-cell,
.branch-card,
.card,
.brief-panel,
.branch-compare,
.action-evidence,
.empty-state,
.api-banner,
.history-item,
.drawer-panel,
.drawer-toggles,
.future-edit-strip {
  border-color: rgba(217, 188, 101, 0.56);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.96), rgba(255, 248, 216, 0.88)),
    rgba(255, 251, 237, 0.9);
  box-shadow:
    0 18px 44px rgba(105, 72, 20, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 0 0 1px rgba(245, 231, 182, 0.48);
}

.input-wrap:focus-within,
.choice-detail-input:focus,
.chat-input input:focus,
.drawer-panel input:focus,
.editable.editing,
.editable[contenteditable="true"]:focus {
  border-color: rgba(185, 133, 22, 0.72);
  outline-color: var(--amber);
  box-shadow:
    0 0 0 4px rgba(217, 154, 28, 0.16),
    0 18px 44px rgba(105, 72, 20, 0.1);
}

.input-panel-head,
.choice-panel-head,
.input-row,
.card-title,
.brief-head,
.compare-head,
.branch-stats,
.drawer-actions,
.drawer-section,
.timeline li,
.plan-grid li,
.score-list li {
  border-color: var(--line-soft);
}

.decision-input,
.choice-detail-input,
.chat-input input,
.drawer-panel input[type="text"],
.drawer-panel input[type="password"],
.score-input {
  background: rgba(255, 253, 243, 0.92);
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 0 0 1px rgba(217, 188, 101, 0.16);
}

.decision-input::placeholder,
.choice-detail-input::placeholder,
.chat-input input::placeholder {
  color: var(--ink-faint);
}

.chip,
.chat-tab,
.branch-proof span,
.compare-summary span {
  border-color: rgba(217, 188, 101, 0.56);
  background: rgba(255, 253, 243, 0.86);
  color: var(--ink-soft);
}

.chip:hover,
.chat-tab:hover,
.life-choice-card:hover,
.life-choice-card.selected,
.radar-cell:hover,
.branch-card:hover,
.history-item:hover {
  border-color: rgba(185, 133, 22, 0.72);
  box-shadow:
    0 26px 62px rgba(105, 72, 20, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 0 0 1px rgba(217, 154, 28, 0.2);
}

.chip:hover,
.chat-tab:hover,
.plan-grid li.add-row:hover {
  background: #fff2bf;
  color: var(--blue-deep);
}

.hero-instrument,
.branch-image,
.life-choice-scene {
  border-color: rgba(255, 253, 243, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.8), rgba(255, 253, 243, 0.18) 42%),
    linear-gradient(135deg, #fff3bf 0, #f4cc64 55%, #e8ad3c 100%);
  box-shadow:
    0 28px 68px rgba(105, 72, 20, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.56) inset;
}

.hero-instrument::before,
.branch-image::before {
  background-image:
    linear-gradient(90deg, rgba(83, 57, 16, 0.065) 1px, transparent 1px),
    linear-gradient(0deg, rgba(83, 57, 16, 0.052) 1px, transparent 1px);
}

.hero-instrument::after {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.34) 0, transparent 24%, transparent 100%),
    linear-gradient(90deg, rgba(217, 154, 28, 0.2), transparent 35%),
    linear-gradient(270deg, rgba(200, 91, 59, 0.14), transparent 40%),
    linear-gradient(180deg, transparent 64%, rgba(105, 72, 20, 0.12));
}

.map-line {
  background: linear-gradient(90deg, rgba(83, 57, 16, 0.58), rgba(185, 133, 22, 0.26), rgba(255, 253, 243, 0.08));
  box-shadow: none;
}

.map-node {
  border-color: rgba(255, 253, 243, 0.88);
  background: #6a4217;
  box-shadow:
    0 0 0 6px rgba(255, 253, 243, 0.18),
    0 10px 20px rgba(105, 72, 20, 0.18);
}

.map-node-core {
  background: var(--amber);
  box-shadow:
    0 0 0 7px rgba(255, 253, 243, 0.28),
    0 0 0 14px rgba(217, 154, 28, 0.14),
    0 14px 28px rgba(105, 72, 20, 0.2);
}

.map-node-a { border-color: #d99a1c; }
.map-node-b { border-color: #c8613d; }
.map-node-c { border-color: #a77e15; }
.map-node-d { border-color: #e6bf4d; }

.instrument-card,
.instrument-metrics {
  border-color: rgba(255, 253, 243, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.64), rgba(255, 240, 189, 0.34)),
    rgba(255, 251, 237, 0.28);
  box-shadow:
    0 14px 30px rgba(105, 72, 20, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.instrument-card::before {
  background: var(--accent, var(--amber));
}

.instrument-card b,
.instrument-card strong,
.instrument-metrics b {
  color: var(--ink);
}

.instrument-card i,
.instrument-metrics i {
  background: rgba(83, 57, 16, 0.16);
}

.instrument-metrics i::before {
  background: linear-gradient(90deg, #b98516, #c8613d);
}

.card-a { --accent: #d99a1c; border-top-color: rgba(217, 154, 28, 0.72); }
.card-b { --accent: #c8613d; border-top-color: rgba(200, 97, 61, 0.72); }
.card-c { --accent: #a77e15; border-top-color: rgba(167, 126, 21, 0.72); }
.card-d { --accent: #e6bf4d; border-top-color: rgba(230, 191, 77, 0.72); }

.scene-city .life-choice-scene {
  background: linear-gradient(180deg, #fff5cf 0, #f5d572 56%, #fffbed 56% 100%);
}

.scene-town .life-choice-scene {
  background: linear-gradient(180deg, #fff9dd 0, #f3df91 48%, #faefbb 48% 100%);
}

.scene-road .life-choice-scene {
  background: linear-gradient(180deg, #fff1c4 0, #edc369 54%, #fffbed 54% 100%);
}

.scene-market .life-choice-scene {
  background: linear-gradient(180deg, #fff0d1 0, #e7b36b 52%, #fff3bf 52% 100%);
}

.scene-mark {
  background: rgba(255, 253, 243, 0.86);
  color: var(--ink);
}

.scene-line,
.scene-shape.aux {
  background: rgba(83, 57, 16, 0.22);
}

.scene-shape.main {
  background: linear-gradient(180deg, rgba(255, 253, 243, 0.96), rgba(217, 154, 28, 0.28));
  box-shadow: -26px 14px 0 rgba(200, 91, 59, 0.16);
}

.branch-A { --brand-color: #c77927; }
.branch-B { --brand-color: #c85b3b; }
.branch-C { --brand-color: #9a7b17; }
.branch-D { --brand-color: #d99a1c; }

.radar-cell:nth-child(1) { --cell-color: #c77927; }
.radar-cell:nth-child(2) { --cell-color: #9a7b17; }
.radar-cell:nth-child(3) { --cell-color: #c85b3b; }
.radar-cell:nth-child(4) { --cell-color: #b98622; }
.radar-cell:nth-child(5) { --cell-color: #d99a1c; }
.radar-cell:nth-child(6) { --cell-color: #a86a36; }

.radar-label,
.life-judgement-label,
.action-evidence-head b,
.brief-block h3 {
  color: var(--blue-deep);
}

.branch-card::before,
.radar-cell::before {
  background: linear-gradient(180deg, var(--brand-color, var(--cell-color, var(--amber))), rgba(255, 255, 255, 0));
}

.branch-card::after {
  border-color: color-mix(in srgb, var(--brand-color) 28%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-color) 16%, transparent), transparent 68%),
    linear-gradient(90deg, color-mix(in srgb, var(--brand-color) 18%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--brand-color) 12%, transparent) 1px, transparent 1px);
}

.branch-card.branch-D,
.life-judgement,
.choice-followup,
.verdict,
.brief-block,
.evidence-block,
.evidence-confidence,
.branch-proof,
.action-evidence-head b {
  border-color: rgba(217, 188, 101, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.9), rgba(255, 240, 189, 0.72)),
    rgba(255, 251, 237, 0.82);
}

.branch-tag,
.branch-pill,
.compare-code {
  border-color: color-mix(in srgb, var(--brand-color, var(--amber)) 28%, #fffdf3);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-color, var(--amber)) 15%, #fffdf3), rgba(255, 251, 237, 0.76));
  color: color-mix(in srgb, var(--brand-color, var(--amber)) 76%, var(--ink));
}

.compare-summary b {
  background: #6a4217;
  color: #fffdf3;
}

.compare-row {
  border-bottom-color: var(--line-soft);
  background: rgba(255, 253, 243, 0.68);
}

.compare-row:hover {
  background: color-mix(in srgb, var(--brand-color) 10%, #fffdf3);
}

.compare-bar-track,
.score-bar,
.risk-meter,
.timeline::before {
  background: #eadfae;
}

.compare-bar-track i,
.score-bar > span,
.risk-fill {
  background: linear-gradient(90deg, #b98516, #d99a1c);
}

.compare-bar.pressure .compare-bar-track i,
.risk-fill.warn {
  background: #d99a1c;
}

.risk-fill.danger {
  background: #c85b3b;
}

.slider-row input[type="range"] {
  background: linear-gradient(90deg, #9a7b17, #d99a1c, #c85b3b);
}

.slider-row input[type="range"]::-webkit-slider-thumb,
.slider-row input[type="range"]::-moz-range-thumb {
  background: #6a4217;
}

.timeline li::before,
.plan-grid li::before {
  border-color: var(--amber);
  background: #fffdf3;
}

.timeline li.warn::before,
.card.warn li::before {
  border-color: var(--amber);
  background: rgba(217, 154, 28, 0.14);
}

.timeline li.danger::before {
  border-color: var(--red);
}

.card-title .kicker,
.card.warn .card-title .kicker {
  background:
    linear-gradient(180deg, #fffdf3, #fff0bd);
  color: var(--blue-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86) inset,
    0 0 0 1px rgba(217, 188, 101, 0.45);
}

.card.warn {
  border-color: rgba(200, 91, 59, 0.3);
  background:
    linear-gradient(180deg, rgba(200, 91, 59, 0.07), rgba(255, 253, 243, 0) 44%),
    rgba(255, 251, 237, 0.94);
}

.card.warn p {
  border-left-color: var(--red);
  background: rgba(200, 91, 59, 0.08);
}

.chat-box {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.74), rgba(255, 253, 243, 0.16)),
    linear-gradient(90deg, rgba(83, 57, 16, 0.032) 1px, transparent 1px),
    linear-gradient(0deg, rgba(83, 57, 16, 0.028) 1px, transparent 1px),
    #fff4c9;
}

.chat-tab.active {
  border-color: rgba(185, 133, 22, 0.5);
  background: rgba(217, 154, 28, 0.14);
  color: var(--blue-deep);
}

.bubble.future {
  border-color: rgba(217, 188, 101, 0.56);
  background: #fffdf3;
}

.bubble.me {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #7a4a17, #d99a1c);
  color: #fffdf3;
  box-shadow: 0 12px 26px rgba(185, 133, 22, 0.2);
}

.bubble.system {
  border-color: var(--line-strong);
  background: rgba(255, 253, 243, 0.72);
}

.toast {
  border-color: rgba(255, 253, 243, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    rgba(83, 57, 16, 0.94);
}

.toast-card {
  border-color: rgba(217, 188, 101, 0.56);
  background:
    linear-gradient(180deg, rgba(255, 253, 243, 0.96), rgba(255, 246, 204, 0.9)),
    rgba(255, 251, 237, 0.94);
  color: var(--ink);
}

.toast-icon,
.toast-error .toast-icon {
  background: rgba(217, 154, 28, 0.16);
  color: var(--blue-deep);
}

.toast-copy strong {
  color: var(--ink);
}

.toast-copy span {
  color: var(--ink-dim);
}

.drawer-mask {
  background: rgba(83, 57, 16, 0.28);
}

.loading {
  background: rgba(255, 246, 204, 0.84);
}

.ink-ring {
  border-color: rgba(83, 57, 16, 0.14);
  border-top-color: var(--amber);
  border-right-color: var(--green);
}

.ink-sweep {
  border-color: rgba(200, 91, 59, 0.18);
  border-bottom-color: var(--red);
}

.ink-bloom {
  background: #6a4217;
  box-shadow:
    -11px -9px 0 var(--amber),
    12px -9px 0 var(--green),
    0 12px 0 var(--red);
}

.loader-ellipsis i,
.ai-badge.loading {
  color: var(--amber);
}

.ai-badge.ok { color: var(--green); }
.ai-badge.error { color: var(--red); }

.branch-image-placeholder {
  color: var(--ink-soft);
}

.branch-image.error .branch-image-placeholder {
  background: rgba(200, 91, 59, 0.2);
}

.image-download-btn {
  border-color: rgba(255, 253, 243, 0.72);
  background: rgba(83, 57, 16, 0.78);
  color: #fffdf3;
}

.image-download-btn:hover {
  background: rgba(83, 57, 16, 0.92);
}

.api-banner::before {
  background: var(--amber);
  box-shadow: 12px 0 0 var(--green), 24px 0 0 var(--red);
}

.brief-block li::before,
.evidence-block li::before {
  background: var(--amber);
}

.editable:hover {
  background: rgba(217, 154, 28, 0.12);
  box-shadow: inset 0 -1px 0 var(--amber);
}

.score-input {
  border-color: var(--amber);
}

.chat-box::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.drawer-panel::-webkit-scrollbar-thumb {
  background: rgba(141, 113, 66, 0.42);
  background-clip: content-box;
}

@keyframes nodePulse {
  0%, 100% {
    box-shadow:
      0 0 0 7px rgba(255, 253, 243, 0.22),
      0 0 0 14px rgba(217, 154, 28, 0.1),
      0 14px 28px rgba(105, 72, 20, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(255, 253, 243, 0.32),
      0 0 0 22px rgba(217, 154, 28, 0.08),
      0 16px 34px rgba(105, 72, 20, 0.22);
  }
}

/* Light green theme override */
:root {
  --bg-0: #eefbe9;
  --bg-1: #fbfff8;
  --bg-2: #def3d8;
  --bg-3: #c8e7c0;
  --bg-warm: #f5fbdf;

  --ink: #172d1f;
  --ink-soft: #3e5f49;
  --ink-dim: #64806a;
  --ink-faint: #95aa99;

  --blue: #56a86a;
  --blue-deep: #2f7d46;
  --green: #6fba6d;
  --red: #b05c47;
  --cyan: #68b99a;
  --amber: #9fb552;
  --violet: #7aa86f;

  --lilac: var(--blue);
  --lilac-deep: var(--blue-deep);
  --lilac-soft: #c8e7c0;
  --lilac-bg: #effbe9;
  --lilac-line: #b9deb2;
  --lilac-faint: rgba(86, 168, 106, 0.12);

  --line: #cde8c7;
  --line-soft: #e2f2de;
  --line-strong: #abd2a6;

  --warm: var(--amber);
  --danger: var(--red);
  --ok: var(--green);
  --warm-soft: rgba(159, 181, 82, 0.14);
  --danger-soft: rgba(176, 92, 71, 0.11);
  --ok-soft: rgba(111, 186, 109, 0.12);

  --premium-ink: #172d1f;
  --premium-ink-2: #234331;
  --premium-jade: #56a86a;
  --premium-mint: #9ed89d;
  --premium-blue: #69b783;
  --premium-sky: #b7e2af;
  --premium-coral: #b05c47;
  --premium-amber: #b6d36f;
  --premium-surface: rgba(251, 255, 248, 0.92);
  --premium-line: rgba(171, 210, 166, 0.48);
  --premium-shadow: 0 30px 76px rgba(47, 96, 58, 0.15);

  --shadow-sm:
    0 1px 1px rgba(23, 45, 31, 0.04),
    0 10px 24px rgba(47, 96, 58, 0.055);
  --shadow:
    0 20px 54px rgba(47, 96, 58, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  --shadow-lg:
    0 34px 84px rgba(23, 45, 31, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.62) inset;
}

html {
  background: var(--bg-0);
}

body {
  background-color: var(--bg-0);
  background-image:
    linear-gradient(180deg, rgba(251, 255, 248, 0.98) 0, rgba(239, 251, 233, 0.82) 34%, rgba(238, 251, 233, 0) 72%),
    linear-gradient(115deg, rgba(86, 168, 106, 0.16) 0, rgba(86, 168, 106, 0.03) 38%, transparent 64%),
    linear-gradient(288deg, rgba(182, 211, 111, 0.12) 0, rgba(182, 211, 111, 0.03) 34%, transparent 60%),
    linear-gradient(180deg, #f7fff3 0, #eefbe9 58%, #f4fbec 100%);
}

body::before {
  background:
    linear-gradient(90deg, rgba(23, 45, 31, 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 45, 31, 0.024) 1px, transparent 1px);
}

::selection {
  background: rgba(86, 168, 106, 0.24);
  color: var(--ink);
}

.grain {
  opacity: 0.15;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(23, 45, 31, 0.1) 0, rgba(23, 45, 31, 0.1) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(23, 45, 31, 0.07) 0, rgba(23, 45, 31, 0.07) 1px, transparent 1px, transparent 6px);
}

.vignette {
  background:
    linear-gradient(180deg, rgba(238, 251, 233, 0) 0, rgba(238, 251, 233, 0.58) 78%, var(--bg-0) 100%),
    linear-gradient(90deg, rgba(251, 255, 248, 0.68), rgba(251, 255, 248, 0) 18%, rgba(251, 255, 248, 0) 82%, rgba(251, 255, 248, 0.68));
}

.topbar {
  border-bottom-color: rgba(171, 210, 166, 0.64);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.94), rgba(239, 251, 233, 0.78));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 16px 38px rgba(47, 96, 58, 0.07);
}

.brand-dot {
  border-color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(135deg, #fbfff8 0 46%, #bfe8b8 46% 100%);
  box-shadow:
    0 0 0 1px rgba(86, 168, 106, 0.18),
    0 14px 28px rgba(47, 96, 58, 0.12);
}

.brand-dot::before {
  background: var(--green);
  box-shadow: 9px 9px 0 var(--amber);
}

.brand-dot::after {
  background: var(--blue);
}

.brand-name,
.hero-title,
.view-title,
.branch-name,
.detail-title,
.card-title,
.compare-head h3,
.input-panel-head span:first-child {
  color: var(--ink);
}

.brand-sub,
.hero-tag,
.hero-foot,
.view-sub,
.hint,
.choice-panel-head,
.choice-followup-sub,
.branch-summary,
.detail-summary,
.timeline-event,
.compare-step,
.history-input,
.drawer-sub,
.history-empty {
  color: var(--ink-dim);
}

.steps {
  border-color: rgba(171, 210, 166, 0.7);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.82), rgba(222, 243, 216, 0.78));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 12px 28px rgba(47, 96, 58, 0.055);
}

.steps .step {
  color: var(--ink-dim);
}

.steps .step:hover {
  background: rgba(251, 255, 248, 0.78);
  color: var(--ink);
}

.steps .step.current,
.entry-mode-btn.active,
.primary-btn,
.chat-input button {
  color: #fbfff8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #21462f 0, #4f9c62 58%, #8bcf7f 100%);
  box-shadow:
    0 16px 34px rgba(86, 168, 106, 0.22),
    0 8px 18px rgba(23, 45, 31, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

.primary-btn:hover {
  box-shadow:
    0 22px 48px rgba(86, 168, 106, 0.26),
    0 11px 24px rgba(23, 45, 31, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.primary-btn::after {
  background: linear-gradient(135deg, rgba(239, 251, 233, 0.24), rgba(255, 255, 255, 0));
}

.reset-btn,
.ghost-btn,
.regen-btn,
.entry-switch {
  border-color: rgba(171, 210, 166, 0.72);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.96), rgba(239, 251, 233, 0.84));
  color: var(--ink-soft);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.84) inset,
    0 11px 25px rgba(47, 96, 58, 0.06);
}

.reset-btn:hover,
.ghost-btn:hover,
.regen-btn:hover,
.chat-input button:hover {
  border-color: rgba(86, 168, 106, 0.72);
  background: rgba(251, 255, 248, 0.96);
  color: var(--blue-deep);
  box-shadow: 0 14px 34px rgba(86, 168, 106, 0.14);
}

.regen-btn::before,
.act-mark,
.hero-eyebrow,
.view-title em,
.life-choice-action,
.timeline-day,
.bubble.future .who,
.future-edit-strip[open] summary,
.plan-grid li.add-row::before {
  color: var(--blue-deep);
}

.hero-title {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86),
    0 20px 48px rgba(47, 96, 58, 0.12);
}

.hero-eyebrow .rule {
  background: currentColor;
}

.input-wrap,
.choice-wrap,
.life-choice-card,
.radar-cell,
.branch-card,
.card,
.brief-panel,
.branch-compare,
.action-evidence,
.empty-state,
.api-banner,
.history-item,
.drawer-panel,
.drawer-toggles,
.future-edit-strip {
  border-color: rgba(171, 210, 166, 0.58);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.96), rgba(239, 251, 233, 0.88)),
    rgba(251, 255, 248, 0.9);
  box-shadow:
    0 18px 44px rgba(47, 96, 58, 0.09),
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 0 0 1px rgba(226, 242, 222, 0.5);
}

.input-wrap:focus-within,
.choice-detail-input:focus,
.chat-input input:focus,
.drawer-panel input:focus,
.editable.editing,
.editable[contenteditable="true"]:focus {
  border-color: rgba(86, 168, 106, 0.72);
  outline-color: var(--blue);
  box-shadow:
    0 0 0 4px rgba(86, 168, 106, 0.14),
    0 18px 44px rgba(47, 96, 58, 0.09);
}

.input-panel-head,
.choice-panel-head,
.input-row,
.card-title,
.brief-head,
.compare-head,
.branch-stats,
.drawer-actions,
.drawer-section,
.timeline li,
.plan-grid li,
.score-list li {
  border-color: var(--line-soft);
}

.decision-input,
.choice-detail-input,
.chat-input input,
.drawer-panel input[type="text"],
.drawer-panel input[type="password"],
.score-input {
  background: rgba(251, 255, 248, 0.94);
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 0 0 1px rgba(171, 210, 166, 0.18);
}

.decision-input::placeholder,
.choice-detail-input::placeholder,
.chat-input input::placeholder {
  color: var(--ink-faint);
}

.chip,
.chat-tab,
.branch-proof span,
.compare-summary span {
  border-color: rgba(171, 210, 166, 0.58);
  background: rgba(251, 255, 248, 0.88);
  color: var(--ink-soft);
}

.chip:hover,
.chat-tab:hover,
.plan-grid li.add-row:hover {
  background: #def3d8;
  color: var(--blue-deep);
}

.chip:hover,
.chat-tab:hover,
.life-choice-card:hover,
.life-choice-card.selected,
.radar-cell:hover,
.branch-card:hover,
.history-item:hover {
  border-color: rgba(86, 168, 106, 0.7);
  box-shadow:
    0 26px 62px rgba(47, 96, 58, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 0 0 1px rgba(86, 168, 106, 0.18);
}

.hero-instrument,
.branch-image,
.life-choice-scene {
  border-color: rgba(251, 255, 248, 0.78);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.82), rgba(251, 255, 248, 0.18) 42%),
    linear-gradient(135deg, #eaf9df 0, #b7e2af 55%, #7fc781 100%);
  box-shadow:
    0 28px 68px rgba(47, 96, 58, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.hero-instrument::before,
.branch-image::before {
  background-image:
    linear-gradient(90deg, rgba(23, 45, 31, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 45, 31, 0.046) 1px, transparent 1px);
}

.hero-instrument::after {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.36) 0, transparent 24%, transparent 100%),
    linear-gradient(90deg, rgba(86, 168, 106, 0.18), transparent 35%),
    linear-gradient(270deg, rgba(182, 211, 111, 0.18), transparent 40%),
    linear-gradient(180deg, transparent 64%, rgba(47, 96, 58, 0.12));
}

.map-line {
  background: linear-gradient(90deg, rgba(23, 45, 31, 0.44), rgba(86, 168, 106, 0.28), rgba(251, 255, 248, 0.1));
  box-shadow: none;
}

.map-node {
  border-color: rgba(251, 255, 248, 0.9);
  background: #285239;
  box-shadow:
    0 0 0 6px rgba(251, 255, 248, 0.2),
    0 10px 20px rgba(47, 96, 58, 0.16);
}

.map-node-core {
  background: var(--blue);
  box-shadow:
    0 0 0 7px rgba(251, 255, 248, 0.28),
    0 0 0 14px rgba(86, 168, 106, 0.13),
    0 14px 28px rgba(47, 96, 58, 0.18);
}

.map-node-a { border-color: #6fba6d; }
.map-node-b { border-color: #9fb552; }
.map-node-c { border-color: #68b99a; }
.map-node-d { border-color: #b6d36f; }

.instrument-card,
.instrument-metrics {
  border-color: rgba(251, 255, 248, 0.54);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.66), rgba(222, 243, 216, 0.36)),
    rgba(251, 255, 248, 0.3);
  box-shadow:
    0 14px 30px rgba(47, 96, 58, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.34) inset;
}

.instrument-card::before {
  background: var(--accent, var(--blue));
}

.instrument-card b,
.instrument-card strong,
.instrument-metrics b {
  color: var(--ink);
}

.instrument-card i,
.instrument-metrics i {
  background: rgba(23, 45, 31, 0.14);
}

.instrument-metrics i::before {
  background: linear-gradient(90deg, #56a86a, #b6d36f);
}

.card-a { --accent: #6fba6d; border-top-color: rgba(111, 186, 109, 0.72); }
.card-b { --accent: #9fb552; border-top-color: rgba(159, 181, 82, 0.72); }
.card-c { --accent: #68b99a; border-top-color: rgba(104, 185, 154, 0.72); }
.card-d { --accent: #b6d36f; border-top-color: rgba(182, 211, 111, 0.72); }

.scene-city .life-choice-scene {
  background: linear-gradient(180deg, #f3ffef 0, #c8eec1 56%, #fbfff8 56% 100%);
}

.scene-town .life-choice-scene {
  background: linear-gradient(180deg, #f7fff3 0, #d9f0bc 48%, #e8f8e4 48% 100%);
}

.scene-road .life-choice-scene {
  background: linear-gradient(180deg, #edfbea 0, #bee5c4 54%, #fbfff8 54% 100%);
}

.scene-market .life-choice-scene {
  background: linear-gradient(180deg, #f0fbe8 0, #c6e2a0 52%, #effbe9 52% 100%);
}

.scene-mark {
  background: rgba(251, 255, 248, 0.88);
  color: var(--ink);
}

.scene-line,
.scene-shape.aux {
  background: rgba(23, 45, 31, 0.2);
}

.scene-shape.main {
  background: linear-gradient(180deg, rgba(251, 255, 248, 0.98), rgba(86, 168, 106, 0.26));
  box-shadow: -26px 14px 0 rgba(182, 211, 111, 0.2);
}

.branch-A { --brand-color: #56a86a; }
.branch-B { --brand-color: #84b95a; }
.branch-C { --brand-color: #68b99a; }
.branch-D { --brand-color: #b6d36f; }

.radar-cell:nth-child(1) { --cell-color: #56a86a; }
.radar-cell:nth-child(2) { --cell-color: #6fba6d; }
.radar-cell:nth-child(3) { --cell-color: #84b95a; }
.radar-cell:nth-child(4) { --cell-color: #68b99a; }
.radar-cell:nth-child(5) { --cell-color: #9fb552; }
.radar-cell:nth-child(6) { --cell-color: #7aa86f; }

.radar-label,
.life-judgement-label,
.action-evidence-head b,
.brief-block h3 {
  color: var(--blue-deep);
}

.branch-card::before,
.radar-cell::before {
  background: linear-gradient(180deg, var(--brand-color, var(--cell-color, var(--blue))), rgba(255, 255, 255, 0));
}

.branch-card::after {
  border-color: color-mix(in srgb, var(--brand-color) 28%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-color) 16%, transparent), transparent 68%),
    linear-gradient(90deg, color-mix(in srgb, var(--brand-color) 18%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--brand-color) 12%, transparent) 1px, transparent 1px);
}

.branch-card.branch-D,
.life-judgement,
.choice-followup,
.verdict,
.brief-block,
.evidence-block,
.evidence-confidence,
.branch-proof,
.action-evidence-head b {
  border-color: rgba(171, 210, 166, 0.62);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.92), rgba(222, 243, 216, 0.72)),
    rgba(251, 255, 248, 0.84);
}

.branch-tag,
.branch-pill,
.compare-code {
  border-color: color-mix(in srgb, var(--brand-color, var(--blue)) 28%, #fbfff8);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-color, var(--blue)) 15%, #fbfff8), rgba(251, 255, 248, 0.78));
  color: color-mix(in srgb, var(--brand-color, var(--blue)) 76%, var(--ink));
}

.compare-summary b {
  background: #285239;
  color: #fbfff8;
}

.compare-row {
  border-bottom-color: var(--line-soft);
  background: rgba(251, 255, 248, 0.7);
}

.compare-row:hover {
  background: color-mix(in srgb, var(--brand-color) 10%, #fbfff8);
}

.compare-bar-track,
.score-bar,
.risk-meter,
.timeline::before {
  background: #d7ead2;
}

.compare-bar-track i,
.score-bar > span,
.risk-fill {
  background: linear-gradient(90deg, #56a86a, #8bcf7f);
}

.compare-bar.pressure .compare-bar-track i,
.risk-fill.warn {
  background: #9fb552;
}

.risk-fill.danger {
  background: var(--red);
}

.slider-row input[type="range"] {
  background: linear-gradient(90deg, #6fba6d, #b6d36f, #b05c47);
}

.slider-row input[type="range"]::-webkit-slider-thumb,
.slider-row input[type="range"]::-moz-range-thumb {
  background: #285239;
}

.timeline li::before,
.plan-grid li::before {
  border-color: var(--blue);
  background: #fbfff8;
}

.timeline li.warn::before,
.card.warn li::before {
  border-color: var(--amber);
  background: rgba(159, 181, 82, 0.14);
}

.timeline li.danger::before {
  border-color: var(--red);
}

.card-title .kicker,
.card.warn .card-title .kicker {
  background:
    linear-gradient(180deg, #fbfff8, #def3d8);
  color: var(--blue-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 0 0 1px rgba(171, 210, 166, 0.46);
}

.card.warn {
  border-color: rgba(176, 92, 71, 0.28);
  background:
    linear-gradient(180deg, rgba(176, 92, 71, 0.06), rgba(251, 255, 248, 0) 44%),
    rgba(251, 255, 248, 0.94);
}

.card.warn .card-title,
.card.warn .card-title .kicker,
.view-sub em,
.risk-tip.danger,
.history-delete:hover {
  color: var(--red);
}

.card.warn p {
  border-left-color: var(--red);
  background: rgba(176, 92, 71, 0.08);
}

.chat-box {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.76), rgba(251, 255, 248, 0.18)),
    linear-gradient(90deg, rgba(23, 45, 31, 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 45, 31, 0.026) 1px, transparent 1px),
    #effbe9;
}

.chat-tab.active {
  border-color: rgba(86, 168, 106, 0.5);
  background: rgba(86, 168, 106, 0.13);
  color: var(--blue-deep);
}

.bubble.future {
  border-color: rgba(171, 210, 166, 0.58);
  background: #fbfff8;
}

.bubble.me {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #2f7d46, #8bcf7f);
  color: #fbfff8;
  box-shadow: 0 12px 26px rgba(86, 168, 106, 0.2);
}

.bubble.system {
  border-color: var(--line-strong);
  background: rgba(251, 255, 248, 0.74);
}

.toast {
  border-color: rgba(251, 255, 248, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    rgba(23, 45, 31, 0.94);
}

.toast-card {
  border-color: rgba(171, 210, 166, 0.58);
  background:
    linear-gradient(180deg, rgba(251, 255, 248, 0.96), rgba(239, 251, 233, 0.9)),
    rgba(251, 255, 248, 0.94);
  color: var(--ink);
}

.toast-icon,
.toast-error .toast-icon {
  background: rgba(86, 168, 106, 0.15);
  color: var(--blue-deep);
}

.toast-copy strong {
  color: var(--ink);
}

.toast-copy span {
  color: var(--ink-dim);
}

.drawer-mask {
  background: rgba(23, 45, 31, 0.24);
}

.loading {
  background: rgba(238, 251, 233, 0.86);
}

.ink-ring {
  border-color: rgba(23, 45, 31, 0.13);
  border-top-color: var(--blue);
  border-right-color: var(--green);
}

.ink-sweep {
  border-color: rgba(159, 181, 82, 0.18);
  border-bottom-color: var(--amber);
}

.ink-bloom {
  background: #285239;
  box-shadow:
    -11px -9px 0 var(--blue),
    12px -9px 0 var(--green),
    0 12px 0 var(--amber);
}

.loader-ellipsis i,
.ai-badge.loading {
  color: var(--blue);
}

.ai-badge.ok { color: var(--green); }
.ai-badge.error { color: var(--red); }

.branch-image-placeholder {
  color: var(--ink-soft);
}

.branch-image.error .branch-image-placeholder {
  background: rgba(176, 92, 71, 0.18);
}

.image-download-btn {
  border-color: rgba(251, 255, 248, 0.74);
  background: rgba(23, 45, 31, 0.76);
  color: #fbfff8;
}

.image-download-btn:hover {
  background: rgba(23, 45, 31, 0.9);
}

.api-banner::before {
  background: var(--blue);
  box-shadow: 12px 0 0 var(--green), 24px 0 0 var(--amber);
}

.brief-block li::before,
.evidence-block li::before {
  background: var(--blue);
}

.editable:hover {
  background: rgba(86, 168, 106, 0.1);
  box-shadow: inset 0 -1px 0 var(--blue);
}

.score-input {
  border-color: var(--blue);
}

.chat-box::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.drawer-panel::-webkit-scrollbar-thumb {
  background: rgba(100, 128, 106, 0.4);
  background-clip: content-box;
}

@keyframes nodePulse {
  0%, 100% {
    box-shadow:
      0 0 0 7px rgba(251, 255, 248, 0.24),
      0 0 0 14px rgba(86, 168, 106, 0.11),
      0 14px 28px rgba(47, 96, 58, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(251, 255, 248, 0.34),
      0 0 0 22px rgba(86, 168, 106, 0.08),
      0 16px 34px rgba(47, 96, 58, 0.2);
  }
}

/* Light green + sky-blue theme override */
:root {
  --bg-0: #eefbe9;
  --bg-1: #f8fffb;
  --bg-2: #e2f7ee;
  --bg-3: #c8e8dc;
  --bg-warm: #edf9ff;

  --ink: #132f27;
  --ink-soft: #365d52;
  --ink-dim: #5f8076;
  --ink-faint: #94aaa2;

  --blue: #5aaee8;
  --blue-deep: #2279b7;
  --green: #56a86a;
  --red: #b05c47;
  --cyan: #68bfd3;
  --amber: #9fb552;
  --violet: #6faecf;

  --lilac: var(--blue);
  --lilac-deep: var(--blue-deep);
  --lilac-soft: #bfe5fb;
  --lilac-bg: #edf9ff;
  --lilac-line: #b8dff5;
  --lilac-faint: rgba(90, 174, 232, 0.12);

  --line: #c8e8dc;
  --line-soft: #e0f2eb;
  --line-strong: #a9d6c8;

  --warm: var(--amber);
  --danger: var(--red);
  --ok: var(--green);
  --warm-soft: rgba(159, 181, 82, 0.14);
  --danger-soft: rgba(176, 92, 71, 0.11);
  --ok-soft: rgba(86, 168, 106, 0.12);

  --premium-ink: #132f27;
  --premium-ink-2: #21473d;
  --premium-jade: #56a86a;
  --premium-mint: #9fd99f;
  --premium-blue: #5aaee8;
  --premium-sky: #a9ddfb;
  --premium-coral: #b05c47;
  --premium-amber: #b6d36f;
  --premium-surface: rgba(248, 255, 251, 0.92);
  --premium-line: rgba(169, 214, 200, 0.5);
  --premium-shadow: 0 30px 76px rgba(39, 91, 77, 0.15);

  --shadow-sm:
    0 1px 1px rgba(19, 47, 39, 0.04),
    0 10px 24px rgba(39, 91, 77, 0.055);
  --shadow:
    0 20px 54px rgba(39, 91, 77, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
  --shadow-lg:
    0 34px 84px rgba(19, 47, 39, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.62) inset;
}

html {
  background: var(--bg-0);
}

body {
  background-color: var(--bg-0);
  background-image:
    linear-gradient(180deg, rgba(248, 255, 251, 0.98) 0, rgba(239, 251, 233, 0.82) 34%, rgba(238, 251, 233, 0) 72%),
    linear-gradient(115deg, rgba(86, 168, 106, 0.16) 0, rgba(86, 168, 106, 0.03) 38%, transparent 64%),
    linear-gradient(288deg, rgba(90, 174, 232, 0.16) 0, rgba(90, 174, 232, 0.03) 34%, transparent 60%),
    linear-gradient(180deg, #f7fff3 0, #eefbe9 55%, #edf9ff 100%);
}

body::before {
  background:
    linear-gradient(90deg, rgba(19, 47, 39, 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(19, 47, 39, 0.024) 1px, transparent 1px);
}

::selection {
  background: rgba(90, 174, 232, 0.24);
  color: var(--ink);
}

.grain {
  opacity: 0.14;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(19, 47, 39, 0.1) 0, rgba(19, 47, 39, 0.1) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(19, 47, 39, 0.07) 0, rgba(19, 47, 39, 0.07) 1px, transparent 1px, transparent 6px);
}

.vignette {
  background:
    linear-gradient(180deg, rgba(238, 251, 233, 0) 0, rgba(238, 251, 233, 0.48) 72%, var(--bg-0) 100%),
    linear-gradient(90deg, rgba(248, 255, 251, 0.68), rgba(248, 255, 251, 0) 18%, rgba(248, 255, 251, 0) 82%, rgba(248, 255, 251, 0.68));
}

.topbar {
  border-bottom-color: rgba(169, 214, 200, 0.68);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.94), rgba(231, 249, 244, 0.8));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 16px 38px rgba(39, 91, 77, 0.07);
}

.brand-dot {
  border-color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(135deg, #f8fffb 0 48%, #c8eefa 48% 100%);
  box-shadow:
    0 0 0 1px rgba(90, 174, 232, 0.18),
    0 14px 28px rgba(39, 91, 77, 0.12);
}

.brand-dot::before {
  background: var(--green);
  box-shadow: 9px 9px 0 var(--blue);
}

.brand-dot::after {
  background: #9fd99f;
}

.brand-name,
.hero-title,
.view-title,
.branch-name,
.detail-title,
.card-title,
.compare-head h3,
.input-panel-head span:first-child {
  color: var(--ink);
}

.brand-sub,
.hero-tag,
.hero-foot,
.view-sub,
.hint,
.choice-panel-head,
.choice-followup-sub,
.branch-summary,
.detail-summary,
.timeline-event,
.compare-step,
.history-input,
.drawer-sub,
.history-empty {
  color: var(--ink-dim);
}

.steps {
  border-color: rgba(169, 214, 200, 0.74);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.84), rgba(226, 247, 238, 0.78));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 12px 28px rgba(39, 91, 77, 0.055);
}

.steps .step {
  color: var(--ink-dim);
}

.steps .step:hover {
  background: rgba(248, 255, 251, 0.8);
  color: var(--ink);
}

.steps .step.current,
.entry-mode-btn.active,
.primary-btn,
.chat-input button {
  color: #f8fffb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #23543d 0, #56a86a 48%, #5aaee8 100%);
  box-shadow:
    0 16px 34px rgba(90, 174, 232, 0.22),
    0 8px 18px rgba(19, 47, 39, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

.primary-btn:hover {
  box-shadow:
    0 22px 48px rgba(90, 174, 232, 0.26),
    0 11px 24px rgba(19, 47, 39, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.primary-btn::after {
  background: linear-gradient(135deg, rgba(237, 249, 255, 0.26), rgba(255, 255, 255, 0));
}

.reset-btn,
.ghost-btn,
.regen-btn,
.entry-switch {
  border-color: rgba(169, 214, 200, 0.74);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.96), rgba(231, 249, 244, 0.84));
  color: var(--ink-soft);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.84) inset,
    0 11px 25px rgba(39, 91, 77, 0.06);
}

.reset-btn:hover,
.ghost-btn:hover,
.regen-btn:hover,
.chat-input button:hover {
  border-color: rgba(90, 174, 232, 0.72);
  background: rgba(248, 255, 251, 0.96);
  color: var(--blue-deep);
  box-shadow: 0 14px 34px rgba(90, 174, 232, 0.14);
}

.regen-btn::before,
.act-mark,
.hero-eyebrow,
.view-title em,
.life-choice-action,
.timeline-day,
.bubble.future .who,
.future-edit-strip[open] summary,
.plan-grid li.add-row::before {
  color: var(--blue-deep);
}

.hero-title {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.86),
    0 20px 48px rgba(39, 91, 77, 0.12);
}

.hero-eyebrow .rule {
  background: currentColor;
}

.input-wrap,
.choice-wrap,
.life-choice-card,
.radar-cell,
.branch-card,
.card,
.brief-panel,
.branch-compare,
.action-evidence,
.empty-state,
.api-banner,
.history-item,
.drawer-panel,
.drawer-toggles,
.future-edit-strip {
  border-color: rgba(169, 214, 200, 0.6);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.96), rgba(231, 249, 244, 0.88)),
    rgba(248, 255, 251, 0.9);
  box-shadow:
    0 18px 44px rgba(39, 91, 77, 0.09),
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 0 0 1px rgba(224, 242, 235, 0.5);
}

.input-wrap:focus-within,
.choice-detail-input:focus,
.chat-input input:focus,
.drawer-panel input:focus,
.editable.editing,
.editable[contenteditable="true"]:focus {
  border-color: rgba(90, 174, 232, 0.72);
  outline-color: var(--blue);
  box-shadow:
    0 0 0 4px rgba(90, 174, 232, 0.14),
    0 18px 44px rgba(39, 91, 77, 0.09);
}

.input-panel-head,
.choice-panel-head,
.input-row,
.card-title,
.brief-head,
.compare-head,
.branch-stats,
.drawer-actions,
.drawer-section,
.timeline li,
.plan-grid li,
.score-list li {
  border-color: var(--line-soft);
}

.decision-input,
.choice-detail-input,
.chat-input input,
.drawer-panel input[type="text"],
.drawer-panel input[type="password"],
.score-input {
  background: rgba(248, 255, 251, 0.94);
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.82) inset,
    0 0 0 1px rgba(169, 214, 200, 0.18);
}

.decision-input::placeholder,
.choice-detail-input::placeholder,
.chat-input input::placeholder {
  color: var(--ink-faint);
}

.chip,
.chat-tab,
.branch-proof span,
.compare-summary span {
  border-color: rgba(169, 214, 200, 0.58);
  background: rgba(248, 255, 251, 0.88);
  color: var(--ink-soft);
}

.chip:hover,
.chat-tab:hover,
.plan-grid li.add-row:hover {
  background: #edf9ff;
  color: var(--blue-deep);
}

.chip:hover,
.chat-tab:hover,
.life-choice-card:hover,
.life-choice-card.selected,
.radar-cell:hover,
.branch-card:hover,
.history-item:hover {
  border-color: rgba(90, 174, 232, 0.7);
  box-shadow:
    0 26px 62px rgba(39, 91, 77, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.78) inset,
    0 0 0 1px rgba(90, 174, 232, 0.18);
}

.hero-instrument,
.branch-image,
.life-choice-scene {
  border-color: rgba(248, 255, 251, 0.8);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.84), rgba(248, 255, 251, 0.18) 42%),
    linear-gradient(135deg, #e9fbe4 0, #bfe9c3 46%, #a9ddfb 100%);
  box-shadow:
    0 28px 68px rgba(39, 91, 77, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.hero-instrument::before,
.branch-image::before {
  background-image:
    linear-gradient(90deg, rgba(19, 47, 39, 0.052) 1px, transparent 1px),
    linear-gradient(0deg, rgba(19, 47, 39, 0.044) 1px, transparent 1px);
}

.hero-instrument::after {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.36) 0, transparent 24%, transparent 100%),
    linear-gradient(90deg, rgba(86, 168, 106, 0.18), transparent 35%),
    linear-gradient(270deg, rgba(90, 174, 232, 0.22), transparent 42%),
    linear-gradient(180deg, transparent 64%, rgba(39, 91, 77, 0.12));
}

.map-line {
  background: linear-gradient(90deg, rgba(19, 47, 39, 0.42), rgba(86, 168, 106, 0.3), rgba(90, 174, 232, 0.2));
  box-shadow: none;
}

.map-node {
  border-color: rgba(248, 255, 251, 0.9);
  background: #285247;
  box-shadow:
    0 0 0 6px rgba(248, 255, 251, 0.2),
    0 10px 20px rgba(39, 91, 77, 0.16);
}

.map-node-core {
  background: var(--green);
  box-shadow:
    0 0 0 7px rgba(248, 255, 251, 0.28),
    0 0 0 14px rgba(90, 174, 232, 0.12),
    0 14px 28px rgba(39, 91, 77, 0.18);
}

.map-node-a { border-color: #56a86a; }
.map-node-b { border-color: #5aaee8; }
.map-node-c { border-color: #68bfd3; }
.map-node-d { border-color: #b6d36f; }

.instrument-card,
.instrument-metrics {
  border-color: rgba(248, 255, 251, 0.56);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.68), rgba(237, 249, 255, 0.36)),
    rgba(248, 255, 251, 0.3);
  box-shadow:
    0 14px 30px rgba(39, 91, 77, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.34) inset;
}

.instrument-card::before {
  background: var(--accent, var(--blue));
}

.instrument-card b,
.instrument-card strong,
.instrument-metrics b {
  color: var(--ink);
}

.instrument-card i,
.instrument-metrics i {
  background: rgba(19, 47, 39, 0.14);
}

.instrument-metrics i::before {
  background: linear-gradient(90deg, #56a86a, #5aaee8);
}

.card-a { --accent: #56a86a; border-top-color: rgba(86, 168, 106, 0.72); }
.card-b { --accent: #5aaee8; border-top-color: rgba(90, 174, 232, 0.72); }
.card-c { --accent: #68bfd3; border-top-color: rgba(104, 191, 211, 0.72); }
.card-d { --accent: #b6d36f; border-top-color: rgba(182, 211, 111, 0.72); }

.scene-city .life-choice-scene {
  background: linear-gradient(180deg, #f3ffef 0, #c8eec1 54%, #edf9ff 54% 100%);
}

.scene-town .life-choice-scene {
  background: linear-gradient(180deg, #f7fff3 0, #d8efc8 48%, #dff2ff 48% 100%);
}

.scene-road .life-choice-scene {
  background: linear-gradient(180deg, #edf9ff 0, #c8e8dc 54%, #f8fffb 54% 100%);
}

.scene-market .life-choice-scene {
  background: linear-gradient(180deg, #effbe9 0, #bfe9c3 52%, #dff2ff 52% 100%);
}

.scene-mark {
  background: rgba(248, 255, 251, 0.9);
  color: var(--ink);
}

.scene-line,
.scene-shape.aux {
  background: rgba(19, 47, 39, 0.2);
}

.scene-shape.main {
  background: linear-gradient(180deg, rgba(248, 255, 251, 0.98), rgba(90, 174, 232, 0.26));
  box-shadow: -26px 14px 0 rgba(86, 168, 106, 0.18);
}

.branch-A { --brand-color: #56a86a; }
.branch-B { --brand-color: #5aaee8; }
.branch-C { --brand-color: #68bfd3; }
.branch-D { --brand-color: #b6d36f; }

.radar-cell:nth-child(1) { --cell-color: #56a86a; }
.radar-cell:nth-child(2) { --cell-color: #5aaee8; }
.radar-cell:nth-child(3) { --cell-color: #68bfd3; }
.radar-cell:nth-child(4) { --cell-color: #77c38c; }
.radar-cell:nth-child(5) { --cell-color: #9fb552; }
.radar-cell:nth-child(6) { --cell-color: #6faecf; }

.radar-label,
.life-judgement-label,
.action-evidence-head b,
.brief-block h3 {
  color: var(--blue-deep);
}

.branch-card::before,
.radar-cell::before {
  background: linear-gradient(180deg, var(--brand-color, var(--cell-color, var(--blue))), rgba(255, 255, 255, 0));
}

.branch-card::after {
  border-color: color-mix(in srgb, var(--brand-color) 28%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-color) 16%, transparent), transparent 68%),
    linear-gradient(90deg, color-mix(in srgb, var(--brand-color) 18%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--brand-color) 12%, transparent) 1px, transparent 1px);
}

.branch-card.branch-D,
.life-judgement,
.choice-followup,
.verdict,
.brief-block,
.evidence-block,
.evidence-confidence,
.branch-proof,
.action-evidence-head b {
  border-color: rgba(169, 214, 200, 0.62);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.92), rgba(226, 247, 238, 0.72)),
    rgba(248, 255, 251, 0.84);
}

.branch-tag,
.branch-pill,
.compare-code {
  border-color: color-mix(in srgb, var(--brand-color, var(--blue)) 28%, #f8fffb);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-color, var(--blue)) 15%, #f8fffb), rgba(248, 255, 251, 0.78));
  color: color-mix(in srgb, var(--brand-color, var(--blue)) 76%, var(--ink));
}

.compare-summary b {
  background: #285247;
  color: #f8fffb;
}

.compare-row {
  border-bottom-color: var(--line-soft);
  background: rgba(248, 255, 251, 0.7);
}

.compare-row:hover {
  background: color-mix(in srgb, var(--brand-color) 10%, #f8fffb);
}

.compare-bar-track,
.score-bar,
.risk-meter,
.timeline::before {
  background: #d4eadf;
}

.compare-bar-track i,
.score-bar > span,
.risk-fill {
  background: linear-gradient(90deg, #56a86a, #5aaee8);
}

.compare-bar.pressure .compare-bar-track i,
.risk-fill.warn {
  background: #9fb552;
}

.risk-fill.danger {
  background: var(--red);
}

.slider-row input[type="range"] {
  background: linear-gradient(90deg, #56a86a, #5aaee8, #b05c47);
}

.slider-row input[type="range"]::-webkit-slider-thumb,
.slider-row input[type="range"]::-moz-range-thumb {
  background: #285247;
}

.timeline li::before,
.plan-grid li::before {
  border-color: var(--blue);
  background: #f8fffb;
}

.timeline li.warn::before,
.card.warn li::before {
  border-color: var(--amber);
  background: rgba(159, 181, 82, 0.14);
}

.timeline li.danger::before {
  border-color: var(--red);
}

.card-title .kicker,
.card.warn .card-title .kicker {
  background:
    linear-gradient(180deg, #f8fffb, #edf9ff);
  color: var(--blue-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 0 0 1px rgba(169, 214, 200, 0.46);
}

.card.warn {
  border-color: rgba(176, 92, 71, 0.28);
  background:
    linear-gradient(180deg, rgba(176, 92, 71, 0.06), rgba(248, 255, 251, 0) 44%),
    rgba(248, 255, 251, 0.94);
}

.card.warn .card-title,
.card.warn .card-title .kicker,
.view-sub em,
.risk-tip.danger,
.history-delete:hover {
  color: var(--red);
}

.card.warn p {
  border-left-color: var(--red);
  background: rgba(176, 92, 71, 0.08);
}

.chat-box {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.76), rgba(248, 255, 251, 0.18)),
    linear-gradient(90deg, rgba(19, 47, 39, 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(19, 47, 39, 0.026) 1px, transparent 1px),
    #eefbe9;
}

.chat-tab.active {
  border-color: rgba(90, 174, 232, 0.5);
  background: rgba(90, 174, 232, 0.13);
  color: var(--blue-deep);
}

.bubble.future {
  border-color: rgba(169, 214, 200, 0.58);
  background: #f8fffb;
}

.bubble.me {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #2f7d46, #5aaee8);
  color: #f8fffb;
  box-shadow: 0 12px 26px rgba(90, 174, 232, 0.2);
}

.bubble.system {
  border-color: var(--line-strong);
  background: rgba(248, 255, 251, 0.74);
}

.toast {
  border-color: rgba(248, 255, 251, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    rgba(19, 47, 39, 0.94);
}

.toast-card {
  border-color: rgba(169, 214, 200, 0.58);
  background:
    linear-gradient(180deg, rgba(248, 255, 251, 0.96), rgba(231, 249, 244, 0.9)),
    rgba(248, 255, 251, 0.94);
  color: var(--ink);
}

.toast-icon,
.toast-error .toast-icon {
  background: rgba(90, 174, 232, 0.15);
  color: var(--blue-deep);
}

.toast-copy strong {
  color: var(--ink);
}

.toast-copy span {
  color: var(--ink-dim);
}

.drawer-mask {
  background: rgba(19, 47, 39, 0.24);
}

.loading {
  background: rgba(238, 251, 233, 0.86);
}

.ink-ring {
  border-color: rgba(19, 47, 39, 0.13);
  border-top-color: var(--green);
  border-right-color: var(--blue);
}

.ink-sweep {
  border-color: rgba(90, 174, 232, 0.18);
  border-bottom-color: var(--blue);
}

.ink-bloom {
  background: #285247;
  box-shadow:
    -11px -9px 0 var(--green),
    12px -9px 0 var(--blue),
    0 12px 0 var(--amber);
}

.loader-ellipsis i,
.ai-badge.loading {
  color: var(--blue);
}

.ai-badge.ok { color: var(--green); }
.ai-badge.error { color: var(--red); }

.branch-image-placeholder {
  color: var(--ink-soft);
}

.branch-image.error .branch-image-placeholder {
  background: rgba(176, 92, 71, 0.18);
}

.image-download-btn {
  border-color: rgba(248, 255, 251, 0.74);
  background: rgba(19, 47, 39, 0.76);
  color: #f8fffb;
}

.image-download-btn:hover {
  background: rgba(19, 47, 39, 0.9);
}

.api-banner::before {
  background: var(--green);
  box-shadow: 12px 0 0 var(--blue), 24px 0 0 var(--amber);
}

.brief-block li::before,
.evidence-block li::before {
  background: var(--blue);
}

.editable:hover {
  background: rgba(90, 174, 232, 0.1);
  box-shadow: inset 0 -1px 0 var(--blue);
}

.score-input {
  border-color: var(--blue);
}

.chat-box::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.drawer-panel::-webkit-scrollbar-thumb {
  background: rgba(95, 128, 118, 0.4);
  background-clip: content-box;
}

@keyframes nodePulse {
  0%, 100% {
    box-shadow:
      0 0 0 7px rgba(248, 255, 251, 0.24),
      0 0 0 14px rgba(90, 174, 232, 0.1),
      0 14px 28px rgba(39, 91, 77, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(248, 255, 251, 0.34),
      0 0 0 22px rgba(90, 174, 232, 0.08),
      0 16px 34px rgba(39, 91, 77, 0.2);
  }
}

/* Blue-violet glass tech theme override */
:root {
  color-scheme: dark;

  --bg-0: #060817;
  --bg-1: #0b1026;
  --bg-2: #111a3a;
  --bg-3: #1b2a58;
  --bg-warm: #221339;

  --ink: #f5f8ff;
  --ink-soft: #dbe6ff;
  --ink-dim: #9fb0dc;
  --ink-faint: #66769f;

  --blue: #3f8cff;
  --blue-deep: #8ab8ff;
  --green: #2ee6a6;
  --red: #ff6b91;
  --cyan: #20d9ff;
  --amber: #ffd166;
  --violet: #a855f7;

  --lilac: var(--violet);
  --lilac-deep: #d8b4fe;
  --lilac-soft: #b8c7ff;
  --lilac-bg: rgba(116, 92, 255, 0.14);
  --lilac-line: rgba(148, 163, 255, 0.34);
  --lilac-faint: rgba(168, 85, 247, 0.14);

  --line: rgba(157, 181, 255, 0.22);
  --line-soft: rgba(157, 181, 255, 0.13);
  --line-strong: rgba(172, 196, 255, 0.36);

  --warm: var(--amber);
  --danger: var(--red);
  --ok: var(--green);
  --warm-soft: rgba(255, 209, 102, 0.14);
  --danger-soft: rgba(255, 107, 145, 0.13);
  --ok-soft: rgba(46, 230, 166, 0.12);

  --premium-ink: var(--ink);
  --premium-ink-2: var(--ink-soft);
  --premium-jade: var(--cyan);
  --premium-mint: var(--green);
  --premium-blue: var(--blue);
  --premium-sky: #9fc8ff;
  --premium-coral: var(--red);
  --premium-amber: var(--amber);
  --premium-surface: rgba(13, 20, 48, 0.7);
  --premium-line: rgba(172, 196, 255, 0.28);
  --premium-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);

  --shadow-sm:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 28px rgba(0, 0, 0, 0.16);
  --shadow:
    0 22px 58px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(140, 170, 255, 0.08);
  --shadow-lg:
    0 38px 96px rgba(0, 0, 0, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 0 0 1px rgba(140, 170, 255, 0.1);
}

html {
  background: var(--bg-0);
}

body {
  position: relative;
  background-color: var(--bg-0);
  background-image:
    linear-gradient(180deg, rgba(14, 23, 52, 0.98) 0, rgba(9, 12, 30, 0.95) 42%, #060817 100%),
    linear-gradient(118deg, rgba(63, 140, 255, 0.28) 0, rgba(63, 140, 255, 0.05) 31%, transparent 62%),
    linear-gradient(292deg, rgba(168, 85, 247, 0.26) 0, rgba(168, 85, 247, 0.05) 35%, transparent 64%),
    linear-gradient(180deg, #081023 0, #060817 100%);
}

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

body::before {
  opacity: 0.54;
  background:
    linear-gradient(90deg, rgba(143, 171, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(143, 171, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.32) 70%, transparent);
}

body::after {
  background:
    linear-gradient(104deg, transparent 0 18%, rgba(90, 144, 255, 0.13) 18% 19%, transparent 19% 100%),
    linear-gradient(126deg, transparent 0 54%, rgba(168, 85, 247, 0.12) 54% 55%, transparent 55% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 26%);
}

::selection {
  background: rgba(95, 153, 255, 0.34);
  color: var(--ink);
}

.grain {
  opacity: 0.18;
  mix-blend-mode: screen;
  background-image:
    repeating-linear-gradient(0deg, rgba(205, 218, 255, 0.11) 0, rgba(205, 218, 255, 0.11) 1px, transparent 1px, transparent 5px),
    repeating-linear-gradient(90deg, rgba(155, 179, 255, 0.08) 0, rgba(155, 179, 255, 0.08) 1px, transparent 1px, transparent 7px);
}

.vignette {
  background:
    linear-gradient(180deg, rgba(6, 8, 23, 0) 0, rgba(6, 8, 23, 0.34) 70%, rgba(6, 8, 23, 0.9) 100%),
    linear-gradient(90deg, rgba(6, 8, 23, 0.78), transparent 20%, transparent 80%, rgba(6, 8, 23, 0.78));
}

main,
.topbar {
  z-index: 2;
}

.topbar {
  border-bottom-color: rgba(151, 180, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(15, 23, 55, 0.78), rgba(9, 14, 35, 0.58));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.09) inset,
    0 18px 42px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px) saturate(1.45);
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
}

.brand-dot {
  border: 1px solid rgba(204, 216, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(32, 217, 255, 0.9), rgba(63, 140, 255, 0.82) 48%, rgba(168, 85, 247, 0.9));
  box-shadow:
    0 0 0 5px rgba(63, 140, 255, 0.12),
    0 16px 34px rgba(59, 130, 246, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.38) inset;
}

.brand-dot::before {
  background: #ecfeff;
  box-shadow: 9px 9px 0 rgba(216, 180, 254, 0.95);
}

.brand-dot::after {
  background: var(--cyan);
}

.brand-name,
.hero-title,
.view-title,
.branch-name,
.detail-title,
.card-title,
.compare-head h3,
.input-panel-head span:first-child,
.choice-panel-head span:first-child,
.history-topic,
.drawer-panel h3 {
  color: var(--ink);
}

.brand-sub,
.hero-tag,
.hero-foot,
.view-sub,
.hint,
.choice-panel-head,
.choice-followup-sub,
.branch-summary,
.detail-summary,
.timeline-event,
.compare-step,
.history-input,
.drawer-sub,
.history-empty,
.card-sub {
  color: var(--ink-dim);
}

.hero-title {
  color: var(--ink);
  background: linear-gradient(92deg, #f8fbff 0, #a7d6ff 36%, #d8b4fe 74%, #ffffff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 24px 64px rgba(80, 120, 255, 0.22);
}

.hero-eyebrow,
.act-mark,
.view-title em,
.life-choice-action,
.timeline-day,
.bubble.future .who,
.future-edit-strip[open] summary,
.plan-grid li.add-row::before,
.regen-btn::before {
  color: #9ed5ff;
}

.hero-eyebrow .rule {
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: 0.72;
}

.steps,
.entry-switch {
  border-color: rgba(162, 188, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(12, 18, 44, 0.56);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 14px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
}

.steps .step {
  color: var(--ink-dim);
}

.steps .step:hover {
  color: var(--ink);
  background: rgba(132, 168, 255, 0.12);
}

.steps .step.done {
  color: var(--ink-faint);
}

.steps .step.current,
.entry-mode-btn.active,
.primary-btn,
.chat-input button {
  color: #f8fbff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #2563eb 0, #6d5dfc 48%, #a855f7 100%);
  box-shadow:
    0 18px 42px rgba(82, 103, 255, 0.3),
    0 8px 20px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.primary-btn:hover,
.chat-input button:hover {
  box-shadow:
    0 24px 54px rgba(99, 102, 241, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.26) inset;
}

.primary-btn::after {
  background:
    linear-gradient(90deg, rgba(32, 217, 255, 0.24), rgba(255, 255, 255, 0.16), rgba(216, 180, 254, 0.24));
}

.reset-btn,
.ghost-btn,
.regen-btn {
  border-color: rgba(162, 188, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(13, 20, 48, 0.52);
  color: var(--ink-soft);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 12px 26px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
}

.reset-btn:hover,
.ghost-btn:hover,
.regen-btn:hover {
  border-color: rgba(93, 172, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(77, 142, 255, 0.2), rgba(168, 85, 247, 0.08)),
    rgba(16, 24, 58, 0.68);
  color: #ddecff;
  box-shadow:
    0 18px 42px rgba(59, 130, 246, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.hero-shell {
  position: relative;
}

.input-wrap,
.choice-wrap,
.life-choice-card,
.radar-cell,
.branch-card,
.card,
.brief-panel,
.branch-compare,
.action-evidence,
.empty-state,
.api-banner,
.history-item,
.drawer-panel,
.drawer-toggles,
.future-edit-strip,
.choice-followup,
.brief-block,
.evidence-block,
.evidence-confidence,
.branch-proof,
.verdict,
.life-judgement {
  border-color: rgba(157, 181, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    linear-gradient(135deg, rgba(63, 140, 255, 0.08), rgba(168, 85, 247, 0.06)),
    rgba(10, 16, 40, 0.58);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 0 0 1px rgba(147, 171, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.42);
  -webkit-backdrop-filter: blur(22px) saturate(1.42);
}

.input-wrap::before,
.choice-wrap::before,
.card::before,
.brief-panel::before,
.action-evidence::before,
.radar-cell::after {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.18), transparent 24%, transparent 100%);
}

.input-wrap:focus-within,
.choice-detail-input:focus,
.chat-input input:focus,
.drawer-panel input:focus,
.editable.editing,
.editable[contenteditable="true"]:focus {
  border-color: rgba(70, 161, 255, 0.72);
  outline-color: var(--cyan);
  box-shadow:
    0 0 0 4px rgba(32, 217, 255, 0.14),
    0 24px 60px rgba(0, 0, 0, 0.28),
    0 0 36px rgba(63, 140, 255, 0.14);
}

.input-panel-head,
.choice-panel-head,
.input-row,
.card-title,
.brief-head,
.compare-head,
.branch-stats,
.drawer-actions,
.drawer-section,
.timeline li,
.plan-grid li,
.score-list li {
  border-color: var(--line-soft);
}

.decision-input,
.choice-detail-input,
.chat-input input,
.drawer-panel input[type="text"],
.drawer-panel input[type="password"],
.score-input {
  border-color: rgba(162, 188, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(4, 9, 27, 0.42);
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 0 1px rgba(88, 118, 210, 0.08);
}

.decision-input::placeholder,
.choice-detail-input::placeholder,
.chat-input input::placeholder {
  color: rgba(169, 185, 224, 0.62);
}

.chip,
.chat-tab,
.branch-proof span,
.compare-summary span,
.branch-tag,
.branch-pill,
.compare-code {
  border-color: rgba(157, 181, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    rgba(12, 20, 49, 0.54);
  color: var(--ink-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.chip:hover,
.chat-tab:hover,
.plan-grid li.add-row:hover {
  border-color: rgba(32, 217, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(32, 217, 255, 0.16), rgba(168, 85, 247, 0.08)),
    rgba(14, 24, 58, 0.72);
  color: #e4f7ff;
}

.life-choice-card:hover,
.life-choice-card.selected,
.radar-cell:hover,
.branch-card:hover,
.history-item:hover {
  border-color: rgba(90, 171, 255, 0.54);
  box-shadow:
    0 30px 74px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(32, 217, 255, 0.12),
    0 0 42px rgba(80, 110, 255, 0.17);
}

.hero-instrument,
.branch-image,
.life-choice-scene {
  border-color: rgba(206, 218, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035) 44%),
    linear-gradient(135deg, #09122e 0, #102050 44%, #322066 72%, #0a1f45 100%);
  box-shadow:
    0 30px 78px rgba(0, 0, 0, 0.36),
    0 1px 0 rgba(255, 255, 255, 0.13) inset;
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.hero-instrument::before,
.branch-image::before {
  background-image:
    linear-gradient(90deg, rgba(213, 225, 255, 0.075) 1px, transparent 1px),
    linear-gradient(0deg, rgba(213, 225, 255, 0.058) 1px, transparent 1px);
}

.hero-instrument::after {
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.16) 0, transparent 22%, transparent 100%),
    linear-gradient(90deg, rgba(32, 217, 255, 0.18), transparent 38%),
    linear-gradient(270deg, rgba(168, 85, 247, 0.24), transparent 42%),
    linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.34));
}

.map-line {
  background: linear-gradient(90deg, rgba(228, 244, 255, 0.82), rgba(32, 217, 255, 0.44), rgba(168, 85, 247, 0.22), transparent);
  box-shadow: 0 0 18px rgba(32, 217, 255, 0.18);
}

.map-node {
  border-color: rgba(229, 237, 255, 0.78);
  background: #0b1637;
  box-shadow:
    0 0 0 6px rgba(63, 140, 255, 0.12),
    0 0 22px rgba(32, 217, 255, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.24);
}

.map-node-core {
  background: var(--cyan);
  box-shadow:
    0 0 0 7px rgba(32, 217, 255, 0.16),
    0 0 0 16px rgba(168, 85, 247, 0.1),
    0 0 34px rgba(32, 217, 255, 0.32),
    0 14px 28px rgba(0, 0, 0, 0.26);
}

.map-node-a { border-color: #60a5fa; }
.map-node-b { border-color: #a855f7; }
.map-node-c { border-color: #22d3ee; }
.map-node-d { border-color: #ffd166; }

.instrument-card,
.instrument-metrics {
  border-color: rgba(218, 226, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.048)),
    linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--blue)) 16%, transparent), transparent 70%),
    rgba(7, 13, 33, 0.36);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.instrument-card b,
.instrument-card strong,
.instrument-metrics b {
  color: rgba(248, 251, 255, 0.92);
}

.instrument-card i,
.instrument-metrics i {
  background: rgba(207, 220, 255, 0.16);
}

.instrument-metrics i::before {
  background: linear-gradient(90deg, #20d9ff, #7c5cff, #a855f7);
}

.card-a { --accent: #60a5fa; border-top-color: rgba(96, 165, 250, 0.72); }
.card-b { --accent: #a855f7; border-top-color: rgba(168, 85, 247, 0.72); }
.card-c { --accent: #22d3ee; border-top-color: rgba(34, 211, 238, 0.72); }
.card-d { --accent: #ffd166; border-top-color: rgba(255, 209, 102, 0.72); }

.scene-city .life-choice-scene {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 38%),
    linear-gradient(135deg, #09142f 0, #173377 52%, #5b2fa8 100%);
}

.scene-town .life-choice-scene {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 38%),
    linear-gradient(135deg, #0b1737 0, #123b6d 50%, #146c92 100%);
}

.scene-road .life-choice-scene {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 40%),
    linear-gradient(135deg, #090f2b 0, #1d2664 48%, #7045d9 100%);
}

.scene-market .life-choice-scene {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), transparent 42%),
    linear-gradient(135deg, #101637 0, #31216a 48%, #8b3ff6 100%);
}

.scene-mark {
  background: rgba(244, 249, 255, 0.88);
  color: #172554;
}

.scene-line,
.scene-shape.aux {
  background: rgba(229, 237, 255, 0.34);
}

.scene-shape.main {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(117, 176, 255, 0.28));
  box-shadow: -26px 14px 0 rgba(168, 85, 247, 0.2);
}

.branch-A { --brand-color: #60a5fa; }
.branch-B { --brand-color: #a855f7; }
.branch-C { --brand-color: #22d3ee; }
.branch-D { --brand-color: #ffd166; }

.radar-cell:nth-child(1) { --cell-color: #60a5fa; }
.radar-cell:nth-child(2) { --cell-color: #a855f7; }
.radar-cell:nth-child(3) { --cell-color: #22d3ee; }
.radar-cell:nth-child(4) { --cell-color: #2ee6a6; }
.radar-cell:nth-child(5) { --cell-color: #ffd166; }
.radar-cell:nth-child(6) { --cell-color: #ff6b91; }

.radar-label,
.life-judgement-label,
.action-evidence-head b,
.brief-block h3 {
  color: #9ed5ff;
}

.branch-card::before,
.radar-cell::before {
  background: linear-gradient(180deg, var(--brand-color, var(--cell-color, var(--blue))), rgba(255, 255, 255, 0));
}

.branch-card::after {
  border-color: color-mix(in srgb, var(--brand-color) 34%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-color) 18%, transparent), transparent 68%),
    linear-gradient(90deg, color-mix(in srgb, var(--brand-color) 18%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--brand-color) 12%, transparent) 1px, transparent 1px);
}

.branch-tag,
.branch-pill,
.compare-code {
  border-color: color-mix(in srgb, var(--brand-color, var(--blue)) 36%, rgba(210, 225, 255, 0.2));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand-color, var(--blue)) 18%, transparent), rgba(255, 255, 255, 0.04)),
    rgba(10, 18, 44, 0.68);
  color: color-mix(in srgb, var(--brand-color, var(--blue)) 44%, #f8fbff);
}

.compare-summary b {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #f8fbff;
}

.compare-row {
  border-bottom-color: var(--line-soft);
  background: rgba(10, 17, 42, 0.36);
}

.compare-row:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--brand-color) 12%, transparent), transparent),
    rgba(13, 21, 52, 0.72);
}

.compare-bar-track,
.score-bar,
.risk-meter,
.timeline::before {
  background: rgba(140, 164, 226, 0.16);
}

.compare-bar-track i,
.score-bar > span,
.risk-fill {
  background: linear-gradient(90deg, #20d9ff, #5b7cfa, #a855f7);
  box-shadow: 0 0 18px rgba(32, 217, 255, 0.22);
}

.compare-bar.pressure .compare-bar-track i,
.risk-fill.warn {
  background: linear-gradient(90deg, #ffd166, #ff9f6e);
}

.risk-fill.danger {
  background: linear-gradient(90deg, #ff6b91, #ff4d6d);
}

.risk-tip.warn { color: #ffe29c; }
.risk-tip.danger { color: #ff9ab2; }
.risk-tip.ok { color: #8ff7d2; }

.slider-row input[type="range"] {
  background: linear-gradient(90deg, #20d9ff, #7c5cff, #ff6b91);
}

.slider-row input[type="range"]::-webkit-slider-thumb,
.slider-row input[type="range"]::-moz-range-thumb {
  background: #edf6ff;
  box-shadow:
    0 0 0 4px rgba(32, 217, 255, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.timeline li::before,
.plan-grid li::before {
  border-color: var(--cyan);
  background: #0b1637;
  box-shadow: 0 0 18px rgba(32, 217, 255, 0.2);
}

.timeline li.warn::before,
.card.warn li::before {
  border-color: var(--amber);
  background: rgba(255, 209, 102, 0.12);
}

.timeline li.danger::before {
  border-color: var(--red);
  background: rgba(255, 107, 145, 0.12);
}

.card-title .kicker,
.card.warn .card-title .kicker {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(63, 140, 255, 0.14);
  color: #bfe6ff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 0 0 1px rgba(132, 168, 255, 0.24);
}

.card.warn {
  border-color: rgba(255, 107, 145, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 107, 145, 0.09), rgba(255, 255, 255, 0.025) 46%),
    rgba(12, 18, 44, 0.62);
}

.card.warn .card-title,
.card.warn .card-title .kicker,
.view-sub em,
.history-delete:hover {
  color: #ff9ab2;
}

.card.warn p {
  border-left-color: var(--red);
  background: rgba(255, 107, 145, 0.09);
}

.chat-box {
  border-color: rgba(157, 181, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    linear-gradient(90deg, rgba(157, 181, 255, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(157, 181, 255, 0.036) 1px, transparent 1px),
    rgba(5, 10, 28, 0.5);
}

.chat-tab.active {
  border-color: rgba(32, 217, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(32, 217, 255, 0.16), rgba(168, 85, 247, 0.09)),
    rgba(12, 20, 49, 0.72);
  color: #dbf7ff;
}

.bubble.future {
  border-color: rgba(157, 181, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(12, 19, 45, 0.78);
}

.bubble.me {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #2563eb, #7c5cff 54%, #a855f7);
  color: #f8fbff;
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.28);
}

.bubble.system {
  border-color: rgba(157, 181, 255, 0.2);
  background: rgba(12, 18, 44, 0.54);
}

.toast {
  border-color: rgba(190, 208, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(7, 12, 30, 0.9);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.36);
}

.toast-card {
  border-color: rgba(157, 181, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
    rgba(12, 18, 44, 0.86);
  color: var(--ink);
}

.toast-icon,
.toast-error .toast-icon {
  background: rgba(63, 140, 255, 0.16);
  color: #9ed5ff;
}

.toast-copy strong {
  color: var(--ink);
}

.toast-copy span {
  color: var(--ink-dim);
}

.drawer-mask {
  background: rgba(3, 6, 18, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.loading {
  background:
    linear-gradient(180deg, rgba(9, 13, 31, 0.88), rgba(6, 8, 23, 0.92));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.ink-ring {
  border-color: rgba(157, 181, 255, 0.18);
  border-top-color: var(--cyan);
  border-right-color: var(--violet);
}

.ink-sweep {
  border-color: rgba(168, 85, 247, 0.2);
  border-bottom-color: var(--violet);
}

.ink-bloom {
  background: var(--blue);
  box-shadow:
    -11px -9px 0 var(--cyan),
    12px -9px 0 var(--violet),
    0 12px 0 var(--amber);
}

.loader-text {
  color: var(--ink);
}

.loader-sub,
.branch-image-placeholder {
  color: var(--ink-dim);
}

.loader-ellipsis i,
.ai-badge.loading {
  color: var(--cyan);
}

.ai-badge.ok { color: var(--green); }
.ai-badge.error { color: var(--red); }

.branch-image.error .branch-image-placeholder {
  background: rgba(255, 107, 145, 0.16);
}

.image-download-btn {
  border-color: rgba(212, 225, 255, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(8, 14, 34, 0.78);
  color: #f8fbff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.image-download-btn:hover {
  background:
    linear-gradient(135deg, rgba(32, 217, 255, 0.2), rgba(168, 85, 247, 0.14)),
    rgba(9, 16, 40, 0.88);
}

.api-banner::before {
  background: var(--cyan);
  box-shadow: 12px 0 0 var(--blue), 24px 0 0 var(--violet);
}

.brief-block li::before,
.evidence-block li::before {
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(32, 217, 255, 0.22);
}

.editable:hover {
  background: rgba(32, 217, 255, 0.1);
  box-shadow: inset 0 -1px 0 var(--cyan);
}

.score-input {
  border-color: rgba(32, 217, 255, 0.5);
}

.chat-box::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.drawer-panel::-webkit-scrollbar-thumb {
  background: rgba(139, 164, 226, 0.42);
  background-clip: content-box;
}

@keyframes nodePulse {
  0%, 100% {
    box-shadow:
      0 0 0 7px rgba(32, 217, 255, 0.14),
      0 0 0 16px rgba(168, 85, 247, 0.08),
      0 0 34px rgba(32, 217, 255, 0.28),
      0 14px 28px rgba(0, 0, 0, 0.26);
  }
  50% {
    box-shadow:
      0 0 0 10px rgba(32, 217, 255, 0.2),
      0 0 0 24px rgba(168, 85, 247, 0.1),
      0 0 42px rgba(32, 217, 255, 0.34),
      0 16px 34px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 640px) {
  .topbar {
    background:
      linear-gradient(180deg, rgba(15, 23, 55, 0.9), rgba(9, 14, 35, 0.72));
  }

  .hero-title {
    font-size: 38px;
  }

  .input-wrap,
  .choice-wrap,
  .card,
  .branch-card,
  .radar-cell {
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
  }
}

/* Readability pass for the glass theme */
.choice-panel-head,
.input-panel-head span:last-child,
.choice-followup-head span:last-child {
  color: #c5d5ff;
  font-weight: 780;
  text-shadow: 0 1px 10px rgba(4, 8, 24, 0.45);
}

.choice-panel-head span:first-child,
.input-panel-head span:first-child {
  color: #f9fbff;
  font-weight: 850;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.36);
}

.life-choice-card {
  color: #f5f8ff;
}

.life-choice-card.selected {
  border-color: rgba(132, 204, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(75, 124, 255, 0.2), rgba(168, 85, 247, 0.1) 48%, rgba(8, 14, 35, 0.76)),
    rgba(11, 18, 45, 0.86);
  box-shadow:
    0 30px 78px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(32, 217, 255, 0.18),
    0 0 44px rgba(91, 124, 250, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.16) inset;
}

.life-choice-card.selected::before {
  background: linear-gradient(180deg, rgba(32, 217, 255, 0.9), rgba(168, 85, 247, 0));
  opacity: 0.92;
}

.life-choice-card.selected .life-choice-scene {
  border-color: rgba(188, 221, 255, 0.36);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(32, 217, 255, 0.14) inset;
}

.life-choice-title,
.branch-name,
.detail-title,
.card-title,
.timeline-event {
  color: #f7faff;
  font-weight: 850;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.36);
}

.life-choice-card.selected .life-choice-title {
  color: #ffffff;
}

.life-choice-caption,
.branch-summary,
.detail-summary,
.card-sub,
.choice-followup-sub,
.timeline-meta,
.compare-step,
.history-input {
  color: #bfd0fb;
  font-weight: 620;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.life-choice-card.selected .life-choice-caption {
  color: #d8e6ff;
}

.life-choice-action,
.life-choice-card.selected .life-choice-action {
  color: #b9eaff;
  font-weight: 850;
  text-shadow: 0 0 16px rgba(32, 217, 255, 0.28);
}

.scene-mark {
  color: #162241;
  font-weight: 850;
}

.instrument-card strong,
.instrument-metrics b,
.branch-proof span,
.compare-summary span,
.chip,
.chat-tab {
  font-weight: 780;
}

.instrument-card strong {
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.36);
}

.instrument-card i,
.instrument-metrics i {
  background: rgba(218, 231, 255, 0.24);
}
