:root{
  --bg:#f5f1e8;
  --paper:#fffef9;
  --ink:#123529;
  --muted:#65776d;
  --green:#229160;
  --green-dark:#123d31;
  --soft:#e5f6ea;
  --line:rgba(18,53,41,.12);
  --danger:#b42318;
  --warning:#b7791f;
  --shadow:0 26px 80px rgba(28,57,43,.15);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:var(--ink);background:radial-gradient(circle at 5% 5%,rgba(199,238,217,.85),transparent 28rem),radial-gradient(circle at 92% 18%,rgba(255,218,139,.55),transparent 31rem),var(--bg);min-height:100vh}
a{color:inherit}img{max-width:100%;display:block}button,input,textarea,select{font:inherit}main{min-height:72vh}.site-header{position:sticky;top:0;z-index:60;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px clamp(18px,3.6vw,54px);background:rgba(250,249,242,.82);backdrop-filter:blur(18px);border-bottom:1px solid rgba(18,53,41,.10)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:245px}.brand-mark{width:44px;height:44px;border-radius:16px;background:linear-gradient(140deg,var(--green),#19855d);display:grid;place-items:center;color:#fff;font-weight:900;font-size:1.1rem;box-shadow:0 12px 30px rgba(34,145,96,.20)}.brand-text{display:grid;line-height:1.15}.brand-text strong{font-size:1rem}.brand-text small{font-size:.82rem;color:var(--muted);margin-top:2px}.main-nav{display:flex;align-items:center;justify-content:center;gap:6px;margin-left:auto}.main-nav a{text-decoration:none;color:#5e7168;font-weight:800;padding:13px 18px;border-radius:999px;transition:.2s ease}.main-nav a:hover,.main-nav a.active{background:var(--soft);color:var(--ink)}.nav-actions{display:flex;align-items:center;gap:10px}.language-select{height:48px;min-width:78px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--ink);padding:0 18px}.theme-toggle{width:58px;height:48px;border-radius:999px;border:1px solid var(--line);background:#fff;color:#75a813;cursor:pointer}.login-pill,.button,button{border:0;border-radius:999px;background:var(--green);color:#fff;padding:13px 19px;font-weight:900;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;box-shadow:0 12px 30px rgba(34,145,96,.20);transition:.2s ease}.login-pill:hover,.button:hover,button:hover{transform:translateY(-1px);background:#16794e}.ghost{background:#fff;color:var(--ink);border:1px solid var(--line);box-shadow:none}.ghost:hover{background:#f7fbf5;color:var(--ink)}.danger-btn{background:var(--danger)}.danger-btn:hover{background:#8b1d14}.eyebrow{font-weight:950;letter-spacing:.18em;text-transform:uppercase;color:#108158;font-size:.78rem}.flash{width:min(1120px,92vw);margin:18px auto 0;padding:15px 18px;border-radius:20px;font-weight:800}.flash.success{background:#dcfce7;color:#14532d}.flash.error,.flash.danger{background:#fee2e2;color:#7f1d1d}.flash.warning{background:#fef3c7;color:#713f12}.home-hero{padding:82px clamp(22px,5vw,70px) 45px;display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:46px;align-items:center}.hero-copy h1,.explore-hero h1,.input-hero h1,.dashboard-head h1{font-size:clamp(3rem,7vw,6.25rem);line-height:.95;letter-spacing:-.075em;margin:14px 0 22px}.hero-copy p,.explore-hero p,.input-hero p,.dashboard-head p{font-size:1.08rem;line-height:1.75;color:var(--muted);max-width:760px}.hero-search{margin-top:32px;display:flex;gap:12px;max-width:750px;padding:10px;border:1px solid var(--line);background:rgba(255,255,255,.70);border-radius:26px;box-shadow:0 20px 60px rgba(28,57,43,.08)}.hero-search input{border:0;background:transparent;outline:0;padding:0 16px;flex:1;color:var(--ink)}.hero-stat{min-height:315px;border-radius:44px;background:linear-gradient(145deg,#124032,#1c8b60 58%,#d0eba7);color:#fff;display:flex;flex-direction:column;justify-content:flex-end;padding:34px;box-shadow:var(--shadow);animation:floaty 5s ease-in-out infinite}.hero-stat strong{font-size:6rem;line-height:.85;letter-spacing:-.08em}.hero-stat span{font-weight:800;color:rgba(255,255,255,.86)}@keyframes floaty{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-12px) rotate(1deg)}}.photo-exhibit,.explore-wrap{padding:18px clamp(18px,4vw,44px) 80px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:22px;margin-bottom:22px}.section-heading h2{font-size:2.3rem;letter-spacing:-.05em;margin:0}.photo-only-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px}.photo-only-card{height:285px;border-radius:30px;overflow:hidden;background:#fff;cursor:pointer;box-shadow:0 16px 44px rgba(21,50,38,.12);transition:.25s ease}.photo-only-card:nth-child(4n+2){transform:translateY(24px)}.photo-only-card:nth-child(4n+3){height:350px}.photo-only-card:hover,.photo-only-card:focus{transform:translateY(-8px) scale(1.015);box-shadow:0 28px 74px rgba(21,50,38,.22)}.photo-only-card img{width:100%;height:100%;object-fit:cover;transition:.45s ease}.photo-only-card:hover img{transform:scale(1.08)}.explore-hero{padding:72px clamp(22px,4vw,44px) 28px}.explore-hero h1{font-size:clamp(3rem,6.5vw,5.3rem);max-width:1000px}.explore-filter{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:12px;padding:14px;background:rgba(255,255,255,.72);border:1px solid var(--line);border-radius:26px;box-shadow:0 18px 55px rgba(28,57,43,.09);margin-bottom:28px}.explore-filter input,.explore-filter select{width:100%;border:1px solid var(--line);background:#fff;border-radius:18px;padding:15px 16px;outline:none;color:var(--ink)}.explore-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.explore-card{border-radius:26px;overflow:hidden;background:rgba(255,255,255,.86);border:1px solid rgba(18,53,41,.08);box-shadow:0 15px 45px rgba(28,57,43,.11);cursor:pointer;transition:.23s ease}.explore-card:hover,.explore-card:focus{transform:translateY(-7px);box-shadow:0 28px 70px rgba(28,57,43,.20)}.explore-img{height:230px;background:#fff;overflow:hidden}.explore-img img{width:100%;height:100%;object-fit:cover;transition:.38s ease}.explore-card:hover .explore-img img{transform:scale(1.05)}.explore-card-body{padding:20px}.status-badge{display:inline-flex;align-items:center;border-radius:999px;background:#dff7e6;color:#128157;font-size:.78rem;font-weight:950;padding:7px 11px}.status-badge.neutral{background:#eef4ef;color:#4f665b}.explore-card-body h3{font-size:1.35rem;margin:13px 0 3px;letter-spacing:-.035em}.explore-card-body em{color:#51675d}.explore-card-body p{color:var(--muted);margin:10px 0 0}.preview-modal{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;background:rgba(9,26,20,.60);backdrop-filter:blur(10px);padding:22px}.preview-modal.show{display:flex}.preview-card{position:relative;width:min(960px,94vw);display:grid;grid-template-columns:1fr 1fr;overflow:hidden;border-radius:36px;background:var(--paper);box-shadow:0 44px 140px rgba(0,0,0,.34);animation:pop .24s ease}.preview-card>img{width:100%;height:535px;object-fit:cover}.preview-content{padding:44px;display:flex;flex-direction:column;justify-content:center}.preview-content h2{font-size:clamp(2.2rem,4vw,3.6rem);line-height:.95;letter-spacing:-.06em;margin:12px 0 7px}.preview-content em{font-size:1.12rem;color:var(--muted)}.preview-content p{line-height:1.75;color:var(--muted)}.modal-close{position:absolute;top:18px;right:18px;width:42px;height:42px;border-radius:50%;padding:0;background:rgba(255,255,255,.90);color:var(--ink);font-size:1.5rem;box-shadow:none}.auth-page{display:grid;place-items:center;padding:70px 18px}.auth-card,.panel,.form-card{width:min(1120px,92vw);margin:24px auto;background:rgba(255,255,255,.76);border:1px solid rgba(18,53,41,.08);border-radius:30px;box-shadow:0 18px 60px rgba(28,57,43,.10);padding:30px}.auth-card{max-width:500px}.auth-card h1,.panel h2,.form-card h2{font-size:2.4rem;letter-spacing:-.05em;margin:5px 0 22px}.auth-card label,.post-form label,.panel label{display:grid;gap:8px;font-weight:850;color:#596c62}.auth-card input,.post-form input,.post-form textarea,.post-form select,.panel input,.panel textarea,.panel select{width:100%;border:1px solid var(--line);border-radius:17px;background:#fff;padding:14px 15px;outline:0;color:var(--ink)}.auth-card input:focus,.post-form input:focus,.post-form textarea:focus,.post-form select:focus,.panel input:focus,.panel textarea:focus{border-color:rgba(34,145,96,.55);box-shadow:0 0 0 4px rgba(34,145,96,.13)}.button.full{width:100%;margin-top:12px}.dashboard-head{width:min(1120px,92vw);margin:52px auto 12px;display:flex;align-items:center;justify-content:space-between;gap:28px}.dashboard-head h1{font-size:clamp(2.5rem,5vw,4.5rem)}.warning{background:#fff7db;color:#5f4206}.danger{background:#fff1f1;color:#7f1d1d}.security-forms{display:grid;grid-template-columns:1fr 1fr;gap:18px}.security-forms form{display:grid;gap:12px}.table-wrap{overflow:auto}table{width:100%;border-collapse:separate;border-spacing:0}th,td{padding:15px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{font-size:.78rem;color:var(--muted);letter-spacing:.11em;text-transform:uppercase}.table-post{display:flex;align-items:center;gap:12px}.table-post img{width:72px;height:56px;border-radius:14px;object-fit:cover;background:#fff}.mini-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.mini-form input,.mini-form select{min-width:160px;padding:10px 12px}.review-form{display:grid;gap:10px;min-width:280px}.action-stack{display:grid;gap:8px}.input-hero{padding:74px clamp(22px,5vw,64px) 18px}.input-hero h1{font-size:clamp(3.4rem,7vw,5.6rem)}.post-form{padding-bottom:70px}.form-card{padding:28px}.form-card h2{font-size:2.4rem;margin-bottom:12px}.form-help{margin-top:0;color:var(--muted);line-height:1.7}.form-grid{display:grid;gap:16px}.form-grid.two{grid-template-columns:1fr 1fr}.form-card textarea{resize:vertical}.autocomplete-wrap{position:relative}.autocomplete-list{position:absolute;left:0;right:0;top:calc(100% - 3px);z-index:25;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 20px 46px rgba(28,57,43,.16);overflow:hidden;display:none}.autocomplete-list.show{display:block}.autocomplete-list button{display:block;width:100%;border-radius:0;background:#fff;color:var(--ink);box-shadow:none;text-align:left;padding:12px 14px}.autocomplete-list button:hover{background:#e9f8ef;transform:none}.photo-upload-list{display:grid;gap:12px}.photo-upload-row{display:grid;grid-template-columns:minmax(220px,.9fr) minmax(220px,1fr) 48px;gap:12px;align-items:end;padding:14px;border:1px solid rgba(18,53,41,.10);border-radius:22px;background:rgba(255,255,255,.74)}.photo-upload-row input[type=file]{padding:12px;background:#fff}.remove-row,.remove-location{width:44px;height:44px;border-radius:16px;padding:0;background:#fff;color:var(--danger);border:1px solid rgba(180,35,24,.16);box-shadow:none;font-size:1.35rem}.remove-row:hover,.remove-location:hover{background:#fee2e2;color:#7f1d1d;transform:none}.add-btn{margin-top:16px}.location-row{display:grid;grid-template-columns:1.1fr .85fr .85fr .85fr 1.1fr 48px;gap:10px;align-items:center;margin-bottom:10px}.form-actions{width:min(1120px,92vw);margin:0 auto;display:flex;gap:12px}.post-page{padding:36px clamp(18px,5vw,70px) 78px}.gallery{position:relative;border-radius:38px;overflow:hidden;background:#111;box-shadow:var(--shadow);margin-bottom:32px}.gallery-main{width:100%;height:min(72vh,680px);object-fit:cover}.gallery-nav{position:absolute;top:45%;transform:translateY(-50%);z-index:2;width:54px;height:54px;border-radius:50%;font-size:2.2rem;background:rgba(255,255,255,.78);color:var(--ink);padding:0;box-shadow:none}.gallery-nav.prev{left:18px}.gallery-nav.next{right:18px}.thumbs{position:absolute;left:24px;right:24px;bottom:24px;display:flex;gap:12px;overflow:auto;padding:8px;border-radius:22px;background:rgba(255,255,255,.38);backdrop-filter:blur(12px)}.thumb{flex:0 0 96px;height:70px;border:2px solid transparent;padding:0;border-radius:16px;overflow:hidden;background:transparent;box-shadow:none}.thumb.active{border-color:white}.thumb img{width:100%;height:100%;object-fit:cover}.post-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:28px}.article-body,.taxonomy-card,.map-section{background:rgba(255,255,255,.76);border:1px solid rgba(18,53,41,.08);border-radius:32px;padding:30px;box-shadow:0 16px 50px rgba(28,57,43,.09)}.article-body h1{font-size:clamp(2.4rem,5vw,5rem);line-height:.95;letter-spacing:-.07em;margin:0}.scientific{font-size:1.25rem;color:var(--muted)}.lead{font-size:1.17rem;line-height:1.8}.rich-text{line-height:1.88;color:#30463b}.taxonomy-card{position:sticky;top:96px;align-self:start}.taxonomy-card h3{font-size:1.6rem;margin-top:0}.taxonomy-card div{display:flex;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid var(--line)}.taxonomy-card span{color:var(--muted)}.taxonomy-card strong{text-align:right}.map-section{margin-top:28px}.map{height:440px;border-radius:24px;overflow:hidden}.empty{width:min(1120px,92vw);margin:18px auto;color:var(--muted);font-weight:700}.footer{text-align:center;color:var(--muted);padding:38px 18px}.reveal{opacity:0;transform:translateY(18px);animation:rise .58s ease forwards}.reveal:nth-child(2){animation-delay:.06s}.reveal:nth-child(3){animation-delay:.12s}.reveal:nth-child(4){animation-delay:.18s}@keyframes rise{to{opacity:1;transform:translateY(0)}}@keyframes pop{from{opacity:0;transform:translateY(18px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}body.dark{--bg:#111815;--paper:#17221d;--ink:#effaf2;--muted:#b5c7bd;--line:rgba(255,255,255,.11);background:radial-gradient(circle at 5% 5%,rgba(34,145,96,.28),transparent 28rem),#101815}.dark .site-header{background:rgba(20,29,25,.84)}.dark .auth-card,.dark .panel,.dark .form-card,.dark .article-body,.dark .taxonomy-card,.dark .map-section,.dark .explore-card,.dark .explore-filter{background:rgba(22,31,27,.82)}.dark input,.dark textarea,.dark select{background:#101815!important;color:var(--ink)!important}.dark .ghost,.dark .language-select,.dark .theme-toggle{background:#151f1b;color:var(--ink)}
@media(max-width:960px){.site-header{flex-wrap:wrap}.brand{min-width:auto}.main-nav{order:3;width:100%;justify-content:flex-start;overflow:auto}.home-hero{grid-template-columns:1fr}.photo-only-grid{grid-template-columns:repeat(2,1fr)}.explore-grid{grid-template-columns:repeat(2,1fr)}.preview-card,.post-layout{grid-template-columns:1fr}.preview-card>img{height:330px}.form-grid.two,.security-forms,.location-row{grid-template-columns:1fr}.photo-upload-row{grid-template-columns:1fr}.remove-row,.remove-location{width:100%}.taxonomy-card{position:static}.dashboard-head{flex-direction:column;align-items:flex-start}.form-actions{flex-wrap:wrap}.explore-filter{grid-template-columns:1fr}}@media(max-width:560px){.nav-actions{width:100%;justify-content:space-between}.language-select{min-width:74px}.home-hero,.explore-hero,.input-hero{padding-top:48px}.hero-copy h1,.explore-hero h1,.input-hero h1{font-size:2.85rem}.hero-search{flex-direction:column}.photo-only-grid,.explore-grid{grid-template-columns:1fr}.photo-only-card:nth-child(n){height:290px;transform:none}.explore-img{height:240px}.preview-content{padding:28px}.gallery-main{height:430px}.thumb{flex-basis:75px;height:58px}}
.hero-stats{display:grid;gap:14px}.hero-stats .hero-stat{min-height:0;border-radius:28px;padding:24px;animation:none}.hero-stats .hero-stat strong{font-size:clamp(3rem,5vw,4.6rem)}.hero-stats .hero-stat span{text-transform:uppercase;letter-spacing:.08em;font-size:.78rem}.about-strip{width:min(1120px,92vw);margin:0 auto 30px;padding:30px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.about-strip h2{font-size:clamp(2rem,4vw,3.2rem);line-height:1;letter-spacing:-.05em;margin:10px 0 12px}.about-strip p:not(.eyebrow){max-width:820px;color:var(--muted);line-height:1.75;font-size:1.05rem}@media(max-width:960px){.hero-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.hero-stats .hero-stat{padding:20px}}@media(max-width:560px){.hero-stats{grid-template-columns:1fr}.about-strip{padding:24px 0}}
.about-hero h1{max-width:1120px}.about-page{width:min(1120px,92vw);margin:0 auto 80px}.about-lead,.about-panel{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:30px 0}.about-lead h2,.about-panel h2{font-size:clamp(2rem,4vw,3.4rem);line-height:1;letter-spacing:-.05em;margin:10px 0 12px}.about-lead p:not(.eyebrow),.about-panel p:not(.eyebrow),.about-grid p{color:var(--muted);line-height:1.75}.about-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:26px 0}.about-grid article{background:rgba(255,255,255,.76);border:1px solid rgba(18,53,41,.08);border-radius:24px;padding:24px;box-shadow:0 12px 36px rgba(28,57,43,.08)}.about-grid span{display:inline-flex;margin-bottom:18px;color:#108158;font-weight:950;letter-spacing:.14em}.about-grid h3{font-size:1.3rem;margin:0 0 10px;letter-spacing:-.025em}.dark .about-grid article{background:rgba(22,31,27,.82)}@media(max-width:960px){.about-grid{grid-template-columns:1fr}}
.taxonomy-strip{margin:22px 0;padding:14px 16px;border:1px solid var(--line);border-radius:18px;color:var(--muted);font-weight:800}.article-body h2,.record-section h2{font-size:clamp(1.8rem,3vw,2.6rem);letter-spacing:-.04em;margin:28px 0 12px}.record-card,.record-section{background:rgba(255,255,255,.76);border:1px solid rgba(18,53,41,.08);border-radius:32px;padding:30px;box-shadow:0 16px 50px rgba(28,57,43,.09)}.record-card{position:sticky;top:96px;align-self:start}.record-card h3{font-size:1.6rem;margin-top:0}.record-card div,.record-grid div{display:grid;gap:6px;padding:13px 0;border-bottom:1px solid var(--line)}.record-card span,.record-grid span{color:var(--muted);font-weight:850}.record-card strong,.record-grid strong{color:var(--ink)}.record-section{width:min(1120px,92vw);margin:28px auto 0}.record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.record-grid div{border:1px solid var(--line);border-radius:18px;padding:18px;background:rgba(255,255,255,.48)}.dark .record-card,.dark .record-section{background:rgba(22,31,27,.82)}@media(max-width:960px){.record-card{position:static}.record-grid{grid-template-columns:1fr}}

.solid-map-point { background: transparent; border: none; }
.solid-map-point span {
  display:block;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#d62828;
  border:2px solid #fff;
  box-shadow:0 1px 4px rgba(0,0,0,.45);
}
.excel-upload { display:block; margin-top:12px; }

/* Advanced Account Dashboard */
.dashboard-shell{width:min(1400px,94vw);margin:40px auto;display:grid;grid-template-columns:280px 1fr;gap:28px}.dashboard-side{background:rgba(255,255,255,.82);border:1px solid var(--line);border-radius:30px;padding:24px;height:max-content;position:sticky;top:100px}.profile-card{text-align:center}.avatar{width:82px;height:82px;border-radius:50%;display:grid;place-items:center;margin:auto;background:#138157;color:white;font-size:2rem;font-weight:900}.profile-card h3{margin:16px 0 4px}.profile-card p{color:var(--muted);font-size:.9rem;word-break:break-word}.dashboard-side nav{display:grid;gap:8px;margin-top:25px}.dashboard-side nav a{padding:12px 15px;border-radius:14px;background:transparent}.dashboard-side nav a.active{background:#e5f5ec;color:#087447;font-weight:800}.compact{width:100%;margin:0 0 20px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px}.stat-card{background:white;border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:0 12px 35px rgba(0,0,0,.06)}.stat-card span{display:block;color:var(--muted);font-weight:700}.stat-card strong{font-size:2.5rem}.stat-card.success strong{color:#138157}.stat-card.warning strong{color:#b7791f}.stat-card.danger strong{color:#c0392b}.section-title{display:flex;justify-content:space-between;align-items:center}.species-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.species-card{display:grid;grid-template-columns:120px 1fr;gap:18px;background:rgba(255,255,255,.8);border:1px solid var(--line);padding:16px;border-radius:24px}.species-card img{width:120px;height:120px;object-fit:cover;border-radius:18px}.species-card h3{margin:10px 0 5px}.species-card p{color:var(--muted)}
@media(max-width:900px){.dashboard-shell{grid-template-columns:1fr}.dashboard-side{position:static}.stats-grid{grid-template-columns:repeat(2,1fr)}.species-grid{grid-template-columns:1fr}}
@media(max-width:520px){.stats-grid{grid-template-columns:1fr}.species-card{grid-template-columns:1fr}.species-card img{width:100%;height:200px}}

/* Mobile hardening: keep detail pages and action buttons inside the viewport. */
html,body{max-width:100%;overflow-x:hidden}
.post-layout,.article-body,.record-card,.record-section,.map-section,.gallery,.dashboard-shell,.panel,.form-card{min-width:0}
.button,.login-pill,button{max-width:100%;white-space:normal;text-align:center}

@media(max-width:640px){
  .site-header{display:grid;grid-template-columns:1fr auto;gap:10px;padding:10px 12px}
  .brand{min-width:0}
  .brand-text small{display:none}
  .main-nav{order:3;grid-column:1/-1;width:100%;margin-left:0;justify-content:flex-start;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .main-nav::-webkit-scrollbar{display:none}
  .main-nav a{flex:0 0 auto;padding:10px 13px;font-size:.9rem}
  .nav-actions{justify-content:flex-end;gap:8px}
  .language-select{display:none}
  .theme-toggle{width:44px;height:42px}
  .login-pill{min-height:42px;padding:10px 14px}
  .post-page{padding:0 0 48px}
  .gallery{border-radius:0;margin-bottom:18px}
  .gallery-main{height:min(52vh,390px)}
  .gallery-nav{width:42px;height:42px;font-size:1.7rem}
  .gallery-nav.prev{left:8px}
  .gallery-nav.next{right:8px}
  .thumbs{left:10px;right:10px;bottom:10px;gap:8px}
  .thumb{flex-basis:64px;height:50px;border-radius:12px}
  .post-layout{display:grid;grid-template-columns:1fr;gap:16px;width:calc(100vw - 24px);margin:0 auto}
  .article-body,.record-card,.record-section,.map-section{width:calc(100vw - 24px);margin-left:auto;margin-right:auto;border-radius:22px;padding:22px}
  .article-body h1{font-size:clamp(2rem,11vw,3.15rem);letter-spacing:-.045em;overflow-wrap:anywhere}
  .scientific,.lead,.rich-text{overflow-wrap:anywhere}
  .lead{font-size:1.02rem}
  .rich-text{line-height:1.78}
  .taxonomy-strip{font-size:.88rem;overflow-wrap:anywhere}
  .record-card{position:static}
  .record-card div,.record-grid div{overflow-wrap:anywhere}
  .record-grid{grid-template-columns:1fr}
  .map{height:320px}
  .mini-form{display:grid;grid-template-columns:1fr;gap:10px}
  .mini-form .button,.mini-form button,.mini-form a{width:100%}
  .form-actions{width:calc(100vw - 24px);display:grid;grid-template-columns:1fr}
}

@media(max-width:640px){
  .preview-modal{align-items:flex-start;justify-content:center;padding:12px;overflow-y:auto}
  .preview-card{width:min(100%,430px);max-height:calc(100dvh - 24px);display:flex;flex-direction:column;border-radius:0;overflow-y:auto}
  .preview-card>img{width:100%;height:150px;flex:0 0 auto;object-fit:cover}
  .preview-content{display:block;padding:28px 28px 24px}
  .preview-content h2{font-size:clamp(2rem,10vw,2.7rem);line-height:1;letter-spacing:-.045em;margin:14px 0 8px;overflow-wrap:anywhere}
  .preview-content em{display:block;font-size:1.05rem;margin-bottom:16px}
  .preview-content p:not(.eyebrow){display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;line-height:1.6;margin-bottom:18px}
  .preview-content .button{position:sticky;bottom:0;width:100%;min-height:48px;margin-top:8px}
  .modal-close{top:8px;right:8px;width:40px;height:40px;z-index:2}
}

@media(max-width:380px){
  .preview-card>img{height:125px}
  .preview-content{padding:24px 22px 20px}
  .preview-content p:not(.eyebrow){-webkit-line-clamp:6}
}

/* =========================================================
   Dashboard responsive refinement
   Desktop: fixed sidebar + fluid content
   Mobile: stacked layout, touch-friendly controls
   ========================================================= */
.dashboard-shell{
  width:min(1440px,calc(100% - 40px));
  margin:32px auto 56px;
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:24px;
  align-items:start;
}
.dashboard-content{min-width:0;width:100%}
.dashboard-side{
  width:100%;
  padding:22px;
  border-radius:24px;
  background:rgba(255,255,255,.84);
  border:1px solid var(--line);
  box-shadow:0 14px 38px rgba(28,57,43,.08);
  position:sticky;
  top:88px;
  overflow:hidden;
}
.dashboard-side .profile-card{padding:4px 0 18px;border-bottom:1px solid var(--line)}
.dashboard-side .avatar{width:72px;height:72px;font-size:1.75rem;box-shadow:0 10px 24px rgba(19,129,87,.18)}
.dashboard-side .profile-card h3{margin:14px 0 5px;font-size:1.05rem;overflow-wrap:anywhere}
.dashboard-side .profile-card p{margin:0 0 12px;font-size:.84rem;line-height:1.5;overflow-wrap:anywhere}
.dashboard-side nav{display:grid;gap:6px;margin-top:16px}
.dashboard-side nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:11px 14px;
  border-radius:13px;
  text-decoration:none;
  color:var(--muted);
  font-weight:800;
  transition:.18s ease;
}
.dashboard-side nav a:hover{background:rgba(34,145,96,.08);color:var(--ink)}
.dashboard-side nav a.active{background:var(--soft);color:#087447}

.dashboard-content>.dashboard-head.compact,
.dashboard-content>.panel,
.dashboard-content>.stats-grid{
  width:100%;
  max-width:none;
}
.dashboard-head.compact{
  margin:0 0 20px;
  padding:4px 2px 6px;
  align-items:flex-end;
}
.dashboard-head.compact h1{font-size:clamp(2.35rem,4vw,4rem);margin:9px 0 10px}
.dashboard-head.compact p{margin:0;max-width:660px}
.dashboard-head.compact>.button{flex:0 0 auto;min-height:48px}

.dashboard-content>.panel{margin:0 0 20px;padding:24px;border-radius:24px}
.dashboard-content>.panel h2{font-size:clamp(1.65rem,2.3vw,2.1rem);margin:0 0 18px}

.profile-editor{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  align-items:start;
}
.profile-editor label{min-width:0}
.profile-editor label:last-of-type{grid-column:1/-1}
.profile-editor textarea{min-height:112px;resize:vertical}
.profile-editor .button{justify-self:start;min-width:150px}

.stats-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:0 0 20px;
}
.stat-card{
  min-width:0;
  padding:20px;
  border-radius:20px;
  box-shadow:0 10px 28px rgba(28,57,43,.06);
}
.stat-card span{font-size:.82rem;line-height:1.3}
.stat-card strong{display:block;margin-top:7px;font-size:clamp(2rem,3.2vw,2.8rem);line-height:1}

.section-title{gap:16px;flex-wrap:wrap;margin-bottom:16px}
.section-title h2{margin-bottom:0!important}
.section-title>span{color:var(--muted);font-weight:800;font-size:.9rem}
.species-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.species-card{
  min-width:0;
  grid-template-columns:112px minmax(0,1fr);
  gap:16px;
  padding:14px;
  border-radius:20px;
  box-shadow:none;
}
.species-card img{width:112px;height:112px;border-radius:15px}
.species-card>div{min-width:0}
.species-card h3{margin:9px 0 4px;font-size:1.08rem;line-height:1.3;overflow-wrap:anywhere}
.species-card em{display:block;color:var(--muted);font-size:.92rem;overflow-wrap:anywhere}
.species-card p{margin:9px 0 0;font-size:.9rem;line-height:1.55;overflow-wrap:anywhere}
.species-card .mini-form{margin-top:12px}

.security-forms{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.security-forms form{min-width:0;padding:18px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.42)}
.security-forms button{justify-self:start}

/* Validator/admin dashboard */
.dashboard-head:not(.compact){width:min(1220px,calc(100% - 40px));margin:36px auto 16px}
.dashboard-head:not(.compact) h1{font-size:clamp(2.45rem,4.5vw,4.25rem);margin:10px 0 12px}
.dashboard-head:not(.compact)+.panel{width:min(1220px,calc(100% - 40px));margin:0 auto 56px}
.table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.34);
}
.table-wrap table{min-width:760px}
.table-wrap th{white-space:nowrap;background:rgba(229,246,234,.48)}
.table-wrap th:first-child,.table-wrap td:first-child{padding-left:18px}
.table-wrap th:last-child,.table-wrap td:last-child{padding-right:18px}
.table-post{min-width:220px}
.review-form{min-width:250px}
.review-form textarea{min-height:88px;resize:vertical}

.dark .dashboard-side,
.dark .stat-card,
.dark .security-forms form{background:rgba(22,31,27,.84)}
.dark .dashboard-side nav a.active{background:rgba(34,145,96,.18);color:#b9f4d2}
.dark .table-wrap{background:rgba(22,31,27,.5)}
.dark .table-wrap th{background:rgba(34,145,96,.10)}

@media(max-width:1100px){
  .dashboard-shell{grid-template-columns:220px minmax(0,1fr);gap:18px}
  .dashboard-side{padding:18px}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .species-grid{grid-template-columns:1fr}
}

@media(max-width:820px){
  .dashboard-shell{
    width:min(100% - 28px,760px);
    grid-template-columns:1fr;
    gap:16px;
    margin:20px auto 42px;
  }
  .dashboard-side{position:static;padding:16px}
  .dashboard-side .profile-card{
    display:grid;
    grid-template-columns:64px minmax(0,1fr) auto;
    column-gap:14px;
    row-gap:2px;
    align-items:center;
    text-align:left;
    padding:0 0 14px;
  }
  .dashboard-side .avatar{grid-row:1/4;width:60px;height:60px;margin:0;font-size:1.45rem}
  .dashboard-side .profile-card h3{grid-column:2;margin:0}
  .dashboard-side .profile-card p{grid-column:2;margin:0}
  .dashboard-side .profile-card .status-badge{grid-column:3;grid-row:1/3;align-self:center;justify-self:end}
  .dashboard-side nav{
    display:flex;
    gap:8px;
    margin-top:14px;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  .dashboard-side nav::-webkit-scrollbar{display:none}
  .dashboard-side nav a{flex:0 0 auto;min-height:40px;padding:9px 13px}
  .dashboard-head.compact{align-items:flex-start}
  .dashboard-content>.panel{padding:20px}
  .profile-editor{grid-template-columns:1fr}
  .profile-editor label:last-of-type{grid-column:auto}
  .security-forms{grid-template-columns:1fr}
  .dashboard-head:not(.compact),
  .dashboard-head:not(.compact)+.panel{width:min(100% - 28px,760px)}
}

@media(max-width:640px){
  .dashboard-shell{width:calc(100% - 24px);margin-top:14px}
  .dashboard-side{border-radius:20px}
  .dashboard-side .profile-card{grid-template-columns:56px minmax(0,1fr)}
  .dashboard-side .avatar{width:52px;height:52px;font-size:1.25rem}
  .dashboard-side .profile-card .status-badge{grid-column:2;grid-row:auto;justify-self:start;margin-top:6px}
  .dashboard-head.compact{display:grid;grid-template-columns:1fr;gap:14px;margin-bottom:16px;padding:0}
  .dashboard-head.compact h1{font-size:clamp(2.05rem,11vw,2.9rem);letter-spacing:-.055em}
  .dashboard-head.compact p{font-size:.98rem;line-height:1.6}
  .dashboard-head.compact>.button{width:100%}
  .dashboard-content>.panel{padding:18px;border-radius:20px;margin-bottom:14px}
  .dashboard-content>.panel h2{font-size:1.55rem}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}
  .stat-card{padding:16px;border-radius:17px}
  .stat-card strong{font-size:2.1rem}
  .species-card{grid-template-columns:88px minmax(0,1fr);gap:12px;padding:12px;border-radius:17px}
  .species-card img{width:88px;height:88px;border-radius:13px}
  .species-card .mini-form{display:flex;grid-template-columns:none}
  .species-card .mini-form .button,.species-card .mini-form button,.species-card .mini-form a{width:auto;flex:1 1 auto}
  .profile-editor .button,.security-forms button{width:100%;justify-self:stretch}
  .security-forms form{padding:14px;border-radius:16px}
  .dashboard-head:not(.compact){
    width:calc(100% - 24px);
    margin:22px auto 14px;
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
  }
  .dashboard-head:not(.compact) h1{font-size:2.45rem}
  .dashboard-head:not(.compact) .button{width:100%}
  .dashboard-head:not(.compact)+.panel{width:calc(100% - 24px);padding:16px;margin-bottom:38px;border-radius:20px}
  .table-wrap{margin:0;border-radius:14px}
  .table-wrap table{min-width:700px}
  .table-wrap th,.table-wrap td{padding-top:12px;padding-bottom:12px}
  .table-post img{width:58px;height:48px;border-radius:11px}
}

@media(max-width:400px){
  .stats-grid{grid-template-columns:1fr 1fr}
  .stat-card{padding:14px}
  .stat-card span{font-size:.76rem}
  .stat-card strong{font-size:1.9rem}
  .species-card{grid-template-columns:1fr}
  .species-card img{width:100%;height:180px}
}

/* =========================================================
   Taxonomy facets + reviewed records + IUCN-inspired taxonomy box
   ========================================================= */
.explore-filter-taxonomy{
  grid-template-columns:minmax(260px,1.6fr) repeat(4,minmax(150px,.8fr));
  align-items:center;
}
.explore-filter-taxonomy .explore-search{min-width:0}
.explore-filter-meta{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:2px 6px 0;
  color:var(--muted);
  font-size:.92rem;
}
.explore-filter-meta strong{color:var(--ink);font-size:1.05rem}
.explore-filter-meta a{color:var(--green);font-weight:850;text-decoration:none}
.explore-filter-meta a:hover{text-decoration:underline}

.taxonomy-overview{
  margin:26px 0 30px;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  background:rgba(255,255,255,.48);
}
.taxonomy-item{
  min-width:0;
  display:grid;
  gap:6px;
  padding:16px 18px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.taxonomy-item:nth-child(3n){border-right:0}
.taxonomy-item span{
  color:var(--muted);
  font-size:.75rem;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.taxonomy-item strong,.taxonomy-item a{
  min-width:0;
  color:var(--ink);
  font-size:1rem;
  font-weight:900;
  overflow-wrap:anywhere;
}
.taxonomy-item a{
  color:var(--green-dark);
  text-decoration:none;
  text-underline-offset:3px;
}
.taxonomy-item a:hover{text-decoration:underline;color:var(--green)}
.dark .taxonomy-overview{background:rgba(16,24,21,.48)}
.dark .taxonomy-item a{color:#91ddb6}

.reviewed-records{margin-top:28px}
.reviewed-records .section-title{gap:18px}
.reviewed-records .section-title h2{margin-bottom:0}
.reviewed-records td .mini-form{min-width:190px}

@media(max-width:1180px){
  .explore-filter-taxonomy{grid-template-columns:repeat(2,minmax(0,1fr))}
  .explore-filter-taxonomy .explore-search{grid-column:1/-1}
}
@media(max-width:760px){
  .explore-filter-taxonomy{grid-template-columns:1fr}
  .explore-filter-taxonomy .explore-search{grid-column:auto}
  .explore-filter-meta{grid-column:auto;align-items:flex-start;flex-direction:column}
  .taxonomy-overview{grid-template-columns:repeat(2,minmax(0,1fr));border-radius:18px}
  .taxonomy-item:nth-child(3n){border-right:1px solid var(--line)}
  .taxonomy-item:nth-child(2n){border-right:0}
  .reviewed-records .section-title{align-items:flex-start;flex-direction:column}
}
@media(max-width:480px){
  .taxonomy-overview{grid-template-columns:1fr}
  .taxonomy-item,.taxonomy-item:nth-child(2n),.taxonomy-item:nth-child(3n){border-right:0}
  .taxonomy-item{padding:14px 15px}
}
