/* Elvexolt Modern Fusion — primrose, violet, midnight, blue */
:root{--purple:#6918df;--primrose:#ffdf58;--navy:#12163d;--brandline:#e3dff3;--shadow:0 5px 18px #3420600d}
body{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;line-height:1.45;padding-bottom:70px}header,body.study header,body.neon header{background:#fff;color:var(--navy);text-align:left;padding:14px max(16px,calc((100vw - 1020px)/2));border-bottom:1px solid #e6dff5;position:relative;overflow:hidden}header::after{content:'';position:absolute;width:55%;height:8px;bottom:0;right:0;background:linear-gradient(90deg,transparent,#ac7cff,#ffdf58);border-radius:100% 0 0 0;pointer-events:none}.brandrow{display:flex;align-items:center;gap:9px;position:relative;z-index:1}.brandrow img{width:36px;height:36px}.brandtext{display:flex;flex-direction:column}.brandword{font-size:clamp(20px,5vw,29px);font-weight:950;font-style:italic;letter-spacing:-1.3px;line-height:1;color:#11143d}.brandword span{color:#9b6700}.brandtag{font-size:10px;font-weight:650;color:#4c4474;margin-top:5px}.brandright{margin-left:auto;display:flex;gap:6px;align-items:center}.brandright button{background:#f4eaff!important;color:#5b16c3!important;border:0!important;border-radius:50%;width:40px;height:40px;padding:0;font-size:19px}.brandright small{font-size:10px;max-width:105px;overflow-wrap:anywhere;color:#514a6d}.wrap{max-width:1050px;padding:16px 16px 85px}.game-title{margin:4px 0 14px;font-size:27px;letter-spacing:-.8px}.card,.stat{border-radius:17px}.card h2:first-child,.card h3:first-child{margin-top:0}.nav,body.study .nav,body.neon .nav{position:fixed;bottom:0;left:0;right:0;z-index:10;display:flex;justify-content:center;gap:0;padding:7px 4px max(7px,env(safe-area-inset-bottom));background:var(--panel);border-top:1px solid var(--brandline);box-shadow:0 -4px 16px #17113314;overflow:visible}.nav button,body.study .nav button,body.neon .nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;width:20%;max-width:148px;min-height:53px;font-size:11px;padding:4px 2px;border:0;border-radius:12px;background:transparent;color:var(--muted);font-weight:750}.nav button svg{width:22px;height:22px}.nav .active,body.study .nav .active,body.neon .nav .active{background:#efe5ff;color:#6214cc}.stats{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 8px}.stat{padding:12px;min-width:0}.stat strong{font-size:23px}.stat small{font-size:11px;display:block}.stat:first-child{background:linear-gradient(125deg,#35108e,#7b26ed);color:white;border:0}.stat:first-child strong{color:#ffdf58}.stat:first-child small{color:#f4eaff}.stats+.bar{margin-top:4px}.sectionhead{display:flex;align-items:center;justify-content:space-between;margin:18px 0 8px;gap:8px}.sectionhead h2{margin:0;font-size:20px}.sectionhead button{padding:7px 10px;font-size:12px}.homehero{position:relative;overflow:hidden;border-radius:20px;padding:16px;margin-bottom:12px;background:linear-gradient(115deg,#f4ebff,#fff 70%,#fff4b7);color:#16163c;border:1px solid #e7dcff}.homehero h2{font-size:27px;margin:4px 0 5px;letter-spacing:-.7px}.homehero p{margin:0;color:#51496b;font-size:13px}.homehero::after{content:'';position:absolute;right:-25px;bottom:-39px;width:170px;height:82px;border-radius:50%;border:14px solid #b67bff;opacity:.2;transform:rotate(-18deg);pointer-events:none}.homehero .eyebrow{color:#6820c9}.subjectlist{display:grid;gap:10px}.subjectcard{display:flex;align-items:center;gap:12px;text-align:left;width:100%;min-height:74px;padding:11px 13px;border-radius:15px}.subjectcard .subjectinfo{flex:1;min-width:0}.subjectinfo b{display:block;font-size:16px}.subjectinfo small{display:block;font-size:12px}.subjecticon{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;border-radius:12px;color:#fff;background:linear-gradient(135deg,#168af6,#1745aa);box-shadow:inset 0 0 0 1px #fff4}.subjecticon svg{width:25px;height:25px}.english .subjecticon{background:linear-gradient(135deg,#fa4ed3,#b90088)}.science .subjecticon{background:linear-gradient(135deg,#ffe27b,#b77900);color:#251f21}.geo .subjecticon{background:linear-gradient(135deg,#ffab43,#e05b1d)}.history .subjecticon{background:linear-gradient(135deg,#a374ff,#5a21cd)}.subjectmini{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.subjectmini button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:7px 2px;min-width:0;font-size:11px;background:transparent!important;border:0!important}.subjectmini .subjecticon{width:39px;height:39px;flex-basis:39px}.subjectmini .subjecticon svg{width:22px;height:22px}.subjectmini small{font-size:10px}.metricbar{height:8px;background:#ded9ee;border-radius:99px;overflow:hidden;margin:7px 0}.metricbar span{height:100%;display:block;background:#e9b921;border-radius:99px}.questrow{display:flex;gap:10px;align-items:center}.questrow .subjecticon{background:linear-gradient(135deg,#a56aff,#5f10db)}.questrow>div:last-child{flex:1}.questrow b{display:block}.questrow small{font-size:12px}.wideaction{margin:12px 0}.quickgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quickgrid button{text-align:left;min-height:86px}.quickgrid b,.quickgrid small{display:block}.quickgrid small{font-weight:500;font-size:12px}.tierlabel{display:inline-block;border-radius:20px;background:#e9dfff;color:#4711a5;font-weight:700;padding:3px 8px;font-size:10px;margin-top:4px}.achievement-list{display:grid;gap:8px}.achievement{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--brandline);border-radius:13px;background:var(--panel)}.achievement .medal{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#f8e4a0;color:#1a143b;font-size:22px}.achievement.locked .medal{filter:grayscale(1);opacity:.65}.achievement .desc{flex:1}.achievement b,.achievement small{display:block}.achievement small{font-size:12px}.milestones{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;text-align:center}.milestones span{font-size:11px}.milestones b{display:grid;place-items:center;margin:0 auto 4px;border-radius:50%;width:29px;height:29px;background:#e3e1ec;color:#32314e}.milestones .earned b{background:#ffdf58;color:#211a3b}.theme-option{width:100%;display:flex;gap:12px;align-items:center;text-align:left;margin:9px 0;padding:10px}.theme-option .theme-art{width:65px;height:52px;flex-shrink:0;border-radius:10px;background:linear-gradient(135deg,#fff,#e5d8ff,#ffef9c);border:1px solid #cfc4ee;position:relative}.theme-art::after{content:'';position:absolute;inset:10px 9px;border-radius:4px;background:linear-gradient(180deg,#9f6ef9 0 18%,transparent 18% 37%,#ffda55 37% 55%,transparent 55% 73%,#9f6ef9 73% 90%,transparent 90%)}.theme-art.adventure{background:linear-gradient(140deg,#141932,#5e3296)}.theme-art.neon{background:linear-gradient(135deg,#18112c,#7135a0)}.theme-option .theme-detail{flex:1}.theme-detail small{display:block;font-weight:400}.theme-option.selected{outline:2px solid #7c32ed}.choices button{position:relative;padding:12px 12px 12px 39px;min-height:45px}.choices button::before{content:'';position:absolute;left:13px;top:50%;transform:translateY(-50%);border:1.5px solid currentColor;border-radius:50%;width:14px;height:14px;opacity:.75}.choices button.selected::before{background:#7431df;box-shadow:inset 0 0 0 3px #fff;border-color:#7431df}.choices button.selected{outline:2px solid #7431df}.choices .good::before{background:#16844b}.choices .bad::before{background:#b82b4e}#submitanswer{background:var(--primrose);color:#16163c;border:1px solid #e5bf39;margin-top:10px}#timerpanel{top:0;z-index:5}body:not(.quiz-active) #timerpanel{position:static}body.quiz-active .stats,body.quiz-active .stats+.bar,body:not(.show-home) .stats,body:not(.show-home) .stats+.bar{display:none}body:not(.show-home):not(.quiz-active) #timerpanel{display:none}body:not(.show-more) #accountbar{display:none!important}body.show-more #accountbar{display:block;max-width:1050px}#warning:not([hidden]){padding:12px;border:1px solid #f0b65a;border-radius:10px;margin-bottom:12px;background:#fff4d6;color:#64420a}#syncstatus{font-size:12px}.brandright [hidden]{display:none!important}
body.study{--bg:#faf9ff;--panel:#fff;--ink:#16163c;--muted:#565472;--gold:#6918df;--blue:#5f20cb;--green:#117a42;background:linear-gradient(150deg,#fff,#f8f5ff 70%,#fffdf3);color:var(--ink)}body.study .card,body.study .stat{border:1px solid #e2ddf2;box-shadow:var(--shadow);border-radius:16px}body.study .stat:first-child{border:0}body.study button{border-color:#ded8ef;color:#17163e;background:#fff}body.study .primary{background:linear-gradient(100deg,#6d22e2,#4c12bb);border:0;color:white;box-shadow:0 3px 9px #5b19c52a}body.study .nav .active{background:#eee3ff;color:#6414d1}body.study .hero{background:linear-gradient(120deg,#f5eaff,#fff9db)}body.study .bar{background:#e7e3f2}body.study .bar span{background:linear-gradient(90deg,#ffdf58,#edbd22)}body.study #timerpanel{background:#fff;border-color:#e2ddf2;box-shadow:var(--shadow)}body.study #timerclock{color:#27115c}body.study .tag,body.study .topics span{background:#f0e9ff;color:#4d1da5}body.study .subjectcard.math{background:#f4f8ff}body.study .subjectcard.english{background:#fff4fc}body.study .subjectcard.science{background:#fffbed}body.study .subjectcard.geo{background:#fff4ec}body.study .subjectcard.history{background:#f7f0ff}body.study .feedback{background:#f6f4ff;color:#252044;border-color:#d7c8ed}body.study .feedback.good strong{color:#17673b}body.study .feedback.bad strong{color:#98223c}body.study .notice{color:#58427b}body.study #accountscreen input:not([type=checkbox]),body.study #accountscreen select{background:#fff;color:#16163c;border-color:#d4cce6}body.study .choices button.selected{background:#f1eaff}body.study .choices .good{background:#e5f8ed}body.study .choices .bad{background:#ffeff1}body.study .rest h2{color:#5320bd}body.study .quickgrid button{background:#f8f4ff}body.study .quickgrid button:nth-child(2){background:#fff9df}body.study .theme-option{background:#fff}body.study .theme-option.selected{background:#faf5ff}body.study .stat:first-child{background:linear-gradient(125deg,#35108e,#7b26ed)}body.study .stat:first-child strong{color:#ffdf58}body.study .stat:first-child small{color:#f4eaff}
@media(min-width:850px){.wrap{padding:20px 20px 80px}.subjectlist{grid-template-columns:1fr 1fr}.subjectmini{max-width:580px}.homehero{padding:24px}.homehero h2{font-size:34px}.quickgrid button{min-height:95px}.nav button{font-size:12px}.card{padding:20px}#screen{max-width:100%}.stats .stat{padding:17px}}@media(max-width:380px){.wrap{padding-left:10px;padding-right:10px}.brandtag{font-size:9px}.stat strong{font-size:20px}.subjectmini small{font-size:9px}.brandright small{display:none}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.nav,body.study .nav,body.neon .nav{top:auto;height:auto}html{scroll-padding-bottom:90px}
.brandword span{color:#e6b91b;text-shadow:0 .4px #80601b}.brandright button{display:grid;place-items:center}.brandright small{max-width:70px}.brandtag{font-size:9px;white-space:normal}.brandrow img{flex-shrink:0}.homehero{margin-bottom:10px}.homehero h2{margin:2px 0 3px}body.show-home #timerpanel{margin-bottom:12px}body.quiz-active #timerpanel{padding:9px 12px}body.quiz-active #timerpanel .row>div{min-width:0}body.quiz-active #timerpanel #pausebutton{font-size:12px;padding:8px 10px;white-space:nowrap}body.quiz-active #timerpanel #timerlabel{font-size:11px}body.quiz-active #timerpanel #timerclock{font-size:21px}body.quiz-active #timerdetail{font-size:11px}body.quiz-active #screen h2{margin:12px 0 5px}body.quiz-active #screen>details{margin:5px 0}body.quiz-active #screen>.card{padding:10px 13px;margin:8px 0}body.quiz-active #screen>.card .bar{margin:5px 0}body.quiz-active .choices{margin:10px 0;gap:7px}body.quiz-active .question{font-size:20px}body.quiz-active .choices button{min-height:42px;padding-top:9px;padding-bottom:9px}body.quiz-active #questionarea .card{padding:13px}.subjectmini button:focus-visible{outline:2px solid #7330db}.brandright button:focus-visible{outline:2px solid #7330db}body.neon .nav .active{background:#452576;color:#e9ddff}body:not(.study):not(.neon) .nav .active{background:#3f386d;color:#fff}
/* Family learning — same Studio violet / primrose palette */
.family-role{display:grid;gap:10px}.family-role label{border:1px solid #dcd0fa;border-radius:14px;padding:12px;background:#f8f4ff;color:#26174d}.family-role label:last-child{background:#fff5c5;border-color:#e5d58c}.family-role small,.family-choice small{display:block;margin-top:4px}.family-choice{border-radius:12px;background:#f5edff;padding:12px;color:#251746}.family-stats{margin:12px 0}.family-reward .tag{white-space:normal}.family-reward h3{overflow-wrap:anywhere}.family-reward .metricbar{margin:10px 0}#invitebox input{width:100%;padding:10px;border:1px solid #a89acb;border-radius:9px;font:inherit}#accountscreen a{color:var(--blue);text-decoration:underline}#familynotice{overflow-wrap:anywhere}.family-role input[type=radio]{width:auto!important;margin:4px!important}.family-role label.check{align-items:center!important}#accountscreen .family-stats .stat{margin:0;padding:10px}

/* V3.2 revision workspace */
.answer-workspace.with-working{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}.answer-workspace .choices{min-width:0;margin:0}.working-panel{min-width:0;border:1px solid #d8d3e7;border-radius:12px;padding:12px;background:var(--panel);color:var(--ink)}.working-panel label{display:block;font-weight:700;margin:0 0 8px}.working-panel textarea{display:block;box-sizing:border-box;width:100%;min-height:154px;resize:vertical;font:inherit;font-size:16px;background:var(--bg);color:var(--ink);border:1px solid #b8b2cb;border-radius:8px;padding:9px}.working-panel small{display:block;margin:6px 0;color:var(--muted)}.working-panel button{font-size:13px;padding:6px 10px}.saved-working{white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:620px){.answer-workspace.with-working{grid-template-columns:minmax(0,1fr)}.working-panel textarea{min-height:106px}}

/* V3.3 role-first onboarding */
[hidden]{display:none!important}.role-start{margin:20px 0}.role-start .role-card{display:flex;align-items:center;gap:14px;text-align:left;width:100%;min-height:76px;padding:15px 12px;border:1px solid #d7c8f6;border-radius:16px;background:#f2eaff;color:#23164b}.role-start .role-card:last-child{background:#fff5bf;border-color:#e5d38c}.role-card>span:nth-child(2){flex:1}.role-card b,.role-card small{display:block}.role-card small{font-size:13px;font-weight:500;margin-top:3px}.role-card .role-icon{font-size:28px}.role-card:focus-visible{outline:3px solid #7132d8;outline-offset:2px}

/* V3.4 admin access and genuinely differentiated themes */
.admin-launch{border:2px solid #9161ee!important;background:linear-gradient(130deg,#f4eaff,#fff8d8)!important}.admin-launch .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.admin-launch h3{margin:8px 0}#accountscreen .family-stats{display:grid!important}#testframe{display:block;width:100%;height:78vh;min-height:460px;border:2px solid #8450dd;border-radius:16px;background:#fff}.admin-launch button{min-height:46px}
body.neon{--bg:#070516;--panel:#10102a;--ink:#f7f5ff;--muted:#c1c9ff;--gold:#f9ff52;--blue:#27f5ff;--green:#7cffad;--brandline:#7145ff;background:radial-gradient(ellipse at 5% 12%,#55147988,transparent 45%),radial-gradient(ellipse at 100% 70%,#0053a766,transparent 45%),#070516;color:var(--ink)}
body.neon header{background:#0a081b;color:#fff;border-color:#a04aff;box-shadow:0 0 18px #9b35ff80}body.neon .brandword,body.neon .brandtag,body.neon .brandright small{color:#fff}body.neon .brandword span{color:#f9ff52;text-shadow:0 0 8px #f9ff52aa}body.neon header::after{background:linear-gradient(90deg,#ff36d7,#2af5ff,#f9ff52)}
body.neon .card,body.neon .stat,body.neon #timerpanel,body.neon .working-panel{background:#11112a;border:1px solid #9b58ff;box-shadow:0 0 12px #a347ff55,inset 0 0 14px #6324a02b;color:#f7f5ff}body.neon .homehero,body.neon .hero{background:linear-gradient(125deg,#321055,#0b2448);color:#fff;border:1px solid #4ff8ff;box-shadow:0 0 18px #25f5ff55}body.neon .homehero p,body.neon .homehero .eyebrow{color:#c6faff}body.neon button{background:#18143a;color:#fff;border:1px solid #9e65ff;box-shadow:0 0 8px #b34cff44}body.neon .primary{background:linear-gradient(105deg,#ad00ec,#5139dc);color:#fff;border:1px solid #ff9df8;box-shadow:0 0 13px #ff36d799}body.neon #submitanswer{background:#efff56;color:#16152c;border-color:#f9ff52;box-shadow:0 0 15px #efff5688}body.neon .nav{background:#09091f;border-color:#a94aff;box-shadow:0 -2px 16px #a94aff55}body.neon .nav .active{background:#4c196e;color:#aafaff;text-shadow:0 0 8px #2af5ff}body.neon .metricbar,body.neon .bar{background:#29204d}body.neon .metricbar span,body.neon .bar span{background:linear-gradient(90deg,#f73bdf,#35f6ff,#ecff56);box-shadow:0 0 10px #35f6ff}body.neon .tag{background:#30195b;color:#caffff}body.neon .choices button.selected{border-color:#37efff;outline:2px solid #37efff;background:#243466}body.neon .choices .good{border-color:#7cffad;color:#c5ffdc}body.neon .choices .bad{border-color:#ff69a5;color:#ffd1e4}body.neon .theme-option.selected{outline:2px solid #38f8ff}
body:not(.study):not(.neon){--bg:#17182c;--panel:#23283a;--ink:#fff6db;--muted:#d8cfb9;--gold:#f9dc83;--blue:#9ac9ff;--green:#abdf9b;--brandline:#8f7448;background:linear-gradient(180deg,#271f45,#172e42 45%,#18281f);color:var(--ink)}body:not(.study):not(.neon) header{background:#191c31;border-color:#ad8a4d}body:not(.study):not(.neon) .brandword,body:not(.study):not(.neon) .brandtag,body:not(.study):not(.neon) .brandright small{color:#fff2cd}body:not(.study):not(.neon) .card,body:not(.study):not(.neon) .stat,body:not(.study):not(.neon) #timerpanel{background:linear-gradient(135deg,#2b3043,#20293a);border:1px solid #8f754e;box-shadow:0 5px 12px #080e1a55;color:#fff6db}body:not(.study):not(.neon) .homehero,body:not(.study):not(.neon) .hero{background:linear-gradient(0deg,#172c30ed,#272044a0),url('quest-landscape.svg') center/cover;border:1px solid #d5ab62;color:#fff4cf;min-height:105px}body:not(.study):not(.neon) .homehero p,body:not(.study):not(.neon) .homehero .eyebrow{color:#ffebae}body:not(.study):not(.neon) button{background:#283146;color:#fff4d2;border-color:#9b8058}body:not(.study):not(.neon) .primary{background:linear-gradient(110deg,#9a602e,#d0a452);color:#21180d;border:1px solid #f3d88d}body:not(.study):not(.neon) .nav .active{background:#5b4630;color:#ffe8aa}body:not(.study):not(.neon) .metricbar,body:not(.study):not(.neon) .bar{background:#41403d}body:not(.study):not(.neon) .metricbar span,body:not(.study):not(.neon) .bar span{background:linear-gradient(90deg,#b47d39,#fce59a)}body:not(.study):not(.neon) .tag{background:#504632;color:#ffe6ac}body:not(.study):not(.neon) .choices button.selected{outline:2px solid #f1ce77;background:#54412d}body:not(.study):not(.neon) .theme-option.selected{outline:2px solid #f5d98c}
.theme-art.adventure{background:url('quest-landscape.svg') center/cover}.theme-art.adventure::after{display:none}.theme-art.neon{background:#090620;border-color:#b262ff;box-shadow:inset 0 0 10px #a347ff}.theme-art.neon::after{background:linear-gradient(180deg,#f7ff4b 0 18%,transparent 18% 37%,#29f5ff 37% 55%,transparent 55% 73%,#fa4ad9 73% 90%,transparent 90%);filter:drop-shadow(0 0 4px #c935ff)}
@media(max-width:480px){.admin-launch .actions{grid-template-columns:1fr}}
