.parcours-welcome{position:relative;padding:24px;border:1px solid #6762ab;border-radius:22px;background:linear-gradient(130deg,#14243cee,#261b3bee);margin:0 0 22px;overflow-wrap:anywhere}.parcours-welcome h1,#custom h1{font-size:clamp(1.5rem,4.2vw,2.1rem);line-height:1.15;margin:12px 0}.parcours-welcome p,#custom>p{color:#d7d9ee;line-height:1.6}.parcours-preferences{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.parcours-preferences label{display:flex;flex-direction:column;gap:7px;color:#a6efff;font-size:.85rem}.parcours-preferences select{width:100%;min-width:0;min-height:46px;font-size:.92rem}.parcours-coverage{font-size:.76rem}.parcours-actions,.parcours-arithmetic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.parcours-actions .btn,.parcours-arithmetic-grid .btn{min-height:48px;min-width:0;white-space:normal;line-height:1.4;padding:12px;font-size:.86rem}.parcours-actions .btn:first-child{background:#89f0ff;color:#061829}.parcours-arithmetic{margin:18px 0}.parcours-arithmetic p{line-height:1.5;color:#c5d2e5}#custom{max-width:100%;overflow-wrap:anywhere}#customSections fieldset{min-width:0;margin:16px 0;padding:12px;border:1px solid #737295;border-radius:14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#customSections legend{font-weight:800;color:#a0edff;padding:0 7px}.parcours-check{display:flex;gap:9px;align-items:center;min-height:48px;min-width:0;padding:9px;background:#111e34;border:1px solid #3a5873;border-radius:10px;font-size:.87rem;line-height:1.4;cursor:pointer}.parcours-check:has(input:checked){border-color:#8af2ff;background:#154059}.parcours-check input{width:20px;height:20px;flex:0 0 20px;accent-color:#80e9ff}.parcours-figure{margin:12px 0;padding:12px;background:#101d33;border-radius:14px;border:1px solid #405574}.parcours-figure svg{display:block;width:100%;max-height:150px}.parcours-figure figcaption{font-size:.76rem;color:#c9d8ed;line-height:1.5}#customResult p{line-height:1.6}.neo-hero{margin-top:12px}#avatar{display:none!important}@media(max-width:375px){.parcours-welcome{padding:16px}.parcours-actions,.parcours-arithmetic-grid,#customSections fieldset{grid-template-columns:1fr}.parcours-preferences{gap:9px}.parcours-preferences select{font-size:.82rem;padding:9px}}@media(prefers-reduced-motion:reduce){.parcours-welcome *{scroll-behavior:auto}}

.parcours-chapters details{border:1px solid #405279;border-radius:14px;padding:14px;margin:12px 0;background:#101b33}.parcours-chapters summary{font-size:1.08rem;font-weight:800;cursor:pointer;min-height:48px;display:flex;align-items:center;overflow-wrap:anywhere}.chapter-section{padding:14px;border:1px solid #344a67;border-radius:12px;min-width:0}.chapter-section h3{font-size:.96rem;line-height:1.4}.chapter-section p{font-size:.85rem;line-height:1.5}.chapter-recalls{margin-top:16px}.curriculum-table{margin:12px 0;overflow:auto}.curriculum-table table{border-collapse:collapse;width:100%;max-width:500px;margin:auto}.curriculum-table th,.curriculum-table td{border:1px solid #4f698f;padding:10px;text-align:center}.curriculum-table figcaption{font-size:.8rem;text-align:center;margin-top:8px}.parcours-chapters .btn{white-space:normal}
.chapter-progress-summary{color:#a2efff;line-height:1.6}.chapter-content-status{display:block;color:#ffce9e;line-height:1.5;font-size:.73rem}.chapter-prerequisites p{line-height:1.6;color:#d4dcec}.chapter-prerequisites summary{font-size:.95rem}.choice-diagram{max-width:100%;pointer-events:none}.choice-diagram .parcours-figure{margin:8px 0 0;padding:8px}.choice-diagram svg{max-height:130px}.choice-diagram figcaption{font-weight:400}.choice-diagram text{font-weight:400}#chapterProgressPanel p{line-height:1.6;overflow-wrap:anywhere}

.fold-prism input{display:block;width:100%;min-height:44px}.fold-prism output{display:block}.bar-construction{width:100%;min-width:0}.mq-inter-controls label{display:block;max-width:100%}.bar-height{max-width:110px}.fold-prism svg{max-height:270px}

/* One launch bar replaces the mobile navigation during configuration. Its measured
   height reserves real scroll space even with safe-area insets or enlarged text. */
#customSections .config-group{border:1px solid #476383;border-radius:12px;margin:12px 0;background:#101b33}
#customSections .config-group>summary{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:12px;min-height:52px;cursor:pointer;color:#a0edff;font-weight:800;list-style:none}
#customSections .config-group>summary::before{content:'›';font-size:1.3rem;flex:0 0 12px}
#customSections .config-group[open]>summary::before{content:'⌄'}
#customSections .config-group>summary>span{flex:1;min-width:0;overflow-wrap:anywhere}
#customSections .config-selected-count{display:block;flex-basis:100%;margin-left:24px;font-size:.73rem;font-weight:500;color:#c9d8ed}
#customSections .config-group fieldset{margin:0;border:0;border-top:1px solid #405279;border-radius:0;padding:12px}
.custom-launch-bar{position:fixed;left:180px;right:0;bottom:0;z-index:6;background:#101a30f5;border-top:1px solid #7195af;box-shadow:0 -8px 22px #03091966;padding:10px max(14px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));backdrop-filter:blur(12px)}
.custom-launch-bar>strong{display:block;color:#a0f0ff;font-size:.85rem;line-height:1.4}
#customLaunchReason{font-size:.76rem;line-height:1.45;margin:3px 0 8px;overflow-wrap:anywhere;color:#e0e7f8}
.custom-launch-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;max-width:760px}
.custom-launch-actions .btn{min-height:48px;white-space:normal;line-height:1.35;padding:11px 12px;min-width:0}
#customAdapt{grid-column:1/-1}
body.is-configuring .app{padding-bottom:calc(var(--custom-launch-height,180px) + 24px)}
html:has(body.is-configuring){scroll-padding-bottom:calc(var(--custom-launch-height,180px) + 24px)}
#custom input,#custom select,#custom summary,#custom button{scroll-margin-block:20px}
@media(max-width:1050px) and (min-width:761px){.custom-launch-bar{left:145px}}
@media(max-width:760px){.custom-launch-bar{left:0}body.is-configuring>.bottom{display:none}}
@media(prefers-reduced-motion:reduce){.config-group,.custom-launch-bar{transition:none;scroll-behavior:auto}}

.hint-content{padding:14px;margin:14px 0;border-left:3px solid #8af0ff;border-radius:8px;background:#122b40;color:#e0f5ff;line-height:1.6;overflow-wrap:anywhere}

.v28-graph svg{max-height:240px}.v28-graph figcaption{line-height:1.5}#schoolScopeNote{border-left:3px solid #ffba7a;padding:10px 14px;background:#332443}

.parcours-figure [data-side-value]:focus-visible { outline: none; fill: #ff8ad233; stroke: #ff8ad2; stroke-width: 2; }
.function-grid{display:block;width:100%;height:auto;max-width:440px;margin:8px auto}.function-grid-input{touch-action:none}.function-response{min-width:0;border:1px solid #49617b;border-radius:12px;padding:12px;margin:8px 0}.function-response legend{font-weight:700;max-width:100%;overflow-wrap:anywhere}.function-input-row{display:flex;align-items:end;gap:8px;margin:12px 0}.function-input-row label{flex:1;min-width:0;font-size:.88rem}.function-input-row .field{width:100%;margin:6px 0 0;box-sizing:border-box}.function-input-row button{min-width:44px;min-height:44px;padding:8px}.function-table-wrap{overflow-x:auto}.function-table{width:100%;border-collapse:collapse;text-align:center}.function-table th,.function-table td{padding:8px;border:1px solid #49617b}.function-table caption{font-size:.85rem;margin-bottom:8px}.function-figure{overflow:hidden}

/* New function grids keep their aspect ratio; legacy diagrams keep their own limits. */
#game .function-grid{max-height:none!important}

/* Chapter 4: number lines and native relation selector remain readable at 320px. */
#game .inequality-line{width:100%;max-width:480px;max-height:none!important;height:auto;display:block;margin:12px auto}
.function-response>label{display:grid;gap:8px;margin:12px 0;min-width:0}.function-response select{-webkit-appearance:none;appearance:none;min-height:46px;width:100%;max-width:100%;background:#111b33;color:#e4eeff;border:1px solid #7589ad;border-radius:8px;padding:10px;font:inherit;font-size:16px}

/* S3 solids: the whole geometric projection and cube-net targets remain visible. */
#game .solid-grid{display:block;width:100%;height:auto;max-height:none!important;margin:8px auto}.solid-grid [role=button]{cursor:pointer;touch-action:manipulation}.solid-grid [role=button]:focus-visible rect{fill:#314f79;stroke:#ff9bdc;stroke-width:4}

#game .study-grid{display:block;width:100%;height:auto;max-height:none!important}.study-figure{overflow-wrap:anywhere}.study-grid [role=button]{cursor:pointer;touch-action:manipulation}.study-grid [role=button]:focus-visible{outline:3px solid #ff9bdc}

#game .probability-grid{display:block;width:100%;height:auto;max-height:none!important}.probability-figure{overflow-wrap:anywhere}
