/* =======================================================
   CLASSROOM FUN TOOLS — MAIN STYLESHEET
   Purpose: Design tokens, layout, components (header, nav, hero, grid),
            modals, and auth UI. Keep selectors light and semantic.
   Tip: Most blocks are grouped under section headers for quick scanning.
======================================================= */
/* =======================================================
   FONT & THEME TOKENS
   (site-wide colors and font)
======================================================= */
@font-face {
  font-family: 'TT Norms Pro';
  src: url('../fonts/TTNormsPro-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TT Norms Pro';
  src: url('../fonts/TT Norms Pro Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --accent:#0ea5e9;
  --accent-strong:#0284c7;
  --border:#e2e8f0;
  --pill:#f1f5f9;
  /* Nav label colors (idle + hover) */
  --nav-text-grades:#fc3f7b;       /* green */
  --nav-text-worksheets:#2563eb;   /* blue */
  --nav-text-games:#7c3aed;        /* purple */
  --nav-text-make:#dc2626;         /* red */
  --nav-text-resources:#fd8700;    /* dark yellow */
  /* Subnav hover rectangles (rainbow) */
  /* Basic rainbow hues */
  --nav-hover-grades:#ffea00;      /* red */
  --nav-hover-worksheets:#ff8d3c;  /* orange */
  --nav-hover-games:#ffea00;       /* games crayon: bright yellow */
  --nav-hover-make:#22c55e;        /* green */
  --nav-hover-resources:#8bbffb;   /* purple */
  /* Permanent item */
  --nav-permanent-classroom:#f59e0b; /* gold (legacy) */
  --nav-classroom-base:#f97316;   /* orange base */
  --nav-classroom-hover:#fb923c;  /* lighter hover */
  
  /* Modal and overlay colors */
  --overlay: rgba(15,23,42,.52);
  --primary:#4c64d8;          /* CTA blue like the screenshot */
  --primary-pressed:#3f55bb;
  /* Focus and border colors */
  --focus-border:#c7d2fe;
  --focus-shadow: rgba(99,102,241,.15);
}

/* =======================================================
   BASE & LAYOUT
======================================================= */
*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:12px 16px;
}


/* =======================================================
   HEADER (sticky) + BRAND
======================================================= */
/* Sticky header so search/actions remain visible */
.topbar{
  position:sticky;
  top:0;
  background:#fff;
  border-bottom:0; /* avoid stacking with subnav top border */
  z-index:200;
  isolation:isolate;
}

.topbar-row{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-start; /* search grows; actions push right */
  
  /* NEW: override .container padding */
  height:95px;
  padding-top:8px;     /* keep top padding */
  padding-bottom:0;     /* remove bottom padding to kill the gap */
} 

.brand{
  display:flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color:var(--text);
}

/* Brand image size aligns with pill buttons */
.logo-img{
  width:120px; 
  height:120px;
  object-fit:contain;
  margin-top: 0px;
}

.brand-text{ display:none; } /* using image logo */

/* Noscript banner */
.noscript{
  background:#FEF3C7; /* amber-100 */
  color:#7C2D12;      /* amber-900 */
  border-bottom:1px solid #FDE68A;
  padding:10px 16px;
  text-align:center;
  font-weight:600;
}

/* =======================================================
   SEARCH (single authoritative block)
======================================================= */
/* Single authoritative search bar (JS handles clear button + redirect) */
.search{
  position:relative;
  flex:1;                  /* take remaining space between brand and actions */
  max-width:620px;         /* cap width on large screens */
  margin:0 10px;
  display:flex;
  align-items:center;
}

.search input{
  width:100%;
  padding:10px 36px;       /* room for left icon + right clear button */
  border:1px solid var(--border);
  border-radius:999px;
  outline:none;
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
  font-size:1.1rem;
}

/* Hide the browser's native clear (×) so we only show our custom one */
.search input[type="search"]::-webkit-search-cancel-button{ -webkit-appearance:none; appearance:none; display:none; }
.search input[type="search"]::-ms-clear{ display:none; width:0; height:0; }

.search input:focus{
  border-color:var(--muted);
  box-shadow:0 0 0 3px var(--border);
}

.search-icon{
  position:absolute;
  left:10px;
  width:22px; height:22px;
  color:var(--muted);
  pointer-events:none;
}

.search-clear{
  position:absolute;
  right:8px;
  border:0; background:transparent;
  cursor:pointer;
  font-size:16px; color:#64748b;
  display:none; /* JS will show when typing */
}

/* =======================================================
   ACTIONS (games/worksheet/auth links + user icon)
======================================================= */
/* Right-aligned actions cluster: game/worksheet pills + auth links + user */
.quick-actions{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:flex-end;
  margin-left:auto;   /* pushes this cluster to far right */
  position:relative;  /* anchor for the dropdown menu */
}

.quick-actions__pill{
  display:flex;
  align-items:center;
  justify-content:center;
}

body.signed-in .search{
  max-width:960px;
  margin-right:0;
}

body.signed-in .topbar-row{
  gap:16px;
}

body.signed-in .topbar-row > .quick-actions{
  gap:12px;
}

.btn{
  display:inline-block;
  background:transparent;
  color:var(--text);
  text-decoration:none;
  border:none;
  padding:0;
  border-radius:12px;
  font-weight:700;
  cursor:pointer;
  margin:0;
}

/* small nudge so Games isn’t glued to the search */
#gamesBtn{ margin-left:8px; }

.btn.outline{
  background:#fff;
  color:var(--accent-strong);
  border:1px solid var(--accent-strong);
}

/* big “pill” buttons that hold your logo images */
.btn.pill{
  border-radius:999px;
  min-width:95px; min-height:95px;
  display:flex; align-items:center; justify-content:center;
  padding:0; background:transparent; margin:0;
  transition: transform .18s ease, box-shadow .18s ease;
}

.btn.small{ padding:8px 10px; font-size:.9rem; border-radius:10px; }
.btn-logo{ width:120px; height:120px; flex-shrink:0; object-fit:contain; transition: transform .18s ease, filter .18s ease; }

/* Hover/focus lift for Games & Worksheet Generator pills in header */
.topbar-row .btn.pill:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.topbar-row .btn.pill:hover .btn-logo,
.topbar-row .btn.pill:focus-visible .btn-logo{
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 8px 14px rgba(2,8,23,.22)) saturate(1.06);
}

