/* Sick Kitten Game App Runtime V1
   The play route becomes an application surface. This stylesheet deliberately
   does not resize or stretch canvases; each existing game keeps its own engine.
*/
html.sk-game-app-active,
html.sk-game-app-active body{
  width:100%;height:100%;height:100dvh;margin:0;overflow:hidden!important;
  overscroll-behavior:none;background:#0b0907!important;
  -webkit-text-size-adjust:100%;
}
html.sk-game-app-active body{position:fixed;inset:0;display:flex;flex-direction:column;}

/* The website disappears while the picture is running. */
html.sk-game-app-active .sk-nav,
html.sk-game-app-active .sk-game-nav,
html.sk-game-app-active .sk-skip,
html.sk-game-app-active .play-escape,
html.sk-game-app-active .play-top,
html.sk-game-app-active .workshop-crumb,
html.sk-game-app-active .film-hop,
html.sk-game-app-active .house-nav,
html.sk-game-app-active footer,
html.sk-game-app-active .sk-contract-subfoot,
html.sk-game-app-active .sk-foot-nav,
html.sk-game-app-active .skgx,
html.sk-game-app-active .sk-gm-chrome,
html.sk-game-app-active #sk-gm-status,
html.sk-game-app-active #sk-gm-rotate,
html.sk-game-app-active #sk-gm-fullscreen,
html.sk-game-app-active .sk-game-experience-v2,
html.sk-game-app-active .sk-game-mode-ui,
html.sk-game-app-active .sk-help-out{display:none!important;}

/*  Named house chrome only. A body>* catch-all hid unmarked picture
 *  pieces and live controls (Operator camera, Long Road miles, Fever
 *  Walk save). Those stay. Only hops come off the score / play bars. */
html.sk-game-app-active .top > a{display:none!important;}
html.sk-game-app-active .play-bar > a,
html.sk-game-app-active #fw-play-bar > a{display:none!important;}

/* Every game gets a viewport owner without forcing its internal canvas size. */
html.sk-game-app-active .sk-game-app-root,
html.sk-game-app-active .sk-game-app-piece{box-sizing:border-box;}
html.sk-game-app-active .sk-game-app-root{
  width:100%;flex:1 1 auto;min-height:0;max-height:none;
  height:auto;max-width:none;
  margin:0!important;overflow:hidden!important;
}

/* Existing page-specific roots remain responsible for their internal sizing.
   Do not also force 100dvh — that reserved a desktop-tall column while HUD,
   SK-2A and pads still sat in flow, and the picture collapsed to a strip. */
html.sk-game-app-active[data-sk-app-family="climb"] .sk-game-app-root,
html.sk-game-app-active[data-sk-app-family="fever"] .sk-game-app-root,
html.sk-game-app-active[data-sk-app-family="nursery"] .sk-game-app-root,
html.sk-game-app-active[data-sk-app-family="plain"] .sk-game-app-root{
  max-width:none!important;
}

/* Difficulty is a live control. Never let a hide-list swallow it. */
html.sk-game-app-active .sk2a-controls{display:flex!important;}

