/* R63 source-backed comic faces. Native labels, states and hit targets remain
   independent of the bitmap. The face leans right; labels stay legible. */
body:is([data-screen=research],[data-screen=dinos]) :is(#workshop-nav button,.research-heading button,.screen-heading button,.utilities button,#research-trial,#hatch-egg,#hatch-continue,#select-dino,#open-dino-traits,#dino-options>summary),
body #research-details button{
  --comic-face:url('./assets/ui/comic-button-dark-r63.webp');
  isolation:isolate;position:relative;clip-path:none;border:0;border-radius:0;
  background:transparent;box-shadow:none;color:#fff8ed;text-shadow:1px 2px #090819;
  font-style:italic;font-weight:900;overflow:visible;
}
body:is([data-screen=research],[data-screen=dinos]) :is(#workshop-nav button,.research-heading button,.screen-heading button,.utilities button,#research-trial,#hatch-egg,#hatch-continue,#select-dino,#open-dino-traits,#dino-options>summary)::before,
body #research-details button::before{
  content:'';position:absolute;inset:1px 5px;z-index:-1;clip-path:none;
  background:var(--comic-face) center/100% 100% no-repeat;
  box-shadow:none;transform:skewX(-8deg);pointer-events:none;
}
body:is([data-screen=research],[data-screen=dinos]) :is(#hatch-egg,#hatch-continue),
body:is([data-screen=research],[data-screen=dinos]) #workshop-nav button[aria-current=page]{
  --comic-face:url('./assets/ui/comic-button-gold-r63.webp');
  background:transparent;color:#160e18;text-shadow:none;box-shadow:none;
}
body:is([data-screen=research],[data-screen=dinos]) #workshop-nav button[aria-current=page]::before{
  background:var(--comic-face) center/100% 100% no-repeat;box-shadow:none;
}
body:is([data-screen=research],[data-screen=dinos]) #research-screen :is(#hatch-egg,#hatch-continue){--comic-face:url('./assets/ui/comic-button-gold-r63.webp');color:#160e18;text-shadow:none}
body:is([data-screen=research],[data-screen=dinos]) .utilities button{min-width:80px;white-space:nowrap;overflow:visible}
body:is([data-screen=research],[data-screen=dinos]) #mast .utilities button{min-width:88px;min-height:44px;padding:6px 14px;font-size:11px;white-space:nowrap}
body:is([data-screen=research],[data-screen=dinos]) #hatch-egg{min-height:76px;padding:12px 34px;font-size:clamp(24px,3.5vw,36px);letter-spacing:-1px}
body:is([data-screen=research],[data-screen=dinos]) #hatch-egg::before{inset:0 3px;transform:skewX(-8deg)}
body:is([data-screen=research],[data-screen=dinos]) #workshop-nav{gap:9px;padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
body:is([data-screen=research],[data-screen=dinos]) #workshop-nav button{min-height:58px;padding-left:15px;padding-right:15px}
body:is([data-screen=research],[data-screen=dinos]) .utilities button{padding-left:14px;padding-right:14px}
body:is([data-screen=research],[data-screen=dinos]) .research-heading .back{min-width:56px}
body:is([data-screen=research],[data-screen=dinos]) #research-info{padding-left:20px;padding-right:20px}
body:is([data-screen=research],[data-screen=dinos]) :is(#hatch-egg,#hatch-continue):disabled{filter:grayscale(.7);opacity:.6}
body:is([data-screen=research],[data-screen=dinos]) :is(#workshop-nav button,.research-heading button,.screen-heading button,.utilities button,#research-trial,#hatch-egg,#hatch-continue,#select-dino,#open-dino-traits,#dino-options>summary):active:enabled{translate:0 2px}
body:is([data-screen=research],[data-screen=dinos]) :is(#workshop-nav button,.research-heading button,.screen-heading button,.utilities button,#research-trial,#hatch-egg,#hatch-continue,#select-dino,#open-dino-traits,#dino-options>summary):focus-visible{outline:2px solid #fff;outline-offset:-4px}
@media(max-width:600px){
  body:is([data-screen=research],[data-screen=dinos]) #workshop-nav{gap:3px;padding-left:8px;padding-right:8px}
  body:is([data-screen=research],[data-screen=dinos]) #workshop-nav button{padding:4px 3px;min-height:56px}
  body:is([data-screen=research],[data-screen=dinos]) #workshop-nav button::before{inset:1px 2px;transform:skewX(-5deg)}
  body:is([data-screen=research],[data-screen=dinos]) .utilities button{padding-left:10px;padding-right:10px}
  body:is([data-screen=research],[data-screen=dinos]) #research-info{padding-left:13px;padding-right:13px}
  body:is([data-screen=research],[data-screen=dinos]) .research-heading .back{min-width:48px}
  body:is([data-screen=research],[data-screen=dinos]) #hatch-egg{min-height:68px;font-size:30px}
}
@media(max-height:570px){
  body:is([data-screen=research],[data-screen=dinos]) #workshop-nav button{min-height:44px}
  body:is([data-screen=research],[data-screen=dinos]) #hatch-egg{min-height:58px;font-size:27px}
}
