:root {
  --bg: #080d22;
  --panel: #111936;
  --line: #33405f;
  --text: #e9f3ff;
  --muted: #8da1c3;
  --cyan: #18d5e8;
  --white: #f1fbff;
  --red: #ee2e45;
  --black: #050712;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 10%, rgba(70, 118, 210, .22), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(180, 210, 255, .08), transparent 24rem),
    radial-gradient(circle at 50% 100%, rgba(80, 40, 130, .14), transparent 36rem),
    linear-gradient(180deg, #030711 0%, #050816 52%, #02030a 100%);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

body {
  padding: 0;
  overflow-x: hidden;
  touch-action: manipulation;
}

.shell {
  width: 100vw;
  max-width: none;
  margin: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
  padding: max(8px, env(safe-area-inset-top)) 8px 0;
}

h1 {
  margin: 0;
  font-size: clamp(1.05rem, 3.6vw, 1.8rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(24, 213, 232, .65);
}

.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 180px;
  text-align: right;
  font-size: .78rem;
  color: #cfe7ff;
}

.stats span,
.controls button {
  border: 1px solid rgba(141, 161, 195, .35);
  background: rgba(16, 24, 50, .88);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 0 18px rgba(24,213,232,.06);
  border-radius: 8px;
  padding: 6px 9px;
}

.game-card {
  position: relative;
  width: 100%;
  border: 1px solid rgba(141, 161, 195, .45);
  border-radius: 0;
  padding: 6px 0;
  background: linear-gradient(180deg, rgba(12,18,42,.84), rgba(3,5,15,.92));
  box-shadow: 0 20px 80px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.04);
}

canvas {
  display: block;
  width: 100%;
  height: clamp(460px, calc(100dvh - 138px), 920px);
  background: #030711;
  border-radius: 0;
  image-rendering: auto;
  touch-action: none;
  cursor: crosshair;
}

.overlay[hidden] { display: none; }

.overlay {
  position: absolute;
  inset: 6px 0;
  display: grid;
  place-content: center;
  gap: 16px;
  text-align: center;
  background: rgba(4, 7, 18, .72);
  border-radius: 0;
  backdrop-filter: blur(2px);
}

.overlay strong {
  font-size: clamp(1.4rem, 7vw, 2.5rem);
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 18px rgba(255,79,164,.8);
}

button {
  font: inherit;
  color: var(--text);
  border: 0;
}

button:active { transform: translateY(1px); }

.overlay button,
.controls button {
  cursor: pointer;
  color: #fff;
}

.overlay button {
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #253869, #111a3a);
  border: 1px solid rgba(255,255,255,.2);
}

.controls {
  padding: 0 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: .74rem;
}

.controls p { margin: 0; line-height: 1.35; }

.control-buttons { display: flex; gap: 8px; align-items: center; }
.controls button { white-space: nowrap; width: 96px; text-align: center; }
.controls button.is-on { border-color: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 18px rgba(24,213,232,.22); }

@media (max-width: 520px) {
  body { padding-left: 6px; padding-right: 6px; }
  .topbar { align-items: start; }
  .stats { font-size: .7rem; min-width: 100px; }
  .controls {
  padding: 0 8px; align-items: start; flex-direction: column; }
  .control-buttons { gap: 8px; }
  canvas { height: clamp(440px, calc(100dvh - 155px), 680px); }
}


/* V12: Fullscreen only on mobile. Desktop remains like the base version. */
[hidden] { display: none !important; }
.mobile-fullscreen { display: none; }
body.is-mobile .mobile-fullscreen { display: inline-block; }

/* Mobile landscape: same look, but real visible playfield. No automatic rotation. */
body.mobile-landscape {
  overflow: hidden;
  height: var(--app-vh, 100dvh);
  min-height: 0;
}

body.mobile-landscape .shell {
  width: 100vw;
  height: var(--app-vh, 100dvh);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

body.mobile-landscape .topbar {
  margin: 0;
  padding: max(2px, env(safe-area-inset-top)) 6px 2px;
  align-items: end;
  gap: 8px;
}

body.mobile-landscape h1 {
  font-size: clamp(.9rem, 4.2vh, 1.15rem);
  line-height: 1.02;
  letter-spacing: .07em;
}

body.mobile-landscape .topbar p {
  font-size: .62rem;
  margin: 1px 0 0;
}

body.mobile-landscape .stats {
  font-size: .6rem;
  gap: 4px;
  min-width: 0;
}

body.mobile-landscape .stats span,
body.mobile-landscape .controls button {
  padding: 4px 7px;
  border-radius: 7px;
}

body.mobile-landscape .game-card {
  min-height: 0;
  height: 100%;
  padding: 3px 0;
  display: flex;
  overflow: hidden;
}

body.mobile-landscape canvas {
  flex: 1 1 auto;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

body.mobile-landscape .controls {
  margin: 0;
  padding: 3px 6px max(3px, env(safe-area-inset-bottom));
  min-height: 0;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: .6rem;
  overflow: hidden;
}

body.mobile-landscape .control-buttons {
  flex: 0 0 auto;
  gap: 6px;
}

body.mobile-landscape .controls button {
  width: 86px;
  text-align: center;
}

body.mobile-landscape .controls p {
  display: none;
}

@media (max-height: 390px) {
  body.mobile-landscape .topbar p { display: none; }
}


/* V15: Small footer area like on the other pages. */
.site-footer {
  padding: 10px 8px max(12px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  gap: 8px;
  color: rgba(141, 161, 195, .76);
  font-size: .68rem;
}

.site-footer a {
  color: rgba(207, 231, 255, .86);
  text-decoration: none;
  border-bottom: 1px solid rgba(207, 231, 255, .28);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, .82);
}

.global-counter {
  min-width: 184px;
}

.legal-shell {
  width: min(920px, calc(100vw - 28px));
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 28px;
}

.legal-card {
  border: 1px solid rgba(141, 161, 195, .45);
  background: linear-gradient(180deg, rgba(12,18,42,.86), rgba(3,5,15,.94));
  box-shadow: 0 20px 80px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.04);
  padding: clamp(18px, 4vw, 34px);
  color: var(--text);
}

.legal-card h1,
.legal-card h2 {
  text-transform: none;
  letter-spacing: .02em;
}

.legal-card h1 {
  margin-bottom: 22px;
}

.legal-card h2 {
  margin: 26px 0 8px;
  font-size: 1.05rem;
  color: #cfe7ff;
}

.legal-card p,
.legal-card li {
  color: rgba(233, 243, 255, .88);
  line-height: 1.62;
  font-size: .92rem;
}

.legal-card ul {
  padding-left: 1.2rem;
}

.legal-card a,
.legal-nav a {
  color: #d7f7ff;
}

.legal-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .82rem;
}

.legal-nav a {
  text-decoration: none;
  border-bottom: 1px solid rgba(215,247,255,.28);
}

@media (max-width: 520px) {
  .global-counter { min-width: 0; }
  .site-footer { font-size: .66rem; padding-top: 8px; }
}

body.mobile-landscape .site-footer {
  display: none;
}

/* V17: Global brick counter visible, landscape without clipped ball zone. */
.global-counter {
  min-width: 0;
  white-space: nowrap;
}

@media (min-width: 760px) {
  .global-counter { min-width: 210px; }
}

body.mobile-landscape {
  width: 100vw;
  height: var(--app-vh, 100dvh);
  max-height: var(--app-vh, 100dvh);
  overflow: hidden;
}

body.mobile-landscape .shell {
  width: 100vw;
  height: var(--app-vh, 100dvh);
  max-height: var(--app-vh, 100dvh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

body.mobile-landscape .topbar {
  min-height: 0;
  margin: 0;
  padding: max(1px, env(safe-area-inset-top)) 5px 1px;
  align-items: center;
}

body.mobile-landscape h1 {
  font-size: clamp(.72rem, 4.4vh, 1.02rem);
  line-height: 1;
  letter-spacing: .06em;
}

body.mobile-landscape .topbar p {
  display: none;
}

body.mobile-landscape .stats {
  min-width: 0;
  gap: 3px;
  font-size: clamp(.48rem, 2.8vh, .62rem);
  line-height: 1;
}

body.mobile-landscape .stats span,
body.mobile-landscape .controls button {
  padding: 3px 6px;
  border-radius: 7px;
}

body.mobile-landscape .global-counter {
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.mobile-landscape .game-card {
  height: 100%;
  min-height: 0;
  padding: 2px 0;
  overflow: hidden;
}

body.mobile-landscape canvas {
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

body.mobile-landscape .controls {
  height: auto;
  min-height: 34px;
  max-height: 40px;
  margin: 0;
  padding: 3px 6px max(3px, env(safe-area-inset-bottom));
  overflow: hidden;
  flex-direction: row;
  align-items: center;
}

body.mobile-landscape .controls p,
body.mobile-landscape .site-footer {
  display: none !important;
}

body.mobile-landscape .control-buttons {
  gap: 5px;
}

body.mobile-landscape .controls button {
  width: 78px;
  min-width: 78px;
  font-size: clamp(.52rem, 2.8vh, .64rem);
}

body.mobile-landscape .controls #fullscreenButton {
  width: 82px;
  min-width: 82px;
}

/* V18: Do not hide the counter anymore. Visible chip below plus desktop chip above. */
.counter-chip {
  border: 1px solid rgba(141, 161, 195, .35);
  background: rgba(16, 24, 50, .88);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 0 18px rgba(24,213,232,.06);
  border-radius: 8px;
  padding: 6px 9px;
  color: #cfe7ff;
  white-space: nowrap;
  min-width: 178px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.control-buttons {
  flex-wrap: wrap;
}

.global-counter {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .stats .global-counter {
    display: none;
  }
  .counter-chip {
    min-width: 170px;
    flex: 1 1 170px;
  }
}

body.mobile-landscape .stats .global-counter {
  display: none !important;
}

body.mobile-landscape .counter-chip {
  min-width: 128px;
  width: 140px;
  flex: 0 0 140px;
  padding: 3px 6px;
  border-radius: 7px;
  font-size: clamp(.50rem, 2.7vh, .62rem);
  line-height: 1;
}

body.mobile-landscape .control-buttons {
  flex-wrap: nowrap;
  max-width: 100vw;
}


/* V19: Counter forcefully made visible. The lower chip must no longer be missing. */
.global-destroyed-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.counter-chip {
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  .stats .global-destroyed-label {
    display: none !important;
  }
  .control-buttons .global-destroyed-label {
    display: inline-flex !important;
  }
}
body.mobile-landscape .control-buttons .global-destroyed-label {
  display: inline-flex !important;
  width: 148px;
  min-width: 148px;
  max-width: 148px;
}
body.mobile-landscape .control-buttons {
  overflow-x: auto;
  scrollbar-width: none;
}
body.mobile-landscape .control-buttons::-webkit-scrollbar {
  display: none;
}

/* V20: Hard correction for mobile landscape and visible total brick counter. */
.destroyed-fixed {
  display: none;
  position: fixed;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 80;
  border: 1px solid rgba(141, 161, 195, .42);
  background: rgba(16, 24, 50, .94);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 0 18px rgba(24,213,232,.14);
  border-radius: 8px;
  padding: 6px 9px;
  color: #cfe7ff;
  font-size: .68rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .stats .global-destroyed-label { display: none !important; }
  .control-buttons #globalDestroyedBottom { display: inline-flex !important; }
}

body.mobile-landscape .shell {
  height: var(--app-vh, 100dvh) !important;
  max-height: var(--app-vh, 100dvh) !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
}

body.mobile-landscape .topbar {
  padding: max(1px, env(safe-area-inset-top)) 5px 1px !important;
  margin: 0 !important;
}

body.mobile-landscape .game-card {
  min-height: 0 !important;
  height: 100% !important;
  padding: 2px 0 !important;
  overflow: hidden !important;
}

body.mobile-landscape canvas {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

body.mobile-landscape .controls {
  display: flex !important;
  height: 38px !important;
  max-height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 3px 6px max(3px, env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

body.mobile-landscape .control-buttons {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  overflow: visible !important;
}

body.mobile-landscape .controls button {
  width: 78px !important;
  min-width: 78px !important;
  height: 29px !important;
  padding: 3px 6px !important;
  font-size: clamp(.52rem, 2.8vh, .64rem) !important;
}

body.mobile-landscape .controls #fullscreenButton {
  width: 82px !important;
  min-width: 82px !important;
}

body.mobile-landscape .control-buttons #globalDestroyedBottom {
  display: inline-flex !important;
  margin-left: auto !important;
  width: auto !important;
  min-width: 148px !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  height: 29px !important;
  padding: 3px 7px !important;
  font-size: clamp(.50rem, 2.7vh, .62rem) !important;
  line-height: 1 !important;
}

body.mobile-landscape .destroyed-fixed {
  display: none !important;
}

body.mobile-landscape .site-footer {
  display: none !important;
}

body.is-fullscreen.mobile-landscape .controls {
  height: 36px !important;
  max-height: 36px !important;
  min-height: 36px !important;
}

body.is-fullscreen.mobile-landscape .topbar {
  padding-top: max(1px, env(safe-area-inset-top)) !important;
}

@media (max-width: 520px) and (orientation: portrait) {
  .control-buttons {
    width: 100%;
  }
  .control-buttons #globalDestroyedBottom {
    flex: 1 0 100%;
    min-width: 0;
  }
}

/* V21: Visible total counter, no scrolling away in mobile landscape. */
#globalDestroyedLabel,
#globalDestroyedBottom,
#globalDestroyedFixed {
  visibility: visible !important;
}

#globalDestroyedLabel {
  display: inline-flex !important;
}

#globalDestroyedBottom {
  display: inline-flex !important;
  order: -10 !important;
  margin-left: 0 !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
}

@media (max-width: 720px) and (orientation: portrait) {
  .stats #globalDestroyedLabel {
    display: none !important;
  }

  .control-buttons #globalDestroyedBottom {
    display: inline-flex !important;
    flex: 1 0 calc(100vw - 32px) !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    order: -10 !important;
    justify-content: center !important;
  }
}

