:root {
  --page-bg: #0f1720;
  --shell-top: #efeae0;
  --shell-bottom: #c5bdb2;
  --screen-dark: #191314;
  --screen-mid: #4f2329;
  --screen-light: #f6dede;
  --ink: #271517;
  --accent: #d95b5b;
  --danger: #fb6b6b;
  --success: #66d18a;
  --panel: rgba(28, 16, 19, 0.88);
  --panel-border: rgba(255, 220, 220, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: #f5f3ea;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(217, 91, 91, 0.1), transparent 22%),
    linear-gradient(160deg, #0f141c 0%, #14161b 52%, #06070a 100%);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

body.public-dashboard-page {
  min-height: 100vh;
  padding: 20px;
}

.public-dashboard-shell {
  width: min(1420px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.public-dashboard-header {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(18, 12, 14, 0.82);
  border: 1px solid rgba(255, 220, 220, 0.12);
}

.public-dashboard-header h1 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.public-dashboard-header p {
  color: rgba(245, 243, 234, 0.82);
}

.public-dashboard-links {
  display: grid;
  gap: 10px;
}

.public-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.public-frame-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.public-frame-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.public-frame-card__link {
  color: #ffe58a;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 229, 138, 0.35);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-frame-card__link:hover {
  border-bottom-color: rgba(255, 229, 138, 0.9);
}

.public-frame-card iframe {
  width: 100%;
  min-height: 540px;
  border: 0;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.public-frame-card--full {
  grid-column: 1 / -1;
}

.public-frame-card--full iframe {
  min-height: 720px;
}

.leaderboard-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.leaderboard-search {
  flex: 1;
}

.leaderboard-search input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 220, 220, 0.12);
  background: rgba(10, 15, 20, 0.35);
  color: #f5f3ea;
}

.leaderboard-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(245, 243, 234, 0.82);
}

.leaderboard-page-button {
  border: 1px solid rgba(255, 220, 220, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #f5f3ea;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.leaderboard-page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.leaderboard-table-wrap {
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(9, 14, 16, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 220, 220, 0.1);
}

.leaderboard-table thead th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 243, 234, 0.7);
}

.leaderboard-table thead th button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.leaderboard-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.leaderboard-table tbody td:first-child {
  width: 90px;
  font-weight: 700;
  color: #ffe58a;
}

body.embed-page {
  min-height: 100vh;
  padding: 18px;
  color: #f5f3ea;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 80% 8%, rgba(217, 91, 91, 0.1), transparent 24%),
    linear-gradient(160deg, #0f141c 0%, #14161b 52%, #06070a 100%);
}

.embed-shell {
  width: min(960px, 100%);
  margin: 0 auto;
}

.embed-panel {
  min-height: calc(100vh - 36px);
}

.embed-panel--flat {
  min-height: auto;
  padding: 16px 18px;
  border: 1px solid rgba(255, 220, 220, 0.12);
  border-radius: 20px;
  background: rgba(18, 12, 14, 0.86);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
  color: #f5f3ea;
}

.embed-panel__header {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.embed-panel__header h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.embed-list {
  max-height: none;
}

.cabinet {
  position: relative;
  width: min(1360px, calc(100vw - 32px));
  margin: 24px auto;
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(180deg, var(--shell-top), var(--shell-bottom));
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.cabinet__glow {
  position: absolute;
  inset: -10% -12% auto;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 62%);
  pointer-events: none;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  color: #2c1d1f;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.admin-login-shell {
  width: min(460px, 100%);
}

.admin-login-panel {
  display: grid;
  gap: 14px;
}

.admin-login-header {
  display: grid;
  gap: 6px;
}

.admin-login-header p {
  color: rgba(245, 243, 234, 0.8);
}

.admin-login-form {
  display: grid;
  gap: 12px;
}

.header-counters {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.72rem;
  opacity: 0.75;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.counter-pill {
  display: grid;
  gap: 0.2rem;
  min-width: 120px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 251, 247, 0.9);
  text-align: center;
  color: #2a1a1c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.counter-pill span {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.counter-pill strong {
  font-size: 1.5rem;
}

.counter-pill small {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.counter-pill--timer {
  min-width: 180px;
}

.screen-hud {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}

.screen-hud .counter-pill {
  min-width: 0;
  flex: 1;
  padding: 12px 14px;
  border: 1px solid rgba(255, 220, 220, 0.14);
  background:
    linear-gradient(180deg, rgba(88, 37, 44, 0.96), rgba(41, 16, 21, 0.98)),
    rgba(0, 0, 0, 0.18);
  color: #ffe7e7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.screen-hud .counter-pill span,
.screen-hud .counter-pill small {
  color: rgba(255, 228, 228, 0.8);
}

.screen-hud .counter-pill strong {
  color: #fff9f9;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.screen-hud .counter-pill--timer {
  flex: 1.35;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 22px;
}

.screen-shell {
  border-radius: 30px;
  background: linear-gradient(180deg, #d85a5a, #b33b45);
  padding: 18px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 -3px 0 rgba(0, 0, 0, 0.26);
}

.screen {
  position: relative;
  min-height: 760px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    linear-gradient(180deg, #24171a, #130d10 80%);
  border: 4px solid #261518;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.05),
    0 18px 26px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 2px,
    transparent 2px,
    transparent 5px
  );
  mix-blend-mode: soft-light;
  opacity: 0.3;
}

.slot-window {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 220, 220, 0.1);
  background: rgba(0, 0, 0, 0.26);
}

.slot-window__track {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 14px;
  color: #f7e9e9;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)),
    rgba(51, 18, 22, 0.88);
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  text-align: center;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.slot-window__track.is-rolling {
  transform: translateY(-2px) scale(1.01);
  filter: blur(0.2px) brightness(1.1);
}

.reveal-stage {
  position: relative;
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 470px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 220, 220, 0.1);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(39, 18, 22, 0.82), rgba(18, 10, 12, 0.96));
  overflow: hidden;
}

.reveal-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.18), transparent 38%);
  opacity: 0;
  transform: scale(0.8);
}

.reveal-stage.is-impact::before {
  animation: captureFlash 220ms ease-out;
}

.reveal-stage.is-caught .pokeball.is-caught-dark {
  animation: ballCatchSettle 980ms ease-out forwards;
}

.reveal-stage.is-failed .pokeball.is-open {
  animation: ballBreakout 980ms ease-out forwards;
}

.screen-meta-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 220, 220, 0.1);
  background:
    linear-gradient(180deg, rgba(39, 18, 22, 0.9), rgba(18, 10, 12, 0.96)),
    rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.screen-meta-panel__header {
  display: grid;
  gap: 4px;
}

.screen-meta-panel__header h2 {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f6dede;
}

.screen-meta-panel__header p {
  color: rgba(255, 230, 230, 0.72);
  font-size: 0.82rem;
  line-height: 1.4;
}

.screen-meta-stack .meta-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 220, 220, 0.08);
}

