/* MazeShift — game screen styles. */

html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  position: fixed; inset: 0;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  background: radial-gradient(ellipse at 50% 30%, #0b1633 0%, #05070f 70%);
}

.stage { position: fixed; inset: 0; touch-action: none; z-index: 0; }
.stage canvas { width: 100% !important; height: 100% !important; display: block; outline: none; }

/* ---------- Overlays ---------- */
.flash { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; background: #fff; }
.flash.hit { animation: flashHit .55s ease-out; background: radial-gradient(ellipse at center, rgba(255,40,80,0.05) 30%, rgba(255,20,60,0.65) 100%); }
.flash.shift { animation: flashShift .6s ease-out; background: radial-gradient(ellipse at center, rgba(255,255,255,0.12), rgba(34,230,255,0.35)); }
.flash.win { animation: flashShift .9s ease-out; background: radial-gradient(ellipse at center, rgba(255,255,255,0.7), rgba(255,255,255,0.1)); }
@keyframes flashHit { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes flashShift { 0% { opacity: 0.9; } 100% { opacity: 0; } }

.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 4;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
  transition: box-shadow .4s ease;
}
.vignette.danger { box-shadow: inset 0 0 120px 10px rgba(255, 30, 70, 0.35); animation: dangerPulse 1s ease-in-out infinite; }
.vignette.warn { box-shadow: inset 0 0 100px 6px rgba(255, 120, 40, 0.35); }
@keyframes dangerPulse { 50% { box-shadow: inset 0 0 160px 20px rgba(255, 30, 70, 0.45); } }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 40%, #0d1a3a 0%, #04060d 70%);
  transition: opacity .7s ease, visibility .7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-mark { animation: markPulse 2.4s ease-in-out infinite; filter: drop-shadow(0 0 24px rgba(34,230,255,.5)); }
@keyframes markPulse { 50% { transform: scale(1.06) rotate(2deg); } }
.loader-word { font-size: clamp(28px, 7vw, 44px); }
.loader-bar { width: min(280px, 70vw); height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--magenta)); transition: width .3s ease; box-shadow: 0 0 12px var(--cyan); }
.loader-text { color: var(--muted); margin: 0; letter-spacing: 0.08em; }

/* ---------- Screens ---------- */
.screen { position: fixed; inset: 0; z-index: 10; }

