:root {
  --bg: #03070f;
  --panel: rgba(4, 12, 24, 0.92);
  --panel-2: rgba(8, 19, 36, 0.96);
  --gold: #ffd773;
  --gold-2: #b46c13;
  --blue: #16a4ff;
  --red: #ff453a;
  --green: #20d466;
  --purple: #b64cff;
  --cyan: #34e5ff;
  --text: #f8fbff;
  --muted: #9fb4cc;
  --line: rgba(108, 190, 255, 0.34);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  touch-action: manipulation;
  overscroll-behavior: none;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  background:
    radial-gradient(circle at 50% 8%, rgba(239, 49, 41, 0.22), transparent 26rem),
    radial-gradient(circle at 10% 40%, rgba(31, 137, 255, 0.24), transparent 18rem),
    linear-gradient(160deg, #02040a 0%, #071423 48%, #02050c 100%);
  overflow-x: hidden;
}

button {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.app-shell {
  min-height: 100svh;
  display: grid;
  place-items: start center;
  padding: 10px 10px calc(12px + var(--safe-bottom));
  position: relative;
  isolation: isolate;
}

.title-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: start center;
  padding: 12px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 72, 42, 0.28), transparent 24rem),
    radial-gradient(circle at 40% 48%, rgba(31, 151, 255, 0.24), transparent 19rem),
    rgba(1, 4, 10, 0.96);
}

.title-overlay.hidden {
  display: none;
}

.title-card {
  width: calc(100dvw - 24px);
  max-width: 430px;
  min-height: min(780px, calc(100svh - 24px));
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 215, 104, 0.58);
  background:
    linear-gradient(180deg, rgba(5, 10, 20, 0.2), rgba(3, 6, 12, 0.98) 78%),
    radial-gradient(circle at 50% 21%, rgba(255, 213, 98, 0.22), transparent 24%),
    radial-gradient(circle at 28% 40%, rgba(20, 116, 255, 0.32), transparent 28%),
    radial-gradient(circle at 75% 42%, rgba(255, 55, 45, 0.28), transparent 30%),
    linear-gradient(120deg, rgba(12, 83, 164, 0.7), rgba(95, 10, 10, 0.72));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), inset 0 0 46px rgba(255, 195, 67, 0.12);
  position: relative;
  overflow: hidden;
}

.title-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 68, 42, 0.28), transparent 21%),
    radial-gradient(circle at 46% 42%, rgba(118, 64, 255, 0.2), transparent 24%),
    linear-gradient(68deg, transparent 48%, rgba(255, 216, 110, 0.24) 49%, transparent 51%),
    linear-gradient(112deg, transparent 46%, rgba(41, 185, 255, 0.22) 47%, transparent 49%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 34px);
  animation: titleFlow 12s linear infinite;
}

.title-card::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 236, 159, 0.24);
  border-radius: 20px;
  pointer-events: none;
  box-shadow: inset 0 0 34px rgba(40, 176, 255, 0.12);
  z-index: 0;
}

@keyframes titleFlow {
  from { transform: translate3d(-4%, -2%, 0); }
  to { transform: translate3d(4%, 2%, 0); }
}

.broadcast-badge,
.title-kicker,
.title-card h1,
.title-card p,
.title-character,
.title-clone,
.title-showcase,
.challenge-card,
.title-start,
.title-sub {
  position: relative;
  z-index: 1;
}

.title-kicker {
  align-self: end;
  justify-self: start;
  width: fit-content;
  max-width: calc(100% - 158px);
  padding: 7px 18px;
  border: 1px solid rgba(255, 216, 112, 0.56);
  border-radius: 999px;
  color: #fff4c6;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 112, 0.16), transparent);
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.broadcast-badge {
  justify-self: end;
  align-self: start;
  position: absolute;
  top: 18px;
  right: 18px;
  max-width: 150px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 211, 99, 0.62);
  border-radius: 8px;
  color: #ffe49b;
  background: rgba(84, 21, 12, 0.72);
  font-size: 12px;
  font-weight: 950;
}

.title-card h1 {
  margin: 0;
  max-width: 100%;
  color: #ffd96e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 8.4vw, 50px);
  line-height: 1.04;
  letter-spacing: 0;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
  text-shadow: 0 3px 0 #4c2300, 0 0 25px rgba(255, 208, 75, 0.52);
  text-align: left;
}

.title-card h1 small {
  display: block;
  margin-bottom: 2px;
  color: #ffffff;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 950;
  text-shadow: 0 0 18px rgba(52, 229, 255, 0.72);
}

.title-card h1 span {
  color: #ff4b39;
}

.title-card p {
  margin: 0;
  max-width: 100%;
  color: #fff1bf;
  font-weight: 950;
  font-size: clamp(15px, 4.2vw, 18px);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.auth-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(52, 229, 255, 0.36);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(4, 18, 34, 0.9), rgba(40, 9, 21, 0.78)),
    radial-gradient(circle at 12% 50%, rgba(52, 229, 255, 0.14), transparent 48%);
}

.auth-card span,
.auth-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.auth-card strong {
  display: block;
  color: #ffe49b;
  font-size: 15px;
  font-weight: 950;
}

.auth-card button,
.email-login input {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 950;
}

#googleLogin {
  display: none;
}

.auth-card button {
  border: 1px solid rgba(255, 216, 112, 0.58);
  background: linear-gradient(180deg, rgba(22, 73, 122, 0.96), rgba(6, 13, 24, 0.96));
  color: #fff4cf;
}

.auth-card button:disabled {
  opacity: 0.56;
}

.email-login {
  display: none;
  grid-template-columns: 1fr 76px;
  gap: 6px;
}

.email-login input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.36);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
}

.email-login input::placeholder {
  color: rgba(232, 245, 255, 0.54);
}

.title-character {
  display: none;
}

@keyframes characterPulse {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -4px, 0) scale(1.02); }
}

.story-card-title {
  position: relative;
  z-index: 1;
  padding: 10px 12px;
  border: 1px solid rgba(255, 216, 112, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(5, 12, 23, 0.86), rgba(80, 11, 15, 0.76)),
    radial-gradient(circle at 12% 50%, rgba(255, 216, 112, 0.2), transparent 48%);
  box-shadow: inset 0 0 18px rgba(255, 195, 67, 0.1);
}

.story-card-title strong,
.story-card-title span {
  display: block;
}

.story-card-title strong {
  color: #ffe39a;
  font-size: 14px;
  font-weight: 950;
}

.story-card-title span {
  margin-top: 3px;
  color: #e8f5ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.title-showcase {
  height: clamp(126px, 37vw, 148px);
  position: relative;
  margin: 4px 0 -2px;
  border: 1px solid rgba(69, 177, 255, 0.32);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 216, 112, 0.22), transparent 38%),
    linear-gradient(90deg, rgba(6, 43, 91, 0.8), rgba(93, 12, 17, 0.8)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 18px);
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(42, 167, 255, 0.12);
}

.title-showcase-copy {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  min-width: 232px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 216, 112, 0.42);
  border-radius: 999px;
  color: #ffe39a;
  background: rgba(0, 0, 0, 0.48);
  font-size: 10px;
  font-weight: 950;
  text-align: center;
}

.title-showcase::before {
  content: "PLAYER  BANKER";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 10px;
  color: rgba(255, 244, 207, 0.34);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
  text-align: center;
  word-spacing: 38px;
}

.title-clone {
  position: absolute;
  width: clamp(48px, 16vw, 66px);
  height: clamp(48px, 16vw, 66px);
  object-fit: cover;
  object-position: center 30%;
  border: 1px solid rgba(255, 216, 112, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.96), rgba(182, 218, 255, 0.82));
  box-shadow: 0 11px 18px rgba(0, 0, 0, 0.45), 0 0 20px rgba(52, 229, 255, 0.18);
  animation: cloneFloat 2900ms ease-in-out infinite;
}

.clone-thinking {
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
}

.clone-smug {
  left: 24px;
  top: 26px;
  animation-delay: -800ms;
}

.clone-crying {
  right: 24px;
  top: 26px;
  animation-delay: -1400ms;
}

.clone-laughing {
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) scale(0.92);
  animation-delay: -2100ms;
}

@keyframes cloneFloat {
  0%, 100% { margin-top: 0; filter: saturate(1) brightness(1); }
  50% { margin-top: -5px; filter: saturate(1.12) brightness(1.08); }
}

.show-card {
  position: absolute;
  width: clamp(62px, 20vw, 76px);
  height: clamp(86px, 28vw, 106px);
  top: 18px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #fff, #dfe1da);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.42);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 950;
}

.show-card span {
  position: absolute;
  top: 7px;
  left: 8px;
  font-size: clamp(16px, 5vw, 20px);
}

.show-card b {
  font-size: clamp(34px, 11vw, 46px);
}

.card-blue {
  left: clamp(36px, 17vw, 70px);
  color: #121820;
  transform: rotate(-8deg);
}

.card-red {
  right: clamp(36px, 17vw, 70px);
  color: #c5211d;
  transform: rotate(8deg);
}

.show-chip {
  position: absolute;
  bottom: 18px;
  width: clamp(44px, 14vw, 54px);
  height: clamp(44px, 14vw, 54px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 5px dashed rgba(255, 255, 255, 0.82);
  color: #10131a;
  font-size: clamp(11px, 3.4vw, 13px);
  font-weight: 950;
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.38);
}

