/* ==========================================================================
   FIVES DOMINO GAME — Master Website Stylesheet
   Designed to match the game's dark teal, ivory & champagne aesthetic.
   Fonts: Manrope (headings, scores, brand), DM Sans (body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..700;1,9..40,400..700&family=Manrope:wght@400;500;600;700;800&display=swap');

/* --- Custom Properties / Design Tokens --- */
:root {
  --teal-900: #102628;
  --teal-800: #163638;
  --teal-700: #1b3d40;
  --teal-600: #244c50;   /* Game Primary Table Color */
  --teal-500: #2d5a5e;
  --teal-400: #3c7277;
  --teal-100: #e3ede8;
  --teal-50:  #edf4f0;

  --gold-500: #e3cf98;   /* Game Champagne Accent */
  --gold-400: #edd9a6;
  --gold-600: #ceac61;   /* Focus Outline */
  --gold-700: #ab8b41;

  --sage-500: #7d9d7d;   /* Brand Dot */
  --sage-300: #c5dfbf;   /* Soft Accent */
  --sage-100: #e7f3dc;

  --ivory:    #fffcf2;   /* Domino Tile Face */
  --ivory-alt:#f8f6ed;
  --ink:      #213b3d;   /* Dark text */
  --ink-soft: #38513e;
  --muted:    #748581;
  --muted-light: #a5beb2;

  --bg-page:  #f2f3ef;
  --bg-card:  #ffffff;
  --line:     #dce3df;
  --line-dark:#355f63;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 6px rgba(33, 59, 61, 0.05);
  --shadow-md: 0 10px 30px rgba(33, 59, 61, 0.08);
  --shadow-lg: 0 20px 50px rgba(16, 38, 40, 0.16);
  --shadow-glow: 0 0 24px rgba(227, 207, 152, 0.35);

  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1240px;
  --nav-height: 72px;
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg-page);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Accessible Focus States */
:focus-visible {
  outline: 3px solid var(--gold-600);
  outline-offset: 3px;
}

/* Skip link for keyboard accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--gold-500);
  color: var(--teal-900);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Container Utility */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(242, 243, 239, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  background: rgba(242, 243, 239, 0.98);
  box-shadow: 0 4px 20px rgba(16, 38, 40, 0.05);
}

.site-header.header-dark {
  background: rgba(36, 76, 80, 0.92);
  border-bottom: 1px solid var(--line-dark);
}
.site-header.header-dark.scrolled {
  background: rgba(27, 61, 64, 0.98);
  box-shadow: 0 4px 24px rgba(16, 38, 40, 0.25);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -1.5px;
  color: var(--ink);
}

.brand-dark {
  color: var(--ivory);
}

.brand-mark {
  width: 20px;
  height: 40px;
  transform: rotate(-15deg);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.brand-dot {
  color: var(--sage-500);
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-weight: 550;
  font-size: 0.95rem;
  color: var(--muted);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-600);
  border-radius: 2px;
}

