/* Project-specific look on top of base.css. Change the colours here. */
:root {
  --accent: #d8473f;      /* buttons, links, active tab */
  --accent-dark: #fff;    /* text on accent-coloured buttons */
}

/* Start screen picture behind the play button, darkened */
.player .poster { filter: brightness(.45) contrast(1.1) grayscale(.3); }

/* Key hint on the start screen (W A S D) */
.wasd { display: grid; grid-template-columns: repeat(3, 24px); grid-template-rows: repeat(2, 22px); gap: 3px; }
.wasd kbd { border: 1px solid var(--fg); background: #00000059; border-radius: 4px; display: flex; justify-content: center; align-items: center; font-family: inherit; font-size: 12px; }
.wasd .w { grid-area: 1 / 2; } .wasd .a { grid-area: 2 / 1; } .wasd .s { grid-area: 2 / 2; } .wasd .d { grid-area: 2 / 3; }

/* 3D viewer */
.viewer model-viewer { width: 100%; height: 26rem; background: radial-gradient(#2a2a30, #0d0d10); border-radius: 12px; }

/* Monospace box, e.g. for a small diagram */
.mono-box { font-family: ui-monospace, Menlo, monospace; font-size: 14px; line-height: 1.5; color: var(--fg); background: #0d0d10; border-radius: 12px; padding: 18px; overflow-x: auto; white-space: pre; margin: 0; }

/* ---- Game on phones --------------------------------------------------------- */
/* Touches on the game play it; everywhere else the page scrolls normally. */
#unity-canvas { touch-action: none; }
.game-exit { display: none; }

/* Full-screen mode: Vollbild, or the phone turned sideways while playing */
.player.is-full { position: fixed; inset: 0; z-index: 100; width: 100vw; height: 100vh; aspect-ratio: auto;
                  background: #000; display: flex; align-items: center; justify-content: center; }
.player.is-full canvas { width: min(100vw, calc(100vh * 16 / 9)); height: min(100vh, calc(100vw * 9 / 16)); }
@supports (height: 100dvh) {
  .player.is-full { height: 100dvh; }
  .player.is-full canvas { width: min(100vw, calc(100dvh * 16 / 9)); height: min(100dvh, calc(100vw * 9 / 16)); }
}
.player.is-full .game-exit { display: grid; place-items: center; position: absolute; z-index: 3;
  top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right));
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #ffffff55; background: #00000080; color: #fff; font-size: 15px; cursor: pointer; }
body.game-full { overflow: hidden; }
body.game-full .bar, body.game-full .to-top { visibility: hidden; }

/* iPhone, once per visit when turned sideways: add to home screen for true fullscreen */
.home-hint { position: absolute; z-index: 3; left: 50%; top: max(10px, env(safe-area-inset-top)); transform: translateX(-50%);
  max-width: min(90%, 420px); background: #141418ee; border: 1px solid var(--card-line); border-radius: 10px;
  padding: 8px 36px 8px 12px; color: var(--fg); font-size: 13px; line-height: 1.4; text-align: left; }
.home-hint button { position: absolute; right: 6px; top: 4px; background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; }

/* Tab key hint on the start screen (inventory) */
.tab-key kbd { border: 1px solid var(--fg); background: #00000059; border-radius: 4px; display: flex; justify-content: center; align-items: center;
               font-family: inherit; font-size: 12px; height: 22px; padding: 0 10px; }
