/* ===== WATER PATH — style.css ===== */

/* --- Google Fonts already loaded in index.html --- */

/* --- CSS Variables --- */
:root {
  --yellow: #FFC907;
  --navy: #003366;
  --sky: #77A8BB;
  --cream: #FFF7E1;
  --black: #1A1A1A;
  --cream-tint: #FFF7E1;
  --peach: #FED8C1;
  --brown: #BF6C46;
  --gray: #CBCCD1;
}

/* --- Global font rules --- */
body, .dashboard, .dashboard-row, .dashboard-btn, .dashboard-lives,
.dashboard-water, .dashboard-points, .dashboard-highscore,
.dashboard-msg, .cell, .popup-modal, .popup-content,
#game-guide, #how-to-play-box, #important-rules-box,
ol, ul, li, p, span, div {
  font-family: 'Sora', sans-serif;
}

h1, h2, h3, h4, h5, h6, .charity-logo-text, .cover h1 {
  font-family: 'Didot', 'Bodoni MT', 'Georgia', serif;
}

/* --- Charity mission link hover --- */
.charity-mission-link .mission-default { display: inline; }
.charity-mission-link .mission-hover { display: none; }
.charity-mission-link:hover .mission-default { display: none; }
.charity-mission-link:hover .mission-hover { display: inline; }

.charity-logo-text {
  font-family: 'Didot', 'Bodoni MT', 'Georgia', serif;
  font-size: 2rem;
  color: #222;
  letter-spacing: 0.08em;
  font-weight: 400;
}

/* --- Background sky --- */
.background-sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* --- Sun --- */
.sun {
  position: absolute;
  top: 60px;
  right: 120px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #fffbe6 60%, #ffe066 100%);
  border-radius: 50%;
  box-shadow: 0 0 80px 40px #ffe06688;
  z-index: 1;
}

/* --- Clouds --- */
.cloud {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  box-shadow: 40px 0px 0px 0px #fff, 80px 10px 0px 0px #fff, 20px 20px 0px 0px #fff;
  width: 60px;
  height: 36px;
  opacity: 0.85;
  z-index: 1;
}

@keyframes cloudMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(100vw); }
}

.cloud { animation: cloudMove 60s linear infinite; }
.cloud.speed1 { animation-duration: 40s; }
.cloud.speed2 { animation-duration: 50s; }
.cloud.speed3 { animation-duration: 65s; }
.cloud.speed4 { animation-duration: 85s; }
.cloud.speed5 { animation-duration: 100s; }
.cloud.speed6 { animation-duration: 115s; }