.icon-btn{
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}

/* Hamburger visible only on small screens */
.mobile-only{ display:none; }

/* =======================================================
   SUBNAV (blue bar below header)
======================================================= */
/* Secondary nav bar: white fill with blue top/bottom borders */
.subnav{
  background:#fff;               /* white fill */
  border-top:0px;                /* no top border */
  border-bottom:1px solid #e0e0e0; /* subtle divider under subnav */
  margin-top:0px;               /* keep tight to logo edge */
  padding:0;                     /* keep items flush inside */
  --subnav-h: 48px;              /* consistent bar height (inside borders) */
}
/* Remove vertical padding from the container inside subnav so there is no extra gap */
.subnav .container{ padding-top:0; padding-bottom:0; height:var(--subnav-h); }
.nav-row{ display:flex; align-items:center; justify-content:flex-start; width:100%; gap:0; height:var(--subnav-h); }

/* Base link style */
.nav-link{
  /* Unify typography across anchors and buttons */
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
  font-size:1.05rem; line-height:1.2; font-weight:400;
  color:var(--text); text-decoration:none;
  padding:0 14px; border-radius:0; transition:all .18s ease;
  white-space:nowrap; display:inline-flex; align-items:center; justify-content:center; text-align:center;
  appearance:none; -webkit-appearance:none; background:transparent; border:0; cursor:pointer;
  height:var(--subnav-h);              /* enforce exact bar height for all triggers */
  position:relative; isolation:isolate; z-index:0; /* ensure pseudo-layer sits behind text */
}
/* Keyboard focus ring for clear tab navigation */
.nav-link:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

/* No outline for idle nav labels */
.nav-link:not(.classroom){ text-shadow:none; }

/* Removed crayon mask layer for performance */
.nav-link::after{
  content:""; position:absolute; inset:0; border-radius:0; pointer-events:none; z-index:-2;
  background-color: transparent; transition: background-color .18s ease;
}

/* Distribute ALL top-level items evenly (including My Classroom)
   Use fixed fractional widths so each column is identical. */
.nav-row > .nav-link,
.nav-row > .nav-item{ 
  flex:0 0 calc(100%/6);
  max-width:calc(100%/6);
  min-width:0;
}
.nav-item > .nav-link{ width:100%; }

/* Idle label colors per item */
.pill-hover--grades{ color:var(--nav-text-grades); }
.pill-hover--worksheets{ color:var(--nav-text-worksheets); }
.pill-hover--games{ color:var(--nav-text-games); }
.pill-hover--make{ color:var(--nav-text-make); }
.pill-hover--resources{ color:var(--nav-text-resources); }