/* Minimal app controls: intentionally small and out of the way. */
.sk-game-app-controls{
  position:fixed;
  z-index:2147483000;
  top:max(8px,env(safe-area-inset-top,0px));
  right:max(8px,env(safe-area-inset-right,0px));
  display:flex;gap:6px;align-items:center;
  pointer-events:none;
  font-family:"Space Mono",ui-monospace,monospace;
}
.sk-game-app-controls button,
.sk-game-app-controls a{
  pointer-events:auto;
  appearance:none;border:1px solid rgba(201,168,118,.65);
  background:rgba(20,17,15,.88);color:#EDE3D0;
  min-height:36px;padding:0 10px;border-radius:2px;
  font:400 10px/1 "Space Mono",monospace;letter-spacing:.09em;text-transform:uppercase;
  text-decoration:none;cursor:pointer;backdrop-filter:blur(8px);
}
.sk-game-app-controls button:focus-visible,
.sk-game-app-controls a:focus-visible{outline:2px solid #C9A876;outline-offset:2px;}
.sk-game-app-controls .sk-app-exit{border-color:rgba(237,227,208,.35);}

/* Installed-app education/help. This is the only normal fixed modal. */
.sk-game-app-modal[hidden]{display:none!important;}
.sk-game-app-modal{
  position:fixed;inset:0;z-index:2147483001;
  display:grid;place-items:center;
  padding:calc(18px + env(safe-area-inset-top,0px)) calc(18px + env(safe-area-inset-right,0px)) calc(18px + env(safe-area-inset-bottom,0px)) calc(18px + env(safe-area-inset-left,0px));
  background:rgba(8,6,4,.78);
}
.sk-game-app-card{
  width:min(430px,100%);max-height:100%;overflow:auto;
  padding:24px;border:1px solid #4A4136;background:#14110F;color:#EDE3D0;
  box-shadow:0 18px 60px rgba(0,0,0,.55);
}
.sk-game-app-card h2{margin:0 0 8px;font:600 clamp(24px,7vw,34px)/1.05 Fraunces,Georgia,serif;color:#EDE3D0;}
.sk-game-app-card p{margin:10px 0;font:400 15px/1.55 Spectral,Georgia,serif;color:#d8cfba;}
.sk-game-app-card .kicker{font:400 10px/1.4 "Space Mono",monospace;letter-spacing:.16em;text-transform:uppercase;color:#C9A876;}
.sk-game-app-card .steps{margin:14px 0;padding-left:20px;font:400 13px/1.6 "Space Mono",monospace;color:#cfc3ad;}
.sk-game-app-card .actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px;}
.sk-game-app-card button{border:1px solid #C9A876;background:#C9A876;color:#14110F;padding:10px 13px;font:700 10px/1 "Space Mono",monospace;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;}
.sk-game-app-card button.secondary{background:transparent;color:#EDE3D0;border-color:#4A4136;}

/* Arcade pages are body-level games. Keep only their actual game pieces. */
html.sk-game-app-active[data-sk-app-family="arcade"] body{
  display:block!important;padding:0!important;
}
html.sk-game-app-active[data-sk-app-family="arcade"] .sk-game-app-piece#c{
  display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
}
html.sk-game-app-active[data-sk-app-family="arcade"] .sk-game-app-piece.top{
  position:absolute;z-index:30;top:0;left:0;right:0;
  padding-top:env(safe-area-inset-top,0px)!important;
}
html.sk-game-app-active[data-sk-app-family="arcade"] .sk-game-app-piece.hud{position:absolute;z-index:31;}
html.sk-game-app-active[data-sk-app-family="arcade"] .sk-game-app-piece.pad{z-index:32;}
html.sk-game-app-active[data-sk-app-family="arcade"] .sk-game-app-piece.msg{z-index:40;}

/* Long Road: the film frame is the game surface; the intertitle is game-owned. */
html.sk-game-app-active[data-sk-app-family="long-road"] .film-frame{
  width:100%!important;height:100%!important;margin:0!important;max-width:none!important;
}
html.sk-game-app-active[data-sk-app-family="long-road"] #trail{max-width:none!important;}

/* Operator: mission, stage and end card are the game; the ordinary page hint is hidden. */
html.sk-game-app-active[data-sk-app-family="operator"] .mission{position:absolute;z-index:25;top:0;left:0;right:0;padding-top:env(safe-area-inset-top,0px)!important;}
html.sk-game-app-active[data-sk-app-family="operator"] .stage-wrap{width:100%!important;height:100%!important;margin:0!important;}
html.sk-game-app-active[data-sk-app-family="operator"] .hint{display:none!important;}

@media (max-width:720px){
  .sk-game-app-controls button,.sk-game-app-controls a{min-height:34px;padding:0 8px;font-size:9px;}
  .sk-game-app-controls .sk-app-help{display:none;}
}

@media (display-mode: standalone), (display-mode: fullscreen){
  .sk-game-app-controls .sk-app-install{display:none!important;}
}

@media (prefers-reduced-motion:reduce){
  .sk-game-app-modal *{animation:none!important;transition:none!important;}
}
