:root {
  --ink: #fff3e6;
  --ink-2: rgba(255, 236, 214, 0.68);
  --ink-3: rgba(255, 236, 214, 0.44);
  --dim: #d8b99a;
  --hot: #ffb35a;
  --amber: #ffb24a;
  --gold: #f3ca25;
  --orange: #ff8a1e;
  --og: #ff7d14;
  --cream: #f4ecdf;
  --cyan: #22c8f5;
  --green: #3bd94a;
  --epic: #f2c53a;
  --legend: #ff8a1e;
  --j1: #ffe0a3;
  --j2: #ffae4a;
  --j3: #ff7d14;
  --jdark: #241005;
  --jline: rgba(255, 176, 100, 0.22);
  --jline-2: rgba(255, 204, 150, 0.42);
  --jbg: rgba(22, 11, 5, 0.84);
  --jbg-2: rgba(30, 15, 7, 0.93);
  --wood: rgba(24, 11, 5, 0.8);
  --line: rgba(255, 176, 100, 0.22);
  --display: "Archivo", "Arial Black", Impact, sans-serif;
  --ui: "Inter Tight", "Inter", system-ui, sans-serif;
  --word: "Righteous", "Archivo", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

body {
  background: radial-gradient(70% 60% at 50% 35%, #3a1b09, #1a0c04 55%, #0b0502);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.display {
  font-family: var(--display);
  font-variation-settings: "wdth" 62;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: -0.005em;
}

.label {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hot {
  color: var(--hot);
}

.gold {
  color: var(--gold);
}

.k-touch {
  display: none;
}

.is-touch .k-touch {
  display: inline;
}

.is-touch .k-desk {
  display: none;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#game {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 170, 90, 0.5) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb35a, #ff7d14) padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffd08a, #ff8a1e) padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lockup {
  --lw: 300px;
  display: grid;
  justify-items: center;
  margin: calc(var(--lw) * -0.14) calc(var(--lw) * -0.2) calc(var(--lw) * -0.06);
  padding: calc(var(--lw) * 0.14) calc(var(--lw) * 0.2) calc(var(--lw) * 0.06);
  line-height: 1;
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 2px, rgba(0, 0, 0, 0.42) 2px 3px);
  mask-image: repeating-linear-gradient(to bottom, #000 0 2px, rgba(0, 0, 0, 0.42) 2px 3px);
}

.lockup__logo {
  display: block;
  width: var(--lw);
  aspect-ratio: 1074 / 495;
  filter: drop-shadow(0 0 calc(var(--lw) * 0.03) rgba(255, 180, 60, 0.45)) drop-shadow(0 calc(var(--lw) * 0.007) calc(var(--lw) * 0.014) rgba(0, 0, 0, 0.85));
}

.lockup__logo::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #fecb57 0%, #fcbc48 33%, #f8ab32 66%, #f5961a 100%);
  -webkit-mask: url(../assets/img/wud-universe-logo-white.png) center / contain no-repeat;
  mask: url(../assets/img/wud-universe-logo-white.png) center / contain no-repeat;
}

.lockup__word {
  margin-top: calc(var(--lw) * 0.0286);
  margin-right: -0.02em;
  font: 400 calc(var(--lw) * 0.155) / 0.9 var(--word);
  letter-spacing: 0.02em;
  color: var(--cream);
  text-shadow: 0 calc(var(--lw) * 0.0082) calc(var(--lw) * 0.0163) rgba(0, 0, 0, 0.85), 0 0 calc(var(--lw) * 0.0265) rgba(244, 236, 223, 0.25);
  white-space: nowrap;
}

.lockup__gems {
  display: flex;
  gap: calc(var(--lw) * 0.0327);
  margin-top: calc(var(--lw) * 0.045);
}

.lockup__gems i {
  width: calc(var(--lw) * 0.0306);
  aspect-ratio: 1;
  border-radius: calc(var(--lw) * 0.004);
  transform: rotate(45deg);
  background: currentColor;
  box-shadow: 0 0 calc(var(--lw) * 0.0245) currentColor;
}

.lockup__gems i:nth-child(1) { color: var(--cyan); }
.lockup__gems i:nth-child(2) { color: var(--green); }
.lockup__gems i:nth-child(3) { color: var(--epic); }
.lockup__gems i:nth-child(4) { color: var(--legend); }

.lockup--hero {
  --lw: min(58vw, 600px, 62vh);
}

.lockup--tl {
  --lw: min(34cqw, 230px, 26cqh);
}

.lockup.is-alive {
  position: relative;
  animation: jolt 6s steps(1) infinite;
}

.lockup.is-alive::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--lw) * 0.37);
  z-index: -1;
  width: calc(var(--lw) * 1.25);
  height: calc(var(--lw) * 0.7);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 180, 60, 0.3), rgba(255, 170, 50, 0.09) 55%, transparent);
  transform: translate(-50%, -50%);
  animation: glow-pulse 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes jolt {
  0%, 90.5%, 95%, 100% { opacity: 1; translate: 0; }
  91% { opacity: 0.55; translate: -4px 0; }
  93% { opacity: 0.85; translate: 3px 0; }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.tl {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  overflow: hidden;
  container-type: size;
  background: #0d0601;
  opacity: 1;
  transition: opacity 0.45s ease;
  animation: tl-in 0.35s ease both;
}

@keyframes tl-in {
  from { opacity: 0; }
}

.tl.is-inset {
  inset: auto;
  z-index: 24;
  border: 1px solid var(--jline);
  border-radius: 22px;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.9);
}

.tl.is-away {
  visibility: hidden;
}

.tl.is-out {
  opacity: 0;
  pointer-events: none;
}

.tl::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.28) 2px 3px);
}

.tl-art,
.tl-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tl-art > * {
  position: absolute;
}

.tl-shade {
  background: radial-gradient(48% 46% at 50% 47%, rgba(10, 4, 1, 0.55), rgba(10, 4, 1, 0.12) 70%, transparent);
}

.tl-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(8px, 2.2cqh, 18px);
  width: min(560px, 88cqw);
  text-align: center;
}

.tl-name {
  position: relative;
  margin: clamp(4px, 1.5cqh, 14px) 0 0;
  font-size: clamp(30px, min(9cqw, 9cqh), 84px);
  color: #fff6ea;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 170, 60, 0.35);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 2px, rgba(0, 0, 0, 0.42) 2px 3px);
  mask-image: repeating-linear-gradient(to bottom, #000 0 2px, rgba(0, 0, 0, 0.42) 2px 3px);
  animation: jolt 6s steps(1) infinite;
  animation-delay: -2.3s;
}

.tl-tag {
  max-width: 440px;
  margin: 0 0 clamp(4px, 1.5cqh, 14px);
  font: 500 clamp(12px, 1.9cqh, 15px) / 1.45 var(--ui);
  color: rgba(255, 240, 222, 0.82);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.tl--generic .tl-name,
.tl--generic .tl-tag {
  display: none;
}

.tl--generic .lockup--tl {
  --lw: min(46cqw, 360px, 38cqh);
  margin-bottom: clamp(10px, 3cqh, 26px);
}

.ld-bar {
  position: relative;
  width: min(380px, 78cqw);
  height: 6px;
  margin-top: clamp(6px, 1.6cqh, 14px);
  border-radius: 999px;
  background: #0d0906;
  box-shadow: inset 0 0 0 1px rgba(255, 196, 110, 0.14), inset 0 1px 4px rgba(0, 0, 0, 0.85);
}

.ld-bloom,
.ld-core {
  position: absolute;
  left: 0;
  width: 0;
  border-radius: 999px;
  pointer-events: none;
}

.ld-bloom {
  top: -3px;
  height: 12px;
  background: linear-gradient(90deg, #00c4f9 0%, hsl(163, 85%, 58%) 27%, hsl(125, 85%, 50%) 52%, hsl(48, 90%, 55%) 77%, hsl(40, 95%, 60%) 100%);
  filter: blur(5px) saturate(1.7);
  opacity: 0.8;
}

.ld-core {
  top: 1px;
  bottom: 1px;
  background: linear-gradient(90deg, #22cfff 0%, hsl(163, 88%, 64%) 26%, hsl(125, 85%, 56%) 50%, hsl(48, 92%, 62%) 76%, hsl(40, 96%, 64%) 100%);
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.4);
}

.ld-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: min(380px, 78cqw);
}

.ld-meta .label {
  overflow: hidden;
  color: rgba(255, 240, 222, 0.75);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ld-meta b {
  flex: none;
  font-size: 22px;
  color: #ffd76a;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 215, 106, 0.55);
}

.tl-logs {
  inset: 0;
  background:
    radial-gradient(110% 90% at 50% 50%, transparent 38%, rgba(3, 1, 0, 0.82)),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 17px, rgba(255, 210, 160, 0.025) 17px 18px, rgba(0, 0, 0, 0) 18px 41px, rgba(0, 0, 0, 0.08) 41px 43px),
    repeating-linear-gradient(180deg, #0d0601 0, #241106 12px, #45220c 46px, #3a1c0a 86px, #1c0d04 114px, #050201 120px);
}

.tl-amber {
  inset: 0;
  background: radial-gradient(55% 50% at 50% 78%, rgba(255, 150, 50, 0.32), transparent 70%), radial-gradient(30% 30% at 14% 18%, rgba(255, 200, 130, 0.16), transparent 70%), radial-gradient(30% 30% at 86% 18%, rgba(255, 200, 130, 0.16), transparent 70%);
  animation: glow-pulse 4.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .tl-amber,
  .tl-name {
    animation: none;
  }
}

.ts-gold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: -4px 0 6px;
  padding: 14px 18px;
  border: 1px solid var(--jline-2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 210, 58, 0.12), rgba(255, 125, 20, 0.06));
}

.ts-gold.is-off {
  border-color: var(--jline);
  background: rgba(0, 0, 0, 0.28);
}

.ts-gold > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 280px;
}