body.mobile-landscape .stats #globalDestroyedLabel {
  display: inline-flex !important;
  width: auto !important;
  min-width: 128px !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  padding: 3px 6px !important;
  font-size: clamp(.48rem, 2.5vh, .58rem) !important;
}

body.mobile-landscape .control-buttons #globalDestroyedBottom {
  display: inline-flex !important;
  order: -10 !important;
  margin-left: 0 !important;
  min-width: 138px !important;
  max-width: none !important;
  width: auto !important;
  flex: 0 0 auto !important;
  height: 29px !important;
  padding: 3px 7px !important;
  font-size: clamp(.50rem, 2.7vh, .62rem) !important;
  line-height: 1 !important;
}

body.mobile-landscape .control-buttons {
  justify-content: flex-start !important;
  overflow: visible !important;
}

@media (min-width: 721px) {
  #globalDestroyedBottom {
    min-width: 190px !important;
  }
}


/* V23: Total counter at the top center. Game stats remain on the right. */
.topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: end !important;
  gap: 10px !important;
}

.topbar > div:first-child {
  grid-column: 1 !important;
  min-width: 0 !important;
}

.topbar .stats {
  grid-column: 3 !important;
  justify-self: end !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  text-align: right !important;
}

.top-global-counter {
  grid-column: 2 !important;
  justify-self: center !important;
  align-self: end !important;
  border: 1px solid rgba(141, 161, 195, .35) !important;
  background: rgba(16, 24, 50, .88) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 0 18px rgba(24,213,232,.06) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  color: #cfe7ff !important;
  font-size: .76rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  max-width: calc(100vw - 420px) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* From V23 onward the counter is at the top. The old lower chip remains in the HTML as a fallback but is not displayed. */
#globalDestroyedBottom,
#globalDestroyedFixed {
  display: none !important;
}

