html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: #000; color: #eee;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
/* (top/right/bottom/left, not `inset`: iPhones before iOS 14.5 do not know it) */
#stage { position: fixed; top: 0; right: 0; bottom: 0; left: 0; touch-action: none; }
#cam, #room, #grade, #edges, #view { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
#cam { object-fit: cover; background: #000; }
#cam[hidden], #room[hidden] { display: none; }
#view { touch-action: none; }
/* The scary room (T-061, D-463): the browser does the colour grade (no work in each frame): a cold dark-blue layer over
   the camera picture (darker, colder, less colour), darkest at the edges. Only a see-through colour: NO CSS filter on
   the camera <video> (a filter on a video is an iPhone risk we cannot test here: a black camera would end the test).
   It fades in over 2.5 s at START and out when the room is cleared. ?scary=0 = never (to compare); ?dark=0.7 = the
   camera picture lighter (0.5 = default: the layer is 1 - 0.5 = 50% dark in the middle). */
#grade, #edges { pointer-events: none; opacity: 0; transition: opacity 2.5s ease; }
/* T-066 (D-477, "another place"): a colder blue-green tint (T-064: dark blue). The edges canvas holds the vignette and
   Serena's edge frame (nest growth from all 4 edges): it "breathes" very slowly (scale 1.00-1.02 in 7 s; the browser
   moves it, no work in each frame; slow and small: no flash) */
#grade { background: radial-gradient(ellipse 80% 70% at 50% 46%, rgba(2,12,16,0) 0%, rgba(2,10,14,0.38) 62%, rgba(0,3,5,0.85) 100%), rgba(8,28,34,var(--shade, 0.5)); }
body.scary #grade, body.scary #edges { opacity: 1; }
/* T-068 (D-489): in the growing start the edge frame (nest growth from the screen edges) grows in slowly, after the dark */
body.scary.growing #edges { transition: opacity 6s ease 1.5s; }
body.scary #edges { animation: breathe 7s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }

