:root {
  --red: #c8141f;
  --red-hi: #e2262f;
  --red-lo: #8f0d16;
  --gold: #ffd23f;
  --ink: #0d0b0f;
  --paper: #f4ecdc;
  --panel: rgba(16, 12, 18, 0.9);
  --display: "Arial Black", "Segoe UI Black", "Helvetica Neue", Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* The smallest font size (layout px) still readable at the current scale;
     js/main.js resize() sets it. */
  --fmin: 11px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0b0a0c;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overscroll-behavior: none;
}

#stage {
  position: absolute;
  overflow: hidden;
  background: #000;
  touch-action: none;
}

#game,
#gl,
#hud {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
}

#gl,
#hud { pointer-events: none; }

/* With shader effects on, the 2D canvas only feeds the WebGL layer. */
#gl { visibility: hidden; }
#stage.shaders #gl { visibility: visible; }
#stage.shaders #game { visibility: hidden; }

#ui {
  position: absolute;
  left: 0;
  top: 0;
  width: 1280px;
  height: 720px;
  transform-origin: 0 0;
  pointer-events: none;
  color: var(--paper);
  font-family: var(--body);
}

#ui .screen,
#ui button,
#ui input { pointer-events: auto; }

#boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font: italic 900 28px var(--display);
  letter-spacing: 2px;
  background: #0b0a0c;
}

/* ---------- shared bits ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadein 0.22s ease-out;
}

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

h1, h2, h3 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 900; }

h1 {
  margin-top: 26px;
  font-size: 50px;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 4px 0 #000, 0 0 30px rgba(200, 20, 31, 0.6);
}

.sub { margin: 6px 0 0; font-size: max(18px, var(--fmin)); opacity: 0.85; }

.btn {
  position: relative;
  font: italic 900 max(26px, var(--fmin)) var(--display);
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(#2c2632, #18141c);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 12px 26px;
  transform: skewX(-8deg);
  box-shadow: 0 4px 0 #000, 0 10px 22px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
  transition: transform 0.08s, filter 0.08s, box-shadow 0.08s;
  white-space: nowrap;
}
.btn:hover { transform: skewX(-8deg) translateY(-2px); filter: brightness(1.18); }
.btn:active { transform: skewX(-8deg) translateY(2px); box-shadow: 0 2px 0 #000, 0 4px 10px rgba(0, 0, 0, 0.4); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn:disabled { opacity: 0.45; cursor: default; filter: grayscale(0.6); transform: skewX(-8deg); }
.btn.primary {
  background: linear-gradient(var(--red-hi), var(--red-lo));
  border-color: rgba(255, 140, 140, 0.4);
}
.btn small {
  display: block;
  margin-top: 2px;
  font: normal 600 max(14px, var(--fmin)) var(--body);
  letter-spacing: 0;
  opacity: 0.88;
  text-shadow: none;
}
.btn.ghost { background: rgba(0, 0, 0, 0.45); }
.btn.small { font-size: max(16px, var(--fmin)); padding: 8px 16px; }
.btn.ad .adi, .btn .adi {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 0.35em;
  /* Sized with the label, so it reads as a play button at any size. */
  border-left: 0.6em solid var(--gold);
  border-top: 0.38em solid transparent;
  border-bottom: 0.38em solid transparent;
  vertical-align: 0.02em;
}

.row { display: flex; gap: 14px; justify-content: center; }

.topbar {
  position: absolute;
  top: 16px;
  right: 22px;
  display: flex;
  gap: 18px;
  align-items: center;
}

.coins, .starcount {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: italic 900 max(24px, var(--fmin)) var(--display);
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 14px 6px 8px;
  border-radius: 30px;
  text-shadow: 0 2px 0 #000;
}

.coin {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7c2 0 12%, #ffd23f 35%, #c98a0c 100%);
  box-shadow: inset 0 0 0 2px rgba(120, 70, 0, 0.55);
  vertical-align: middle;
  flex: none;
}
.btn .coin { width: 18px; height: 18px; margin-right: 6px; vertical-align: -2px; }

