:root {
  --ink: #e8eefc;
  --dim: #8fa2c8;
  --accent: #6fd8ff;
  --hot: #ff6b81;
  --gold: #ffd166;
  --panel: rgba(8, 12, 26, 0.88);
  --steel-hi: rgba(198, 218, 245, 0.22);
  --steel-lo: rgba(0, 0, 0, 0.55);
  --chrome: 96px; /* footer + stage padding, reserved from the viewport height */
  --bar-h: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(900px 540px at 50% -6%, rgba(64, 100, 168, 0.34), transparent 66%),
    radial-gradient(1200px 700px at 50% 112%, rgba(24, 44, 80, 0.28), transparent 70%),
    linear-gradient(180deg, #080c18 0%, #04060e 60%, #020307 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

/* Fine grain over the whole cockpit: barely visible, but it stops the large
 * gradients from looking like flat digital fills. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.frame {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.stagewrap {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 10px 10px 12px;
}

/*
 * The stage keeps a fixed 2:3 field. Width is the definite axis and the height
 * comes from aspect-ratio, so the ratio actually applies — a stretched item
 * (flex-grow, or align stretch) has two definite axes and ignores it.
 */
.stage {
  position: relative;
  width: min(100%, calc((100vh - var(--chrome)) * 2 / 3));
  width: min(100%, calc((100dvh - var(--chrome)) * 2 / 3));
  aspect-ratio: 2 / 3;
  container-type: size;
  border-radius: 18px;
  overflow: hidden;
  background: #05060f;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(186, 210, 244, 0.24),
    0 0 0 6px #0a0e17,
    0 0 0 7px rgba(255, 255, 255, 0.07),
    0 34px 90px rgba(0, 0, 0, 0.74),
    0 0 110px rgba(64, 128, 255, 0.16);
}

/* Canopy glass: a single raking highlight, not a full-screen sheen. */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.085) 0%,
    rgba(255, 255, 255, 0.025) 17%,
    transparent 36%,
    transparent 100%
  );
  mix-blend-mode: screen;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 70px rgba(0, 0, 0, 0.34);
}

canvas#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

/* Touch-only bomb control. It sits clear of the player and the HUD line. */
.stage-btn {
  position: absolute;
  right: 12px;
  bottom: 84px;
  z-index: 6;
  display: none;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 190, 225, 0.55);
  background:
    radial-gradient(circle at 35% 26%, rgba(255, 198, 230, 0.24), transparent 46%),
    linear-gradient(180deg, #3a2033 0%, #1b1022 55%, #0d0813 100%);
  color: #ff9bd2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 6px rgba(0, 0, 0, 0.55),
    0 10px 24px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(255, 138, 212, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease, opacity 0.12s ease, filter 0.12s ease;
}
.stage-btn:active { transform: scale(0.94); }
.stage-btn:disabled { opacity: 0.35; cursor: default; }
.stage-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.stage-btn-icon {
  width: 31px;
  height: 31px;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

.bomb-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb4e2, #ff7cc8 55%, #d94d9f);
  color: #23091a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.55);
}

@media (any-pointer: coarse), (max-width: 640px) {
  .stage-btn { display: grid; }
}

/* [hidden] is only a UA rule, so state it explicitly next to the display rule. */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 4cqw;
  background:
    radial-gradient(125% 95% at 50% 38%, rgba(34, 54, 94, 0.52), rgba(3, 5, 12, 0.86));
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.overlay[hidden] { display: none; }

/*
 * Overlay chrome is sized in container units so it tracks the letterboxed
 * stage rather than the viewport, which can be a very different shape.
 */
.panel {
  position: relative;
  width: min(88cqw, 430px);
  max-height: 100%;
  overflow: auto;
  padding: clamp(18px, 6cqh, 34px) clamp(16px, 6cqw, 30px);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(76, 92, 122, 0.34), rgba(12, 16, 27, 0.96) 42%, rgba(6, 9, 17, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, rgba(0, 0, 0, 0.018) 1px 3px),
    var(--panel);
  border: 1px solid rgba(186, 210, 244, 0.24);
  border-radius: 18px;
  box-shadow:
    0 30px 84px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7),
    inset 0 0 60px rgba(0, 0, 0, 0.42);
  animation: rise 0.22s ease-out;
  scrollbar-width: thin;
  scrollbar-color: rgba(111, 216, 255, 0.32) transparent;
}

