/* The main toolbar owns a single set of rows. None of its buttons uses a fixed cell. */
body.game-theme.summer-enabled:not(.summer-onboarding) .summer-nav{
 --map-slot83:54px;
 position:fixed;inset:13px var(--play-right,16px) auto auto;
 display:flex;flex-flow:row wrap;justify-content:flex-end;align-items:stretch;gap:6px;
 width:max-content;max-width:var(--toolbar-width83,max(140px,calc(100vw - 250px)));
 height:auto;padding:0;margin:0;box-sizing:border-box;
}
body.game-theme.summer-enabled .summer-nav.map-slot83{padding-inline-end:var(--map-slot83,54px)}
body.game-theme.summer-enabled .summer-nav.toolbar-below83{
 inset:var(--toolbar-start83,80px) 12px auto 12px;width:auto;max-width:none;
}
body.game-theme.summer-enabled .summer-nav>:is(button,a):not(#minimap81){
 position:static!important;inset:auto!important;grid-area:auto!important;
 width:auto!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:44px!important;
 box-sizing:border-box;margin:0!important;padding:7px 10px!important;line-height:1.25!important;
 white-space:normal!important;overflow-wrap:anywhere;text-align:center;transform:none!important;translate:none!important;
}
body.game-theme.summer-enabled.version78 .summer-nav>.neti-trigger78{position:relative!important}
body.game-theme.version78 .summer-nav .neti-trigger78 .neti-badge78{position:static;flex:none;margin-left:2px}
body.game-theme #minimap81:not(.map-docked83){--minimap-size81:clamp(70px,8vw,145px)}
body.game-theme .summer-nav>#minimap81.map-docked83{
 position:absolute!important;inset:auto 3px 0 auto!important;
 width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;
 padding:2px!important;box-shadow:0 2px 8px #130a1790!important;
}
#minimap81.map-docked83 .minimap-picture81{inset:2px}
#minimap81.map-docked83 .minimap-picture81>i{width:8px;height:8px;box-shadow:0 0 0 1px #fff5d8}
#minimap81.map-docked83 .minimap-hint81{top:auto;bottom:calc(100% + 7px);right:0;translate:none}
body.game-theme #minimap81[hidden]{display:none!important}
body.game-theme .neti-toast78{left:var(--toast-left83,auto);top:var(--toast-top83,calc(var(--play-top,116px) + 5px));right:auto}
body.game-theme .neti-toast78[hidden]{display:none!important}

/* The image and both control bars have separate rows on the full map. */
body.game-theme.full-map-mode .map76{
 display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;
 background:#251d2c;
}
body.game-theme.version76.full-map-mode .map76>.map-caption{
 display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:7px 16px;
 position:relative;inset:auto;width:100%;max-width:none!important;margin:0;
 padding:9px max(12px,env(safe-area-inset-right)) 9px max(12px,env(safe-area-inset-left));
 border:0;border-bottom:1px solid #886c82;background:#221b2b;pointer-events:auto;
}
.map-caption .map-heading83{flex:0 1 auto;min-width:0}
body.game-theme.version76 .map76 .map-heading83 h1{margin:2px 0 0;font-size:clamp(19px,3.2vw,28px)!important;line-height:1.15}
body.game-theme.version76 .map76 .map-actions76{min-width:0;gap:6px;align-items:stretch}
body.game-theme.version76 .map76 .map-caption button{
 min-height:44px!important;height:auto!important;max-width:100%!important;line-height:1.25!important;white-space:normal!important;
}
body.game-theme.version76 .map76 .neti-badge78{position:static;margin-left:2px}
body.game-theme.full-map-mode .map76>.summer-map-viewport{position:relative;inset:auto;min-width:0;min-height:0;container-type:size}
body.game-theme.full-map-mode .map76 .summer-map-canvas{
 --map-base-width:max(100%,1200px,calc(100svh * 2.35));min-height:0!important;aspect-ratio:2145/733;
}
@supports(height:100cqh){body.game-theme.full-map-mode .map76 .summer-map-canvas{--map-base-width:max(100%,1200px,calc(100cqh * 2.9277))}}
body.game-theme.version76 .map76>.map-guide76{
 position:relative;inset:auto;translate:none;width:100%;max-width:none;margin:0;
 justify-content:space-between;gap:6px 14px;padding:8px 12px max(8px,env(safe-area-inset-bottom));
 border:0;border-top:1px solid #886c82;background:#2b2233;box-shadow:none;
}
body.game-theme.version76 .map76 .map-guide76 button{min-height:42px!important;max-width:52%;white-space:normal!important}
body.game-theme.version76 .map76 .map-label76{min-width:0;width:max-content;max-width:min(208px,60vw);white-space:normal;text-align:center}

