/* ── SkyyJack V0.2 — trigger ── */
.skyyjack-trigger {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(28, 28, 30, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transform: translateX(-50%);
  box-shadow: 0 0 14px var(--accent-glow-soft), 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

.skyyjack-trigger[hidden] { display: none !important; }

.skyyjack-trigger__icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--accent);
  flex-shrink: 0;
}

.skyyjack-trigger:hover,
.skyyjack-trigger:focus-visible {
  transform: translateX(-50%) scale(1.05);
  background: rgba(36, 36, 38, 0.88);
  border-color: var(--accent-border);
  box-shadow: 0 0 22px var(--accent-glow), 0 6px 20px rgba(0, 0, 0, 0.4);
  outline: none;
}

/* ── Overlay ── */
.skyyjack-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}

.skyyjack-overlay:not([hidden]) { pointer-events: auto; }
.skyyjack-overlay[hidden] { display: none !important; }
.skyyjack-overlay.is-closing { pointer-events: none; }

.skyyjack-overlay__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.28s ease;
  cursor: pointer;
}

.skyyjack-overlay.is-open .skyyjack-overlay__backdrop { opacity: 1; }
.skyyjack-overlay.is-closing .skyyjack-overlay__backdrop { opacity: 0; }

.skyyjack-overlay__brand {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1;
  width: min(72px, 14vw);
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  filter: none;
  opacity: 0;
}

.skyyjack-overlay.is-open .skyyjack-overlay__brand {
  opacity: 1;
  transition: opacity 0.32s ease 0.08s;
}

.skyyjack-overlay.is-closing .skyyjack-overlay__brand {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.skyyjack-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(480px, calc(100vw - 20px));
  height: min(620px, calc(100dvh - 24px));
  max-height: min(620px, calc(100dvh - 24px));
  padding: 0;
  box-sizing: border-box;
  border: none;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.28s ease;
  overflow: hidden;
}

.skyyjack-overlay.is-open .skyyjack-panel {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.skyyjack-overlay.is-closing .skyyjack-panel {
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
}

.skyyjack-panel__close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 10px;
  z-index: 5;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.skyyjack-panel__close:hover,
.skyyjack-panel__close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  outline: none;
}

.skyyjack-corner-controls {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.skyyjack-audio-control {
  position: relative;
}

.skyyjack-audio-control__btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.skyyjack-audio-control__btn:hover,
.skyyjack-audio-control__btn:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  outline: none;
}

.skyyjack-audio-control__icon {
  width: 15px;
  height: 15px;
}

.skyyjack-audio-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  top: auto;
  left: 0;
  right: auto;
  min-width: 148px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 18, 20, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.skyyjack-audio-popover[hidden] {
  display: none !important;
}

.skyyjack-audio-popover__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
}

.skyyjack-audio-popover__row + .skyyjack-audio-popover__row {
  margin-top: 4px;
}

.skyyjack-audio-popover__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.skyyjack-audio-popover__toggle {
  min-width: 44px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.skyyjack-audio-popover__toggle.is-off {
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.04);
}

.skyyjack-audio-popover__toggle:hover,
.skyyjack-audio-popover__toggle:focus-visible {
  border-color: var(--accent-border);
  outline: none;
}

.skyyjack-panel__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.skyyjack-game {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  --sj-z-table: 1;
  --sj-z-shuffle: 28;
  --sj-z-outcome: 30;
}

.skyyjack-shuffle {
  position: absolute;
  inset: 0;
  z-index: var(--sj-z-shuffle);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.skyyjack-shuffle[hidden] {
  display: none !important;
}

.skyyjack-shuffle__logo {
  width: min(88px, 22vw);
  height: auto;
  object-fit: contain;
  filter: none;
  pointer-events: none;
  animation: sjShuffleLogoIn 0.28s ease-out;
}

@keyframes sjShuffleLogoIn {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.skyyjack-game.is-shuffling .skyyjack-table,
.skyyjack-game.is-shuffling .skyyjack-outcome {
  filter: blur(7px) saturate(0.85);
  opacity: 0.72;
  transition: filter 0.28s ease, opacity 0.28s ease;
}

.skyyjack-game.is-shuffling-out .skyyjack-table,
.skyyjack-game.is-shuffling-out .skyyjack-outcome {
  filter: none;
  opacity: 1;
}

.skyyjack-game.is-shuffling-out .skyyjack-shuffle__logo {
  animation: sjShuffleLogoOut 0.28s ease-in forwards;
}

@keyframes sjShuffleLogoOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.92);
  }
}

