/* ============================================
   OCEAN DASH ADVENTURE — Chunky Cartoon Style
   Based on Adventure Kids reference design:
     • Fredoka font, thick dark outlines, hard shadows
     • Bright flat colors, rounded shapes
     • Underwater ocean-themed palette
   No login. Device-only payment. To-Do + Pet Dashboard.
   ============================================ */

:root {
  /* Ink (outline/shadow color) — deep ocean navy */
  --ink: #0a1d3a;
  /* Background — soft sky-ocean cream */
  --bg: #cdeefd;
  --bg-deep: #4fc3f7;
  /* Chunky cartoon palette */
  --ocean: #4dabf7;
  --ocean-deep: #0288d1;
  --ocean-darker: #01579b;
  --coral: #ff6b6b;
  --yellow: #ffe066;
  --green: #7ed957;
  --purple: #b197fc;
  --orange: #ffa94d;
  --pink: #ff6b9d;
  --teal: #14b8a6;
  --sand: #fff8e7;
  --white: #ffffff;
  --gray: #e5e7eb;
  --gray-dark: #6b7280;
  /* Hard shadows (no blur) */
  --shadow-sm: 3px 3px 0 0 var(--ink);
  --shadow: 4px 4px 0 0 var(--ink);
  --shadow-lg: 6px 6px 0 0 var(--ink);
  --shadow-xl: 8px 8px 0 0 var(--ink);
  /* Border radii */
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.75rem;
}

/* ─── RESET & MOBILE LOCKS ─── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  touch-action: pan-x pan-y;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
  user-drag: none;
}

img, svg, canvas, video {
  -webkit-user-drag: none; user-drag: none; display: block;
}

html, body {
  width: 100%; height: 100%; height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: 'Fredoka', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--ocean-deep);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  touch-action: none;
}

button, input, textarea, select, [contenteditable], [data-interactive] {
  -webkit-user-select: auto;
  user-select: auto;
  touch-action: manipulation;
}

/* ─── GAME CONTAINER ─── */
#gameContainer {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #4fc3f7 0%, #0288d1 50%, #01579b 100%);
}
#gameCanvas {
  display: block; width: 100%; height: 100%;
  aspect-ratio: auto;
  image-rendering: auto;
}

/* ═══════════════════════════════════════════
   MODAL / OVERLAY BASE — Chunky cartoon cards
   ═══════════════════════════════════════════ */
.overlay, .modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 29, 58, 0.7);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: 16px;
}
.overlay.hidden, .modal-overlay.hidden {
  display: none !important;
}

.modal-card,
.overlay-card {
  background: var(--white);
  border-radius: 24px;
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-xl);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  position: relative;
  color: var(--ink);
  max-height: 88vh;
  overflow-y: auto;
}
.modal-card-wide { max-width: 440px; }

.modal-emoji {
  font-size: 56px; line-height: 1; margin-bottom: 8px;
}
.modal-title, .overlay-header h2 {
  font-size: 26px; font-weight: 700; color: var(--ink);
  margin-bottom: 4px;
}
.modal-desc {
  font-size: 14px; color: var(--ink); opacity: 0.7;
  margin-bottom: 16px; line-height: 1.4;
}
.modal-note {
  font-size: 11px; opacity: 0.55; margin-top: 8px;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 3px solid var(--ink);
}
.modal-header h3 { font-size: 20px; font-weight: 700; color: var(--ink); }
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--gray); color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 14px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.08s;
}
.modal-close:active { transform: translate(1px, 1px); }

.modal-body { font-size: 13px; line-height: 1.7; text-align: left; }
.modal-body h4 { font-size: 15px; font-weight: 600; color: var(--ocean-deep); margin: 14px 0 6px; }
.modal-body p { margin-bottom: 10px; color: var(--ink); }
.modal-body ul { list-style: none; padding: 0; margin: 8px 0; }
.modal-body ul li {
  padding: 4px 0 4px 20px; position: relative;
  color: var(--ink); font-size: 13px;
}
.modal-body ul li::before {
  content: '\2022'; position: absolute; left: 6px; color: var(--coral);
  font-weight: 700;
}
.modal-body a { color: var(--ocean-deep); text-decoration: underline; font-weight: 600; }
.modal-body a:active { color: var(--pink); }
.modal-body strong { color: var(--ink); }
.legal-line { font-size: 11px; color: var(--gray-dark); margin-top: 12px; }
.disclaimer { font-size: 11px; font-style: italic; color: var(--gray-dark); margin-top: 8px; }

