:root{
  --page-maxw: 1100px;
  --lh: 1.25;
  --sp-0: 0; --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.25rem;
}
*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{ margin:0; line-height:var(--lh); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }

h1,h2,h3,h4,h5,h6{ margin:var(--sp-3) 0 var(--sp-2); line-height:1.15; }
p{ margin:var(--sp-2) 0; }
ul,ol{ margin:var(--sp-2) 0 var(--sp-2) var(--sp-4); }

.page, main, .container{
  max-width:var(--page-maxw);
  margin:0 auto;
  padding:var(--sp-4);
}
section{ margin-block:var(--sp-4); }

label{ margin-bottom:var(--sp-1); display:inline-block; }
input,select,textarea,button{ line-height:1.1; padding:.45rem .6rem; }
table{ border-collapse:collapse; width:100%; }
th,td{ padding:.45rem .6rem; }

[class*="section"],[class*="block"],[class*="panel"],[class*="card"]{ margin-block:var(--sp-4); }

:where(.row,.grid,.stack){ display:grid; gap:var(--sp-3); }

.m-0{margin:0!important;} .mt-0{margin-top:0!important;} .mb-0{margin-bottom:0!important;}
.p-0{padding:0!important;} .pt-0{padding-top:0!important;} .pb-0{padding-bottom:0!important;}
.mb-1{margin-bottom:var(--sp-1)!important;} .mb-2{margin-bottom:var(--sp-2)!important;}
.pb-1{padding-bottom:var(--sp-1)!important;} .pb-2{padding-bottom:var(--sp-2)!important;}

h1{ font-size: clamp(1.4rem, 2.5vw, 2rem); }
h2{ font-size: clamp(1.2rem, 2.0vw, 1.6rem); }

.spins-wrap{ display:inline-flex; align-items:baseline; gap:.25rem; margin:0; padding:0; line-height:1; }
#totalSpins{
  color: inherit;
  white-space:nowrap;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  line-height:1;
  display:inline-block;
}
#totalSpins::after{ content:"+"; }
.hero,.jumbotron{ padding-block:var(--sp-5); min-height:auto !important; }

/* Casino cards compact spacing */
.casino-cards-grid{ display:grid; gap:var(--sp-3); grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); }
.casino-game-card{ margin-block:var(--sp-2) !important; padding:var(--sp-3); }
.casino-stats-row{ margin:var(--sp-2) 0; }
.timing-analysis{ margin-top:var(--sp-2); }
.tab-pane{ padding-top:var(--sp-3); }
.day-header{ margin-bottom:var(--sp-3) !important; }

/* ===== kill the dead space below the last card ===== */

/* 1) Stop viewport-forcing heights that create oceans of space */
html, body { height: auto !important; min-height: 0 !important; }
.hero, .jumbotron, .viewport, main, .page, .container,
.min-h-screen, .min-vh-100, .vh-100 { 
  min-height: auto !important; 
  height: auto !important;
}

/* If you used a sticky-footer pattern, disable it */
body.layout-sticky, .site, .site-wrap {
  display: block !important; /* undo flex/grid 1fr stretch */
}

/* 2) Remove trailing bottom padding/margins on the last visible block */
main, .page, .container, section { padding-bottom: 0 !important; }
main > *:last-child,
.page > *:last-child,
.container > *:last-child,
section > *:last-child { margin-bottom: 0 !important; }

/* 3) Cards/panels: keep them tight at the bottom */
.card, .panel, [class*="card"], [class*="panel"] { margin-bottom: .75rem; }
.card:last-child, .panel:last-child,
[class*="card"]:last-child, [class*="panel"]:last-child { margin-bottom: 0 !important; }

/* 4) Optional: if you still need a full-height area, use dynamic vh safely */
@supports (height: 100dvh) {
  .use-dvh { min-height: 100dvh !important; } /* opt-in only */
}

/* ===== DEAD-SPACE NUKE (put at very end of your CSS) ===== */

/* 1) Kill any 100vh/min-height stretching on wrappers (iOS safe) */
html, body { height: auto !important; min-height: 0 !important; }
.site, .site-wrap, .app, .wrapper, .content, main, .page, .container,
.viewport, .screen, .hero, .jumbotron,
.min-h-screen, .min-vh-100, .vh-100, .h-100 {
  height: auto !important;
  min-height: auto !important;
}

/* 2) Undo sticky-footer/flex layouts that force tall middle columns */
body, .site, .app, .wrapper {
  display: block !important;
  grid-auto-rows: auto !important;
}

/* 3) Remove bottom padding/margins so the last card hugs the fold */
main, .page, .container, section, article, footer {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
main > *:last-child,
.page > *:last-child,
.container > *:last-child,
section > *:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* 4) Cards/panels: small gap between siblings, none after the last */
.card, .panel, [class*="card"], [class*="panel"] { margin-bottom: .75rem !important; }
.card:last-child, .panel:last-child,
[class*="card"]:last-child, [class*="panel"]:last-child { margin-bottom: 0 !important; }

/* 5) Optional: only use dynamic full-height when you explicitly opt-in */
@supports (height: 100dvh) {
  .use-dvh { min-height: 100dvh !important; height: 100dvh !important; }
}

/* Keep counter color from your theme */
#totalSpins { color: inherit !important; }
