/* Scholar Quest v4.3 — theme-neutral experience shell.
   Semantic expedition layout lives here; palettes/skins live in static/themes/*/theme.css. */
:root{
  --quest-ocean:#082b3e;--quest-ocean-2:#0b4d5d;--quest-ink:#203744;--quest-paper:#fff9e9;
  --quest-paper-2:#f4e7c5;--quest-gold:#d79b3e;--quest-gold-2:#f5cf76;--quest-green:#26705a;
  --quest-wood:#6d4224;--quest-line:#dbc99d;--quest-shadow:0 20px 56px rgba(1,18,30,.24);
}
body{background:
  radial-gradient(circle at 9% 5%,rgba(67,184,169,.22),transparent 28%),
  radial-gradient(circle at 88% 11%,rgba(69,126,165,.22),transparent 27%),
  linear-gradient(155deg,#061927 0%,var(--quest-ocean) 48%,#093648 100%)}
body:before{opacity:.2;background-image:
  radial-gradient(circle at 12% 22%,#fff 0 1px,transparent 1.5px),
  radial-gradient(circle at 63% 18%,#fff 0 1px,transparent 1.5px),
  radial-gradient(circle at 83% 52%,#fff 0 1px,transparent 1.5px),
  radial-gradient(circle at 29% 72%,#fff 0 1px,transparent 1.5px),
  repeating-radial-gradient(ellipse at 55% 40%,transparent 0 44px,rgba(140,226,214,.05) 45px 46px,transparent 47px 71px)}
.app{max-width:1510px;padding-top:24px}
.top{position:relative;padding:12px 14px;border:1px solid rgba(246,207,118,.19);border-radius:18px;background:linear-gradient(180deg,rgba(11,34,48,.88),rgba(7,27,40,.84));box-shadow:0 13px 30px rgba(0,0,0,.18);backdrop-filter:blur(12px);margin-bottom:18px}
.top:after{content:"";position:absolute;left:22px;right:22px;bottom:-7px;height:1px;background:linear-gradient(90deg,transparent,rgba(245,207,118,.5),transparent)}
.brand-mark{border-color:rgba(245,207,118,.35);background:radial-gradient(circle at 40% 35%,#fff1b5,#cf8d31 48%,#644322 100%);box-shadow:inset 0 1px rgba(255,255,255,.4),0 4px 13px rgba(0,0,0,.22)}
.brand{font-family:Georgia,'Times New Roman',serif;font-weight:800;letter-spacing:-.01em;color:#fff6d4;text-shadow:0 2px 8px rgba(0,0,0,.26)}
.sub-light{color:#bcd1d5}.nav button{border-color:rgba(255,255,255,.1);background:rgba(255,255,255,.045)}.nav button:hover{border-color:rgba(245,207,118,.3);background:rgba(255,255,255,.09)}.nav button.active{background:linear-gradient(#fffaf0,#f2e1ba);border-color:#f2cf79;color:#183345;box-shadow:0 3px 10px rgba(0,0,0,.14)}
.credit-chip{background:rgba(216,155,62,.15);border-color:rgba(245,207,118,.32);color:#ffe3a7}
.card:not(.question-card):not(.feedback-dock):not(.feedback-dock-v15){background:linear-gradient(180deg,rgba(255,251,240,.99),rgba(249,241,218,.985));border-color:rgba(219,201,157,.92);box-shadow:var(--quest-shadow)}
.card:not(.question-card):not(.feedback-dock):not(.feedback-dock-v15):before{border-color:rgba(255,255,255,.3)}
.btn{background:linear-gradient(135deg,#157d72,#126a75);box-shadow:0 7px 18px rgba(9,87,89,.22);border:1px solid rgba(255,255,255,.15)}.btn:hover{filter:brightness(1.06)}.btn.secondary{background:linear-gradient(#fffdf7,#f4ead0);border-color:#d8c69d;color:#29434d}.btn.gold{background:linear-gradient(135deg,#f4cd72,#d89231);color:#52310e;border-color:#f4d88d}
.pill{background:#f7ecd0;color:#72511f;border-color:#dec48c}.label{color:#7c653e}.meta-chip{background:rgba(255,251,238,.9);border-color:#d8c79f;color:#4f5b56}

/* Home: a genuine expedition map rather than a generic dashboard */
.quest-map-card{grid-column:span 8;min-height:590px;position:relative;overflow:hidden;padding:0!important;background:#0d6575!important;border-color:#d2b467!important;isolation:isolate}
.quest-map-art{position:absolute;inset:0;background-image:var(--sq-world-home-map,url('assets/adventure_world_comic.svg'));background-position:var(--sq-world-home-map-position,center);background-size:cover;background-repeat:no-repeat;z-index:0;transform:scale(1.015)}
.quest-map-vignette{position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(4,24,34,.06),rgba(4,24,34,.02) 55%,rgba(4,24,34,.36)),linear-gradient(90deg,rgba(4,24,34,.20),transparent 25%,transparent 72%,rgba(4,24,34,.16));pointer-events:none}
.quest-map-heading{position:absolute;left:24px;top:22px;z-index:4;width:min(390px,48%);padding:15px 17px;border-radius:16px;background:linear-gradient(180deg,rgba(255,250,231,.96),rgba(246,229,190,.96));border:1px solid #d6b774;box-shadow:0 10px 30px rgba(3,31,43,.2);transform:rotate(-.35deg)}
.quest-map-heading h1{font:800 32px/1.08 Georgia,serif;margin:7px 0 5px;color:#284453}.quest-map-heading p{margin:0;color:#52645f;font-size:13px;line-height:1.42}.quest-map-heading .pill{background:#fff4cf}
.quest-map-card .daily-done{background:rgba(237,255,244,.92);border-color:#aed4b9;color:#2d6946;margin:9px 0 0;padding:8px 10px}
.map-marker{position:absolute;z-index:5;display:flex;align-items:center;gap:9px;min-width:132px;max-width:195px;padding:9px 11px;border-radius:14px;border:2px solid rgba(255,242,190,.9);background:linear-gradient(180deg,rgba(16,48,58,.94),rgba(7,33,45,.94));color:#fff8df;box-shadow:0 8px 18px rgba(1,25,35,.32),inset 0 1px rgba(255,255,255,.13);cursor:pointer;text-align:left;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.map-marker:hover{transform:translateY(-3px) scale(1.02);border-color:#fff3b5;box-shadow:0 12px 24px rgba(1,25,35,.4),0 0 0 4px rgba(255,222,118,.14)}
.map-marker .zone-icon{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:linear-gradient(145deg,#f5cf70,#b97825);border:2px solid #ffe6a4;box-shadow:inset 0 0 0 2px rgba(91,53,17,.2)}.map-marker .zone-icon svg{width:22px;height:22px}.map-marker b{display:block;font:800 13px/1.1 Georgia,serif}.map-marker small{display:block;color:#c5dfe0;font-size:10px;margin-top:2px}
.map-marker.math{left:7%;top:34%}.map-marker.english{left:48%;top:23%}.map-marker.vr{left:8%;top:67%}.map-marker.nvr{right:4%;top:50%}.map-marker.spelling{left:41%;bottom:8%}
.map-marker.spelling .zone-icon{background:linear-gradient(145deg,#e8b76b,#9a5930)}
.quest-citadel{position:absolute;z-index:6;left:49%;top:51%;transform:translate(-50%,-50%);width:190px;text-align:center}.quest-citadel button{width:100%;border:none;cursor:pointer;padding:14px 16px;border-radius:18px;background:linear-gradient(180deg,#fff5cc,#e1b354);color:#4f3514;font:900 16px/1.1 Georgia,serif;border:3px solid #fff0a7;box-shadow:0 12px 30px rgba(83,48,11,.38),0 0 0 5px rgba(236,191,75,.19);transition:transform .16s ease}.quest-citadel button:hover{transform:translateY(-3px) scale(1.025)}.quest-citadel span{display:block;font:800 10px/1.2 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.08em;color:#80632b;margin-top:4px}
.quest-map-companion{position:absolute;z-index:5;right:8px;bottom:-8px;width:178px;height:190px;display:grid;place-items:end center;pointer-events:none;filter:drop-shadow(0 16px 18px rgba(2,23,31,.25))}.quest-map-companion svg{width:155px!important;height:172px!important}.quest-speech{position:absolute;right:16px;bottom:168px;z-index:6;background:#fff9e9;border:1px solid #d8c291;border-radius:15px 15px 5px 15px;padding:9px 12px;max-width:180px;color:#45544d;font:700 12px/1.35 Georgia,serif;box-shadow:0 7px 20px rgba(4,28,38,.2);transform:rotate(1deg)}
.map-legend{position:absolute;left:18px;bottom:14px;z-index:4;display:flex;gap:6px;flex-wrap:wrap;max-width:58%}.map-legend span{font-size:10px;font-weight:800;color:#f7efd4;padding:5px 8px;border-radius:999px;background:rgba(4,34,44,.68);border:1px solid rgba(255,255,255,.15);backdrop-filter:blur(5px)}
.explorer-journal{grid-column:span 4;position:relative;overflow:hidden;padding:25px!important}.explorer-journal:after{content:"";position:absolute;right:-40px;bottom:-45px;width:180px;height:180px;border:2px solid rgba(168,124,56,.09);border-radius:50%;box-shadow:0 0 0 18px rgba(168,124,56,.04),0 0 0 38px rgba(168,124,56,.025);pointer-events:none}.journal-kicker{font:800 12px Georgia,serif;color:#896628;text-transform:uppercase;letter-spacing:.1em}.journal-title{font:800 30px/1.05 Georgia,serif;color:#243f49;margin:6px 0 5px}.journal-rule{height:1px;background:linear-gradient(90deg,#c7a760,transparent);margin:14px 0}.journal-level{display:flex;align-items:center;justify-content:space-between;gap:15px}.journal-badge{width:66px;height:66px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 40% 35%,#fff1b3,#d39430 58%,#7b4f21);border:4px solid #f4d27d;color:#fff8df;font:900 22px Georgia,serif;box-shadow:0 6px 15px rgba(79,50,18,.25)}.journal-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:13px}.journal-stat{border:1px solid #dac99f;background:rgba(255,255,255,.46);border-radius:13px;padding:11px}.journal-stat strong{display:block;font-size:20px;color:#29444d}.journal-stat span{font-size:11px;color:#756c59}.journal-goal{margin-top:13px;padding:12px;border-radius:13px;background:#eef5e8;border:1px solid #cbdcb8;color:#456244;font-size:12px}.journal-progress{width:100%;margin-top:14px}.journal-progress .progress{background:#eadfc3}.journal-progress .progress>div{background:linear-gradient(90deg,#2b9074,#d6a044)}
.region-progress-card{grid-column:1/-1;padding:22px!important}.region-progress-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:14px}.region-progress-head h2{font:800 25px Georgia,serif;margin:4px 0;color:#28444d}.region-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.region-tile{position:relative;overflow:hidden;border:1px solid #d8c69d;border-radius:16px;padding:14px;background:rgba(255,255,255,.52);min-height:128px}.region-tile:after{content:"";position:absolute;width:90px;height:90px;border-radius:50%;right:-28px;bottom:-38px;background:radial-gradient(circle,rgba(20,126,117,.13),transparent 70%)}.region-tile-top{display:flex;align-items:center;gap:9px}.region-tile .zone-icon{width:39px;height:39px;border-radius:12px;display:grid;place-items:center;background:#e2efe8;border:1px solid #bfd6c6}.region-tile .zone-icon svg{width:23px;height:23px}.region-tile strong{font:800 15px Georgia,serif;color:#29444d}.region-tile .metric{font-size:26px;margin:10px 0 1px;color:#1f4f58}.region-tile small{color:#6b746b}

/* Route picker / training camp */
.daily-lesson-picker,.practice-route-head{position:relative;overflow:hidden}.daily-lesson-picker:after,.practice-route-head:after{content:"";position:absolute;right:-80px;top:-100px;width:300px;height:300px;border-radius:50%;background:radial-gradient(circle,rgba(26,143,135,.12),transparent 67%);pointer-events:none}.quest-route-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px;margin:20px 0}.quest-route-card{position:relative;text-align:left;cursor:pointer;border:1px solid #d2be8e;border-radius:18px;padding:15px;background:linear-gradient(160deg,rgba(255,255,255,.74),rgba(244,232,198,.7));min-height:160px;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;overflow:hidden}.quest-route-card:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(55,49,29,.12);border-color:#b89553}.quest-route-card .zone-icon{width:49px;height:49px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(145deg,#173f50,#0d6c74);border:2px solid #e4c875;box-shadow:0 6px 13px rgba(13,54,65,.18);margin-bottom:12px}.quest-route-card .zone-icon svg{width:28px;height:28px}.quest-route-card strong{font:800 18px/1.1 Georgia,serif;color:#27424c;display:block}.quest-route-card .route-subject{font-size:10px;text-transform:uppercase;letter-spacing:.09em;font-weight:900;color:#977038;margin-top:3px}.quest-route-card .small{margin-top:9px;line-height:1.4}.quest-route-card.mix{background:linear-gradient(145deg,#f9efc8,#dff2e7);border-color:#c6a75e}.quest-route-card.mix .zone-icon{background:linear-gradient(145deg,#e7b348,#89601e)}
.practice-card.spelling-practice-card{border-color:#d7bf8b;background:linear-gradient(145deg,#fff4d2,#eef8ee)}

/* Progress, spelling, companion: adventure flavour without compromising clarity */
.progress-hero{background:linear-gradient(135deg,#fff6d8,#ecf8ee 60%,#e9f4f7)!important}.progress-hero h1,.spelling-hero h1,.companion-head h2{font-family:Georgia,serif!important}.seven-day-grid .day-tile{border-color:#d9c79f;background:#fffaf0}.day-tile.daily-complete{background:#ecf6e9;border-color:#bdd6af}.leaderboard-list{border-radius:15px;overflow:hidden}
.spelling-hero{background:linear-gradient(135deg,#fff0c8,#e9f4e5 50%,#e9f5f7)!important;border-color:#d8bd80!important}.spelling-hero:after{content:'A  B  C';font-family:Georgia,serif;color:rgba(126,82,28,.08)}.spelling-stage{background:linear-gradient(180deg,#fffaf0,#f7edcf)!important;border-color:#d7c395!important}.rescue-card{background:linear-gradient(180deg,#fff9dc,#eef8f2)!important}.spell-context{background:#fffdf7;border-color:#d9c79e}.memory-link{border-color:#d7c79f}
.companion-shell{border-color:#d6ba79!important}.companion-main{background:linear-gradient(180deg,#082a3d,#0b4f58)!important}.companion-head{background:linear-gradient(180deg,rgba(255,215,122,.08),rgba(255,255,255,0))}.world-art:after{content:"Explorer's world"}.store-toolbar h2{font-family:Georgia,serif}.shop-card{border-color:#d8c8a2;background:linear-gradient(180deg,#fffdf8,#faf1da)}.shop-card .thumb{background:linear-gradient(145deg,#eef6e9,#f8efd9)}

/* Profiles and setup */
.profile-shell{position:relative;overflow:hidden}.profile-shell:after{content:"";position:absolute;right:-50px;bottom:-60px;width:220px;height:220px;border:2px solid rgba(149,107,47,.07);border-radius:50%;box-shadow:0 0 0 24px rgba(149,107,47,.03),0 0 0 50px rgba(149,107,47,.02);pointer-events:none}.profile-card{border-color:#d8c69d;background:linear-gradient(160deg,#fffdf8,#f6ead0)}.profile-avatar{background:#e8f1e7;border:1px solid #c7d8bd}.profile-type{background:#e6efe8;color:#356245}.backend-ok{color:#41725f}

/* Question surfaces intentionally stay calm and high-contrast. */
.question-card,.question-card-v15{background:#fbfdff!important;border-color:#d7e2e9!important}.question-shell-v15 .companion-lane-v15{background:linear-gradient(180deg,rgba(255,247,219,.18),rgba(9,57,70,.08))}.question-card .tag{background:#f2ead7;border:1px solid #ddcda8;color:#5d513d}.question-card .progress>div{background:linear-gradient(90deg,#1a8b7d,#d79a3c)}

/* Parent remains deliberately less game-like, but inherits the visual language. */
.curriculum-position,.family-dashboard,.adaptive-note{border-color:#d9caa9}.curriculum-position h2,.curriculum-position h3{font-family:Georgia,serif}

/* Motion: tiny route shimmer and map life, disabled for reduced motion. */
.quest-map-art{animation:mapDrift 18s ease-in-out infinite alternate}.quest-citadel:after{content:"✦";position:absolute;left:50%;top:-32px;transform:translateX(-50%);color:#ffe587;text-shadow:0 0 14px #ffd261;font-size:24px;animation:questPulse 2.8s ease-in-out infinite;pointer-events:none}.map-marker .zone-icon{animation:markerBreathe 5s ease-in-out infinite}.map-marker.english .zone-icon{animation-delay:.8s}.map-marker.vr .zone-icon{animation-delay:1.6s}.map-marker.nvr .zone-icon{animation-delay:2.4s}.map-marker.spelling .zone-icon{animation-delay:3.2s}
@keyframes mapDrift{from{transform:scale(1.015) translate3d(0,0,0)}to{transform:scale(1.025) translate3d(-3px,2px,0)}}@keyframes questPulse{0%,100%{opacity:.65;transform:translateX(-50%) scale(.9)}50%{opacity:1;transform:translateX(-50%) scale(1.15)}}@keyframes markerBreathe{0%,88%,100%{box-shadow:inset 0 0 0 2px rgba(91,53,17,.2)}93%{box-shadow:inset 0 0 0 2px rgba(91,53,17,.2),0 0 0 6px rgba(255,224,129,.16)}}

@media(max-width:1180px){.quest-map-card{grid-column:1/-1}.explorer-journal{grid-column:1/-1}.region-grid{grid-template-columns:repeat(2,1fr)}.quest-route-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:850px){.app{padding:18px 18px 44px}.top{padding:10px}.quest-map-card{min-height:690px}.quest-map-heading{left:16px;top:16px;width:calc(100% - 32px);max-width:none}.quest-map-heading h1{font-size:27px}.map-marker{min-width:0;max-width:none;width:calc(50% - 22px)}.map-marker.math{left:14px;top:220px}.map-marker.english{left:auto;right:14px;top:220px}.map-marker.vr{left:14px;top:315px}.map-marker.nvr{right:14px;top:315px}.map-marker.spelling{left:14px;right:auto;bottom:95px;width:calc(50% - 22px)}.quest-citadel{left:auto;right:14px;top:auto;bottom:95px;transform:none;width:calc(50% - 22px)}.quest-map-companion{right:calc(50% - 80px);width:160px;bottom:-8px}.quest-speech{display:none}.map-legend{left:12px;right:12px;bottom:12px;max-width:none}.quest-route-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.app{padding:12px 10px 36px}.top{border-radius:14px}.brand{font-size:21px}.quest-map-card{min-height:760px;border-radius:20px}.quest-map-art{background-position:49% center;opacity:.9}.quest-map-heading{padding:13px 14px}.quest-map-heading h1{font-size:25px}.map-marker{width:calc(50% - 17px);padding:8px}.map-marker .zone-icon{width:32px;height:32px}.map-marker b{font-size:12px}.map-marker small{font-size:9px}.map-marker.math{left:9px;top:228px}.map-marker.english{right:9px;top:228px}.map-marker.vr{left:9px;top:310px}.map-marker.nvr{right:9px;top:310px}.map-marker.spelling{left:9px;bottom:108px;width:calc(50% - 17px)}.quest-citadel{right:9px;bottom:108px;width:calc(50% - 17px)}.quest-citadel button{font-size:14px;padding:11px 8px}.quest-map-companion{right:auto;left:50%;top:425px;bottom:auto;transform:translateX(-50%);width:112px;height:125px}.quest-map-companion svg{width:105px!important;height:118px!important}.map-legend{bottom:8px}.map-legend span{font-size:9px}.region-grid,.quest-route-grid{grid-template-columns:1fr}.region-progress-head{display:block}.journal-title{font-size:26px}}
@media(prefers-reduced-motion:reduce){.quest-map-art,.quest-citadel:after,.map-marker .zone-icon{animation:none!important}}

/* v4.5 semantic Home layout guardrails: theme-independent responsive structure. */
@media(max-width:820px){
  .v45-home{grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:100%!important;min-width:0!important}
  .v45-home>*{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  .v45-home>.home-hero-v45,.v45-home>.home-plan-v45,.v45-home>.explorer-journal,.v45-home>.region-progress-card{grid-column:1!important;grid-row:auto!important;width:auto!important}
  .v45-home .home-route-grid-v45{grid-template-columns:minmax(0,1fr)!important}
  .v45-home .home-route-v45{min-width:0!important}
  .v45-home .region-grid{grid-template-columns:minmax(0,1fr)!important}
}
