html {
  overscroll-behavior: contain;
}

:root {
  color-scheme: light;
  --stage-bg: #efe7d7;
  --stage-floor: #d9b477;
  --glass: rgba(250, 246, 234, 0.7);
  --glass-strong: rgba(255, 252, 242, 0.84);
  --line: rgba(150, 126, 105, 0.42);
  --text: #66594d;
  --text-strong: #ffffff;
  --pink: #d79c9d;
  --peach: #e4c6a8;
  --butter: #ead995;
  --mint: #a9c8ae;
  --sky: #9ebfca;
  --lavender: #b7adc7;
  --shadow: 0 14px 34px rgba(93, 79, 65, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.26) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(135deg, #f3ecdc 0%, #e8dfce 42%, #d8e3d5 72%, #d8d4dd 100%);
}

button,
canvas {
  touch-action: manipulation;
}

.game-column,
#gameCanvas {
  touch-action: none;
  user-select: none;
}

.app-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 10px;
}

.stage-screen {
  position: relative;
  width: min(900px, calc(100dvw - 20px), calc((100dvh - 20px) * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 12px, transparent 12px 48px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32) 0 11%, transparent 11%),
    linear-gradient(180deg, #e9ddce 0 44%, #d8c896 44% 47%, #d7bd93 47% 100%);
  border: 8px solid rgba(251, 246, 231, 0.7);
  box-shadow:
    inset 0 0 0 2px rgba(130, 112, 92, 0.16),
    inset 0 -18px 34px rgba(135, 100, 74, 0.1),
    0 20px 48px rgba(83, 73, 61, 0.16);
}

.stage-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0 25%, transparent 25% 50%, rgba(255, 255, 255, 0.16) 50% 75%, transparent 75%) 0 0 / 38px 38px,
    repeating-radial-gradient(circle at 7px 7px, rgba(255, 255, 255, 0.28) 0 2px, transparent 2px 32px);
  opacity: 0.46;
  pointer-events: none;
}

.stage-screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 8.8%;
  height: 18px;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(123, 108, 91, 0.34) 48% 52%, transparent 52%) 0 0 / 52px 18px,
    linear-gradient(45deg, transparent 0 48%, rgba(123, 108, 91, 0.34) 48% 52%, transparent 52%) 26px 0 / 52px 18px;
  opacity: 0.52;
  pointer-events: none;
}

.score-bubble,
.next-bubble,
.ranking-card,
.evolution-card,
.control-strip,
.language-switch,
.mascot-cloud,
.game-column {
  position: absolute;
  z-index: 1;
}

.language-switch {
  left: 50%;
  top: 2.2%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, 44px);
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(246, 240, 220, 0.78);
  border: 2px dashed rgba(123, 105, 88, 0.28);
  box-shadow: var(--shadow);
  z-index: 3;
}

.language-switch__button {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: #6b5a4b;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.language-switch__button--active {
  background: linear-gradient(180deg, #f6e6ab, #d3c08f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 2px 0 rgba(105, 86, 69, 0.16);
}

.score-bubble,
.next-bubble {
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.42) 0 2px, transparent 2px 23px),
    linear-gradient(180deg, rgba(252, 248, 236, 0.92), rgba(226, 216, 198, 0.82));
  border: 3px dashed rgba(125, 110, 92, 0.34);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.62),
    0 8px 0 rgba(118, 96, 75, 0.12),
    var(--shadow);
  text-align: center;
  text-shadow: 0 2px 4px rgba(89, 76, 63, 0.16);
}

.score-bubble {
  left: 10.8%;
  top: 10.6%;
}

.next-bubble {
  right: 10.8%;
  top: 10.8%;
}

.hud-title {
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
  font-size: 1.36rem;
  color: var(--text-strong);
  -webkit-text-stroke: 1px rgba(89, 77, 64, 0.28);
}

.score-value {
  display: block;
  margin-top: -16px;
  font-size: 2rem;
  line-height: 1;
  color: #ead985;
  -webkit-text-stroke: 1px rgba(91, 76, 61, 0.36);
}

.best-score {
  margin-top: -22px;
  font-size: 0.74rem;
  font-weight: 800;
  color: rgba(95, 73, 50, 0.92);
  text-transform: uppercase;
}

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

.settings-backdrop {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(60, 50, 40, 0.32);
  cursor: pointer;
}

.settings-backdrop--hidden {
  display: none;
}

#nextCanvas {
  width: 68px;
  height: 68px;
  margin-top: -20px;
}