@media (max-width: 900px) {
  .top-global-counter {
    font-size: .68rem !important;
    padding: 5px 8px !important;
    max-width: 34vw !important;
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand stats"
      "counter counter" !important;
    align-items: start !important;
    gap: 4px 8px !important;
    padding: max(6px, env(safe-area-inset-top)) 6px 0 !important;
  }

  .topbar > div:first-child {
    grid-area: brand !important;
  }

  .topbar .stats {
    grid-area: stats !important;
    justify-self: end !important;
    align-self: start !important;
    gap: 4px !important;
    font-size: .68rem !important;
    flex-wrap: wrap !important;
    max-width: 174px !important;
  }

  .topbar .stats span {
    padding: 5px 7px !important;
  }

  .top-global-counter {
    grid-area: counter !important;
    justify-self: center !important;
    align-self: center !important;
    display: inline-flex !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    font-size: .66rem !important;
    padding: 5px 8px !important;
    margin: 1px 0 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #globalDestroyedBottom,
  #globalDestroyedFixed {
    display: none !important;
  }
}

body.mobile-landscape .topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 6px !important;
}

body.mobile-landscape .topbar > div:first-child {
  grid-column: 1 !important;
}

body.mobile-landscape .topbar .stats {
  grid-column: 3 !important;
  justify-self: end !important;
  flex-wrap: nowrap !important;
  max-width: none !important;
}

