:root {
  color-scheme: light;
  --ink: #203036;
  --muted: #64747a;
  --paper: #f7f5ef;
  --surface: rgba(255, 255, 255, .82);
  --line: rgba(36, 112, 122, .72);
  --dim: rgba(39, 55, 61, .18);
  --vitamin: #f2b84b;
  --mineral: #5a9f93;
  --amino: #d86f68;
  --supplement: #6f8fd8;
  --problem: #c95757;
  --depletion: #c58a55;
  --goal: #58a96d;
  --restriction: #6f7f89;
  --organ: #df6f88;
  --system: #7d77d8;
  --active-accent: var(--line);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 20%, rgba(242, 184, 75, .22), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(90, 159, 147, .2), transparent 27%),
    radial-gradient(circle at 15% 82%, rgba(216, 111, 104, .18), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(111, 143, 216, .18), transparent 28%),
    var(--paper);
}

button {
  font: inherit;
}

.map-shell {
  min-height: 100vh;
  padding: clamp(14px, 2.4vw, 32px);
}

.nutrient-map {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(320px, 460px) minmax(230px, 1fr);
  grid-template-rows: auto auto minmax(300px, auto) auto;
  gap: clamp(14px, 2vw, 28px);
  min-height: calc(100vh - clamp(28px, 4.8vw, 64px));
  overflow: visible;
  border: 1px solid rgba(32, 48, 54, .12);
  border-radius: 8px;
  background: rgba(255, 253, 247, .72);
  box-shadow: 0 22px 70px rgba(40, 55, 61, .13);
  padding: clamp(14px, 2vw, 24px);
}

.connection-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.connection-line {
  stroke: var(--active-accent);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity .18s ease, stroke-width .18s ease;
}

.connection-line.is-visible {
  opacity: .78;
}

.connection-line.is-primary {
  stroke-width: 3.5;
  opacity: .95;
}

.group,
.group-stack,
.map-actions,
.detail-panel,
.deficiency-panel {
  position: relative;
  z-index: 4;
}

.map-actions {
  grid-area: 1 / 1 / 2 / 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.clear-button,
.copy-button,
.analysis-link {
  min-height: 34px;
  border: 1px solid rgba(32, 48, 54, .14);
  border-radius: 999px;
  background: #fff;
  color: #24464d;
  padding: 6px 13px;
  cursor: pointer;
  white-space: nowrap;
}

.analysis-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: rgba(36, 112, 122, .28);
  background: #24464d;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.analysis-link:hover,
.analysis-link:focus-visible {
  background: #173a41;
  outline: none;
  box-shadow: 0 8px 20px rgba(36, 112, 122, .18);
}

.group-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.problem-settings-trigger {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(100, 116, 139, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .76);
  color: #52616a;
  font-size: 16px;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.problem-settings-trigger:hover,
.problem-settings-trigger:focus-visible {
  outline: none;
  border-color: var(--active-accent);
  background: #fff;
  color: var(--active-accent);
  transform: rotate(18deg);
}

.problem-visibility-divider {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  margin: 5px 0 1px;
  color: #7f8b90;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.problem-visibility-divider::before,
.problem-visibility-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(100, 116, 139, .38));
}

.problem-visibility-divider::after {
  background: linear-gradient(90deg, rgba(100, 116, 139, .38), transparent);
}

.problem-visibility-divider small {
  color: #a1aaae;
  font-size: 8px;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
}

.group-problems .node.is-problem-inactive,
.group-problems.is-links-disabled .node.is-problem-inactive,
.nutrient-map.has-active .group-problems .node.is-problem-inactive,
.nutrient-map.has-active:has(.node:hover) .group-problems .node.is-problem-inactive:hover {
  opacity: .24;
  filter: grayscale(.72);
  pointer-events: none;
  cursor: default;
  box-shadow: none;
}

.group-problems .node.is-problem-inactive::before {
  opacity: .4;
}

.problem-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 20px;
}

.problem-settings-modal.is-open {
  display: grid;
}

.problem-settings-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(15, 27, 35, .48);
  backdrop-filter: blur(4px);
}

.problem-settings-card {
  position: relative;
  width: min(820px, 96vw);
  max-height: min(760px, 90vh);
  overflow: auto;
  border: 1px solid rgba(32, 48, 54, .12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(16, 35, 43, .28);
}

.problem-settings-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(32, 48, 54, .1);
}

.problem-settings-card header span {
  display: block;
  margin-bottom: 5px;
  color: var(--active-accent);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.problem-settings-card h2 {
  margin: 0;
  font-size: 24px;
}

.problem-settings-card header p {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.problem-settings-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0f3f4;
  color: #4d5d64;
  font-size: 22px;
  cursor: pointer;
}

.problem-settings-search {
  padding: 16px 26px 0;
}

.problem-settings-search label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.problem-settings-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(32, 48, 54, .16);
  border-radius: 9px;
  background: #fff;
  color: #173036;
  padding: 0 13px;
  font: inherit;
  font-size: 13px;
}

.problem-settings-search input:focus {
  outline: 2px solid color-mix(in srgb, var(--problem), transparent 68%);
  border-color: var(--problem);
}