.title-achievement-mini {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 216, 112, 0.42);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
}

.title-achievement-mini span {
  color: #9edaff;
  font-size: 12px;
  font-weight: 950;
}

.title-achievement-mini strong {
  color: #ffe097;
  font-size: 15px;
}

.title-achievement-mini small {
  min-width: 0;
  color: #dbeeff;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.chip-a {
  left: clamp(12px, 6vw, 26px);
  background: radial-gradient(circle, #fff 0 38%, #0a55ac 39% 44%, #1896ff 45%);
}

.chip-b {
  right: clamp(12px, 6vw, 26px);
  background: radial-gradient(circle, #fff8df 0 38%, #a5650a 39% 44%, #e9a12e 45%);
}

.challenge-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 18px;
}

.challenge-card div {
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 8px 5px;
  border: 1px solid rgba(255, 216, 104, 0.42);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.56);
  text-align: center;
}

.challenge-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.challenge-card strong {
  color: #ffe7a0;
  font-size: 13px;
}

.title-start,
.title-sub {
  min-height: 62px;
  border: 1px solid rgba(255, 224, 123, 0.82);
  color: #ffe89b;
  font-weight: 950;
}

.title-start {
  clip-path: polygon(7% 0, 93% 0, 100% 50%, 93% 100%, 7% 100%, 0 50%);
  background: linear-gradient(135deg, rgba(139, 28, 20, 0.98), rgba(110, 30, 126, 0.98));
  font-size: 28px;
  text-shadow: 0 2px 0 #210000;
}

.title-sub {
  min-height: 48px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(18, 74, 37, 0.96), rgba(5, 20, 12, 0.96));
}

.story-overlay {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: none;
  place-items: center;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 216, 112, 0.2), transparent 22rem),
    radial-gradient(circle at 18% 60%, rgba(255, 72, 48, 0.24), transparent 18rem),
    rgba(0, 0, 0, 0.94);
}

.story-overlay.open {
  display: grid;
}

.story-cinema {
  width: min(100%, 430px);
  min-height: min(780px, calc(100svh - 24px));
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 22px;
  perspective: 900px;
  border: 1px solid rgba(255, 216, 112, 0.62);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(2, 6, 12, 0.12), rgba(1, 4, 9, 0.98) 76%),
    radial-gradient(circle at 52% 30%, rgba(255, 216, 112, 0.25), transparent 20%),
    radial-gradient(circle at 42% 44%, rgba(33, 146, 255, 0.25), transparent 26%),
    radial-gradient(circle at 68% 45%, rgba(255, 55, 45, 0.26), transparent 27%),
    linear-gradient(135deg, #061426, #180505);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.78);
}

.story-cinema::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 34px),
    linear-gradient(105deg, transparent 42%, rgba(255, 216, 112, 0.18) 43%, transparent 46%),
    linear-gradient(74deg, transparent 58%, rgba(52, 229, 255, 0.18) 59%, transparent 62%);
  animation: titleFlow 10s linear infinite alternate;
}

.story-cinema::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 216, 112, 0.14), transparent 22%),
    linear-gradient(180deg, transparent 0 48%, rgba(0, 0, 0, 0.5) 72%, rgba(0, 0, 0, 0.92));
  pointer-events: none;
}

.story-timer,
.story-character,
.story-world,
.story-scene-label,
.story-cinema h2,
.story-cinema p,
.story-roll,
.story-progress,
.story-no-skip {
  position: relative;
  z-index: 1;
}

.story-world {
  position: absolute;
  inset: 0 0 auto;
  height: 55%;
  z-index: 0;
  overflow: hidden;
  transform-style: preserve-3d;
}

.story-skyline {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 40px;
  height: 118px;
  background:
    linear-gradient(180deg, rgba(52, 229, 255, 0.02), rgba(52, 229, 255, 0.2)),
    repeating-linear-gradient(90deg, rgba(255, 216, 112, 0.28) 0 4px, transparent 4px 25px);
  clip-path: polygon(0 100%, 0 54%, 8% 54%, 8% 34%, 15% 34%, 15% 65%, 24% 65%, 24% 22%, 35% 22%, 35% 48%, 44% 48%, 44% 10%, 56% 10%, 56% 58%, 66% 58%, 66% 30%, 76% 30%, 76% 68%, 86% 68%, 86% 42%, 100% 42%, 100% 100%);
  opacity: 0.5;
  filter: drop-shadow(0 0 22px rgba(52, 229, 255, 0.24));
}

.story-debt-gate {
  position: absolute;
  top: 48px;
  left: 50%;
  width: 210px;
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 216, 112, 0.58);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 216, 112, 0.26), transparent 44%),
    linear-gradient(180deg, rgba(83, 15, 12, 0.86), rgba(3, 8, 16, 0.88));
  box-shadow: 0 0 42px rgba(255, 69, 58, 0.26), inset 0 0 22px rgba(255, 216, 112, 0.12);
  transform: translateX(-50%) rotateX(12deg) translateZ(70px);
  animation: debtGatePulse 3600ms ease-in-out infinite;
}

.story-debt-gate span {
  color: #ff9a88;
  font-size: 11px;
  font-weight: 950;
}

.story-debt-gate strong {
  color: #ffe49b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 950;
}

.story-runway {
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 300px;
  height: 230px;
  background:
    repeating-linear-gradient(180deg, rgba(255, 216, 112, 0.46) 0 12px, transparent 12px 34px),
    linear-gradient(90deg, transparent 0 44%, rgba(52, 229, 255, 0.18) 45% 55%, transparent 56%),
    linear-gradient(180deg, rgba(17, 70, 116, 0.36), rgba(255, 69, 58, 0.12));
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
  transform: translateX(-50%) rotateX(64deg);
  transform-origin: 50% 100%;
  opacity: 0.78;
  animation: runwayMove 1100ms linear infinite;
}

.story-chip-orbit {
  position: absolute;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 5px dashed rgba(255, 255, 255, 0.78);
  color: #171100;
  background: radial-gradient(circle, #fff6cb 0 36%, #c47b10 37% 44%, #ffd773 45%);
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48), 0 0 24px rgba(255, 216, 112, 0.36);
}

.chip-one {
  left: 24px;
  top: 164px;
  animation: chipOrbitOne 5200ms ease-in-out infinite;
}

.chip-two {
  right: 24px;
  top: 128px;
  animation: chipOrbitTwo 6200ms ease-in-out infinite;
}

.story-timer {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(255, 216, 112, 0.64);
  background: rgba(0, 0, 0, 0.52);
  color: #ffe39b;
  font-size: 12px;
  font-weight: 950;
}

.story-timer span {
  display: block;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.story-character {
  position: absolute;
  top: 126px;
  left: 50%;
  width: min(43vw, 176px);
  height: min(43vw, 176px);
  z-index: 2;
  justify-self: auto;
  margin: 0;
  object-fit: cover;
  object-position: center 30%;
  border: 1px solid rgba(255, 216, 112, 0.56);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.94), rgba(194, 222, 255, 0.76));
  box-shadow: 0 28px 34px rgba(0, 0, 0, 0.62), 0 0 30px rgba(52, 229, 255, 0.2);
  animation: storyHeroFloat 2800ms ease-in-out infinite;
}

.story-scene-label {
  width: fit-content;
  padding: 5px 12px;
  border: 1px solid rgba(52, 229, 255, 0.44);
  border-radius: 999px;
  color: #9ce7ff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 12px;
  font-weight: 950;
}

.story-cinema h2 {
  margin: 0;
  color: #ffd773;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 9vw, 48px);
  line-height: 1.05;
  text-shadow: 0 3px 0 #4c2300, 0 0 28px rgba(255, 216, 112, 0.42);
}

.story-cinema p {
  min-height: 88px;
  margin: 0;
  color: #f3f8ff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.65;
}

.story-roll {
  height: 104px;
  overflow: hidden;
  border: 1px solid rgba(52, 229, 255, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(3, 8, 16, 0.76), rgba(3, 8, 16, 0.4)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 22px);
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 86%, transparent);
}

#storyRollText {
  display: grid;
  gap: 10px;
  padding: 96px 12px 20px;
  color: #dff6ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.55;
  animation: storyRoll 30s linear forwards;
}

#storyRollText span {
  display: block;
  text-shadow: 0 0 16px rgba(52, 229, 255, 0.32);
}

.story-progress {
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.story-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff453a, #ffd773, #34e5ff);
  box-shadow: 0 0 22px rgba(255, 216, 112, 0.45);
}

.story-no-skip {
  color: #ffb5ac;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

@keyframes debtGatePulse {
  0%, 100% { transform: translateX(-50%) rotateX(12deg) translateZ(70px) scale(1); }
  50% { transform: translateX(-50%) rotateX(18deg) translateZ(92px) scale(1.04); }
}

@keyframes runwayMove {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 34px, 0 0, 0 0; }
}

@keyframes chipOrbitOne {
  0%, 100% { transform: translate3d(0, 0, 18px) rotate(-12deg); }
  50% { transform: translate3d(24px, -16px, 80px) rotate(14deg); }
}

@keyframes chipOrbitTwo {
  0%, 100% { transform: translate3d(0, 0, 22px) rotate(10deg); }
  50% { transform: translate3d(-28px, 18px, 90px) rotate(-16deg); }
}

