/* CRYVEN CODE CITY. Layout tokens and components. Responsive, no external font dependency. */
:root{color-scheme:dark;--bg:#090811;--shell:#0d0c17;--panel:#13111f;--panel2:#181527;--outline:#2d2840;--outline2:#403451;--ink:#f7f2ff;--muted:#aa9fbf;--dim:#706884;--violet:#b67bff;--violet2:#d6afff;--green:#80e0b0;--red:#ff92a3;--gold:#f0d0a0;--shadow:0 16px 42px rgba(0,0,0,.28);font-family:Inter,"Segoe UI",Roboto,"Helvetica Neue",Arial,system-ui,sans-serif;--radius:18px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--ink);background:var(--bg);font-size:14px}button,input,textarea,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #d4b6ff;outline-offset:3px} ::selection{background:#6c3eab;color:white}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-track{background:#141020}::-webkit-scrollbar-thumb{background:#393046;border-radius:10px}.ambient{position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 51% -30%,rgba(115,55,164,.16),transparent 55%),radial-gradient(circle at 90% 85%,rgba(87,38,127,.08),transparent 36%);z-index:-1}.shell{display:flex;min-height:100vh;max-width:2000px;margin:auto}.sidebar{width:250px;flex:none;border-right:1px solid var(--outline);background:linear-gradient(180deg,#0f0c1c,#0d0b16);padding:25px 14px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;z-index:12}.brand{display:flex;gap:12px;align-items:center;padding:4px 10px 17px;border-bottom:1px solid #282337}.brand-icon{position:relative;display:flex;align-items:center;justify-content:center;font-size:34px;font-weight:900;line-height:1;letter-spacing:-4px;color:white;width:45px;height:45px;background:radial-gradient(circle,#4b266c,#20152e);border:1px solid #7950a5;border-radius:14px;box-shadow:0 0 26px #8e4de53d}.brand-icon span{position:absolute;font-size:12px;letter-spacing:0;right:4px;top:3px;color:#ddbdff}.brand-name{font-size:23px;font-weight:900;letter-spacing:2.4px}.brand-sub{color:#d6aafa;letter-spacing:3px;font-size:9px;font-weight:800;margin-top:3px}.brand-sub span{color:#6f4e91}.sidebar-kicker{margin:26px 13px 11px;font-size:10px;letter-spacing:1.7px;color:#7d718f;font-weight:800}.sidebar-kicker.second{margin-top:26px}.nav-item{display:flex;align-items:center;gap:13px;margin:4px 0;padding:13px 14px;border:1px solid transparent;border-radius:12px;color:#b5adc4;font-size:13px;font-weight:600;transition:background .18s,color .18s,border .18s}.nav-item:hover{background:#201a31;color:white}.nav-item.is-active{background:linear-gradient(90deg,#472466,#311b49);border-color:#765098;color:white;box-shadow:inset 0 1px 0 #ffffff16,0 5px 20px #ae70ef13}.nav-icon{width:22px;text-align:center;font-size:20px;line-height:1;color:#a98fc9;font-weight:500}.nav-item.is-active .nav-icon{color:#e2c4ff}.sidebar-bottom{margin-top:auto}.side-progress{padding:15px;background:linear-gradient(165deg,#1c1729,#111020);border:1px solid #342c44;border-radius:14px}.tiny-heading,.stat-label{font-size:10px;letter-spacing:1.2px;color:#a79db5;font-weight:800}.tiny-heading{display:flex;justify-content:space-between}.tiny-heading span{color:#dcbaff}.rank-line{display:flex;justify-content:space-between;margin:15px 0 11px;align-items:baseline}.rank-line strong{font-size:15px}.rank-line span{font-size:12px;color:#cab5db;font-weight:700}.progress-bar{height:6px;background:#342b44;border-radius:100px;overflow:hidden}.progress-bar>span{display:block;height:100%;background:linear-gradient(90deg,#804de1,#d6a0ff);width:0%;border-radius:inherit;box-shadow:0 0 15px #ac6dff}.progress-meta{display:flex;justify-content:space-between;margin-top:10px;color:#9286a5;font-size:10px}.local-note{display:flex;gap:8px;align-items:center;color:#80748e;font-size:11px;margin:16px 7px 0}.local-dot{width:6px;height:6px;border-radius:50%;background:#73dbaa;box-shadow:0 0 8px #73dbaa}.workspace{min-width:0;display:flex;flex-direction:column;flex:1}.topbar{height:72px;flex:none;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #252036;background:#0c0b15cf;backdrop-filter:blur(16px);padding:0 28px;position:sticky;top:0;z-index:9}.top-left,.top-actions{display:flex;align-items:center;gap:13px}.breadcrumbs{font-size:11px;letter-spacing:1.4px;font-weight:750;color:#746d89}.breadcrumbs b{color:#d8d0e3}.crumb-divider{color:#4c405c;margin:0 10px}.compact-chip,.profile-badge{background:#181524;border:1px solid #383047;border-radius:13px;padding:9px 14px;color:#d7cbe9;font-size:12px;font-weight:700}.compact-chip:hover,.profile-badge:hover{border-color:#80569b}.compact-chip.ghost{cursor:default}.gem{color:#be81ff;font-size:15px;margin-right:6px}.profile-badge{border-radius:50%;width:39px;height:39px;padding:0;background:linear-gradient(135deg,#60417a,#231933);color:#f4e6ff;font-size:18px}.mobile-menu{display:none;color:white;border:1px solid #423452;background:#171322;border-radius:9px;padding:5px 10px;font-size:18px}.screen{width:100%;max-width:1740px;margin:0 auto;padding:27px 30px 70px;flex:1;outline:none}.footer{padding:15px 30px;display:flex;justify-content:space-between;gap:15px;border-top:1px solid #252032;color:#756a84;font-size:10px;font-weight:800;letter-spacing:1px}.muted{color:var(--muted)}.eyebrow{color:#c58bff;font-size:10px;letter-spacing:2.2px;font-weight:900;text-transform:uppercase}.page-title{font-size:clamp(26px,3vw,40px);margin:7px 0 8px;line-height:1.15;letter-spacing:-.9px}.page-subtitle{color:#a99fba;line-height:1.7;max-width:750px;margin:0}.heading-line{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:26px 0 16px}.heading-line h2{font-size:20px;letter-spacing:-.3px;margin:0}.heading-line p{margin:7px 0 0;color:var(--muted);font-size:12px}.light-link{color:#c99aff;font-size:12px;font-weight:700;background:none;border:none;padding:8px 0}.light-link:hover{text-decoration:underline}.tile{background:linear-gradient(160deg,rgba(26,22,38,.97),rgba(17,15,28,.99));border:1px solid #332a44;border-radius:var(--radius);box-shadow:0 10px 25px #00000017}.tile.soft{background:#14111f}.tile-pad{padding:20px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:41px;padding:10px 17px;border-radius:11px;font-weight:800;border:1px solid transparent;font-size:12px;line-height:1.2;transition:transform .14s,border .14s,background .14s}.btn:hover{transform:translateY(-1px)}.btn-primary{background:linear-gradient(110deg,#9052df,#bb7efa);box-shadow:0 8px 20px #8639cb33;color:white}.btn-primary:hover{background:linear-gradient(110deg,#a366ef,#cd98ff)}.btn-ghost{border-color:#453651;background:#231c30;color:#e0d1eb}.btn-ghost:hover{border-color:#9a75be;background:#2c2340}.btn-danger{background:#512439;border:1px solid #8c4056;color:#ffe2e8}.btn-success{background:#15392c;color:#b8f6d5;border:1px solid #31755c}.btn:disabled{opacity:.48;cursor:not-allowed;transform:none}.btn-small{min-height:34px;padding:8px 12px;font-size:11px}.pill{display:inline-flex;align-items:center;gap:6px;font-size:10px;letter-spacing:.3px;font-weight:800;border-radius:20px;border:1px solid #564069;background:#32213f;color:#dcbdff;padding:5px 9px}.pill.green{color:#8ae3b3;border-color:#2d654d;background:#19342b}.pill.muted{background:#221e2b;border-color:#393143;color:#b1a8bd}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}.stat-box{padding:17px 19px}.stat-box .stat-value{font-size:26px;font-weight:900;letter-spacing:-1px;margin:10px 0 5px}.stat-box .stat-foot{font-size:11px;color:#847994}.stat-icon{float:right;color:#cda5ff;font-size:20px}.city-columns{display:grid;grid-template-columns:minmax(0,1fr) 286px;gap:16px}.city-stage{position:relative;border:1px solid #47345a;border-radius:20px;min-height:530px;overflow:hidden;isolation:isolate;background:#110b1e;box-shadow:0 18px 46px #0007,0 0 40px #4f1d8722}.city-stage::before{content:"";position:absolute;inset:0;z-index:-2;background:linear-gradient(180deg,#0709101a 0%,#09071110 38%,#09071350 100%),url('assets/map.webp') center center/cover no-repeat;filter:blur(1.5px) saturate(.85) brightness(.63);transform:scale(1.015)}.city-stage::after{content:"";pointer-events:none;position:absolute;inset:0;background:linear-gradient(180deg,#0b081f7a 0%,transparent 35%,#0808128c 100%);z-index:-1}.city-head{position:absolute;left:23px;top:21px;max-width:310px;pointer-events:none}.city-head h2{font-size:28px;letter-spacing:2.5px;margin:7px 0 3px;font-weight:950;text-shadow:0 2px 24px #000}.city-head h2 span{color:#d38aff}.city-head p{color:#c2b4da;font-size:12px;margin:0;text-shadow:0 2px 8px black}.city-marker{position:absolute;z-index:1;display:flex;gap:9px;align-items:center;border:1px solid #ab7adc90;box-shadow:0 7px 30px #050206e0,0 0 18px #a26fff20;background:#0c091bdf;border-radius:12px;padding:9px 12px;text-align:left;max-width:210px;min-width:130px;color:white;transform:translate(-50%,-50%);backdrop-filter:blur(10px);transition:scale .2s,border-color .2s,background .2s}.city-marker:hover{scale:1.06;border-color:#e4bcff;background:#251435f2}.city-marker .marker-symbol{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:11px;border:1px solid #7d5898;background:#29163d;color:#e3c4ff;font-weight:900;font-size:15px;flex:none}.city-marker strong{font-size:12px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:140px}.city-marker small{display:block;color:#a9a0bd;font-size:10px;margin-top:4px}.city-marker.done{border-color:#508c79bb}.city-marker.done .marker-symbol{background:#193d31;color:#91eabf}.city-bottom-line{position:absolute;bottom:15px;left:16px;right:16px;background:#080711d9;border:1px solid #4c3b5f;border-radius:10px;padding:12px 15px;display:flex;justify-content:space-between;align-items:center;gap:10px;backdrop-filter:blur(6px)}.city-bottom-line strong{font-size:11px;letter-spacing:1px}.city-bottom-line span{font-size:11px;color:#b69cca}.side-panel{display:flex;flex-direction:column;gap:12px}.panel-h{margin:0;font-size:16px}.panel-kicker{font-size:10px;color:#c99bff;letter-spacing:1.5px;font-weight:800;margin-bottom:7px}.next-card{padding:19px;background:linear-gradient(140deg,#251732,#151120)}.next-title{font-size:18px;font-weight:850;line-height:1.3;margin:11px 0 7px}.next-meta{font-size:11px;color:#ae9bbd;line-height:1.6}.mini-progress{margin:13px 0 17px;height:6px;background:#382b49;border-radius:10px}.mini-progress span{display:block;height:100%;background:#b37bf4;border-radius:10px}.daily-card,.focus-card{padding:18px}.check-row{display:flex;gap:10px;align-items:center;margin:13px 0;color:#d3c8e0;font-size:12px}.check-row i{border:1px solid #5e4474;border-radius:5px;width:17px;height:17px;display:flex;align-items:center;justify-content:center;font-style:normal;color:#e1bfff;font-size:11px}.check-row.done{color:#89cba9}.check-row.done i{background:#274a3b;border-color:#4c9f72}.focus-card{background:linear-gradient(140deg,#1d1930,#14101d)}.focus-card h3{margin:10px 0;font-size:16px}.focus-card p{font-size:12px;color:#b0a6c4;line-height:1.65}.focus-card .btn{width:100%;margin-top:5px}.district-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.district-card{cursor:pointer;text-align:left;padding:17px;border-radius:15px;border:1px solid #332a42;background:linear-gradient(156deg,#1a1627,#11101c);color:var(--ink);min-width:0;transition:border-color .17s,transform .17s}.district-card:hover{border-color:#a66fc9;transform:translateY(-3px)}.district-top{display:flex;justify-content:space-between;align-items:start;gap:8px;margin-bottom:14px}.district-emblem{height:39px;width:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:#30213e;border:1px solid #604270;color:#e5caff;font-size:20px;font-weight:900}.district-num{font-size:10px;color:#777084;letter-spacing:1px;font-weight:900}.district-name{font-size:14px;font-weight:850;margin-bottom:4px;line-height:1.35}.district-sub{font-size:11px;color:#9c91ae;min-height:30px}.district-progress-line{display:flex;justify-content:space-between;font-size:10px;color:#afa0c3;margin-top:16px}.district-card .progress-bar{margin-top:7px;height:5px}.roadmap{display:flex;align-items:center;overflow-x:auto;gap:6px;padding:15px 4px 9px}.roadmap-step{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:91px;color:#9287a3;font-size:10px;font-weight:700;position:relative}.roadmap-step::after{content:"";height:2px;width:42px;background:#46335b;position:absolute;left:calc(50% + 22px);top:19px}.roadmap-step:last-child::after{display:none}.roadmap-bubble{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid #56456e;background:#1a1625;font-weight:900;font-size:14px;color:#cfb5dd}.roadmap-step.active .roadmap-bubble{box-shadow:0 0 18px #ae66ff81;border-color:#c995ff;background:#462660}.roadmap-step.done .roadmap-bubble{border-color:#469d72;color:#94e3b9;background:#1b3a2c}.intro-row{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:22px}.intro-actions{display:flex;gap:8px;flex-wrap:wrap}.world-hero{padding:25px;display:grid;grid-template-columns:1fr auto;gap:25px;background:radial-gradient(circle at 80% 20%,#683a9827,transparent 45%),linear-gradient(140deg,#20172d,#12101d)}.world-hero h2{font-size:27px;margin:9px 0}.world-hero p{color:#b5a8c4;line-height:1.8;max-width:730px}.world-number{font-size:80px;font-weight:900;line-height:1;color:#ba93fa31;align-self:center}.lesson-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}.lesson-item{background:#161321;border:1px solid #342c45;border-radius:14px;text-align:left;padding:14px 16px;display:flex;gap:13px;align-items:center;color:#f4ecfc;min-width:0}.lesson-item:hover{background:#21192f;border-color:#9067bb}.lesson-count{width:32px;height:32px;border:1px solid #5a476e;background:#2b2138;border-radius:10px;color:#cba6f5;display:flex;align-items:center;justify-content:center;font-weight:850;flex:none}.lesson-item.done .lesson-count{color:#8fe1b7;background:#1c3a2c;border-color:#3c8968}.lesson-item strong{display:block;font-size:12px}.lesson-item small{display:block;color:#9387a1;margin-top:5px;font-size:11px}.lesson-arrow{margin-left:auto;color:#997db0}.lesson-shell{display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:16px}.lesson-body{padding:25px}.lesson-body h1{font-size:30px;margin:7px 0 15px;letter-spacing:-.8px}.lesson-body .lead{color:#ded3ee;font-size:15px;line-height:1.9}.learning-block{border-left:3px solid #9b63d6;padding:13px 15px;margin:20px 0;background:#24182f73;border-radius:0 12px 12px 0;color:#c9bfda;line-height:1.9}.learning-block strong{display:block;color:#e6c4ff;margin-bottom:3px}.code-block{background:#090d15;border:1px solid #333448;border-radius:13px;overflow:hidden;margin:19px 0}.code-block header{display:flex;justify-content:space-between;background:#141625;border-bottom:1px solid #293044;padding:10px 15px;color:#b7b6d4;font-size:11px}.code-block pre{font-family:Consolas,"Cascadia Code",Menlo,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:#d2c6e8;line-height:1.75;padding:16px;margin:0;font-size:12px}.quiz-box{margin-top:25px;background:#12111e;border:1px solid #443257;border-radius:14px;padding:19px}.quiz-box h3{font-size:16px;margin:9px 0 16px}.quiz-option{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;background:#201a2e;border:1px solid #3e3350;color:#e3d8ee;border-radius:10px;padding:12px 14px;margin:8px 0;font-size:12px}.quiz-option:hover{background:#30223f;border-color:#9865bd}.quiz-option.correct{border-color:#5aab81;background:#193627;color:#a6f1c6}.quiz-option.incorrect{border-color:#b45170;background:#3b1f2b;color:#ffd1dc}.feedback{font-size:12px;min-height:20px;margin-top:12px;color:#d1b9ea}.lesson-side{display:flex;flex-direction:column;gap:12px}.side-box{padding:19px}.side-box h3{margin:0 0 12px;font-size:15px}.side-box p{font-size:12px;line-height:1.8;color:#a9a0b8}.mission-label{display:flex;align-items:start;gap:10px;color:#e5d9f0;font-size:12px;line-height:1.7;margin:15px 0}.mission-label input{accent-color:#a76fdf;margin-top:4px}.complete-lesson{width:100%}.hint-area{background:#231b30;border:1px dashed #6f4a86;border-radius:10px;padding:11px;margin:10px 0;line-height:1.6;color:#c9b5da;font-size:12px}.game-grid{display:grid;grid-template-columns:260px minmax(0,1fr);gap:15px}.challenge-list{padding:12px;max-height:590px;overflow:auto}.challenge-link{width:100%;background:transparent;border:1px solid transparent;border-radius:10px;color:#c7bbd7;text-align:left;padding:13px;display:flex;flex-direction:column;gap:5px;margin:3px 0}.challenge-link.active{background:#2b1b3d;border-color:#7849a4;color:#fff}.challenge-link:hover{background:#241a34}.challenge-link strong{font-size:12px}.challenge-link small{font-size:10px;color:#a699b7}.challenge-link.passed strong::after{content:' ✓';color:#84dcb2}.editor-card{overflow:hidden}.editor-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 18px;border-bottom:1px solid #362b44}.editor-head strong{font-size:12px}.editor-head span{color:#9c8dad;font-size:11px}.editor-description{padding:17px 20px;border-bottom:1px solid #322b40;line-height:1.7;color:#c4b6d4;font-size:12px}.editor-description h2{font-size:17px;margin:0 0 5px;color:white}.editor-description p{margin:0}.editor-input{display:block;width:100%;min-height:285px;resize:vertical;background:#0a101c;color:#d3e9f1;border:none;outline:none;padding:20px;font:13px/1.8 Consolas,"Cascadia Code",monospace;tab-size:4;white-space:pre;overflow:auto}.editor-input:focus{outline:none}.editor-toolbar{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:13px 17px;border-top:1px solid #2a293c}.editor-toolbar .btn{min-height:35px}.editor-right{display:flex;gap:7px;flex-wrap:wrap}.terminal-wrap{padding:16px;background:#0d111a;border-top:1px solid #383047}.terminal-title{color:#b6acc7;letter-spacing:1.3px;font-size:10px;font-weight:900;display:flex;justify-content:space-between}.terminal-output{font:12px/1.8 Consolas,"Cascadia Code",monospace;white-space:pre-wrap;min-height:85px;max-height:280px;overflow:auto;color:#c5e3e4;margin:13px 0 3px;word-break:break-word}.terminal-output.error{color:#ffa9b6}.lab-footer-note{color:#9d91af;font-size:11px;line-height:1.7;padding:0 19px 17px}.custom-input{width:100%;background:#110f1b;border:1px solid #463653;border-radius:10px;color:#efe6fb;padding:11px 13px;outline:none}.custom-input:focus{border-color:#be8fe8}.textarea-notes{width:100%;min-height:120px;resize:vertical;background:#10101a;color:#eee3f9;padding:13px;border:1px solid #403551;border-radius:11px;line-height:1.7}.textarea-notes:focus{border-color:#a870ce;outline:none}.text-label{display:block;color:#cdb8db;font-size:12px;font-weight:800;margin:15px 0 8px}.road-section{display:grid;grid-template-columns:1fr 1fr;gap:15px}.road-item{padding:20px;position:relative}.road-item h3{margin:8px 0;font-size:16px}.road-item p{color:#afa1c1;line-height:1.75;font-size:12px}.road-item .top-chip{display:flex;justify-content:space-between;gap:10px}.road-item .top-chip span{font-size:11px;color:#a895bc;font-weight:750}.project-grid,.awards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.project-card{padding:20px}.project-title{font-size:16px;font-weight:850;margin:13px 0 8px}.project-card p{color:#ab9dbd;font-size:12px;line-height:1.65;min-height:56px}.project-check{display:flex;gap:10px;align-items:start;padding:9px 0;color:#cec1dc;font-size:11px;line-height:1.5;border-bottom:1px solid #2c2637}.project-check input{accent-color:#b47af0;margin-top:3px}.project-card .btn{margin-top:16px;width:100%}.achievement{padding:20px;min-height:165px}.achievement.locked{opacity:.53;filter:saturate(.5)}.achievement-icon{height:46px;width:46px;display:flex;align-items:center;justify-content:center;border-radius:13px;background:#352245;color:#ddbbff;font-size:23px}.achievement h3{font-size:14px;margin:14px 0 5px}.achievement p{font-size:11px;color:#afa3bd;line-height:1.5;margin:0}.achievement .pill{margin-top:12px}.library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.library-card{padding:20px;display:flex;flex-direction:column;min-height:155px;transition:border-color .15s}.library-card:hover{border-color:#a775e4}.library-card h3{font-size:14px;margin:7px 0}.library-card p{font-size:11px;color:#ab9eb8;line-height:1.7;flex:1}.library-card span{font-size:11px;color:#cc9cff;font-weight:800}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.settings-panel{padding:22px}.settings-panel h3{margin:0 0 12px}.settings-panel p{font-size:12px;line-height:1.8;color:#b2a4c0}.setting-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}.switch-line{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:19px 0;font-size:13px}.switch-line input{accent-color:#ab73eb;width:18px;height:18px}.notice{border:1px solid #655073;background:#2a1c39aa;border-radius:12px;padding:13px 15px;color:#ccbbdb;font-size:12px;line-height:1.8;margin:16px 0}.toast{position:fixed;bottom:22px;right:25px;max-width:400px;background:#261b37;border:1px solid #9166b2;box-shadow:0 15px 35px #000b;border-radius:12px;padding:14px 19px;z-index:30;font-size:12px;color:#f7e9ff;opacity:0;transform:translateY(18px);transition:all .2s;pointer-events:none}.toast.visible{opacity:1;transform:translateY(0)}.dialog{border:1px solid #6a4a8c;background:#181222;color:#f2e9fa;border-radius:18px;padding:25px;max-width:450px;box-shadow:0 30px 60px #000b}.dialog::backdrop{background:#020006af;backdrop-filter:blur(4px)}.dialog h2{margin:0 0 12px}.dialog p{color:#bbb0c6;line-height:1.7}.dialog-buttons{display:flex;justify-content:end;gap:10px;margin-top:20px}.empty-state{text-align:center;padding:60px 20px}.empty-state strong{font-size:20px}.empty-state p{color:#a89db7}.source-sub{font-size:11px;color:#b1a4be}.first-steps{display:flex;gap:12px;align-items:center;padding:17px 20px;background:linear-gradient(90deg,#2c1b40,#141020);border:1px solid #6e428d;border-radius:14px;margin-top:18px}.first-steps strong{font-size:12px;display:block}.first-steps p{font-size:11px;margin:5px 0 0;color:#bdafce}.first-steps button{margin-left:auto}.search{max-width:320px;width:100%;padding:11px 13px;color:#efe7f7;background:#181525;border:1px solid #443350;border-radius:10px}.search:focus{outline:1px solid #9967bf}.empty-results{padding:22px;color:#ad9fc0;font-size:12px}.inline-key{border:1px solid #423651;border-radius:5px;background:#1a1425;padding:2px 6px;color:#d6bef1;font-size:10px}.dark-card{text-align:center;border:1px dashed #5b4172;border-radius:13px;padding:20px;color:#bda6d0;font-size:12px;line-height:1.8}.hidden{display:none!important}
@media(max-width:1380px){.sidebar{width:225px}.screen{padding:25px 22px 60px}.city-columns{grid-template-columns:minmax(0,1fr) 255px}.district-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.project-grid,.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1100px){.city-columns{grid-template-columns:1fr}.side-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.district-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.side-panel .tile{min-width:0}.game-grid{grid-template-columns:225px minmax(0,1fr)}.lesson-shell{grid-template-columns:1fr}.lesson-side{display:grid;grid-template-columns:1fr 1fr}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.sidebar{transform:translateX(-101%);transition:transform .2s;position:fixed;width:250px;box-shadow:30px 0 65px #0009}.sidebar.open{transform:translateX(0)}.mobile-menu{display:inline-flex}.topbar{padding:0 16px;height:60px}.screen{padding:21px 14px 55px}.district-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.city-stage{min-height:480px}.city-marker{min-width:0;padding:8px;max-width:165px}.city-marker .marker-symbol{height:30px;width:30px}.city-marker strong{font-size:11px;max-width:105px}.city-marker small{display:none}.side-panel{grid-template-columns:1fr 1fr}.side-panel .focus-card{grid-column:1/-1}.lesson-list{grid-template-columns:1fr}.lesson-side{grid-template-columns:1fr}.game-grid{grid-template-columns:1fr}.challenge-list{max-height:200px}.project-grid,.library-grid,.awards-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.intro-row{align-items:start;flex-direction:column}.road-section{grid-template-columns:1fr}.footer{padding:13px 16px;flex-wrap:wrap}.settings-grid{grid-template-columns:1fr}}
@media(max-width:520px){.top-actions .compact-chip:first-child{display:none}.breadcrumbs{font-size:10px}.topbar{gap:5px}.city-stage{min-height:510px}.city-head h2{font-size:22px}.city-marker{padding:7px 8px}.city-marker strong{font-size:10px}.city-marker .marker-symbol{width:25px;height:25px;font-size:11px}.city-bottom-line{flex-direction:column;align-items:start}.district-grid,.project-grid,.awards-grid,.library-grid{grid-template-columns:1fr}.side-panel{grid-template-columns:1fr}.stats-grid{grid-template-columns:1fr 1fr}.stat-box{padding:13px}.stat-box .stat-value{font-size:21px}.world-hero{grid-template-columns:1fr}.world-number{display:none}.editor-toolbar{display:block}.editor-right{margin-top:9px}.lesson-body{padding:17px}.lesson-body h1{font-size:24px}.first-steps{flex-wrap:wrap}.first-steps button{margin-left:0;width:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
body.reduced-motion *,body.reduced-motion *::before,body.reduced-motion *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}

/* ===== v1.0 Engineer Expansion: modern gothic UI, keyboard-friendly ===== */
:root{--exp-surface:#161222;--exp-muted:#b2a9c6;--exp-border:#30263d;--exp-glow:#ab6bff}
.sidebar{overflow-y:auto;scrollbar-width:thin;scrollbar-color:#4b365b transparent}
.sidebar-bottom{position:relative;margin-top:22px}
.exp-menu-section{margin:22px 14px 8px!important;letter-spacing:.16em}
.exp-head{margin:6px 0 28px;max-width:920px}
.exp-head h1{font:750 clamp(28px,3vw,43px)/1.17 Inter,Manrope,system-ui,sans-serif;letter-spacing:-.045em;margin:9px 0 12px;color:#f4eeff}
.exp-head p{max-width:780px;color:#b7adc9;line-height:1.7;font-size:14px}
.exp-head .eyebrow{letter-spacing:.14em;color:#b992f0;font-size:10px}
.exp-card{padding:23px;min-width:0}
.exp-card h2,.exp-section-title h2{font:720 21px/1.25 Inter,system-ui,sans-serif;letter-spacing:-.025em;color:#f3eafd;margin:0 0 13px}
.exp-card h3{font-size:14px;font-weight:750;color:#ebe2f8;margin:22px 0 11px}
.exp-card p{color:#bdb3ce;line-height:1.75;font-size:13.5px}
.exp-layout-two{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:18px;align-items:start;margin-bottom:20px}
.exp-steps{display:flex;flex-direction:column;gap:16px;margin-top:18px}.exp-steps>div{display:flex;align-items:flex-start;gap:14px;color:#c9c0d8;font-size:13px;line-height:1.6}
.exp-steps b{display:inline-flex;align-items:center;justify-content:center;flex:none;background:#2d1f42;border:1px solid #5d3c7e;color:#d7aaff;border-radius:11px;width:33px;height:33px;font-size:12px}
.exp-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:15px 0}
.exp-actions .btn{white-space:normal;min-height:37px}
.exp-guide-list{display:grid;gap:11px}.exp-guide-list>div{border-left:2px solid #5e3b8b;padding-left:12px;display:grid;gap:4px}.exp-guide-list strong{font-size:13px;color:#eee6fa}.exp-guide-list small{font-size:12px;color:#aa9eb8;line-height:1.5}
.exp-note{padding:14px 15px;border:1px solid #4c366c;background:#251936;border-radius:12px;color:#d1bce9;font-size:12px;line-height:1.7;margin-top:13px}
.exp-tag{display:inline-flex;font-size:11px;color:#b9aecb;border:1px solid #44334f;border-radius:999px;padding:5px 10px;white-space:normal;line-height:1.3}.exp-tag.good{color:#82dcbb;border-color:#326b59;background:#15372e}.exp-tag.violet{color:#d2b4ff;border-color:#63438e;background:#2d2049}
.exp-pass-top{display:flex;align-items:center;gap:20px;padding-bottom:22px}.exp-avatar{width:84px;height:84px;flex:none;border:1px solid #8558c1;background:linear-gradient(145deg,#512a80,#1e1332);border-radius:22px;display:grid;place-items:center;font-weight:800;font-size:45px;color:#f3dcff;box-shadow:0 0 35px #7e43c84a}.exp-pass-details h2{font-size:27px;margin:4px 0}.exp-pass-details p{margin:0 0 9px}
.exp-mini-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin:16px 0 22px}.exp-mini-grid>div{background:#100d18;border:1px solid #32283f;border-radius:12px;padding:15px 12px;display:grid;gap:5px}.exp-mini-grid b{font-size:25px;font-weight:800;color:#edddff}.exp-mini-grid small{font-size:10px;color:#9e91b1;line-height:1.5}.exp-compact-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.exp-progress-label{font-size:12px;color:#dccbea;border-top:1px solid #332741;padding-top:17px}.exp-muted{color:#978da7!important;font-size:12px!important;line-height:1.65}
.exp-section-title{margin:28px 0 14px}.exp-section-title p{color:#9f94b1;font-size:12px}
.exp-skill-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:24px}.exp-skill{min-height:86px;border:1px solid #33293f;background:#15111f;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:6px}.exp-skill strong{font-size:12px;color:#e4daf0}.exp-skill small{font-size:11px;color:#a297b1}.exp-skill span{font-size:10px;color:#a4f0c6}.exp-skill.has-proof{border-color:#375c54;background:#10251f}
.exp-history{border-bottom:1px solid #2c2338;padding:12px 0;display:flex;gap:13px;align-items:flex-start}.exp-dot{width:8px;height:8px;margin-top:6px;background:#9d6edb;border-radius:50%;box-shadow:0 0 12px #8950db}.exp-history div{display:grid;gap:5px}.exp-history strong{font-size:13px;color:#ebdff9}.exp-history small{color:#9c91ac;font-size:11px}.exp-inline{cursor:pointer;color:#c69bff;border:0;background:none;font-size:12px;text-align:left;padding:0}
.exp-filter{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0}.exp-filter input[type=search],.exp-filter input.custom-input{flex:1;min-width:240px}.exp-filter select{width:180px;min-width:150px}.exp-check{color:#bcb0d1;font-size:12px;display:flex;align-items:center;gap:8px}
.exp-library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.exp-knowledge-card{display:block;width:100%;text-align:left;padding:21px;cursor:pointer;transition:border-color .18s,transform .18s}.exp-knowledge-card:hover,.exp-knowledge-card:focus-visible{border-color:#8950c8;transform:translateY(-2px)}.exp-knowledge-card h3{font-size:17px;color:#eee5ff;margin:12px 0 9px}.exp-knowledge-card p{font-size:12px;color:#a8a0b7;line-height:1.7;min-height:66px}.exp-knowledge-card>span:last-child{font-size:11px;color:#c69bff}
.exp-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;background:#090e19;border:1px solid #273047;padding:16px 18px;border-radius:10px;color:#d0cff9;font-size:12px;overflow:auto}
.exp-answer{border:1px solid #433058;border-radius:10px;padding:11px 14px;margin:14px 0;background:#1a1429}.exp-answer summary{cursor:pointer;color:#d6bbfa;font-weight:700;font-size:12px;outline-offset:5px}.exp-answer p{margin-bottom:3px}
.exp-select-stack{display:flex;flex-wrap:wrap;gap:7px}.exp-select-stack .btn{font-size:11px}
.exp-weak-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.exp-weak{display:grid;gap:8px;padding:15px}.exp-weak b{font-size:13px;color:#eee3fa}.exp-weak small{color:#a196b1;font-size:11px}
.exp-checklist{display:grid;gap:7px}.exp-checklist-item{padding:10px 12px;background:#130f1c;border-radius:9px;color:#c7bbd3;font-size:12px;border:1px solid #2d2538}.exp-order{padding-left:20px;color:#c1b5d0;font-size:12px;line-height:2.1}
.exp-project-layout{grid-template-columns:minmax(260px,.85fr) minmax(330px,1.15fr)}.exp-editor-title{display:flex;justify-content:space-between;gap:10px;margin:0 0 12px;font-size:12px;color:#e9dcfa}.exp-editor-title span{color:#a68fbb}.exp-editor{width:100%;min-height:300px;display:block;background:#090f1c;color:#e8e2ff;font:13px/1.7 ui-monospace,Consolas,monospace;padding:17px;tab-size:4;resize:vertical;border:1px solid #3a3452;border-radius:12px;outline:none}.exp-editor:focus{border-color:#9065d0;box-shadow:0 0 0 2px #6b3a9936}.exp-output{white-space:pre-wrap;overflow-wrap:anywhere;min-height:84px;max-height:300px;overflow:auto;padding:14px;background:#090d16;color:#9df1c4;border:1px solid #2b3044;border-radius:10px;font-size:12px;line-height:1.6}.exp-explain{min-height:96px}.exp-filetree{color:#c6c2d6}
.exp-board{display:grid;grid-template-columns:repeat(5,minmax(160px,1fr));gap:10px;overflow-x:auto;padding-bottom:10px}.exp-board-col{border:1px solid #2c2440;background:#120e1b;border-radius:14px;padding:12px;min-height:250px}.exp-board-col h3{font-size:10px;letter-spacing:.15em;color:#c6acdc;margin:5px 0 16px}.exp-ticket{display:flex;flex-direction:column;gap:10px;width:100%;border:1px solid #4c336c;background:#221732;color:#e9d7f9;border-radius:12px;padding:14px;cursor:pointer;text-align:left;margin-bottom:10px}.exp-ticket:hover{border-color:#b48cff}.exp-ticket small{color:#c392ff;font-size:10px}.exp-ticket strong{font-size:13px;line-height:1.4}.exp-ticket span{color:#aa9ab9;font-size:11px;line-height:1.5}
.exp-hidden{display:none}.exp-inline-terms{margin:15px 0;display:flex;gap:8px;flex-wrap:wrap}.exp-term-pill{border:1px solid #573d74;border-radius:50px;background:#241832;color:#d5b5ff;font-size:11px;padding:8px 12px;cursor:pointer}.exp-term-pill:hover{background:#382347}
.exp-dialog{position:fixed;max-width:680px;width:calc(100% - 32px);background:#151022;color:#e8e0f7;border:1px solid #7450ab;padding:24px;border-radius:16px}.exp-dialog::backdrop{background:#06030bc9}.exp-dialog-close{position:absolute;top:10px;right:12px;background:transparent;border:0;color:#c8a6ee;cursor:pointer;font-size:25px}.glossary-content{max-height:65vh;overflow:auto;line-height:1.75}.glossary-content h2{font-size:26px}.exp-review{border:1px solid #503c6c;background:#1b1428;padding:14px;border-radius:12px}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #cb9aff;outline-offset:3px}
@media(max-width:1150px){.exp-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.exp-skill-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.exp-layout-two,.exp-project-layout{grid-template-columns:1fr}.exp-board{grid-template-columns:repeat(5,210px)}}
@media(max-width:700px){.exp-card{padding:16px}.exp-library-grid,.exp-weak-grid{grid-template-columns:1fr}.exp-skill-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.exp-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.exp-filter select{width:100%}.exp-pass-top{align-items:flex-start}.exp-avatar{width:60px;height:60px;font-size:34px}.exp-head h1{font-size:29px}.exp-editor{min-height:240px}}
@media(prefers-reduced-motion:reduce){.exp-knowledge-card{transition:none!important;transform:none!important}}
.exp-filetabs{display:flex;gap:4px;flex-wrap:wrap;margin:9px 0;background:#0e0d16;border:1px solid #352b47;border-radius:10px;padding:6px}.exp-filetab{font:600 11px Inter,system-ui,sans-serif;cursor:pointer;color:#ab9ebb;border-radius:7px;background:transparent;border:1px solid transparent;padding:8px 10px}.exp-filetab:hover,.exp-filetab:focus-visible{border-color:#67448d;background:#2a1d3c;color:#e6d2ff}.exp-filetab:first-child{background:#261938;color:#d9b4ff}
.exp-filetabs{display:flex;gap:4px;flex-wrap:wrap;margin:9px 0;background:#0e0d16;border:1px solid #352b47;border-radius:10px;padding:6px}.exp-filetab{font:600 11px Inter,system-ui,sans-serif;cursor:pointer;color:#ab9ebb;border-radius:7px;background:transparent;border:1px solid transparent;padding:8px 10px}.exp-filetab:hover,.exp-filetab:focus-visible{border-color:#67448d;background:#2a1d3c;color:#e6d2ff}.exp-filetab:first-child{background:#261938;color:#d9b4ff}
