:root {
  --xadg-bg: #0a0a0a;
  --xadg-surface: #151515;
  --xadg-surface2: #1e1e1e;
  --xadg-border: rgba(249, 212, 89, 0.35);
  --xadg-txt: #f3f3f3;
  --xadg-muted: #9a9a9a;
  --xadg-acc: #f9d459;
  --xadg-cta: #f9d459;
  --xadg-cta-txt: #141414;
  --xadg-rad: 10px;
  --xadg-card-back: linear-gradient(145deg, #1a3328 0%, #0d1f18 100%);
  --xadg-card-back-img: url("/res/bg/s1-card-back.webp");
}

* {
  box-sizing: border-box;
}

body.xadg-embed-page {
  margin: 0;
  padding: 0;
  background: var(--xadg-bg);
  color: var(--xadg-txt);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.home-baccarat-inline {
  background: var(--xadg-bg);
  color: var(--xadg-txt);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

@media (max-width: 991px) {
  body.xadg-embed-page {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden;
    overflow-y: visible;
  }

  body.xadg-embed-page .xadg-embed-wrap,
  .home-baccarat-inline .xadg-embed-wrap {
    padding-top: 14px;
    padding-bottom: 12px;
    margin: 0 auto;
  }
}

.xadg-embed-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 12px 20px;
}

.xadg-embed-head {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--xadg-rad);
  border: 1px solid var(--xadg-border);
  background: var(--xadg-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.xadg-embed-head strong {
  color: var(--xadg-acc);
  font-size: 0.98rem;
}

.xadg-embed-head .xadg-muted {
  font-size: 0.82rem;
  margin-top: 3px;
  color: var(--xadg-muted);
}

.xadg-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(249, 212, 89, 0.12);
  border: 1px solid var(--xadg-border);
  color: var(--xadg-acc);
  font-size: 0.75rem;
  font-weight: 800;
}

.xadg-h2 {
  font-size: 1.02rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--xadg-acc);
}

.xadg-panel {
  background: var(--xadg-surface);
  border: 1px solid var(--xadg-border);
  border-radius: var(--xadg-rad);
  padding: 14px;
  min-width: 0;
}

.xadg-grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 960px) {
  .xadg-grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.xadg-card {
  background: var(--xadg-surface2);
  border: 1px solid var(--xadg-border);
  border-radius: calc(var(--xadg-rad) - 2px);
  padding: 12px;
}

.xadg-muted {
  color: var(--xadg-muted);
}

.xadg-btn {
  background: var(--xadg-surface2);
  color: var(--xadg-txt);
  border: 1px solid var(--xadg-border);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  font-family: inherit;
  transition: 0.16s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}

.xadg-btn:hover {
  border-color: var(--xadg-acc);
}

.xadg-btn-pri {
  background: linear-gradient(to top, #8d6810 0%, #f9d459 48%, #fff0b8 100%);
  color: var(--xadg-cta-txt);
  border-color: transparent;
  font-weight: 800;
}

.xadg-real-money-cta {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--xadg-cta-txt);
  background: linear-gradient(to top, #8d6810 0%, #f9d459 48%, #fff0b8 100%);
  border: 1px solid rgba(255, 240, 184, 0.55);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  transition: filter 0.18s ease, transform 0.18s ease;
}

.xadg-real-money-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: var(--xadg-cta-txt);
}

.xadg-real-money-cta:focus-visible {
  outline: 2px solid var(--xadg-acc);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .xadg-real-money-cta {
    font-size: 0.92rem;
    padding: 12px 14px;
  }
}

.xadg-felt {
  background: radial-gradient(ellipse at 50% 25%, #0e5a42 0%, #063829 58%, #031f17 100%);
  border: 2px solid var(--xadg-border);
  border-radius: var(--xadg-rad);
  padding: 14px;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.48), inset 0 0 56px rgba(0, 0, 0, 0.35);
  color: #f3f7f5;
  min-width: 0;
}

.xadg-dstrip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(249, 212, 89, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.xadg-spd-box {
  display: inline-flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px;
  border-radius: 8px;
}

.xadg-spd {
  border: none;
  background: transparent;
  color: #cbd5e1;
  padding: 6px 10px;
  min-height: 34px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.xadg-spd.xadg-on {
  background: var(--xadg-acc);
  color: #141414;
}

.xadg-hands {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 170px;
  padding: 6px 2px;
}

@media (max-width: 680px) {
  .xadg-hands {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }
}

.xadg-hbox {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  transition: 0.25s;
}

.xadg-hbox.xadg-target {
  border-color: #facc15;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.24);
}

.xadg-hbox.xadg-win {
  box-shadow: 0 0 0 2px #facc15, 0 0 32px rgba(234, 179, 8, 0.5);
  background: rgba(234, 179, 8, 0.16);
}

.xadg-htitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.xadg-sbadge {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.95rem;
  font-weight: 900;
  min-width: 32px;
}

.xadg-sbadge.xadg-pop {
  transform: scale(1.18);
  border-color: var(--xadg-acc);
  color: var(--xadg-acc);
}

.xadg-cards {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-height: 96px;
  align-items: center;
  perspective: 900px;
  padding: 0 6px;
}

.xadg-cslot {
  width: 62px;
  height: 90px;
  flex-shrink: 0;
  perspective: 900px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45));
  animation: xadgSlide 0.38s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.xadg-cslot.xadg-third {
  margin: 0 14px;
  transform: rotate(90deg);
  animation: xadgSlide3 0.48s cubic-bezier(0.22, 0.8, 0.28, 1) both;
}

.xadg-cinner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.46s cubic-bezier(0.25, 0.85, 0.35, 1);
}

.xadg-cinner.xadg-flip {
  transform: rotateY(180deg);
}

.xadg-face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
}