.skyyjack-game.is-shuffling .skyyjack-shuffle {
  filter: none;
  opacity: 1;
}

.skyyjack-card-animation-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.skyyjack-card-animation-layer--flying {
  z-index: 7;
}

.skyyjack-card-animation-layer .sj-card.is-flying,
.skyyjack-card-animation-layer .sj-card.is-settled {
  transform: none;
}

.skyyjack-card-animation-layer .sj-card.is-flying {
  z-index: 50;
}

.skyyjack-card-animation-layer .sj-card.is-settled {
  pointer-events: none;
}

/* ── Logged-out guest gate (overlay on full game shell) ── */
.skyyjack-guest-gate {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.skyyjack-guest-gate[hidden] {
  display: none !important;
}

.skyyjack-guest-gate__blur {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 3, 10, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}

.skyyjack-guest-gate__content {
  position: relative;
  z-index: 1;
  max-width: min(320px, 86%);
  padding: 0 12px;
  text-align: center;
}

.skyyjack-guest-gate__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.skyyjack-guest-gate__text {
  margin: 0 0 20px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.skyyjack-guest-gate__signin {
  padding: 11px 20px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: rgba(var(--accent-r), 0.16);
  color: var(--accent);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.skyyjack-guest-gate__signin:hover,
.skyyjack-guest-gate__signin:focus-visible {
  background: rgba(var(--accent-r), 0.24);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow-soft);
  outline: none;
}

.skyyjack-panel.is-guest-preview .skyyjack-game {
  pointer-events: none;
}

/* ── Game table ── */
.skyyjack-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: var(--sj-z-table);
  padding:
    calc(12px + env(safe-area-inset-top, 0px))
    12px
    calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10, 10, 14, 0.98) 0%, rgba(5, 5, 8, 0.99) 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

/* ── Compact HUD ── */
.skyyjack-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 2px 36px 0 4px;
  min-height: 52px;
}

.skyyjack-hud__balance {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.skyyjack-hud__balance-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.2;
}

.skyyjack-hud__balance-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skyyjack-hud__balance-value {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 18px rgba(var(--accent-r), 0.35);
}

.skyyjack-hud__balance-sub {
  font-size: 0.48rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  line-height: 1.2;
}

.skyyjack-coin {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(0, 0, 0, 0.35), transparent 55%),
    linear-gradient(145deg, rgba(var(--accent-r), 0.95) 0%, rgba(var(--accent-r), 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 0 10px rgba(var(--accent-r), 0.45),
    inset 0 1px 2px rgba(255, 255, 255, 0.35);
  position: relative;
}

.skyyjack-coin::after {
  content: "S";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.52rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.skyyjack-hud__title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.skyyjack-hud__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  text-shadow: 0 0 20px rgba(var(--accent-r), 0.25);
  white-space: nowrap;
}

.skyyjack-info-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.skyyjack-info-btn:hover,
.skyyjack-info-btn:focus-visible {
  border-color: rgba(var(--accent-r), 0.55);
  color: var(--accent);
  outline: none;
}

.skyyjack-info-panel {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  width: min(92%, 320px);
  max-height: min(52vh, 360px);
  overflow-y: auto;
  padding: 14px 16px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 18, 0.94);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.68rem;
  line-height: 1.45;
}

