/* ==========================================================================
   BUGGED OUT – Styles
   Looks broken on purpose. Isn't.
   ========================================================================== */
:root {
  --bg: #07090d;
  --bg2: #0e131b;
  --panel: #111823;
  --line: #243244;
  --fg: #e8f1ff;
  --dim: #7d8fa6;
  --green: #00ff9c;
  --red: #ff3b5c;
  --cyan: #29e7ff;
  --magenta: #ff2bd6;
  --yellow: #ffe14d;
  --win-blue: #1f4bd8;
  --font: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; height: 100%; background: #000; color: var(--fg);
  font-family: var(--font); overflow: hidden;
  overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}

button { font-family: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }

#app {
  position: relative; height: 100%; height: 100dvh; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; background: var(--bg); overflow: hidden;
}

/* ---------- Stage / canvas ---------- */
#stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
#view {
  position: absolute; inset: 0; transform-origin: 50% 50%;
  transition: transform .45s cubic-bezier(.5,-0.3,.4,1.4);
}
#view.mirror { transform: scaleX(-1); }
#view.rot180 { transform: rotate(180deg); }
#view.mirror.rot180 { transform: rotate(180deg) scaleX(-1); }
#view.minimized { transform: translate(-30%, 38%) scale(.18); }
#view.shake { animation: shake .25s linear infinite; }
canvas#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }

