@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin-ext.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin-ext-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #07100c;
  --bg-deep: #050c08;
  --panel: rgba(14, 24, 18, 0.9);
  --panel-soft: rgba(20, 33, 25, 0.7);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.065);
  --line: rgba(200, 226, 203, 0.095);
  --line-strong: rgba(200, 226, 203, 0.17);
  --ink: #f0f4ea;
  --muted: #9caf9f;
  --dim: #748578;
  --accent: #b9e67d;
  --accent-strong: #d7fba4;
  --accent-soft: rgba(185, 230, 125, 0.12);
  --positive: #4bd586;
  --positive-soft: rgba(75, 213, 134, 0.13);
  --negative: #f45d64;
  --negative-soft: rgba(244, 93, 100, 0.12);
  --amber: #e9c56b;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --font-sans: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --shadow-panel: 0 26px 80px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1100px 760px at 82% -12%, rgba(88, 135, 83, 0.17), transparent 62%),
    radial-gradient(900px 700px at 5% 16%, rgba(36, 84, 57, 0.16), transparent 64%),
    radial-gradient(1000px 800px at 50% 105%, rgba(45, 92, 61, 0.11), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 20%, transparent 45%, rgba(0, 0, 0, 0.36) 100%);
}

::selection {
  background: rgba(185, 230, 125, 0.3);
  color: var(--ink);
}

img,
svg {
  display: block;
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 24px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #0a140d;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(187, 215, 188, 0.18);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(187, 215, 188, 0.3);
  background-clip: content-box;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 34px;
  min-height: 76px;
  padding: 10px clamp(18px, 3.4vw, 52px);
  border-bottom: 1px solid rgba(200, 226, 203, 0.08);
  background: rgba(7, 16, 12, 0.72);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--accent);
  border: 1px solid rgba(185, 230, 125, 0.24);
  background: radial-gradient(circle at 35% 25%, rgba(185, 230, 125, 0.16), rgba(185, 230, 125, 0.02) 70%);
  box-shadow: 0 0 28px rgba(185, 230, 125, 0.08);
}

.brand-mark svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark svg path:first-of-type {
  fill: rgba(185, 230, 125, 0.14);
}

.brand-mark.small {
  width: 34px;
  height: 34px;
}

