.quest-heading{display:flex;align-items:center;justify-content:space-between;padding:35px 0 25px}.quest-heading h1{margin-top:12px}.quest-heading p{color:var(--muted);font-size:13px;line-height:1.8;margin:0}.quest-hero-art{position:relative;width:170px;height:165px;margin-right:55px;background:radial-gradient(ellipse at center,#e4eccf 0 52%,transparent 53%)}.quest-hero-art svg{width:150px;height:150px;transform:rotate(-5deg);filter:drop-shadow(0 8px 7px #314b3210);animation:hero-float 4s ease-in-out infinite}.hero-spark{position:absolute;right:0;top:20px;font-size:28px;color:#bfa26a}.quest-toolbar,.loot-toolbar{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:0 0 18px;margin-bottom:23px;font-size:12px;color:var(--muted)}.quest-toolbar>div{display:flex;align-items:center;gap:23px}.gold-pill{color:#9a773f;font-size:12px;white-space:nowrap}.gold-pill b{color:#8b6b34}.next-adventure{display:flex;align-items:center;justify-content:space-between;gap:24px;border-radius:17px;background:var(--green);color:white;padding:24px 28px;margin-bottom:26px;position:relative;overflow:hidden}.next-adventure .eyebrow{color:#b7cf9e}.next-adventure h2{font-size:23px;margin:8px 0}.next-adventure p{font-size:12px;color:#cfddd0;margin:0;line-height:1.6}.next-adventure .primary{background:var(--lime);color:var(--green);font-size:12px;padding:14px 23px;flex-shrink:0}.next-adventure .primary:hover{background:#e3f7c5}.next-adventure .secondary{background:transparent;color:#eff4e7;border-color:#749589}.next-actions{display:flex;flex-direction:column;gap:10px}.world-map{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px}.world-card{background:white;border:1px solid var(--line);border-radius:19px;overflow:hidden}.world-art{height:152px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.moss{--world:#7e9d66;--scene:#e8efdc;--hill:#d7e3c5;--hill-back:#dfe8d0}.crystal{--world:#9181ac;--scene:#eeebf6;--hill:#d8cfe9;--hill-back:#e3ddef}.ember{--world:#c18a5c;--scene:#f7ede0;--hill:#ead8bd;--hill-back:#f0e2cb}.world-art{background:var(--scene)}.world-art svg{width:120px;height:115px;z-index:1;transition:transform .25s}.world-card:hover .world-art svg{transform:translateY(-4px)}.world-art::before,.world-art::after{content:'';position:absolute;background:var(--hill);height:90px;width:180px;border-radius:60% 60% 0 0;bottom:-39px;left:-40px;transform:rotate(10deg)}.world-art::after{background:var(--hill-back);left:auto;right:-30px;width:220px;transform:rotate(-17deg)}.world-number{position:absolute;left:18px;top:16px;font-size:9px;letter-spacing:1.3px;font-weight:700;color:var(--world)}.world-state{position:absolute;right:15px;top:14px;font-size:9px;background:#ffffff99;padding:5px 8px;border-radius:99px;color:#526249;z-index:2}.world-info{padding:21px 20px 23px}.world-info h2{font-size:18px;margin:0 0 6px}.world-info>p{font-size:11px;color:var(--muted);margin:0 0 21px}.stage-path{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;position:relative}.stage-path::before{content:'';height:2px;background:#e4e8dc;position:absolute;left:15px;right:15px;top:19px}.stage-node{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;background:none;border:0;padding:0;color:var(--muted);font-size:10px}.stage-node .node-circle{height:38px;width:38px;border-radius:12px;background:#eff1eb;border:1px solid #e0e5d9;display:grid;place-items:center;font-weight:700;font-size:14px}.stage-node.boss .node-circle{border-radius:50%;font-size:17px}.stage-node.available .node-circle{background:var(--green);color:var(--lime);border-color:var(--green);box-shadow:0 0 0 4px #edf2e7}.stage-node.cleared .node-circle{background:#dfebd1;color:#496239;border-color:#c6d7b6}.stage-node:hover:not(:disabled) .node-circle{transform:translateY(-3px)}.stage-node:disabled{opacity:.65}.node-stars{font-size:8px;letter-spacing:1px;color:#a88846;height:10px}.world-skills{border-top:1px solid #edf0e7;margin-top:17px;padding-top:13px;font-size:10px;color:#78866e;line-height:1.6}.quest-rules{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;font-size:10px;color:#718167;padding:25px 4px 32px}.battle-top{display:flex;justify-content:space-between;gap:15px;align-items:center;margin:0 0 18px}.battle-top>span{font-size:10px;color:var(--muted)}.battle-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:22px;margin-bottom:28px;align-items:start}.battle-card .card-head{padding-bottom:20px;flex-direction:row;align-items:center}.battle-card .card-head h2{font-size:18px}.battle-scene{height:180px;background:var(--scene);position:relative;overflow:hidden;border-top:1px solid #e6ebdf;border-bottom:1px solid #e6ebdf}.scene-hill{position:absolute;bottom:-63px;height:130px;width:360px;background:var(--hill);border-radius:60% 70% 0 0;transform:rotate(8deg)}.hill-one{left:-130px}.hill-two{right:-130px;background:var(--hill-back);transform:rotate(-8deg)}.scene-star{position:absolute;color:var(--world);opacity:.5}.star-one{left:45%;top:25px;font-size:26px}.star-two{right:24%;top:48px;font-size:13px}.fighter{position:absolute;bottom:18px;display:flex;flex-direction:column;align-items:center;gap:4px;z-index:1}.fighter svg{width:108px;height:108px}.fighter>span{font-size:8px;font-weight:700;letter-spacing:1.2px;color:var(--world)}.player-fighter{left:35px}.enemy-fighter{right:34px}.enemy-fighter svg{width:125px}.enemy-fighter.boss-fighter svg{width:148px;height:125px}.spell-burst{position:absolute;left:29%;top:76px;font-size:35px;color:#668e53;opacity:0;z-index:2;text-shadow:0 0 13px #e8ffc5}.spell-burst.cast{animation:cast-spell .55s ease-in-out}.fighter.hit{animation:hit-shake .4s ease}.fighter.attack{animation:attack-hop .4s ease}.battle-vitals{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;gap:24px;border-bottom:1px solid #edf0e7}.vital-label{font-size:8px;font-weight:700;letter-spacing:1px;color:var(--muted);display:block}.heart-row{display:block;color:#bd8068;letter-spacing:2px;font-size:17px;margin-top:5px;white-space:nowrap}.heart-row .empty-heart{color:#d8dcd2}.enemy-health{width:45%;max-width:220px}.enemy-health>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.enemy-health strong{font-size:9px;color:#7f8c72}.health-track{height:7px;background:#edf0e5;border-radius:5px;overflow:hidden}.health-track>div{height:100%;background:#91ac77;transition:width .35s ease;border-radius:inherit}.battle-card .question-type{margin-top:23px}.battle-card .equation{font-size:46px;margin:10px 0 22px}.battle-card .story{font-size:14px;margin-bottom:10px}.battle-card .story-equation{font-size:34px}#battle-form{margin:0 27px}#battle-form label{display:block;font-size:11px;color:var(--muted);margin-bottom:8px}.battle-card .help-actions{margin-bottom:21px;gap:20px}.battle-card .feedback{min-height:51px}#damage-number{position:absolute;right:88px;top:30px;font:800 25px Manrope,sans-serif;color:#436935;z-index:3;opacity:0}#damage-number.show{animation:damage-rise .85s ease-out}.loadout-icon{height:72px;width:72px;display:block;margin:18px 0 14px}.loadout-name{font-size:14px;margin:0 0 8px}.loadout-description{font-size:11px;line-height:1.8;color:#738069;margin:0 0 17px}.loadout-stats{display:flex;gap:8px;font-size:10px;margin:13px 0 18px}.loadout-stats span{padding:6px 9px;background:#dfe8d3;border-radius:5px}.battle-tip{font-size:11px;color:#6c7c60;line-height:1.8;margin:17px 0 0}.quest-result{max-width:720px;margin:0 auto 32px;padding:35px;text-align:center}.result-stars{font-size:31px;letter-spacing:8px;color:#c4a165;margin:0 0 11px}.quest-result h2{font-size:29px;margin:12px 0}.quest-result>p{max-width:480px;margin:0 auto 18px}.treasure-chest{display:block;height:135px;width:135px;margin:14px auto}.result-loot{background:#f3f2e9;border:1px solid #e4e3d5;border-radius:13px;padding:19px;margin:20px auto;max-width:420px;display:flex;align-items:center;gap:17px;text-align:left}.result-loot svg{height:65px;width:65px;flex-shrink:0}.result-loot .rarity{font-size:8px;text-transform:uppercase;letter-spacing:1.5px;color:#8e7950}.result-loot h3{margin:6px 0;font-size:16px}.result-loot p{font-size:11px;margin:0;line-height:1.7}.result-loot button{margin-top:9px}.result-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:23px}.result-rewards{display:flex;justify-content:center;gap:25px;font-size:13px;font-weight:600;color:#78825c;margin:20px 0}.quest-result .worked{font-size:17px}.loot-toolbar{margin-top:28px;font-size:12px}.loot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px}.loot-card{background:white;border:1px solid var(--line);border-radius:15px;padding:22px;display:flex;flex-direction:column;align-items:flex-start;position:relative}.loot-card.equipped{border:1px solid #90a675;background:#f1f6e8;box-shadow:0 0 0 2px #dfe9d1}.loot-card svg{height:70px;width:70px;margin:14px auto 18px}.loot-card h2{font-size:14px;line-height:1.4;margin:0 0 9px}.loot-card p{font-size:11px;line-height:1.7;color:var(--muted);margin:0 0 16px}.loot-card .rarity{font-size:8px;text-transform:uppercase;letter-spacing:1.3px;color:#8b795f}.loot-card .secondary{margin-top:auto;width:100%;font-size:11px;padding:9px}.loot-card.locked{background:#f0f1eb}.loot-card.locked svg{opacity:.25;filter:grayscale(1)}.loot-card.locked p{font-size:10px}.loot-card.locked h2{color:#7d8675}.loot-card .unlock-label{font-size:10px;color:#8b9381;margin-top:auto}.chest-open{animation:chest-pop .5s ease}.game-complete{font-size:10px;background:#e6edd8;border-radius:5px;padding:6px 10px;color:#4b6d3b}
@keyframes hero-float{50%{transform:translateY(-5px) rotate(2deg)}}@keyframes cast-spell{0%{opacity:1;left:27%;transform:scale(.5)}75%{opacity:1;left:69%;transform:scale(1.2)}100%{opacity:0;left:72%;transform:scale(1.6)}}@keyframes hit-shake{25%{transform:translateX(7px)}50%{transform:translateX(-5px)}75%{transform:translateX(3px)}}@keyframes attack-hop{50%{transform:translate(5px,-6px)}}@keyframes damage-rise{10%{opacity:1}80%{opacity:1}100%{opacity:0;transform:translateY(-24px)}}@keyframes chest-pop{50%{transform:scale(1.08) rotate(3deg)}}
@media(max-width:1200px){.world-map{gap:13px}.world-info{padding:18px 13px}.world-info h2{font-size:16px}.stage-path{gap:6px}.stage-node .node-circle{width:33px;height:33px;font-size:12px}.stage-path::before{top:17px}.world-art{height:135px}.quest-hero-art{margin-right:25px}.loot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.battle-layout{grid-template-columns:minmax(0,1fr) 230px;gap:17px}.battle-card .equation{font-size:38px}.player-fighter{left:20px}.enemy-fighter{right:16px}.battle-vitals{padding:16px 20px;gap:15px}.heart-row{font-size:15px;letter-spacing:0}.battle-card .card-head{flex-wrap:wrap}.battle-card .help-actions{gap:13px}.battle-card .text-button{font-size:10px}}
@media(max-width:950px){.world-map{grid-template-columns:1fr}.world-card{display:grid;grid-template-columns:155px 1fr}.world-art{height:100%;min-height:195px}.world-info{padding:20px}.stage-path{max-width:330px}.stage-node .node-circle{width:38px;height:38px}.world-info>p{margin-bottom:17px}.world-skills{margin-top:10px;padding-top:10px}.quest-rules{justify-content:flex-start;column-gap:25px}.battle-layout{grid-template-columns:1fr}.battle-layout>.settings-stack{grid-template-columns:1fr 1fr}.battle-layout .settings-card{padding:20px}.battle-layout .loadout-icon{float:left;height:50px;width:50px;margin:0 12px 10px 0}.battle-layout .eyebrow{margin-bottom:17px;display:block}.battle-tip{clear:both}.battle-layout .loadout-stats{clear:both}.player-fighter{left:15%}.enemy-fighter{right:13%}.battle-card .equation{font-size:48px}.battle-card .answer-row{flex-direction:row}.quest-hero-art{margin-right:0;width:135px;height:145px}.quest-hero-art svg{width:125px;height:125px}.quest-heading h1{font-size:35px}.loot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:660px){.quest-heading{padding:28px 0 24px}.quest-heading h1{font-size:34px}.quest-heading p{font-size:12px;max-width:265px}.quest-hero-art{display:none}.quest-toolbar{font-size:10px;padding-bottom:16px;margin-bottom:20px}.quest-toolbar>div{gap:13px}.quest-toolbar .text-button{font-size:10px}.next-adventure{padding:22px;align-items:flex-start;flex-direction:column;gap:18px}.next-adventure h2{font-size:21px}.next-adventure .eyebrow{font-size:9px}.next-actions{flex-direction:row;width:100%;flex-wrap:wrap}.next-actions .primary{flex:1}.world-card{grid-template-columns:105px 1fr;border-radius:15px}.world-art{min-height:210px}.world-art svg{width:90px;height:90px}.world-number{left:10px;font-size:8px;letter-spacing:.8px;top:13px}.world-state{left:10px;right:auto;top:auto;bottom:14px;font-size:8px}.world-info{padding:18px 14px}.world-info h2{font-size:16px}.world-info p{font-size:10px}.stage-path{gap:6px}.stage-node .node-circle{height:31px;width:31px;border-radius:10px;font-size:11px}.stage-node.boss .node-circle{font-size:13px}.stage-path::before{top:15px}.node-stars{font-size:7px;letter-spacing:0}.world-skills{font-size:9px}.quest-rules{font-size:10px;display:grid;grid-template-columns:1fr 1fr;gap:15px}.battle-top{font-size:10px}.battle-top .text-button{font-size:10px}.battle-top>span{font-size:9px}.battle-card .card-head{padding:20px}.battle-card .card-head h2{font-size:17px}.battle-scene{height:165px}.fighter svg{height:95px;width:95px}.enemy-fighter svg{width:115px}.enemy-fighter.boss-fighter svg{width:120px;height:112px}.player-fighter{left:18px}.enemy-fighter{right:17px}.battle-vitals{padding:17px 20px}.vital-label{font-size:7px}.heart-row{font-size:15px}.battle-card .equation{font-size:44px}#battle-form{margin:0 22px}.battle-card .help-actions{gap:18px}.battle-card .quiz-footer{font-size:9px}.battle-card .story-equation{font-size:32px}.battle-layout>.settings-stack{grid-template-columns:1fr}.battle-layout>.settings-stack>.mistake-card{display:none}.battle-layout .settings-card .battle-tip{display:none}.battle-layout .settings-card{padding:20px}.battle-layout .loadout-stats{margin-bottom:0}.quest-result{padding:28px 22px}.quest-result h2{font-size:26px}.result-loot{padding:15px;gap:12px}.result-loot h3{font-size:14px}.result-loot svg{width:55px;height:55px}.loot-grid{gap:12px}.loot-card{padding:18px 14px}.loot-card h2{font-size:13px}.loot-card p{font-size:10px}.loot-card svg{height:60px;width:60px}.topbar>span{font-size:8px;max-width:105px;line-height:1.6}.top-stats{gap:9px}.top-stats>span:nth-child(2){display:none}.sidebar nav{gap:3px}.nav-item{width:34px}.sidebar .brand{gap:8px}}
@media(max-width:420px){.sidebar .brand>span:last-child{font-size:17px}.brand-sub{letter-spacing:3px}.sidebar{padding:15px 16px}.nav-item{width:32px}.nav-item>span{font-size:18px}.top-stats{font-size:10px}.quest-heading h1{font-size:32px}.world-card{grid-template-columns:85px 1fr}.world-art svg{width:78px;height:85px}.world-info{padding:17px 11px}.stage-path{gap:3px}.stage-node .node-circle{width:29px;height:29px}.world-number{font-size:7px;left:8px}.world-state{left:8px;font-size:7px;padding:4px 6px}.quest-rules{font-size:9px}.battle-card .equation{font-size:37px}.heart-row{font-size:13px}.enemy-health{width:46%}.battle-vitals{gap:12px;padding:17px}.battle-card .help-actions{gap:11px}.battle-card .text-button{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

.class-message-banner{margin:24px 0 0;padding:15px 20px;background:#e8efda;border:1px solid #d8e4c7;border-radius:12px;color:#48673b;font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.school-tag{line-height:1.7}.page-footer a{color:#668153;text-decoration:none;font-weight:600}.page-footer a:hover{text-decoration:underline}.heart-row{font-variant-numeric:tabular-nums}

.player-status-strip{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0 0;padding:12px 17px;background:#edf2e4;border:1px solid #dce6d0;border-radius:12px;font-size:14px}.player-status-strip>div{display:flex;align-items:center;gap:12px;min-width:0}.player-status-strip strong{font-size:14px;overflow-wrap:anywhere}.player-level-label{font-weight:700;color:#164e46;background:#d8eac6;padding:6px 10px;border-radius:7px;white-space:nowrap}.player-status-strip a{font-size:14px;font-weight:600;color:#164e46;white-space:nowrap;text-decoration:underline}@media(max-width:480px){.player-status-strip{align-items:flex-start;flex-wrap:wrap}.player-status-strip a{margin-left:auto}.player-status-strip strong{max-width:200px}}

/* The ancient tome extends the existing adventure palette and book artwork. */
.archive{--world:#496e83;--scene:#e4edf3;--hill:#c8dce7;--hill-back:#d8e6ee}
.tower{--world:#75599b;--scene:#ece5f5;--hill:#d6c7e8;--hill-back:#e3d7f0}
.tome-sanctuary{margin:0 0 26px;padding:26px;border:1px solid #cfc2df;border-radius:18px;background:#f4eff9;scroll-margin-top:24px}
.tome-heading{display:flex;align-items:center;gap:22px;margin-bottom:20px}.tome-heading>div{min-width:0}
.tome-heading .eyebrow{font-size:12px;color:#65517e}.tome-heading h2{font-size:26px;margin:8px 0;line-height:1.3}.tome-heading p,.tome-page p{font-size:16px;line-height:1.7;color:#544f63;margin:8px 0}
.tome-art{width:100px;height:100px;flex-shrink:0}.tome-sanctuary>.primary{font-size:16px;background:#624d81;white-space:normal}
.tome-lessons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.tome-page{padding:18px;background:#fffdfd;border:1px solid #ddd2e8;border-radius:12px;min-width:0}.tome-page summary{font-size:16px;font-weight:700;color:#564471;cursor:pointer;line-height:1.6}.tome-page[open] summary{margin-bottom:14px}.tome-example{font-size:16px;line-height:1.7;color:#484452}.tome-example ol{padding-left:22px}.tome-example li{margin:9px 0}.tome-example .final-equation{font-weight:700;color:#574177;overflow-wrap:anywhere}.tome-note{font-size:14px;line-height:1.7;color:#645674;margin:18px 0 0}
.tome-read{font-size:14px;margin-top:12px}.world-card.archive .world-number,.world-card.tower .world-number{font-size:12px}.world-card.archive .world-state,.world-card.tower .world-state{font-size:12px;top:auto;bottom:12px}.world-card.archive .world-info>p,.world-card.tower .world-info>p,.world-card.archive .world-skills,.world-card.tower .world-skills{font-size:14px}.world-card.archive .stage-node,.world-card.tower .stage-node{font-size:14px}
.equation.column-equation,.battle-card .equation.column-equation{font-size:clamp(32px,4vw,46px);margin:16px 0 24px;line-height:1.25;letter-spacing:0}.column-question{display:inline-grid;min-width:4.5ch;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;text-align:right;font-variant-numeric:tabular-nums}.column-question>span{display:block;white-space:pre}.column-question .column-answer{border-top:2px solid #85947b;margin-top:4px;padding-top:4px;color:#657359}
.column-work{border-collapse:collapse;width:100%;margin:16px 0 22px;table-layout:auto}.column-work caption{text-align:left;font-size:14px;line-height:1.6;margin-bottom:10px;color:#655971}.column-work th{text-align:left;font-weight:400;font-size:14px;line-height:1.5;padding:7px 12px 7px 0}.column-work td{text-align:right;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:20px;font-variant-numeric:tabular-nums;white-space:pre;padding:7px 0}.column-work .column-rule td{border-top:2px solid #b1a2bb}.hint-box:has(.column-work){font-size:16px}.hint-box:has(.column-work) li{margin-bottom:8px}.next-adventure p{font-size:14px}.next-adventure .primary{font-size:14px;white-space:normal}.next-adventure h2{overflow-wrap:anywhere}
@media(min-width:961px){.world-map:has(.archive){grid-template-columns:repeat(6,minmax(0,1fr))}.world-map:has(.archive)>.world-card{grid-column:span 2}.world-map:has(.archive)>.archive,.world-map:has(.archive)>.tower{grid-column:span 3}}
@media(max-width:960px){.tome-lessons{grid-template-columns:1fr}.tome-heading{align-items:flex-start}.tome-art{width:76px;height:76px}}
@media(max-width:660px){.tome-sanctuary{padding:20px}.tome-heading{gap:12px}.tome-heading h2{font-size:23px}.tome-art{width:48px;height:58px}.tome-heading .eyebrow{font-size:12px}.tome-page{padding:16px}.tome-sanctuary>.primary{width:100%}.world-card.archive,.world-card.tower{display:block}.world-card.archive .world-art,.world-card.tower .world-art{height:130px}.world-card.archive .world-state,.world-card.tower .world-state{left:auto;right:12px;bottom:12px}.world-card.archive .world-number,.world-card.tower .world-number{top:16px;left:16px}.world-card.archive .world-info,.world-card.tower .world-info{padding:20px}.world-card.archive .stage-node .node-circle,.world-card.tower .stage-node .node-circle{width:38px;height:38px}.world-card.archive .world-info h2,.world-card.tower .world-info h2{font-size:21px}.battle-top{flex-wrap:wrap}.battle-top>span{font-size:14px}.column-work td{font-size:19px}}
.hollow{--world:#3d4f7a;--scene:#dfe4f0;--hill:#b9c3dc;--hill-back:#cdd5e8}
.colosseum{--world:#7b3fa0;--scene:#f3e6c4;--hill:#e2c77f;--hill-back:#ecd9a3}
.world-icon{position:absolute;left:50%;top:50%;transform:translate(-50%,-45%);width:118px;height:118px;object-fit:contain;filter:drop-shadow(0 6px 10px rgba(0,0,0,.25))}
.world-card.colosseum{outline:3px solid var(--world);box-shadow:0 0 24px color-mix(in srgb,var(--world) 40%,transparent)}
