/* Kolton's Day — page + touch controls */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; height: 100dvh; background: #05060a; color: #f1f3ff; overflow: hidden;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body { touch-action: none; overscroll-behavior: none; }
#kg-root { position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
body.kg-force-landscape #kg-root { transform-origin: 0 0; transform: rotate(90deg); }
.kg-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
body.kg-touch-on.kg-portrait .kg-stage { align-items: flex-start; padding-top: 8vh; }
#kg-canvas { display: block; background: #05060a; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; image-rendering: pixelated; }
.kg-links { position: absolute; left: 10px; bottom: 8px; z-index: 5; font-size: 12px; display: flex; gap: 14px; opacity: .75; }
.kg-links a { color: #8d96b8; text-decoration: none; padding: 4px 2px; }
.kg-links a:hover, .kg-links a:focus-visible { color: #fff; }
a:focus-visible, button:focus-visible { outline: 2px solid #5ad7ff; outline-offset: 2px; }
body.kg-playing .kg-links, body.kg-touch-on .kg-links { display: none; }
.kg-top { position: absolute; top: 6px; right: 8px; z-index: 6; display: flex; gap: 6px; }
.kg-top button { width: 34px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(10,14,34,.6);
  color: #fff; font: 700 14px ui-monospace, Menlo, Consolas, monospace; cursor: pointer; padding: 0; }
.kg-top button.off { color: #ff8fa3; text-decoration: line-through; }
.kg-touch { display: none; }
body.kg-touch-on .kg-touch { display: block; }
.kg-pad { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 6; display: flex; gap: 14px; }
.kg-pad.l { left: max(14px, env(safe-area-inset-left)); }
.kg-pad.r { right: max(14px, env(safe-area-inset-right)); align-items: flex-end; }
.kg-pad button { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: rgba(20,26,60,.45);
  color: #fff; font: 800 13px system-ui, sans-serif; letter-spacing: .04em; padding: 0; touch-action: none; }
.kg-pad.l button { font-size: 22px; }
.kg-pad button.jump { width: 72px; height: 72px; background: rgba(56,201,239,.35); border-color: rgba(90,215,255,.7); }
.kg-pad button.act { background: rgba(255,225,77,.25); border-color: rgba(255,225,77,.7); margin-bottom: 34px; }
.kg-pad button.on { background: rgba(255,255,255,.45); }
.kg-msg { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-size: 16px; color: #c8cce0; }
.kg-exit { display: none; position: absolute; top: 6px; left: 8px; z-index: 6; width: 34px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(60,12,30,.55); color: #fff; font: 700 14px system-ui, sans-serif; padding: 0; }
body.kg-touch-on .kg-exit { display: block; }
/* rotated stage (phone held upright): the root's right edge is the phone's bottom (home indicator) */
body.kg-force-landscape .kg-pad { bottom: 12px; }
body.kg-force-landscape .kg-pad.l { left: max(14px, env(safe-area-inset-top)); }
body.kg-force-landscape .kg-pad.r { right: calc(14px + env(safe-area-inset-bottom)); }
body.kg-force-landscape .kg-top { right: calc(8px + env(safe-area-inset-bottom)); }