.skyyjack-info-panel__close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.skyyjack-info-panel__heading {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.skyyjack-info-panel__subheading {
  margin: 10px 0 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.skyyjack-info-panel__lead {
  margin: 0 0 8px;
}

.skyyjack-info-panel__list {
  margin: 0;
  padding-left: 1.1em;
}

.skyyjack-info-panel__list li {
  margin-bottom: 2px;
}

.skyyjack-info-panel__payout,
.skyyjack-info-panel__note {
  margin: 0 0 4px;
}

.skyyjack-info-panel__payout strong {
  color: rgba(255, 255, 255, 0.95);
}

.skyyjack-hud__daily {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.skyyjack-hud__daily-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.2;
}

.skyyjack-hud__claim {
  padding: 5px 10px;
  border: 1px solid rgba(var(--accent-r), 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(var(--accent-r), 0.22) 0%, rgba(var(--accent-r), 0.1) 100%);
  color: var(--accent);
  font: inherit;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 12px rgba(var(--accent-r), 0.12);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.skyyjack-hud__claim:hover:not(:disabled),
.skyyjack-hud__claim:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 16px rgba(var(--accent-r), 0.22);
  outline: none;
}

.skyyjack-hud__claim:active:not(:disabled) {
  transform: translateY(0);
}

.skyyjack-hud__claim:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.skyyjack-hud__claimed {
  font-size: 0.52rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.skyyjack-hud__claimed.is-cooldown {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.52);
}

/* ── Felt / playing surface ── */
.skyyjack-table__felt {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0 auto;
  border-radius: 50% / 38%;
  border: 1px solid rgba(var(--accent-r), 0.24);
  background:
    radial-gradient(ellipse 85% 65% at 50% 42%, rgba(var(--accent-r), 0.09), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 100%, rgba(0, 0, 0, 0.5), transparent 58%),
    linear-gradient(180deg, #1a1524 0%, #12101a 45%, #0c0a12 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 40px rgba(var(--accent-r), 0.07),
    inset 0 2px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.skyyjack-table__felt::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  border: 1px solid rgba(var(--accent-r), 0.08);
  pointer-events: none;
}

.skyyjack-table.is-skyyjack-moment .skyyjack-table__felt {
  animation: sjSkyyJackFlash 0.9s ease-out;
}

@keyframes sjSkyyJackFlash {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset, 0 0 40px rgba(var(--accent-r),0.07), inset 0 2px 24px rgba(0,0,0,0.35); }
  40% { box-shadow: 0 0 0 1px rgba(var(--accent-r),0.35) inset, 0 0 64px rgba(var(--accent-r),0.2), inset 0 2px 24px rgba(0,0,0,0.35); }
}

.skyyjack-table__center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.skyyjack-table__watermark {
  width: 56px;
  opacity: 0.07;
  filter: blur(0.5px);
  user-select: none;
}

.skyyjack-table__rule {
  margin: 0;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
}

/* ── Horizontal deck (whole stack rotated) ── */
.skyyjack-table__deck {
  position: absolute;
  top: 50%;
  right: 6px;
  z-index: 4;
  width: 76px;
  height: 58px;
  transform: translateY(-50%);
  pointer-events: none;
}

.skyyjack-table__deck-stack {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 74px;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

.sj-deck-card {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: linear-gradient(160deg, #0c0c12 0%, #050508 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.sj-deck-card--4 { transform: translate(0, 0); z-index: 1; }
.sj-deck-card--3 { transform: translate(-2px, -2px); z-index: 2; }
.sj-deck-card--2 { transform: translate(-4px, -4px); z-index: 3; }
.sj-deck-card--1,
.sj-deck-card--top { transform: translate(-6px, -6px); z-index: 4; overflow: hidden; }

.sj-deck-card:not(.sj-deck-card--top)::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 5px);
}

.sj-deck-card:not(.sj-deck-card--top)::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 6px;
  border: 1px solid rgba(var(--accent-r), 0.18);
}

.sj-deck-card__texture {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 5px);
}

.sj-deck-card__border {
  position: absolute;
  inset: 5px;
  border-radius: 6px;
  border: 1px solid rgba(var(--accent-r), 0.28);
  box-shadow: 0 0 10px rgba(var(--accent-r), 0.1);
}

.sj-deck-card__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(var(--accent-r), 0.3));
  pointer-events: none;
}

/* ── Fixed hand zones ── */
.skyyjack-zone {
  position: absolute;
  left: 0;
  right: 86px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  pointer-events: none;
}

.skyyjack-zone--dealer {
  top: 11%;
  height: 30%;
}

.skyyjack-zone--player {
  bottom: 11%;
  height: 30%;
  justify-content: flex-start;
}

.skyyjack-zone--player .skyyjack-total {
  margin-top: -15px;
}

.skyyjack-zone--player .skyyjack-hand__cards {
  margin-top: 17px;
}