.reveal-stage__art-wrap {
  position: relative;
  width: min(100%, 430px);
  min-height: 360px;
  display: grid;
  place-items: center;
}

.reveal-stage__art-wrap::before {
  content: "";
  position: absolute;
  inset: 10% 8% 6%;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  filter: blur(18px);
  mix-blend-mode: screen;
}

.reveal-stage__art-wrap::after {
  content: "";
  position: absolute;
  inset: auto 14% 12%;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.36), transparent 72%);
  filter: blur(10px);
  opacity: 0.7;
}

#pokemon-art {
  --pokemon-art-scale: 1;
  width: min(100%, calc(360px * var(--pokemon-art-scale)));
  max-height: calc(360px * var(--pokemon-art-scale));
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45));
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#pokemon-art.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#pokemon-art.is-hidden {
  opacity: 0;
  transform: translateY(18px) scale(0.92);
}

#pokemon-art.is-animated {
  animation: bob 0.78s ease-in-out infinite alternate;
}

#pokemon-art.is-enter {
  animation: pokemonEnter 620ms ease-out both;
}

#pokemon-art.is-escape {
  animation: pokemonEscape 1100ms ease-out forwards;
}

#pokemon-art.is-exploding {
  animation: pokemonExplode 560ms ease-out forwards;
}

#pokemon-art.is-shrinking {
  animation: pokemonShrinkIntoBall 900ms ease-in forwards;
}

#pokemon-art.is-escape-left {
  animation: pokemonEscapeLeft 1100ms ease-out forwards;
}

#pokemon-art.is-escape-right {
  animation: pokemonEscapeRight 1100ms ease-out forwards;
}

.reveal-stage.is-caught .reveal-stage__art-wrap::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0 16%, rgba(118, 255, 171, 0.92) 18% 38%, rgba(65, 188, 117, 0.58) 46% 60%, rgba(65, 188, 117, 0) 74%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 68%);
  animation: glowPulseCatch 1100ms ease-out forwards;
}

.reveal-stage.is-failed .reveal-stage__art-wrap::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.98) 0 14%, rgba(255, 188, 120, 0.9) 18% 38%, rgba(240, 106, 74, 0.62) 46% 62%, rgba(240, 106, 74, 0) 76%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 70%);
  animation: glowPulseFail 1100ms ease-out forwards;
}

.reveal-stage.is-caught #pokemon-art,
.reveal-stage.is-failed #pokemon-art {
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.22)) drop-shadow(0 0 28px rgba(255, 255, 255, 0.12));
}

.reveal-stage.is-caught #pokemon-art {
  animation: pokemonAuraCatch 1100ms ease-out forwards;
}

.reveal-stage.is-failed #pokemon-art:not(.is-escape-left):not(.is-escape-right) {
  animation: pokemonAuraFail 1100ms ease-out forwards;
}