.problem-settings-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px 26px 22px;
}

.problem-settings-zone {
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--problem), transparent 66%);
  border-radius: 13px;
  background: color-mix(in srgb, var(--problem), white 95%);
}

.problem-settings-zone.is-inactive {
  border-color: rgba(100, 116, 139, .2);
  background: #f7f8f8;
}

.problem-settings-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 3px 10px;
}

.problem-settings-zone-head strong {
  font-size: 12px;
}

.problem-settings-zone-head span {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.problem-settings-list {
  min-height: 310px;
  padding: 5px;
  border: 1px dashed rgba(100, 116, 139, .24);
  border-radius: 10px;
  transition: border-color .16s ease, background .16s ease;
}

.problem-settings-list.is-drag-over {
  border-color: var(--active-accent);
  background: color-mix(in srgb, var(--active-accent), white 93%);
}

.problem-settings-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 29px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 4px 0;
  padding: 5px 6px;
  border: 1px solid rgba(32, 48, 54, .1);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(29, 48, 55, .045);
  cursor: grab;
}

.problem-settings-item.is-dragging {
  opacity: .38;
}

.problem-settings-card .problem-settings-item[draggable="false"] {
  grid-template-columns: minmax(0, 1fr) auto;
  cursor: default;
}

.problem-settings-item small {
  color: #64748b;
  font-size: 11px;
}

.problem-subscription-link {
  display: inline-block;
  margin: 8px 0;
  color: #327d75;
  font-size: 12px;
  font-weight: 700;
}

.problem-subscription-link[hidden] {
  display: none;
}

.problem-drag-handle {
  color: #9aa4a8;
  font-size: 15px;
  letter-spacing: -3px;
}

.problem-settings-item strong {
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
}

.problem-settings-item button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(32, 48, 54, .12);
  border-radius: 50%;
  background: #f5f7f7;
  color: #43555d;
  font-weight: 850;
  cursor: pointer;
}

.problem-settings-item button:hover,
.problem-settings-item button:focus-visible {
  outline: none;
  border-color: var(--active-accent);
  color: var(--active-accent);
}

.problem-settings-empty {
  margin: 0;
  padding: 28px 12px;
  color: #98a3a7;
  text-align: center;
  font-size: 10px;
}

.problem-settings-card > footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 26px 20px;
  border-top: 1px solid rgba(32, 48, 54, .1);
}

.problem-settings-reset,
.problem-settings-done {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.problem-settings-reset {
  border: 1px solid rgba(32, 48, 54, .14);
  background: #fff;
  color: #58686f;
}

.problem-settings-done {
  border: 1px solid var(--active-accent);
  background: var(--active-accent);
  color: #fff;
}

body.has-problem-settings {
  overflow: hidden;
}

@media (max-width: 640px) {
  .problem-settings-columns {
    grid-template-columns: 1fr;
  }

  .problem-settings-list {
    min-height: 150px;
  }

  .problem-settings-card > header,
  .problem-settings-search,
  .problem-settings-columns,
  .problem-settings-card > footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .problem-visibility-divider small {
    display: none;
  }
}

.copy-button {
  border-color: rgba(223, 111, 136, .26);
  background: color-mix(in srgb, var(--accent), white 90%);
}

.clear-button:hover,
.clear-button:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  border-color: rgba(36, 112, 122, .48);
  outline: none;
  box-shadow: 0 8px 20px rgba(36, 112, 122, .12);
}

.group {
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  z-index: 3;
}

.group-vitamins {
  grid-area: 2 / 1;
}

.group-minerals {
  grid-area: 2 / 3;
}

.group-amino {
  grid-area: 4 / 1;
}

.group-supplements {
  grid-area: auto;
}

.group-systems {
  grid-area: auto;
  padding: 12px;
  border: 1px solid rgba(125, 119, 216, .36);
  border-left: 4px solid var(--system);
  border-radius: 8px;
  background: rgba(125, 119, 216, .08);
}

.group-data-layers {
  grid-area: auto;
  padding: 12px;
  border: 1px solid rgba(36, 112, 122, .34);
  border-left: 4px solid var(--line);
  border-radius: 8px;
  background: rgba(36, 112, 122, .07);
}

.group-problems {
  grid-area: auto;
}

.group-depletion {
  grid-area: auto;
}

.group-goals {
  grid-area: auto;
  max-height: 260px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(88, 169, 109, .45);
  border-left: 4px solid var(--goal);
  border-radius: 8px;
  background: rgba(88, 169, 109, .08);
}

.group-restrictions {
  grid-area: auto;
  padding: 12px;
  border: 1px solid rgba(111, 127, 137, .42);
  border-left: 4px solid var(--restriction);
  border-radius: 8px;
  background: rgba(111, 127, 137, .08);
}

.group-problems {
  padding: 12px;
  border: 1px solid rgba(216, 111, 104, .46);
  border-left: 4px solid var(--problem);
  border-radius: 8px;
  background: rgba(216, 111, 104, .08);
}

.group-stack-right {
  grid-area: 4 / 3;
}

