/* Species template (species@1): additions to place.css and city.css. Same tokens, one font. */
.species .latin{margin:6px 0 0;font-size:var(--s-body)}
.species .hook{margin:10px 0 0;max-width:46ch;font-size:var(--s-body)}
.keyfacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px;margin:0 0 26px}
@media (min-width:760px){.keyfacts{grid-template-columns:repeat(4,minmax(0,1fr))}}
.keyfacts dt{font-size:var(--s-small);color:var(--muted)}
.keyfacts dd{margin:4px 0 0;font-weight:600;line-height:1.35}
.keyfacts dd a{font-weight:600}
.dyk{margin:0 0 26px;padding:18px 20px;border-radius:18px;background:var(--soft);max-width:66ch}
.dyk b{display:block;margin-bottom:6px}
/* diet by group */
.diet{display:flex;height:14px;border-radius:999px;overflow:hidden;margin:6px 0 12px;gap:2px}
.dietkey{list-style:none;margin:0 0 28px;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px;font-size:var(--s-small)}
.dietkey i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:0}
.g0{background:#2E2EFF}.g1{background:#3AE86F}.g2{background:#000}.g3{background:#8C8CFF}.g4{background:#9BEFB5}.g5{background:#777}.g6{background:#C7C7FF}
:root[data-theme="dark"] .g2{background:#fff}
/* food web: predators above, the species in the middle, what it eats below; lines drawn by species.js */
.web{position:relative;display:grid;gap:26px;margin:0 0 14px;padding:10px 0}
.web .links{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.web .links path{fill:none;stroke:var(--blue);stroke-width:1.4;opacity:.28;transition:opacity .2s,stroke-width .2s}
.web .links path.on{opacity:1;stroke-width:2.6}
.web h3{margin:0 0 12px;text-align:center;font-size:var(--s-small);font-weight:600;color:var(--muted)}
.ring ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:14px 10px}
.ring li{width:84px}
.ring a{display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;color:var(--black);font-size:12px;line-height:1.2;text-align:center}
.ring img,.ring .nopic{width:64px;height:64px;border-radius:50%;object-fit:cover;background:var(--soft);border:2px solid var(--white);box-shadow:0 0 0 1.5px var(--blue);transition:transform .2s}
.ring a:hover img,.ring a:focus-visible img,.ring a.on img{transform:scale(1.12)}
.me{display:flex;flex-direction:column;align-items:center;gap:8px;position:relative;z-index:1}
.me img{width:132px;height:132px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 3px var(--blue)}
@media (prefers-reduced-motion:no-preference){.ring li{animation:bob 6s ease-in-out infinite}.ring li:nth-child(2n){animation-delay:-2s}.ring li:nth-child(3n){animation-delay:-4s}}
@keyframes bob{50%{transform:translateY(-4px)}}
/* where: bars per country */
.bars{list-style:none;margin:18px 0;padding:0;display:grid;gap:8px}
.bars li{position:relative;display:flex;justify-content:space-between;gap:10px;padding:6px 10px;font-size:var(--s-small);z-index:0}
.bars .bar{position:absolute;inset:0 auto 0 0;background:var(--soft);border-radius:8px;z-index:-1}
.bars small{color:var(--muted)}
/* when: twelve bars */
.months12{display:grid;grid-template-columns:repeat(12,1fr);gap:6px;height:160px;align-items:end;margin:8px 0 6px}
.months12 div{display:flex;flex-direction:column;justify-content:flex-end;height:100%;align-items:center;gap:6px}
.months12 span{display:block;width:100%;background:var(--blue);border-radius:6px 6px 2px 2px;opacity:.35}
.months12 .now span{opacity:1}
.months12 small{font-size:11px;color:var(--muted)}
/* watch and listen */
.sounds{display:grid;gap:12px;margin:0 0 22px}
.sound{display:flex;align-items:center;gap:14px;margin:0}
.sound figcaption{display:flex;flex-direction:column}
.sound small{font-size:var(--s-small);color:var(--muted)}
.play{flex:0 0 auto;width:52px;height:52px;border-radius:50%;border:0;background:var(--blue);cursor:pointer;display:grid;place-items:center}
.play span{width:0;height:0;border-left:16px solid #fff;border-top:10px solid transparent;border-bottom:10px solid transparent;margin-left:4px}
.play.on span{width:14px;height:16px;border:0;border-left:5px solid #fff;border-right:5px solid #fff;margin:0}
.gallery figure{max-width:88vw}
.gallery figcaption{margin-top:8px;max-width:60ch}
.gallery video{display:block;height:min(54vw,440px);width:auto;max-width:88vw;border-radius:18px;background:#000}
dialog.full{border:0;padding:0;background:#000;max-width:100vw;max-height:100vh;width:100vw;height:100vh}
dialog.full img{width:100%;height:100%;object-fit:contain}
dialog.full [data-close]{position:fixed;top:16px;right:16px;color:#fff;border-color:#fff}
dialog.full::backdrop{background:#000}
.species details{border-top:1px solid var(--soft);padding:12px 0}
.species summary{cursor:pointer;font-weight:600}
.web .ring,.web .me{position:relative;z-index:1}.web .links{z-index:0}
/* ecosystem food web */
.ecoweb{display:grid;gap:18px;margin:6px 0 16px}
.ecoweb .net{width:100%;height:auto;overflow:visible}
.net .edges path{fill:none;stroke:var(--blue);stroke-width:1.6;opacity:.25}
.picked .net .edges path{opacity:.08}
.net .edges path.food{stroke:#3AE86F;opacity:1;stroke-width:3.2}
.net .edges path.eater{stroke:var(--blue);opacity:1;stroke-width:3.2}
.net .edges path.gone{opacity:.04;stroke-dasharray:4 6}
.net .n{cursor:pointer;outline:none}
.net .n .ring{fill:var(--white);stroke:var(--blue);stroke-width:2}
.net .n text{font:500 14px var(--body);fill:var(--black)}
.net .n.sel .ring{stroke-width:6}
.net .n.isfood .ring{stroke:#3AE86F;stroke-width:6}
.net .n.iseater .ring{stroke:var(--blue);stroke-width:6}
.net .n.gone{opacity:.18}
.net .n.starve .ring{stroke:var(--black);stroke-width:5;stroke-dasharray:6 5}
.net .n.short .ring{stroke:var(--black);stroke-width:3;stroke-dasharray:3 4}
.net .n:focus-visible .ring{stroke-width:7}
.ecoweb .panel{background:var(--soft);border-radius:18px;padding:16px 18px;font-size:var(--s-small);min-height:90px}
.ecoweb .panel b{display:block;font-size:var(--s-body)}
.ecoweb .panel i{display:block;margin-bottom:8px}
.ecoweb .panel p{margin:8px 0 0}
.ecoweb .panel .acts{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.ecoweb .panel .ghost{font-size:var(--s-small);padding:8px 14px}
.ecoweb .panel .result{font-weight:500}
.k-food,.k-eater{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;background:#3AE86F}.k-eater{background:var(--blue)}
.nearme{margin:18px 0 6px}.nearme p{margin:10px 0 0;max-width:62ch}
.chips li a{color:inherit;text-decoration:none}.chips li:has(a){background:var(--blue);color:var(--white)}
.home .find{margin-top:18px;width:100%;max-width:520px;font:inherit;font-size:var(--s-body);padding:14px 18px;border-radius:999px;border:1px solid var(--black);background:var(--white);color:var(--black)}