.pokeball {
  position: absolute;
  left: 50%;
  top: 78%;
  width: 78px;
  height: 78px;
  --pokeball-sprite-x: 6;
  --row-0: 9;
  --row-1: 49;
  --row-2: 89;
  --row-3: 128;
  --row-4: 169;
  --row-5: 209;
  --row-6: 249;
  --row-7: 288;
  --row-8: 331;
  --row-9: 370;
  --row-10: 404;
  --row-11: 448;
  --row-12: 488;
  --row-13: 526;
  --row-14: 568;
  --row-15: 608;
  --row-16: 646;
  --pokeball-sprite-y: var(--row-0);
  opacity: 0;
  transform: translate(-50%, -8px) scale(0.92);
}

.pokeball__x,
.pokeball__y,
.pokeball__sprite {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.pokeball__sprite {
  background-image: url("https://streambig.tv/pokemon/images/pokeballs.png");
  background-repeat: no-repeat;
  background-size: 2212px 1360px;
  background-position: calc(var(--pokeball-sprite-x) * -2px) calc(var(--pokeball-sprite-y) * -2px);
  image-rendering: pixelated;
  border-radius: 50%;
  transform-origin: center bottom;
  transition: filter 180ms ease;
}

.pokeball__sprite::before {
  content: "";
  position: absolute;
  left: 30%;
  bottom: 8px;
  width: 40%;
  height: 3px;
  border-radius: 50%;
  background: black;
  box-shadow: 0 1px 2px black;
  opacity: 0.3;
}

.pokeball.is-throwing {
  opacity: 1;
}

.pokeball.is-throwing .pokeball__x {
  animation: throwX 2200ms forwards;
}

.pokeball.is-throwing .pokeball__y {
  animation: throwY 2200ms forwards;
}

.pokeball.is-throwing .pokeball__sprite {
  animation: throwSprite 2200ms steps(1) forwards;
}

.pokeball.is-throwing .pokeball__sprite::before {
  animation: throwShadow 2200ms forwards;
}

.pokeball.is-landed {
  opacity: 1;
  --pokeball-sprite-y: var(--row-0);
}

.pokeball.is-landed .pokeball__sprite {
  transform: translateY(0) scale(1);
}

.reveal-stage.is-shake .pokeball.is-shaking {
  animation: ballShake 520ms ease-in-out 0s 1;
}

.reveal-stage.is-shake .pokeball.is-shaking .pokeball__sprite {
  animation: ballRockFrames 520ms steps(1) 0s 1 both;
}

.pokeball.is-caught {
  opacity: 1;
  transform: translate(-50%, -8px) scale(0.9);
  --pokeball-sprite-y: var(--row-0);
}

.pokeball.is-caught-dark {
  opacity: 1;
  transform: translate(-50%, -10px) scale(0.9);
  --pokeball-sprite-y: var(--row-0);
}

.pokeball.is-caught-dark .pokeball__sprite,
.pokeball.is-caught .pokeball__sprite {
  filter: brightness(0.62) saturate(0.82) contrast(1.12);
}

.pokeball.is-open {
  opacity: 1;
  transform: translate(-50%, -8px) scale(0.92);
  --pokeball-sprite-y: var(--row-10);
}

.pokeball.is-open .pokeball__sprite {
  filter: brightness(1.08) saturate(1.08);
}

.pokeball.is-failed {
  opacity: 1;
  transform: translate(-50%, 6px) scale(0.88) rotate(-7deg);
  filter: grayscale(0.18) brightness(0.92);
}

.burst-effect {
  position: absolute;
  left: 50%;
  top: 53%;
  width: 1px;
  height: 1px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
}

.burst-effect.is-active {
  opacity: 1;
}

.burst-effect::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  filter: blur(1px);
  opacity: 0;
}

.burst-effect.is-active::before {
  animation: burstCore 760ms ease-out forwards;
}

.burst-effect span {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 20%, rgba(255, 240, 170, 0.96) 20% 42%, rgba(255, 144, 144, 0.74) 42% 64%, rgba(255, 144, 144, 0) 68%);
  box-shadow: 0 0 18px rgba(255, 232, 156, 0.9);
  opacity: 0;
}

.burst-effect.is-catch span {
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0 16%, rgba(144, 248, 186, 0.95) 16% 42%, rgba(52, 171, 109, 0.72) 42% 64%, rgba(52, 171, 109, 0) 68%);
  box-shadow: 0 0 20px rgba(96, 255, 172, 0.9);
}

.burst-effect.is-release span {
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0 16%, rgba(255, 171, 121, 0.95) 16% 42%, rgba(231, 92, 92, 0.78) 42% 64%, rgba(231, 92, 92, 0) 68%);
  box-shadow: 0 0 20px rgba(255, 139, 102, 0.88);
}

.burst-effect.is-active span {
  animation: burstParticle 780ms ease-out forwards;
}

.burst-effect span:nth-child(1) { --tx: 0px; --ty: -86px; }
.burst-effect span:nth-child(2) { --tx: 58px; --ty: -70px; }
.burst-effect span:nth-child(3) { --tx: 88px; --ty: -8px; }
.burst-effect span:nth-child(4) { --tx: 62px; --ty: 58px; }
.burst-effect span:nth-child(5) { --tx: 0px; --ty: 82px; }
.burst-effect span:nth-child(6) { --tx: -60px; --ty: 62px; }
.burst-effect span:nth-child(7) { --tx: -92px; --ty: 0px; }
.burst-effect span:nth-child(8) { --tx: -62px; --ty: -66px; }
.burst-effect span:nth-child(9) { --tx: 30px; --ty: -108px; }
.burst-effect span:nth-child(10) { --tx: 112px; --ty: -34px; }
.burst-effect span:nth-child(11) { --tx: 92px; --ty: 84px; }
.burst-effect span:nth-child(12) { --tx: -32px; --ty: 104px; }

