/* FaunaTech — field atlas. Shared tokens retain compatibility with module templates. */
:root {
  --bg: #f6f7f3;
  --surface: #fff;
  --surface-2: #eef2eb;
  --surface-3: #e5ebe1;
  --line: #dfe5dc;
  --line-strong: #b2c2ad;
  --text: #182c22;
  --text-2: #43554a;
  --text-3: #68766b;
  --accent: #315b41;
  --accent-strong: #254b34;
  --accent-soft: #e4eddf;
  --ok: #315b41;
  --ink: #10271f;
  --ink-2: #18372c;
  --ink-3: #244a3b;
  --ink-line: #3a574b;
  --ink-accent: #d7f2a4;
  --font-sans: 'Avenir Next', Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-serif: Georgia, 'Times New Roman', serif;
  --text-1: var(--text);
  --text-primary: var(--text);
  --text-secondary: var(--text-2);
  --text-muted: var(--text-3);
  --text-Body: var(--text-2);
  --border: var(--line);
  --border-organic: var(--line-strong);
  --on-accent: #ffffff;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --ok-soft: #dcfce7;
  --ok-tint: #f0fdf4;
  --radius: 18px;
  --elev: 0 4px 20px #1b382508;
}
html { scroll-behavior: smooth; scroll-padding-top: 154px; max-width: 100%; overflow-x: clip; }
body { letter-spacing: -.015em; max-width: 100%; overflow-x: clip; }
button, input, select, textarea { font-family: var(--font-sans); }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #5c8845; outline-offset: 4px;
}
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 9999; background: #fff; color: var(--text); padding: 12px 22px; border-radius: 9px; }
.skip-link:focus { top: 12px; }
.app-header { background: rgba(246,247,243,.96); backdrop-filter: blur(18px); padding: env(safe-area-inset-top, 0px) 40px 0; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1400px; grid-template-columns: auto minmax(180px,1fr) auto auto auto; grid-template-areas: 'brand search appbtn lang atlas' 'nav nav nav nav nav'; gap: 0 16px; }
button.brand { font: inherit; text-align: left; background: none; border: 0; padding: 18px 0; color: var(--text); gap: 10px; }
.brand-icon { width: 39px; height: 43px; border-radius: 16px 16px 5px 16px; background: #244b36; color: #d7efaf; }
.brand-title { font: 700 24px/1.15 var(--font-sans); letter-spacing: -1.1px; }
.brand-subtitle { font-size: 10px; letter-spacing: .025em; margin-top: 3px; }
.header-search-wrap { max-width: 420px; border: 1px solid #dfe5dc; border-radius: 100px; background: #fff; padding: 6px 6px 6px 16px; }
.header-search-input { font-size: 12px; min-width: 0; }
.header-search-btn { background: #edf2e9; color: var(--text); border-radius: 99px; min-height: 32px; padding: 5px 15px; }
.header-search-btn:hover { background: #dfead7; }
.fauna-header-app-btn { grid-area: appbtn; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #b8d398; border-radius: 999px; padding: 8px 14px; font-size: 11px; font-weight: 700; background: #e7f3d4; color: #1c3a27; cursor: pointer; white-space: nowrap; transition: background .18s, transform .18s; }
.fauna-header-app-btn:hover { background: #d8efa9; transform: translateY(-1px); }
#fauna-lang-switcher { grid-area: lang; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; box-shadow: none; justify-self: end; }
#fauna-lang-switcher .fauna-lang-btn { display: inline-flex; padding: 5px 9px; font-size: 11px; font-weight: 700; border-radius: 999px; }
#fauna-lang-switcher .fauna-lang-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: none; }
#fauna-lang-switcher .fauna-lang-select { width: auto; max-width: 125px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; background: #fff; color: var(--text); font-size: 11px; font-weight: 600; }
.atlas-launcher { grid-area: atlas; display: flex; align-items: center; gap: 18px; border: 0; border-radius: 99px; padding: 12px 20px; font-size: 12px; font-weight: 600; background: var(--text); color: #fff; cursor: pointer; }
.atlas-launcher span { font-size: 17px; }
.nav-tabs { border-top: 1px solid var(--line); justify-content: flex-start; gap: 6px; padding: 7px 0; align-items: center; }
.nav-tab { border: 1px solid transparent; border-radius: 999px; font-size: 12px; font-weight: 600; padding: 8px 14px; min-height: 38px; gap: 7px; color: #485b4e; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.nav-tab.active { background: #183c30; color: #f4f9f0; border-color: #183c30; box-shadow: 0 3px 10px rgba(24, 60, 48, 0.16); }
.nav-tab:hover:not(.active) { background: #eaf0e6; color: #182c22; }
.nav-more-tools { margin-left: auto; }
.nav-tab .ico { width: 15px; height: 15px; }
.portal-universe-wrap, .biome-filter-bar, .species-bar, .workspace { max-width: 1480px; padding-left: 40px; padding-right: 40px; }
.portal-universe-wrap { margin: 28px auto 0; }
.discovery-hero { isolation: isolate; position: relative; min-height: 480px; border-radius: 24px; background: #142e23; color: #fff; overflow: hidden; }
.discovery-photo { position: absolute; z-index: -3; right: 0; top: 0; width: 70%; height: 100%; object-fit: cover; object-position: center 56%; }
.discovery-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg,#142e23 10%,#142e23f5 29%,#142e23b0 49%,#10271f20 74%),linear-gradient(0deg,#10271f70,transparent 60%); }
.discovery-copy { padding: 48px 52px 36px; position: relative; max-width: 760px; }
.discovery-eyebrow { display: flex; align-items: center; gap: 10px; font: 500 10px/1.4 var(--font-sans); letter-spacing: .2em; color: #dfebd9; }
.discovery-eyebrow > span { height: 6px; width: 6px; border-radius: 50%; background: #d7efaf; box-shadow: 0 0 0 5px #d7efaf15; }
.discovery-copy h1 { font-size: clamp(38px,4.7vw,68px); font-weight: 500; line-height: 1.09; letter-spacing: -.055em; margin: 26px 0 20px; }
.discovery-copy h1 em { color: #d5edaf; font-weight: 400; font-style: normal; }
.discovery-description { color: #d0ddcf; font-size: 14px; line-height: 1.85; max-width: 430px; }
.discovery-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 26px; }
.discover-button { display: inline-flex; align-items: center; gap: 30px; color: #1c3525; background: #d8efa9; text-decoration: none; border-radius: 100px; padding: 14px 21px; font-size: 12px; font-weight: 700; min-height: 48px; }
.discover-button:hover { background: #e6fac2; }
.discover-button > span { font-size: 21px; line-height: 1; }
.discovery-secondary { display: inline-flex; align-items: center; gap: 9px; color: #fff; background: none; border: 0; padding: 12px 0; min-height: 44px; font-size: 12px; cursor: pointer; }
.discovery-secondary .ico { width: 20px; height: 20px; }
.discovery-stats { display: flex; gap: 28px; margin-top: 36px; }
.discovery-stats > div { display: flex; flex-direction: column; gap: 1px; padding-right: 28px; border-right: 1px solid #ffffff26; }
.discovery-stats > div:last-child { border: 0; padding-right: 0; }
.discovery-stats strong { font-size: 25px; font-weight: 500; letter-spacing: -.06em; }
.discovery-stats span { color: #c1d0c0; font-size: 10px; letter-spacing: .015em; }
.discovery-photo-note { position: absolute; right: 30px; bottom: 30px; display: flex; align-items: center; gap: 15px; padding: 16px 20px; color: #fff; border: 1px solid #ffffff42; border-radius: 14px; background: #172f2570; backdrop-filter: blur(15px); }
.discovery-photo-note > div { display: flex; flex-direction: column; gap: 5px; }
.discovery-photo-note div > span { font-size: 8px; letter-spacing: .16em; color: #d6e4cf; }
.discovery-photo-note strong { font-size: 12px; font-weight: 500; }
.photo-note-cross { font-size: 25px; color: #d8efa9; }
.discovery-toolbar { display: flex; align-items: center; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.toolbar-label { font-size: 9px; color: var(--text-3); letter-spacing: .14em; flex-shrink: 0; }
.discovery-shortcuts { display: flex; flex: 1; flex-wrap: wrap; gap: 7px 22px; }
.discovery-shortcuts button { color: var(--text-2); padding: 5px 0; border: 0; background: none; font-size: 11px; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 32px; }
.discovery-shortcuts button:hover { color: var(--accent); text-decoration: underline; }
.discovery-shortcuts button span { color: #7e8e78; }
.collection-toggle { display: flex; align-items: center; gap: 18px; font-size: 11px; font-weight: 600; color: var(--text); background: none; border: 0; min-height: 44px; white-space: nowrap; cursor: pointer; }
.collection-toggle > span { font-size: 20px; font-weight: 400; }
.portal-cards-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; padding: 28px 0; }
.portal-site-card { padding: 0; text-align: left; color: var(--text); font: inherit; border: 1px solid var(--line); background: #fff; border-radius: 18px; overflow: hidden; cursor: pointer; }
.portal-site-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px #183c3012; }
.portal-site-card.active-portal { outline: 2px solid var(--accent); outline-offset: 3px; }
.portal-card-cover { display: block; position: relative; height: 150px; background: #244b36; overflow: hidden; }
.portal-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.portal-card-number { position: absolute; top: 12px; left: 12px; background: #152e2477; color: #fff; border: 1px solid #ffffff70; padding: 4px 9px; border-radius: 100px; font-size: 10px; backdrop-filter: blur(8px); }
.portal-card-info { display: flex; flex-direction: column; gap: 5px; padding: 16px 18px; }
.portal-card-info strong { font-size: 15px; font-weight: 600; }
.portal-card-info > span { display: flex; justify-content: space-between; color: var(--text-3); font-size: 11px; }
.biome-filter-bar { margin-top: 34px; gap: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.eyebrow { display: block; font-size: 9px; font-weight: 600; letter-spacing: .16em; color: #6a7d60; margin-bottom: 9px; }
.section-heading h2 { font-size: clamp(23px,2.5vw,31px); line-height: 1.3; font-weight: 500; letter-spacing: -.045em; }
.section-note { font-size: 11px; color: var(--text-3); padding-bottom: 5px; }
.biome-pills { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.biome-pill { border-radius: 10px; min-height: 48px; padding: 11px 15px; font-size: 11px; font-weight: 500; box-shadow: none; }
.biome-pill:hover { box-shadow: none; background: #eef3e8; }
.biome-pill.active { background: #284b35; border-color: #284b35; color: #fff; box-shadow: none; }
.pill-count { font-size: 10px; font-weight: 400; background: transparent; color: #6b7d63; }
.biome-pill.active .pill-count { background: #ffffff18; }
.species-count-badge { display: flex; justify-content: flex-start; border: 0; border-radius: 0; padding: 0; background: none; font-family: var(--font-sans); font-size: 11px; gap: 6px; }
.species-count-badge button { margin-left: auto !important; min-height: 30px; }
.species-bar { margin-top: 15px; }
.species-grid { gap: 16px; padding: 3px 3px 16px; scrollbar-color: #c6d3bf transparent; }
.species-pill { flex-basis: 185px; border-radius: 14px; border-color: var(--line); transition: transform .2s,box-shadow .2s; }
.species-pill:hover { transform: translateY(-3px); box-shadow: 0 6px 20px #1733250e; }
.species-pill.active { outline: 2px solid #527541; outline-offset: 0; border-color: transparent; }
.species-thumb { height: 135px; border: 0; }
.species-pill-info { gap: 3px; padding: 13px; }
.species-pill-top { font-size: 7px; letter-spacing: .04em; }
.species-pill-name { font-size: 12px; }
.species-pill-sci { font: italic 10px/1.4 var(--font-sans); }
.dock-arrow { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 2px 15px #17332510; }
.dock-arrow-prev { left: 23px; } .dock-arrow-next { right: 23px; }
.workspace { margin-top: 28px; outline: none; }
.species-hero { grid-template-columns: minmax(240px,.8fr) minmax(0,1.4fr); align-items: start; padding: 28px; gap: 28px; border-radius: 22px; background: #fff; box-shadow: none; }
.hero-Main-photo-wrap { aspect-ratio: 1; border-radius: 15px; }
.hero-title { font: 500 clamp(26px,3vw,40px)/1.12 var(--font-sans); letter-spacing: -.045em; }
.hero-species-subtitle { display: block; font-size: 14px; font-weight: 500; color: var(--accent); letter-spacing: -.015em; line-height: 1.5; margin-top: 10px; }
.hero-sci { font: italic 12px/1.6 var(--font-sans); letter-spacing: .015em; word-spacing: .06em; margin-top: 5px; }
.hero-quote { font: 400 12px/1.7 var(--font-sans); color: var(--text-3); }
.taxonomy-badges { gap: 5px; margin-bottom: 16px; }
.badge { border-radius: 100px; font-size: 9px; padding: 4px 9px; }
.bio-meta-row { font-size: 10px; gap: 8px 14px; line-height: 1.5; margin-top: 16px; }
.hero-actions { gap: 7px; margin-top: 20px; }
.hero-actions .btn { font-size: 10px; border-radius: 8px; padding: 7px 10px; min-height: 34px; }
.kpi-strip { grid-column: 1 / -1; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; padding-top: 24px; border-top: 1px solid var(--line); }
.kpi-box { background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 0 18px; }
.kpi-box:first-child { padding-left: 0; } .kpi-box:last-child { border-right: 0; }
.kpi-value { font-family: var(--font-sans); font-size: 27px; letter-spacing: -.05em; }
.kpi-label { font-size: 10px; color: var(--text-3); }
.panel-card { border-radius: 18px; box-shadow: none; padding: 24px; }
.panel-title { font-family: var(--font-sans); font-size: 14px; letter-spacing: -.02em; line-height: 1.5; }
.panel-header { gap: 12px; }
.btn { border-radius: 9px; box-shadow: none; }
.btn-primary { background: #315b41; border-color: #315b41; }
.btn-primary:hover { background: #244b36; border-color: #244b36; }
.anatomy-grid { gap: 20px; }
body:not([data-module="anatomy"]) .portal-universe-wrap { display: none; }
body:not([data-module="anatomy"]) .section-heading { display: none; }
body:not([data-module="anatomy"]) .biome-filter-bar { margin-top: 24px; }
.site-footer { max-width: 1400px; margin: 64px auto 0; padding: 32px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--text-3); }
.site-footer a { color: var(--text); text-decoration: none; font-size: 12px; }
.site-footer .footer-brand { font-size: 22px; font-weight: 700; letter-spacing: -.05em; }
.footer-brand span { font-size: 11px; vertical-align: top; margin-left: 3px; }
.site-footer p { font-size: 12px; }
@media (min-width:1600px) { .biome-pills { grid-template-columns: repeat(8,minmax(0,1fr)); } }
@media (max-width:1100px) {
  .header-inner { gap: 0 12px; grid-template-columns: auto minmax(120px,1fr) auto auto; grid-template-areas: 'brand search appbtn atlas' 'nav nav nav lang'; width: 100%; max-width: 100%; min-width: 0; }
  .header-inner > * { min-width: 0; max-width: 100%; }
  #fauna-lang-switcher { display: inline-flex; grid-area: lang; align-self: center; }
  #fauna-lang-switcher .fauna-lang-btn { display: none; }
  .header-inner .nav-tabs { grid-area: nav; grid-column: 1 / 4; justify-content: flex-start; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .header-inner .nav-tabs::-webkit-scrollbar { display: none; }
  .discovery-copy { padding: 40px; }
  .discovery-photo-note { right: 24px; bottom: 24px; max-width: 230px; padding: 12px; gap: 9px; }
  .discovery-toolbar { gap: 16px; }
  .toolbar-label { display: none; }
  .discovery-shortcuts { gap: 4px 16px; }
  .section-note { max-width: 200px; text-align: right; }
  .site-footer { margin-left: 40px; margin-right: 40px; }
}
@media (max-width:760px) {
  html { scroll-padding-top: 164px; }
  html, body { max-width: 100%; overflow-x: clip; }
  .app-header { padding: env(safe-area-inset-top, 0px) 14px 0; max-width: 100%; overflow-x: clip; box-sizing: border-box; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 'brand appbtn atlas' 'search search lang' 'nav nav nav'; gap: 0 6px; width: 100%; max-width: 100%; min-width: 0; }
  .header-inner > * { min-width: 0; max-width: 100%; }
  .header-inner .nav-tabs { grid-area: nav; grid-column: 1 / -1; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; box-sizing: border-box; }
  button.brand { padding: 11px 0; min-width: 0; gap: 6px; max-width: 100%; overflow: hidden; }
  .brand-title { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-subtitle { display: none; }
  .brand-icon { width: 28px; height: 30px; border-radius: 10px 10px 4px 10px; flex-shrink: 0; }
  .fauna-header-app-btn { padding: 6px 9px; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 114px; }
  .atlas-launcher { padding: 7px 10px; font-size: 10.5px; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; }
  .compare-controls { max-width: 100%; box-sizing: border-box; gap: 0.65rem; padding: 0.85rem; }
  .compare-controls select.cyber-select { flex: 1 1 180px; width: 100%; max-width: 100%; min-width: 0; }
  .dual-bar-track > div { min-width: 0; }
  .bar-name { min-width: 0; flex-shrink: 1; max-width: 44%; }
  #radar-canvas, #bouligand-canvas, #sim-canvas { width: 100%; max-width: 100%; height: auto; }
  .header-search-wrap { margin-bottom: 8px; max-width: 100%; width: 100%; min-width: 0; padding: 3px 4px 3px 10px; box-sizing: border-box; }
  .header-search-input { font-size: 16px; flex: 1 1 0%; width: 0; min-width: 0; }
  .header-search-input::placeholder { font-size: 11px; }
  #fauna-lang-switcher { margin-bottom: 8px; margin-left: 0; padding: 2px 4px; min-width: 0; flex-shrink: 0; }
  #fauna-lang-switcher .fauna-lang-btn { display: none; }
  #fauna-lang-switcher .fauna-lang-select { width: auto; max-width: 102px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 12px 4px 7px; }
  .nav-tabs { gap: 12px; }
  .nav-tab { padding: 11px 3px; min-height: 42px; font-size: 11px; }
  .portal-universe-wrap, .biome-filter-bar, .species-bar, .workspace { padding-left: 18px; padding-right: 18px; max-width: 100%; box-sizing: border-box; }
  .portal-universe-wrap { margin-top: 18px; }
  .discovery-hero { min-height: 550px; border-radius: 20px; max-width: 100%; }
  .discovery-copy { padding: 32px 26px 120px; min-width: 0; max-width: 100%; }
  .discovery-copy h1 { font-size: clamp(35px,6.5vw,48px); margin-top: 23px; }
  .discovery-photo { width: 100%; object-position: 70% center; }
  .discovery-shade { background: linear-gradient(90deg,#142e23ee,#142e2390),linear-gradient(0deg,#10271f20,#10271f70); }
  .discovery-description { font-size: 12px; max-width: 400px; }
  .discovery-actions { gap: 10px 18px; margin-top: 23px; max-width: 100%; }
  .discover-button { padding: 11px 15px; gap: 10px; max-width: 100%; flex-wrap: nowrap; line-height: 1.3; text-align: left; }
  .discover-button > svg, .discover-button > span { flex-shrink: 0; }
  .discovery-secondary { font-size: 11px; }
  .discovery-stats { flex-wrap: wrap; gap: 14px 18px; margin-top: 26px; max-width: 100%; }
  .discovery-stats > div { padding-right: 18px; }
  .discovery-stats strong { font-size: 23px; }
  .discovery-stats span { font-size: 9px; }
  .discovery-photo-note { left: 26px; right: 26px; bottom: 25px; max-width: none; padding: 12px 16px; }
  .discovery-photo-note > span:last-child { margin-left: auto; }
  .discovery-toolbar { flex-wrap: wrap; gap: 10px; padding: 16px 0; }
  .discovery-shortcuts { flex-basis: 100%; gap: 8px 18px; }
  .discovery-shortcuts button { min-height: 36px; font-size: 11px; }
  .collection-toggle { margin-left: auto; min-height: 36px; }
  .portal-cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 20px 0; }
  .portal-card-cover { height: 120px; }
  .portal-card-info { padding: 12px; }
  .portal-card-info strong { font-size: 12px; }
  .biome-filter-bar { margin-top: 28px; gap: 15px; }
  .section-note { display: none; }
  .section-heading h2 { font-size: 26px; }
  .biome-pills { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .biome-pill { font-size: 10px; padding: 9px 10px; min-height: 46px; gap: 3px; }
  .pill-count { padding: 2px 4px; font-size: 9px; }
  .species-count-badge { display: flex; font-size: 10px; }
  .species-count-badge button { font-size: 10px !important; margin-left: 0 !important; }
  .species-pill { flex-basis: 162px; }
  .species-thumb { height: 122px; }
  .species-grid { gap: 12px; }
  .dock-arrow { display: none; }
  .workspace { margin-top: 20px; width: 100%; max-width: 100%; overflow-x: clip; box-sizing: border-box; }
  .species-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 22px; }
  .hero-Main-photo-wrap { aspect-ratio: 4/3; }
  .hero-title { font-size: 32px; }
  .hero-actions .btn { font-size: 11px; min-height: 42px; }
  .bio-meta-row { font-size: 11px; }
  .kpi-strip { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 0; padding-top: 18px; }
  .kpi-box { padding: 0 12px; }
  .kpi-box:nth-child(odd) { padding-left: 0; }
  .kpi-box:nth-child(even) { border-right: 0; }
  .kpi-value { font-size: 25px; }
  .anatomy-grid { grid-template-columns: minmax(0,1fr); }
  .panel-card { padding: 16px; min-width: 0; }
  .panel-title { font-size: 13px; }
  .site-footer { margin: 40px 18px 0; flex-wrap: wrap; padding: 24px 0; max-width: 100%; box-sizing: border-box; }
  .site-footer p { font-size: 10px; }
  .footer-lab-links { max-width: 100%; }
  .footer-tool-link { max-width: 100%; text-align: left; }
}
@media (max-width:420px) {
  .brand-title { font-size: 15px; }
  .fauna-header-app-btn { font-size: 9px; padding: 5px 7px; max-width: 96px; }
  .atlas-launcher { font-size: 9.5px; padding: 6px 8px; max-width: 110px; }
}
@media (max-width:380px) {
  .discovery-copy { padding-left: 20px; padding-right: 20px; }
  .discovery-copy h1 { font-size: 32px; }
  .discovery-stats { gap: 12px; }
  .discovery-stats > div { padding-right: 12px; }
  .discovery-photo-note { left: 20px; right: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .portal-site-card, .species-pill, .btn, .biome-pill, .discover-button { transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
  .discovery-copy { animation: atlas-arrive .65s ease-out both; }
  @keyframes atlas-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Native selects must be allowed to shrink within legacy module grids. */
#species-botany-cultivation-panel label { min-width: 0; }
#species-botany-cultivation-panel select { min-width: 0; width: 100%; max-width: 100%; }

.workspace :where(div, section, label) { min-width: 0; overflow-wrap: anywhere; }
@media (max-width:480px) {
  .workspace [style*="grid-template-columns"] { grid-template-columns: minmax(0,1fr) !important; }
  .workspace .fauna-inf-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .workspace :where(button, select, input, a) { max-width: 100%; }
}
@media (max-width:480px) {
  .workspace [style*="min-width:260px"] { min-width: 0 !important; }
}
/* Five full-height chapters. The atlas tools live on their own pages. */
body[data-page="home"] .biome-filter-bar,
body[data-page="home"] .species-bar,
body[data-page="home"] .workspace { display: none !important; }
body:not([data-page="home"]) .portal-universe-wrap,
body:not([data-page="home"]) .discovery-chapters { display: none; }
.discovery-chapters { max-width: 1480px; padding: 0 40px; margin: 0 auto; }
.chapters-intro { display: grid; grid-template-columns: 1fr auto 40px; align-items: end; gap: 20px; padding: 68px 0 36px; }
.chapters-intro .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.chapters-intro h2 { font-size: clamp(30px,3.8vw,48px); line-height: 1.12; letter-spacing: -.05em; font-weight: 500; }
.chapters-intro p { font-size: 12px; color: var(--text-3); line-height: 1.8; padding-bottom: 5px; }
.chapters-intro > span:last-child { text-align: right; font-size: 30px; font-weight: 300; }
.discovery-story { display: grid; grid-template-columns: 1fr 1fr; min-height: min(620px,80vh); margin: 0 0 30px; text-decoration: none; color: #233b2b; background: #e8eee3; border-radius: 24px; overflow: hidden; isolation: isolate; }
.story-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px,4.3vw,64px); }
.story-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 10px; font-weight: 600; letter-spacing: .06em; margin-bottom: 38px; }
.story-kicker > span:first-child { border: 1px solid currentColor; border-radius: 100px; padding: 6px 12px; font-size: 9px; opacity: .75; }
.story-copy h2 { font-size: clamp(30px,3.6vw,50px); font-weight: 500; letter-spacing: -.055em; line-height: 1.12; margin-bottom: 22px; }
.story-copy p { font-size: 13px; line-height: 1.9; opacity: .8; max-width: 370px; }
.story-tags { display: flex; flex-wrap: wrap; gap: 7px 16px; font-size: 9px; margin: 22px 0 34px; opacity: .7; }
.story-tags span::before { content: '·'; margin-right: 7px; }
.story-open { display: flex; align-items: center; gap: 30px; font-size: 12px; font-weight: 600; padding-bottom: 7px; border-bottom: 1px solid currentColor; }
.story-open > span { font-size: 23px; font-weight: 400; line-height: 1; }
.story-image { position: relative; min-height: 100%; background: #1f3a2d; overflow: hidden; }
.story-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg,#122c2955,transparent 65%); pointer-events: none; }
.story-image img { height: 100%; width: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .6s ease; }
.discovery-story:hover .story-image img { transform: scale(1.035); }
.story-image-index { position: absolute; bottom: 22px; right: 28px; color: #ffffffb0; z-index: 1; font-size: 72px; font-weight: 300; line-height: 1; letter-spacing: -.07em; }
.discovery-story:nth-of-type(even) .story-image { order: -1; }
.story-ink { background: #1b302b; color: #e4f0d6; }
.story-ocean { background: #e1ebeb; color: #1a4548; }
.story-moss { background: #dfe8cf; color: #34482b; }
.story-sand { background: #ece9df; color: #494735; }
.discovery-page-heading { max-width: 1480px; margin: 32px auto 0; padding: 0 40px; }
.page-back { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; color: var(--text-3); font-size: 11px; text-decoration: none; }
.page-back:hover { color: var(--accent); text-decoration: underline; }
.page-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 32px; border-bottom: 1px solid var(--line); padding: 24px 0 28px; }
.page-heading-row h1 { font-size: clamp(32px,4vw,52px); font-weight: 500; line-height: 1.15; letter-spacing: -.05em; outline: none; }
.page-heading-row p { font-size: 12px; line-height: 1.8; color: var(--text-3); max-width: 430px; }
body[data-page="home"] .site-footer { margin-top: 50px; }
@media (max-width:760px) {
  .discovery-chapters, .discovery-page-heading { padding: 0 18px; max-width: 100%; box-sizing: border-box; }
  .chapters-intro { grid-template-columns: minmax(0,1fr) 30px; padding-top: 44px; padding-bottom: 26px; }
  .chapters-intro > * { min-width: 0; }
  .chapters-intro h2 { font-size: 32px; }
  .chapters-intro p { grid-row: 3; font-size: 11px; }
  .chapters-intro > span:last-child { grid-column: 2; grid-row: 2; }
  .discovery-story { grid-template-columns: minmax(0,1fr); min-height: 0; border-radius: 20px; margin-bottom: 22px; }
  .story-copy { padding: 30px 26px; min-width: 0; max-width: 100%; }
  .story-kicker { margin-bottom: 26px; font-size: 9px; gap: 12px; }
  .story-copy h2 { font-size: 33px; margin-bottom: 18px; }
  .story-copy p { font-size: 12px; }
  .story-tags { margin: 20px 0 26px; font-size: 9px; gap: 6px 12px; }
  .story-image { height: 300px; min-height: 0; }
  .discovery-story:nth-of-type(even) .story-image { order: 0; }
  .story-image-index { font-size: 58px; }
  .page-heading-row { flex-direction: column; align-items: start; gap: 18px; padding: 18px 0 24px; }
  .discovery-page-heading { margin-top: 20px; }
}
@media (prefers-reduced-motion:reduce) { .discovery-story:hover .story-image img { transform: none; } }
/* Category landing pages and their shareable subgroup pages. */
body[data-catalog-scope="category"] .biome-filter-bar { display:none !important; }
.species-subgroups { max-width:1480px; margin:0 auto 48px; padding:0 40px; }
.species-subgroups[hidden], body[data-page="home"] .species-subgroups { display:none !important; }
body[data-catalog-view="overview"] .species-bar,
body[data-catalog-view="overview"][data-module="anatomy"] .workspace { display:none !important; }
body[data-catalog-empty="true"][data-module="anatomy"] .workspace { display:none !important; }
body[data-module="lab"] #panel-anatomy > :not(.anatomy-grid) { display:none !important; }
body[data-module="lab"] #panel-anatomy { margin-bottom: 24px; }
.group-section-heading { position:relative; padding:28px 0 24px; }
.group-section-heading h2 { font-size:clamp(25px,3vw,36px); font-weight:500; letter-spacing:-.04em; margin:0 0 10px; }
.group-section-heading p { font-size:13px; color:var(--text-3); line-height:1.7; margin:0; }
.group-all-link { display:inline-flex; margin-top:16px; font-size:12px; color:var(--accent); text-underline-offset:5px; }
.subgroup-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
.subgroup-card { display:flex; flex-direction:column; border:1px solid var(--line); border-radius:20px; overflow:hidden; background:var(--surface); text-decoration:none; color:var(--text-primary); transition:transform .2s,border-color .2s; }
.subgroup-card:hover { transform:translateY(-3px); border-color:var(--accent); }
.subgroup-card-photo { position:relative; aspect-ratio:16/9; overflow:hidden; background:#dfe8d8; }
.subgroup-card-photo img { width:100%; height:100%; object-fit:cover; }
.subgroup-card-photo > span { position:absolute; left:18px; bottom:16px; background:#fffef5ed; border-radius:99px; padding:6px 12px; font-size:11px; color:#244734; }
.subgroup-card-copy { padding:22px; display:flex; flex:1; flex-direction:column; }
.subgroup-card h3 { font-size:21px; line-height:1.25; font-weight:500; letter-spacing:-.03em; margin:0 0 9px; }
.subgroup-card p { color:var(--text-3); font-size:12px; line-height:1.7; margin:0 0 22px; }
.subgroup-card-copy > span { display:flex; justify-content:space-between; margin-top:auto; font-size:12px; font-weight:600; }
.subgroup-card-copy b { font-size:20px; font-weight:400; }
.botanical-entry { grid-template-columns:1fr; }
.botanical-entry .subgroup-card { display:grid; grid-template-columns:1fr 1fr; background:#e6ecdf; }
.botanical-entry .subgroup-card-copy { justify-content:center; padding:36px; }
.botanical-entry .subgroup-card-copy > span { margin-top:20px; }
.catalog-breadcrumb { display:flex; align-items:center; flex-wrap:wrap; gap:9px; color:var(--text-3); font-size:11px; }
.catalog-breadcrumb a { text-decoration:none; color:inherit; min-height:40px; display:inline-flex; align-items:center; }
.catalog-breadcrumb a:hover { color:var(--accent); }
.subgroup-trail { display:flex; gap:8px; overflow-x:auto; padding:18px 0; }
.subgroup-trail a { flex-shrink:0; display:flex; gap:10px; align-items:center; border:1px solid var(--line); border-radius:99px; padding:10px 15px; font-size:12px; color:var(--text-2); text-decoration:none; background:var(--surface); }
.subgroup-trail a[aria-current="page"] { background:var(--accent); color:white; border-color:var(--accent); }
.subgroup-trail a span { font-size:10px; opacity:.7; }
.catalog-empty-message { display:none; padding:24px; background:#e8eee3; border-radius:14px; }
body[data-catalog-empty="true"] .catalog-empty-message { display:block; }
@media(max-width:1000px) { .subgroup-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 .species-subgroups { padding:0 18px; margin-bottom:28px; }
 .subgroup-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
 .botanical-entry .subgroup-card { display:flex; }
 .botanical-entry .subgroup-card-copy { padding:22px; }
 .subgroup-card h3 { font-size:23px; }
 .subgroup-trail { margin:0 -18px; padding:14px 18px; }
}
@media(prefers-reduced-motion:reduce) { .subgroup-card:hover { transform:none; } }

/* Give the aquarium workspace enough room to inspect individual leaves. */
.anatomy-grid:has(.aquarium-studio) { grid-template-columns:minmax(0,1fr); }
.anatomy-grid:has(.aquarium-studio) > .panel-card:not(.aquarium-studio) { display:none; }
.aquarium-studio .aquarium-viewport { height:clamp(400px,65vh,680px) !important; }
.aquarium-studio #explode-slider, .aquarium-studio label[for="explode-slider"],
.aquarium-studio #anatomy-layers-list, .aquarium-studio #sensor-summary-box,
.aquarium-studio #btn-trigger-3d-strike, .aquarium-studio #btn-toggle-3d-dissection { display:none !important; }
.aquarium-studio > .panel-header:has(+ #anatomy-layers-list) { display:none; }
@media(max-width:600px) { .aquarium-studio .aquarium-viewport { height:390px !important; } }

/* ==========================================================================
   MOBILE & TABLET NATIVE-FEEL APP SHELL (PWA + iPadOS / iOS / Android)
   ========================================================================== */
.fauna-app-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 980;
  background: rgba(246, 247, 243, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line-strong);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 -4px 20px rgba(20, 46, 35, 0.08);
}

.fauna-bnav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 2px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  transition: color 0.16s, background 0.16s;
}

.fauna-bnav-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fauna-bnav-item .bnav-ico {
  width: 20px;
  height: 20px;
}

.fauna-bnav-item.active {
  color: #183c30;
  background: #e1eed6;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .fauna-app-bottom-nav {
    display: grid;
  }
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }
}

/* Tablet (761px - 1040px) responsive ergonomics */
@media (max-width: 1040px) and (min-width: 761px) {
  .portal-universe-wrap, .biome-filter-bar, .species-bar, .workspace, .discovery-chapters, .discovery-page-heading, .species-subgroups {
    padding-left: 24px;
    padding-right: 24px;
  }
  .portal-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .species-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .hero-Main-photo-wrap {
    aspect-ratio: 16 / 9;
    max-height: 360px;
  }
  .kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 0;
  }
  .anatomy-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .discovery-story {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .story-image {
    height: 320px;
  }
  .discovery-story:nth-of-type(even) .story-image {
    order: 0;
  }
}

/* Collapse wide inline grids gracefully on tablets and phones */
@media (max-width: 920px) {
  .workspace [style*="grid-template-columns: repeat(4"],
  .workspace [style*="grid-template-columns:repeat(4"],
  .workspace [style*="grid-template-columns: repeat(3"],
  .workspace [style*="grid-template-columns:repeat(3"],
  .workspace [style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 780px) {
  .organic-stage-wrap {
    height: auto;
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .workspace [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .workspace .fauna-inf-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .organic-stage-wrap {
    height: auto;
    min-height: 350px;
  }
  .organic-stage-wrap.fauna-stage-fullscreen {
    height: 100dvh !important;
  }
  #fauna-infinite-lightbox-modal {
    padding: 0.65rem !important;
  }
  #fauna-infinite-lightbox-modal #lb-main-img {
    max-width: 100% !important;
    max-height: 66vh !important;
  }
  #fauna-infinite-lightbox-modal #btn-lb-prev,
  #fauna-infinite-lightbox-modal #btn-lb-next {
    padding: 0.42rem 0.62rem !important;
    font-size: 0.78rem !important;
    max-width: 42vw !important;
  }
}

/* 3D Fullscreen Toggle Button & Mode */
.btn-3d-mobile-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(16, 39, 31, 0.78);
  backdrop-filter: blur(10px);
  color: #e9f5d8;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.organic-stage-wrap.fauna-stage-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9990 !important;
  width: 100vw !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  border: 0 !important;
}

/* Fullscreen 3D Model / Aquarium Viewport Mode */
.btn-3d-hud-fullscreen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--ink-line, #45443f);
  background: var(--ink-2, #262624);
  color: var(--ink-text, #f0eee6);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-3d-hud-fullscreen:hover,
.btn-3d-hud-fullscreen.active {
  background: #315b41;
  border-color: #d8efa9;
  color: #ffffff;
}

.btn-3d-hud-fullscreen .ico {
  width: 14px;
  height: 14px;
  vertical-align: middle;
}

#three-canvas-panel.fauna-3d-panel-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9998 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  padding: max(8px, env(safe-area-inset-top, 8px)) 12px max(8px, env(safe-area-inset-bottom, 8px)) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  background: var(--surface, #ffffff) !important;
  box-sizing: border-box !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen > .panel-header:first-child {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 0 4px 0 !important;
  flex-shrink: 0 !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen > .panel-header:first-child .panel-title {
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen > .panel-header:first-child .panel-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen > .panel-header:first-child .btn {
  padding: 4px 9px !important;
  min-height: 28px !important;
  font-size: 0.74rem !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen #species-3d-glb-mode-bar {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  flex-shrink: 0 !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen #species-3d-glb-mode-bar::-webkit-scrollbar {
  display: none;
}

#three-canvas-panel.fauna-3d-panel-fullscreen #species-3d-glb-mode-bar > div {
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen #species-3d-glb-mode-bar .btn {
  white-space: nowrap !important;
  padding: 4px 8px !important;
  min-height: 26px !important;
  font-size: 0.72rem !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen #glb-archetype-badge {
  display: none !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen .aquarium-viewport {
  flex: 1 1 0% !important;
  height: 100% !important;
  min-height: 0 !important;
  width: 100% !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen #organ-legend,
#three-canvas-panel.fauna-3d-panel-fullscreen #anatomy-layers-list,
#three-canvas-panel.fauna-3d-panel-fullscreen #sensor-summary-box,
#three-canvas-panel.fauna-3d-panel-fullscreen > .panel-header:has(+ #anatomy-layers-list) {
  display: none !important;
}

#three-canvas-panel.fauna-3d-panel-fullscreen #aquarium-customizer-panel:not([hidden]) {
  max-height: 18vh;
  overflow-y: auto;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  #three-canvas-panel.fauna-3d-panel-fullscreen > .panel-header:first-child .panel-title {
    display: none !important;
  }

  #three-canvas-panel.fauna-3d-panel-fullscreen #species-3d-glb-mode-bar .btn {
    padding: 3px 7px !important;
    font-size: 0.68rem !important;
  }
}

body.fauna-3d-fullscreen-open {
  overflow: hidden !important;
}

body.fauna-3d-fullscreen-open .fauna-app-bottom-nav {
  display: none !important;
}

/* Bottom Sheet Module Launcher */
.fauna-app-module-sheet {
  position: fixed;
  inset: 0;
  z-index: 9950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.fauna-sheet-backdrop,
.fauna-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 28, 22, 0.55);
  backdrop-filter: blur(5px);
}

.fauna-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
  max-height: 85dvh;
  overflow-y: auto;
}

.fauna-sheet-handle {
  width: 44px;
  height: 5px;
  border-radius: 99px;
  background: var(--line-strong);
  margin: 0 auto 14px;
}

.fauna-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.fauna-sheet-header strong {
  font-size: 16px;
  display: block;
}

.fauna-sheet-header p {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.fauna-sheet-close-btn,
.fauna-modal-close {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
}

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

.fauna-sheet-mod-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.fauna-sheet-mod-btn.active {
  background: #183c30;
  color: #fff;
  border-color: #183c30;
}

.fauna-sheet-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.fauna-sheet-install-cta,
.fauna-pwa-direct-install-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 0;
  background: #244b36;
  color: #d8efa9;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* App Install & Device Simulator Modal */
.fauna-app-install-modal {
  position: fixed;
  inset: 0;
  z-index: 9980;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fauna-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(16, 39, 31, 0.28);
}

.fauna-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.fauna-modal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fauna-modal-brand img {
  border-radius: 12px;
  flex-shrink: 0;
}

.fauna-modal-brand h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
}

.fauna-modal-brand p {
  font-size: 12px;
  color: var(--text-2);
  margin: 0;
}

.fauna-pwa-direct-install-btn {
  margin-bottom: 16px;
}

.fauna-modal-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #e7efe1;
  border: 1px solid #c6d7bc;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.preview-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: #1c3a27;
}

.preview-bar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-mode-btn {
  border: 1px solid #b8ccb0;
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.preview-mode-btn.active {
  background: #183c30;
  color: #fff;
  border-color: #183c30;
}

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

.fauna-modal-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.fauna-modal-box h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #183c30;
}

.fauna-modal-box ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
}

.fauna-modal-qr-box p {
  font-size: 11px;
  color: var(--text-3);
  margin: 0 0 10px;
  line-height: 1.5;
}

.fauna-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.fauna-qr-wrap img {
  border-radius: 12px;
  border: 1px solid var(--line);
}

.fauna-qr-wrap code {
  font-size: 11px;
  font-weight: 700;
  color: #244b36;
}

@media (max-width: 780px) {
  .fauna-modal-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .fauna-modal-card {
    padding: 18px;
  }
}

/* Offline / Online Connectivity Toast */
.fauna-app-net-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #142e23;
  color: #d8efa9;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  z-index: 9995;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.fauna-app-net-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Live Phone & Tablet Viewport Simulator Frame (for instant testing on any screen) */
.fauna-viewport-sim-banner {
  position: sticky;
  top: 0;
  z-index: 9992;
  background: #142e23;
  color: #d8efa9;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}

.fauna-viewport-sim-banner button {
  border: 1px solid #d8efa966;
  background: #244b36;
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

html:has(body[data-viewport-simulate]) {
  background: #0e1f18;
}

body[data-viewport-simulate="tablet"],
body[data-viewport-simulate="phone"] {
  margin: 18px auto 90px !important;
  border: 8px solid #1f362c;
  border-radius: 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow-x: hidden;
  padding-bottom: 84px;
}

body[data-viewport-simulate="tablet"] {
  max-width: 820px !important;
}

body[data-viewport-simulate="phone"] {
  max-width: 396px !important;
}

body[data-viewport-simulate] .fauna-app-bottom-nav {
  display: grid !important;
  max-width: inherit;
  margin: 0 auto;
  border-radius: 0 0 24px 24px;
}

body[data-viewport-simulate="phone"] .header-inner {
  grid-template-columns: 1fr auto auto;
  grid-template-areas: 'brand appbtn atlas' 'search search lang' 'nav nav nav';
  gap: 0 8px;
}

body[data-viewport-simulate="phone"] .brand-subtitle,
body[data-viewport-simulate="phone"] #fauna-lang-switcher .fauna-lang-btn {
  display: none !important;
}

body[data-viewport-simulate="phone"] .portal-cards-grid,
body[data-viewport-simulate="phone"] .biome-pills,
body[data-viewport-simulate="phone"] .kpi-strip {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-viewport-simulate="phone"] .species-hero,
body[data-viewport-simulate="phone"] .anatomy-grid,
body[data-viewport-simulate="phone"] .discovery-story,
body[data-viewport-simulate="phone"] .subgroup-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

/* ==========================================================================
   KONUM TABANLI YAKINIMDAKİ BİTKİLER, ŞİFA & CANLILAR RADARI (v3.1)
   ========================================================================== */
body:not([data-page="home"]) .nearby-home-mobile-banner {
  display: none !important;
}

body[data-module="nearby-radar"] .biome-filter-bar,
body[data-module="nearby-radar"] .species-bar,
body[data-module="nearby-radar"] #species-hero,
body[data-module="nearby-radar"] #species-user-showcase-mount,
body[data-module="nearby-radar"] .species-subgroups,
body[data-module="agro-husbandry"] .biome-filter-bar,
body[data-module="agro-husbandry"] .species-bar,
body[data-module="agro-husbandry"] #species-hero,
body[data-module="agro-husbandry"] #species-user-showcase-mount,
body[data-module="agro-husbandry"] .species-subgroups,
body[data-module="aquarium-lab"] .biome-filter-bar,
body[data-module="aquarium-lab"] .species-bar,
body[data-module="aquarium-lab"] #species-hero,
body[data-module="aquarium-lab"] #species-user-showcase-mount,
body[data-module="aquarium-lab"] .species-subgroups,
body[data-module="community"] .biome-filter-bar,
body[data-module="community"] .species-bar,
body[data-module="community"] #species-hero,
body[data-module="community"] #species-user-showcase-mount,
body[data-module="community"] .species-subgroups {
  display: none !important;
}

.nearby-home-mobile-banner {
  max-width: 1480px;
  margin: 26px auto 0;
  padding: 0 40px;
}

.nearby-home-banner-inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  background: linear-gradient(135deg, #132e22 0%, #1d4633 60%, #24553d 100%);
  color: #f4f9f0;
  border-radius: 24px;
  padding: 30px 34px;
  border: 1px solid rgba(216, 239, 169, 0.28);
  box-shadow: 0 16px 40px rgba(16, 39, 31, 0.14);
}

.nearby-home-pill-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(216, 239, 169, 0.14);
  border: 1px solid rgba(216, 239, 169, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}

.nearby-live-pulse,
.nearby-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.25);
  display: inline-block;
}

.nearby-home-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #d8efa9;
}

.nearby-home-copy h2 {
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.nearby-home-copy h2 em {
  color: #d8efa9;
  font-style: normal;
}

.nearby-home-copy p {
  font-size: 13px;
  line-height: 1.65;
  color: #d7e6d4;
  margin: 0 0 18px;
}

.nearby-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nearby-cta-primary {
  border: 0;
  border-radius: 999px;
  background: #d8efa9;
  color: #142e23;
  font-size: 13px;
  font-weight: 700;
  padding: 13px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nearby-cta-primary:hover {
  background: #e6fac2;
}

.nearby-cta-secondary {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 11px 16px;
  cursor: pointer;
}

.nearby-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.nearby-home-mini-AILMENTS {
  background: rgba(14, 33, 25, 0.55);
  border: 1px solid rgba(216, 239, 169, 0.22);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.nearby-mini-title {
  font-size: 12px;
  font-weight: 700;
  color: #d8efa9;
}

.nearby-mini-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.nearby-mini-chip {
  border: 1px solid rgba(216, 239, 169, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f8ec;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.nearby-mini-chip:hover {
  background: #d8efa9;
  color: #142e23;
}

/* Ana Radar Paneli */
.nearby-radar-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.nearby-top-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.nearby-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.nearby-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.nearby-main-title {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}

.nearby-location-line {
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
}

.nearby-acc-pill {
  background: #e3f2d5;
  color: #1c4229;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.nearby-gps-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nearby-btn-gps-primary {
  border: 0;
  border-radius: 12px;
  background: #183c30;
  color: #d8efa9;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
}

.nearby-btn-gps-watch,
.nearby-btn-camera {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 11px 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nearby-btn-gps-watch.active {
  background: #dcfce7;
  border-color: #22c55e;
  color: #14532d;
}

.nearby-controls-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.nearby-radius-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.nearby-ctrl-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}

.nearby-radius-pill,
.nearby-subpill {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.nearby-radius-pill.active,
.nearby-subpill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.nearby-place-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.nearby-select {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  background: #fff;
  color: var(--text);
}

.nearby-custom-place-wrap {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}

.nearby-place-input {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
}

.nearby-place-btn {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}

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

.nearby-kpi-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nearby-kpi-card strong {
  font-size: 22px;
  font-weight: 700;
  color: #183c30;
}

.nearby-kpi-card span {
  font-size: 11px;
  color: var(--text-3);
}

/* Radar & Harita Alanı */
.nearby-visual-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
}

.nearby-radar-box,
.nearby-side-inspector {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nearby-box-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.nearby-box-head strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.nearby-box-head span {
  font-size: 11px;
  color: var(--text-3);
}

.nearby-map-toggle-btns {
  display: flex;
  gap: 6px;
}

.nearby-map-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.nearby-map-btn.active {
  background: #183c30;
  color: #fff;
  border-color: #183c30;
}

.nearby-canvas-wrap,
.nearby-osm-wrap {
  width: 100%;
  height: 310px;
  border-radius: 16px;
  overflow: hidden;
  background: #0b1d15;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nearby-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.nearby-osm-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

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

.nearby-ailment-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.nearby-ailment-btn:hover {
  border-color: var(--accent);
}

.nearby-ailment-btn.active {
  background: #183c30;
  color: #d8efa9;
  border-color: #183c30;
}

.nearby-pin-spotlight {
  background: #eef5e8;
  border: 1px solid #bcd4a8;
  border-radius: 14px;
  padding: 12px;
}

.nearby-pin-spotlight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #1c3a27;
  margin-bottom: 8px;
}

.nearby-pin-spotlight-head button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.nearby-pin-spotlight-body {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nearby-pin-spotlight-body img {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.nearby-pin-spotlight-body h4 {
  margin: 0;
  font-size: 14px;
}

.nearby-pin-spotlight-body em {
  font-size: 11px;
  color: var(--text-3);
}

.nearby-pin-spotlight-body p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-2);
}

/* Kamera Analiz Kutusu */
.nearby-camera-result-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  background: #eef6e8;
  border: 2px solid #2e6f4e;
  border-radius: 20px;
  padding: 18px;
}

.nearby-cam-photo-col img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
}

.nearby-cam-badge {
  background: #183c30;
  color: #d8efa9;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.nearby-cam-close {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

.nearby-cam-match-box {
  background: #fff;
  border: 1px solid #c6dabc;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}

/* Filtre ve Arama Çubuğu */
.nearby-filter-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nearby-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nearby-mode-tab {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.nearby-mode-tab.active {
  background: #183c30;
  border-color: #183c30;
  color: #fff;
}

.nearby-search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nearby-search-input {
  flex: 1;
  min-width: 240px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
}

.nearby-reset-btn {
  border: 1px solid #dc2626;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.nearby-animal-subfilters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

/* Tür Kartları Izgarası */
.nearby-section-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nearby-sec-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.nearby-section-header h3 {
  font-size: clamp(19px, 2.2vw, 24px);
  margin: 4px 0 0;
}

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

.nearby-species-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}

.nearby-species-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(20, 46, 35, 0.09);
}

.nearby-species-card.is-toxic-warn {
  border-color: #f59e0b;
}

.nearby-card-media {
  position: relative;
  height: 195px;
  background: #dfe8d8;
  overflow: hidden;
}

.nearby-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nearby-distance-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(16, 39, 31, 0.88);
  backdrop-filter: blur(8px);
  color: #d8efa9;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(216, 239, 169, 0.35);
}

.nearby-distance-badge.animal {
  color: #fde68a;
}

.nearby-kind-badge {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #183c30;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.nearby-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.nearby-card-title-row h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--text);
}

.nearby-sci {
  font-size: 12px;
  font-style: italic;
  color: var(--text-3);
}

.nearby-place-meta {
  font-size: 11px;
  color: var(--text-3);
}

.nearby-goodfor-box {
  background: #f0f7eb;
  border: 1px solid #cde2be;
  border-radius: 12px;
  padding: 10px 12px;
}

.nearby-box-label {
  font-size: 11px;
  font-weight: 700;
  color: #1d462f;
  margin-bottom: 6px;
}

.nearby-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.nearby-ailment-tag {
  background: #fff;
  border: 1px solid #b6d3a2;
  color: #183c30;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
}

.nearby-ailment-tag.warn {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.nearby-info-row {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
}

.nearby-info-row strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.nearby-info-row p {
  margin: 0;
}

.nearby-safety-note {
  font-size: 11px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text-2);
  margin-top: auto;
}

.nearby-safety-note.toxic {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-weight: 600;
}

.nearby-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.nearby-card-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nearby-card-btn.primary {
  background: #244b36;
  border-color: #244b36;
  color: #fff;
}

.nearby-loading-box,
.nearby-empty-card {
  background: #eef4ea;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

@media (max-width: 1080px) {
  .nearby-home-banner-inner,
  .nearby-visual-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .nearby-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nearby-home-mobile-banner {
    padding: 0 18px;
    margin-top: 18px;
  }
  .nearby-home-banner-inner {
    padding: 22px 18px;
    border-radius: 20px;
  }
  .nearby-top-card,
  .nearby-radar-box,
  .nearby-side-inspector,
  .nearby-filter-bar {
    padding: 16px;
  }
  .nearby-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nearby-ailment-grid,
  .nearby-cards-grid,
  .nearby-camera-result-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .nearby-cta-primary,
  .nearby-btn-gps-primary {
    width: 100%;
    justify-content: center;
  }
  .deep-dive-grid,
  .deep-dive-grid[data-count] {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   CLEAN & MINIMAL UI PROGRESSIVE DISCLOSURE (v46)
   ========================================================================== */

/* 1. Top Nav "Diğer Araçlar ▾" Dropdown */
.nav-more-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-more-tools > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-more-tools > summary::-webkit-details-marker {
  display: none;
}

.nav-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(16, 39, 31, 0.14);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 900;
}

.nav-more-menu .nav-tab {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 12px;
  min-height: 38px;
  border-radius: 9px;
  border-bottom: 0;
  font-size: 12px;
  color: var(--text);
}

.nav-more-menu .nav-tab:hover,
.nav-more-menu .nav-tab.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* 2. Hero Actions "Tüm Araçlar & Atlaslar ▾" Popover */
.hero-more-tools {
  position: relative;
  display: inline-block;
}

.hero-more-tools > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.hero-more-tools > summary::-webkit-details-marker {
  display: none;
}

.hero-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 310px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 39, 31, 0.16);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  z-index: 800;
}

.hero-more-menu .btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  font-size: 11.5px;
  padding: 8px 12px;
}

/* 3. Clean Atlas Library Accordions (#panel-anatomy) */
.clean-atlas-library {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clean-atlas-library-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 4px;
}

.clean-atlas-library-head h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  margin: 4px 0 0;
  color: var(--text);
}

.clean-atlas-library-head p {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
}

.clean-atlas-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}

.clean-atlas-quick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--line-strong);
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.clean-atlas-quick-card:hover {
  transform: translateY(-2px);
  border-color: #14532d;
  box-shadow: 0 8px 24px rgba(20, 83, 45, 0.1);
}

.clean-atlas-quick-card .quick-card-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}

.clean-atlas-quick-card strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.clean-atlas-quick-card > span:last-child {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}

.clean-atlas-drawer {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.clean-atlas-drawer:hover {
  border-color: var(--line-strong);
}

.clean-atlas-drawer[open] {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(24, 60, 48, 0.07);
}

.clean-atlas-drawer > summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fbfcfa;
  user-select: none;
}

.clean-atlas-drawer > summary::-webkit-details-marker {
  display: none;
}

.clean-atlas-drawer > summary::after {
  content: 'Aç +';
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.clean-atlas-drawer[open] > summary {
  background: #f2f7ef;
  border-bottom: 1px solid var(--line);
}

.clean-atlas-drawer[open] > summary::after {
  content: 'Kapat −';
  background: var(--accent);
  color: #ffffff;
}

html[lang="en"] .clean-atlas-drawer > summary::after { content: 'Open +'; }
html[lang="en"] .clean-atlas-drawer[open] > summary::after { content: 'Close −'; }
html[lang="de"] .clean-atlas-drawer > summary::after { content: 'Öffnen +'; }
html[lang="de"] .clean-atlas-drawer[open] > summary::after { content: 'Schließen −'; }
html[lang="es"] .clean-atlas-drawer > summary::after { content: 'Abrir +'; }
html[lang="es"] .clean-atlas-drawer[open] > summary::after { content: 'Cerrar −'; }
html[lang="fr"] .clean-atlas-drawer > summary::after { content: 'Ouvrir +'; }
html[lang="fr"] .clean-atlas-drawer[open] > summary::after { content: 'Fermer −'; }
html[lang="ar"] .clean-atlas-drawer > summary::after { content: 'فتح +'; }
html[lang="ar"] .clean-atlas-drawer[open] > summary::after { content: 'إغلاق −'; }
html[lang="ja"] .clean-atlas-drawer > summary::after { content: '開く +'; }
html[lang="ja"] .clean-atlas-drawer[open] > summary::after { content: '閉じる −'; }
html[lang="ru"] .clean-atlas-drawer > summary::after { content: 'Открыть +'; }
html[lang="ru"] .clean-atlas-drawer[open] > summary::after { content: 'Закрыть −'; }

.clean-atlas-drawer-body {
  padding: 16px;
}

/* 4. Nearby Radar Top Tools Drawer */
.nearby-more-tools-drawer {
  width: 100%;
  margin-top: 4px;
}

.nearby-more-tools-drawer > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
}

.nearby-more-tools-drawer > summary::-webkit-details-marker {
  display: none;
}

.nearby-more-tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* 5. Grouped Agri & Husbandry Hub Navigation */
.nearby-agri-clean-nav {
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nearby-agri-cat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dcfce7;
}

.nearby-agri-cat-pill {
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #14532d;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nearby-agri-cat-pill.active {
  background: #14532d;
  border-color: #14532d;
  color: #d8efa9;
}

.nearby-agri-jump-select {
  margin-left: auto;
  border: 1px solid #22c55e;
  background: #ffffff;
  color: #14532d;
  border-radius: 10px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
}

.nearby-agri-subtabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nearby-agri-subtab-btn {
  border: 1px solid #bbf7d0;
  background: #f8faf5;
  color: #166534;
  border-radius: 10px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.nearby-agri-subtab-btn.active {
  background: #15803d;
  border-color: #15803d;
  color: #ffffff;
  font-weight: 700;
}

/* 6. Clean Filter & Info Drawers */
.nearby-clean-info-drawer,
.nearby-more-ailments-drawer,
.nearby-advanced-filters-drawer,
.nearby-home-more-ailments {
  border: 1px solid var(--line);
  background: #f8faf6;
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 12px;
  color: var(--text-2);
}

.nearby-home-more-ailments {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(216, 239, 169, 0.25);
  color: #d8efa9;
  padding: 7px 11px;
}

.nearby-clean-info-drawer > summary,
.nearby-more-ailments-drawer > summary,
.nearby-advanced-filters-drawer > summary,
.nearby-home-more-ailments > summary {
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}

/* 7. Compact Card Details Accordion */
.nearby-card-details-drawer {
  border: 1px solid #d5e6c8;
  background: #f9fbf7;
  border-radius: 12px;
  padding: 8px 11px;
}

.nearby-card-details-drawer > summary {
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: #1d462f;
  user-select: none;
  list-style: none;
}

.nearby-card-details-drawer > summary::-webkit-details-marker {
  display: none;
}

.nearby-card-details-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #dfead7;
  display: flex;
  flex-direction: column;
  gap: 8px;
}



/* ==========================================================================
   v58 — BOTANICAL EDITORIAL STUDIO REDESIGN
   1. Home Landing Bento Grid (7 Discovery Worlds without 5,000px scroll)
   2. Light-Sage Home GPS Bio-Radar Ribbon (harmonious contrast with hero)
   3. 2-Column Specialist Drawers on Species Atlas Page
   4. 2-Column Sticky Studio Layout for 15 Agro & Husbandry Units
   5. Unified Botanical Form, Table & Card Polish
   ========================================================================== */

/* 1. Home Discovery Bento Grid */
.chapters-intro {
  padding: 52px 0 28px;
}

.discovery-bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 18px;
}

.discovery-bento-grid .discovery-story {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  border-radius: 22px;
  border: 1px solid rgba(24, 44, 34, 0.09);
  box-shadow: 0 4px 18px rgba(20, 46, 35, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.discovery-bento-grid .discovery-story:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(20, 46, 35, 0.11);
  border-color: rgba(24, 60, 48, 0.26);
}

.discovery-bento-grid .discovery-story.bento-featured {
  grid-column: span 3;
}

.discovery-bento-grid .discovery-story.bento-compact {
  grid-column: span 2;
}

.discovery-bento-grid .discovery-story:nth-of-type(even) .story-image {
  order: 0;
}

.discovery-bento-grid .story-image {
  height: 200px;
  min-height: 200px;
  flex-shrink: 0;
}

.discovery-bento-grid .bento-featured .story-image {
  height: 235px;
  min-height: 235px;
}

.discovery-bento-grid .story-image-index {
  font-size: 42px;
  bottom: 14px;
  right: 18px;
  font-weight: 500;
}

.discovery-bento-grid .story-copy {
  padding: 22px 24px 24px;
  flex: 1;
  justify-content: flex-start;
}

.discovery-bento-grid .story-kicker {
  margin-bottom: 12px;
  gap: 10px;
  font-size: 10px;
}

.discovery-bento-grid .story-kicker > span:first-child {
  padding: 4px 10px;
}

.discovery-bento-grid .story-copy h2 {
  font-size: clamp(20px, 1.85vw, 25px);
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.04em;
}

.discovery-bento-grid .bento-featured .story-copy h2 {
  font-size: clamp(23px, 2.2vw, 30px);
}

.discovery-bento-grid .story-copy p {
  font-size: 12.5px;
  line-height: 1.62;
  max-width: none;
  margin: 0;
}

.discovery-bento-grid .story-tags {
  margin: 14px 0 18px;
  gap: 6px 12px;
  font-size: 9.5px;
}

.discovery-bento-grid .story-open {
  margin-top: auto;
  gap: 14px;
  font-size: 12px;
  padding-bottom: 5px;
}

.discovery-bento-grid .story-open > span {
  font-size: 19px;
}

@media (max-width: 1080px) {
  .discovery-bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .discovery-bento-grid .discovery-story.bento-featured,
  .discovery-bento-grid .discovery-story.bento-compact {
    grid-column: span 1;
  }
  .discovery-bento-grid .discovery-story.bento-featured:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .discovery-bento-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .discovery-bento-grid .story-image,
  .discovery-bento-grid .bento-featured .story-image {
    height: 185px;
    min-height: 185px;
  }
  .discovery-bento-grid .story-copy {
    padding: 18px 20px 20px;
  }
}

/* 2. Harmonious Light-Sage GPS Bio-Radar Ribbon on Home Page */
.nearby-home-banner-inner {
  background: linear-gradient(135deg, #eff6ea 0%, #e4efe0 100%);
  color: #182c22;
  border: 1.5px solid #c2d7b6;
  box-shadow: 0 8px 26px rgba(24, 60, 48, 0.06);
  padding: 24px 28px;
  align-items: center;
}

.nearby-home-pill-row {
  background: #ffffff;
  border-color: #b7cfa9;
  margin-bottom: 10px;
}

.nearby-home-eyebrow {
  color: #166534;
}

.nearby-home-copy h2 {
  color: #182c22;
  font-size: clamp(20px, 2.2vw, 27px);
  margin-bottom: 8px;
}

.nearby-home-copy h2 em {
  color: #15803d;
  font-weight: 700;
}

.nearby-home-copy p {
  color: #3f5246;
  font-size: 12.5px;
  margin-bottom: 14px;
}

.nearby-cta-primary {
  background: #183c30;
  color: #f4f9f0;
  padding: 11px 18px;
  font-size: 12.5px;
}

.nearby-cta-primary:hover {
  background: #24553d;
}

.nearby-cta-secondary {
  background: #ffffff;
  color: #183c30;
  border: 1px solid #b5ccb0;
}

.nearby-cta-secondary:hover {
  background: #f5f9f2;
}

.nearby-home-mini-AILMENTS {
  background: #ffffff;
  border: 1px solid #cce0c0;
  padding: 16px;
}

.nearby-mini-title {
  color: #166534;
}

.nearby-mini-chip {
  background: #f4f8f0;
  border-color: #c5d9ba;
  color: #183c30;
}

.nearby-mini-chip:hover {
  background: #183c30;
  color: #f4f9f0;
  border-color: #183c30;
}

.nearby-home-more-ailments {
  background: #f4f8f0;
  border-color: #c5d9ba;
  color: #183c30;
}

/* 3. 2-Column Specialist Drawers on Species Atlas Page */
.clean-atlas-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.clean-atlas-library-head,
.clean-atlas-quick-grid,
.clean-atlas-drawer[open] {
  grid-column: 1 / -1;
}

@media (max-width: 820px) {
  .clean-atlas-library {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 4. 2-Column Botanical Studio Workspace for 15 Agro & Husbandry Units */
.agro-studio-layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.agro-studio-sidebar {
  position: sticky;
  top: 132px;
  max-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(24, 60, 48, 0.05);
}

.agro-sidebar-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.agro-sidebar-kicker {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #315b41;
  margin-bottom: 3px;
}

.agro-sidebar-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.agro-sidebar-search input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #f8faf6;
  color: var(--text);
  font-size: 12px;
}

.agro-sidebar-search input:focus {
  background: #ffffff;
  border-color: #183c30;
}

.agro-sidebar-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.agro-cat-chip {
  border: 1px solid var(--line);
  background: #f6f8f4;
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.agro-cat-chip:hover {
  background: #eaf1e4;
  color: var(--text);
}

.agro-cat-chip.is-active {
  background: #183c30;
  border-color: #183c30;
  color: #d8efa9;
}

.agro-sidebar-unit-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: #c5d4be transparent;
}

.agro-sidebar-unit-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}

.agro-sidebar-unit-btn:hover {
  background: #f2f7ee;
  border-color: #d5e2ce;
}

.agro-sidebar-unit-btn.is-active {
  background: #183c30;
  border-color: #183c30;
  color: #f4f9f0;
  box-shadow: 0 4px 12px rgba(24, 60, 48, 0.14);
}

.agro-unit-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  background: #eaf1e4;
  color: #183c30;
}

.agro-sidebar-unit-btn.is-active .agro-unit-num {
  background: #d8efa9;
  color: #142e23;
}

.agro-unit-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.agro-unit-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agro-unit-cat {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.agro-sidebar-unit-btn.is-active .agro-unit-cat {
  color: #c7dfbe;
}

.agro-sidebar-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
  background: #f8faf6;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
}

.agro-reset-link {
  margin-top: 6px;
  border: 0;
  background: none;
  color: #15803d;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* Right Studio Main Column */
.agro-studio-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.agro-stage-masthead {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 18px rgba(24, 60, 48, 0.04);
}

.agro-stage-masthead-copy {
  max-width: 680px;
}

.agro-stage-kicker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.agro-stage-pill {
  background: #183c30;
  color: #d8efa9;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}

.agro-stage-cat {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #315b41;
}

.agro-stage-title {
  margin: 0 0 6px;
  font-size: clamp(19px, 2.1vw, 25px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.22;
}

.agro-stage-summary {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
}

.agro-stage-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.agro-mobile-unit-select {
  display: none;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #f8faf6;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
}

.agro-stage-step-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agro-step-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #f8faf6;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}

.agro-step-btn:hover {
  background: #eaf1e4;
  border-color: #9ab390;
}

.agro-catalog-toggle-btn.is-open {
  background: #183c30;
  border-color: #183c30;
  color: #d8efa9;
}

/* Intra-Unit Sub-Section Jump Bar */
.agro-subnav-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #eef4ea;
  border: 1px solid #cde0c3;
  border-radius: 14px;
}

.agro-subnav-label {
  font-size: 11px;
  font-weight: 800;
  color: #183c30;
  white-space: nowrap;
}

.agro-subnav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agro-subnav-chip {
  border: 1px solid #bfd4b4;
  background: #ffffff;
  color: #1d422d;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.agro-subnav-chip:hover {
  background: #183c30;
  border-color: #183c30;
  color: #f4f9f0;
}

/* Optional 15-Unit Full Catalog Drawer */
.agro-catalog-drawer {
  background: #ffffff;
  border: 1.5px solid #183c30;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 12px 32px rgba(24, 60, 48, 0.08);
}

.agro-catalog-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.agro-catalog-drawer-head strong {
  font-size: 14px;
  color: var(--text);
}

.agro-catalog-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.agro-catalog-card {
  text-align: left;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfcfa;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.agro-catalog-card:hover {
  border-color: #183c30;
  background: #f3f8ef;
  transform: translateY(-2px);
}

.agro-catalog-card.is-active {
  border: 2px solid #183c30;
  background: #eef6e8;
}

.agro-catalog-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.agro-catalog-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #315b41;
}

.agro-catalog-state {
  font-size: 10.5px;
  font-weight: 800;
  color: #183c30;
}

.agro-catalog-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.agro-catalog-desc {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.45;
}

.agro-catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
}

.agro-catalog-tags span {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #d2e0cb;
  color: #1e422e;
}

/* Active Unit Stage & Botanical Form/Table Polish */
.agro-active-unit-stage {
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 4px 22px rgba(24, 60, 48, 0.04);
}

.agro-active-unit-stage > .agro-hub-pillar-pane > section:first-child {
  margin-top: 0 !important;
}

.agro-active-unit-stage input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.agro-active-unit-stage select,
.agro-active-unit-stage textarea {
  background-color: #ffffff;
  color: #182c22;
  border: 1px solid #b8cbb0;
  border-radius: 10px;
}

.agro-active-unit-stage table {
  border-collapse: collapse;
  width: 100%;
}

.agro-active-unit-stage th {
  background: #eef4ea;
  color: #182c22;
  font-weight: 700;
}

.agro-active-unit-stage td,
.agro-active-unit-stage th {
  border-color: #dce6d6;
}

/* Bottom Prev / Next Stepper Cards */
.agro-stage-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agro-footer-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.agro-footer-card.is-next {
  text-align: right;
  align-items: flex-end;
}

.agro-footer-card:hover {
  border-color: #183c30;
  background: #f3f8ef;
  transform: translateY(-2px);
}

.agro-footer-dir {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #315b41;
}

.agro-footer-card strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

/* Universal CSS Grid Anti-Overlap Guard across all 15 Agro Units & Workspace */
.workspace :where(div, section, article, aside, details, label, button, table) {
  min-width: 0;
}

.agro-active-unit-stage [style*="display:grid"],
.agro-active-unit-stage [style*="display: grid"] {
  min-width: 0;
}

.agro-active-unit-stage [style*="display:grid"] > *,
.agro-active-unit-stage [style*="display: grid"] > * {
  min-width: 0;
  max-width: 100%;
}

.agro-active-unit-stage {
  overflow-x: hidden;
}

@media (max-width: 1160px) {
  .agro-studio-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .agro-studio-sidebar {
    position: static;
    max-height: none;
    padding: 14px;
  }
  .agro-sidebar-unit-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    gap: 8px;
  }
  .agro-sidebar-unit-btn {
    width: auto;
    flex-shrink: 0;
    max-width: 240px;
    background: #f6f8f4;
    border-color: var(--line);
  }
  .agro-mobile-unit-select {
    display: block;
    width: 100%;
  }
  .agro-stage-controls {
    width: 100%;
    align-items: stretch;
  }
}

@media (max-width: 680px) {
  .agro-stage-masthead {
    padding: 16px;
  }
  .agro-active-unit-stage {
    padding: 12px;
    border-radius: 18px;
  }
  .agro-stage-footer-nav {
    grid-template-columns: minmax(0, 1fr);
  }
  .agro-footer-card.is-next {
    text-align: left;
    align-items: flex-start;
  }
}

/* ==========================================================================
   v60 — ZERO-FRICTION SIMPLIFICATION, SPOTLIGHT (⌘K) & SUB-TABS
   1. Pure Home Landing (Remove duplicate Home GPS banner)
   2. Active Intra-Unit Sub-Tab Chips inside 15 Agro Units
   3. Unified Biyomimikri & Lab Sub-Tab Bar (Lab / Simulation / Comparison)
   4. Unified Spotlight (⌘K) Omnibox Dropdown
   5. Context-Aware Quick Grid & Editorial Footer Tool Links
   ========================================================================== */

/* 1. Pure Home Landing: eliminate redundant Home GPS banner */
#nearby-home-mobile-banner {
  display: none !important;
}

/* 2. Intra-Unit Sub-Tabs inside Agro Studio */
.agro-stage-subnav {
  background: #f5f9f2;
  border: 1px solid #d5e4cc;
  border-radius: 14px;
  padding: 8px 10px;
}

.agro-subnav-chip {
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.agro-subnav-chip.is-active {
  background: #183c30 !important;
  border-color: #183c30 !important;
  color: #d8efa9 !important;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(24, 60, 48, 0.16);
}

/* 3. Unified Biyomimikri & Lab Sub-Tab Bar */
.fauna-lab-subtabs-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(24, 60, 48, 0.04);
}

.fauna-lab-subtab-btn {
  border: 1px solid var(--line);
  background: #f6f9f4;
  color: var(--text-2);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fauna-lab-subtab-btn:hover {
  background: #eaf2e4;
  color: #183c30;
  border-color: #b7ceb0;
}

.fauna-lab-subtab-btn.is-active {
  background: #183c30;
  border-color: #183c30;
  color: #d8efa9;
  box-shadow: 0 3px 10px rgba(24, 60, 48, 0.14);
}

/* 4. Unified Spotlight (⌘K) Omnibox */
.header-search-wrap {
  position: relative;
}

.spotlight-kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  margin-right: 4px;
  border-radius: 6px;
  border: 1px solid rgba(24, 60, 48, 0.18);
  background: #f3f7ef;
  color: #3f5848;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  flex-shrink: 0;
}

@media (max-width: 780px) {
  .spotlight-kbd-hint {
    display: none;
  }
}

.fauna-spotlight-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: min(540px, 92vw);
  max-height: min(72vh, 520px);
  overflow-y: auto;
  background: #ffffff;
  border: 1.5px solid #bfd3b5;
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(18, 42, 31, 0.18);
  padding: 10px;
  z-index: 1400;
}

.fauna-spotlight-dropdown[hidden] {
  display: none !important;
}

.spotlight-group + .spotlight-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e6eee1;
}

.spotlight-group-title {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #355e43;
  padding: 4px 10px 6px;
}

.spotlight-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #182c22;
  text-align: left;
  cursor: pointer;
  transition: background 0.13s ease, border-color 0.13s ease;
}

.spotlight-item:hover,
.spotlight-item:focus-visible {
  background: #f2f8ed;
  border-color: #cce0c1;
  outline: none;
}

.spotlight-item-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.spotlight-item-badge.agro {
  background: #183c30;
  color: #d8efa9;
}

.spotlight-item-badge.heal {
  background: #fff1e6;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.spotlight-item-badge.species {
  background: #e9f5ec;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.spotlight-item-badge.world {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.spotlight-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.spotlight-item-main strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #182c22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-item-main small {
  font-size: 11px;
  color: #526659;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-item-go {
  font-size: 11px;
  font-weight: 700;
  color: #1f5c3a;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 5. Context-Aware Quick Grid & Editorial Footer Tool Links */
.clean-atlas-quick-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
}

.footer-lab-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.footer-tool-link {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.footer-tool-link:hover {
  background: #183c30;
  border-color: #183c30;
  color: #d8efa9;
}