/* ─── TERMS BOX ─── */
.terms-box {
  background: var(--sand);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: left;
}
.terms-box h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.terms-list { list-style: none; padding: 0; margin: 0 0 12px; }
.terms-list li {
  font-size: 12px; line-height: 1.6; color: var(--ink);
  padding: 3px 0 3px 16px; position: relative;
}
.terms-list li::before {
  content: '\2022'; position: absolute; left: 4px; color: var(--ocean-deep); font-weight: 700;
}
.terms-checkbox {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13px; color: var(--ink); font-weight: 600;
  -webkit-user-select: none; user-select: none;
}
.terms-checkbox input[type=checkbox] {
  width: 22px; height: 22px; accent-color: var(--green); cursor: pointer; flex-shrink: 0;
  border: 2px solid var(--ink);
}
.paid-badge {
  display: inline-block;
  background: #d1fae5;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 14px; font-weight: 700; color: #065f46;
}

/* ═══════════════════════════════════════════
   BUTTONS — Chunky cartoon (3px ink outline, hard shadow)
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border-radius: 16px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-weight: 700; font-family: inherit; font-size: 14px;
  color: var(--ink); padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
  margin-top: 8px;
  width: 100%;
  text-align: center;
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.btn-lg { font-size: 18px; padding: 14px 22px; }
.btn-sm { font-size: 12px; padding: 8px 12px; width: auto; }
.btn-primary {
  background: var(--green); color: #fff;
}
.btn-secondary { background: var(--gray); color: var(--ink); }
.btn-accent {
  background: var(--yellow); color: var(--ink);
}
.btn-danger {
  background: var(--coral); color: #fff;
}
.btn-link {
  background: none; color: var(--ocean-deep); font-size: 13px;
  padding: 8px; text-decoration: underline; border: none; box-shadow: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* ═══════════════════════════════════════════
   COOKIE BANNER — Chunky cartoon card at bottom
   ═══════════════════════════════════════════ */
.modal-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000;
  background: rgba(10, 29, 58, 0.4);
  padding: 8px;
}
.modal-banner.hidden { display: none; }
.banner-content {
  max-width: 440px; margin: 0 auto;
  background: var(--white);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-lg);
  border-radius: 16px;
  padding: 12px;
  display: flex; align-items: flex-start; gap: 8px;
}
.cookie-icon { font-size: 24px; flex-shrink: 0; }
.banner-content p { font-size: 11px; line-height: 1.5; margin-bottom: 0; color: var(--ink); flex: 1; }
.banner-content p a { color: var(--ocean-deep); font-weight: 700; text-decoration: underline; }
.banner-actions { display: flex; gap: 6px; flex-shrink: 0; }
.banner-actions .btn { min-width: 70px; padding: 8px 10px; font-size: 12px; }

/* ═══════════════════════════════════════════
   FOOTER — Adventure Kids style, dashboard only
   Chunky cartoon: white bg, ink border-top, small text
   ═══════════════════════════════════════════ */
#gameFooter {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  border-top: 3px solid var(--ink);
  padding: 4px 6px;
  text-align: center;
}
#gameFooter.hidden { display: none !important; }
.footer-top-links, .footer-sibling-links {
  margin: 2px 0;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px;
}
.footer-link {
  background: none; border: none;
  color: var(--ink); opacity: 0.7;
  font-size: 10px; cursor: pointer; padding: 1px 4px;
  text-decoration: underline;
  font-family: inherit;
  font-weight: 600;
}
.footer-link:active { color: var(--pink); opacity: 1; }
.footer-brand {
  font-size: 12px; font-weight: 700;
  color: var(--ocean-deep);
  margin: 2px 0;
}
.footer-copyright {
  font-size: 9px; color: var(--ink); opacity: 0.55;
  margin-bottom: 2px;
}
#gameFooter a {
  font-size: 10px; color: var(--ink); opacity: 0.7;
  text-decoration: underline; font-weight: 600;
}
#gameFooter a:active { color: var(--pink); opacity: 1; }
.footer-shopee {
  font-size: 9px; color: var(--ink); opacity: 0.7;
  margin: 2px 0;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.footer-shopee-label { color: var(--orange); font-weight: 700; }
.footer-shopee-link {
  color: var(--orange) !important; text-decoration: none !important;
  font-weight: 700; opacity: 1 !important;
}
.footer-shopee-link:active { color: var(--coral) !important; }

/* ═══════════════════════════════════════════
   REMOVE ADS — Top-right pill button (chunky)
   ═══════════════════════════════════════════ */
.remove-ads-btn {
  position: fixed; top: 10px; right: 10px; z-index: 950;
  background: var(--yellow); color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-size: 12px; font-weight: 700; font-family: inherit;
  cursor: pointer; padding: 6px 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s, box-shadow 0.08s;
}
.remove-ads-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}
.remove-ads-btn.hidden { display: none !important; }
body.paid .remove-ads-btn { display: none !important; }

