﻿:root {
  --bg: #faf7f3;
  --bg2: #f3eee8;
  --panel: #fefdfb;
  --panel2: #ffffff;
  --ink: #2d2926;
  --muted: #78716c;
  --placeholder: #a8a29e;
  --soft: #f5e6d0;
  --line: rgba(45, 41, 38, 0.1);
  --brand: #c8832e;
  --brand2: #f5e6d0;
  --green: #6b8a6f;
  --blue: #5b788a;
  --yellow: #c8832e;
  --red: #b8706a;
  --cognition: #6b8a9a;
  --habit: #c8832e;
  --work: #5b788a;
  --material: #8b9a6b;
  --state: #b87a82;
  --text-body: 13px;
  --text-small: 12px;
  --text-label: 11px;
  --radius-card: 12px;
  --radius-raised: 16px;
  --radius-input: 20px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-raised: 0 4px 16px rgba(0, 0, 0, 0.06);
  font-family: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg2);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

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

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

p {
  color: var(--muted);
  font-size: var(--text-body);
  line-height: 1.7;
}

h1 {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

h3 {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 16px calc(80px + env(safe-area-inset-bottom));
  background:
    linear-gradient(90deg, rgba(45, 41, 38, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

.topbar,
.section-head,
.card-top,
.asset-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  align-items: center;
  margin-bottom: 16px;
  padding-top: 16px;
}

.eyebrow,
.hero-kicker {
  margin-bottom: 5px;
  color: var(--brand);
  font-size: var(--text-label);
  font-weight: 700;
  line-height: 1.1;
}

.ghost-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(166, 93, 63, 0.16);
  border-radius: 17px;
  color: #fff7ed;
  background: var(--brand);
  box-shadow: 0 12px 24px rgba(166, 93, 63, 0.2);
  font-size: 23px;
  font-weight: 700;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 20px;
}

.hero-panel,
.section-block,
.composer-card,
.profile-card,
.answer-card,
.asset-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow-card);
}

.hero-panel,
.section-block,
.asset-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.hero-panel {
  background:
    linear-gradient(145deg, #ffe1c5, rgba(255, 250, 244, 0.74)),
    var(--panel);
}

.hero-copy {
  display: grid;
  gap: 8px;
}

.hero-copy p,
.section-head p {
  max-width: 34em;
}

.thought-note {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 180px;
  padding: 14px;
  border: 1px solid rgba(166, 93, 63, 0.12);
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.78);
  box-shadow: var(--shadow-card);
}

.thought-note strong {
  color: var(--brand);
  font-size: var(--text-small);
  line-height: 1.3;
}

.thought-note span {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.personal-report {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(166, 93, 63, 0.14);
  border-radius: 16px;
  padding: 15px;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 223, 188, 0.9), transparent 34%),
    linear-gradient(145deg, rgba(255, 251, 246, 0.96), rgba(255, 241, 226, 0.8));
  box-shadow: var(--shadow-raised);
}

.report-cover {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.report-cover span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff7ed;
  background: var(--brand);
  font-size: var(--text-label);
  font-weight: 700;
  line-height: 1;
}

.report-cover h2 {
  font-size: 24px;
  line-height: 1.18;
}

.report-cover p {
  color: #5b4e42;
  font-size: var(--text-body);
  line-height: 1.78;
}

.report-section,
.report-next {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(166, 93, 63, 0.1);
  border-radius: 23px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.58);
}

.report-section h3,
.report-next b {
  color: var(--brand);
  font-size: 14px;
  line-height: 1.35;
}

.report-section p,
.report-next p {
  color: #5f5145;
  font-size: var(--text-body);
  line-height: 1.78;
}

.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.report-tags span {
  border-radius: 999px;
  padding: 7px 10px;
  color: #6d5949;
  background: #f7eadb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

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

.guide-grid button {
  display: grid;
  gap: 7px;
  min-height: 84px;
  border: 1px solid rgba(166, 93, 63, 0.12);
  border-radius: 22px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  text-align: left;
  box-shadow: var(--shadow-card);
}

.guide-grid span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.guide-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.section-head h2 {
  font-size: 18px;
  line-height: 1.36;
}

.section-head p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.68;
}

.section-head.compact h3 {
  font-size: 16px;
  line-height: 1.38;
}

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

.status-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-grid button {
  border: 1px solid rgba(166, 93, 63, 0.1);
  border-radius: 20px;
  padding: 10px 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.status-grid button:active {
  transform: scale(0.97);
}

.status-grid button:hover {
  border-color: rgba(166, 93, 63, 0.22);
  background: #fffaf2;
}

.status-grid strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.status-grid span {
  display: block;
  margin-top: 3px;
  color: #907d6e;
  font-size: var(--text-label);
  font-weight: 700;
}

.patrol-list,
.inbox-list,
.asset-list,
.learning-log,
.call-result {
  display: grid;
  gap: 10px;
}

.call-result,
.learning-log {
  padding-bottom: 78px;
}

.patrol-card,
.inbox-card,
.asset-card,
.empty-card {
  border: 1px solid rgba(166, 93, 63, 0.12);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-card);
}

.patrol-card {
  display: grid;
  gap: 10px;
  background:
    linear-gradient(145deg, rgba(255, 233, 208, 0.95), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.7);
}