.minimized-bar {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 25;
  background: #c0c0c0; color: #000; border: 2px outset #fff; padding: 8px 10px;
  font-size: 13px; display: flex; gap: 8px; align-items: center;
}
.minimized-bar b { background: var(--win-blue); color: #fff; padding: 2px 6px; }

/* ---------- HUD ---------- */
#hud {
  position: absolute; top: calc(8px + var(--safe-t)); left: 10px; right: 10px; z-index: 10;
  display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none;
}
#hud-level { font-weight: 800; letter-spacing: .08em; font-size: 14px; color: var(--green); text-shadow: 0 0 6px #00ff9c55; }
#hud-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.hud-btn {
  pointer-events: auto; width: 42px; height: 42px; border-radius: 10px;
  background: #0009; border: 1px solid var(--line); font-weight: 800; font-size: 14px;
  transition: transform .25s ease;
}
.hud-btn:active { background: #fff2; }

/* ---------- Controls ---------- */
#controls {
  flex: 0 0 auto; position: relative; z-index: 12;
  --btn: clamp(62px, 21vw, 88px);
  --btn-big: clamp(76px, 26vw, 106px);
  height: calc(clamp(112px, 19vh, 150px) + var(--safe-b));
  padding: 10px max(12px, var(--safe-l, 0px)) calc(10px + var(--safe-b)) max(12px, var(--safe-r, 0px));
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: linear-gradient(#0b0f16, #06080c); border-top: 1px solid var(--line);
  touch-action: none;
}
#controls.swap { flex-direction: row-reverse; }
#controls.swap .ctrl-move { flex-direction: row-reverse; }
#controls.faded .ctrl { opacity: .12; }
#controls.tiny .ctrl { transform: scale(.45); }
#controls.gibberish .ctrl { font-size: 13px; }
.ctrl-group { display: flex; gap: clamp(8px, 3vw, 12px); position: relative; }
.ctrl {
  position: relative; width: var(--btn); height: var(--btn); border-radius: 22px; flex: 0 0 auto; padding: 0;
  background: linear-gradient(#1a2433, #121a26); border: 1px solid #2d3e55;
  font-size: 26px; font-weight: 900; box-shadow: 0 4px 0 #05070a, inset 0 1px 0 #ffffff14;
  transition: transform .18s ease, left .2s ease, top .2s ease, opacity .3s, width .3s, height .3s;
  touch-action: none;
}
.ctrl.pressed { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 #05070a; background: #22324a; }
.ctrl-big { width: var(--btn-big); height: var(--btn-big); border-radius: 50%; font-size: clamp(15px, 4.6vw, 18px); letter-spacing: .06em; color: var(--green); }
.ctrl-big.duck { color: var(--yellow); }
.ctrl-big.giant { width: min(190px, 52vw); height: min(118px, 100%); border-radius: 28px; }
.ctrl.fled { transition: transform .12s ease-out; }

/* ---------- Screens ---------- */
.screen {
  position: absolute; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center;
  background: radial-gradient(ellipse at 50% 20%, #13202e 0%, var(--bg) 70%);
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  overflow-y: auto; touch-action: pan-y;
}
.screen.overlay { background: #000b; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.menu-wrap { width: 100%; max-width: 400px; text-align: center; margin: auto 0; } /* auto margins: centered, but never cut off at the top */
h1#logo {
  font-size: clamp(38px, 12vw, 56px); margin: 0 0 8px; letter-spacing: .02em; line-height: .95;
  color: var(--fg); position: relative; font-weight: 900; cursor: default;
}
.subtitle { color: var(--dim); font-size: 13px; }
.ver { color: #4a5b70; font-size: 10px; display: block; margin-top: 4px; }
.seed-box {
  margin: 18px auto; display: inline-block; padding: 8px 14px; font-size: 11px; color: var(--dim);
  border: 1px dashed var(--line); border-radius: 6px; letter-spacing: .08em;
}
.seed-box b { color: var(--yellow); font-size: 16px; letter-spacing: .12em; }
.menu-buttons { display: flex; flex-direction: column; gap: 10px; margin: 10px auto; max-width: 300px; }
.mbtn {
  display: block; width: 100%; padding: 14px 16px; border-radius: 10px; font-size: 15px; font-weight: 800;
  letter-spacing: .08em; background: var(--panel); border: 1px solid var(--line); text-align: center;
}
.mbtn:active { transform: translateY(1px); background: #1a2433; }
.mbtn.primary { background: var(--green); color: #031; border-color: var(--green); box-shadow: 0 0 22px #00ff9c44; }
.mbtn.back { margin-top: 18px; }
.menu-foot { margin-top: 18px; color: #4a5b70; font-size: 11px; line-height: 1.5; }

.panel {
  width: 100%; max-width: 420px; background: #0c121bcc; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin: auto;
}
.panel.small { max-width: 320px; }
.panel.small .mbtn + .mbtn { margin-top: 10px; }
.panel h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: .1em; color: var(--green); }
.panel.center { text-align: center; }

.level-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.level-grid button {
  aspect-ratio: 1; border-radius: 10px; background: var(--panel); border: 1px solid var(--line);
  font-size: 18px; font-weight: 800;
}
.level-grid button.locked { opacity: .3; }
.level-grid button.done { border-color: var(--green); color: var(--green); }

.wasted { text-align: center; padding: 14px 0 18px; border-bottom: 1px dashed var(--line); margin-bottom: 12px; }
.wasted-label { color: var(--dim); font-size: 12px; letter-spacing: .15em; }
.wasted-value { font-size: 34px; font-weight: 900; color: var(--yellow); margin: 6px 0; }
.wasted-sub { color: var(--dim); font-style: italic; }
.stats-list { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-size: 14px; }
.stats-list dt { color: var(--dim); }
.stats-list dd { margin: 0; font-weight: 800; text-align: right; }

.ach-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.ach-list li { padding: 10px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); }
.ach-list li b { display: block; letter-spacing: .06em; }
.ach-list li span { font-size: 12px; color: var(--dim); }
.ach-list li.locked { opacity: .35; }
.ach-list li.unlocked { border-color: var(--green); }
.ach-list li.unlocked b { color: var(--green); }

.setting { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #1a2433; font-size: 15px; }
.setting input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); }
.setting input[type=range] { width: 50%; accent-color: var(--green); }
.hint { color: var(--dim); font-size: 12px; line-height: 1.5; }
.pause-status { font-size: 12px; color: var(--dim); margin: -6px 0 14px; line-height: 1.5; }
.pause-status b { color: var(--green); letter-spacing: .08em; }
.stat-note { display: block; font-size: 11px; color: var(--dim); font-weight: 400; font-style: italic; }
#p-menu { transition: transform .15s ease; }
.complete-info { color: var(--dim); margin: 0 0 16px; line-height: 1.6; }

/* ---------- Bubble (game talks to you) ---------- */
#bubble {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%); z-index: 20; pointer-events: none;
  background: #fff; color: #000; font-weight: 800; padding: 10px 14px; border-radius: 12px; font-size: 16px;
  max-width: 86%; text-align: center; box-shadow: 4px 4px 0 var(--magenta);
  animation: pop .25s cubic-bezier(.3,1.6,.5,1);
}
#bubble.small { font-size: 13px; padding: 6px 10px; box-shadow: none; background: #e8f1ffee; top: 22%; }
#bubble::after { content: ""; position: absolute; bottom: -10px; left: 50%; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }

/* ---------- Toasts ---------- */
#toasts { position: absolute; left: 0; right: 0; top: calc(58px + var(--safe-t)); z-index: 22; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast {
  background: #111c; border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; font-size: 13px;
  max-width: 88%; text-align: center; animation: slideIn .3s ease;
}
.toast.ach { background: #062d1d; border-color: var(--green); color: var(--green); }
.toast.fake { background: #2d0620; border-color: var(--magenta); color: #ffc2f0; }
.toast.error { background: #300; border-color: var(--red); color: #ffd0d8; }
.toast.notif { background: #1b2331; border-color: #3c4d66; text-align: left; }
.toast.notif small { display: block; color: var(--dim); font-size: 10px; }
.toast .t-title { font-weight: 800; letter-spacing: .06em; display: block; }

/* ---------- Dialogs ---------- */
#dialogs { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
#dialogs > * { pointer-events: auto; }
.dlg-backdrop { position: absolute; inset: 0; background: #0006; display: flex; align-items: center; justify-content: center; }
.dlg-backdrop.clear { background: transparent; pointer-events: none; }
.dlg-backdrop.clear .win { pointer-events: auto; }
.win {
  position: relative; width: min(86%, 330px); background: #c3c3c3; color: #000; border: 2px solid;
  border-color: #fff #404040 #404040 #fff; box-shadow: 2px 2px 0 #000, 0 20px 40px #0008;
  font-family: Tahoma, "Segoe UI", Verdana, sans-serif; font-size: 14px;
  animation: pop .18s ease-out;
}
.win-title {
  background: linear-gradient(90deg, #0a246a, #3a6ea5); color: #fff; font-weight: 700; padding: 4px 6px;
  display: flex; justify-content: space-between; align-items: center; font-size: 13px;
}
.win-x { width: 20px; height: 18px; background: #c3c3c3; color: #000; border: 2px outset #fff; font-size: 11px; line-height: 12px; padding: 0; font-weight: 900; }
.win-body { padding: 16px 14px 12px; display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.win-icon { font-size: 28px; line-height: 1; }
.win-btns { display: flex; justify-content: center; gap: 10px; padding: 0 12px 14px; flex-wrap: wrap; position: relative; min-height: 44px; }
.win-btn {
  min-width: 84px; padding: 7px 14px; background: #c3c3c3; border: 2px solid; border-color: #fff #404040 #404040 #fff;
  font-family: inherit; font-size: 14px; color: #000; transition: transform .15s ease, left .15s, top .15s;
}
.win-btn:active { border-color: #404040 #fff #fff #404040; }
.win-btn.huge { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; font-size: 48px; z-index: 50; transition: all .4s ease; }
.progress { height: 20px; border: 2px inset #fff; background: #fff; margin-top: 10px; position: relative; overflow: hidden; }
.progress > div { height: 100%; background: repeating-linear-gradient(90deg, #0a246a 0 10px, transparent 10px 12px); width: 0; transition: width .25s ease; }
.progress-label { font-size: 12px; margin-top: 4px; }
.win ul { margin: 6px 0 0; padding-left: 18px; }

.slider-troll {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); width: 80%; z-index: 26;
  background: #10161fee; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13px; text-align: center;
}
.slider-troll input { width: 100%; accent-color: var(--cyan); margin-top: 6px; height: 28px; }

/* ---------- Fake crash / BSOD ---------- */
.crash {
  position: absolute; inset: 0; z-index: 60; background: #000; color: #ddd; padding: 30px 22px;
  font-size: 13px; line-height: 1.6; display: flex; flex-direction: column; justify-content: center;
}
.crash h3 { color: #fff; font-size: 26px; margin: 0 0 14px; letter-spacing: .1em; }
.crash pre { color: #888; font-size: 11px; white-space: pre-wrap; margin: 0; }
.crash .relax { color: var(--green); font-size: 20px; font-weight: 800; margin-top: 20px; }

/* ---------- Cursor / finger overlays ---------- */
.big-finger {
  position: absolute; z-index: 24; font-size: 110px; pointer-events: none; line-height: 1;
  filter: drop-shadow(0 10px 10px #0008);
}
.ai-banner {
  position: absolute; left: 0; right: 0; top: 40%; z-index: 23; text-align: center; pointer-events: none;
  font-size: 22px; font-weight: 900; color: var(--cyan); text-shadow: 2px 0 var(--magenta), -2px 0 var(--cyan);
  background: #000a; padding: 12px 0; letter-spacing: .1em;
}
.captcha { padding: 10px 14px 14px; }
.captcha label { display: flex; align-items: center; gap: 10px; background: #f9f9f9; border: 1px solid #aaa; padding: 12px; }
.captcha input { width: 24px; height: 24px; }

/* ---------- Big announcements ---------- */
.announce {
  position: absolute; inset: 0; z-index: 28; display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; text-align: center;
}
.announce .big { font-size: clamp(38px, 13vw, 64px); font-weight: 900; letter-spacing: .04em; color: #fff; text-shadow: 0 4px 0 #00000088; animation: pop .35s cubic-bezier(.3,1.7,.5,1); }
.announce .small { margin-top: 10px; font-size: 16px; font-weight: 700; background: #000a; padding: 6px 12px; border-radius: 6px; max-width: 86%; }
.announce.loud .big { color: var(--yellow); text-shadow: 3px 3px 0 var(--magenta), -2px -2px 0 var(--cyan); }
.announce.dim { background: #000b; pointer-events: auto; }

/* ---------- Ending ---------- */
#screen-ending { background: #000; flex-direction: column; align-items: center; text-align: center; padding: 24px; }
.ending-block { max-width: 360px; width: 100%; margin: auto 0; }
.ending-block .big { font-size: 48px; font-weight: 900; color: var(--yellow); text-shadow: 3px 3px 0 var(--magenta); }
.ending-block .err { font-size: 30px; font-weight: 900; color: var(--red); letter-spacing: .08em; }
.credits { position: relative; height: 70vh; overflow: hidden; width: 100%; max-width: 360px; mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
.credits-roll { position: absolute; left: 0; right: 0; top: 100%; animation: roll 22s linear forwards; line-height: 1.8; }
.credits-roll h4 { color: var(--green); margin: 22px 0 4px; letter-spacing: .12em; font-size: 13px; }
.credits-roll p { margin: 0; color: #ccc; }
#confetti { position: absolute; inset: 0; pointer-events: none; z-index: 29; }

/* ---------- Debug menu ---------- */
#debug {
  position: absolute; inset: 0; z-index: 90; background: #000e; color: #cfe; font-size: 12px; overflow-y: auto;
  padding: calc(10px + var(--safe-t)) 10px calc(10px + var(--safe-b)); touch-action: pan-y;
}
#debug h3 { color: var(--yellow); margin: 12px 0 6px; font-size: 13px; letter-spacing: .1em; }
#debug .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#debug button, #debug select, #debug input {
  background: #13202e; color: #cfe; border: 1px solid #2a3f57; border-radius: 6px; padding: 7px 9px; font-family: inherit; font-size: 12px;
}
#debug .ev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
#debug .ev-grid button { text-align: left; }
#debug .ev-grid .r-common { border-left: 3px solid #8aa; }
#debug .ev-grid .r-rare { border-left: 3px solid var(--cyan); }
#debug .ev-grid .r-legendary { border-left: 3px solid var(--yellow); }
#debug .ev-grid .r-wtf { border-left: 3px solid var(--magenta); }
#debug .prob { font-size: 10px; color: #8aa; display: block; }
#debug .close { position: sticky; top: 0; float: right; background: var(--red); color: #fff; }
.debug-badge { position: absolute; right: 60px; top: calc(12px + var(--safe-t)); z-index: 11; color: var(--yellow); font-size: 10px; pointer-events: none; }

/* ---------- Glitch styles ---------- */
.glitch-text { position: relative; }
.glitch-text::before, .glitch-text::after {
  content: attr(data-text); position: absolute; left: 0; right: 0; top: 0; overflow: hidden; pointer-events: none; white-space: pre-line;
}
.glitch-text::before { color: var(--cyan); transform: translate(-2px, 0); clip-path: inset(0 0 55% 0); animation: glitchA 2.8s infinite steps(1); mix-blend-mode: screen; }
.glitch-text::after { color: var(--magenta); transform: translate(2px, 0); clip-path: inset(55% 0 0 0); animation: glitchB 3.3s infinite steps(1); mix-blend-mode: screen; }
.flicker { animation: flicker .12s steps(2) infinite; }
.jitter { animation: jitter .18s steps(2) infinite; }
.ui-glitch { animation: uiGlitch .3s steps(3) 1; }
body.reduced .flicker { animation: none; opacity: .8; }
body.reduced .glitch-text::before, body.reduced .glitch-text::after { animation: none; }
body.reduced #view.shake { animation: none; }

@keyframes glitchA { 0%{transform:translate(-2px,0)} 8%{transform:translate(4px,-2px)} 10%{transform:translate(-2px,0)} 60%{transform:translate(-3px,1px)} 62%{transform:translate(-2px,0)} }
@keyframes glitchB { 0%{transform:translate(2px,0)} 30%{transform:translate(-5px,2px)} 33%{transform:translate(2px,0)} 80%{transform:translate(3px,-1px)} 82%{transform:translate(2px,0)} }
@keyframes flicker { 0%{opacity:1} 50%{opacity:.35} }
@keyframes jitter { 0%{transform:translate(0,0)} 50%{transform:translate(3px,-2px)} }
@keyframes uiGlitch { 0%{transform:translate(-4px,2px) skewX(8deg); filter:hue-rotate(90deg)} 50%{transform:translate(5px,-1px) skewX(-6deg)} 100%{transform:none; filter:none} }
@keyframes shake { 0%{transform:translate(0,0)} 25%{transform:translate(4px,-3px)} 50%{transform:translate(-3px,2px)} 75%{transform:translate(2px,4px)} }
@keyframes pop { from { transform: translateX(var(--tx, 0)) scale(.6); opacity: 0 } to { opacity: 1 } }
@keyframes slideIn { from { transform: translateY(-12px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes roll { to { top: -260%; } }
#bubble { --tx: -50%; }

/* ---------- Reality breaks ---------- */
.screen-off { position: absolute; inset: 0; z-index: 80; background: #000; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 38%; }
.screen-off .whisper { color: #666; font-size: 12px; letter-spacing: .08em; }
#hud.mirrored { transform: scaleX(-1); }
.void-hide { visibility: hidden; }
.stray-text { position: absolute; z-index: 21; color: #00ff9c; font-weight: 800; letter-spacing: .1em; font-size: 13px; opacity: .8; pointer-events: none; transform: rotate(-7deg); }
.code-rain { position: absolute; inset: 0; z-index: 27; background: #000c; pointer-events: none; }
.code-rain canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.code-rain .rc-text { position: absolute; left: 0; right: 0; top: 42%; text-align: center; color: #cfffe8; font-size: 22px; font-weight: 900; letter-spacing: .14em; text-shadow: 0 0 12px #00ff9c; }
.face-flash { position: absolute; z-index: 26; width: 42%; max-width: 200px; pointer-events: none; opacity: .92; filter: contrast(1.2); }
.face-flash canvas { width: 100%; height: auto; display: block; }
.face-flash.slow { animation: faceFade 1.4s ease-in-out forwards; opacity: 0; }
@keyframes faceFade { 0% { opacity: 0 } 45% { opacity: .5 } 100% { opacity: 0 } }
.vhs-hud { position: absolute; left: 14px; top: 58px; z-index: 22; pointer-events: none; color: #fff; font: 800 18px/1.3 ui-monospace, monospace; letter-spacing: .08em; text-shadow: 2px 0 #ff2bd6, -2px 0 #29e7ff; }
.vhs-hud.rewind { left: 0; right: 0; top: 40%; text-align: center; font-size: 30px; }
.camera-ui { position: absolute; inset: 0; z-index: 80; background: radial-gradient(ellipse at 50% 45%, #1a1f22 0%, #050607 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.cam-frame { position: relative; width: 62%; aspect-ratio: 3 / 4; overflow: hidden; }
.cam-frame i { position: absolute; width: 26px; height: 26px; border: 3px solid #cfd8dc; }
.cam-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.cam-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.cam-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.cam-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.cam-scan { position: absolute; left: 0; right: 0; height: 2px; background: #29e7ff88; animation: camScan 1.6s linear infinite; }
@keyframes camScan { from { top: 0 } to { top: 100% } }
.cam-text { color: #cfd8dc; font-weight: 800; letter-spacing: .12em; font-size: 15px; }
.cam-text.alert { color: #ff3b5c; }
.toast.notif.unknown { background: #101010; border-color: #333; color: #ddd; font-style: italic; }
.void-text { position: absolute; left: 0; right: 0; top: 30%; z-index: 22; text-align: center; color: #bbb; font-size: 16px; letter-spacing: .14em; pointer-events: none; }
.fake-credits { position: absolute; inset: 0; z-index: 80; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 24px; padding: 24px; }
.fake-credits h2 { font-size: 26px; letter-spacing: .08em; margin: 0 0 8px; }
.fake-credits h4 { color: var(--green); letter-spacing: .12em; font-size: 12px; margin: 18px 0 4px; }
.fake-credits p { margin: 0; color: #bbb; }
.fake-credits .mbtn { max-width: 220px; }
.fc-roll { animation: slideIn 1.2s ease; }

/* ---------- Landscape on phones: ask to rotate (the game is portrait) ---------- */
#rotate-hint { display: none; position: fixed; inset: 0; z-index: 200; background: #07090d; color: var(--fg);
  flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
#rotate-hint .phone { width: 34px; height: 58px; border: 3px solid var(--green); border-radius: 8px; animation: rotHint 2s ease-in-out infinite; }
@keyframes rotHint { 0%, 30% { transform: rotate(90deg) } 60%, 100% { transform: rotate(0deg) } }
@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
  #rotate-hint { display: flex; }
}
/* very short screens (e.g. iPhone SE with browser bars) */
@media (max-height: 600px) {
  .menu-buttons { gap: 7px; }
  .mbtn { padding: 11px 14px; }
  .seed-box { margin: 10px auto; }
  h1#logo { font-size: clamp(32px, 10vw, 44px); }
}

.noscript { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #fff; padding: 20px; text-align: center; }

@media (min-width: 521px) {
  body { background: #030405; }
  #app { border-left: 1px solid #1a2433; border-right: 1px solid #1a2433; }
}
