/* ALL PAGES */

body {
  margin: 0;
  padding: 0;
  font-family: "Source Serif 4", serif;
  background-color: #0f2a1f; /* fallback if no image */
  color: #f4efe6;
}

h1.libre {
  font-family: "Libre Baskerville", serif;
  font-weight: bold;
}

.top {
  width: 100%;
  height: 300px;
  display: inline;
  padding: 50px;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

  background-color: #0b2119; /* slightly darker than felt */
  color: rgba(244, 239, 230, 0.85);

  font-size: 0.8rem;
  text-align: center;


  padding: 6px 12px;
  box-sizing: border-box;

  z-index: 1000;
}

.site-footer a {
  color: rgba(244, 239, 230, 0.95);
  text-decoration: none;
  border-bottom: 1px dotted rgba(244, 239, 230, 0.4);
}

.site-footer a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.8);
}


.site-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  background-color: #133124; /* matches your green felt tone */
}


.header-left {
  display: flex;
  align-items: center;
  gap: 12px;

}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;

}

.header-center-note {
  flex: 1;                 /* allows centering between left & right */
  text-align: left;
  font-family: "Libre Baskerville", serif;
  font-size: 0.85rem;
  color: #f1d680;          /* warm yellow / parchment gold */
  opacity: 0.9;
  white-space: nowrap;
  pointer-events: none;    /* purely informational */
}


@media (max-width: 900px) {
  .header-center-note {
    font-size: 0.8rem;
    opacity: 0.75;
  }
}


.site-logo {
  height: 60px;
  width: auto;
  display: block;
}

.title-block {
  display: flex;
  flex-direction: column;
}

.site-title {
  margin: 0;
  font-size: 2.0rem;
  line-height: 1.15;
}


.site-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.site-tagline {
  margin-top: 0.25rem;
  font-family: "Libre Baskerville", serif;
  font-size: 1.0rem;
  font-style: italic;
  opacity: 0.85;
}

.content-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  padding: 3rem 4rem;
  align-items: center;
}

.site-nav {
  height: 30px;
  background: #d8c7a6; /* parchment tan */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-sizing: border-box;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: inline-block;
  padding: 4px 10px;
  font-family: "Libre Baskerville", serif;
  font-size: 0.85rem;
  line-height: 1.2;
  text-decoration: none;

  color: #3b2b19;               /* dark brown text */
  background-color: #eadfc9;    /* lighter tan button */
  border-radius: 4px;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-links a:hover {
  background-color: #cbb68e;    /* darker tan */
  color: #1f3b2c;               /* deep felt green */
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.nav-links a.active {
  background-color: #8a6b3f;    /* warm brown-tan */
  color: #f4efe6;               /* parchment white */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  font-weight: 600;
}

.nav-links a:active {
  transform: translateY(1px);
}

.paypal-donate img {
  height: 24px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
  vertical-align: middle;
}

.paypal-donate:hover img,
.paypal-donate:focus img {
  opacity: 1;
}

.site-footer .paypal-donate img {
  height: 22px;
  opacity: 0.45;
}

.site-footer .paypal-donate:hover img {
  opacity: 0.9;
}


.story-text h2 {
  margin-top: 0;
}

.story-text p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.story-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}


.login-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 160px 2rem 5rem;
}

.login-panel {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  text-align: center;
}

.login-panel h1 {
  font-family: "Libre Baskerville", serif;
  font-size: 2.0rem;
  margin-bottom: 1.25rem;
}

.login-form {
  margin-top: 1rem;
}

.login-form .form-row {
  margin-bottom: 1.25rem;
  text-align: left;
}

.login-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  max-width: 360px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 4px;
  border: none;
}

.login-button {
  margin-top: 0.5rem;
  padding: 6px 16px;
  font-family: "Libre Baskerville", serif;
  font-size: 0.9rem;
  background: #eadfc9;
  color: #3b2b19;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.login-button:hover {
  background: #cbb68e;
}

.join-invite {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.join-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-family: "Libre Baskerville", serif;
  font-size: 0.9rem;
  text-decoration: none;
  color: #eadfc9;
  border-bottom: 1px dotted rgba(234, 223, 201, 0.6);
}

.join-link:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.8);
}

.login-explanation {
  margin-top: 2.5rem;
  padding: 1.75rem 2rem;
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
}

.login-explanation h2 {
  font-family: "Libre Baskerville", serif;
  font-size: 1.4rem;
  margin-top: 0;
}

.login-explanation p {
  line-height: 1.6;
}

.login-note {
  font-style: italic;
  opacity: 0.85;
}