.brand-mark.small svg {
  width: 26px;
  height: 26px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-word {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 430;
  letter-spacing: -0.02em;
}

.brand-word em {
  color: var(--accent);
  font-style: italic;
  font-weight: 380;
}

.brand-sub {
  margin-top: 4px;
  color: var(--dim);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav-button {
  padding-right: 8px;
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(185, 230, 125, 0.1);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.header-note {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
  color: var(--dim);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(185, 230, 125, 0.09);
}

/* Page intro */
main {
  width: min(1760px, 100%);
  margin: 0 auto;
  padding: 0 clamp(18px, 3.4vw, 52px);
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding: 36px 0 30px;
}

.intro-copy {
  max-width: 790px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow-line {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.intro h1 {
  max-width: 760px;
  margin-top: 15px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.2vw, 64px);
  font-weight: 340;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.intro h1 em {
  color: var(--accent);
  font-style: italic;
  font-weight: 320;
}

.intro-lead {
  max-width: 620px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.intro-stats {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(23, 36, 28, 0.72), rgba(10, 19, 14, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.stat-block {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 104px;
  padding: 13px 18px 12px;
  border-right: 1px solid var(--line);
}

.stat-block:last-child {
  border-right: 0;
}

.stat-block strong {
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 420;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-block span {
  margin-top: 7px;
  color: var(--dim);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-block-update {
  min-width: 121px;
}

.stat-block-update .stat-label {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 7.5px;
}

.stat-block-update strong {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

/* Atlas layout */
.atlas {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr) 408px;
  gap: 14px;
  height: clamp(640px, calc(100svh - 310px), 860px);
  min-height: 0;
}

.panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(22, 35, 27, 0.86), rgba(10, 19, 14, 0.94)),
    var(--panel);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 28%, transparent 70%, rgba(185, 230, 125, 0.015));
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
}

.panel-kicker {
  color: var(--dim);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel h2 {
  margin-top: 5px;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 420;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 37px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

/* Library */
.library-panel {
  display: flex;
  flex-direction: column;
}

.library-controls {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 0 14px 11px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 41px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--dim);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-field:focus-within {
  border-color: rgba(185, 230, 125, 0.38);
  background: rgba(0, 0, 0, 0.24);
}

.search-field .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11.5px;
}

.search-field input::placeholder {
  color: #66786b;
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--muted);
  cursor: pointer;
}

.search-clear .icon {
  width: 11px;
  height: 11px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
}

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

.segmented-kinds .segment {
  padding: 0 2px;
  font-size: 7.6px;
  letter-spacing: -0.015em;
}

.segment {
  height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: 9.5px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.segment:hover {
  color: var(--ink);
}

.segment.is-active {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.select-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.13);
}

.select-label {
  flex-shrink: 0;
  color: var(--dim);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.select-control {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--muted);
}

.select-control select {
  width: 100%;
  max-width: 172px;
  padding: 0 19px 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 550;
  text-align: right;
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
}

.select-control select option {
  background: #101c15;
  color: var(--ink);
}

.select-control .icon {
  position: absolute;
  right: 0;
  width: 13px;
  height: 13px;
  pointer-events: none;
}

.active-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 6px 9px 6px 11px;
  border: 1px solid rgba(185, 230, 125, 0.16);
  border-radius: 9px;
  background: rgba(185, 230, 125, 0.055);
  color: var(--muted);
  font-size: 10px;
  animation: filter-in 0.24s ease both;
}

@keyframes filter-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.active-filter-label {
  color: var(--dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.active-filter #activeFilterName {
  flex: 1;
  color: var(--accent);
  font-weight: 650;
}

.active-filter button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}

.active-filter button:hover {
  color: var(--ink);
  background: var(--surface);
}

.active-filter .icon {
  width: 11px;
  height: 11px;
}

.herb-list {
  flex: 1;
  min-height: 0;
  padding: 2px 8px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.herb-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 2px;
  padding: 10px 10px 10px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.herb-card::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.18s ease;
}

.herb-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(200, 226, 203, 0.06);
}

.herb-card.is-active {
  border-color: rgba(185, 230, 125, 0.16);
  background: linear-gradient(90deg, rgba(185, 230, 125, 0.075), rgba(185, 230, 125, 0.02));
}

.herb-card.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(185, 230, 125, 0.4);
}

.herb-glyph {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(185, 230, 125, 0.14);
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 20%, rgba(185, 230, 125, 0.15), transparent 70%),
    rgba(185, 230, 125, 0.03);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 450;
}

.herb-glyph[data-kind='suplement'] {
  border-color: rgba(233, 197, 107, 0.17);
  background:
    radial-gradient(circle at 30% 20%, rgba(233, 197, 107, 0.16), transparent 70%),
    rgba(233, 197, 107, 0.03);
  color: var(--amber);
}

.herb-glyph[data-kind='owoc'] {
  border-color: rgba(240, 153, 127, 0.2);
  background:
    radial-gradient(circle at 30% 20%, rgba(240, 153, 127, 0.18), transparent 70%),
    rgba(240, 153, 127, 0.035);
  color: #f0a184;
}

.herb-glyph[data-kind='warzywo'] {
  border-color: rgba(198, 215, 110, 0.2);
  background:
    radial-gradient(circle at 30% 20%, rgba(198, 215, 110, 0.18), transparent 70%),
    rgba(198, 215, 110, 0.035);
  color: #cadb76;
}

.herb-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.herb-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.herb-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.herb-latin {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: #6f8174;
  font-family: var(--font-serif);
  font-size: 9px;
  font-style: italic;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.herb-summary {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.herb-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 6px;
  margin-top: 6px;
}

.serving-chip {
  max-width: 104px;
  overflow: hidden;
  padding: 2px 5px;
  border: 1px solid rgba(240, 153, 127, 0.15);
  border-radius: 4px;
  color: #bfa99c;
  font-size: 7px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.effect-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.effect-chip::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.effect-chip.positive {
  color: #69c892;
}

.effect-chip.negative {
  color: #d8797d;
}

.regions-chip {
  margin-left: auto;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.herb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  text-align: center;
}

.herb-empty .icon {
  width: 27px;
  height: 27px;
  color: var(--dim);
}

.herb-empty h3 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 430;
}

.herb-empty p {
  max-width: 220px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.herb-empty button {
  margin-top: 15px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 9.5px;
  cursor: pointer;
}

.library-footnote {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 7px 15px 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #66786b;
  font-size: 8.5px;
  line-height: 1.5;
}

.library-footnote .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

/* Stage */
.stage-panel {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(80% 62% at 50% 44%, rgba(71, 113, 75, 0.1), transparent 70%),
    linear-gradient(180deg, rgba(14, 24, 18, 0.78), rgba(7, 14, 10, 0.95));
}

.stage-head {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 17px 13px;
  border-bottom: 1px solid rgba(200, 226, 203, 0.07);
}

.stage-heading h2 {
  font-size: 23px;
}

.stage-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.sex-switch {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.2);
}

.sex-button,
.tool-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.sex-button .icon,
.tool-button .icon {
  width: 13px;
  height: 13px;
}

.sex-button:hover,
.tool-button:hover,
.icon-button:hover {
  color: var(--ink);
  background: var(--surface);
}

.sex-button.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tool-button {
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.tool-button.is-on {
  border-color: rgba(185, 230, 125, 0.26);
  background: rgba(185, 230, 125, 0.09);
  color: var(--accent);
}

.icon-button {
  width: 30px;
  padding: 0;
  border-color: var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.icon-button .icon {
  width: 14px;
  height: 14px;
}

.stage-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(56% 52% at 50% 40%, rgba(125, 181, 105, 0.13), transparent 72%),
    radial-gradient(70% 60% at 50% 104%, rgba(9, 22, 14, 0.6), transparent 62%),
    linear-gradient(180deg, rgba(9, 18, 12, 0.1), rgba(4, 11, 7, 0.42));
}

.stage-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(195, 226, 190, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(195, 226, 190, 0.032) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, black 5%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, black 5%, transparent 76%);
  pointer-events: none;
}

.stage-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  box-shadow: inset 0 -90px 100px -80px rgba(0, 0, 0, 0.8), inset 0 40px 80px -80px rgba(0, 0, 0, 0.7);
}

#bodyCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  opacity: 0;
  animation: canvas-in 1.2s ease 0.2s forwards;
  outline: none;
}

@keyframes canvas-in {
  to { opacity: 1; }
}

.stage-caption {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(280px, calc(100% - 120px));
  padding: 9px 8px 9px 11px;
  border: 1px solid rgba(185, 230, 125, 0.16);
  border-radius: 12px;
  background: rgba(9, 19, 13, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  animation: caption-in 0.32s ease both;
}

@keyframes caption-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.caption-mark {
  width: 3px;
  height: 31px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), rgba(185, 230, 125, 0.1));
  box-shadow: 0 0 13px rgba(185, 230, 125, 0.3);
}

.caption-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.caption-kicker {
  color: var(--dim);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.caption-copy strong {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 430;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caption-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
  color: var(--dim);
  font-size: 7.5px;
  font-weight: 550;
  line-height: 1.3;
}

.caption-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.caption-meta span::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
}

.caption-meta .is-positive {
  color: #74d399;
}

.caption-meta .is-positive::before {
  background: var(--positive);
}

.caption-meta .is-negative {
  color: #dc8a8e;
}

.caption-meta .is-negative::before {
  background: var(--negative);
}

.caption-meta .is-empty {
  color: var(--dim);
}

.caption-meta .is-empty::before {
  background: var(--dim);
}

.caption-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}