.burst-effect.is-active span:nth-child(1) { animation-delay: 0ms; }
.burst-effect.is-active span:nth-child(2) { animation-delay: 24ms; }
.burst-effect.is-active span:nth-child(3) { animation-delay: 42ms; }
.burst-effect.is-active span:nth-child(4) { animation-delay: 18ms; }
.burst-effect.is-active span:nth-child(5) { animation-delay: 34ms; }
.burst-effect.is-active span:nth-child(6) { animation-delay: 54ms; }
.burst-effect.is-active span:nth-child(7) { animation-delay: 10ms; }
.burst-effect.is-active span:nth-child(8) { animation-delay: 28ms; }
.burst-effect.is-active span:nth-child(9) { animation-delay: 14ms; }
.burst-effect.is-active span:nth-child(10) { animation-delay: 36ms; }
.burst-effect.is-active span:nth-child(11) { animation-delay: 48ms; }
.burst-effect.is-active span:nth-child(12) { animation-delay: 60ms; }

.outcome-data {
  display: none;
  gap: 6px;
  width: min(100%, 420px);
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ecf7e7;
  text-align: left;
}

.outcome-data.is-caught,
.outcome-data.is-failed {
  display: grid;
}

.outcome-data.is-caught {
  color: #dff8df;
  border-color: rgba(98, 232, 152, 0.26);
  background: rgba(6, 34, 20, 0.7);
}

.outcome-data.is-failed {
  color: #ffe5d4;
  border-color: rgba(255, 120, 88, 0.26);
  background: rgba(45, 15, 15, 0.76);
}

.outcome-data__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.outcome-data__row {
  font-size: 0.92rem;
  line-height: 1.25;
}

.reveal-stage__caption {
  min-height: 28px;
  color: var(--screen-light);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.controls {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 18px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
}

.panel h2 {
  margin-bottom: 14px;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  color: rgba(245, 243, 234, 0.88);
}

.panel input,
.panel select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
}

.panel input:focus,
.panel select:focus {
  border-color: rgba(255, 205, 96, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 205, 96, 0.12);
}

.panel input.is-invalid {
  border-color: rgba(251, 107, 107, 0.92);
  box-shadow: 0 0 0 3px rgba(251, 107, 107, 0.14);
}

.field-note {
  min-height: 1.2em;
  margin-top: -2px;
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.35;
}

.panel select option {
  color: #111;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.timer-adjust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.timer-adjust-button {
  font-size: 0.82rem;
}

.primary-button {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffd76a, #e0a92d);
  color: #241700;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 16px 18px rgba(0, 0, 0, 0.22);
}

.secondary-button {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f3ea;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.secondary-button.is-accent {
  background: rgba(102, 209, 138, 0.16);
  border-color: rgba(102, 209, 138, 0.3);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.muted {
  color: rgba(245, 243, 234, 0.65);
}

.meta-stack {
  display: grid;
  gap: 10px;
}

.meta-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-card strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.recent-list {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
}

.unlock-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.unlock-card__art-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.unlock-card__art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.unlock-card__art--empty {
  background: rgba(255, 255, 255, 0.04);
}

.unlock-card__content {
  min-width: 0;
  display: grid;
  gap: 4px;
  line-height: 1.35;
}

.unlock-card__row {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.unlock-card strong {
  display: block;
  margin-bottom: 0;
}

.unlock-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(245, 243, 234, 0.7);
  font-size: 0.8rem;
}

.unlock-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(245, 243, 234, 0.88);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.unlock-card__badge.is-shiny {
  background: rgba(255, 229, 138, 0.14);
  border-color: rgba(255, 229, 138, 0.26);
  color: #ffe58a;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.roster-chip {
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 243, 234, 0.88);
  font-size: 0.82rem;
  text-align: center;
}

.roster-chip.is-shiny {
  color: #ffe58a;
  border: 1px solid rgba(255, 229, 138, 0.22);
}

.rewards-tracker {
  display: grid;
  gap: 14px;
}

.rewards-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reward-stat {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.reward-stat span,
.reward-card__header span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 243, 234, 0.7);
}

.reward-stat strong {
  font-size: 1.3rem;
}

.reward-stat small {
  color: rgba(245, 243, 234, 0.62);
  line-height: 1.3;
}

.rewards-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 205, 96, 0.08);
  border: 1px solid rgba(255, 205, 96, 0.14);
}

.rewards-note--team {
  background: rgba(102, 209, 138, 0.08);
  border-color: rgba(102, 209, 138, 0.14);
}