.nav-link-dark {
  color: var(--muted-light);
}
.nav-link-dark:hover {
  color: var(--ivory);
}
.nav-link-dark.active::after {
  background: var(--gold-500);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: inherit;
  align-items: center;
  justify-content: center;
}
.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gold-500);
  color: var(--teal-900);
  box-shadow: 0 4px 14px rgba(227, 207, 152, 0.3);
}
.btn-primary:hover {
  background: var(--gold-400);
  box-shadow: 0 6px 20px rgba(227, 207, 152, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ivory);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary-light {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-secondary-light:hover {
  background: var(--teal-50);
  border-color: var(--sage-300);
}

.btn-lg {
  padding: 16px 34px;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-gold {
  background: rgba(227, 207, 152, 0.2);
  color: var(--gold-500);
  border: 1px solid rgba(227, 207, 152, 0.35);
}

.badge-sage {
  background: rgba(125, 157, 125, 0.2);
  color: var(--teal-900);
  border: 1px solid rgba(125, 157, 125, 0.35);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  background: radial-gradient(ellipse at 50% 20%, #2f6065 0%, var(--teal-600) 65%, var(--teal-800) 100%);
  color: var(--ivory);
  padding: 72px 0 96px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}

/* Grain overlay matching the game felt */
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: radial-gradient(#d5e5d5 0.6px, transparent 0.6px);
  background-size: 4px 4px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto 56px;
}

.hero-eyebrow {
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: #f7faf5;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.65;
  color: #c9ded3;
  margin-bottom: 36px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Game Preview Showcase Mockup */
.hero-showcase {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
}

.mockup-frame {
  position: relative;
  background: var(--teal-900);
  border-radius: var(--radius-lg);
  padding: 10px 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(11, 41, 47, 0.6), 0 0 0 1px rgba(227, 207, 152, 0.1);
  overflow: hidden;
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 10px;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.mockup-dot:nth-child(1) { background: #ff5f56; }
.mockup-dot:nth-child(2) { background: #ffbd2e; }
.mockup-dot:nth-child(3) { background: #27c93f; }

.mockup-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   WHAT IS FIVES / FEATURES
   ========================================================================== */
.section {
  padding: 96px 0;
  position: relative;
}

.section-light {
  background: var(--bg-page);
}

.section-dark {
  background: var(--teal-700);
  color: var(--ivory);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: block;
}

.section-dark .section-eyebrow {
  color: var(--gold-500);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -1.2px;
  margin-bottom: 16px;
  color: var(--ink);
}

.section-dark .section-title {
  color: #f7faf5;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

.section-dark .section-lead {
  color: #b9cfc3;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  padding: 36px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd8cf;
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--teal-50);
  color: var(--teal-600);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid var(--line);
}
.feature-icon-box svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 12px;
  color: var(--ink);
}

.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   HOW IT WORKS / WALKTHROUGH
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.step-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  position: relative;
}

.step-num {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-500);
  opacity: 0.85;
  margin-bottom: 16px;
}

.step-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--ivory);
}

.step-card p {
  color: #b9cfc3;
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ==========================================================================
   TABLE HIGHLIGHTS (WHY YOU'LL LOVE IT)
   ========================================================================== */
.highlights-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.highlight-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.highlight-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage-300);
  color: var(--teal-900);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.highlight-check svg {
  width: 16px;
  height: 16px;
}

.highlight-text h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.highlight-text p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.highlight-card-visual {
  background: radial-gradient(ellipse at center, #2b575b 0%, var(--teal-600) 100%);
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow-lg);
  text-align: center;
  color: var(--ivory);
}

.highlight-card-visual img {
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  margin-top: 20px;
}

/* ==========================================================================
   CTA BANNER
   ========================================================================== */
.cta-banner {
  background: radial-gradient(circle at 50% 30%, #2f656b 0%, var(--teal-600) 70%, var(--teal-800) 100%);
  color: var(--ivory);
  padding: 84px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line-dark);
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  color: #ffffff;
}

.cta-lead {
  font-size: 1.15rem;
  color: #c9ded3;
  margin-bottom: 36px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-page);
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-link:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  font-size: 0.82rem;
}

.footer-privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-privacy-note svg {
  width: 16px;
  height: 16px;
  color: var(--sage-500);
}

/* ==========================================================================
   GAME EMBED PAGE (play/index.html)
   ========================================================================== */
.play-body {
  /* Use the available phone viewport as browser toolbars open and close.
     The grid gives the iframe the space remaining after the actual header. */
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: visible;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--teal-600);
}

.play-header {
  min-width: 0;
  min-height: 48px;
  background: var(--teal-700);
  border-bottom: 1px solid var(--line-dark);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px));
  z-index: 10;
}

.play-brand { flex: 0 0 auto; }

.play-header .brand {
  min-height: 44px;
  font-size: 1.2rem;
  gap: 7px;
  color: var(--ivory);
}
.play-header .brand-mark { width: 12px; height: 24px; }

.play-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.play-actions .btn {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  gap: 6px;
  font-size: 0.8rem;
  line-height: 1.2;
}
.play-actions .btn:hover { transform: none; }
.play-actions .btn:disabled { opacity: 0.5; cursor: default; }

.game-frame-wrapper {
  min-width: 0;
  min-height: 0;
  width: 100%;
  position: relative;
  background: var(--teal-600);
}
.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 600px), (max-height: 500px) {
  .play-header { min-height: 45px; }
  .play-actions .fullscreen-label { display: none; }
}

