/* play.html: the game, full window, with a slim Moonjunk bar */
.play-page { height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: #05080f; }
.bar .home-nav { display: flex; align-items: center; gap: 14px; }
a.chip { display: inline-flex; align-items: center; gap: 0.5em; text-decoration: none; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--gutter); background: var(--ink); border-bottom: 2px solid var(--line); }
.bar .mark img { height: 28px; width: auto; }
.game-name { font: 400 18px/1 var(--display); letter-spacing: 0.02em; color: var(--cream); }
.game-name b { font-weight: 400; color: var(--amber); }
.tools { display: flex; gap: 8px; }
.chip { font: 800 12px/1 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream); background: transparent; border: 0;
  box-shadow: inset 0 0 0 2px var(--line); padding: 10px 14px; border-radius: 999px; cursor: pointer; }
.chip:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold); }
.chip:disabled { opacity: 0.45; cursor: default; }

.stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; }
/* fill exactly the space under the bar: sized only by % height, a canvas falls back to its 2:1 shape and pushes the page (and bar) up */
#unity-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #05080f; outline: none; }
.loader { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 24px; text-align: center;
  background: radial-gradient(ellipse at 50% 40%, #1b2742, var(--night) 70%); transition: opacity 0.5s; }
.loader.done { opacity: 0; pointer-events: none; }
.loader img { width: min(360px, 60vw); height: auto; }
.bar-out { width: min(420px, 70vw); height: 12px; border-radius: 999px; background: rgba(243, 231, 203, 0.12); overflow: hidden; }
.bar-in { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--red), var(--orange), var(--gold)); transition: width 0.25s; }
.pct { font: 800 12px/1 var(--ui); letter-spacing: 0.24em; text-transform: uppercase; color: var(--amber); }
.tip { max-width: 44ch; color: var(--muted); font-size: 15px; min-height: 3em; }

.notice, .error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 32px; text-align: center;
  background: var(--night); z-index: 5; }
.notice[hidden], .error[hidden] { display: none; }
.notice h2 { font-size: clamp(34px, 9vw, 60px); }
.notice p { max-width: 40ch; color: var(--muted); }
.notice .row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.error { color: var(--cream); font-weight: 600; }

.controls { position: fixed; right: 16px; top: 64px; z-index: 20; width: min(420px, calc(100% - 32px)); max-height: calc(100svh - 84px); overflow: auto;
  padding: 22px 22px 24px; border-radius: 16px; background: rgba(11, 17, 32, 0.96); box-shadow: 0 0 0 2px var(--line), 0 24px 60px rgba(0, 0, 0, 0.6); }
.controls[hidden] { display: none; }
.controls h2 { font-size: 30px; margin-bottom: 14px; }
.controls table { width: 100%; border-collapse: collapse; font-size: 14px; }
.controls th { text-align: left; font-weight: 600; color: var(--muted); padding: 7px 8px 7px 0; }
.controls td { padding: 7px 0 7px 8px; white-space: nowrap; color: var(--cream); }
.controls td:last-child { color: var(--muted); font-size: 12.5px; }
.controls tr + tr { border-top: 1px solid var(--line); }
.controls p { margin: 14px 0 16px; font-size: 14px; color: var(--muted); }
kbd { display: inline-block; min-width: 1.9em; padding: 2px 6px; border-radius: 5px; text-align: center; font: 700 12px/1.5 var(--ui);
  background: rgba(243, 231, 203, 0.1); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.4); color: var(--cream); }
@media (max-width: 640px) { .game-name { display: none; } }
@media (max-width: 480px) {
  .bar { gap: 8px; } .bar .mark { display: none; } .tools { gap: 6px; }
  .chip { font-size: 11px; letter-spacing: 0.08em; padding: 9px 11px; }
}
.loader[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.linkish { background: none; border: 0; color: var(--muted); font: 600 14px/1 var(--ui); text-decoration: underline; cursor: pointer; padding: 6px; }
.copied { min-height: 1.4em; font-size: 14px; color: var(--gold); }
#unity-canvas:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