.ts-gold .label {
  color: var(--hot);
}

.ts-gold p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.ts-gold b.display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 40px;
  color: #ffe27a;
  text-shadow: 0 0 18px rgba(255, 210, 58, 0.45);
}

.ts-gold a {
  text-decoration: none;
}

.gt-msg {
  min-height: 1.3em;
  margin: 8px 0 0;
  font-size: 13px;
  color: #ffd2b0;
}

.gt-msg:empty {
  display: none;
}

.gt-msg.is-ok {
  color: #b9f5c9;
}

.item-tier {
  font: 800 9.5px var(--ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tc, var(--ink-3));
}

.item-state.is-confirm {
  color: var(--jdark);
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--j1), var(--j2));
}

.lb-coins.is-hidden {
  display: none !important;
}

.lockup--brand {
  --lw: 124px;
}

.scr {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  animation: scr-in 0.45s var(--ease) both;
}

@keyframes scr-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
}

.scr--start {
  place-items: center;
  z-index: 30;
  cursor: pointer;
  background: #0f0602;
}

.st-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: #0f0602;
}

.st-bg__media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}

video.st-bg__media {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.st-bg.is-live video.st-bg__media {
  opacity: 1;
}

.scr--start::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70% 62% at 50% 50%, rgba(8, 4, 1, 0.62), rgba(8, 4, 1, 0.22) 70%, transparent),
    radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(6, 3, 1, 0.62));
}

html[data-calm] video.st-bg__media {
  display: none;
}

.st-center {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(22px, 4.5vh, 40px);
  padding: 20px;
  text-align: center;
}

.st-btn {
  position: relative;
  padding: 18px 54px 16px;
  border-radius: 14px;
  color: var(--jdark);
  background: linear-gradient(180deg, var(--j1), var(--j2) 55%, var(--j3));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 0 44px rgba(255, 150, 50, 0.5), 0 14px 40px rgba(0, 0, 0, 0.45);
  animation: st-pulse 1.8s ease-in-out infinite;
  transition: transform 0.15s var(--ease), opacity 0.2s;
}

.st-btn span {
  font: 900 clamp(28px, 3.2vw, 44px) / 1 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
}

.st-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.st-btn.is-busy {
  animation: none;
  opacity: 0.72;
  cursor: progress;
}

@keyframes st-pulse {
  50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) inset, 0 0 70px rgba(255, 190, 90, 0.7), 0 14px 40px rgba(0, 0, 0, 0.45); }
}

.st-hint {
  margin: -10px 0 0;
  color: var(--ink-3);
}

.st-foot {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  color: rgba(255, 236, 214, 0.32);
}

.scr--lobby {
  grid-template-rows: auto 1fr;
  background:
    linear-gradient(90deg, rgba(12, 5, 2, 0.88), rgba(12, 5, 2, 0.18) 34%, rgba(12, 5, 2, 0.18) 64%, rgba(12, 5, 2, 0.88)),
    linear-gradient(180deg, rgba(12, 5, 2, 0.6), transparent 18%, transparent 72%, rgba(12, 5, 2, 0.72));
}

html:not([data-tab="play"]) .scr--lobby {
  background: rgba(12, 5, 2, 0.8);
}

html[data-tab="play"] .scr--lobby {
  pointer-events: none;
}

html[data-tab="play"] .scr--lobby .lb-top,
html[data-tab="play"] .scr--lobby .lb-side,
html[data-tab="play"] .scr--lobby .lb-play {
  pointer-events: auto;
}

.lb-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
}

.lb-tabs {
  justify-self: center;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--jline);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lb-tabs button {
  padding: 11px 16px;
  border-radius: 11px;
  font: 800 12.5px var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-2);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.lb-tabs button:hover {
  color: #fff;
}

.lb-tabs button.is-on {
  color: var(--jdark);
  background: linear-gradient(180deg, var(--j1), var(--j2) 60%, var(--j3));
  box-shadow: 0 0 26px rgba(255, 150, 50, 0.4);
}

.lb-me {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-coins {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--jline);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--gold);
  font: 800 15px var(--ui);
  font-variant-numeric: tabular-nums;
}

.lb-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--jline);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--ink);
  transition: border-color 0.2s, color 0.2s;
}

.lb-icon:hover {
  border-color: var(--j2);
  color: #fff;
}

.lb-icon svg,
.icon-btn svg {
  width: 19px;
  height: 19px;
}

.fs-out,
.snd-off,
.is-fs .fs-in,
[data-mute][aria-pressed="true"] .snd-on {
  display: none;
}

.is-fs .fs-out,
[data-mute][aria-pressed="true"] .snd-off {
  display: block;
}

.lb-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 42px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--jline);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.38);
  text-align: left;
  transition: border-color 0.2s;
}

.lb-player:hover {
  border-color: var(--j2);
}

.lb-player__txt {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lb-player__txt b {
  overflow: hidden;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lb-player__txt small {
  font-size: 9.5px;
  color: var(--hot);
}

.lb-player.is-empty .lb-player__txt b {
  color: var(--j1);
}

.si-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.si-list:empty {
  display: none;
}

.gt-wbtn {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.gt-wbtn img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
}

.gt-wbtn small {
  margin-left: auto;
  padding-left: 12px;
  color: var(--j1);
  font: 600 11px var(--ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gt-wbtn.is-missing {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.gt-wbtn.is-missing img {
  opacity: 0.7;
}

.si-hint {
  margin: 12px 0 0;
  color: var(--j1);
  font: 500 12.5px/1.4 var(--ui);
}

.lb-body {
  position: relative;
  min-height: 0;
}

.lb-pane {
  position: absolute;
  inset: 0;
  padding: 6px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  animation: pane-in 0.35s var(--ease) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 170, 90, 0.45) transparent;
}

@keyframes pane-in {
  from { opacity: 0; transform: translateX(14px); }
}

.lb-pane[data-pane="play"] {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr) minmax(290px, 360px);
  gap: 20px;
  overflow: hidden;
}

.lb-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}

.lb-kicker {
  margin: 4px 2px 0;
  color: var(--hot);
}

.lb-tables {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 4px 10px 0;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 170, 90, 0.45) transparent;
}

.lb-table {
  --accent: var(--j2);
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--jline);
  border-radius: 16px;
  background: var(--jbg);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.lb-table:hover {
  border-color: var(--jline-2);
  background: rgba(40, 19, 8, 0.92);
  transform: translateX(3px);
}

.lb-table.is-on {
  border-color: var(--j2);
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), linear-gradient(180deg, rgba(255, 170, 80, 0.16), rgba(255, 125, 20, 0.05)), var(--jbg);
  box-shadow: 0 0 0 1px var(--j2) inset, 0 0 40px rgba(255, 150, 50, 0.2);
}