.patrol-card > span,
.card-top span,
.asset-head > span,
.asset-main span,
.answer-card > span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff7ed;
  background: var(--pill, var(--brand));
  font-size: var(--text-label);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.patrol-card > span {
  --pill: var(--brand);
}

.patrol-reason {
  border: 1px solid rgba(166, 93, 63, 0.1);
  border-radius: 20px;
  padding: 0;
  background: rgba(255, 250, 242, 0.78);
  overflow: hidden;
}

.patrol-reason summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 11px;
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 700;
}

.patrol-reason summary::-webkit-details-marker {
  display: none;
}

.patrol-reason .reason-body {
  display: grid;
  gap: 7px;
  padding: 0 10px 10px;
}

.patrol-reason p {
  color: #67584b;
  font-size: 13px;
  line-height: 1.72;
}

.patrol-reason b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: var(--text-small);
  line-height: 1.25;
}

.card-top strong,
.asset-main > strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--green);
  background: rgba(63, 139, 104, 0.1);
  font-size: 11px;
  line-height: 1;
}

.card-actions {
  display: grid;
  gap: 8px;
}

.card-actions.three {
  grid-template-columns: 1.12fr 0.82fr 1fr;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  width: 100%;
  border-radius: 17px;
  padding: 10px 9px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.primary-button {
  border: 0;
  color: #fff7ed;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 12px 22px rgba(166, 93, 63, 0.2);
}

.secondary-button {
  border: 1px solid rgba(166, 93, 63, 0.14);
  color: #7a6656;
  background: #f5e9dc;
}

.danger-lite {
  border-color: rgba(183, 106, 100, 0.24);
  color: #9a5550;
  background: #f5e2df;
}

.composer-card,
.profile-card {
  display: grid;
  gap: 11px;
  padding: 15px;
}

label {
  display: grid;
  gap: 7px;
  color: #5b4e42;
  font-size: 12px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(166, 93, 63, 0.16);
  border-radius: 20px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.86);
  outline: none;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

input:focus,
textarea:focus,
button:focus-visible,
.tab:focus-visible {
  outline: 2px solid rgba(166, 93, 63, 0.5);
  outline-offset: 2px;
}

.read-box,
.qa-grid,
.next-box {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.read-box p,
.qa-grid p,
.next-box {
  border-left: 4px solid rgba(166, 93, 63, 0.72);
  border-radius: 18px;
  padding: 10px 11px;
  background: #fffaf2;
}

.read-box b,
.qa-grid b,
.next-box b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: var(--text-label);
}

.chip-row,
.evidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 9px 0;
}

.soft-note {
  border-radius: 16px;
  padding: 8px 10px;
  color: #735f50;
  background: rgba(245, 233, 220, 0.74);
  font-size: 12px;
  line-height: 1.6;
}

.mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.source-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: var(--text-label);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.source-badge.trusted {
  color: #366c50;
  background: #e4f2e7;
}

.source-badge.pending {
  color: #8d6540;
  background: #f8e7c8;
  border: 1px dashed rgba(166, 93, 63, 0.28);
}

.chip-row button,
.evidence-strip button,
.chip-row span,
.chip-row em {
  border: 1px solid rgba(63, 139, 104, 0.14);
  border-radius: 999px;
  padding: 6px 9px;
  color: #366c50;
  background: #e4f2e7;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.asset-view-grid {
  display: grid;
  gap: 8px;
}

.graph-toolbar {
  display: inline-flex;
  gap: 8px;
}

.graph-toolbar button {
  min-height: 34px;
  border: 1px solid rgba(166, 93, 63, 0.14);
  border-radius: 999px;
  padding: 0 12px;
  color: #7a6656;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.graph-toolbar button.active {
  color: #fff7ed;
  background: var(--brand);
}

.graph-canvas {
  position: relative;
  height: 390px;
  border: 1px solid rgba(166, 93, 63, 0.12);
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 253, 247, 0.98), rgba(255, 245, 232, 0.62) 42%, rgba(241, 230, 214, 0.58)),
    rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.graph-canvas::before,