@keyframes storyHeroFloat {
  0%, 100% { transform: translateX(-50%) translateY(0) rotateY(-8deg); }
  50% { transform: translateX(-50%) translateY(-9px) rotateY(8deg); }
}

@keyframes storyRoll {
  from { transform: translateY(0); }
  to { transform: translateY(-390px); }
}

.venue-overlay {
  position: fixed;
  inset: 0;
  z-index: 38;
  display: none;
  place-items: center;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 216, 112, 0.2), transparent 22rem),
    radial-gradient(circle at 20% 64%, rgba(52, 229, 255, 0.16), transparent 20rem),
    rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(10px);
}

.venue-overlay.open {
  display: grid;
}

.venue-card {
  width: min(100%, 430px);
  max-height: calc(100svh - 24px);
  overflow: auto;
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 216, 112, 0.62);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 216, 112, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(9, 20, 36, 0.98), rgba(3, 7, 14, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(54, 171, 255, 0.12);
}

.venue-head {
  padding-right: 44px;
}

.venue-head span {
  color: #8fd9ff;
  font-size: 12px;
  font-weight: 950;
}

.venue-head h2 {
  margin: 2px 0 6px;
  color: #ffd773;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 3px 0 #4c2300, 0 0 26px rgba(255, 216, 112, 0.35);
}

.venue-head p {
  margin: 0;
  color: #dceeff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.venue-grid {
  display: grid;
  gap: 8px;
}

.venue-option {
  min-height: 104px;
  display: grid;
  grid-template-columns: 66px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(73, 171, 255, 0.34);
  border-radius: 12px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 216, 112, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(10, 30, 56, 0.96), rgba(4, 9, 17, 0.96));
  text-align: left;
  overflow: hidden;
  position: relative;
}

.venue-option::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background: linear-gradient(120deg, transparent 0 46%, rgba(255,255,255,0.18) 48%, transparent 51%);
}

.venue-option span,
.venue-option strong,
.venue-option small {
  position: relative;
  z-index: 1;
}

.venue-option span {
  grid-row: 1 / 3;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #08111b;
  background: linear-gradient(180deg, #ffeaa6, #c7821c);
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 0 22px rgba(255, 216, 112, 0.24);
}

.venue-svg-icon svg {
  width: 58px;
  height: 58px;
  overflow: visible;
  fill: none;
  stroke: #07111b;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.venue-svg-icon .sport-solid {
  fill: #07111b;
  stroke: none;
}

.venue-svg-icon .sport-solid.dim {
  fill: #182331;
}

.venue-svg-icon .sport-line {
  fill: none;
  stroke: #07111b;
}

.venue-svg-icon .sport-line.thin,
.venue-svg-icon .sport-line.cut {
  stroke-width: 3.2;
}

.venue-svg-icon .sport-dot {
  fill: #07111b;
  stroke: none;
}

.venue-svg-icon .sport-dot.gold {
  fill: #f5d56f;
}

.venue-svg-icon .sport-wheel {
  fill: rgba(7, 17, 27, 0.12);
  stroke: #07111b;
  stroke-width: 5;
}

.venue-svg-icon .sport-shadow {
  fill: none;
  stroke: rgba(7, 17, 27, 0.35);
  stroke-width: 5;
}

.venue-svg-icon .sport-wave {
  fill: none;
  stroke: #07111b;
  stroke-width: 4.2;
}

.venue-option strong {
  align-self: end;
  color: #fff2c8;
  font-size: 24px;
  font-weight: 950;
}

.venue-option small {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.venue-option.baccarat { border-color: rgba(255, 216, 112, 0.52); }
.venue-option.horse { border-color: rgba(255, 115, 73, 0.5); }
.venue-option.boat { border-color: rgba(52, 229, 255, 0.46); }
.venue-option.keirin { border-color: rgba(182, 76, 255, 0.48); }

.venue-footer {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 216, 112, 0.36);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.38);
}

.venue-footer span {
  color: #8fd9ff;
  font-size: 12px;
  font-weight: 950;
}

.venue-footer strong {
  color: #ffe49b;
  font-size: 20px;
  font-weight: 950;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 54px);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}

.game-frame {
  width: min(100%, 430px);
  min-height: calc(100svh - 20px);
  padding: 12px 12px calc(88px + var(--safe-bottom));
  border: 1px solid rgba(255, 216, 112, 0.42);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(10, 20, 38, 0.86), rgba(3, 8, 15, 0.96)),
    radial-gradient(circle at 50% 20%, rgba(255, 46, 37, 0.12), transparent 42%);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(48, 199, 255, 0.16),
    inset 0 0 42px rgba(28, 113, 255, 0.13);
  position: relative;
  overflow: hidden;
}

.game-frame::before,
.game-frame::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  height: 220px;
  pointer-events: none;
}

.game-frame::before {
  top: 70px;
  background:
    linear-gradient(105deg, transparent 9%, rgba(27, 153, 255, 0.16) 10%, transparent 12%),
    linear-gradient(74deg, transparent 55%, rgba(255, 55, 41, 0.2) 56%, transparent 58%);
  filter: blur(0.5px);
}

.game-frame::after {
  bottom: 120px;
  background:
    linear-gradient(92deg, transparent 28%, rgba(255, 211, 104, 0.2) 29%, transparent 31%),
    linear-gradient(115deg, transparent 62%, rgba(151, 79, 255, 0.18) 63%, transparent 65%);
}

.game-frame.sport-horse {
  background:
    linear-gradient(180deg, rgba(29, 18, 11, 0.9), rgba(4, 8, 15, 0.97)),
    radial-gradient(circle at 50% 18%, rgba(255, 117, 50, 0.18), transparent 42%);
}

.game-frame.sport-boat {
  background:
    linear-gradient(180deg, rgba(6, 30, 46, 0.92), rgba(3, 8, 15, 0.97)),
    radial-gradient(circle at 50% 18%, rgba(52, 229, 255, 0.18), transparent 42%);
}

.game-frame.sport-keirin {
  background:
    linear-gradient(180deg, rgba(24, 12, 42, 0.92), rgba(3, 8, 15, 0.97)),
    radial-gradient(circle at 50% 18%, rgba(182, 76, 255, 0.18), transparent 42%);
}

.game-frame.sport-horse .race-stage {
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 117, 50, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(38, 20, 8, 0.94), rgba(4, 8, 14, 0.96));
}

.game-frame.sport-boat .race-stage {
  background:
    radial-gradient(circle at 50% 6%, rgba(52, 229, 255, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(5, 35, 54, 0.94), rgba(4, 8, 14, 0.96));
}

.game-frame.sport-keirin .race-stage {
  background:
    radial-gradient(circle at 50% 6%, rgba(182, 76, 255, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(28, 12, 54, 0.94), rgba(4, 8, 14, 0.96));
}

.game-frame.sport-boat .race-track {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 31px),
    linear-gradient(90deg, rgba(6, 54, 78, 0.78), rgba(2, 21, 34, 0.86));
}

.game-frame.sport-keirin .race-track {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 31px),
    radial-gradient(circle at 50% 50%, rgba(182, 76, 255, 0.14), transparent 42%),
    linear-gradient(90deg, rgba(42, 22, 58, 0.78), rgba(12, 9, 18, 0.86));
}

.topbar,
.bankroll-panel,
.status-strip,
.table-stage,
.bet-board,
.chip-deck,
.bet-control,
.confirm-button,
.road-panel,
.bottom-nav {
  position: relative;
  z-index: 1;
}

.topbar {
  display: grid;
  grid-template-columns: 46px 1fr 60px;
  gap: 8px;
  align-items: center;
}

.icon-button,
.mission-button {
  border: 1px solid rgba(99, 189, 255, 0.48);
  background: linear-gradient(180deg, rgba(20, 36, 62, 0.96), rgba(7, 14, 26, 0.96));
  box-shadow: 0 0 18px rgba(31, 157, 255, 0.18), inset 0 0 16px rgba(38, 146, 255, 0.2);
  min-height: 44px;
  border-radius: 9px;
}

.icon-button {
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: center;
}

.icon-button span {
  width: 20px;
  height: 3px;
  border-radius: 4px;
  background: #d7ecff;
}

.mission-button {
  display: grid;
  place-items: center;
  gap: 0;
  font-size: 18px;
}

.mission-button small {
  font-size: 9px;
  color: var(--gold);
  line-height: 1;
}

.mission-tag {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 200, 88, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(31, 17, 8, 0.95), rgba(7, 12, 22, 0.96)),
    linear-gradient(90deg, transparent, rgba(255, 211, 94, 0.16), transparent);
  box-shadow: inset 0 0 18px rgba(255, 173, 36, 0.15);
  text-align: center;
}

.mission-tag span {
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0;
  font-size: 14px;
}

.mission-tag strong {
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 0;
}

.mission-tag em {
  color: #94d9ff;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.bankroll-panel {
  margin-top: 10px;
  padding: 12px 12px 10px;
  text-align: center;
  border: 1px solid rgba(255, 212, 103, 0.45);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(16, 16, 20, 0.98), rgba(8, 12, 19, 0.96)),
    radial-gradient(circle at 50% 0, rgba(255, 205, 80, 0.18), transparent 70%);
  box-shadow: inset 0 0 24px rgba(255, 180, 42, 0.1), 0 0 24px rgba(0, 0, 0, 0.28);
}