body.mobile-landscape .top-global-counter {
  grid-column: 2 !important;
  justify-self: center !important;
  display: inline-flex !important;
  min-width: 0 !important;
  max-width: 32vw !important;
  padding: 3px 6px !important;
  font-size: clamp(.46rem, 2.45vh, .58rem) !important;
  line-height: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.mobile-landscape #globalDestroyedBottom,
body.mobile-landscape #globalDestroyedFixed {
  display: none !important;
}


/* V24: Only the upper world counter remains visible. Mobile landscape is zoomed out by 10 percent. */
#globalDestroyedBottom,
#globalDestroyedFixed {
  display: none !important;
}

body.mobile-landscape .control-buttons #globalDestroyedBottom,
body.mobile-landscape #globalDestroyedBottom,
body.mobile-landscape #globalDestroyedFixed {
  display: none !important;
}

body.mobile-landscape {
  overflow: hidden !important;
}

body.mobile-landscape .shell {
  width: 111.111vw !important;
  height: calc(var(--app-vh, 100dvh) / 0.9) !important;
  max-height: calc(var(--app-vh, 100dvh) / 0.9) !important;
  transform: scale(0.9) !important;
  transform-origin: top left !important;
}

body.mobile-landscape .topbar {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  gap: 7px !important;
  padding-left: max(6px, env(safe-area-inset-left)) !important;
  padding-right: max(6px, env(safe-area-inset-right)) !important;
}

