/* Existing generated landscape target: one nav row; real controls move to a
   native details menu. No duplicate controls, hidden prices or rerolled state. */
body[data-screen=research]{grid-template-columns:140px minmax(0,1fr) 100px;grid-template-rows:60px minmax(0,1fr)}
body[data-screen=research] #mast{display:contents}
body[data-screen=research] #brand-home{grid-column:1;grid-row:1;align-self:center;margin:0 0 0 12px;padding:0;min-width:0;min-height:44px;gap:5px;z-index:8}
body[data-screen=research] #brand-home .brand-mark{width:30px;height:30px;flex:none}
body[data-screen=research] #brand-home strong{font-size:14px;white-space:nowrap}
body[data-screen=research] #brand-home small{font-size:10px;color:#d0b995}
body[data-screen=research] #workshop-nav{grid-column:2;grid-row:1;padding:7px 5px;margin:0;gap:5px;align-self:stretch;background:#0c0d1de8;border-bottom:1px solid #775681}
body[data-screen=research] #workshop-nav button{min-height:44px;min-width:0;padding:4px 3px;gap:0;flex-direction:row;font-size:clamp(11px,1.65vw,18px)}
body[data-screen=research] #workshop-nav button span{font-size:inherit;white-space:nowrap}
body[data-screen=research] #workshop-nav :is(img,svg){display:none}
body[data-screen=research] #research-screen{grid-column:1/-1;grid-row:2;grid-template-rows:0 minmax(0,1fr) auto auto;gap:5px;padding:5px max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
body[data-screen=research] #research-screen>.research-heading{display:none}
body[data-screen=research] #research-screen:not([data-phase=idle]){grid-template-rows:0 minmax(0,1fr) 0 0}
body[data-screen=research] #research-screen .research-pity{width:min(100%,600px);padding:3px 10px;gap:20px;background:#101022cc}
body[data-screen=research] #research-screen .pity-gauge{font-size:11px;line-height:1.1;gap:1px 6px}
body[data-screen=research] #research-screen .pity-gauge :is(label,strong){font-size:inherit;line-height:inherit}
body[data-screen=research] #research-screen .pity-gauge progress{height:4px}
body[data-screen=research] .research-actions{gap:16px}
body[data-screen=research] .hatch-command{display:block;width:min(38vw,340px)}
body[data-screen=research] #research-screen :is(#hatch-egg,#hatch-ten){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-height:56px;padding:5px 18px;font-size:clamp(21px,3vw,30px);line-height:1.1}
body[data-screen=research] :is(#egg-price,#egg-ten-price){font-size:12px;line-height:1.25;color:inherit;text-shadow:none}
body[data-screen=research] #research-trial{display:none}
#research-tools{grid-row:1;grid-column:3;align-self:center;position:relative;z-index:35;pointer-events:auto;margin:0 8px 0 2px;min-width:0}
#research-tools[hidden]{display:none}
#research-tools>summary{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:44px;padding:4px 10px;list-style:none;cursor:pointer;color:#fae9ca;background:#1a1328;border:1px solid #866398;font-size:23px}
#research-tools>summary::-webkit-details-marker{display:none}
#research-tools .research-dna{position:static;display:flex;margin:0;padding:0;gap:4px;border:0;background:none;font-size:11px;color:#d9cae5;white-space:nowrap}
#research-tools .research-dna strong{font-size:16px;color:#ffd761}
.research-tools-panel{position:absolute;top:calc(100% + 5px);right:0;display:grid;gap:5px;width:220px;max-width:calc(100vw - 20px);max-height:calc(100dvh - 75px - env(safe-area-inset-bottom));overflow:auto;padding:8px;background:#121020f5;border:1px solid #9876ab;box-shadow:0 8px 24px #000b}
#research-tools:not([open]) .research-tools-panel{display:none}
body[data-screen=research] #research-tools .utilities{display:grid;gap:5px;position:static;margin:0;padding:0;border:0;background:none}
#research-tools .utilities>:is(a,#connection,#wallet){display:none!important}
body[data-screen=research] #research-tools .research-tools-panel button{min-height:44px;width:100%;min-width:0;margin:0;padding:6px 16px;color:#fff2dc;background:#21182e;border:1px solid #80658d;font-size:14px;font-weight:800;pointer-events:auto}
#research-tools :is(summary,button):focus-visible{outline:3px solid #fff;outline-offset:-4px}
@media(max-width:690px){
 body[data-screen=research]{grid-template-columns:115px minmax(0,1fr) 85px;grid-template-rows:56px minmax(0,1fr)}
 body[data-screen=research] #brand-home{margin-left:7px;gap:3px}
 body[data-screen=research] #brand-home .brand-mark{width:24px;height:24px}
 body[data-screen=research] #brand-home strong{font-size:12px}
 body[data-screen=research] #brand-home small{font-size:9px}
 body[data-screen=research] #workshop-nav{gap:3px;padding:5px 2px}
 body[data-screen=research] #workshop-nav button{font-size:11px;min-height:44px;padding:4px 0}
 #research-tools{margin-right:6px}
 #research-tools>summary{padding:4px 6px}
 body[data-screen=research] #research-screen{padding-left:10px;padding-right:10px}
}
@media(max-width:510px) and (orientation:portrait){
 body[data-screen=research]{grid-template-columns:minmax(0,1fr) 90px;grid-template-rows:54px 50px minmax(0,1fr)}
 body[data-screen=research] #workshop-nav{grid-column:1/-1;grid-row:2}
 body[data-screen=research] #research-screen{grid-row:3}
 #research-tools{grid-column:2}
 body[data-screen=research] .pity-gauge{font-size:10px}
 body[data-screen=research] .research-pity{gap:10px;padding:4px 6px}
}
