@font-face{font-family:Kali Sans;src:url('./noto-Regular.woff') format('woff');font-weight:400;font-display:swap}
@font-face{font-family:Kali Sans;src:url('./noto-Bold.woff') format('woff');font-weight:650 900;font-display:swap}
:root{
  --canvas:#f6f7f4;--surface:#ffffff;--surfaceRaised:#eef2ed;--text:#172b27;--textMuted:#4f625b;--borderDecorative:#c7d2cc;--borderControl:#6b8177;--primary:#145c4b;--onPrimary:#ffffff;--primaryHover:#0d493b;--successBg:#eef8f1;--successText:#1f6b45;--warningBg:#fff5db;--warningText:#875000;--errorBg:#fff0ed;--errorText:#b42318;--infoBg:#ecf5fc;--infoText:#1c527c;--focusRing:#8a4b08;
  --hero:#163f37;--hero-text:#fffdf4;--hero-soft:#d0e0d5;--hero-grid:#295148;--amber:#f3c675;--paper:#fff5d7;--ink:#253d35;--tile-a:#e4efe3;--tile-b:#f9e7cd;--tile-c:#e7e8f4;--tile-a-ink:#325f43;--tile-b-ink:#885623;--tile-c-ink:#525685;
  --border:var(--borderDecorative);--muted:var(--textMuted);--text-muted:var(--textMuted);--border-control:var(--borderControl);--border-decorative:var(--borderDecorative);--on-primary:var(--onPrimary);--surface-raised:var(--surfaceRaised);--success:var(--successText);--danger:var(--errorText);--focus:var(--focusRing);--fg:var(--text);--bg:var(--canvas);--line:var(--borderDecorative);
  color-scheme:light;font-family:"Kali Sans","Noto Sans",system-ui,sans-serif;font-size:100%;line-height:1.55;color:var(--text);background:var(--canvas);font-variant-numeric:tabular-nums;
}
:root[data-theme=dark]{--canvas:#111d1a;--surface:#192b25;--surfaceRaised:#223a31;--text:#f1f6f1;--textMuted:#b4c9be;--borderDecorative:#3d5c4f;--borderControl:#789b8b;--primary:#8bd5b5;--onPrimary:#10291f;--primaryHover:#a4e5ca;--successBg:#203c2c;--successText:#91dfb2;--warningBg:#3b301b;--warningText:#f8d385;--errorBg:#49241f;--errorText:#ffb4ab;--infoBg:#1d3448;--infoText:#a9d6fa;--focusRing:#f2c46d;--tile-a:#234137;--tile-b:#483722;--tile-c:#35354b;--tile-a-ink:#bcd9b7;--tile-b-ink:#f6cb90;--tile-c-ink:#d4cef0;color-scheme:dark}
:root[data-text=large]{font-size:118%}:root[data-text=xlarge]{font-size:138%}
*{box-sizing:border-box}body{margin:0;min-width:0}a{color:var(--primary);text-decoration-thickness:.09em;text-underline-offset:.18em}
h1,h2,h3,p,figure{margin:0}h1,h2,h3{line-height:1.19;letter-spacing:-.04em;text-wrap:balance}h1{font-size:clamp(1.8rem,3.2vw,2.25rem)}h2{font-size:clamp(1.35rem,2vw,1.62rem)}h3{font-size:1.12rem}
button,input,select,textarea{font:inherit;color:var(--text)}button,a.btn,input,select,textarea,summary{touch-action:manipulation}button,select{cursor:pointer}button,.btn,select,input:not([type=checkbox]):not([type=radio]),textarea{min-height:44px;border:1px solid var(--borderControl);border-radius:9px;background:var(--surface);padding:.56em .85em}
button:hover,.btn:hover,select:hover{border-color:var(--primary);background:var(--surfaceRaised)}button:disabled{cursor:wait;color:var(--textMuted)}button svg,a svg,.row-icon svg{flex-shrink:0}a.btn,.btn{display:inline-flex;align-items:center;justify-content:center;gap:.65em;min-height:48px;text-decoration:none;font-weight:700;line-height:1.35}
.primary,.btn.primary,button.primary{color:var(--onPrimary);background:var(--primary);border:1px solid var(--primary);font-weight:700}.primary:hover,.btn.primary:hover{background:var(--primaryHover);border-color:var(--primaryHover)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--focusRing);outline-offset:3px}
[hidden]{display:none!important}button:disabled:not([aria-busy]){cursor:default}button:disabled:hover{background:var(--surface)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip-link{position:fixed;top:-5rem;left:1rem;z-index:20;background:var(--surface);padding:.75rem;border-radius:6px}.skip-link:focus{top:.4rem}
#app-header{background:var(--surface);border-bottom:1px solid var(--borderDecorative)}.topbar{max-width:80rem;margin:auto;min-height:76px;padding:0 clamp(1rem,4.2vw,4rem);display:flex;align-items:center;gap:clamp(1rem,4vw,3.2rem)}
.brand{display:inline-flex;align-items:center;gap:.64rem;text-decoration:none;color:var(--text);white-space:nowrap}.brand img{width:37px;height:37px}.brand strong{letter-spacing:-.06em;line-height:.97;font-size:1.17rem;display:block}.brand small{font-size:.75rem;letter-spacing:.015em;color:var(--textMuted);display:block;margin-top:.17rem}
.nav-links,.top-tools,.footer-links,.actions,.inline-row{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.nav-links{align-self:stretch;gap:1.25rem;flex-wrap:nowrap}.nav-links a{position:relative;display:flex;gap:.42rem;align-items:center;min-height:44px;color:var(--textMuted);text-decoration:none;font-size:.92rem;font-weight:700;white-space:nowrap}.nav-links a[aria-current],.nav-links a:hover{color:var(--primary)}.nav-links a[aria-current]::after{content:'';position:absolute;bottom:0;left:0;right:0;height:3px;background:var(--primary)}
.top-tools{margin-left:auto;gap:.2rem;flex-wrap:nowrap}.tool,.lang-button{height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border:0;color:var(--textMuted);background:none;border-radius:9px;text-decoration:none;font-weight:700}.lang-button{font-size:.88rem;padding:.45rem}.tool:hover,.lang-button:hover,.tool[aria-current]{color:var(--primary);background:var(--surfaceRaised)}.tool.account{margin-left:.33rem;border:1px solid var(--borderDecorative);background:var(--surfaceRaised);border-radius:50%;width:44px}.mobile-only{display:none}
#main{max-width:80rem;margin:0 auto;padding:clamp(1.4rem,3.3vw,2.8rem) clamp(1rem,4.2vw,4rem) 3rem;min-height:65vh;outline:none}#main:focus{outline:none}.app-view{min-width:0}.home-head,.section-head{display:flex;justify-content:space-between;align-items:baseline;gap:.8rem;flex-wrap:wrap}.home-head{margin-bottom:1.25rem}.home-head .device-info,.device-info{display:inline-flex;align-items:center;gap:.45rem;color:var(--textMuted);font-size:.875rem}.section-head{margin-bottom:1rem}.text-link{display:inline-flex;align-items:center;gap:.35rem;font-weight:700;min-height:44px;text-decoration:none;font-size:.9rem}.text-link:hover{text-decoration:underline}.page-heading{margin:0 0 1.5rem}.page-heading p,.section-intro{max-width:66ch;color:var(--textMuted);margin:.5rem 0}
.hero{background:var(--hero);isolation:isolate;color:var(--hero-text);position:relative;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr);overflow:hidden;border-radius:19px;min-height:250px}
.hero-content{padding:clamp(1.4rem,3.2vw,2.7rem);align-self:center;z-index:1}.hero-chip{display:inline-flex;align-items:center;gap:.4rem;color:var(--hero-soft);font-size:.88rem;font-weight:700}.hero-chip svg{color:var(--amber)}.hero h2{font-size:clamp(2.1rem,4.2vw,3.55rem);line-height:1.05;letter-spacing:-.055em;margin:.56rem 0 .65rem;max-width:16ch}.hero-content p{color:var(--hero-soft);max-width:42ch;font-size:1rem}.hero .btn{margin-top:1.12rem;background:var(--amber);border-color:var(--amber);color:var(--ink);padding-inline:1.1rem}.hero .btn:hover{background:var(--paper)}.hero a:focus-visible{outline-color:var(--hero-text)}
.math-art{min-height:240px;position:relative;overflow:hidden;background-image:linear-gradient(90deg,var(--hero-grid) 1px,transparent 1px),linear-gradient(var(--hero-grid) 1px,transparent 1px);background-size:24px 24px;mask-image:linear-gradient(90deg,transparent,#000 11%);display:grid;place-items:center}.stationery{width:clamp(210px,23vw,295px);aspect-ratio:1.35;position:relative;transform:rotate(-6deg);margin-left:2rem}
.stationery::before{content:'';position:absolute;inset:10% -4% -4% 8%;background:#6c967e;border:1px solid #93b59d;border-radius:5px;transform:rotate(11deg)}
.flashcard{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;border:1px solid #bcb593;border-radius:5px;color:var(--ink);background:var(--paper);box-shadow:0 8px 17px #081b1745;gap:.55rem}.card-label{font-size:.77rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase}.equation{font-weight:700;font-size:clamp(2.5rem,4.8vw,4rem);line-height:1.13;letter-spacing:-.06em}.ten-frame{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}.ten-frame i{width:14px;height:14px;border:1px solid #497562;border-radius:50%;background:#497562}.ten-frame i:nth-last-child(-n+2){background:#d6963d;border-color:#a9702a}.pencil{position:absolute;width:59%;height:12px;bottom:1%;right:-10%;border-radius:1px 4px 4px 1px;background:linear-gradient(#e6bd6b 30%,#ad7b35 32% 70%,#e6bd6b 72%);transform:rotate(-26deg);box-shadow:0 3px 4px #081b1733}.pencil::before{content:'';position:absolute;right:100%;width:18px;height:12px;background:linear-gradient(90deg,#263e34 28%,#d4ae7d 30%);clip-path:polygon(0 50%,100% 0,100% 100%)}.pencil::after{content:'';position:absolute;right:0;width:14%;height:100%;background:#cb8d78;border-left:6px solid #bfc3ae;border-radius:0 4px 4px 0}
.home-section{margin-top:clamp(1.6rem,3.1vw,2.5rem)}.band-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.05rem}.band-card{background:var(--surface);border:1px solid var(--borderDecorative);border-radius:13px;padding:1.1rem;text-decoration:none;display:flex;align-items:center;gap:1rem;min-height:106px;color:var(--text)}.band-card:hover,.level-row:hover,.pack-row:hover{border-color:var(--primary);background:var(--surfaceRaised)}.band-card .next{margin-left:auto;color:var(--textMuted)}.band-card strong,.stack strong{display:block;font-size:1.07rem}.band-card small,.stack small{display:block;color:var(--textMuted);font-size:.88rem;margin-top:.1rem}
.band-mark{border-radius:11px;width:54px;height:54px;flex:0 0 54px;display:grid;place-items:center;background:var(--tile-a);color:var(--tile-a-ink)}.band-mark.middle{background:var(--tile-b);color:var(--tile-b-ink)}.band-mark.upper{background:var(--tile-c);color:var(--tile-c-ink)}
.band-mark i{width:28px;height:28px;background:currentColor}.band-mark.primary-school i{clip-path:polygon(33% 0,67% 0,67% 33%,100% 33%,100% 67%,67% 67%,67% 100%,33% 100%,33% 67%,0 67%,0 33%,33% 33%)}.band-mark.middle i{clip-path:polygon(0 24%,24% 0,50% 26%,76% 0,100% 24%,74% 50%,100% 76%,76% 100%,50% 74%,24% 100%,0 76%,26% 50%)}.band-mark.upper i{width:28px;height:28px;background:radial-gradient(circle at 50% 13%,currentColor 3px,transparent 4px),linear-gradient(currentColor,currentColor) 50% 50%/100% 5px no-repeat,radial-gradient(circle at 50% 87%,currentColor 3px,transparent 4px)}
.panel,.sheet{border:1px solid var(--borderDecorative);background:var(--surface);border-radius:14px;padding:clamp(1rem,2.5vw,1.65rem)}.activity{display:flex;align-items:center;gap:1.05rem}.activity p,.muted,.hint{color:var(--textMuted)}.activity h3{font-size:1.02rem}.row-icon{width:47px;height:47px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;background:var(--surfaceRaised);color:var(--primary)}.activity .text-link{margin-left:auto;white-space:nowrap}
#app-footer{border-top:1px solid var(--borderDecorative)}.footer-inner{max-width:80rem;padding:1rem clamp(1rem,4.2vw,4rem);margin:auto;display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;color:var(--textMuted);font-size:.875rem}.footer-links{gap:1.2rem}.footer-links a{color:var(--textMuted);display:inline-flex;align-items:center;gap:.4rem;min-height:44px;text-decoration:none}.footer-links a:hover{text-decoration:underline}
.crumb{display:inline-flex;align-items:center;gap:.25rem;min-height:44px;margin-bottom:.4rem;text-decoration:none;font-weight:700;font-size:.92rem}
.filters,.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(12rem,100%),1fr));gap:1rem}.field{display:flex;flex-direction:column;gap:.35rem;font-weight:700;min-width:0}.field input,.field select,.field textarea{width:100%;font-weight:400;min-width:0}.field input[type=checkbox]{width:auto}.filters,.settings-section,.gap-section{margin-bottom:1.5rem}.gap-top{margin-top:1rem}.settings-section h2,.sheet h2{margin-bottom:1rem}.settings-section label{font-weight:400}.check-field{display:inline-flex;align-items:center;gap:.5rem;min-height:44px}.check-field input{min-width:19px;height:19px;accent-color:var(--primary)}.stack-rows{display:grid;gap:.6rem}
.level-row,.pack-row{display:flex;align-items:center;text-decoration:none;color:var(--text);padding:.85rem 1rem;gap:.85rem;background:var(--surface);border:1px solid var(--borderDecorative);border-radius:10px;min-height:59px}.level-row>svg:last-child,.pack-row>svg:last-child{margin-left:auto}.level-no,.op-sign{display:grid;place-items:center;min-width:43px;height:43px;border-radius:8px;background:var(--surfaceRaised);color:var(--primary);font-weight:700}.op-sign{font-size:1.65rem}.chip{display:inline-flex;align-items:center;min-height:28px;border:1px solid var(--borderDecorative);border-radius:20px;padding:.08em .65em;font-size:.86rem;color:var(--textMuted);background:var(--surface)}
.grade-links,.choices{display:flex;flex-wrap:wrap;gap:.55rem}.grade-links a,.choices a,.choices button{display:inline-flex;justify-content:center;align-items:center;gap:.4em;min-width:48px;min-height:45px;border:1px solid var(--borderControl);border-radius:8px;padding:.45em .8em;text-decoration:none;color:var(--text);background:var(--surface)}.grade-links a[aria-current],.choices [aria-current],.choices [aria-pressed=true]{color:var(--onPrimary);background:var(--primary);border-color:var(--primary)}.grade-links a:hover,.choices a:hover{outline:2px solid var(--primary);outline-offset:1px}.catalog-layout{display:grid;grid-template-columns:minmax(13rem,.77fr) minmax(0,2fr);gap:1.6rem;align-items:start}.catalog-layout aside h2{margin-bottom:1rem}.catalog-layout aside .field{margin-bottom:.8rem}
details{padding:.6rem .05rem}summary{cursor:pointer;font-weight:700;min-height:44px;align-content:center}details[open]>summary{margin-bottom:.45rem}.sheet details{border-top:1px solid var(--borderDecorative)}.sheet>p+p{margin-top:.5rem}
.notice{padding:.85rem 1rem;background:var(--infoBg);color:var(--infoText);border-radius:8px;margin:.75rem 0}.notice.error,[role=alert].error{background:var(--errorBg);color:var(--errorText)}.loading{display:flex;align-items:center;gap:.8rem;min-height:140px;color:var(--textMuted)}.loading::before{content:'';width:26px;height:26px;border:3px dotted var(--primary);border-radius:50%}.stats-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(8rem,1fr));gap:1rem;margin:1rem 0}.stats-list dt{font-size:.87rem;color:var(--textMuted)}.stats-list dd{margin:0;font-weight:700}.setup,.settings{max-width:54rem}.actions{margin-top:1rem}.tagline{color:var(--textMuted);font-size:.9rem}.shell-fallback{padding:2rem;color:var(--textMuted)}
#toast{position:fixed;z-index:9;inset:auto max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) auto;max-width:min(30rem,90vw);pointer-events:none}#toast:not(:empty){padding:.65rem 1rem;background:var(--text);color:var(--surface);border-radius:9px}
table{border-collapse:collapse;max-width:100%}td,th{text-align:start;padding:.5rem;border-bottom:1px solid var(--borderDecorative);overflow-wrap:anywhere}progress{accent-color:var(--primary)}fieldset{border:1px solid var(--borderDecorative);border-radius:10px;min-width:0}legend{font-weight:700}.app-view section,.app-view article{min-width:0}.app-view p,.app-view label,.app-view dd{overflow-wrap:break-word}
@media(max-width:900px){.topbar{gap:1rem}.nav-links{gap:.85rem}.nav-links svg{display:none}.band-grid{gap:.6rem}.band-card{gap:.6rem;padding:.85rem}.band-mark{width:42px;height:42px;flex-basis:42px}.band-card .next{width:14px}.footer-inner{gap:.4rem}}
@media(max-width:700px){.topbar{min-height:64px;flex-wrap:wrap;gap:0;justify-content:space-between}.mobile-only{display:inline-flex}.tool.account{display:none}.nav-links{display:none}.nav-links.is-open{display:flex;width:100%;order:3;flex-wrap:wrap;padding-bottom:.5rem;gap:.4rem .9rem}.nav-links a{min-height:44px}.nav-links svg{display:block}.nav-links.is-open a[aria-current]::after{height:2px}.hero{grid-template-columns:minmax(0,1.5fr) minmax(0,.85fr);min-height:220px}.hero-content{padding:1.3rem}.math-art{min-height:0}.stationery{width:165px;margin-left:1rem}.card-label{font-size:.64rem}.equation{font-size:2.25rem}.ten-frame i{width:9px;height:9px}.flashcard{gap:.3rem}.band-grid{grid-template-columns:1fr}.band-card{min-height:72px;padding:.7rem 1rem;gap:.9rem}.band-card .next{width:20px}.catalog-layout{grid-template-columns:1fr;gap:1rem}.catalog-layout aside .filters{margin-bottom:0}.home-head{margin-bottom:.85rem}.home-head .device-info{font-size:.8rem}.activity{align-items:flex-start;flex-wrap:wrap}.activity>div:nth-child(2){flex:1;min-width:min(13rem,70%)}.activity .text-link{margin-left:0}.footer-inner{align-items:flex-start;flex-direction:column}.footer-links{gap:.7rem}.brand small{font-size:.7rem}.hero h2{font-size:2.1rem}}
@media(max-width:490px){.hero{display:block}.hero-content{padding:1.25rem;max-width:none}.hero h2{max-width:14ch}.math-art{min-height:106px;max-height:106px;mask-image:none;overflow:hidden;background-size:19px 19px}.stationery{width:145px;aspect-ratio:1.8;margin:.3rem 0 0 22%}.flashcard{flex-direction:row;gap:.5rem;flex-wrap:wrap;padding:.45rem .6rem}.card-label{display:none}.equation{font-size:1.65rem}.ten-frame i{width:6px;height:6px}.ten-frame{gap:2px}.pencil{height:7px}.pencil::before{height:7px}.home-head .device-info{display:none}.section-head{gap:.05rem .6rem}.hero-chip,.text-link{font-size:.84rem}.top-tools{gap:0}.top-tools .tool,.lang-button{min-width:40px}.home-section{margin-top:1.35rem}.section-head{margin-bottom:.6rem}.footer-links{display:grid;grid-template-columns:1fr 1fr}.band-card strong{font-size:1rem}}
@media(max-width:350px){#main,.topbar,.footer-inner{padding-left:12px;padding-right:12px}.brand strong{font-size:1rem}.brand img{width:30px;height:30px}.brand{gap:.4rem}.top-tools .tool,.lang-button{min-width:44px}.lang-button svg{display:none}.top-tools{margin-left:0}.section-head{align-items:flex-start}.hero h2{font-size:1.9rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
:root[data-reduce-motion=true] *{animation:none!important;transition:none!important}
@media print{#app-header,#app-footer,.skip-link,#toast,button,.actions{display:none!important}:root{color-scheme:light;--canvas:white;--surface:white;--text:#111;--textMuted:#333;color:#111;background:white}#main{padding:0;max-width:none}a{text-decoration:none;color:inherit}}
/* Keep the first frame at the same reading position while opening local data. */
:root[data-opening] #app-footer{visibility:hidden}
.bone{display:block;background:var(--borderDecorative);border-radius:5px}.bone.pale{background:var(--hero-grid)}
.title-bone{width:min(14rem,60%);height:2.2rem}.eyebrow-bone{width:8rem;height:1rem}.hero-bone{width:min(23rem,90%);height:4.8rem;margin:.75rem 0}.copy-bone{width:80%;height:1.25rem}.btn-bone{width:9.5rem;height:3rem;margin-top:1.15rem}.head-bone{width:min(13rem,100%);height:44px}.opening-shell .activity{min-height:92px}
.data-tabs{margin-bottom:1.1rem}.data-body{max-width:54rem}.data-body .stack{display:grid;gap:1rem}.data-body .actions{margin-top:0}.data-body .field{margin:.3rem 0}.data-body .panel h2{margin-bottom:.1rem}
@media(max-width:700px){.nav-links .mobile-profile{display:inline-flex}}
.dot-groups{display:flex;align-items:flex-start;gap:.6rem}.extra-five{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}.extra-five i{width:14px;height:14px;background:#d6963d;border:1px solid #a9702a;border-radius:50%}
@media(max-width:700px){.extra-five i{width:9px;height:9px}.dot-groups{gap:.4rem}}
@media(max-width:490px){.extra-five{gap:2px}.extra-five i{width:6px;height:6px}.dot-groups{gap:.24rem}}
.brand{min-height:44px}.nav-links .mobile-profile{display:none}
@media(max-width:700px){.nav-links .mobile-profile{display:flex}.top-tools .tool,.lang-button{min-width:44px}}
.grade-band{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}.grade-band-head{display:flex;align-items:center;gap:.85rem}.grade-band-head h2{margin:0}
@media(max-width:700px){.is-session .settings-tool{display:none}}
.demo-banner{padding:.25rem clamp(1rem,4.2vw,4rem);display:flex;align-items:center;justify-content:center;gap:1.15rem;background:var(--warningBg);color:var(--warningText);flex-wrap:wrap}.demo-banner .text-link{color:inherit;text-decoration:underline}
/* Reflow at large text sizes without clipping controls or mathematical content. */
.app-view,.footer-inner,.footer-links{overflow-wrap:anywhere}
.band-grid,.stack-rows,.catalog-layout,.band-card,.pack-row,.level-row,.data-body,.actions,.grade-band-head,.footer-links{min-width:0;max-width:100%}
.band-card>span:not(.band-mark),.pack-row>.stack,.level-row>.stack{min-width:0;overflow-wrap:anywhere}
.stack-rows{grid-template-columns:minmax(0,1fr)}
.app-view button,.app-view .btn,.footer-links a{max-width:100%;white-space:normal;overflow-wrap:anywhere}
@media(max-width:700px){.band-grid,.catalog-layout{grid-template-columns:minmax(0,1fr)}.footer-links{width:100%}}
@media(max-width:490px){
  .footer-links{grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr));gap:.2rem .6rem}
  .pack-row,.level-row,.band-card{padding-inline:clamp(10px,.7rem,16px);gap:clamp(6px,.5rem,12px)}
  .grade-band-head>div{min-width:0}
  .tw .tw-stats{grid-template-columns:repeat(auto-fit,minmax(min(100%,7rem),1fr))}
  .tw .tw-stats>div,.tw .tw-nav a,.tw .tw-badge{max-width:100%;overflow-wrap:anywhere}
}

/* Study navigation stays in document flow, above the current task. */
body{line-height:1.6}
#main,.topbar,.footer-inner{max-width:76rem}
#main{padding-block-start:clamp(1rem,3vw,2.25rem)}
.topbar{gap:clamp(.8rem,2.7vw,2rem);padding-block:.5rem;min-height:72px}
.brand>span{min-width:0}.brand small{letter-spacing:0}
.nav-links a,.footer-links a{font-size:.94rem}
.nav-links a{padding-inline:.3rem}.nav-links a[aria-current]::after{bottom:-.5rem}
.nav-more{position:relative;margin:0;padding:0}
.nav-more>summary{display:flex;align-items:center;gap:.4rem;padding:.4rem .65rem;list-style:none;min-width:44px;min-height:44px;border-radius:.7rem;color:var(--text)}
.nav-more>summary::-webkit-details-marker{display:none}.nav-more[open]>summary{margin:0;background:var(--surfaceRaised)}.nav-more>summary:hover{background:var(--surfaceRaised)}
.menu-pop{position:absolute;z-index:6;right:0;top:calc(100% + .35rem);background:var(--surface);border:1px solid var(--borderControl);border-radius:.85rem;box-shadow:0 .4rem 1.6rem #152d211a;padding:.3rem;min-width:min(17rem,80vw)}
.menu-pop a{display:flex;align-items:center;min-height:44px;padding:.45rem .7rem;gap:.75rem;border-radius:.55rem;color:var(--text);text-decoration:none}
.menu-pop a:hover,.menu-pop [aria-current]{background:var(--surfaceRaised);color:var(--primary)}
.profile-control{display:flex;align-items:center;gap:.5rem;min-width:44px;max-width:min(18rem,30vw);min-height:44px;color:var(--text);text-decoration:none;padding:.15rem .55rem;border:1px solid var(--borderDecorative);border-radius:.7rem;background:var(--surfaceRaised)}
.profile-control span{min-width:0;overflow-wrap:anywhere}
.profile-control small,.profile-control strong{display:block;line-height:1.2}.profile-control small{color:var(--textMuted);font-size:.75rem}
.profile-control strong{font-size:.9rem}.profile-control svg{flex:0 0 auto}
#main,#app-header,#app-footer{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
#main{padding-inline:max(clamp(1rem,4.2vw,4rem),env(safe-area-inset-left)) max(clamp(1rem,4.2vw,4rem),env(safe-area-inset-right));padding-bottom:max(3rem,env(safe-area-inset-bottom))}
.footer-inner{padding-bottom:max(1rem,env(safe-area-inset-bottom))}
.lesson-strip{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,.65fr);align-items:stretch;background:var(--hero);border-radius:1.25rem;color:var(--hero-text)}
.lesson-intro{padding:clamp(1.2rem,3.3vw,2.5rem);min-width:0;align-self:center}
.lesson-label{display:inline-flex;align-items:center;gap:.55rem;color:var(--hero-soft);font-weight:700}.lesson-label svg{color:var(--amber)}
.lesson-strip h2{font-size:clamp(1.7rem,3.5vw,2.95rem);max-width:25ch;line-height:1.13;letter-spacing:-.042em;margin:.45rem 0 .7rem}
.lesson-meta{color:var(--hero-text)}.lesson-reason{color:var(--hero-soft);margin-top:.15rem}
.lesson-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem 1.1rem;margin-top:1.2rem}
.lesson-actions .primary{color:var(--ink);background:var(--amber);border-color:var(--amber);padding-inline:1.1rem}
.lesson-actions .primary:hover{color:var(--ink);background:var(--paper)}
.lesson-actions .text-link{color:var(--hero-text);text-decoration:underline}.lesson-actions a:focus-visible{outline-color:var(--paper)}
.lesson-visual{display:flex;flex-direction:column;gap:.75rem;justify-content:center;position:relative;border-inline-start:1px solid var(--hero-grid);overflow:hidden;background:repeating-linear-gradient(90deg,transparent 0 30px,var(--hero-grid) 30px 31px)}
.abacus-line{width:118%;display:flex;align-items:center;position:relative;gap:.15rem;height:1.4rem;transform:rotate(-12deg) translateX(-.6rem);padding-inline:1rem}
.abacus-line:before{content:'';position:absolute;inset:.61rem 0 auto;height:3px;background:#7d9b83}
.abacus-line i{z-index:1;width:clamp(.55rem,1.5vw,1.5rem);height:1.5rem;border-radius:40%;background:var(--amber);border:1px solid var(--ink)}
.abacus-line:nth-child(2) i{background:var(--hero-soft)}.abacus-line:nth-child(3) i{background:#cc8a71}
.privacy-line{display:flex;align-items:flex-start;gap:.6rem;color:var(--textMuted);margin-top:1.4rem;font-size:.94rem}.privacy-line svg{flex-shrink:0;margin-top:.2rem}
.grade-picker{margin-bottom:1.5rem}.grade-picker .grade-links{margin-top:1rem}
.level-card{padding:1rem clamp(1rem,2.4vw,1.6rem);border:1px solid var(--borderDecorative);border-radius:.85rem;background:var(--surface)}
.level-heading{display:flex;align-items:center;gap:.75rem}.level-ops{display:flex;gap:.1rem 1rem;flex-wrap:wrap;margin-top:.4rem}
.op-link{display:inline-flex;align-items:center;gap:.3rem;min-width:44px;min-height:44px;font-weight:700}
.level-card .muted{font-size:.91rem}.pager{display:flex;gap:.7rem;margin-top:.7rem}.result-range{margin:0 0 1rem}.pager:empty{display:none}
.setup{max-width:46rem}.setup>h2{font-size:clamp(1.4rem,3.5vw,2.1rem);margin-bottom:.28rem}
.setup>details{margin-top:1rem}.setup>label{margin-top:.9rem}.setup .field-grid{margin-top:.65rem}
.plan-line{font-weight:700;margin-top:.8rem}.setup .launch-actions{margin-top:.7rem}
.grade-links a,.choices a,.op-link,.text-link,.lang-button,.brand,.menu-pop a{min-width:44px}
.primary,button.primary{min-height:48px}.app-view input:not([type=checkbox]):not([type=radio]),.app-view select{min-height:46px}
.notice.caution{color:var(--warningText);background:var(--warningBg)}.caution>.check-field{font-weight:700}
.size-example{margin-top:.8rem;color:var(--textMuted)}.version-tag{margin-top:1rem}
@media(max-width:780px){
  .topbar{flex-wrap:wrap;gap:.35rem .6rem;min-height:64px;justify-content:space-between}
  .topbar .nav-links{display:flex;order:3;align-self:auto;justify-content:stretch;flex-wrap:wrap;width:100%;gap:0;border-top:1px solid var(--borderDecorative);padding-top:.25rem}
  .nav-links a{flex:1;justify-content:center;white-space:normal}.nav-links a[aria-current]::after{bottom:-.5rem}.nav-links svg{display:block}
  .top-tools{gap:.15rem;margin-left:auto}.profile-control{max-width:min(32vw,16rem)}
}
@media(max-width:570px){
 .lesson-strip{display:block}.lesson-visual{display:none}.lesson-intro{padding:1.2rem}.lesson-actions{margin-top:.85rem}
 .brand small{display:none}.brand img{height:30px;width:30px}.brand strong{font-size:1rem}
 .topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.35rem .3rem}
 .topbar .brand{grid-column:1}.top-tools{display:contents}.profile-control{grid-column:1;grid-row:2;max-width:100%;width:fit-content}
 .profile-control span{display:flex;align-items:baseline;flex-wrap:wrap;gap:0 .35rem}.lang-button{grid-row:1;grid-column:2}.nav-more{grid-row:1;grid-column:3}
 .topbar .nav-links{grid-column:1/-1;grid-row:3}.profile-control{grid-column:1/-1}.nav-more>summary{padding:.35rem}
 .footer-links{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.app-view .text-link{white-space:normal}
}
@media(max-width:400px){
 .topbar .brand{gap:.25rem}.nav-links a{gap:.25rem}.topbar,.footer-inner{padding-inline:.7rem}
}
@media(max-width:780px){.topbar.is-session{grid-template-columns:minmax(0,1fr) auto auto}.is-session .nav-more>summary span{display:none}}
@media(print){.lesson-strip,.lesson-actions .primary{color:#111;background:#fff;border:1px solid #777}.lesson-actions,.lesson-visual{display:none}}
.storage-dialog{max-width:min(36rem,calc(100% - 2rem));background:var(--surface);color:var(--text);border:1px solid var(--borderControl);border-radius:1rem;padding:1.25rem}.storage-dialog::backdrop{background:#0c201db3}.storage-dialog h2{margin-bottom:.6rem}
.footer-links a{min-inline-size:44px}
.data-body .stack{grid-template-columns:minmax(0,1fr);min-inline-size:0}
.data-body .stack>*{min-inline-size:0;max-inline-size:100%}
.data-body :is(h1,h2,h3,label,p,small,dd,a){overflow-wrap:anywhere}
.data-body :is(progress,input,select,textarea){max-inline-size:100%}
.opening-page{display:none}
:root[data-opening]:not([data-open-surface=home]) .opening-shell{display:none}
:root[data-opening]:not([data-open-surface=home]) .opening-page{display:grid;gap:1.4rem}
:root[data-opening][data-open-surface=focus] .opening-nav{display:none}
.opening-nav span{display:inline-block;min-height:44px;min-width:3.5rem}
.opening-profile{width:6.5rem}.opening-profile .bone{width:3.6rem;height:.9rem}
.opening-menu{min-width:44px;min-height:44px}
@media(max-width:570px){.opening-menu{grid-row:1;grid-column:3}}
@media(max-width:280px){
  #main,.topbar,.footer-inner{padding-inline:8px}
  .topbar{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-start}
  .topbar .brand{width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}.brand img{flex-shrink:0}
  .topbar .profile-control{max-width:100%;width:100%;margin:0}
  .topbar .nav-links{display:grid;grid-template-columns:minmax(0,1fr);justify-content:start}
  .nav-links a{min-width:0;justify-content:flex-start;overflow-wrap:anywhere}
  .nav-links a[aria-current]::after{left:0;bottom:0;width:3px;height:100%}
  .topbar .lang-button,.nav-more>summary{font-size:.8rem}
  .menu-pop{right:auto;left:0;min-width:0;width:min(80vw,12rem);overflow-wrap:anywhere}
  .lesson-intro,.sheet,.panel{padding-inline:8px}
  .setup .field-grid,.field-grid,.stats-list{grid-template-columns:minmax(0,1fr)}
  .setup :is(input,select,textarea,button){min-inline-size:0;max-inline-size:100%;padding-inline:4px}
  .setup .btn{flex-wrap:wrap}
  .setup :is(h1,h2,h3,summary,label,dd,p){overflow-wrap:anywhere}
  .band-card,.activity,.footer-links,.grade-band-head{display:flex;flex-wrap:wrap}
}
.level-ops{gap:.4rem .65rem}
.level-ops .op-link{padding:.3rem .65rem;text-decoration:none;border:1px solid var(--borderDecorative);border-radius:.55rem}
.level-ops .op-link small{display:block;color:var(--textMuted);font-size:.8rem;font-weight:400}
.level-ops .op-link:hover{border-color:var(--primary);background:var(--surfaceRaised)}

.math-formula{display:inline-block;max-inline-size:100%;vertical-align:middle;color:inherit;line-height:1.5;overflow-x:auto;overflow-y:hidden}
.math-surface{display:inline;max-inline-size:100%;white-space:normal}
.math-surface svg{display:inline;overflow:visible}
.math-formula[data-math=pending] .math-surface,.math-formula[data-math=fallback] .math-surface{font-variant-numeric:tabular-nums;white-space:pre-wrap}
.kp-eq .math-formula,.math-formula.kp-eq{display:block;max-width:100%;padding-block:.16em}
.math-warning{display:block;font:normal .87rem/1.45 system-ui}

.math-formula[tabindex]:focus-visible{outline:3px solid currentColor;outline-offset:2px}.math-formula[tabindex]{border-bottom:1px dotted currentColor}
@media(min-width:781px){
  .topbar{flex-wrap:wrap}
  .topbar .nav-links{flex-wrap:wrap;align-self:center}
}

/* ===== KALIBATAKU 1.3 design system =====================================
   One scale for space, radius and type; semantic status colours for learning
   outcomes. Earlier component rules map onto these tokens. */
:root{--space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-5:1.5rem;--space-6:2.25rem;
  --radius-s:8px;--radius-m:12px;--radius-l:18px;--elev-1:0 1px 2px rgb(16 40 34/.06),0 2px 10px rgb(16 40 34/.05);
  --type-xs:.8125rem;--type-s:.9375rem;--type-m:1rem;--type-l:1.1875rem;--type-math:clamp(2rem,6.2vw,3.25rem);
  --correct-bg:#e7f5ec;--correct-ink:#155e3a;--correct-line:#4f9b72;--equal-bg:#e8f1fb;--equal-ink:#1a4f7a;--equal-line:#5b8fc0;
  --wrong-bg:#fdf0e7;--wrong-ink:#8a3b0d;--wrong-line:#c77a45;--assist-bg:#f4efe2;--assist-ink:#5e4a17;--stage:#f1f5f1}
:root[data-theme=dark]{--correct-bg:#173527;--correct-ink:#a6e8c3;--correct-line:#5fb689;--equal-bg:#172c40;--equal-ink:#b6d9f7;--equal-line:#6ea7d6;
  --wrong-bg:#3b2316;--wrong-ink:#ffc9a3;--wrong-line:#d58b5a;--assist-bg:#332b17;--assist-ink:#f1dca1;--stage:#1e332c;--elev-1:none}
@media(prefers-color-scheme:dark){:root[data-theme=system]{--correct-bg:#173527;--correct-ink:#a6e8c3;--correct-line:#5fb689;--equal-bg:#172c40;--equal-ink:#b6d9f7;--equal-line:#6ea7d6;
  --wrong-bg:#3b2316;--wrong-ink:#ffc9a3;--wrong-line:#d58b5a;--assist-bg:#332b17;--assist-ink:#f1dca1;--stage:#1e332c;--elev-1:none}}
.math-svg{display:inline;overflow:visible}
.math-warning{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-top:var(--space-2);font:inherit;font-size:var(--type-s);color:var(--textMuted)}
.version-tag dl{display:grid;grid-template-columns:max-content 1fr;gap:.15rem 1rem;margin:.4rem 0 0}.version-tag dt{color:var(--textMuted)}.version-tag dd{margin:0;font-weight:650;font-variant-numeric:tabular-nums}
.settings-section .scope-note{display:flex;gap:.5rem;align-items:flex-start;font-size:var(--type-s);color:var(--textMuted);background:var(--surfaceRaised);border-radius:var(--radius-s);padding:.55rem .75rem;margin:.25rem 0 .75rem}
.settings-section .field-hint{font-size:var(--type-s);color:var(--textMuted);margin:.15rem 0 .6rem}
.settings-actions{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;margin-top:.75rem}
.version-tag dl{grid-template-columns:minmax(0,max-content) minmax(0,1fr)}.version-tag dd{overflow-wrap:anywhere;min-width:0}
@media(max-width:30rem){.version-tag dl{grid-template-columns:minmax(0,1fr)}.version-tag dd{margin-bottom:.35rem}}
/* Plain-text twin of a rendered formula for copy and text tools; the accessible name comes from aria-label. */
.math-formula{position:relative}.math-text{position:absolute;inset-inline-start:0;inset-block-start:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Adventure (1.4): home stats, map path, start point, mission result */
@media(max-width:700px){.topbar .nav-links a{font-size:.86rem;padding-inline:.15rem;flex-direction:column;gap:.1rem;flex:1 0 auto;min-width:0}.topbar .nav-links{flex-wrap:wrap}}
.adventure-strip .lesson-actions .btn:not(.primary){color:var(--ink);background:var(--paper);border-color:var(--paper)}
.journey-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(10.5rem,100%),1fr));gap:.75rem;margin:0}
.journey-stats>div{background:var(--surface);border:1px solid var(--borderDecorative);border-radius:12px;padding:.85rem 1rem}
.journey-stats dt{color:var(--textMuted);font-size:.9rem}.journey-stats dd{margin:.15rem 0 0;font-size:1.55rem;font-weight:700}
.journey-stats small{display:block;color:var(--textMuted);font-size:.82rem}
.quiet-links h2{font-size:1.05rem}.plain-links{list-style:none;padding:0;margin:.5rem 0 0;display:grid;gap:.15rem}
.plain-links a{display:inline-flex;align-items:center;gap:.5rem;min-height:44px;color:var(--text)}
.map-intro{max-width:62ch;color:var(--textMuted)}.map-legend{margin:.6rem 0 1rem}.map-legend summary{min-height:44px;display:flex;align-items:center;font-weight:700;cursor:pointer}
.map-legend ul{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:.5rem 1rem}
.map-stage{margin-top:1.6rem}.map-stage>h2{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .7rem;font-size:1.2rem}
.map-stage>h2 small{font-size:.95rem;font-weight:600;color:var(--textMuted)}
.map-stage.is-active>h2::before{content:"";display:inline-block;width:.7rem;height:.7rem;border-radius:50%;background:var(--amber);border:2px solid var(--hero);align-self:center}
.map-path{list-style:none;counter-reset:node;margin:.6rem 0 0;padding:0 0 0 1.7rem;position:relative;display:grid;gap:.7rem}
.map-path::before{content:"";position:absolute;left:.62rem;top:.6rem;bottom:.6rem;border-left:3px dashed var(--borderControl)}
.map-node{counter-increment:node;position:relative;background:var(--surface);border:1px solid var(--borderDecorative);border-radius:14px;padding:.8rem 1rem;display:grid;gap:.3rem;justify-items:start}
.map-node::before{content:counter(node);position:absolute;left:-1.72rem;top:.8rem;width:1.5rem;height:1.5rem;border-radius:50%;display:grid;place-items:center;font-size:.8rem;font-weight:700;background:var(--surfaceRaised);border:2px solid var(--borderControl);color:var(--text)}
.map-node h3{font-size:1.02rem;margin:0}.node-detail,.node-next{margin:0;color:var(--textMuted);font-size:.93rem}.node-next{color:var(--text);font-weight:600}
.map-node.is-next{border:2px solid var(--primary);box-shadow:var(--elev-1)}.map-node.is-next::before{background:var(--amber);border-color:var(--hero);color:var(--ink)}
.map-node.is-done::before{background:var(--correct-bg);border-color:var(--correct-line);content:"✓"}.map-node.is-locked{background:transparent;border-style:dashed}
.map-node.is-inactive{opacity:.75;background:transparent;border-style:dotted}
.node-status{display:inline-flex;align-items:center;gap:.35rem;font-size:.86rem;font-weight:700;padding:.15rem .55rem;border-radius:999px;border:1px solid currentColor}
.node-status.is-open{color:var(--infoText)}.node-status.is-playing{color:var(--warningText)}.node-status.is-done{color:var(--successText)}
.node-status.is-reinforce{color:var(--wrong-ink)}.node-status.is-locked,.node-status.is-inactive{color:var(--textMuted)}.node-status.is-offline,.node-status.is-repair{color:var(--errorText)}
.start-grades{display:grid;gap:.6rem;margin:1rem 0}.start-grade{border:1px solid var(--borderDecorative);border-radius:12px;background:var(--surface);padding:.3rem .9rem}
.start-grade summary{min-height:44px;display:flex;align-items:center;font-weight:700;cursor:pointer}
.start-stages{list-style:none;padding:0 0 .6rem;margin:0;display:grid;gap:.45rem;grid-template-columns:repeat(auto-fill,minmax(min(14rem,100%),1fr))}
.start-stage{width:100%;display:grid;gap:.15rem;text-align:left;padding:.6rem .8rem}.start-stage span{color:var(--textMuted);font-size:.92rem}
.mission-facts{margin:.4rem 0;padding-left:1.2rem;display:grid;gap:.25rem}.mission-readiness{font-weight:600}.mission-next{margin-top:.8rem}
@media(max-width:420px){.map-path{padding-left:1.45rem}.map-node{padding:.7rem .75rem}.map-node::before{left:-1.5rem}}
.map-path{grid-template-columns:minmax(0,1fr)}.map-node{min-width:0;overflow-wrap:anywhere;grid-template-columns:minmax(0,1fr)}.map-node>*{max-width:100%}.node-status{flex-wrap:wrap}

/* Print the report on white stock, without the touch-safe screen gutter. */
@media print {
  :root:has(.tw-paper) { color-scheme: only light; background: white; }
  body:has(.tw-paper) { background: white; }
  #main:has(.tw-paper) { padding-bottom: 0; }
}

.expedition-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(16rem,1fr);gap:1.1rem;align-items:stretch}
.expedition-grid .adventure-strip{margin:0;display:block;isolation:isolate;position:relative;overflow:hidden;padding:clamp(1.25rem,3.5vw,3rem);background:#123e3b;color:#fff;border-radius:1.4rem}
.expedition-grid .lesson-intro{position:relative;z-index:1;max-width:36rem}
.expedition-grid .lesson-intro h2{font-size:clamp(1.65rem,3.5vw,3rem);line-height:1.08;letter-spacing:-.035em;text-wrap:balance}
.expedition-grid .lesson-meta,.expedition-grid .lesson-reason{color:#e7f3e8}
.expedition-grid .lesson-actions{position:relative;z-index:1}.expedition-grid .lesson-actions .primary{background:#ffda85;color:#203734;border-color:#ffda85}
.expedition-land{position:absolute;right:0;bottom:0;width:47%;height:100%;overflow:hidden;z-index:0;pointer-events:none;opacity:.28}
.expedition-land i{position:absolute;bottom:-56%;right:-43%;width:130%;height:122%;border-radius:51% 45% 0 0;transform:rotate(-32deg);border:1.5rem double #92be99;background:#36766b}
.expedition-land i:nth-child(2){right:-24%;bottom:-70%;transform:rotate(-52deg);background:#659888}.expedition-land i:nth-child(3){bottom:-91%;right:-6%;background:#90ae83}
.field-notes,.trail-record{border:1px solid var(--borderDecorative);background:var(--surface);border-radius:1.2rem;padding:1.2rem}
.field-notes .section-head{align-items:baseline;gap:.5rem;flex-wrap:wrap}.field-notes h2{font-size:1.2rem}.nearby-stops{list-style:none;margin:0;padding:0}
.nearby-stops li{display:grid;grid-template-columns:2rem 1fr;align-items:center;gap:.65rem;padding:.75rem .35rem;position:relative}
.nearby-stops li+li{border-top:1px solid var(--borderDecorative)}.nearby-stops svg{margin:auto;color:var(--textMuted)}.nearby-stops [aria-current] svg{color:var(--primary)}
.nearby-stops small{display:block;color:var(--textMuted);margin-top:.15rem}.trail-record{margin-top:1rem;padding:.35rem 1.1rem}
.trail-record summary,.result-journal summary,.pack-filters summary{cursor:pointer;min-height:44px;align-content:center;font-weight:700}
@media(max-width:800px){.expedition-grid{grid-template-columns:minmax(0,1fr)}.expedition-grid .lesson-actions{gap:.5rem}.field-notes{padding:1rem}.expedition-grid .lesson-intro h2{max-width:22ch}}

/* A short display still leaves the mission launch within reach. */
@media(max-height:640px){
  #main:has(>.app-view[data-route="home"]){padding-top:.75rem}
  .app-view[data-route="home"]>.home-head{margin-bottom:.6rem}
  .expedition-grid .adventure-strip{padding:clamp(.875rem,2.5vw,1.25rem)}
  .expedition-grid .lesson-intro{padding:0}
  .expedition-grid .lesson-intro h2{margin:.3rem 0;font-size:clamp(1.5rem,3vw,2rem)}
  .expedition-grid .lesson-actions{margin-top:.45rem}
}

@media(max-height:500px) and (orientation:landscape){
  .expedition-grid{grid-template-columns:minmax(0,1fr)}
  .expedition-grid .lesson-intro,.expedition-grid .lesson-intro h2{max-width:none}
}