.login-closing {
  margin-top: 3rem;
  text-align: center;
  font-style: italic;
  opacity: 0.85;
}


.login-container {
  position: relative;
  min-height: 100vh;
  background: #2f4f4f; /* muted card-table green */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, sans-serif;

}

/* Card */

.login-card {
  background: #fdfdfb;
  color: #222;
  max-width: 750px;
  width: 100%;
  padding: 2rem 2.25rem;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  line-height: 1.55;

}

/* Headings */

.login-title {
  margin-top: 0;
  font-size: 1.7rem;
  text-align: center;

}

.section-title {
  margin-top: 0;
  font-size: 1.3rem;

}

/* Text elements */

p {
  margin-bottom: 1rem;

}

.lock-note {
  background: #f5f1e8;
  border-left: 4px solid #9c8c6a;
  padding: 0.75rem;
  font-size: 0.95rem;

}

/* Form layout */

.settings-form {
  margin-top: 1rem;

}

.option-row {
  margin-bottom: 0.6rem;

}

.save-settings {
  margin-top: 0.9rem;
  font-size: 0.95rem;

}

/* Divider */

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1.5rem 0;

}

/* Actions */

.actions {
  margin-top: 1.5rem;
  text-align: center;

}

.start-button {
  background: #3a6f3a;
  color: white;
  font-size: 1.05rem;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;

}

.start-button:disabled {
  background: #9faf9f;
  cursor: not-allowed;

}

/* Flavor text */

.grandma-note {
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  font-style: italic;

}

.logout-form {
  margin: 0;

}

.logout-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: inherit;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;

}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.15);

}


.player-stats-panel {
  position: fixed;
  top: 140px;      /* below header */
  right: 24px;
  width: 220px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: "Libre Baskerville", serif;
  color: #f4f4f4;
  z-index: 50;

}

.player-stats-panel h3 {
  margin: 0 0 20px;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 4px;

}

.player-stats-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;

}

.player-stats-panel li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9rem;

}

.player-stats-panel strong {
  font-weight: 600;

}

.stats-box {
    position: fixed;
    top: 140px;

    width: 220px;
    padding: 14px 16px;

    background-color: #3f5f5c;
    color: #ffffff;
    border-radius: 10px;

    font-size: 14px;
    line-height: 1.4;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 50;
}

.stats-box h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 6px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

.stat-row span:last-child {
    font-weight: 600;
}

.club-stats {
    left: 20px;
}

.player-stats {
    right: 20px;
}

main {
    position: relative;
}


/* --- Insights from Grandma --- */

.insights-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 160px 2rem 5rem;
}

.insights-header h1 {
  font-family: "Libre Baskerville", serif;
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
}

.insights-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.9;
}

.insight-section {
  margin-top: 2.5rem;
  padding: 1.75rem 2rem;
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
}

.insight-section h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-family: "Libre Baskerville", serif;
}

.insight-section h3 {
  margin-top: 1.4rem;
  font-size: 1.1rem;
}

.insight-section p {
  line-height: 1.65;
}

.insight-note {
  font-style: italic;
  opacity: 0.85;
}

.insight-section.emphasis {
  background: rgba(234, 223, 201, 0.07);
  border-left: 4px solid #cbb68e;
}

.insight-section.closing {
  background: none;
  text-align: center;
  font-style: italic;
}

.grandma-wink {
  opacity: 0.8;
  margin-top: 0.5rem;
}


/* --- How to Play Rules Layout --- */

.rules-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 160px 2rem 5rem;
}

.rules-header h1 {
  font-family: "Libre Baskerville", serif;
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.rules-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.9;
}

.rule-section {
  margin-top: 2.5rem;
  padding: 1.75rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.rule-section h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-family: "Libre Baskerville", serif;
}

.rule-section h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.rule-section p,
.rule-section li {
  line-height: 1.6;
}

.rule-section ul {
  margin-left: 1.2rem;
}

.rule-note {
  font-style: italic;
  opacity: 0.85;
  margin-top: 0.5rem;
}

.rule-section.emphasis {
  background: rgba(234, 223, 201, 0.08);
  border-left: 4px solid #cbb68e;
}


/* --- Join the Club Page --- */

.join-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 160px 2rem 5rem;
}

.join-header h1 {
  font-family: "Libre Baskerville", serif;
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
}

.join-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.9;
}