.graph-canvas::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.graph-canvas.star::before {
  inset: 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 26%, rgba(255, 255, 255, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 20% 72%, rgba(166, 93, 63, 0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 78%, rgba(95, 133, 97, 0.18) 0 1px, transparent 2px);
}

.graph-canvas.star::after {
  left: 50%;
  top: 50%;
  width: 230px;
  height: 170px;
  border-radius: 999px;
  transform: translate(-50%, -50%) rotate(-12deg);
  background: radial-gradient(circle, rgba(255, 221, 169, 0.42), rgba(255, 251, 241, 0) 68%);
  filter: blur(8px);
}

.tree-lines,
.star-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.graph-canvas.tree {
  height: 390px;
  background:
    radial-gradient(circle at 50% 32%, rgba(235, 245, 218, 0.7), transparent 45%),
    linear-gradient(145deg, rgba(255, 252, 244, 0.98), rgba(245, 235, 219, 0.72));
}

.graph-canvas.tree::before {
  inset: 28px 24px 34px;
  border-radius: 46% 54% 48% 52%;
  background: radial-gradient(circle at 50% 26%, rgba(217, 231, 195, 0.28), rgba(255, 255, 255, 0) 70%);
}

.tree-glow {
  fill: url(#leafGlow);
}

.tree-trunk-fill {
  fill: url(#trunkWarm);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.04));
}

.tree-highlight {
  fill: none;
  stroke: rgba(255, 248, 226, 0.42);
  stroke-width: 3;
  stroke-linecap: round;
}

.tree-branch {
  fill: none;
  stroke: rgba(135, 103, 70, 0.38);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.branch-1,
.branch-4 {
  stroke: rgba(154, 111, 73, 0.32);
}

.branch-2,
.branch-3,
.branch-5 {
  stroke: rgba(92, 126, 82, 0.3);
}

.tree-leaf {
  fill: rgba(226, 236, 205, 0.8);
  stroke: rgba(95, 133, 97, 0.2);
  stroke-width: 1.2;
  filter: drop-shadow(0 8px 10px rgba(95, 133, 97, 0.08));
}

.leaf-1,
.leaf-4 {
  fill: rgba(242, 224, 182, 0.75);
}

.leaf-2,
.leaf-3,
.leaf-5 {
  fill: rgba(220, 235, 202, 0.8);
}

.galaxy-halo {
  fill: url(#galaxyGlow);
  filter: url(#softBlur);
}

.star-orbit {
  fill: none;
  stroke: rgba(166, 93, 63, 0.22);
  stroke-width: 1.2;
  stroke-dasharray: 7 8;
}

.star-ray {
  fill: none;
  stroke: rgba(166, 93, 63, 0.14);
  stroke-width: 1.2;
}

.star-speck {
  fill: rgba(166, 93, 63, 0.34);
}

.graph-root,
.graph-core {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(166, 93, 63, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.94);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.graph-root {
  left: 50%;
  bottom: 20px;
  width: 116px;
  height: 116px;
  transform: translateX(-50%);
  place-content: center;
  padding: 14px;
}

.graph-root span,
.graph-core span,
.graph-node span {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

.graph-root strong,
.graph-core strong,
.graph-node strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.28;
}

.graph-branches {
  position: absolute;
  inset: 0;
}

.graph-node {
  position: absolute;
  z-index: 3;
  display: grid;
  align-content: center;
  gap: 2px;
  width: 92px;
  height: 78px;
  border: 1px solid color-mix(in srgb, var(--node) 38%, white);
  border-radius: 50% 45% 52% 43%;
  padding: 10px;
  color: var(--ink);
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.96), transparent 42%),
    color-mix(in srgb, var(--node) 18%, white);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.graph-node.active {
  border-color: color-mix(in srgb, var(--node) 62%, white);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(255, 255, 255, 0.62);
}

.graph-node strong {
  font-size: 19px;
  line-height: 1;
}

.graph-node em {
  display: none;
}

.tree-branches .graph-node {
  width: 86px;
  height: 72px;
  border-radius: 42% 58% 48% 52%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.95), transparent 38%),
    color-mix(in srgb, var(--node) 14%, white);
}

.tree-branches .graph-node-1 { left: 6%; top: 56px; }
.tree-branches .graph-node-2 { right: 7%; top: 42px; }
.tree-branches .graph-node-3 { left: 3%; top: 214px; }
.tree-branches .graph-node-4 { right: 3%; top: 218px; }
.tree-branches .graph-node-5 { left: 50%; top: 52px; transform: translateX(-50%); }

.graph-canvas.star {
  height: 390px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 241, 212, 0.96), rgba(255, 222, 196, 0.48) 34%, rgba(246, 228, 212, 0.38) 58%, rgba(255, 250, 244, 0.78)),
    linear-gradient(145deg, rgba(255, 250, 242, 0.98), rgba(247, 226, 210, 0.78));
}

.graph-canvas.nebula {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 213, 167, 0.58), rgba(255, 235, 214, 0.28) 28%, transparent 58%),
    radial-gradient(circle at 24% 34%, rgba(111, 154, 184, 0.2), transparent 34%),
    radial-gradient(circle at 76% 30%, rgba(240, 191, 88, 0.22), transparent 32%),
    radial-gradient(circle at 76% 76%, rgba(255, 154, 170, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(255, 250, 242, 0.98), rgba(247, 226, 210, 0.78));
}

.graph-orbit {
  position: absolute;
  inset: 0;
}

.graph-orbit .graph-node {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  border-width: 2px;
  padding: 9px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.98), transparent 32%),
    radial-gradient(circle at 62% 72%, color-mix(in srgb, var(--node) 36%, white), color-mix(in srgb, var(--node) 12%, white) 68%);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.13),
    0 0 0 7px color-mix(in srgb, var(--node) 10%, transparent);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.graph-orbit .graph-node:hover {
  transform: translateY(-2px) scale(1.03);
}

.graph-orbit .graph-node.active {
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.18),
    0 0 0 8px rgba(255, 255, 255, 0.74),
    0 0 28px color-mix(in srgb, var(--node) 42%, transparent);
}

.graph-orbit .graph-node-1 { left: 8%; top: 42px; }
.graph-orbit .graph-node-2 { right: 8%; top: 48px; }
.graph-orbit .graph-node-3 { left: 2%; bottom: 86px; }
.graph-orbit .graph-node-4 { right: 2%; bottom: 78px; }
.graph-orbit .graph-node-5 { left: 50%; bottom: 18px; transform: translateX(-50%); }