.rewards-note strong {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.rewards-note p {
  color: rgba(245, 243, 234, 0.82);
  line-height: 1.45;
}

.rewards-subsection {
  display: grid;
  gap: 6px;
  padding: 4px 2px 0;
}

.rewards-subsection h3 {
  margin: 0 0 2px;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 243, 234, 0.76);
}

.rewards-subsection p {
  color: rgba(245, 243, 234, 0.78);
  line-height: 1.45;
}

.rewards-subsection--team h3 {
  color: rgba(102, 209, 138, 0.9);
}

.rewards-subsection--bidwar h3 {
  color: rgba(255, 205, 96, 0.95);
}

.bidwar-grid {
  display: grid;
  gap: 10px;
}

.bidwar-visibility-grid {
  display: grid;
  gap: 8px;
}

.bidwar-visibility-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bidwar-visibility-row.is-hidden {
  background: rgba(255, 205, 96, 0.08);
  border-color: rgba(255, 205, 96, 0.16);
}

.bidwar-visibility-row strong {
  font-size: 0.92rem;
}

.bidwar-visibility-row span {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 243, 234, 0.72);
}

.bidwar-card {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.bidwar-card__hint {
  font-size: 0.82rem;
  color: rgba(245, 243, 234, 0.66);
}

.bidwar-card.is-leading {
  background: rgba(255, 205, 96, 0.14);
  border-color: rgba(255, 205, 96, 0.3);
}

.bidwar-card.is-hidden {
  background: rgba(255, 255, 255, 0.035);
  border-style: dashed;
  opacity: 0.86;
}

.bidwar-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.bidwar-card__top strong {
  font-size: 0.98rem;
  line-height: 1.3;
}

.bidwar-card__top span {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 243, 234, 0.72);
}

.bidwar-card__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bidwar-card__action {
  min-width: 32px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 243, 234, 0.95);
  text-align: center;
  font-weight: 800;
}

.bidwar-card__action.is-static {
  cursor: default;
}

.bidwar-card__button {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bidwar-card__button--ghost {
  background: rgba(255, 205, 96, 0.12);
  border-color: rgba(255, 205, 96, 0.22);
}

.bidwar-card__button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.bidwar-card__button--ghost:hover {
  background: rgba(255, 205, 96, 0.18);
}

.bidwar-card__bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.bidwar-card__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd76a, #fb6b6b);
}

.bidwar-grid--hidden .bidwar-card__bar span {
  background: linear-gradient(90deg, #8a8f98, #66d18a);
}

.rewards-grid {
  display: grid;
  gap: 10px;
}

.reward-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.reward-card.is-complete {
  background: rgba(102, 209, 138, 0.12);
  border-color: rgba(102, 209, 138, 0.22);
}

.reward-card--team.is-complete {
  background: rgba(255, 205, 96, 0.12);
  border-color: rgba(255, 205, 96, 0.24);
}

.reward-card__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.reward-card__header strong {
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reward-card__title {
  font-weight: 800;
  line-height: 1.35;
}

.reward-users {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reward-users span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 243, 234, 0.9);
  font-size: 0.8rem;
}

.reward-users .muted {
  padding: 0;
  background: transparent;
}

.reward-meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.reward-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd76a, #66d18a);
}

.rewards-grid--team .reward-meter span {
  background: linear-gradient(90deg, #66d18a, #ffcd60);
}

.rewards-columns {
  display: grid;
  gap: 12px;
}

.reward-info-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.reward-info-card h3 {
  margin-bottom: 8px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reward-info-card p {
  color: rgba(245, 243, 234, 0.8);
  line-height: 1.45;
}

.reward-info-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: rgba(245, 243, 234, 0.78);
}

.reward-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reward-link-row a {
  color: #ffe58a;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 229, 138, 0.32);
}

.reward-link-row a:hover {
  border-bottom-color: rgba(255, 229, 138, 0.8);
}

.rewards-sheet-shell {
  width: min(1320px, 100%);
}

.rewards-sheet-panel {
  min-height: calc(100vh - 36px);
}

.rewards-sheet-header {
  margin-bottom: 12px;
}

.rewards-sheet-controls {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.rewards-sheet-actions {
  display: flex;
  justify-content: flex-start;
}

.rewards-sheet-export {
  padding: 8px 14px;
  border: 1px solid rgba(255, 205, 96, 0.32);
  border-radius: 999px;
  background: rgba(255, 205, 96, 0.12);
  color: #fff1c4;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.rewards-sheet-export:hover:not(:disabled) {
  background: rgba(255, 205, 96, 0.22);
}

.rewards-sheet-export:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.rewards-sheet-controls label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 243, 234, 0.8);
}

.rewards-sheet-table-wrap {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: auto;
  background: rgba(0, 0, 0, 0.2);
}

.rewards-sheet-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.rewards-sheet-table th,
.rewards-sheet-table td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.rewards-sheet-table td {
  font-size: 0.86rem;
  color: rgba(245, 243, 234, 0.9);
}

.rewards-sheet-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.rewards-sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(65, 32, 37, 0.98), rgba(34, 16, 20, 0.98));
}

.rewards-sheet-table thead th button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: rgba(245, 243, 234, 0.82);
  font: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}