.join-explanation,
.join-form-section {
  margin-top: 2.5rem;
  padding: 1.75rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.join-explanation h2,
.join-form-section h2 {
  margin-top: 0;
  font-family: "Libre Baskerville", serif;
  font-size: 1.4rem;
}

.join-explanation ul {
  margin-left: 1.2rem;
  line-height: 1.6;
}

.join-note {
  margin-top: 1rem;
  font-style: italic;
  opacity: 0.85;
}

.join-form .form-row {
  margin-bottom: 1.5rem;
}

.join-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.join-form input {
  width: 100%;
  max-width: 360px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 4px;
  border: none;
}

.field-hint {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

.join-button {
  margin-top: 1rem;
  padding: 6px 14px;
  font-family: "Libre Baskerville", serif;
  font-size: 0.9rem;
  background: #eadfc9;
  color: #3b2b19;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.join-button:hover {
  background: #cbb68e;
}

.join-closing {
  margin-top: 3rem;
  text-align: center;
  font-style: italic;
  opacity: 0.9;
}

.grandma-signoff {
  margin-top: 0.5rem;
}


/* About the Deal page */
.deal-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  padding: 3rem 4rem;
  align-items: flex-start;
}

/* LEFT: Deal Viewer */

.deal-viewer h2 {
  margin-top: 0;
}

.board-frame {
  background: #123426;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.board-placeholder {
  height: 360px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  opacity: 0.8;
}

.deal-controls {
  display: flex;
  gap: 0.5rem;
}

.deal-controls button {
  font-family: "Libre Baskerville", serif;
  font-size: 0.8rem;
  padding: 4px 10px;
  background: #eadfc9;
  color: #3b2b19;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.deal-controls button:hover {
  background: #cbb68e;
}

/* RIGHT: Explanation Panel */

.deal-explanation h3 {
  margin-top: 0;
}

.deal-explanation {
  font-size: 0.95rem;
  line-height: 1.05;
}

.deal-step {
  margin-bottom: 1.25rem;
  padding-left: 0.75rem;
  border-left: 3px solid transparent;
  opacity: 0.75;
}

.deal-step.active {
  border-left-color: #cbb68e;
  opacity: 1;
}

.deal-step h4 {
  margin: 0 0 0.25rem;
}

.page-content {
  margin-top: 130px;
}

.demo-board {
  position: relative;
  width: 100%;
  height: 360px;
}

.demo-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.demo-stock {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.top-row {
  margin-top: 20px;
}

.bottom-row {
  margin-top: 70px;
}

.demo-pile,
.demo-draw-slot {
  width: 60px;
  height: 84px;
  position: relative;
  overflow: visible;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.demo-draw-slot {
  margin: 0 14px;  /* THIS is what creates the visual break */
  background: rgba(255, 255, 255, 0.15);
}


.demo-card {
  position: fixed;
  width: 60px;
  height: 84px;
  z-index: 2000;
  transition: transform 0.3s ease;
}

.demo-card img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.demo-deck-area {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.demo-deck {
  width: 60px;
  height: 84px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 3px 8px rgba(0,0,0,0.35);
}

/*  GAME PAGE  */


:root {
  --card-w: 100px;
  --card-h: 135px;
  --pad: 8px;
  --gap: 10px;
  --foundation-gap: 10px;
  --tableau-col: calc(var(--card-w) + 2 * var(--pad) + var(--gap));
}


#board {
  display:flex;
  flex-direction:column;
  align-items:center;
  padding: 20px;
}
h2 { margin:4px 0 16px; }
#controls {
  display:flex;
  gap:14px;
  margin-bottom:18px;
}
button {
  padding:8px 16px;
  border:none;
  border-radius:8px;
  cursor:pointer;
}
/* ===== CARD ===== */
.card {
  width:var(--card-w);
  height:var(--card-h);
  display:flex;
  align-items:center;
  justify-content:center;
  transform-style:preserve-3d;
  transition:transform 0.25s ease;
}
.card img {
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:10px;
  backface-visibility:hidden;
}
.card.flip { transform:rotateY(0deg); }
.card.playable { cursor:pointer; }
.card.hint img { outline:3px solid rgba(0,255,0,.5); }
.pile.hidden-top {
  border-style: dotted;
  opacity: 0.35;
}
/* ===== PEEK HOVER GLOW (SUBTLE FELT SIGNAL) ===== */
.card.peek-glow img {
  box-shadow:
    0 0 6px 2px rgba(180, 210, 160, 0.55),
    0 0 12px 4px rgba(120, 160, 120, 0.35);
  transition: box-shadow 120ms ease-in-out;
}
.user-greeting {
  margin-left: auto;   /* ⬅ pushes it to the far right */
  font-family: "Libre Baskerville", serif;
  font-size: 1rem;
  opacity: 0.9;
}
/* ===== PEEK TOOLTIP ===== */
.peek-tooltip {
  position: fixed;
  padding: 6px 10px;
  background: rgba(25, 45, 35, 0.92);
  color: rgba(245, 240, 225, 0.95);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 4000;
}
.peek-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}
/* ===== FOUNDATIONS ===== */
#foundation-wrapper {
  display: grid;
  grid-template-columns:
    var(--tableau-col)      /* extra left column */
    repeat(4, max-content) /* ascending */
    var(--tableau-col)      /* center gap = exactly one tableau column */
    repeat(4, max-content) /* descending */
    var(--tableau-col);     /* extra right column */
  align-items: center;
  margin-bottom: var(--foundation-gap);
}
.foundations-left {
  grid-column: 2 / span 4;   /* columns 2–5 */
  display: flex;
  gap: var(--gap);
  justify-content: flex-start;
}
.foundations-right {
  grid-column: 7 / span 4;   /* columns 7–10 */
  display: flex;
  gap: var(--gap);
  justify-content: flex-end;
}
.foundation {
  width:calc(var(--card-w) + 2 * var(--pad));
  height:calc(var(--card-h) + 2 * var(--pad));
  border:2px solid rgba(255,255,255,.45);
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.foundation.target {
  outline:4px solid rgba(255,255,0,.7);
  cursor:pointer;
}
/* ===== END GAME OVERLAY ===== */

.overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;      /* ✅ THIS is the main spacing control */
}