/* --- Grass layers --- */
.grass {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 220px;
  background: linear-gradient(to top, #7ec850 80%, #a8e063 100%);
  z-index: 1;
  border-top-left-radius: 60px 30px;
  border-top-right-radius: 60px 30px;
}

.floor {
  position: absolute;
  left: 0;
  width: 100vw;
  height: calc(100vh - 45vh);
  background: linear-gradient(to top, #8d5524 80%, #c68642 100%);
  z-index: 2;
  border-top-left-radius: 40px 20px;
  border-top-right-radius: 40px 20px;
  top: 45vh;
}

.grass-middle {
  position: absolute;
  left: 0;
  top: 45vh;
  width: 100vw;
  height: 60px;
  pointer-events: none;
  z-index: 3;
}

/* --- Grass blades --- */
.grass-blades {
  position: absolute;
  left: 0;
  top: calc(100vh - 110px);
  width: 100vw;
  height: 90px;
  pointer-events: none;
  z-index: 3;
}

.blade {
  position: absolute;
  bottom: 0;
  width: 8px;
  background: linear-gradient(to top, #27ae60 60%, #7ec850 100%);
  border-radius: 4px 4px 12px 12px;
  opacity: 0.8;
  transform: rotate(-8deg);
}
.blade.b2 { left: 10vw; height: 32px; transform: rotate(6deg); }
.blade.b3 { left: 22vw; height: 38px; transform: rotate(-12deg); }
.blade.b4 { left: 35vw; height: 28px; transform: rotate(10deg); }
.blade.b5 { left: 48vw; height: 36px; transform: rotate(-6deg); }
.blade.b6 { left: 60vw; height: 40px; transform: rotate(8deg); }
.blade.b7 { left: 72vw; height: 30px; transform: rotate(-10deg); }
.blade.b8 { left: 85vw; height: 34px; transform: rotate(12deg); }

/* --- Body --- */
body {
  background: linear-gradient(to top, #7ec850 0%, #a8e063 40%, #87ceeb 80%, #fff 100%);
  font-family: 'Didot', 'Bodoni MT', 'Georgia', serif;
  color: #1a1a2e;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-size: 16px;
}

/* --- Main Menu --- */
#main-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  z-index: 2000;
}

#main-menu h1 {
  font-size: 3.5rem;
  color: #1A1A1A;
  margin-bottom: 28px;
}

/* --- Grid --- */
.grid {
  display: none; /* hidden until game starts */
  grid-template-columns: repeat(8, 40px);
  grid-template-rows: repeat(8, 40px);
  gap: 4px;
  background: #d0e9f5;
  border-radius: 8px;
  margin: 40px auto;
  width: 352px;
  padding: 16px;
  z-index: 2;
  position: relative;
}

.cell {
  width: 40px;
  height: 40px;
  background: #e8e4dc;
  border: 1.5px dashed #aaa59d;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
}

.cell.selected {
  background: #2979a8;
  color: #fff;
}

.cell.obstacle {
  background: #ccc8bf;
}

.cell.obstacle-highlight {
  background: #fffbe6;
  border: 2px solid #ffe066;
  box-shadow: 0 0 4px 1px #ffe06655;
}

.cell-error {
  background: #e74c3c !important;
  color: #fff;
  transition: background 0.2s;
}

/* --- Dashboard --- */
.dashboard {
  display: none; /* hidden until game starts */
  margin: 32px auto 0 auto;
  padding: 24px 48px 18px 48px;
  background: linear-gradient(120deg, #e0eafc 60%, #cfdef3 100%);
  border-radius: 24px 24px 36px 36px;
  box-shadow: 0 6px 32px 0 #b0c4de55;
  width: 820px;
  max-width: 98vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
  border-top: 6px solid #7ec850;
}

.dashboard-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  width: 100%;
}

/* Unified stats row: lives | water | level | points | highscore */
.stats-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 8px;
}

.dashboard-lives {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.6rem;
  color: var(--cw-teal-dark);
  font-weight: bold;
  letter-spacing: 2px;
  background: rgba(26,173,213,0.1);
  border: 2px solid rgba(26,173,213,0.3);
  border-radius: 12px;
  padding: 8px 20px;
  min-width: 140px;
}

.dashboard-water {
  font-size: 1.15rem;
  color: var(--cw-teal-dark);
  font-weight: 700;
  background: rgba(26,173,213,0.08);
  border: 2px solid rgba(26,173,213,0.25);
  border-radius: 12px;
  padding: 8px 20px;
  text-align: center;
  min-width: 130px;
}

.dashboard-msg {
  width: 100%;
  text-align: center;
  margin-top: 18px;
  font-size: 1.2rem;
  color: #27ae60;
  font-weight: bold;
  min-height: 1.5em;
}

.dashboard-btns {
  justify-content: center;
  align-items: center;
  margin-top: 18px;
}

/* --- Dashboard buttons --- */
.dashboard-btn {
  background: linear-gradient(180deg, var(--yellow) 60%, var(--peach) 100%);
  border-radius: 8px;
  box-shadow: 0 2px 8px 0 #FED8C1aa, 0 1px 2px 0 #FFF7E1 inset;
  border: 1.5px solid var(--yellow);
  font-weight: bold;
  color: var(--navy);
  padding: 10px 22px;
  margin: 8px 0;
  font-size: 1em;
  font-family: inherit;
  transition: box-shadow 0.2s, background 0.2s;
  cursor: pointer;
}

.dashboard-btn:hover {
  background: linear-gradient(180deg, var(--peach) 60%, var(--yellow) 100%);
  box-shadow: 0 4px 16px 0 #FED8C1cc, 0 2px 4px 0 #FFF7E1 inset;
}

.dashboard-btn:active {
  filter: brightness(0.95);
}

.dashboard-btn.submit {
  background: #2979a8;
  color: #fff;
  border-color: #2979a8;
}

.dashboard-btn.reset {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
}

.dashboard-btn.next {
  background: #27ae60;
  color: #fff;
  border-color: #27ae60;
}

.lives-hint {
  font-size: 0.95em;
  color: #fffbe6;
  margin-left: 2px;
}

.dashboard-btn-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* --- Cheat / Test Buttons --- */
.dashboard-btn.cheat-btn {
  background: #9b59b6;
  color: #fff;
  border-color: #9b59b6;
  font-size: 0.8em;
  padding: 6px 12px;
  opacity: 0.7;
  display: block;
  margin: 4px auto;
}
.dashboard-btn.cheat-btn:hover {
  opacity: 1;
  background: #8e44ad;
}
.cheat-row {
  border-top: 1px dashed rgba(155, 89, 182, 0.4);
  padding-top: 6px;
}
.cheat-label {
  display: block;
  text-align: center;
  font-size: 0.65em;
  color: #9b59b6;
  letter-spacing: 2px;
  margin-bottom: 4px;
  opacity: 0.8;
}

/* ===== charity: water Branding ===== */

/* --- Brand colors --- */
:root {
  --cw-teal: #1AADD5;
  --cw-teal-dark: #0D8AA8;
  --cw-teal-light: #5DC4E8;
  --cw-navy: #003366;
  --cw-white: #FFFFFF;
}

/* --- Main Menu Branding --- */
#main-menu {
  padding: 20px 0;
  overflow-y: auto;
  max-height: 100vh;
}