/* Keep the close button on its own row, above the scrollable profile. */
body.game-theme #game-profile82[open]{display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
#game-profile82 .profile-bar82{position:static;min-width:0}
body.game-theme.version76 #app #game-profile82 .player-profile{min-height:0!important;overflow:auto;overscroll-behavior:contain;scroll-padding:12px}
#game-profile82 .profile-bar82 button{max-width:60%;white-space:normal!important;line-height:1.2!important}
body.game-theme #game-profile82 .stage-back button{white-space:normal!important;min-height:44px!important}

/* Full-size touch targets and real wrap instead of flowing under another card. */
body.game-theme .faculty-entry-panel82{
 bottom:max(var(--play-bottom,24px),env(safe-area-inset-bottom));
 max-height:calc(100dvh - var(--play-top,140px) - var(--play-bottom,24px));overflow:auto;overscroll-behavior:contain;
}
body.game-theme .faculty-entry-panel82 .actions>button{flex:1 1 auto;min-width:0;min-height:44px;white-space:normal!important}
body.game-theme .life-links,body.game-theme .room-shortcut{flex-wrap:wrap}
body.game-theme :is(.life-links,.room-shortcut) button{min-width:0!important;max-width:100%;white-space:normal!important;line-height:1.25!important}
body.game-theme .map76 .map-pin76:focus-visible{outline-offset:1px}
body.game-theme.version76 .map76 .map-pin76{width:44px!important;height:44px!important}