.group-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.group h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: clamp(15px, 1.4vw, 19px);
  letter-spacing: 0;
}

.group-link-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.group-link-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.group-link-toggle-switch {
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 21px;
  padding: 2px;
  border: 1px solid rgba(100, 116, 139, .22);
  border-radius: 999px;
  background: rgba(100, 116, 139, .28);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.group-link-toggle-switch::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
  transform: translateX(0);
  transition: transform .18s ease;
}

.group-link-toggle input:checked + .group-link-toggle-switch {
  border-color: color-mix(in srgb, var(--active-accent), #ffffff 20%);
  background: var(--active-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-accent), transparent 78%);
}

.group-link-toggle input:checked + .group-link-toggle-switch::before {
  transform: translateX(17px);
}

.group-link-toggle input:focus-visible + .group-link-toggle-switch {
  outline: 2px solid color-mix(in srgb, var(--active-accent), #ffffff 20%);
  outline-offset: 2px;
}

.group-link-toggle-text {
  min-width: 34px;
}

.data-layer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.data-layer-option {
  --node-color: var(--line);
}

.data-layer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nutrient-map.has-active .data-layer-option {
  opacity: 1;
}

.nutrient-role-options {
  flex-direction: column;
}

.nutrient-role-option {
  width: 100%;
  align-items: flex-start;
}

.nutrient-role-option::before {
  margin-top: 3px;
}

.nutrient-role-option small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.nutrient-role-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.nutrient-role-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

#nutrientRoleStatus {
  margin: 10px 0 0;
}

.data-layer-option:focus-within {
  outline: 2px solid var(--line);
  outline-offset: 2px;
}

.nutrient-map.has-nutrient-roles .node.is-role-highlighted {
  opacity: 1;
  outline: 2px solid var(--line);
  outline-offset: 2px;
}

.nutrient-map.has-nutrient-roles .node[data-group-name]:is([data-group-name="vitamins"], [data-group-name="minerals"], [data-group-name="amino"], [data-group-name="supplements"]):not(.is-role-highlighted):not(.is-selected):not(.is-active):not(.is-related) {
  opacity: .42;
}

.priority-score-list {
  display: grid;
  gap: 12px;
}

.priority-score-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.priority-score-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(72px, 1.2fr) 42px;
  align-items: center;
  gap: 8px;
  color: #173036;
  font-size: 12px;
  font-weight: 750;
}

.priority-score-group {
  display: grid;
  gap: 7px;
  padding-bottom: 25px;
}

.priority-score-group h4 {
  margin: 0;
  color: #173036;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.priority-score-label {
  min-width: 0;
}

.priority-score-label small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.priority-score-track {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, .16);
}

.priority-score-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--problem), var(--vitamin));
}

.priority-score-row[data-priority-group="vitamins"] .priority-score-track span {
  background: var(--vitamin);
}

.priority-score-row[data-priority-group="minerals"] .priority-score-track span {
  background: var(--mineral);
}

.priority-score-row[data-priority-group="amino"] .priority-score-track span {
  background: var(--amino);
}

.priority-score-row[data-priority-group="supplements"] .priority-score-track span {
  background: var(--supplement);
}

.priority-score-row[data-priority-group="organs"] .priority-score-track span {
  background: var(--organ);
}

.priority-score-row[data-priority-group="systems"] .priority-score-track span {
  background: var(--system);
}

.priority-score-row[data-priority-group="problems"] .priority-score-track span {
  background: var(--problem);
}

.priority-score-row[data-priority-group="goals"] .priority-score-track span {
  background: var(--goal);
}

.priority-score-row[data-priority-group="depletion"] .priority-score-track span {
  background: var(--depletion);
}

.priority-score-row[data-priority-group="restrictions"] .priority-score-track span {
  background: var(--restriction);
}

.priority-score-row strong {
  text-align: right;
  font-size: 12px;
}

.group.is-links-disabled {
  padding-bottom: 12px;
}

.group.is-links-disabled .node {
  opacity: .74;
}

.node-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.node-row {
  width: 100%;
}

.node-row + .node-row {
  margin-top: 14px;
}

.node-row h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.node {
  --node-color: var(--organ);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-height: 34px;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--node-color), #263238 18%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--node-color), white 78%);
  color: #17252b;
  padding: 7px 12px;
  cursor: pointer;
  line-height: 1.15;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: normal;
}

.node-label {
  min-width: 0;
}

.node-expand {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  color: #173036;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  transition: rotate .18s ease, background .18s ease;
}

.node-expand:hover {
  background: rgba(255, 255, 255, .95);
}

.node.is-expanded .node-expand {
  rotate: 180deg;
}

.node::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 1.5px solid color-mix(in srgb, var(--node-color), #1f3036 28%);
  border-radius: 4px;
  background: rgba(255, 255, 255, .72);
}

.renewal-icon {
  display: none;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: auto;
  border-radius: 50%;
  border: 1px solid rgba(23, 48, 54, .18);
  background: rgba(255, 255, 255, .72);
  color: #173036;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.nutrient-map.show-renewal-icons .renewal-icon {
  display: inline-grid;
}