/* Hover/focus rectangle variants (full-height, square corners) */
/* Hover/focus + open state: use a crayon mask over the background color */
.pill-hover--grades:hover,
.pill-hover--grades:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--grades,
.nav-item:focus-within > .pill-hover--grades,
.nav-item.open > .nav-link.pill-hover--grades{
  color:var(--nav-text-grades);
}
.pill-hover--grades:hover::after,
.pill-hover--grades:focus-visible::after,
.nav-item.has-dropdown:hover > .pill-hover--grades::after,
.nav-item:focus-within > .pill-hover--grades::after,
.nav-item.open > .nav-link.pill-hover--grades::after{ background-color:var(--nav-hover-grades); }
/* matching solid fill underlay */
.pill-hover--worksheets:hover,
.pill-hover--worksheets:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--worksheets,
.nav-item:focus-within > .pill-hover--worksheets,
.nav-item.open > .nav-link.pill-hover--worksheets{ color:var(--nav-text-worksheets); }
.pill-hover--worksheets:hover::after,
.pill-hover--worksheets:focus-visible::after,
.nav-item.has-dropdown:hover > .pill-hover--worksheets::after,
.nav-item:focus-within > .pill-hover--worksheets::after,
.nav-item.open > .nav-link.pill-hover--worksheets::after{ background-color:var(--nav-hover-worksheets); }
/* matching solid fill underlay */
.pill-hover--games:hover,
.pill-hover--games:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--games,
.nav-item:focus-within > .pill-hover--games,
.nav-item.open > .nav-link.pill-hover--games{ color:#7c3aed; }
.pill-hover--games:hover::after,
.pill-hover--games:focus-visible::after,
.nav-item.has-dropdown:hover > .pill-hover--games::after,
.nav-item:focus-within > .pill-hover--games::after,
.nav-item.open > .nav-link.pill-hover--games::after{ background-color:var(--nav-hover-games); }
/* matching solid fill underlay */
.pill-hover--make:hover,
.pill-hover--make:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--make,
.nav-item:focus-within > .pill-hover--make,
.nav-item.open > .nav-link.pill-hover--make{ color:var(--nav-text-make); }
.pill-hover--make:hover::after,
.pill-hover--make:focus-visible::after,
.nav-item.has-dropdown:hover > .pill-hover--make::after,
.nav-item:focus-within > .pill-hover--make::after,
.nav-item.open > .nav-link.pill-hover--make::after{ background-color:var(--nav-hover-make); }
/* matching solid fill underlay */
.pill-hover--resources:hover,
.pill-hover--resources:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--resources,
.nav-item:focus-within > .pill-hover--resources,
.nav-item.open > .nav-link.pill-hover--resources{ color:var(--nav-text-resources); }

/* No outline on hover states either */
.pill-hover--grades:hover, .pill-hover--grades:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--grades,
.nav-item:focus-within > .pill-hover--grades,
.nav-item.open > .nav-link.pill-hover--grades,
.pill-hover--worksheets:hover, .pill-hover--worksheets:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--worksheets,
.nav-item:focus-within > .pill-hover--worksheets,
.nav-item.open > .nav-link.pill-hover--worksheets,
.pill-hover--make:hover, .pill-hover--make:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--make,
.nav-item:focus-within > .pill-hover--make,
.nav-item.open > .nav-link.pill-hover--make,
.pill-hover--resources:hover, .pill-hover--resources:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--resources,
.nav-item:focus-within > .pill-hover--resources,
.nav-item.open > .nav-link.pill-hover--resources{ text-shadow:none; }
/* Games: no outline on hover; keep purple, no bold */
.pill-hover--games:hover, .pill-hover--games:focus-visible,
.nav-item.has-dropdown:hover > .pill-hover--games,
.nav-item:focus-within > .pill-hover--games,
.nav-item.open > .nav-link.pill-hover--games{
  text-shadow:none;
  font-weight:400;
}
.pill-hover--resources:hover::after,
.pill-hover--resources:focus-visible::after,
.nav-item.has-dropdown:hover > .pill-hover--resources::after,
.nav-item:focus-within > .pill-hover--resources::after,
.nav-item.open > .nav-link.pill-hover--resources::after{ background-color:var(--nav-hover-resources); }
/* matching solid fill underlay */

/* Use ::after as the simple solid hover background */

/* Games: keep white underlay so yellow crayon stands out */

/* Nav item wrapper for dropdowns */
.nav-item{ position:relative; }
.nav-item > .nav-link{ background:transparent; border:none; cursor:pointer; }
.nav-item.has-dropdown .dropdown-menu{
  position:absolute; top:100%; left:50%; transform:translateX(-50%);
  background:#fff; color:var(--text);
  border:1px solid var(--border); border-radius:10px; min-width:200px; box-shadow:0 8px 20px rgba(2,8,23,.15);
  padding:8px; display:none; z-index:30;
}
.nav-item.has-dropdown:focus-within .dropdown-menu{ display:block; }
.nav-item.has-dropdown:hover .dropdown-menu{ display:block; }
.nav-item.open .dropdown-menu{ display:block; }
.dropdown-item{ display:block; text-decoration:none; color:var(--text); padding:8px 10px; border-radius:8px; font-family:'TT Norms Pro', Helvetica, Arial, sans-serif; font-size:1rem; }
.dropdown-item:hover, .dropdown-item:focus-visible{ background:var(--pill); }

/* My Classroom: solid orange, white text; no crayon mask */
.nav-link.classroom{
  background:var(--nav-classroom-base); color:#fff; font-weight:400;
  padding:0 16px; border-radius:0; height:var(--subnav-h);
}
.nav-link.classroom:hover,
.nav-link.classroom:focus-visible{
  background:var(--nav-classroom-hover); color:#fff;
}
.nav-link.classroom::before{ content:none; }
/* keep “My Classroom” unchanged (no pseudo layers) */
.nav-link.classroom::after{ content:none; }

/* =======================================================
   HERO (image + overlay text)
======================================================= */
/* Hero section: positioned text overlay + full-width image */
.hero-image{
  width:100%;
  margin:0;
  padding:56px 0;
  min-height:450px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,#66d4ff 0%,#8fe1ff 70%,#a8f4ff 100%);
}

.hero-content{
  position:relative;
  top:auto;
  left:auto;
  transform:none;
  max-width:680px;
  margin:0 auto;
  text-align:center;
  z-index:1;
}

.hero-text h1{
  color:#0f172a;   /* dark text instead of white */
  font-size:2.5rem;
  margin:0 0 20px 0;
  text-shadow:none;
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
  font-weight:400;
}

.hero-text p{
  color:#0f172a;
  font-size:1.2rem;
  margin:0 0 30px 0;
  line-height:1.6;
  text-shadow:none;
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
  font-weight:400;
}

.hero-btn{
  display:inline-block;
  background:var(--accent);
  color:#ffffff;
  text-decoration:none;
  padding:15px 30px;
  border-radius:8px;
  font-weight:400;
  font-size:1.1rem;
  transition:all .3s ease;
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
}
.hero-btn:hover{
  background:var(--accent-strong);
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(0,0,0,0.3);
}

/* Keep hero image cover-cropped for consistent height */
.hero-img{
  width:100%;
  height:450px;
  object-fit:cover;
  display:none;
}


/* =======================================================
   GRID + CARDS
======================================================= */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
  padding:8px 0 24px;
}
.card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:14px;
  background:#fff;
}
.card h3{ margin:0 0 6px; }
.card p{ margin:0 0 10px; color:var(--muted); }

/* =======================================================
   FOOTER
======================================================= */
.site-footer{
  border-top:1px solid var(--border);
  padding:16px 0;
  color:var(--muted);
  font-size:.95rem;
}