.xadg-fback {
  background: #063b2b var(--xadg-card-back-img) center / cover no-repeat;
  border: 2px solid #eab308;
  box-shadow: inset 0 0 0 1px rgba(255, 240, 184, 0.25), 0 8px 16px rgba(0, 0, 0, 0.55);
}

.xadg-cplaceholder {
  width: 62px;
  height: 90px;
  border-radius: 8px;
  opacity: 0.62;
  background: #063b2b var(--xadg-card-back-img) center / cover no-repeat;
  border: 2px solid rgba(234, 179, 8, 0.6);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.xadg-ffront {
  transform: rotateY(180deg);
  background: linear-gradient(165deg, #ffffff 0%, #f9fafb 45%, #e8edf4 100%);
  border: 1px solid #c5cdd8;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.95),
    inset 0 -10px 18px rgba(15, 23, 42, 0.04),
    0 8px 18px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.xadg-ffront::before {
  content: "";
  position: absolute;
  inset: 6px 5px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  pointer-events: none;
}

.xadg-ffront.xadg-red {
  color: #c41e3a;
}

.xadg-ffront.xadg-black {
  color: #0f172a;
}

.xadg-crank {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
  z-index: 1;
}

.xadg-crank.xadg-wide-rank {
  font-size: 0.66rem;
}

.xadg-ct {
  top: 4px;
  left: 5px;
}

.xadg-cb {
  bottom: 4px;
  right: 5px;
  transform: rotate(180deg);
}

.xadg-csuit {
  display: block;
  margin-top: 1px;
  font-size: 0.68rem;
  line-height: 1;
}

.xadg-cpip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  font-size: 1.75rem;
  line-height: 1;
  z-index: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.xadg-ffront.xadg-red .xadg-cpip {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35));
}

@keyframes xadgSlide {
  from {
    opacity: 0;
    transform: translate(34px, -48px) scale(0.64) rotate(-12deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes xadgSlide3 {
  from {
    opacity: 0;
    transform: translate(26px, -42px) scale(0.68) rotate(28deg);
  }
  to {
    opacity: 1;
    transform: rotate(90deg);
  }
}

.xadg-resbar {
  min-height: 26px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--xadg-acc);
  margin: 6px 0 8px;
}

.xadg-zones {
  display: grid;
  grid-template-columns: 1fr 0.82fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.xadg-zone {
  border-radius: 11px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  transition: 0.16s;
  user-select: none;
}

.xadg-zone:hover {
  border-color: var(--xadg-acc);
}

.xadg-zp {
  border-color: rgba(59, 130, 246, 0.55);
}
.xadg-zt {
  border-color: rgba(16, 185, 129, 0.55);
}
.xadg-zb {
  border-color: rgba(244, 63, 94, 0.55);
}

.xadg-zbet {
  margin-top: 4px;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--xadg-acc);
  font-weight: 800;
  font-size: 0.8rem;
}

.xadg-ctrl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 11px;
  border: 1px solid rgba(249, 212, 89, 0.15);
}

.xadg-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.xadg-chip {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.75);
  font-weight: 800;
  font-size: 0.7rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.xadg-chip.xadg-con {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 0 0 3px var(--xadg-acc);
}

.xadg-rgrid {
  display: grid;
  grid-template-rows: repeat(6, 20px);
  grid-auto-flow: column;
  grid-auto-columns: 20px;
  gap: 2px;
  background: rgba(0, 0, 0, 0.35);
  padding: 5px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--xadg-border);
  min-height: 128px;
}

.xadg-rcell {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.xadg-rdot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xadg-rd-B {
  background: #e11d48;
}
.xadg-rd-P {
  background: #2563eb;
}
.xadg-rd-T {
  background: #10b981;
}

.xadg-rring {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.6px solid transparent;
  position: relative;
}

.xadg-rr-B {
  border-color: #fb7185;
}
.xadg-rr-P {
  border-color: #60a5fa;
}
.xadg-rr-t::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #10b981;
  border-radius: 50%;
}

/* Hi-Lo Thai embed */
.xadg-dice-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 22px 0;
}