#end-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}
#concede-overlay.hidden {
  display: none;
}
#end-overlay.hidden {
  display: none;
}
.end-box {
  background: #1a1a1a;
  padding: 30px 36px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

.end-buttons {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.win-content,
.perfect-content {
  max-width: 420px;
}

.win-content {
  margin-bottom: 28px;
}


/* ===== FOUNDATION FLASH (SWEEP) ===== */
.foundation.cascade-flash {
  animation: foundationFlash 0.45s ease-in-out both;
}
@keyframes foundationFlash {
  0%   { box-shadow: 0 0 0 rgba(255,255,255,0); }
  50%  { box-shadow: 0 0 22px rgba(255,255,255,0.9); }
  100% { box-shadow: 0 0 0 rgba(255,255,255,0); }
}
/* ===== VICTORY IDLE PULSE ===== */
.foundation.victory-pulse {
  animation: victoryPulse 1.8s ease-in-out infinite;
}
@keyframes victoryPulse {
  0%,100% { box-shadow: 0 0 6px rgba(255,255,255,0.35); }
  50%     { box-shadow: 0 0 20px rgba(255,255,255,0.85); }
}
/* ===== TABLEAU ===== */
#table {
  display:grid;
  grid-template-columns:repeat(7, max-content);
  gap:var(--gap);
  justify-content:center;
}
.pile {
  min-width:calc(var(--card-w) + 2 * var(--pad));
  min-height:calc(var(--card-h) + 2 * var(--pad));
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px dashed rgba(255,255,255,.35);
  border-radius:10px;
}
.draw-slot {
  border:2px solid rgba(255,255,255,.6);
  background:#123;
}
.pile.glow {
  box-shadow:0 0 18px 6px rgba(255,255,0,.75);
  border-color:rgba(255,255,0,.9);
}
/* ===== PILE LABELS (FELT STYLE) ===== */
.pile {
  position: relative; /* allow absolute label positioning */
}
.pile-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35em;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.38);
  text-shadow:
    0 1px 0 rgba(0,0,0,0.35),
    0 0 4px rgba(255,255,255,0.15);
  pointer-events: none;
  user-select: none;
  white-space: pre-line; /* ✅ THIS */
}
/* ===== DRAW LABEL OVERLAY ===== */
.draw-slot .card {
  position: relative;
}
.draw-slot .card::after {
  content: "Draw";
  position: absolute;
  inset: 0;
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  pointer-events: none; /* do NOT block clicks */
}
/* Hide label during flip or when card face is shown */
.draw-slot .card.flip::after {
  opacity: 0;
}
/* ===== FOUNDATION LABELS (FELT STYLE) ===== */
.foundation {
  position: relative; /* anchor label */
}
.foundation-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.04em;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.35),
    0 0 4px rgba(255,255,255,0.15);
  pointer-events: none;
  user-select: none;
  white-space: pre-line;
}
/* ===== DEAL EXPLANATION OVERLAY ===== */
#deal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  pointer-events: none;
}
#deal-overlay.hidden {
  display: none;
}
.deal-text {
  max-width: 640px;
  padding: 22px 28px;
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.75);
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05em;
  line-height: 1.45;
  text-align: center;
  white-space: pre-line;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.deal-text.show {
  opacity: 1;
}
/* ===== EXPANDED PILE ===== */
#modal {
  position:fixed;
  left:0;
  right:0;
  bottom:12px;
  display:none;
  justify-content:center;
  pointer-events:none;
}
#modal.open { display:flex; }
.modal-box {
  background:#1a1a1a;
  padding:16px;
  border-radius:12px;
  max-width:90vw;
  max-height:30vh;
  overflow-x:auto;
  overflow-y:hidden;
  pointer-events:auto;
}
.expanded {
  display:flex;
  gap:18px;
  margin:16px 0;
}
/* ===== DEAL FLY ===== */
.flying-card {
  position:fixed;
  width:var(--card-w);
  height:var(--card-h);
  pointer-events:none;
  z-index:2000;
  transition: transform calc(0.18s * 1.18) ease-out;
}
/* ===== WIN CASCADE ===== */
.foundation.cascade {
  animation: foundationPulse 0.6s ease-in-out both;
}
@keyframes foundationPulse {
  0%   { box-shadow: 0 0 0 rgba(255,255,255,0); }
  50%  { box-shadow: 0 0 18px rgba(255,255,255,0.85); }
  100% { box-shadow: 0 0 0 rgba(255,255,255,0); }
}
/* ===============================
   Game Progress Container
   =============================== */