.skyyjack-total {
  position: relative;
  z-index: 2;
  margin-bottom: calc((var(--sj-hand-stage-h) - var(--sj-card-h)) / 2 + var(--sj-total-clearance));
  min-width: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.skyyjack-total.is-hidden,
.skyyjack-total[hidden] {
  display: none !important;
}

.skyyjack-total.is-bump {
  transform: scale(1.14);
  color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow-soft);
}

.skyyjack-total.is-skyyjack {
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent-glow);
}

.skyyjack-hand__cards {
  --sj-card-w: 76px;
  --sj-card-h: 108px;
  --sj-hand-stage-h: 114px;
  --sj-total-clearance: 18px;
  position: relative;
  width: min(100%, 320px);
  height: var(--sj-hand-stage-h);
  flex-shrink: 0;
  pointer-events: none;
}

/* ── Playing cards ── */
.sj-card {
  --sj-card-w: 76px;
  --sj-card-h: 108px;
  position: absolute;
  top: 50%;
  width: var(--sj-card-w);
  height: var(--sj-card-h);
  margin: 0;
  perspective: 900px;
  transform: translateY(-50%);
}

.sj-card.is-flying {
  transform: none;
}

.sj-card__motion {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform: translateZ(0);
}

.sj-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform: rotateY(0deg);
}

.sj-card.is-revealed:not(.is-flying) .sj-card__inner {
  transform: rotateY(180deg);
}

.sj-card__face {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.sj-card__face--front {
  transform: rotateY(180deg) translateZ(0.1px);
  background: linear-gradient(165deg, #ffffff 0%, #fffdf8 40%, #f9f6f0 100%);
  color: #0a0a0e;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 16px 32px rgba(0, 0, 0, 0.48),
    0 6px 12px rgba(0, 0, 0, 0.28);
}

.sj-card__face--front.sj-card__face--red {
  color: #d4183d;
}

.sj-card__face--back {
  transform: rotateY(0deg) translateZ(0.1px);
  background: linear-gradient(160deg, #0c0c12 0%, #050508 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
}

.sj-card__back-texture {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 5px);
}

.sj-card__back-border {
  position: absolute;
  inset: 7px;
  border-radius: 7px;
  border: 1px solid rgba(var(--accent-r), 0.28);
  box-shadow: 0 0 12px rgba(var(--accent-r), 0.12);
}

.sj-card__back-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 52%;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(var(--accent-r), 0.35));
  pointer-events: none;
}

.sj-card__corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 2px;
}

.sj-card__corner--tl {
  top: 7px;
  left: 8px;
}

.sj-card__corner--br {
  bottom: 7px;
  right: 8px;
  transform: rotate(180deg);
}

.sj-card__rank {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sj-card__suit {
  font-size: 0.82rem;
  line-height: 1;
}

.sj-card__suit--center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.35rem;
  line-height: 1;
}

/* ── Footer controls (fixed height) ── */
.skyyjack-table__footer {
  position: relative;
  flex-shrink: 0;
  height: 96px;
}

.skyyjack-betting {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.skyyjack-betting.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.skyyjack-actions {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 8px;
}

.skyyjack-betting__label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.skyyjack-betting__hint {
  margin: 2px 0 0;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.skyyjack-bet-row {
  display: flex;
  gap: 10px;
}

/* ── Controls ── */
.skyyjack-actions[hidden] {
  display: none !important;
}

.skyyjack-btn {
  min-width: 92px;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.28),
    0 6px 16px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.skyyjack-btn:hover:not(:disabled),
.skyyjack-btn:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, rgba(var(--accent-r), 0.2) 0%, rgba(var(--accent-r), 0.08) 100%);
  border-color: var(--accent-border);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.28),
    0 0 20px rgba(var(--accent-r), 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  outline: none;
}

.skyyjack-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.skyyjack-btn--bet {
  min-width: 52px;
  padding: 11px 16px;
  border-radius: 999px;
}

.skyyjack-btn--bet.is-active {
  background: radial-gradient(circle at 50% 30%, rgba(var(--accent-r), 0.38), rgba(var(--accent-r), 0.16));
  border-color: var(--accent-border);
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(var(--accent-r), 0.2),
    0 0 20px var(--accent-glow-soft);
  transform: scale(1.04);
}

.skyyjack-btn--primary {
  background: rgba(var(--accent-r), 0.24);
  border-color: var(--accent-border);
  color: var(--accent);
  min-width: 132px;
  padding: 13px 22px;
  box-shadow: 0 0 24px var(--accent-glow-soft);
}