.panel {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 40%, #2a0a0c 0%, #070505 70%);
  touch-action: manipulation;
}
.panel.dim { background: rgba(0, 0, 0, 0.62); }
.panel[hidden] { display: none; }
h1 { margin: 0 0 12px; font-size: clamp(34px, 11vw, 64px); letter-spacing: 0.08em; color: #f2e8e0; text-shadow: 0 0 24px rgba(200, 20, 20, 0.6); }
.lead { margin: 0 0 18px; font-size: 18px; color: #d8cfc8; }
ol { margin: 0 0 26px; padding-left: 1.3em; max-width: 26em; text-align: left; font-size: 16px; line-height: 1.45; color: #cfc6bf; }
li { margin: 4px 0; }
.small { margin: 18px 0 0; max-width: 26em; font-size: 13px; color: #9a918b; }
.score { margin: 4px 0 6px; font-size: 22px; }
.score b { font-size: 40px; color: #fff; }
.line { margin: 4px 0 6px; font-size: 18px; color: #d8cfc8; }
.line b { color: #fff; }
#overPanel.won h1 { color: #e8f2ea; text-shadow: 0 0 24px rgba(120, 200, 150, 0.55); }
button {
  font-family: inherit; font-size: 24px; font-weight: 800; line-height: 1; letter-spacing: 0.12em; color: #fff; cursor: pointer;
  padding: 22px 56px; border-radius: 999px; border: 2px solid #d43a3a; background: #7d0e10;
  box-shadow: 0 0 30px rgba(220, 30, 30, 0.35);
}
#againBtn { margin-top: 26px; }
button:disabled { opacity: 0.5; cursor: default; }
button:active:not(:disabled) { transform: scale(0.97); }
/* a phone on its side (as low as 320 px): the whole start screen must fit */
@media (max-height: 430px) {
  .panel { padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  h1 { margin-bottom: 4px; font-size: 34px; }
  .lead { margin-bottom: 8px; font-size: 16px; }
  ol { margin-bottom: 14px; max-width: 40em; font-size: 14px; }
  button { padding: 16px 48px; }
  .small { margin-top: 10px; max-width: none; }
}
/* the smallest phone on its side (iPhone SE: 568 x 320): the 4 steps of level 1 need smaller text */
@media (max-height: 340px) and (max-width: 700px) {
  h1 { font-size: 28px; }
  .lead { margin-bottom: 4px; font-size: 14px; }
  ol { margin-bottom: 8px; font-size: 13px; line-height: 1.3; }
  li { margin: 2px 0; }
  button { padding: 12px 48px; }
  #againBtn { margin-top: 14px; }
  .small { margin-top: 6px; font-size: 12px; }
}

#note {
  /* above the bullets box (bottom right; T-065: 76 px high + 10 px below it + 8 px) */
  position: fixed; z-index: 1; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 94px);
  max-width: 88vw; padding: 8px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.65);
  font-size: 14px; line-height: 1.35; text-align: center; pointer-events: none;
}
#note[hidden] { display: none; }
body.hinting #note { bottom: calc(env(safe-area-inset-bottom) + 160px); }   /* the "tap the bullets" hint is there */
#safe {
  position: fixed; top: 0; left: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* T-064 (D-469): the how-to. T-065 (D-472): step 2 has a small bullets box; a tap fills it up (no shake any more). The
   drawings are simple PLACEHOLDERS. A finger shows the tap: one small press a second (a small thing that moves, no flash). */
.howtoPic { width: 160px; height: 120px; margin: 4px 0 6px; display: flex; align-items: center; justify-content: center; }
.howtoPic svg { width: 120px; height: 120px; }
.howtoPic [hidden] { display: none; }
.howtoTitle { font-size: clamp(28px, 9vw, 44px); }
.step { margin: 0 0 4px; }
.good { color: #7ee2a8; font-weight: 700; }
button.link { margin-top: 14px; padding: 10px 24px; font-size: 16px; letter-spacing: 0.06em; border: none; background: none; box-shadow: none; color: #b9aea7; text-decoration: underline; }
button.demoAmmo { position: relative; width: 156px; height: 76px; padding: 0; border: none; border-radius: 12px; background: none; box-shadow: none; }
.demoAmmo svg { width: 156px; height: 76px; display: block; }
.demoAmmo .box { fill: rgba(0,0,0,0.5); stroke: rgba(255,179,64,0.95); stroke-width: 2.5; }
.demoAmmo .bullets path { fill: none; stroke: rgba(255,179,64,0.7); stroke-width: 1.2; transition: fill 0.45s, stroke 0.45s; }
.demoAmmo .t { font: 800 13px -apple-system, system-ui, sans-serif; text-anchor: middle; fill: #ffb340; letter-spacing: 0; }
.demoAmmo .fullT { display: none; fill: rgba(255,255,255,0.88); }
.demoAmmo.full .box { stroke: rgba(255,255,255,0.4); stroke-width: 1.5; }
.demoAmmo.full .bullets path { fill: #e9c46a; stroke: #e9c46a; }
.demoAmmo.full .empty { display: none; }
.demoAmmo.full .fullT { display: inline; }
.demoAmmo.full .tapAnim { display: none; }
/* a finger from above (its nail near the tip, at the bottom) that presses down once a second */
.tapAnim { position: absolute; width: 30px; height: 40px; pointer-events: none; animation: tap1 1.1s ease-in-out infinite; }
.tapAnim::before { content: ''; position: absolute; left: 6px; top: 0; width: 18px; height: 34px; border-radius: 7px 7px 9px 9px;
  background: radial-gradient(ellipse 5px 6px at 50% 72%, #d2b9a9 92%, transparent 100%), #f2e8e0; box-shadow: 0 0 0 2px rgba(0,0,0,0.55); }
.tapAnim::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 30px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255,179,64,0.9); box-sizing: border-box; opacity: 0; animation: ring1 1.1s ease-out infinite; }
.demoAmmo .tapAnim { right: -6px; top: 30px; }   /* on the right end of the bullets: the words stay readable */
@keyframes tap1 { 0%, 100% { transform: translateY(-8px); } 35% { transform: translateY(0); } 55% { transform: translateY(0); } }
@keyframes ring1 { 0%, 30% { opacity: 0; transform: scale(0.6); } 40% { opacity: 1; transform: scale(0.8); } 75%, 100% { opacity: 0; transform: scale(1.2); } }
/* the gun is empty: the hint just above the bullets box (bottom right), the finger over the box */
#reloadHint { position: fixed; z-index: 1; right: calc(env(safe-area-inset-right) + 10px); bottom: calc(env(safe-area-inset-bottom) + 92px);
  min-width: 156px; box-sizing: border-box; padding: 7px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.65); pointer-events: none;
  text-align: center; white-space: nowrap; }
#reloadHint[hidden] { display: none; }
#reloadHint p { margin: 0; font-size: 15px; font-weight: 800; color: #ffb340; }
#reloadHint .tapAnim { right: 63px; top: 100%; margin-top: 2px; }   /* over the middle of the bullets box (156 px wide) */
@media (max-height: 430px) {
  .howtoPic { width: 120px; height: 80px; margin: 0; }
  .howtoPic svg { width: 80px; height: 80px; }
  .howtoPic .demoAmmo, .howtoPic .demoAmmo svg { width: 120px; height: 58px; }
  .demoAmmo .tapAnim { top: 18px; }
  .howtoTitle { font-size: 26px; }
  button.link { margin-top: 6px; padding: 6px 20px; }
}

/* T-065 (D-476, D-475): the pause button (top left, while playing) and the full screen button (top right). 44 x 44 (a
   thumb), 8 px from the corner inside the safe area (the iPhone notch). Over the game and its panels. */
button.corner { position: fixed; z-index: 5; top: calc(env(safe-area-inset-top) + 8px); width: 44px; height: 44px; padding: 0;
  border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.45); background: rgba(0,0,0,0.45); box-shadow: none;
  display: flex; align-items: center; justify-content: center; touch-action: manipulation; }
button.corner[hidden] { display: none; }
button.corner svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
#pauseBtn { left: calc(env(safe-area-inset-left) + 8px); }
#pauseBtn svg { stroke-width: 3.6; }
#fullBtn { right: calc(env(safe-area-inset-right) + 8px); }
body:not([data-phase="play"]):not([data-phase="paused"]):not([data-phase="over"]) #fullBtn { display: none; }
#fullBtn .leave, #fullBtn.on .enter { display: none; }
#fullBtn.on .leave { display: inline; }
/* the pause screen fades in (a soft change, not a flash, also when someone taps pause again and again) */
#pausePanel { animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
#resumeBtn { margin-top: 6px; }

/* T-065 (D-474): the install offer on the start screen (only in a phone's browser) and the install steps */
button.install { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 18px; font-size: 15px; font-weight: 700;
  letter-spacing: 0.03em; border: 1.5px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.08); box-shadow: none; }
button.install[hidden] { display: none; }
button.install svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#installedNote { margin-top: 12px; }
#installPanel { z-index: 6; display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#installPanel[hidden] { display: none; }
.steps { display: flex; flex-direction: column; align-items: center; min-height: 100%; justify-content: center; max-width: 30em; margin: 0 auto; }
.stepsTitle { font-size: clamp(26px, 8vw, 40px); }
.steps .lead { max-width: 24em; }
.steps ol { list-style: none; padding: 0; margin: 0 0 6px; counter-reset: st; max-width: 26em; }
.steps ol[hidden] { display: none; }
.steps li { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; counter-increment: st; }
.steps li::before { content: counter(st); flex: none; width: 24px; height: 24px; border-radius: 50%; background: #7d0e10; color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; }
.steps .ico { flex: none; display: flex; align-items: center; gap: 2px; min-width: 44px; justify-content: center; color: #f2e8e0; }
.steps .ico b { font-size: 14px; }
.steps .ico svg { width: 30px; height: 30px; padding: 4px; border-radius: 8px; background: rgba(255,255,255,0.1); fill: none; stroke: #f2e8e0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.steps .ico svg circle { fill: #f2e8e0; stroke: none; }
.steps .ico svg .on { fill: #34c759; stroke: none; }
.steps .ico svg .knob { fill: #fff; }
.steps .ico img { width: 38px; height: 38px; border-radius: 9px; }
.steps .small { margin: 4px 0 14px; }
@media (max-height: 430px) {   /* a phone on its side: the steps in two columns */
  .steps { max-width: 46em; }
  .stepsTitle { font-size: 24px; margin-bottom: 2px; }
  .steps .lead { margin-bottom: 6px; font-size: 15px; }
  .steps ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; max-width: none; }
  .steps li { margin-bottom: 6px; font-size: 14px; line-height: 1.3; }
  .steps .small { margin: 2px 0 8px; }
  #stepsClose { padding: 12px 48px; }
  button.install { margin-top: 8px; padding: 6px 14px; font-size: 13px; }
}
@media (max-height: 340px) {
  .steps .lead { display: none; }
  .steps .ico svg { width: 26px; height: 26px; }
  .steps .ico img { width: 32px; height: 32px; }
  .steps .small { font-size: 12px; }
  #stepsOther { margin-top: 2px; padding: 4px 16px; }
}
#stepsOther { font-size: 14px; letter-spacing: 0.02em; }
/* a small phone upright (iPhone SE: 320 x 568): the start screen with the install button and the install steps fit */
@media (max-height: 640px) and (min-height: 431px) {
  .panel { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  h1 { font-size: 30px; margin-bottom: 6px; }
  .lead { font-size: 16px; margin-bottom: 10px; }
  ol { font-size: 14.5px; line-height: 1.35; margin-bottom: 16px; }
  li { margin: 2px 0; }
  button { padding: 16px 48px; }
  button.install { margin-top: 10px; padding: 8px 14px; font-size: 14px; }
  .small { margin-top: 10px; font-size: 12px; }
  .stepsTitle { font-size: 24px; letter-spacing: 0.04em; margin-bottom: 4px; }
  .steps .lead { font-size: 14px; margin-bottom: 8px; }
  .steps li { gap: 8px; margin-bottom: 8px; font-size: 14px; line-height: 1.3; }
  .steps li::before { width: 20px; height: 20px; font-size: 12px; }
  .steps .ico { min-width: 30px; }
  .steps .ico svg { width: 26px; height: 26px; padding: 3px; }
  .steps .ico img { width: 32px; height: 32px; }
  .steps .ico .to { display: none; }
  .steps .small { margin: 2px 0 10px; }
  #stepsOther { margin-top: 4px; padding: 6px 16px; }
}
@media (max-width: 360px) { button.install .why { display: none; } }

/* ---------- T-070 (D-503, D-505): the Breach Zone start menu (menu.js), the same idea as the sniper game's night
   screen: the name, CHOOSE LEVEL, the level cards (the picked one big, the next ones peek in), dots, the level in words,
   PLAY, HOW TO PLAY and SETTINGS. Our own look: black, a cold green glow (the nests' glow), red PLAY. Only CSS and small
   SVG shapes until Serena's logo and menu picture come (files.js brand). Nothing blinks or pulses (flash safety): the
   cards only slide (0.3 s) when another level is picked. */
.panel.menu { justify-content: space-between; gap: 10px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(16,58,56,0.55), rgba(0,0,0,0) 60%), radial-gradient(ellipse at 50% 100%, #0c0b10 0%, #05070a 70%), #05070a; }
/* Serena's background (art/menu-bg.webp, 720 x 1280: the logo on the plain top, the breach in the middle, the buttons on the calm
   dark bottom); a dark veil at the bottom keeps the words easy to read */
/* (a hidden menu stays hidden: its landscape layout sets display: grid, which would win over .panel[hidden]) */
.panel.menu[hidden] { display: none; }
.panel.menu.art { background: linear-gradient(180deg, rgba(5,7,10,0) 55%, rgba(5,7,10,0.55) 80%, rgba(5,7,10,0.75)), var(--menuBg) 50% 50% / cover no-repeat, #05070a; }
.mhead, .mpick, .mgo { width: 100%; max-width: 30em; display: flex; flex-direction: column; align-items: center; }
.mpick { flex: 1; min-height: 0; gap: 8px; }
.logo { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: 0.92; font-weight: 900; font-size: clamp(40px, 13vw, 72px);
  letter-spacing: 0.1em; padding-left: 0.1em; color: #eaf4ee; text-shadow: 0 0 18px rgba(47, 227, 180, 0.45), 0 2px 0 #000; }
.logo span + span { color: #9ff2dc; letter-spacing: 0.32em; padding-left: 0.32em; font-size: 0.86em; }
.logo img { display: block; width: min(86vw, 420px); height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8)); }
.logo.art span { display: none; }
.tagline { margin: 8px 0 0; font-size: 14px; letter-spacing: 0.04em; color: #a9bdb2; }
.msub { width: 100%; text-align: center; font-size: 13px; letter-spacing: 0.5em; padding: 6px 0 5px 0.5em; color: #cfe9e2;
  border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent, rgba(47, 227, 180, 0.8), transparent) 1; }
.mrowcar { width: 100%; flex: 1; min-height: 120px; max-height: 360px; display: flex; align-items: stretch; }
.mcar { position: relative; flex: 1; min-width: 0; overflow: hidden; touch-action: pan-y; }
button.arrow { flex: none; width: 34px; padding: 0; margin: 0; border: none; border-radius: 8px; background: none; box-shadow: none;
  font-size: 34px; font-weight: 400; line-height: 1; letter-spacing: 0; color: rgba(200, 235, 215, 0.7); }
.lcard { position: absolute; top: 2%; height: 96%; width: 54%; left: 23%; transition: transform 0.3s cubic-bezier(.2,.8,.2,1), opacity 0.3s; will-change: transform;
  -webkit-tap-highlight-color: transparent; cursor: pointer; }
.lcard .edge { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 14px; padding: 1.5px;
  background: linear-gradient(180deg, rgba(200, 230, 214, 0.7), rgba(90, 120, 104, 0.35) 55%, rgba(170, 210, 190, 0.55)); }
.lcard .in { height: 100%; box-sizing: border-box; overflow: hidden; border-radius: 13px; padding: 9% 8% 8%; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #13201b, #070b0a 60%, #050707); }
.lcard.on .edge { background: linear-gradient(180deg, #c8fff0, #2fe3b4 50%, #a6f5e0); box-shadow: 0 0 18px rgba(47, 227, 180, 0.5); }
.lcard.on .in { background: linear-gradient(180deg, #17322a, #08120f 60%, #050908); }
.lcard.on.locked .edge, .lcard.on.soon .edge { background: linear-gradient(180deg, #dfe6e2, #7d8a84 50%, #c4ccc8); box-shadow: 0 0 14px rgba(200, 215, 208, 0.3); }
.lcard.on.locked .in, .lcard.on.soon .in { background: linear-gradient(180deg, #1a201e, #0a0d0c 60%, #060707); }
.lcard .num { font-size: 34px; font-weight: 300; letter-spacing: 0.06em; line-height: 1; color: #eaf4ee; }
.lcard .pic { width: 100%; flex: 1; min-height: 40px; border-radius: 8px; background: #0b1311 50% 85% / contain no-repeat;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.9); display: flex; align-items: center; justify-content: center; }
.lcard .pic.none { background: repeating-linear-gradient(135deg, #0a0f0e 0 10px, #0d1412 10px 20px); }
.lcard .pic span { font-size: 44px; font-weight: 300; color: rgba(200, 230, 214, 0.5); }
.lcard .lock { width: 44px; height: 44px; fill: none; stroke: rgba(210, 225, 218, 0.8); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lcard .name { text-align: center; font-size: 14px; font-weight: 700; letter-spacing: 0.18em; line-height: 1.2; color: #eaf4ee; }
.lcard .foot { font-size: 11px; letter-spacing: 0.22em; color: #9fe0cf; }
.lcard.locked .num, .lcard.locked .name { opacity: 0.55; }
.lcard.locked .foot, .lcard.soon .foot { color: #a7aeab; }
.lcard.done .foot { color: #5ff0c8; font-weight: 700; }
.mdots { display: flex; justify-content: center; gap: 9px; }
.mdots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(200, 220, 210, 0.3); }
.mdots i.done { background: rgba(200, 235, 215, 0.75); }
.mdots i.on { background: #2fe3b4; box-shadow: 0 0 8px #1fbf95; transform: scale(1.3); }
.minfo { text-align: center; line-height: 1.35; min-height: 2.9em; margin-bottom: 10px; }
.minfo .l1 { font-size: 13px; letter-spacing: 0.18em; color: #bfe6dc; }
.minfo .l2 { font-size: 15px; color: #e2e8e4; margin-top: 2px; }
button.play { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 210px; padding: 16px 48px; }
button.play small { font-size: 12px; font-weight: 700; letter-spacing: 0.3em; padding-left: 0.3em; opacity: 0.85; }
/* PLAY <-> LOCKED: a soft colour change (flash safety: swiping fast between an open and a locked level swapped red and grey
   at once: 15,552 of 21,824, measured) */
button.play { transition: background-color 0.35s, border-color 0.35s, color 0.35s, box-shadow 0.35s; }
button.play.locked, button.play.locked:disabled { opacity: 1; color: #9aa29e; border-color: rgba(200, 210, 205, 0.4); background: #1a1f1d; box-shadow: none; }
.mbtns { display: flex; gap: 10px; margin-top: 12px; }
button.ghost { padding: 11px 16px; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; border: 1.5px solid rgba(170, 230, 215, 0.45);
  background: rgba(5, 7, 10, 0.55); box-shadow: none; border-radius: 10px; color: #dff3ee; }
.panel.menu button.install { margin-top: 10px; white-space: nowrap; }
.panel.menu .small { margin-top: 10px; }
/* HOW TO PLAY and SETTINGS: over the menu */
.panel.sub { z-index: 4; background: rgba(3, 5, 8, 0.94); animation: fadeIn 0.25s ease-out; }   /* (flash safety: fades in, menu.js PANEL_GAP) */
.subTitle { font-size: clamp(28px, 9vw, 44px); color: #eaf4ee; text-shadow: 0 0 20px rgba(47, 227, 180, 0.4); }
#helpPanel ol { margin-bottom: 8px; }
#helpOk, #setOk { margin-top: 16px; padding: 16px 56px; }
button.toggle { display: flex; justify-content: space-between; align-items: center; width: min(80vw, 300px); margin: 6px 0; padding: 14px 20px;
  font-size: 18px; letter-spacing: 0.06em; border-radius: 12px; border: 1.5px solid rgba(200, 215, 208, 0.4); background: #121816; box-shadow: none; }
button.toggle b { font-size: 15px; letter-spacing: 0.1em; color: #a2aaa6; }
button.toggle.on { border-color: #2fe3b4; background: #0c2621; }
button.toggle.on b { color: #8ff5dc; }
#overLevel { margin: 0 0 6px; letter-spacing: 0.2em; }
#opened { margin: 10px 0 0; }
#menuBtn { margin-top: 10px; }
/* a small phone upright (iPhone SE, 320 x 568) */
@media (max-height: 640px) and (min-height: 431px) {
  .panel.menu { gap: 6px; }
  .logo { font-size: clamp(34px, 11vw, 46px); }
  .logo img { width: min(80vw, 300px); }
  .tagline { display: none; }
  .msub { font-size: 12px; padding: 4px 0 3px 0.5em; }
  .mrowcar { min-height: 110px; }
  .lcard .num { font-size: 26px; }
  .lcard .in { gap: 4px; padding: 7% 7% 6%; }
  .lcard .name { font-size: 11px; letter-spacing: 0.1em; }
  .lcard .pic { min-height: 24px; }
  .minfo { margin-bottom: 6px; }
  .minfo .l2 { font-size: 14px; }
  button.play { padding: 12px 40px; }
  .mbtns { margin-top: 8px; }
  button.ghost { padding: 9px 14px; font-size: 13px; }
  .panel.menu .small { margin-top: 6px; }
  #helpPanel ol { font-size: 13.5px; }
}
/* a phone on its side: the cards on the left, PLAY and the rest on the right */
@media (max-height: 430px) {
  .panel.menu { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "head go" "pick go"; column-gap: 16px; row-gap: 4px; align-items: stretch; justify-items: center; }
  .mhead { grid-area: head; }
  .mpick { grid-area: pick; gap: 4px; }
  .mgo { grid-area: go; justify-content: center; }
  .logo { flex-direction: row; gap: 0.4em; font-size: clamp(24px, 7vh, 34px); }
  .logo span + span { font-size: 1em; letter-spacing: 0.1em; padding-left: 0; }
  .logo img { width: auto; height: clamp(40px, 15vh, 64px); max-width: 100%; }
  .tagline { display: none; }
  .msub { font-size: 11px; padding: 3px 0 2px 0.5em; }
  .mrowcar { min-height: 0; max-height: none; }
  .lcard .num { font-size: 22px; }
  .lcard .in { gap: 3px; padding: 6% 7% 5%; }
  .lcard .name { font-size: 11px; letter-spacing: 0.12em; }
  .lcard .foot { font-size: 10px; }
  .lcard .pic { min-height: 30px; }
  .minfo { margin-bottom: 6px; }
  .minfo .l1 { font-size: 12px; }
  .minfo .l2 { font-size: 13px; }
  button.play { padding: 10px 36px; font-size: 20px; }
  .mbtns { margin-top: 6px; }
  button.ghost { padding: 7px 12px; font-size: 12px; }
  .panel.menu button.install { margin-top: 6px; }
  .panel.menu button.install .why { display: none; }
  .panel.menu .small { margin-top: 6px; font-size: 11.5px; }
  #helpPanel ol { columns: 2; column-gap: 22px; max-width: 46em; margin-bottom: 4px; font-size: 13px; }
  #helpPanel li { break-inside: avoid; }
  #helpOk, #setOk { margin-top: 8px; padding: 10px 48px; }
  .subTitle { font-size: 26px; margin-bottom: 4px; }
  button.toggle { margin: 3px 0; padding: 9px 18px; font-size: 16px; }
  #overLevel { margin-bottom: 2px; }
}
@media (max-height: 340px) {
  .panel.menu .small { display: none; }
  #setPanel .small { display: none; }
  #helpPanel ol { font-size: 12px; line-height: 1.25; }
}