.caption-close:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.caption-close .icon {
  width: 11px;
  height: 11px;
}

.stage-region {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 230px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 19, 13, 0.68);
  color: var(--muted);
  font-size: 9px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stage-region .icon {
  width: 11px;
  height: 11px;
  color: var(--accent);
}

.stage-region strong {
  color: var(--ink);
  font-weight: 650;
}

.stage-region button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--dim);
  cursor: pointer;
}

.stage-region button .icon {
  width: 9px;
  height: 9px;
  color: currentColor;
}

.stage-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  pointer-events: none;
  color: var(--dim);
  font-size: 8.5px;
  font-weight: 550;
}

.stage-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.legend-positive {
  background: var(--positive);
  box-shadow: 0 0 10px rgba(75, 213, 134, 0.6);
}

.legend-negative {
  background: var(--negative);
  box-shadow: 0 0 10px rgba(244, 93, 100, 0.55);
}

.stage-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  color: #607265;
  font-size: 8px;
  letter-spacing: 0.015em;
  pointer-events: none;
}

.stage-hint span {
  padding: 0 3px;
  color: #435347;
}

.body-tooltip {
  position: absolute;
  z-index: 9;
  width: max-content;
  max-width: 268px;
  padding: 10px 12px;
  border: 1px solid rgba(198, 226, 201, 0.15);
  border-radius: 11px;
  background: rgba(8, 17, 11, 0.91);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
  animation: tooltip-in 0.14s ease both;
}

@keyframes tooltip-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.tooltip-region {
  display: block;
  color: var(--accent);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.body-tooltip p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.tooltip-effect {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  color: var(--ink);
  font-size: 9.5px;
  line-height: 1.45;
}

.tooltip-effect::before {
  content: '';
  width: 4px;
  height: 4px;
  margin-top: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--positive);
}