.menu {
  display: flex; flex-direction: column;
  padding: calc(12px + var(--safe-t)) calc(16px + var(--safe-r)) 0 calc(16px + var(--safe-l));
  background: linear-gradient(180deg, rgba(3,5,12,.35) 0%, rgba(3,5,12,0.05) 35%, rgba(3,5,12,0.35) 70%, rgba(3,5,12,.8) 100%);
  overflow-y: auto; overscroll-behavior: contain;
  animation: fadeIn .6s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.menu-top { display: flex; justify-content: flex-end; gap: 10px; }
.menu-center {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; padding: 8px 0 18px;
  background: radial-gradient(ellipse 60% 55% at 50% 52%, rgba(3, 5, 12, 0.55), transparent 75%);
}
.diff-blurb, .menu-links, .best-line { text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.tagline { text-shadow: 0 0 14px rgba(34,230,255,.35), 0 2px 10px rgba(0,0,0,.9); }
.menu-mark { width: clamp(72px, 16vw, 104px); height: auto; filter: drop-shadow(0 0 28px rgba(34,230,255,.55)); animation: markPulse 4s ease-in-out infinite; }
.menu .wordmark { font-size: clamp(38px, 11vw, 84px); }
.tagline {
  margin: -2px 0 10px; font-size: clamp(16px, 3.8vw, 22px); letter-spacing: 0.32em; text-transform: uppercase;
  color: #cfeeff; font-weight: 600; text-shadow: 0 0 14px rgba(34,230,255,.35);
}
.menu-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: min(340px, 100%); }
.difficulty {
  display: inline-flex; padding: 4px; gap: 4px; margin-top: 8px;
  background: rgba(8, 14, 30, 0.6); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; backdrop-filter: blur(8px);
}
.chip {
  border: 0; background: transparent; cursor: pointer; padding: 8px 16px; border-radius: 999px; min-height: 38px;
  font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.chip[aria-checked="true"] { background: rgba(34, 230, 255, 0.18); color: #fff; box-shadow: 0 0 0 1px rgba(34,230,255,.5) inset; }
.chip[data-diff="nightmare"][aria-checked="true"] { background: rgba(255, 59, 92, 0.2); box-shadow: 0 0 0 1px rgba(255,59,92,.6) inset; }
.chip[data-diff="explorer"][aria-checked="true"] { background: rgba(77, 255, 154, 0.16); box-shadow: 0 0 0 1px rgba(77,255,154,.5) inset; }
.diff-blurb { margin: 0; color: var(--muted); font-size: 15px; min-height: 1.5em; }
.menu-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-top: 4px; }
.link-btn {
  background: none; border: 0; cursor: pointer; color: #bfe9ff; text-decoration: none;
  font-weight: 600; font-size: 16px; letter-spacing: 0.06em; padding: 8px 12px; border-radius: 10px;
}
.link-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.best-line { margin: 0; color: var(--gold); font-weight: 600; letter-spacing: 0.06em; min-height: 1.5em; }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.hud button { pointer-events: auto; }
.hud-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px;
  padding: calc(10px + var(--safe-t)) calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l));
}
.hud-left { display: flex; flex-direction: column; gap: 2px; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.hud-level { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.hud-level .lbl { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); }
.hud-level b { font-family: var(--font-num); font-size: 26px; font-weight: 700; line-height: 1; }
.hud-stratum { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); font-weight: 700; }
.hud-score { font-family: var(--font-num); font-weight: 700; font-size: 22px; color: var(--gold); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hud-score small { font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }
#hud-score { display: inline-block; }
#hud-score.bump { animation: scoreBump .35s ease; }
@keyframes scoreBump { 40% { transform: scale(1.18); color: #fff; } }

.hud-shift { position: relative; width: 78px; height: 78px; }
.hud-shift svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.hud-shift circle { fill: rgba(5, 10, 24, 0.55); stroke-width: 7; }
.hud-shift .track { stroke: rgba(255,255,255,.12); }
.hud-shift .prog { fill: none; stroke: var(--cyan); stroke-linecap: round; stroke-dasharray: 276.46; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px var(--cyan)); transition: stroke .3s; }
.shift-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.shift-num b { font-family: var(--font-num); font-size: 30px; font-weight: 700; }
.shift-num span { font-family: var(--font-display); font-size: 8px; letter-spacing: 0.24em; color: var(--muted); margin-top: 3px; }
.hud-shift.warn .prog { stroke: var(--red); filter: drop-shadow(0 0 8px var(--red)); }
.hud-shift.warn { animation: shiftWarn .5s ease-in-out infinite; }
.hud-shift.warn .shift-num b { color: #ffb3c0; }
@keyframes shiftWarn { 50% { transform: scale(1.1); } }

.hud-right { display: flex; justify-content: flex-end; gap: 8px; }

.hud-bottom {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 0 16px calc(14px + var(--safe-b));
}
.hud-lives, .hud-shards, .hud-powers {
  display: flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(5, 10, 24, 0.55); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hud-powers:empty, .hud-lives:empty { display: none; }
.hud-lives svg { width: 18px; height: 18px; fill: var(--red); filter: drop-shadow(0 0 5px rgba(255,59,92,.8)); }
.hud-lives svg.lost { fill: rgba(255,255,255,.15); filter: none; }
.hud-shards svg { width: 16px; height: 20px; fill: rgba(255,255,255,.15); transition: fill .3s, transform .3s; }
.hud-shards svg.got { fill: var(--accent, var(--gold)); filter: drop-shadow(0 0 6px var(--accent, var(--gold))); transform: scale(1.1); }
.hud-shards .gate { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.16em; color: var(--muted); margin-left: 4px; }
.hud-shards .gate.open { color: var(--cyan); text-shadow: 0 0 8px var(--cyan); animation: gateOpen 1s ease-in-out infinite; }
@keyframes gateOpen { 50% { opacity: .55; } }
.pw { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.pw em { font-style: normal; }
.pw i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); display: inline-block; }
.pw .bar { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.pw .bar span { display: block; height: 100%; background: var(--c); }

.minimap {
  position: absolute; right: calc(12px + var(--safe-r)); top: calc(66px + var(--safe-t));
  width: 118px; height: 118px; border-radius: 14px;
  background: rgba(5, 10, 24, 0.6); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px);
}
.hint {
  position: absolute; left: 50%; bottom: calc(76px + var(--safe-b)); transform: translate(-50%, 10px);
  max-width: min(520px, calc(100vw - 32px)); text-align: center;
  padding: 10px 18px; border-radius: 14px; font-weight: 600; font-size: 16px;
  background: rgba(5, 10, 24, 0.78); border: 1px solid rgba(34,230,255,.35); box-shadow: 0 0 30px -6px rgba(34,230,255,.4);
  opacity: 0; transition: opacity .35s ease, transform .35s ease;
}
.hint.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- D-pad ---------- */
.dpad {
  position: fixed; z-index: 9;
  right: calc(16px + var(--safe-r)); bottom: calc(70px + var(--safe-b));
  width: 156px; height: 156px;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 2px;
  touch-action: none;
}
.dp {
  border: 1px solid rgba(255,255,255,.18); background: rgba(8, 14, 30, 0.45); border-radius: 14px;
  display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
.dp svg { width: 22px; height: 22px; fill: rgba(220, 245, 255, .85); }
.dp.is-down { background: rgba(34, 230, 255, 0.35); border-color: var(--cyan); }
.dp-up { grid-area: 1 / 2; } .dp-left { grid-area: 2 / 1; } .dp-right { grid-area: 2 / 3; } .dp-down { grid-area: 3 / 2; }
body.dpad-left .dpad { right: auto; left: calc(16px + var(--safe-l)); }

/* ---------- Banner / popups / toasts ---------- */
.banner {
  position: fixed; left: 0; right: 0; top: 34%; z-index: 12; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
}
.banner .b-kicker { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.4em; color: var(--muted); }
.banner .b-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(32px, 9vw, 64px); letter-spacing: 0.08em; text-shadow: 0 0 24px var(--bc, var(--cyan)), 0 4px 20px rgba(0,0,0,.8); }
.banner .b-sub { font-size: clamp(16px, 4vw, 22px); letter-spacing: 0.3em; text-transform: uppercase; color: var(--bc, var(--cyan)); font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,.9); }
.banner .b-lines { margin-top: 10px; display: grid; gap: 2px; font-weight: 600; font-size: 17px; text-shadow: 0 2px 8px rgba(0,0,0,.9); }
.banner .b-lines b { color: var(--gold); font-family: var(--font-num); font-size: 19px; margin-left: 8px; }
.banner > * { animation: bannerIn .6s cubic-bezier(.2,1.4,.4,1) both; }
.banner > *:nth-child(2) { animation-delay: .08s; } .banner > *:nth-child(3) { animation-delay: .16s; } .banner > *:nth-child(4) { animation-delay: .3s; }
.banner.out > * { animation: bannerOut .4s ease forwards; }
@keyframes bannerIn { from { opacity: 0; transform: translateY(18px) scale(.92); letter-spacing: .3em; } }
@keyframes bannerOut { to { opacity: 0; transform: translateY(-14px); } }

.popups { position: fixed; inset: 0; pointer-events: none; z-index: 11; }
.popup {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--font-display); font-weight: 900; font-size: 18px; color: var(--pc, var(--gold));
  text-shadow: 0 0 12px var(--pc, var(--gold)), 0 2px 6px rgba(0,0,0,.9);
  animation: popUp 1.1s ease-out forwards;
}
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }

