/* =========================================================
   Articles of Faith Quest - Storybook Stylesheet
   Pure CSS3, zero external dependencies, tablet/Chromebook friendly
   ========================================================= */

:root {
  --bg-cream: #fdf8ee;
  --bg-warm: #f6ecd9;
  --card-bg: #ffffff;
  --card-border: #e5dccb;
  --card-shadow: 0 6px 0 #dfd4be, 0 12px 24px rgba(66, 52, 32, 0.08);

  --text-main: #2d2a32;
  --text-muted: #6a635b;
  --text-light: #8f867b;

  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-edge: #1d4ed8;

  --green: #22c55e;
  --green-dark: #16a34a;
  --green-soft: #dcfce7;

  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: #fef3c7;

  --coral: #ef4444;
  --coral-dark: #dc2626;
  --coral-soft: #fee2e2;

  --teal: #0ea5e9;
  --teal-dark: #0284c7;
  --teal-soft: #e0f2fe;

  --purple: #8b5cf6;
  --purple-dark: #7c3aed;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-ui: "Nunito", "Fredoka", "Quicksand", "Segoe UI Rounded", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  color: var(--text-main);
  background: linear-gradient(180deg, #fdf8ee 0%, #f5ebd7 100%);
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* =========================================================
   Top HUD
   ========================================================= */
.top-hud {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid #e9dec9;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-emblem {
  font-size: 1.9rem;
  line-height: 1;
}

.app-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #273248;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-subtitle {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hud-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid #e6dccb;
  border-bottom-width: 4px;
  font-weight: 800;
  font-size: 0.95rem;
  min-height: 44px;
}

.stat-streak { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.stat-stars { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.stat-tokens { border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }

.stat-sub {
  font-size: 0.8rem;
  opacity: 0.85;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
}

/* =========================================================
   Buttons (Chunky Duolingo-style)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease, background-color 0.15s ease;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: translateY(3px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-chunky {
  border-bottom-width: 5px;
}

.btn-chunky:active:not(:disabled) {
  border-bottom-width: 2px;
  margin-top: 3px;
}

.btn-primary {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green-dark);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.04);
}

.btn-arcade {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  color: #ffffff;
  border-color: #0369a1;
}

.btn-soft {
  background: #ffffff;
  color: var(--text-main);
  border: 2px solid #dfd5c3;
  border-bottom-width: 4px;
}
.btn-soft:hover:not(:disabled) {
  background: #faf6ed;
}

.btn-small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.88rem;
  border-radius: 12px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  background: #ffffff;
  border: 2px solid #e2d8c5;
  border-bottom-width: 4px;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-main);
}
.btn-icon:active {
  transform: translateY(2px);
}

/* =========================================================
   Progress Bars
   ========================================================= */
.progress-track {
  width: 100%;
  height: 16px;
  background: #ece3d2;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid #dfd3bd;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================================================
   Main Quest Map View
   ========================================================= */
.view-section {
  flex: 1;
  width: 100%;
}

#view-map {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 20px 48px;
}

.hero-banner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.hero-info,
.arcade-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-bottom: 6px solid #ddd1bc;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.hero-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-weight: 800;
  font-size: 0.85rem;
}

.hero-count {
  font-weight: 800;
  font-size: 0.98rem;
  color: #334155;
}

.hero-track {
  height: 20px;
  margin-bottom: 12px;
}

.hero-tip {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.arcade-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 65%);
  border-color: #bae6fd;
  border-bottom-color: #7dd3fc;
}

.arcade-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.arcade-fish-icon {
  font-size: 2.3rem;
  line-height: 1;
}

.arcade-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0c4a6e;
}

.arcade-desc {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: #0369a1;
  font-weight: 600;
}

.token-cost {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.arcade-best {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0369a1;
  text-align: center;
}

/* Filters */
.map-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-chip {
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 2px solid #dfd5c3;
  border-bottom-width: 4px;
  background: #ffffff;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
}

.filter-chip.active {
  background: #273248;
  color: #ffffff;
  border-color: #161d2b;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.article-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-bottom: 6px solid #ddd1bc;
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  border-color: #cbbba0;
}

.article-card.is-mastered {
  border-color: #86efac;
  border-bottom-color: #4ade80;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.article-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.article-num-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.86rem;
}

.article-theme-title {
  margin: 8px 0 4px;
  font-size: 1.08rem;
  font-weight: 800;
  color: #1e293b;
}

.article-preview {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tier-dots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.tier-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: 10px;
  background: #f5efe3;
  border: 2px solid #e6dccb;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
}

.tier-dot.done {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.tier-dot-btn {
  cursor: pointer;
}

.card-cta {
  width: 100%;
}

/* =========================================================
   Lesson View & 13 Custom CSS Landscape Fallback Backgrounds
   ========================================================= */
#view-lesson {
  position: relative;
  min-height: calc(100vh - 76px);
  padding: 20px 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.lesson-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #93c5fd 0%, #fef3c7 100%);
  transition: background 0.4s ease;
}

.lesson-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lesson-bg-img.loaded {
  opacity: 1;
}

.lesson-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(255, 252, 245, 0.25);
  backdrop-filter: blur(1px);
}