.tooltip-effect.negative::before {
  background: var(--negative);
}

.stage-loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(6, 14, 9, 0.52);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.stage-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(185, 230, 125, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.stage-fallback {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(6, 14, 9, 0.82);
  text-align: center;
}

.fallback-icon {
  width: 38px;
  height: 38px;
  color: var(--dim);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

.stage-fallback h3 {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 420;
}

.stage-fallback p {
  max-width: 390px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

/* Detail panel */
.detail-panel {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.detail-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 50px 34px;
}

.detail-empty .empty-mark {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  margin-bottom: 20px;
  border: 1px solid rgba(185, 230, 125, 0.14);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 230, 125, 0.1), transparent 72%);
  color: var(--accent);
}

.detail-empty .empty-mark .icon {
  width: 22px;
  height: 22px;
}

.detail-empty h2 {
  margin-top: 6px;
  font-size: 30px;
}

.detail-empty > p:last-child {
  max-width: 310px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}

.detail-empty > .text-button {
  margin-top: 15px;
  font-size: 10px;
}

.detail-loading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 20px;
}

.detail-skeleton {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  background-size: 220% 100%;
  animation: shimmer 1.6s ease infinite;
}

.detail-skeleton-title {
  width: 62%;
  height: 33px;
  margin-bottom: 6px;
}

.detail-skeleton-short {
  width: 42%;
}

.detail-skeleton-card {
  height: 92px;
  margin-top: 8px;
  border-radius: 12px;
}

@keyframes shimmer {
  0% { background-position: 180% 0; }
  100% { background-position: -60% 0; }
}

.detail-content {
  padding: 19px 19px 26px;
  opacity: 1;
  animation: detail-in 0.32s ease both;
}

@keyframes detail-in {
  from { transform: translateY(6px); }
  to { transform: translateY(0); }
}