@media(max-width:900px){
 body.game-theme.summer-enabled:not(.summer-onboarding) .summer-nav:not(.toolbar-below83){inset-block-start:10px;max-width:var(--toolbar-width83,max(140px,calc(100vw - 175px)))}
 body.game-theme.summer-enabled .summer-nav>:is(button,a):not(#minimap81){font-size:11px!important;padding-inline:7px!important}
}
@media(max-width:760px) and (orientation:portrait){
 body.game-theme.summer-enabled:not(.summer-onboarding) .summer-nav:not(.toolbar-below83),
 body.game-theme.summer-enabled:not(.summer-onboarding) .summer-nav.toolbar-below83{
  inset:auto max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  inset-block-start:auto;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:minmax(44px,auto);
  width:auto;max-width:none;block-size:max-content;gap:5px;justify-content:stretch;align-items:stretch;
 }
 body.game-theme.summer-enabled .summer-nav>:is(button,a):not(#minimap81){font-size:11px!important;padding:6px 4px!important}
 body.game-theme.summer-enabled .summer-nav.map-slot83{padding-inline-end:0}
 body.game-theme.summer-enabled .summer-nav.map-slot83>.neti-trigger78{
  grid-row:2;grid-column:1 / span 2;align-self:end;justify-self:start;min-width:120px!important;
 }
 body.game-theme .summer-nav>#minimap81.map-docked83{
  grid-row:2;grid-column:3;justify-self:end;align-self:end;
  position:relative!important;inset:auto!important;
 }
 body.game-theme .faculty-entry-panel82{bottom:max(var(--play-bottom,100px),env(safe-area-inset-bottom));max-height:calc(100dvh - var(--play-top,190px) - var(--play-bottom,100px) - 6px)}
 body.game-theme .faculty-entry-panel82 .actions>button{flex:1 1 95px}
 body.game-theme .life-links>button{flex:1 1 min(130px,100%);min-height:42px!important}
 body.game-theme.version76 .park-dock83{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;
  left:12px;right:12px;max-height:calc(100dvh - max(var(--play-top,162px),var(--park-start83,0px)) - var(--play-bottom,100px) - 10px);
  overflow:auto;overscroll-behavior:contain;scroll-padding:6px;
 }
 .park-dock83>.campus-hotspots{
  position:static;display:grid;grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-columns:subgrid;gap:6px;
  border-bottom:1px solid #846e7e;padding-bottom:6px;pointer-events:auto;z-index:auto;
 }
 body.game-theme.version76 .park-dock83 :is(.campus-hotspots>button,.park-flowers>button,.bouquet-status>button,.romance-meet>button,.park-dock83>button){
  min-height:44px!important;max-width:100%!important;padding:5px!important;margin:0!important;
  white-space:normal!important;overflow-wrap:anywhere;
 }
 body.game-theme.version76 .park-dock83 .campus-hotspots>button{
  display:flex;align-items:center;justify-content:center;gap:4px;position:static;width:auto;height:auto;
  background:#2f2637!important;border:1px solid #a78b90!important;color:#fff2da!important;
 }
 .park-dock83 .campus-hotspots>button:focus-visible{outline-offset:-3px}
 body.game-theme .park-dock83 .target-marker{
  position:static;min-width:0;height:auto;padding:0;border:0;translate:none;scale:none;
  box-shadow:none;background:none;color:#f3ca86;font:700 16px/1 system-ui;pointer-events:none!important;
 }
 body.game-theme .park-dock83 .target-label{
  position:static;min-width:0;width:auto;padding:0;border:0;translate:none;opacity:1;
  box-shadow:none;background:none;color:inherit;font:700 10px/1.22 system-ui;overflow-wrap:anywhere;
 }
 body.game-theme:has(.place-park) .park-dock83 :is(.park-flowers,.bouquet-status,.romance-meet){
  position:static!important;inset:auto!important;width:auto!important;max-width:none!important;grid-column:1/-1;
  transform:none!important;translate:none!important;
 }
 body.game-theme .park-dock83 .romance-meet>button{width:100%}
}
@media(max-width:640px){
 #game-profile82 .profile-board76{grid-template-columns:minmax(0,1fr)}
 body.game-theme.version76.full-map-mode .map76>.map-caption{padding:6px 8px;gap:6px}
 .map-caption .map-heading83>span{display:none}
 body.game-theme.version76 .map76 .map-actions76{flex:1 1 230px}
 body.game-theme.version76 .map76 .map-actions76>button{flex:1 1 65px;padding-inline:5px!important}
 body.game-theme.version76 .map76>.map-guide76{padding-inline:8px}
}
@media(max-height:550px) and (orientation:landscape){
 .pass-scene81{--intro-view-x81:50vw;--pass-art-x81:.22}
 body.game-theme .pass-scene81>.scene-background65{object-position:center!important}
 body.game-theme .pass-scene81>.novel-dialogue{inset:auto auto 12px 12px!important;width:min(440px,52vw)!important;max-height:calc(100svh - 84px)!important;overflow:auto!important}
 body.game-theme.version76 .map76 .map-heading83>span{display:none}
 body.game-theme.version76 .map76 .map-heading83 h1{font-size:19px!important}
}
@media(max-width:760px) and (orientation:portrait) and (max-height:550px){
 body.game-theme.summer-enabled:not(.summer-onboarding){--play-left:12px;--play-right:12px;--play-top:162px}
 body.game-theme .faculty-entry-panel82{max-height:calc(100dvh - 162px - var(--play-bottom,100px));padding:10px}
}