.game-progress {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  color: #d8e2dc;
}
.progress-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  padding-top: 4px;
  margin-bottom: 6px;
  color: #dfe8e3;
  user-select: none;
}
/* ===============================
   Progress Bar Wrapper
   =============================== */
.progress-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px; /* spacing between bar and labels */
 
}
/* ===============================
   Progress Bar Background
   =============================== */
.progress-bar {
  position: relative;
  height: 8px;
  background-color: #2a473e; /* muted dark green */
  border-radius: 4px;
  overflow: hidden;
}
/* ===============================
   Progress Fill
   =============================== */
.progress-fill {
  height: 100%;
  width: 0%; /* set dynamically in JS (e.g., 42%) */
  background-color: #8fc8a5; /* softer than a "success" green */
  border-radius: 4px 0 0 4px;
  transition: width 0.25s ease-out;
}
/* ===============================
   Progress Labels (Below Bar)
   =============================== */
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #cbd6d0;
  opacity: 0.9;
  padding: 0 1px;
  user-select: none;
  padding-bottom: 15px;
}
/* ===============================
   Optional Tick Marks
   =============================== */
.progress-labels span {
  position: relative;
}
/* Vertical tick above each label */
.progress-labels span::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 5px;
  background-color: #6f8f7e;
  opacity: 0.6;
}
/* ===============================
   Disabled / Low-Contrast Mode
   (Optional – for endgame or UI states)
   =============================== */
.game-progress.inactive .progress-fill {
  background-color: #6f8f7e;
  opacity: 0.6;
}
.game-progress.inactive .progress-labels {
  opacity: 0.6;
}


#perfect-game-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#perfect-game-overlay.hidden {
  display: none;
}

.perfect-content {
  background: #ffffff;
  padding: 32px 40px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
  
  transform: scale(1.15);
  animation: popIn 0.35s ease-out;

}

.perfect-content h2 {
  color: #b38b2e; /* gold */
}

.perfect-content p {
  color: #333;    /* readable neutral */
}

.stars-container {
  display: flex;
  justify-content: center;
  gap: 12px;              /* space between stars */
  margin-bottom: 20px;
  height: 60px;
}

.star {
  width: 44px;
  opacity: 0;
  transform: translateY(30px) scale(0.3);
  animation: starRise 0.6s ease-out forwards;
}

.star:nth-child(1) { animation-delay: 0.0s; }
.star:nth-child(2) { animation-delay: 0.25s; }
.star:nth-child(3) { animation-delay: 0.5s; }
.star:nth-child(4) { animation-delay: 0.75s; }
.star:nth-child(5) { animation-delay: 1.0s; }

@keyframes starRise {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.3);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1.25); opacity: 1; }
}

/* Shared overlay base (if not already defined) */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.overlay.hidden {
  display: none;
}

/* Regular win card */
.win-content {
  background: #ffffff;
  padding: 28px 36px;
  border-radius: 16px;
  text-align: center;
  transform: scale(1.15);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
}

/* Grandma image */
.win-grandma {
  width: 240px;
  margin-bottom: 16px;
}

/* Text */
.win-content h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  color: #8b6b1f;
}

.win-content p {
  margin: 0;
  font-size: 1rem;
  color: #333;
}