.toasts { position: fixed; z-index: 40; left: 50%; top: calc(10px + var(--safe-t)); transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; width: min(420px, calc(100vw - 24px)); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px;
  background: rgba(8, 16, 36, 0.92); border: 1px solid rgba(255, 211, 77, 0.45); box-shadow: 0 10px 30px -10px rgba(0,0,0,.8), 0 0 24px -8px rgba(255,211,77,.5);
  animation: toastIn .45s cubic-bezier(.2,1.3,.4,1) both;
}
.toast.out { animation: toastOut .4s ease forwards; }
.toast .t-icon { font-size: 22px; line-height: 1; }
.toast b { display: block; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; }
.toast span { font-weight: 600; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  background: rgba(2, 4, 10, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .25s ease both; overflow-y: auto;
}
.panel {
  position: relative; width: min(460px, 100%);
  padding: 28px 24px 22px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(16, 28, 58, 0.92), rgba(8, 14, 30, 0.95));
  border: 1px solid var(--panel-border);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.03) inset, 0 0 60px -20px rgba(34,230,255,.35);
  animation: panelIn .4s cubic-bezier(.2,1.2,.4,1) both;
  max-height: calc(100dvh - 32px); overflow-y: auto; user-select: text; -webkit-user-select: text;
}
.panel-sm { width: min(380px, 100%); }
.panel-wide { width: min(620px, 100%); }
@keyframes panelIn { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.panel-title { font-family: var(--font-display); font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; font-size: 24px; margin: 0 0 6px; text-align: center; }
.panel-sub { color: var(--muted); text-align: center; margin: 0 0 16px; }
.panel-h3 { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; margin: 22px 0 10px; color: #cfeeff; }
.panel-h3 small { color: var(--muted); font-family: var(--font-body); letter-spacing: 0.04em; }
.close-btn {
  position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border-radius: 12px;
  border: 0; background: rgba(255,255,255,.06); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer;
}
.close-btn:hover { background: rgba(255,255,255,.12); }
.stack { display: grid; gap: 10px; margin-top: 14px; }
.row-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

.settings { display: grid; gap: 6px; margin-top: 12px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); font-weight: 600;
}
.set-row input[type="range"] { width: 48%; accent-color: var(--cyan); }
.set-row select {
  width: 48%; min-height: 38px; border-radius: 10px; padding: 6px 10px;
  background: #0b1530; color: var(--text); border: 1px solid rgba(255,255,255,.18); font: inherit; font-weight: 600;
}
.set-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--cyan); }