.ranking-card {
  left: 9.2%;
  bottom: 12%;
  width: 208px;
  min-height: 188px;
  padding: 14px 16px;
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.32) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 0 / 18px 18px,
    rgba(246, 239, 222, 0.82);
  border: 3px solid rgba(255, 255, 255, 0.5);
  outline: 2px dashed rgba(128, 111, 91, 0.32);
  outline-offset: -8px;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.46), var(--shadow);
}

.ranking-card__header {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  gap: 8px;
  color: #6f6254;
  text-align: center;
}

.ranking-card__header span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 800;
}

.ranking-card__header strong,
.evolution-card strong {
  color: #fff7e8;
  -webkit-text-stroke: 1px rgba(83, 72, 60, 0.3);
  text-shadow: 0 2px 4px rgba(90, 77, 64, 0.16);
}

.ranking-card ol {
  list-style: none;
  display: grid;
  gap: 6px;
  margin: 8px 0 8px;
  padding: 0;
}

.ranking-card li,
.ranking-card__now,
.ranking-card__rank {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.44);
}

.ranking-card li span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #cfb56d;
  color: #fff7d6;
  font-weight: 900;
}

.ranking-card li:nth-child(2) span {
  background: #8fb8b7;
}

.ranking-card li:nth-child(3) span {
  background: #b99575;
}

.ranking-card__mine {
  box-shadow: inset 0 0 0 2px rgba(207, 181, 109, 0.34);
}

.ranking-card em {
  color: rgba(128, 101, 65, 0.58);
  font-style: normal;
  font-weight: 800;
}

.ranking-card li strong {
  color: #7a6550;
  font-size: 0.84rem;
}

.ranking-card__profile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 10px;
}

.ranking-card__profile input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.52);
  color: #6f6254;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(139, 119, 96, 0.16);
}

.ranking-card__profile .button {
  padding: 4px 10px;
}

.ranking-card__now,
.ranking-card__rank {
  grid-template-columns: 1fr auto;
  color: #9b855c;
  text-transform: uppercase;
}

.ranking-card__rank {
  min-height: 24px;
  margin-top: 6px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.28);
}

