:root{--bg:#080b14;--surface:#11182b;--surface2:#18223b;--surface3:#202c4b;--text:#f7f8ff;--muted:#aeb8d3;--gold:#f4c86b;--gold2:#fff0bd;--blue:#718dff;--green:#5bd7a6;--red:#ff7c8c;--border:rgba(255,255,255,.12);--shadow:0 28px 90px rgba(0,0,0,.46);--radius:28px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;background:radial-gradient(circle at 15% 9%,rgba(113,141,255,.2),transparent 31%),radial-gradient(circle at 85% 10%,rgba(244,200,107,.13),transparent 29%),linear-gradient(145deg,#060810,#0b1121 62%,#0f1730);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;overflow-x:hidden}body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.17;background-image:linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px);background-size:36px 36px;mask-image:linear-gradient(#000,transparent 95%)}button,select,input{font:inherit}button{cursor:pointer}a{color:inherit}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.skip-link{position:fixed;top:8px;left:8px;z-index:1000;padding:12px 16px;background:var(--gold2);color:#1f180c;border-radius:10px;transform:translateY(-140%)}.skip-link:focus{transform:none}.app-shell{width:min(1180px,calc(100% - 28px));margin:auto;padding:22px 0 max(42px,env(safe-area-inset-bottom));position:relative;z-index:1}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:16px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;min-width:0}.brand-logo{display:block;height:56px;width:auto;max-width:min(68vw,420px);filter:drop-shadow(0 10px 22px rgba(244,200,107,.08))}.brand-mark{width:45px;height:45px;border-radius:14px;display:grid;place-items:center;color:#271e0e;background:linear-gradient(145deg,var(--gold2),var(--gold));box-shadow:0 10px 30px rgba(244,200,107,.2);font-weight:900;font-size:23px}.brand-text strong{display:block;letter-spacing:.12em;font-size:14px}.brand-text small{color:var(--muted)}.top-actions{display:flex;align-items:center;gap:8px}.icon-btn,.profile-chip{height:44px;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.055);color:#fff}.icon-btn{width:44px}.profile-chip{display:flex;align-items:center;gap:7px;padding:0 13px}.screen{border:1px solid var(--border);background:linear-gradient(135deg,rgba(16,23,42,.97),rgba(10,15,29,.95));border-radius:30px;box-shadow:var(--shadow);overflow:hidden}.hero{padding:clamp(30px,5vw,64px)}.hero-copy{max-width:820px}.eyebrow,.section-kicker,.difficulty,.question-book,.mode-label{display:inline-flex;width:max-content;border-radius:999px;font-size:12px;font-weight:850;letter-spacing:.1em;text-transform:uppercase}.eyebrow{border:1px solid rgba(244,200,107,.25);background:rgba(244,200,107,.1);color:var(--gold2);padding:8px 12px}.hero h1,.results-screen h2,.dialog-card h2,.section-heading h2{font-family:Georgia,serif}.hero h1{font-size:clamp(46px,7vw,80px);line-height:.98;letter-spacing:-.045em;margin:23px 0}.gold-text{background:linear-gradient(90deg,#fff2c7,var(--gold),#efad49);background-clip:text;color:transparent}.hero-copy>p{color:var(--muted);font-size:18px;line-height:1.72;max-width:760px;margin:0 0 27px}.hero-actions,.result-actions,.dialog-actions,.data-actions{display:flex;gap:11px;flex-wrap:wrap}.primary-btn,.secondary-btn,.text-btn,.bookmark-btn,.file-label{border-radius:15px;min-height:50px;padding:0 20px;font-weight:850;border:1px solid var(--border);transition:transform .18s,border-color .18s,background .18s}.primary-btn{border-color:transparent;color:#231b0e;background:linear-gradient(135deg,var(--gold2),var(--gold));box-shadow:0 14px 36px rgba(244,200,107,.18)}.secondary-btn,.file-label{display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.05);color:#fff}.text-btn,.bookmark-btn{background:transparent;color:var(--gold2);min-height:auto;padding:8px 10px}.primary-btn:hover,.secondary-btn:hover,.icon-btn:hover,.profile-chip:hover,.answer-btn:hover,.file-label:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.24)}:focus-visible{outline:3px solid var(--gold2);outline-offset:3px}.hero-stats{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px;margin-top:34px}.hero-stats div,.metric-card,.result-stats article{padding:17px;border-radius:18px;border:1px solid var(--border);background:rgba(255,255,255,.04)}.hero-stats strong,.metric-card strong{display:block;color:#fff;font-size:24px}.hero-stats span,.metric-card span,.metric-card small{color:var(--muted);font-size:12px}.dashboard,.achievements{margin-top:48px;padding-top:32px;border-top:1px solid var(--border)}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px}.section-kicker{color:var(--gold);margin-bottom:5px}.section-heading h2{margin:0;font-size:clamp(27px,4vw,38px)}.dashboard-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.metric-card{min-height:126px}.metric-card strong{font-size:32px;margin:9px 0}.mini-track{height:7px;background:rgba(255,255,255,.08);border-radius:999px;overflow:hidden}.mini-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--blue),var(--gold));transition:width .4s}.count-pill{padding:7px 10px;border-radius:999px;background:rgba(113,141,255,.12);color:#b9c4ff;font-size:12px}.achievement-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.achievement-card{padding:16px;border:1px solid var(--border);border-radius:18px;background:rgba(255,255,255,.035);opacity:.48}.achievement-card.unlocked{opacity:1;background:linear-gradient(140deg,rgba(244,200,107,.12),rgba(113,141,255,.08));border-color:rgba(244,200,107,.25)}.achievement-icon{font-size:26px}.achievement-card strong{display:block;margin:8px 0 4px}.achievement-card small{color:var(--muted)}.quiz-screen{padding:clamp(20px,4vw,44px);min-height:680px}.quiz-head{display:grid;grid-template-columns:1fr auto 1fr;gap:16px;align-items:center;margin-bottom:24px}.round-label{display:block;color:var(--gold2);text-transform:uppercase;letter-spacing:.08em;font-size:12px;font-weight:850}.mode-label{color:#b5c0ff;margin-top:5px;padding:0}.progress-wrap{min-width:280px}.progress-meta{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin-bottom:8px}.progress-track{height:9px;border-radius:20px;background:rgba(255,255,255,.07);overflow:hidden}.progress-fill{height:100%;width:0;background:linear-gradient(90deg,var(--blue),var(--gold));transition:width .3s}.quiz-score{justify-self:end;text-align:right}.quiz-score span{display:block;color:var(--muted);font-size:12px}.quiz-score strong{font-size:23px}.question-panel{max-width:900px;margin:auto;text-align:center}.question-meta{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.difficulty{padding:7px 11px;color:#acb9ff;background:rgba(113,141,255,.11);border:1px solid rgba(113,141,255,.24)}.question-book{padding:7px 11px;color:var(--gold2);background:rgba(244,200,107,.08);border:1px solid rgba(244,200,107,.18)}.question-text{font-size:clamp(30px,4vw,49px);line-height:1.18;margin:21px auto 25px}.timer{width:75px;height:75px;margin:0 auto 23px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(var(--gold) var(--timer-angle,360deg),rgba(255,255,255,.08) 0)}.timer:before{content:"";position:absolute;inset:6px;border-radius:50%;background:#12182b}.timer span{z-index:1;font-size:23px;font-weight:900}.answer-grid{display:grid;gap:13px}.answer-btn{width:100%;min-height:68px;display:grid;grid-template-columns:43px 1fr 27px;gap:14px;align-items:center;text-align:left;padding:11px 17px 11px 12px;border-radius:18px;border:1px solid var(--border);background:rgba(255,255,255,.047);color:#fff;transition:.18s}.answer-btn:disabled{cursor:default;opacity:1}.answer-letter{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:rgba(255,255,255,.07);color:var(--gold2);font-weight:900}.answer-mark{font-size:21px;font-weight:900;opacity:0}.answer-btn.correct{border-color:rgba(91,215,166,.55);background:rgba(91,215,166,.12)}.answer-btn.correct .answer-mark{color:var(--green);opacity:1}.answer-btn.incorrect{border-color:rgba(255,124,140,.52);background:rgba(255,124,140,.1)}.answer-btn.incorrect .answer-mark{color:var(--red);opacity:1}.answer-btn.dimmed{opacity:.5}.feedback{text-align:left;margin:21px auto 0;padding:20px;border:1px solid var(--border);border-radius:18px;background:rgba(255,255,255,.045)}.feedback-title{font-weight:900;font-size:18px;margin-bottom:8px}.feedback p{margin:0;color:var(--muted);line-height:1.62}.reference{display:inline-flex;margin-top:12px;padding:7px 10px;border-radius:10px;background:rgba(244,200,107,.09);color:var(--gold2);font-size:13px;font-weight:850}.bookmark-btn{float:right;margin-top:8px}.quiz-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:25px;color:var(--muted);font-size:13px}.quiz-footer strong{color:var(--gold2)}.results-screen{padding:clamp(28px,5vw,62px)}.results-inner{max-width:950px;margin:auto;text-align:center}.result-ring{width:185px;height:185px;margin:12px auto 25px;border-radius:50%;display:grid;place-items:center;position:relative;background:conic-gradient(var(--gold) var(--result-angle,0deg),rgba(255,255,255,.08) 0);box-shadow:0 20px 55px rgba(244,200,107,.12)}.result-ring:before{content:"";position:absolute;inset:13px;border-radius:50%;background:#11172a}.result-ring div{z-index:1}.result-ring strong{display:block;font-size:48px}.result-ring span{color:var(--muted)}.results-screen h2{font-size:clamp(36px,5vw,57px);margin:0 0 11px}.result-message{max-width:700px;margin:0 auto 27px;color:var(--muted);font-size:17px;line-height:1.62}.result-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:27px 0}.result-stats strong{display:block;font-size:26px}.result-stats span{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}.new-achievements{padding:18px;border:1px solid rgba(244,200,107,.3);border-radius:18px;background:rgba(244,200,107,.08);margin:18px auto;max-width:760px}.result-actions{justify-content:center;margin:26px 0 34px}.review{text-align:left}.review h3{text-align:center;font-size:24px}.review-list{display:grid;gap:12px}.review-item{border:1px solid var(--border);border-radius:17px;background:rgba(255,255,255,.035);overflow:hidden}.review-item summary{cursor:pointer;padding:17px;font-weight:800;display:flex;justify-content:space-between;gap:14px}.review-body{padding:0 17px 17px}.review-body p{margin:6px 0;color:var(--muted);font-size:14px}.status-good{color:var(--green)}.status-bad{color:var(--red)}.app-splash{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 18%,rgba(244,200,107,.15),transparent 28%),linear-gradient(160deg,#060912,#0b1223 58%,#0e1730);transition:opacity .45s ease,visibility .45s ease}.app-splash.is-hidden{opacity:0;visibility:hidden;pointer-events:none}.app-splash-card{width:min(92vw,560px);padding:28px 24px;border:1px solid rgba(255,255,255,.1);border-radius:30px;background:linear-gradient(145deg,rgba(17,24,43,.96),rgba(9,14,27,.96));box-shadow:0 30px 90px rgba(0,0,0,.46);text-align:center}.app-splash-icon{display:block;width:min(140px,32vw);height:auto;margin:0 auto 18px;border-radius:28px;box-shadow:0 16px 40px rgba(0,0,0,.28)}.app-splash-logo{display:block;width:min(92%,430px);height:auto;margin:0 auto 14px}.app-splash-text{margin:0 0 16px;color:var(--muted);font-size:15px;line-height:1.5}.app-splash-spinner{width:42px;height:42px;margin:0 auto;border-radius:50%;border:3px solid rgba(255,255,255,.16);border-top-color:var(--gold);animation:bqspin .9s linear infinite}@keyframes bqspin{to{transform:rotate(360deg)}}.results-logo{display:block;width:min(92%,420px);height:auto;margin:18px auto 8px;filter:drop-shadow(0 8px 20px rgba(0,0,0,.24))}footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 4px 0;color:var(--muted);font-size:12px}footer nav{display:flex;gap:14px;flex-wrap:wrap}footer button,footer a{border:0;background:none;color:var(--muted);padding:0;text-decoration:underline}.app-dialog{width:min(680px,calc(100% - 28px));max-height:min(88vh,900px);border:1px solid var(--border);border-radius:25px;padding:0;background:#11182b;color:#fff;box-shadow:var(--shadow)}.wide-dialog{width:min(900px,calc(100% - 28px))}.app-dialog::backdrop{background:rgba(2,4,10,.76);backdrop-filter:blur(10px)}.dialog-card{padding:26px;overflow:auto;max-height:88vh}.dialog-head{display:flex;justify-content:space-between;align-items:start;gap:16px;margin-bottom:18px}.dialog-card h2{margin:0;font-size:34px}.close-btn{width:42px;height:42px;border-radius:12px;border:1px solid var(--border);background:rgba(255,255,255,.06);color:#fff;font-size:25px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid label,.inline-form label{font-weight:800}.form-grid select,.inline-form input{display:block;width:100%;margin-top:7px;padding:12px;border-radius:12px;border:1px solid var(--border);background:#19233d;color:#fff}.switch-list{margin-top:18px;border-top:1px solid var(--border)}.audio-mixer{display:grid;gap:12px;padding:16px 0;border-bottom:1px solid var(--border)}.volume-control{display:grid;gap:8px;padding:12px 14px;border:1px solid var(--border);border-radius:15px;background:rgba(255,255,255,.035)}.volume-control>span{display:flex;align-items:center;justify-content:space-between;gap:16px}.volume-control output{color:var(--gold2);font-weight:900;font-variant-numeric:tabular-nums}.volume-control input[type=range]{width:100%;height:8px;border-radius:999px;appearance:none;background:linear-gradient(90deg,var(--blue),var(--gold));outline:none}.volume-control input[type=range]::-webkit-slider-thumb{appearance:none;width:23px;height:23px;border-radius:50%;background:var(--gold2);border:3px solid #202944;box-shadow:0 3px 12px rgba(0,0,0,.35)}.volume-control input[type=range]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--gold2);border:3px solid #202944}.volume-control input[type=range]:focus-visible{outline:3px solid var(--gold2);outline-offset:4px}.switch-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:15px 0;border-bottom:1px solid var(--border)}.switch-row small{display:block;color:var(--muted);margin-top:3px}.switch-row input{appearance:none;width:52px;height:30px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid var(--border);position:relative;flex:0 0 auto}.switch-row input:before{content:"";position:absolute;width:22px;height:22px;border-radius:50%;top:3px;left:4px;background:#fff;transition:left .2s}.switch-row input:checked{background:rgba(91,215,166,.26)}.switch-row input:checked:before{left:25px;background:var(--green)}.form-note{color:var(--muted);font-size:13px;line-height:1.5}.dialog-actions{justify-content:flex-end;margin-top:20px}.profile-dialog{width:min(600px,calc(100% - 28px))}.profile-dialog .dialog-card{padding:26px 28px}.profile-dialog .dialog-head{align-items:center;margin-bottom:20px}.profile-dialog .dialog-head>div{min-width:0}.profile-dialog .dialog-head h2{font-size:clamp(34px,5vw,44px);line-height:1.05;letter-spacing:-.025em}.profile-dialog .close-btn{flex:0 0 auto}.profile-list{display:grid;gap:12px}.profile-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;min-height:78px;padding:15px 16px;border:1px solid var(--border);border-radius:17px;background:rgba(255,255,255,.025)}.profile-row.active{border-color:rgba(244,200,107,.5);background:linear-gradient(135deg,rgba(244,200,107,.09),rgba(113,141,255,.045))}.profile-details{min-width:0}.profile-details strong{display:block;margin:0 0 4px;font-size:19px;line-height:1.2;overflow-wrap:anywhere}.profile-details>span{display:block;color:var(--muted);font-size:14px;line-height:1.45}.profile-status{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 14px;border:1px solid rgba(244,200,107,.32);border-radius:999px;background:rgba(244,200,107,.1);color:var(--gold2);font-size:13px;font-weight:850;white-space:nowrap}.profile-switch{min-height:40px;padding:0 16px;white-space:nowrap}.profile-dialog .inline-form{margin-top:24px;padding-top:20px}.profile-dialog .inline-form label{display:block;font-size:18px}.profile-dialog .form-note{margin:18px 0 0;line-height:1.6}.inline-form{margin-top:20px;padding-top:18px;border-top:1px solid var(--border)}.inline-form>div{display:flex;gap:9px;margin-top:8px}.history-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}.history-summary div{padding:14px;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.04)}.history-list{display:grid;gap:10px}.history-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;padding:13px;border:1px solid var(--border);border-radius:14px}.history-row small{color:var(--muted)}.data-actions{margin:20px 0}.toast{position:fixed;bottom:max(24px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,18px);z-index:100;opacity:0;pointer-events:none;background:#171e34;border:1px solid var(--border);padding:12px 16px;border-radius:12px;box-shadow:var(--shadow);transition:.24s}.toast.show{opacity:1;transform:translate(-50%,0)}.confetti{position:fixed;width:10px;height:16px;top:-20px;z-index:60;pointer-events:none;animation:fall 3.2s linear forwards}@keyframes fall{to{transform:translate3d(var(--drift),110vh,0) rotate(720deg)}}.noscript{padding:20px;background:#7f1d1d;color:#fff;text-align:center}
@media(max-width:900px){.dashboard-grid,.achievement-grid{grid-template-columns:1fr 1fr}.quiz-head{grid-template-columns:1fr auto}.progress-wrap{grid-column:1/-1;grid-row:2;min-width:0}.quiz-score{grid-column:2;grid-row:1}.form-grid{grid-template-columns:1fr}.hero-stats{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.profile-dialog{width:min(100% - 18px,520px);max-height:calc(100dvh - 24px);border-radius:22px}.profile-dialog .dialog-card{max-height:calc(100dvh - 24px);padding:20px}.profile-dialog .dialog-head{gap:12px;margin-bottom:17px}.profile-dialog .dialog-head h2{font-size:clamp(30px,8.2vw,36px);white-space:nowrap}.profile-dialog .close-btn{width:44px;height:44px;border-radius:13px;font-size:23px}.profile-row{min-height:72px;padding:13px 14px;gap:10px}.profile-details strong{font-size:18px}.profile-details>span{font-size:13px}.profile-status{min-height:34px;padding:0 12px}.profile-switch{min-height:38px;padding:0 13px}.profile-dialog .inline-form{margin-top:20px;padding-top:18px}.profile-dialog .inline-form label{font-size:17px}.profile-dialog .form-note{font-size:13px;margin-top:16px}.app-shell{width:min(100% - 18px,1180px);padding-top:12px}.topbar{margin-bottom:12px}.brand-logo{height:48px;max-width:min(60vw,280px)}.brand-text small{display:none}.profile-chip span:last-child{display:none}.screen{border-radius:22px}.hero{padding:30px 20px}.hero h1{font-size:45px}.hero-copy>p{font-size:16px}.hero-actions{display:grid}.hero-actions>*{width:100%}.hero-stats{gap:8px}.hero-stats div{padding:13px}.hero-stats strong{font-size:21px}.dashboard,.achievements{margin-top:34px;padding-top:24px}.dashboard-grid,.achievement-grid{grid-template-columns:1fr 1fr;gap:8px}.metric-card{min-height:112px;padding:13px}.metric-card strong{font-size:26px}.section-heading{align-items:start}.section-heading h2{font-size:28px}.quiz-screen{padding:18px 13px 22px}.question-text{font-size:30px}.answer-btn{grid-template-columns:40px 1fr 22px;padding-right:12px}.quiz-footer{align-items:stretch;flex-direction:column}.next-btn{width:100%}.result-stats{grid-template-columns:1fr 1fr}.results-screen{padding:29px 15px}.result-actions{display:grid}.result-actions>*{width:100%}.review-item summary{flex-direction:column}.bookmark-btn{float:none;display:block;margin-top:14px}.dialog-card{padding:20px}.dialog-card h2{font-size:29px}.history-summary{grid-template-columns:1fr 1fr}.history-row{grid-template-columns:1fr auto}footer{flex-direction:column;text-align:center}.inline-form>div{flex-direction:column}}
@media(max-width:390px){.profile-dialog .dialog-card{padding:18px 16px}.profile-dialog .dialog-head h2{font-size:29px}.profile-row{padding:12px}.profile-details strong{font-size:17px}.profile-details>span{font-size:12.5px}.profile-status{padding:0 10px;font-size:12px}.profile-switch{padding:0 11px}.brand-logo{height:42px;max-width:min(58vw,220px)}.brand-mark{width:41px;height:41px}.icon-btn{width:41px;height:41px}.top-actions{gap:5px}.hero h1{font-size:41px}.dashboard-grid,.achievement-grid{grid-template-columns:1fr}.hero-stats{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}}body.reduce-motion *,body.reduce-motion *:before,body.reduce-motion *:after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}


/* Mobile viewport-fitting quiz layout */
@media (max-width:700px){
  body.quiz-mode:not(.quiz-answered){overflow:hidden}
  body.quiz-mode .app-shell{width:100%;padding:4px 7px max(4px,env(safe-area-inset-bottom))}
  body.quiz-mode .topbar{height:54px;margin:0 2px 4px;padding:0 2px;gap:7px}
  body.quiz-mode .brand-logo{height:36px;max-width:180px}
  body.quiz-mode .top-actions{gap:4px}
  body.quiz-mode .icon-btn,body.quiz-mode .profile-chip{height:38px;border-radius:11px}
  body.quiz-mode .icon-btn{width:38px}
  body.quiz-mode .profile-chip{width:38px;padding:0;justify-content:center}
  body.quiz-mode .profile-chip span{display:none}
  body.quiz-mode footer{display:none}
  body.quiz-mode main{height:calc(100dvh - 62px - env(safe-area-inset-bottom))}
  body.quiz-mode .quiz-screen{height:100%;min-height:0;padding:10px 10px 8px;border-radius:18px;overflow:hidden;display:flex;flex-direction:column}
  body.quiz-mode.quiz-answered main{height:auto;min-height:calc(100dvh - 62px)}
  body.quiz-mode.quiz-answered .quiz-screen{height:auto;min-height:calc(100dvh - 62px);overflow:visible}
  body.quiz-mode .quiz-head{grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;margin:0 0 7px;flex:0 0 auto}
  body.quiz-mode .quiz-head>div:first-child{min-width:0}
  body.quiz-mode .round-label{font-size:10px;line-height:1.15;letter-spacing:.07em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.quiz-mode .mode-label{font-size:9px;margin-top:2px}
  body.quiz-mode .quiz-score{grid-column:2;grid-row:1}
  body.quiz-mode .quiz-score span{font-size:10px}
  body.quiz-mode .quiz-score strong{font-size:20px;line-height:1}
  body.quiz-mode .progress-wrap{grid-column:1/-1;grid-row:2;min-width:0}
  body.quiz-mode .progress-meta{font-size:10px;margin-bottom:4px}
  body.quiz-mode .progress-track{height:6px}
  body.quiz-mode .question-panel{width:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto 1fr;column-gap:8px;align-content:start;flex:1 1 auto}
  body.quiz-mode .question-meta{grid-column:1;grid-row:1;justify-content:flex-start;gap:5px;min-width:0}
  body.quiz-mode .difficulty,body.quiz-mode .question-book{padding:4px 8px;font-size:9px;letter-spacing:.07em;white-space:nowrap;max-width:48vw;overflow:hidden;text-overflow:ellipsis}
  body.quiz-mode .timer{grid-column:2;grid-row:1;width:42px;height:42px;margin:0;align-self:start}
  body.quiz-mode .timer:before{inset:4px}
  body.quiz-mode .timer span{font-size:16px}
  body.quiz-mode .question-text{grid-column:1/-1;grid-row:2;font-size:clamp(19px,5.7vw,24px);line-height:1.08;margin:7px auto 8px;max-width:100%;text-wrap:balance}
  body.quiz-mode .answer-grid{grid-column:1/-1;grid-row:3;align-self:start;width:100%;gap:6px;margin:0}
  body.quiz-mode .answer-btn{min-height:48px;padding:5px 9px 5px 6px;grid-template-columns:34px minmax(0,1fr) 20px;gap:8px;border-radius:13px;font-size:14px;line-height:1.2}
  body.quiz-mode .answer-letter{width:32px;height:32px;border-radius:9px;font-size:14px}
  body.quiz-mode .answer-mark{font-size:17px}
  body.quiz-mode .quiz-footer{display:none;margin-top:7px}
  body.quiz-mode .quiz-footer:has(.next-btn:not([hidden])){display:flex;flex:0 0 auto}
  body.quiz-mode .quiz-footer .streak{display:none}
  body.quiz-mode .next-btn{min-height:44px;width:100%}
  body.quiz-mode .feedback{grid-column:1/-1;margin:7px 0 0;padding:12px;font-size:13px}
  body.quiz-mode .feedback-title{font-size:15px;margin-bottom:4px}
  body.quiz-mode .feedback p{line-height:1.4}
  body.quiz-mode .reference{margin-top:7px;padding:5px 7px;font-size:11px}
  body.quiz-mode .bookmark-btn{font-size:12px;padding:6px 7px;margin-top:7px}

  body.quiz-mode .quiz-screen.fit-compact .question-text{font-size:19px;line-height:1.05;margin:5px auto 6px}
  body.quiz-mode .quiz-screen.fit-compact .answer-btn{min-height:44px;font-size:13px;padding-top:4px;padding-bottom:4px}
  body.quiz-mode .quiz-screen.fit-compact .answer-letter{width:30px;height:30px}

  body.quiz-mode .quiz-screen.fit-tight .mode-label{display:none}
  body.quiz-mode .quiz-screen.fit-tight .quiz-head{margin-bottom:4px}
  body.quiz-mode .quiz-screen.fit-tight .question-text{font-size:17px;line-height:1.03;margin:4px auto 5px}
  body.quiz-mode .quiz-screen.fit-tight .difficulty,body.quiz-mode .quiz-screen.fit-tight .question-book{font-size:8px;padding:3px 6px}
  body.quiz-mode .quiz-screen.fit-tight .timer{width:36px;height:36px}
  body.quiz-mode .quiz-screen.fit-tight .timer span{font-size:14px}
  body.quiz-mode .quiz-screen.fit-tight .answer-grid{gap:4px}
  body.quiz-mode .quiz-screen.fit-tight .answer-btn{min-height:40px;font-size:12.5px;grid-template-columns:29px minmax(0,1fr) 18px;gap:7px}
  body.quiz-mode .quiz-screen.fit-tight .answer-letter{width:28px;height:28px;font-size:12px}

  body.quiz-mode .quiz-screen.fit-ultra{padding:7px 8px 6px}
  body.quiz-mode .quiz-screen.fit-ultra .question-meta{display:none}
  body.quiz-mode .quiz-screen.fit-ultra .timer{grid-column:2;grid-row:1;width:32px;height:32px}
  body.quiz-mode .quiz-screen.fit-ultra .question-text{grid-row:1;grid-column:1;font-size:15px;line-height:1.02;text-align:left;margin:0 0 4px}
  body.quiz-mode .quiz-screen.fit-ultra .answer-grid{grid-row:2;gap:3px}
  body.quiz-mode .quiz-screen.fit-ultra .answer-btn{min-height:36px;font-size:11.5px;padding:3px 7px 3px 4px;grid-template-columns:26px minmax(0,1fr) 16px;gap:6px;border-radius:10px}
  body.quiz-mode .quiz-screen.fit-ultra .answer-letter{width:25px;height:25px;border-radius:7px;font-size:11px}
}
@media (max-width:380px){
  body.quiz-mode .brand-logo{height:32px;max-width:145px}
  body.quiz-mode .topbar{height:49px}
  body.quiz-mode main{height:calc(100dvh - 57px - env(safe-area-inset-bottom))}
  body.quiz-mode .question-text{font-size:19px}
}


/* Mobile quiz balance and compact brand corrections */
.brand-compact{display:none;align-items:center;gap:8px;min-width:0}.brand-compact>img{width:38px;height:38px;border-radius:10px;flex:0 0 auto}.brand-compact>span{display:block;min-width:0}.brand-compact strong{display:block;color:var(--gold2);font-family:Georgia,serif;font-size:16px;line-height:1;letter-spacing:.04em;white-space:nowrap}.brand-compact small{display:block;color:var(--muted);font-size:7px;line-height:1.15;margin-top:3px;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
@media(max-width:700px){
  body.quiz-mode:not(.quiz-answered){overflow:hidden}
  body.quiz-mode .brand-logo-full{display:none}
  body.quiz-mode .brand-compact{display:flex}
  body.quiz-mode .profile-chip span:first-child{display:inline-flex!important;align-items:center;justify-content:center;font-size:20px;line-height:1}
  body.quiz-mode .profile-chip span:last-child{display:none!important}
  body.quiz-mode main{height:auto!important;min-height:0!important}
  body.quiz-mode .quiz-screen{height:auto!important;min-height:0!important;overflow:hidden;display:block!important;padding:10px 10px 9px}
  body.quiz-mode.quiz-answered main{height:auto!important;min-height:0!important}
  body.quiz-mode.quiz-answered .quiz-screen{height:auto!important;min-height:0!important;overflow:visible}
  body.quiz-mode .question-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto!important;align-content:start;flex:none!important;min-height:0}
  body.quiz-mode .question-meta{align-items:center;align-self:start;height:max-content;min-height:0}
  body.quiz-mode .difficulty,body.quiz-mode .question-book{height:auto;min-height:0;padding:4px 8px;line-height:1.15}
  body.quiz-mode .timer{align-self:center}
  body.quiz-mode .answer-grid{align-self:start}
  body.quiz-mode .answer-btn{min-height:45px;padding:5px 9px 5px 6px}
  body.quiz-mode .answer-letter{width:31px;height:31px}
}
@media(max-width:380px){
  body.quiz-mode .brand-compact>img{width:34px;height:34px}
  body.quiz-mode .brand-compact strong{font-size:14px}
  body.quiz-mode .brand-compact small{font-size:6px}
}


/* Mobile quiz header visibility correction */
@media(max-width:700px){
  body.quiz-mode .app-shell{
    padding-top:max(10px,env(safe-area-inset-top))!important;
  }
  body.quiz-mode .topbar{
    height:auto!important;
    min-height:54px;
    margin-top:0!important;
    padding-top:0!important;
    overflow:visible;
    flex:0 0 auto;
  }
  body.quiz-mode .brand,
  body.quiz-mode .brand-compact,
  body.quiz-mode .top-actions{
    align-self:center;
  }
}
@media(max-width:380px){
  body.quiz-mode .topbar{min-height:50px}
}


/* Explicit quiz exit control */
.quiz-exit-btn{display:none;align-items:center;justify-content:center;gap:7px;height:44px;padding:0 14px;border:1px solid rgba(244,200,107,.32);border-radius:14px;background:rgba(244,200,107,.08);color:var(--gold2);font-weight:850;white-space:nowrap;transition:transform .18s,border-color .18s,background .18s}
.quiz-exit-btn:hover{transform:translateY(-2px);border-color:rgba(244,200,107,.58);background:rgba(244,200,107,.14)}
body.quiz-mode .quiz-exit-btn{display:inline-flex}
body.quiz-mode .profile-chip{display:none!important}
.exit-quiz-dialog{width:min(560px,calc(100% - 28px))}
.exit-dialog-symbol{width:64px;height:64px;margin:2px auto 18px;border-radius:20px;display:grid;place-items:center;background:rgba(244,200,107,.1);border:1px solid rgba(244,200,107,.28);color:var(--gold2);font-size:34px;font-weight:900}
.exit-dialog-copy{max-width:470px;margin:0 auto;color:var(--muted);font-size:16px;line-height:1.65;text-align:center}
.exit-dialog-actions{justify-content:center;margin-top:24px}
.danger-btn{border-color:rgba(255,124,140,.36);color:#ffd7dc;background:rgba(255,124,140,.08)}
.danger-btn:hover{border-color:rgba(255,124,140,.62);background:rgba(255,124,140,.14)}
@media(max-width:600px){
  .quiz-exit-btn{height:42px;padding:0 11px;border-radius:13px;font-size:14px}
  body.quiz-mode .top-actions{gap:6px}
  .exit-dialog-actions{display:grid;grid-template-columns:1fr}
  .exit-dialog-actions>*{width:100%}
  .exit-dialog-copy{font-size:15px}
}
@media(max-width:360px){.quiz-exit-btn span:last-child{display:none}.quiz-exit-btn{width:41px;padding:0}}

/* Final mobile quiz header protection: fixed, compact and fully visible */
@media(max-width:700px){
  body.quiz-mode .app-shell{
    width:100%!important;
    padding:0 7px max(4px,env(safe-area-inset-bottom))!important;
  }
  body.quiz-mode .topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    z-index:900!important;
    width:100%!important;
    height:64px!important;
    min-height:64px!important;
    margin:0!important;
    padding:8px 12px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
    overflow:visible!important;
    transform:none!important;
    background:linear-gradient(90deg,rgba(9,15,31,.99),rgba(18,21,27,.99));
    border-bottom:1px solid rgba(255,255,255,.08);
    box-shadow:0 8px 24px rgba(0,0,0,.22);
  }
  body.quiz-mode main{
    padding-top:72px!important;
  }
  body.quiz-mode .brand{
    width:auto!important;
    max-width:150px!important;
    min-width:0!important;
    overflow:hidden!important;
  }
  body.quiz-mode .brand-compact{
    display:flex!important;
    width:auto!important;
    max-width:150px!important;
    height:38px!important;
    min-width:0!important;
    align-items:center!important;
    gap:8px!important;
    overflow:hidden!important;
  }
  body.quiz-mode .brand-compact>img{
    width:34px!important;
    height:34px!important;
    border-radius:9px!important;
    flex:0 0 34px!important;
  }
  body.quiz-mode .brand-compact>span{
    min-width:0!important;
    overflow:hidden!important;
  }
  body.quiz-mode .brand-compact strong{
    font-size:14px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.quiz-mode .brand-compact small{
    display:none!important;
  }
  body.quiz-mode .top-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:5px!important;
    height:44px!important;
    min-width:0!important;
    overflow:visible!important;
    flex:0 0 auto!important;
  }
  body.quiz-mode .quiz-exit-btn,
  body.quiz-mode .icon-btn{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    padding:0!important;
    border-radius:12px!important;
  }
  body.quiz-mode .quiz-exit-btn span:last-child{
    display:none!important;
  }
}
@media(max-width:370px){
  body.quiz-mode .topbar{padding-left:8px!important;padding-right:8px!important;gap:5px!important}
  body.quiz-mode .brand{max-width:124px!important}
  body.quiz-mode .brand-compact{max-width:124px!important;gap:6px!important}
  body.quiz-mode .brand-compact>img{width:30px!important;height:30px!important;flex-basis:30px!important}
  body.quiz-mode .brand-compact strong{font-size:13px!important}
  body.quiz-mode .top-actions{gap:4px!important}
  body.quiz-mode .quiz-exit-btn,body.quiz-mode .icon-btn{width:38px!important;height:38px!important;min-width:38px!important}
}

/* Bible Quiz International language controls */
.language-gate{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 10%,rgba(79,104,196,.28),transparent 38%),rgba(5,8,18,.96);backdrop-filter:blur(18px)}
.language-gate-card{width:min(560px,100%);padding:34px;border:1px solid rgba(244,200,107,.34);border-radius:28px;background:linear-gradient(145deg,rgba(20,27,50,.98),rgba(8,12,25,.98));box-shadow:0 28px 90px rgba(0,0,0,.55);text-align:center}
.language-gate-card>img{width:88px;height:88px;border-radius:22px;box-shadow:0 15px 40px rgba(0,0,0,.35)}
.language-gate-kicker{display:block;margin-top:18px;color:var(--gold);font-size:.78rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase}
.language-gate h1{margin:12px 0 10px;font-size:clamp(1.85rem,6vw,3rem);line-height:1.08}.language-gate h1 span{color:var(--gold)}
.language-gate p{margin:0 auto 24px;max-width:430px;color:var(--muted);line-height:1.65}
.language-gate-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.language-gate-actions button{display:grid;gap:4px;padding:18px;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:rgba(255,255,255,.055);color:var(--text);cursor:pointer;transition:.2s ease}
.language-gate-actions button:hover,.language-gate-actions button:focus-visible{transform:translateY(-2px);border-color:var(--gold);background:rgba(244,200,107,.1);outline:none}
.language-gate-actions strong{font-size:1.14rem}.language-gate-actions small{color:var(--muted)}
.language-setting{order:-10}.language-quick-select{min-height:42px;padding:0 34px 0 12px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:var(--panel);color:var(--text)}
@media(max-width:560px){.language-gate-card{padding:26px 18px}.language-gate-actions{grid-template-columns:1fr}.language-gate-card>img{width:72px;height:72px}}

/* Mobile full-logo visibility fix — 27 July 2026 */
@media (max-width:700px){
  body.quiz-mode .brand{
    max-width:164px!important;
    overflow:visible!important;
  }
  body.quiz-mode .brand-logo-full{
    display:block!important;
    width:auto!important;
    height:46px!important;
    max-width:160px!important;
    object-fit:contain!important;
    object-position:left center!important;
    filter:drop-shadow(0 4px 12px rgba(244,200,107,.2))!important;
  }
  body.quiz-mode .brand-compact{
    display:none!important;
  }
}
@media (max-width:370px){
  body.quiz-mode .brand{max-width:138px!important}
  body.quiz-mode .brand-logo-full{
    height:40px!important;
    max-width:136px!important;
  }
}
/* End mobile full-logo visibility fix */


/* Clean icon-and-text brand lockup — Bible Quiz International */
.brand-logo-full,.app-splash-logo{display:none!important}
.brand .brand-compact{display:flex!important;align-items:center;gap:10px;min-width:0;max-width:none!important}
.brand .brand-compact>img{display:block;width:48px;height:48px;object-fit:contain;border-radius:13px;flex:0 0 48px;filter:drop-shadow(0 5px 14px rgba(0,0,0,.3))}
.brand .brand-compact>span{display:block;min-width:0}
.brand .brand-compact strong{display:block;color:var(--gold2);font-family:Georgia,serif;font-size:18px;line-height:1.02;letter-spacing:.065em;white-space:nowrap}
.brand .brand-compact small{display:block;color:var(--muted);font-size:8px;line-height:1.2;margin-top:4px;letter-spacing:.19em;white-space:nowrap}
.app-splash-brand{display:grid;place-items:center;gap:14px;margin:0 auto 20px}
.app-splash-brand .app-splash-icon{display:block;width:min(148px,34vw);height:auto;margin:0;border-radius:28px;box-shadow:0 16px 40px rgba(0,0,0,.28)}
.app-brand-title{text-align:center}
.app-brand-title strong{display:block;color:var(--gold2);font-family:Georgia,serif;font-size:clamp(19px,4.5vw,30px);line-height:1.1;letter-spacing:.08em}
.app-brand-title small{display:block;margin-top:7px;color:var(--muted);font-size:clamp(8px,2vw,11px);letter-spacing:.18em}
.results-brand{display:grid;place-items:center;gap:10px;margin:18px auto 12px}
.results-brand>img{display:block;width:88px;height:88px;object-fit:contain;border-radius:22px;filter:drop-shadow(0 10px 24px rgba(0,0,0,.3))}
.language-gate-card>img{object-fit:contain;background:transparent}
body.quiz-mode .brand{max-width:182px!important;overflow:visible!important;flex:1 1 auto}
body.quiz-mode .brand .brand-compact{display:flex!important;max-width:182px!important;gap:8px!important}
body.quiz-mode .brand .brand-compact>img{width:38px!important;height:38px!important;flex-basis:38px!important;border-radius:10px!important}
body.quiz-mode .brand .brand-compact strong{font-size:15px!important;letter-spacing:.045em!important}
body.quiz-mode .brand .brand-compact small{font-size:6.5px!important;letter-spacing:.16em!important;margin-top:3px!important}
@media(max-width:600px){
  .brand .brand-compact>img{width:42px;height:42px;flex-basis:42px}
  .brand .brand-compact strong{font-size:16px}
  .brand .brand-compact small{font-size:7px}
  .app-brand-title-splash strong{font-size:clamp(18px,5vw,25px)}
}
@media(max-width:390px){
  body.quiz-mode .brand{max-width:139px!important}
  body.quiz-mode .brand .brand-compact{max-width:139px!important;gap:6px!important}
  body.quiz-mode .brand .brand-compact>img{width:32px!important;height:32px!important;flex-basis:32px!important}
  body.quiz-mode .brand .brand-compact strong{font-size:13px!important}
  body.quiz-mode .brand .brand-compact small{font-size:5.5px!important;letter-spacing:.12em!important}
}
/* End clean icon-and-text brand lockup */