.label,
.goal-row span,
.current-bet span,
.status-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.money {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 10.4vw, 48px);
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 2px 0 #522d00, 0 0 16px rgba(255, 214, 115, 0.32);
}

.goal-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: baseline;
  margin-top: 4px;
}

.goal-row strong {
  color: #ffe7a2;
  font-size: 16px;
}

.progress-track {
  margin-top: 8px;
  height: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  width: 1%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #158cff, #37e6ff, #ffd773);
  box-shadow: 0 0 18px rgba(54, 216, 255, 0.45);
  transition: width 420ms ease;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 8px 0;
}

.story-status {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 6px;
  margin: -1px 0 8px;
}

.story-status div {
  min-height: 46px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 4px;
  border: 1px solid rgba(255, 82, 67, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(41, 10, 9, 0.86), rgba(4, 10, 20, 0.84));
  text-align: center;
  box-shadow: inset 0 0 14px rgba(255, 74, 56, 0.08);
}

.story-status span {
  color: #ffb7ae;
  font-size: 9px;
  font-weight: 900;
}

.story-status strong {
  color: #fff0c2;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
}

.official-status {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 8px;
}

.official-status div {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(52, 229, 255, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(5, 20, 35, 0.86), rgba(3, 8, 16, 0.86));
}

.official-status span {
  color: #99dcff;
  font-size: 10px;
  font-weight: 950;
}

.official-status strong {
  color: #ffe8a5;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

.sport-picker {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0;
}

.sport-gate {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid rgba(255, 216, 112, 0.34);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 216, 112, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(6, 18, 32, 0.86), rgba(3, 8, 16, 0.86));
}

.sport-gate span {
  display: block;
  color: #8fd9ff;
  font-size: 10px;
  font-weight: 950;
}

.sport-gate strong {
  display: block;
  color: #ffe49b;
  font-size: 18px;
  font-weight: 950;
}

.sport-gate button {
  min-height: 40px;
  min-width: 126px;
  border: 1px solid rgba(255, 216, 112, 0.48);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(28, 54, 91, 0.96), rgba(5, 12, 22, 0.96));
  color: #fff2c8;
  font-size: 12px;
  font-weight: 950;
}

.sport-tab {
  min-height: 66px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 5px 3px;
  border: 1px solid rgba(73, 171, 255, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 31, 51, 0.94), rgba(5, 9, 16, 0.96));
  color: #dceeff;
  font-weight: 950;
}

.sport-tab span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #08111c;
  background: linear-gradient(180deg, #ffeaa6, #c7821c);
  font-size: 14px;
}

.sport-tab strong {
  font-size: 12px;
  line-height: 1.1;
}

.sport-tab small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
}

.sport-tab.active {
  border-color: rgba(255, 216, 112, 0.7);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 216, 112, 0.24), transparent 62%),
    linear-gradient(180deg, rgba(41, 23, 7, 0.96), rgba(6, 10, 18, 0.98));
  box-shadow: 0 0 18px rgba(255, 216, 112, 0.16);
}

.status-strip div {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(35, 148, 255, 0.42);
  border-radius: 8px;
  background: rgba(4, 14, 30, 0.76);
}

.status-strip strong {
  color: var(--gold);
  font-size: 20px;
}

.table-stage {
  min-height: 244px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  align-items: center;
  padding: 12px 8px;
  border: 1px solid rgba(55, 168, 255, 0.42);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(9, 54, 117, 0.55), rgba(12, 8, 14, 0.8) 50%, rgba(120, 10, 10, 0.58)),
    radial-gradient(circle at 50% 45%, rgba(255, 215, 94, 0.2), transparent 33%);
  overflow: hidden;
}

.race-only {
  display: none;
}

.game-frame.race-mode .baccarat-only {
  display: none;
}

.game-frame.race-mode .race-only {
  display: grid;
}

.race-stage {
  position: relative;
  z-index: 1;
  min-height: 500px;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 216, 112, 0.42);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 216, 112, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(6, 22, 38, 0.94), rgba(4, 8, 14, 0.96));
  overflow: hidden;
}

.race-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.race-header span {
  display: block;
  color: #8fd9ff;
  font-size: 11px;
  font-weight: 950;
}

.race-header strong {
  display: block;
  color: #ffe49b;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}

.race-header button {
  min-width: 92px;
  min-height: 38px;
  border: 1px solid rgba(255, 216, 112, 0.46);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.34);
  color: #ffe8ad;
  font-size: 11px;
  font-weight: 950;
}

.race-commentary {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(52, 229, 255, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.36);
  color: #e9f7ff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.race-showcase {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 92px;
  padding: 10px 78px 10px 10px;
  border: 1px solid rgba(255, 216, 112, 0.36);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 216, 112, 0.18), transparent 52%),
    linear-gradient(120deg, rgba(8, 26, 49, 0.94), rgba(3, 8, 16, 0.94));
  overflow: hidden;
}

.race-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(108deg, transparent 0 56%, rgba(255, 255, 255, 0.12) 57%, transparent 61%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 22px);
  pointer-events: none;
}

.race-showcase-icon,
.race-showcase div {
  position: relative;
  z-index: 1;
}

.race-showcase-icon {
  width: 82px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 112, 0.34);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 236, 177, 0.2), transparent 54%),
    rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.race-showcase-icon svg {
  width: 98px;
  height: 62px;
  overflow: visible;
}

.race-commentator-face {
  position: absolute;
  right: 8px;
  bottom: -7px;
  z-index: 2;
  width: 74px;
  height: 74px;
  object-fit: cover;
  object-position: center 28%;
  border: 1px solid rgba(255, 216, 112, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.96), rgba(201, 232, 255, 0.78));
  box-shadow: 0 14px 20px rgba(0, 0, 0, 0.52), 0 0 24px rgba(255, 216, 112, 0.18);
  pointer-events: none;
  animation: raceFaceFloat 2600ms ease-in-out infinite;
}

@keyframes raceFaceFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

.race-showcase span,
.race-showcase strong,
.race-showcase small {
  display: block;
  min-width: 0;
}

.race-showcase span {
  color: #8fd9ff;
  font-size: 10px;
  font-weight: 950;
}

.race-showcase strong {
  color: #ffe8a5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.12;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 216, 112, 0.26);
}

.race-showcase small {
  margin-top: 3px;
  color: #dceeff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.race-broadcast {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 6px;
}

.race-broadcast div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 216, 112, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 216, 112, 0.08), transparent),
    rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 18px rgba(52, 229, 255, 0.08);
}

.race-broadcast span,
.race-broadcast strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race-broadcast span {
  color: #8fd9ff;
  font-size: 9px;
  font-weight: 950;
}

.race-broadcast strong {
  color: #fff4cf;
  font-size: 12px;
  font-weight: 950;
}

.race-track {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 9px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 43px),
    linear-gradient(90deg, rgba(12, 56, 42, 0.68), rgba(33, 16, 11, 0.76));
  overflow: hidden;
}

.game-frame.sport-horse .race-track {
  background:
    radial-gradient(circle at 92% 50%, rgba(255, 216, 112, 0.18), transparent 20%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 43px),
    linear-gradient(90deg, #3d2415, #79512e 58%, #26140d);
}

.game-frame.sport-boat .race-track {
  background:
    radial-gradient(circle at 20% 10%, rgba(140, 234, 255, 0.18), transparent 32%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 43px),
    linear-gradient(90deg, #052b44, #0a6380 54%, #031522);
}

.game-frame.sport-keirin .race-track {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 216, 112, 0.12), transparent 40%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 43px),
    linear-gradient(90deg, #172137, #432053 54%, #090b14);
}

.race-track::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  right: 7%;
  width: 8px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, #fff 0 4px, #111 4px 8px);
  opacity: 0.55;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.race-lane {
  min-height: 38px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 7px;
  align-items: center;
}

.race-lane-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #07111b;
  background: linear-gradient(180deg, #fff0b8, #ce8320);
  font-size: 11px;
  font-weight: 950;
}

.race-lane-road {
  position: relative;
  height: 34px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.race-lane-label {
  position: absolute;
  inset: 0 46px 0 10px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  opacity: 0.82;
}

.race-lane-label b,
.race-lane-label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.race-lane-label b {
  color: #f8fbff;
  font-size: 11px;
  font-weight: 950;
}

.race-lane-label span {
  color: #ffe49b;
  font-size: 10px;
  font-weight: 950;
}

.race-lane-road::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.1) 0 1px, transparent 1px 28px);
  opacity: 0.45;
}

.race-lane-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 112, 0.28), transparent);
}