.renewal-recyclable {
  color: #24707a;
}

.node.is-selected::before {
  background:
    linear-gradient(135deg, transparent 42%, #173036 43% 56%, transparent 57%),
    linear-gradient(45deg, transparent 38%, #173036 39% 52%, transparent 53%),
    color-mix(in srgb, var(--node-color), white 35%);
}

.node.is-indeterminate::before {
  background:
    linear-gradient(transparent 42%, #173036 43% 57%, transparent 58%),
    color-mix(in srgb, var(--node-color), white 42%);
}

.node:hover,
.node:focus-visible,
.node.is-active {
  outline: none;
  background: color-mix(in srgb, var(--node-color), white 58%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--node-color), transparent 68%);
}

.node.is-related {
  box-shadow: 0 8px 20px color-mix(in srgb, var(--node-color), transparent 74%);
}

.node.is-selected {
  background: color-mix(in srgb, var(--node-color), white 48%);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--node-color), transparent 68%);
}

.node.is-hidden {
  display: none;
}

.node.is-restricted {
  filter: grayscale(.75);
  opacity: 1;
  cursor: not-allowed;
  border-color: rgba(201, 87, 87, .72);
  background: color-mix(in srgb, var(--node-color), white 88%);
  box-shadow: inset 0 0 0 1px rgba(201, 87, 87, .18);
}

.node.is-restricted::before {
  border-color: rgba(32, 48, 54, .26);
  background: rgba(32, 48, 54, .12);
}

.node.is-restricted.is-selected::before {
  background: rgba(32, 48, 54, .12);
}

.node.is-restricted::after {
  content: "нельзя";
  position: absolute;
  right: -6px;
  top: -8px;
  margin-left: auto;
  border-radius: 999px;
  background: #c95757;
  color: #fff;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(201, 87, 87, .24);
}

.node.is-restriction-support {
  border-color: rgba(88, 169, 109, .72);
  box-shadow: 0 8px 20px rgba(88, 169, 109, .14);
}

.node.is-restriction-support::after {
  content: "поддержка";
  position: absolute;
  right: -6px;
  top: -8px;
  border-radius: 999px;
  background: #58a96d;
  color: #fff;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(88, 169, 109, .22);
}

.node.is-restriction-form-support {
  border-color: rgba(210, 158, 46, .78);
  background: color-mix(in srgb, var(--node-color), white 72%);
  box-shadow: 0 8px 20px rgba(210, 158, 46, .18);
}

.node.is-restriction-form-support::after {
  content: "форма!";
  position: absolute;
  right: -6px;
  top: -8px;
  border-radius: 999px;
  background: #d29e2e;
  color: #fff;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(210, 158, 46, .24);
}

.nutrient-map.has-active .node:not(.is-active):not(.is-related):not(.is-selected):not(.is-role-highlighted) {
  opacity: .28;
}

.nutrient-map.has-active .node:not(.is-active):not(.is-related):not(.is-selected):not(.is-role-highlighted):hover,
.nutrient-map.has-active .node:not(.is-active):not(.is-related):not(.is-selected):not(.is-role-highlighted):focus-visible {
  opacity: 1;
}

.nutrient-map.has-active:has(.node:hover) .node:hover {
  opacity: 1;
}

.node.is-restricted,
.nutrient-map.has-active .node.is-restricted,
.nutrient-map.has-active:has(.node:hover) .node.is-restricted:hover {
  opacity: 1;
}

.human-panel {
  position: relative;
  z-index: auto;
  grid-area: 2 / 2 / 5 / 3;
  display: grid;
  place-items: center;
  min-height: 0;
  align-self: start;
  padding-top: 76px;
}

.human-card {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1 / 1.38;
  border-radius: 8px;
  background: rgba(255, 255, 255, .24);
  overflow: visible;
}

.selected-organ-panel {
  position: absolute;
  right: calc(100% + 14px);
  top: 17%;
  z-index: 10;
  display: none;
  width: 172px;
  padding: 10px;
  border: 1px solid rgba(223, 111, 136, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 38px rgba(44, 62, 80, .14);
  backdrop-filter: blur(10px);
}

.selected-organ-panel.is-visible {
  display: grid;
  gap: 8px;
}

.selected-organ-panel-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.selected-organ-list {
  display: grid;
  gap: 8px;
}

.selected-organ-group {
  display: grid;
  gap: 5px;
}

.selected-organ-group.has-children {
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(100, 116, 139, .1);
}

.selected-organ-group.has-children:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.selected-organ-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--organ), transparent 68%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--organ), white 82%);
  color: #173036;
  padding: 4px 4px 4px 10px;
  font-size: 12px;
  font-weight: 850;
}

.selected-organ-collapse,
.selected-organ-collapse-spacer {
  width: 6px;
  height: 6px;
}

