/* propik: the game canvas full screen, paint mapped on the plane, the game's own HUD. */
@font-face { font-family: BSS; src: url(/fonts/bss-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: STM; src: url(/fonts/stm-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
:root {
  --bg: #2a58e0; --ink: #fff; --accent: #f0e060;
  --font-display: BSS, 'Arial Narrow', sans-serif; --font-body: BSS, 'Arial Narrow', sans-serif;
  --hud: #f0e060; --line: #101010; --paint-ink: #2b1c0f; --paint-red: #c4261c;
}
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: linear-gradient(#1a49d6, #7ba0f7); -webkit-tap-highlight-color: transparent; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- paint on the fuselage (900x360 layout, mapped by matrix3d) ---------- */
/* markings are one generated sheet (img/paint.webp 1024x900): green roundel, blue roundel, hazard hatch */
#paintwrap { position: fixed; inset: 0; pointer-events: none; overflow: hidden; visibility: hidden; }
.paint { position: absolute; left: 0; top: 0; width: 900px; height: 360px; transform-origin: 0 0; will-change: transform;
  display: grid; grid-template-columns: 150px 1fr 196px; align-items: center; gap: 0 20px; padding: 14px 22px; }
.paint.is-live a, .paint.is-live button, .paint.is-live code { pointer-events: auto; }
.roundel { display: grid; justify-items: center; gap: 4px; text-decoration: none; color: var(--paint-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.roundel__disc { position: relative; display: grid; place-items: center; width: 146px; aspect-ratio: 1;
  border-radius: 50%; }  /* the hit area: the disc itself is cardboard in 3D under it */
.roundel--pump .roundel__disc { width: 190px; }
.roundel__disc img { opacity: 0; width: 46%; height: 46%; }
.roundel__cap { white-space: nowrap; text-align: center; font: 800 32px/1 var(--font-display); letter-spacing: .08em; }
.roundel--pump .roundel__cap { font-size: 42px; color: #1b5e2c; }
.roundel.is-off { opacity: 1; cursor: default; }
.roundel.is-off .roundel__cap::after { content: 'AT LAUNCH'; display: block; font-size: .55em; letter-spacing: .16em; margin-top: 3px; opacity: .8; }
.reg { display: grid; justify-items: start; align-content: center; gap: 3px; min-width: 0; }
.reg__ticker, .reg__label, .reg__ca { mix-blend-mode: multiply; }
.reg__ticker { margin: 0; font: 800 70px/.9 var(--font-display); color: var(--paint-red); letter-spacing: .02em; }
.reg__label { margin: 4px 0 0; font: 800 22px/1 var(--font-display); letter-spacing: .3em; color: var(--paint-ink); }
.reg__ca { display: block; width: 22ch; font: 38px/1.1 STM, ui-monospace, monospace; color: var(--paint-ink); word-break: break-all;
  overflow-wrap: anywhere; user-select: all; cursor: text; }
.reg__ca.is-off { opacity: 1; cursor: text; width: auto; font-size: 32px; word-break: normal; }
/* Copy = the painted access hatch: "PUSH TO COPY" stencilled in its yellow field */
.reg__copy { position: relative; margin-top: 6px; width: 300px; height: 111px; min-height: 0; padding: 0 0 2px; border: 0; cursor: pointer;
  background: url(/img/paint.webp) 0 100% / 100% 237.47% no-repeat; color: #17130a;
  font: 800 32px/1 var(--font-display); letter-spacing: .1em; display: grid; place-items: center;
  transition: transform .6s cubic-bezier(.25, 1.6, .45, 1), filter .6s ease; will-change: transform; }
.reg__copy [data-copy-text] { display: none; }
.reg__copy::after { content: 'PUSH TO COPY'; }
.reg__copy.is-copied::after { content: 'LOGGED IN THE BOOK'; font-size: 26px; }
.reg__copy.is-copied { animation: hatch .5s cubic-bezier(.25, 1.6, .45, 1); }
@keyframes hatch { 0% { transform: scale(.92); filter: brightness(1.25); } 100% { transform: scale(1); filter: none; } }
.reg__copy.is-failed::after { content: 'SELECT AND COPY'; }
.reg__copy:hover { transform: translateY(-4px) scale(1.03); }
.reg__copy:active { transform: translateY(3px) scale(.97); filter: brightness(.88); transition: transform .035s ease-out, filter .035s; }
.reg__copy:focus-visible { outline: 4px solid #17130a; outline-offset: 4px; }
.reg__copy.is-off { opacity: 1; cursor: default; filter: saturate(.55); }
.reg__copy.is-off::after { content: 'COPY AT LAUNCH'; }
.reg__copy.is-off:hover, .reg__copy.is-off:active { transform: none; filter: saturate(.55); }
.is-phone .paint { grid-template-columns: 150px 1fr 178px; padding: 6px 12px; gap: 0 10px; }
.is-phone .reg { gap: 1px; }
.is-phone .reg__ticker { font-size: 54px; }
.is-phone .reg__label { display: none; }
.is-phone .reg__ca { width: 15ch; font-size: 44px; line-height: 1.04; }
.is-phone .reg__copy { width: 250px; height: 92px; font-size: 30px; margin-top: 4px; }
.is-phone .reg__copy.is-copied::after { font-size: 22px; }
.is-phone .roundel__disc { width: 142px; }
.is-phone .roundel--pump .roundel__disc { width: 174px; }
.is-phone .roundel__cap { font-size: 38px; }
.is-phone .roundel--pump .roundel__cap { font-size: 44px; }

/* ---------- HUD: old-game yellow type with a black outline ---------- */
.hud { position: fixed; inset: 0; pointer-events: none; color: var(--hud); font-family: var(--font-display); font-weight: 800;
  -webkit-text-stroke: 6px var(--line); paint-order: stroke fill; text-shadow: 0 4px 0 var(--line); letter-spacing: .04em; }
.hud a, .hud button, .hud input, .hud label { pointer-events: auto; }
.hud p { margin: 0; }
.hud__top { position: absolute; top: max(18px, env(safe-area-inset-top)); left: 50%; translate: -50% 0; display: grid; justify-items: center; gap: 2px; text-align: center; width: max-content; max-width: 94vw; }
.hud__claim { font-size: clamp(26px, 2.6vw, 44px); line-height: 1; }
.hud__goal { font-size: clamp(16px, 1.25vw, 22px); color: #fff; -webkit-text-stroke-width: 5px; }
.hud__say { position: absolute; left: 50%; top: 30%; translate: -50% 0; font-size: clamp(40px, 5vw, 88px); line-height: 1; opacity: 0; white-space: nowrap; }
.hud__say.is-on { animation: say 1.15s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes say { 0% { opacity: 0; transform: scale(.5) rotate(-4deg); } 14% { opacity: 1; transform: scale(1.08) rotate(2deg); } 24% { transform: scale(1) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-24px); } }
.hud__bar { position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 34px; padding: 0 20px; }
.hud__stats { display: flex; gap: 22px; font-size: 24px; align-items: center; }
.hud__stats b { color: #fff; font-size: 30px; }
.hud__parts { color: #fff; font-family: STM, monospace; font-size: 22px; letter-spacing: .08em; -webkit-text-stroke-width: 4px; }
.hud button, .hud__go { min-height: 48px; padding: 4px 10px; background: none; border: 0; color: inherit; font: inherit; font-size: 28px; letter-spacing: .06em;
  -webkit-text-stroke: inherit; paint-order: stroke fill; text-shadow: inherit; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.hud button:hover, .hud__go:hover { transform: translateY(-3px) scale(1.06); }
.hud button:active, .hud__go:active { transform: scale(.94); transition-duration: .035s; }
.hud__tricks { display: flex; gap: 4px; }
.hud__tricks i { font-style: normal; color: #fff; }
.hud__write { display: flex; align-items: center; gap: 8px; font-size: 22px; }
.hud__write input { width: 9.5em; min-height: 46px; padding: 2px 4px; background: none; border: 0; border-bottom: 4px solid var(--hud); color: #fff;
  font: 800 28px/1 var(--font-display); letter-spacing: .06em; -webkit-text-stroke: 4px var(--line); paint-order: stroke fill; text-transform: lowercase; }
.hud__write input::placeholder { color: rgba(255, 255, 255, .8); }
.hud__write input:focus-visible { border-bottom-color: #fff; }
.hud__go { color: #fff; font-size: 32px; }
[data-page="field"] .hud__go, [data-page="lost"] .hud__go--up { font-size: 44px; color: var(--hud); }
.hud__go--land::after { content: ' \2193'; }
.hud__go--up::after { content: ' \2191'; }
.hud__lore { position: absolute; left: 50%; top: calc(max(18px, env(safe-area-inset-top)) + clamp(40px, 3.6vw, 62px)); translate: -50% 0; width: min(54ch, 92vw); text-align: center; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.3; color: #fff; -webkit-text-stroke-width: 5px; }
[data-page="home"] .hud__go--up, [data-page="home"] .hud__lore { display: none; }
[data-page="field"] .hud__go--land, [data-page="field"] .hud__tricks, [data-page="field"] .hud__write, [data-page="field"] .hud__goal, [data-page="field"] .hud__stats b[data-hud-pop] { display: none; }
[data-page="field"] .hud__stats { display: none; }
[data-page="lost"] .hud__lore, [data-page="lost"] .hud__go--land { display: none; }
.flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
html:not(.is-ready) .hud__bar, html:not(.is-ready) #paintwrap { opacity: 0; }

/* phones: HUD stacked under the plane */
@media (max-aspect-ratio: 4/5) {
  .hud__bar { gap: 2px 18px; padding: 0 10px; }
  .hud__stats { order: 0; width: 100%; justify-content: center; font-size: 20px; gap: 14px; }
  .hud__stats b { font-size: 24px; }
  .hud__tricks { order: 1; }
  .hud__write { order: 2; width: 100%; justify-content: center; font-size: 18px; }
  .hud__write input { width: 8em; font-size: 24px; }
  .hud button, .hud__go { font-size: 24px; }
  .hud__go { order: 1; }
  .hud__lore { font-size: 20px; }
}
@media (max-height: 700px) and (max-aspect-ratio: 4/5) {
  .hud__write label { display: none; }
}

.roundel:focus-visible { outline: none; }
.roundel:focus-visible .roundel__disc { outline: 5px solid var(--paint-ink); outline-offset: 10px; }
.roundel__cap { mix-blend-mode: multiply; }
