/* Faunelya — Parc vivant 4.4, private/detail, public and owner tools.
   Scoped to exact opted-in pages, loaded after legacy CSS. No game logic changed. */
body.pv440-page{
  --pv44-forest:#174c39;--pv44-dark:#123d2d;--pv44-green:#4d865e;
  --pv44-paper:#fffefa;--pv44-cream:#f7f7f0;--pv44-border:#dde7da;
  --pv44-ink:#203b30;--pv44-muted:#607167;--pv44-radius:21px;
  --pv44-shadow:0 12px 32px rgba(25,70,46,.065);
  background:#f6f7ef;color:var(--pv44-ink);
}
body.pv440-page .az-page{min-width:0;max-width:100%;}
body.pv440-page :where(.app-card,.fyn-health-panel,.fyn-achievements-panel,.fyn-pedigree-panel,.acc279-card,.collection-v18-section,.v268-settings-card,.v269-toolbar,.v269-zoo-card){border-color:var(--pv44-border);}
body.pv440-page :where(h1,h2,h3){overflow-wrap:break-word;text-wrap:pretty;}
body.pv440-page :where(a,button,input,select,textarea,summary):focus-visible{
 outline:3px solid #e2a95b!important;outline-offset:3px!important;
}
body.pv440-page :where(.alert,.app-section-head,.fyn-panel-head,.pv440-section-nav){min-width:0;}
body.pv440-page :where(.app-section-head,.fyn-panel-head){margin-bottom:16px;}
body.pv440-page :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){max-width:100%;}
body.pv440-page :where(input,select,textarea,button){font:inherit;}
body.pv440-page :where([id]){scroll-margin-top:95px;}

