/* Flynn's AddVentures - base styles: theme variables (default / cream / dark), type scale, surface cards, kid buttons, angled colour bands, scrollbars.
   Extracted unchanged from the first <style> block of the original prototype (minus the Time Bank rules, now in timebank.css). */
    :root {
      --bg-page: #f4f6f9;
      --bg-surface: #ffffff;
      --bg-subtle: #eef2f6;
      --text-primary: #111827;
      --text-secondary: #4b5563;
      --border-color: #e5e7eb;
      --card-shadow: 0 10px 28px -6px rgba(17, 24, 39, 0.08), 0 4px 10px -3px rgba(17, 24, 39, 0.04);
      --radius-card: 20px;
      --radius-control: 12px;
      --radius-pill: 9999px;
    }

    body.theme-cream {
      --bg-page: #fdf6e3;
      --bg-surface: #fbf0d9;
      --bg-subtle: #f3e4c3;
      --text-primary: #1f2421;
      --text-secondary: #3f4742;
      --border-color: #decba4;
      --card-shadow: 0 10px 24px -6px rgba(84, 66, 30, 0.12);
    }

    body.theme-dark {
      --bg-page: #0f172a;
      --bg-surface: #1e293b;
      --bg-subtle: #334155;
      --text-primary: #f8fafc;
      --text-secondary: #cbd5e1;
      --border-color: #475569;
      --card-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.45);
    }

    body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      background-color: var(--bg-page);
      color: var(--text-primary);
      overflow-x: clip;
      transition: background-color 0.25s ease, color 0.25s ease;
    }

    /* Bold ClassDojo-inspired full-bleed angled & vibrant section backdrops */
    .dojo-section-cream {
      position: relative;
      background: linear-gradient(180deg, #fff8e7 0%, #fef3c7 100%);
      clip-path: polygon(0 2.5vw, 100% 0, 100% calc(100% - 2.5vw), 0 100%);
      padding-top: 4.5rem;
      padding-bottom: 4.5rem;
      margin-top: -1.5rem;
    }

    .dojo-bottom-vibrant {
      position: relative;
      background:
        radial-gradient(circle at 75% 25%, #60a5fa 0%, transparent 45%),
        radial-gradient(circle at 20% 75%, #ec4899 0%, transparent 50%),
        linear-gradient(135deg, #db2777 0%, #7c3aed 52%, #2563eb 100%);
      clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 100%);
      padding-top: 5rem;
      padding-bottom: 4.5rem;
      margin-top: 3rem;
    }

    .dojo-bottom-emerald {
      position: relative;
      background:
        radial-gradient(circle at 80% 25%, #34d399 0%, transparent 45%),
        radial-gradient(circle at 18% 75%, #38bdf8 0%, transparent 48%),
        linear-gradient(135deg, #059669 0%, #0d9488 50%, #0284c7 100%);
      clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 100%);
      padding-top: 5rem;
      padding-bottom: 4.5rem;
      margin-top: 3rem;
    }

    .dojo-bottom-blue {
      position: relative;
      background:
        radial-gradient(circle at 80% 25%, #93c5fd 0%, transparent 45%),
        radial-gradient(circle at 20% 75%, #1d4ed8 0%, transparent 50%),
        linear-gradient(135deg, #1d4ed8 0%, #2563eb 52%, #0284c7 100%);
      clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 100%);
      padding-top: 5rem;
      padding-bottom: 4.5rem;
      margin-top: 3rem;
    }

    .dojo-bottom-gold-sky {
      position: relative;
      background:
        radial-gradient(circle at 22% 28%, #fde047 0%, transparent 45%),
        radial-gradient(circle at 80% 72%, #38bdf8 0%, transparent 48%),
        linear-gradient(135deg, #eab308 0%, #0ea5e9 52%, #4f46e5 100%);
      clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 100%);
      padding-top: 5rem;
      padding-bottom: 4.5rem;
      margin-top: 3rem;
    }

    body.theme-dark .dojo-section-cream {
      background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
    }

    .font-display {
      font-family: 'Fredoka', sans-serif;
    }

    /* Consistent 6-step typographic scale across all views */
    .type-h1 {
      font-family: 'Fredoka', sans-serif;
      font-size: 2rem;
      line-height: 1.15;
      font-weight: 700;
    }

    .type-h2 {
      font-family: 'Fredoka', sans-serif;
      font-size: 1.5rem;
      line-height: 1.25;
      font-weight: 700;
    }

    .type-h3 {
      font-family: 'Fredoka', sans-serif;
      font-size: 1.1875rem;
      line-height: 1.3;
      font-weight: 700;
    }

    .type-ui {
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 0.9375rem;
      line-height: 1.35;
      font-weight: 700;
    }

    .type-body {
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 0.875rem;
      line-height: 1.5;
      font-weight: 500;
    }

    .type-meta {
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 0.75rem;
      line-height: 1.35;
      font-weight: 700;
    }

    .surface-card {
      background-color: var(--bg-surface);
      border: 1px solid var(--border-color);
      box-shadow: var(--card-shadow);
      border-radius: var(--radius-card);
      transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.25s ease;
    }

    .surface-card-hover:hover {
      transform: translateY(-4px);
      box-shadow: 0 18px 36px -8px rgba(17, 24, 39, 0.14);
    }

    .surface-subtle {
      background-color: var(--bg-subtle);
      border-color: var(--border-color);
    }

    /* Consistent corner radii: outer cards (20px), inner panels/buttons/inputs (12px), pills (9999px) */
    .surface-card .rounded-2xl,
    .surface-card .rounded-xl,
    .surface-card .rounded-lg,
    #timeBankOverlay .rounded-xl,
    #timeBankOverlay .rounded-lg {
      border-radius: var(--radius-control);
    }

    /* Tactile game-button feel for kid-friendly action controls */
    .kid-btn-emerald {
      box-shadow: 0 4px 0 #047857, 0 8px 14px -4px rgba(5, 150, 105, 0.35);
      transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
    }
    .kid-btn-emerald:hover {
      filter: brightness(1.04);
      transform: translateY(-1px);
    }
    .kid-btn-emerald:active {
      transform: translateY(2px);
      box-shadow: 0 1px 0 #047857;
    }

    .kid-btn-amber {
      box-shadow: 0 4px 0 #b45309, 0 8px 14px -4px rgba(217, 119, 6, 0.35);
      transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
    }
    .kid-btn-amber:hover {
      filter: brightness(1.04);
      transform: translateY(-1px);
    }
    .kid-btn-amber:active {
      transform: translateY(2px);
      box-shadow: 0 1px 0 #b45309;
    }

    .kid-btn-indigo {
      box-shadow: 0 4px 0 #2b3670, 0 8px 14px -4px rgba(60, 75, 148, 0.3);
      transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
    }
    .kid-btn-indigo:hover {
      filter: brightness(1.05);
      transform: translateY(-1px);
    }
    .kid-btn-indigo:active {
      transform: translateY(2px);
      box-shadow: 0 1px 0 #2b3670;
    }

    .emblem-title {
      font-family: 'Fredoka', sans-serif;
      letter-spacing: 0.02em;
      text-shadow:
        0 3px 0 #1e1b4b,
        0 6px 0 #0f172a,
        0 12px 24px rgba(0, 0, 0, 0.55);
    }

    .emblem-sub-badge {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
      box-shadow: 0 4px 0 #92400e, 0 8px 16px rgba(0, 0, 0, 0.35);
    }

    .card-hero-banner {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    .card-hero-text {
      min-width: 0;
      width: 100%;
      position: relative;
      z-index: 2;
    }

    .card-hero-visual {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      position: relative;
      z-index: 1;
    }


    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    ::-webkit-scrollbar-thumb {
      background: #94a3b8;
      border-radius: 9999px;
    }