/* =======================================================
   GAMES GRID (games.html)
======================================================= */
.section-games{ padding:24px 0 48px; background:#fff; }
.games-heading{
  max-width:1200px;
  margin:0 auto 24px;
}
.games-eyebrow{
  margin:0 0 8px;
  color:#0b6bcb;
  font-size:.85rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.games-heading h1{
  margin:0;
  color:#0f172a;
  font-size:clamp(2rem,4vw,3rem);
  line-height:1.05;
}
.games-grid{
  display:grid;
  gap:24px;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  justify-items:center;
  max-width:1200px;
  margin:0 auto;
}
.game-tile{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  max-width:440px;
  padding:12px;
  background:#fff;
  border-radius:28px;
  text-decoration:none;
  color:inherit;
  box-shadow:0 6px 16px rgba(2,8,23,.12);
  border:1px solid #e2e8f0;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-tile:hover{ transform:translateY(-3px); box-shadow:0 16px 28px rgba(2,8,23,.2); border-color:#cbd5e1; }
.game-tile:focus-visible{ outline:3px solid var(--accent); outline-offset:3px; }
.game-thumb{
  width:100%;
  max-width:420px;
  aspect-ratio:1/1;
  border-radius:22px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f1f5f9;
  color:#94a3b8;
  font-size:1rem;
  font-weight:600;
  text-align:center;
}
.game-thumb.has-image{ background:#000; }
.game-thumb.has-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
@media (max-width:720px){
  .section-games{ padding:16px 0 32px; }
}
.game-tile.coming-soon {
  position:relative;
  cursor:default;
}
.game-tile.coming-soon:hover {
  transform:none;
  box-shadow:0 4px 10px rgba(2,8,23,.08);
  border-color:#e2e8f0;
}
.soon-pill {
  position:absolute;
  bottom:24px;
  left:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  background:rgba(237,233,254,0.95);
  color:#5b21b6;
  box-shadow:0 6px 16px rgba(76,29,149,.25);
}

/* =======================================================
   MODAL (Coming Soon)
======================================================= */
/* Native <dialog> (Coming Soon) theme */
#soonModal{
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
  max-width:420px;
}
#soonModal form{ display:grid; gap:10px; }
#soonModal input{
  padding:10px;
  border:1px solid var(--border);
  border-radius:10px;
}
.row{ display:flex; gap:8px; }

/* =======================================================
   RESPONSIVE (phones)
======================================================= */
@media (max-width:720px){
  /* Disable sticky header on mobile - let it scroll away */
  .topbar{
    position: static;
    box-shadow: none;
  }
  
  /* Menu open state - lock scroll and show overlay */
  body.menu-open {
    overflow: hidden;
  }
  
  /* Mobile menu is hidden by default, only show on mobile when toggled */
  .mobile-menu {
    display: none;
  }
  
  /* Show mobile menu when not hidden on mobile only */
  .mobile-menu:not([hidden]) {
    display: flex;
  }
  
  .topbar-row{ 
    flex-wrap: nowrap; 
    gap: 8px; 
    height: auto; 
    padding-bottom: 8px; 
    align-items: center;
    justify-content: space-between;
  }
  .logo-img { width: 60px; height: 60px; }
  
  .brand { 
    order: 1; 
    flex: 0 0 auto; 
    min-width: 0;
  }
  .search { 
    order: 2; 
    flex: 1 1 auto; 
    min-width: 0; 
    max-width: none;
    margin: 0 8px;
  }
  .search input { 
    padding: 8px 32px; 
    font-size: 0.9rem; 
    min-width: 0;
    width: 100%;
  }
  .quick-actions { 
    order: 3; 
    flex: 0 0 auto; 
    gap: 8px; 
    display: flex;
    align-items: center;
  }
  #mobileMenuBtn { 
    border: 0; 
    background: transparent; 
    padding: 8px; 
    width: 40px; 
    height: 40px; 
    font-size: 20px; 
    line-height: 1; 
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .quick-actions .pill { display: none; } /* hide the big logo pills */
  .topbar-row .btn.pill { display: none; } /* hide Games/Generator pills in header */
  .auth-link { 
    padding: 8px 12px; 
    height: 40px;
    display: flex;
    align-items: center;
    white-space: nowrap;
  }
  /* Show signup button, hide login button on mobile by default */
  #loginLink { display: none !important; }
  #signupLink { display: flex !important; }
  
  /* Override when mobile menu is open */
  .mobile-menu-open #loginLink { display: flex !important; }
  .user-icon { width: 32px; height: 32px; display: none; } /* hide avatar on mobile */
  .mobile-only { display: flex; }
  .subnav .container { height: auto; }
  /* Hide desktop subnav entirely on mobile; use mobile panel instead */
  .subnav { display: none; }
}

/* Mobile menu panel - full screen overlay */
.mobile-menu{ 
  background:#fff; 
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  overflow-y: auto;
  display: none; /* Hidden by default */
  flex-direction: column;
}

/* Phone header: compact, expanded search, and full-screen navigation states. */
@media (max-width: 720px) {
  .topbar .topbar-row { width: 100%; box-sizing: border-box; min-height: 76px; padding-top: 8px; padding-bottom: 8px; }
  .topbar .search { margin: 0; }
  .topbar .search input { min-height: 44px; font-size: 16px; padding-left: 34px; padding-right: 36px; }
  .topbar .search-clear { min-width: 32px; min-height: 32px; }
  .topbar .header-account { flex-shrink: 0; }
  .topbar .header-auth-login { display: none; }
  .topbar #mobileMenuBtn { width: 44px; height: 44px; font-size: 28px; flex-shrink: 0; }
  body.search-open .topbar .quick-actions { display: none; }
  body.search-open .topbar .search { flex: 1 1 0; }
  body.menu-open .topbar {
    position: fixed; inset: 0; z-index: 1000; height: 100dvh;
    display: flex; flex-direction: column; background: #fff;
  }
  body.menu-open .topbar .topbar-row { flex: 0 0 auto; border-bottom: 1px solid var(--border); }
  body.menu-open .topbar .search { display: none; }
  body.menu-open .topbar .quick-actions { margin-left: auto; }
  body.menu-open .topbar .header-auth-login { display: inline-flex; }
  .topbar .mobile-menu:not([hidden]) {
    position: static; inset: auto; flex: 1 1 auto; min-height: 0;
    width: 100%; overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .topbar .mobile-menu ul { list-style: none; margin: 0; padding: 0; width: 100%; }
  .topbar .mobile-menu > ul > li { border-bottom: 1px solid var(--border); }
  .topbar .mobile-menu .mobile-link,
  .topbar .mobile-menu .mobile-sub {
    width: 100%; min-height: 64px; padding: 18px 24px;
    display: flex; align-items: center; justify-content: space-between;
    border: 0; border-radius: 0; background: #fff; color: var(--text);
    text-align: left; text-decoration: none; font: 500 20px 'TT Norms Pro', sans-serif;
    cursor: pointer;
  }
  .topbar .mobile-menu .mobile-sub::after { content: '›'; font-size: 28px; }
  .topbar .mobile-menu .mobile-sub[aria-expanded="true"]::after { transform: rotate(90deg); }
  .topbar .mobile-menu .mobile-submenu:not([hidden]) { display: block; background: #f8fafc; }
  .topbar .mobile-menu .mobile-submenu .mobile-link { min-height: 48px; padding-left: 40px; font-size: 17px; background: #f8fafc; }
  .topbar .mobile-menu .mobile-link:focus-visible,
  .topbar .mobile-menu .mobile-sub:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
  .topbar .mobile-menu .mobile-link.classroom { color: #fff; background: var(--nav-classroom-base); }
}

/* Hide mobile menu on desktop/tablet */
@media (min-width: 721px) {
  .mobile-menu {
    display: none !important;
  }
}

/* Mobile menu header - sticky top row */
.mobile-menu-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 10;
  flex-shrink: 0;
}

.mobile-menu-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 8px;
}

.mobile-menu-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.mobile-menu-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.mobile-menu-auth {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 8px;
}

.mobile-menu-auth-link {
  display: inline-block;
  padding: 6px 10px;
  font-weight: 400;
  text-decoration: none;
  color: var(--text);
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.mobile-menu-auth-link.strong {
  color: var(--accent-strong);
  border: 1px solid var(--accent-strong);
}

.mobile-menu-auth-link:hover {
  background: var(--pill);
}

.mobile-menu-close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu-close:hover {
  background: var(--pill);
}

.mobile-menu-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Mobile menu content - scrollable area */
.mobile-menu-content {
  flex: 1;
  overflow-y: auto;
}

.mobile-menu-content .container {
  padding: 16px;
}

.mobile-menu-list{ 
  list-style:none; 
  padding:0; 
  margin:0; 
  display:grid; 
  gap:8px; 
}
.mobile-menu .mobile-link{ 
  display:block; 
  padding:12px 16px; 
  border-radius:12px; 
  text-decoration:none; 
  color:var(--text); 
  border:1px solid var(--border); 
  font-size: 1rem;
  font-weight: 500;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.mobile-menu .mobile-link:hover{ 
  background:var(--pill); 
}
/* Mobile CTA: make My Classroom look like the orange CTA */
.mobile-menu .mobile-link.classroom{
  background: var(--nav-classroom-base);
  color: #fff;
  border-color: var(--nav-classroom-base);
}
.mobile-menu .mobile-link.classroom:hover,
.mobile-menu .mobile-link.classroom:focus-visible{
  background: var(--nav-classroom-hover);
  color: #fff;
  border-color: var(--nav-classroom-hover);
  outline: 2px solid transparent; /* rely on color change */
}
.mobile-sublist{ 
  list-style:none; 
  padding-left:0; 
  margin:8px 0 0; 
  display:grid; 
  gap:6px; 
}
.accordion-trigger{ 
  width:100%; 
  text-align:left; 
  padding:12px 16px; 
  border-radius:12px; 
  border:1px solid var(--border); 
  background:#fff; 
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif; 
  font-weight:500; 
  font-size:1rem; 
  cursor:pointer; 
  min-height: 48px;
  display: flex;
  align-items: center;
}
.accordion-panel{ 
  padding-left:0; 
}

/* =======================================================
  CLASSROOM ISLAND (My Classroom)
======================================================= */
.section-classroom {
  position: relative;
  color: var(--text);
  /* Start with hero sky blue, then fade into lush green */
  background: linear-gradient(
    180deg,
    #a8f4ff 0%,   /* same tone as bottom of hero */
    #b9efc3 55%,  /* light green meadow */
    #06961e 100%  /* deeper jungle green */
  );
}

/* Leafy divider PNG */
.section-classroom .divider-canopy{
  position:absolute;
  top:0px;               /* tuck slightly into the sky */
  left:0;
  width:100%;
  height:280px;           /* more presence */
  object-fit:cover;
  pointer-events:none;
  z-index:1;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)); /* subtle depth */
}

.classroom-wrap{
  position:relative; z-index:2; /* ensures content is above divider */
  display:flex; align-items:center; gap:48px;
  justify-content:space-between; 
  padding:96px 0 40px; 
  min-height:360px;
}
.classroom-art{ 
  flex:1 1 0; 
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.classroom-art img{ 
  width:100%; 
  height:100%; 
  object-fit:cover; 
  aspect-ratio:16/10; 
  display:block;
  border-radius: 12px;
}
.classroom-text{ 
  flex:1 1 0; 
  padding-top:50px;
  max-width:560px;
  margin-left:auto; 
}
.classroom-text h2{ 
  margin:0 0 12px; 
  font-size:clamp(22px,3.2vw,36px); 
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
  font-weight:400;
}
.feature-list{ list-style:none; padding:0; margin:0 0 18px; display:grid; gap:8px; font-size:1.05rem; }
.feature-list li{ display:flex; align-items:center; gap:10px; }
.feature-list li span{ font-size:1.2rem; }

/* Treasure-chest button */
.btn-chest{
  display:inline-block; 
  font-weight:400; 
  text-decoration:none;
  background: linear-gradient(180deg, #f59e0b, #d97706);
  color:#2b1b00; 
  border:1px solid rgba(0,0,0,.12);
  padding:14px 22px; 
  border-radius:14px; 
  box-shadow:0 6px 14px rgba(0,0,0,.15);
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
}
.btn-chest:hover{ background: linear-gradient(180deg, #fbbf24, #b45309); transform:translateY(-1px); box-shadow:0 10px 18px rgba(0,0,0,.18); }
.btn-chest:focus-visible{ outline:3px solid #7c3aed; outline-offset:3px; }

@media (max-width:720px){
  .classroom-wrap{ 
    flex-direction:column; 
    padding:32px 0; 
    gap:24px; 
    text-align:center; 
  }
  .classroom-art{ 
    min-height: 250px;
    order: 1;
  }
  .classroom-text{ 
    align-items:center; 
    margin-left:0;        /* reset the right-push */
    order: 2;
    padding-top: 16px;   /* reduce top padding on mobile */
  }
  /* Make canopy divider a bit shorter on small screens */
  .section-classroom .divider-canopy{ height:200px; }
  
  /* Fix feature list alignment on mobile */
  .feature-list {
    gap: 12px; /* More consistent spacing */
    font-size: 1rem; /* Slightly smaller for mobile */
    margin-left: 20px; /* Add left margin for better spacing from edge */
    margin-right: 20px; /* Add right margin for balance */
  }
  
  .feature-list li {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align to left edge */
    gap: 12px; /* Consistent gap between icon and text */
    min-height: 32px; /* Ensure consistent height */
    padding: 4px 0; /* Add vertical padding for better alignment */
  }
  
  .feature-list li span {
    font-size: 1.1rem; /* Slightly smaller icon size */
    line-height: 1; /* Prevent icon from affecting line height */
    flex-shrink: 0; /* Prevent icon from shrinking */
    width: 20px; /* Fixed width for consistent alignment */
    text-align: center; /* Center icon within its space */
  }
  
  .feature-list li:not(:last-child) {
    margin-bottom: 0; /* Remove any extra margin */
  }
}

@media (max-width:600px){
  .classroom-wrap{ gap:24px; }
  
  /* Further refine feature list for very small screens */
  .feature-list {
    gap: 10px;
    font-size: 0.95rem;
    margin-left: 16px; /* Slightly less margin on very small screens */
    margin-right: 16px;
  }
  
  .feature-list li {
    min-height: 28px;
    gap: 10px;
  }
  
  .feature-list li span {
    font-size: 1rem;
    width: 18px;
  }
}

/* Extra narrow screens - prioritize keeping header on one line */
@media (max-width:360px){
  .topbar-row{ 
    gap: 4px; 
    padding: 4px 0;
  }
  .logo-img { width: 50px; height: 50px; }
  
  .search { 
    margin: 0 4px;
  }
  .search input { 
    padding: 6px 24px; 
    font-size: 0.85rem; 
  }
  .quick-actions { 
    gap: 4px; 
  }
  .auth-link { 
    padding: 6px 8px; 
    font-size: 0.9rem;
  }
  #mobileMenuBtn { 
    padding: 6px; 
    width: 36px; 
    height: 36px; 
    font-size: 18px; 
  }
}

/* =======================================================
  SITE MAP (Destinations)
======================================================= */
.section-map {
  position: relative;  /* needed so the fence can sit on top */
  padding: 20px 0 56px; /* added more bottom padding */
  background: linear-gradient(
    180deg,
    #06961e 0%,
    #ffe08a 45%,
    #dc8726 100%
  );
}

.map-wrap h2{ 
  margin:0 0 16px; 
  font-size:clamp(22px,3vw,34px); 
  text-align:center; 
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
  font-weight:400;
  color: white;
}
.map-grid{
  display:grid; gap:24px;
  grid-template-columns:1fr;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width:720px){
  .map-grid{ 
    grid-template-columns:repeat(3,1fr); 
    gap:20px;
  }
}

/* Mobile spacing adjustments for site map section */
@media (max-width:768px){
  .section-map {
    padding: 12px 0 32px; /* Reduced top and bottom padding */
  }
  
  .map-wrap h2 {
    margin: 0 0 12px; /* Reduced bottom margin */
  }
  
  /* Fix image scaling on mobile to prevent text cutoff */
  .map-card img {
    width: 100%;
    height: auto; /* Allow natural height */
    aspect-ratio: unset; /* Remove fixed aspect ratio */
    object-fit: contain; /* Show full image without cropping */
  }
}
.map-card{
  display:block; 
  background:#f8fafc; 
  border-radius:16px; 
  padding:16px; 
  text-decoration:none;
  color:var(--text); 
  box-shadow:0 4px 10px rgba(2,8,23,.08); 
  border:1px solid #e2e8f0;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.map-card:hover{ 
  transform:translateY(-2px); 
  box-shadow:0 8px 18px rgba(2,8,23,.12); 
  border-color:#cbd5e1; 
}
.map-card:focus-visible{ 
  outline:3px solid var(--accent); 
  outline-offset:3px; 
}
.map-card img{ 
  width:100%; 
  aspect-ratio:4/3; 
  object-fit:cover; 
  border-radius:12px; 
  display:block; 
  background:#e2e8f0; 
  height: 280px;
}
.map-card span{ 
  display:none; 
  margin-top:10px; 
  font-weight:400; 
  font-size:1.05rem; 
  font-family:'TT Norms Pro', Helvetica, Arial, sans-serif;
}

/* =======================================================
   SCROLL REVEAL (tiny utility)
   Usage: .reveal[data-reveal="up|left|right|zoom"] + .is-visible
======================================================= */
.reveal{ opacity:1; transform:none; }
/* Motion is decorative: content stays visible if scripts or observers fail. */
.reveal.is-visible{ animation:content-reveal .6s ease; }
@keyframes content-reveal{ from{ transform:translateY(12px); } to{ transform:none; } }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1 !important; transform:none !important; animation:none !important; }
}

/* =======================================================
   FOOTER LINKS
======================================================= */
.footer-links{
  background:#0f172a; color:#fff; font-size:.95rem; padding:32px 0;
}
.footer-grid{
  display:grid; gap:18px; grid-template-columns:repeat(2,1fr); align-items:start;
}
.footer-col h3{ margin:0 0 10px; font-size:1.05rem; color:#e2e8f0; }
.footer-col ul{ list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.footer-col a{ color:#cbd5e1; text-decoration:none; }
.footer-col a:hover{ color:#fff; text-decoration:underline; }
.footer-col a:focus-visible{ outline:2px solid #93c5fd; outline-offset:2px; border-radius:6px; }
@media (min-width:720px){ .footer-grid{ grid-template-columns:repeat(4,1fr); } }

/* =======================================================
   CAMPFIRE FOOTER (Social + Copyright)
======================================================= */
.campfire-footer{
  background: linear-gradient(180deg, #0b3561, #0a2a4d);
  color:#fff; padding:20px 0 28px;
}
.campfire-footer .container{ display:flex; flex-direction:column; align-items:center; gap:12px; }
.social-icons{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px 12px; }
.social-icons .icon{
  display:inline-flex; align-items:center; justify-content:center;
  text-decoration:none; border:0; background:transparent; padding:4px;
  transition: transform .18s ease, filter .18s ease;
}
.social-icons .icon img{ width:24px; height:24px; object-fit:contain; display:block; transition: transform .18s ease, filter .18s ease; }
.social-icons .icon[aria-label="YouTube"] img,
.social-icons .icon[aria-label="TikTok"] img{ width:30px; height:30px; }
.social-icons .icon:hover img{ transform: translateY(-2px) scale(1.04); filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.social-icons .icon:focus-visible{ outline:3px solid #93c5fd; outline-offset:3px; }
.copyright{ font-size:.95rem; color:#e2e8f0; text-align:center; }

/* =======================================================
   AUTH MODALS (Log In / Create Account)
   (Works with the new HTML I gave you)
======================================================= */

/* Backdrop */
.modal-backdrop{
  position:fixed; inset:0;
  background:var(--overlay);
  backdrop-filter:saturate(120%) blur(2px);
  opacity:0; 
  transition:opacity .2s ease;
  z-index:1000;
  pointer-events: none;
}
.modal-backdrop:not([hidden]){ 
  opacity:1; 
  display: block;
  pointer-events: auto;
}

/* Ensure backdrop is visible on mobile */
@media (max-width: 720px) {
  .modal-backdrop:not([hidden]) {
    opacity: 1;
    display: block;
  }
}

/* Modal open state - prevent scrolling */
body.modal-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Modal container (centers the card) */
/* Modal overlay container (centers card) */
.modal{
  position:fixed; inset:0; display:grid; place-items:center;
  padding:2rem; z-index:1001;
}
.modal[hidden]{ display:none; }

/* Mobile modal centering - ensure proper centering on all mobile sizes */
@media (max-width: 720px) {
  .modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    /* Ensure modal stays centered even when keyboard opens */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001; /* Ensure modal is above backdrop */
  }
  
  .modal form.modal-form {
    width: min(90vw, 400px);
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    margin: auto;
    /* Ensure form doesn't get cut off */
    position: relative;
    transform: none;
  }
  
  /* Adjust modal title size for mobile */
  .modal .modal-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  /* Ensure form fields are properly sized on mobile */
  .modal-form .field {
    margin: 0.5rem 0;
  }
  
  .modal-form input {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }
  
  /* Make buttons more touch-friendly */
  .modal-form .btn {
    padding: 0.8rem 1rem;
    min-height: 44px;
  }
}

/* The card */
.modal .modal-title{
  margin:0 0 1rem 0;
  font-size:2rem; font-weight:800; letter-spacing:.2px;
  width:100%; text-align:center;
}
/* Card wrapper for modal content (title, fields, actions) */
.modal form.modal-form{
  width:min(620px,92vw);
  background:#fff;
  border:1px solid var(--border);
  border-radius:20px;
  padding:28px 28px 24px;
  box-shadow:0 10px 30px rgba(2,8,23,.15);
  position:relative;
}

/* Close (×) */
.modal-close{
  position:absolute; top:18px; right:22px;
  border:none; background:transparent;
  font-size:28px; line-height:1; cursor:pointer; color:#94a3b8;
}
.modal-close:focus{ outline:2px solid var(--accent); border-radius:8px; }

/* Fields */
.modal-form .field{ display:flex; flex-direction:column; gap:.4rem; margin:.7rem 0; }
.field-label{ font-size:.95rem; color:var(--text); font-weight:600; }
.modal-form input{
  width:100%;
  padding:.9rem 1rem;
  border:1px solid var(--border);
  border-radius:12px;
  font-size:1rem; outline:none; background:#fff;
}
.modal-form input:focus{
  border-color:var(--focus-border);
  box-shadow:0 0 0 4px var(--focus-shadow);
}

/* Small text / links */
.muted{ color:var(--muted); }
.small{ font-size:.95rem; }
.center{ text-align:center; }
.link-small{ font-size:.9rem; color:#3b82f6; text-decoration:none; }
.link-small:hover{ text-decoration:underline; }
.row-between{ display:flex; justify-content:flex-start; margin:.25rem 2px .75rem; }

/* Honeypot offscreen container (kept focusable off-tab-cycle) */
.hp{ position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }

/* Inline field errors (login / signup forms) */
.field-error{
  color:#b91c1c;            /* red-700 */
  font-size:.9rem;
  margin-top:4px;
}

/* Form-level error banner */
.form-error{
  display:block;
  background:#fee2e2;       /* red-100 */
  color:#7f1d1d;            /* red-900 */
  border:1px solid #fecaca; /* red-200 */
  border-radius:10px;
  padding:10px 12px;
  margin:8px 0 12px;
  font-size:.95rem;
}

/* Respect the [hidden] attribute on error elements */
.form-error[hidden],
.field-error[hidden]{
  display:none !important;
}

/* Buttons (new variants that won’t break your existing .btn pills) */
.btn.full{ width:100%; display:inline-flex; justify-content:center; align-items:center; gap:.5rem; }
.btn-primary{
  background:var(--primary); border:1px solid transparent; color:#fff; font-weight:700;
  padding:.85rem 1rem; border-radius:12px;
}
.btn-primary:hover{ background:var(--primary-pressed); }
.btn-primary:focus-visible{ outline:2px solid #93a4f5; outline-offset:2px; }
.btn-primary:active{ background:var(--primary-pressed); }
.btn-google{
  background:#fff; border:1px solid var(--border); color:var(--text);
  padding:.8rem 1rem; border-radius:12px; font-weight:700;
}
.btn-google img{ width:18px; height:18px; }

/* Button/loading spinner for form submit states */
@keyframes spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
.spinner{ display:inline-block; width:16px; height:16px; border:2px solid #cbd5e1; border-top-color: var(--primary); border-radius:50%; animation:spin 1s linear infinite; vertical-align:middle; margin-right:8px; }

/* Disabled buttons look dim and not clickable */
.btn[disabled],
.btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}

/* Respect reduced motion preference for spinner */
@media (prefers-reduced-motion: reduce){
  .spinner{ animation:none; border-top-color:#cbd5e1; }
}

/* =======================================================
   TOAST (success notifications)
======================================================= */
.toast{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px);
  background:#0f172a; color:#fff; border-radius:10px; border:1px solid rgba(255,255,255,.08);
  padding:10px 14px; box-shadow:0 8px 24px rgba(2,8,23,.25); z-index:3000;
  opacity:0; pointer-events:none; transition:opacity .18s ease, transform .18s ease;
  font-weight:600; font-size:.95rem;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce){
  .toast{ transition:none; }
}

/* OR divider */
.divider{ display:flex; align-items:center; gap:.75rem; margin:1rem 0; }
.divider::before,
.divider::after{ content:""; height:1px; flex:1; background:var(--border); }
.divider span{ font-size:.8rem; color:var(--muted); font-weight:700; letter-spacing:.08em; }

.login-banner{
  width:100%;
  background:#dcfce7;
  color:#065f46;
  font-weight:600;
  font-size:.95rem;
  padding:12px 0;
  border-bottom:1px solid #99f6e4;
  animation:loginBannerSlide .22s ease-out;
}
.login-banner__inner{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  letter-spacing:.01em;
}
.login-banner--hide{
  opacity:0;
  transform:translateY(-8px);
  transition:opacity .2s ease, transform .2s ease;
}
.email-confirmation-notice{ position:relative; padding:12px 0; color:#065f46; background:#dcfce7; }
.email-confirmation-notice--invalid{ color:#92400e; background:#fef3c7; }
.email-confirmation-notice .container{ display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.email-confirmation-notice p{ flex:1 1 260px; margin:0; }
.email-confirmation-notice a,.email-confirmation-notice button{ color:inherit; text-decoration:underline; font-weight:600; }
.email-confirmation-notice button{ background:none; border:0; cursor:pointer; padding:8px; }
@keyframes loginBannerSlide{
  from{ opacity:0; transform:translateY(-10px); }
  to{ opacity:1; transform:translateY(0); }
}

.user-menu{ position:relative; display:flex; align-items:center; }
.user-menu__trigger{ display:flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0; border:none; background:transparent; border-radius:50%; cursor:pointer; transition:background .15s ease, box-shadow .15s ease; color:inherit; }
.user-menu__trigger:hover,.user-menu__trigger:focus-visible{ background:rgba(15,23,42,.08); box-shadow:0 0 0 1px rgba(15,23,42,.18); outline:none; }
.user-menu__avatar{ width:40px; height:40px; border-radius:50%; background:transparent; color:#0f172a; display:flex; align-items:center; justify-content:center; font-size:18px; }
.user-menu__avatar svg{ width:20px; height:20px; }
.user-menu__avatar--image{ background:transparent; }
.user-menu__avatar--image img{ width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; box-shadow:0 0 0 1px rgba(15,23,42,.1); }
.user-menu__label{ display:none; }
.user-menu__chevron{ display:none; }
.user-menu--loading{
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  min-width:40px;
  visibility:hidden;
  pointer-events:none;
}
.user-menu__avatar--loading{
  display:block;
  width:40px;
  height:40px;
  border-radius:50%;
}
.user-menu__dropdown{ position:absolute; top:calc(100% + 12px); right:0; min-width:220px; background:#fff; border-radius:18px; border:1px solid var(--border); box-shadow:0 20px 35px -18px rgba(15,23,42,.35); padding:10px 0; opacity:0; transform:translateY(-6px); pointer-events:none; transition:opacity .18s ease, transform .18s ease; z-index:60; }
.user-menu.open .user-menu__dropdown{ opacity:1; transform:translateY(0); pointer-events:auto; }
.user-menu__item{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 18px; font-size:13px; font-weight:600; color:#475569; background:none; border:none; width:100%; text-decoration:none; cursor:pointer; transition:background .15s ease, color .15s ease; }
.user-menu__item:hover,.user-menu__item:focus-visible{ background:#e0f2fe; color:#0f172a; }
.user-menu__item.danger{ color:#dc2626; }
.user-menu__item.danger:hover{ background:#fee2e2; color:#b91c1c; }
.user-menu__divider{ height:1px; background:var(--border); margin:6px 18px; }

.auth-modal{ position:fixed; inset:0; background:rgba(15,23,42,.55); display:flex; align-items:center; justify-content:center; padding:16px; z-index:10000; isolation:isolate; }
.auth-modal__panel{ width:100%; max-width:420px; max-height:calc(100dvh - 32px); overflow-y:auto; overscroll-behavior:contain; background:#fff; border-radius:24px; padding:28px; box-shadow:0 25px 55px -25px rgba(15,23,42,.45); display:flex; flex-direction:column; gap:20px; }
.auth-modal__panel > *{ flex-shrink:0; }
.auth-modal__header{ text-align:left; }
.auth-modal__title{ font-size:24px; font-weight:800; color:#0f172a; }
.auth-modal__subtitle{ font-size:14px; color:#64748b; margin-top:4px; }
.auth-modal__providers{ display:flex; flex-direction:column; gap:12px; }
.auth-modal__provider{ display:flex; align-items:center; justify-content:center; gap:10px; padding:10px 14px; border:1px solid var(--border); border-radius:999px; background:#fff; font-size:13px; font-weight:600; color:#475569; transition:border-color .2s ease, box-shadow .2s ease; }
.auth-modal__provider:hover,.auth-modal__provider:focus-visible{ border-color:#38bdf8; box-shadow:0 0 0 3px rgba(56,189,248,.18); outline:none; }
.auth-modal__divider{ display:flex; align-items:center; gap:8px; font-size:10px; text-transform:uppercase; color:#94a3b8; }
.auth-modal__divider span:first-child,.auth-modal__divider span:last-child{ flex:1; height:1px; background:var(--border); }
.auth-modal__form{ display:flex; flex-direction:column; gap:12px; }
.auth-field{ display:flex; flex-direction:column; gap:6px; font-size:13px; }
.auth-field__label{ font-weight:600; text-transform:uppercase; letter-spacing:.08em; color:#475569; }
.auth-field input{ border:1px solid var(--border); border-radius:16px; padding:10px 14px; font-size:14px; transition:border-color .2s ease, box-shadow .2s ease; }
.auth-field input:focus{ border-color:#0ea5e9; box-shadow:0 0 0 3px rgba(14,165,233,.18); outline:none; }
.auth-alert{ background:#fef3c7; color:#b45309; font-size:12px; font-weight:600; padding:10px 14px; border-radius:14px; }
.auth-submit{ border:none; border-radius:999px; background:linear-gradient(135deg,#38bdf8,#0ea5e9); color:#fff; font-weight:700; font-size:13px; padding:12px 16px; text-transform:uppercase; letter-spacing:.08em; box-shadow:0 12px 24px -18px rgba(56,189,248,.8); transition:transform .15s ease, box-shadow .15s ease; cursor:pointer; }
.auth-submit:hover{ transform:translateY(-1px); box-shadow:0 16px 28px -18px rgba(56,189,248,.85); }
.auth-submit:disabled{ opacity:.65; cursor:not-allowed; box-shadow:none; }
.auth-modal__footer{ display:flex; align-items:center; justify-content:space-between; font-size:12px; color:#64748b; }
.auth-footer__link{ background:none; border:none; color:#0ea5e9; font-weight:600; cursor:pointer; transition:color .15s ease; }
.auth-footer__link:hover{ color:#0284c7; }
.auth-footer__close{ background:none; border:none; color:#475569; font-weight:600; cursor:pointer; }

@media (max-width: 560px){
  .auth-modal__panel{ padding:24px 20px; }
  .auth-footer__close{ padding:4px 0; }
}

/* Google button mount containers */
/* Container to center official Google button (rendered via GIS) */
#googleBtnMountLogin,
#googleBtnMountCreate{
  display:flex;
  justify-content:center;
  width:100%;
}