/* Hero Banner */
.charity-banner {
  background: linear-gradient(135deg, var(--cw-navy) 0%, #005580 50%, var(--cw-teal) 100%);
  color: white;
  padding: 24px 20px 20px 20px;
  text-align: center;
  margin: 0 12px 12px 12px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,51,102,0.3);
  position: relative;
  overflow: hidden;
}

.charity-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(26,173,213,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.banner-logo {
  width: auto;
  height: 56px;
  max-width: 100%;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.banner-text {
  position: relative;
  z-index: 1;
}

.banner-title {
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem;
  margin: 0 0 8px 0;
  color: white;
  font-weight: 700;
}

.banner-tagline {
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 14px 0;
  opacity: 0.95;
  color: white;
}

.banner-cta {
  display: inline-block;
  background: var(--cw-teal);
  color: white;
  padding: 8px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 10px rgba(26,173,213,0.4);
}

.banner-cta:hover {
  background: var(--cw-teal-light);
  transform: translateY(-1px);
}

/* Big Logo in Menu */
.menu-logo {
  margin: 8px 0;
  text-align: center;
}

.big-logo {
  width: auto;
  height: 70px;
  max-width: 100%;
  filter: drop-shadow(0 3px 10px rgba(0,51,102,0.25));
  display: inline-block;
  vertical-align: middle;
}

.menu-title {
  font-family: 'Baloo 2', cursive;
  font-size: 2rem;
  color: var(--cw-navy);
  margin: 4px 0;
}

.menu-byline {
  font-size: 0.9rem;
  color: var(--cw-teal-dark);
  margin: 0 0 16px 0;
  font-weight: 500;
}

/* CTA Buttons */
#start-game-btn,
.cta-btn {
  background: linear-gradient(135deg, var(--cw-teal) 0%, var(--cw-teal-dark) 100%) !important;
  color: white !important;
  border: none !important;
  font-size: 1.15rem !important;
  padding: 14px 40px !important;
  border-radius: 30px !important;
  box-shadow: 0 4px 16px rgba(26,173,213,0.4) !important;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin: 16px 0;
}

#start-game-btn:hover,
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,173,213,0.5) !important;
}

#resume-game-btn,
.cta-btn-secondary {
  background: white !important;
  color: var(--cw-teal-dark) !important;
  border: 2px solid var(--cw-teal) !important;
  font-size: 1rem !important;
  padding: 10px 30px !important;
  border-radius: 30px !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#resume-game-btn:hover,
.cta-btn-secondary:hover {
  background: var(--cw-teal) !important;
  color: white !important;
}

/* Menu Footer */
.menu-footer {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--cw-navy);
  border-radius: 12px;
  text-align: center;
  margin-left: 12px;
  margin-right: 12px;
}

.footer-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.85);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.donate-btn {
  display: inline-block;
  background: var(--cw-teal);
  color: white;
  padding: 8px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 10px rgba(26,173,213,0.3);
}

.donate-btn:hover {
  background: var(--cw-teal-light);
  transform: translateY(-1px);
}

/* ===== ACCESSIBILITY ===== */

/* Screen-reader only (not visually visible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -999px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cw-navy);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--cw-teal);
  outline-offset: 2px;
}

/* Visible focus ring on all interactive elements */
:focus-visible {
  outline: 3px solid var(--cw-teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove default outline (replaced by :focus-visible) */
button:focus:not(:focus-visible),
.cell:focus:not(:focus-visible) {
  outline: none;
}

/* Grid cells — keyboard-focusable, visible focus */
.cell:focus-visible {
  outline: 3px solid var(--cw-teal);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--cw-navy);
  z-index: 1;
}

/* Grid keyboard-active state */
.grid.keyboard-nav .cell:focus-visible {
  background: var(--cw-teal-light) !important;
  border-color: var(--cw-navy);
}

/* --- Reduced motion: pause animations --- */
@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;
  }
}

