:root { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: #e9f1ff; background: #05070c; font: 18px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; overflow: hidden; }

/* The maze fills the screen; a swipe anywhere steers. */
#deep { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#view { display: block; width: 100%; height: 100%; }
.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 1rem; align-items: center; padding: max(.6rem, env(safe-area-inset-top)) 1rem .6rem;
  background: linear-gradient(#000a, #0000); font-variant-numeric: tabular-nums; pointer-events: none; z-index: 2; }
#level { font-weight: 700; }
#here { color: #9fb2cc; margin-left: auto; }
#mute { pointer-events: auto; font-size: 1.2rem; border: 1px solid #ffffff40; border-radius: 8px; background: #0006; color: inherit; padding: .1rem .5rem; cursor: pointer; }
.hint { position: absolute; left: 1rem; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); margin: 0 auto; max-width: 34rem; padding: .6rem .9rem; z-index: 2;
  border-radius: 10px; background: #000a; color: #c9d8ee; font-size: .9rem; text-align: center; pointer-events: none; transition: opacity 1s; }

/* The map, in Endless Maze's colours, over the 3D view. */
#overview { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  padding: 3.2rem 1rem 5.5rem; background: #0d1420e0; pointer-events: none; transition: opacity .35s; }
#map { width: min(92vw, calc(100vh - 11.5rem)); aspect-ratio: 1; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; margin: 0; font-size: .95rem; }
.legend .you { color: #6ee7ff; }
.legend .others { color: #f2f2f2; }
.legend .monster { color: #ff3b2f; }
.legend .goal { color: #ffd76a; }

/* The Start screen, and the messages for being caught and finishing. */
#cover { position: fixed; inset: 0; display: grid; place-items: center; padding: 1.5rem; background: #0d1420f2; z-index: 5; }
#cover.caught { background: #3a0008f2; }
#card { max-width: 30rem; text-align: center; animation: drop .4s ease-out; }
#message { margin: 0; font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 800; }
#detail { margin: .4rem 0 1rem; color: #9fb2cc; }
#start { font: inherit; font-size: 1.4rem; font-weight: 800; padding: .7rem 3rem; border: 0; border-radius: 14px; background: #ffd76a; color: #1a1300; cursor: pointer; box-shadow: 0 0 24px #ffd76a66; }
#keys { color: #7d8ea8; font-size: .9rem; }
@keyframes drop { from { opacity: 0; transform: translateY(-1rem); } to { opacity: 1; transform: none; } }