.lesson-bg-scenery {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.scenery-sun {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 249, 219, 0.95) 0%, rgba(253, 224, 71, 0.45) 55%, transparent 75%);
}

.scenery-hill {
  position: absolute;
  left: -10%;
  right: -10%;
  border-radius: 50% 50% 0 0;
}

.scenery-hill-back {
  bottom: -14%;
  height: 44%;
  background: rgba(45, 90, 80, 0.18);
  transform: translateX(-8%);
}

.scenery-hill-mid {
  bottom: -18%;
  height: 36%;
  background: rgba(34, 84, 61, 0.24);
  transform: translateX(10%);
}

.scenery-hill-front {
  bottom: -22%;
  height: 28%;
  background: rgba(20, 65, 45, 0.28);
}

/* 13 Unique Storybook Landscape Gradients (No Deity depictions) */
.lesson-bg[data-article="1"] { background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 45%, #fef3c7 100%); }
.lesson-bg[data-article="2"] { background: linear-gradient(180deg, #fde68a 0%, #fed7aa 48%, #bbf7d0 100%); }
.lesson-bg[data-article="3"] { background: linear-gradient(180deg, #c7d2fe 0%, #fbcfe8 55%, #fde68a 100%); }
.lesson-bg[data-article="4"] { background: linear-gradient(180deg, #7dd3fc 0%, #a5f3fc 52%, #d9f99d 100%); }
.lesson-bg[data-article="5"] { background: linear-gradient(180deg, #a7f3d0 0%, #fef08a 55%, #fed7aa 100%); }
.lesson-bg[data-article="6"] { background: linear-gradient(180deg, #93c5fd 0%, #ddd6fe 52%, #fde68a 100%); }
.lesson-bg[data-article="7"] { background: linear-gradient(180deg, #1e3a8a 0%, #6366f1 50%, #f9a8d4 100%); }
.lesson-bg[data-article="8"] { background: linear-gradient(180deg, #fcd34d 0%, #fdba74 48%, #a7f3d0 100%); }
.lesson-bg[data-article="9"] { background: linear-gradient(180deg, #0f172a 0%, #312e81 48%, #38bdf8 100%); }
.lesson-bg[data-article="10"] { background: linear-gradient(180deg, #60a5fa 0%, #fde047 52%, #86efac 100%); }
.lesson-bg[data-article="11"] { background: linear-gradient(180deg, #6ee7b7 0%, #bae6fd 52%, #fef9c3 100%); }
.lesson-bg[data-article="12"] { background: linear-gradient(180deg, #94a3b8 0%, #bfdbfe 52%, #d9f99d 100%); }
.lesson-bg[data-article="13"] { background: linear-gradient(180deg, #fb7185 0%, #fdba74 46%, #fef08a 100%); }

.lesson-container {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lesson-topbar {
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid var(--card-border);
  border-bottom: 5px solid #ddd1bc;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tier-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tier-tab {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px solid #e6dccb;
  border-bottom-width: 4px;
  background: #faf6ed;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.tier-tab.active {
  background: var(--primary);
  border-color: var(--primary-edge);
  color: #ffffff;
}

.tier-tab.completed:not(.active) {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}

.lesson-card {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid var(--card-border);
  border-bottom: 6px solid #d9ccb4;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 36px rgba(30, 41, 59, 0.14);
}

.lesson-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.lesson-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-weight: 800;
  font-size: 0.88rem;
}

.tier-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-weight: 800;
  font-size: 0.88rem;
}

.lesson-instruction {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #334155;
}

.lesson-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Tier 1: Word Choice */
.scripture-prompt-box {
  background: #fffcf5;
  border: 2px solid #eadfcd;
  border-radius: 18px;
  padding: 20px;
  font-size: 1.25rem;
  line-height: 1.85;
  font-weight: 700;
  color: #1e293b;
}

.blank-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 42px;
  padding: 4px 14px;
  margin: 2px 4px;
  border-radius: 12px;
  border: 2px dashed #94a3b8;
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
  font-size: 1.08rem;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.15s ease;
}

.blank-slot.active-slot {
  border-color: var(--primary);
  border-style: solid;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.blank-slot.filled {
  border-style: solid;
  border-color: #38bdf8;
  border-bottom-width: 4px;
  background: #e0f2fe;
  color: #0369a1;
}

.blank-slot.correct {
  border-color: var(--green-dark);
  background: var(--green-soft);
  color: #15803d;
}

.blank-slot.wrong {
  border-color: var(--coral-dark);
  background: var(--coral-soft);
  color: #b91c1c;
}

.choice-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.word-chip {
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 2px solid #d6cbb8;
  border-bottom: 4px solid #c7b89e;
  background: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  color: #1e293b;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.word-chip:active:not(:disabled) {
  transform: translateY(2px);
}

.word-chip.used {
  opacity: 0.35;
  cursor: default;
}

/* Tier 2: Tile Order */
.tile-tray {
  min-height: 112px;
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}

.tile-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 0;
}

.phrase-tile {
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 2px solid #cbd5e1;
  border-bottom: 4px solid #94a3b8;
  background: #ffffff;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}

.phrase-tile.placed {
  background: #eff6ff;
  border-color: #93c5fd;
  border-bottom-color: #60a5fa;
  color: #1e3a8a;
}

.phrase-tile.tile-correct {
  background: var(--green-soft);
  border-color: #4ade80;
  color: #14532d;
}

.phrase-tile.tile-wrong {
  background: var(--coral-soft);
  border-color: #f87171;
  color: #7f1d1d;
}

/* Tier 3: Fill-in-the-Blank Typing */
.inline-blank-input {
  display: inline-block;
  min-width: 110px;
  width: 130px;
  min-height: 42px;
  padding: 4px 10px;
  margin: 2px 4px;
  border: 2px solid #cbd5e1;
  border-bottom-width: 4px;
  border-radius: 12px;
  background: #ffffff;
  font-size: 1.06rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  vertical-align: middle;
}

.inline-blank-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.inline-blank-input.correct {
  border-color: var(--green-dark);
  background: var(--green-soft);
  color: #15803d;
}

.inline-blank-input.wrong {
  border-color: var(--coral-dark);
  background: var(--coral-soft);
  color: #991b1b;
}

/* Tier 4: Full Recall */
.recall-peek-box {
  background: #f0f9ff;
  border: 2px solid #bae6fd;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #0c4a6e;
  word-break: break-word;
}

.recall-textarea {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border-radius: 16px;
  border: 2px solid #d6cbb8;
  border-bottom-width: 4px;
  background: #ffffff;
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 700;
  color: #1e293b;
  resize: vertical;
}

.recall-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.recall-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Feedback & Actions */
.lesson-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.45;
}

.lesson-feedback.success {
  background: var(--green-soft);
  color: #14532d;
  border: 2px solid #86efac;
}

.lesson-feedback.error {
  background: var(--coral-soft);
  color: #7f1d1d;
  border: 2px solid #fca5a5;
}

.lesson-feedback.info {
  background: var(--amber-soft);
  color: #78350f;
  border: 2px solid #fcd34d;
}

.lesson-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-actions .btn-primary {
  margin-left: auto;
}

/* =========================================================
   Stream Fish Mini-Game View
   ========================================================= */
#view-fishgame {
  padding: 18px 16px 32px;
  display: flex;
  justify-content: center;
}

.fish-shell {
  width: 100%;
  max-width: 940px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fish-hud {
  background: #ffffff;
  border: 2px solid #bae6fd;
  border-bottom: 5px solid #7dd3fc;
  border-radius: 18px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.fish-hud-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fish-hud-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0369a1;
}

.fish-hud-val {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
}

.fish-growth-wrap {
  min-width: 160px;
  flex: 1;
  max-width: 240px;
}

.fish-track {
  height: 14px;
}

.fish-canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid #38bdf8;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.22);
  background: #0284c7;
  touch-action: none;
}

#fish-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
}

.fish-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 74, 110, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fish-modal {
  background: #ffffff;
  border-radius: 22px;
  border: 3px solid #bae6fd;
  border-bottom: 6px solid #7dd3fc;
  padding: 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}

.fish-modal h2 {
  margin: 0 0 8px;
  color: #0c4a6e;
}

.fish-modal p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-weight: 600;
}

.fish-modal-stats {
  background: #f0f9ff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
  font-weight: 800;
  color: #0369a1;
  line-height: 1.6;
}

.fish-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.fish-controls-hint {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* =========================================================
   Modals & Confetti
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-card {
  background: #ffffff;
  border-radius: 22px;
  border: 2px solid var(--card-border);
  border-bottom: 6px solid #d6cbb8;
  max-width: 620px;
  width: 100%;
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.ref-scripture-text {
  background: #fffcf5;
  border: 2px solid #eadfcd;
  border-radius: 14px;
  padding: 16px;
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 18px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

/* =========================================================
   Responsive (Tablets & Narrow Screens)
   ========================================================= */
@media (max-width: 820px) {
  .hero-banner {
    grid-template-columns: 1fr;
  }
  .top-hud {
    padding: 10px 14px;
  }
  .app-subtitle {
    display: none;
  }
  .stat-label {
    display: none;
  }
}

@media (max-width: 560px) {
  .tier-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .lesson-card {
    padding: 18px 14px;
  }
  .scripture-prompt-box {
    font-size: 1.1rem;
    padding: 14px;
  }
}