.lb-table.is-soon {
  cursor: default;
}

.lb-table.is-soon:hover {
  transform: none;
  border-color: var(--jline);
  background: var(--jbg);
}

.lb-table.is-soon .lb-table__body {
  opacity: 0.7;
}

.lb-table__art {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 10px;
  background: radial-gradient(80% 70% at 50% 30%, rgba(120, 62, 24, 0.9), rgba(20, 9, 3, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255, 220, 170, 0.14), 0 8px 18px rgba(0, 0, 0, 0.45);
}

.lb-table__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-table.is-soon .lb-table__art {
  color: var(--accent);
  background: radial-gradient(90% 70% at 50% 20%, rgba(30, 70, 40, 0.85), rgba(10, 18, 10, 0.95));
}

.lb-table.is-loading .lb-table__art {
  animation: breathe 1.4s ease-in-out infinite;
}

.soon-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: none;
}

.lb-table__body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.lb-table__name {
  font: 900 24px / 0.92 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  color: #fff6ea;
}

.lb-table.is-on .lb-table__name {
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
}

.lb-table__tag {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-3);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lb-table__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin-top: 2px;
}

.lb-table__row em {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-style: normal;
}

.lb-table__row em small {
  font-size: 9px;
  color: var(--ink-3);
}

.lb-table__row em b {
  overflow: hidden;
  font: 800 13.5px var(--ui);
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lb-table__row em + em b {
  color: var(--ink);
}

.lb-table__row em.is-soon {
  font: 800 11px var(--ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.lb-tag {
  position: absolute;
  top: -9px;
  right: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--j2);
  color: var(--jdark);
  font: 800 9.5px var(--ui);
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lb-tag--soon {
  background: rgba(255, 236, 214, 0.2);
  color: #fff;
}

.lb-tag--daily {
  background: var(--epic);
}

.lb-event {
  grid-template-columns: 64px minmax(0, 1fr);
  margin-top: 4px;
  padding: 8px 14px 8px 10px;
  background: radial-gradient(120% 140% at 0% 50%, rgba(255, 190, 80, 0.14), transparent 60%), var(--jbg);
}

.lb-event:hover {
  background: radial-gradient(120% 140% at 0% 50%, rgba(255, 190, 80, 0.2), transparent 60%), rgba(40, 19, 8, 0.92);
}

.lb-event__art,
.ev-art {
  position: relative;
  display: grid;
  place-items: center;
  overflow: visible;
  aspect-ratio: 1;
  background: none;
  box-shadow: none;
}

.lb-event__art::before,
.ev-art::before {
  content: "";
  position: absolute;
  inset: 8% 6% 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 196, 92, 0.62), rgba(255, 125, 20, 0.2) 62%, transparent);
  filter: blur(8px);
  animation: ev-glow 3.4s ease-in-out infinite;
}

.ev-box {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
  animation: ev-bob 3.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ev-bob {
  50% { transform: translateY(-6%) rotate(-1.5deg); }
}

@keyframes ev-glow {
  50% { opacity: 0.55; transform: scale(0.9); }
}

.lb-event__kicker {
  font-size: 9.5px;
  color: var(--hot);
}

.lb-event .lb-table__name {
  font-size: 21px;
}

.lb-event__count {
  font: 700 12.5px var(--ui);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.lb-event__count b {
  font-weight: 800;
  font-size: 14px;
  color: var(--gold);
}

.lb-seg {
  width: min(420px, 100%);
  margin-bottom: 20px;
}

.ev-list {
  display: grid;
  gap: 26px;
}

.ev-item + .ev-item {
  padding-top: 26px;
  border-top: 1px solid var(--jline);
}

.ev-card {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 22px 26px 22px 18px;
  border: 1px solid var(--jline-2);
  border-radius: 20px;
  background: radial-gradient(90% 120% at 0% 40%, rgba(255, 180, 70, 0.14), transparent 60%), linear-gradient(135deg, rgba(255, 210, 58, 0.08), rgba(255, 125, 20, 0.04)), rgba(14, 6, 2, 0.6);
}

.ev-card.is-ended {
  border-color: var(--jline);
}

.ev-art {
  padding: 6px;
}

.ev-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ev-title {
  margin: 2px 0 0;
  font-size: clamp(34px, 4vw, 50px);
  color: #fff;
}

.ev-prize {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.ev-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}

.ev-count b {
  font-size: 46px;
  line-height: 0.9;
  color: #ffe27a;
  text-shadow: 0 0 18px rgba(255, 210, 58, 0.45);
}

.ev-count span {
  font: 700 14px var(--ui);
  color: var(--ink-2);
}

.ev-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 10), minmax(0, 1fr));
  gap: 6px;
  max-width: 420px;
  margin: 4px 0 2px;
}

.ev-grid i {
  aspect-ratio: 1;
  border: 1px solid var(--jline);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
}

.ev-grid i.is-on {
  border-color: rgba(255, 220, 140, 0.7);
  background: linear-gradient(180deg, var(--j1), var(--j2) 55%, var(--j3));
  box-shadow: 0 0 10px rgba(255, 160, 50, 0.4);
}

.ev-grid i.is-today {
  box-shadow: 0 0 0 2px rgba(255, 240, 200, 0.85), 0 0 16px rgba(255, 190, 80, 0.7);
}

.ev-lines {
  display: grid;
  gap: 4px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-2);
}

.ev-lines li.is-ok {
  color: #b9f5c9;
}

.ev-gate {
  margin: 6px 0 0;
}

.ev-rules {
  margin-top: 6px;
}

.ev-rules ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.ev-rules li::marker {
  color: var(--j2);
}

.ev-empty {
  padding: 18px 2px 6px;
}

.lb-stage {
  pointer-events: none;
}

.lb-play {
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 0;
  padding-bottom: 6px;
}

.lb-sel {
  padding: 16px 18px;
  border: 1px solid var(--jline);
  border-radius: 16px;
  background: var(--jbg);
}

.lb-sel .label {
  color: var(--hot);
}

.lb-sel b {
  display: block;
  margin: 6px 0;
  font-size: 38px;
  color: #fff;
}

.lb-sel p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

.lb-perk {
  display: inline-block;
  margin-top: 8px !important;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 217, 74, 0.4);
  background: rgba(59, 217, 74, 0.1);
  color: var(--green) !important;
  font: 700 11.5px var(--ui);
}

.lb-perk.is-hidden {
  display: none;
}

.lb-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lb-mode {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--jline);
  border-radius: 14px;
  background: var(--jbg);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.lb-mode:hover {
  border-color: var(--jline-2);
  background: rgba(40, 19, 8, 0.92);
}

.lb-mode b {
  font: 900 21px / 0.95 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  color: #fff6ea;
}

.lb-mode em {
  overflow: hidden;
  font: 700 11.5px var(--ui);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lb-mode.is-on {
  border-color: var(--j2);
  background: linear-gradient(180deg, rgba(255, 170, 80, 0.2), rgba(255, 125, 20, 0.06)), var(--jbg);
  box-shadow: 0 0 0 1px var(--j2) inset, 0 0 30px rgba(255, 150, 50, 0.2);
}

.lb-mode.is-on em {
  color: var(--gold);
}

.lb-mode.is-done b {
  color: var(--ink-2);
}

.lb-modetext {
  margin: -2px 2px 0;
  min-height: 2.6em;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
}

.lb-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lb-stats > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--jline);
  border-radius: 14px;
  background: var(--jbg);
}