.xadg-die {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #e2e8f0);
  color: #0f172a;
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

.xadg-shake {
  animation: xadgShk 0.3s infinite;
}

@keyframes xadgShk {
  0% {
    transform: rotate(-9deg) scale(1.06);
  }
  50% {
    transform: rotate(9deg) scale(0.95);
  }
  100% {
    transform: rotate(-9deg) scale(1.06);
  }
}

.xadg-hilo-zones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.xadg-hilo-ctrl {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.xadg-hilo-hist {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 360px;
  overflow-y: auto;
}

/* Homepage iframe — Hi-Lo full bleed */
.xadg-embed-body-hilo {
  min-height: 100%;
}

.xadg-embed-hilo.xadg-embed-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 12px 14px;
  box-sizing: border-box;
}

.xadg-embed-hilo .xadg-grid2 {
  align-items: stretch;
}

.xadg-embed-hilo .xadg-felt {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.xadg-embed-hilo .xadg-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.xadg-embed-hilo .xadg-hilo-hist {
  flex: 1;
  min-height: 220px;
  max-height: none;
}

.xadg-embed-hilo .xadg-dice-row {
  padding: 26px 0 20px;
}

.xadg-embed-hilo .xadg-die {
  width: 76px;
  height: 76px;
  font-size: 2.35rem;
}

.xadg-embed-hilo .xadg-zone {
  padding: 14px 10px;
}

.xadg-embed-hilo .xadg-real-money-cta {
  margin-top: auto;
}

.xadg-hilo-side-meta {
  font-size: 0.84rem;
  color: var(--xadg-muted);
  margin: 0 0 8px;
}

.xadg-hilo-side-meta strong {
  color: var(--xadg-acc);
  font-size: 1.05rem;
}

.xadg-hilo-trio-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.xadg-hilo-fi {
  display: block;
  height: 100%;
  width: 0;
  min-width: 0;
  transition: width 0.25s ease;
}

.xadg-hilo-fi-low {
  background: #2563eb;
}

.xadg-hilo-fi-elv {
  background: #facc15;
}

.xadg-hilo-fi-hig {
  background: #e11d48;
}

.xadg-hilo-pct-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.74rem;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.xadg-hilo-pct-row b {
  color: var(--xadg-acc);
  margin-left: 2px;
}

.xadg-hilo-pct-row-2 {
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(249, 212, 89, 0.2);
}

.xadg-hilo-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: 1px;
}

.xadg-hilo-swatch-L {
  background: #2563eb;
}

.xadg-hilo-swatch-E {
  background: #facc15;
}

.xadg-hilo-swatch-H {
  background: #e11d48;
}

.xadg-hilo-bead {
  min-height: 132px;
  grid-template-rows: repeat(6, 18px);
  grid-auto-columns: 18px;
}

.xadg-hilo-bead .xadg-rcell {
  width: 18px;
  height: 18px;
}

.xadg-hilo-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xadg-hilo-dot-empty {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  width: 10px;
  height: 10px;
}

.xadg-hilo-dot-L {
  background: #2563eb;
}

.xadg-hilo-dot-E {
  background: #eab308;
  color: #141414;
}

.xadg-hilo-dot-H {
  background: #e11d48;
}

.xadg-hilo-dot-T {
  background: #a855f7;
}

.xadg-hilo-empty {
  padding: 12px 10px;
  font-size: 0.82rem;
  color: var(--xadg-muted);
  line-height: 1.55;
  background: var(--xadg-surface2);
  border: 1px dashed rgba(249, 212, 89, 0.25);
  border-radius: 8px;
}

.xadg-hilo-empty strong {
  color: var(--xadg-txt);
}

.xadg-hilo-empty-hint {
  margin: 8px 0 0;
  font-size: 0.76rem;
  opacity: 0.9;
}

.xadg-hilo-hrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  gap: 8px;
  font-size: 0.8rem;
}

.xadg-hilo-tag {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 6px;
  margin-right: 4px;
  font-weight: 800;
}

.xadg-hilo-tag-LOW {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
}

.xadg-hilo-tag-ELEVEN {
  background: rgba(234, 179, 8, 0.25);
  color: #fde047;
}

.xadg-hilo-tag-HIGH {
  background: rgba(225, 29, 72, 0.25);
  color: #fda4af;
}

.xadg-hilo-tag-TRIPLE {
  background: rgba(168, 85, 247, 0.3);
  color: #e9d5ff;
}

.xadg-embed-hilo .xadg-hilo-hist {
  flex: 0 1 auto;
  min-height: 120px;
  max-height: 200px;
}

.xadg-hilo-panel .xadg-h2 {
  margin-bottom: 6px;
}