body.mobile-landscape h1 {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: clamp(.70rem, 4vh, .98rem) !important;
}

body.mobile-landscape .top-global-counter {
  max-width: 30vw !important;
  font-size: clamp(.43rem, 2.25vh, .54rem) !important;
}

body.mobile-landscape .topbar .stats {
  overflow: visible !important;
}

body.mobile-landscape .topbar .stats span {
  font-size: clamp(.46rem, 2.35vh, .58rem) !important;
  padding: 3px 5px !important;
  white-space: nowrap !important;
}

/* V25: Mobile landscape only. Pull the right stats row inward so that score remains visible. */
body.mobile-landscape .topbar {
  padding-left: max(12px, env(safe-area-inset-left)) !important;
  padding-right: max(30px, env(safe-area-inset-right)) !important;
  grid-template-columns: minmax(0, 0.9fr) auto minmax(max-content, 0.9fr) !important;
}

body.mobile-landscape .topbar .stats {
  justify-self: end !important;
  margin-right: 14px !important;
  max-width: calc(100vw - 24px) !important;
  gap: 4px !important;
  overflow: visible !important;
}

body.mobile-landscape .topbar .stats span {
  font-size: clamp(.44rem, 2.2vh, .56rem) !important;
  padding: 3px 4px !important;
  white-space: nowrap !important;
}

body.mobile-landscape #scoreLabel {
  margin-right: 2px !important;
}

/* Merged game switcher */
.game-switcher {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-top: 6px !important;
  align-items: center !important;
}

.game-switcher a,
.game-switcher span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(141, 161, 195, .35) !important;
  background: rgba(16, 24, 50, .88) !important;
  color: #cfe7ff !important;
  border-radius: 999px !important;
  padding: 5px 9px !important;
  font-size: .68rem !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.game-switcher .is-active {
  border-color: rgba(24, 213, 232, .7) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(24, 213, 232, .18) !important;
}

.game-switcher a:hover,
.game-switcher a:focus-visible {
  border-color: rgba(24, 213, 232, .8) !important;
  outline: none !important;
}

@media (max-width: 720px) and (orientation: portrait) {
  .game-switcher {
    margin-top: 4px !important;
    gap: 4px !important;
  }

  .game-switcher a,
  .game-switcher span {
    padding: 4px 6px !important;
    font-size: .58rem !important;
  }
}

body.mobile-landscape .game-switcher {
  margin-top: 3px !important;
  gap: 4px !important;
}

body.mobile-landscape .game-switcher a,
body.mobile-landscape .game-switcher span {
  padding: 3px 6px !important;
  font-size: .52rem !important;
}


/* Compact title language switcher */
.title-line {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.language-switcher {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 2px !important;
  border: 1px solid rgba(141, 161, 195, .32) !important;
  background: rgba(16, 24, 50, .70) !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.language-switcher a,
.language-switcher span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 24px !important;
  padding: 3px 5px !important;
  border-radius: 999px !important;
  color: #cfe7ff !important;
  font-size: .54rem !important;
  letter-spacing: .04em !important;
  text-decoration: none !important;
}

.language-switcher .is-active {
  background: rgba(24, 213, 232, .20) !important;
  color: #ffffff !important;
}

.language-switcher a:hover,
.language-switcher a:focus-visible {
  color: #ffffff !important;
  outline: none !important;
}

body.mobile-landscape .title-line { gap: 5px !important; }
body.mobile-landscape .language-switcher a,
body.mobile-landscape .language-switcher span {
  min-width: 19px !important;
  padding: 2px 4px !important;
  font-size: .45rem !important;
}

.secret-level2-trigger {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: default;
}
.secret-level2-trigger:focus-visible {
  outline: 1px dotted rgba(255,255,255,.6);
  outline-offset: 2px;
}