.lb-stats .label {
  font-size: 9.5px;
  color: var(--ink-3);
}

.lb-stats b {
  overflow: hidden;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.lb-playbtn {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 18px 20px 12px;
  border-radius: 18px;
  color: var(--jdark);
  background: linear-gradient(180deg, var(--j1), var(--j2) 55%, var(--j3));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 0 50px rgba(255, 150, 50, 0.42), 0 18px 40px rgba(0, 0, 0, 0.4);
  transform: skewX(-4deg);
  transition: transform 0.15s var(--ease), box-shadow 0.2s, filter 0.2s;
}

.lb-playbtn b {
  font-size: 60px;
  line-height: 0.85;
  transform: skewX(4deg);
}

.lb-playbtn small {
  color: rgba(36, 16, 5, 0.7);
  transform: skewX(4deg);
}

.lb-playbtn:hover {
  transform: skewX(-4deg) translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) inset, 0 0 70px rgba(255, 190, 90, 0.6), 0 18px 40px rgba(0, 0, 0, 0.4);
}

.lb-playbtn:active {
  transform: skewX(-4deg) scale(0.98);
}

.lb-playbtn.is-busy,
.lb-playbtn.is-done {
  filter: saturate(0.4) brightness(0.8);
}

.lb-playbtn.is-busy {
  cursor: progress;
}

.lb-hint {
  margin: 0;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.lb-card {
  width: min(640px, 100%);
  margin: 8px auto 30px;
  padding: 26px;
  border: 1px solid var(--jline);
  border-radius: 22px;
  background: radial-gradient(120% 60% at 100% 0%, rgba(255, 140, 40, 0.1), transparent 60%), var(--jbg-2);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 220, 170, 0.06);
}

.lb-card--wide {
  width: min(980px, 100%);
}

.lb-card__head h2 {
  margin: 6px 0 16px;
  font-size: clamp(36px, 4.6vw, 58px);
  color: #fff;
}

.lb-lead {
  margin: -6px 0 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.lb-sub {
  margin: 16px 0 10px;
  color: var(--hot);
}

.lb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
  padding: 5px;
  border: 1px solid var(--jline);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.36);
}

.lb-chips button {
  flex: 1 1 auto;
  padding: 10px 14px;
  border-radius: 10px;
  font: 700 13px var(--ui);
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}

.lb-chips button:hover {
  color: #fff;
}

.lb-chips button.is-on {
  color: var(--jdark);
  background: linear-gradient(180deg, var(--j1), var(--j2) 60%, var(--j3));
}

.lb-chips button.is-soon {
  cursor: default;
  color: var(--ink-3);
}

.lb-chips--sm {
  display: inline-flex;
  margin-right: 6px;
}

.lb-chips--sm button {
  flex: none;
  padding: 7px 12px;
  font-size: 12px;
}

.lb-chips.is-hidden {
  display: none;
}

.lb-board {
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--jline);
  border-radius: 16px;
  background: rgba(14, 6, 2, 0.92);
}

.lb-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lb-rows li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  transition: background 0.2s;
}

.lb-rows li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-rows li:hover {
  background: rgba(255, 150, 50, 0.05);
}

.lb-rows .n {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--jline-2);
  background: rgba(255, 150, 50, 0.07);
  font: 900 22px var(--display);
  font-variation-settings: "wdth" 62;
  color: var(--j1);
}

.lb-rows li.is-1 .n { color: var(--jdark); background: linear-gradient(180deg, #ffe680, #ffb23e); border-color: #ffd23f; box-shadow: 0 0 22px rgba(255, 210, 63, 0.5); }
.lb-rows li.is-2 .n { color: var(--jdark); background: linear-gradient(180deg, #f2f4f8, #aab4c2); border-color: #cfd6de; }
.lb-rows li.is-3 .n { color: var(--jdark); background: linear-gradient(180deg, #ffc28a, #c7773a); border-color: #e39b5c; }
.lb-rows li.is-me { background: rgba(255, 150, 50, 0.1); }

.lb-rows .nm {
  display: grid;
  min-width: 0;
}

.lb-rows .nm b {
  overflow: hidden;
  font-size: 16px;
  color: #fff6ea;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lb-rows .sc {
  font: 900 28px var(--display);
  font-variation-settings: "wdth" 62;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.lb-rows .ago {
  text-align: right;
  font-size: 11.5px;
  color: var(--ink-3);
}

.lb-empty {
  margin: 0;
  padding: 26px 20px;
  color: var(--ink-2);
}

.gt-fine {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.lb-rank {
  margin: -4px 0 18px;
}

.lb-rank__next {
  font-size: 12.5px;
  color: var(--ink-2);
}

.bar {
  height: 8px;
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--jline);
  background: rgba(0, 0, 0, 0.45);
}

.bar i {
  display: block;
  width: 2%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--j3), var(--j1));
  box-shadow: 0 0 0.6em rgba(255, 138, 30, 0.7);
  transition: width 0.5s ease;
}

.scr--modal {
  place-items: center;
  padding: 20px;
  z-index: 28;
  background: rgba(12, 5, 2, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.gt-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid var(--jline);
  border-radius: 22px;
  background: radial-gradient(120% 60% at 100% 0%, rgba(255, 140, 40, 0.12), transparent 60%), var(--jbg-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  touch-action: pan-y;
}

.gt-card--small {
  width: min(460px, 100%);
}

.gt-card h2 {
  margin: 8px 0 12px;
  font-size: clamp(38px, 5vw, 58px);
  color: #fff9ef;
}

.gt-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

#player-name {
  width: 100%;
  margin-top: 16px;
  padding: 15px 18px;
  border: 1px solid var(--jline-2);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font: 600 19px var(--ui);
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}

#player-name:focus {
  outline: none;
  border-color: var(--j2);
  box-shadow: 0 0 0 3px rgba(255, 170, 80, 0.25);
}

.gt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font: 800 14px var(--ui);
  color: var(--jdark);
  background: linear-gradient(180deg, var(--j1), var(--j2) 60%, var(--j3));
  box-shadow: 0 0 24px rgba(255, 150, 50, 0.35);
  transition: transform 0.15s var(--ease), box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.lb-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 34px rgba(255, 190, 90, 0.5);
}

.lb-btn--ghost {
  color: var(--ink);
  background: none;
  border: 1px solid var(--jline-2);
  box-shadow: none;
}

.lb-btn--ghost:hover {
  border-color: var(--j2);
  background: rgba(255, 170, 80, 0.08);
  box-shadow: none;
}

.lb-btn--big {
  padding: 16px 34px;
  font-size: 16px;
}

.lb-btn svg {
  width: 16px;
  height: 16px;
}

a.lb-btn {
  text-decoration: none;
}

.lb-btn.is-hidden {
  display: none;
}

.pause-info {
  display: grid;
  gap: 2px;
  margin: 2px 0 4px;
  overflow: hidden;
  border: 1px solid var(--jline);
  border-radius: 14px;
}

.pause-info:empty {
  display: none;
}

.pause-row {
  display: grid !important;
  grid-template-columns: 8.5em 1fr;
  gap: 12px;
  margin: 0 !important;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  font-size: 13.5px !important;
  line-height: 1.35 !important;
}

.pause-row b {
  font-weight: 700;
  color: var(--hot);
}

.pause-row span {
  color: var(--ink);
}

.scr--over {
  place-items: center;
  padding: 20px;
  z-index: 22;
  background: radial-gradient(80% 70% at 50% 50%, rgba(12, 5, 2, 0.5), rgba(12, 5, 2, 0.84));
}

.ov-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(620px, 100%);
  height: min(820px, calc(100dvh - 40px));
  overflow-y: auto;
  padding: 26px 30px;
  border: 1px solid var(--jline);
  border-radius: 24px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 140, 40, 0.14), transparent 60%), var(--jbg-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  text-align: center;
  touch-action: pan-y;
}

.ov-player {
  margin: 8px 0 0;
  font: 700 15px var(--ui);
  color: var(--j1);
}

.over__score {
  display: block;
  margin: 10px 0 6px;
  font-size: clamp(64px, 12vmin, 120px);
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(255, 150, 50, 0.45);
}

.ov-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: var(--ink-2);
}

.ov-meta b {
  color: #fff;
}

.ov-new {
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--epic), var(--orange));
  color: var(--jdark);
}