.rewards-sheet-table thead th button::after {
  content: "<>";
  font-size: 0.62rem;
  opacity: 0.56;
}

.rewards-sheet-table thead th button.is-active {
  color: #fff2bf;
}

.rewards-sheet-table thead th[aria-sort="ascending"] button::after {
  content: "▲";
  opacity: 0.94;
}

.rewards-sheet-table thead th[aria-sort="descending"] button::after {
  content: "▼";
  opacity: 0.94;
}

.rewards-sheet-table .col-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rewards-sheet-table .col-time {
  white-space: nowrap;
}

.rewards-sheet-table .col-shiny {
  color: #ffe58a;
  font-weight: 700;
}

@media (max-width: 720px) {
  .rewards-sheet-panel {
    min-height: auto;
    padding: 12px;
  }

  .rewards-sheet-table {
    min-width: 860px;
  }
}

body.embed-page .bidwar-grid,
body.embed-page .rewards-grid,
body.embed-page .bidwar-visibility-grid,
body.embed-page .recent-list,
body.embed-page .rewards-summary {
  max-height: none;
}

body.embed-page--bidwar {
  padding: 8px;
}

body.embed-page--bidwar .embed-shell {
  width: min(760px, 100%);
}

body.embed-page--bidwar .embed-panel {
  min-height: auto;
  padding: 10px;
  border-radius: 14px;
}

body.embed-page--bidwar #bidwar-tracker {
  gap: 6px;
}

body.embed-page--bidwar .rewards-subsection {
  gap: 4px;
  padding: 0;
}

body.embed-page--bidwar .rewards-subsection h3 {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

body.embed-page--bidwar .bidwar-grid {
  gap: 6px;
}

body.embed-page--bidwar .bidwar-card {
  gap: 6px;
  padding: 9px 10px;
  border-radius: 12px;
}

body.embed-page--bidwar .bidwar-card__top {
  gap: 8px;
}

body.embed-page--bidwar .bidwar-card__top strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

body.embed-page--bidwar .bidwar-card__top span {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

body.embed-page--bidwar .bidwar-card__actions {
  gap: 6px;
}

body.embed-page--bidwar .bidwar-card__button {
  padding: 5px 10px;
  font-size: 0.78rem;
}

body.embed-page--bidwar .bidwar-card__action {
  padding: 3px 8px;
  font-size: 0.75rem;
}

body.embed-page--bidwar .bidwar-card__bar {
  height: 6px;
}

body.embed-page--bidwar .bidwar-visibility-grid {
  gap: 6px;
}

body.embed-page--bidwar .bidwar-visibility-row {
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
}

body.embed-page--bidwar .bidwar-visibility-row strong {
  font-size: 0.8rem;
}

body.embed-page--bidwar .bidwar-visibility-row span {
  font-size: 0.66rem;
  letter-spacing: 0.07em;
}

.embed-page--pokedex {
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 205, 96, 0.12), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(102, 209, 138, 0.12), transparent 30%),
    linear-gradient(150deg, #0b0f17 0%, #152436 56%, #080b11 100%);
}

@media (max-width: 960px) {
  body.public-dashboard-page {
    padding: 10px;
  }

  .public-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .public-frame-card--full {
    grid-column: auto;
  }

  .public-frame-card iframe,
  .public-frame-card--full iframe {
    min-height: 480px;
  }
}

.pokedex-shell {
  width: min(1420px, 100%);
}

.pokedex-panel {
  display: grid;
  gap: 16px;
}

.pokedex-panel__header {
  gap: 8px;
}

.pokedex-summary {
  color: rgba(245, 243, 234, 0.86);
  font-size: 0.96rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pokedex-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.dex-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.22));
  min-height: 235px;
}

.dex-card.is-caught {
  border-color: rgba(102, 209, 138, 0.58);
  box-shadow: 0 0 0 1px rgba(102, 209, 138, 0.24);
}

.dex-card.is-missing {
  border-color: rgba(255, 255, 255, 0.16);
}

.dex-card__number {
  color: rgba(245, 243, 234, 0.72);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.dex-card__art-wrap {
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
}

.dex-card__art {
  max-width: 88px;
  max-height: 88px;
  image-rendering: pixelated;
}

.dex-card.is-missing .dex-card__art {
  filter: grayscale(1) brightness(0.35) contrast(1.18);
}

.dex-card__art--empty {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  border: 1px dashed rgba(245, 243, 234, 0.42);
}

.dex-card__name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}

.dex-card__status {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
}

.dex-card.is-caught .dex-card__status {
  background: rgba(102, 209, 138, 0.24);
  color: #c7f7d4;
}

.dex-card.is-missing .dex-card__status {
  background: rgba(255, 205, 96, 0.2);
  color: #ffe9b8;
}

.dex-card__caught-by,
.dex-card__time {
  color: rgba(245, 243, 234, 0.82);
  font-size: 0.78rem;
  line-height: 1.3;
}

.dex-card__time {
  color: rgba(245, 243, 234, 0.66);
}