.race-runner {
  position: absolute;
  left: var(--race-progress, 0%);
  top: 1px;
  z-index: 2;
  width: 78px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: #06101b;
  background: transparent;
  font-size: 12px;
  font-weight: 950;
  transform: translateX(-50%);
  transition: left 380ms linear, filter 240ms ease, transform 240ms ease;
  filter: drop-shadow(0 0 10px var(--runner-color, #ffd773));
}

.race-runner svg {
  width: 90px;
  height: 50px;
  overflow: visible;
  stroke: #07111b;
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.race-runner .runner-fill { fill: var(--runner-color, #ffd773); stroke: #fff8d7; stroke-width: 3; }
.race-runner .runner-cabin { fill: #f7fbff; stroke: #07111b; stroke-width: 3; }
.race-runner .runner-rider { fill: #07111b; stroke: #fff8d7; stroke-width: 2.4; }
.race-runner .runner-detail { fill: none; stroke: #07111b; stroke-width: 3.4; }
.race-runner .runner-eye { fill: #07111b; stroke: none; }
.race-runner .runner-wave { fill: none; stroke: #e7fbff; stroke-width: 3.4; opacity: 0.9; }
.race-runner .runner-wheel { fill: rgba(255,255,255,0.16); stroke: #fff8d7; stroke-width: 4; }
.race-runner .runner-frame { fill: none; stroke: var(--runner-color, #ffd773); stroke-width: 5.2; }
.race-runner .runner-shadow { fill: none; stroke: rgba(0,0,0,0.32); stroke-width: 6; }

.race-showcase-icon .runner-fill { fill: #ffd773; stroke: #fff8d7; stroke-width: 3; }
.race-showcase-icon .runner-cabin { fill: #f7fbff; stroke: #07111b; stroke-width: 3; }
.race-showcase-icon .runner-rider { fill: #07111b; stroke: #fff8d7; stroke-width: 2.4; }
.race-showcase-icon .runner-detail { fill: none; stroke: #07111b; stroke-width: 3.4; }
.race-showcase-icon .runner-eye { fill: #07111b; stroke: none; }
.race-showcase-icon .runner-wave { fill: none; stroke: #e7fbff; stroke-width: 3.4; opacity: 0.9; }
.race-showcase-icon .runner-wheel { fill: rgba(255,255,255,0.16); stroke: #fff8d7; stroke-width: 4; }
.race-showcase-icon .runner-frame { fill: none; stroke: #ffd773; stroke-width: 5.2; }
.race-showcase-icon .runner-shadow { fill: none; stroke: rgba(0,0,0,0.32); stroke-width: 6; }

.game-frame.sport-horse .race-runner svg {
  animation: horseGallop 520ms ease-in-out infinite alternate;
}

.game-frame.sport-horse .race-lane.leader .race-runner {
  animation: runnerFlight 740ms ease-in-out infinite alternate;
}

.game-frame.sport-boat .race-runner svg {
  animation: boatSkip 620ms ease-in-out infinite alternate;
}

.game-frame.sport-boat .race-lane.leader .race-runner {
  animation: runnerFlight 680ms ease-in-out infinite alternate;
}

.game-frame.sport-keirin .race-runner svg {
  animation: wheelPulse 460ms linear infinite;
}

.race-lane.winner .race-runner {
  outline: 2px solid #fff;
  filter: brightness(1.25);
}

.race-lane.leader .race-lane-glow {
  opacity: 1;
  animation: laneLeader 720ms ease-in-out infinite alternate;
}

.race-lane.leader .race-runner {
  transform: translateX(-50%) scale(1.12);
}

@keyframes laneLeader {
  from { transform: translateX(-30%); }
  to { transform: translateX(30%); }
}

@keyframes runnerFlight {
  from { margin-top: 0; filter: brightness(1.1); }
  to { margin-top: -6px; filter: brightness(1.35); }
}

@keyframes horseGallop {
  from { transform: rotate(-2deg) translateY(1px); }
  to { transform: rotate(3deg) translateY(-2px); }
}

@keyframes boatSkip {
  from { transform: rotate(-1deg) translateY(2px); }
  to { transform: rotate(4deg) translateY(-3px); }
}

@keyframes wheelPulse {
  from { transform: translateY(1px); }
  to { transform: translateY(-1px); }
}

.race-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.race-entry {
  min-height: 70px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(73, 171, 255, 0.28);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.36);
  text-align: left;
  overflow: hidden;
}

.race-entry.selected {
  border-color: rgba(255, 216, 112, 0.76);
  box-shadow: 0 0 18px rgba(255, 216, 112, 0.18);
}

.race-entry.hit {
  background: linear-gradient(135deg, rgba(33, 126, 57, 0.68), rgba(0, 0, 0, 0.34));
}

.race-entry-number {
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #07111b;
  background: var(--runner-color, #ffd773);
  font-size: 12px;
  font-weight: 950;
}

.race-entry strong,
.race-entry span,
.race-entry small,
.race-entry b {
  min-width: 0;
}

.race-entry strong {
  display: block;
  color: #fff2c8;
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race-entry span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.race-entry small {
  color: #ffe49b;
  font-size: 13px;
  font-weight: 950;
}

.race-entry b {
  color: #79ff9d;
  font-size: 11px;
  white-space: nowrap;
}

.race-entry > div:nth-child(3) {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.race-ticket {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 216, 112, 0.38);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.44);
}

.race-ticket span {
  color: #8fd9ff;
  font-size: 11px;
  font-weight: 950;
}

.race-ticket strong {
  color: #fff2c8;
  font-size: 13px;
  font-weight: 950;
}

.race-ticket b {
  color: #ffe49b;
  font-size: 14px;
}

.track-spark,
.track-shockwave {
  position: absolute;
  pointer-events: none;
  z-index: 4;
}

.track-spark {
  left: 18%;
  right: 18%;
  top: 134px;
  height: 120px;
  background:
    radial-gradient(circle at 20% 30%, var(--spark-color, #ffd773), transparent 6px),
    radial-gradient(circle at 50% 62%, var(--spark-color, #ffd773), transparent 7px),
    radial-gradient(circle at 82% 42%, var(--spark-color, #ffd773), transparent 5px);
  filter: drop-shadow(0 0 14px var(--spark-color, #ffd773));
  animation: trackSpark 900ms ease-out forwards;
}

.track-shockwave {
  left: 50%;
  top: 184px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 69, 58, 0.82);
  box-shadow: 0 0 28px rgba(255, 69, 58, 0.5);
  animation: shockwave 1000ms ease-out forwards;
}

@keyframes trackSpark {
  from { opacity: 0; transform: translateY(12px) scale(0.8); }
  35% { opacity: 1; }
  to { opacity: 0; transform: translateY(-18px) scale(1.25); }
}

@keyframes shockwave {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(9); }
}

.table-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(255, 255, 255, 0.2), transparent 50.4%),
    radial-gradient(circle at 50% 48%, rgba(255, 80, 45, 0.2), transparent 23%);
  pointer-events: none;
}

.hand-zone {
  display: grid;
  gap: 8px;
  align-content: center;
  min-width: 0;
}

.hand-zone h2 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  letter-spacing: 0;
}

.player-zone h2 {
  color: #51b8ff;
}

.banker-zone h2 {
  color: #ff7068;
}

.cards {
  min-height: 118px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(2px, 0.7vw, 5px);
  perspective: 900px;
  width: 100%;
}

.playing-card,
.card-placeholder {
  width: clamp(43px, 12.9vw, 62px);
  height: clamp(67px, 20vw, 94px);
  border-radius: 9px;
  flex: 0 0 auto;
}

.card-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: rgba(216, 235, 255, 0.35);
  background: rgba(0, 0, 0, 0.18);
  font-size: 10px;
  font-weight: 900;
}

.playing-card {
  position: relative;
  overflow: hidden;
  color: #11161f;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.95), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f2f3f0 56%, #d7d8d1 100%);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08),
    inset 0 -8px 20px rgba(0, 0, 0, 0.08);
  transform-style: preserve-3d;
}

.playing-card.just-dealt {
  animation: cardDeal 420ms cubic-bezier(.2,.9,.25,1.2);
}

@keyframes cardDeal {
  from {
    transform: translate3d(42px, -28px, 0) rotateZ(9deg) rotateY(68deg);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) rotateZ(0) rotateY(0);
    opacity: 1;
  }
}

.playing-card.red {
  color: #b91618;
}

.playing-card.black {
  color: #151a22;
}

.playing-card.back {
  color: #f6d484;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 214, 113, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(255, 215, 102, 0.16), transparent 28%, rgba(31, 147, 255, 0.16)),
    repeating-linear-gradient(45deg, #071225 0 5px, #0c1d38 5px 10px);
  border-color: rgba(255, 216, 111, 0.66);
}

.playing-card.revealed {
  animation: cardFlip 340ms ease-out;
}

@keyframes cardFlip {
  from { transform: rotateY(74deg) scale(0.96); }
  to { transform: rotateY(0) scale(1); }
}

.card-back-inner {
  position: absolute;
  inset: 7px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 112, 0.54);
  border-radius: 7px;
  background:
    radial-gradient(circle, rgba(255, 216, 112, 0.18), transparent 48%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 8px);
}

.card-back-inner span {
  transform: rotate(-90deg);
  color: rgba(255, 232, 168, 0.68);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
}

.card-back-inner b {
  position: absolute;
  font-size: 32px;
  opacity: 0.42;
}

.corner {
  position: absolute;
  display: grid;
  justify-items: center;
  line-height: 0.9;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 950;
}

.corner b {
  font-size: 15px;
}

.corner span {
  font-size: 15px;
}

.corner.top {
  top: 5px;
  left: 6px;
}

.corner.bottom {
  right: 6px;
  bottom: 5px;
  transform: rotate(180deg);
}

.card-pips {
  position: absolute;
  inset: 20px 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, 1fr);
  align-items: center;
  justify-items: center;
  font-size: clamp(11px, 3vw, 15px);
}

.pip {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55));
}

.ace {
  grid-column: 1 / 4;
  grid-row: 2 / 5;
  font-size: clamp(32px, 8.8vw, 42px);
  align-self: center;
}

.p1 { grid-column: 2; grid-row: 1; }
.p2 { grid-column: 2; grid-row: 5; transform: rotate(180deg); }
.p3 { grid-column: 2; grid-row: 3; }
.p4 { grid-column: 1; grid-row: 1; }
.p5 { grid-column: 3; grid-row: 5; transform: rotate(180deg); }
.p6 { grid-column: 3; grid-row: 1; }
.p7 { grid-column: 1; grid-row: 5; transform: rotate(180deg); }
.p8 { grid-column: 1; grid-row: 3; }
.p9 { grid-column: 3; grid-row: 3; }
.p10 { grid-column: 2; grid-row: 4; transform: rotate(180deg); }

.court {
  grid-column: 1 / 4;
  grid-row: 1 / 4;
  align-self: end;
  font-size: clamp(28px, 8vw, 38px);
  opacity: 0.9;
}

.card-pips strong {
  grid-column: 1 / 4;
  grid-row: 3 / 5;
  align-self: center;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 0;
}

.card-pips em {
  grid-column: 1 / 4;
  grid-row: 4 / 6;
  align-self: start;
  font-style: normal;
  font-size: clamp(22px, 6.2vw, 30px);
  transform: rotate(180deg);
  opacity: 0.72;
}

.score {
  place-self: center;
  min-width: 54px;
  padding: 2px 14px;
  border-radius: 5px;
  border: 1px solid currentColor;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.4);
}

.player-zone .score {
  color: #62c5ff;
}

.banker-zone .score {
  color: #ff776f;
}

.result-seal {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 210, 104, 0.84);
  background:
    radial-gradient(circle, rgba(255, 214, 103, 0.25), transparent 58%),
    linear-gradient(180deg, rgba(41, 25, 6, 0.96), rgba(3, 6, 12, 0.98));
  box-shadow: 0 0 28px rgba(255, 187, 53, 0.34), inset 0 0 18px rgba(255, 225, 132, 0.18);
  text-align: center;
  z-index: 2;
}

.result-seal span {
  color: #f3cf76;
  font-size: 12px;
}

.result-seal strong {
  color: #fff0bf;
  font-size: 16px;
  line-height: 1.1;
}

.guide-character {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 78px;
  height: 96px;
  z-index: 3;
  display: none;
  place-items: center;
  pointer-events: none;
  opacity: 0.92;
}

.dealer-message {
  grid-column: 1 / -1;
  justify-self: center;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 4px 14px;
  border: 1px solid rgba(255, 216, 112, 0.38);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.44);
  color: #ffe6a1;
  font-size: 12px;
  font-weight: 900;
}

.guide-character img {
  width: 92px;
  max-width: none;
  border-radius: 20px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
  mask-image: radial-gradient(circle at 50% 36%, black 0 58%, transparent 82%);
}

.guide-character span {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(4, 10, 20, 0.92);
  border: 1px solid rgba(255, 216, 105, 0.45);
  color: #ffe7a7;
  font-size: 8px;
  line-height: 1.2;
  text-align: center;
}

.bet-board {
  margin-top: 8px;
}

.main-bets,
.side-bets {
  display: grid;
  gap: 6px;
}

.main-bets {
  grid-template-columns: 1fr 0.76fr 1fr;
}

.side-bets {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 6px;
}

.bet-tile,
.side-tile {
  min-height: 68px;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 8px 5px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(4, 10, 18, 0.82);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.06), 0 8px 18px rgba(0, 0, 0, 0.24);
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.bet-tile::before,
.side-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.bet-tile span,
.side-tile span,
.bet-tile small,
.side-tile small,
.bet-tile b,
.side-tile b {
  position: relative;
  z-index: 1;
}

.bet-tile span {
  font-size: 20px;
}

.bet-tile small,
.side-tile small {
  color: #fff3c8;
  font-size: 12px;
}

.bet-tile b,
.side-tile b {
  min-height: 18px;
  color: var(--gold);
  font-size: 13px;
}

.player {
  color: #dff3ff;
  border-color: rgba(41, 161, 255, 0.72);
}

.player::before {
  background: linear-gradient(135deg, #053776, #0d8aff);
}

.banker {
  color: #fff1ee;
  border-color: rgba(255, 87, 73, 0.75);
}

.banker::before {
  background: linear-gradient(135deg, #6e0d0a, #ff3129);
}

.tie {
  color: #eaffef;
  border-color: rgba(61, 255, 114, 0.7);
}

.tie::before {
  background: linear-gradient(135deg, #044916, #18ce55);
}

.side-tile {
  min-height: 54px;
}

.side-tile span {
  font-size: 13px;
}

.big {
  border-color: rgba(255, 193, 62, 0.75);
}

.big::before {
  background: linear-gradient(135deg, #5c3500, #ffb829);
}

.small {
  border-color: rgba(198, 80, 255, 0.78);
}

.small::before {
  background: linear-gradient(135deg, #2e0f4e, #a833ff);
}

.pair {
  border-color: rgba(56, 235, 229, 0.72);
}

.pair::before {
  background: linear-gradient(135deg, #073b45, #21c6cb);
}

.player-pair {
  border-color: rgba(41, 161, 255, 0.72);
}

.player-pair::before {
  background: linear-gradient(135deg, #052f66, #11a4ff);
}

.banker-pair {
  border-color: rgba(255, 87, 73, 0.75);
}

.banker-pair::before {
  background: linear-gradient(135deg, #6e0d0a, #ff453a);
}

.bet-tile.active,
.side-tile.active {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(255, 216, 108, 0.28), inset 0 0 20px rgba(255, 255, 255, 0.12);
}

.chip-deck {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.chip {
  width: 100%;
  max-width: 62px;
  justify-self: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 5px dashed rgba(255, 255, 255, 0.82);
  background: radial-gradient(circle, #eeeeee 0 38%, #1c1f26 39% 44%, #d9d9d9 45%);
  color: #111823;
  font-weight: 950;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.34);
}

.chip.green {
  background: radial-gradient(circle, #ffffff 0 38%, #148235 39% 44%, #2fbc55 45%);
}

.chip.blue {
  background: radial-gradient(circle, #ffffff 0 38%, #0a55ac 39% 44%, #1896ff 45%);
}

.chip.purple {
  background: radial-gradient(circle, #ffffff 0 38%, #6930a7 39% 44%, #b66aff 45%);
}

.chip.gold {
  background: radial-gradient(circle, #fff8df 0 38%, #a5650a 39% 44%, #e9a12e 45%);
}

.chip.selected {
  outline: 3px solid rgba(255, 222, 123, 0.92);
  box-shadow: 0 0 22px rgba(255, 219, 107, 0.5);
}

.bet-control {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 64px 44px 1fr 44px 76px;
  gap: 6px;
  align-items: center;
}

.power-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 6px;
  margin-top: 8px;
}

.all-in-control,
.story-control {
  min-height: 50px;
  border: 1px solid rgba(255, 224, 122, 0.76);
  border-radius: 8px;
  color: #fff1c4;
  font-weight: 950;
}

.all-in-control {
  background:
    linear-gradient(135deg, rgba(119, 11, 11, 0.96), rgba(210, 44, 34, 0.96), rgba(106, 22, 120, 0.96)),
    radial-gradient(circle at 50% 0, rgba(255, 222, 117, 0.28), transparent 58%);
  box-shadow: 0 0 22px rgba(255, 75, 52, 0.28), inset 0 0 18px rgba(255, 215, 92, 0.16);
  text-shadow: 0 2px 0 rgba(30, 0, 0, 0.72);
}

.all-in-control span,
.all-in-control small {
  display: block;
}

.all-in-control span {
  font-size: 19px;
  line-height: 1.05;
}

.all-in-control small {
  margin-top: 2px;
  color: #ffe7a4;
  font-size: 10px;
}

.story-control {
  background: linear-gradient(180deg, rgba(15, 51, 88, 0.96), rgba(5, 12, 22, 0.96));
  font-size: 14px;
}

.bet-tile.selected-target,
.side-tile.selected-target {
  outline: 2px solid rgba(255, 241, 171, 0.9);
  outline-offset: 2px;
}

.mini-control,
.round-control {
  min-height: 42px;
  border: 1px solid rgba(255, 213, 107, 0.45);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(38, 30, 18, 0.95), rgba(8, 10, 14, 0.95));
  box-shadow: inset 0 0 14px rgba(255, 211, 102, 0.12);
  font-weight: 900;
}

.round-control {
  border-radius: 50%;
  font-size: 22px;
}

.current-bet {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 213, 107, 0.36);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.38);
}

.current-bet strong {
  color: var(--gold);
  font-size: 20px;
}

.confirm-button {
  width: 100%;
  min-height: 70px;
  margin-top: 8px;
  border: 1px solid rgba(255, 224, 122, 0.82);
  clip-path: polygon(7% 0, 93% 0, 100% 50%, 93% 100%, 7% 100%, 0 50%);
  background:
    linear-gradient(135deg, rgba(93, 23, 16, 0.98), rgba(158, 39, 31, 0.98) 44%, rgba(105, 35, 126, 0.98)),
    radial-gradient(circle at 50% 0, rgba(255, 222, 117, 0.32), transparent 58%);
  box-shadow: 0 0 28px rgba(255, 75, 52, 0.34), inset 0 0 25px rgba(255, 215, 92, 0.22);
  color: #ffe89b;
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(30, 0, 0, 0.72);
}

.confirm-button span {
  display: block;
  font-size: clamp(26px, 8vw, 36px);
  line-height: 1;
}

.confirm-button small {
  color: #fff8dc;
  font-size: 12px;
}

.confirm-button:disabled {
  filter: grayscale(0.8);
  opacity: 0.62;
}

.road-panel {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 216, 111, 0.32);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
}

.road-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.road-title span {
  color: #ffe7a4;
  font-size: 12px;
  font-weight: 900;
}

.road-title button {
  border: 1px solid rgba(255, 216, 111, 0.4);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #ffe9b0;
  font-size: 11px;
}

.road {
  min-height: 28px;
  display: flex;
  gap: 4px;
  overflow: hidden;
}

.road-dot {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.road-dot.P {
  background: #1168c8;
}

.road-dot.B {
  background: #bf2420;
}

.road-dot.T {
  background: #1d9340;
}

.road-dot.R {
  background: linear-gradient(180deg, #ffd773, #b46c13);
  color: #09111b;
}

.bottom-nav {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border: 1px solid rgba(255, 216, 107, 0.34);
  border-radius: 11px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.76);
}

.nav-item {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(25, 32, 44, 0.94), rgba(4, 7, 12, 0.96));
  color: #e9eef8;
  font-weight: 900;
}

.nav-item span {
  font-size: 24px;
  line-height: 1;
}

.nav-item small {
  font-size: 10px;
}

.nav-item.active {
  color: #ffe49a;
  background:
    radial-gradient(circle at 50% 0, rgba(167, 67, 255, 0.42), transparent 70%),
    linear-gradient(180deg, rgba(32, 60, 111, 0.98), rgba(7, 12, 21, 0.98));
}

.panel-drawer,
.squeeze-overlay,
.ending-overlay,
.result-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: end center;
  z-index: 20;
  padding: 10px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.panel-drawer.open,
.squeeze-overlay.open,
.ending-overlay.open,
.result-overlay.open {
  display: grid;
}

.drawer-card,
.squeeze-card-panel,
.ending-card,
.result-card {
  width: min(100%, 430px);
  max-height: calc(100svh - 24px);
  overflow: auto;
  border: 1px solid rgba(255, 216, 106, 0.52);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(9, 20, 36, 0.98), rgba(3, 7, 14, 0.98));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.64), inset 0 0 28px rgba(54, 171, 255, 0.12);
}

.drawer-card {
  padding: 18px;
  position: relative;
}

.close-button {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.38);
  font-size: 24px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel h2,
.ending-card h1 {
  margin: 0 42px 12px 0;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.tab-panel p {
  color: #d9e7f7;
  line-height: 1.75;
  margin: 0 0 14px;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.info-grid div,
.rule-list div,
.history-item,
.chart-card {
  border: 1px solid rgba(73, 171, 255, 0.34);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.78);
  padding: 10px;
}

.info-grid span,
.rule-list span,
.history-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.info-grid strong,
.rule-list strong {
  color: #ffe4a0;
  font-size: 20px;
}

.rule-list {
  display: grid;
  gap: 8px;
}

.rule-list strong {
  display: block;
  font-size: 16px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.road-dashboard {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.road-card-main {
  padding: 10px;
  border: 1px solid rgba(73, 171, 255, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(5, 16, 32, 0.9), rgba(2, 6, 13, 0.9)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 24px);
}

.road-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.road-head strong {
  color: #ffe09a;
  font-size: 15px;
}

.road-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.big-road-grid,
.bead-plate {
  display: grid;
  grid-template-rows: repeat(6, 24px);
  grid-auto-flow: column;
  grid-auto-columns: 24px;
  gap: 2px;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255,255,255,0.08) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255,255,255,0.08) 23px 24px),
    rgba(1, 8, 17, 0.82);
}

.road-cell,
.bead-cell {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  position: relative;
}

.road-cell.empty,
.bead-cell.empty {
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.road-cell.P,
.bead-cell.P {
  background: #1168c8;
  box-shadow: 0 0 10px rgba(24, 142, 255, 0.42);
}

.road-cell.B,
.bead-cell.B {
  background: #bf2420;
  box-shadow: 0 0 10px rgba(255, 64, 54, 0.42);
}

.road-cell.T,
.bead-cell.T {
  background: #1d9340;
  box-shadow: 0 0 10px rgba(36, 220, 100, 0.42);
}

.road-cell.tie::after {
  content: "";
  position: absolute;
  width: 130%;
  height: 3px;
  border-radius: 3px;
  background: #1ff06a;
  transform: rotate(-42deg);
  box-shadow: 0 0 8px rgba(31, 240, 106, 0.72);
}

.road-cell .tie-count {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 12px;
  height: 12px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0d2817;
  color: #baffcb;
  border: 1px solid rgba(31, 240, 106, 0.65);
  font-size: 8px;
}

.road-cell.pair::before,
.bead-cell.pair::before {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffda73;
  box-shadow: 0 0 6px rgba(255, 218, 115, 0.8);
}

.road-cell.natural,
.bead-cell.natural {
  outline: 2px solid rgba(255, 216, 112, 0.65);
}

.achievement-progress {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(255, 216, 112, 0.38);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.34);
}

.achievement-progress span {
  display: block;
  color: #ffe5a5;
  font-weight: 950;
  margin-bottom: 8px;
}

.achievement-progress div {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.1);
}

.achievement-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #178bff, #32e6ff, #ffd773);
  box-shadow: 0 0 18px rgba(54, 216, 255, 0.42);
  transition: width 300ms ease;
}

.achievement-grid {
  display: grid;
  gap: 8px;
}

.achievement-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(73, 171, 255, 0.3);
  border-radius: 10px;
  background: rgba(3, 10, 21, 0.72);
}

.achievement-item > div:not(.badge-icon) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.achievement-item .badge-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #09111b;
  background: linear-gradient(180deg, #ffeaa6, #bd7815);
  font-size: 18px;
  font-weight: 950;
}

.achievement-item.locked {
  opacity: 0.56;
  filter: saturate(0.4);
}

.achievement-item strong {
  display: block;
  color: #fff2c8;
  font-size: 14px;
  line-height: 1.25;
}

.achievement-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.achievement-item em {
  color: #ffe49d;
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
}

.trend-strip {
  display: flex;
  gap: 5px;
  min-height: 30px;
  overflow-x: auto;
}

.trend-chip {
  flex: 0 0 auto;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.trend-chip.P { background: rgba(17, 104, 200, 0.95); }
.trend-chip.B { background: rgba(191, 36, 32, 0.95); }
.trend-chip.T { background: rgba(29, 147, 64, 0.95); }

.history-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 8px;
  align-items: center;
}

.history-item strong {
  color: #fff;
}

.history-item b {
  color: var(--gold);
}

.history-item .loss {
  color: #ff8179;
}

.history-item .win {
  color: #79ff9d;
}

.chart-title {
  color: #ffe1a0;
  font-weight: 900;
  margin-bottom: 8px;
}

.sparkline {
  height: 120px;
  display: flex;
  align-items: end;
  gap: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.spark-bar {
  flex: 1;
  min-width: 3px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #3ee7ff, #106de8);
}

.danger-soft {
  width: 100%;
  margin-top: 14px;
  min-height: 48px;
  border: 1px solid rgba(255, 80, 68, 0.5);
  border-radius: 8px;
  background: rgba(100, 10, 8, 0.42);
  color: #ffe2df;
  font-weight: 900;
}

.setting-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(73, 171, 255, 0.34);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.78);
}

.setting-row span {
  color: #dceeff;
  font-weight: 900;
}

.toggle {
  min-width: 70px;
  min-height: 34px;
  border: 1px solid rgba(255, 216, 107, 0.44);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--muted);
  font-weight: 950;
}

.toggle.active {
  color: #07101a;
  background: linear-gradient(180deg, #ffe594, #c9811e);
}

.squeeze-card-panel {
  padding: 14px;
}

.squeeze-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.squeeze-top span {
  color: #8fd3ff;
  font-weight: 950;
}

.squeeze-top strong {
  color: var(--gold);
  font-size: 22px;
}

.squeeze-top small {
  justify-self: end;
  color: var(--muted);
}

.squeeze-table {
  min-height: 330px;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 216, 107, 0.35);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 56, 54, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(7, 13, 26, 0.95), rgba(0, 0, 0, 0.9));
}

.squeeze-card {
  width: 190px;
  height: 270px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transform: perspective(900px) rotateX(8deg);
  border: 1px solid rgba(255, 214, 105, 0.72);
  background:
    repeating-linear-gradient(45deg, #071226 0 10px, #0d1d35 10px 20px),
    linear-gradient(135deg, rgba(255, 216, 112, 0.18), transparent 40%);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.46), 0 0 32px rgba(142, 65, 255, 0.32);
}

.card-back-art {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 216, 112, 0.55);
  border-radius: 12px;
  color: rgba(255, 216, 112, 0.75);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0;
}

.peek,
.open-face {
  position: absolute;
  display: none;
  background: #f7f7f2;
  color: #10141b;
}

.peek.vertical {
  left: 0;
  right: 0;
  top: 0;
  height: 42px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.peek.horizontal {
  top: 0;
  bottom: 0;
  right: 0;
  width: 48px;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
}

.peek.visible {
  display: grid;
  place-items: center;
}

.peek .pip-row {
  display: flex;
  gap: 14px;
  font-size: 24px;
}

.peek.red {
  color: #cd1f1b;
}

.open-face {
  inset: 0;
  place-items: center;
  font-size: 82px;
  font-weight: 950;
}

.open-face.visible {
  display: grid;
}

.open-face small {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 34px;
  line-height: 1;
}

.open-face.red {
  color: #c91e1a;
}

.finger-mask {
  position: absolute;
  display: none;
  width: 74px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f2c1a5, #a9664f);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.36);
  opacity: 0.94;
}

.finger-mask.one {
  left: -18px;
  top: -8px;
  transform: rotate(-22deg);
}

.finger-mask.two {
  right: -18px;
  bottom: 18px;
  transform: rotate(20deg);
}

.squeeze-card.peeking .finger-mask {
  display: block;
}

.tension-meter {
  width: min(100%, 260px);
  height: 28px;
  border: 1px solid rgba(255, 82, 139, 0.64);
  border-radius: 999px;
  padding: 4px;
  position: relative;
  overflow: hidden;
}

.tension-meter div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #208cff, #ff3b8a, #ffd773);
  box-shadow: 0 0 18px rgba(255, 58, 135, 0.5);
  transition: width 260ms ease;
}

.tension-meter span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffe7f0;
  font-size: 12px;
  font-weight: 900;
}

.squeeze-hint {
  min-height: 48px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #ffe9aa;
  font-weight: 900;
}

.squeeze-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.squeeze-actions button,
.ending-actions button {
  min-height: 50px;
  border: 1px solid rgba(255, 216, 106, 0.48);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(25, 45, 72, 0.96), rgba(8, 12, 18, 0.96));
  color: #fff1c4;
  font-weight: 950;
}

.ending-overlay {
  place-items: center;
}

.result-overlay {
  place-items: center;
}

.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 35;
  overflow: hidden;
}

.fx-burst {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fx-color, #ffd773);
  box-shadow: 0 0 18px var(--fx-color, #ffd773);
  animation: fxBurst 950ms ease-out forwards;
}

@keyframes fxBurst {
  from {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--distance)) scale(0.08);
    opacity: 0;
  }
}

.screen-flash {
  position: fixed;
  inset: 0;
  z-index: 34;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 222, 111, 0.5), transparent 62%);
  animation: flashFade 700ms ease-out forwards;
}

.floating-caption {
  position: fixed;
  left: 50%;
  top: 34%;
  z-index: 36;
  transform: translate(-50%, -50%);
  padding: 10px 18px;
  border: 1px solid var(--caption-color, #ffd773);
  border-radius: 999px;
  color: var(--caption-color, #ffd773);
  background: rgba(0, 0, 0, 0.72);
  box-shadow: 0 0 28px color-mix(in srgb, var(--caption-color, #ffd773) 45%, transparent);
  font-size: 22px;
  font-weight: 950;
  pointer-events: none;
  animation: floatingCaption 1800ms ease forwards;
}

@keyframes floatingCaption {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.8); }
  18%, 72% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -92%) scale(1.08); }
}

@keyframes flashFade {
  from { opacity: 0.8; }
  to { opacity: 0; }
}

.achievement-toast {
  position: fixed;
  left: 50%;
  top: calc(18px + env(safe-area-inset-top, 0px));
  z-index: 45;
  width: min(calc(100% - 24px), 390px);
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 216, 112, 0.72);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 216, 112, 0.24), transparent 38%),
    linear-gradient(180deg, rgba(14, 22, 36, 0.98), rgba(4, 8, 14, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.52), 0 0 28px rgba(255, 216, 112, 0.18);
  transform: translate(-50%, -140%);
  opacity: 0;
  pointer-events: none;
}

.achievement-toast.show {
  animation: toastInOut 3600ms ease forwards;
}

@keyframes toastInOut {
  0% { transform: translate(-50%, -140%); opacity: 0; }
  10%, 78% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -140%); opacity: 0; }
}

.achievement-toast span {
  color: #83d9ff;
  font-size: 11px;
  font-weight: 950;
}

.achievement-toast strong {
  color: #ffe49b;
  font-size: 18px;
  font-weight: 950;
}

.achievement-toast small {
  color: #dceeff;
  font-size: 12px;
  font-weight: 800;
}

.ending-card {
  padding: 24px 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 214, 98, 0.28), transparent 46%),
    linear-gradient(180deg, rgba(16, 12, 7, 0.98), rgba(3, 6, 12, 0.98));
}

.ending-card h1 {
  margin: 0 0 6px;
  font-size: 42px;
  text-shadow: 0 0 22px rgba(255, 215, 87, 0.42);
}

.ending-card p {
  color: #fff1c8;
  margin: 0 0 16px;
  font-weight: 900;
}

.ending-money {
  margin: 16px 0;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 12vw, 54px);
  font-weight: 950;
}

.ending-ticker {
  min-height: 48px;
  display: grid;
  place-items: center;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 69, 58, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 69, 58, 0.16), rgba(255, 216, 112, 0.1), rgba(73, 171, 255, 0.12)),
    rgba(0, 0, 0, 0.42);
  color: #ffe4d7;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.45;
  text-shadow: 0 0 14px rgba(255, 69, 58, 0.38);
}