.skyyjack-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

/* ── Outcome overlay (covers full game — above card layer) ── */
.skyyjack-outcome {
  position: absolute;
  inset: 0;
  z-index: var(--sj-z-outcome);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 3, 10, 0.52);
  backdrop-filter: blur(14px) saturate(0.85);
  -webkit-backdrop-filter: blur(14px) saturate(0.85);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.48s ease;
  border-radius: inherit;
}

.skyyjack-outcome__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 28px;
  border-radius: 18px;
  background: rgba(12, 10, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(var(--accent-r), 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.skyyjack-outcome.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.skyyjack-outcome[hidden] {
  display: none !important;
}

.skyyjack-outcome__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
  line-height: 1.1;
}

.skyyjack-outcome__subtitle {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 16px rgba(var(--accent-r), 0.35);
}

.skyyjack-outcome__title--skyyjack {
  font-size: 1.75rem;
}

.skyyjack-outcome__exact22-label {
  margin: 0 0 6px;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.1;
  animation: sjSkyyjackTextAccent 1s linear infinite;
}

.skyyjack-outcome.result--exact22 .skyyjack-outcome__exact22-label {
  animation: sjSkyyjackTextAccent 1s linear infinite;
}

/* ── Result themes (overlay-only — no gameplay impact) ── */
.skyyjack-outcome.result--loss {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 42, 42, 0.16) 0%, transparent 62%),
    rgba(4, 3, 10, 0.58);
}

.skyyjack-outcome.result--win {
  background:
    radial-gradient(circle at 50% 40%, rgba(57, 255, 136, 0.14) 0%, transparent 62%),
    rgba(4, 3, 10, 0.58);
}

.skyyjack-outcome.result--push {
  background:
    radial-gradient(circle at 50% 40%, rgba(78, 167, 255, 0.14) 0%, transparent 62%),
    rgba(4, 3, 10, 0.58);
}

.skyyjack-outcome.result--loss .skyyjack-outcome__panel {
  border-color: rgba(255, 42, 42, 0.42);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 52px rgba(255, 42, 42, 0.34),
    inset 0 0 24px rgba(255, 42, 42, 0.06);
}

.skyyjack-outcome.result--win .skyyjack-outcome__panel {
  border-color: rgba(57, 255, 136, 0.4);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 52px rgba(57, 255, 136, 0.3),
    inset 0 0 24px rgba(57, 255, 136, 0.05);
}

.skyyjack-outcome.result--push .skyyjack-outcome__panel {
  border-color: rgba(78, 167, 255, 0.42);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 52px rgba(78, 167, 255, 0.32),
    inset 0 0 24px rgba(78, 167, 255, 0.06);
}

.skyyjack-outcome.result--loss .skyyjack-outcome__title {
  color: #FF2A2A;
  text-shadow:
    0 0 36px rgba(255, 42, 42, 0.72),
    0 0 72px rgba(255, 42, 42, 0.28),
    0 2px 18px rgba(0, 0, 0, 0.65);
}

.skyyjack-outcome.result--win .skyyjack-outcome__title {
  color: #39FF88;
  text-shadow:
    0 0 36px rgba(57, 255, 136, 0.68),
    0 0 72px rgba(57, 255, 136, 0.26),
    0 2px 18px rgba(0, 0, 0, 0.65);
}

.skyyjack-outcome.result--push .skyyjack-outcome__title {
  color: #4EA7FF;
  text-shadow:
    0 0 36px rgba(78, 167, 255, 0.68),
    0 0 72px rgba(78, 167, 255, 0.26),
    0 2px 18px rgba(0, 0, 0, 0.65);
}

.skyyjack-outcome.result--loss .skyyjack-outcome__lines {
  color: rgba(255, 170, 170, 0.95);
}

.skyyjack-outcome.result--win .skyyjack-outcome__lines {
  color: rgba(180, 255, 210, 0.96);
}

.skyyjack-outcome.result--push .skyyjack-outcome__lines {
  color: rgba(190, 220, 255, 0.96);
}

