*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:#f6f1e7;color:#1d2b28;-webkit-font-smoothing:antialiased}
button{font:inherit;cursor:pointer}
input,textarea{font:inherit}
.mk-bar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 18px;background:#13231f;color:#e9e2d3;font-size:14px}
.mk-bar b{color:#F2C14E;font-weight:800;letter-spacing:.02em}
.mk-bar .mk-note{opacity:.75}
.mk-bar .mk-sp{flex:1}
.mk-tog{display:flex;background:#22362f;border-radius:999px;padding:3px}
.mk-tog button{border:0;background:none;color:#cfe0d6;padding:7px 16px;border-radius:999px;font-weight:700}
.mk-tog button.on{background:#F2C14E;color:#22180a}
.mk-reset{border:1px solid rgba(255,255,255,.3);background:none;color:#e9e2d3;border-radius:999px;padding:6px 14px}
.wrap{max-width:1120px;margin:0 auto;padding:28px 20px 60px}
.h-kick{font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#2f6f62}
h1,h2,h3{margin:0;line-height:1.15}
h1{font-size:34px;font-weight:900;letter-spacing:-.01em}
h2{font-size:24px;font-weight:850}
h3{font-size:18px;font-weight:800}
p{line-height:1.55}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:0;border-radius:14px;padding:13px 22px;font-weight:800;font-size:16px;background:#e0645a;color:#fff;box-shadow:0 3px 0 #b84a41}
.btn:hover{filter:brightness(1.05)}
.btn.ghost{background:#fff;color:#1d2b28;box-shadow:0 0 0 1.5px #d7cdb8 inset}
.btn.dark{background:#1b4d43;box-shadow:0 3px 0 #0f312a}
.btn.gold{background:#F2C14E;color:#2a1d08;box-shadow:0 3px 0 #c49421}
.btn.sm{padding:8px 14px;font-size:14px;border-radius:11px}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.card{background:#fff;border-radius:20px;box-shadow:0 1px 0 #e6dccb,0 10px 30px rgba(40,30,10,.06);padding:26px}
.center{display:grid;place-items:center;min-height:calc(100vh - 60px);padding:30px 16px}
.night{background:radial-gradient(ellipse at 30% 20%,#2c4a40 0,#14231f 60%,#0d1714 100%);color:#efe7d6}
.night .card{background:#fbf7ef;color:#1d2b28}
.signin{max-width:440px;width:100%;text-align:center}
.signin .logo{width:58px;height:58px;border-radius:50%;background:#1b4d43;display:grid;place-items:center;margin:0 auto 14px}
.signin h1{font-size:28px;margin-bottom:6px}
.signin p{color:#4a5a56;margin:0 0 22px}
.gbtn{width:100%;display:flex;align-items:center;justify-content:center;gap:12px;padding:13px;border-radius:12px;border:1.5px solid #d9d2c3;background:#fff;font-weight:700;font-size:16px;color:#1f1f1f}
.gbtn:hover{background:#f7f4ee}
.or{display:flex;align-items:center;gap:10px;color:#8a8f86;font-size:13px;margin:16px 0}
.or:before,.or:after{content:"";flex:1;height:1px;background:#e2dccf}
.fine{font-size:13px;color:#6d756f;margin-top:16px;line-height:1.5}
.codein{width:100%;font-size:26px;letter-spacing:.18em;text-align:center;text-transform:uppercase;padding:14px;border-radius:14px;border:2px solid #d7cdb8;background:#fff;font-weight:800;color:#1b4d43}
.codein:focus{outline:none;border-color:#2f6f62;box-shadow:0 0 0 4px rgba(47,111,98,.15)}
.hint{display:inline-block;margin-top:10px;font-size:13px;color:#2f6f62;background:#e6eee8;border-radius:999px;padding:4px 12px}
.err{color:#b84a41;font-weight:700;font-size:14px;margin-top:10px}
.classok{display:flex;gap:14px;align-items:center;text-align:left;background:#e9f2ec;border-radius:14px;padding:14px 16px;margin:16px 0}
.classok .ck{width:34px;height:34px;border-radius:50%;background:#2f6f62;color:#fff;display:grid;place-items:center;font-weight:900;flex:none}
/* avatar builder */
.ab{display:grid;grid-template-columns:minmax(0,400px) minmax(0,1fr);gap:26px;align-items:start}
.ab-prev{position:sticky;top:76px;background:radial-gradient(ellipse at 50% 35%,#4a2c1c 0,#24150d 70%);border-radius:24px;padding:18px;text-align:center;color:#f2e6cf}
.ab-prev svg{width:100%;height:auto;display:block}
.ab-prev .nick{font-weight:900;font-size:20px;margin-top:6px}
.ab-prev .sub{font-size:13px;opacity:.7}
.opt{margin-bottom:20px}
.opt h3{font-size:15px;margin-bottom:9px;display:flex;align-items:center;gap:8px}
.opt h3 small{font-weight:600;color:#6d756f;font-size:13px}
.sw{display:flex;flex-wrap:wrap;gap:9px}
.sw button{width:38px;height:38px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1.5px #d7cdb8}
.sw button.on{box-shadow:0 0 0 3px #1b4d43}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:1.5px solid #d7cdb8;background:#fff;border-radius:12px;padding:8px 13px;font-weight:700;font-size:14px;color:#2b3a36;display:inline-flex;align-items:center;gap:7px}
.chip.on{background:#1b4d43;border-color:#1b4d43;color:#fff}
.chip.lock{color:#9a9a90;background:#f4f1ea;border-style:dashed}
.chip .pts{font-size:12px;font-weight:800;color:#b07d10}
.chip.on .pts{color:#F2C14E}
.tile-ic{display:inline-block;width:30px;height:30px}
.freenote{background:#e9f2ec;color:#1b4d43;border-radius:14px;padding:12px 16px;font-size:14px;font-weight:600;margin-bottom:20px}
.nickin{width:100%;padding:12px 14px;border-radius:12px;border:2px solid #d7cdb8;font-size:17px;font-weight:700}
.sugg{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.sugg button{border:0;background:#f1ece2;border-radius:999px;padding:5px 11px;font-size:13px;font-weight:700;color:#3e4f4b}
/* lounge */
.lounge-page{background:#140d09;color:#f2e6cf;min-height:calc(100vh - 46px)}
.lounge-page .wrap{padding-top:18px}
.lz-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}
.lz-top .who{display:flex;align-items:center;gap:10px;font-weight:800;font-size:18px}
.lz-top .who svg{width:44px;height:44px;border-radius:50%;background:#3a2417}
.lz-top .sp{flex:1}
.pts-badge{display:inline-flex;align-items:center;gap:8px;background:#F2C14E;color:#2a1d08;font-weight:900;border-radius:999px;padding:7px 15px;font-size:16px}
.pts-badge i{width:18px;height:18px;border-radius:50%;background:#fff3c4;box-shadow:inset 0 0 0 3px #d9a320;display:inline-block}
.lz-btn{border:1px solid rgba(242,230,207,.3);background:rgba(255,255,255,.06);color:#f2e6cf;border-radius:12px;padding:9px 15px;font-weight:800;font-size:14px}
.lz-btn:hover{background:rgba(255,255,255,.12)}
.scene{border-radius:22px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.5);position:relative}
.scene svg{display:block;width:100%;height:auto}
.flame{transform-origin:50% 100%;transform-box:fill-box;animation:fl 1.6s ease-in-out infinite alternate}
.flame.f2{animation-duration:1.1s;animation-delay:-.4s}
.flame.f3{animation-duration:1.9s;animation-delay:-.9s}
@keyframes fl{0%{transform:scale(1,1);opacity:.95}50%{transform:scale(.92,1.08);opacity:1}100%{transform:scale(1.05,.9);opacity:.85}}
.twinkle{animation:tw 2.4s ease-in-out infinite alternate}
@keyframes tw{from{opacity:.55}to{opacity:1}}
.newpop{animation:pop .7s ease-out both}
@keyframes pop{0%{opacity:0;transform:translateY(-14px) scale(.8)}100%{opacity:1;transform:none}}
.shelf-h{display:flex;align-items:baseline;gap:12px;margin:26px 0 10px}
.shelf-h h2{font-size:21px;color:#f7ecd6}
.shelf-h span{color:#bfae92;font-size:14px}
.covers{display:flex;gap:16px;overflow-x:auto;padding:4px 2px 14px}
.cov{flex:none;width:150px;border:0;background:none;padding:0;text-align:left;color:#f2e6cf}
.cov img{width:150px;height:194px;object-fit:cover;border-radius:8px;box-shadow:0 10px 20px rgba(0,0,0,.5);display:block}
.cov b{display:block;font-size:14px;margin-top:8px}
.cov small{color:#bfae92;font-size:12px}
.cov .tag{display:inline-block;margin-top:4px;font-size:11px;font-weight:800;border-radius:999px;padding:2px 8px;background:#3d2a1c;color:#e9d7b5}
.cov .tag.done{background:#F2C14E;color:#2a1d08}
.unl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.unl .u{background:rgba(255,255,255,.05);border:1px solid rgba(242,230,207,.14);border-radius:16px;padding:14px;display:flex;gap:12px;align-items:center}
.unl .u svg{width:54px;height:54px;flex:none;background:#2a1a10;border-radius:12px}
.unl .u b{display:block;font-size:15px}
.unl .u small{color:#bfae92;font-size:13px}
.bar{height:8px;border-radius:99px;background:rgba(255,255,255,.12);margin-top:7px;overflow:hidden}
.bar i{display:block;height:100%;background:#F2C14E;border-radius:99px}
/* reader */
.rd-page{background:#efe7d6;min-height:calc(100vh - 46px)}
.rd-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.vers{display:flex;align-items:center;gap:4px;background:#fff;border-radius:14px;padding:6px 8px;box-shadow:0 1px 0 #ddd2bd}
.vers span{font-size:13px;color:#6d756f;margin:0 6px 0 4px}
.vers button{width:34px;height:34px;border-radius:10px;border:0;background:none;font-weight:900;color:#2b3a36}
.vers button.on{background:#1b4d43;color:#fff}
.book{background:#fffaf0;border-radius:6px;box-shadow:0 0 0 10px #1d3f3a,0 24px 50px rgba(0,0,0,.25);display:grid;grid-template-columns:1fr 1fr;min-height:470px;margin:10px 10px 0}
.book .pg{padding:34px 38px;font-family:Georgia,"Times New Roman",serif;font-size:19px;line-height:1.6;color:#2a241c;position:relative}
.book .pg:first-child{border-right:1px solid #e8dcc4;background:linear-gradient(90deg,#fffaf0 85%,#f3e9d6)}
.book .pg:last-child{background:linear-gradient(270deg,#fffaf0 85%,#f3e9d6)}
.book p{margin:0 0 14px;position:relative}
.book .pn{position:absolute;left:-22px;top:4px;font-family:ui-sans-serif,system-ui;font-size:10px;color:#b3a588}
.book .run{text-align:center;font:600 10px/1 ui-sans-serif,system-ui;letter-spacing:.2em;color:#b3a588;margin-bottom:18px;text-transform:uppercase}
.book .vw{border-bottom:1.5px dotted #2f6f62;cursor:help}
.rd-nav{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:22px}
.rd-nav .pgc{font-weight:800;color:#5c665f}
.mnote{background:#fff7dc;border:1px dashed #d9b44a;color:#6b5210;border-radius:12px;padding:9px 13px;font-size:13px;font-weight:600}
/* quiz */
.qz{max-width:760px;margin:0 auto}
.qz .q{margin-top:18px}
.qz .qn{font-size:13px;font-weight:800;color:#2f6f62;letter-spacing:.08em;text-transform:uppercase}
.qz .qt{font-size:20px;font-weight:800;margin:6px 0 14px;line-height:1.35}
.ans{display:grid;gap:10px}
.ans button{text-align:left;border:2px solid #e2d9c6;background:#fff;border-radius:14px;padding:13px 16px;font-size:16px;font-weight:650;color:#22302c;display:flex;gap:12px;align-items:center}
.ans button .l{width:28px;height:28px;border-radius:9px;background:#f1ece2;display:grid;place-items:center;font-weight:900;flex:none}
.ans button:hover:not([disabled]){border-color:#2f6f62}
.ans button.ok{border-color:#2f8a5c;background:#ecf8f0}
.ans button.ok .l{background:#2f8a5c;color:#fff}
.ans button.no{border-color:#e0a49e;background:#fdf1ef;opacity:.75}
.ans button[disabled]{cursor:default}
.fb{margin-top:12px;border-radius:12px;padding:11px 14px;font-weight:700;font-size:15px}
.fb.ok{background:#ecf8f0;color:#1f6b45}
.fb.no{background:#fff5df;color:#7a5410}
.fb .look{display:block;margin-top:8px;font-family:Georgia,serif;font-weight:400;font-size:16px;background:#fff;border-radius:10px;padding:10px 12px;color:#2a241c;line-height:1.5}
.linkbtn{border:0;background:none;color:#1b4d43;font-weight:800;text-decoration:underline;padding:0;font-size:15px}
.pts-pop{display:inline-block;margin-left:8px;color:#b07d10;font-weight:900}
.qz textarea{width:100%;min-height:120px;border-radius:14px;border:2px solid #e2d9c6;padding:13px;font-size:16px;line-height:1.5;resize:vertical}
.wc{font-size:13px;color:#6d756f;margin-top:6px}
.qprog{display:flex;gap:6px;margin:10px 0 0}
.qprog i{flex:1;height:7px;border-radius:9px;background:#e2d9c6}
.qprog i.on{background:#2f6f62}
/* reward */
.rw{max-width:640px;margin:0 auto;text-align:center}
.rw .big{font-size:64px;font-weight:950;color:#F2C14E;line-height:1;text-shadow:0 4px 0 #8a6510}
.rw table{width:100%;border-collapse:collapse;margin:18px 0;font-size:15px}
.rw td{padding:8px 4px;border-bottom:1px solid rgba(242,230,207,.15);text-align:left}
.rw td:last-child{text-align:right;font-weight:800;color:#F2C14E}
.unlock-card{background:linear-gradient(135deg,#3a2414,#22150c);border:2px solid #F2C14E;border-radius:20px;padding:18px;display:flex;gap:16px;align-items:center;text-align:left;margin:18px 0}
.unlock-card svg{width:96px;height:96px;flex:none;background:#1a100a;border-radius:16px}
.fcard{background:#fbf7ef;color:#1d2b28;border-radius:18px;padding:16px 18px;text-align:left;display:flex;gap:14px;align-items:center;margin-top:16px}
.fcard svg{width:62px;height:62px;flex:none;border-radius:50%;background:#3a2417}
.fcard b{display:block}
.fcard small{color:#5c665f}
/* shop */
.shop-tabs{display:flex;gap:8px;margin:6px 0 16px}
.shop{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.it{background:rgba(255,255,255,.05);border:1px solid rgba(242,230,207,.15);border-radius:18px;padding:12px;text-align:center}
.it svg{width:100%;height:110px;background:#24160d;border-radius:12px;display:block}
.it b{display:block;margin:10px 0 2px;font-size:15px}
.it small{display:block;color:#bfae92;font-size:12px;min-height:30px}
.it .btn{margin-top:8px;width:100%}
.it.owned{border-color:#F2C14E}
/* teacher */
.t-page{background:#f6f1e7;min-height:calc(100vh - 46px)}
.t-head{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.t-head .sp{flex:1}
.ccode{display:inline-flex;align-items:center;gap:10px;background:#fff;border-radius:14px;padding:8px 8px 8px 14px;box-shadow:0 1px 0 #e1d7c4;font-weight:700}
.ccode code{font-size:20px;font-weight:900;letter-spacing:.14em;color:#1b4d43}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.tl{background:#fff;border-radius:16px;padding:14px 16px;box-shadow:0 1px 0 #e1d7c4}
.tl b{display:block;font-size:26px;font-weight:900;color:#1b4d43}
.tl small{color:#5c665f;font-size:13px}
.goal{background:#1b4d43;color:#e9f2ec;border-radius:16px;padding:16px 18px;margin-bottom:18px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.goal .gb{flex:1;min-width:220px}
.goal .bar{background:rgba(255,255,255,.18);height:12px}
.roster{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 1px 0 #e1d7c4;font-size:14px}
.roster th{text-align:left;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#6d756f;background:#faf6ee;padding:10px 12px;border-bottom:1px solid #eee5d4}
.roster td{padding:9px 12px;border-bottom:1px solid #f1eadc;vertical-align:middle}
.roster tr.row{cursor:pointer}
.roster tr.row:hover td{background:#fbf8f2}
.roster tr.me td{background:#fff8e1}
.roster tr.empty td{color:#9a9f97}
.stu{display:flex;align-items:center;gap:10px}
.stu svg{width:38px;height:38px;border-radius:50%;background:#3a2417;flex:none}
.stu .nm b{display:block}
.stu .nm small{color:#8a8f86;font-size:12px}
.pname{width:118px;border:1px dashed #cfc5b2;border-radius:8px;padding:5px 8px;font-size:13px;background:#fffdf8}
.via{font-size:12px;font-weight:800;border-radius:999px;padding:3px 9px;background:#eef2f7;color:#3d5a99;white-space:nowrap}
.via.seat{background:#f3efe6;color:#6b5a3a}
.vpill{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;border-radius:7px;background:#e6eee8;color:#1b4d43;font-weight:900}
.score{font-weight:800}
.score.lo{color:#b84a41}
.ansprev{max-width:230px;color:#4a5a56;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.newdot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#e0645a;margin-right:5px}
.privnote{font-size:12.5px;color:#6d756f;margin:10px 2px 0}
.modal-bg{position:fixed;inset:0;background:rgba(10,18,16,.55);z-index:80;display:grid;place-items:center;padding:20px}
.modal{background:#fbf7ef;border-radius:22px;max-width:860px;width:100%;max-height:88vh;overflow:auto;padding:24px;position:relative}
.modal .x{position:absolute;right:14px;top:12px;border:0;background:#efe7d6;border-radius:50%;width:34px;height:34px;font-weight:900}
.seats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.seatc{border:2px dashed #b9ad94;border-radius:14px;padding:14px;background:#fff}
.seatc .s1{font-size:12px;color:#6d756f;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.seatc code{display:block;font-size:22px;font-weight:900;letter-spacing:.12em;color:#1b4d43;margin:6px 0}
.seatc .ln{border-bottom:1.5px solid #333;height:22px;margin-top:6px;font-size:11px;color:#999}
.seatc .s2{font-size:11.5px;color:#6d756f;margin-top:8px;line-height:1.4}
.hist{width:100%;border-collapse:collapse;font-size:14px;margin-top:10px}
.hist td,.hist th{padding:8px;border-bottom:1px solid #e9e0cf;text-align:left;vertical-align:top}
.hist th{font-size:12px;text-transform:uppercase;color:#6d756f;letter-spacing:.06em}
.wa{background:#fff;border-radius:12px;padding:10px 12px;font-family:Georgia,serif;line-height:1.5}
.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:#13231f;color:#fff;border-radius:14px;padding:12px 18px;font-weight:700;z-index:90;box-shadow:0 10px 30px rgba(0,0,0,.3);animation:pop .3s ease-out}
@media (max-width:900px){.ab{grid-template-columns:1fr}.ab-prev{position:static}.unl{grid-template-columns:1fr}.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.book{grid-template-columns:1fr}.book .pg:first-child{border-right:0}.seats{grid-template-columns:1fr 1fr}.roster .hide-sm{display:none}}