.graph-orbit .graph-node-5:hover {
  transform: translateX(-50%) translateY(-2px) scale(1.03);
}

.graph-core {
  left: 50%;
  top: 50%;
  width: 150px;
  min-height: 150px;
  transform: translate(-50%, -50%);
  align-content: center;
  padding: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 26%, #fffef8 0 18%, #fff1c9 34%, #ffc98c 74%, #d9865c 100%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.18),
    0 0 0 10px rgba(255, 255, 255, 0.5),
    0 0 54px rgba(255, 185, 100, 0.38);
}

.graph-core strong {
  font-size: 14px;
}

.lens-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  min-height: 74px;
  border: 1px solid rgba(166, 93, 63, 0.12);
  border-radius: 22px;
  padding: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  box-shadow: var(--shadow-card);
}

.lens-card span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.lens-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.lens-card p {
  grid-column: 1 / -1;
  font-size: var(--text-small);
  line-height: 1.35;
}

.lens-card.active {
  border-color: rgba(166, 93, 63, 0.32);
  background: #fffaf2;
  box-shadow: 0 14px 28px rgba(166, 93, 63, 0.13);
}

.asset-head {
  display: grid;
  gap: 9px;
}

.asset-head h2 {
  font-size: 16px;
  line-height: 1.48;
  font-weight: 800;
}

.asset-card {
  cursor: pointer;
}

.asset-card.open {
  border-color: rgba(63, 139, 104, 0.25);
  background:
    linear-gradient(145deg, rgba(228, 242, 231, 0.95), rgba(255, 255, 255, 0.76)),
    rgba(255, 255, 255, 0.76);
}

.asset-main h3,
.inbox-card h3 {
  margin: 10px 0 7px;
  font-size: 16px;
  line-height: 1.42;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.metric-row span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #7a6656;
  background: rgba(245, 233, 220, 0.82);
  font-size: var(--text-label);
  font-weight: 700;
  line-height: 1.1;
}

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

.thinking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.thinking-grid button {
  display: grid;
  gap: 7px;
  min-height: 92px;
  border: 1px solid rgba(166, 93, 63, 0.12);
  border-radius: 22px;
  padding: 12px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255, 251, 245, 0.98), rgba(255, 255, 255, 0.72));
  text-align: left;
  box-shadow: var(--shadow-card);
}

.thinking-grid button.active {
  border-color: rgba(166, 93, 63, 0.34);
  background: #fff7ef;
}

.thinking-grid span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.thinking-grid small {
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.5;
}

.thinking-grid em {
  color: rgba(113, 99, 84, 0.92);
  font-size: var(--text-label);
  font-style: normal;
  line-height: 1.4;
}

.scenario-grid button {
  display: grid;
  gap: 7px;
  min-height: 78px;
  border: 1px solid rgba(166, 93, 63, 0.12);
  border-radius: 22px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  box-shadow: var(--shadow-card);
}

.scenario-grid button.active {
  border-color: rgba(166, 93, 63, 0.34);
  background: #fffaf2;
}

.scenario-grid span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.scenario-grid small {
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.5;
}