.ending-ticker[aria-hidden="true"] {
  display: none;
}

.ending-ticker.pulse {
  animation: tickerPulse 1800ms ease both;
}

@keyframes tickerPulse {
  0% { opacity: 0; transform: translateY(8px) scale(0.98); filter: blur(4px); }
  18%, 78% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0.72; transform: translateY(-2px) scale(1); filter: blur(0); }
}

.ending-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.share-proof {
  display: grid;
  gap: 3px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(52, 229, 255, 0.34);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.38);
}

.share-proof span {
  color: #8fd9ff;
  font-size: 11px;
  font-weight: 950;
}

.share-proof strong {
  color: #ffe6a4;
  font-size: 13px;
  font-weight: 950;
}

.ending-sub {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid rgba(73, 171, 255, 0.34);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.34);
  color: #dceeff;
  font-weight: 950;
}

.result-card {
  padding: 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 216, 99, 0.24), transparent 40%),
    linear-gradient(180deg, rgba(7, 14, 27, 0.98), rgba(2, 5, 10, 0.98));
}

.result-hero {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 13vw, 60px);
  font-weight: 950;
  line-height: 0.95;
  text-shadow: 0 3px 0 #4d2200, 0 0 26px rgba(255, 211, 75, 0.46);
}

.result-character {
  width: min(34vw, 128px);
  margin: 4px auto 2px;
  display: block;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.52));
}

