@font-face {
  font-family: "Fredoka";
  src: url("../assets/fonts/fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --navy: #06223f;
  --navy2: #0b3a66;
  --aqua: #19d3e6;
  --ice: #7fe9ff;
  --sun: #ffd23f;
  --coral: #ff5d73;
  --ink: #06223f;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #06223f;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
canvas#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 55%,
    transparent 52%,
    #02102a99 100%
  );
}
.hitflash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 35%,
    #ff1f4aaa 100%
  );
}
.hitflash.on {
  animation: hit 0.55s ease-out;
}
@keyframes hit {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.speedfx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  background: repeating-conic-gradient(
    from 0deg at 50% 52%,
    #ffffff55 0 0.8deg,
    transparent 0.8deg 5deg
  );
  -webkit-mask: radial-gradient(circle at 50% 52%, transparent 34%, #000 88%);
  mask: radial-gradient(circle at 50% 52%, transparent 34%, #000 88%);
}
.speedfx.on {
  opacity: 0.7;
}
.ic {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
}
.ic.s {
  width: 22px;
  height: 22px;
}
.ic.xl {
  width: 54px;
  height: 54px;
}
/* screens */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  padding: max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
}
.screen.active {
  display: flex;
}
#loader {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(#0b4f8a, #06223f);
  z-index: 30;
}
.loadbar {
  width: min(300px, 70vw);
  height: 18px;
  border-radius: 99px;
  background: #06223f;
  border: 3px solid #7fe9ff;
  overflow: hidden;
}
.loadbar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #19d3e6, #ffe680);
  transition: width 0.25s;
}
.muted {
  color: #b7dcf5;
  margin: 0;
  font-weight: 500;
}
.small {
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
}
/* logo */
.logo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 12px;
  line-height: 0.95;
  font-weight: 700;
  position: relative;
}
.logo span {
  font-size: clamp(46px, 9vw, 84px);
  -webkit-text-stroke: 7px #06223f;
  paint-order: stroke fill;
  letter-spacing: 0.01em;
}
.logo .l1 {
  color: #fff;
  text-shadow: 0 6px 0 #06223f;
}
.logo .l2 {
  color: #ffd23f;
  text-shadow: 0 6px 0 #a85a00;
}
.logo.big span {
  font-size: clamp(64px, 14vw, 120px);
}
.logo .swoosh {
  width: min(300px, 70%);
  height: 26px;
  flex-basis: 100%;
  margin-top: 6px;
}
.tag {
  margin: 6px 0 16px;
  text-align: center;
  font-weight: 500;
  color: #cfeeff;
  font-size: clamp(15px, 2.2vw, 19px);
}
/* buttons (feedback uses position/shadow only, so text stays pixel-crisp) */
.btn {
  position: relative;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 11px 20px;
  font:
    700 clamp(17px, 2.4vw, 21px) "Fredoka",
    sans-serif;
  color: var(--ink);
  cursor: pointer;
  background: linear-gradient(#fff, #cfeaff);
  box-shadow:
    0 6px 0 var(--ink),
    inset 0 3px 0 #ffffffaa,
    inset 0 -3px 0 #00000014;
  transition:
    top 0.08s,
    box-shadow 0.08s,
    background 0.15s;
}
.btn:hover {
  top: -2px;
  box-shadow:
    0 8px 0 var(--ink),
    inset 0 3px 0 #ffffffaa,
    inset 0 -3px 0 #00000014,
    0 0 22px #7fe9ff88;
}
.btn:active,
.btn.press {
  top: 4px;
  box-shadow:
    0 2px 0 var(--ink),
    inset 0 3px 0 #ffffffaa;
}
.btn:focus-visible {
  outline: 4px solid #fff;
  outline-offset: 3px;
}
.btn.yellow {
  background: linear-gradient(#fff2a0, #ffb21e);
}
.btn.aqua {
  background: linear-gradient(#b4fbff, #18b6e0);
}
.btn.coral {
  background: linear-gradient(#ffb3bd, #ff4d6d);
}
.btn.green {
  background: linear-gradient(#cbffb5, #3ecf6a);
}
.btn.big {
  font-size: clamp(24px, 3.6vw, 32px);
  padding: 16px 30px;
  border-radius: 24px;
  width: 100%;
}
.btn.round {
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
}
.btn.round.sm {
  width: 48px;
  height: 48px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}
.chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 99px;
  font-weight: 700;
  background: #06223fcc;
  border: 2px solid #7fe9ff99;
  color: #fff;
}
.chip b,
.pill b {
  color: #ffe680;
}
/* menu */
#menu {
  align-items: center;
  justify-content: flex-start;
  padding-left: max(18px, 6vw);
}
.menu-wrap {
  width: min(430px, 92vw);
  padding: 22px 24px 20px;
  border-radius: 30px;
  background: linear-gradient(#0b3a66dd, #06223fe8);
  border: 3px solid #7fe9ffaa;
  box-shadow:
    0 10px 0 #02102a88,
    inset 0 3px 0 #ffffff26;
}
.menu-btns {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.row2 .btn {
  padding: 12px 10px;
}
.chips {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.corner {
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top));
  display: flex;
  gap: 12px;
}
@media (max-aspect-ratio: 1/1) {
  #menu {
    justify-content: center;
    align-items: flex-end;
    padding-bottom: max(22px, 5vh);
    padding-left: 14px;
  }
  .menu-wrap {
    padding: 16px 18px;
  }
  .logo span {
    font-size: clamp(44px, 13vw, 70px);
  }
}
@media (max-height: 480px) {
  .menu-wrap {
    padding: 10px 18px;
  }
  .tag {
    margin: 2px 0 8px;
  }
  .chips {
    margin-top: 10px;
  }
  .menu-btns {
    gap: 10px;
  }
  .btn.big {
    padding: 9px 20px;
  }
  .logo span {
    font-size: 44px;
  }
  .logo .swoosh {
    display: none;
  }
}
/* panels */
.screen#levels,
.screen#how,
.screen#settings {
  align-items: center;
  justify-content: center;
  background: #02102a8f;
}
.panel {
  width: min(760px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  border-radius: 28px;
  background: linear-gradient(#0b3a66f2, #06223ff5);
  border: 3px solid #7fe9ffaa;
  box-shadow:
    0 10px 0 #02102a88,
    inset 0 3px 0 #ffffff26;
}
.panel.narrow {
  width: min(460px, 100%);
}
.phead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.phead h2 {
  margin: 0;
  font-size: clamp(22px, 4vw, 32px);
  color: #ffe680;
  -webkit-text-stroke: 5px #06223f;
  paint-order: stroke fill;
}
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.tab {
  flex: 1 0 auto;
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 3px solid #06223f;
  font:
    700 15px "Fredoka",
    sans-serif;
  color: #06223f;
  cursor: pointer;
  background: linear-gradient(var(--c1), var(--c2));
  opacity: 0.62;
  box-shadow: 0 4px 0 #06223f;
  position: relative;
  top: 0;
  transition:
    top 0.08s,
    opacity 0.15s;
}
.tab:hover {
  opacity: 0.9;
}
.tab.on {
  opacity: 1;
  top: -2px;
  box-shadow:
    0 6px 0 #06223f,
    0 0 18px var(--c1);
}
.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  overflow: auto;
  padding: 4px 4px 8px;
}
.lv {
  position: relative;
  top: 0;
  aspect-ratio: 1/1;
  min-height: 64px;
  border-radius: 18px;
  border: 3px solid #06223f;
  background: linear-gradient(var(--c1), var(--c2));
  font:
    700 clamp(20px, 3.6vw, 28px) "Fredoka",
    sans-serif;
  color: #06223f;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow:
    0 5px 0 #06223f,
    inset 0 3px 0 #ffffff80;
  transition:
    top 0.08s,
    box-shadow 0.08s;
}
.lv:hover {
  top: -2px;
  box-shadow:
    0 7px 0 #06223f,
    inset 0 3px 0 #ffffff80,
    0 0 18px var(--c1);
}
.lv:active {
  top: 3px;
  box-shadow: 0 2px 0 #06223f;
}
.lv .st {
  display: flex;
  gap: 1px;
}
.lv .st .ic {
  width: 15px;
  height: 15px;
}
.lv.locked {
  background: linear-gradient(#5d7fa3, #3a5a80);
  cursor: default;
  color: #06223f;
  opacity: 0.85;
}
.lv.locked:hover {
  top: 0;
  box-shadow:
    0 5px 0 #06223f,
    inset 0 3px 0 #ffffff80;
}
.lv.locked .ic {
  width: 30px;
  height: 30px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  overflow: auto;
}
.cards article {
  background: #ffffff14;
  border: 2px solid #7fe9ff55;
  border-radius: 20px;
  padding: 12px 14px;
}
.cards h3 {
  margin: 8px 0 4px;
  color: #ffe680;
  font-size: 19px;
}
.cards p {
  margin: 0;
  color: #d6efff;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
}
.art {
  height: 74px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(#19b6e0, #0a6fa8);
  border: 2px solid #06223f;
}
.art.a2 {
  background: linear-gradient(#ff8a4a, #c2306b);
}
.art.a3 {
  background: linear-gradient(#8b5bff, #3a1fa8);
}
.art.a4 {
  background: linear-gradient(#3ed46a, #0f7d4e);
}
.gapwall {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: conic-gradient(
    from 20deg,
    #06223f 0 70deg,
    transparent 70deg 140deg,
    #ff6f91 140deg 360deg
  );
  border: 3px solid #06223f;
}
.setlist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.setrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 3px solid #06223f;
  background: linear-gradient(#fff, #cfeaff);
  color: #06223f;
  font:
    700 20px "Fredoka",
    sans-serif;
  cursor: pointer;
  position: relative;
  top: 0;
  box-shadow: 0 5px 0 #06223f;
  transition:
    top 0.08s,
    box-shadow 0.08s;
}
.setrow:hover {
  top: -2px;
  box-shadow: 0 7px 0 #06223f;
}
.setrow:active {
  top: 3px;
  box-shadow: 0 2px 0 #06223f;
}
.setrow span {
  flex: 1;
  text-align: left;
}
.setrow em {
  font-style: normal;
  color: #0a6fa8;
}
.setrow.danger {
  background: linear-gradient(#ffb3bd, #ff6a80);
}
.sw {
  width: 54px;
  height: 30px;
  border-radius: 99px;
  background: #7f93ad;
  border: 3px solid #06223f;
  position: relative;
  flex: none;
}
.sw::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #06223f;
  transition: left 0.15s;
}
.sw.on {
  background: #3ecf6a;
}
.sw.on::after {
  left: 26px;
}
/* HUD */
#game {
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
#game .btn,
.modal {
  pointer-events: auto;
}
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 760px;
}
.hud .dist {
  display: none;
}
.hearts {
  display: flex;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 99px;
  background: #06223fcc;
  border: 2px solid #7fe9ff99;
}
.hearts .ic {
  width: 28px;
  height: 28px;
}
.progress {
  position: relative;
  width: min(560px, 100%);
  height: 22px;
  margin-top: 10px;
  border-radius: 99px;
  background: #06223fcc;
  border: 3px solid #7fe9ffaa;
  overflow: hidden;
}
.progress i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, #19d3e6, #8ff2bf, #ffe680);
}
.progress span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow:
    0 1px 0 #06223f,
    0 -1px 0 #06223f,
    1px 0 0 #06223f,
    -1px 0 0 #06223f;
}
.msg {
  margin-top: 14px;
  min-height: 40px;
  padding: 7px 20px;
  border-radius: 99px;
  background: #06223fdd;
  border: 2px solid #ffe680;
  font-weight: 700;
  font-size: 20px;
  color: #ffe680;
  opacity: 0;
  transition: opacity 0.25s;
}
.msg.on {
  opacity: 1;
}
.count {
  position: absolute;
  left: 50%;
  top: 40%;
  margin-left: -80px;
  margin-top: -80px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 92px;
  font-weight: 700;
  color: #fff;
  -webkit-text-stroke: 8px #06223f;
  paint-order: stroke fill;
  background: radial-gradient(circle at 35% 30%, #2a8ee0, #0a3a7a 70%);
  border: 7px solid #ffd23f;
  box-shadow:
    0 0 0 6px #ffffff40,
    0 8px 0 #02102a88;
}
.count.on {
  display: flex;
  animation: pop 0.9s ease-out infinite;
}
@keyframes pop {
  0% {
    opacity: 0.2;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
.pads {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  padding: 0 max(16px, env(safe-area-inset-left));
  pointer-events: none;
}
.pad {
  width: clamp(76px, 16vw, 110px);
  height: clamp(76px, 16vw, 110px);
  border-radius: 50%;
  background: #06223f88;
  border: 3px solid #7fe9ff88;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.08s,
    border-color 0.08s;
}
.pad.on {
  background: #19d3e6cc;
  border-color: #fff;
}
.tutorial {
  position: absolute;
  left: 0;
  right: 0;
  top: 24%;
  display: none;
  justify-content: center;
}
.tutorial.on {
  display: flex;
}
.tutorial div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border-radius: 99px;
  background: #06223fdd;
  border: 3px solid #ffe680;
  font-size: 20px;
  font-weight: 700;
}
.tutorial .ic {
  width: 36px;
  height: 36px;
}
@media (pointer: fine) {
  .pads {
    display: none;
  }
}
/* modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #02102aa8;
  z-index: 20;
}
.modal.hidden {
  display: none;
}
.card {
  width: min(440px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 22px 22px 20px;
  border-radius: 30px;
  text-align: center;
  background: linear-gradient(#0b3a66, #06223f);
  border: 3px solid #7fe9ffaa;
  box-shadow:
    0 10px 0 #02102a99,
    inset 0 3px 0 #ffffff26;
}
.card h2 {
  margin: 6px 0 2px;
  font-size: clamp(30px, 6vw, 40px);
  color: #ffe680;
  -webkit-text-stroke: 6px #06223f;
  paint-order: stroke fill;
}
.medal {
  width: 78px;
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(#fff2a0, #ffb21e);
  border: 4px solid #06223f;
  box-shadow: 0 5px 0 #06223f;
}
.medal .ic {
  width: 52px;
  height: 52px;
}
.stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 8px;
}
.stars .ic {
  width: 58px;
  height: 58px;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 16px;
}
.stats div {
  padding: 8px;
  border-radius: 14px;
  background: #ffffff14;
  border: 2px solid #7fe9ff44;
  font-weight: 600;
  color: #cfeeff;
  font-size: 14px;
}
.stats b {
  display: block;
  font-size: 24px;
  color: #fff;
}
.mbtns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mbtns .btn {
  width: 100%;
}
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 25;
}
#confetti i {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  animation: fall 2.4s ease-in forwards;
}
@keyframes fall {
  to {
    transform: translateY(110vh) rotate(700deg);
  }
}
@media (max-width: 380px) {
  .grid {
    gap: 6px;
  }
  .lv {
    min-height: 0;
    font-size: 18px;
    border-radius: 12px;
  }
  .lv .st .ic {
    width: 10px;
    height: 10px;
  }
  .lv.locked .ic {
    width: 22px;
    height: 22px;
  }
  .panel {
    padding: 10px;
  }
  .phead h2 {
    font-size: 20px;
  }
}
@media (max-width: 520px) {
  .grid {
    gap: 8px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .hud .pill {
    padding: 5px 10px;
  }
  .tab {
    min-width: 78px;
    font-size: 13px;
  }
  .btn {
    padding: 10px 14px;
  }
  .panel {
    padding: 12px;
  }
  .lv {
    min-height: 0;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .panel {
    padding: 10px 14px;
  }
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
  .art {
    height: 50px;
  }
  .cards p {
    font-size: 12.5px;
  }
  .cards h3 {
    font-size: 15px;
  }
  .grid {
    gap: 8px;
  }
  .lv {
    min-height: 0;
    aspect-ratio: auto;
    height: 54px;
  }
  .lv .st .ic {
    width: 12px;
    height: 12px;
  }
  .card {
    padding: 12px 18px;
  }
  .stars {
    margin: 4px 0;
  }
  .stars .ic {
    width: 34px;
    height: 34px;
  }
  .stats {
    margin: 4px 0 8px;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .stats div {
    padding: 4px;
    font-size: 11px;
  }
  .stats b {
    font-size: 17px;
  }
  #mSub {
    display: none;
  }
  .card h2 {
    margin: 2px 0;
  }
  .medal {
    width: 52px;
    height: 52px;
  }
  .medal .ic {
    width: 32px;
    height: 32px;
  }
  .card h2 {
    font-size: 28px;
  }
  .mbtns {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .mbtns .btn {
    flex: 1 1 30%;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .count.on {
    animation: none;
  }
  .hitflash.on {
    animation: none;
    opacity: 0.5;
  }
}
/* cinematic vignette over the 3D view (behind all UI) */
#vig {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(0, 0, 0, 0) 55%,
    rgba(4, 10, 30, 0.45) 100%
  );
}
/* ---- fit-everything rules: nothing scrolls or leaves the screen ---- */
.tabs {
  overflow: hidden;
}
.tab {
  flex: 1 1 0;
  min-width: 0;
}
.card {
  padding: clamp(12px, 2.4vh, 22px) 22px clamp(12px, 2.2vh, 20px);
}
.medal {
  width: clamp(50px, 9vh, 78px);
  height: clamp(50px, 9vh, 78px);
}
.medal .ic {
  width: 66%;
  height: 66%;
}
.stars {
  margin: clamp(4px, 1.2vh, 12px) 0 clamp(4px, 0.8vh, 8px);
}
.stars .ic {
  width: clamp(34px, 6.4vh, 58px);
  height: clamp(34px, 6.4vh, 58px);
}
.stats {
  margin: clamp(6px, 1vh, 10px) 0 clamp(8px, 1.6vh, 16px);
}
.stats div {
  padding: clamp(4px, 0.9vh, 8px);
}
.stats b {
  font-size: clamp(17px, 2.8vh, 24px);
}
.mbtns {
  gap: clamp(7px, 1.3vh, 12px);
}
.mbtns .btn {
  padding-top: clamp(7px, 1.3vh, 12px);
  padding-bottom: clamp(7px, 1.3vh, 12px);
}
.card h2 {
  font-size: clamp(24px, 4.6vh, 40px);
}
@media (max-width: 520px) {
  .tabs {
    gap: 5px;
    padding-bottom: 8px;
  }
  .tab {
    padding: 5px 2px;
    font-size: 11.5px;
    line-height: 1.05;
    border-width: 2px;
    border-radius: 11px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .cards {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }
  .cards article {
    padding: 8px 8px 9px;
    border-radius: 14px;
  }
  .art {
    height: clamp(40px, 7.5vh, 60px);
    gap: 8px;
  }
  .art .ic.xl {
    width: clamp(26px, 5vh, 40px);
    height: clamp(26px, 5vh, 40px);
  }
  .gapwall {
    width: clamp(30px, 6vh, 46px);
    height: clamp(30px, 6vh, 46px);
  }
  .cards h3 {
    font-size: 14px;
    margin: 6px 0 3px;
    line-height: 1.1;
  }
  .cards p {
    font-size: 11.5px;
    line-height: 1.28;
  }
  .phead {
    margin-bottom: 8px;
  }
}
@media (max-height: 640px) and (max-width: 520px) {
  .cards p {
    font-size: 11px;
    line-height: 1.22;
  }
  .cards h3 {
    font-size: 13px;
  }
  .art {
    height: 36px;
  }
}
@media (max-height: 520px) {
  #mSub {
    display: none;
  }
  .card h2 {
    margin: 2px 0;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .cards article {
    padding: 8px;
    min-width: 0;
  }
  .cards p {
    overflow-wrap: anywhere;
  }
}
@media (max-height: 380px) {
  .medal {
    display: none;
  }
  .cards .art {
    display: none;
  }
  .cards p {
    font-size: 11.5px;
  }
  .cards h3 {
    margin-top: 0;
  }
  .stars {
    margin: 2px 0;
  }
  .card {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .mbtns .btn {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

/* power-ups + combo */
.combo {
  font-style: normal;
  font-weight: 700;
  font-size: 0.85em;
  color: #06223f;
  background: #ffe680;
  border-radius: 99px;
  padding: 1px 7px;
  margin-left: 2px;
}
.combo:empty {
  display: none;
}
.pw {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
  min-height: 30px;
}
.pwc {
  display: none;
  position: relative;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 6px;
  border-radius: 99px;
  background: #06223fcc;
  border: 2px solid #7fe9ff99;
  overflow: hidden;
}
.pwc.on {
  display: inline-flex;
}
.pwc .ic {
  width: 22px;
  height: 22px;
}
.pwc i {
  display: block;
  width: 46px;
  height: 8px;
  border-radius: 9px;
  background: #ffe680;
  transform-origin: left center;
}
#pwShield i {
  background: #4dd8ff;
  transform: none !important;
}
#pwMag i {
  background: #ff7d93;
}
#pwSlow i {
  background: #c9a6ff;
}
.msg.big {
  font-size: 24px;
}
.logo-img {
  display: block;
  width: min(400px, 76vw);
  height: auto;
  max-height: 30vh;
  object-fit: contain;
  margin: 0 auto;
}
@media (max-height: 480px) {
  .logo-img {
    max-height: 34vh;
    width: auto;
  }
}
.logo-img.big {
  width: min(520px, 82vw);
  max-height: 36vh;
}
.logo-img {
  width: auto;
  max-width: 100%;
  height: clamp(60px, 17vh, 140px);
  max-height: none;
}
.logo-img.big {
  width: auto;
  max-width: 90vw;
  height: clamp(80px, 24vh, 200px);
  max-height: none;
}
@media (max-height: 480px) {
  .logo-img {
    height: clamp(44px, 15vh, 70px);
  }
}

/* settings on short landscape screens */
@media (max-height: 460px) {
  #settings .setlist {
    gap: 6px;
  }
  #settings .setrow {
    padding: 6px 12px;
    font-size: 16px;
  }
  #settings .muted.small {
    display: none;
  }
}
@media (max-height: 360px) {
  #settings .setlist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
  }
  #settings .setrow {
    padding: 5px 10px;
    font-size: 14px;
  }
  #settings .setrow .ic {
    width: 20px;
    height: 20px;
  }
}