/* M2: on phones the game draws its own top bar (sound, rules, settings, new game; the logo returns home), so the site
   bar would only repeat it. Give the board that height instead. Keep this query in sync with compactTable() in
   src/main.ts. */
@media (max-width: 700px), (max-height: 500px) and (max-width: 1000px) {
  .play-header { display: none; }
  .play-body { grid-template-rows: minmax(0, 1fr); }
}

/* Fallback card if game build is missing */
.game-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--ivory);
}

.game-fallback-card {
  max-width: 520px;
  background: rgba(22, 54, 56, 0.95);
  border: 1px solid rgba(227, 207, 152, 0.3);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}

.game-fallback-card h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 14px;
  color: var(--gold-500);
}

.game-fallback-card code {
  display: block;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--sage-300);
}

/* ==========================================================================
   HOW TO PLAY PAGE (how-to-play/index.html)
   ========================================================================== */
.rules-hero {
  background: radial-gradient(ellipse at 50% 20%, #2b5a5e 0%, var(--teal-600) 100%);
  color: var(--ivory);
  padding: 64px 0 54px;
  border-bottom: 1px solid var(--line-dark);
}

.rules-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  padding: 64px 0 96px;
  align-items: flex-start;
}

/* Sticky Table of Contents */
.rules-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.rules-toc h4 {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--ink);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-link {
  font-size: 0.92rem;
  color: var(--muted);
  display: block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.toc-link:hover, .toc-link.active {
  color: var(--teal-600);
  background: var(--teal-50);
  font-weight: 600;
  padding-left: 12px;
}

/* Rules Document Content */
.rules-article {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  box-shadow: var(--shadow-sm);
}

.rules-article section {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
.rules-article section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.rules-article h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 750;
  letter-spacing: -0.8px;
  margin-bottom: 18px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
}

.rules-article h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 24px 0 12px;
  color: var(--teal-700);
}

.rules-article p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.rules-article ul, .rules-article ol {
  margin: 14px 0 20px 24px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.rules-callout {
  background: var(--teal-50);
  border-left: 4px solid var(--teal-600);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}
.rules-callout h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--teal-700);
  margin-bottom: 6px;
}
.rules-callout p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.rules-callout-gold {
  background: #fbf7ec;
  border-left-color: var(--gold-600);
}
.rules-callout-gold h4 {
  color: #7b6021;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   Matching game breakpoints: 430px, 700px, 1000px+
   ========================================================================== */
@media (max-width: 1000px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .highlights-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .rules-layout {
    grid-template-columns: 1fr;
  }
  .rules-toc {
    display: none; /* Hide sticky TOC on tablets/phones to focus on reading */
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }
  
  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  }

  .site-header.header-dark .nav-menu {
    background: var(--teal-800);
    border-bottom: 1px solid var(--line-dark);
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-actions .btn {
    display: none; /* Hide header Play Now button on small screens; use hamburger or hero button */
  }

  .hero {
    padding: 48px 0 64px;
  }

  .section {
    padding: 64px 0;
  }

  .rules-article {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .btn-lg {
    width: 100%;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   FEEDBACK & FORM STYLES
   ========================================================================== */
.feedback-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}

.honeypot-wrap {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

.form-group {
  margin-bottom: 22px;
  text-align: left;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-label-hint {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink);
  background-color: var(--ivory);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(45, 90, 94, 0.15);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.5;
}

.form-char-count {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  margin-top: 4px;
}

.form-notice {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-top: 20px;
}

.form-notice-error {
  background-color: #fdeeed;
  color: #721c24;
  border: 1px solid #f5c2c0;
}

.form-notice-success {
  background-color: #edf7ed;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.feedback-success-card {
  text-align: center;
  padding: 24px 12px;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #edf7ed;
  color: #2e7d32;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.success-icon svg {
  width: 28px;
  height: 28px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .feedback-card {
    padding: 24px 18px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