.selected-organ-collapse {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.selected-organ-collapse::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-right: 2px solid rgba(32, 48, 54, .48);
  border-bottom: 2px solid rgba(32, 48, 54, .48);
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.selected-organ-group.is-collapsed .selected-organ-collapse::before {
  transform: rotate(-45deg);
}

.selected-organ-parent {
  grid-template-columns: 10px minmax(0, 1fr) 24px;
}

.selected-organ-children {
  display: grid;
  gap: 4px;
  padding-left: 14px;
}

.selected-organ-group.is-collapsed .selected-organ-children {
  display: none;
}

.selected-organ-child {
  grid-template-columns: 16px minmax(0, 1fr);
  min-height: 26px;
  border-color: rgba(223, 111, 136, .16);
  background: rgba(255, 255, 255, .72);
  color: #34464d;
  font-size: 11px;
}

.selected-organ-child input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--organ);
}

.selected-organ-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-organ-item button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  color: #8f3448;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.selected-organ-item button:hover,
.selected-organ-item button:focus-visible {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(223, 111, 136, .24);
}

.system-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
}

.system-tab {
  --node-color: var(--system);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-height: 34px;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--node-color), #263238 18%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--node-color), white 78%);
  color: #17252b;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  white-space: normal;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease, background .18s ease;
}

.system-tab::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 1.5px solid color-mix(in srgb, var(--node-color), #1f3036 28%);
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
}

.system-tab:hover,
.system-tab:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--node-color), white 58%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--node-color), transparent 68%);
}

.system-tab.is-active {
  border-color: color-mix(in srgb, var(--node-color), #263238 5%);
  background: color-mix(in srgb, var(--node-color), white 48%);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--node-color), transparent 68%);
}

.system-tab.is-active::before {
  background:
    radial-gradient(circle at 50% 50%, #173036 0 34%, transparent 36%),
    color-mix(in srgb, var(--node-color), white 35%);
}

.system-tab.is-selected {
  border-color: color-mix(in srgb, var(--node-color), #263238 5%);
  background: color-mix(in srgb, var(--node-color), white 48%);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--node-color), transparent 68%);
}

.metabolism-orbit {
  position: absolute;
  inset: 7% -10%;
  z-index: 0;
  pointer-events: none;
  opacity: .72;
}

.orbit-ring {
  position: absolute;
  inset: 50%;
  width: var(--ring-size);
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  animation: orbit-spin var(--ring-speed) linear infinite;
}

.orbit-ring::before,
.orbit-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.orbit-ring::before {
  border: 2px solid rgba(36, 112, 122, .15);
}