.detail-hero {
  position: relative;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.detail-glyph {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(185, 230, 125, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(185, 230, 125, 0.19), transparent 70%),
    rgba(185, 230, 125, 0.035);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 430;
}

.detail-glyph[data-kind='suplement'] {
  border-color: rgba(233, 197, 107, 0.2);
  background:
    radial-gradient(circle at 30% 20%, rgba(233, 197, 107, 0.18), transparent 70%),
    rgba(233, 197, 107, 0.03);
  color: var(--amber);
}

.detail-glyph[data-kind='owoc'] {
  border-color: rgba(240, 153, 127, 0.22);
  background:
    radial-gradient(circle at 30% 20%, rgba(240, 153, 127, 0.2), transparent 70%),
    rgba(240, 153, 127, 0.035);
  color: #f0a184;
}

.detail-glyph[data-kind='warzywo'] {
  border-color: rgba(198, 215, 110, 0.22);
  background:
    radial-gradient(circle at 30% 20%, rgba(198, 215, 110, 0.2), transparent 70%),
    rgba(198, 215, 110, 0.035);
  color: #cadb76;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kind-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 9px;
  border: 1px solid rgba(185, 230, 125, 0.19);
  border-radius: 999px;
  background: rgba(185, 230, 125, 0.07);
  color: var(--accent);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kind-badge[data-kind='suplement'] {
  border-color: rgba(233, 197, 107, 0.22);
  background: rgba(233, 197, 107, 0.07);
  color: var(--amber);
}

.kind-badge[data-kind='owoc'] {
  border-color: rgba(240, 153, 127, 0.24);
  background: rgba(240, 153, 127, 0.075);
  color: #f0a184;
}

.kind-badge[data-kind='warzywo'] {
  border-color: rgba(198, 215, 110, 0.24);
  background: rgba(198, 215, 110, 0.075);
  color: #cadb76;
}

.detail-close {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}

.detail-close:hover {
  color: var(--ink);
  background: var(--surface);
}

.detail-close .icon {
  width: 12px;
  height: 12px;
}

.detail-hero h2 {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(27px, 2.2vw, 34px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.detail-latin {
  margin-top: 4px;
  color: #7b8c7e;
  font-family: var(--font-serif);
  font-size: 11.5px;
  font-style: italic;
  letter-spacing: 0.005em;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--dim);
  font-size: 7.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.detail-summary {
  margin-top: 13px;
  color: #c4d0c4;
  font-size: 12px;
  line-height: 1.7;
}

.sex-note {
  margin-top: 9px;
  padding: 7px 9px;
  border-left: 2px solid rgba(233, 197, 107, 0.35);
  border-radius: 0 5px 5px 0;
  background: rgba(233, 197, 107, 0.045);
  color: #9c9279;
  font-size: 8.5px;
  line-height: 1.6;
}

.serving-mode {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(240, 153, 127, 0.2);
  border-radius: 999px;
  background: rgba(240, 153, 127, 0.06);
  color: #e2a68f;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.serving-tag {
  border-color: rgba(240, 153, 127, 0.2);
  color: #d9a28d;
}

.food-panel {
  padding: 12px;
  border: 1px solid rgba(226, 199, 154, 0.14);
  border-radius: 11px;
  background:
    radial-gradient(circle at 0% 0%, rgba(231, 193, 124, 0.07), transparent 55%),
    rgba(0, 0, 0, 0.12);
}

.food-panel .section-heading {
  margin-bottom: 8px;
}

.food-preparation {
  color: #c6c1b1;
  font-size: 10px;
  line-height: 1.68;
}

.food-nutrients {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.nutrient-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(185, 230, 125, 0.13);
  border-radius: 4px;
  background: rgba(185, 230, 125, 0.035);
  color: #a9b99a;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.pairing-grid {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.pairing-card {
  padding: 9px 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.pairing-card h4 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 6px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pairing-card h4 .icon {
  width: 11px;
  height: 11px;
}

.pairing-card ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pairing-card li {
  position: relative;
  padding-left: 10px;
  color: var(--muted);
  font-size: 8.7px;
  line-height: 1.55;
}

.pairing-card li::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
}

.pairing-card.is-enhance {
  border-color: rgba(75, 213, 134, 0.13);
  background: rgba(75, 213, 134, 0.035);
}

.pairing-card.is-enhance h4 {
  color: #8fd3a5;
}

.pairing-card.is-enhance li::before {
  background: var(--positive);
}

.pairing-card.is-caution {
  border-color: rgba(244, 93, 100, 0.13);
  background: rgba(244, 93, 100, 0.035);
}

.pairing-card.is-caution h4 {
  color: #df9698;
}

.pairing-card.is-caution li::before {
  background: var(--negative);
}

.food-disclaimer {
  margin-top: 8px;
  color: #797464;
  font-size: 7.5px;
  line-height: 1.5;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.metric {
  display: flex;
  flex-direction: column;
  padding: 9px 11px;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.metric:last-child {
  border-right: 0;
}

.metric-value {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 430;
  line-height: 1;
}

.metric-value::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
}

.metric.positive .metric-value {
  color: var(--positive);
}

.metric.positive .metric-value::before {
  background: var(--positive);
}

.metric.negative .metric-value {
  color: var(--negative);
}

.metric.negative .metric-value::before {
  background: var(--negative);
}

.metric-label {
  margin-top: 4px;
  color: var(--dim);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-section {
  margin-top: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.section-heading h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-heading h3 .legend-dot {
  width: 5px;
  height: 5px;
}

.section-heading span {
  color: var(--dim);
  font-size: 8px;
  font-weight: 600;
}

.region-map {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.region-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.region-chip:hover {
  border-color: rgba(185, 230, 125, 0.3);
  background: rgba(185, 230, 125, 0.06);
  color: var(--ink);
}

.region-chip::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
  flex-shrink: 0;
}

.region-chip.is-positive::before {
  background: var(--positive);
}

.region-chip.is-negative::before {
  background: var(--negative);
}

.region-chip.is-mixed::before {
  background: linear-gradient(135deg, var(--positive) 50%, var(--negative) 50%);
}

.effect-group-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 0 7px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.effect-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.effect-group-label .legend-dot {
  width: 5px;
  height: 5px;
}

.effect-card {
  position: relative;
  margin-bottom: 6px;
  padding: 10px 11px 11px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--positive);
  border-radius: 8px;
  background: linear-gradient(100deg, rgba(75, 213, 134, 0.045), rgba(255, 255, 255, 0.015) 46%);
}

.effect-card.is-negative {
  border-left-color: var(--negative);
  background: linear-gradient(100deg, rgba(244, 93, 100, 0.045), rgba(255, 255, 255, 0.015) 46%);
}

.effect-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.effect-region {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b9c9ba;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.effect-region .icon {
  width: 10px;
  height: 10px;
  color: var(--dim);
}

.effect-evidence {
  flex-shrink: 0;
  color: var(--dim);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.effect-card h4 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 12.2px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.effect-detail {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.2px;
  line-height: 1.62;
}

.effect-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
}

.strength {
  display: flex;
  align-items: center;
  gap: 2px;
}

.strength span {
  width: 9px;
  height: 3px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.085);
}

.effect-card:not(.is-negative) .strength span.is-filled {
  background: rgba(75, 213, 134, 0.62);
}

.effect-card.is-negative .strength span.is-filled {
  background: rgba(244, 93, 100, 0.58);
}

.strength-label {
  color: #64766a;
  font-size: 7px;
}

.cites {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.cite {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #91a696;
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.cite:hover {
  border-color: rgba(185, 230, 125, 0.3);
  background: rgba(185, 230, 125, 0.06);
  color: var(--accent);
}

.prose {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.72;
}

.safety-box {
  display: flex;
  gap: 9px;
  margin-top: 8px;
  padding: 10px 11px;
  border: 1px solid rgba(244, 93, 100, 0.14);
  border-radius: 9px;
  background: rgba(244, 93, 100, 0.045);
}

.safety-box .icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  color: #d88084;
}

.safety-box p {
  color: #c7b7b6;
  font-size: 10.2px;
  line-height: 1.65;
}

.source-list-detail {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.source-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.source-link:hover {
  border-color: var(--line);
  background: var(--surface);
}

.source-number {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--dim);
  font-size: 7px;
  font-weight: 700;
}

.source-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.source-title {
  color: #c2d0c3;
  font-size: 9.6px;
  font-weight: 550;
  line-height: 1.45;
}

.source-publisher {
  margin-top: 2px;
  color: #718477;
  font-size: 8px;
  line-height: 1.4;
}

.source-link .icon {
  width: 10px;
  height: 10px;
  margin-left: auto;
  margin-top: 3px;
  color: #607265;
}

.detail-disclaimer {
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #617265;
  font-size: 8px;
  line-height: 1.55;
}

.detail-disclaimer strong {
  color: #8fa393;
  font-weight: 650;
}

/* Method section */
.method {
  padding: 74px 0 70px;
}

.method-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 530px);
  gap: 60px;
  align-items: end;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.method-head h2 {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 3.7vw, 55px);
  font-weight: 340;
  line-height: 1.02;
  letter-spacing: -0.042em;
}

.method-head h2 em {
  color: var(--accent);
  font-style: italic;
  font-weight: 320;
}

.method-head > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.method-card {
  min-height: 190px;
  padding: 19px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(24, 38, 29, 0.64), rgba(9, 17, 12, 0.56));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.method-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--accent);
}

.method-icon .icon {
  width: 16px;
  height: 16px;
}

.method-card h3 {
  margin-top: 17px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 420;
  letter-spacing: -0.02em;
}

.method-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.method-positive {
  border-color: rgba(75, 213, 134, 0.14);
  background: linear-gradient(145deg, rgba(24, 55, 37, 0.5), rgba(9, 17, 12, 0.56));
}

.method-positive .method-icon {
  border-color: rgba(75, 213, 134, 0.18);
  color: var(--positive);
}

.method-negative {
  border-color: rgba(244, 93, 100, 0.13);
  background: linear-gradient(145deg, rgba(54, 26, 28, 0.4), rgba(9, 17, 12, 0.56));
}

.method-negative .method-icon {
  border-color: rgba(244, 93, 100, 0.18);
  color: var(--negative);
}

.method-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 17, 12, 0.42);
}

.method-note {
  display: flex;
  gap: 17px;
  max-width: 800px;
}

.note-kicker {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.method-note p {
  color: #899d8c;
  font-size: 9.5px;
  line-height: 1.7;
}

.method-meta {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 5px;
  color: var(--dim);
  font-size: 8px;
  text-align: right;
}

.method-meta strong {
  color: var(--muted);
  font-weight: 650;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 8.5px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.18s ease;
}

.text-button:hover {
  color: var(--accent-strong);
}

.text-button .icon {
  width: 11px;
  height: 11px;
}

.method-meta .text-button {
  justify-content: flex-end;
  margin-top: 5px;
}

/* Footer */
.site-footer {
  display: grid;
  grid-template-columns: minmax(250px, 1.2fr) auto minmax(230px, 0.9fr);
  gap: 50px;
  align-items: start;
  padding: 34px clamp(18px, 3.4vw, 52px) 42px;
  border-top: 1px solid var(--line);
  background: rgba(5, 12, 8, 0.43);
}

.footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.footer-brand .brand-word {
  font-size: 20px;
}

.footer-brand p {
  max-width: 300px;
  margin-top: 6px;
  color: #6e8072;
  font-size: 9px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 22px;
  padding-top: 9px;
  color: var(--muted);
  font-size: 9px;
}

.footer-links a:hover,
.footer-links .text-button:hover {
  color: var(--ink);
}

.footer-links .text-button {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 7px;
  color: #607265;
  font-size: 8px;
  line-height: 1.55;
  text-align: right;
}

/* Modal */
.modal {
  width: min(920px, calc(100vw - 30px));
  max-height: min(84vh, 780px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0c1711;
  color: var(--ink);
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal::backdrop {
  background: rgba(2, 8, 5, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-shell {
  display: flex;
  flex-direction: column;
  max-height: min(84vh, 780px);
  padding: 22px 22px 0;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-head h2 {
  margin-top: 5px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.modal-head form {
  margin: 0;
}

.modal-intro {
  max-width: 700px;
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.source-list {
  flex: 1;
  min-height: 0;
  margin: 0 -8px;
  padding: 0 8px 24px;
  overflow-y: auto;
}

.source-group {
  margin-bottom: 18px;
}

.source-group h3 {
  margin: 0 0 7px;
  color: var(--dim);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.modal-source {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.modal-source:hover {
  border-color: rgba(185, 230, 125, 0.22);
  background: rgba(185, 230, 125, 0.03);
}

.source-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 27px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--dim);
  font-size: 6.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-source-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.modal-source-title {
  color: #c3d1c4;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
}

.modal-source-publisher {
  margin-top: 3px;
  color: #687a6c;
  font-size: 7.5px;
  line-height: 1.4;
}

.modal-source .icon {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  margin-top: 3px;
  margin-left: auto;
  color: #5d6f61;
}

.modal-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 2px;
  color: var(--muted);
  font-size: 10px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 150;
  max-width: min(460px, calc(100vw - 28px));
  padding: 10px 15px;
  border: 1px solid rgba(185, 230, 125, 0.2);
  border-radius: 10px;
  background: rgba(13, 28, 18, 0.94);
  color: var(--ink);
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
  animation: toast-in 0.25s ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Skeletons */
.herb-skeleton {
  height: 71px;
  margin: 4px 3px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  background-size: 220% 100%;
  animation: shimmer 1.6s ease infinite;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 300;
  padding: 12px 16px;
  border-radius: 10px;
  background: #17241b;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 1440px) {
  .atlas {
    grid-template-columns: 296px minmax(0, 1fr) 386px;
  }

  .intro {
    gap: 28px;
  }

  .intro h1 {
    font-size: clamp(38px, 4vw, 56px);
  }

  .stat-block {
    min-width: 94px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .stat-block strong {
    font-size: 24px;
  }
}

@media (max-width: 1260px) {
  .header-note {
    display: none;
  }

  .atlas {
    grid-template-columns: 286px minmax(0, 1fr) 356px;
  }

  .stage-tools .tool-button span {
    display: none;
  }

  .stage-tools .tool-button {
    width: 30px;
    padding: 0;
  }

  .intro-stats {
    align-self: stretch;
  }

  .stat-block-update {
    display: none;
  }
}

@media (max-width: 1100px) {
  .atlas {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    grid-template-rows: clamp(560px, 67svh, 700px) auto;
    height: auto;
  }

  .library-panel {
    grid-column: 1;
    grid-row: 1;
  }

  .stage-panel {
    grid-column: 2;
    grid-row: 1;
  }

  .detail-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .detail-content {
    padding: 22px 24px 26px;
  }

  .detail-hero {
    display: block;
    padding-bottom: 18px;
  }

  .detail-hero h2 {
    margin-top: 12px;
  }

  .detail-tags {
    margin-top: 10px;
  }

  .detail-summary {
    max-width: 760px;
    margin-top: 13px;
  }

  .detail-metrics {
    width: 100%;
    max-width: 390px;
    margin-top: 14px;
  }

  .detail-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
    gap: 26px;
    align-items: start;
  }

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

  .detail-body-grid .detail-section {
    margin-top: 20px;
  }

  .detail-side {
    padding-left: 24px;
    border-left: 1px solid var(--line);
  }

  .method-head {
    gap: 36px;
  }

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

  .method-card {
    min-height: 150px;
  }
}

@media (max-width: 880px) {
  .site-header {
    min-height: 68px;
  }

  .site-nav .nav-link:not(.nav-button) {
    display: none;
  }

  .intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
    padding: 28px 0 24px;
  }

  .intro-stats {
    width: 100%;
  }

  .stat-block {
    flex: 1;
  }

  .stat-block-update {
    display: flex;
    flex: 0 0 145px;
  }

  .atlas {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 12px;
  }

  .stage-panel {
    order: 1;
    height: clamp(480px, 62svh, 620px);
  }

  .library-panel {
    order: 2;
    max-height: 560px;
  }

  .detail-panel {
    order: 3;
    max-height: none;
  }

  .detail-panel .detail-content {
    padding: 20px;
  }

  .detail-hero {
    display: block;
  }

  .detail-glyph {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .detail-topline {
    display: flex;
  }

  .detail-topline .detail-glyph {
    margin-bottom: 12px;
  }

  .detail-metrics {
    width: 100%;
    margin-top: 14px;
  }

  .detail-summary {
    margin-top: 13px;
  }

  .detail-body-grid {
    display: block;
  }

  .detail-side {
    padding-left: 0;
    border-left: 0;
  }

  .method-head {
    display: block;
    padding-bottom: 24px;
  }

  .method-head > p {
    max-width: 600px;
    margin-top: 18px;
  }

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

  .method-bottom {
    display: block;
  }

  .method-meta {
    align-items: flex-start;
    margin-top: 16px;
    text-align: left;
  }

  .method-meta .text-button {
    justify-content: flex-start;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }

  .footer-legal {
    grid-column: 1 / -1;
    text-align: left;
  }

  .footer-links {
    justify-content: flex-end;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .site-header {
    gap: 12px;
    min-height: 62px;
    padding: 8px 15px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-mark svg {
    width: 27px;
    height: 27px;
  }

  .brand-word {
    font-size: 19px;
  }

  .brand-sub {
    font-size: 7px;
  }

  .site-nav {
    gap: 0;
  }

  .nav-link {
    padding: 8px;
    font-size: 10px;
  }

  .nav-count {
    display: none;
  }

  main {
    padding: 0 12px;
  }

  .intro {
    padding: 22px 2px 20px;
  }

  .eyebrow {
    font-size: 8px;
  }

  .intro h1 {
    margin-top: 11px;
    font-size: clamp(35px, 10.5vw, 48px);
  }

  .intro-lead {
    margin-top: 12px;
    font-size: 11.5px;
    line-height: 1.65;
  }

  .intro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-block {
    min-width: 0;
    padding: 11px 12px;
  }

  .stat-block strong {
    font-size: 21px;
  }

  .stat-block span {
    font-size: 7px;
  }

  .stat-block-update {
    display: none;
  }

  .stage-panel {
    height: min(64svh, 540px);
    min-height: 420px;
    border-radius: 18px;
  }

  .stage-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 13px 13px 10px;
  }

  .stage-heading h2 {
    font-size: 20px;
  }

  .stage-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .sex-button {
    padding: 0 7px;
    font-size: 8px;
  }

  .sex-button span {
    display: none;
  }

  .tool-button {
    width: 29px;
    padding: 0;
  }

  .stage-tools .tool-button span {
    display: none;
  }

  .stage-caption {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 70px);
    padding: 7px 7px 7px 9px;
  }

  .caption-copy strong {
    font-size: 16px;
  }

  .stage-region {
    display: none;
  }

  .stage-legend {
    bottom: 9px;
    left: 11px;
    flex-direction: column;
    gap: 4px;
    font-size: 7.5px;
  }

  .stage-hint {
    display: none;
  }

  .body-tooltip {
    max-width: 220px;
    padding: 8px 10px;
  }

  .modal {
    width: calc(100vw - 18px);
    max-height: 90vh;
    border-radius: 15px;
  }

  .modal-shell {
    max-height: 90vh;
    padding: 16px 14px 0;
  }

  .modal-head h2 {
    font-size: 26px;
  }

  .library-panel {
    border-radius: 18px;
    max-height: 540px;
  }

  .detail-panel {
    border-radius: 18px;
  }

  .detail-panel .detail-content {
    padding: 17px 15px 23px;
  }

  .food-panel .pairing-grid {
    grid-template-columns: 1fr;
  }

  .detail-metrics {
    width: 100%;
  }

  .method {
    padding: 48px 0 40px;
  }

  .method-head h2 {
    font-size: 37px;
  }

  .method-head > p {
    font-size: 11px;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-card {
    min-height: 0;
  }

  .method-bottom {
    padding: 15px;
  }

  .method-note {
    display: block;
  }

  .method-note p {
    margin-top: 7px;
  }

  .site-footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 27px 15px 32px;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-legal {
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .toast {
    bottom: 14px;
  }
}

@media (max-width: 400px) {
  .brand-sub {
    display: none;
  }

  .nav-link {
    font-size: 9px;
  }

  .stage-panel {
    min-height: 390px;
  }

  .detail-empty {
    padding: 35px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #bodyCanvas,
  .detail-content,
  .stage-caption,
  .active-filter,
  .toast,
  .herb-skeleton,
  .detail-skeleton {
    animation: none !important;
    opacity: 1;
  }
}