/* --- High contrast mode --- */
@media (prefers-contrast: more) {
  :root {
    --yellow: #FFD700;
    --navy: #000080;
    --sky: #87CEEB;
    --cream: #FFFFFF;
    --black: #000000;
    --cw-teal: #0077B6;
    --cw-teal-dark: #005577;
    --cw-navy: #000033;
  }

  .cell.selected {
    background: #000 !important;
    border: 3px solid #FFD700 !important;
    color: #FFD700 !important;
  }

  .cell.obstacle-highlight {
    background: #fff !important;
    border: 3px solid #000 !important;
  }

  .dashboard-btn.submit,
  .dashboard-btn.next {
    border: 3px solid #000 !important;
  }

  .grid {
    border: 4px solid #000 !important;
  }
}

/* Dashboard logo row */
.dashboard-logo-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px 6px 12px;
  border-bottom: 1px solid rgba(26,173,213,0.2);
  margin-bottom: 4px;
}

.dashboard-logo {
  width: auto;
  height: 52px;
  max-width: 240px;
  opacity: 0.9;
}

.dashboard-tagline {
  font-size: 0.72rem;
  color: var(--cw-teal-dark);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-align: center;
}

/* Game Area - Bigger Logo + Mission Text */
.logo-link-wrapper {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.logo-link {
  width: auto;
  height: 48px;
  max-width: 100%;
  opacity: 0.95;
}

.charity-mission-link {
  font-size: 0.75rem;
  color: var(--cw-teal-dark);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.3px;
  opacity: 0.9;
  transition: color 0.2s;
  display: block;
  text-align: center;
  margin-top: 2px;
}

.charity-mission-link:hover {
  color: var(--cw-teal);
}

/* Popup Branding */
.popup-logo {
  width: auto;
  height: 44px;
  max-width: 100%;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 6px rgba(0,51,102,0.2));
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.popup-mission {
  font-size: 0.72rem;
  color: rgba(0,51,102,0.65);
  margin: 8px 0 6px 0;
  font-weight: 500;
  text-align: center;
}

.popup-donate {
  display: inline-block;
  background: var(--cw-teal);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(26,173,213,0.3);
}

.popup-donate:hover {
  background: var(--cw-teal-dark);
  transform: translateY(-1px);
}

/* Success Popup accent */
.popup-modal {
  border-top: 3px solid var(--cw-teal) !important;
}

/* Game Over accent */
.gameover {
  border-top: 3px solid var(--cw-navy) !important;
}

/* Dashboard teal accent on active elements */
.dashboard-btn.submit {
  background: linear-gradient(135deg, var(--cw-teal) 0%, var(--cw-teal-dark) 100%) !important;
  box-shadow: 0 3px 10px rgba(26,173,213,0.3) !important;
}

.dashboard-btn.next {
  background: linear-gradient(135deg, var(--cw-teal) 0%, var(--cw-teal-dark) 100%) !important;
  box-shadow: 0 3px 10px rgba(26,173,213,0.3) !important;
}

/* Grid border in brand color */
.grid {
  border: 3px solid rgba(26,173,213,0.4);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(26,173,213,0.15);
}

/* Water counter brand color */
.dashboard-water {
  color: var(--cw-teal-dark);
  font-weight: 700;
}

/* Level, Points, Highscore cards */
.dashboard-level,
.dashboard-points,
.dashboard-highscore {
  background: linear-gradient(180deg, var(--cream) 60%, var(--gray) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 16px 0 #1A1A1A22, 0 1px 2px 0 #FFF7E144 inset;
  border: 1.5px solid var(--cw-navy);
  padding: 10px 20px;
  margin: 6px 0;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-family: 'Sora', sans-serif;
  transition: box-shadow 0.2s;
  text-align: center;
}

.dashboard-level:hover,
.dashboard-points:hover,
.dashboard-highscore:hover {
  box-shadow: 0 8px 24px 0 #1A1A1A33, 0 2px 4px 0 #FFF7E155 inset;
}

/* Level counter brand color */
.dashboard-level {
  color: var(--cw-navy);
}

/* Points brand color */
.dashboard-points {
  color: var(--cw-teal);
  font-weight: 700;
}

/* Highscore brand color */
.dashboard-highscore {
  color: var(--cw-teal-dark);
}

/* Rules box teal accents */
#important-rules-box .box-title {
  color: var(--cw-teal-dark);
}

/* How-to-play teal accents */
#how-to-play-box .box-title {
  color: var(--cw-teal-dark);
}