/* One consistent local section navigation for Collection, Account, and Community. */
body.pv440-page .pv440-section-nav{
  display:flex;flex-wrap:wrap;gap:8px;padding:9px;margin:13px 0 22px;
  border:1px solid var(--pv44-border);border-radius:16px;background:var(--pv44-paper);
  box-shadow:0 4px 14px rgba(18,64,42,.025);
}
body.pv440-page .pv440-section-nav a{
  display:inline-flex;align-items:center;justify-content:center;min-height:42px;
  text-decoration:none;color:var(--pv44-forest);background:#eff5ed;
  border:1px solid transparent;border-radius:12px;padding:9px 15px;
  font-size:13px;font-weight:800;line-height:1.25;
}
body.pv440-page .pv440-section-nav a:hover{background:#dfeee0;border-color:#c5dcca;}

/* Consistent hero and page geometry across private pages. */
body.pv440-page.pv440-detail .pv440-page-hero,
body.pv440-page.pv440-account .pv440-page-hero,
body.pv440-page.pv440-collection .pv440-page-hero,
body.pv440-page.pv440-profile-public .pv440-page-hero,
body.pv440-page.pv440-community .pv440-page-hero,
body.pv440-page.pv440-admin .acc279-hero{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:18px 30px;margin:0 0 16px;padding:clamp(22px,3vw,38px)!important;
  color:var(--pv44-ink)!important;background:linear-gradient(115deg,#fffdf8,#f3f7ed 72%,#e8f2e5)!important;
  border:1px solid var(--pv44-border)!important;border-radius:var(--pv44-radius)!important;
  box-shadow:var(--pv44-shadow)!important;min-height:140px;max-width:100%;height:auto!important;aspect-ratio:auto!important;
}
body.pv440-page :is(.pv440-page-hero,.acc279-hero) :where(.eyebrow){
  color:#37714c!important;letter-spacing:.13em!important;font-size:11px!important;font-weight:900!important;
}
body.pv440-page :is(.pv440-page-hero,.acc279-hero) h1{
  color:var(--pv44-dark)!important;font-family:Georgia,serif!important;font-weight:700!important;font-size:clamp(32px,3.1vw,49px)!important;line-height:1.08!important;
  margin:5px 0 10px!important;letter-spacing:-.025em!important;
}
body.pv440-page :is(.pv440-page-hero,.acc279-hero) p{
  max-width:69ch;line-height:1.62!important;font-size:clamp(13px,1.15vw,15px)!important;
  color:var(--pv44-muted)!important;margin:0!important;
}
body.pv440-page :is(.pv440-page-hero,.acc279-hero) > :first-child{min-width:0;flex:1 1 330px;}
body.pv440-page :is(.pv440-page-hero,.acc279-hero) :is(.button,.acc279-btn){
  display:inline-flex;align-items:center;justify-content:center;min-height:43px;
  padding:10px 15px;border-radius:12px;font-weight:800;line-height:1.3;
}

/* Care, trophies and pedigree share a true semantic page hero, stage, action bar and info cards. */
body.pv440-detail .pv440-page-stage{min-width:0;margin:0 0 20px;}
body.pv440-detail .pv440-page-stage > :first-child:not(nav){
  position:relative;isolation:isolate;overflow:hidden;
  min-height:270px;border-radius:var(--pv44-radius)!important;
  border:1px solid rgba(12,67,44,.21)!important;background-color:#184735!important;
  box-shadow:var(--pv44-shadow)!important;
}
body.pv440-detail :is(.fyn-health-hero-copy,.fyn-achievements-copy,.fyn-pedigree-copy){
 position:relative;z-index:2;max-width:min(650px,66%);min-width:0;
 padding:clamp(20px,2.7vw,36px)!important;
}
body.pv440-detail :is(.fyn-health-hero-copy,.fyn-achievements-copy,.fyn-pedigree-copy) :is(h2,p,.v13-hero-badge){color:#fff!important;}
body.pv440-detail :is(.fyn-health-hero-copy,.fyn-achievements-copy,.fyn-pedigree-copy) h2{
  font-family:Georgia,serif!important;font-weight:700!important;font-size:clamp(26px,2.6vw,37px)!important;line-height:1.16!important;
  letter-spacing:-.025em!important;margin:7px 0 10px!important;
}
body.pv440-detail :is(.fyn-health-hero-copy,.fyn-achievements-copy,.fyn-pedigree-copy) p{font-size:14px!important;line-height:1.57!important;color:#f1f6ec!important;}
body.pv440-detail :is(.fyn-health-actionbar,.fyn-achievements-actionbar,.fyn-pedigree-actionbar){
 display:flex!important;flex-wrap:wrap;align-items:center;gap:7px!important;
 margin:12px 0 0!important;padding:9px!important;border-radius:16px!important;
 border:1px solid var(--pv44-border)!important;background:#fffefa!important;
 box-shadow:0 6px 20px rgba(16,59,40,.035)!important;
}
body.pv440-detail :is(.fyn-health-actionbar,.fyn-achievements-actionbar,.fyn-pedigree-actionbar) a{
 display:inline-flex!important;align-items:center!important;gap:8px;
 color:var(--pv44-forest)!important;background:#eef5eb!important;
 padding:9px 14px!important;min-height:44px!important;border-radius:12px!important;
 font-size:13px!important;font-weight:800!important;text-decoration:none!important;
}
body.pv440-detail :is(.fyn-health-actionbar,.fyn-achievements-actionbar,.fyn-pedigree-actionbar) a:hover{background:#deeddc!important;}
body.pv440-detail :is(.fyn-health-panels,.fyn-achievements-panels,.fyn-pedigree-panels){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px!important;margin:0 0 24px!important;}
body.pv440-detail :is(.fyn-health-panel,.fyn-achievements-panel,.fyn-pedigree-panel){
 min-width:0;margin:0!important;padding:20px!important;background:var(--pv44-paper)!important;
 border-radius:18px!important;border:1px solid var(--pv44-border)!important;
 box-shadow:var(--pv44-shadow)!important;color:var(--pv44-ink)!important;
}
body.pv440-detail :is(.fyn-health-panel,.fyn-achievements-panel,.fyn-pedigree-panel) :is(h2,h3){color:var(--pv44-dark)!important;}
body.pv440-detail :is(.fyn-health-panel,.fyn-achievements-panel,.fyn-pedigree-panel) :is(p,small){font-size:13px!important;line-height:1.55!important;}
body.pv440-detail :is(.fyn-health-section,.fyn-achievements-section,.fyn-pedigree-section,.fyn-pedigree-rules){
 min-width:0;margin:0 0 20px!important;padding:clamp(17px,2.1vw,26px)!important;
 border-radius:19px!important;border:1px solid var(--pv44-border)!important;
 background:var(--pv44-paper)!important;
}
body.pv440-detail .v13-toolbar-actions{display:flex;flex-wrap:wrap;gap:9px;}
body.pv440-detail .v13-wallet{background:#fff!important;color:var(--pv44-ink)!important;}
body.pv440-detail .v13-wallet small{color:var(--pv44-muted)!important;}

/* Collection: the living field guide, not a random array of cards. */
body.pv440-collection .collection-v18-overview{display:grid!important;grid-template-columns:minmax(0,1.65fr) minmax(265px,.8fr)!important;gap:16px!important;margin-bottom:24px!important;}
body.pv440-collection :is(.collection-v18-hero,.collection-v18-next){min-width:0;padding:clamp(18px,2.3vw,30px)!important;border:1px solid var(--pv44-border)!important;border-radius:20px!important;background:var(--pv44-paper)!important;box-shadow:var(--pv44-shadow)!important;}
body.pv440-collection .collection-v18-species-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;}
body.pv440-collection .collection-v18-species-card{min-width:0;border-radius:18px!important;overflow:hidden;border:1px solid var(--pv44-border)!important;background:#fffefa!important;box-shadow:var(--pv44-shadow);}
body.pv440-collection .collection-modern-art{overflow:hidden;min-width:0;background:linear-gradient(155deg,#e2efdf,#fbf8eb)!important;}
body.pv440-collection .collection-modern-art img{max-width:100%;object-fit:contain;object-position:center;}
body.pv440-collection .collection-modern-copy{padding:16px!important;min-width:0;}
body.pv440-collection .collection-modern-copy :is(h2,p,small){overflow-wrap:anywhere;}
body.pv440-collection :is(.collection-v18-badge,.collection-v18-record,.collection-v18-generation,.collection-v18-births,.collection-v18-goal){min-width:0;border-radius:17px!important;border:1px solid var(--pv44-border)!important;background:var(--pv44-paper)!important;}
body.pv440-collection .collection-v18-section{min-width:0;margin:0 0 24px!important;}
body.pv440-collection .app-section-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:9px 20px;}
body.pv440-collection .app-section-head h2{color:var(--pv44-dark)!important;font-family:Georgia,serif!important;font-weight:700!important;font-size:clamp(23px,2.2vw,31px)!important;line-height:1.15!important;}

/* Account and diagnostics: priorities are readability, contrast and safe forms. */
body.pv440-account .acc279-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;}
body.pv440-page :is(.acc279-card,.diag279-check,.v268-settings-card,.v269-zoo-card){min-width:0;background:var(--pv44-paper)!important;border:1px solid var(--pv44-border)!important;border-radius:19px!important;box-shadow:var(--pv44-shadow)!important;}
body.pv440-page :is(.acc279-card,.diag279-check){padding:clamp(18px,2vw,26px)!important;}
body.pv440-page .acc279-card h2{font-family:Georgia,serif!important;font-weight:700!important;font-size:clamp(19px,1.8vw,25px)!important;line-height:1.18!important;color:var(--pv44-dark)!important;}
body.pv440-page .acc279-card .acc279-form{display:grid;gap:14px;min-width:0;}
body.pv440-page .acc279-form :is(input,textarea,select){display:block;width:100%;min-height:45px;padding:11px 12px;border:1px solid #cbdcce!important;border-radius:12px!important;background:#fff!important;color:var(--pv44-ink)!important;font-size:15px!important;}
body.pv440-page :is(.acc279-form,.acc279-settings,.acc279-card) label{min-width:0;}
body.pv440-page :is(.acc279-btn,.v268-settings-card button,.v269-toolbar button){min-height:44px;border-radius:12px!important;font-weight:800!important;}
body.pv440-page .acc279-btn.primary{background:var(--pv44-forest)!important;color:#fff!important;}
body.pv440-page .acc279-btn.ghost{background:#eef5ed!important;color:var(--pv44-forest)!important;}
body.pv440-page .acc279-btn.danger{background:#9e3f3f!important;color:#fff!important;}
body.pv440-account .acc279-card.danger{border-color:#e5c8bf!important;background:#fffaf8!important;}
body.pv440-page .acc279-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
body.pv440-page .acc279-summary article{background:#fff!important;border:1px solid var(--pv44-border)!important;border-radius:13px!important;}
body.pv440-account .acc279-summary{grid-template-columns:repeat(4,minmax(0,1fr));}
body.pv440-admin .diag279-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
body.pv440-admin .diag279-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;}
body.pv440-admin .diag279-list{display:grid;gap:11px;}

/* Public zoo and community: same forest/cream brand, responsive lists and forms. */
body.pv440-profile-public .v268-settings-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(270px,.75fr);gap:17px;}
body.pv440-profile-public .v268-settings-layout :is(input,select,textarea){max-width:100%;min-height:44px;border-radius:12px;border:1px solid #cbdcce;background:#fff;padding:10px 12px;color:var(--pv44-ink);}
body.pv440-profile-public .v268-settings-card{padding:clamp(18px,2.5vw,28px)!important;}
body.pv440-community .v269-toolbar{padding:18px!important;}
body.pv440-community .v269-sorts{display:flex;flex-wrap:wrap;gap:7px;}
body.pv440-community .v269-sorts a{min-height:41px;display:inline-flex;align-items:center;padding:8px 13px;background:#eef5ed;color:var(--pv44-forest);border-radius:12px;font-weight:800;}
body.pv440-community .v269-zoo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
body.pv440-community .v269-zoo-card{overflow:hidden;}
body.pv440-community .v269-card-visual{overflow:hidden;}
body.pv440-community :is(.v269-hero,.v269-section-title) h1,
body.pv440-zoo-view .v268-public-hero h1{color:var(--pv44-dark);}
body.pv440-zoo-view :is(.v268-public-section,.v268-public-footer-cta){border-radius:19px;min-width:0;}
body.pv440-zoo-view :is(.v268-enclosure-grid,.v268-animal-grid,.v268-life-grid){gap:15px;}
body.pv440-zoo-view :is(.v268-enclosure-grid>article,.v268-animal-card,.v268-life-grid>article){min-width:0;border-radius:18px;background:var(--pv44-paper);border:1px solid var(--pv44-border);}

/* Public landing + auth: identity continues, but keep existing artwork and interaction. */
body.pv440-home :is(.fyn-home-story,.fyn-seo-intro,.fyn-seo-loop,.fyn-seo-depth,.fyn-seo-faq){margin-block:clamp(28px,4vw,56px);}
body.pv440-home :is(.fyn-gallery-card,.fyn-seo-browser-card,.fyn-story-points>div){border-radius:19px;overflow:hidden;}
body.pv440-home :is(.fyn-home-hero,.fyn-home-story) :is(h1,h2){letter-spacing:-.025em;text-wrap:balance;}
body.pv440-home :is(.fyn-btn,.fyn-home-hero a){min-height:45px;}
body.pv440-auth .fyn-auth-card{border-radius:24px!important;overflow:hidden;border:1px solid var(--pv44-border)!important;box-shadow:var(--pv44-shadow)!important;}
body.pv440-auth .fyn-auth-form{min-width:0;padding:clamp(24px,3.5vw,50px)!important;background:#fffefa!important;}
body.pv440-auth .fyn-auth-form h1{font-family:Georgia,serif!important;font-weight:700!important;font-size:clamp(30px,3.5vw,47px)!important;line-height:1.08!important;color:var(--pv44-dark)!important;}
body.pv440-auth .fyn-field{display:grid;gap:7px;min-width:0;}
body.pv440-auth .fyn-field>div{min-width:0;}
body.pv440-auth .fyn-field input{width:100%;font-size:15px!important;min-height:46px;background:#fff!important;}
body.pv440-auth .fyn-submit{min-height:47px;border-radius:13px!important;}
body.pv440-auth .fyn-auth-benefits{gap:13px;}
body.pv440-auth .fyn-auth-benefits article{min-width:0;border-radius:16px;}
body.pv440-tutorial :is(.app-card,.fyn-tutorial-stage,.fyn-tutorial-section){border-radius:20px;}
body.pv440-not-found .az-page{min-height:55vh;}

/* Responsive and accessibility. */
@media(max-width:1180px){
 body.pv440-collection .collection-v18-species-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
 body.pv440-community .v269-zoo-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 body.pv440-profile-public .v268-settings-layout{grid-template-columns:1fr;}
}
@media(max-width:900px){
 body.pv440-detail :is(.fyn-health-panels,.fyn-achievements-panels,.fyn-pedigree-panels){grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 body.pv440-collection .collection-v18-overview{grid-template-columns:1fr!important;}
 body.pv440-account .acc279-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px){
 body.pv440-page .pv440-section-nav{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;}
 body.pv440-page .pv440-section-nav a{flex:0 0 auto;}
 body.pv440-page .pv440-page-hero{padding:22px 18px!important;border-radius:18px!important;}
 body.pv440-detail .pv440-page-stage > :first-child:not(nav){min-height:240px;}
 body.pv440-detail :is(.fyn-health-hero-copy,.fyn-achievements-copy,.fyn-pedigree-copy){max-width:100%;padding:25px 20px!important;}
 body.pv440-detail :is(.fyn-health-hero-copy,.fyn-achievements-copy,.fyn-pedigree-copy) h2{font-size:26px!important;}
 body.pv440-detail :is(.fyn-health-actionbar,.fyn-achievements-actionbar,.fyn-pedigree-actionbar){overflow-x:auto;flex-wrap:nowrap!important;}
 body.pv440-detail :is(.fyn-health-actionbar,.fyn-achievements-actionbar,.fyn-pedigree-actionbar) a{flex:0 0 auto!important;white-space:nowrap;}
 body.pv440-collection .collection-v18-species-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 body.pv440-account .acc279-grid{grid-template-columns:1fr!important;}
 body.pv440-community .v269-zoo-grid{grid-template-columns:1fr;}
 body.pv440-page .acc279-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
 body.pv440-auth .fyn-auth-card{display:grid;grid-template-columns:1fr;}
 body.pv440-auth .fyn-auth-form{padding:25px 19px!important;}
}
@media(max-width:520px){
 body.pv440-page :where(.pv440-page-hero,.acc279-hero){padding:18px 15px!important;}
 body.pv440-detail :is(.fyn-health-panels,.fyn-achievements-panels,.fyn-pedigree-panels){grid-template-columns:1fr!important;}
 body.pv440-collection .collection-v18-species-grid{grid-template-columns:1fr!important;}
 body.pv440-collection .collection-v18-hero{display:grid;gap:16px;}
 body.pv440-collection .collection-v18-pills{flex-wrap:wrap;}
 body.pv440-account .acc279-hero-side{width:100%;min-width:0;}
 body.pv440-admin .diag279-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;}
 body.pv440-admin .diag279-summary article{min-width:0;padding:10px 6px;}
 body.pv440-profile-public .v268-settings-card{padding:16px!important;}
 body.pv440-home .fyn-seo-intro{display:block;}
}
@media(prefers-reduced-motion:reduce){
 body.pv440-page :where(.pv440-section-nav a,.acc279-btn,.v269-zoo-card){animation:none!important;transition:none!important;}
}
/* Guide is visually part of the same family as Care and Trophies, while still
   preserving its step/reward forms and guided progression. */
body.pv440-tutorial .fyn-tutorial-toolbar{
 display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:18px;
 margin:0 0 16px;padding:clamp(22px,3vw,38px)!important;
 border:1px solid var(--pv44-border)!important;border-radius:var(--pv44-radius)!important;
 background:linear-gradient(115deg,#fffdf8,#f3f7ed 72%,#e8f2e5)!important;
 box-shadow:var(--pv44-shadow)!important;
}
body.pv440-tutorial .fyn-tutorial-toolbar h1{font-family:Georgia,serif!important;font-weight:700!important;font-size:clamp(32px,3.1vw,49px)!important;line-height:1.08!important;color:var(--pv44-dark)!important;}
body.pv440-tutorial .fyn-tutorial-toolbar p{max-width:66ch;font-size:14px!important;color:var(--pv44-muted)!important;line-height:1.6!important;}
body.pv440-tutorial .fyn-tutorial-stage>.fyn-tutorial-hero{min-height:270px;border-radius:var(--pv44-radius)!important;overflow:hidden;border:1px solid rgba(12,67,44,.21)!important;}
body.pv440-tutorial .fyn-tutorial-actionbar{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 0;padding:9px;border:1px solid var(--pv44-border);border-radius:16px;background:#fffefa;}
body.pv440-tutorial .fyn-tutorial-actionbar a{display:inline-flex;align-items:center;min-height:43px;border-radius:12px;background:#eef5eb;color:var(--pv44-forest);padding:9px 14px;font-size:13px;font-weight:800;}
body.pv440-tutorial .fyn-v314-tutorial-focus{gap:16px!important;}
body.pv440-tutorial :is(.fyn-v314-tutorial-now,.fyn-v314-tutorial-after){background:#fffefa;border:1px solid var(--pv44-border);border-radius:18px!important;}
@media(max-width:760px){
 body.pv440-tutorial .fyn-tutorial-toolbar{padding:20px 17px!important;}
 body.pv440-tutorial .fyn-tutorial-actionbar{flex-wrap:nowrap;overflow-x:auto;}
 body.pv440-tutorial .fyn-tutorial-actionbar a{flex:0 0 auto;}
}
/* Resolve higher-specificity legacy V4.2 typography / vertical flex-basis rules. */
body.pv440-page.pv420-enabled .az-page :is(.pv440-page-hero,.acc279-hero) h1{
 font-family:Georgia,serif!important;font-weight:700!important;
 font-size:clamp(32px,3.1vw,49px)!important;line-height:1.08!important;
 color:var(--pv44-dark)!important;letter-spacing:-.025em!important;
}
body.pv440-page :is(.pv440-page-hero,.acc279-hero){flex-direction:row!important;}
body.pv440-page.pv420-enabled .az-page :is(.pv440-page-hero,.acc279-hero) p{
 font-size:clamp(13px,1.15vw,15px)!important;line-height:1.62!important;
}