.ov-save {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 170, 90, 0.4);
  border-radius: 14px;
  background: rgba(255, 170, 90, 0.08);
  text-align: center;
}

.ov-save p {
  margin: 0;
  color: #fff;
  font: 600 13px/1.4 var(--ui);
}

.ov-save p b {
  color: #ffaa5a;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ov-save.is-hidden,
.ov-new.is-hidden,
.ov-player.is-hidden,
.ov-board.is-hidden,
.ov-perk.is-hidden {
  display: none;
}

.ov-board {
  margin: 12px 0 0;
  color: var(--j1);
}

.ov-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
}

.ov-stats > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--jline);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.3);
}

.ov-stats .label {
  font-size: 9.5px;
  color: var(--ink-3);
}

.ov-stats b {
  overflow: hidden;
  font-size: 24px;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ov-stats b.gold {
  color: var(--gold);
}

.ov-perk {
  display: inline-block;
  margin: 12px 4px 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 217, 74, 0.4);
  background: rgba(59, 217, 74, 0.1);
  color: var(--green);
  font: 700 12.5px var(--ui);
}

.ov-card > * {
  flex: none;
}

.ov-card > .ov-perk {
  align-self: center;
}

#over-goals {
  flex: 1 1 auto;
  min-height: 96px;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.ov-row {
  justify-content: center;
  margin-top: auto;
  padding-top: 20px;
}

.ov-hint {
  margin: 12px 0 0;
  font-size: 9.5px;
  color: var(--ink-3);
}

.stars {
  display: flex;
  justify-content: center;
  margin: 10px 0 0;
  font-size: 34px;
}

.stars.is-hidden {
  display: none;
}

.rows {
  display: grid;
  gap: 8px;
}

.rows.compact {
  margin: 16px 0 0;
  text-align: left;
}

.rows.compact:empty {
  display: none;
}

.rows.compact .row {
  padding: 9px 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--jline);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

button.row:hover {
  border-color: var(--jline-2);
  background: rgba(255, 170, 80, 0.07);
}

button.row:active {
  transform: scale(0.99);
}

.row:disabled {
  cursor: default;
  opacity: 0.5;
}

.row-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--jline-2);
  background: rgba(255, 150, 50, 0.07);
  font: 900 17px var(--display);
  font-variation-settings: "wdth" 62;
  color: var(--j1);
}

.row.is-done .row-num {
  border-color: transparent;
  background: var(--green);
  color: #04300a;
  font-family: var(--ui);
}

.row-body {
  flex: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.row-name {
  font: 900 19px / 0.95 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  color: #fff6ea;
}

.row-text {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
}

.star-row {
  flex: none;
  display: flex;
  gap: 2px;
  font-size: 17px;
  line-height: 1;
}

.star {
  color: rgba(255, 255, 255, 0.16);
}

.star.is-on {
  color: var(--gold);
  text-shadow: 0 0 0.5em rgba(243, 202, 37, 0.7);
}

.coin {
  display: inline-block;
  flex: none;
  width: 0.95em;
  height: 0.95em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6cf, var(--gold) 55%, #a86a00);
  box-shadow: inset 0 0 0 0.1em #a86a00;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.cell {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--jline);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
}

.cell.is-head {
  grid-column: 1 / -1;
  padding: 14px 2px 2px;
  border-color: transparent;
  background: transparent;
}

.cell.is-head .stat-label {
  font: 900 24px / 1 var(--display);
  font-variation-settings: "wdth" 62;
  letter-spacing: 0;
  color: var(--hot);
}

.stat-label {
  font: 700 9.5px var(--ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cell-value {
  font: 900 24px / 1 var(--display);
  font-variation-settings: "wdth" 62;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  color: #fff;
}

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.item {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 14px 8px 12px;
  border: 1px solid var(--jline);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.item:hover {
  border-color: var(--jline-2);
  background: rgba(255, 170, 80, 0.07);
}

.item.is-equipped {
  border-color: var(--j2);
  background: linear-gradient(180deg, rgba(255, 170, 80, 0.16), rgba(255, 125, 20, 0.04));
  box-shadow: 0 0 0 1px var(--j2) inset, 0 0 26px rgba(255, 150, 50, 0.22);
}

.item.is-closed {
  opacity: 0.82;
}

.swatch {
  display: block;
  width: 74px;
  height: 74px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.38));
  transition: transform 0.2s ease;
}

.swatch.wide {
  width: 112px;
  height: 74px;
}

.item:hover .swatch {
  transform: translateY(-3px) scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .swatch {
    transition: none;
  }

  .item:hover .swatch {
    transform: none;
  }
}

.item-name {
  font: 700 12.5px / 1.2 var(--ui);
  text-align: center;
}

.item-state {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 700 10px var(--ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.item.is-equipped .item-state {
  color: var(--j1);
}

.item-state.price {
  color: var(--gold);
  letter-spacing: 0;
  font-size: 12px;
}

.item-state.price::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 0 0 2px #a86a00;
}

.howto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
  gap: 12px;
}

.how {
  padding: 16px 18px;
  border: 1px solid var(--jline);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}

.how h3 {
  margin: 0 0 10px;
  font: 900 22px / 1 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  color: var(--hot);
}

.how ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how li {
  display: grid;
  grid-template-columns: 6.4em 1fr;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-2);
}

.how li b {
  font-weight: 700;
  color: var(--ink);
}

.how li span:only-child {
  grid-column: 1 / -1;
}

.set-list {
  display: grid;
  gap: 12px;
}

.set-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px 18px;
  border: 1px solid var(--jline);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}

.set-text {
  display: grid;
  gap: 3px;
  flex: 1 1 220px;
  min-width: 0;
}

.set-text b {
  font: 700 15px var(--ui);
  color: var(--ink);
}

.set-text small {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-3);
}

.set-row .lb-chips {
  margin: 0;
}

.set-seg {
  flex: 0 1 auto;
}

.set-slide {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 260px;
  max-width: 380px;
}

.set-slide output {
  min-width: 2.6em;
  text-align: right;
  font: 800 15px var(--ui);
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

.set-slide input {
  --fill: 100%;
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-y;
}

.set-slide input::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid var(--jline);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--j3), var(--j1)) 0 0 / var(--fill) 100% no-repeat, rgba(0, 0, 0, 0.45);
}

.set-slide input::-moz-range-track {
  height: 8px;
  border: 1px solid var(--jline);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--j3), var(--j1)) 0 0 / var(--fill) 100% no-repeat, rgba(0, 0, 0, 0.45);
}

.set-slide input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border: 2px solid var(--jdark);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--j1), var(--j2) 60%, var(--j3));
  box-shadow: 0 0 14px rgba(255, 150, 50, 0.5);
}

.set-slide input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--jdark);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--j1), var(--j2) 60%, var(--j3));
  box-shadow: 0 0 14px rgba(255, 150, 50, 0.5);
}

.set-slide input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 999px;
}

.toast {
  position: fixed;
  left: 50%;
  top: max(14%, 80px);
  z-index: 50;
  max-width: min(80%, 520px);
  padding: 10px 18px;
  border: 1px solid var(--jline-2);
  border-radius: 999px;
  background: rgba(24, 11, 5, 0.92);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font: 700 13.5px / 1.3 var(--ui);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -0.8em);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.hud.is-hidden {
  opacity: 0;
}

.hud.is-hidden * {
  pointer-events: none !important;
}

.card,
.chip,
.icon-btn,
.nudge,
.dmd-box,
.pick,
.tip {
  pointer-events: auto;
}

.card {
  padding: 13px 15px;
  border: 1px solid var(--jline);
  border-radius: 16px;
  background: var(--jbg);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 220, 170, 0.08);
}