.skyyjack-outcome.result--loss .skyyjack-outcome__play {
  border-color: rgba(255, 42, 42, 0.48);
  color: #FF2A2A;
  background: linear-gradient(180deg, rgba(255, 42, 42, 0.3) 0%, rgba(255, 42, 42, 0.12) 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 24px rgba(255, 42, 42, 0.22);
}

.skyyjack-outcome.result--win .skyyjack-outcome__play {
  border-color: rgba(57, 255, 136, 0.45);
  color: #39FF88;
  background: linear-gradient(180deg, rgba(57, 255, 136, 0.28) 0%, rgba(57, 255, 136, 0.11) 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 24px rgba(57, 255, 136, 0.2);
}

.skyyjack-outcome.result--push .skyyjack-outcome__play {
  border-color: rgba(78, 167, 255, 0.48);
  color: #4EA7FF;
  background: linear-gradient(180deg, rgba(78, 167, 255, 0.28) 0%, rgba(78, 167, 255, 0.12) 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 24px rgba(78, 167, 255, 0.2);
}

.skyyjack-outcome.result--loss .skyyjack-outcome__play:hover,
.skyyjack-outcome.result--loss .skyyjack-outcome__play:focus-visible {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 32px rgba(255, 42, 42, 0.32);
}

.skyyjack-outcome.result--win .skyyjack-outcome__play:hover,
.skyyjack-outcome.result--win .skyyjack-outcome__play:focus-visible {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 32px rgba(57, 255, 136, 0.28);
}

.skyyjack-outcome.result--push .skyyjack-outcome__play:hover,
.skyyjack-outcome.result--push .skyyjack-outcome__play:focus-visible {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 32px rgba(78, 167, 255, 0.28);
}

/* SkyyJack / Exact 22 — fast hue-cycling celebration (overlay only) */
.skyyjack-outcome.result--skyyjack {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 42, 42, 0.14) 0%, transparent 62%),
    rgba(4, 3, 10, 0.58);
}

.skyyjack-outcome.result--skyyjack::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 42%, rgba(255, 42, 42, 0.22) 0%, transparent 68%);
  pointer-events: none;
  animation: sjSkyyjackOverlayTint 1s linear infinite;
}

.skyyjack-outcome.result--skyyjack .skyyjack-outcome__panel {
  border-width: 2px;
  border-style: solid;
  animation: sjSkyyjackPanelAccent 1s linear infinite;
}

.skyyjack-outcome.result--skyyjack .skyyjack-outcome__title,
.skyyjack-outcome.result--skyyjack .skyyjack-outcome__subtitle {
  animation: sjSkyyjackTextAccent 1s linear infinite;
}

.skyyjack-outcome.result--skyyjack .skyyjack-outcome__lines {
  color: rgba(255, 255, 255, 0.94);
}

.skyyjack-outcome.result--skyyjack .skyyjack-outcome__play {
  animation: sjSkyyjackButtonAccent 1s linear infinite;
}

@keyframes sjSkyyjackOverlayTint {
  0%   { background: radial-gradient(circle at 50% 42%, rgba(255, 42, 42, 0.24) 0%, transparent 68%); }
  12%  { background: radial-gradient(circle at 50% 42%, rgba(255, 136, 0, 0.24) 0%, transparent 68%); }
  25%  { background: radial-gradient(circle at 50% 42%, rgba(255, 238, 0, 0.22) 0%, transparent 68%); }
  37%  { background: radial-gradient(circle at 50% 42%, rgba(57, 255, 136, 0.22) 0%, transparent 68%); }
  50%  { background: radial-gradient(circle at 50% 42%, rgba(0, 255, 255, 0.22) 0%, transparent 68%); }
  62%  { background: radial-gradient(circle at 50% 42%, rgba(78, 167, 255, 0.24) 0%, transparent 68%); }
  75%  { background: radial-gradient(circle at 50% 42%, rgba(170, 68, 255, 0.24) 0%, transparent 68%); }
  87%  { background: radial-gradient(circle at 50% 42%, rgba(255, 68, 170, 0.24) 0%, transparent 68%); }
  100% { background: radial-gradient(circle at 50% 42%, rgba(255, 42, 42, 0.24) 0%, transparent 68%); }
}