@media (max-width: 720px) {
  .pokedex-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.status-success {
  color: var(--success);
}

.status-danger {
  color: var(--danger);
}

@keyframes bob {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-8px) scale(1.02);
  }
}

@keyframes throwBall {
  0% {
    opacity: 0;
    transform: translate(calc(-50% - 240px), 240px) rotate(-80deg) scale(0.5);
  }
  18% {
    opacity: 1;
    transform: translate(calc(-50% - 188px), 168px) rotate(-62deg) scale(0.58);
  }
  48% {
    transform: translate(calc(-50% - 58px), -110px) rotate(-18deg) scale(0.82);
  }
  72% {
    transform: translate(calc(-50% + 28px), -50px) rotate(12deg) scale(0.94);
  }
  88% {
    transform: translate(calc(-50% + 14px), -16px) rotate(4deg) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -8px) rotate(0deg) scale(0.92);
  }
}

@keyframes throwX {
  0% {
    transform: translateX(-240%);
    animation-timing-function: ease-out;
  }
  50% {
    transform: translateX(-45%);
  }
  100% {
    transform: translateX(0%);
  }
}

@keyframes throwY {
  0% {
    transform: translateY(-140%) scaleY(1.05) scaleX(0.95);
    animation-timing-function: ease-in;
  }
  50% {
    transform: translateY(-6%) scaleY(0.95) scaleX(1.1);
    animation-timing-function: ease-out;
  }
  75% {
    transform: translateY(-50%) scaleY(1.05) scaleX(0.95);
    animation-timing-function: ease-in;
  }
  100% {
    transform: translateY(0%) scaleY(1) scaleX(1);
  }
}

@keyframes throwSprite {
  0% {
    background-position-y: calc(var(--row-1) * -2px);
  }
  3% {
    background-position-y: calc(var(--row-2) * -2px);
  }
  6% {
    background-position-y: calc(var(--row-3) * -2px);
  }
  9% {
    background-position-y: calc(var(--row-4) * -2px);
  }
  12% {
    background-position-y: calc(var(--row-5) * -2px);
  }
  18% {
    background-position-y: calc(var(--row-6) * -2px);
  }
  23% {
    background-position-y: calc(var(--row-8) * -2px);
  }
  28% {
    background-position-y: calc(var(--row-9) * -2px);
  }
  35%, 100% {
    background-position-y: calc(var(--row-10) * -2px);
  }
}

@keyframes throwShadow {
  0% {
    opacity: 0;
    transform: translateY(1px) scaleY(1) scaleX(1);
  }
  35%, 65%, 95% {
    opacity: 0;
    transform: translateY(200%) scaleY(0.3) scaleX(0.3);
  }
  52% {
    opacity: 0.3;
    transform: translateY(1px) scaleY(1) scaleX(1);
  }
  100% {
    opacity: 0.3;
    transform: translateY(1px) scaleY(1) scaleX(1);
  }
}

@keyframes ballShake {
  0% {
    transform: translate(-50%, -8px) rotate(-10deg) scale(0.92);
  }
  20% {
    transform: translate(-50%, -8px) rotate(10deg) scale(0.92);
  }
  40% {
    transform: translate(-50%, -8px) rotate(-8deg) scale(0.92);
  }
  60% {
    transform: translate(-50%, -8px) rotate(7deg) scale(0.92);
  }
  80% {
    transform: translate(-50%, -8px) rotate(-5deg) scale(0.92);
  }
  100% {
    transform: translate(-50%, -8px) rotate(2deg) scale(0.92);
  }
}

@keyframes ballRockFrames {
  0% {
    background-position-y: calc(var(--row-0) * -2px);
  }
  8.33% {
    background-position-y: calc(var(--row-11) * -2px);
  }
  16.66% {
    background-position-y: calc(var(--row-12) * -2px);
  }
  25% {
    background-position-y: calc(var(--row-13) * -2px);
  }
  33.33% {
    background-position-y: calc(var(--row-12) * -2px);
  }
  41.66% {
    background-position-y: calc(var(--row-11) * -2px);
  }
  50% {
    background-position-y: calc(var(--row-0) * -2px);
  }
  58.33% {
    background-position-y: calc(var(--row-14) * -2px);
  }
  66.66% {
    background-position-y: calc(var(--row-15) * -2px);
  }
  75% {
    background-position-y: calc(var(--row-16) * -2px);
  }
  83.33% {
    background-position-y: calc(var(--row-15) * -2px);
  }
  91.66% {
    background-position-y: calc(var(--row-14) * -2px);
  }
  100% {
    background-position-y: calc(var(--row-0) * -2px);
  }
}

@keyframes pokemonShrinkIntoBall {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1);
  }
  45% {
    opacity: 1;
    transform: translateY(16px) scale(0.72);
    filter: brightness(1.14) saturate(1.08);
  }
  80% {
    opacity: 0.8;
    transform: translateY(28px) scale(0.38);
    filter: brightness(1.2) saturate(1.15);
  }
  100% {
    opacity: 0;
    transform: translateY(36px) scale(0.12);
    filter: brightness(1.1) saturate(1.05);
  }
}

