/* Distinct, restrained animated habitats. Existing group names and images are preserved. */
#minhaSpeciesGroupOverlay[data-species] {--species-tint:70,112,170;--species-tone:#527ca7}
#minhaSpeciesGroupOverlay[data-species="cao"]{--species-tint:95,148,100;--species-tone:#699b70}
#minhaSpeciesGroupOverlay[data-species="gato"]{--species-tint:153,119,183;--species-tone:#9874b1}
#minhaSpeciesGroupOverlay[data-species="ave"]{--species-tint:100,171,194;--species-tone:#65a9bf}
#minhaSpeciesGroupOverlay[data-species="peixe"]{--species-tint:55,151,188;--species-tone:#449dc6}
#minhaSpeciesGroupOverlay[data-species="roedor"]{--species-tint:190,141,108;--species-tone:#b89373}
#minhaSpeciesGroupOverlay[data-species="coelho"]{--species-tint:184,148,183;--species-tone:#b48eae}
#minhaSpeciesGroupOverlay[data-species="furao"]{--species-tint:171,135,115;--species-tone:#ad8972}
#minhaSpeciesGroupOverlay[data-species="reptil"]{--species-tint:98,159,134;--species-tone:#66a58b}
#minhaSpeciesGroupOverlay[data-species="grande"]{--species-tint:171,153,104;--species-tone:#b1a06b}
#minhaSpeciesGroupOverlay[data-species] .minha-group-panel{position:relative;isolation:isolate;padding-bottom:max(3rem,env(safe-area-inset-bottom));background:var(--app-bg,var(--surface-page,#f8fafc));}
#minhaSpeciesGroupOverlay[data-species] .minha-group-panel::before{content:"";position:absolute;inset:0 0 auto;height:390px;pointer-events:none;z-index:-1;background:radial-gradient(ellipse at 55% 11%,rgba(var(--species-tint),.17),transparent 68%);animation:species-ambient-glow 19s ease-in-out infinite;}
#minhaSpeciesGroupOverlay[data-species="peixe"] .minha-group-panel::before{background:radial-gradient(ellipse at 50% 4%,rgba(67,171,215,.2),transparent 72%),linear-gradient(170deg,rgba(74,184,211,.07),transparent 90%);}
#minhaSpeciesGroupOverlay[data-species] .minha-group-topline{position:relative;z-index:2;max-width:880px;margin-left:auto;margin-right:auto;}
#minhaSpeciesGroupOverlay[data-species] .minha-group-topline .panel-title{font-size:clamp(1.12rem,3vw,1.4rem);color:var(--text-primary,var(--gray-900));}
#minhaSpeciesGroupOverlay[data-species] .minha-group-page{width:min(840px,100%);padding:0 0 3rem;display:block;text-align:left;}
.species-group-home[hidden],.species-group-directory[hidden],.species-group-filters[hidden],#speciesGroupMore[hidden]{display:none!important;}
.species-group-home,.species-group-directory{position:relative;max-width:860px;margin:0 auto;padding:clamp(.4rem,2vw,1.15rem);color:var(--text-primary,var(--gray-900));}
.species-group-hero{overflow:hidden;position:relative;isolation:isolate;display:flex;align-items:center;gap:1.2rem;padding:clamp(1.2rem,3vw,2rem);min-height:182px;border-radius:29px;border:1px solid rgba(var(--species-tint),.22);background:linear-gradient(125deg,rgba(var(--species-tint),.12),rgba(var(--species-tint),.035) 65%),var(--surface-primary,white);box-shadow:0 16px 44px rgba(18,33,54,.045)}
.species-group-hero::before{content:"";position:absolute;inset:-70% -35%;z-index:-1;pointer-events:none;background:radial-gradient(circle at 40% 50%,rgba(var(--species-tint),.15),transparent 38%);animation:species-ambient-glow 16s ease-in-out infinite;}
.species-group-hero .minha-group-icon{width:clamp(74px,12vw,120px);height:clamp(74px,12vw,120px);flex:none;object-fit:contain;filter:drop-shadow(0 8px 12px rgba(15,23,42,.08));}
.species-group-hero .minha-group-name{font-size:clamp(1.5rem,4vw,2.35rem);line-height:1.1;font-weight:850;color:var(--text-primary,var(--gray-900));}
.species-group-tag{font-size:.78rem;letter-spacing:.03em;color:var(--text-secondary,var(--gray-600));font-weight:650;}
.species-group-intro{margin:.65rem 0 0;font-size:.9rem;line-height:1.5;color:var(--text-secondary,var(--gray-600));}
.species-group-atmosphere{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0;opacity:.45}
.species-group-hero>:not(.species-group-atmosphere){position:relative;z-index:1}
.species-group-mote{position:absolute;bottom:-15px;width:6px;height:6px;border-radius:50%;border:1px solid rgba(var(--species-tint),.55);opacity:.55;animation:species-mote-rise 20s linear infinite}
.species-group-mote:nth-child(1){left:12%;width:5px;height:5px;animation-delay:-6s;animation-duration:19s}
.species-group-mote:nth-child(2){left:42%;width:9px;height:9px;animation-delay:-12s;animation-duration:25s}
.species-group-mote:nth-child(3){left:78%;width:4px;height:4px;animation-delay:-2s;animation-duration:23s}
#minhaSpeciesGroupOverlay:not([data-species="peixe"]) .species-group-mote{border:0;background:rgba(var(--species-tint),.28);width:4px;height:4px}
.species-group-section{margin-top:1.2rem;padding:clamp(1rem,2.4vw,1.5rem);border:1px solid var(--border-subtle,rgba(120,136,160,.17));border-radius:25px;background:var(--surface-primary,rgba(255,255,255,.96));box-shadow:0 14px 38px rgba(16,24,40,.035)}
.species-group-section-head{display:flex;align-items:start;justify-content:space-between;gap:1rem;margin-bottom:.8rem}
.species-group-section-head h3{font-size:1.14rem;letter-spacing:-.018em;margin:0;color:var(--text-primary,var(--gray-900));}
.species-group-section-head p{font-size:.78rem;color:var(--text-secondary,var(--gray-600));margin:.3rem 0 0}
.species-group-count{font-size:.77rem;white-space:nowrap;color:var(--text-secondary,var(--gray-600))}
.species-member{width:100%;min-width:0;display:flex;align-items:center;gap:clamp(.45rem,1.4vw,.85rem);padding:.78rem .25rem;border:0;border-bottom:1px solid var(--border-subtle,rgba(125,139,158,.13));background:transparent;color:var(--text-primary,var(--gray-900));font:inherit;text-align:left;cursor:pointer;transition:background .18s ease,transform .18s ease;border-radius:12px}
.species-member:last-child{border-bottom:0}
.species-member:hover{background:rgba(var(--species-tint),.065)}
.species-member:active{transform:scale(.995)}
.species-member:focus-visible,.species-group-button:focus-visible,.species-group-control:focus-visible,.species-group-search:focus-visible{outline:3px solid var(--species-tone);outline-offset:2px}
.species-member-index{flex:none;width:22px;text-align:center;font-size:.82rem;font-weight:800;color:var(--text-secondary,var(--gray-600))}
.species-member-avatar{flex:none;position:relative;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;overflow:hidden;background:rgba(var(--species-tint),.13);border:1px solid rgba(var(--species-tint),.15);font-size:21px}
.species-member-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.species-member-avatar img + span{display:none}
.species-member-identity{display:grid;gap:.25rem;flex:1;min-width:0}
.species-member-identity strong{font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.species-member-identity small{font-size:.72rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-secondary,var(--gray-600))}
.species-member-metrics{display:grid;gap:.15rem;text-align:right;flex:none}
.species-member-metrics small{font-size:.72rem;color:var(--text-secondary,var(--gray-600))}
.species-member-arrow{font-size:1.5rem;color:var(--text-secondary,var(--gray-600));padding:0 .15rem}
.species-member-top .species-member-index{color:var(--species-tone)}
.species-group-button,.species-group-retry{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:44px;border:1px solid rgba(var(--species-tint),.18);border-radius:15px;background:rgba(var(--species-tint),.1);color:var(--text-primary,var(--gray-900));font:inherit;font-size:.88rem;font-weight:750;padding:.72rem 1.1rem;cursor:pointer;transition:background .2s ease}
.species-group-button:hover,.species-group-retry:hover{background:rgba(var(--species-tint),.18)}
.species-group-button.primary{width:100%;margin-top:.9rem;background:var(--species-tone);color:white;border-color:transparent}
.species-group-button.primary:hover{filter:brightness(.95)}
.species-group-feedback{padding:1.1rem 0;margin:0;color:var(--text-secondary,var(--gray-600));font-size:.88rem;line-height:1.5}
.species-group-directory-head{display:flex;align-items:center;gap:.65rem;padding:0 0 1.1rem}
.species-group-directory-head h3{margin:0;font-size:1.4rem;line-height:1.2}
.species-group-directory-head p{margin:.25rem 0 0;font-size:.78rem;color:var(--text-secondary,var(--gray-600))}
.species-group-search{box-sizing:border-box;width:100%;min-width:0;height:48px;padding:0 1rem;border:1px solid var(--border-subtle,rgba(125,139,158,.23));background:var(--surface-primary,white);color:var(--text-primary,#172033);font:inherit;border-radius:15px}
.species-group-tools{display:flex;align-items:center;gap:.6rem;margin:.7rem 0}
.species-group-control{min-width:0;min-height:44px;border:1px solid var(--border-subtle,rgba(120,135,155,.2));border-radius:14px;padding:0 .75rem;background:var(--surface-primary,white);color:var(--text-primary,#172033);font:inherit;font-size:.85rem}
.species-group-tools .species-group-control{flex:1}
.species-group-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin:.8rem 0;padding:1rem;border:1px solid rgba(var(--species-tint),.2);border-radius:18px;background:var(--surface-primary,white)}
.species-group-filters label{min-width:0;display:grid;gap:.35rem;font-size:.77rem;font-weight:700}
.species-group-filters label .species-group-control{width:100%}
.species-group-filters .species-group-check{display:flex;align-items:center;gap:.6rem;cursor:pointer}
.species-group-filter-footer{grid-column:1/-1;display:flex;justify-content:end}
.species-group-directory-list{background:var(--surface-primary,white);border:1px solid var(--border-subtle,rgba(120,136,155,.15));border-radius:20px;padding:.3rem .8rem;margin:.8rem 0}
.species-group-directory-list .species-member{padding:.85rem .2rem}
.species-group-results{font-size:.8rem;color:var(--text-secondary,var(--gray-600));margin-top:1.2rem}
body.app-dark-theme #minhaSpeciesGroupOverlay,body.app-theme-total #minhaSpeciesGroupOverlay{--species-tone:#84b5d2}
body.app-dark-theme #minhaSpeciesGroupOverlay .species-group-hero,body.app-theme-total #minhaSpeciesGroupOverlay .species-group-hero{background:linear-gradient(125deg,rgba(var(--species-tint),.14),rgba(var(--species-tint),.025) 65%),var(--surface-primary,#172033)}
@keyframes species-mote-rise{0%{transform:translateY(0) translateX(0);opacity:0}15%{opacity:.4}85%{opacity:.4}100%{transform:translateY(-190px) translateX(12px);opacity:0}}
@keyframes species-ambient-glow{0%,100%{opacity:.6;transform:translateX(-1%)}50%{opacity:1;transform:translateX(1%)}}
@media(max-width:540px){#minhaSpeciesGroupOverlay[data-species] .minha-group-panel{padding:.9rem .85rem 3rem}#minhaSpeciesGroupOverlay[data-species] .minha-group-page{padding:0}.species-group-hero{min-height:144px;gap:.8rem;padding:1rem;border-radius:22px}.species-group-hero .minha-group-icon{width:74px;height:74px}.species-group-intro{font-size:.79rem}.species-group-section{padding:1rem;border-radius:20px}.species-group-filters{grid-template-columns:minmax(0,1fr)}.species-member-avatar{width:40px;height:40px}.species-member-metrics small{font-size:.66rem}.species-member-arrow{display:none}}
@media(prefers-reduced-motion:reduce){#minhaSpeciesGroupOverlay .minha-group-panel::before,#minhaSpeciesGroupOverlay .species-group-hero::before,#minhaSpeciesGroupOverlay .species-group-mote{animation:none!important}.species-member{transition:none}}