@keyframes sjSkyyjackPanelAccent {
  0%   { border-color: #ff2a2a; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(255, 42, 42, 0.44); }
  12%  { border-color: #ff8800; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(255, 136, 0, 0.44); }
  25%  { border-color: #ffee00; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(255, 238, 0, 0.4); }
  37%  { border-color: #39ff88; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(57, 255, 136, 0.4); }
  50%  { border-color: #00ffff; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(0, 255, 255, 0.4); }
  62%  { border-color: #4ea7ff; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(78, 167, 255, 0.44); }
  75%  { border-color: #aa44ff; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(170, 68, 255, 0.44); }
  87%  { border-color: #ff44aa; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(255, 68, 170, 0.44); }
  100% { border-color: #ff2a2a; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 56px rgba(255, 42, 42, 0.44); }
}

@keyframes sjSkyyjackTextAccent {
  0%   { color: #ff2a2a; text-shadow: 0 0 36px rgba(255, 42, 42, 0.78), 0 2px 18px rgba(0, 0, 0, 0.65); }
  12%  { color: #ff8800; text-shadow: 0 0 36px rgba(255, 136, 0, 0.78), 0 2px 18px rgba(0, 0, 0, 0.65); }
  25%  { color: #ffee00; text-shadow: 0 0 36px rgba(255, 238, 0, 0.72), 0 2px 18px rgba(0, 0, 0, 0.65); }
  37%  { color: #39ff88; text-shadow: 0 0 36px rgba(57, 255, 136, 0.72), 0 2px 18px rgba(0, 0, 0, 0.65); }
  50%  { color: #00ffff; text-shadow: 0 0 36px rgba(0, 255, 255, 0.72), 0 2px 18px rgba(0, 0, 0, 0.65); }
  62%  { color: #4ea7ff; text-shadow: 0 0 36px rgba(78, 167, 255, 0.78), 0 2px 18px rgba(0, 0, 0, 0.65); }
  75%  { color: #aa44ff; text-shadow: 0 0 36px rgba(170, 68, 255, 0.78), 0 2px 18px rgba(0, 0, 0, 0.65); }
  87%  { color: #ff44aa; text-shadow: 0 0 36px rgba(255, 68, 170, 0.78), 0 2px 18px rgba(0, 0, 0, 0.65); }
  100% { color: #ff2a2a; text-shadow: 0 0 36px rgba(255, 42, 42, 0.78), 0 2px 18px rgba(0, 0, 0, 0.65); }
}

@keyframes sjSkyyjackButtonAccent {
  0%   { border-color: rgba(255, 42, 42, 0.58); color: #ff2a2a; background: linear-gradient(180deg, rgba(255, 42, 42, 0.34) 0%, rgba(255, 42, 42, 0.14) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(255, 42, 42, 0.3); }
  12%  { border-color: rgba(255, 136, 0, 0.58); color: #ff8800; background: linear-gradient(180deg, rgba(255, 136, 0, 0.34) 0%, rgba(255, 136, 0, 0.14) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(255, 136, 0, 0.3); }
  25%  { border-color: rgba(255, 238, 0, 0.58); color: #ffee00; background: linear-gradient(180deg, rgba(255, 238, 0, 0.3) 0%, rgba(255, 238, 0, 0.12) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(255, 238, 0, 0.28); }
  37%  { border-color: rgba(57, 255, 136, 0.55); color: #39ff88; background: linear-gradient(180deg, rgba(57, 255, 136, 0.3) 0%, rgba(57, 255, 136, 0.12) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(57, 255, 136, 0.28); }
  50%  { border-color: rgba(0, 255, 255, 0.55); color: #00ffff; background: linear-gradient(180deg, rgba(0, 255, 255, 0.3) 0%, rgba(0, 255, 255, 0.12) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(0, 255, 255, 0.28); }
  62%  { border-color: rgba(78, 167, 255, 0.58); color: #4ea7ff; background: linear-gradient(180deg, rgba(78, 167, 255, 0.3) 0%, rgba(78, 167, 255, 0.12) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(78, 167, 255, 0.28); }
  75%  { border-color: rgba(170, 68, 255, 0.58); color: #aa44ff; background: linear-gradient(180deg, rgba(170, 68, 255, 0.3) 0%, rgba(170, 68, 255, 0.12) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(170, 68, 255, 0.28); }
  87%  { border-color: rgba(255, 68, 170, 0.58); color: #ff44aa; background: linear-gradient(180deg, rgba(255, 68, 170, 0.3) 0%, rgba(255, 68, 170, 0.12) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(255, 68, 170, 0.28); }
  100% { border-color: rgba(255, 42, 42, 0.58); color: #ff2a2a; background: linear-gradient(180deg, rgba(255, 42, 42, 0.34) 0%, rgba(255, 42, 42, 0.14) 100%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 28px rgba(255, 42, 42, 0.3); }
}

.skyyjack-outcome__lines {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-line;
}

.skyyjack-outcome__play {
  margin-top: 14px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-r), 0.4);
  background: linear-gradient(180deg, rgba(var(--accent-r), 0.28) 0%, rgba(var(--accent-r), 0.14) 100%);
  color: var(--accent);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px rgba(var(--accent-r), 0.15);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.skyyjack-outcome__play:hover,
.skyyjack-outcome__play:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 24px rgba(var(--accent-r), 0.22);
  outline: none;
}

.skyyjack-skyyjack-banner {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
  pointer-events: none;
}

.skyyjack-skyyjack-banner.is-visible {
  animation: sjBannerPop 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sjBannerPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 768px) {
  .skyyjack-trigger {
    top: var(--control-top, 14px);
    font-size: 0.66rem;
    padding: 6px 10px 6px 8px;
    max-width: calc(100vw - 160px);
  }

  .skyyjack-panel {
    width: calc(100vw - 12px);
    height: min(580px, calc(100dvh - 12px));
    max-height: min(580px, calc(100dvh - 12px));
  }

  .skyyjack-table__felt {
    border-radius: 50% / 34%;
  }

  .skyyjack-table__deck {
    width: 64px;
    height: 50px;
    right: 4px;
  }

  .skyyjack-table__deck-stack {
    width: 48px;
    height: 66px;
  }

  .skyyjack-zone {
    right: 72px;
  }

  .skyyjack-zone--dealer { top: 10%; height: 28%; }
  .skyyjack-zone--player { bottom: 10%; height: 28%; }

  .skyyjack-hand__cards {
    --sj-card-w: 62px;
    --sj-card-h: 88px;
    --sj-hand-stage-h: 96px;
    height: var(--sj-hand-stage-h);
    width: min(100%, 280px);
  }

  .sj-card {
    --sj-card-w: 62px;
    --sj-card-h: 88px;
  }

  .sj-card__rank { font-size: 0.92rem; }
  .sj-card__suit { font-size: 0.68rem; }
  .sj-card__suit--center { font-size: 1.85rem; }

  .skyyjack-hud {
    padding-right: 32px;
    min-height: 48px;
    gap: 6px;
  }

  .skyyjack-hud__balance-value {
    font-size: 1rem;
  }

  .skyyjack-hud__title {
    font-size: 0.62rem;
  }

  .skyyjack-coin {
    width: 14px;
    height: 14px;
  }

  .skyyjack-btn {
    min-width: 0;
    flex: 1 1 calc(33.333% - 8px);
    padding: 14px 8px;
  }

  .skyyjack-betting .skyyjack-btn--bet {
    flex: 0 1 auto;
    min-width: 52px;
    padding: 8px 16px;
    line-height: 1.15;
  }

  .skyyjack-betting .skyyjack-btn--primary,
  #skyyjack-deal {
    flex: 1 1 100%;
    padding: 11px 22px;
    min-height: 0;
    line-height: 1.2;
  }

  .skyyjack-btn--primary {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skyyjack-overlay__brand {
    width: min(60px, 16vw);
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .skyyjack-overlay__backdrop,
  .skyyjack-panel,
  .sj-card__inner,
  .skyyjack-outcome,
  .skyyjack-outcome.result--skyyjack::before,
  .skyyjack-outcome.result--skyyjack .skyyjack-outcome__panel,
  .skyyjack-outcome.result--skyyjack .skyyjack-outcome__title,
  .skyyjack-outcome.result--skyyjack .skyyjack-outcome__subtitle,
  .skyyjack-outcome.result--skyyjack .skyyjack-outcome__play,
  .skyyjack-outcome.result--exact22 .skyyjack-outcome__exact22-label,
  .skyyjack-shuffle__logo,
  .skyyjack-game.is-shuffling-out .skyyjack-shuffle__logo,
  .skyyjack-table.is-skyyjack-moment .skyyjack-table__felt,
  .skyyjack-skyyjack-banner.is-visible {
    animation: none !important;
    transition: none !important;
  }
}
