/* LearnFlow V6 — Modern Glow app refinements; layout-only */
:root{--lf-surface:#23232b;--lf-edge:#59416f;--lf-glow:#a855f7}
body{background:radial-gradient(ellipse 68% 280px at 50% -80px,#7c3aed24,transparent),#0b0b0f}
.wrap{max-width:1160px;padding-top:28px}
.head{border-bottom:1px solid #34283f;padding:14px 4px 23px;margin-bottom:28px;gap:16px}
.head .brand{font-size:30px;letter-spacing:-1.4px}
main>h1,.section>h2{letter-spacing:-.035em}
main>h1{font-size:clamp(25px,3vw,35px)}
.panel,.module{background:linear-gradient(150deg,#27222f,#1d1a24 85%);border:1px solid #4b3b59;border-radius:23px;box-shadow:0 14px 46px #0003}
.panel h2{font-size:20px;letter-spacing:-.4px}
.hero{padding:33px;background:radial-gradient(ellipse at 85% 20%,#8b5cf627,transparent 55%),linear-gradient(125deg,#30203f,#17121d);border:1px solid #79509b;box-shadow:0 20px 60px #6d28d917}
.hero h1{font-size:clamp(28px,3.4vw,39px);line-height:1.14;margin:18px 0;letter-spacing:-1px}
.hero .tag{background:#4d2b6c;color:#eed9ff;font-weight:750;letter-spacing:.7px}
.statrow{gap:14px}
.stat{background:#17121f;border:1px solid #443351;padding:19px;border-radius:17px}
.num{font-size:clamp(21px,3vw,30px);color:#ca99ff}
.modules{gap:18px;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr))}
.module{min-height:0;padding:25px}
.module:hover{border-color:#a855f7;box-shadow:0 16px 45px #7c3aed25}
.module-head{gap:14px}.module-head h3{font-size:19px}
.module-symbol{border:1px solid #794599;background:linear-gradient(135deg,#462861,#2b1b3b);border-radius:18px}
.module-footer{align-items:flex-end}.module-info{color:#c6b7d0}
.module-ring{box-shadow:0 0 24px #a855f71b}
.btn{border-radius:13px;min-height:43px}.btn.alt{background:#30283b;border:1px solid #634e79}
.btn.ghost{background:transparent;border:1px solid #685277}
.field{background:#17131f;border:1px solid #544363;border-radius:12px;color:#f4eef9;min-height:45px}
.field:focus-visible,.btn:focus-visible,.choice:focus-visible{outline:2px solid #c084fc;outline-offset:2px}
#quiz .panel{background:linear-gradient(145deg,#292234,#19151f);border:1px solid #694a80;box-shadow:0 16px 45px #0004}
#quiz .row .tag{background:#44265a}
#questionText{font-size:clamp(23px,2.8vw,31px);line-height:1.42;letter-spacing:-.5px;margin:25px 0 15px}
#instruction{color:#bbaac8}
.choices{gap:12px}
.choice{border:1px solid #574665;background:#2b2634;border-radius:15px;min-height:63px;padding:17px 20px;line-height:1.45;transition:background .15s,border-color .15s}
.choice:hover:not(:disabled){border-color:#b57cf4;background:#382b48}
.choice.selected{border-color:#b988f5;background:#46305e}
.choice.good{background:#19382c;border-color:#4ade80}.choice.bad{background:#44232f;border-color:#fb7185}
#feedback{border-radius:17px;border-color:#73538d}
#stats>.panel,#profile>.panel{padding:26px}
#topicStats>.progress{height:10px}
#cloudHistoryDetails>summary{background:#292235;border:1px solid #504062;padding:16px!important;border-radius:13px}
#cloudHistoryDetails[open]>summary{border-color:#9055c2;margin-bottom:12px}
#cloudHistory article{margin:12px 0;background:#211c28;box-shadow:none}
.nav{background:#15121bf2;border-top:1px solid #493551;box-shadow:0 -8px 24px #0004;backdrop-filter:blur(18px);padding:12px 8px max(12px,env(safe-area-inset-bottom))}
.nav button{min-width:72px;min-height:48px;border-radius:12px;transition:background .15s}
.nav button.active{background:#352343;color:#dab5ff;font-weight:750}
.nav button:hover{background:#292033}
@media(max-width:650px){.wrap{padding:14px 14px 115px}.head{padding:10px 0 18px;margin-bottom:22px}.head .brand{font-size:25px}.hero{padding:23px 19px}.hero h1{font-size:28px}.panel{padding:19px}.statrow{gap:7px}.stat{padding:12px 9px}.num{font-size:21px}.modules{grid-template-columns:1fr;gap:13px}.module{padding:19px}.module-head h3{font-size:18px}#quiz>.panel{padding:19px!important}#questionText{font-size:23px}.choice{padding:15px;min-height:58px}#stats>.panel,#profile>.panel{padding:19px}.nav button{min-width:66px;width:auto;flex:1;font-size:12px}}
@media(prefers-reduced-motion:reduce){.choice,.nav button{transition:none}}

/* V6.2 — refined premium design system */
:root{--accent:#a855f7;--violet:#7c3aed;--edge:rgba(178,133,226,.19)}
html{background:#09090e}body{font-feature-settings:"ss01" on;background:radial-gradient(ellipse 650px 320px at 55% -150px,#7c3aed22,transparent),#09090e;color:#faf9ff}
.wrap{max-width:1180px}
.head{border-bottom:1px solid #ffffff10;margin-bottom:35px}
.brand{font-size:32px!important;letter-spacing:-1.6px!important}
.panel,.module{border:1px solid var(--edge);background:linear-gradient(135deg,#211d28 0%,#19161f 100%);border-radius:24px;box-shadow:0 15px 55px #0004;transition:box-shadow .22s,border-color .22s,transform .22s}
.panel:hover{border-color:#8b5cf74a}
.hero{position:relative;isolation:isolate;background:linear-gradient(120deg,#332046 0%,#21182e 49%,#17141f 100%);overflow:hidden;padding:38px 38px 32px!important;border-color:#a855f755;box-shadow:0 20px 70px #7c3aed21}
.hero:before{content:"";position:absolute;z-index:-1;right:-15%;top:-95%;width:70%;height:230%;border-radius:50%;background:radial-gradient(circle,#a855f738,transparent 68%);pointer-events:none}
.hero h1{font-weight:850;letter-spacing:-1.25px}
.hero>p{color:#d1c4dc}
.statrow .stat{background:#140f1da9;border:1px solid #ba8cff18}
.statrow .num{background:linear-gradient(125deg,#efd8ff,#b46dff);background-clip:text;color:transparent;font-weight:900;letter-spacing:-.7px}
.progress{background:#45364e}
.progress>div{background:linear-gradient(90deg,#7c3aed,#bb6af9)}
.section>h2{font-size:clamp(21px,2.5vw,27px);margin:30px 0 18px}
.modules{gap:18px}
.module{background:linear-gradient(140deg,#282230 0%,#19171f 100%);padding:25px;border-color:#ae79df30;overflow:hidden}
.module:hover{transform:translateY(-3px);border-color:#ab74eb93;box-shadow:0 20px 60px #6d28d92b}
.module-symbol{border-radius:17px;box-shadow:inset 0 1px 0 #ffffff15}
.module-head h3{font-size:20px;font-weight:820}
.module-info{letter-spacing:.05px}
.module-footer{margin-top:20px}
.btn{font-weight:760;box-shadow:none}
.btn:not(.alt):not(.ghost){background:linear-gradient(110deg,#7825e7,#b34eff);box-shadow:0 10px 30px #7c3aed3d}
.btn:not(:disabled):hover{filter:brightness(1.12)}
.btn.alt,.btn.ghost{background:#2e2539;border:1px solid #755b8b}
#quiz>.panel{border-radius:26px;background:linear-gradient(140deg,#292333,#1a1720 85%);padding:32px!important}
#questionText{line-height:1.38;max-width:950px;font-weight:820}
.choices{gap:13px;margin:28px 0}
.choice{border:1px solid #665572b0;background:#302b36;border-radius:15px;min-height:65px;padding:17px 21px;box-shadow:inset 0 1px 0 #ffffff08}
.choice:not(:disabled):hover{background:#3b3048;border-color:#bb8dec}
.choice.selected{background:#53326b;border-color:#ca9cfb;box-shadow:0 0 0 1px #c28cf850}
.choice.good{background:#1c4334;border-color:#54cc87}
.choice.bad{background:#492432;border-color:#fd7695}
#feedback,.hint{border-radius:17px}
#stats>.panel,#profile>.panel{border-color:#ae79df26}
#stats h2,#profile h2{letter-spacing:-.45px}
#cloudHistoryDetails>summary{border-color:#71518555!important;background:#2c2434!important;transition:background .2s}
#cloudHistoryDetails>summary:hover{background:#372844!important}
.nav{background:#121018eF;border-color:#ffffff18;box-shadow:0 -10px 40px #0008;gap:3px}
.nav button{font-size:13px;font-weight:600;color:#bcb1c6;max-width:150px}
.nav button.active{background:#57317c6b;color:#e4bbff}
@media(min-width:900px){.wrap{padding-left:32px;padding-right:32px}#home>.panel:not(.hero){padding:30px}}
@media(max-width:650px){.hero{padding:23px 17px!important}.hero h1{font-size:27px}.module{padding:19px}#quiz>.panel{padding:19px!important}.choice{min-height:59px;padding:15px}.head{margin-bottom:22px}.statrow .stat{padding:10px 8px}.nav{gap:0}}

/* Header correction: account actions on the right, centered admin control unobstructed */
.head{display:flex!important;position:relative!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;min-height:78px}
.head>div:first-child{margin-right:auto!important;flex:0 1 auto;min-width:0}
.head>button:not(#snakeStar){position:relative!important;left:auto!important;right:auto!important;transform:none!important;flex:0 0 auto;z-index:1;white-space:nowrap}
.head>#snakeStar{position:absolute!important;left:50%!important;top:50%!important;right:auto!important;transform:translate(-50%,-50%)!important;z-index:5!important;margin:0!important;min-width:46px;min-height:46px;display:grid;place-items:center}
.head>#snakeStar[hidden],.head>#snakeStar[disabled]{display:none!important}
@media(max-width:700px){.head{flex-wrap:wrap!important;row-gap:12px!important;padding-bottom:16px!important}.head>div:first-child{flex:1 1 100%!important;padding-right:0}.head>button:not(#snakeStar){margin-left:0!important}.head>button:not(#snakeStar):first-of-type{margin-left:auto!important}.head>#snakeStar{top:30px!important;left:50%!important}}
@media(max-width:420px){.head>div:first-child{padding-right:52px!important}.head>#snakeStar{top:26px!important}.head>button:not(#snakeStar){font-size:11px!important;padding:9px!important}}

/* Cross-device finish: keep long questions, account controls and tables readable */
#home,#quiz,#stats,#profile{min-width:0;overflow-wrap:break-word}
#home .panel,#stats .panel,#profile .panel,#quiz .panel{min-width:0}
#quiz .choice{text-align:left;white-space:normal;overflow-wrap:anywhere}
#quiz #questionText{overflow-wrap:break-word;hyphens:auto}
#stats .row,#profile .row{flex-wrap:wrap;gap:10px}
#stats .panel{max-width:100%}
#stats select,#profile input,#profile select,#profile textarea{max-width:100%}
#cloudHistory article p{overflow-wrap:anywhere;line-height:1.6}
#cloudHistoryDetails summary{cursor:pointer;user-select:none}
#v5Favorites{display:flex;flex-wrap:wrap;gap:8px}
#v5Favorites button{max-width:100%;white-space:normal;text-align:left}
.lf-v5-insights summary{padding:8px 0;color:#d8b4fe}
.head>button{touch-action:manipulation}
@media(max-width:650px){#quiz .row{align-items:flex-start;gap:7px}#quiz .choice{font-size:15px}#stats>.statrow{grid-template-columns:repeat(3,minmax(0,1fr))}.panel .row{min-width:0}#profile .field{width:100%}}
@media(max-width:380px){.wrap{padding-inline:10px}#quiz>.panel{padding:14px!important}.nav button{font-size:11px;min-width:0}.module{padding:15px}}