.result-squad {
  display: grid;
  grid-template-columns: repeat(4, 38px);
  justify-content: center;
  gap: 5px;
  margin: -2px 0 8px;
}

.result-squad img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  border: 1px solid rgba(255, 216, 112, 0.45);
  background: radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.95), rgba(187, 220, 255, 0.78));
  box-shadow: 0 7px 12px rgba(0, 0, 0, 0.44);
}

.result-score {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.result-score div,
.result-breakdown div {
  border: 1px solid rgba(73, 171, 255, 0.36);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  padding: 10px;
}

.result-score span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.result-score strong {
  color: #fff;
  font-size: 30px;
}

.result-profit {
  margin: 12px 0;
  color: #78ff9c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 950;
}

.result-profit.loss {
  color: #ff837a;
}

.result-comment {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 216, 112, 0.34);
  border-radius: 10px;
  color: #fff1c8;
  background:
    linear-gradient(90deg, rgba(78, 16, 18, 0.72), rgba(6, 16, 30, 0.72)),
    radial-gradient(circle at 20% 50%, rgba(255, 216, 112, 0.16), transparent 48%);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.result-breakdown {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.result-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #dceeff;
  font-size: 13px;
  font-weight: 800;
}

.result-breakdown b {
  color: var(--gold);
}

.next-round,
.result-sub {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255, 216, 106, 0.58);
  color: #fff1c4;
  font-weight: 950;
}

.next-round {
  clip-path: polygon(7% 0, 93% 0, 100% 50%, 93% 100%, 7% 100%, 0 50%);
  background: linear-gradient(135deg, rgba(118, 65, 8, 0.98), rgba(216, 152, 38, 0.98));
  color: #101010;
  font-size: 22px;
}

.result-sub {
  margin-top: 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(19, 49, 88, 0.96), rgba(7, 12, 20, 0.96));
}

@media (min-width: 760px) {
  .app-shell {
    padding-block: 24px;
  }

  .game-frame {
    min-height: 900px;
  }
}

@media (max-width: 370px) {
  .game-frame {
    padding-inline: 8px;
  }

  .table-stage {
    grid-template-columns: 1fr 1fr;
  }

  .playing-card {
    width: 48px;
    height: 74px;
  }

  .result-seal {
    width: 82px;
    height: 82px;
  }

  .bet-control {
    grid-template-columns: 56px 40px 1fr 40px 64px;
  }

  .race-entries {
    grid-template-columns: 1fr;
  }

  .sport-tab small {
    display: none;
  }
}
