:root {
  --ink: #24231f;
  --paper: #fff9ec;
  --cream: #f4ecd8;
  --orange: #ed6730;
  --orange-dark: #c9471e;
  --yellow: #ffc957;
  --mint: #79c7a4;
  --muted: #777266;
  --pixel: "Press Start 2P", monospace;
  --body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); min-height: 100vh; }
button, input { font: inherit; }
button { color: inherit; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"); }

.topbar { height: 84px; display: flex; align-items: center; padding: 0 5vw; position: relative; z-index: 10; gap: 24px; }
.brand { border: 0; background: none; display: flex; align-items: center; gap: 12px; font-family: var(--pixel); font-size: 18px; cursor: pointer; }
.brand-mark { background: var(--orange); color: white; width: 40px; height: 40px; display: grid; place-items: center; box-shadow: 4px 4px 0 var(--ink); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-link { border: 0; background: transparent; font-weight: 800; cursor: pointer; padding: 10px 4px; }
.nav-link:hover { color: var(--orange); }
.yandex-login { border: 2px solid var(--ink); background: white; box-shadow: 3px 3px 0 var(--ink); padding: 9px 13px; font-size: 12px; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 9px; }
.yandex-login span { width: 25px; height: 25px; border-radius: 50%; background: #fc3f1d; color: white; display: grid; place-items: center; font-weight: 800; }
.yandex-login b { font-weight: 800; }
.yandex-login:hover { transform: translate(1px,1px); box-shadow: 2px 2px 0 var(--ink); }
.player-stats { display: flex; gap: 22px; align-items: center; }
body[data-screen="home"] .player-stats { display: none; }
body:not([data-screen="home"]) .yandex-login { display: none; }
body[data-screen="quiz"] .nav-link,
body[data-screen="routes"] .nav-link,
body[data-screen="map"] .nav-link,
body[data-screen="lesson"] .nav-link,
body[data-screen="admin"] > .topbar { display: none; }
.ai-status { display: flex; align-items: center; gap: 6px; background: #eee5d3; padding: 8px 11px; font-size: 10px; }
.ai-status i { width: 8px; height: 8px; background: #aaa18f; box-shadow: 2px 2px 0 var(--ink); }
.ai-status.ready { background: #dff3e8; }
.ai-status.ready i { background: var(--mint); }
.ai-status.demo { background: #ffedb7; }
.ai-status.demo i { background: var(--yellow); }
.stat { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.coin { width: 20px; height: 20px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); box-shadow: inset 0 0 0 3px #ffe394; }
.bolt { font-style: normal; color: var(--orange); }
.avatar-mini { border: 2px solid var(--ink); background: var(--mint); width: 42px; height: 42px; font-weight: 800; box-shadow: 3px 3px 0 var(--ink); }

.screen { min-height: calc(100vh - 84px); display: none; }
.screen.active { display: flex; animation: appear .35s ease both; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } }

#home { min-height: 0; flex-direction: column; overflow: hidden; }
.home-hero { width: 100%; min-height: calc(100vh - 84px); padding: 5vh 7vw 8vh; display: flex; align-items: center; gap: 5vw; }
.hero-copy { width: 57%; max-width: 760px; position: relative; z-index: 2; }
.eyebrow { font-family: var(--pixel); font-size: 9px; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; line-height: 1.7; }
.eyebrow > span { width: 26px; height: 5px; background: var(--orange); display: inline-block; }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { font-size: clamp(52px, 6vw, 90px); line-height: .96; letter-spacing: -5px; margin: 32px 0 28px; }
.hero-copy h1 em { font-style: normal; color: var(--orange); position: relative; }
.hero-copy h1 em::after { content: ""; position: absolute; height: 7px; left: 2px; right: 2px; bottom: -8px; background: repeating-linear-gradient(90deg, var(--orange) 0 15px, transparent 15px 19px); }
.lead { max-width: 650px; font-size: 18px; line-height: 1.65; color: #5d594f; }
.topic-box { margin-top: 34px; }
.topic-input-row { display: flex; align-items: center; background: white; padding: 10px; box-shadow: 7px 7px 0 var(--ink); border: 3px solid var(--ink); }
.spark { font-size: 22px; color: var(--orange); margin: 0 9px 0 5px; }
.topic-input-row input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 16px; padding: 14px 4px; }
.primary { border: 2px solid var(--ink); background: var(--orange); color: white; font-weight: 800; padding: 16px 22px; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; transition: .15s; }
.primary:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); background: #f8793e; }
.primary:disabled { filter: grayscale(1); opacity: .5; cursor: not-allowed; }
.primary.square { width: 54px; height: 54px; padding: 0; font-size: 24px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; font-size: 12px; color: var(--muted); }
.suggestions button { border: 0; background: #eee3cc; padding: 7px 11px; cursor: pointer; }
.suggestions button:hover { background: var(--yellow); }
.trust-row { display: flex; gap: 36px; margin-top: 50px; }
.trust-row div { display: flex; align-items: center; gap: 10px; }
.trust-row b { font-family: var(--pixel); font-size: 17px; color: var(--orange); }
.trust-row span { max-width: 90px; line-height: 1.2; font-size: 11px; color: var(--muted); }
.launch-price { display: grid; grid-template-columns: auto auto 1fr; align-items: end; gap: 11px; width: fit-content; margin-top: 30px; padding: 12px 16px; background: #fff1c9; border-left: 5px solid var(--orange); }
.launch-price > span { grid-column: 1 / -1; font-family: var(--pixel); font-size: 7px; color: var(--orange); }
.launch-price s { color: var(--muted); font-size: 16px; font-weight: 800; }
.launch-price strong { font-size: 29px; line-height: 1; color: #24724f; }
.launch-price small { color: var(--muted); font-size: 10px; align-self: center; }

.hero-art { flex: 1; min-width: 390px; height: 620px; position: relative; }
.pixel-sun { position: absolute; width: 310px; height: 310px; background: var(--yellow); border-radius: 50%; top: 95px; left: 50%; transform: translateX(-50%); box-shadow: 0 0 0 26px rgba(255,201,87,.16), 0 0 0 52px rgba(255,201,87,.08); }
.fox-wrap { position: absolute; left: 50%; top: 140px; transform: translateX(-50%); z-index: 2; }
.fox { width: 300px; image-rendering: pixelated; filter: drop-shadow(13px 15px 0 rgba(36,35,31,.15)); }
.speech-bubble { position: absolute; width: 190px; right: -145px; top: -55px; background: white; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 15px; font-family: var(--pixel); font-size: 8px; line-height: 1.7; transform: rotate(2deg); }
.speech-bubble::after { content: ""; position: absolute; bottom: -15px; left: 28px; width: 15px; height: 15px; background: white; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); }
.pixel-ground { position: absolute; left: 2%; right: 2%; bottom: 78px; height: 26px; background: var(--mint); box-shadow: 0 9px 0 #4e9e7d, 0 18px 0 var(--ink); }
.floating-card { position: absolute; background: white; border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 16px; z-index: 4; }
.level-card { top: 65px; left: -10px; width: 190px; transform: rotate(-2deg); }
.level-card span, .reward-card span { font-family: var(--pixel); font-size: 8px; color: var(--orange); }
.level-card b, .reward-card b { display: block; font-size: 13px; margin: 8px 0; }
.level-card small { font-size: 10px; color: var(--muted); }
.xp-line { height: 8px; background: var(--cream); margin: 12px 0 6px; }
.xp-line i { display: block; height: 100%; width: 68%; background: var(--orange); }
.reward-card { right: -5px; bottom: 80px; transform: rotate(3deg); }

.landing-section { width: 100%; padding: clamp(75px,9vw,130px) 7vw; }
.section-heading { max-width: 720px; }
.section-heading h2, .value-copy h2 { font-size: clamp(42px,5vw,72px); line-height: 1.02; letter-spacing: -4px; margin: 22px 0 24px; }
.section-heading > p:last-child, .value-copy > p { color: var(--muted); font-size: 17px; line-height: 1.65; max-width: 650px; }
.how-section { background: var(--ink); color: white; position: relative; }
.how-section::before { content: "01  02  03"; position: absolute; right: 5vw; top: 60px; color: #37352f; font-family: var(--pixel); font-size: clamp(25px,5vw,68px); letter-spacing: 12px; }
.how-section .section-heading { position: relative; z-index: 1; }
.how-section .section-heading > p:last-child { color: #bdb6a9; }
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin-top: 60px; position: relative; z-index: 1; }
.how-card { min-height: 360px; padding: 30px; background: #302e29; border-top: 4px solid #4a4740; display: flex; flex-direction: column; }
.how-card.featured { background: var(--yellow); color: var(--ink); border-top-color: var(--orange); transform: translateY(-18px); box-shadow: 8px 8px 0 var(--orange); }
.step-number { font-family: var(--pixel); font-size: 8px; color: var(--orange); }
.step-pixel { width: 64px; height: 64px; margin: 42px 0 32px; display: grid; place-items: center; border: 3px solid currentColor; box-shadow: 5px 5px 0 currentColor; font-family: var(--pixel); font-size: 18px; color: var(--mint); }
.how-card.featured .step-pixel { color: var(--orange); background: white; }
.how-card h3 { font-size: 24px; margin-bottom: 13px; }
.how-card p { color: #bdb6a9; line-height: 1.65; font-size: 14px; margin: 0; }
.how-card.featured p { color: #625a48; }
.price-compare { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; margin: 42px 0 30px; padding: 17px; border: 2px solid #5b574f; background: #24231f; }
.price-compare span { color: #aaa399; font-family: var(--pixel); font-size: 6px; line-height: 1.5; }
.price-compare s { color: #bdb6a9; font-weight: 800; font-size: 13px; }
.price-compare b { color: var(--yellow); font-size: 20px; }
.price-now { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.price-now s { font-size: 10px; }
.section-cta-row { display: flex; align-items: center; gap: 22px; margin-top: 36px; }
.section-cta-row .primary { background: var(--yellow); color: var(--ink); box-shadow: 4px 4px 0 var(--orange); }
.section-cta-row small { color: #aaa399; max-width: 270px; line-height: 1.5; }
.value-section { min-height: 760px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 9vw; align-items: center; background-image: linear-gradient(#eee5d2 1px, transparent 1px), linear-gradient(90deg,#eee5d2 1px, transparent 1px); background-size: 42px 42px; }
.value-visual { position: relative; padding: 35px 30px 60px 0; }
.skill-window { position: relative; z-index: 2; background: white; border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); padding: clamp(26px,4vw,45px); }
.skill-window::before { content: ""; position: absolute; inset: -18px 18px 18px -18px; z-index: -1; background: var(--yellow); border: 3px solid var(--ink); }
.skill-window > span, .dashboard-label { font-family: var(--pixel); font-size: 7px; color: var(--orange); }
.skill-window h3 { font-size: 30px; margin: 15px 0 28px; }
.skill-line { display: grid; grid-template-columns: 42px 1fr; gap: 15px; align-items: center; padding: 15px 0; border-bottom: 1px solid #ddd5c6; }
.skill-line i { width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid var(--ink); font-style: normal; background: var(--mint); }
.skill-line.current i { background: var(--yellow); }
.skill-line b, .skill-line small { display: block; }
.skill-line b { font-size: 14px; }.skill-line small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.skill-progress { height: 9px; background: var(--cream); margin: 26px 0 9px; }.skill-progress i { display: block; height: 100%; width: 68%; background: var(--orange); }
.skill-window > small { color: var(--muted); }
.fox-note { position: absolute; z-index: 3; right: -25px; bottom: 0; max-width: 230px; background: var(--mint); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 18px; font-family: var(--pixel); font-size: 7px; line-height: 1.7; transform: rotate(2deg); }
.value-copy h2 em { color: var(--orange); font-style: normal; }
.value-copy ul { padding: 0; margin: 34px 0; list-style: none; display: grid; gap: 19px; }
.value-copy li { display: grid; grid-template-columns: 15px 1fr; column-gap: 14px; }
.value-copy li::before { content: "◆"; color: var(--orange); font-size: 10px; margin-top: 4px; }
.value-copy li b, .value-copy li span { grid-column: 2; }.value-copy li span { color: var(--muted); margin-top: 5px; font-size: 13px; line-height: 1.5; }
.landing-cta { margin-top: 4px; }
.landing-footer { width: 100%; min-height: 115px; padding: 30px 7vw; display: flex; align-items: center; gap: 30px; border-top: 2px solid var(--ink); }
.landing-footer p { color: var(--muted); margin: 0; }.landing-footer .text-button { margin-left: auto; }

.dashboard-screen { background: #f7efdf; }
.dashboard-screen.active { display: block; }
.dashboard-shell { width: min(1240px,calc(100% - 44px)); margin: 0 auto; padding: 60px 0 80px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 36px; }
.dashboard-head h1 { font-size: clamp(44px,5vw,68px); letter-spacing: -4px; margin: 18px 0 10px; }
.dashboard-head > div > p:last-child { color: var(--muted); margin: 0; }
.profile-strip { background: var(--ink); color: white; display: grid; grid-template-columns: 1.8fr .55fr .55fr .55fr 1fr; gap: 25px; align-items: center; padding: 25px 30px; margin-bottom: 30px; }
.profile-person { display: flex; align-items: center; gap: 16px; }.profile-avatar { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; background: var(--mint); color: var(--ink); border: 2px solid white; box-shadow: 4px 4px 0 var(--orange); font-weight: 800; }
.profile-person span { display: block; color: var(--yellow); font-family: var(--pixel); font-size: 7px; }.profile-person b,.profile-person small { display: block; }.profile-person b { margin: 7px 0 4px; }.profile-person small { color: #aaa398; font-size: 10px; }
.profile-stat { border-left: 1px solid #4d4a43; padding-left: 22px; }.profile-stat b,.profile-stat span { display: block; }.profile-stat b { font-size: 25px; color: var(--yellow); }.profile-stat span { color: #aaa398; font-size: 10px; margin-top: 3px; }
.profile-xp span { height: 9px; background: #4d4a43; display: block; }.profile-xp i { display: block; width: 68%; height: 100%; background: var(--orange); }.profile-xp small { display: block; color: #aaa398; margin-top: 8px; font-size: 9px; }
.continue-course { min-height: 410px; display: grid; grid-template-columns: 1.25fr .75fr; background: var(--yellow); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.continue-copy { padding: clamp(30px,5vw,58px); }
.continue-copy h2 { font-size: clamp(32px,4vw,52px); line-height: 1.06; letter-spacing: -3px; margin: 15px 0; max-width: 720px; }.continue-copy > p { color: #625945; line-height: 1.6; max-width: 670px; }
.course-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 17px; }.course-tags span { background: rgba(255,255,255,.64); padding: 8px 10px; font-size: 11px; font-weight: 800; }
.dashboard-progress,.saved-progress { height: 10px; background: rgba(36,35,31,.18); }.dashboard-progress i,.saved-progress i { display: block; height: 100%; background: var(--orange); }
.continue-copy > small { display: block; color: #766c55; margin: 8px 0 27px; }.continue-copy .primary { background: var(--ink); box-shadow: 4px 4px 0 var(--orange); }
.continue-art { position: relative; display: grid; place-items: center; background: #f1b83f; border-left: 3px solid var(--ink); overflow: hidden; }
.continue-art::before { content: ""; position: absolute; width: 330px; height: 330px; border-radius: 50%; background: rgba(255,255,255,.28); }
.appliance-pixel { position: relative; z-index: 1; width: 210px; height: 170px; background: white; border: 8px solid var(--ink); box-shadow: 10px 10px 0 var(--orange); display: grid; place-items: center; }
.appliance-pixel::before { content: ""; position: absolute; left: 20px; right: 62px; top: 25px; bottom: 25px; background: #504d47; border: 6px solid var(--ink); box-shadow: inset 12px 0 #69655d; }.appliance-pixel::after { content: ""; position: absolute; right: 19px; top: 26px; width: 26px; height: 26px; background: var(--orange); border: 4px solid var(--ink); box-shadow: 0 48px 0 -4px var(--yellow), 0 48px 0 0 var(--ink); }
.appliance-pixel b { position: absolute; left: 39px; color: white; z-index: 2; font-family: var(--pixel); font-size: 12px; }.appliance-pixel i { position: absolute; left: 38px; top: 62px; z-index: 2; width: 80px; height: 7px; background: var(--mint); }
.next-skill { position: absolute; z-index: 2; right: 22px; bottom: 25px; max-width: 220px; background: white; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 15px; transform: rotate(2deg); }.next-skill span { font-family: var(--pixel); color: var(--orange); font-size: 6px; }.next-skill b { display: block; font-size: 12px; margin-top: 8px; }
.course-library-head { display: flex; align-items: end; justify-content: space-between; margin: 70px 0 24px; }.course-library-head h2 { font-size: 36px; margin: 9px 0 0; }.filter-button { border: 0; background: transparent; font-weight: 800; cursor: pointer; }
.dashboard-course-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.saved-course,.new-course-card { min-height: 390px; padding: 27px; background: white; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.saved-course { display: flex; flex-direction: column; }.saved-course.completed { background: #f0f7f3; }
.saved-course-top { display: flex; align-items: center; gap: 11px; }.course-glyph { width: 45px; height: 45px; display: grid; place-items: center; border: 2px solid var(--ink); font-family: var(--pixel); font-size: 8px; }.course-glyph.orange { background: var(--orange); color: white; }.course-glyph.mint { background: var(--mint); }
.status-pill { background: var(--cream); padding: 7px 9px; font-size: 9px; font-weight: 800; }.saved-course-top button { margin-left: auto; border: 0; background: transparent; cursor: pointer; font-weight: 800; }
.saved-course h3 { font-size: 22px; line-height: 1.25; margin: 25px 0 11px; }.saved-course > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.saved-skill { display: flex; gap: 10px; margin: auto 0 21px; padding: 12px; background: #e7f4ed; }.saved-skill i { color: var(--orange); font-style: normal; }.saved-skill b,.saved-skill span { display: block; }.saved-skill b { color: #24724f; font-size: 9px; margin-bottom: 4px; }.saved-skill span { font-size: 11px; line-height: 1.4; }
.saved-course footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }.saved-course footer span { color: var(--muted); font-size: 10px; }.saved-course footer button { border: 0; background: transparent; font-weight: 800; cursor: pointer; color: var(--orange-dark); }
.new-course-card { cursor: pointer; display: grid; place-content: center; justify-items: center; text-align: center; gap: 13px; background: transparent; border-style: dashed; box-shadow: none; }.new-course-card:hover { background: white; border-style: solid; box-shadow: 6px 6px 0 var(--ink); }.new-course-card > span { width: 58px; height: 58px; display: grid; place-items: center; background: var(--yellow); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 28px; }.new-course-card small { color: var(--muted); }
.dashboard-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 65px; padding-top: 25px; border-top: 1px solid #cfc6b6; color: var(--muted); font-size: 11px; }.admin-preview-link { color: var(--ink); }

.admin-screen { background: #f4f0e8; min-height: 100vh; }
.admin-screen.active { display: grid; grid-template-columns: 245px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 22px; background: var(--ink); color: white; display: flex; flex-direction: column; }.admin-brand { color: white; align-self: flex-start; }.admin-badge { margin: 25px 0 34px 53px; width: fit-content; color: var(--yellow); font-family: var(--pixel); font-size: 7px; }
.admin-sidebar nav { display: grid; gap: 6px; }.admin-sidebar nav button { border: 0; background: transparent; color: #b9b3a8; padding: 13px 15px; text-align: left; cursor: pointer; font-weight: 750; }.admin-sidebar nav button i { display: inline-block; width: 28px; color: var(--yellow); font-style: normal; }.admin-sidebar nav button.active,.admin-sidebar nav button:hover { background: #3b3933; color: white; }
.admin-exit { margin-top: auto; border: 1px solid #5a564e; background: transparent; color: #c8c1b5; padding: 12px; cursor: pointer; font-size: 11px; }
.admin-content { min-width: 0; padding: 45px clamp(25px,4vw,65px) 70px; }
.admin-head { display: flex; justify-content: space-between; align-items: end; gap: 25px; }.admin-head h1 { font-size: clamp(42px,5vw,64px); letter-spacing: -4px; margin: 17px 0 8px; }.admin-head > div > p:last-child { color: var(--muted); margin: 0; }.admin-period { border: 2px solid var(--ink); background: white; padding: 11px 14px; font-size: 11px; font-weight: 800; }.admin-period span { margin-left: 17px; }
.admin-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 38px 0 18px; }.admin-kpis article { padding: 20px; background: white; border-top: 4px solid var(--ink); }.admin-kpis article.cost { background: var(--yellow); border-color: var(--orange); }.admin-kpis span { display: block; color: var(--muted); font-family: var(--pixel); font-size: 6px; }.admin-kpis b { display: block; font-size: 30px; margin: 13px 0 5px; }.admin-kpis small { color: var(--muted); font-size: 9px; }.admin-kpis small.positive { color: #24724f; }
.admin-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; min-width: 0; }.admin-panel { min-width: 0; background: white; padding: 25px; }.admin-panel > header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }.admin-panel header span { color: var(--orange); font-family: var(--pixel); font-size: 6px; }.admin-panel header h2 { font-size: 23px; margin: 9px 0 0; }.admin-panel header small { color: var(--muted); }.admin-panel header button,.health-panel > button { border: 0; background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; }
.expense-bars { height: 190px; display: flex; align-items: end; gap: 12px; margin: 30px 0 20px; border-bottom: 1px solid #d9d2c7; padding: 0 10px; }.expense-bars div { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 8px; }.expense-bars i { width: 100%; height: var(--h); background: var(--orange); display: block; }.expense-bars div:nth-child(even) i { background: var(--yellow); }.expense-bars span { color: var(--muted); font-size: 8px; }
.expense-legend { display: flex; flex-wrap: wrap; gap: 20px; }.expense-legend > span { font-size: 10px; }.expense-legend b { margin-left: 7px; }.text-dot,.image-dot { width: 9px; height: 9px; display: inline-block; margin-right: 6px; background: var(--orange); }.image-dot { background: var(--yellow); border: 1px solid var(--ink); }
.token-row { display: flex; justify-content: space-between; gap: 15px; padding: 19px 0; border-bottom: 1px solid #e1dacf; font-size: 11px; }.token-row span { color: var(--muted); }.token-row.total { border: 0; background: var(--cream); margin-top: 15px; padding: 16px; }.token-row.total span { color: var(--ink); font-weight: 800; }
.users-panel { grid-column: 1; }.admin-table { margin-top: 24px; }.admin-table > div { display: grid; grid-template-columns: 1.8fr .45fr .6fr .7fr; gap: 15px; align-items: center; padding: 13px 0; border-bottom: 1px solid #e1dacf; font-size: 11px; }.admin-table .table-head { color: var(--muted); font-size: 8px; }.admin-table > div > span:first-child { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; }.admin-table > div > span:first-child i { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; background: var(--mint); border: 1px solid var(--ink); font-style: normal; font-size: 8px; }.admin-table b,.admin-table small { display: block; }.admin-table small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.health-panel > header { align-items: center; margin-bottom: 17px; }.health-light { width: 13px; height: 13px; background: var(--mint); border: 2px solid var(--ink); box-shadow: 3px 3px 0 #aadcc5; }.health-panel > div { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #e1dacf; font-size: 11px; }.health-panel > div span { color: var(--muted); }.health-panel > button { margin-top: 19px; color: var(--orange-dark); }
.admin-demo-note { text-align: right; color: var(--muted); font-size: 9px; margin: 22px 0 0; }

.text-back, .text-button { border: 0; background: none; padding: 9px 0; font-weight: 800; cursor: pointer; }
.quiz-screen { padding: 4vh 7vw 8vh; flex-direction: column; }
.quiz-layout { flex: 1; display: grid; grid-template-columns: .75fr 1.25fr; gap: 7vw; align-items: center; max-width: 1250px; margin: auto; width: 100%; }
.quiz-side h2, .routes-head h2, .map-sidebar h2 { font-size: clamp(36px,4vw,58px); line-height: 1.04; letter-spacing: -3px; margin: 24px 0; }
.fox-dialog { margin-top: 45px; display: flex; align-items: center; gap: 15px; }
.fox.face { width: 78px; filter: drop-shadow(4px 4px 0 rgba(36,35,31,.18)); flex: 0 0 auto; }
.fox-dialog p { background: white; padding: 15px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 12px; line-height: 1.5; margin: 0; }
.quiz-card { position: relative; background: white; border: 3px solid var(--ink); box-shadow: 9px 9px 0 var(--ink); padding: clamp(26px,4vw,58px); min-height: 510px; overflow: hidden; }
.quiz-progress { display: flex; align-items: center; gap: 15px; font-family: var(--pixel); font-size: 8px; }
.quiz-progress > div { height: 8px; background: var(--cream); flex: 1; }
.quiz-progress i { display: block; width: 33%; height: 100%; background: var(--orange); transition: .3s; }
.topic-label, .check-label { color: var(--orange); font-family: var(--pixel); font-size: 8px; margin-top: 50px; }
.topic-label { display: grid; gap: 10px; min-width: 0; }
.topic-label strong { color: var(--ink); font-family: var(--body); font-size: clamp(16px, 2.1vw, 22px); line-height: 1.35; overflow-wrap: anywhere; text-transform: none; display: block; }
.quiz-card h3 { font-size: 30px; line-height: 1.2; margin: 14px 0 10px; }
.quiz-card > p:not(.topic-label) { color: var(--muted); }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.answer-grid button { text-align: left; border: 2px solid #cfc7b7; background: var(--paper); padding: 18px; font-weight: 700; cursor: pointer; min-height: 76px; }
.answer-grid button:hover { border-color: var(--ink); background: var(--yellow); transform: translateY(-2px); }
.answer-grid button span { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; font-weight: 500; }
.quiz-custom textarea { width: 100%; margin-top: 24px; resize: vertical; min-height: 130px; border: 2px solid #cfc7b7; background: var(--paper); padding: 16px; outline: 0; line-height: 1.55; }
.quiz-custom textarea:focus { border-color: var(--ink); box-shadow: 4px 4px 0 var(--yellow); }
.quiz-custom > div { margin-top: 18px; display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.quiz-inline-loading { position: absolute; inset: 0; z-index: 3; background: rgba(255,255,255,.94); display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 30px; }
.quiz-inline-loading b { font-size: 20px; }.quiz-inline-loading > span { color: var(--muted); font-size: 12px; }

.routes-screen { padding: 5vh 7vw 9vh; flex-direction: column; align-items: center; }
.routes-head { text-align: center; max-width: 700px; }
.routes-head .eyebrow { justify-content: center; }
.routes-head h2 { margin-bottom: 12px; }
.routes-head > p:last-child { color: var(--muted); }
.route-grid { width: 100%; max-width: 1200px; display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin: 40px 0 25px; }
.route-card { position: relative; background: white; padding: 30px; border: 3px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); min-height: 600px; display: flex; flex-direction: column; cursor: pointer; transition: .2s; }
.route-card:hover { transform: translateY(-7px); box-shadow: 7px 14px 0 var(--ink); }
.route-card.featured { background: var(--yellow); }
.route-card .route-icon { font-family: var(--pixel); width: 54px; height: 54px; display: grid; place-items: center; background: var(--mint); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.route-card.featured .route-icon { background: var(--orange); color: white; }
.route-card h3 { font-size: 24px; margin: 26px 0 12px; }
.route-card p { color: #625e54; font-size: 14px; line-height: 1.55; }
.route-meta { display: flex; gap: 10px; margin: 14px 0 22px; font-size: 13px; font-weight: 800; }
.route-meta span { background: var(--cream); border-left: 4px solid var(--orange); padding: 10px 11px; }
.route-card.featured .route-meta span { background: rgba(255,255,255,.56); }
.route-promise { font-size: 15px !important; font-weight: 700; color: var(--ink) !important; }
.route-cost { margin: -7px 0 20px; padding: 13px 14px; background: #e4f2ea; border-left: 4px solid var(--mint); }
.route-card.featured .route-cost { background: rgba(255,255,255,.62); }
.route-cost b { display: block; color: #236b4d; font-size: 15px; }
.route-cost small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; margin-top: 5px; }
.route-journey { display: grid; gap: 11px; margin: 3px 0 22px; }
.journey-row { background: rgba(244,236,216,.72); padding: 12px 14px; }
.route-card.featured .journey-row { background: rgba(255,255,255,.48); }
.journey-row span { display: block; font-family: var(--pixel); font-size: 7px; color: var(--orange); margin-bottom: 7px; }
.journey-row p { margin: 0; font-size: 12px; line-height: 1.5; }
.route-modules { padding: 0; list-style: none; margin: 0 0 25px; }
.route-modules li { font-size: 12px; margin: 9px 0; display: flex; gap: 8px; }
.route-modules li::before { content: "◆"; color: var(--orange); font-size: 8px; }
.route-card .primary { width: 100%; margin-top: auto; }

.map-screen { display: none; min-height: calc(100vh - 84px); }
.map-screen.active { display: grid; grid-template-columns: minmax(300px, 35%) 1fr; }
.map-sidebar { background: var(--ink); color: white; padding: 7vh 5vw; }
.map-sidebar .eyebrow { color: var(--yellow); margin-top: 55px; }
.map-sidebar .eyebrow span { background: var(--yellow); }
.map-sidebar > p:not(.eyebrow) { color: #c8c1b4; line-height: 1.6; }
.course-progress { margin-top: 45px; }
.course-progress > div { height: 10px; background: #48453e; }
.course-progress i { display: block; width: 12%; height: 100%; background: var(--orange); transition: .3s; }
.course-progress span { display: block; margin-top: 10px; font-size: 11px; color: #b8b1a5; }
.course-progress b { color: var(--yellow); }
.fox-dialog.compact { margin-top: 60px; }
.fox-dialog.compact p { color: var(--ink); }
.quest-map { position: relative; padding: 45px 7vw 90px; overflow: hidden; background-image: linear-gradient(#e9dfc9 1px, transparent 1px), linear-gradient(90deg,#e9dfc9 1px, transparent 1px); background-size: 42px 42px; }
.map-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--pixel); font-size: 9px; }
.ghost-button { background: var(--paper); border: 2px solid var(--ink); padding: 9px 12px; cursor: pointer; font-size: 11px; }
.path-line { position: absolute; left: calc(7vw + 31px); top: 145px; bottom: 130px; width: 8px; background: repeating-linear-gradient(180deg, var(--orange) 0 14px, transparent 14px 22px); }
.module { display: flex; align-items: center; gap: 25px; margin: 55px 0; position: relative; z-index: 2; }
.module-node { flex: 0 0 auto; width: 68px; height: 68px; display: grid; place-items: center; border: 3px solid var(--ink); background: var(--paper); box-shadow: 5px 5px 0 var(--ink); font-family: var(--pixel); font-size: 12px; }
.module.complete .module-node { background: var(--mint); }
.module.current .module-node { background: var(--orange); color: white; }
.module.locked { opacity: .62; }
.module-card { background: white; border: 2px solid var(--ink); padding: 23px 26px; min-width: min(480px, calc(100vw - 500px)); box-shadow: 5px 5px 0 var(--ink); }
.module-card > span, .branch-choice > span { font-family: var(--pixel); color: var(--orange); font-size: 7px; }
.module-card b { display: block; font-size: 20px; margin: 8px 0; }
.module-card small { color: var(--muted); }
.module-card .primary { display: block; margin-top: 19px; }
.branch-choice { margin-left: 94px; background: #eee5d3; padding: 22px; max-width: 480px; border: 2px dashed #aaa18f; }
.branch-choice > div { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.branch-choice button { border: 1px solid #aaa18f; background: var(--paper); padding: 8px 10px; font-size: 11px; }
.module-list { display: grid; gap: 22px; margin: 42px 0; max-width: 720px; }
.course-module { background: white; border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.course-module.current { box-shadow: 6px 6px 0 var(--orange); }
.course-module.complete { box-shadow: 6px 6px 0 var(--mint); }
.module-toggle { width: 100%; border: 0; background: transparent; padding: 24px; display: grid; grid-template-columns: 52px 1fr 28px; gap: 17px; align-items: center; text-align: left; cursor: pointer; }
.module-toggle:hover { background: #fff5db; }
.module-index { width: 50px; height: 50px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--cream); font-family: var(--pixel); font-size: 9px; }
.course-module.current .module-index { background: var(--orange); color: white; }
.course-module.complete .module-index { background: var(--mint); }
.module-summary span { font-family: var(--pixel); color: var(--orange); font-size: 7px; }
.module-summary b { display: block; font-size: 20px; margin: 7px 0; }
.module-summary p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.module-skills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.module-skills small { background: #dff3e8; color: #24724f; border: 1px solid #91c8ad; padding: 6px 8px; font-size: 10px; font-weight: 800; }
.module-chevron { font-size: 22px; transition: .2s; }
.course-module.expanded .module-chevron { transform: rotate(90deg); }
.module-lessons { display: none; border-top: 2px solid var(--ink); background: #f5eddd; padding: 10px 22px 20px 91px; }
.course-module.expanded .module-lessons { display: block; }
.lesson-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 13px; padding: 15px 0; border-bottom: 1px solid #d6ccba; }
.lesson-row:last-child { border-bottom: 0; }
.lesson-status { width: 28px; height: 28px; border: 2px solid var(--ink); display: grid; place-items: center; background: white; font-family: var(--pixel); font-size: 7px; }
.lesson-row.complete .lesson-status { background: var(--mint); }
.lesson-row.current .lesson-status { background: var(--yellow); }
.lesson-copy b { display: block; font-size: 14px; }.lesson-copy small { color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }
.lesson-action { border: 2px solid var(--ink); background: var(--orange); color: white; padding: 10px 12px; font-weight: 800; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.lesson-action:disabled { background: #c8c0b2; color: #716c64; cursor: not-allowed; box-shadow: none; }
.branch-choice { margin-left: 0; }

.lesson-screen { flex-direction: column; background: #f8f1e2; }
.lesson-top { position: sticky; top: 0; z-index: 8; background: var(--paper); padding: 18px 5vw; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--ink); font-family: var(--pixel); font-size: 8px; }
.lesson-xp b { color: var(--orange); }
.lesson-content { width: 100%; padding: 8vh 20px; }
.lesson-content article { max-width: 850px; margin: auto; }
.lesson-content h1 { font-size: clamp(42px,6vw,70px); line-height: 1.03; letter-spacing: -4px; margin: 24px 0; }
.lesson-lead { font-size: 19px; line-height: 1.65; color: #5f5b52; max-width: 760px; }
.lesson-deck { margin: 44px 0 28px; }
.deck-progress { display: flex; justify-content: space-between; align-items: center; margin: 0 3px 18px; font-family: var(--pixel); font-size: 8px; color: var(--orange); }
#card-dots { display: flex; gap: 8px; }
#card-dots i { width: 14px; height: 14px; border: 2px solid var(--ink); background: #ddd4c4; display: block; }
#card-dots i.current { background: var(--yellow); }.deck-progress i.done { background: var(--mint); }
.lesson-card-wrap { position: relative; margin: 0 20px 38px 0; isolation: isolate; }
.lesson-card-wrap::before, .lesson-card-wrap::after { content: ""; position: absolute; inset: 0; background: #e9dfcb; border: 3px solid var(--ink); z-index: -2; transform: translate(18px,18px) rotate(1.2deg); }
.lesson-card-wrap::after { background: #f3ead8; z-index: -1; transform: translate(9px,9px) rotate(.5deg); }
.lesson-card { min-height: 640px; background: white; border: 3px solid var(--ink); box-shadow: 7px 7px 0 var(--orange); padding: clamp(28px,5vw,54px); transition: opacity .18s, transform .18s; }
.lesson-card.changing { opacity: 0; transform: translateX(-20px) rotate(-1deg); }
.lesson-card-head { display: flex; justify-content: space-between; gap: 15px; color: var(--orange); font-family: var(--pixel); font-size: 7px; }
.lesson-card-head b { color: #317a5c; text-align: right; }
.lesson-card h2 { font-size: clamp(30px,4vw,44px); line-height: 1.08; letter-spacing: -2px; margin: 18px 0 26px; }
.lesson-card .lesson-paragraphs p { color: #514d45; font-size: 17px; line-height: 1.78; margin: 0; }
.card-ai-visual { margin: 28px 0; border: 3px solid var(--ink); background: #f4ecdd; overflow: hidden; }
.card-image-stage { min-height: 360px; display: grid; place-items: center; position: relative; background: #e9dfce; }
.card-image-stage img { width: 100%; max-height: 620px; object-fit: contain; display: none; }
.card-ai-visual.ready .card-image-stage img { display: block; }.card-ai-visual.ready .card-image-loading { display: none; }
.card-image-loading { display: grid; justify-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
.card-ai-visual figcaption { padding: 20px 24px 12px; }.card-ai-visual figcaption b { font-size: 18px; }.card-ai-visual figcaption p { color: var(--muted); line-height: 1.55; margin: 8px 0; }
.card-ai-visual figcaption small { display: block; color: #aaa397; font-size: 10px; line-height: 1.4; margin-top: 10px; }
.card-visual-legend { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; padding: 12px 24px 24px; }
.card-visual-legend > p { grid-column: 1 / -1; margin: 4px 0 2px; color: var(--muted); font-family: var(--pixel); font-size: 8px; text-transform: uppercase; }
.card-visual-legend div { border: 2px solid var(--ink); background: white; padding: 12px; }.card-visual-legend span { display: inline-grid; place-items: center; width: 25px; height: 25px; background: var(--yellow); border: 2px solid var(--ink); font-family: var(--pixel); font-size: 7px; margin-right: 8px; }
.card-visual-legend b { font-size: 13px; }.card-visual-legend small { display: block; color: var(--muted); margin: 7px 0 0 35px; line-height: 1.4; }
.card-diagram { margin: 28px 0; background: var(--ink); color: white; padding: 24px; }
.card-diagram > div:first-child { display: flex; justify-content: space-between; gap: 15px; align-items: center; }.card-diagram > div:first-child span { color: var(--yellow); font-family: var(--pixel); font-size: 7px; }
.card-diagram-steps { display: grid; grid-template-columns: repeat(var(--diagram-count,3),1fr); gap: 8px; margin: 20px 0 15px; }
.card-diagram-steps div { border: 2px solid #656158; padding: 15px; }.card-diagram-steps i { display: grid; place-items: center; width: 27px; height: 27px; background: var(--orange); color: white; font-style: normal; font-family: var(--pixel); font-size: 7px; }
.card-diagram-steps b { display: block; margin: 11px 0 6px; }.card-diagram-steps small, .card-diagram > p { color: #c6c0b4; line-height: 1.45; }
.card-check { margin-top: 30px; padding-top: 27px; border-top: 2px solid #d8d0c1; }.card-check > span { color: var(--orange); font-family: var(--pixel); font-size: 7px; }.card-check h3 { font-size: 22px; margin: 13px 0 18px; }
.card-check-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.card-check-options button { min-height: 62px; padding: 12px; border: 2px solid #bdb4a5; background: var(--paper); cursor: pointer; font-weight: 750; }
.card-check-options button:hover { border-color: var(--ink); }.card-check-options button.correct { background: var(--mint); border-color: var(--ink); }.card-check-options button.wrong { background: #f1a08b; border-color: var(--ink); }
.card-check-options.answered button { cursor: default; }.card-feedback { min-height: 24px; margin: 15px 0 0; font-weight: 750; color: var(--orange-dark); line-height: 1.5; }.card-feedback.success { color: #24724f; }
.card-skill-earned { margin-top: 20px; padding: 16px; background: #dff3e8; display: flex; gap: 13px; align-items: center; }.card-skill-earned > span { width: 35px; height: 35px; display: grid; place-items: center; background: var(--mint); border: 2px solid var(--ink); }.card-skill-earned b { color: #24724f; }.card-skill-earned p { margin: 4px 0 0; font-size: 13px; }
.card-skill-earned.gap { background: #fff0c6; }.card-skill-earned.gap > span { background: var(--yellow); }.card-skill-earned.gap b { color: #9a541f; }
.lesson-sources { margin: 34px 0 0; padding-top: 24px; border-top: 1px solid #d8d0c1; }
.lesson-sources > span { color: var(--muted); font-family: var(--pixel); font-size: 7px; }
.lesson-sources > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.lesson-sources a { color: #4f7565; background: #edf5f0; padding: 8px 10px; font-size: 11px; text-decoration: none; }
.lesson-sources a:hover { color: var(--ink); background: #dff3e8; }
.card-next { display: block; margin: 25px 0 0 auto; }
.reward-skills { margin: 20px 0; padding: 16px; background: #dff3e8; text-align: left; }.reward-skills > span { font-family: var(--pixel); color: #24724f; font-size: 7px; }.reward-skills #reward-skills { display: grid; gap: 7px; margin-top: 11px; }.reward-skills b::before { content: "◆"; color: var(--orange); margin-right: 8px; }.reward-skills small { color: #8a5b22; line-height: 1.4; }
.infographic { background: var(--ink); color: white; margin: 50px 0 34px; box-shadow: 9px 9px 0 var(--orange); }
.diagram-head { display: flex; justify-content: space-between; padding: 18px 22px; font-family: var(--pixel); font-size: 8px; border-bottom: 1px solid #504d45; }
.diagram-head small { color: var(--yellow); font-size: 7px; }
.cycle-steps { display: grid; grid-template-columns: repeat(var(--step-count, 4),1fr); border-bottom: 1px solid #504d45; }
.cycle-steps button { padding: 18px 10px; border: 0; border-right: 1px solid #504d45; background: transparent; color: white; cursor: pointer; }
.cycle-steps button.active { background: var(--orange); }
.cycle-steps i { display: inline-grid; place-items: center; width: 22px; height: 22px; background: white; color: var(--ink); font-style: normal; font-family: var(--pixel); font-size: 7px; }
.cycle-steps b, .cycle-steps span { display: block; }
.cycle-steps b { margin: 10px 0 4px; }
.cycle-steps span { font-size: 10px; opacity: .7; }
.engine-stage { min-height: 360px; position: relative; padding: 55px 42px 42px 390px; overflow: hidden; }
.cylinder { position: absolute; width: 160px; height: 230px; border: 9px solid #777268; border-top: 0; left: 130px; top: 65px; overflow: hidden; }
.piston { position: absolute; left: 8px; right: 8px; height: 55px; bottom: 10px; background: #d8d3ca; border: 5px solid white; transition: .5s; }
.piston::after { content: ""; width: 16px; height: 100px; background: #d8d3ca; position: absolute; left: 50%; top: 50px; transform: translateX(-50%); }
.gas { position: absolute; inset: 0 0 45%; background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(255,201,87,.23) 10px 15px); }
.valve { position: absolute; top: 42px; width: 16px; height: 55px; background: #d8d3ca; z-index: 2; }
.left-valve { left: 162px; }.right-valve { left: 243px; }
.spark-plug { position: absolute; left: 201px; top: 38px; font-size: 30px; color: var(--yellow); z-index: 3; }
.flow-arrow { position: absolute; left: 90px; top: 85px; font-family: var(--pixel); font-size: 42px; color: var(--mint); }
.stage-copy span { color: var(--yellow); font-family: var(--pixel); font-size: 8px; }
.stage-copy b { display: block; font-size: 30px; margin: 15px 0; }
.stage-copy p { color: #c6c0b4; line-height: 1.6; }
.visual-stage { min-height: 340px; position: relative; padding: 78px 42px 55px 48%; overflow: hidden; }
.visual-glyph { position: absolute; left: 14%; top: 83px; width: 150px; height: 150px; display: grid; place-items: center; background: var(--yellow); color: var(--ink); border: 7px solid white; outline: 5px solid var(--orange); box-shadow: 13px 13px 0 #111; font-family: var(--pixel); font-size: 34px; transition: transform .25s; }
.visual-glyph.pulse { transform: scale(.9) rotate(-3deg); }
.pixel-orbit { position: absolute; width: 235px; height: 235px; left: 8%; top: 40px; border: 3px dashed #6f6a61; border-radius: 50%; animation: orbit 18s linear infinite; }
.pixel-orbit i { position: absolute; width: 14px; height: 14px; background: var(--mint); border: 2px solid white; }
.pixel-orbit i:nth-child(1) { left: 15px; top: 37px; }.pixel-orbit i:nth-child(2) { right: -7px; top: 100px; background: var(--orange); }.pixel-orbit i:nth-child(3) { left: 88px; bottom: -7px; background: var(--yellow); }
@keyframes orbit { to { transform: rotate(360deg); } }
.reference-image { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); margin: 34px 0 44px; background: white; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--yellow); overflow: hidden; }
.reference-image[hidden] { display: none; }
.reference-image-frame { min-height: 310px; background: #e8e0d1; display: grid; place-items: center; overflow: hidden; }
.reference-image img { display: block; width: 100%; height: 100%; max-height: 480px; object-fit: contain; }
.reference-image figcaption { padding: 28px; align-self: center; }
.reference-image figcaption > span { color: var(--orange); font-family: var(--pixel); font-size: 7px; line-height: 1.6; }
.reference-image h3 { margin: 13px 0 10px; font-size: 24px; }.reference-image p { color: var(--muted); line-height: 1.6; }
.reference-image small { display: block; margin-top: 20px; color: #777167; line-height: 1.5; }.reference-image a { color: #24724f; font-weight: 800; }
.lesson-sections { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 42px 0; }
.lesson-phase { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-top: 45px; padding: 17px 20px; background: var(--ink); color: white; }
.lesson-phase span { color: var(--yellow); font-family: var(--pixel); font-size: 8px; }.lesson-phase b { font-size: 15px; }
.lesson-section { background: white; padding: 30px 34px; border-left: 7px solid var(--orange); }
.lesson-section span { font-family: var(--pixel); font-size: 7px; color: var(--orange); }
.lesson-section h3 { font-size: 20px; margin: 12px 0 9px; }
.lesson-section p { color: #514d45; font-size: 16px; line-height: 1.78; margin: 0; }
.lesson-paragraphs { display: grid; gap: 15px; }
.lesson-code { margin: 22px 0 4px; border: 2px solid var(--ink); background: #24231f; box-shadow: 5px 5px 0 var(--mint); overflow: hidden; }
.lesson-code figcaption { min-height: 45px; padding: 8px 10px 8px 15px; display: flex; align-items: center; gap: 10px; background: #34322c; color: white; }
.lesson-code figcaption span { color: white; font-family: var(--body); font-size: 13px; font-weight: 800; }
.lesson-code figcaption small { color: #9f988b; font-family: var(--pixel); font-size: 7px; text-transform: uppercase; }
.copy-code { margin-left: auto; border: 1px solid #716c62; background: #efeadf; color: var(--ink); padding: 7px 10px; font-family: var(--body); font-size: 12px; font-weight: 800; cursor: pointer; }
.copy-code:hover { background: var(--mint); }
.lesson-code pre { margin: 0; padding: 20px; overflow-x: auto; color: #e9f3ec; font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre; tab-size: 2; }
.lesson-code code { font: inherit; }
.lesson-takeaway { margin-top: 18px !important; padding: 12px 15px; background: var(--cream); color: var(--ink) !important; font-size: 13px !important; font-weight: 800; }
.support-visual { background: #dfeee7; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--mint); padding: 30px; margin: 44px 0; }
.support-head > span { font-family: var(--pixel); font-size: 7px; color: #317a5c; }.support-head h3 { font-size: 25px; margin: 11px 0 8px; }.support-head p { color: #56665e; line-height: 1.6; }
.mock-window { background: var(--ink); border: 3px solid var(--ink); margin-top: 25px; }
.mock-toolbar { height: 43px; display: flex; align-items: center; gap: 7px; padding: 0 14px; color: white; }
.mock-toolbar i { width: 10px; height: 10px; background: var(--orange); }.mock-toolbar i:nth-child(2) { background: var(--yellow); }.mock-toolbar i:nth-child(3) { background: var(--mint); }.mock-toolbar b { margin-left: auto; font-family: var(--pixel); font-size: 7px; color: #d4ccbf; }
.mock-content { background: #f8f3e8; min-height: 230px; padding: 25px; display: grid; grid-template-columns: repeat(2,1fr); gap: 17px; }
.mock-item { background: white; border: 2px solid var(--ink); padding: 16px; position: relative; box-shadow: 4px 4px 0 #c8beac; }
.mock-item::before { content: ""; position: absolute; width: 10px; height: 10px; border: 2px solid var(--ink); background: var(--orange); left: -7px; top: 20px; }
.mock-item span { font-family: var(--pixel); font-size: 7px; color: var(--orange); }.mock-item b { display: block; font-size: 14px; margin: 9px 0 5px; }.mock-item small { color: var(--muted); line-height: 1.4; }
.key-idea { display: flex; gap: 20px; background: #ffedb7; padding: 25px; margin: 40px 0; }
.key-idea > span { width: 42px; height: 42px; flex: 0 0 auto; background: var(--yellow); border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--pixel); box-shadow: 3px 3px 0 var(--ink); }
.key-idea b { font-size: 18px; }.key-idea p { margin: 7px 0 0; line-height: 1.55; }
.knowledge-check { background: white; border: 3px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); padding: 34px; margin: 55px 0 30px; }
.knowledge-check .check-label { margin: 0; }
.knowledge-check h3 { font-size: 25px; margin: 15px 0 25px; }
.check-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.check-options button, .adapt-actions button { background: var(--paper); border: 2px solid #bbb3a3; padding: 14px; cursor: pointer; font-weight: 700; }
.check-options button:hover { border-color: var(--ink); }
.check-options button.correct { background: var(--mint); border-color: var(--ink); }.check-options button.wrong { background: #f0a08a; }
.feedback { min-height: 22px; margin: 18px 0 0; font-weight: 700; color: var(--orange-dark); }
.feedback.success { color: #24724f; background: #dff3e8; padding: 12px 14px; }
.independent-practice { position: relative; min-height: 260px; margin: 38px 0; border: 3px solid var(--ink); background: #e1f1e9; box-shadow: 7px 7px 0 var(--mint); overflow: hidden; }
.practice-lock { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 15px; background: rgba(255,249,236,.94); text-align: center; }
.practice-lock span { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--ink); background: #ddd6c8; color: #837d72; }
.independent-practice.unlocked .practice-lock { display: none; }
.practice-content { padding: 34px; }.practice-content h3 { font-size: 27px; margin: 13px 0; }.practice-content > p { line-height: 1.65; }
.practice-scenario { color: #317a5c; font-weight: 800; }
#practice-answer { width: 100%; margin: 20px 0 12px; padding: 17px; resize: vertical; border: 2px solid var(--ink); background: white; color: var(--ink); font: 15px/1.6 var(--body); box-shadow: 4px 4px 0 #9acbb5; }
.practice-actions, .practice-verdict { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.practice-hint { padding: 14px 17px; background: #fff0bf; border-left: 5px solid var(--yellow); }
.practice-review { margin-top: 22px; padding: 24px; background: white; border: 2px solid var(--ink); }
.practice-review > span { color: var(--orange); font-family: var(--pixel); font-size: 7px; }.practice-review > p { line-height: 1.7; }
.practice-review ul { display: grid; gap: 8px; margin: 14px 0 22px; padding: 0; list-style: none; }.practice-review li::before { content: '□'; margin-right: 9px; color: #317a5c; font-weight: 900; }
.practice-verdict button { padding: 12px 15px; border: 2px solid var(--ink); cursor: pointer; font-weight: 800; }
.independent-practice.mastered { background: #d3eedf; }.independent-practice.mastered .practice-verdict { display: none; }
.adapt-block { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 28px 0; border-top: 2px solid #cfc7b8; border-bottom: 2px solid #cfc7b8; margin: 45px 0; }
.adapt-block span { font-family: var(--pixel); font-size: 7px; color: var(--orange); }.adapt-block h3 { margin: 8px 0 0; }
.adapt-actions { display: flex; gap: 8px; }.adapt-actions button.selected { background: var(--yellow); border-color: var(--ink); }
.finish-button { display: block; margin: 0 auto 70px; font-size: 17px; min-width: 290px; }
.finish-button span { color: var(--yellow); margin-left: 16px; }

.reward-overlay { display: none; position: fixed; inset: 0; z-index: 30; background: rgba(36,35,31,.8); place-items: center; padding: 20px; }
.reward-overlay.show { display: grid; }
.reward-modal { background: var(--paper); width: min(500px,100%); border: 4px solid var(--ink); box-shadow: 12px 12px 0 var(--orange); padding: 45px; text-align: center; position: relative; animation: rewardIn .45s cubic-bezier(.2,1.6,.5,1); }
@keyframes rewardIn { from { transform: scale(.55) rotate(-4deg); opacity: 0; } }
.reward-rays { position: absolute; font-size: 140px; color: var(--yellow); opacity: .18; left: 50%; top: 0; transform: translateX(-50%); }
.reward-coin { width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--ink); background: var(--yellow); box-shadow: inset 0 0 0 9px #ffe596, 6px 6px 0 var(--ink); display: grid; place-items: center; font-family: var(--pixel); margin: auto; font-size: 24px; position: relative; }
.reward-modal > p:nth-of-type(1) { font-family: var(--pixel); font-size: 8px; color: var(--orange); margin: 28px 0 12px; }.reward-modal h2 { font-size: 38px; margin-bottom: 22px; }
.reward-numbers { display: flex; justify-content: center; gap: 16px; }.reward-numbers div { background: white; padding: 15px 24px; border: 2px solid var(--ink); }.reward-numbers b { display: block; font-size: 22px; }.reward-numbers span { font-family: var(--pixel); font-size: 7px; color: var(--muted); }
.fox-praise { background: #eee4cf; padding: 13px; font-size: 12px; margin: 22px 0; }
.loading-overlay { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(255,249,236,.94); place-items: center; padding: 20px; }
.loading-overlay.show { display: grid; }
.loading-card { text-align: center; max-width: 480px; }
.loading-card > p { font-family: var(--pixel); font-size: 8px; color: var(--orange); margin: 28px 0 16px; }
.loading-card h2 { font-size: 38px; margin-bottom: 12px; }
.loading-card small { color: var(--muted); }
.loading-time { display: flex; justify-content: center; gap: 12px; margin: 24px 0 14px; font-size: 12px; }
.loading-time b { color: var(--ink); }.loading-time span { color: var(--muted); }
.loading-fact { min-height: 28px; margin-top: 10px; display: flex; justify-content: center; align-items: baseline; gap: 7px; text-align: center; }
.loading-fact span { color: var(--orange); font-size: 10px; }.loading-fact p { margin: 0; color: var(--muted); font-family: inherit; font-size: 11px; line-height: 1.4; transition: opacity .2s; }
.pixel-loader { height: 35px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.pixel-loader i { width: 18px; height: 18px; background: var(--orange); border: 2px solid var(--ink); animation: jump .7s infinite alternate; }
.pixel-loader i:nth-child(2) { animation-delay: .18s; background: var(--yellow); }.pixel-loader i:nth-child(3) { animation-delay: .36s; background: var(--mint); }
@keyframes jump { to { transform: translateY(-18px); } }
.toast { position: fixed; z-index: 50; right: 25px; bottom: 25px; width: min(410px, calc(100vw - 40px)); background: var(--ink); color: white; padding: 17px 20px; box-shadow: 6px 6px 0 var(--orange); transform: translateY(130%); transition: .25s; font-size: 13px; line-height: 1.5; }
.toast.show { transform: translateY(0); }
.usage-widget { display: none; position: fixed; z-index: 35; left: 18px; bottom: 18px; }
.usage-widget > button { border: 2px solid var(--ink); background: white; box-shadow: 4px 4px 0 var(--ink); padding: 9px 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.usage-widget > button > span { color: var(--orange); font-family: var(--pixel); }.usage-widget > button b { font-size: 11px; }.usage-widget > button small { color: #24724f; font-weight: 800; }
.usage-details { display: none; position: absolute; left: 0; bottom: 48px; width: 255px; background: var(--ink); color: white; padding: 18px; box-shadow: 5px 5px 0 var(--orange); }
.usage-widget.open .usage-details { display: grid; gap: 9px; }
.usage-details > div { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; }.usage-details span { color: #c8c1b4; }.usage-details p { font-size: 10px; line-height: 1.5; color: var(--yellow); margin: 8px 0 0; border-top: 1px solid #555149; padding-top: 10px; }

@media (max-width: 900px) {
  .topbar { padding: 0 20px; }.stat { display: none; }.ai-status > span { display: none; }.topbar-actions { gap: 10px; }.nav-link { display: none; }
  .home-hero { min-height: 0; flex-direction: column; padding: 5vh 22px; align-items: stretch; }.hero-copy { width: 100%; }.hero-copy h1 { letter-spacing: -3px; }.hero-art { flex: none; min-width: 0; width: 100%; height: 490px; }.fox { width: 240px; }.speech-bubble { right: -85px; }.level-card { left: 0; }.trust-row { gap: 16px; flex-wrap: wrap; }
  .landing-section { padding-left: 25px; padding-right: 25px; }.how-section::before { display: none; }.how-grid { grid-template-columns: 1fr; }.how-card { min-height: 270px; }.how-card.featured { transform: none; }.step-pixel,.price-compare { margin-top: 28px; margin-bottom: 22px; }.section-cta-row { align-items: flex-start; flex-direction: column; }
  .value-section { grid-template-columns: 1fr; gap: 70px; }.value-copy { order: -1; }.value-visual { max-width: 650px; }.fox-note { right: 0; }
  .dashboard-shell { width: min(100% - 36px,760px); padding-top: 35px; }.dashboard-head { align-items: flex-start; flex-direction: column; }.profile-strip { grid-template-columns: 1fr 1fr 1fr; }.profile-person { grid-column: 1 / -1; }.profile-xp { grid-column: 1 / -1; }.continue-course { grid-template-columns: 1fr; }.continue-art { min-height: 330px; border-left: 0; border-top: 3px solid var(--ink); }.dashboard-course-grid { grid-template-columns: 1fr; }.saved-course,.new-course-card { min-height: 340px; }
  .admin-screen.active { grid-template-columns: 1fr; }.admin-sidebar { position: static; height: auto; flex-direction: row; align-items: center; padding: 17px 20px; gap: 18px; }.admin-sidebar .admin-badge,.admin-sidebar nav { display: none; }.admin-exit { margin: 0 0 0 auto; }.admin-kpis { grid-template-columns: 1fr 1fr; }.admin-grid { grid-template-columns: 1fr; }.users-panel { grid-column: auto; }
  .quiz-layout { grid-template-columns: 1fr; gap: 30px; }.quiz-side h2 { margin-bottom: 10px; }.fox-dialog { margin-top: 15px; }.quiz-card { min-height: auto; }.quiz-screen { padding: 25px 20px; }
  .route-grid { grid-template-columns: 1fr; }.route-card { min-height: 0; }
  .map-screen.active { grid-template-columns: 1fr; }.map-sidebar { padding: 40px 25px; }.map-sidebar .eyebrow { margin-top: 30px; }.quest-map { padding: 40px 25px 80px; }.module-lessons { padding-left: 24px; }
  .engine-stage { padding: 330px 25px 30px; }.cylinder { left: 50%; transform: translateX(-50%); }.left-valve { left: calc(50% - 48px); }.right-valve { left: calc(50% + 33px); }.spark-plug { left: calc(50% - 9px); }.flow-arrow { left: calc(50% - 120px); }
  .visual-stage { padding: 315px 28px 35px; }.visual-glyph { left: 50%; transform: translateX(-50%); }.visual-glyph.pulse { transform: translateX(-50%) scale(.9) rotate(-3deg); }.pixel-orbit { left: 50%; transform: translateX(-50%); }.reference-image { grid-template-columns: 1fr; }.reference-image-frame { min-height: 240px; }.lesson-sections { grid-template-columns: 1fr; }
  .cycle-steps { grid-template-columns: 1fr 1fr; }.card-check-options, .card-visual-legend, .card-diagram-steps { grid-template-columns: 1fr; }.check-options { grid-template-columns: 1fr; }.adapt-block { align-items: flex-start; flex-direction: column; }.adapt-actions { flex-wrap: wrap; }
}

@media (max-width: 520px) {
  .topbar { height: 72px; }.brand { font-size: 14px; }.brand-mark { width: 35px; height: 35px; }.yandex-login { padding: 7px 9px; gap: 7px; }.yandex-login span { font-size: 12px; }.yandex-login b { font-size: 0; }.yandex-login b::after { content: "Войти"; font-size: 10px; }.avatar-mini { width: 38px; height: 38px; }
  .home-hero { min-height: calc(100vh - 72px); }.hero-copy h1 { font-size: 48px; }.lead { font-size: 16px; }.suggestions span { width: 100%; }.trust-row { display: none; }.launch-price { grid-template-columns: auto auto; }.launch-price small { grid-column: 1 / -1; }.hero-art { height: 450px; }.speech-bubble { right: -28px; top: -60px; width: 155px; }.floating-card { transform: scale(.85); }.reward-card { right: -18px; }.level-card { left: -15px; }
  .section-heading h2,.value-copy h2 { font-size: 39px; letter-spacing: -2px; }.landing-section { padding: 65px 18px; }.how-card { padding: 24px; }.skill-window { padding: 24px 18px; }.skill-window::before { inset: -10px 10px 10px -10px; }.fox-note { position: relative; right: auto; bottom: auto; margin: 25px 0 0 auto; }.landing-footer { align-items: flex-start; flex-direction: column; gap: 14px; }.landing-footer .text-button { margin-left: 0; }
  .dashboard-shell { width: calc(100% - 24px); }.dashboard-head h1 { font-size: 42px; letter-spacing: -2px; }.profile-strip { grid-template-columns: 1fr 1fr; padding: 22px 18px; }.profile-stat:nth-of-type(4) { display: none; }.continue-copy { padding: 28px 20px; }.continue-copy h2 { font-size: 34px; letter-spacing: -2px; }.continue-art { min-height: 290px; }.appliance-pixel { transform: scale(.82); }.course-library-head { align-items: flex-start; flex-direction: column; gap: 14px; margin-top: 55px; }.saved-course { padding: 22px 18px; }.dashboard-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  .admin-sidebar .admin-brand span:last-child { display: none; }.admin-exit { font-size: 0; }.admin-exit::after { content: "← кабинет"; font-size: 10px; }.admin-content { padding: 30px 14px 55px; }.admin-head { align-items: flex-start; flex-direction: column; }.admin-head h1 { font-size: 42px; letter-spacing: -2px; }.admin-kpis { grid-template-columns: 1fr; }.admin-panel { padding: 20px 15px; }.admin-table { overflow-x: auto; }.admin-table > div { min-width: 570px; }.expense-bars { gap: 6px; padding: 0; }
  .answer-grid { grid-template-columns: 1fr; }.quiz-card { padding: 25px 20px; }.quiz-card h3 { font-size: 24px; }.quiz-progress { align-items: flex-start; flex-direction: column; }.quiz-progress > div { width: 100%; flex: none; }
  .lesson-content h1 { font-size: 40px; letter-spacing: -2px; }.lesson-top > span { display: none; }.lesson-card { padding: 25px 20px; min-height: 560px; }.lesson-card-head { align-items: flex-start; }.lesson-card-head b { max-width: 45%; }.cycle-steps button span { display: none; }.engine-stage { min-height: 520px; }.knowledge-check { padding: 25px 20px; }
  .module-toggle { grid-template-columns: 42px 1fr 18px; padding: 18px 14px; }.module-index { width: 40px; height: 40px; }.module-summary b { font-size: 17px; }.lesson-row { grid-template-columns: 28px 1fr; }.lesson-action { grid-column: 2; width: fit-content; }.mock-content { grid-template-columns: 1fr; }.support-visual { padding: 22px 18px; }.usage-widget { left: 10px; bottom: 10px; }
}