/* ═══════════════════════════════════════════
   INFO (i) BUTTON — Top-left chunky cartoon
   ═══════════════════════════════════════════ */
.info-btn {
  position: fixed; top: 10px; left: 10px; z-index: 950;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--ink);
  color: var(--ocean-deep);
  font-size: 22px; font-weight: 900; font-style: italic;
  font-family: 'Fredoka', 'Georgia', serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s, box-shadow 0.08s;
  line-height: 1;
}
.info-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}
.info-btn.hidden { display: none !important; }

/* ═══════════════════════════════════════════
   ADSENSE — Left & Right Side Blocks (desktop, 160×600)
   ═══════════════════════════════════════════ */
.adsense-side {
  position: fixed; top: 0; bottom: 0; z-index: 700;
  width: 160px;
  background: var(--white);
  border-left: 3px solid var(--ink);
  border-right: 3px solid var(--ink);
  display: none;
  align-items: center; justify-content: center;
  padding: 60px 0;
  overflow: hidden;
}
.adsense-left { left: 0; border-right: none; }
.adsense-right { right: 0; border-left: none; }
.adsense-side .adsbygoogle { display: block !important; width: 160px; min-width: 160px; }
@media (min-width: 1200px) {
  .adsense-side { display: flex; }
  body:not(.paid) #gameContainer { padding-left: 168px; padding-right: 168px; }
}
.adsense-side.hidden { display: none !important; }
@media (max-width: 1199px) { .adsense-side { display: none !important; } }
body.paid .adsense-side { display: none !important; }
body.paid #gameContainer { padding-left: 0 !important; padding-right: 0 !important; }

/* ═══════════════════════════════════════════
   APP PAGES — To-Do List & Pet Dashboard
   Full-screen chunky cartoon overlay
   ═══════════════════════════════════════════ */
.app-page {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(10, 29, 58, 0.7);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 20px 10px;
}
.app-page.hidden { display: none !important; }
.app-page-card {
  background: var(--white);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow-xl);
  border-radius: 24px;
  padding: 20px 16px;
  max-width: 420px; width: 100%;
  color: var(--ink);
}
.pet-card-wide { max-width: 480px; }
.app-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 3px solid var(--ink);
  position: relative;
}
.app-page-header h3 { font-size: 20px; font-weight: 700; color: var(--ink); }
.app-page-header .modal-close {
  position: absolute; top: -8px; right: -8px;
}
.app-page-body { font-size: 13px; line-height: 1.6; text-align: left; }

/* ─── TO-DO LIST ─── */
.todo-add {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;
}
.todo-input {
  width: 100%; padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--sand); color: var(--ink);
  font-size: 14px; font-family: inherit; font-weight: 500;
  -webkit-user-select: text; user-select: text;
}
.todo-input:focus { outline: none; border-color: var(--ocean-deep); background: #fff; }
.todo-datetime { display: flex; gap: 8px; }
.todo-date, .todo-time {
  flex: 1; padding: 8px 10px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--sand); color: var(--ink);
  font-size: 13px; font-family: inherit; font-weight: 500;
  -webkit-user-select: text; user-select: text;
}
.todo-date:focus, .todo-time:focus { outline: none; border-color: var(--ocean-deep); background: #fff; }
.todo-list { margin-bottom: 16px; }
.todo-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; margin-bottom: 6px;
  background: var(--sand);
  border: 2px solid var(--ink);
  border-radius: 12px;
}
.todo-item.todo-done {
  opacity: 0.55;
  background: #d1fae5;
}
.todo-check input[type=checkbox] {
  width: 22px; height: 22px; accent-color: var(--green);
  cursor: pointer; margin-top: 2px;
  border: 2px solid var(--ink);
}
.todo-content { flex: 1; min-width: 0; }
.todo-text { display: block; font-size: 13px; color: var(--ink); word-break: break-word; font-weight: 500; }
.todo-done .todo-text { text-decoration: line-through; }
.todo-meta { display: block; font-size: 10px; color: var(--ink); opacity: 0.6; margin-top: 2px; font-weight: 600; }
.todo-del {
  background: var(--coral); color: #fff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-size: 16px; cursor: pointer;
  line-height: 1; flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 1px 1px 0 var(--ink);
}
.todo-del:active { transform: translate(1px, 1px); box-shadow: none; }