/* --- Popup / Modal --- */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(30, 60, 80, 0.25);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.popup-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(120deg, #e0f7e9 60%, #d0f0c0 100%);
  border-radius: 24px;
  box-shadow: 0 8px 40px 0 #27ae6040;
  padding: 36px 36px 28px 36px;
  min-width: 320px;
  max-width: 90vw;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 1.25rem;
  color: #2979a8;
  font-weight: bold;
  animation: popupIn 0.25s cubic-bezier(.4, 2, .6, 1) 1;
}

@keyframes popupIn {
  0%   { transform: translate(-50%, -60%) scale(0.9); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.popup-content {
  margin-bottom: 18px;
  font-size: 1.18em;
  color: #27ae60;
}

.popup-modal .dashboard-btn.next {
  display: block;
  margin: 0 auto;
}

/* --- How to Play / Rules boxes (main menu) --- */
#how-to-play-box {
  background: #fffbe6;
  border-radius: 16px;
  padding: 22px 36px 18px 36px;
  box-shadow: 0 2px 12px #b0c4de33;
  font-size: 1.13rem;
  color: #1A1A1A;
  text-align: left;
  margin: 16px 0;
}

#important-rules-box {
  background: #fffbe6;
  border-radius: 16px;
  padding: 22px 36px 18px 36px;
  box-shadow: 0 2px 12px #b0c4de33;
  font-size: 1.13rem;
  color: #1A1A1A;
  text-align: left;
  margin: 16px 0;
}

/* --- Charity logo link --- */
img[alt="charity: water logo"] {
  height: 32px !important;
  margin-bottom: 8px !important;
}

.charity-mission-link {
  font-size: 1em;
  padding: 6px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 8px #b0c4de22;
}

.mission-default, .mission-hover {
  font-size: 1em;
}

/* --- Blueprint logo style --- */
.blueprint-logo {
  background: #FFC907;
  border-radius: 12px;
  box-shadow: 0 4px 16px #FFC90755;
  padding: 90px 180px;
  display: block;
  margin: 0 auto 0 auto;
  object-fit: contain;
  height: 380px;
  width: auto;
}

/* --- Mobile Responsive --- */
@media (max-width: 600px) {
  body { font-size: 15px; }

  .dashboard {
    width: 90vw !important;
    max-width: 90vw !important;
    padding: 4px 1vw 4px 1vw !important;
    border-radius: 8px !important;
    margin: 4px auto 0 auto !important;
    box-shadow: 0 1px 4px 0 #b0c4de33 !important;
  }

  .dashboard-row { flex-direction: column; gap: 8px; }

  .dashboard-btn {
    font-size: 1em;
    padding: 10px 12px;
    margin: 6px 0;
  }

  .dashboard-level,
  .dashboard-points,
  .dashboard-highscore {
    padding: 8px 12px;
    font-size: 1em;
    margin: 6px 0;
  }

  #main-menu { padding: 32px 0; font-size: 1.15rem; }

  #how-to-play-box,
  #important-rules-box {
    padding: 12px 8px 10px 8px;
    font-size: 1em;
    border-radius: 12px;
    box-shadow: 0 2px 8px #b0c4de22;
  }

  .grid {
    $1  display: none; /* hidden until game starts */`ngrid-template-columns: repeat(8, minmax(24px, 1fr));
    grid-template-rows: repeat(8, minmax(24px, 1fr));
    gap: 2px;
    width: 98vw;
    padding: 8px;
    margin: 12px auto;
  }

  .cell {
    width: 24px;
    height: 24px;
    font-size: 1em;
  }

  .background-sky,
  .grass,
  .floor,
  .grass-middle {
    width: 100vw;
    min-width: 0;
    left: 0;
  }

  .sun {
    width: 60px;
    height: 60px;
    top: 20px;
    right: 20px;
  }

  .cloud {
    width: 40px !important;
    height: 24px !important;
  }

  .popup-modal {
    min-width: 90vw;
    padding: 18px 8px 14px 8px;
    border-radius: 12px;
    font-size: 1em;
  }

  .charity-logo-text { font-size: 1.2rem; }

  h1 { font-size: 1.5rem !important; }

  #start-game-btn {
    font-size: 1.1rem;
    padding: 10px 24px;
    border-radius: 8px;
  }

  #resume-game-btn {
    font-size: 1em;
    padding: 8px 18px;
    border-radius: 8px;
  }
}