.howto-steps { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.howto-steps b { color: #fff; }
.keys { color: var(--muted); text-align: center; margin: 16px 0 0; font-size: 15px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); text-align: center; }
.stat b { display: block; font-family: var(--font-num); font-size: 24px; font-weight: 700; color: #fff; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.ach-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); opacity: .5; }
.ach.done { opacity: 1; background: rgba(255, 211, 77, 0.08); box-shadow: 0 0 0 1px rgba(255,211,77,.3) inset; }
.ach .a-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); flex: none; font-size: 15px; }
.ach.done .a-icon { background: var(--gold); color: #1a1200; }
.ach b { display: block; font-size: 15px; }
.ach small { color: var(--muted); font-size: 13px; line-height: 1.3; display: block; }

.modal-gameover .panel { text-align: center; }
.go-kicker { margin: 0; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; font-size: 13px; }
.go-title { font-size: 30px; background: linear-gradient(90deg, #fff, #9ff4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.go-score { font-family: var(--font-num); font-weight: 700; font-size: 64px; color: var(--gold); text-shadow: 0 0 30px rgba(255,211,77,.5); line-height: 1.1; margin-top: 6px; }
.go-score small { display: block; font-size: 12px; letter-spacing: 0.3em; color: var(--muted); text-transform: uppercase; text-shadow: none; }
.go-best { display: inline-block; margin-top: 8px; padding: 4px 14px; border-radius: 999px; background: rgba(255,211,77,.15); color: var(--gold); font-weight: 700; letter-spacing: 0.06em; animation: markPulse 1.6s ease-in-out infinite; }

.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px;
  background: rgba(255,255,255,.05); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
}
.share-grid a:hover { background: rgba(34,230,255,.12); }
.share-grid svg { width: 26px; height: 26px; fill: currentColor; }

.fatal { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; background: #05070f; }
.fatal h2 { font-family: var(--font-display); letter-spacing: 0.08em; margin: 8px 0 0; }
.fatal p { color: var(--muted); max-width: 460px; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .hud-shift { width: 64px; height: 64px; }
  .shift-num b { font-size: 25px; }
  .hud-level b { font-size: 22px; }
  .hud-score { font-size: 19px; }
  .icon-btn { width: 40px; height: 40px; }
  .hud-right { gap: 6px; flex-wrap: wrap; max-width: 90px; }
  .minimap { width: 96px; height: 96px; top: calc(106px + var(--safe-t)); }
  .hud-bottom { gap: 8px; padding-bottom: calc(10px + var(--safe-b)); justify-content: flex-start; }
  body.has-dpad .hud-bottom { padding-right: 180px; }
  .dpad { width: 144px; height: 144px; bottom: calc(14px + var(--safe-b)); }
  .hint { bottom: auto; top: calc(128px + var(--safe-t)); font-size: 15px; max-width: calc(100vw - 150px); left: calc(12px + var(--safe-l)); transform: translate(0, -8px); text-align: left; }
  .hint.show { transform: translate(0, 0); }
  .stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .stat b { font-size: 20px; }
  .tagline { letter-spacing: 0.16em; font-size: 15px; }
  .pw em { display: none; }
  .panel { padding: 24px 18px 18px; }
  .go-score { font-size: 54px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .menu-mark { display: none; }
  .menu-center { gap: 8px; }
  .menu .wordmark { font-size: 40px; }
  .tagline { margin-bottom: 2px; }
  .menu-actions { flex-direction: row; width: auto; }
  .dpad { width: 132px; height: 132px; bottom: calc(10px + var(--safe-b)); }
  .hud-bottom { justify-content: flex-start; }
  .minimap { top: auto; bottom: calc(12px + var(--safe-b)); right: auto; left: calc(12px + var(--safe-l)); width: 90px; height: 90px; }
  body.has-minimap .hud-bottom { padding-left: 116px; }
}
@media (min-width: 900px) {
  .minimap { top: calc(70px + var(--safe-t)); right: calc(18px + var(--safe-r)); width: 150px; height: 150px; opacity: 0.92; }
}