.star {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.18);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.star.on { background: var(--gold); }
.stars { display: inline-flex; gap: 3px; }
.stars.big .star { width: 74px; height: 74px; margin: 0 6px; }
.stars.pop .star.on { animation: starpop 0.45s cubic-bezier(0.3, 1.8, 0.5, 1) both; }
@keyframes starpop {
  from { transform: scale(0) rotate(-90deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

kbd {
  display: inline-block;
  min-width: 30px;
  padding: 3px 8px;
  margin: 0 2px;
  border-radius: 5px;
  background: #f4ecdc;
  color: #111;
  font: 800 max(15px, var(--fmin)) var(--body);
  text-align: center;
  box-shadow: 0 3px 0 #8a8070;
}

/* ---------- title ---------- */
.title {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.55) 100%);
}

.logo {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: skewX(-8deg) rotate(-2deg);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}
.logo-top {
  font: italic 900 88px/1 var(--display);
  letter-spacing: 4px;
  color: #fff;
  -webkit-text-stroke: 10px #111;
  paint-order: stroke fill;
}
.logo-bot {
  position: relative;
  margin-top: -6px;
  padding: 6px 40px 14px;
}
.logo-bot .brush {
  position: absolute;
  inset: -4px -26px -8px -26px;
  width: calc(100% + 52px);
  height: calc(100% + 12px);
}
.logo-bot span {
  position: relative;
  font: italic 900 70px/1 var(--display);
  letter-spacing: 3px;
  color: #fff;
  -webkit-text-stroke: 7px #111;
  paint-order: stroke fill;
}

.title .menu {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.title .btn.big {
  width: 400px;
  padding: 14px 20px 12px;
  font-size: 46px;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 0 #000, 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(226, 38, 47, 0.5); }
  50% { box-shadow: 0 4px 0 #000, 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 0 12px rgba(226, 38, 47, 0); }
}
.title .bottomnav {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  gap: 14px;
  justify-content: center;
}
.title .bottomnav .btn { width: 196px; font-size: max(22px, var(--fmin)); padding: 12px 10px; }
.title .bottomnav .btn small { font-size: max(12px, var(--fmin)); }
.title .foot {
  margin-top: 16px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  font-size: max(16px, var(--fmin));
  font-weight: 700;
  opacity: 0.85;
  text-shadow: 0 1px 3px #000;
}

/* ---------- levels ---------- */
.levels, .dojo, .panelscreen.dim {
  background: rgba(10, 8, 12, 0.72);
}
.tabs { display: flex; gap: 12px; margin-top: 18px; }
.tab {
  width: 300px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  font: italic 900 max(18px, var(--fmin)) var(--display);
  text-align: left;
}
.tab small { display: flex; align-items: center; gap: 6px; margin-top: 4px; font: 600 max(14px, var(--fmin)) var(--body); opacity: 0.85; }
.tab small .star { width: 16px; height: 16px; }
.tab.on { border-color: var(--gold); background: rgba(255, 210, 63, 0.12); }
.tab:disabled { opacity: 0.4; cursor: default; }
.grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(5, 210px);
  gap: 16px;
}
.tile {
  position: relative;
  height: 160px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(#2c2632, #16121a);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s, filter 0.1s;
}
.tile:hover:not(:disabled) { transform: translateY(-3px); filter: brightness(1.15); }
.tile:disabled { cursor: default; opacity: 0.55; }
.tile .num { font: italic 900 50px/1 var(--display); text-shadow: 0 3px 0 #000; }
.tile .nm { font: 700 max(15px, var(--fmin)) var(--body); opacity: 0.9; }
.tile.current { border-color: var(--gold); animation: glow 1.2s ease-in-out infinite alternate; }
@keyframes glow { from { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0.2); } to { box-shadow: 0 0 22px 4px rgba(255, 210, 63, 0.45); } }
.tile.bosstile { background: linear-gradient(#5e0e16, #22070b); }
.tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font: italic 900 max(12px, var(--fmin)) var(--display);
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
}
.tag.new { background: #2c86c9; }
.tag.wpn { background: #a8741c; }
.tag.glass { background: #6a6a7a; }
.lock {
  display: inline-block;
  position: relative;
  width: 30px;
  height: 24px;
  margin-top: 16px;
  background: #bbb;
  border-radius: 4px;
}
.lock::before {
  content: "";
  position: absolute;
  left: 6px;
  top: -16px;
  width: 14px;
  height: 16px;
  border: 4px solid #bbb;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.bottom {
  position: absolute;
  bottom: 26px;
  left: 40px;
  right: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bottom .tip { display: flex; align-items: center; gap: 8px; font-size: max(16px, var(--fmin)); opacity: 0.85; }
.bottom .tip .star { width: 18px; height: 18px; }
.dojo .bottom { justify-content: center; }

/* ---------- dojo ---------- */
.cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 560px);
  gap: 12px 18px;
}
.card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(#262029, #151118);
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.card .ic {
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 900 30px var(--body);
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #e2262f, #6d0a11);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.15);
}
.card .info { flex: 1; min-width: 0; }
.card h3 { font-size: max(20px, var(--fmin)); color: #fff; }
.card p { margin: 3px 0 6px; font-size: max(14px, var(--fmin)); opacity: 0.85; }
.pips { display: flex; gap: 5px; }
.pips i { width: 26px; height: 7px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); }
.pips i.on { background: var(--gold); }
.card .buy { min-width: 112px; font-size: max(20px, var(--fmin)); padding: 10px 12px; }
.card.maxed { border-color: rgba(255, 210, 63, 0.4); }

/* ---------- panels ---------- */
.panelscreen { justify-content: center; }
.panel {
  width: 560px;
  padding: 28px 34px 30px;
  border-radius: 14px;
  background: var(--panel);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  text-align: center;
  animation: panelin 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes panelin { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.panel h2 { font-size: 46px; color: #fff; text-shadow: 0 4px 0 #000; }
.panel .sub { margin: -6px 0 6px; }
.panel .row .btn { flex: 1; }

.settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font: 700 max(19px, var(--fmin)) var(--body);
  text-align: left;
}
.settings input[type="range"] {
  width: 260px;
  accent-color: var(--red-hi);
  height: 28px;
}
.toggle {
  min-width: 160px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: italic 900 max(16px, var(--fmin)) var(--display);
  cursor: pointer;
}
.toggle.on { background: var(--red); border-color: rgba(255, 140, 140, 0.5); }
.settings .note { margin: -4px 0 4px; font-size: max(13px, var(--fmin)); opacity: 0.7; text-align: left; }

.help { width: 920px; }
.help .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; text-align: left; }
.help h3 { font-size: max(20px, var(--fmin)); color: var(--gold); margin: 10px 0 4px; }
.help p { margin: 4px 0; font-size: max(16px, var(--fmin)); line-height: 1.45; }
.help .keys { margin: 10px 0; }
.enemies { list-style: none; padding: 0; margin: 4px 0; font-size: max(16px, var(--fmin)); }
.enemies li { display: flex; align-items: center; gap: 10px; margin: 5px 0; }
.enemies i { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25); }

.pausepanel { width: 420px; }

.results { width: 600px; gap: 10px; }
.results .head { font-size: 64px; }
.results.win .head { color: var(--gold); }
.results.lose .head { color: #ff5a4a; }
.results .stars { justify-content: center; margin: 4px 0; }
.results .hint { margin: -4px 0 0; font-size: max(14px, var(--fmin)); opacity: 0.75; }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 22px;
  margin: 6px 0;
  text-align: left;
}
.stats div {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: max(16px, var(--fmin));
}
.stats b { font: italic 900 max(18px, var(--fmin)) var(--display); color: #fff; }
.stats div:last-child { grid-column: span 2; }
.earn { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: max(16px, var(--fmin)); }
.earn em { color: var(--gold); font-weight: 800; }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.actions > .btn { font-size: 30px; }

/* ---------- HUD ---------- */
.hud-btn.pause {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 58px;
  height: 58px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.hud-btn.pause i { width: 8px; height: 24px; border-radius: 2px; background: #fff; }

/* Invisible hit area over the super meter; the meter itself is drawn on the HUD canvas. */
.hud-btn.super {
  position: absolute;
  left: calc(50% - 190px);
  top: 644px;
  width: 380px;
  height: 64px;
  border: 0;
  background: transparent;
  display: none;
  cursor: pointer;
}
.hud-btn.super.on { display: block; }
.hud-btn.pause:hover { background: rgba(0, 0, 0, 0.65); }

.toast {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font: 700 max(18px, var(--fmin)) var(--body);
  pointer-events: none;
  animation: fadein 0.2s;
}

/* ---------- rotate prompt ---------- */
#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #0b0a0c;
  color: #fff;
  font: italic 900 max(22px, var(--fmin)) var(--display);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
#rotate .phone {
  width: 60px;
  height: 100px;
  border: 5px solid #fff;
  border-radius: 12px;
  animation: rot 1.8s ease-in-out infinite;
}
@keyframes rot { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
body.portrait #rotate { display: flex; }

/* ---------- v2: styles, arenas, chapter tabs ---------- */
.title .bottomnav .btn { width: 178px; font-size: max(20px, var(--fmin)); padding: 12px 8px; }
.tabs { gap: 8px; }
.tab { width: 168px; padding: 9px 10px; font-size: max(14px, var(--fmin)); }
.tab small { font-size: max(12px, var(--fmin)); }
.tag.blackout { background: #222; box-shadow: inset 0 0 0 1px #777; }
.tag.swarm { background: #2f9156; }
.tag.weapons { background: #a8741c; }
.tag.glass { background: #6a6a7a; }

.styles { background: rgba(10, 8, 12, 0.8); }
.styles h1 { margin-top: 14px; font-size: 42px; }
.scards {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 384px);
  gap: 14px;
}
.scard {
  position: relative;
  height: 268px;
  padding: 10px 14px 12px;
  border-radius: 12px;
  background: linear-gradient(#241e28, #141117);
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.scard canvas {
  width: 340px;
  height: 104px;
  border-radius: 8px;
  background: radial-gradient(ellipse at 50% 85%, color-mix(in srgb, var(--acc) 35%, transparent), rgba(0, 0, 0, 0.35) 70%);
}
.scard h3 { margin-top: 4px; font-size: max(21px, var(--fmin)); color: #fff; letter-spacing: 1px; }
.scard .tagline { margin: 0; font-size: max(13px, var(--fmin)); font-style: italic; opacity: 0.75; }
.scard .perk { margin: 3px 0 6px; font-size: max(13px, var(--fmin)); color: var(--acc); font-weight: 700; min-height: 32px; line-height: 1.25; }
.scard .btn { margin-top: auto; min-width: 170px; }
.scard .btn .coin { width: 16px; height: 16px; margin-right: 6px; }
.scard.on { border-color: var(--acc); box-shadow: 0 0 22px color-mix(in srgb, var(--acc) 45%, transparent); }
.scard.locked canvas { filter: grayscale(1) brightness(0.6); }
.btn.equipped { background: transparent; border-color: var(--acc); color: var(--acc); opacity: 1; filter: none; }

.arenas {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 272px);
  gap: 16px;
}
.arena {
  position: relative;
  height: 160px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px 14px;
  text-align: left;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s, filter 0.1s;
}
.arena b { font: italic 900 max(21px, var(--fmin)) var(--display); text-shadow: 0 2px 0 #000, 0 0 10px #000; }
.arena small { font: 700 max(13px, var(--fmin)) var(--body); opacity: 0.9; text-shadow: 0 1px 2px #000; }
.arena:hover:not(:disabled) { transform: translateY(-3px); filter: brightness(1.15); }
.arena.on { border-color: var(--gold); }
.arena:disabled { cursor: default; filter: grayscale(0.85) brightness(0.55); }
.newstyle { margin: 0; font-size: max(15px, var(--fmin)); color: var(--gold); }
/* The old desktop results (?lobby=0): what the coins buy next, as one line (UI.upgradeCard). */
.upline { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 2px 4px 7px; font-size: max(15px, var(--fmin)); }
.upline .upic {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font: 900 max(18px, var(--fmin))/1 var(--body); color: #fff;
  background: radial-gradient(circle at 35% 30%, #e2262f, #6d0a11);
}
.upline .upic svg { width: 20px; height: 20px; }
.upline.up-style .upic { color: #7dff9a; background: radial-gradient(circle at 35% 30%, #2f6a43, #0f2a1a); }
.upline .uptext b { color: var(--gold); }
.upline .upbuy {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; color: var(--gold);
  background: linear-gradient(#3a2f12, #1f1808); border-color: rgba(255, 210, 63, 0.6);
}
.upline.first .upbuy { animation: pulse 1.6s ease-in-out infinite; }
.upline em { color: var(--gold); font-style: normal; font-weight: 800; }
.upline.goal::after { content: ''; position: absolute; left: 25%; bottom: 0; width: calc(var(--p) / 2); height: 3px; background: var(--gold); }
.upline.goal::before { content: ''; position: absolute; left: 25%; bottom: 0; width: 50%; height: 3px; background: rgba(255, 255, 255, 0.12); }
.upline.swap { animation: lineswap 0.22s ease-out; }
@keyframes lineswap { from { opacity: 0; translate: 10px 0; } }

/* ---------- v3: daily challenge, locker, awards ---------- */
.title .bottomnav { gap: 8px; }
.title .bottomnav .btn { width: 148px; font-size: max(18px, var(--fmin)); padding: 11px 6px; }
.title .bottomnav .btn small { font-size: max(11px, var(--fmin)); }
.title .btn.daily {
  width: 400px;
  margin-top: 12px;
  padding: 9px 14px;
  font-size: max(22px, var(--fmin));
  background: linear-gradient(#3a2a10, #1d150a);
  border-color: rgba(255, 210, 63, 0.55);
}
.title .btn.daily small { font-size: max(13px, var(--fmin)); color: var(--gold); }
.title .btn.daily.done { border-color: rgba(125, 255, 154, 0.5); background: linear-gradient(#1e3324, #111c14); }
.title .btn.daily.done small { color: #9dffb4; }

.locker, .awards { background: rgba(10, 8, 12, 0.82); }
.locker h1, .awards h1 { margin-top: 14px; font-size: 42px; }
.lwrap { display: flex; gap: 22px; margin-top: 10px; align-items: flex-start; }
.lpreview {
  width: 300px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(ellipse at 50% 40%, #f4ecdc 0%, #cbbfa9 55%, #8c8170 100%);
  overflow: hidden;
  text-align: center;
}
.lpreview canvas { display: block; }
.lpreview p { margin: 0; padding: 8px; font: italic 900 max(20px, var(--fmin)) var(--display); color: #fff; background: rgba(0, 0, 0, 0.55); }
.lrows { width: 720px; display: flex; flex-direction: column; gap: 10px; }
.lrow h3 { margin: 0 0 6px; font: italic 900 max(16px, var(--fmin)) var(--display); letter-spacing: 1px; opacity: 0.85; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  width: 112px;
  padding: 7px 6px 6px;
  border-radius: 9px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(#262029, #151118);
  color: #fff;
  font: 700 max(14px, var(--fmin)) var(--body);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.chip b { font-weight: 800; }
.chip small { font-size: max(11px, var(--fmin)); opacity: 0.85; display: flex; align-items: center; }
.chip small .coin { width: 13px; height: 13px; margin-right: 4px; }
.chip .sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); }
.chip .sw.def { background: linear-gradient(135deg, #111116 50%, #e3262b 50%); }
.chip.owned { border-color: rgba(255, 255, 255, 0.28); }
.chip.on { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 210, 63, 0.4); }
.chip.on small { color: var(--gold); opacity: 1; }
.chip.poor { opacity: 0.55; }
.chip:hover { filter: brightness(1.15); }

.agrid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 560px);
  gap: 8px 16px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}
.award {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(#241e28, #141117);
}
.award .info { flex: 1; min-width: 0; }
.award h3 { margin: 0; font: italic 900 max(17px, var(--fmin)) var(--display); }
.award p { margin: 2px 0 6px; font-size: max(13px, var(--fmin)); opacity: 0.8; }
.award .bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.award .bar i { display: block; height: 100%; background: var(--red-hi); }
.award .rew { width: 108px; text-align: right; font: 800 max(16px, var(--fmin)) var(--body); }
.award .rew .coin { width: 16px; height: 16px; margin-right: 4px; vertical-align: -2px; }
.award .rew small { display: block; font-size: max(11px, var(--fmin)); opacity: 0.75; }
.award.done { border-color: rgba(255, 210, 63, 0.6); }
.award.done h3 { color: var(--gold); }
.award.done .bar i { background: var(--gold); }
.awards .bottom { justify-content: center; }
.newaward { margin: 0; font-size: max(15px, var(--fmin)); color: #9dffb4; }

/* ---------- v4: difficulty, menu juice ---------- */
.diffpick {
  position: absolute;
  top: 14px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid color-mix(in srgb, var(--dc) 55%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--dc) 25%, transparent);
}
.diffpick .arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--dc);
  font-size: max(14px, var(--fmin));
  cursor: pointer;
  transition: background 0.1s, scale 0.08s;
}
.diffpick .arrow:hover { background: rgba(255, 255, 255, 0.18); }
.diffpick .arrow:active { scale: 0.88; }
.diffpick .dv { width: 214px; text-align: center; line-height: 1.1; }
.diffpick small { display: block; font: 700 max(10px, var(--fmin)) var(--body); letter-spacing: 2px; opacity: 0.7; }
.diffpick b { display: block; font: italic 900 max(20px, var(--fmin)) var(--display); color: var(--dc); text-shadow: 0 2px 0 #000; }
.diffpick span { display: block; font-size: max(10.5px, var(--fmin)); opacity: 0.75; white-space: nowrap; }
.diffpick.bump .dv { animation: dbump 0.32s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes dbump { from { scale: 1.25; } to { scale: 1; } }

.hardmark {
  position: absolute;
  top: 6px;
  left: 10px;
  font-style: normal;
  font-size: max(18px, var(--fmin));
  color: #ff5a4a;
  text-shadow: 0 0 8px rgba(255, 90, 74, 0.7), 0 2px 0 #000;
}
.difftag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 12px;
  font: italic 900 max(13px, var(--fmin)) var(--display);
  color: #111;
  background: var(--dc);
  vertical-align: 2px;
}

/* Everything on a menu arrives: lists rise in one after another. */
@keyframes rise { from { opacity: 0; translate: 0 26px; scale: 0.92; } to { opacity: 1; translate: 0 0; scale: 1; } }
.stagger { animation: rise 0.42s cubic-bezier(0.2, 1.3, 0.4, 1) backwards; }
.screen h1 { animation: h1in 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) backwards; }
@keyframes h1in { from { opacity: 0; scale: 1.6; letter-spacing: 14px; } to { opacity: 1; scale: 1; } }

/* Buttons: lift and glow on hover, squash on press, and a shine across primaries. */
.btn { transition: transform 0.08s, filter 0.08s, box-shadow 0.12s, scale 0.08s; }
.btn:hover { box-shadow: 0 6px 0 #000, 0 12px 26px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 255, 255, 0.1); }
.btn.primary:hover { box-shadow: 0 6px 0 #000, 0 12px 26px rgba(0, 0, 0, 0.5), 0 0 26px rgba(226, 38, 47, 0.55); }
.btn:active { scale: 0.96; }
.btn.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%) no-repeat;
  background-size: 300% 100%;
  animation: shine 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine { 0%, 55% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
.chip { transition: scale 0.08s, filter 0.1s, box-shadow 0.12s; }
.chip:active { scale: 0.93; }
.chip.just { animation: equip 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes equip { from { scale: 1.25; box-shadow: 0 0 30px rgba(255, 210, 63, 0.9); } to { scale: 1; } }
.tile { transition: scale 0.1s, filter 0.1s; }
.tile:not(.locked):hover { scale: 1.05; z-index: 2; }
.tile.denied, .chip.denied { animation: deny 0.3s; }
@keyframes deny { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }

/* Title: the logo slams in, the brush stroke paints across, then it floats. */
.title .logo { animation: logoin 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) backwards, float 4s 0.8s ease-in-out infinite alternate; }
@keyframes logoin { from { opacity: 0; scale: 2.3; } 70% { opacity: 1; scale: 0.95; } to { scale: 1; } }
@keyframes float { from { translate: 0 -3px; } to { translate: 0 4px; } }
.title .logo-bot .brush { animation: brush 0.4s 0.3s cubic-bezier(0.5, 0, 0.2, 1) backwards; }
@keyframes brush { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.title .logo-bot span { animation: slam 0.35s 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) backwards; }
@keyframes slam { from { opacity: 0; scale: 1.8; } to { opacity: 1; scale: 1; } }
.title .logo-top { transition: translate 0.25s ease-out; translate: calc(var(--px, 0) * -12px) calc(var(--py, 0) * -6px); }
.title .logo-bot { transition: translate 0.25s ease-out; translate: calc(var(--px, 0) * 9px) calc(var(--py, 0) * 5px); }
.title .btn.big { animation: rise 0.45s 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) backwards, pulse 1.6s 1s ease-in-out infinite; }
.title .btn.daily { animation: rise 0.45s 0.65s cubic-bezier(0.2, 1.3, 0.4, 1) backwards; }
.title .foot { animation: rise 0.45s 0.75s ease-out backwards; }

.coins.bump { animation: coinbump 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes coinbump { from { scale: 1.35; filter: brightness(1.6); } to { scale: 1; } }

.toast {
  border: 2px solid rgba(255, 210, 63, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toastin 0.4s cubic-bezier(0.2, 1.5, 0.4, 1);
}
@keyframes toastin { from { opacity: 0; translate: 0 40px; scale: 0.8; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* Results: the headline stamps down. */
.results .head { animation: stamp 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) backwards; }
@keyframes stamp { from { opacity: 0; scale: 2.4; rotate: -6deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
.results.win .head { color: var(--gold); text-shadow: 0 4px 0 #000, 0 0 30px rgba(255, 210, 63, 0.45); }
.newbest { animation: stamp 0.5s 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) backwards; }

/* Slash wipe between menus and fights. */
.wipe {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}
.wipe i {
  position: absolute;
  top: -20%;
  height: 140%;
  transform: skewX(-18deg);
}
/* One black panel sweeps across (fully covering the screen at the midpoint)
   with red and gold slash stripes on its leading edge. */
.wipe i:nth-child(1) { width: 160%; background: #0b0a0c; animation: wipep 0.62s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
.wipe i:nth-child(2) { width: 7%; background: var(--red-hi); animation: wipes 0.62s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
.wipe i:nth-child(3) { width: 2%; background: var(--gold); animation: wipes2 0.62s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
@keyframes wipep { 0% { left: -175%; } 45%, 55% { left: -20%; } 100% { left: 125%; } }
@keyframes wipes { 0% { left: -15%; } 45%, 55% { left: 140%; } 100% { left: 285%; } }
@keyframes wipes2 { 0% { left: -6%; } 45%, 55% { left: 149%; } 100% { left: 294%; } }
.stats > div.bump b { display: inline-block; animation: coinbump 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); }
.newbest { display: inline-block; color: var(--gold); font-weight: 800; }
.scard, .arena, .card, .award { transition: scale 0.12s, box-shadow 0.12s, filter 0.12s; }
.scard:hover, .arena:not(:disabled):hover, .card:hover, .award:hover { scale: 1.03; filter: brightness(1.1); }

/* ---------- v4b: bursts and pops ---------- */
.burst { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 40; }
/* What a purchase gave, rising off its card (UI.floatText). */
.upfloat {
  position: absolute; z-index: 41; pointer-events: none; white-space: nowrap; translate: -50% -50%;
  font: italic 900 max(24px, var(--fmin)) var(--display); text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, 0.85);
  animation: upfloat 0.95s ease-out forwards;
}
.lobby .upfloat { font-size: calc(24 * var(--u)); }
@keyframes upfloat {
  0% { opacity: 0; translate: -50% -30%; scale: 0.6; }
  18% { opacity: 1; scale: 1.18; }
  70% { opacity: 1; }
  100% { opacity: 0; translate: -50% -190%; scale: 1; }
}
.burst i {
  position: absolute;
  left: -5px;
  top: -3px;
  width: 10px;
  height: 6px;
  border-radius: 1px;
  background: var(--c);
  animation: pt 0.8s cubic-bezier(0.15, 0.8, 0.3, 1) forwards;
}
.burst i.round { width: 8px; height: 8px; border-radius: 50%; }
@keyframes pt { from { opacity: 1; } 70% { opacity: 1; } to { translate: var(--dx) var(--dy); rotate: var(--r); opacity: 0; scale: 0.5; } }
.scard.just, .card.just { animation: equip 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
.pips i.new { animation: pipin 0.5s cubic-bezier(0.2, 1.8, 0.4, 1); box-shadow: 0 0 12px rgba(255, 210, 63, 0.9); }
@keyframes pipin { from { scale: 2.2 1.6; filter: brightness(2); } to { scale: 1; } }
.title .foot span { display: inline-block; }
.title .foot span.tipin { animation: tipin 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes tipin { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* ---------- v4c: ranks ---------- */
.results { position: relative; }
.rank {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 92px;
  text-align: center;
  rotate: 8deg;
  animation: rankin 0.5s 1.1s cubic-bezier(0.2, 1.6, 0.4, 1) backwards;
}
.rank b { display: block; font: italic 900 78px/0.9 var(--display); color: var(--rc); -webkit-text-stroke: 4px #111; paint-order: stroke fill; text-shadow: 0 0 24px color-mix(in srgb, var(--rc) 60%, transparent); }
.rank small { font: 800 max(12px, var(--fmin)) var(--body); letter-spacing: 3px; opacity: 0.8; }
@keyframes rankin { from { opacity: 0; scale: 3; rotate: -20deg; } to { opacity: 1; scale: 1; rotate: 8deg; } }
.r-S { --rc: #ffd23f; }
.r-A { --rc: #7dff9a; }
.r-B { --rc: #5ad1ff; }
.r-C { --rc: #d0c8bc; }
.r-D { --rc: #ff5a4a; }
.rank.r-S b { animation: rankglow 1.4s 1.6s ease-in-out infinite alternate; }
@keyframes rankglow { to { text-shadow: 0 0 36px rgba(255, 210, 63, 0.9); } }
.rankmark {
  position: absolute;
  bottom: 6px;
  right: 9px;
  font: italic 900 max(18px, var(--fmin)) var(--display);
  font-style: italic;
  color: var(--rc);
  -webkit-text-stroke: 2px #111;
  paint-order: stroke fill;
}
.title .logo-top, .title .logo-bot span { scale: calc(1 + var(--beat, 0) * 0.035); }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 2px 0 6px; }
.pstats div { padding: 6px 4px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.pstats b { display: block; font: italic 900 max(20px, var(--fmin)) var(--display); color: #fff; }
.pstats span { font-size: max(10px, var(--fmin)); letter-spacing: 2px; opacity: 0.7; }
.scard .moves { margin: -2px 0 6px; font-size: max(11px, var(--fmin)); letter-spacing: 1px; opacity: 0.8; }
.scard .moves b { color: var(--acc); font-style: italic; }

/* ---------- v4d: boss portraits ---------- */
.tile.bosstile { isolation: isolate; overflow: hidden; }
.bossport { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.tile.bosstile:not(.locked) .bossport { animation: bossbreathe 2.4s ease-in-out infinite alternate; transform-origin: 74% 100%; }
@keyframes bossbreathe { from { scale: 1; } to { scale: 1.03; } }
.crownmark {
  position: absolute;
  bottom: 6px;
  left: 10px;
  font-style: normal;
  font-size: max(20px, var(--fmin));
  color: #ffd23f;
  text-shadow: 0 0 10px rgba(255, 210, 63, 0.8), 0 2px 0 #000;
}

/* ---------- v4e: unlocks and career ---------- */
.tile .lock.breaking {
  position: absolute;
  left: 50%;
  top: 34px;
  margin-left: -15px;
  animation: lockbreak 1.5s cubic-bezier(0.5, 0, 0.6, 1) forwards;
}
@keyframes lockbreak {
  0% { opacity: 1; }
  20%, 50% { translate: 0 0; rotate: 0deg; }
  25% { translate: -4px 0; rotate: -8deg; }
  35% { translate: 4px 0; rotate: 8deg; }
  45% { translate: -3px 0; rotate: -5deg; }
  60% { opacity: 1; translate: 0 -10px; scale: 1.3; }
  100% { opacity: 0; translate: 30px -120px; rotate: 160deg; scale: 0.6; }
}
.tile.unlocking { animation: unlockflare 1.6s ease-out; }
.tile.unlocking .num, .tile.unlocking .nm { animation: unlockreveal 1.6s ease-out; }
@keyframes unlockflare { 0%, 55% { box-shadow: none; } 62% { box-shadow: 0 0 40px 10px rgba(255, 210, 63, 0.9); border-color: #fff; } 100% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); } }
@keyframes unlockreveal { 0%, 55% { opacity: 0; scale: 0.6; } 70% { opacity: 1; scale: 1.25; } 100% { scale: 1; } }
.tab.newch { animation: newch 1.1s ease-in-out 3; border-color: var(--gold); }
@keyframes newch { 50% { box-shadow: 0 0 24px rgba(255, 210, 63, 0.7); background: rgba(255, 210, 63, 0.25); } }
.career { display: flex; gap: 8px; margin-top: 10px; }
.career div { min-width: 120px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); text-align: center; }
.career b { display: block; font: italic 900 max(20px, var(--fmin)) var(--display); color: #fff; }
.career span { font-size: max(10px, var(--fmin)); letter-spacing: 2px; opacity: 0.7; }
.awards .agrid { max-height: 455px; }
.scard .moves.rares { margin-top: -6px; }
.scard .moves.rares i { font-style: normal; opacity: 0.55; }
.scards { gap: 10px 14px; margin-top: 6px; }
.scard { height: 286px; }
.scard .perk { min-height: 30px; margin-bottom: 4px; }
.styles h1 { margin-top: 10px; }
.scard { height: 280px; padding-top: 8px; padding-bottom: 8px; }
.styles .bottom { bottom: 14px; }

/* ---------- compact: the 1280x720 UI shown below 75% (phones, small iframes) ---------- */
.compact .btn small { font-size: max(16px, var(--fmin)); }
.compact .title .bottomnav .btn { font-size: max(21px, var(--fmin)); }
.compact .title .bottomnav .btn small { font-size: max(14px, var(--fmin)); }
.compact .title .btn.daily small { font-size: max(16px, var(--fmin)); }
.compact .title .foot { font-size: max(19px, var(--fmin)); }
.compact .diffpick span { display: none; }
.compact .diffpick small { font-size: max(12px, var(--fmin)); }
.compact .diffpick b { font-size: max(24px, var(--fmin)); }
.compact .tab { font-size: max(17px, var(--fmin)); }
.compact .tab small { font-size: max(15px, var(--fmin)); }
.compact .tile .nm { font-size: max(18px, var(--fmin)); }
.compact .tag { font-size: max(14px, var(--fmin)); }
.compact .card p { font-size: max(16px, var(--fmin)); }
.compact .chip { font-size: max(16px, var(--fmin)); }
.compact .chip small { font-size: max(13px, var(--fmin)); }
.compact .lrow h3 { font-size: max(18px, var(--fmin)); }
.compact .award p { font-size: max(15px, var(--fmin)); }
.compact .award .rew small { font-size: max(13px, var(--fmin)); }
.compact .scard .tagline { display: none; }
.compact .scard .perk { font-size: max(15px, var(--fmin)); }
.compact .scard .moves { font-size: max(13px, var(--fmin)); }
.compact .arena small { font-size: max(15px, var(--fmin)); }
.compact .settings .note { font-size: max(15px, var(--fmin)); }
.compact .results .hint { font-size: max(16px, var(--fmin)); }
.compact .bottom .tip { font-size: max(18px, var(--fmin)); }
.compact .rank small { font-size: max(14px, var(--fmin)); }
.compact .pstats span, .compact .career span { font-size: max(13px, var(--fmin)); }
.compact .toast { font-size: max(22px, var(--fmin)); }
/* Thumb-sized pause button on phones. */
.compact .hud-btn.pause { width: 84px; height: 84px; top: 10px; right: 12px; gap: 12px; }
.compact .hud-btn.pause i { width: 11px; height: 34px; }
.compact .stats { font-size: max(18px, var(--fmin)); }

/* ---------- v5: daily login rewards ---------- */
/* A gift box drawn in CSS: ribbon down the box, a lid, a looped bow. */
.gift {
  position: relative;
  display: inline-block;
  flex: none;
  width: 20px;
  height: 15px;
  margin: 7px 9px 0 2px;
  vertical-align: -1px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 40%, var(--gold) 40% 60%, transparent 60%), linear-gradient(var(--red-hi), var(--red-lo));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
}
.gift::before {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: -6px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff4a52 40%, var(--gold) 40% 60%, #ff4a52 60%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
}
.gift::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 15px;
  height: 7px;
  translate: -50% 0;
  border: 3px solid var(--gold);
  border-radius: 50%;
}



.login { width: 1000px; gap: 14px; }
.week { display: flex; gap: 10px; justify-content: center; margin: 4px 0; }
.rday {
  position: relative;
  width: 124px;
  padding: 10px 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rday b { font: italic 900 max(17px, var(--fmin)) var(--display); letter-spacing: 1px; color: #fff; }
.rday small { min-height: 34px; font: 700 max(13px, var(--fmin))/1.3 var(--body); opacity: 0.9; }
.rday small .coin { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.rday canvas.ricon { width: 84px; height: 84px; }
.rday em {
  position: absolute;
  left: 50%;
  bottom: -11px;
  translate: -50% 0;
  padding: 2px 8px;
  border-radius: 10px;
  background: #18141c;
  border: 2px solid rgba(255, 255, 255, 0.25);
  font: italic 900 max(11px, var(--fmin)) var(--display);
  letter-spacing: 1px;
  white-space: nowrap;
}
.rday.done { opacity: 0.55; }
.rday.done em.tick { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: #2d8a4a; border-color: #9dffb4; font: 900 max(15px, var(--fmin)) var(--body); }
.rday.today { border-color: var(--gold); background: rgba(255, 210, 63, 0.12); animation: todayglow 1.1s ease-in-out infinite alternate; }
.rday.today em { background: var(--gold); border-color: #fff3c4; color: #1a1408; }
@keyframes todayglow { from { box-shadow: 0 0 6px rgba(255, 210, 63, 0.3); } to { box-shadow: 0 0 28px rgba(255, 210, 63, 0.75); } }
.rday.next em { color: var(--gold); border-color: rgba(255, 210, 63, 0.6); }
.rday.exclusive { border-color: rgba(255, 90, 74, 0.7); background: linear-gradient(rgba(200, 20, 31, 0.22), rgba(255, 210, 63, 0.1)); }
.rday.exclusive.today { border-color: var(--gold); }
.rday.just { animation: equip 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
/* The week's prize, and a card for it even when owned. */
.rday.prize { border-color: color-mix(in srgb, var(--wk, var(--gold)) 75%, transparent); background: color-mix(in srgb, var(--wk, var(--gold)) 16%, transparent); }
/* The weeks of rewards: each one's prize, the current week lit, a tap peeks at its days. */
.login { --wk: var(--gold); }
.lhead { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.login .sub { margin: 0; }
.login .sub b { color: var(--wk); }
.weeks { display: flex; gap: 8px; justify-content: center; width: 100%; }
.wkchip {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 4px 8px 4px 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.wkchip canvas.ricon, .wkchip .wkinf { flex: none; width: 46px; height: 46px; }
.wkchip .wkinf { display: grid; place-items: center; font: 900 32px var(--body); font-style: normal; color: var(--wk); }
.wkchip span { min-width: 0; display: flex; flex-direction: column; }
.wkchip small { font: 800 max(10px, var(--fmin)) var(--body); letter-spacing: 1px; opacity: 0.75; white-space: nowrap; }
.wkchip b { font: italic 900 max(13px, var(--fmin)) var(--display); white-space: nowrap; color: var(--wk); }
.wkchip.done { opacity: 0.6; }
.wkchip.done::after { content: '✓'; position: absolute; top: 2px; right: 6px; font: 900 max(13px, var(--fmin)) var(--body); color: #9dffb4; }
.wkchip.on { border-color: var(--wk); background: color-mix(in srgb, var(--wk) 18%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--wk) 45%, transparent); }
.wkchip.now:not(.on) { border-color: color-mix(in srgb, var(--wk) 60%, transparent); }
.wkchip:hover { filter: brightness(1.15); }
.wkchip:active { scale: 0.95; }
/* A little stack of coins for coin-only days. */
.coinstack { position: relative; display: block; width: 84px; height: 84px; }
.coinstack i {
  position: absolute;
  left: 22px;
  width: 40px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(#ffe066, #c98a0c);
  box-shadow: inset 0 -3px 0 rgba(120, 70, 0, 0.5), 0 2px 3px rgba(0, 0, 0, 0.4);
}
.coinstack i:nth-child(1) { top: 52px; }
.coinstack i:nth-child(2) { top: 41px; left: 25px; }
.coinstack i:nth-child(3) { top: 30px; left: 20px; }
.login .msg { margin: 6px 0 0; font-size: max(19px, var(--fmin)); }
.login .msg b { color: var(--gold); }
.login .msg .cd { margin-left: 8px; opacity: 0.75; font-size: max(16px, var(--fmin)); }
.login > .btn, .login .btn.primary { align-self: center; min-width: 300px; font-size: 32px; }
.login .btn.primary[data-act="claim"] { animation: pulse 1.6s ease-in-out infinite; }

.results.tall { gap: 6px; }
/* A results screen shown again after the reward popup doesn't replay its entrance. */
.results.quiet, .results.quiet * { animation: none !important; }

.compact .rday small { font-size: max(15px, var(--fmin)); }
.compact .login .msg { font-size: max(22px, var(--fmin)); }
.compact .login .msg .cd { font-size: max(19px, var(--fmin)); }

/* The results screen's daily reward: a card beside the panel with a gift to
   open, then what it held and what tomorrow brings. */
.rewardcard, .nextcard {
  --rcw: 260px;
  position: absolute;
  top: 50%;
  width: var(--rcw);
  transform: translateY(-50%);
  padding: 16px 14px 12px;
  border-radius: 14px;
  background: var(--panel);
  border: 2px solid rgba(255, 210, 63, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  color: var(--paper);
  font: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rewardcard {
  left: calc(50% + 300px + (50% - 300px - var(--rcw)) / 2);
  animation: rcin 0.55s 1.5s cubic-bezier(0.2, 1.3, 0.4, 1) backwards;
}
@keyframes rcin { from { opacity: 0; translate: 140px 0; rotate: 8deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
.rewardcard.ready { cursor: pointer; border-color: var(--gold); animation: rcin 0.55s 1.5s cubic-bezier(0.2, 1.3, 0.4, 1) backwards, rcglow 1.2s 2.1s ease-in-out infinite alternate; }
@keyframes rcglow { to { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 34px rgba(255, 210, 63, 0.55); } }
.rewardcard.ready:hover { filter: brightness(1.12); }
.rewardcard.quiet { animation: none; }
.rc-label { font: 800 max(12px, var(--fmin)) var(--body); letter-spacing: 3px; color: var(--gold); }
.rc-tmrw { margin-top: 8px; }
.rc-day { font: italic 900 34px/1 var(--display); color: #fff; text-shadow: 0 3px 0 #000; }
.rc-cta {
  padding: 6px 18px;
  border-radius: 20px;
  background: var(--gold);
  color: #1a1408;
  font: italic 900 max(16px, var(--fmin)) var(--display);
  letter-spacing: 1px;
  animation: pulse 1.4s ease-in-out infinite;
}
.rc-goal { font-size: max(12px, var(--fmin)); opacity: 0.75; }
.rc-next { display: flex; align-items: center; gap: 6px; font: 700 max(15px, var(--fmin)) var(--body); }
.rc-cd { font-size: max(13px, var(--fmin)); opacity: 0.75; }
.rc-all { border: 0; padding: 4px 8px; background: none; color: var(--gold); font: 800 max(12px, var(--fmin)) var(--body); letter-spacing: 2px; cursor: pointer; }
.rc-all:hover { color: #fff; }
.rewardcard canvas.ricon.big { width: 96px; height: 96px; }
.rewardcard canvas.ricon.mid { width: 84px; height: 84px; }
.rewardcard canvas.ricon.tiny { width: 30px; height: 30px; }
/* The week as seven pips; the seventh (the helm) is ringed in red. */
.weektrack { display: flex; gap: 5px; margin-top: 4px; }
.weektrack i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font: 800 max(12px, var(--fmin)) var(--body);
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.18);
}
.weektrack i.last { border-color: rgba(255, 90, 74, 0.85); }
.weektrack i.done { background: #2d8a4a; border-color: #9dffb4; }
.weektrack i.now { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 10px rgba(255, 210, 63, 0.6); }

/* A big gift with light rays behind it, wiggling now and then until opened. */
.giftbig { position: relative; display: block; width: 170px; height: 132px; }
.giftbig .rays, .reveal .rays {
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 210, 63, 0.3) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent 100%);
  mask: radial-gradient(closest-side, #000 25%, transparent 100%);
  animation: raysspin 10s linear infinite;
  pointer-events: none;
}
@keyframes raysspin { to { rotate: 360deg; } }
.giftbig .gb { position: absolute; inset: 0; transform-origin: 50% 92%; animation: giftwiggle 2.2s 2.2s ease-in-out infinite; }
@keyframes giftwiggle {
  0%, 62%, 100% { rotate: 0deg; translate: 0 0; }
  66% { rotate: -7deg; translate: 0 -6px; }
  72% { rotate: 6deg; translate: 0 -8px; }
  78% { rotate: -4deg; translate: 0 -3px; }
  84% { rotate: 2deg; translate: 0 0; }
}
.giftbig .box {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 6px;
  height: 64px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent 42%, var(--gold) 42% 58%, transparent 58%), linear-gradient(var(--red-hi), var(--red-lo));
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4), inset 0 -8px 0 rgba(0, 0, 0, 0.18);
}
.giftbig .lid {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 68px;
  height: 24px;
  border-radius: 5px;
  background: linear-gradient(90deg, #ff4a52 42%, var(--gold) 42% 58%, #ff4a52 58%);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}
.giftbig .bow { position: absolute; left: 50%; bottom: 90px; width: 0; height: 0; }
.giftbig .bow::before, .giftbig .bow::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 32px;
  height: 22px;
  border: 6px solid var(--gold);
  border-radius: 50%;
}
.giftbig .bow::before { right: -3px; rotate: 22deg; }
.giftbig .bow::after { left: -3px; rotate: -22deg; }
/* Opening: a hard shake, the lid flies off and the rays flare. */
.rewardcard.opening .gb { animation: giftshake 0.42s linear; }
@keyframes giftshake {
  0%, 100% { rotate: 0deg; }
  15% { rotate: -9deg; }
  30% { rotate: 9deg; }
  45% { rotate: -11deg; }
  60% { rotate: 11deg; }
  75% { rotate: -6deg; }
  90% { rotate: 6deg; }
}
.rewardcard.opening .lid, .rewardcard.opening .bow { animation: lidoff 0.3s 0.18s ease-in forwards; }
@keyframes lidoff { to { translate: 24px -70px; rotate: 32deg; opacity: 0; } }
.rewardcard.opening .rays { animation: raysspin 10s linear infinite, raysflare 0.42s ease-in forwards; }
@keyframes raysflare { to { scale: 1.6; filter: brightness(1.7); } }
/* What it held pops out where the gift was. */
.reveal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.reveal .rays { inset: -20px -44px; }
.reveal > canvas, .reveal > .coinstack { position: relative; animation: revealpop 0.5s cubic-bezier(0.2, 1.8, 0.4, 1); }
.reveal b {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font: italic 900 30px var(--display);
  color: var(--gold);
  text-shadow: 0 3px 0 #000;
  animation: revealpop 0.5s 0.08s cubic-bezier(0.2, 1.8, 0.4, 1) backwards;
}
.reveal b .coin { width: 24px; height: 24px; }
.reveal em { position: relative; font: normal 800 max(15px, var(--fmin)) var(--body); color: #fff; }
@keyframes revealpop { from { scale: 0.2; opacity: 0; } to { scale: 1; opacity: 1; } }

.compact .rewardcard, .compact .nextcard { --rcw: 290px; }
.compact .rc-label { font-size: max(14px, var(--fmin)); }
.compact .rc-next { font-size: max(18px, var(--fmin)); }
.compact .rc-cd, .compact .rc-goal { font-size: max(16px, var(--fmin)); }
.compact .rc-all { font-size: max(15px, var(--fmin)); }
.compact .rc-cta { font-size: max(20px, var(--fmin)); }

/* The results screen's next-up card, mirroring the reward card on the left:
   what's new in the next few levels. Clicking it plays the next level. */
.nextcard {
  left: calc((50% - 300px - var(--rcw)) / 2);
  padding-bottom: 14px;
  border-color: rgba(127, 212, 255, 0.55);
  cursor: pointer;
  animation: ncin 0.55s 1.35s cubic-bezier(0.2, 1.3, 0.4, 1) backwards;
}
@keyframes ncin { from { opacity: 0; translate: -140px 0; rotate: -8deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
.nextcard:hover { filter: brightness(1.12); }
.nextcard.quiet { animation: none; }
.nextcard .rc-label { color: #7fd4ff; }
.nc-kind { font: italic 900 28px/1 var(--display); color: #fff; text-shadow: 0 3px 0 #000; }
.nextcard canvas.nextport { width: 200px; height: 182px; }
.nc-name { font: italic 900 max(22px, var(--fmin)) var(--display); color: #7fd4ff; text-shadow: 0 2px 0 #000; }
.nc-desc { font-size: max(13px, var(--fmin)); line-height: 1.3; opacity: 0.85; }
.nextcard canvas.ncscene { display: block; width: 210px; height: 118px; border-radius: 8px; border: 2px solid rgba(255, 255, 255, 0.18); }
.nextcard canvas.nctwist { width: 210px; height: 100px; }
.nextcard.nc-boss { border-color: rgba(255, 90, 74, 0.75); }
.nextcard.nc-boss .rc-label, .nextcard.nc-boss .nc-name { color: #ff8a7a; }
.nextcard.nc-setting, .nextcard.nc-twist { border-color: rgba(255, 210, 63, 0.5); }
.nextcard.nc-setting .rc-label, .nextcard.nc-setting .nc-name, .nextcard.nc-twist .rc-label, .nextcard.nc-twist .nc-name { color: var(--gold); }
/* "NEW ENEMY" / "BOSS" after the level name on the title's PLAY button. */
.playtag { margin-left: 8px; padding: 1px 7px; border-radius: 4px; background: #2c86c9; color: #fff; font: italic 900 max(12px, var(--fmin)) var(--display); vertical-align: 1px; }
.playtag.boss { background: var(--red-lo); }

.compact .nc-desc { font-size: max(16px, var(--fmin)); }
.compact .playtag { font-size: max(15px, var(--fmin)); }

/* ---------- v6: title declutter, badges, reward widget ---------- */
/* Top left: the reward widget, and the difficulty pill once the player has a win. */
.title .topleft {
  position: absolute;
  top: 14px;
  left: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.topleft .diffpick { position: static; padding: 2px; }
.topleft .diffpick .arrow { width: 28px; height: 28px; font-size: max(12px, var(--fmin)); }
.topleft .diffpick .dv { width: 120px; }
.topleft .diffpick small { font-size: max(9px, var(--fmin)); }
.topleft .diffpick b { font-size: max(16px, var(--fmin)); }
.topleft .diffpick span { display: none; }
.rewardwidget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 14px;
  border: 2px solid rgba(255, 210, 63, 0.55);
  background: rgba(10, 8, 12, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: var(--paper);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: scale 0.1s, filter 0.1s;
}
.rewardwidget:hover { filter: brightness(1.15); scale: 1.03; }
.rw-art {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 10px;
  background: radial-gradient(closest-side, rgba(255, 210, 63, 0.35), rgba(255, 210, 63, 0));
  animation: giftwiggle 3.2s 1s ease-in-out infinite;
}
.rw-art canvas.ricon { width: 64px; height: 64px; }
.rw-art .coinstack { position: absolute; left: -10px; top: -14px; scale: 0.76; }
.rw-text { display: flex; flex-direction: column; gap: 3px; }
.rw-text small { font: 800 max(11px, var(--fmin)) var(--body); letter-spacing: 2px; color: var(--gold); }
.rw-text b { font: italic 900 max(17px, var(--fmin)) var(--display); color: #fff; text-shadow: 0 2px 0 #000; white-space: nowrap; }
.rw-text .rw-cd { letter-spacing: 0; color: var(--paper); opacity: 0.75; }
.rw-text .weektrack { gap: 3px; margin: 1px 0; }
.rw-text .weektrack i { width: 18px; height: 18px; font-size: max(9px, var(--fmin)); border-width: 1.5px; }

/* Round icon buttons beside the coins: How to play and Settings. */
.iconbtn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: italic 900 max(22px, var(--fmin)) var(--display);
  cursor: pointer;
  transition: scale 0.1s, background 0.1s;
}
.iconbtn:hover { background: rgba(0, 0, 0, 0.75); scale: 1.08; }
.iconbtn svg { width: 26px; height: 26px; }

/* Six buttons along the bottom now. */
.title .bottomnav .btn { width: 190px; font-size: max(21px, var(--fmin)); padding: 11px 8px; }
.title .bottomnav .btn small { font-size: max(13px, var(--fmin)); }
/* "!" where something new can be had. */
.bottomnav .btn .badge {
  position: absolute;
  top: -11px;
  right: -7px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red-hi);
  border: 2px solid #fff;
  color: #fff;
  font: italic 900 max(15px, var(--fmin)) var(--display);
  transform: skewX(8deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  animation: badgepop 1.6s ease-in-out infinite;
}
@keyframes badgepop { 0%, 70%, 100% { scale: 1; } 80% { scale: 1.25; } 90% { scale: 0.95; } }

/* Pause: tomorrow's reward. */
.pausepanel .giftline { display: flex; align-items: center; justify-content: center; margin: 4px 0 0; font-size: max(15px, var(--fmin)); color: #ffe7a3; }
.pausepanel .giftline b { color: var(--gold); }
/* Results after two losses on a level: an easier retry. */
.results .actions > .btn.easier { align-self: center; font-size: max(17px, var(--fmin)); padding: 8px 18px; border-color: rgba(125, 255, 154, 0.5); color: #c9ffd6; }

.compact .title .bottomnav .btn { font-size: max(24px, var(--fmin)); }
.compact .title .bottomnav .btn small { font-size: max(16px, var(--fmin)); }
.compact .rw-text small { font-size: max(13px, var(--fmin)); }
.compact .rw-text b { font-size: max(19px, var(--fmin)); }
.compact .topleft .diffpick small { font-size: max(11px, var(--fmin)); }
.compact .topleft .diffpick b { font-size: max(19px, var(--fmin)); }
.compact .pausepanel .giftline { font-size: max(18px, var(--fmin)); }

/* ---------- v7: three new settings, the Samurai, what's new, the campaign's end ---------- */
/* Ten settings: the chapter tabs wrap onto two rows of five. */
.levels .tabs { flex-wrap: wrap; justify-content: center; width: 1240px; row-gap: 6px; margin-top: 12px; }
.levels .tab { width: 236px; padding: 6px 12px; }
.levels .tab small { margin-top: 2px; }
.levels .grid { margin-top: 16px; }
.compact .levels .tab { padding: 5px 10px; }
.playtag.setting { background: #b8742c; }
.hardmark.nm { color: #c77dff; text-shadow: 0 0 8px rgba(199, 125, 255, 0.8), 0 2px 0 #000; }

/* Seven styles: four cards a row, the last row centred. */
.styles .scards { display: flex; flex-wrap: wrap; justify-content: center; width: 1240px; gap: 10px 12px; }
.styles .scard { width: 296px; padding-left: 10px; padding-right: 10px; }
.styles .scard canvas { width: 268px; height: 82px; }
.styles .scard .perk { min-height: 46px; }

/* Thirteen survival arenas: shorter tiles so three rows fit. */
.arenas { gap: 12px 16px; margin-top: 18px; }
.arena { height: 128px; }
.phone .arena { height: auto; min-height: 128px; padding: 8px 12px; }
.phone .arena b { line-height: 1.08; }

/* What's new: shown once to returning players. */
.news .newspanel { width: min(1180px, calc(var(--uiw) - 24px)); padding: 18px 28px 20px; gap: 10px; }
.newspanel .kicker { font: 800 max(13px, var(--fmin)) var(--body); letter-spacing: 4px; color: var(--gold); margin-bottom: -10px; }
.newspanel h2 { font-size: 44px; text-shadow: 0 4px 0 #000, 0 0 30px rgba(255, 140, 40, 0.5); }
.newspanel .sub { margin: -6px 0 2px; font-weight: 700; }
.nsets { display: flex; gap: 16px; justify-content: center; }
.nset { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nset canvas {
  width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.18); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  animation: nspan 7s ease-in-out infinite alternate;
}
.nset:nth-child(2) canvas { animation-delay: -2.3s; }
.nset:nth-child(3) canvas { animation-delay: -4.6s; }
@keyframes nspan { from { filter: brightness(0.95); } to { filter: brightness(1.12) saturate(1.1); } }
.nset b { margin-top: 6px; font: italic 900 max(21px, var(--fmin)) var(--display); color: #fff; text-shadow: 0 2px 0 #000; }
.nset small { font-size: max(14px, var(--fmin)); opacity: 0.85; }
.nmore { display: flex; gap: 14px; align-items: stretch; justify-content: center; text-align: left; width: 100%; }
.nstyle {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 10px 6px; border-radius: 10px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 22%, transparent), rgba(255, 255, 255, 0.03));
  border: 2px solid color-mix(in srgb, var(--acc) 55%, transparent);
}
.nstyle canvas { width: 240px; height: 112px; flex: none; }
.nstyle span { display: flex; flex-direction: column; gap: 1px; }
.nprize {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 6px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); border: 2px solid rgba(255, 255, 255, 0.14);
}
.nprize span, .ngift span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nprize small, .ngift small { font: 800 max(11px, var(--fmin)) var(--body); letter-spacing: 3px; color: var(--gold); }
.nprize b, .ngift b { font: italic 900 max(21px, var(--fmin))/1.05 var(--display); color: #fff; text-shadow: 0 2px 0 #000; }
.nprize i, .ngift span:last-child i { font-style: normal; font-size: max(13px, var(--fmin)); opacity: 0.85; }
.nprizes { display: flex; gap: 2px; margin-left: auto; flex: none; }
.nprizes canvas.ricon { width: 60px; height: 60px; }
.ngift {
  flex: none; width: 300px; display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 10px; text-align: left; color: #fff;
  background: linear-gradient(90deg, rgba(255, 210, 63, 0.2), rgba(255, 210, 63, 0.05)); border: 2px solid var(--gold);
}
.ngift.ready { cursor: pointer; animation: rcglow 1.2s ease-in-out infinite alternate; }
.ngift.ready:hover { filter: brightness(1.12); }
.ngift .giftbig { flex: none; scale: 0.56; margin: -30px -37px; }
.ngift .reveal { position: relative; flex: none; width: 76px; height: 76px; }
.ngift .reveal .rays { inset: -8px; }
.ngift canvas.ricon { position: relative; width: 76px; height: 76px; }
.ngift .coinstack { position: relative; scale: 0.9; width: 76px; height: 76px; }
.ngift .rc-cta { padding: 2px 10px; font-size: max(16px, var(--fmin)); white-space: nowrap; }
.ngift.opening .gb { animation: giftshake 0.42s linear; }
.ngift.opening .lid, .ngift.opening .bow { animation: lidoff 0.3s 0.18s ease-in forwards; }
.ngift.opening .rays { animation: raysspin 10s linear infinite, raysflare 0.42s ease-in forwards; }
.nstyle small { font: 800 max(11px, var(--fmin)) var(--body); letter-spacing: 3px; color: var(--acc); }
.nstyle b { font: italic 900 max(24px, var(--fmin))/1.05 var(--display); color: #fff; text-shadow: 0 2px 0 #000; }
.nstyle em { font-style: normal; font-size: max(14px, var(--fmin)); font-weight: 700; color: var(--acc); }
.nstyle i { font-style: normal; font-size: max(13px, var(--fmin)); opacity: 0.8; }
.nlist { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; font-size: max(15px, var(--fmin)); width: 470px; }
.nlist b { color: var(--gold); }
.newspanel .msg { margin: 2px 0 0; font-size: max(16px, var(--fmin)); font-weight: 700; color: #ffe7a3; }
.newspanel .row { display: flex; gap: 12px; justify-content: center; }
.newspanel .row .btn { flex: none; min-width: 240px; }
.compact .nset small, .compact .nlist, .compact .nstyle em { font-size: max(17px, var(--fmin)); }
.compact .nstyle i { display: none; }
.compact .newspanel .msg { font-size: max(18px, var(--fmin)); }

/* The weeks of rewards on small frames: just the prizes, big enough to tap. */
.compact .wkchip { justify-content: center; padding: 3px; }
.compact .wkchip span { display: none; }
.compact .wkchip canvas.ricon, .compact .wkchip .wkinf { width: 52px; height: 52px; }
.touch .wkchip { min-height: max(58px, calc(44 * var(--u))); }
.compact .wkchip.done::after { top: 0; right: 3px; }

/* The campaign is beaten: the next challenge. */
.endgame { width: 780px; padding-top: 12px; }
.endgame canvas.egfig { align-self: center; width: 300px; height: 190px; margin: -6px 0 -14px; }
.endgame h2 { color: var(--gold); text-shadow: 0 4px 0 #000, 0 0 34px rgba(255, 210, 63, 0.55); }
.endgame .sub b { font-style: italic; }
.choices { display: flex; gap: 16px; justify-content: center; }
.choice {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 12px 12px;
  border-radius: 12px; cursor: pointer; color: #fff; text-align: center;
  border: 2px solid color-mix(in srgb, var(--dc) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--dc) 26%, #18131c), #120e15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 18px color-mix(in srgb, var(--dc) 25%, transparent);
  transition: scale 0.12s, filter 0.12s;
}
.choice:hover, .choice:focus-visible { scale: 1.04; filter: brightness(1.15); outline: none; }
.choice small { font: 800 max(11px, var(--fmin)) var(--body); letter-spacing: 3px; color: var(--dc); }
.choice b { font: italic 900 max(26px, var(--fmin)) var(--display); text-shadow: 0 3px 0 #000; }
.choice span { font-size: max(14px, var(--fmin)); opacity: 0.85; }
.choice em { font-style: normal; font-size: max(14px, var(--fmin)); font-weight: 700; color: var(--dc); }
.endgame .btn.ghost { align-self: center; min-width: 220px; }
.compact .choice span, .compact .choice em { font-size: max(17px, var(--fmin)); }

/* ---------- v8: readable at every size (Full Launch) ----------
   Text never drops below --fmin (11 screen px). Compact covers small iframes
   and tablets (the 1280x720 layout under 85%); .phone adds the wide phone
   layout, where the menus have more width to spread into. */
.levels .tab span { text-transform: uppercase; }
.agrid { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent; touch-action: pan-y; }

/* Title */
.compact .title .btn.big { width: 470px; }
.compact .title .btn.big small { white-space: normal; line-height: 1.2; }
.compact .title .btn.daily { width: 600px; }
.compact .title .btn.daily small { white-space: normal; line-height: 1.2; }
.compact .rw-text .weektrack { display: none; }
.compact .title .logo { margin-top: 84px; transform: skewX(-8deg) rotate(-2deg) scale(0.88); }
.compact .title .menu { margin-top: 8px; }
.compact .topleft .diffpick .dv { width: auto; min-width: 140px; padding: 0 4px; }
.compact .iconbtn { width: 60px; height: 60px; font-size: 30px; }
.compact .iconbtn svg { width: 32px; height: 32px; }
.compact .topleft .diffpick .arrow { width: 44px; height: 44px; }
.phone .iconbtn { width: 76px; height: 76px; }

/* Level select: the tag sits clear of the level number. */
.tile { padding-top: calc(var(--fmin) + 14px); }
.compact .tile { gap: 3px; }
.compact .tile .lock { margin-top: 0; }
.compact .levels .tab span { text-transform: none; }

/* Fighting styles: cards grow to fit their text; the tagline and the rare
   moves line give way on the smallest screens. */
.compact .styles .scard { height: auto; min-height: 250px; }
.compact .styles .scard canvas { height: 64px; }
.compact .styles h1 { font-size: 36px; margin-top: 6px; }
.phone .styles .scards { width: calc(100% - 40px); }
.phone .styles .scard { width: calc(25% - 9px); }
.phone .styles .scard .moves.rares { display: none; }
.phone .styles .bottom .tip { display: none; }

/* Locker: wider rows, so each category is one line of chips. */
.compact .lrows { width: 900px; gap: 6px; }
.compact .lpreview { width: 270px; }
.compact .lpreview canvas { width: 270px; height: 288px; }
.compact .chip { width: 104px; }
.compact .locker .bottom .tip { display: none; }
.phone .lrows { width: min(1140px, calc(var(--uiw) - 340px)); }
.phone .chip { width: 128px; }

/* Settings and How to play: tighter rows. */
.compact .panel.settings { gap: 6px; padding-top: 18px; padding-bottom: 20px; width: 640px; }
.compact .panel.settings h2 { font-size: 38px; }
.compact .help { width: 1100px; padding-top: 16px; padding-bottom: 18px; gap: 6px; }
.compact .help h2 { font-size: 36px; }
.compact .help h3 { margin-top: 4px; }
.compact .help p { line-height: 1.3; }
.compact .enemies li { margin: 2px 0; }

/* Awards: the list takes whatever height is left above BACK. */
.compact .awards .agrid { flex: 1 1 auto; min-height: 0; max-height: none; margin-bottom: 6px; }
.compact .awards .bottom { position: static; flex: none; padding: 0 0 14px; }
/* On phones the career totals open the list (UI.html_awards) and scroll with it. */
.phone .awards .agrid > .career { grid-column: 1 / -1; justify-content: center; margin: 0 0 4px; }
.phone .awards .agrid > .career div { flex: 1 1 auto; min-width: 0; padding-left: 6px; padding-right: 6px; }
.phone .awards .agrid > .career span { letter-spacing: 1px; white-space: nowrap; }

/* What's new */
.compact .newspanel .kicker { margin-bottom: 0; }
.compact .news .newspanel { padding-top: 10px; padding-bottom: 12px; gap: 6px; }
.compact .newspanel h2 { font-size: 36px; }

/* Touch screens: small controls get a finger-sized hit area. */
.touch .diffpick .arrow { width: 46px; height: 46px; }
.touch .btn.small { padding: 12px 18px; }
.touch .card .buy { padding-top: 14px; padding-bottom: 14px; }
.touch .toggle { padding: 11px 16px; }
.touch .rc-all { padding: 10px 14px; }
.touch .results .actions > .btn.easier { padding: 12px 18px; }

/* Phones: buttons tall enough to hit with a thumb. */
.phone .btn { padding-top: 15px; padding-bottom: 15px; }
.phone .btn.small { padding: 13px 20px; }
.phone .toggle { padding: 12px 16px; }
.phone .tab { padding-top: 10px; padding-bottom: 10px; }
.phone .diffpick .arrow { width: 56px; height: 56px; }
.phone .rc-all { padding: 12px 16px; }
.phone .topleft .diffpick .arrow { width: 62px; height: 62px; }
.phone .btn.small, .phone .card .buy { padding-top: 18px; padding-bottom: 18px; }
.phone .toggle { padding-top: 16px; padding-bottom: 16px; }
.phone .rc-all { padding: 16px 18px; }
.phone .results .actions > .btn.easier { padding: 16px 20px; }
/* Results on phones: a shorter panel, so a busy one still fits. */
.phone .results { gap: 6px; padding-top: 14px; padding-bottom: 16px; }
.phone .results .head { font-size: 52px; }
.phone .results .stars.big .star { width: 54px; height: 54px; }
.phone .stats { margin: 2px 0; }
.phone .stats div { padding-top: 3px; padding-bottom: 3px; }
.phone .rank { top: 8px; }
.phone .rank b { font-size: 64px; }
/* Boss tiles: the crown moves up beside the skull, clear of a long name. */
.compact .crownmark { top: 6px; bottom: auto; left: 34px; }

/* ---------- v9: ads (Full Launch) ---------- */
/* While an ad is requested: a clear layer takes every click; a spinner
   shows only if the wait goes on (most requests answer at once). */
.adwait { position: absolute; inset: 0; z-index: 60; cursor: progress; }
.adwait i {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; border: 5px solid rgba(255, 255, 255, 0.2); border-top-color: var(--gold);
  opacity: 0; animation: adspin 0.8s linear infinite, adwaitin 0.2s 0.4s forwards;
}
@keyframes adspin { to { rotate: 360deg; } }
@keyframes adwaitin { to { opacity: 1; } }

/* An offer and the choice to skip it sit side by side at the same size. */
.row.offers { display: flex; gap: 14px; justify-content: center; }
.row.offers > .btn { flex: 1 1 0; min-width: 0; white-space: normal; }

/* CONTINUE? after a defeat. */
.continue { width: 640px; gap: 10px; }
.continue h2 { font-size: 54px; color: #fff; }
.cbar { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin: 0 40px; }
.cbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-lo), var(--red-hi)); }
.cring { position: relative; align-self: center; width: 96px; height: 96px; --left: 1; }
.cring svg { width: 100%; height: 100%; rotate: -90deg; }
.cring circle { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 8; }
.cring circle.left { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 276.5; stroke-dashoffset: calc(276.5 * (1 - var(--left))); }
.cring b { position: absolute; inset: 0; display: grid; place-items: center; font: italic 900 40px var(--display); color: #fff; }
/* The two ways to revive, and NO THANKS under them: one grid, so all three are
   the same width and height whatever wraps. */
.continue .offers.revive { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 12px 14px; }
.continue .offers.revive > .btn { min-width: 0; white-space: normal; font-size: 30px; padding-top: 14px; padding-bottom: 12px; }
.continue .offers.revive > .btn .coin { width: 0.72em; height: 0.72em; margin-right: 0.3em; vertical-align: -0.06em; }
.continue .offers.revive small span { white-space: nowrap; }
.continue .offers.revive > [data-act=noRevive] { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }

/* Rewarded buttons say what they give, with the play triangle. */
.btn.ad small { color: var(--gold); }
.freecoins {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 12px; border-radius: 30px;
  border: 2px solid rgba(255, 210, 63, 0.6); background: rgba(40, 30, 8, 0.8); color: #fff; cursor: pointer;
  font: italic 900 max(18px, var(--fmin)) var(--display); transition: scale 0.1s, filter 0.1s;
}
.freecoins:hover { filter: brightness(1.15); scale: 1.04; }
.freecoins .adi { display: inline-block; width: 0; height: 0; border-left: 12px solid var(--gold); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.freecoins .coin { width: 18px; height: 18px; }
/* With an ad blocker: the reason there are no free coins, not a button. */
.freecoins.off { cursor: default; border-style: dashed; border-color: rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.55); color: #d9d2dc; font: normal 600 max(14px, var(--fmin)) var(--body); }
.freecoins.off:hover { filter: none; scale: 1; }
.touch .freecoins { padding: 12px 18px 12px 16px; }
.phone .freecoins { padding: 18px 22px 18px 20px; }

/* A few coins short: the offer panel over the shop. */
.offer { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(6, 4, 8, 0.66); animation: fadein 0.15s; }
.offerpanel { width: 600px; }
.offerpanel h3 { font-size: max(30px, var(--fmin)); color: var(--gold); }
.offerpanel p { margin: 0 0 6px; font-size: max(17px, var(--fmin)); }

/* Fighting styles: a style not owned yet can be tried for one fight. */
.scard .sbtns { margin-top: auto; display: flex; gap: 8px; justify-content: center; }
.scard .sbtns .btn { margin-top: 0; min-width: 0; }
.scard .sbtns .btn.small:first-child:last-child { min-width: 170px; }

/* Daily challenge: a broken streak can be won back. */
.streakline { margin: 0; font-size: max(15px, var(--fmin)); color: #ffe7a3; }
.streakline b { color: var(--gold); }
/* Survival results: the CrazyGames weekly leaderboard (and LOG IN for a guest). */
.weekline { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 0.9em; row-gap: 4px; margin: 0; font-size: max(15px, var(--fmin)); color: #a8dcff; }
.weekline b { color: #fff; }
.weekline .btn.small { padding: 4px 12px; margin-right: 0.3em; font-size: max(15px, var(--fmin)); vertical-align: middle; }
.touch .weekline .btn.small { padding: 13px 18px; }
.panel.login .claimrow { align-self: stretch; }
.panel.login .claimrow > .btn { flex: 1 1 0; min-width: 0; font-size: 30px; }
/* Phones: the styles grid starts under the coin bar and ends above BACK. */
.phone .styles h1 { font-size: 32px; margin-top: 4px; }
.phone .styles .scards { margin-top: 20px; }
.phone .styles .scard canvas { height: 52px; }
/* A very short screen (a phone with its browser bars showing): a panel
   taller than the screen scrolls rather than being cut off at both ends. */
.panelscreen { overflow-y: auto; touch-action: pan-y; scrollbar-width: none; }
.panelscreen > .panel { margin: auto 0; flex: none; }

/* ---------- v10: review fixes (text 12-13 px on small screens, touch targets, safe area) ---------- */
/* Keep clear of the home indicator in the CrazyGames app (--safeb, layout px). */
.title .bottomnav { bottom: calc(16px + var(--safeb, 0px)); }
.bottom { bottom: calc(26px + var(--safeb, 0px)); }
.styles .bottom { bottom: calc(14px + var(--safeb, 0px)); }
.compact .awards .bottom { padding-bottom: calc(14px + var(--safeb, 0px)); }
.toast { bottom: calc(40px + var(--safeb, 0px)); }
.hud-btn.super { top: calc(644px - var(--safeb, 0px)); }
.phone .hud-btn.super { top: calc(634px - var(--safeb, 0px)); }

/* Keyboard and mouse details are left out on touch screens. */
.touch .kbonly, .touch .settings .mouseonly { display: none; }
.phone .nc-desc { display: none; }

/* Phones: labels a size up and buttons a thumb tall (about 44 px). */
.phone .btn:not(.small) { font-size: 32px; }
.phone .btn, .phone .toggle { min-height: 84px; }
.phone .btn.small, .phone .card .buy { min-height: 76px; }
.phone .tab { min-height: 70px; }
.phone .rc-all { min-height: 70px; }
.phone .iconbtn, .phone .topleft .diffpick .arrow { width: 84px; height: 84px; }
.touch .settings input[type="range"] { height: 56px; }
.touch .settings input[type="range"]::-moz-range-thumb { width: 40px; height: 40px; }
.touch .settings input[type="range"]::-webkit-slider-thumb { width: 40px; height: 40px; }

/* Dojo on a small screen: BACK goes into the empty slot after the last card. */
.compact .dojo .bottom { justify-content: flex-end; }
/* Styles on phones: the cards start below the coin bar. */
.phone .styles .scards { margin-top: 44px; }

/* Accent text on the dark style cards, lightened to read. */
.scard .perk, .scard .moves b { color: color-mix(in srgb, var(--acc) 65%, #fff); }
.scard .moves { opacity: 1; }
.scard .moves.rares i { opacity: 0.75; }

/* Labels that mustn't break with one word left over. */
.offerpanel .row.offers > .btn, .results .row.offers > .btn { white-space: nowrap; }

/* A wait for a rewarded ad can be given up. */
.adcancel {
  position: absolute; left: 50%; top: calc(50% + 40px); translate: -50% 0; padding: 10px 22px; border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.4); background: rgba(0, 0, 0, 0.7); color: #fff; font: 800 16px var(--body); cursor: pointer;
}

/* Styles on phones: one row of cards to swipe through, each tall enough for
   all its text. */
.phone .styles .scards {
  flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overflow-y: hidden; width: 100%;
  padding: 4px 24px 10px; scroll-snap-type: x mandatory; touch-action: pan-x; scrollbar-width: none;
}
.phone .styles .scard { flex: 0 0 auto; width: 380px; scroll-snap-align: center; }
.phone .styles .scard canvas { width: 352px; height: 96px; }
.phone .styles .scard .moves.rares { display: block; }
.phone .styles .scard .sbtns { flex-direction: column; align-items: stretch; }
.compact .styles .bottom .tip { display: none; }
/* Tablets: finger-sized difficulty arrows and links. */
.touch .topleft .diffpick .arrow { width: 52px; height: 52px; }
.phone .topleft .diffpick .arrow { width: 84px; height: 84px; }
.touch .rc-all { min-height: 48px; }
/* The rank badge stands in the panel's top right: the headline and line
   under it keep clear of it. */
.results .rank ~ .head, .results .rank ~ .sub { padding-left: 100px; padding-right: 100px; }
.phone .offerpanel { width: 820px; }
/* Phones, after the larger text floor. */
.tile { padding-top: calc(var(--fmin) * 1.4 + 14px); }
.phone .freecoins { padding: 22px 24px 22px 22px; }
.phone .rewardcard .rc-all { min-height: 72px; }
.phone .rewardcard .weektrack { display: none; }
.phone .rday { padding-bottom: calc(var(--fmin) * 0.9 + 8px); }
/* Locker: the item rows scroll when they don't all fit. */
.phone .lrows { max-height: calc(var(--uih, 720px) - 190px - var(--safeb, 0px)); overflow-y: auto; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent; padding-right: 6px; }
/* Level select on phones: a shorter title, and tiles as wide as the screen
   allows, with a long level name cut short rather than wrapped. */
.phone .levels h1 { font-size: 40px; margin-top: 12px; }
.phone .levels .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); width: min(1364px, calc(var(--uiw) - 80px)); }
.phone .tile .nm { max-width: 100%; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A panel that fits is centred by its auto margins; one that doesn't starts
   at the top and scrolls (centring would push its top out of reach). */
.panelscreen { justify-content: flex-start; }

/* Results: the panel (--rpw wide) sits between the next-up and reward
   cards. Phones widen it into whatever room the cards leave, so its lines
   don't wrap, and drop the stars hint. */
.screen { --rpw: 600px; }
.results { width: var(--rpw); }
.rewardcard { left: calc(50% + var(--rpw) / 2 + (50% - var(--rpw) / 2 - var(--rcw)) / 2); }
.nextcard { left: calc((50% - var(--rpw) / 2 - var(--rcw)) / 2); }
.phone .screen { --rpw: clamp(600px, calc(var(--uiw) - 660px), 780px); }
.phone .results .hint { display: none; }
.phone .results .head { font-size: 46px; }
.phone .results .stars.big .star { width: 46px; height: 46px; }
.phone .results .earn .btn.small { min-height: 72px; padding-top: 10px; padding-bottom: 10px; }

/* Level tiles on phones: the number a little smaller so name and stars fit. */
.phone .tile { padding-top: 40px; gap: 0; }
.phone .tile .num { font-size: 42px; }
.phone .tile .stars .star { width: 18px; height: 18px; }

/* Settings on phones: two columns of options. */
.phone .panel.settings { width: min(1180px, calc(var(--uiw) - 40px)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px 48px; }
.phone .panel.settings > h2, .phone .panel.settings > .btn, .phone .panel.settings > .note { grid-column: 1 / -1; }
.phone .panel.settings > .btn { justify-self: center; min-width: 420px; }

/* How to play on phones: as wide as the screen, enemies in two columns. */
.phone .help { width: min(1440px, calc(var(--uiw) - 40px)); }
.phone .help .cols { grid-template-columns: 1fr 1.25fr; gap: 36px; }
.phone .enemies { column-count: 2; column-gap: 28px; }
.phone .enemies li { break-inside: avoid; }

/* Pause on phones: RESUME across the top, then the rest side by side. */
.phone .pausepanel { width: 760px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding-top: 18px; padding-bottom: 18px; }
.phone .pausepanel > h2, .phone .pausepanel > .sub, .phone .pausepanel > .pstats, .phone .pausepanel > .giftline,
.phone .pausepanel > [data-act="resume"], .phone .pausepanel > [data-act="quit"] { grid-column: 1 / -1; }
/* Dojo on phones: two wide columns, each upgrade on fewer lines. */
.phone .dojo .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(1400px, calc(var(--uiw) - 60px)); }
/* Daily rewards on phones: everything on one screen, CLAIM always in view. */
.phone .panel.login { padding: calc(6 * var(--u)) calc(10 * var(--u)) calc(8 * var(--u)); gap: calc(5 * var(--u)); }
.phone .lhead { flex-direction: row; align-items: baseline; justify-content: center; gap: calc(10 * var(--u)); }
.phone .login h2 { font-size: calc(19 * var(--u)); }
.phone .weeks { gap: calc(4 * var(--u)); }
.phone .wkchip { min-height: calc(40 * var(--u)); padding: calc(2 * var(--u)); }
.phone .wkchip canvas.ricon, .phone .wkchip .wkinf { width: calc(34 * var(--u)); height: calc(34 * var(--u)); }
.phone .wkchip .wkinf { font-size: calc(22 * var(--u)); }
.phone .week { margin: 0; gap: calc(4 * var(--u)); }
.phone .rday { padding-top: calc(4 * var(--u)); gap: calc(2 * var(--u)); }
.phone .rday canvas.ricon, .phone .rday .coinstack { width: calc(32 * var(--u)); height: calc(32 * var(--u)); }
.phone .rday .coinstack { scale: 0.75; transform-origin: 50% 40%; }
.phone .rday small { min-height: 0; line-height: 1.15; }
.phone .login .msg { margin: calc(6 * var(--u)) 0 0; }
.phone .login .msg:has(+ .claimrow) { display: none; }
.phone .panel.login .claimrow > .btn { min-height: calc(44 * var(--u)); padding-top: 0; padding-bottom: 0; }
.phone .login > .btn, .phone .login .btn.primary { min-height: calc(44 * var(--u)); padding-top: 0; padding-bottom: 0; font-size: calc(19 * var(--u)); }
.phone .login .btn small { font-size: calc(13 * var(--u)); }
/* What's new and the campaign's end on phones: the extras give way, and the
   way into a fight stays on screen. */
.phone .newspanel .kicker, .phone .newspanel .sub, .phone .newspanel .msg, .phone .nlist, .phone .nset small, .phone .nstyle i, .phone .nprize i { display: none; }
.phone .news .newspanel { padding: calc(4 * var(--u)) calc(10 * var(--u)) calc(6 * var(--u)); gap: calc(4 * var(--u)); }
.phone .newspanel h2 { font-size: calc(19 * var(--u)); }
.phone .nsets, .phone .nmore { gap: calc(6 * var(--u)); }
.phone .nset b { margin-top: calc(1 * var(--u)); font-size: calc(13 * var(--u)); }
.phone .nstyle { padding: calc(2 * var(--u)) calc(6 * var(--u)); }
.phone .nstyle canvas { width: calc(120 * var(--u)); height: calc(46 * var(--u)); }
.phone .nstyle b { font-size: calc(14 * var(--u)); }
.phone .nstyle small { letter-spacing: 1px; }
.phone .nstyle em { font-size: calc(13 * var(--u)); line-height: 1.12; }
.phone .nprize { padding: calc(2 * var(--u)) calc(6 * var(--u)); gap: calc(6 * var(--u)); }
.phone .nprize b, .phone .ngift b { font-size: calc(14 * var(--u)); }
.phone .nprize small, .phone .ngift small { letter-spacing: 1px; }
.phone .nprizes canvas.ricon { width: calc(30 * var(--u)); height: calc(30 * var(--u)); }
.phone .ngift { width: calc(186 * var(--u)); min-height: calc(44 * var(--u)); padding: calc(2 * var(--u)) calc(6 * var(--u)) calc(2 * var(--u)) calc(2 * var(--u)); gap: calc(4 * var(--u)); }
.phone .ngift .giftbig { scale: 0.32; margin: -45px -58px; }
.phone .ngift .reveal, .phone .ngift canvas.ricon, .phone .ngift .coinstack { width: calc(38 * var(--u)); height: calc(38 * var(--u)); }
.phone .newspanel .row .btn { min-height: calc(44 * var(--u)); min-width: 0; flex: 1 1 0; padding-top: 0; padding-bottom: 0; font-size: calc(18 * var(--u)); }
.phone .newspanel .row { align-self: stretch; }
.phone .newspanel .row .btn small { font-size: calc(13 * var(--u)); }
.phone .newspanel .row:has(> :nth-child(3)) .btn { padding-left: calc(6 * var(--u)); padding-right: calc(6 * var(--u)); font-size: calc(14 * var(--u)); }
.phone .endgame canvas.egfig { height: 120px; margin: -4px 0 -8px; }
.phone .endgame h2 { font-size: 40px; }
.phone .choice span { display: none; }
/* The busiest results (a new style and achievements at once) on the smallest phones. */
.phone .results.tall { gap: 3px; padding-top: 10px; padding-bottom: 12px; }
.phone .results.tall .head { font-size: 40px; }
.phone .results.tall .stars.big .star { width: 38px; height: 38px; }

/* Title: the PLAY and daily challenge lines wrap rather than run past their
   buttons (a long level name, a daily with a streak to keep). */
.title .btn.big small, .title .btn.daily small { white-space: normal; line-height: 1.25; }
.title .btn.daily { width: 460px; }
.compact .iconbtn svg { width: 34px; height: 34px; }
.playtag { white-space: nowrap; }

/* ---------- short frames (Safari's bars showing) and scrolling ---------- */
/* Phones: a screen with a bar along the bottom keeps the bar's height clear
   (--barh, measured by UI.fitScreen), so its content area ends above the bar
   and scrolls when it doesn't fit. Larger screens keep content beside BACK. */
.phone .screen { padding-bottom: var(--barh, 0px); }
.phone .screen > .scroll { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 8px 14px 10px; }
/* The Locker's list is long enough to reach the bottom bar at any size. */
.screen.locker { padding-bottom: var(--barh, 0px); }
.locker .lwrap { flex: 0 1 auto; min-height: 0; }
.locker .lrows { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
/* The game draws its own scrollbars, which stay in view (UI.scrollbars). */
#ui * { scrollbar-width: none; }
/* A mouse dragging a scrolling area (UI.dragScroll). */
#ui.dragging, #ui.dragging * { cursor: grabbing; }
#ui *::-webkit-scrollbar { display: none; }
.sbar { position: absolute; z-index: 40; pointer-events: auto; border-radius: 99px; background: rgba(255, 255, 255, 0.16); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); cursor: pointer; }
.sbar.v { width: max(6px, calc(var(--fmin) * 0.5)); }
.sbar.h { height: max(6px, calc(var(--fmin) * 0.5)); }
.sbar i { position: absolute; border-radius: inherit; background: rgba(255, 255, 255, 0.7); }
.sbar.v i { left: 0; right: 0; }
.sbar.h i { top: 0; bottom: 0; }
.sbar:hover i, .sbar.drag i { background: var(--gold); }
/* A short frame: the logo starts near the top and shrinks to fit (UI.fitLogo). */
.short .title .logo { margin-top: 18px; }
.short .title .menu { margin-top: 12px; }
/* Style cards: the SUPER line no longer tucks up under a perk that wraps. */
.phone .styles .scard .moves, .phone .styles .scard .moves.rares { margin-top: 2px; }
/* Short frames: style cards drop the rare moves and show a smaller fighter,
   and keep every line at full height (the row scrolls down if it must). */
.short.phone .styles .scard canvas { height: 56px; }
.short.phone .styles .scard .moves.rares { display: none; }
.phone .styles .scard > * { flex-shrink: 0; }
.short.phone .styles .scards { overflow-y: auto; touch-action: pan-x pan-y; }
/* Scrolling areas leave room for their scrollbar. */
.phone .screen > .scroll { padding-right: calc(var(--fmin) * 0.5 + 12px); }
.phone .styles .scards { padding-bottom: calc(var(--fmin) * 0.5 + 12px); }
/* A 16:10 frame (a narrower layout, down to 1152 wide): rows and grids made
   for 1280 shrink to the layout's width instead of running off its sides. */
.levels .tabs { width: min(1240px, calc(var(--uiw) - 24px)); }
.levels .tab { width: calc((min(1240px, calc(var(--uiw) - 24px)) - 48px) / 5); }
.styles .scards { width: min(1240px, calc(var(--uiw) - 24px)); }
.styles .scard { width: calc((min(1240px, calc(var(--uiw) - 24px)) - 36px) / 4); }
.styles .scard canvas { max-width: 100%; }
.grid { grid-template-columns: repeat(5, minmax(0, 210px)); max-width: calc(var(--uiw) - 16px); }
.cards, .agrid { grid-template-columns: repeat(2, minmax(0, 560px)); max-width: calc(var(--uiw) - 16px); }
.arenas { grid-template-columns: repeat(5, minmax(0, 232px)); max-width: calc(var(--uiw) - 16px); }
/* The pause button stays a thumb wide on short phone frames; the score on
   the HUD canvas moves over to match (hud.js pauseSize). */
.phone .hud-btn.pause { width: max(84px, calc(var(--fmin) * 3.1)); height: max(84px, calc(var(--fmin) * 3.1)); }
.phone .hud-btn.pause i { width: max(11px, calc(var(--fmin) * 0.4)); height: max(34px, calc(var(--fmin) * 1.25)); }
/* Shown while a fight runs without keyboard focus (Safari's frame gets it on
   the first click), under the kill counter. */
.focushint {
  display: none; position: absolute; left: 50%; top: 96px; translate: -50% 0; padding: 8px 18px; border-radius: 22px;
  background: rgba(0, 0, 0, 0.62); border: 2px solid rgba(255, 210, 63, 0.55); color: #fff;
  font: 700 max(16px, var(--fmin)) var(--body); white-space: nowrap; pointer-events: none;
}
#ui.ui-hud.nofocus .focushint { display: block; }

/* ---------- the lobby layout ----------
   The title, level select, results and styles have layouts of their own
   (UI.phoneTitle, phoneLevels, phoneResults, phoneStyles), made for phones
   first and sized in --u (App.fitUi). On phones --u is one screen pixel in
   the menus' layout pixels, so calc(44 * var(--u)) is a thumb-sized 44 px on
   any phone; on bigger screens it scales with the frame. body.lobby is set
   on every screen (?lobby=0 shows the older desktop menus off phones). */
.lobby .pb .pb-chip {
  position: absolute; display: flex; align-items: center; gap: calc(8 * var(--u));
  height: calc(44 * var(--u)); box-sizing: border-box; padding: 0 calc(14 * var(--u)) 0 calc(4 * var(--u));
  border-radius: calc(22 * var(--u)); border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 6, 10, 0.88); color: var(--paper); font: inherit; text-align: left; cursor: pointer;
  transition: scale 0.08s, filter 0.1s;
}
.lobby .pb button.pb-chip:active { scale: 0.96; }
.lobby .pb .pb-chip b { display: block; font: italic 900 calc(14 * var(--u))/1 var(--display); color: #fff; white-space: nowrap; }
.lobby .pb .pb-chip small { display: block; margin-top: calc(4 * var(--u)); font: 700 calc(13 * var(--u))/1 var(--body); white-space: nowrap; }
.lobby .pb .pb-ic {
  width: calc(44 * var(--u)); height: calc(44 * var(--u)); flex: none; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.18); background: rgba(8, 6, 10, 0.88);
  color: var(--paper); cursor: pointer; transition: scale 0.08s, opacity 0.2s;
}
.lobby .pb .pb-ic:active:not(:disabled) { scale: 0.9; }
.lobby .pb .pb-ic:disabled { opacity: 0.35; cursor: default; }
.lobby .pb .pb-ic svg { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
/* Paging arrows, halfway down what they page through: the styles sheet's
   cards, the level map's settings. */
.lobby .pb .pb-arrow {
  position: absolute; width: calc(44 * var(--u)); height: calc(64 * var(--u));
  padding: 0; display: grid; place-items: center; border-radius: calc(12 * var(--u)); border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 6, 10, 0.92); box-shadow: 0 calc(4 * var(--u)) calc(12 * var(--u)) rgba(0, 0, 0, 0.5); color: #fff; cursor: pointer;
  transition: scale 0.08s, opacity 0.2s;
}
.lobby .pb .pb-arrow svg { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.lobby .pb .pb-arrow.prev { left: calc(8 * var(--u)); }
.lobby .pb .pb-arrow.next { right: calc(8 * var(--u)); }
.lobby .pb .pb-arrow:active:not(:disabled) { scale: 0.9; }
.lobby .pb .pb-arrow:disabled { opacity: 0.3; cursor: default; }
/* With a mouse, what can be pressed lights up under the pointer. */
@media (hover: hover) {
  .lobby .pb button.pb-chip:hover, .lobby .pb .pb-tile:hover, .lobby .pb .pb-mode:not(:disabled):hover,
  .lobby .pb .pb-ic:not(:disabled):hover, .lobby .pb .pb-arrow:not(:disabled):hover { filter: brightness(1.3); border-color: rgba(255, 255, 255, 0.42); }
  .lobby .pb-lv .pb-node:hover .pb-dot { scale: 1.08; }
}
.lobby .pb .topbar { top: calc(10 * var(--u)); right: calc(12 * var(--u)); height: calc(44 * var(--u)); gap: calc(6 * var(--u)); }
.lobby .pb .coins {
  height: calc(32 * var(--u)); box-sizing: border-box; gap: calc(6 * var(--u)); padding: 0 calc(12 * var(--u)) 0 calc(8 * var(--u));
  border-radius: calc(16 * var(--u)); border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.12); background: rgba(8, 6, 10, 0.88);
  font-size: calc(14 * var(--u)); text-shadow: none;
}
.lobby .pb .coins .coin { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.lobby .pb .btn { min-height: 0; padding: 0 calc(12 * var(--u)); border-width: calc(2 * var(--u)); font-size: calc(16 * var(--u)); box-shadow: 0 calc(3 * var(--u)) 0 #000; }
.lobby .pb .btn small { margin-top: calc(3 * var(--u)); font-size: calc(13 * var(--u)); }
.lobby .pb .btn .coin { width: calc(15 * var(--u)); height: calc(15 * var(--u)); margin-right: calc(5 * var(--u)); }
.lobby .pb .btn .adi { margin-right: calc(5 * var(--u)); }

/* Title: the fighter keeps the middle. */
.lobby .pb-home .logo { position: absolute; left: 0; right: 0; top: calc(9 * var(--u)); margin: 0; transform: skewX(-8deg) rotate(-2deg); pointer-events: none; filter: drop-shadow(0 calc(3 * var(--u)) calc(5 * var(--u)) rgba(0, 0, 0, 0.5)); }
.lobby .pb-home .logo-top { font-size: calc(19 * var(--u)); letter-spacing: calc(1 * var(--u)); -webkit-text-stroke: calc(3 * var(--u)) #111; }
.lobby .pb-home .logo-bot { margin-top: calc(-2 * var(--u)); padding: calc(3 * var(--u)) calc(14 * var(--u)) calc(5 * var(--u)); }
.lobby .pb-home .logo-bot .brush { inset: calc(-2 * var(--u)) calc(-8 * var(--u)) calc(-3 * var(--u)); width: calc(100% + 16 * var(--u)); height: calc(100% + 5 * var(--u)); }
.lobby .pb-home .logo-bot span { font-size: calc(22 * var(--u)); letter-spacing: calc(1 * var(--u)); -webkit-text-stroke: calc(2.5 * var(--u)) #111; }
.lobby .pb-home .pb-prof { left: calc(12 * var(--u)); top: calc(10 * var(--u)); }
.lobby .pb-home .pb-prof canvas.ricon { width: calc(36 * var(--u)); height: calc(36 * var(--u)); flex: none; border-radius: 50%; background: var(--paper); }
.lobby .pb-home .pb-prof small { color: var(--dc, var(--gold)); }
.lobby .pb-home .pb-prof.bump small { animation: dbump 0.32s cubic-bezier(0.2, 1.6, 0.4, 1); }
.lobby .pb-home .pb-gift { left: calc(12 * var(--u)); top: calc(62 * var(--u)); padding-left: calc(10 * var(--u)); border-radius: calc(10 * var(--u)); border-color: rgba(255, 210, 63, 0.35); }
.lobby .pb-home .pb-gift > svg { width: calc(20 * var(--u)); height: calc(20 * var(--u)); flex: none; color: var(--gold); }
.lobby .pb-home .pb-gift b { font: 800 calc(13 * var(--u))/1 var(--body); color: var(--gold); }
.lobby .pb-home .pb-gift small { font-weight: 600; }
.lobby .pb-home .pb-nav {
  position: absolute; left: calc(12 * var(--u)); bottom: calc(12 * var(--u) + var(--safeb, 0px)); width: calc(140 * var(--u));
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(6 * var(--u));
}
.lobby .pb .pb-tile {
  position: relative; height: calc(64 * var(--u)); padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(6 * var(--u)); border-radius: calc(12 * var(--u)); border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 6, 10, 0.88); color: var(--paper); font: 800 calc(13 * var(--u))/1 var(--body); cursor: pointer;
  transition: scale 0.08s, filter 0.1s;
}
.lobby .pb .pb-tile:active { scale: 0.93; }
.lobby .pb .pb-tile svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
.lobby .pb .pb-tile .badge {
  position: absolute; top: calc(-6 * var(--u)); right: calc(-4 * var(--u)); width: calc(18 * var(--u)); height: calc(18 * var(--u));
  display: grid; place-items: center; border-radius: 50%; border: calc(1.5 * var(--u)) solid #fff; background: var(--red-hi);
  color: #fff; font: italic 900 calc(13 * var(--u))/1 var(--display); animation: rise 0.42s 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) backwards;
}
.lobby .pb-home .pb-go {
  position: absolute; right: calc(12 * var(--u)); bottom: calc(12 * var(--u) + var(--safeb, 0px)); width: calc(212 * var(--u));
  display: flex; flex-direction: column; gap: calc(8 * var(--u));
}
.lobby .pb-home .pb-modes { display: flex; gap: calc(8 * var(--u)); }
.lobby .pb .pb-mode {
  flex: 1; min-width: 0; height: calc(60 * var(--u)); padding: 0 calc(6 * var(--u)); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: calc(5 * var(--u)); border-radius: calc(12 * var(--u));
  border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.16); background: rgba(8, 6, 10, 0.9); color: var(--paper);
  font: inherit; text-align: center; cursor: pointer; transition: scale 0.08s, filter 0.1s;
}
.lobby .pb .pb-mode:active:not(:disabled) { scale: 0.94; }
.lobby .pb .pb-mode:disabled { opacity: 0.6; cursor: default; }
.lobby .pb .pb-mode b { display: flex; align-items: center; gap: calc(5 * var(--u)); font: italic 900 calc(13 * var(--u))/1 var(--display); color: #fff; }
.lobby .pb .pb-mode b svg { width: calc(14 * var(--u)); height: calc(14 * var(--u)); }
.lobby .pb .pb-mode small { font: 700 calc(13 * var(--u))/1.15 var(--body); color: #cfc7ba; }
.lobby .pb .pb-daily { border-color: rgba(255, 210, 63, 0.55); background: rgba(42, 30, 8, 0.93); }
.lobby .pb .pb-daily b, .lobby .pb .pb-daily small { color: var(--gold); }
.lobby .pb .pb-daily.done { border-color: rgba(125, 255, 154, 0.5); background: rgba(18, 40, 24, 0.93); }
.lobby .pb .pb-daily.done b, .lobby .pb .pb-daily.done small { color: #9dffb4; }
.lobby .pb-home .pb-play {
  width: 100%; height: calc(68 * var(--u)); padding: 0 calc(10 * var(--u)); display: flex; flex-direction: column; align-items: center;
  justify-content: center; font-size: calc(28 * var(--u)); line-height: 1; letter-spacing: calc(1 * var(--u)); white-space: normal;
  animation: rise 0.45s 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) backwards, pulse 1.6s 1s ease-in-out infinite;
}
.lobby .pb-home .pb-play small { margin-top: calc(5 * var(--u)); line-height: 1.15; }
.lobby .pb-home .pb-play .playtag {
  position: absolute; top: calc(-11 * var(--u)); right: calc(10 * var(--u)); margin: 0; padding: calc(3 * var(--u)) calc(7 * var(--u));
  font-size: calc(13 * var(--u)); line-height: 1; box-shadow: 0 calc(2 * var(--u)) 0 #000;
}
/* The tag reaches 8u into PLAY: the text starts below it, the button grows
   when the level's line takes two lines, and the modes above move up clear
   of the tag's top. */
.lobby .pb-home .pb-go.tagged { gap: calc(12 * var(--u)); }
.lobby .pb-home .pb-go.tagged .pb-play { height: auto; min-height: calc(68 * var(--u)); padding-top: calc(12 * var(--u)); padding-bottom: calc(4 * var(--u)); }

/* Level select: a trail of nodes, and the picked level's card. */
.lobby .pb-lv .pb-lvhead { position: absolute; left: calc(12 * var(--u)); top: calc(8 * var(--u)); height: calc(44 * var(--u)); display: flex; align-items: center; gap: calc(10 * var(--u)); }
.lobby .pb-lv .pb-lvname h2 { margin: 0; font-size: calc(20 * var(--u)); color: #fff; text-shadow: 0 calc(2 * var(--u)) 0 #000; white-space: nowrap; }
.lobby .pb-lv .pb-lvname small { display: flex; align-items: center; gap: calc(4 * var(--u)); margin-top: calc(4 * var(--u)); font: 600 calc(13 * var(--u))/1 var(--body); color: #e8e0d2; text-shadow: 0 1px 2px #000; }
.lobby .pb-lv .pb-lvname .star, .lobby .pb-lv .pb-lvname svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); flex: none; }
.lobby .pb-lv .pb-lvname.newch h2 { animation: chglow 1.1s ease-in-out 3; }
@keyframes chglow { 50% { color: var(--gold); text-shadow: 0 0 calc(14 * var(--u)) rgba(255, 210, 63, 0.8); } }
.lobby .pb-lv .topbar { top: calc(8 * var(--u)); }
.lobby .pb-lv .pb-map { position: absolute; left: 0; right: 0; top: calc(56 * var(--u)); bottom: calc(92 * var(--u) + var(--safeb, 0px)); display: flex; align-items: center; }
.lobby .pb-lv .pb-path { position: relative; width: 100%; height: calc(115 * var(--u)); }
/* The settings' arrows sit halfway down the map, either side; the trail runs
   between them, from the first node's centre to the boss's. */
.lobby .pb-lv .pb-arrow { top: 50%; translate: 0 -50%; }
.lobby .pb-lv .pb-trail { position: absolute; top: 0; left: calc(79 * var(--u)); width: calc(100% - 165 * var(--u)); height: 100%; overflow: visible; }
.lobby .pb-lv .pb-trail polyline { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.lobby .pb-lv .pb-trail .ahead { stroke: rgba(255, 255, 255, 0.28); stroke-width: calc(3 * var(--u)); }
.lobby .pb-lv .pb-trail .done { stroke: var(--gold); stroke-width: calc(4 * var(--u)); }
.lobby .pb-lv .pb-node {
  position: absolute; top: 0; left: calc(79 * var(--u) + var(--i) * (100% - 165 * var(--u)) / 9);
  width: calc(46 * var(--u)); margin-left: calc(-23 * var(--u)); padding: 0; display: flex;
  flex-direction: column; align-items: center; gap: calc(4 * var(--u)); border: 0; background: none; color: #fff; font: inherit; cursor: pointer;
}
.lobby .pb-lv .pb-node.lo { top: calc(52 * var(--u)); }
.lobby .pb-lv .pb-dot {
  width: calc(46 * var(--u)); height: calc(46 * var(--u)); box-sizing: border-box; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: calc(1 * var(--u)); border-radius: 50%; border: calc(2 * var(--u)) solid var(--gold);
  background: #1d1822; box-shadow: 0 calc(3 * var(--u)) 0 #000; font: italic 900 calc(17 * var(--u))/1 var(--display); transition: scale 0.08s;
}
.lobby .pb-lv .pb-node:active .pb-dot { scale: 0.9; }
.lobby .pb-lv .pb-node.cur .pb-dot {
  border-width: calc(3 * var(--u)); background: linear-gradient(var(--red-hi), var(--red-lo));
  box-shadow: 0 0 0 calc(5 * var(--u)) rgba(255, 210, 63, 0.24), 0 calc(3 * var(--u)) 0 #000; animation: nodeglow 1.1s ease-in-out infinite alternate;
}
@keyframes nodeglow { to { box-shadow: 0 0 0 calc(9 * var(--u)) rgba(255, 210, 63, 0.1), 0 calc(3 * var(--u)) 0 #000; } }
.lobby .pb-lv .pb-node.locked .pb-dot { border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.24); background: rgba(14, 11, 16, 0.92); box-shadow: none; color: #a39cad; font-size: calc(13 * var(--u)); }
.lobby .pb-lv .pb-node.locked .pb-dot svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.lobby .pb-lv .pb-node.boss { width: calc(52 * var(--u)); margin-left: calc(-26 * var(--u)); }
.lobby .pb-lv .pb-node.boss .pb-dot {
  width: calc(52 * var(--u)); height: calc(52 * var(--u)); margin-top: calc(-3 * var(--u)); border: calc(2 * var(--u)) solid #ff6b6b;
  background: #46080e; color: #ff9b9b; box-shadow: 0 0 0 calc(4 * var(--u)) rgba(255, 107, 107, 0.18), 0 calc(3 * var(--u)) 0 #000;
}
.lobby .pb-lv .pb-node.boss.done .pb-dot { border-color: var(--gold); color: var(--gold); }
/* The boss's own head fills his node (UI.drawBossHeads). */
.lobby .pb-lv .pb-node.boss .pb-dot { overflow: hidden; }
.lobby .pb-lv .pb-node.boss .pb-dot canvas.pb-head { flex: none; display: block; width: 100%; height: 100%; }
.lobby .pb-lv .pb-node.sel .pb-dot { outline: calc(2 * var(--u)) dashed #fff; outline-offset: calc(5 * var(--u)); }
.lobby .pb-lv .pb-node .stars { gap: calc(1 * var(--u)); }
.lobby .pb-lv .pb-node .star { width: calc(13 * var(--u)); height: calc(13 * var(--u)); }
.lobby .pb-lv .pb-node em { font: italic 900 calc(13 * var(--u))/1 var(--display); color: var(--gold); text-shadow: 0 1px 2px #000; }
.lobby .pb-lv .pb-node.unlocking .pb-dot { animation: unlockflare 1.6s ease-out; }
.lobby .pb-lv .pb-node .lock.breaking {
  position: absolute; left: 50%; top: calc(10 * var(--u)); width: calc(16 * var(--u)); height: calc(13 * var(--u)); margin: 0 0 0 calc(-8 * var(--u));
  border-radius: calc(2 * var(--u)); animation: lockbreak 1.5s cubic-bezier(0.5, 0, 0.6, 1) forwards;
}
.lobby .pb-lv .pb-node .lock.breaking::before { left: calc(3 * var(--u)); top: calc(-8 * var(--u)); width: calc(7 * var(--u)); height: calc(8 * var(--u)); border-width: calc(2 * var(--u)); }
.lobby .pb-lv .pb-lvcard {
  position: absolute; right: calc(12 * var(--u)); bottom: calc(12 * var(--u) + var(--safeb, 0px)); width: calc(316 * var(--u)); height: calc(76 * var(--u));
  box-sizing: border-box; display: flex; align-items: center; gap: calc(10 * var(--u)); padding: 0 calc(10 * var(--u)) 0 calc(14 * var(--u));
  border-radius: calc(12 * var(--u)); border: calc(1 * var(--u)) solid rgba(255, 210, 63, 0.45); background: rgba(14, 11, 16, 0.95);
  animation: rise 0.42s 0.3s cubic-bezier(0.2, 1.3, 0.4, 1) backwards;
}
.lobby .pb-lv .pb-lvcard.swap .pb-lvinfo { animation: cardswap 0.22s ease-out; }
@keyframes cardswap { from { opacity: 0; translate: calc(10 * var(--u)) 0; } to { opacity: 1; translate: 0 0; } }
.lobby .pb-lv .pb-lvinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(5 * var(--u)); text-align: left; }
.lobby .pb-lv .pb-lvinfo small { display: flex; align-items: center; gap: calc(7 * var(--u)); font: 800 calc(13 * var(--u))/1 var(--body); color: var(--gold); letter-spacing: calc(1 * var(--u)); }
.lobby .pb-lv .pb-lvinfo .tag { position: static; padding: calc(2 * var(--u)) calc(5 * var(--u)); border-radius: calc(4 * var(--u)); font-size: calc(13 * var(--u)); letter-spacing: 0; }
.lobby .pb-lv .pb-lvinfo b { font: italic 900 calc(17 * var(--u))/1 var(--display); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby .pb-lv .pb-lvinfo span { font: 600 calc(13 * var(--u))/1.15 var(--body); color: #b9b1a4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby .pb-lv .pb-fight { width: calc(104 * var(--u)); height: calc(56 * var(--u)); flex: none; padding: 0; font-size: calc(19 * var(--u)); }
.lobby .pb-lv .pb-fight.locked { display: flex; align-items: center; justify-content: center; gap: calc(5 * var(--u)); font-size: calc(16 * var(--u)); }
.lobby .pb-lv .pb-fight.locked svg { width: calc(15 * var(--u)); height: calc(15 * var(--u)); flex: none; }

/* Results: the outcome top left, rewards down the right, buttons along the bottom. */
.lobby .pb-res .pbr-main {
  position: absolute; left: calc(12 * var(--u)); top: calc(12 * var(--u)); width: calc(300 * var(--u)); box-sizing: border-box;
  padding: calc(12 * var(--u)) calc(14 * var(--u)) calc(14 * var(--u)); gap: calc(8 * var(--u)); align-items: stretch; text-align: left;
  border-width: calc(1 * var(--u)); border-radius: calc(12 * var(--u)); box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, 0.6);
}
.lobby .pb-res .pbr-main .head { font-size: calc(38 * var(--u)); line-height: 1; letter-spacing: calc(1 * var(--u)); text-shadow: 0 calc(4 * var(--u)) 0 #000; }
.lobby .pb-res .pbr-main.win .head { text-shadow: 0 calc(4 * var(--u)) 0 #000, 0 0 calc(18 * var(--u)) rgba(255, 210, 63, 0.45); }
.lobby .pb-res .pbr-main .head { padding: 0; }
.lobby .pb-res .pbr-main .sub { margin: 0; padding: 0 calc(64 * var(--u)) 0 0; font: 700 calc(13 * var(--u))/1.25 var(--body); letter-spacing: calc(0.5 * var(--u)); text-transform: uppercase; opacity: 1; }
.lobby .pb-res .difftag { margin-left: calc(6 * var(--u)); padding: calc(1 * var(--u)) calc(6 * var(--u)); border-radius: calc(8 * var(--u)); font-size: calc(13 * var(--u)); vertical-align: 0; }
.lobby .pb-res .rank { top: calc(8 * var(--u)); right: calc(12 * var(--u)); width: auto; }
.lobby .pb-res .rank b { font-size: calc(48 * var(--u)); -webkit-text-stroke: calc(2 * var(--u)) #111; }
.lobby .pb-res .rank small { font-size: calc(13 * var(--u)); letter-spacing: calc(2 * var(--u)); }
.lobby .pb-res .pbr-row { display: flex; align-items: center; gap: calc(10 * var(--u)); min-height: calc(28 * var(--u)); }
.lobby .pb-res .pbr-row .stars { margin: 0; gap: calc(2 * var(--u)); }
.lobby .pb-res .pbr-row .star { width: calc(26 * var(--u)); height: calc(26 * var(--u)); margin: 0; }
.lobby .pb-res .pbr-hint { font: 600 calc(13 * var(--u))/1.2 var(--body); color: #b9b1a4; }
.lobby .pb-res .pbr-score { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: calc(3 * var(--u)); }
.lobby .pb-res .pbr-score small { font: 600 calc(13 * var(--u))/1 var(--body); color: #b9b1a4; }
.lobby .pb-res .pbr-score b { font: italic 900 calc(16 * var(--u))/1 var(--display); color: #fff; }
.lobby .pb-res .pbr-main .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(6 * var(--u)); margin: 0; }
.lobby .pb-res .pbr-main .stats div {
  grid-column: auto; height: calc(46 * var(--u)); box-sizing: border-box; padding: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: calc(4 * var(--u)); border-radius: calc(8 * var(--u)); background: rgba(255, 255, 255, 0.06);
}
.lobby .pb-res .pbr-main .stats b { font-size: calc(17 * var(--u)); }
.lobby .pb-res .pbr-main .stats span { font: 600 calc(13 * var(--u))/1 var(--body); color: #b9b1a4; }
/* Its drawn scrollbar (UI.scrollbars) runs in the gutter on the right. */
.lobby .pb-res .pbr-loot {
  position: absolute; right: calc(12 * var(--u)); top: calc(12 * var(--u)); width: calc(234 * var(--u)); box-sizing: border-box; padding-right: calc(10 * var(--u));
  max-height: calc(var(--uih) - 90 * var(--u) - var(--safeb, 0px)); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  display: flex; flex-direction: column; gap: calc(6 * var(--u));
}
.lobby .pb-res .pbr-loot > * { flex: none; }
.lobby .pb-res .pbr-label { font: 800 calc(13 * var(--u))/1 var(--body); color: var(--gold); letter-spacing: calc(2 * var(--u)); text-shadow: 0 1px 2px #000; }
.lobby .pb-res .pbr-coins {
  height: calc(52 * var(--u)); box-sizing: border-box; display: flex; align-items: center; justify-content: flex-start; gap: calc(8 * var(--u));
  padding: 0 calc(4 * var(--u)) 0 calc(10 * var(--u)); border-radius: calc(10 * var(--u)); border: calc(1 * var(--u)) solid rgba(255, 210, 63, 0.4);
  background: rgba(10, 8, 12, 0.92); font-size: calc(13 * var(--u));
}
.lobby .pb-res .pbr-coins .coins { height: auto; padding: 0; border: 0; background: none; font-size: calc(20 * var(--u)); color: var(--gold); }
.lobby .pb-res .pbr-coins .coin { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.lobby .pb-res .pbr-coins .btn { margin-left: auto; height: calc(44 * var(--u)); padding: 0 calc(10 * var(--u)); font-size: calc(14 * var(--u)); }
.lobby .pb-res .pbr-coins em { margin-left: auto; padding-right: calc(8 * var(--u)); color: var(--gold); font-weight: 800; }
.lobby .pb-res .pbr-item {
  min-height: calc(44 * var(--u)); box-sizing: border-box; margin: 0; display: flex; align-items: center; gap: calc(9 * var(--u));
  padding: calc(5 * var(--u)) calc(8 * var(--u)) calc(5 * var(--u)) calc(12 * var(--u)); border-radius: calc(10 * var(--u));
  border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.12); background: rgba(10, 8, 12, 0.92); text-align: left;
}
.lobby .pb-res .pbr-item > svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); flex: none; color: var(--gold); }
.lobby .pb-res .pbr-item > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(3 * var(--u)); }
.lobby .pb-res .pbr-item small { font: 600 calc(13 * var(--u))/1.15 var(--body); color: #b9b1a4; }
.lobby .pb-res .pbr-item b { font: italic 900 calc(13 * var(--u))/1.15 var(--display); color: #fff; overflow-wrap: anywhere; }
.lobby .pb-res .pbr-item em { flex: none; font: normal 800 calc(13 * var(--u))/1 var(--body); color: var(--gold); }
.lobby .pb-res .pbr-item .btn { flex: none; height: calc(36 * var(--u)); padding: 0 calc(10 * var(--u)); font-size: calc(13 * var(--u)); }
.lobby .pb-res .pbr-item.style { border-color: rgba(125, 255, 154, 0.38); }
.lobby .pb-res .pbr-item.style > svg { color: #7dff9a; }
.lobby .pb-res .pbr-item.style b { color: #7dff9a; }
/* What the coins buy next (UI.upgradeCard): BUY a tap away, or a bar filling toward the price. */
.lobby .pb-res .upcard { position: relative; overflow: hidden; gap: calc(8 * var(--u)); padding: calc(4 * var(--u)) calc(8 * var(--u)); border-color: rgba(255, 210, 63, 0.4); }
/* It rises in with the rest of the column (.stagger); until the first purchase it also glows. */
.lobby .pb-res .upcard.first { animation: rise 0.42s cubic-bezier(0.2, 1.3, 0.4, 1) backwards, upglow 1.1s ease-in-out infinite alternate; }
.lobby .pb-res .upcard.first.quiet { animation: upglow 1.1s ease-in-out infinite alternate; }
.lobby .pb-res .upcard.swap { animation: cardswap 0.22s ease-out; }
.lobby .pb-res .upcard .upic {
  flex: none; width: calc(28 * var(--u)); height: calc(28 * var(--u)); display: grid; place-items: center; border-radius: 50%;
  font: 900 calc(16 * var(--u))/1 var(--body); color: #fff; background: radial-gradient(circle at 35% 30%, #e2262f, #6d0a11);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) rgba(255, 255, 255, 0.15);
}
.lobby .pb-res .upcard .upic svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.lobby .pb-res .upcard.up-style { border-color: rgba(125, 255, 154, 0.38); }
.lobby .pb-res .upcard.up-style .upic { color: #7dff9a; background: radial-gradient(circle at 35% 30%, #2f6a43, #0f2a1a); }
.lobby .pb-res .upcard small { color: var(--gold); }
.lobby .pb-res .upcard.up-style small { color: #7dff9a; }
.lobby .pb-res .upcard .upbuy {
  height: calc(44 * var(--u)); display: flex; align-items: center; gap: calc(4 * var(--u)); color: var(--gold);
  background: linear-gradient(#3a2f12, #1f1808); border-color: rgba(255, 210, 63, 0.6);
}
.lobby .pb-res .upcard .upbuy .coin { width: calc(15 * var(--u)); height: calc(15 * var(--u)); }
.lobby .pb-res .upcard.goal .upic { filter: saturate(0.35) brightness(0.75); }
.lobby .pb-res .upcard.goal::after { content: ''; position: absolute; left: 0; bottom: 0; width: var(--p); height: calc(3 * var(--u)); background: var(--gold); }
@keyframes upglow { to { border-color: var(--gold); box-shadow: 0 0 calc(16 * var(--u)) rgba(255, 210, 63, 0.5); } }
.lobby .pb-res .pbr-wide { width: 100%; height: auto; min-height: calc(44 * var(--u)); padding: calc(7 * var(--u)) calc(10 * var(--u)); font-size: calc(14 * var(--u)); white-space: normal; line-height: 1.1; }
.lobby .pb-res .pbr-streak { padding: calc(8 * var(--u)) calc(10 * var(--u)); border-radius: calc(10 * var(--u)); border: calc(1 * var(--u)) solid rgba(255, 210, 63, 0.4); background: rgba(10, 8, 12, 0.92); text-align: left; }
.lobby .pb-res .pbr-streak p { margin: 0 0 calc(7 * var(--u)); font: 600 calc(13 * var(--u))/1.25 var(--body); }
.lobby .pb-res .pbr-streak .row { gap: calc(6 * var(--u)); }
.lobby .pb-res .pbr-streak .btn { flex: 1; height: calc(44 * var(--u)); padding: 0 calc(6 * var(--u)); font-size: calc(13 * var(--u)); }
.lobby .pb-res .pbr-gtext { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: calc(4 * var(--u)); text-align: left; }
.lobby .pb-res .pbr-gtext small { font: 800 calc(13 * var(--u))/1.15 var(--body); color: var(--gold); letter-spacing: calc(0.5 * var(--u)); }
.lobby .pb-res .pbr-gtext b { max-width: 100%; font: italic 900 calc(14 * var(--u))/1.1 var(--display); color: #fff; overflow-wrap: anywhere; }
.lobby .pb-res .pbr-gtext .rc-cd { font-weight: 600; color: #cfc7ba; letter-spacing: 0; opacity: 1; }
/* The day's gift and the next-up teaser, as rows of the rewards column. */
.lobby .pb-res .rewardcard, .lobby .pb-res .nextcard {
  position: relative; top: auto; left: auto; width: auto; min-height: calc(56 * var(--u)); transform: none; box-sizing: border-box;
  flex-direction: row; align-items: center; gap: calc(10 * var(--u)); padding: calc(6 * var(--u)) calc(4 * var(--u)) calc(6 * var(--u)) calc(10 * var(--u));
  border-width: calc(1 * var(--u)); border-radius: calc(10 * var(--u)); box-shadow: none; text-align: left;
}
.lobby .pb-res .rewardcard { animation: rcin 0.55s 1.2s cubic-bezier(0.2, 1.3, 0.4, 1) backwards; }
.lobby .pb-res .rewardcard.ready { animation: rcin 0.55s 1.2s cubic-bezier(0.2, 1.3, 0.4, 1) backwards, rcglow 1.2s 1.8s ease-in-out infinite alternate; }
.lobby .pb-res .rewardcard .rc-cta { padding: calc(3 * var(--u)) calc(10 * var(--u)); border-radius: calc(12 * var(--u)); font-size: calc(13 * var(--u)); }
.lobby .pb-res .rewardcard .rc-all { flex: none; width: calc(44 * var(--u)); min-height: calc(44 * var(--u)); padding: 0; display: grid; place-items: center; }
.lobby .pb-res .rewardcard .rc-all svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.lobby .pb-res .rewardcard canvas.ricon { width: calc(40 * var(--u)); height: calc(40 * var(--u)); flex: none; }
.lobby .pb-res .rewardcard .coinstack { flex: none; width: calc(40 * var(--u)); height: calc(40 * var(--u)); scale: 0.95; }
.lobby .pb-res .reveal { flex: none; }
.lobby .pb-res .reveal .rays { inset: calc(-8 * var(--u)); }
.lobby .pb-res .giftbig { flex: none; width: calc(48 * var(--u)); height: calc(42 * var(--u)); }
.lobby .pb-res .giftbig .rays { inset: calc(-8 * var(--u)); }
.lobby .pb-res .giftbig .box {
  left: calc(9 * var(--u)); right: calc(9 * var(--u)); bottom: calc(2 * var(--u)); height: calc(20 * var(--u)); border-radius: calc(3 * var(--u));
  box-shadow: 0 calc(2 * var(--u)) 0 rgba(0, 0, 0, 0.4), inset 0 calc(-3 * var(--u)) 0 rgba(0, 0, 0, 0.18);
}
.lobby .pb-res .giftbig .lid { left: calc(6 * var(--u)); right: calc(6 * var(--u)); bottom: calc(21 * var(--u)); height: calc(8 * var(--u)); border-radius: calc(2 * var(--u)); box-shadow: 0 calc(1.5 * var(--u)) 0 rgba(0, 0, 0, 0.3); }
.lobby .pb-res .giftbig .bow { bottom: calc(28 * var(--u)); }
.lobby .pb-res .giftbig .bow::before, .lobby .pb-res .giftbig .bow::after { bottom: calc(-2 * var(--u)); width: calc(11 * var(--u)); height: calc(8 * var(--u)); border-width: calc(2 * var(--u)); }
.lobby .pb-res .giftbig .bow::before { right: calc(-1 * var(--u)); }
.lobby .pb-res .giftbig .bow::after { left: calc(-1 * var(--u)); }
.lobby .pb-res .nextcard { padding-left: calc(4 * var(--u)); animation: rise 0.42s 1.1s cubic-bezier(0.2, 1.3, 0.4, 1) backwards; }
.lobby .pb-res .nextcard canvas { display: block; width: calc(56 * var(--u)); height: calc(42 * var(--u)); flex: none; object-fit: cover; border: 0; border-radius: calc(6 * var(--u)); }
.lobby .pb-res .nextcard .pbr-gtext small { color: #7fd4ff; }
.lobby .pb-res .nextcard.nc-boss .pbr-gtext small { color: #ff8a7a; }
.lobby .pb-res .nextcard.nc-setting .pbr-gtext small, .lobby .pb-res .nextcard.nc-twist .pbr-gtext small { color: var(--gold); }
.lobby .pb-res .pbr-btns { position: absolute; left: calc(12 * var(--u)); bottom: calc(12 * var(--u) + var(--safeb, 0px)); display: flex; gap: calc(10 * var(--u)); }
.lobby .pb-res .pbr-btns .btn { width: calc(108 * var(--u)); height: calc(44 * var(--u)); padding: 0; }
.lobby .pb-res .pbr-go {
  position: absolute; right: calc(12 * var(--u)); bottom: calc(12 * var(--u) + var(--safeb, 0px)); width: calc(236 * var(--u)); height: calc(58 * var(--u));
  padding: 0 calc(10 * var(--u)); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: calc(22 * var(--u)); letter-spacing: calc(1 * var(--u)); animation: rise 0.45s 0.9s cubic-bezier(0.2, 1.3, 0.4, 1) backwards;
}
.lobby .pb-res.quiet .stagger, .lobby .pb-res.quiet .rewardcard, .lobby .pb-res.quiet .nextcard, .lobby .pb-res.quiet .pbr-go { animation: none; }

/* Styles: a sheet at the right; the fighter fights in the free space beside it. */
.lobby .pb-sty { --th: min(calc(var(--uih) - 84 * var(--u) - var(--safeb, 0px)), calc(236 * var(--u))); --ty: calc(62 * var(--u)); background: none; }
.lobby .pb-sty .pbs-title { left: calc(12 * var(--u)); top: calc(10 * var(--u)); padding: 0 calc(16 * var(--u)) 0 0; cursor: default; }
.lobby .pb-sty .pbs-title .pb-ic { background: transparent; }
.lobby .pb-sty .pbs-title h2 { margin: 0; font-size: calc(15 * var(--u)); color: #fff; white-space: nowrap; }
.lobby .pb-sty .pbs-sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(calc(385 * var(--u)), 64%); overflow: hidden;
  background: rgba(12, 9, 14, 0.96); box-shadow: calc(-10 * var(--u)) 0 calc(24 * var(--u)) rgba(0, 0, 0, 0.45);
  animation: sheetin 0.32s cubic-bezier(0.2, 1, 0.4, 1) backwards;
}
@keyframes sheetin { from { translate: 100% 0; } to { translate: 0 0; } }
.lobby .pb-sty .topbar { top: calc(10 * var(--u)); left: calc(60 * var(--u)); right: calc(12 * var(--u)); }
.lobby .pb-sty .pbs-count { margin-right: auto; font: 700 calc(13 * var(--u))/1 var(--body); color: #b9b1a4; white-space: nowrap; }
.lobby .pb-sty .pbs-count b { margin-left: calc(4 * var(--u)); font: italic 900 calc(14 * var(--u))/1 var(--display); color: #fff; }
.lobby .pb-sty .freecoins { height: calc(44 * var(--u)); box-sizing: border-box; gap: calc(5 * var(--u)); padding: 0 calc(11 * var(--u)); border-width: calc(1 * var(--u)); font-size: calc(13 * var(--u)); }
.lobby .pb-sty .freecoins .adi { border-left-width: calc(8 * var(--u)); border-top-width: calc(5 * var(--u)); border-bottom-width: calc(5 * var(--u)); }
.lobby .pb-sty .freecoins .coin { width: calc(14 * var(--u)); height: calc(14 * var(--u)); }
.lobby .pb-sty .freecoins.off { height: auto; max-width: calc(120 * var(--u)); padding: calc(4 * var(--u)) calc(8 * var(--u)); font-size: calc(13 * var(--u)); line-height: 1.15; white-space: normal; }
.lobby .pb-sty .pbs-track {
  position: absolute; left: 0; right: 0; top: var(--ty); height: var(--th); box-sizing: border-box; display: flex; gap: calc(10 * var(--u));
  padding-left: calc(60 * var(--u)); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-left: calc(60 * var(--u));
  overscroll-behavior: contain; touch-action: pan-x;
}
/* Room after the last card, so it can snap where the others do. */
.lobby .pb-sty .pbs-track::after { content: ''; flex: 0 0 calc(100% - 246 * var(--u)); }
/* min-width 0: a long line wraps rather than widen its card, so every card
   is as wide as the snap points and arrows expect. */
.lobby .pb-sty .pbs-card {
  position: relative; flex: 0 0 calc(236 * var(--u)); min-width: 0; height: 100%; box-sizing: border-box; scroll-snap-align: start;
  padding: calc(12 * var(--u)) calc(14 * var(--u)); display: flex; flex-direction: column; gap: calc(5 * var(--u)); text-align: left;
  border-radius: calc(12 * var(--u)); border: calc(1 * var(--u)) solid rgba(255, 255, 255, 0.14); background: #1b1620;
  opacity: 0.5; transition: opacity 0.25s, border-color 0.25s;
}
.lobby .pb-sty .pbs-card.on { opacity: 1; border-color: color-mix(in srgb, var(--acc) 70%, transparent); }
/* The cards either side peek in as empty frames: no half-cut text under the arrows. */
.lobby .pb-sty .pbs-card > * { transition: opacity 0.2s; }
.lobby .pb-sty .pbs-card:not(.on) > * { opacity: 0; visibility: hidden; }
.lobby .pb-sty .pbs-card.just { animation: equip 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
.lobby .pb-sty .pbs-card h3 { margin: 0; font-size: calc(20 * var(--u)); letter-spacing: calc(0.5 * var(--u)); color: var(--acc); text-shadow: 0 calc(2 * var(--u)) 0 #000; }
.lobby .pb-sty .pbs-card p { margin: 0; }
.lobby .pb-sty .pbs-card .tagline { font: italic 600 calc(13 * var(--u))/1.2 var(--body); color: #b9b1a4; }
.lobby .pb-sty .pbs-card .perk { margin-top: calc(2 * var(--u)); font: 600 calc(13 * var(--u))/1.3 var(--body); color: var(--paper); }
.lobby .pb-sty .pbs-card .moves { font: 600 calc(13 * var(--u))/1.2 var(--body); color: #b9b1a4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby .pb-sty .pbs-card .moves b { font: italic 900 calc(13 * var(--u))/1 var(--display); color: #fff; }
.lobby .pb-sty .pbs-card .rares, .lobby .pb-sty .pbs-card .rares b { font: 700 calc(13 * var(--u))/1.2 var(--body); color: var(--gold); }
.lobby .pb-sty .pbs-card .rares i { font-style: normal; color: #b9b1a4; }
.lobby .pb-sty .pbs-card .sbtns { margin-top: auto; display: flex; gap: calc(8 * var(--u)); }
.lobby .pb-sty .pbs-card .btn { flex: 1; min-width: 0; height: calc(46 * var(--u)); padding: 0 calc(6 * var(--u)); }
.lobby .pb-sty .pbs-arrow { top: calc(var(--ty) + var(--th) / 2 - 32 * var(--u)); }
.lobby .pb-sty .pbs-dots { position: absolute; left: calc(60 * var(--u)); width: calc(236 * var(--u)); top: calc(var(--ty) + var(--th) + 8 * var(--u)); display: flex; justify-content: center; gap: calc(6 * var(--u)); }
.lobby .pb-sty .pbs-dots i { width: calc(6 * var(--u)); height: calc(6 * var(--u)); border-radius: calc(3 * var(--u)); background: rgba(255, 255, 255, 0.3); transition: width 0.25s, background 0.25s; }
.lobby .pb-sty .pbs-dots i.on { width: calc(18 * var(--u)); background: var(--gold); }
/* Short frames (iPhones in Safari): shorter cards, with no tagline, and on
   the shortest (an iPhone SE) a perk of two lines at most. */
.low .pb-sty .pbs-card .tagline { display: none; }
.lowest .pb-sty .pbs-card .perk { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Bigger screens (off phones): the title's menus in a row and a bigger
   logo (capped by the frame's width), and the style card halfway down the
   sheet. */
.lobby:not(.phone) .pb-home .pb-nav { width: auto; grid-template-columns: repeat(4, calc(72 * var(--u))); }
.lobby:not(.phone) .pb-home .logo { top: calc(12 * var(--u)); }
.lobby:not(.phone) .pb-home .logo-top { font-size: min(calc(32 * var(--u)), calc(var(--uiw) * 0.037)); letter-spacing: calc(1.5 * var(--u)); -webkit-text-stroke: calc(5 * var(--u)) #111; }
.lobby:not(.phone) .pb-home .logo-bot { margin-top: calc(-3 * var(--u)); padding: calc(5 * var(--u)) calc(24 * var(--u)) calc(8 * var(--u)); }
.lobby:not(.phone) .pb-home .logo-bot .brush { inset: calc(-3 * var(--u)) calc(-14 * var(--u)) calc(-5 * var(--u)); width: calc(100% + 28 * var(--u)); height: calc(100% + 8 * var(--u)); }
.lobby:not(.phone) .pb-home .logo-bot span { font-size: min(calc(37 * var(--u)), calc(var(--uiw) * 0.043)); letter-spacing: calc(1.5 * var(--u)); -webkit-text-stroke: calc(4 * var(--u)) #111; }
.lobby:not(.phone) .pb-sty { --ty: max(calc(62 * var(--u)), calc((var(--uih) - var(--th)) / 2)); }

/* Phones open How to play from Settings, beside DONE. */
.lobby .panel.settings > .row { grid-column: 1 / -1; }
/* Tags a shade darker on phones, so their white 13 px text reads. */
.lobby .pb .tag.new, .lobby .pb .playtag { background: #2370b0; }
.lobby .pb .playtag.boss { background: var(--red-lo); }
.lobby .pb .playtag.setting { background: #8f5a1f; }
.lobby .pb .tag.swarm { background: #257a46; }
.lobby .pb .tag.weapons { background: #8a5c12; }