@keyframes pokemonEscapeLeft {
  0% {
    opacity: 0;
    transform: translate(0, 22px) scale(0.2);
    filter: brightness(1.05) saturate(1.1);
  }
  18% {
    opacity: 1;
    transform: translate(-24px, 10px) scale(0.55);
  }
  55% {
    opacity: 1;
    transform: translate(-180px, -6px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translate(-340px, -14px) scale(1);
    filter: brightness(1) saturate(1);
  }
}

@keyframes pokemonEscapeRight {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    filter: brightness(1) saturate(1);
  }
  55% {
    opacity: 1;
    transform: translate(260px, -6px) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(520px, -14px) scale(1);
    filter: brightness(1) saturate(1);
  }
}

@keyframes ballCatchSettle {
  0% {
    transform: translate(-50%, -8px) scale(0.92);
    filter: brightness(1);
  }
  28% {
    transform: translate(-50%, -20px) scale(1.05);
    filter: brightness(1.3);
  }
  56% {
    transform: translate(-50%, -12px) scale(0.98);
    filter: brightness(1.18);
  }
  100% {
    transform: translate(-50%, -10px) scale(0.9);
    filter: brightness(0.72);
  }
}

@keyframes ballBreakout {
  0% {
    transform: translate(-50%, -8px) scale(0.92) rotate(0deg);
  }
  26% {
    transform: translate(-50%, -18px) scale(0.95) rotate(-10deg);
  }
  52% {
    transform: translate(calc(-50% + 26px), -34px) scale(0.98) rotate(16deg);
  }
  100% {
    transform: translate(calc(-50% + 150px), -74px) scale(0.72) rotate(42deg);
    opacity: 0;
  }
}

@keyframes burstParticle {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.2);
  }
  18% {
    opacity: 1;
    transform: translate(calc(var(--tx) * 0.22), calc(var(--ty) * 0.22)) scale(0.9);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0.1);
  }
}

@keyframes captureFlash {
  0% {
    opacity: 0;
    transform: scale(0.78);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@keyframes pokemonEnter {
  0% {
    opacity: 0;
    transform: translate(0, 26px) scale(0.72);
    filter: blur(2px) saturate(0.6);
  }
  40% {
    opacity: 1;
    transform: translate(0, -8px) scale(1.04);
    filter: blur(0) saturate(1.12);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
    filter: blur(0) saturate(1);
  }
}

@keyframes pokemonEscape {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    filter: brightness(1) saturate(1);
  }
  28% {
    opacity: 1;
    transform: translate(0, -18px) scale(0.96);
    filter: brightness(1.12) saturate(1.08);
  }
  62% {
    opacity: 1;
    transform: translate(0, -22px) scale(1.02);
    filter: brightness(1.18) saturate(1.12);
  }
  100% {
    opacity: 0;
    transform: translate(0, -18px) scale(0.18);
    filter: brightness(1.05) saturate(1.02) blur(1px);
  }
}

@keyframes pokemonExplode {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1) saturate(1);
  }
  28% {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(1.3) saturate(1.2) drop-shadow(0 0 14px rgba(255, 255, 255, 0.6));
  }
  100% {
    opacity: 0;
    transform: scale(0.4);
    filter: brightness(1.5) saturate(1.3) blur(2px);
  }
}

@keyframes glowPulseCatch {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  18% {
    opacity: 1;
    transform: scale(0.92);
  }
  42% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

@keyframes glowPulseFail {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  18% {
    opacity: 1;
    transform: scale(0.9);
  }
  42% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@keyframes pokemonAuraCatch {
  0% {
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45)) brightness(1) saturate(1);
  }
  30% {
    filter: drop-shadow(0 0 24px rgba(150, 255, 191, 0.78)) brightness(1.2) saturate(1.18);
  }
  70% {
    filter: drop-shadow(0 0 32px rgba(150, 255, 191, 0.88)) brightness(1.12) saturate(1.12);
  }
  100% {
    filter: drop-shadow(0 0 18px rgba(150, 255, 191, 0.5)) brightness(1.02) saturate(1.04);
  }
}

@keyframes pokemonAuraFail {
  0% {
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45)) brightness(1) saturate(1);
  }
  30% {
    filter: drop-shadow(0 0 24px rgba(255, 170, 120, 0.72)) brightness(1.18) saturate(1.18);
  }
  70% {
    filter: drop-shadow(0 0 32px rgba(255, 122, 93, 0.84)) brightness(1.08) saturate(1.1);
  }
  100% {
    filter: drop-shadow(0 0 18px rgba(255, 122, 93, 0.5)) brightness(0.98) saturate(1.02);
  }
}

@keyframes burstCore {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  30% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .screen {
    min-height: 660px;
  }
}

@media (max-width: 760px) {
  body.embed-page {
    padding: 10px;
  }

  .embed-panel {
    min-height: calc(100vh - 20px);
  }

  .cabinet {
    width: calc(100vw - 18px);
    padding: 16px;
    border-radius: 24px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .screen-hud {
    flex-direction: column;
  }

  .screen {
    min-height: 560px;
  }
}