.card-kicker {
  margin: 0 0 6px;
  font: 800 0.68em / 1 var(--ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hot);
}

.side {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  font-size: clamp(12px, 1.05vw, 16px);
}

.side.left {
  left: max(14px, env(safe-area-inset-left));
  width: clamp(250px, 25vw, 380px);
}

.side.right {
  right: max(14px, env(safe-area-inset-right));
  width: clamp(220px, 20vw, 300px);
}

.dmd-box {
  position: relative;
  width: 100%;
  aspect-ratio: 176 / 32;
  overflow: hidden;
  border: 0.32em solid #2a1408;
  border-radius: 0.7em;
  background: #0a0402;
  box-shadow: 0 0 0 1px var(--jline-2), 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 28px rgba(255, 138, 30, 0.2);
}

.dmd-box canvas {
  position: absolute;
  inset: 0.25em;
  width: calc(100% - 0.5em);
  height: calc(100% - 0.5em);
  filter: drop-shadow(0 0 2px rgba(255, 170, 60, 0.8)) brightness(1.2);
}

.dmd-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 40%);
  pointer-events: none;
}

.score-card {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
}

.score-num {
  overflow: hidden;
  font: 900 2.5em / 0.9 var(--display);
  font-variation-settings: "wdth" 62;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 0.5em rgba(255, 160, 50, 0.4);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mult {
  flex: none;
  min-width: 2.4em;
  padding: 0.22em 0.45em 0.16em;
  border-radius: 0.5em;
  font: 900 1.6em / 1 var(--display);
  font-variation-settings: "wdth" 62;
  text-align: center;
  color: var(--jdark);
  background: linear-gradient(180deg, var(--j1), var(--j2) 55%, var(--j3));
  box-shadow: 0 0 1em rgba(255, 150, 50, 0.5);
}

.mult.is-pop {
  animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes pop {
  0% { transform: scale(1.6); }
  100% { transform: scale(1); }
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6em;
  font: 800 0.74em / 1.1 var(--ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.rank-tag {
  text-align: right;
  color: var(--gold);
}

.rank-stars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.2em;
}

.rank-stars i {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.14);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.rank-stars i.is-on {
  background: var(--gold);
  filter: drop-shadow(0 0 4px rgba(243, 202, 37, 0.9));
}

.flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
}

.flag {
  padding: 0.28em 0.6em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font: 700 0.68em / 1.1 var(--ui);
  letter-spacing: 0.04em;
}

.flag.is-common { color: var(--cyan); border-color: rgba(34, 200, 245, 0.5); }
.flag.is-rare { color: var(--green); border-color: rgba(59, 217, 74, 0.45); }
.flag.is-epic { color: var(--epic); border-color: rgba(242, 197, 58, 0.5); }
.flag.is-legendary { color: var(--legend); border-color: rgba(255, 138, 30, 0.55); }

.mission-card {
  border-left: 0.3em solid var(--amber);
}

.mission-card.is-common { border-left-color: var(--cyan); }
.mission-card.is-rare { border-left-color: var(--green); }
.mission-card.is-epic { border-left-color: var(--epic); }
.mission-card.is-legendary { border-left-color: var(--legend); }
.mission-card.is-common .card-kicker { color: var(--cyan); }
.mission-card.is-rare .card-kicker { color: var(--green); }
.mission-card.is-epic .card-kicker { color: var(--epic); }
.mission-card.is-legendary .card-kicker { color: var(--legend); }

.mission-name {
  margin: 0 0 0.3em;
  font: 900 1.5em / 0.95 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  color: #fff6ea;
}

.mission-text {
  margin: 0 0 0.55em;
  font: 500 0.86em / 1.35 var(--ui);
  color: var(--ink);
}

.mission-bar {
  height: 0.45em;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
}

.mission-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--j3), var(--j1));
  transition: width 0.25s ease;
}