/* ─── SCRATCH PAD ─── */
.scratch-section {
  margin-top: 8px; border-top: 2px solid var(--ink);
  padding-top: 12px;
}
.scratch-section h4 { font-size: 14px; font-weight: 700; color: var(--ocean-deep); margin-bottom: 6px; }
.scratch-textarea {
  width: 100%; min-height: 100px; padding: 10px 12px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--sand); color: var(--ink);
  font-size: 13px; line-height: 1.5; resize: vertical;
  font-family: inherit; font-weight: 500;
  -webkit-user-select: text; user-select: text;
}
.scratch-textarea:focus { outline: none; border-color: var(--ocean-deep); background: #fff; }

/* ─── PET DASHBOARD ─── */
.pet-add { margin-bottom: 12px; text-align: left; }
.pet-list { margin-bottom: 12px; }
.pet-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px; margin-bottom: 8px;
  background: var(--sand);
  border: 2px solid var(--ink);
  border-radius: 14px;
}
.pet-photo {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex-shrink: 0;
  background: var(--ocean); border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.pet-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.pet-photo-placeholder { font-size: 28px; }
.pet-info { flex: 1; min-width: 0; }
.pet-name { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.pet-species { display: block; font-size: 11px; color: var(--ocean-deep); font-weight: 600; }
.pet-age, .pet-food, .pet-feedtime, .pet-health {
  display: block; font-size: 11px; color: var(--ink); opacity: 0.8; margin-top: 1px;
}
.pet-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.pet-actions .btn-sm {
  padding: 4px 10px; font-size: 12px; width: 36px;
  border-radius: 8px; box-shadow: 1px 1px 0 var(--ink);
}

/* ─── PET FORM ─── */
.pet-form {
  margin-top: 12px; padding: 12px;
  background: var(--sand);
  border: 3px solid var(--ink);
  border-radius: 14px;
}
.pet-form.hidden { display: none; }
.pet-form h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.pet-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.pet-form-grid label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px; color: var(--ink); font-weight: 700;
}
.pet-form-grid input, .pet-form-grid textarea {
  width: 100%; padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-family: inherit; font-weight: 500;
  -webkit-user-select: text; user-select: text;
}
.pet-form-grid input:focus, .pet-form-grid textarea:focus { outline: none; border-color: var(--ocean-deep); }
.pet-form-grid textarea { resize: vertical; min-height: 50px; }
.pet-form-grid label:has(textarea) { grid-column: span 2; }
.pet-photo-input { font-size: 11px !important; padding: 6px !important; }
.pet-form-img { margin-top: 8px; text-align: center; }
.pet-photo-preview {
  max-width: 160px; max-height: 120px; border-radius: 10px; object-fit: cover;
  border: 2px solid var(--ink);
}
.pet-photo-preview.hidden { display: none; }
.pet-form-actions { display: flex; gap: 8px; margin-top: 12px; }
.pet-form-actions .btn-sm { flex: 1; }

/* ═══════════════════════════════════════════
   AD BANNER COMPONENTS — Timed Affiliate Ads
   Chunky cartoon style with thick outlines & hard shadows
   ═══════════════════════════════════════════ */

/* InteractiveLink (Arleta) — Top leaderboard banner, collapsible */
.ad-leaderboard, .ad-exabytes {
  position: fixed; z-index: 800;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 300px;
  transition: max-width 0.3s ease, border-radius 0.3s ease;
}
.ad-leaderboard { top: 50px; left: 12px; }
/* Exabytes — wide centered bottom banner (above footer / floating ads) */
.ad-exabytes {
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(580px, 92vw);
  width: 92vw;
}
.ad-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; gap: 6px;
  background: var(--sand);
  border-bottom: 2px solid var(--ink);
}
.ad-toggle {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; color: var(--coral);
  font-size: 11px; font-weight: 700; cursor: pointer; padding: 3px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
  font-family: inherit;
}
.ad-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--coral);
  border: 1.5px solid var(--ink);
  animation: ad-pulse 1.5s ease-in-out infinite;
}
.ad-dot.blue { background: var(--ocean); }
@keyframes ad-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
.ad-x {
  background: var(--coral); color: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 12px; cursor: pointer;
  padding: 0; width: 22px; height: 22px;
  line-height: 1; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 1px 1px 0 var(--ink);
}
.ad-x:active { transform: translate(1px, 1px); box-shadow: none; }
.ad-body {
  padding: 10px; animation: ad-slide-down 0.2s ease-out;
}
@keyframes ad-slide-down { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
.ad-body a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.ad-img {
  flex-shrink: 0; width: 60px; height: 40px; object-fit: cover;
  border-radius: 8px; border: 2px solid var(--ink);
}
.ad-text strong {
  display: block; font-size: 12px; font-weight: 800; color: var(--coral);
  margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-exabytes .ad-text strong { color: var(--ocean-deep); }
.ad-text p {
  font-size: 10px; color: var(--ink); opacity: 0.7; margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-cta {
  font-size: 10px; font-weight: 700; color: var(--teal);
  margin-top: 2px; display: inline-block;
}
.ad-cta.blue { color: var(--orange); }

/* Wasza EduKids — Bottom-right floating card */
.ad-wasza {
  position: fixed; bottom: 60px; right: 12px; z-index: 850;
  max-width: 130px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--purple), #4c1d95);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.ad-wasza:active { transform: translateY(-2px); }
.ad-wasza-x {
  position: absolute; top: 4px; right: 4px; z-index: 10;
  background: rgba(0,0,0,0.65); color: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 12px; cursor: pointer; padding: 0;
  width: 22px; height: 22px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.ad-wasza a { display: block; text-decoration: none; color: #fff; padding: 6px; }
.ad-wasza-img {
  width: 100%; height: 50px; object-fit: cover;
  border-radius: 8px; margin-bottom: 4px;
  border: 2px solid rgba(255,255,255,0.4);
}
.ad-wasza-label { text-align: center; }
.ad-wasza-label strong { display: block; font-size: 10px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.ad-wasza-label span { font-size: 8px; font-weight: 700; color: #67e8f9; }

/* Shopee — Bottom-left floating, rotates every 60s */
.ad-shopee {
  position: fixed; bottom: 60px; left: 12px; z-index: 850;
  max-width: 150px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--orange), #c2410c);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.ad-shopee:active { transform: translateY(-2px); }
.ad-shopee-x {
  position: absolute; top: 4px; right: 4px; z-index: 10;
  background: rgba(0,0,0,0.65); color: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 12px; cursor: pointer; padding: 0;
  width: 22px; height: 22px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.ad-shopee a { display: block; text-decoration: none; color: #fff; padding: 8px 6px; }
.ad-shopee-icon { font-size: 20px; display: block; text-align: center; margin-bottom: 3px; }
.ad-shopee-label {
  display: block; font-size: 10px; font-weight: 700; color: #fff;
  text-align: center; margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-shopee-cta {
  display: block; font-size: 9px; font-weight: 700; color: #fef08a;
  text-align: center;
}

/* Paid users: hide all ads */
body.paid .ad-leaderboard,
body.paid .ad-exabytes,
body.paid .ad-wasza,
body.paid .ad-shopee { display: none !important; }

/* Hide affiliate ads during gameplay */
body.game-playing .ad-leaderboard,
body.game-playing .ad-exabytes,
body.game-playing .ad-wasza,
body.game-playing .ad-shopee { display: none !important; }

@media (orientation: landscape) and (max-height: 500px) {
  .ad-wasza { max-width: 110px; bottom: 8px; right: 8px; }
  .ad-wasza-img { height: 36px; }
  .ad-shopee { max-width: 130px; bottom: 8px; left: 8px; }
  .ad-body { padding: 6px 8px; }
  .ad-leaderboard { max-width: 240px; top: 50px; }
  .ad-exabytes { max-width: min(420px, 92vw); bottom: 8px; }
}

/* ─── UTILITY ─── */
.hidden { display: none !important; }

/* ─── RESPONSIVE ─── */
@media (min-width: 768px) {
  .modal-card, .overlay-card { max-width: 420px; padding: 28px; }
  .app-page-card { max-width: 480px; }
  .pet-card-wide { max-width: 540px; }
}
@media (min-width: 1024px) {
  #gameCanvas { max-width: 100vw; max-height: 100vh; }
}

/* Landscape phone */
@media (orientation: landscape) and (max-height: 500px) {
  .modal-card, .overlay-card { max-height: 95vh; padding: 16px; }
  .app-page { padding: 8px; }
  .app-page-card { max-height: 95vh; overflow-y: auto; }
  .modal-banner { padding: 6px 8px; }
  .banner-content p { font-size: 11px; }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
