/* DeepEvidence Light Theme override — matches dict-web mainstream palette */
:root {
  color-scheme: light;
  --bg: #f7fbff;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-card: #ffffff;
  --line: #e5e7eb;
  --line-strong: #bfdbfe;
  --text: #1f2937;
  --text-secondary: #475569;
  --muted: #64748b;
  --cyan: #2563eb;
  --cyan-dim: #eef6ff;
  --gold: #17664e;
  --gold-dim: #ecfdf5;
  --cinnabar: #dc2626;
}

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

a {
  color: #2563eb;
}

a:hover {
  color: #1d4ed8;
}

/* Embedded mode inside /herbal/acupoints */
body.is-embed header {
  height: 58px;
  padding: 0 16px;
}

body.is-embed .brand,
body.is-embed footer {
  display: none !important;
}

body.is-embed main {
  height: calc(100vh - 58px);
}

/* Header */
header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-bottom: 1px solid #dbeafe;
  backdrop-filter: none;
}

header::after {
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.25), rgba(23, 102, 78, 0.2), transparent);
}

.seal {
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.seal::after {
  border-color: rgba(255, 255, 255, 0.28);
}

.brand strong {
  background: none;
  -webkit-text-fill-color: #1f2937;
  color: #1f2937;
}

/* Primary Nav */
.primary-nav {
  background: #eef6ff;
  border: 1px solid #dbeafe;
  box-shadow: none;
}

.primary-nav .nav-tab {
  color: #475569;
}

.primary-nav .nav-tab:hover {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

.primary-nav .nav-tab.active {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}

.primary-nav .nav-dot {
  background: #94a3b8;
}

.primary-nav .nav-tab.active .nav-dot {
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.primary-nav .nav-count {
  background: #dbeafe;
  color: #1d4ed8;
}

.primary-nav .nav-tab.active .nav-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Shichen pill & Material switcher */
.shichen-pill {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #17664e;
  box-shadow: none;
}

.shichen-pill:hover {
  background: #d1fae5;
  border-color: #17664e;
}

.shichen-dot {
  background: #17664e;
  box-shadow: 0 0 6px rgba(23, 102, 78, 0.45);
}

.mat-switch {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.mat-switch button {
  color: #475569;
}

.mat-switch button:hover {
  color: #1f2937;
  background: #ffffff;
}

.mat-switch button.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.22);
}

.immersive-btn {
  background: #ffffff;
  border: 1px solid #dbeafe;
  color: #2563eb;
}

.immersive-btn:hover {
  background: #eef6ff;
  border-color: #2563eb;
}

/* Left & Right Panels */
.library,
.detail {
  background: #ffffff;
  border-color: #e5e7eb;
}

.library-top,
.library-filters,
.list-head,
.library-foot,
.rx-cat-wrap,
.verse-meridian-bar,
.shichen-clock-wrap {
  border-color: #e5e7eb;
  background: #ffffff;
}

.eyebrow {
  color: #2563eb;
}

.library h1 {
  color: #1f2937;
  background: none;
  -webkit-text-fill-color: #1f2937;
}

.scope {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.scope button {
  color: #475569;
}

.scope button.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.search {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.search:focus-within {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search input {
  color: #1f2937;
}

.search input::placeholder {
  color: #94a3b8;
}

.search-kbd {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
}

.filter-label {
  color: #475569;
}

.filter-mini-tag {
  background: #eef6ff;
  color: #2563eb;
  border-color: #dbeafe;
}

.meridian-pills button,
.chips button,
.verse-meridian-bar button {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.meridian-pills button:hover,
.chips button:hover,
.verse-meridian-bar button:hover {
  background: #eef6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.meridian-pills button.active,
.chips button.active,
.verse-meridian-bar button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.meta-tag {
  background: #eef6ff;
  color: #2563eb;
  border-color: #dbeafe;
}

.meta-tag.gold {
  background: #ecfdf5;
  color: #17664e;
  border-color: #a7f3d0;
}

.point-row,
.vp-row,
.shichen-row {
  background: #ffffff;
  border: 1px solid #f1f5f9;
  color: #1f2937;
}

.point-row:hover,
.vp-row:hover,
.shichen-row:hover {
  background: #f8fbff;
  border-color: #bfdbfe;
}

.point-row.active,
.shichen-row.active {
  background: #eef6ff;
  border-color: #2563eb;
  color: #1e3a8a;
}

.point-row small,
.vp-py {
  color: #64748b;
}

.key-badge {
  background: #ecfdf5;
  color: #17664e;
  border-color: #a7f3d0;
}

.fx-badge {
  background: #eef6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

#clear,
#rxClear {
  color: #2563eb;
  background: #eef6ff;
  border: 1px solid #dbeafe;
}

#clear:hover,
#rxClear:hover {
  background: #dbeafe;
}

/* 3D Stage — Bright Medical Studio Backdrop */
.stage {
  background:
    radial-gradient(circle at 50% 42%, #ffffff 0%, #eef6ff 58%, #e2effc 100%);
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.stage-badge {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbeafe;
  color: #1f2937;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}

.live-dot {
  background: #2563eb;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
}

.filter-pill {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.hint {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e2e8f0;
  color: #475569;
}

.stage-watermark,
.stage-caption {
  color: rgba(37, 99, 235, 0.08);
}

.stage-watermark strong {
  color: rgba(37, 99, 235, 0.07);
}

.view-switch,
.side-choice,
.marker-legend,
.zoom,
.bottom-tools {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbeafe;
  color: #334155;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
}

.view-switch button,
.bottom-tools button {
  color: #334155;
}

.zoom {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.zoom button {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid #dbeafe !important;
  color: #1f2937 !important;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
}

.view-switch button:hover,
.zoom button:hover,
.bottom-tools button:hover {
  background: #eef6ff !important;
  color: #2563eb !important;
}

.view-switch button.active,
.bottom-tools button.active {
  background: #2563eb;
  color: #ffffff;
}

.side-choice select {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1f2937;
}

.stage-title {
  color: #64748b;
}

.stage-title strong {
  color: #475569;
}

.marker-legend .legend-title {
  color: #1f2937;
}

.marker-legend small {
  color: #64748b;
}

/* Floating 3D Labels & Leader Lines */
#labels button,
#effectLabels span {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #cbd5e1;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

#labels button.selected {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
}

.leader-path {
  stroke: rgba(37, 99, 235, 0.42);
}

.leader-path.selected {
  stroke: #2563eb;
}

.hover-tip {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #bfdbfe;
  color: #1f2937;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}

/* Right Detail Dossier */
.detail-header-card,
.info-card,
.effects-card,
.note {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.acu361-card {
  background: linear-gradient(165deg, #f8fbff 0%, #ffffff 100%) !important;
  border-color: #bfdbfe !important;
}

h2 {
  color: #1f2937;
  text-shadow: none;
}

.pinyin {
  color: #2563eb;
}

.code {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.element-badge {
  background: #ecfdf5;
  color: #17664e;
  border-color: #a7f3d0;
}

.special-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.mini-badge {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.model-status {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.model-status.important {
  color: #17664e;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.focus {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.focus:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.section-label {
  color: #1f2937;
}

.section-label span {
  background: #eef6ff;
  color: #2563eb;
  border-color: #dbeafe;
}

.telemetry-item,
.coord-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.t-val {
  color: #1f2937;
}

.t-val.accent {
  color: #2563eb;
}

.coord-unit {
  background: #eef6ff;
  color: #2563eb;
}

.coord-xyz span {
  background: #ffffff;
  border-color: #e2e8f0;
}

.coord-xyz i {
  color: #2563eb;
}

.coord-xyz b {
  color: #1f2937;
}

.bone-box {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.bone-name {
  color: #14532d;
}

.bone-dist {
  background: #dcfce7;
  color: #17664e;
}

.indications-ref {
  background: #eef6ff;
  border-color: #dbeafe;
}

.indications-ref .ref-tag {
  color: #2563eb;
}

.tip-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.shichen-detail {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

.dossier-verse-box,
.verse-card {
  background: #f8fbff;
  border-color: #dbeafe;
}

.dossier-verse-head,
.verse-source {
  color: #17664e;
}

.verse-source {
  background: #ecfdf5;
}

.dossier-verse-text,
.verse-poem {
  color: #1f2937;
}

.verse-hl {
  background: #dbeafe;
  color: #1d4ed8;
}

.verse-pt-link {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.verse-pt-link.is-3d {
  background: #ecfdf5;
  border-color: #86efac;
  color: #17664e;
}

.verse-pt-link:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

/* Related Rx & Prescriptions Cards */
.related-rx-chip,
.rx-card,
.shichen-now-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1f2937;
}

.related-rx-chip:hover,
.rx-card:hover {
  border-color: #93c5fd;
  background: #ffffff;
}

.rx-cat-badge {
  background: #eef6ff;
  color: #2563eb;
}

.rx-cat-badge.gold {
  background: #ecfdf5;
  color: #17664e;
}

.rx-pt-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1f2937;
}

.rx-pt-chip:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.rx-pt-chip em {
  color: #17664e;
}

.rx-pt-chip:hover em {
  color: #dbeafe;
}

.rx-quick-label {
  background: #eef6ff;
  color: #2563eb;
}

.nearby button,
#effectExamples button,
.effect-controls button,
.toggle-pill,
.neighbor-nav button,
.mini-action-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
}

.nearby button.active,
#effectExamples button.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.shichen-card-head strong {
  color: #1f2937;
}

.shichen-card-meta {
  color: #17664e;
}

.shichen-dial text {
  fill: #1f2937;
}

footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  color: #64748b;
}