.orbit-ring::after {
  background:
    conic-gradient(from 0deg,
      transparent 0 18deg,
      rgba(242, 184, 75, .82) 18deg 32deg,
      transparent 32deg 118deg,
      rgba(90, 159, 147, .72) 118deg 134deg,
      transparent 134deg 224deg,
      rgba(216, 111, 104, .68) 224deg 238deg,
      transparent 238deg 330deg,
      rgba(111, 143, 216, .7) 330deg 344deg,
      transparent 344deg 360deg);
  mask: radial-gradient(circle, transparent 62%, #000 63% 66%, transparent 67%);
}

.orbit-ring-one {
  --ring-size: 92%;
  --ring-speed: 26s;
}

.orbit-ring-two {
  --ring-size: 76%;
  --ring-speed: 19s;
}

.orbit-ring-three {
  --ring-size: 60%;
  --ring-speed: 14s;
}

@keyframes orbit-spin {
  to {
    rotate: 360deg;
  }
}

.human-figure {
  position: absolute;
  inset: 0 15%;
  width: 70%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: opacity .18s ease, filter .18s ease;
}

.nutrient-map.has-organ-layer .human-figure {
  opacity: .12;
  filter: saturate(.62) contrast(.92);
}

.organ-image-layers {
  position: absolute;
  inset: 0 15%;
  z-index: 2;
  pointer-events: none;
}

.organ-image-layer {
  position: absolute;
  inset: 0;
  display: block;
  background-image: var(--human-layer-src);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  filter: saturate(1.2) contrast(1.04);
  mix-blend-mode: normal;
  mask-image: radial-gradient(
    ellipse var(--layer-w) var(--layer-h) at var(--layer-x) var(--layer-y),
    #000 0 var(--layer-core, 54%),
    rgba(0, 0, 0, .88) calc(var(--layer-core, 54%) + 10%),
    transparent var(--layer-fade, 76%)
  );
  -webkit-mask-image: radial-gradient(
    ellipse var(--layer-w) var(--layer-h) at var(--layer-x) var(--layer-y),
    #000 0 var(--layer-core, 54%),
    rgba(0, 0, 0, .88) calc(var(--layer-core, 54%) + 10%),
    transparent var(--layer-fade, 76%)
  );
  transition: opacity .18s ease, filter .18s ease;
}

.organ-image-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.nutrient-map.has-organ-layer .organ-image-layer {
  opacity: .04;
  filter: saturate(.58) contrast(.88);
}

.nutrient-map.has-organ-layer .organ-image-layer.is-active,
.nutrient-map.has-organ-layer .organ-image-layer.is-related,
.nutrient-map.has-organ-layer .organ-image-layer.is-selected {
  opacity: 1;
  filter: saturate(1.62) contrast(1.18) brightness(1.18) drop-shadow(0 0 14px color-mix(in srgb, var(--organ), transparent 42%));
}

.system-anchor {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 5;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.organ-nodes {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.organ-nodes > .node {
  position: absolute;
  left: var(--hotspot-x);
  top: var(--hotspot-y);
  width: var(--hotspot-w, 10%);
  height: var(--hotspot-h, 7%);
  min-height: 0;
  padding: 0;
  justify-content: center;
  pointer-events: auto;
  --node-color: var(--organ);
  border-color: transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  box-shadow: none;
  transform: translate(-50%, -50%);
}

.organ-nodes > .node::before {
  display: none;
}

.organ-nodes > .node:hover,
.organ-nodes > .node:focus-visible,
.organ-nodes > .node.is-active,
.organ-nodes > .node.is-selected,
.organ-nodes > .node.is-expanded {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.organ-nodes > .node::after {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 1;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 50% 50%,
      color-mix(in srgb, var(--node-color), white 28%) 0 28%,
      color-mix(in srgb, var(--node-color), transparent 34%) 54%,
      transparent 74%);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--node-color), transparent 42%),
    0 0 32px color-mix(in srgb, var(--node-color), transparent 34%);
  opacity: 0;
  pointer-events: none;
  transform: scale(.92);
  transition: opacity .18s ease, transform .18s ease;
  display: none;
}

.organ-nodes > .node.is-active::after,
.organ-nodes > .node.is-related::after,
.organ-nodes > .node.is-selected::after,
.organ-nodes > .node.is-hovered-organ::after {
  opacity: .34;
  transform: scale(1);
}

.organ-nodes > .node.is-hovered-organ::after {
  opacity: .72;
}

.nutrient-map.has-organ-layer .organ-nodes > .node:not(.is-active):not(.is-related):not(.is-selected):not(.is-role-highlighted)::after {
  opacity: .08;
}

.organ-nodes > .node .node-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  min-width: max-content;
  max-width: 150px;
  padding: 5px 8px;
  border: 1px solid rgba(100, 116, 139, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 22px rgba(44, 62, 80, .14);
  color: #17252b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 7;
}

.organ-nodes > .node:hover .node-label,
.organ-nodes > .node:focus-visible .node-label,
.organ-nodes > .node.is-active .node-label,
.organ-nodes > .node.is-related .node-label,
.organ-nodes > .node.is-selected .node-label,
.organ-nodes > .node.is-hovered-organ .node-label,
.organ-nodes > .node.is-expanded .node-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nutrient-map.has-direct-organ-focus .organ-nodes > .node.is-related:not(.is-direct-organ-focus) .node-label {
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
}

.nutrient-map.has-selected-organs .organ-nodes > .node.is-selected .node-label {
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
}

.nutrient-map.has-selected-organs .organ-nodes > .node.is-selected.is-hovered-organ .node-label,
.nutrient-map.has-selected-organs .organ-nodes > .node.is-hovered-organ:not(.is-selected) .node-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.organ-children {
  position: absolute;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  z-index: 4;
  pointer-events: none;
}

.organ-children.is-open {
  display: flex;
  padding: 8px;
  border: 1px solid rgba(100, 116, 139, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 32px rgba(44, 62, 80, .14);
  backdrop-filter: blur(8px);
}

.organ-children-close {
  display: inline-grid;
  place-items: center;
  align-self: flex-end;
  width: 22px;
  height: 22px;
  margin: -2px -2px 0 0;
  border: 1px solid rgba(100, 116, 139, .24);
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #173036;
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  pointer-events: auto;
}

.organ-children-close:hover,
.organ-children-close:focus-visible {
  outline: none;
  background: #fff;
  box-shadow: 0 8px 16px rgba(44, 62, 80, .14);
}

.organ-children .node {
  position: relative;
  left: auto;
  top: auto;
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
  background: rgba(255, 255, 255, .9);
  pointer-events: auto;
}

.organ-picker {
  position: absolute;
  left: 50%;
  bottom: -44px;
  z-index: 8;
  transform: translateX(-50%);
}

.organ-picker-toggle {
  border: 1px solid rgba(90, 159, 147, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #173036;
  padding: 9px 16px;
  box-shadow: 0 12px 28px rgba(44, 62, 80, .14);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.organ-picker-toggle:hover,
.organ-picker-toggle:focus-visible {
  outline: none;
  background: #fff;
  box-shadow: 0 14px 30px rgba(90, 159, 147, .2);
}

.organ-picker-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  display: none;
  width: min(280px, 82vw);
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(100, 116, 139, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 40px rgba(44, 62, 80, .18);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.organ-picker.is-open .organ-picker-menu {
  display: grid;
  gap: 6px;
}

.organ-picker-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-radius: 8px;
  padding: 6px 8px;
  color: #173036;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.organ-picker-option:hover {
  background: rgba(90, 159, 147, .1);
}

.organ-picker-option input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  accent-color: #5a9f93;
}

.organ-nodes > .node[data-id="vision"] {
  --hotspot-x: 50%;
  --hotspot-y: 8.4%;
  --hotspot-w: 15%;
  --hotspot-h: 4%;
  z-index: 4;
}

.organ-nodes > .node[data-id="vision"] .node-label {
  top: calc(100% - 3px);
}

.organ-nodes > .node[data-id="hearing"] {
  --hotspot-x: 50%;
  --hotspot-y: 12.1%;
  --hotspot-w: 32%;
  --hotspot-h: 4%;
  z-index: 1;
}

.organ-nodes > .node[data-id="brain"] {
  --hotspot-x: 50%;
  --hotspot-y: 4.7%;
  --hotspot-w: 12%;
  --hotspot-h: 5.2%;
  z-index: 2;
}

.organ-nodes > .node[data-id="thyroid"] {
  --hotspot-x: 50%;
  --hotspot-y: 17%;
  --hotspot-w: 8%;
  --hotspot-h: 5%;
}

.organ-nodes > .node[data-id="lungs"] {
  --hotspot-x: 50%;
  --hotspot-y: 28%;
  --hotspot-w: 24%;
  --hotspot-h: 14%;
}

.organ-nodes > .node[data-id="heart"] {
  --hotspot-x: 53%;
  --hotspot-y: 30%;
  --hotspot-w: 10%;
  --hotspot-h: 9%;
}

.organ-nodes > .node[data-id="blood"] {
  --hotspot-x: 51%;
  --hotspot-y: 23%;
  --hotspot-w: 15%;
  --hotspot-h: 17%;
}

.organ-nodes > .node[data-id="liver"] {
  --hotspot-x: 45%;
  --hotspot-y: 39%;
  --hotspot-w: 20%;
  --hotspot-h: 10%;
}

.organ-nodes > .node[data-id="adrenals"] {
  --hotspot-x: 50%;
  --hotspot-y: 43%;
  --hotspot-w: 20%;
  --hotspot-h: 5%;
}

.organ-nodes > .node[data-id="pancreas"] {
  --hotspot-x: 53%;
  --hotspot-y: 43%;
  --hotspot-w: 14%;
  --hotspot-h: 6%;
}

.organ-nodes > .node[data-id="gallbladder"] {
  --hotspot-x: 43%;
  --hotspot-y: 44%;
  --hotspot-w: 8%;
  --hotspot-h: 5%;
}

.organ-nodes > .node[data-id="kidneys"] {
  --hotspot-x: 50%;
  --hotspot-y: 47%;
  --hotspot-w: 22%;
  --hotspot-h: 9%;
}

.organ-nodes > .node[data-id="gut"] {
  --hotspot-x: 50%;
  --hotspot-y: 53%;
  --hotspot-w: 22%;
  --hotspot-h: 16%;
}

.organ-nodes > .node[data-id="immune"] {
  --hotspot-x: 58%;
  --hotspot-y: 42%;
  --hotspot-w: 10%;
  --hotspot-h: 8%;
}

.organ-nodes > .node[data-id="skin"] {
  --hotspot-x: 31%;
  --hotspot-y: 38%;
  --hotspot-w: 8%;
  --hotspot-h: 34%;
}

.organ-nodes > .node[data-id="muscles"] {
  --hotspot-x: 61%;
  --hotspot-y: 72%;
  --hotspot-w: 13%;
  --hotspot-h: 28%;
}

.organ-nodes > .node[data-id="bones"] {
  --hotspot-x: 42%;
  --hotspot-y: 73%;
  --hotspot-w: 13%;
  --hotspot-h: 34%;
}

.organ-nodes > .node[data-id="reproductive"] {
  --hotspot-x: 50%;
  --hotspot-y: 60%;
  --hotspot-w: 12%;
  --hotspot-h: 7%;
}

.organ-children[data-parent="brain"] {
  left: 50%;
  top: 10%;
}

.organ-children[data-parent="thyroid"],
.organ-children[data-parent="heart"],
.organ-children[data-parent="liver"],
.organ-children[data-parent="gallbladder"],
.organ-children[data-parent="pancreas"],
.organ-children[data-parent="immune"],
.organ-children[data-parent="muscles"],
.organ-children[data-parent="reproductive"] {
  align-items: flex-end;
  transform: translateX(calc(-100% - 10px));
}

.organ-children[data-parent="heart"] {
  left: 59%;
  top: 34%;
}

.organ-children[data-parent="lungs"] {
  left: 38%;
  top: 34%;
}

.organ-children[data-parent="liver"] {
  left: 56%;
  top: 44%;
}

.organ-children[data-parent="gallbladder"] {
  left: 51%;
  top: 48%;
}

.organ-children[data-parent="gut"] {
  left: 38%;
  top: 60%;
}

.organ-children[data-parent="bones"] {
  left: 33%;
  top: 78%;
}

.organ-children[data-parent="thyroid"] {
  left: 56%;
  top: 21%;
}

.organ-children[data-parent="kidneys"] {
  left: 38%;
  top: 52%;
}

.organ-children[data-parent="adrenals"] {
  left: 38%;
  top: 47%;
}

.organ-children[data-parent="pancreas"] {
  left: 61%;
  top: 47%;
}

.organ-children[data-parent="skin"] {
  left: 25%;
  top: 45%;
}

.organ-children[data-parent="muscles"] {
  left: 68%;
  top: 78%;
}

.organ-children[data-parent="immune"] {
  left: 65%;
  top: 47%;
}

.organ-children[data-parent="blood"] {
  left: 58%;
  top: 28%;
}

.organ-children[data-parent="reproductive"] {
  left: 58%;
  top: 64%;
}

.detail-panel,
.deficiency-panel {
  grid-area: 3 / 1 / 4 / 2;
  align-self: stretch;
  max-width: 340px;
  height: min(430px, 58vh);
  max-height: 260px;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  border-left: 3px solid var(--active-accent);
  background: rgba(255, 255, 255, .48);
  backdrop-filter: blur(10px);
  scrollbar-width: thin;
}

.deficiency-panel {
  grid-area: 3 / 3 / 4 / 4;
  justify-self: end;
}

.detail-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.detail-panel h1,
.deficiency-panel h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 2.5vw, 36px);
  letter-spacing: 0;
}

.detail-panel p,
.deficiency-panel p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.detail-panel h2,
.deficiency-panel h2 {
  margin: 16px 0 8px;
  font-size: 15px;
}

.detail-panel h3,
.deficiency-panel h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.detail-panel ul,
.deficiency-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.selected-info {
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(32, 48, 54, .12);
  margin-bottom: 16px;
}

.selected-info:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.detail-list-compact {
  margin-top: 0;
}

.detail-list-grouped,
.substance-meta {
  margin-top: 14px;
}

.detail-list-row + .detail-list-row {
  margin-top: 12px;
}

.detail-list-row .detail-list {
  margin-top: 0;
}

.detail-chip {
  border-radius: 999px;
  background: rgba(36, 112, 122, .1);
  padding: 5px 9px;
  color: #234b52;
  font-size: 12px;
}

.detail-chip-warning {
  background: rgba(210, 158, 46, .14);
  color: #6b4a0d;
}

.conditional-support-card {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border-left: 3px solid #d29e2e;
  border-radius: 8px;
  background: rgba(210, 158, 46, .08);
  padding: 10px;
}

.conditional-support-card p {
  margin: 0;
}

[data-group="vitamins"] .node {
  --node-color: var(--vitamin);
}

[data-group="minerals"] .node {
  --node-color: var(--mineral);
}

[data-group="amino"] .node {
  --node-color: var(--amino);
}

[data-group="supplements"] .node {
  --node-color: var(--supplement);
}

[data-group="problems"] .node {
  --node-color: var(--problem);
}

[data-group="depletion"] .node {
  --node-color: var(--depletion);
}

[data-group="goals"] .node {
  --node-color: var(--goal);
}

[data-group="restrictions"] .node {
  --node-color: var(--restriction);
}

@media (max-width: 980px) {
  .nutrient-map {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto auto;
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .map-actions {
    grid-area: 1 / 1 / 2 / 3;
  }

  .human-panel {
    grid-area: 2 / 1 / 3 / 3;
    min-height: 520px;
  }

  .group-vitamins {
    grid-area: 3 / 1;
  }

  .group-minerals {
    grid-area: 3 / 2;
  }

  .group-amino {
    grid-area: 4 / 1;
  }

  .group-stack-right {
    grid-area: 4 / 2;
  }

  .detail-panel {
    grid-area: 5 / 1 / 6 / 3;
    max-width: none;
    height: auto;
    max-height: none;
    overflow: visible;
    justify-self: stretch;
  }

  .deficiency-panel {
    grid-area: 6 / 1 / 7 / 3;
    max-width: none;
    height: auto;
    max-height: none;
    overflow: visible;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .map-shell {
    padding: 0;
  }

  .nutrient-map {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    border: 0;
    border-radius: 0;
    gap: 18px;
  }

  .detail-panel,
  .deficiency-panel,
  .human-panel,
  .map-actions,
  .group-vitamins,
  .group-minerals,
  .group-amino,
  .group-stack-right {
    grid-area: auto;
  }

  .map-actions {
    order: 0;
  }

  .human-panel {
    order: 1;
  }

  .detail-panel {
    order: 8;
  }

  .deficiency-panel {
    order: 9;
  }

  .selected-organ-panel {
    order: 10;
  }

  .group-vitamins {
    order: 2;
  }

  .group-minerals {
    order: 3;
  }

  .group-amino {
    order: 4;
  }

  .group-stack-right {
    order: 5;
  }

  .detail-panel,
  .deficiency-panel {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    align-self: stretch;
    justify-self: stretch;
  }

  .clear-button,
  .copy-button {
    width: 100%;
  }

  .human-panel {
    min-height: 0;
    padding-bottom: 64px;
    z-index: auto;
  }

  .human-card {
    width: min(100%, 360px);
  }

  .organ-picker {
    z-index: 20;
  }

  .selected-organ-panel {
    position: static;
    width: 100%;
    margin-top: 0;
    transform: none;
    justify-self: stretch;
  }

  .connection-layer {
    display: block;
    z-index: 3;
  }

  .connection-line.is-visible {
    opacity: .64;
  }

  .connection-line.is-primary {
    stroke-width: 3;
    opacity: .82;
  }

}