.mission-card.is-common .mission-bar i { background: linear-gradient(90deg, #0a7fb0, var(--cyan)); }
.mission-card.is-rare .mission-bar i { background: linear-gradient(90deg, #0c9a1a, var(--green)); }
.mission-card.is-epic .mission-bar i { background: linear-gradient(90deg, #b88a10, var(--epic)); }
.mission-card.is-legendary .mission-bar i { background: linear-gradient(90deg, #c45a00, var(--legend)); }

.mission-meta,
.mission-lit {
  margin: 0.5em 0 0;
  font: 600 0.76em / 1.3 var(--ui);
  color: var(--ink-2);
}

.mission-lit:empty,
.mission-meta:empty,
.mission-text:empty {
  display: none;
}

.top-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45em;
}

.chip,
.icon-btn,
.nudge {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--jline);
  background: rgba(16, 7, 3, 0.66);
  color: var(--ink);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
}

.chip {
  height: 2.6em;
  gap: 0.45em;
  padding: 0 0.85em 0 0.75em;
  border-radius: 999px;
  font: 800 0.95em / 1 var(--ui);
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  pointer-events: none;
}

.icon-btn {
  width: 2.6em;
  height: 2.6em;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.12s ease, border-color 0.2s;
}

.icon-btn:hover {
  border-color: var(--j2);
}

.icon-btn:active,
.nudge:active {
  transform: scale(0.92);
}

.keys-card {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
}

.key-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3em;
  font: 500 0.8em / 1.2 var(--ui);
  color: var(--ink-2);
  transition: color 0.12s ease;
}

.key-row b {
  margin-left: 0.3em;
  font-weight: 600;
}

.key-row.small b + .kbd {
  margin-left: 0.6em;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9em;
  height: 1.9em;
  padding: 0 0.35em;
  border-radius: 0.4em;
  font: 700 0.9em / 1 var(--ui);
  color: var(--jdark);
  background: linear-gradient(180deg, #fff3e2, #e9cfa8);
  box-shadow: 0 0.18em 0 #8a5a24, 0 0.3em 0.6em rgba(0, 0, 0, 0.4);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.kbd.wide {
  min-width: 3.2em;
}

.key-row.is-on {
  color: var(--ink);
}

.key-row.is-on .kbd {
  transform: translateY(0.14em);
  background: linear-gradient(180deg, var(--j1), var(--j2));
  box-shadow: 0 0.04em 0 #8a5a24, 0 0 0.9em rgba(255, 170, 60, 0.8);
}

.tricks-card .trick {
  position: relative;
  margin: 0.4em 0 0;
  padding-left: 0.9em;
  font: 500 0.8em / 1.35 var(--ui);
  color: var(--ink);
}

.tricks-card .trick::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: var(--j2);
  box-shadow: 0 0 0.5em var(--j2);
}

.tricks-card .trick.dim {
  padding-left: 0;
  color: var(--ink-2);
}

.tricks-card .trick.dim::before {
  display: none;
}

.pick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(640px, 92vw);
  padding: 1.1em 1.1em 0.9em;
  border: 1px solid var(--jline-2);
  border-radius: 1.3em;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 140, 40, 0.16), transparent 60%), rgba(24, 11, 5, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(255, 138, 30, 0.22);
  text-align: center;
  font-size: clamp(12px, 1.2vw, 17px);
  transform: translate(-50%, -50%);
  animation: rise 0.35s cubic-bezier(0.2, 1.2, 0.3, 1);
}

.pick.is-hidden {
  display: none;
}

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, -42%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.pick-title {
  margin: 0 0 0.6em;
  font: 900 2em / 0.9 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  color: #fff;
}

.pick-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6em;
}

.pick-card {
  padding: 0.75em 0.75em 0.65em;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9em;
  background: rgba(0, 0, 0, 0.35);
  text-align: left;
  opacity: 0.6;
  transform: scale(0.97);
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pick-card.is-on {
  opacity: 1;
  transform: scale(1.03);
  background: rgba(50, 23, 9, 0.8);
}

.pick-card.is-common.is-on { border-color: var(--cyan); box-shadow: 0 0 1.4em rgba(34, 200, 245, 0.45); }
.pick-card.is-rare.is-on { border-color: var(--green); box-shadow: 0 0 1.4em rgba(59, 217, 74, 0.4); }
.pick-card.is-epic.is-on { border-color: var(--epic); box-shadow: 0 0 1.4em rgba(242, 197, 58, 0.45); }
.pick-card.is-legendary.is-on { border-color: var(--legend); box-shadow: 0 0 1.4em rgba(255, 138, 30, 0.5); }

.pick-head {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.pick-tier {
  font: 800 0.66em / 1 var(--ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.is-common .pick-tier { color: var(--cyan); }
.is-rare .pick-tier { color: var(--green); }
.is-epic .pick-tier { color: var(--epic); }
.is-legendary .pick-tier { color: var(--legend); }

.pick-name {
  font: 900 1.3em / 0.95 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
}

.pick-text {
  margin: 0.45em 0 0.35em;
  font: 500 0.8em / 1.35 var(--ui);
  color: var(--ink);
}

.pick-time {
  margin: 0;
  font: 700 0.7em / 1 var(--ui);
  color: var(--ink-2);
}

.pick-help {
  margin: 0.8em 0 0;
  font: 600 0.82em / 1.2 var(--ui);
  color: var(--ink-2);
}

.banner {
  position: absolute;
  left: 50%;
  top: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.6);
}

.banner.is-hidden {
  display: none;
}

.banner.is-shown {
  animation: banner 0.5s cubic-bezier(0.2, 1.5, 0.35, 1) forwards;
}

@keyframes banner {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.banner-kicker {
  font: 800 clamp(13px, 1.4vw, 20px) / 1 var(--ui);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff7e6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.banner-text {
  font: 900 clamp(46px, 7.4vw, 116px) / 0.9 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  color: var(--j1);
  text-shadow: 0 0.04em 0 #3a1603, 0 0 0.35em rgba(255, 170, 60, 0.75), 0 0 1.1em rgba(255, 125, 20, 0.55);
}

.banner.is-cyan .banner-text { color: #bff3ff; text-shadow: 0 0.04em 0 #052a3a, 0 0 0.35em rgba(34, 200, 245, 0.8), 0 0 1.1em rgba(34, 200, 245, 0.5); }
.banner.is-orange .banner-text { color: #ffc27a; text-shadow: 0 0.04em 0 #3a1603, 0 0 0.35em rgba(255, 125, 20, 0.9), 0 0 1.1em rgba(255, 125, 20, 0.6); }

.banner-sub {
  font: 700 clamp(13px, 1.3vw, 19px) / 1.2 var(--ui);
  color: #fff3e2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.tip {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  padding: 0.8em 0.95em;
  border-radius: 1em;
  background: linear-gradient(180deg, #fff3e2, #f0d8b4);
  color: var(--jdark);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(255, 170, 60, 0.6);
  font: 600 0.92em / 1.35 var(--ui);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.6em);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tip.is-hidden {
  display: none;
}

.tip.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.tip-tag {
  flex: none;
  padding: 0.25em 0.55em 0.2em;
  border-radius: 0.4em;
  font: 900 0.95em / 1 var(--display);
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  color: #fff7e6;
  background: var(--og);
}

.nudge {
  position: absolute;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: none;
  gap: 0.45em;
  height: 2.6em;
  padding: 0 1.2em;
  border-radius: 999px;
  font: 800 0.82em / 1 var(--ui);
  letter-spacing: 0.14em;
  transform: translateX(-50%);
}

.nudge svg {
  width: 1.2em;
  height: 1.2em;
  color: var(--j2);
}

body.is-touch .nudge {
  display: flex;
}

.hint {
  position: absolute;
  padding: 0.45em 0.85em;
  border: 2px solid var(--j2);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff3e2, #f0d8b4);
  box-shadow: 0 0.3em 1em rgba(0, 0, 0, 0.5), 0 0 1em rgba(255, 170, 60, 0.5);
  color: var(--jdark);
  font: 700 clamp(12px, 1.1vw, 15px) / 1 var(--ui);
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease;
  animation: hint-pulse 1.6s ease-in-out infinite;
}

.hint.is-hidden {
  opacity: 0;
  animation: none;
}

@keyframes hint-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.07); }
}

@keyframes breathe {
  50% { opacity: 0.45; }
}

body.is-portrait .side.left {
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  top: max(8px, env(safe-area-inset-top));
  width: auto;
  gap: 0.4em;
  font-size: 12px;
}

body.is-portrait .score-card,
body.is-portrait .mission-card,
body.is-portrait .keys-card,
body.is-portrait .tricks-card {
  display: none;
}

body.is-portrait .dmd-box {
  width: calc(100% - 3.4em);
}

body.is-portrait .side.right {
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  width: auto;
  font-size: 12px;
}

body.is-portrait .top-buttons {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35em;
}

body.is-portrait .chip {
  display: none;
}

body.is-portrait .pick-list {
  grid-template-columns: 1fr;
}

body.is-portrait .pick {
  top: 52%;
}

body.is-portrait .banner {
  top: 26%;
}

body.is-portrait .tip {
  margin-right: 3.4em;
  font-size: 13px;
}

body.is-touch .keys-card {
  display: none;
}

.lb-tabs button:focus-visible,
.lb-table:focus-visible,
.lb-mode:focus-visible,
.lb-playbtn:focus-visible,
.lb-btn:focus-visible,
.lb-icon:focus-visible,
.lb-player:focus-visible,
.lb-chips button:focus-visible,
.row:focus-visible,
.item:focus-visible,
.icon-btn:focus-visible,
.st-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

html[data-screen="start"] #game,
html[data-screen="lobby"] #game,
html[data-screen="loading"] #game {
  visibility: hidden;
}

.ds {
  --glide: cubic-bezier(0.45, 0.05, 0.2, 1);
  --wall: #0f0602;
  --boards: #1c0b04;
  position: fixed;
  inset: 0;
  z-index: 19;
  display: none;
  overflow: hidden;
  contain: strict;
  background: linear-gradient(180deg, var(--wall), #140803 60%, var(--boards));
}

html[data-screen="start"] .ds,
html[data-screen="lobby"] .ds {
  display: block;
  animation: ds-in 0.45s ease both;
}

@keyframes ds-in {
  from { opacity: 0; }
}

html[data-screen="lobby"]:not([data-tab="play"]) .ds-rack,
html[data-screen="lobby"]:not([data-tab="play"]) .ds-dim,
html[data-screen="lobby"]:not([data-tab="play"]) .ds-lit {
  visibility: hidden;
}

.ds-cam {
  position: absolute;
  left: 0;
  top: 0;
  width: 3840px;
  height: 2160px;
  overflow: hidden;
  transform-origin: 0 0;
  transition: transform 0.6s var(--glide);
}

.ds.is-gliding .ds-cam {
  will-change: transform;
}

.ds-cam::before,
.ds-cam::after,
.ds-edge {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
}

.ds-cam::before,
.ds-cam::after {
  content: "";
  height: 5%;
}

.ds-cam::before {
  top: 0;
  background: linear-gradient(180deg, var(--wall), transparent);
}

.ds-cam::after {
  bottom: 0;
  background: linear-gradient(0deg, var(--boards), transparent);
}

.ds-edge {
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--wall), transparent 4%, transparent 96%, var(--wall));
}

.ds-a,
.ds-v {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-drag: none;
}

.ds-v {
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ds.is-live .ds-v {
  opacity: 1;
}

.ds-dim,
.ds-lit {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
  transition: transform 0.6s var(--glide), opacity 0.45s ease;
}

.ds-dim {
  border-radius: 50%;
  background: radial-gradient(closest-side, transparent 62%, rgba(8, 3, 0, 0.5));
  box-shadow: 0 0 0 4000px rgba(8, 3, 0, 0.5);
}

.ds-lit {
  background:
    radial-gradient(42% 30% at 50% 58%, rgba(255, 196, 120, 0.16), transparent 72%),
    radial-gradient(50% 14% at 50% 97%, rgba(255, 170, 90, 0.2), transparent 70%);
}

.ds[data-mode="start"] .ds-dim,
.ds[data-mode="start"] .ds-lit {
  opacity: 0;
}

.ds.is-moving .ds-lit {
  opacity: 0;
}

.ds-rack {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.ds-m {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 40px;
  background: none;
  pointer-events: auto;
  cursor: pointer;
}

.ds[data-mode="start"] .ds-m,
.ds.is-gliding .ds-m,
.ds.is-still .ds-m {
  pointer-events: none;
}

.ds-m.is-on {
  cursor: default;
}

.ds-m:focus-visible {
  outline: 10px solid var(--cyan);
  outline-offset: 16px;
}

.ds-vig {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(130% 100% at 50% 42%, transparent 58%, rgba(0, 0, 0, 0.55));
}

.ds.is-snap .ds-cam,
.ds.is-snap .ds-dim,
.ds.is-snap .ds-lit {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ds-cam,
  .ds-dim,
  .ds-lit {
    transition: none !important;
  }
  .ds-v,
  video.st-bg__media {
    display: none;
  }
}

@media (max-width: 1240px) {
  .lb-tabs button {
    padding: 10px 11px;
    font-size: 11.5px;
    letter-spacing: 0.06em;
  }
  .lb-pane[data-pane="play"] {
    grid-template-columns: minmax(270px, 340px) minmax(0, 1fr) minmax(260px, 320px);
  }
  .lb-table {
    grid-template-columns: 70px minmax(0, 1fr);
  }
  .lb-table__name {
    font-size: 21px;
  }
  .lb-coins {
    display: none;
  }
}

@media (max-width: 1040px) {
  .lockup--brand {
    display: none;
  }
  .lb-top {
    grid-template-columns: 1fr auto;
  }
  .lb-tabs {
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .lb-top {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-bottom: 8px;
  }
  .lb-me {
    grid-row: 1;
    justify-content: flex-end;
  }
  .lb-coins {
    display: flex;
    margin-right: auto;
    height: 38px;
  }
  .lb-icon,
  .lb-player {
    height: 38px;
  }
  .lb-icon {
    width: 38px;
  }
  .lb-player {
    min-width: 0;
    max-width: 50vw;
  }
  .lb-tabs {
    grid-row: 2;
    justify-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    touch-action: pan-x;
  }
  .lb-tabs::-webkit-scrollbar {
    display: none;
  }
  .lb-tabs button {
    flex: 1 0 auto;
  }
  .lb-pane[data-pane="play"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .lb-stage {
    grid-row: 1;
  }
  .lb-side {
    grid-row: 2;
    grid-template-rows: auto;
    gap: 4px;
  }
  .lb-play {
    grid-row: 3;
  }
  .lb-kicker {
    display: none;
  }
  .lb-tables {
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 78%);
    overflow-x: auto;
    overflow-y: visible;
    padding: 10px 2px 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .lb-tables::-webkit-scrollbar {
    display: none;
  }
  .lb-table {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    scroll-snap-align: start;
  }
  .lb-table:hover {
    transform: none;
  }
  .lb-table__tag {
    display: none;
  }
  .lb-table__name {
    font-size: 20px;
  }
  .lb-sel {
    display: none;
  }
  .lb-play {
    gap: 8px;
    padding-bottom: 0;
  }
  .lb-mode {
    padding: 9px 12px;
  }
  .lb-mode b {
    font-size: 18px;
  }
  .lb-modetext {
    min-height: 0;
    font-size: 12px;
  }
  .lb-stats > div {
    padding: 9px 12px;
  }
  .lb-stats b {
    font-size: 22px;
  }
  .lb-playbtn {
    padding: 14px 20px 10px;
  }
  .lb-playbtn b {
    font-size: 46px;
  }
  .lb-hint {
    display: none;
  }
  .lb-exit {
    order: -2;
  }
  .lb-card,
  .gt-card,
  .ov-card {
    padding: 20px;
  }
  .lb-rows li {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 11px 14px;
  }
  .lb-rows .n {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }
  .lb-rows .sc {
    font-size: 23px;
  }
  .lb-rows .ago {
    display: none;
  }
  .ov-stats b {
    font-size: 20px;
  }
  .ov-row .lb-btn {
    flex: 1 1 auto;
  }
  .how li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .lb-event {
    grid-template-columns: 54px minmax(0, 1fr);
    margin-top: 0;
  }
  .lb-event .lb-table__name {
    font-size: 19px;
  }
  .ev-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px;
  }
  .ev-art {
    width: 150px;
    justify-self: center;
  }
  .ev-count b {
    font-size: 40px;
  }
  .ev-grid {
    gap: 5px;
    max-width: none;
  }
  .lb-seg {
    width: 100%;
  }
  .set-row {
    padding: 12px 14px;
  }
  .set-seg {
    width: 100%;
  }
  .set-seg button {
    flex: 1 1 auto;
    padding: 9px 4px;
    font-size: 12px;
  }
  .set-slide {
    flex-basis: 100%;
    max-width: none;
  }
}

@media (max-width: 860px) and (max-height: 520px) and (orientation: landscape) {
  .lb-top {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 6px;
  }
  .lb-me {
    grid-column: 2;
    grid-row: 1;
  }
  .lb-coins {
    display: none;
  }
  .lb-tabs {
    grid-column: 1;
    grid-row: 1;
  }
  .lb-pane[data-pane="play"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 12px;
  }
  .lb-tables {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
    padding: 12px 6px 4px 0;
  }
  .lb-stage {
    display: none;
  }
  .lb-side,
  .lb-play {
    grid-row: 1;
  }
  .lb-modetext,
  .lb-stats {
    display: none;
  }
  .lb-playbtn b {
    font-size: 36px;
  }
}

@media (max-height: 640px) and (min-width: 861px) {
  .lb-sel p {
    display: none;
  }
  .lb-sel b {
    font-size: 30px;
  }
  .lb-table__tag {
    display: none;
  }
  .lb-playbtn b {
    font-size: 46px;
  }
  .lb-modetext {
    display: none;
  }
}

@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  .side {
    gap: 0.45em;
    font-size: 11px;
  }
  .keys-card,
  .tricks-card,
  .mission-text {
    display: none;
  }
}

@media (max-width: 380px) {
  .st-btn {
    padding: 16px 32px 14px;
  }
  .lb-player__txt b {
    font-size: 13px;
  }
}

html[data-calm] .ds-cam,
html[data-calm] .ds-dim,
html[data-calm] .ds-lit {
  transition: none !important;
}

html[data-calm] .ds-v {
  display: none;
}

html[data-calm] .lockup.is-alive,
html[data-calm] .lockup.is-alive::before,
html[data-calm] .scr,
html[data-calm] .lb-pane,
html[data-calm] .st-btn,
html[data-calm] .toast,
html[data-calm] .hint,
html[data-calm] .banner.is-shown,
html[data-calm] .pick,
html[data-calm] .mult.is-pop,
html[data-calm] .ev-box,
html[data-calm] .ev-art::before,
html[data-calm] .lb-event__art::before,
html[data-calm] .tl-amber,
html[data-calm] .tl-name {
  transition: none;
  animation: none;
}

html[data-calm] .banner.is-shown {
  opacity: 1;
  transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: reduce) {
  .lockup.is-alive,
  .lockup.is-alive::before,
  .scr,
  .lb-pane,
  .st-btn,
  .toast,
  .hint,
  .banner.is-shown,
  .pick,
  .mult.is-pop,
  .ev-box,
  .ev-art::before,
  .lb-event__art::before {
    transition: none;
    animation: none;
  }
  .banner.is-shown {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
.lb-exit { position: absolute; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 6; pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border: 1px solid rgba(255, 190, 110, .28); border-radius: 12px; background: rgba(0, 0, 0, .35); color: rgba(255, 238, 214, .82); font: 800 12px var(--f-ui, inherit); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.lb-exit[hidden] { display: none; }
.lb-exit:hover { color: #fff; border-color: rgba(255, 190, 110, .55); background: rgba(51, 26, 12, .7); }
.lb-exit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px), (max-height: 520px) { .lb-exit span { display: none; } .lb-exit { padding: 9px 10px; left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); } }