.answer-card {
  display: grid;
  gap: 11px;
  padding: 15px;
  background:
    linear-gradient(145deg, #fffaf2, rgba(255, 255, 255, 0.76)),
    rgba(255, 255, 255, 0.72);
}

.answer-text {
  border: 1px solid rgba(63, 139, 104, 0.14);
  border-radius: 22px;
  padding: 13px;
  color: #4f4a43;
  background: #fffdf8;
  font-size: 13px;
  line-height: 1.82;
}

.learning-log p {
  border-left: 4px solid rgba(75, 127, 163, 0.55);
  border-radius: 18px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.68;
}

.empty-card {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.68;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: min(calc(100% - 28px), 430px);
  transform: translateX(-50%);
  border: 1px solid rgba(166, 93, 63, 0.14);
  border-radius: 22px;
  padding: 5px;
  background: rgba(255, 250, 242, 0.88);
  box-shadow: var(--shadow-raised);
  backdrop-filter: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 0;
  border-radius: 17px;
  color: #9a8777;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.tab.active {
  color: #fff7ed;
  background: var(--brand);
}

@media (max-width: 370px) {
  .app-shell {
    padding-inline: 10px;
  }

  .graph-canvas,
  .graph-canvas.star {
    height: 360px;
  }

  .graph-core {
    width: 128px;
    min-height: 128px;
    padding: 14px;
  }

  .graph-orbit .graph-node {
    width: 74px;
    height: 74px;
    padding: 7px;
  }

  .graph-orbit .graph-node strong {
    font-size: 17px;
  }

  .graph-orbit .graph-node span {
    font-size: 11px;
  }

  .graph-orbit .graph-node-1 { left: 5%; top: 42px; }
  .graph-orbit .graph-node-2 { right: 5%; top: 48px; }
  .graph-orbit .graph-node-3 { left: 1%; bottom: 84px; }
  .graph-orbit .graph-node-4 { right: 1%; bottom: 78px; }

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

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

  .tabbar {
    width: min(calc(100% - 20px), 430px);
    gap: 3px;
  }

  .tab {
    font-size: 11px;
    min-height: 38px;
  }
}

/* Phase 1: 璁捐绯荤粺鍙橀噺钀藉湴銆傚彧鏀舵嫝瑙嗚璇█锛屼笉鏀瑰彉鐜版湁浜や簰鍜屼俊鎭粨鏋勩€?*/
.hero-panel,
.answer-card {
  border-radius: var(--radius-raised);
  box-shadow: var(--shadow-raised);
}

.composer-card,
.profile-card {
  border-radius: var(--radius-input);
  background: var(--panel2);
  box-shadow: none;
}

.personal-report,
.report-cover,
.report-section,
.report-next {
  border-radius: var(--radius-raised);
  box-shadow: none;
}

.patrol-card,
.inbox-card,
.asset-card,
.empty-card,
.thought-note,
.lens-card,
.learning-log p {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.patrol-card,
.inbox-card,
.asset-card,
.empty-card {
  background: var(--panel);
}

.hero-panel,
.section-block,
.composer-card,
.profile-card,
.answer-card,
.asset-panel,
.tabbar {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.hero-panel {
  background: var(--panel);
}

.hero-panel::before,
.hero-panel::after {
  display: none;
}

.personal-report {
  background: linear-gradient(145deg, #fefdfb, #f5e6d0);
}

.report-cover,
.report-section,
.report-next {
  background: rgba(255, 255, 255, 0.72);
}

.tabbar {
  width: min(calc(100% - 32px), 430px);
  bottom: max(8px, env(safe-area-inset-bottom));
  border-radius: 16px;
  border-color: rgba(45, 41, 38, 0.08);
  padding: 4px;
  background: rgba(254, 253, 251, 0.96);
  box-shadow: var(--shadow-raised);
}

.tab {
  min-height: 40px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition: background 120ms ease, color 120ms ease, transform 100ms ease;
}

.tab.active {
  color: #ffffff;
  background: var(--brand);
}

button {
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 100ms ease;
}

input,
textarea {
  border-color: rgba(45, 41, 38, 0.08);
  color: var(--ink);
  background: var(--panel2);
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(200, 131, 46, 0.16);
  outline-offset: 1px;
}

.graph-canvas {
  border-color: rgba(45, 41, 38, 0.12);
}

.graph-orbit .graph-node-1,
.tree-branches .graph-node-1 {
  --node: var(--cognition) !important;
}

.graph-orbit .graph-node-2,
.tree-branches .graph-node-2 {
  --node: var(--habit) !important;
}

.graph-orbit .graph-node-3,
.tree-branches .graph-node-3 {
  --node: var(--work) !important;
}

.graph-orbit .graph-node-4,
.tree-branches .graph-node-4 {
  --node: var(--material) !important;
}

.graph-orbit .graph-node-5,
.tree-branches .graph-node-5 {
  --node: var(--state) !important;
}

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

/* 双主题执行层：主题切换只改变 html[data-theme]，组件颜色统一从变量读取。 */
:root {
  --bg: #1e1b18;
  --surface: #262320;
  --surface-input: #2d2a27;
  --text: #e8e4df;
  --text-secondary: #96918c;
  --accent: #d4953f;
  --accent-hover: #e0a950;
  --accent-soft: rgba(212, 149, 63, 0.15);
  --accent-glow: rgba(212, 149, 63, 0.28);
  --border: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(255, 255, 255, 0.04);
  --shadow: rgba(0, 0, 0, 0.22);
  --cognition: #7ba4b8;
  --habit: #d4953f;
  --work: #8bb5cc;
  --material: #a8b88a;
  --state: #c88a90;
  --success: #8bb58b;
  --danger: #d48a85;
  --danger-bg: rgba(212, 138, 133, 0.12);
  --bg2: var(--bg);
  --panel: var(--surface);
  --panel2: var(--surface-input);
  --ink: var(--text);
  --muted: var(--text-secondary);
  --placeholder: #77716b;
  --soft: var(--accent-soft);
  --line: var(--border);
  --brand: var(--accent);
  --brand2: var(--accent-hover);
  --green: var(--success);
  --blue: var(--cognition);
  --yellow: var(--habit);
  --red: var(--danger);
}

[data-theme="light"] {
  --bg: #f9f8f6;
  --surface: #fefdfb;
  --surface-input: #ffffff;
  --text: #2d2926;
  --text-secondary: #625b55;
  --accent: #b8722a;
  --accent-hover: #c8832e;
  --accent-soft: rgba(184, 114, 42, 0.1);
  --accent-glow: rgba(184, 114, 42, 0.2);
  --border: rgba(0, 0, 0, 0.08);
  --border-soft: rgba(0, 0, 0, 0.04);
  --shadow: rgba(0, 0, 0, 0.08);
  --cognition: #5b788a;
  --habit: #b8722a;
  --work: #6b9ab8;
  --material: #7b8e61;
  --state: #b76a64;
  --success: #6b8b6f;
  --danger: #b8706a;
  --danger-bg: rgba(184, 112, 106, 0.1);
  --bg2: var(--bg);
  --panel: var(--surface);
  --panel2: var(--surface-input);
  --ink: var(--text);
  --muted: var(--text-secondary);
  --placeholder: #817a74;
  --soft: var(--accent-soft);
  --line: var(--border);
  --brand: var(--accent);
  --brand2: var(--accent-hover);
  --green: var(--success);
  --blue: var(--cognition);
  --yellow: var(--habit);
  --red: var(--danger);
}

html,
body,
.app-shell {
  background: var(--bg);
  color: var(--text);
}

body {
  background: var(--bg);
}

.app-shell {
  background: var(--bg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-icon {
  border-color: var(--border);
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 12px 24px var(--accent-glow);
}

.hero-panel,
.section-block,
.asset-panel,
.personal-report,
.composer-card,
.profile-card,
.report-cover,
.report-section,
.report-next,
.thought-note,
.lens-card {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: 0 10px 26px var(--shadow);
}

.hero-panel,
.personal-report,
.report-cover,
.patrol-card,
.answer-card,
.asset-card.open {
  background: var(--surface);
}

.patrol-card,
.inbox-card,
.asset-card,
.answer-card,
.empty-card,
.learning-log p,
.status-grid button,
.guide-grid button,
.thinking-grid button,
.scenario-grid button {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

h1,
h2,
h3,
label,
.card-top strong,
.asset-main > strong,
.graph-root strong,
.graph-core strong,
.graph-node strong,
.patrol-reason summary,
.patrol-reason b {
  color: var(--text);
}

p,
.section-head p,
.hero-copy p,
.soft-note,
.report-cover p,
.report-section p,
.report-next p,
.thinking-grid small,
.scenario-grid small,
.guide-grid small,
.empty-card,
.patrol-reason p,
.answer-text,
.learning-log p,
.asset-card p,
.inbox-card p,
.patrol-card p {
  color: var(--text-secondary);
}

.eyebrow,
.hero-kicker,
.report-cover span,
.report-section h3,
.report-next b,
.guide-grid span,
.thinking-grid span,
.scenario-grid span,
.lens-card span,
.graph-root span,
.graph-core span,
.graph-node span {
  color: var(--accent);
}

input,
textarea {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface-input);
  box-shadow: inset 0 1px 0 var(--border-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

input:focus,
textarea:focus,
button:focus-visible,
.tab:focus-visible {
  outline-color: var(--accent);
}

.primary-button,
.tab.active,
.graph-toolbar button.active {
  color: var(--bg);
  background: var(--accent);
}

.secondary-button,
.card-actions button,
.graph-toolbar button,
.chip-row button,
.evidence-strip button,
.chip-row span,
.chip-row em,
.metric-row span {
  border-color: var(--border);
  color: var(--accent-hover);
  background: var(--accent-soft);
}

.source-badge.trusted {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 16%, var(--surface));
}

.source-badge.pending {
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.danger-lite {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

.read-box p,
.qa-grid p,
.next-box,
.answer-text,
.soft-note,
.patrol-reason {
  border-color: var(--border);
  color: var(--text-secondary);
  background: var(--surface-input);
}

.tabbar {
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 10px 26px var(--shadow);
}

.tab {
  color: var(--text-secondary);
}

.graph-canvas {
  border-color: var(--border);
  background: var(--surface-input);
}

.graph-core {
  color: var(--text);
  border-color: var(--border);
  background: color-mix(in srgb, var(--accent) 24%, var(--surface));
  box-shadow: 0 18px 42px var(--shadow), 0 0 0 10px var(--border-soft), 0 0 54px var(--accent-glow);
}

.graph-node {
  color: var(--text);
  border-color: color-mix(in srgb, var(--node) 48%, var(--surface));
  background: color-mix(in srgb, var(--node) 18%, var(--surface));
}

[data-theme="light"] .app-shell {
  background: var(--bg);
}

[data-theme="light"] .graph-canvas {
  background: var(--surface);
}

/* 黑色底色预览：保留卡片为暖纸质感，只把页面环境切到夜间书桌。 */
body:has(#view-feed.active) {
  background:
    radial-gradient(circle at 50% -12%, rgba(200, 131, 46, 0.16), transparent 34%),
    linear-gradient(180deg, #11100f 0%, #181614 56%, #0d0c0b 100%);
}

body:has(#view-feed.active) .app-shell {
  background:
    linear-gradient(90deg, rgba(245, 230, 208, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 18, 16, 0.96), rgba(14, 13, 12, 0.98));
}

body:has(#view-feed.active) .topbar h1 {
  color: #fefdfb;
}

body:has(#view-feed.active) .eyebrow,
body:has(#view-feed.active) .hero-kicker {
  color: #d9a45e;
}

body:has(#view-feed.active) .section-block,
body:has(#view-feed.active) .hero-panel,
body:has(#view-feed.active) .asset-panel {
  border-color: rgba(245, 230, 208, 0.1);
  background: #141210;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

body:has(#view-feed.active) .section-head h2,
body:has(#view-feed.active) .section-head h3,
body:has(#view-feed.active) .hero-copy h2,
body:has(#view-feed.active) label {
  color: #f6efe7;
}

body:has(#view-feed.active) .section-head p,
body:has(#view-feed.active) .hero-copy p,
body:has(#view-feed.active) .soft-note {
  color: #c7beb5;
}

body:has(#view-feed.active) .composer-card,
body:has(#view-feed.active) .profile-card {
  border-color: rgba(245, 230, 208, 0.1);
  background: #1d1a17;
}

body:has(#view-feed.active) .inbox-card,
body:has(#view-feed.active) .patrol-card,
body:has(#view-feed.active) .answer-card,
body:has(#view-feed.active) .empty-card {
  border-color: rgba(245, 230, 208, 0.11);
  background: #1c1917;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

body:has(#view-feed.active) .inbox-card h3,
body:has(#view-feed.active) .patrol-card h3,
body:has(#view-feed.active) .answer-card h3,
body:has(#view-feed.active) .empty-card,
body:has(#view-feed.active) .card-top h3,
body:has(#view-feed.active) .asset-main h3 {
  color: #f6efe7;
}

body:has(#view-feed.active) .inbox-card p,
body:has(#view-feed.active) .patrol-card p,
body:has(#view-feed.active) .answer-text,
body:has(#view-feed.active) .read-box p,
body:has(#view-feed.active) .qa-grid p,
body:has(#view-feed.active) .next-box,
body:has(#view-feed.active) .empty-card {
  color: #d8d0c7;
}

body:has(#view-feed.active) input,
body:has(#view-feed.active) textarea {
  border-color: rgba(230, 182, 109, 0.46);
  color: #f8f2ea;
  background: #100f0e;
}

body:has(#view-feed.active) input::placeholder,
body:has(#view-feed.active) textarea::placeholder {
  color: #9f968d;
}

body:has(#view-feed.active) .read-box p,
body:has(#view-feed.active) .qa-grid p,
body:has(#view-feed.active) .next-box,
body:has(#view-feed.active) .answer-text,
body:has(#view-feed.active) .soft-note {
  border-color: rgba(230, 182, 109, 0.22);
  background: #211d19;
}

body:has(#view-feed.active) .tabbar {
  border-color: rgba(245, 230, 208, 0.14);
  background: rgba(28, 25, 23, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

body:has(#view-feed.active) .tab {
  color: #c7beb5;
}

body:has(#view-feed.active) .tab.active {
  color: #1a1511;
  background: #e6b66d;
}

/* 全局深色预览：把输入页确认过的深色底板扩展到整个 App。 */
body {
  background:
    radial-gradient(circle at 50% -12%, rgba(200, 131, 46, 0.16), transparent 34%),
    linear-gradient(180deg, #11100f 0%, #181614 56%, #0d0c0b 100%);
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(245, 230, 208, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 18, 16, 0.96), rgba(14, 13, 12, 0.98));
}

.topbar h1,
.section-head h2,
.section-head h3,
.hero-copy h2,
label,
.asset-head h2,
.asset-main h3,
.inbox-card h3,
.patrol-card h3,
.answer-card h3,
.report-cover h2,
.report-section h3,
.thinking-grid span,
.scenario-grid span,
.guide-grid span {
  color: #f6efe7;
}

p,
.section-head p,
.hero-copy p,
.soft-note,
.report-cover p,
.report-section p,
.report-next p,
.thinking-grid small,
.scenario-grid small,
.guide-grid small,
.empty-card {
  color: #c7beb5;
}

.eyebrow,
.hero-kicker,
.report-cover span,
.report-section h3,
.report-next b {
  color: #e6b66d;
}

.hero-panel,
.section-block,
.asset-panel,
.personal-report {
  border-color: rgba(245, 230, 208, 0.1);
  background: #141210;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.composer-card,
.profile-card,
.report-cover,
.report-section,
.report-next,
.thought-note,
.lens-card {
  border-color: rgba(245, 230, 208, 0.1);
  background: #1d1a17;
  box-shadow: var(--shadow-card);
}

.patrol-card,
.inbox-card,
.asset-card,
.answer-card,
.empty-card,
.learning-log p {
  border-color: rgba(245, 230, 208, 0.11);
  background: #1c1917;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.read-box p,
.qa-grid p,
.next-box,
.answer-text,
.soft-note,
.patrol-reason,
.metric-row span {
  border-color: rgba(230, 182, 109, 0.22);
  color: #d8d0c7;
  background: #211d19;
}

.read-box b,
.qa-grid b,
.next-box b,
.patrol-reason b,
.patrol-reason summary,
.asset-main > strong {
  color: #f6efe7;
}

.patrol-reason p,
.answer-text,
.learning-log p,
.asset-card p,
.inbox-card p,
.patrol-card p {
  color: #d8d0c7;
}

input,
textarea {
  border-color: rgba(230, 182, 109, 0.46);
  color: #f8f2ea;
  background: #100f0e;
}

input::placeholder,
textarea::placeholder {
  color: #9f968d;
}

.primary-button {
  color: #1a1511;
  background: linear-gradient(135deg, #d6933b, #efd6a5);
}

.secondary-button,
.card-actions button,
.graph-toolbar button,
.chip-row button,
.evidence-strip button,
.chip-row span,
.chip-row em {
  border-color: rgba(230, 182, 109, 0.24);
  color: #e8c88f;
  background: rgba(230, 182, 109, 0.12);
}

.source-badge.trusted,
.source-badge.pending,
.report-tags span,
.status-grid button,
.guide-grid button,
.thinking-grid button,
.scenario-grid button {
  border-color: rgba(245, 230, 208, 0.1);
  color: #f6efe7;
  background: #1d1a17;
}

.status-grid span,
.lens-card p,
.thinking-grid em {
  color: #b9afa6;
}

.tabbar {
  border-color: rgba(245, 230, 208, 0.14);
  background: rgba(28, 25, 23, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

.tab {
  color: #c7beb5;
}

.tab.active {
  color: #1a1511;
  background: #e6b66d;
}

.graph-canvas {
  border-color: rgba(245, 230, 208, 0.1);
  background:
    radial-gradient(circle at 50% 18%, rgba(230, 182, 109, 0.16), rgba(22, 20, 18, 0.78) 42%, rgba(11, 11, 12, 0.92)),
    #101013;
}

.graph-core {
  color: #f6efe7;
  background: rgba(230, 182, 109, 0.14);
}

.graph-node {
  color: #f6efe7;
  background: rgba(245, 230, 208, 0.08);
}

/* 主题最终覆盖层：必须位于旧版预览规则之后，保证 data-theme 真正生效。 */
html,
body,
.app-shell {
  background: var(--bg) !important;
  color: var(--text) !important;
}

.app-shell {
  background-image: none !important;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar h1,
.section-head h2,
.section-head h3,
.hero-copy h2,
.asset-head h2,
.asset-main h3,
.inbox-card h3,
.patrol-card h3,
.answer-card h3,
.report-cover h2,
.report-section h3,
.thinking-grid span,
.scenario-grid span,
.guide-grid span,
label {
  color: var(--text) !important;
}

p,
.section-head p,
.hero-copy p,
.soft-note,
.report-cover p,
.report-section p,
.report-next p,
.thinking-grid small,
.scenario-grid small,
.guide-grid small,
.empty-card,
.patrol-reason p,
.answer-text,
.learning-log p,
.asset-card p,
.inbox-card p,
.patrol-card p {
  color: var(--text-secondary) !important;
}

.eyebrow,
.hero-kicker,
.report-cover span,
.report-section h3,
.report-next b,
.guide-grid span,
.thinking-grid span,
.scenario-grid span,
.lens-card span,
.graph-root span,
.graph-core span,
.graph-node span {
  color: var(--accent) !important;
}

.hero-panel,
.section-block,
.asset-panel,
.personal-report,
.composer-card,
.profile-card,
.report-cover,
.report-section,
.report-next,
.thought-note,
.lens-card,
.patrol-card,
.inbox-card,
.asset-card,
.answer-card,
.empty-card,
.learning-log p,
.status-grid button,
.guide-grid button,
.thinking-grid button,
.scenario-grid button {
  border-color: var(--border) !important;
  background: var(--surface) !important;
  box-shadow: 0 8px 22px var(--shadow) !important;
}

.ghost-icon {
  border-color: var(--border) !important;
  color: var(--bg) !important;
  background: var(--accent) !important;
  box-shadow: 0 12px 24px var(--accent-glow) !important;
}

input,
textarea {
  border-color: var(--border) !important;
  color: var(--text) !important;
  background: var(--surface-input) !important;
  box-shadow: inset 0 1px 0 var(--border-soft) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder) !important;
}

.primary-button,
.tab.active,
.graph-toolbar button.active {
  color: var(--bg) !important;
  background: var(--accent) !important;
}

.secondary-button,
.card-actions button,
.graph-toolbar button,
.chip-row button,
.evidence-strip button,
.chip-row span,
.chip-row em,
.metric-row span {
  border-color: var(--border) !important;
  color: var(--accent-hover) !important;
  background: var(--accent-soft) !important;
}

.tabbar {
  border-color: var(--border) !important;
  background: var(--surface) !important;
  box-shadow: 0 10px 26px var(--shadow) !important;
}

.tab {
  color: var(--text-secondary) !important;
}

.graph-canvas {
  border-color: var(--border) !important;
  background: var(--surface-input) !important;
}

.graph-core {
  color: var(--text) !important;
  border-color: var(--border) !important;
  background: color-mix(in srgb, var(--accent) 24%, var(--surface)) !important;
  box-shadow: 0 18px 42px var(--shadow), 0 0 0 10px var(--border-soft), 0 0 54px var(--accent-glow) !important;
}

.graph-node {
  color: var(--text) !important;
  border-color: color-mix(in srgb, var(--node) 48%, var(--surface)) !important;
  background: color-mix(in srgb, var(--node) 18%, var(--surface)) !important;
}

.benchmark-grid {
  display: grid;
  gap: 10px;
}

.benchmark-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  background: var(--surface);
  box-shadow: 0 8px 22px var(--shadow);
}

.benchmark-card.paused {
  opacity: 0.55;
}

.bm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.bm-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.bm-nickname {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.bm-intent {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--bg);
  background: var(--pill, var(--accent));
  font-size: 11px;
  font-weight: 700;
}

.bm-new-badge,
.bm-no-new {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.bm-paused-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-style: italic;
}

.bm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.benchmark-card .primary-button,
.benchmark-card .secondary-button {
  min-height: 34px;
  width: auto;
  flex: 0 0 auto;
  padding: 6px 10px;
  font-size: 11px;
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--text-secondary);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.filter-chip.active {
  color: var(--bg);
  border-color: var(--accent);
  background: var(--accent);
}

.add-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.add-panel-card {
  display: grid;
  gap: 11px;
  width: min(100%, 430px);
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 16px;
  background: var(--surface-input);
  box-shadow: 0 -4px 20px var(--shadow);
}

.add-panel-card select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.tabbar {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

@media (max-width: 370px) {
  .tab {
    font-size: 10px;
  }

  .benchmark-card .bm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benchmark-card .primary-button,
  .benchmark-card .secondary-button {
    width: 100%;
  }
}