.game-column {
  left: 50%;
  top: 6%;
  bottom: 13%;
  width: clamp(340px, 38%, 385px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mascot-cloud {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 86px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px 999px 46% 46%;
  background:
    radial-gradient(circle at 24px 22px, #5f554a 0 4px, transparent 5px),
    radial-gradient(circle at 62px 22px, #5f554a 0 4px, transparent 5px),
    linear-gradient(180deg, #f7edc6, #d8c9af);
  color: transparent;
  font-size: 0.72rem;
  font-weight: 900;
  border: 2px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 5px 0 rgba(108, 89, 73, 0.16), 0 0 18px rgba(237, 221, 191, 0.42);
  z-index: 2;
}

.mascot-cloud::before,
.mascot-cloud::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 12px;
  height: 8px;
  border-radius: 50%;
  background: rgba(162, 127, 109, 0.52);
}

.mascot-cloud::before {
  left: 18px;
}

.mascot-cloud::after {
  right: 18px;
}

.mascot-cloud {
  isolation: isolate;
}

.mascot-cloud {
  color: transparent;
}

.mascot-cloud::selection {
  color: transparent;
}

.game-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 480 / 620;
  filter: none;
  box-shadow: 0 14px 16px rgba(130, 82, 66, 0.18);
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.next-bubble .hud-title {
  align-self: end;
  font-size: 1.38rem;
}

.next-bubble__queue {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: -18px;
}

.next-bubble__queue-label {
  font-size: 0.64rem;
  font-weight: 800;
  color: rgba(111, 94, 77, 0.88);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#queueCanvas {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 0 0 1px rgba(125, 109, 92, 0.14);
}

.evolution-card {
  right: 8.9%;
  bottom: 16%;
  display: grid;
  place-items: center;
  width: 202px;
  height: 210px;
  padding-top: 8px;
  border-radius: 24px;
  background:
    repeating-radial-gradient(circle at 10px 10px, rgba(255, 255, 255, 0.36) 0 2px, transparent 2px 24px),
    rgba(221, 231, 214, 0.72);
  border: 3px solid rgba(255, 255, 255, 0.48);
  outline: 2px dashed rgba(101, 137, 111, 0.32);
  outline-offset: -8px;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.38), var(--shadow);
}

.evolution-card strong {
  align-self: start;
  font-size: 1.22rem;
}

#evolutionCanvas {
  width: 158px;
  height: 158px;
  margin-top: -10px;
}

.evolution-card__status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: calc(100% - 22px);
  margin-top: -10px;
}

.evolution-card__chip {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(108, 136, 112, 0.14);
  text-align: center;
}

.evolution-card__chip span {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(97, 117, 102, 0.88);
}

.evolution-card__chip strong {
  display: block;
  margin-top: 3px;
  color: #fdf8ea;
  font-size: 0.8rem;
  line-height: 1.2;
  -webkit-text-stroke: 0.8px rgba(83, 72, 60, 0.22);
}

.control-strip {
  left: 50%;
  bottom: 0.6%;
  width: 56%;
  min-height: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(246, 240, 220, 0.7);
  border: 2px dashed rgba(123, 105, 88, 0.32);
  color: rgba(92, 78, 65, 0.92);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.settings-panel {
  position: absolute;
  left: 50%;
  bottom: 8%;
  z-index: 4;
  width: min(320px, 72%);
  padding: 16px;
  transform: translateX(-50%);
  border-radius: 22px;
  background: rgba(250, 244, 224, 0.96);
  border: 3px solid rgba(255, 255, 255, 0.58);
  outline: 2px dashed rgba(128, 111, 91, 0.32);
  outline-offset: -8px;
  box-shadow: 0 18px 32px rgba(83, 52, 22, 0.22);
}

.settings-panel--hidden {
  display: none;
}

.settings-panel:not(.settings-panel--hidden) {
  animation: settings-panel-pop 180ms ease;
}

.settings-backdrop:not(.settings-backdrop--hidden) {
  animation: settings-backdrop-fade 180ms ease;
}

@keyframes settings-panel-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes settings-backdrop-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-panel:not(.settings-panel--hidden),
  .settings-backdrop:not(.settings-backdrop--hidden) {
    animation: none;
    transition: none;
  }
}

.settings-panel__header,
.settings-panel__row,
.settings-panel__stat,
.settings-panel__language {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-panel__header {
  margin-bottom: 12px;
}

.settings-panel__header strong {
  color: #66594d;
  font-size: 1.12rem;
}

.settings-panel__close {
  min-height: 30px;
}

.settings-panel__row,
.settings-panel__stat,
.settings-panel__language {
  min-height: 42px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  color: #756352;
  font-size: 0.9rem;
  font-weight: 900;
}

.settings-panel__stat strong {
  color: #66594d;
  font-size: 1.06rem;
}

.settings-panel__lang-buttons {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  gap: 5px;
}

.settings-panel__lang-button {
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: #6b5a4b;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(139, 119, 96, 0.14);
}

.settings-panel__lang-button--active {
  background: linear-gradient(180deg, #f6e6ab, #d3c08f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 2px 0 rgba(105, 86, 69, 0.16);
}

.settings-panel__row input {
  width: 22px;
  height: 22px;
  accent-color: #8fb8b7;
}

.settings-panel__danger {
  width: 100%;
  min-height: 38px;
  margin-top: 12px;
  color: #7f4e43;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 4px 14px;
  background: linear-gradient(180deg, #f5e9bd, #d8c7ad);
  color: #65574b;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 3px 0 rgba(105, 86, 69, 0.18);
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(88, 74, 62, 0.22);
}

.overlay--hidden {
  display: none;
}

.overlay__card {
  width: min(84%, 300px);
  padding: 22px;
  border-radius: 22px;
  background: rgba(250, 244, 224, 0.96);
  border: 3px dashed rgba(128, 111, 91, 0.38);
  text-align: center;
  box-shadow: 0 18px 32px rgba(83, 52, 22, 0.22);
}

.overlay__eyebrow,
.overlay__card p,
h2 {
  margin: 0;
}

h2 {
  color: #66594d;
}

.overlay__card p:last-of-type {
  margin: 10px 0 16px;
  line-height: 1.5;
}

.overlay__stats {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}

.overlay__stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  color: #7a6550;
  font-size: 0.88rem;
  font-weight: 800;
}

.overlay__stat strong {
  color: #66594d;
  font-size: 1rem;
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .app-shell {
    min-height: 100dvh;
    padding: 0;
    align-items: stretch;
  }

  .stage-screen {
    width: 100dvw;
    height: 100dvh;
    min-height: 100dvh;
    aspect-ratio: auto;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .score-bubble,
  .next-bubble {
    top: max(10px, env(safe-area-inset-top));
    width: min(38dvw, 144px);
    height: 68px;
    border-radius: 24px;
    align-content: center;
    gap: 0;
  }

  .score-bubble {
    left: 10px;
  }

  .next-bubble {
    right: 10px;
  }

  .language-switch {
    top: calc(max(10px, env(safe-area-inset-top)) + 20px);
    grid-template-columns: repeat(2, 28px);
    gap: 2px;
    padding: 3px;
  }

  .language-switch__button {
    min-height: 26px;
    font-size: 0.72rem;
  }

  .hud-title {
    font-size: 0.92rem;
  }

  .score-value {
    margin-top: -2px;
    font-size: 1.52rem;
  }

  .best-score {
    display: none;
  }

  #nextCanvas {
    width: 42px;
    height: 42px;
    margin-top: -6px;
  }

  .next-bubble__queue {
    margin-top: -8px;
  }

  .next-bubble__queue-label {
    font-size: 0.52rem;
  }

  #queueCanvas {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .game-column {
    top: calc(max(10px, env(safe-area-inset-top)) + 78px);
    bottom: auto;
    width: min(calc(100dvw - 36px), calc((100dvh - 232px) * 480 / 620), 380px);
    height: auto;
  }

  .mascot-cloud {
    width: 66px;
    height: 30px;
  }

  .ranking-card {
    left: 8px;
    bottom: calc(54px + env(safe-area-inset-bottom));
    width: calc(50dvw - 18px);
    min-height: 96px;
    padding: 10px;
    border-radius: 20px;
  }

  .ranking-card__header {
    grid-template-columns: 22px 1fr 22px;
    gap: 5px;
    font-size: 0.78rem;
  }

  .ranking-card__header span {
    width: 22px;
    height: 22px;
  }

  .ranking-card ol {
    display: none;
  }

  .ranking-card__now {
    min-height: 30px;
    margin-top: 6px;
    font-size: 0.86rem;
    border-radius: 16px;
  }

  .ranking-card__profile {
    margin-top: 6px;
  }

  .ranking-card__profile input {
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  .ranking-card__rank {
    display: none;
  }

  .ranking-card li {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 0.76rem;
  }

  .ranking-card li span {
    width: 20px;
    height: 20px;
  }

  .evolution-card {
    right: 8px;
    bottom: calc(54px + env(safe-area-inset-bottom));
    width: calc(50dvw - 18px);
    height: 150px;
  }

  .evolution-card strong {
    font-size: 0.92rem;
  }

  #evolutionCanvas {
    width: 92px;
    height: 92px;
    margin-top: -8px;
  }

  .evolution-card__status {
    width: calc(100% - 12px);
    gap: 6px;
    margin-top: -2px;
  }

  .evolution-card__chip {
    padding: 6px;
    border-radius: 14px;
  }

  .evolution-card__chip span {
    font-size: 0.5rem;
  }

  .evolution-card__chip strong {
    margin-top: 2px;
    font-size: 0.62rem;
    -webkit-text-stroke: 0;
  }

  .control-strip {
    width: calc(100dvw - 24px);
    min-height: 42px;
    bottom: max(8px, env(safe-area-inset-bottom));
    gap: 10px;
    border-radius: 22px;
    font-size: 0.86rem;
    background: rgba(112, 92, 55, 0.34);
  }

  .settings-panel {
    bottom: calc(64px + env(safe-area-inset-bottom));
    width: calc(100dvw - 34px);
    padding: 14px;
  }

  .settings-panel__row,
  .settings-panel__stat,
  .settings-panel__language {
    min-height: 40px;
    font-size: 0.84rem;
  }

  .button {
    min-height: 32px;
    padding: 6px 14px;
  }

  .overlay__stats {
    gap: 6px;
    margin: 12px 0 14px;
  }

  .overlay__stat {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .overlay__stat strong {
    font-size: 0.92rem;
  }
}

@media (max-width: 390px) {
  .game-column {
    width: min(calc(100dvw - 12px), calc((100dvh - 238px) * 480 / 620), 360px);
  }

  .ranking-card,
  .evolution-card {
    bottom: calc(50px + env(safe-area-inset-bottom));
  }

  .control-strip {
    min-height: 38px;
    font-size: 0.76rem;
  }

  .language-switch {
    top: calc(max(8px, env(safe-area-inset-top)) + 18px);
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  .ranking-card,
  .evolution-card,
  .mascot-cloud {
    display: none;
  }

  .game-column {
    top: max(8px, env(safe-area-inset-top));
    width: min(calc(100dvw - 200px), calc((100dvh - 80px) * 480 / 620), 320px);
  }

  .score-bubble,
  .next-bubble {
    width: min(28dvw, 130px);
    height: 56px;
  }

  .control-strip {
    min-height: 30px;
    font-size: 0.74rem;
  }

  .language-switch {
    top: calc(max(6px, env(safe-area-inset-top)));
  }
}
