:root{--night:#0c1a20;--fog:#15313a;--gold:#f2c14e;--gold-soft:#f7dc95;--pumpkin:#e8792b;--parch:#f3e7cb;
  --sl:env(safe-area-inset-left,0px);--sr:env(safe-area-inset-right,0px);--st:env(safe-area-inset-top,0px);--sb:env(safe-area-inset-bottom,0px)}
@font-face{font-family:"Lora";src:url("Lora.ttf") format("truetype");font-weight:600;font-display:swap}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;background:var(--night);color:var(--parch);font-family:"Lora",Georgia,serif;overflow:hidden;overscroll-behavior:none;
  -webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* the game stays clear of phone notches, rounded corners and the home bar */
#stage{position:fixed;top:var(--st);right:var(--sr);bottom:var(--sb);left:var(--sl);background:var(--night)}
#stage:fullscreen{top:0;right:0;bottom:0;left:0;width:100%;height:100%}
#stage:-webkit-full-screen{top:0;right:0;bottom:0;left:0;width:100%;height:100%}
#unity-canvas{width:100%;height:100%;display:block;background:var(--night);touch-action:none;outline:none}
#cover{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 70% 40%,#1d404a 0%,#0c1a20 70%);transition:opacity .6s}
#cover.gone{opacity:0;pointer-events:none}
#poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.55}
#panel{position:relative;text-align:center;padding:28px 34px;max-width:620px;margin:16px;background:rgba(12,26,32,.72);border:2px solid rgba(242,193,78,.55);border-radius:28px;box-shadow:0 10px 50px rgba(0,0,0,.5)}
h1{margin:0 0 8px;font-weight:600;color:var(--gold);font-size:clamp(30px,6vw,56px);line-height:1.05;text-shadow:0 3px 0 rgba(0,0,0,.4)}
.sub{margin:0 0 22px;font-size:clamp(17px,2.4vw,21px)}
#play{font:inherit;font-size:clamp(28px,5vw,44px);color:#fff;background:var(--pumpkin);border:3px solid var(--gold-soft);border-radius:999px;padding:12px 64px;min-height:64px;cursor:pointer;box-shadow:0 6px 0 #a45a2a,0 10px 30px rgba(232,121,43,.45);animation:breathe 2.2s ease-in-out infinite}
#play:active{transform:translateY(4px);box-shadow:0 2px 0 #a45a2a}
@keyframes breathe{50%{transform:scale(1.05)}}
.bar{height:22px;border-radius:999px;background:rgba(247,220,149,.18);border:2px solid rgba(242,193,78,.6);overflow:hidden;margin:6px auto 10px;max-width:420px}
#fill{height:100%;width:0;background:linear-gradient(90deg,var(--gold),var(--gold-soft));border-radius:999px;transition:width .2s}
#msg{margin:0;font-size:18px}
.tiny{margin:18px 0 0;font-size:15px;opacity:.8}
/* big enough for a fingertip (at least 48 pixels tall) */
#home,#full{position:absolute;left:12px;bottom:12px;display:inline-flex;align-items:center;min-height:48px;padding:0 20px;font:inherit;font-size:16px;color:var(--gold-soft);
  background:rgba(12,26,32,.7);border:2px solid rgba(242,193,78,.55);border-radius:999px;text-decoration:none;cursor:pointer}
#home:active,#full:active{background:rgba(12,26,32,.9)}
#full{gap:8px}
#full svg{flex:none}
/* small screens: just the icon, so it never sits on the level names */
@media (max-width:1000px),(max-height:500px){#full{width:48px;padding:0;justify-content:center}#full span{display:none}}
body.playing #home{display:none}
/* the Full screen button only shows on the title and map screens, so it never sits on top of the game */
#full{display:none}
body.playing.menu #full{display:inline-flex}
body.fs #full,#full[hidden]{display:none !important}
/* short screens (phones on their side): a smaller welcome panel so everything fits */
@media (max-height:500px){
  #panel{padding:14px 24px;margin:8px 8px 40px;max-width:min(560px,72vw)}
  h1{font-size:clamp(26px,7vh,40px);margin-bottom:4px}
  .sub{margin-bottom:12px;font-size:16px}
  #play{font-size:28px;padding:8px 52px;min-height:56px}
  .tiny{margin-top:10px;font-size:13px}
  #home{bottom:8px;left:8px;min-height:44px;padding:0 16px;font-size:15px}
}