/* Inner bezel of the instrument housing. */
.panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 0;
  border-radius: 13px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 32px rgba(0, 0, 0, 0.4);
}

/* Four panel screws. */
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    radial-gradient(circle, #a4b1c6 0 1.5px, #05080f 2.1px 3.1px, transparent 3.5px),
    radial-gradient(circle, #a4b1c6 0 1.5px, #05080f 2.1px 3.1px, transparent 3.5px),
    radial-gradient(circle, #a4b1c6 0 1.5px, #05080f 2.1px 3.1px, transparent 3.5px),
    radial-gradient(circle, #a4b1c6 0 1.5px, #05080f 2.1px 3.1px, transparent 3.5px);
  background-size: 16px 16px;
  background-repeat: no-repeat;
  background-position:
    9px 9px,
    calc(100% - 9px) 9px,
    9px calc(100% - 9px),
    calc(100% - 9px) calc(100% - 9px);
  opacity: 0.75;
}

.panel > * { position: relative; z-index: 1; }

/* Title-screen hero and crest. The crest sits inline on phones and pins to the
 * hero's lower corner when the stage has room for the illustration. */
.title-hero {
  position: relative;
  display: grid;
  place-items: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

.hero {
  display: none;
  width: clamp(128px, 40cqw, 192px);
  height: auto;
  margin: 0;
  filter:
    drop-shadow(0 14px 18px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 22px rgba(111, 216, 255, 0.22));
  transform: rotate(-4deg);
  pointer-events: none;
  user-select: none;
}
@container (min-height: 600px) {
  .hero { display: block; }
  .title-hero { margin-top: -6px; margin-bottom: 4px; }
}

/* Squadron crest: the same mark as the favicon. It stands above the title on
 * phones and pins to the hero's lower corner when the illustration is shown. */
.panel-logo {
  display: block;
  width: clamp(44px, 12cqw, 58px);
  height: auto;
  margin: 0 auto clamp(4px, 1.2cqh, 8px);
  filter:
    drop-shadow(0 5px 10px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 16px rgba(111, 216, 255, 0.3));
  pointer-events: none;
  user-select: none;
}
@container (min-height: 600px) {
  .panel-logo {
    position: absolute;
    right: -8px;
    bottom: -2px;
    width: clamp(42px, 10cqw, 50px);
    margin: 0;
  }
  /* If the hero image is unavailable, the crest returns to the normal flow
   * instead of collapsing the wrapper to zero height. */
  .title-hero.no-hero { margin-bottom: 0; }
  .title-hero.no-hero .panel-logo {
    position: static;
    width: clamp(44px, 12cqw, 58px);
    margin: 0 auto clamp(4px, 1.2cqh, 8px);
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.kicker {
  margin: 0 0 7px;
  color: #9fb6d8;
  font-size: clamp(9px, 2.5cqw, 11px);
  font-weight: 700;
  letter-spacing: 0.3em;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0.9;
  text-shadow: 0 1px 0 #000;
}

.panel h1 {
  margin: 0 0 8px;
  font-size: clamp(25px, 8cqw, 42px);
  line-height: 1.08;
  letter-spacing: 0.015em;
  text-wrap: balance;
  background: linear-gradient(180deg, #ffffff 6%, #d8edff 46%, var(--accent) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55));
}

/* Keep the long katakana brand on one line at phone widths. */
html[lang="ja"] .panel h1 {
  font-size: clamp(19px, 6cqw, 28px);
  letter-spacing: 0;
}

/* Hangul is wider per character than Latin; keep the four-word title on one
 * or two balanced lines at phone widths. */
html[lang="ko"] .panel h1 {
  font-size: clamp(20px, 6.4cqw, 33px);
  letter-spacing: 0;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 6.4cqw, 32px);
  line-height: 1.15;
  letter-spacing: 0.05em;
  color: var(--hot);
  text-wrap: balance;
}

.panel h2.calm { color: var(--accent); }

.tag {
  margin: 0 0 clamp(12px, 2.8cqh, 20px);
  color: var(--dim);
  font-size: clamp(12px, 3.3cqw, 15px);
  line-height: 1.45;
}

/* Only worth saying where there is no keyboard. */
.touch { display: none; }
@media (pointer: coarse) {
  .touch {
    display: block;
    margin: 0 0 clamp(12px, 2.6cqh, 18px);
    color: var(--accent);
    font-size: clamp(11px, 3.1cqw, 14px);
    line-height: 1.45;
  }
}

.keys {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 16px;
  align-items: baseline;
  justify-content: center;
  margin: 0 0 clamp(16px, 3.2cqh, 22px);
  padding: clamp(10px, 2.2cqh, 14px) clamp(12px, 3.4cqw, 18px);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.015));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  font-size: clamp(11px, 3.1cqw, 14px);
  text-align: left;
}
.keys dt {
  margin: 0;
  color: var(--dim);
  font-size: 0.86em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}
.keys dd {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.3;
}

.score-label {
  margin: 0;
  color: var(--dim);
  font-size: clamp(10px, 2.8cqw, 12px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.score {
  margin: 2px 0 10px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(32px, 11cqw, 54px);
  font-weight: 700;
  line-height: 1.05;
  color: #ffd77a;
  text-shadow:
    0 0 24px rgba(255, 180, 60, 0.4),
    0 2px 0 rgba(66, 34, 0, 0.72);
  font-variant-numeric: tabular-nums;
}

.cta {
  appearance: none;
  display: block;
  width: min(100%, 270px);
  margin: 0 auto;
  border: 1px solid rgba(206, 243, 255, 0.6);
  border-radius: 999px;
  padding: clamp(11px, 2.6cqh, 15px) clamp(22px, 8cqw, 40px);
  font: inherit;
  font-weight: 800;
  font-size: clamp(14px, 4cqw, 18px);
  letter-spacing: 0.03em;
  color: #062033;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.05) 46%, transparent 47%),
    linear-gradient(180deg, #b9f0ff 0%, #6fd8ff 48%, #2b9fd0 100%);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -2px 3px rgba(0, 50, 80, 0.55),
    0 2px 0 #0a3550,
    0 12px 26px rgba(20, 120, 180, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.cta:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 50, 80, 0.55),
    0 1px 0 #0a3550,
    0 5px 14px rgba(20, 120, 180, 0.28);
}
.cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.panel-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin: 0 auto;
}

.secondary {
  appearance: none;
  width: min(100%, 270px);
  border: 1px solid rgba(196, 216, 246, 0.24);
  border-radius: 999px;
  padding: clamp(9px, 2.2cqh, 12px) 22px;
  font: inherit;
  font-size: clamp(12px, 3.4cqw, 15px);
  font-weight: 650;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 48%),
    linear-gradient(180deg, #2a3346 0%, #131a29 58%, #0a0f1b 100%);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 2px 0 #05080f;
  transition: background 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
}
.secondary:hover { filter: brightness(1.12); border-color: rgba(196, 216, 246, 0.4); }
.secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.best {
  margin: clamp(11px, 2.5cqh, 17px) 0 clamp(2px, 1cqh, 6px);
  color: var(--dim);
  font-size: clamp(11px, 3.1cqw, 14px);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.record {
  margin: clamp(11px, 2.5cqh, 17px) 0 clamp(9px, 2cqh, 13px);
  color: var(--gold);
  font-weight: 800;
  font-size: clamp(12px, 3.5cqw, 15px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--bar-h);
  padding: 0 clamp(10px, 2vw, 20px);
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(48, 60, 84, 0.94), rgba(10, 14, 24, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.17),
    0 -10px 30px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  font-size: 12px;
  color: #9fb4dd;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #eaf2ff;
  white-space: nowrap;
  text-shadow:
    0 1px 0 #000,
    0 0 14px rgba(111, 216, 255, 0.16);
}

.brand-mark {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  filter:
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 8px rgba(111, 216, 255, 0.24));
}

.brand-word { display: inline-block; }

.hint {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.lang-field {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-field::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--dim);
  border-bottom: 1.5px solid var(--dim);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 34px;
  padding: 5px 25px 5px 11px;
  border: 1px solid rgba(196, 216, 246, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(52, 66, 90, 0.7), rgba(13, 18, 30, 0.9));
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 4px rgba(0, 0, 0, 0.42),
    0 1px 0 rgba(0, 0, 0, 0.6);
}
.lang-select:hover { filter: brightness(1.12); }
.lang-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-select option {
  background: #0b1020;
  color: var(--ink);
}

.ghost {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid rgba(196, 216, 246, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 50%),
    linear-gradient(180deg, rgba(52, 66, 90, 0.7), rgba(13, 18, 30, 0.9));
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 4px rgba(0, 0, 0, 0.42),
    0 1px 0 rgba(0, 0, 0, 0.6);
  transition: filter 0.12s ease, border-color 0.12s ease;
}
.ghost:hover { filter: brightness(1.14); border-color: rgba(196, 216, 246, 0.4); }
.ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ghost:disabled { opacity: 0.36; cursor: default; filter: none; }
.ghost:disabled:hover { border-color: rgba(196, 216, 246, 0.26); }

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-pause rect, .icon-play path, .icon .speaker { fill: currentColor; stroke: none; }
.icon-play, .icon-muted { display: none; }

#pause[data-paused="true"] .icon-pause { display: none; }
#pause[data-paused="true"] .icon-play { display: block; }
#mute[aria-pressed="true"] .icon-sound { display: none; }
#mute[aria-pressed="true"] .icon-muted { display: block; }

@media (max-width: 640px) {
  :root { --chrome: 92px; }
  .bar { gap: 8px; padding-inline: 10px; }
  .hint { display: none; }
  .brand { font-size: 10px; letter-spacing: 0.1em; gap: 5px; }
  .brand-mark { width: 20px; height: 20px; }
  .controls { gap: 5px; }
  .btn-label { display: none; }
  .ghost { width: 36px; padding: 0; }
  .lang-select { font-size: 11px; min-height: 34px; padding: 5px 23px 5px 10px; }
  .panel { width: min(90cqw, 360px); }
}

@media (max-height: 620px) {
  .panel { padding: 14px 18px; }
  .keys { gap: 4px 12px; padding: 8px 0; margin-bottom: 12px; }
  .tag { margin-bottom: 10px; }
  .score { margin-bottom: 6px; }
}

/* Short containers (portal iframes, landscape phones) cannot fit the full
 * title panel: tighten it so Take off stays on screen instead of scrolling. */
@container (max-height: 520px) {
  .overlay { padding: 2cqw; }
  .panel {
    width: min(96cqw, 430px);
    padding: 8px 13px;
  }
  .panel-logo { width: 32px; margin-bottom: 2px; }
  .kicker { display: none; }
  .panel h1 { font-size: clamp(20px, 6.6cqw, 25px); margin-bottom: 3px; }
  html[lang="ja"] .panel h1,
  html[lang="ko"] .panel h1 { font-size: clamp(17px, 5.6cqw, 21px); }
  .tag { margin-bottom: 5px; font-size: 11px; line-height: 1.3; }
  .keys {
    gap: 2px 10px;
    margin-bottom: 6px;
    padding: 5px 10px;
    font-size: 10px;
  }
  .touch { margin-bottom: 6px; font-size: 10px; line-height: 1.3; }
  .cta { padding: 6px 20px; font-size: 13px; }
  .best { margin: 5px 0 0; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
  .cta, .ghost, .stage-btn { transition: none; }
}
