@font-face{font-family:Nunito;src:url(nunito.woff2) format("woff2");font-weight:200 900;font-style:normal;font-display:swap}
:root{--ink:#301b4c;--muted:#615279;--accent:#7044d9;--deep:#522aa8;--border:#cdbce8;--paper:#f4efff;--sky:#e4daff;--clue:#e1d7ff;--line:#8d7caa;--choice:#fac4df;--active:#ff7ab1;--one:#2f154f;--body:Nunito,system-ui,sans-serif;--display:var(--body);--r:25px;--scene:url(pop.svg);--solid:#fff;--base:#fff;color:var(--ink);background:var(--paper);font:16px/1.5 var(--body)}
*{box-sizing:border-box}
body,h1,h2,p{margin:0}
body{min-height:100vh}
button,a,input,select{font:inherit;color:inherit;touch-action:manipulation}
button,a{cursor:pointer;-webkit-tap-highlight-color:transparent}
button{background:none;border:0;padding:0}
button,a,.row,.timer,.brand,.actions,.levels,.kicker,.utility,.more,.bar,.progress,.switch,.headin,.intro,.tools,.boxes,.printlinks,.paperword{display:flex;align-items:center}
button,a{justify-content:center;gap:9px;font-weight:700}
a{text-decoration:none}
button:disabled{cursor:default;opacity:.55}
a:hover,button:hover:not(:disabled){color:var(--accent)}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
[hidden]{display:none!important}
.ico{width:21px;height:21px;flex:none}
.iconbtn,.switch button{width:38px;height:38px;border-radius:50%}
.iconbtn:hover{background:#e8eeff}
header{background:#fff;border-bottom:1px solid var(--border)}
.headin,main,footer>div{width:min(1040px,calc(100% - 72px));margin-inline:auto}
.headin{height:79px;justify-content:space-between;gap:32px}
.brand{font:700 1.88rem/1 var(--display);letter-spacing:-1.45px;gap:0;white-space:nowrap;color:#142442}
.brand img{margin-right:11px}
.brand span{color:var(--accent)}
.headin nav{display:flex;gap:clamp(20px,2.6vw,42px);height:100%}
.headin nav a{font-size:.94rem;position:relative;white-space:nowrap}
.headin nav a[aria-current]{color:var(--accent)}
.headin nav a[aria-current]:after{position:absolute;content:"";height:3px;background:var(--accent);bottom:0;left:0;right:0;border-radius:3px 3px 0 0}
.utility{gap:9px}
.utility .ico{width:23px;height:23px}
h1,h2{font-family:var(--display);line-height:1.11;letter-spacing:-.04em}
h1{font-size:clamp(2.25rem,3.5vw,3.05rem)}
h2{font-size:1.65rem}
.intro{justify-content:space-between;gap:16px;margin:34px 0 26px}
.actions{gap:22px}
.actions button,.primary,.choices button,.printlinks button,#next,dialog form button{font-size:.94rem;font-weight:700;min-height:44px;border-radius:11px}
#choose{color:#435372;font-size:.92rem;gap:10px}
#choose:hover{color:var(--accent)}
.primary,dialog form button,.choices button,#next{border:1px solid var(--border);padding:0 19px;background:#fff}
button.primary{color:white;background:var(--accent);border:1px solid var(--accent);box-shadow:0 2px 3px #19349912}
button.primary:hover:not(:disabled){background:var(--deep);color:white}
.play{display:grid;grid-template-columns:minmax(0,1.58fr) minmax(340px,1fr);align-items:start;gap:36px}
.board{min-width:0}
.bar,.row,.progress,.more,.printlinks{justify-content:space-between}
.bar{margin-bottom:17px;gap:13px}
.levels{background:#e9edf5;padding:4px;gap:3px;border-radius:13px;margin-right:auto}
.levels a,.levels b{border-radius:10px;min-height:37px;padding:0 18px;font-size:.94rem;font-weight:800;gap:9px;white-space:nowrap;display:flex;align-items:center}
.levels a[aria-current],.levels b{background:#fff;color:var(--accent);box-shadow:0 1px 5px #1528541a,0 1px 2px #1424540f}
.levels a:not([aria-current]):hover{background:#f7faff}
.bars{height:15px;display:flex;align-items:end;gap:2px}
.bars i{width:4px;border-radius:1.5px;background:#c3ccdd;height:6px}
.bars i:nth-child(2){height:10px}
.bars i:nth-child(3){height:14px}
.n1 i:first-child{background:#1e9c76}
.n2 i:not(:last-child){background:#7544d2}
.n3 i{background:#e76555}
.timer{gap:6px;font-variant-numeric:tabular-nums;font-weight:800}
.timer .iconbtn{height:32px;width:27px}
.timer .iconbtn svg{width:16px}
#zoom{width:36px;height:32px;border-radius:0;padding-left:12px;border-left:1px solid #d3dbe7}
#zoom:hover{background:none}
.scrollgrid{overflow:auto;scrollbar-width:thin;border-radius:8px}
.puzzle{--line:#66758c;display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));background:var(--line);gap:1px;border:1.6px solid #35465e;position:relative;border-radius:8px;isolation:isolate;container-type:inline-size}
.puzzle>*,.puzzle button{padding:0;min-width:0;min-height:0;border-radius:0;position:relative}
.puzzle>*{aspect-ratio:1.09;display:flex}
.puzzle>:first-child{border-top-left-radius:6px}
.puzzle>:nth-child(10),.small>:nth-child(7){border-top-right-radius:6px}
.puzzle>:nth-last-child(10),.small>:nth-last-child(7){border-bottom-left-radius:6px}
.puzzle>:last-child{border-bottom-right-radius:6px}
.puzzle.small{max-width:560px;margin:auto}
.small>*{aspect-ratio:1.03}
.small>:nth-child(10),.small>:nth-last-child(10){border-radius:0}
.def{background:#e0ebfd;flex-direction:column;z-index:2}
.def.blank{background:#b9cfef}
.def button{width:100%;flex:1;position:relative;font:600 11px/1.04 var(--body);color:#1d3453}
.def button:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}
.def button:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}
.def button+button{border-top:1px solid var(--line)}
.def button span{position:absolute;inset:1.5px 2px;display:flex;align-items:center;justify-content:center;hyphens:auto;overflow-wrap:anywhere;overflow:hidden;text-align:center;text-wrap:balance}
.def button:hover{background:#cbdffd;color:#183b73}
.def button.selected{background:var(--accent);color:white}
.arr{position:absolute;display:block;width:12px;height:12px;color:#1b3c71;pointer-events:none}
.arr svg{display:block;width:100%;height:100%}
.arr.r,.arr.rd{right:-12px;top:calc(50% - 6px)}
.arr.d,.arr.dr{bottom:-12px;left:calc(50% - 6px)}
.selected .arr{color:#101c42}
.cell{background:white;font:800 clamp(18px,4.9cqw,40px)/1 var(--body);outline:0;user-select:none}
.small .cell{font-size:6.3cqw}
.cell:hover{background:#f0f5ff}
.cell.chosen{background:var(--choice)}
.cell.current{background:var(--active);box-shadow:inset 0 0 0 2px var(--ink)}
.cell.given{color:#087856}
.cell.wrong{background:#ffe1df;color:#b41d26;box-shadow:inset 0 -3px #ce443d}
.cell small{position:absolute;right:3px;top:3px;color:#264fa7;font:700 clamp(9px,1.65cqw,14px)/1 var(--body)}
.progress{gap:18px;margin-top:16px;color:var(--muted);font-weight:700;font-size:.875rem}
progress{display:block;flex:1;width:0;height:7px;border:0;appearance:none;border-radius:8px;overflow:hidden;background:#dce4f2;accent-color:var(--accent)}
progress::-webkit-progress-bar{background:#dce4f2}
progress::-webkit-progress-value{background:var(--accent)}
aside{display:grid;gap:20px;position:sticky;top:18px;min-width:0}
.panel{padding:25px 26px;border-radius:21px}
.clue{background:#e7efff;border:1px solid #d0dffe;padding-top:22px}
.kicker{font-size:.8rem;font-weight:800;color:#1d49c7;letter-spacing:.085em;text-transform:uppercase;gap:10px}
.direction{display:grid;place-items:center;background:var(--accent);color:#fff;width:26px;height:26px;border-radius:8px}
.direction svg{width:18px}
.switch{gap:8px}
.switch button{background:white;border:1px solid #d1ddef;width:34px;height:34px}
.switch button:hover{border-color:#9db3e4}
.switch .ico{width:18px}
#question{font:700 1.82rem/1.16 var(--display);letter-spacing:-.028em;margin:19px 0 6px;overflow-wrap:anywhere}
#letters{font-size:.95rem;font-weight:600;color:#506381}
.boxes{gap:6px;min-width:0}
.boxes button{position:relative;flex:1;max-width:41px;aspect-ratio:1/1.1;min-width:0;background:white;border:1px solid #b7c9ed;border-radius:7px;font-size:1.22rem;font-weight:800}
.boxes button:hover{border-color:var(--accent)}
#answer{margin-top:23px}
#answer .marked{background:var(--active);border-color:var(--ink)}
.tools{gap:11px}
.tools button{flex:1;flex-direction:column;gap:8px;background:white;border:1px solid var(--border);border-radius:15px;min-height:86px;box-shadow:0 2px 2px #16305c04;font-size:.91rem}
.tools button:hover{border-color:#a2b8ee}
.tools .ico{width:25px;height:25px;color:var(--accent);stroke-width:1.8}
.secret{position:relative;background:#ffe2f0;border:1px solid var(--ink);padding-bottom:42px;isolation:isolate}
.secret p{font-size:.95rem;font-weight:600;max-width:67%;margin-top:9px;line-height:1.5;color:var(--ink)}

#mystery{margin-top:24px}
#mystery button{border-color:var(--ink)}
.boxes small{position:absolute;top:calc(100% + 5px);font:700 .75rem var(--body);color:var(--ink)}
.more{padding:0 6px;gap:10px}
.more>*{font-size:.91rem;color:#455573}
.more svg{width:19px}
.keys{display:none}
.keys>div{display:flex;gap:4px;justify-content:center}
.keys button{flex:1;min-width:0;max-width:46px;background:#fff;border-radius:6px;box-shadow:0 1.5px #acb7c9;height:41px;font-weight:800}
.keys button:active{background:#c9d9ff}
.keys #back{flex:1.7;max-width:66px}
.keys.enabled{display:grid;gap:6px}
.zoomed main{width:min(1260px,96%)}
.zoomed .play{grid-template-columns:1fr 360px}
.zoomed #zoom{color:var(--accent)}
.paused .play{filter:blur(10px)}
.reading,.sub{max-width:855px}
.reading{margin:48px auto 25px;padding-top:32px;border-top:1px solid var(--border)}
.reading p,.sub>p,dialog p{margin:13px 0;line-height:1.75;color:#40516b}
p a,.reading a,dialog a,.printlinks a{display:inline;color:var(--accent);text-decoration:underline;text-underline-offset:3px}
details{border-top:1px solid var(--border);margin-top:22px;padding:20px 0}
summary{font-weight:800;cursor:pointer}
footer{border-top:1px solid var(--border);margin-top:58px;background:white}
footer>div{display:flex;gap:16px 24px;flex-wrap:wrap;padding-block:28px;color:var(--muted);font-size:.875rem}
footer a:first-child{margin-right:auto;color:var(--ink)}
dialog{width:min(440px,92%);padding:25px;border:0;box-shadow:0 18px 100px #0b1c3e30;border-radius:20px;color:var(--ink);overscroll-behavior:contain}
dialog::backdrop{background:#0c1c3d66;backdrop-filter:blur(3px)}
dialog .row{gap:5px;margin-bottom:15px}
dialog h2{font-size:1.65rem}
dialog .iconbtn{background:var(--paper);flex-shrink:0}
dialog .actions{justify-content:end}
dialog form,.printbar,#searchform{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
dialog form{margin:18px 0}
dialog .primary{min-height:45px}
dialog .choices{display:grid;gap:10px}
table{border-collapse:collapse;width:100%;font-size:.88rem}
th,td{text-align:right;padding:10px 3px;border-bottom:1px solid var(--border)}
th:first-child{text-align:left}
#toast{position:fixed;bottom:40px;left:50%;transform:translateX(-50%);border-radius:14px;background:var(--ink);color:white;font-weight:700;padding:12px 21px;opacity:0;transition:opacity .17s;pointer-events:none;z-index:8;text-align:center;width:max-content;max-width:90%}
#toast.on{opacity:1}
.sub{margin:46px auto;min-height:60vh}
.sub>h2{margin-top:26px}
label{display:grid;font-size:.89rem;font-weight:700;gap:7px;flex:1;min-width:105px}
label.line{display:flex;align-items:center;gap:9px;min-height:45px;white-space:nowrap;flex:auto}
input,select{width:100%;min-width:0;min-height:45px;border:1px solid #acbbd1;border-radius:9px;padding:8px 11px;background:white;font-size:1rem;color:var(--ink)}
input[type=checkbox]{min-height:0;height:19px;width:19px;accent-color:var(--accent)}
select{appearance:none;padding-right:29px;background:white url("data:image/svg+xml,%3Csvg width='14' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 2l6 6 6-6' stroke='%23214066' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center}
#searchform,.printbar{background:#e7efff;border:1px solid #d0dffe;padding:25px;border-radius:17px;margin-top:25px}
#searchform label:first-child{flex:2;min-width:215px}
#searchform label:nth-child(2){min-width:155px}
#searchform label:nth-child(3){flex:0 1 125px}
#searchform button,.printbar button{min-height:45px}
#pattern{text-transform:uppercase;letter-spacing:.09em}
.examples{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:.9rem;margin:15px 0 28px}
.examples button{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
#list>div{display:grid;grid-template-columns:1fr 2fr auto;gap:12px;align-items:center;border-bottom:1px solid var(--border);padding:15px 0}
#list small{color:var(--muted)}
#next{margin:18px auto}
.printbar label:first-child{min-width:194px}
.printbar label:nth-child(2){flex:0 1 120px}
.printlinks{margin:12px 0}
.sheet{max-width:730px;background:white;padding:30px;margin:16px auto;box-shadow:0 4px 18px #1627490d}
.sheet .row{margin-bottom:18px}
.paperword{gap:20px;margin:20px 0}
.paperword .boxes{flex:1}
#sheets:not(.show) .sheet+.sheet{display:none}
.sheet .puzzle{max-width:100%}
.sheet .puzzle.small{max-width:550px}
.sheet .boxes{pointer-events:none}
@media(min-width:801px) and (max-width:1040px){
.headin,main,footer>div{width:94%}
.headin{gap:12px}.headin nav{gap:17px}.brand{font-size:1.6rem}
.play{gap:23px;grid-template-columns:minmax(0,1.48fr) minmax(305px,1fr)}
.levels a,.levels b{padding:0 11px;gap:5px;font-size:.875rem}
.bar{gap:5px}.actions{gap:12px}.panel{padding-left:19px;padding-right:19px}
#choose{font-size:.84rem}h1{font-size:2.19rem}
.secret p{font-size:.87rem}.timer{gap:3px}.more>*{font-size:.85rem}
body[data-page=mini] .bars{display:none}
}
@media(max-width:800px){
.headin,main,footer>div,.zoomed main{width:min(96%,620px)}
.headin{height:auto;flex-wrap:wrap;gap:3px;padding-top:12px}
.brand{font-size:1.63rem}.brand img{width:34px;height:34px}
.headin nav{order:3;flex:0 0 100%;height:44px;justify-content:space-between;gap:3px}
.headin nav a{font-size:.88rem}
.utility{gap:4px}
.intro{margin:20px 0 14px;flex-wrap:wrap;gap:10px}
h1{font-size:2.15rem}
.actions{width:100%;justify-content:space-between;gap:4px}
.actions button,#choose{font-size:.85rem;min-height:38px}
.actions button.primary{padding:0 12px}
.play,.zoomed .play{display:flex;flex-direction:column;gap:10px}
.board,aside{display:contents}
.bar,.clue,.scrollgrid,.tools,.keys,.progress,.secret,.more{width:100%}
.bar{order:0;margin:0;gap:6px}
.clue{order:1;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;align-items:center;gap:0 6px;padding:9px 12px;position:sticky;top:0;z-index:4;border-radius:12px}
.clue .row{display:contents}.kicker{font-size:.67rem;gap:6px;grid-row:1;grid-column:1}
.direction{width:18px;height:18px;border-radius:5px}.direction svg{width:14px}
#letters{grid-row:1;grid-column:1;font-size:.76rem;margin-left:125px}
#answer{display:none}
#question{font-size:1.3rem;grid-row:2;grid-column:1;margin:4px 0 0}
.switch{grid-column:2;grid-row:1/3;gap:5px}
.scrollgrid{order:2}
.puzzle>*{aspect-ratio:1}
.zoomed .puzzle{min-width:640px}.zoomed .puzzle.small{min-width:490px}
.keys{display:grid;order:3;gap:6px;padding:8px 2px calc(9px + env(safe-area-inset-bottom));position:sticky;bottom:0;z-index:3;background:#e0e6f1;border-radius:10px}
.progress{order:4;margin:0}.tools{order:5}.tools button{flex-direction:row;min-height:52px;border-radius:12px;gap:6px}
.tools .ico{width:20px;height:20px}
.secret{order:6;padding:17px 22px 38px}.secret p{max-width:calc(100% - 86px)}
.more{order:7;padding:10px 6px}
.levels a,.levels b{font-size:.88rem;padding:0 12px;gap:6px}
.sub{margin:26px auto}
#toast{bottom:auto;top:19%}
.sheet{padding:12px}.sheet h2{font-size:1.21rem}.sheet .row b{font-size:.8rem}
footer>div{gap:15px;justify-content:center}footer a:first-child{flex:0 0 100%}
}
@media(max-width:520px){
.headin,main,footer>div,.zoomed main{width:calc(100% - 24px)}
.headin nav a{font-size:.8rem}
h1{font-size:clamp(1.7rem,7.6vw,2.15rem)}
.levels{gap:0;padding:3px;border-radius:10px}
.levels a,.levels b{font-size:.8rem;padding:0 8px;min-height:33px;border-radius:8px}
.timer{font-size:.85rem;gap:1px}.timer>.ico,.bars{display:none}
#zoom{width:28px;padding-left:6px}.timer .iconbtn{width:22px}
body[data-page=mini] .levels a{padding-inline:5px}
#choose,.actions button{font-size:.77rem;gap:6px}
.actions .ico{width:17px}
.arr{width:9px;height:9px}
.arr.r,.arr.rd{right:-9px;top:calc(50% - 4.5px)}
.arr.d,.arr.dr{bottom:-9px;left:calc(50% - 4.5px)}
.cell small{top:1px;right:2px;font-size:8px}
.cell.current{box-shadow:inset 0 0 0 1px var(--ink)}
.def button span{inset:1px}
.tools{gap:6px}.tools button{font-size:.82rem}
.keys button{font-size:.94rem;height:38px}
.reading{margin-top:27px;padding-top:22px}
#searchform,.printbar{padding:16px}
#searchform button,.printbar button{width:100%}
#list>div{grid-template-columns:1fr auto}#list span{grid-row:2;grid-column:1/-1}
#list small{grid-row:1;grid-column:2}
.sheet .row b{display:none}.paperword{gap:9px;font-size:.8rem}
}
@media(max-width:375px){
.levels a,.levels b{font-size:.74rem;padding-inline:6px}
#choose{font-size:.71rem}.actions button.primary{padding:0 7px}
.bar{gap:2px}#zoom{width:24px}.timer{font-size:.75rem}
.headin nav a{font-size:.74rem}.brand{font-size:1.48rem}
.more>*{font-size:.79rem}
}
@page{size:A4 portrait;margin:11mm}
@media print{
:root,body{background:white}
header,footer,dialog,#toast,.sub>:not(#sheets),.game>:not(.play),.play aside,.play .bar,.play .progress{display:none!important}
main,.sub,.game,.play{display:block!important;width:100%!important;margin:0;padding:0}
.sheet{width:100%;max-width:none;margin:0;padding:0;box-shadow:none;break-inside:avoid}
.sheet+.sheet{display:none!important;break-before:page}
#sheets.with-solution .sheet+.sheet{display:block!important}
.puzzle{print-color-adjust:exact;-webkit-print-color-adjust:exact;--line:#34445d}
.sheet .puzzle{width:180mm;margin:auto}
.sheet .puzzle>*{aspect-ratio:1.09}
.sheet .puzzle.small{max-width:155mm}
.sheet .row b{display:block}
.sheet .def button span{font-size:var(--paper-size,inherit)}
.sheet .row{margin-bottom:4mm}
.paperword{margin:4mm auto;max-width:175mm}
.paperword .boxes button{max-width:9mm}
.sheet .def{background:#e4e9ef}
}

/* Réserver la place de la grille pendant la lecture des données. */
.game .puzzle:empty{aspect-ratio:10.9/12;background:#edf2fa;border-color:#d8e0f0}
body[data-page=mini] .game .puzzle:empty{aspect-ratio:7.21/8;max-width:560px;margin:auto}
#question:empty{min-height:1.16em}
#answer:empty,#mystery:empty{min-height:42px}
#letters:empty{min-height:1.5em}
@media(max-width:800px){
.game .puzzle:empty{aspect-ratio:10/12}
body[data-page=mini] .game .puzzle:empty{aspect-ratio:7/8}
}
@media(min-width:801px) and (max-width:1100px){
.zoomed .play{grid-template-columns:minmax(0,1.48fr) minmax(305px,1fr)}
.zoomed .game .puzzle{min-width:690px}
.zoomed .game .puzzle.small{min-width:550px}
}
@media print{
.sheet .puzzle{border-color:#203657}
.sheet .puzzle>*{outline:.5pt solid #536379}
.sheet .def button+button{border-color:#536379}
.sheet .def button{color:#15233e}
.sheet .puzzle .arr{height:12px;width:12px}
.sheet .arr.r,.sheet .arr.rd{right:-12px;top:calc(50% - 6px)}
.sheet .arr.d,.sheet .arr.dr{bottom:-12px;left:calc(50% - 6px)}
}

/* Quatre forces et deux formats indépendants. */
.headin nav a{gap:4px}
.levels a,.levels b{padding-inline:12px;gap:4px}
.levels .bars{margin-right:4px}
.n4 i,.n4 i:nth-child(2),.n4 i:nth-child(3){background:#8142ba}
.n4 i:nth-child(4){height:18px}
.n4{height:18px}
body[data-page="mini"] .levels a,body[data-page="mini"] .levels b{padding-inline:9px}
.pan-note{display:none}
.giant>:nth-child(10),.giant>:nth-last-child(10){border-radius:0}
.giant>:nth-child(15){border-top-right-radius:6px}
.giant>:nth-last-child(15){border-bottom-left-radius:6px}
.giant .cell{font-size:clamp(16px,3.22cqw,38px)}
.giant .cell small{font-size:clamp(8px,1.1cqw,12px)}
.giant .def button span{inset:1px 1.5px}
#answer:has(button:nth-child(9)),#mystery:has(button:nth-child(9)){gap:3px}
#answer:has(button:nth-child(9)) button,#mystery:has(button:nth-child(9)) button{font-size:1rem}
body[data-page=geants] .game .puzzle:empty{aspect-ratio:15/18}
@media screen and (min-width:801px){
body[data-page=geants] main{width:min(1216px,95%)}
body[data-page=geants] .play{grid-template-columns:minmax(0,1fr) clamp(310px,29vw,360px);gap:28px}
body[data-page=geants] .game .puzzle{min-width:690px}
body[data-page=geants].zoomed main{width:min(1450px,97%)}
body[data-page=geants].zoomed .game .puzzle{min-width:960px}
}
@media screen and (max-width:1100px){
.headin{gap:14px}
.headin nav{gap:clamp(12px,1.9vw,22px)}
.headin nav a{font-size:.86rem}
.levels a,.levels b,body[data-page=mini] .levels a,body[data-page=mini] .levels b{padding-inline:9px;gap:3px}
.levels .bars{display:none}
.pan-note{display:block;color:var(--muted);font-weight:600;font-size:.86rem;margin:-6px 0 9px}
}
@media screen and (min-width:801px) and (max-width:940px){
.levels a,.levels b,body[data-page=mini] .levels a,body[data-page=mini] .levels b{font-size:.82rem;padding-inline:7px}
:is([data-page=geants],[data-page=mini]) .levels a:not(:first-child) span{display:none}
:is([data-page=geants],[data-page=mini]) .levels a{min-width:32px}
.headin nav{gap:12px}
.headin nav a{font-size:.82rem}
.brand{font-size:1.44rem}
.utility{gap:1px}
}
@media screen and (max-width:800px){
.pan-note{order:2;margin:0;font-size:.81rem}
body[data-page=geants] .game .puzzle{min-width:685px}
body[data-page=geants].zoomed .game .puzzle{min-width:935px}
.levels a,.levels b{padding-inline:10px}
}
@media screen and (max-width:560px){
.headin nav{gap:3px}
.headin nav a{font-size:.81rem}
.headin nav a:nth-child(2) span{display:none}
.levels a:not(:first-child) span{display:none}
.levels a,.levels b,body[data-page=mini] .levels a,body[data-page=mini] .levels b{min-width:33px;font-size:.85rem;padding-inline:7px}
.levels a:first-child{gap:4px}
.levels b{font-size:.77rem}
}
@media screen and (max-width:420px){
.headin nav a:first-child span{display:none}
.headin nav a:first-child{text-transform:capitalize}
.headin nav a{font-size:.78rem}
.levels a,.levels b,body[data-page=mini] .levels a,body[data-page=mini] .levels b{min-width:30px;font-size:.8rem;padding-inline:5px}
.levels a:first-child{padding-inline:6px}
.levels b{font-size:.76rem}
}
@media screen and (max-width:365px){
.headin nav a{font-size:.7rem}
.levels a,.levels b,body[data-page=mini] .levels a,body[data-page=mini] .levels b{min-width:27px;font-size:.76rem;padding-inline:4px}
body:is([data-page=mini],[data-page=geants]) .levels b{display:none}
}
@media print{
.sheet .puzzle.giant{width:184mm}
.sheet .puzzle.giant>*{aspect-ratio:1.025}
.sheet .puzzle.giant .cell{font-size:15pt}
.sheet .puzzle.giant .cell small{font-size:6pt}
.sheet .puzzle.giant .arr{width:9px;height:9px}
.sheet .puzzle.giant .arr.r,.sheet .puzzle.giant .arr.rd{right:-9px;top:calc(50% - 4.5px)}
.sheet .puzzle.giant .arr.d,.sheet .puzzle.giant .arr.dr{bottom:-9px;left:calc(50% - 4.5px)}
}

/* Interface Pop */
@media screen{
header,footer,dialog,.choices button,#next,.printlinks button,dialog form button,.keys button,select,input,.sheet{background-color:var(--base)}
header{border-color:var(--border)}
.headin{height:70px}.brand{color:var(--ink);font-family:var(--display);letter-spacing:-.055em;font-weight:800;font-size:1.73rem}
.brand .sign{width:41px;height:41px;margin-right:10px;display:block}
.headin nav a{font-size:.92rem;letter-spacing:-.015em}.headin nav a[aria-current]:after{height:3px;bottom:0}
.iconbtn:hover,.keys button:active,.levels a:not([aria-current]):hover,.def button:hover{background:var(--sky);color:var(--accent)}
h1,h2,#question{font-family:var(--display);font-weight:700}
h1{font-size:clamp(2.05rem,3vw,2.72rem);letter-spacing:-.045em}.intro{margin:24px 0 22px}
#choose,.more>*,.reading p,.sub>p,dialog p,.secret p,#letters,.boxes small{color:var(--muted)}
.actions{gap:20px}.actions .primary,.primary,button.primary{background:var(--accent);color:var(--solid);box-shadow:none;border-color:var(--accent);border-radius:50px}
button.primary:hover:not(:disabled){color:var(--solid);background:var(--deep);border-color:var(--deep)}
.levels{border-radius:40px;background:var(--sky);padding:4px}
.levels b,.levels a{border-radius:32px;font-weight:700}
.levels a[aria-current],.levels b{background:var(--accent);color:var(--solid);box-shadow:none}
.bars i{background:currentColor;opacity:.25}.n1 i:first-child,.n2 i:not(:last-child),.n3 i,.n4 i{background:currentColor;opacity:1}
#zoom{border-color:var(--border)}.bar{margin-bottom:12px}.timer{font-family:var(--body)}
.puzzle{--line:inherit;border:1px solid var(--line);background:var(--line)}.def{background:var(--clue)}
.def.blank{background:var(--line)}.def button{color:var(--ink);font-family:var(--body);font-weight:700;letter-spacing:-.02em;line-height:1.035}
.def button.selected{background:var(--accent);color:var(--solid)}
.puzzle .arr,.puzzle .selected .arr{color:var(--ink)}.puzzle .selected .arr{color:var(--one)}
.cell{font-family:var(--display);font-weight:700;background:var(--base)}
.cell:hover:not(:disabled){color:var(--ink);background:var(--sky)}
.cell.chosen,.cell.chosen:hover:not(:disabled){background:var(--choice)}
.cell.current,.cell.current:hover:not(:disabled),#answer .marked{color:var(--one);background:var(--active);box-shadow:inset 0 0 0 2px var(--one);border-color:transparent}
.cell.given{color:var(--accent)}.cell.wrong{color:#c81946;background:#ffe6ea}
.cell small,.boxes small{font-family:var(--body);color:var(--accent)}.cell.current small{color:var(--one)}
progress,progress::-webkit-progress-bar{background:var(--border)}
aside{gap:16px}.panel{border:1px solid var(--border);border-radius:var(--r);background:var(--base);padding-inline:24px}
.clue{padding-top:0;overflow:hidden;box-shadow:0 5px 18px #12454607}
.scene{background:var(--scene) no-repeat center/cover;aspect-ratio:440/154;margin:0 -24px 13px}
.kicker,.tools .ico{color:var(--accent)}.direction{color:var(--solid);border-radius:50%}
.switch button,.tools button,.boxes button,#mystery button{background:var(--base);border-color:var(--border)}
#question{margin:14px 0 5px;font-size:1.82rem;line-height:1.1}
#answer{margin-top:16px}.boxes button{font-family:var(--display);background:var(--paper);border-radius:9px}
.tools button{min-height:71px;gap:5px;border-radius:15px;box-shadow:none}
.tools button:hover:not(:disabled),.switch button:hover,.boxes button:hover{border-color:var(--accent)}
.tools .ico{width:23px;height:23px}
.secret{background:var(--sky);border-color:transparent;padding-top:21px;padding-bottom:37px}
.treasure{position:absolute;right:21px;top:16px;width:20%;max-width:78px}
.secret p{max-width:73%;font-size:.9rem;margin-top:6px;line-height:1.35}
#mystery{margin-top:19px}.secret h2{font-size:1.48rem}
.keys,#searchform,.printbar{background:var(--sky);border-color:var(--border)}.keys button{box-shadow:0 2px var(--border)}#toast{color:var(--paper)}
:focus-visible{outline-color:var(--accent)}
:root body{background-image:radial-gradient(#e1d6f8 .94px,transparent 1px);background-size:17px 17px}
:root header{border-bottom:2px solid var(--ink);background:#fff}
:root .brand,:root :is(h1,h2,#question,.tools button,.headin nav a,.levels a,.cell){font-weight:900}
:root .headin nav a[aria-current]{color:var(--ink)}
:root .headin nav a[aria-current]:after{bottom:14px;background:#b599ff;height:4px;border-radius:12px;transform:rotate(-3deg)}
:root .panel,:root .tools button,:root .actions .primary,:root .scrollgrid{border:2px solid var(--ink);box-shadow:3px 4px var(--ink)}
:root .actions .primary{border-radius:14px}
:root .scrollgrid{border-radius:18px;padding:7px;background:#fff}
:root .puzzle{border-radius:10px;border:0;gap:2px;background:#d0c3ea}
:root .puzzle>*{border-radius:4px}
:root .def{background:#ded3ff}
:root .def.blank{background:#9c83e2}
:root .def button{font-weight:800}
:root .clue{padding-top:12px}
:root .scene{margin:0 -12px 5px}
:root .levels{background:none;padding:0;gap:7px}
:root .levels :is(a,b){border:2px solid var(--ink);box-shadow:0 2px var(--ink);border-radius:12px;background:#fff}
:root .levels :is(a[aria-current],b){background:#b9a4ff;color:var(--ink)}
:root .bars{display:none}
:root .direction{background:#ae90fa;color:var(--ink)}
:root .secret{background:#ffe2f0}
:root .tools button{border-radius:17px}
:root .tools button:first-child{background:#bbf2df}
:root .tools button:nth-child(2){background:#d4c3ff}
:root .tools .ico,:root .tools button{color:var(--ink)}
:root .boxes button,:root #mystery button{border:1.6px solid var(--ink);box-shadow:0 2px var(--ink);background:white}
:root #answer .marked{background:#fc8ebd}
:root .tools button:hover,:root .actions button.primary:hover{transform:translate(2px,2px);box-shadow:1px 2px var(--ink)}
}
@media screen and (min-width:801px){
:root body .play{grid-template-columns:minmax(308px,1fr) minmax(0,1.58fr);gap:34px}
:root body .board{grid-column:2;grid-row:1}
:root aside{grid-column:1;grid-row:1;gap:19px}
:root body[data-page=geants] .play,:root body.zoomed .play{grid-template-columns:clamp(310px,29vw,355px) minmax(0,1fr)}
:root .bar{margin-bottom:17px}
:root .intro{margin-bottom:26px}
}

@media screen and (min-width:801px) and (max-width:1040px){
.headin nav a{font-size:.83rem}.headin{gap:13px}.brand{font-size:1.42rem}.brand .sign{width:35px;height:35px;margin-right:6px}
.scene{margin-inline:-24px}
:root body .play{gap:23px}
.levels a,.levels b{padding-inline:7px;font-size:.81rem}
.bar{gap:5px}.timer{font-size:.85rem}
:root .levels{gap:4px}
h1{font-size:1.9rem}
}
@media screen and (max-width:950px){
.levels a:not(:first-child) span{display:none}
.levels :is(a,b){min-width:32px;justify-content:center}
}
@media screen and (max-width:800px){
.headin{height:auto;padding-top:7px}.headin nav{height:39px}
.headin nav a{font-size:clamp(.73rem,3vw,.85rem)}
.brand{font-size:1.5rem}.brand .sign{width:34px;height:34px;margin-right:7px}
.intro{margin:14px 0 12px;gap:8px}h1{font-size:clamp(1.58rem,7vw,2.04rem)}
.actions{gap:7px}.bar{margin-bottom:0}
.scene{display:none}:root .clue{padding:8px 10px;border-radius:13px}
#question{font-size:1.19rem;margin:3px 0 0}
#letters{margin-left:118px}.tools button{min-height:50px}
:root .headin nav a[aria-current]:after{bottom:1px}
:root .levels{gap:4px}
:root .levels :is(a,b){border-width:1.5px;min-height:31px;border-radius:8px}
:root .scrollgrid{padding:3px;border-radius:12px}
:root .puzzle{gap:1px}
:root .panel,:root .tools button,:root .actions .primary,:root .scrollgrid{box-shadow:2px 2px var(--ink);border-width:1.5px}
.treasure{width:67px}.secret{background-image:var(--scene);background-size:100% auto;background-repeat:no-repeat;padding-top:calc(32% + 18px);background-color:var(--base)}.secret .treasure{top:auto;bottom:100px}
:root .secret{background-image:var(--scene);background-size:100% auto;background-repeat:no-repeat;background-color:var(--base)}
}
@media screen and (max-width:560px){
.headin nav{gap:2px}.levels{padding:3px}.levels :is(a,b){min-width:28px;padding-inline:5px}
.actions button{min-height:35px}.actions #choose{font-size:.76rem}.timer{gap:0}.keys{gap:4px}.keys button{height:35px}.bar{gap:3px}
}
@media screen and (max-width:365px){
.actions #choose{font-size:.68rem}.timer{font-size:.7rem}.kicker{font-size:.59rem}#letters{margin-left:100px}
}

@media screen{
.treasure{aspect-ratio:1;background:url(mystere.svg) no-repeat center/contain}
.keys button{color:var(--ink)}
:root .puzzle button:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
:root .cell.current small{color:var(--ink)}
:root .def button.selected:hover{background:var(--deep);color:#fff}
:root .levels a[aria-current]:hover{color:var(--ink)}
:root .cell.wrong,:root .cell.wrong:hover:not(:disabled){background:#ffdee8;color:#a51137;box-shadow:inset 0 -3px #cc2355}
:root .cell.wrong.current{box-shadow:inset 0 0 0 2px #cc2355}
:root button.primary:hover:not(:disabled){color:#fff}
#searchform,.printbar{border:2px solid var(--ink);box-shadow:3px 4px var(--ink);background:#eee6ff}
input,select,.choices button,.printlinks button,dialog form button:not(.primary),#next{border-color:#aa99ce}
dialog{border:2px solid var(--ink);box-shadow:4px 5px var(--ink)}
input[type=checkbox]{accent-color:var(--accent)}
#list>div,th,td{border-color:#cfc1e4}
:root .panel .boxes button:hover{background:#eadfff;color:var(--ink)}
:root .panel #answer button.marked:hover{background:var(--active)}
}
@media screen and (min-width:801px) and (max-width:950px){
:root body .play{gap:20px;grid-template-columns:minmax(287px,1fr) minmax(0,1.53fr)}
:root body[data-page=geants] .play,:root body.zoomed .play{grid-template-columns:290px minmax(0,1fr)}
:root .panel{padding-inline:17px}
:root .tools{gap:8px}
:root .levels :is(a,b){padding-inline:6px}
:root .more>*{font-size:.78rem;gap:5px}
:root .timer>.ico{display:none}
}
@media screen and (max-width:800px){
:root .headin nav a[aria-current]:after{bottom:2px}
:root .secret{background-position:center top}
:root .secret .treasure{display:none}
:root .secret p{max-width:none}
:root .clue{box-shadow:0 2px var(--ink)}
:root .keys{border-radius:12px 12px 0 0;border:1px solid var(--border);border-bottom:0;padding-inline:5px}
:root .keys button{box-shadow:0 2px #b6a4dc}
:root .intro h1{font-weight:900}
}
@media screen and (max-width:380px){
:root .levels :is(a,b){min-width:25px;padding-inline:4px}
:root .levels{gap:3px}
:root .actions .primary{padding-inline:7px;font-size:.75rem}
:root .headin nav a{font-size:.70rem}
:root .brand{font-size:1.34rem}
:root .tools button{font-size:.75rem}
}
@media print{
:root{--paper:white;--ink:#171329;--border:#918da3;--accent:#301b4c;--muted:#28283b}
.scene,.treasure,.pan-note{display:none!important}
.puzzle .cell{background:white;box-shadow:none;color:#111}
.puzzle .def button.selected{background:#e4e9ef;color:#171329}
.puzzle .cell small{color:#171329}
}

/* Navigation par date et outils de jeu */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);min-width:0}
.game .intro{margin:20px 0 19px}
.heading{min-width:0}
.issue,#dates,.commands,.week,.legend,.calfoot,.monthbar,.calendar{display:flex;align-items:center}
.issue{gap:9px;font-size:.91rem;color:var(--muted);margin-top:6px;font-weight:700;flex-wrap:wrap}
#dates{gap:3px}
#dates button{border:1px solid var(--border);background:white;border-radius:8px;height:28px;width:29px}
#dates .ico{width:16px;height:16px}
#backtoday{font-size:.83rem;text-decoration:underline;text-underline-offset:2px;color:var(--accent)}
#choose{color:var(--ink);background:white;border:2px solid var(--ink);box-shadow:2px 3px var(--ink);border-radius:14px;padding-inline:16px;font-size:.94rem;font-weight:800}
#choose:hover{background:var(--sky)}
.game .intro .actions{gap:13px}
:root .game .bar{margin-bottom:12px;gap:9px}
#expand{gap:5px;font-size:.83rem;font-weight:800;padding:7px 9px;border-radius:10px;background:#fff;border:1px solid #cbb9e5;white-space:nowrap}
#expand .ico{width:19px;height:19px}
#expand[aria-pressed=true],#expand:hover{background:var(--sky);color:var(--ink)}
.commands{position:sticky;z-index:5;top:5px;gap:3px;justify-content:space-between;width:100%;margin-bottom:12px;padding:4px 7px;border-radius:14px;background:#fff;border:1px solid #c7b4e2;box-shadow:0 2px 0 #38235b15}
.commands button{border-radius:9px;min-width:34px;min-height:35px;gap:6px;padding:0 6px;font-size:.875rem;font-weight:800}
.commands .ico{width:21px;height:21px}
.commands i{width:1px;height:20px;background:var(--border);margin:0 2px}
.commands button:disabled,#dates button:disabled{opacity:.34}
.commands button:not(:disabled):hover,.calendar button:not(:disabled):hover,#dates button:not(:disabled):hover{background:#ebe2ff;color:var(--ink)}
.commands button:not(:disabled):active{transform:translateY(1px)}
#percentZoom{min-width:54px;font-size:.83rem;font-variant-numeric:tabular-nums;color:var(--accent)}
#quickhint{background:#e6daff}#quickcheck{background:#d3f7eb}
.commands #quickclear{color:#773668}
:root .game .puzzle:not(:empty){max-width:none;min-width:0;margin:auto}
:root body[data-page=geants] .game .puzzle:not(:empty){min-width:0}
:root .game .scrollgrid{scrollbar-color:#bca3ec #f4efff;overscroll-behavior-x:contain;scroll-padding:12px}
:root .cell.given{color:#026147;background:#def8ed}
:root .cell.given.current{box-shadow:inset 0 0 0 2px #086348}
:root .game .bar .levels a{padding-inline:10px}
:root .game .bar .levels:has(b) a{padding-inline:7px}
:root .game .bar .levels:has(b) .bars{display:none}
:root .game .bar .levels:has(b) b{padding-inline:8px}
:root .game .bar .levels:has(b) ~ #expand span{display:none}
:root .game .bar .levels{gap:6px}
:root .game .bar .timer{gap:4px;white-space:nowrap}
#listbtn span{font-size:.83rem}
.game aside{gap:16px}
#cluelist{max-height:55vh;overflow-y:auto;overscroll-behavior:contain}
#cluelist h3{font-size:.91rem;padding:8px 6px;margin:0;color:var(--accent)}
#cluelist button{padding:10px;gap:14px;justify-content:space-between;width:100%;border-top:1px solid #e4dcf2;text-align:left;border-radius:8px}
#cluelist button small{color:var(--muted);white-space:nowrap}
#cluelist button:hover,#cluelist [aria-current]{background:var(--sky)}
dialog{max-height:92dvh;overflow:auto}
dialog:has(.calendar){width:min(458px,95%);padding:18px 21px}
dialog:has(.calendar) .row{margin-bottom:9px}
.calendar{flex-direction:column;gap:8px;align-items:stretch}
.calendar select{font-weight:800;min-height:38px}
.monthbar{gap:7px;justify-content:space-between}
.monthbar button{height:36px;width:39px;flex:none;border:1px solid var(--border);border-radius:10px;font-size:1.6rem;line-height:1;background:#f4eeff}
.monthbar select{text-align:center;border:0;font-size:1.05rem;cursor:pointer}
.week,#days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.week{text-align:center;font-size:.78rem;color:var(--muted);font-weight:800}
#days button{background:#f4effd;font-weight:900;flex-direction:column;border:1px solid #e7dcf8;border-radius:10px;gap:2px;min-height:45px;font-size:.95rem;line-height:1.18}
#days small{font-size:.66rem;font-weight:700}
#days button:disabled{opacity:.35;background:none;border-color:transparent}
#days .started,.legend span:nth-child(2):before{background:#ffd9eb;border-color:#f6a9ce}
#days .done,.legend span:nth-child(3):before{background:#bcefdc;border-color:#80c8af}
#days .today{border-color:var(--accent);color:#5624ab}
#days [aria-current]{outline:2px solid var(--ink);outline-offset:-1px}
#days button:not(:disabled):hover{outline:2px solid var(--accent);outline-offset:-2px}
.legend,.calfoot{justify-content:space-between;gap:4px}
.legend{font-size:.78rem;font-weight:700;margin-block:4px}
.legend span{display:flex;align-items:center;gap:4px}
.legend span:before{content:"";width:11px;height:11px;border:1px solid #d4c6eb;border-radius:4px;background:#f4effd}
.calfoot small{color:var(--muted);font-weight:600}
#todaybtn{color:var(--accent);font-size:.9rem}
#pick{border-top:1px solid var(--border);padding-top:10px;margin:3px 0 4px}
#pick label{font-size:.86rem;gap:5px}
#pick .primary{border-radius:10px}
#pick input,#pick .primary{min-height:39px}
/* Vue immersive, avec ou sans API plein écran */
body.immersive{overflow:hidden}
.immersive header,.immersive footer,.immersive .intro,.immersive .reading,.immersive .pan-note,.immersive .progress,.immersive .scene{display:none!important}
:root body.immersive .game{position:fixed;inset:0;margin:0;padding:12px max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));width:100%;max-width:none;height:100dvh}
.immersive .play{height:100%;min-height:0}
.immersive .board{display:flex;min-height:0;flex-direction:column;height:100%}
.immersive .scrollgrid{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.immersive .commands,.immersive .clue,.immersive .keys{position:static}
.immersive aside{position:static;max-height:100%;overflow:auto;overscroll-behavior:contain;padding:2px 7px 7px 1px}
:root .immersive .clue{padding-top:17px}
:root .immersive .play{grid-template-columns:minmax(304px,min(32%,400px)) minmax(0,1fr);gap:22px;max-width:1520px;margin:auto}
.immersive .board{justify-self:center;width:100%;max-width:min(100%,max(720px,116dvh))}
.immersive .scrollgrid{display:grid;grid-template-columns:minmax(0,1fr);align-items:safe center;align-content:safe center}
.immersive #toast{bottom:16px;top:auto}
.immersive .scrollgrid .puzzle{align-self:safe center}
.immersive .more{padding-bottom:5px}
.reading h2:not(:first-child){margin-top:32px}
.reading details{border:1px solid var(--border);background:white;padding:14px 18px;border-radius:14px;margin:17px 0}
.reading summary{color:#542c9f}
.reading details p:last-child{margin-bottom:0}
.reading p,.sub>p{color:#45365d}
.reading a{text-decoration-thickness:1px}
.reading ul.samples{list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0;margin:16px 0}
.reading .samples a{display:flex;border-radius:13px;min-height:50px;text-align:left;justify-content:start;color:var(--ink);text-decoration:none;border:1px solid var(--border);background:white;padding:10px 15px;gap:12px}
.samples b{color:var(--accent);white-space:nowrap}
.reading .samples a:hover{background:var(--sky);border-color:var(--accent)}
.reading .samples a:after{content:"↗";margin-left:auto;color:var(--accent)}
@media screen and (max-width:1150px){
 #expand span,#listbtn span{display:none}
 :root .game .bar .levels a{padding-inline:8px}
 .commands button{padding-inline:4px;min-width:31px}
}
@media screen and (min-width:801px) and (max-width:1010px){
 :root .game .bar .levels a:not(:first-child) span{display:none}
 :root .game .bar .levels a{min-width:33px;padding-inline:6px}
 :root .game .bar .levels{gap:4px}
 #expand{padding:6px}
 .game .intro h1{font-size:1.72rem}
 .commands{gap:1px}
 .commands i{margin-inline:0}
 .game .intro .actions{gap:10px}
 #choose,.game #shuffle{padding-inline:10px;font-size:.85rem}
}
@media screen and (max-width:800px){
 :root .game .intro{margin:12px 0;display:grid;grid-template-columns:1fr auto;gap:6px}
 .game .heading{display:contents}
 .game .heading h1{grid-column:1/-1}
 .game .issue{grid-row:2;grid-column:1;gap:5px;font-size:.81rem;margin-top:0}
 .game .intro .actions{grid-row:2;grid-column:2;gap:8px;width:auto}
 .game #choose,.game #shuffle{font-size:.8rem;min-height:36px;padding-inline:10px}
 :root .game .bar{order:0;margin-bottom:0;gap:6px}
 :root .game .bar .levels{gap:5px}
 :root .game .bar .levels a{padding-inline:8px}
 #expand span{display:inline}
 .game .commands{order:1;top:0;min-height:40px;gap:1px;margin:0;border-radius:11px;padding:2px 4px}
 .commands .ico{width:19px;height:19px}
 .commands i{margin-inline:0}
 .commands button{min-width:0;flex:1;padding:0;min-height:34px}
 #percentZoom{min-width:46px;font-size:.77rem}
 .game .clue{order:2;top:39px}
 .game .pan-note{order:3}
 .game .scrollgrid{order:4}
 .game .keys{order:5}.game .progress{order:6}.game .tools{order:7}.game .secret{order:8}.game .more{order:9}
 :root .game .play{gap:8px}
 #listbtn span{display:inline}
 #listbtn{flex:2.6}
 :root body.immersive .game{padding:7px 9px max(env(safe-area-inset-bottom),4px)}
 :root body.immersive .board,:root body.immersive aside{display:contents}
 .immersive .play{display:flex;flex-direction:column;gap:6px}
 .immersive :is(.tools,.more,.secret){display:none}
 .immersive .clue,.immersive .keys,.immersive .commands,.immersive .bar{flex-shrink:0}
 :root .immersive .clue{padding:6px 10px}
 .immersive .keys{padding:4px;gap:4px}
 .immersive .keys button{height:clamp(28px,4.6dvh,42px)}
 .immersive .keys{display:grid}
 .immersive #toast{bottom:145px}
 .game #toast{top:22%;bottom:auto}
 .reading ul.samples{grid-template-columns:1fr}
}
@media screen and (max-width:660px){
 :root .game .intro{display:flex;gap:7px}
 .game .heading{display:block;width:100%}
 .game .intro .actions{width:100%}
 .game .issue{margin-top:4px;gap:7px;font-size:.8rem}
 #dates button{width:27px;height:24px}
 .game #choose,.game #shuffle{min-height:33px;font-size:.81rem}
 :root .game .bar .levels a,:root .game .bar .levels:has(b) a{padding-inline:6px}
 .game .bar .levels a:not(:first-child) span{display:none}
 .game .bar .levels a{min-width:30px}
 #expand span,#listbtn span{display:none}
 #listbtn{flex:1}
 #expand{padding:6px}
 .game .bar .timer>.ico{display:none}
 .commands .ico{width:18px;height:18px}
 .game .bar .timer{font-size:.79rem}
 .game .tools{display:none}
 .game .reading{margin-top:15px}
}
@media screen and (max-width:420px){
 :root .game .bar .levels{gap:3px}
 :root .game .bar .levels :is(a,b),:root .game .bar .levels:has(b) a{min-width:26px;padding-inline:4px;font-size:.76rem}
 :root .game .bar .levels:has(b) b{display:none}
 :root .game .bar .timer{gap:1px}
 .commands .ico{width:17px;height:17px}
 #percentZoom{min-width:39px;font-size:.7rem}
 .game .issue{font-size:.75rem}
 #backtoday{font-size:.72rem}
 dialog:has(.calendar){padding:13px}
 #days,.week{gap:3px}
 #days button{min-height:39px}
 #days small{font-size:.6rem}
 .legend{font-size:.72rem}
}
@media screen and (min-width:801px) and (pointer:coarse),screen and (min-width:801px) and (max-width:1024px) and (max-height:510px){
 .game .keys{display:grid;gap:5px;padding:5px;border-radius:12px;background:var(--sky)}
 .game .keys button{height:clamp(30px,8dvh,40px);font-size:.95rem}
}
@media screen and (min-width:801px) and (max-width:1024px) and (max-height:510px){
 .immersive .tools,.immersive .secret,.immersive .more,.immersive #letters{display:none}
 :root .immersive .clue{padding:9px}
 :root .immersive #question{font-size:1.12rem;line-height:1.18;margin:4px 0}
 .immersive aside{display:flex;flex-direction:column;gap:8px}
 .immersive .keys{margin-top:auto}
}
@media screen and (max-width:800px) and (max-height:510px){
 .immersive .play{display:grid!important;grid-template-columns:minmax(195px,39%) minmax(0,1fr)!important;grid-template-rows:auto auto auto 1fr;gap:6px!important}
 .immersive .bar{grid-row:1;grid-column:1/-1}
 .immersive .commands{grid-column:2;grid-row:2}
 .immersive .clue{grid-row:2/4;grid-column:1}
 .immersive .scrollgrid{grid-row:3/5;grid-column:2;height:100%}
 .immersive .keys{grid-column:1;grid-row:4;align-self:end}
 .immersive #letters,.immersive .kicker{display:none}
 .immersive #question{grid-row:1/3;font-size:1rem}
 .immersive .switch{flex-direction:column}
 .immersive .keys button{font-size:.8rem}
 .immersive #listbtn span{display:none}
 .immersive #listbtn{flex:1}
}
@media print{.commands,.issue,.game .intro,.bar{display:none!important}}
@media (scripting:none){.game .play,.game .actions,.issue,.printbar,.printlinks,.examples,#searchform{display:none!important}}

/* Calendrier et archives */
:root .archives{width:min(1160px,94%);max-width:none;margin:32px auto 58px}
.archives h1,.archives h2,.weektitle h2{margin:0;line-height:1.14}
.archives h1{font-size:clamp(1.65rem,3.2vw,2.42rem);letter-spacing:-.04em}
.archives h2,.weektitle h2{font-size:1.36rem;font-weight:950;letter-spacing:-.033em}
.archives p{line-height:1.57;margin:8px 0;color:var(--muted)}
.archivehead,.arctop,.weektitle,.arcbuttons,#arcpick{display:flex;align-items:center;justify-content:space-between;gap:12px}
.archivehead{margin-bottom:20px}.archivehead label,#arcpick label{display:grid;gap:4px;font-weight:850;font-size:.87rem}
.archivehead select{min-width:260px}
.archivebody{display:grid;grid-template-columns:minmax(320px,35%) minmax(0,1fr);gap:28px;align-items:start}
.monthpane{position:sticky;top:12px}
.monthbox,.lastweek,.archivecard,#arcpick,.capture{background:white;border:1px solid var(--border);border-radius:18px}
.monthbox,.lastweek{padding:18px;border:2px solid var(--ink);box-shadow:3px 4px 0 var(--ink)}
.archives select,.archives input{min-width:0;max-width:100%;border-radius:11px;height:43px;font:inherit;font-weight:750;padding:6px 10px;border:1px solid #c4b6da;background:white;color:var(--ink)}
.archivehead #arcMode{width:100%;min-width:253px}
#arcMonth{flex:1;border:0;padding-inline:0;font-size:1.05rem;font-weight:900}
#monthdays,#recentdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.monthbox .week{margin:13px 0 7px}.monthbox .legend{margin:15px 0;font-size:.76rem}
#monthdays>a,#monthdays>.unavailable,.issuecard{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--ink);border-radius:10px;min-height:44px;font-size:.94rem;font-weight:950;line-height:1.13;background:#f3eeff;text-decoration:none;border:1px solid #e8defa}
#monthdays small{font-size:.63rem;font-weight:750;white-space:nowrap}
#monthdays .unavailable{background:none;border-color:transparent;color:#afa7be}
#monthdays .started,#recentdays .started{background:#ffd9eb;border-color:#efa3c9}
#monthdays .done,#recentdays .done{background:#c6f3e3;border-color:#78c5aa}
#monthdays .now,#recentdays .now{box-shadow:inset 0 0 0 2px var(--accent);color:#5222a5}
#monthdays a:hover,#recentdays a:hover,.archivecard:hover{outline:2px solid var(--accent);outline-offset:-1px}
#arctoday,.emptyarc button,.weektitle a,.lastweek>button{font-size:.91rem;font-weight:850;color:#6030c3;text-decoration:underline;text-underline-offset:3px}
#arctoday{min-height:40px}
.archives .primary{padding:7px 14px;min-height:42px;font-weight:850;font-size:.9rem}
#arcpick{padding:14px 18px;margin-top:17px;align-items:end}
#arcnum{width:100%}#arcpick .primary{min-width:86px}
#browse{scroll-margin-top:16px}#browse:focus{outline:none}
.arctop{margin:3px 0 16px}
#arccount{font-size:.83rem;color:var(--muted);margin-top:3px;font-weight:750}
#arcStatus{font-size:.88rem;width:auto}
#cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#cards .archivecard{display:flex;flex-direction:column;align-items:start;gap:12px;padding:15px 17px;border-radius:16px;text-decoration:none;color:var(--ink);font-weight:900;box-shadow:0 2px 0 #38235b16}
.archivecard time{display:block;font-size:1rem}
.archivecard div span{color:var(--muted);font-size:.83rem;font-weight:750}
.archivecard b{display:inline-flex;align-items:center;gap:6px;background:#eee8ff;color:#5728b9;border-radius:9px;font-size:.82rem;padding:5px 11px;margin-top:auto}
.archivecard.started b{background:#ffd9eb;color:#87204c}.archivecard.done b{background:#c6f3e3;color:#00553c}
.archivecard b span{font-size:1rem;line-height:1}
.emptyarc{grid-column:1/-1;padding:22px;background:white;border-radius:18px}
#pager{display:flex;gap:7px;justify-content:center;align-items:center;margin:24px auto;flex-wrap:wrap}
#pager button{background:white;border-radius:11px;min-width:37px;height:38px;border:1px solid var(--border);font-weight:850}
#pager [aria-current],#pager button:hover:not(:disabled){background:var(--accent);color:white}
#pager button:disabled{opacity:.4}
.archiveinfo{max-width:800px;margin:38px auto 0}
.lastweek{margin:30px auto 0;padding:20px 23px;max-width:930px}
.weektitle{margin-bottom:15px}.weektitle span{font-weight:700;font-size:.84rem;color:var(--muted)}
#recentdays{gap:10px}.issuecard{padding:10px 0;gap:5px;border-radius:13px;font-size:.86rem}
.issuecard span{text-transform:capitalize}.issuecard b{font-size:1.32rem}.issuecard small{font-size:.82rem;font-weight:750}
.issuecard i{display:none}.lastweek .legend{margin-top:14px;justify-content:center;gap:22px}
.capture{margin:20px 0;padding:8px;overflow:hidden;max-width:690px}
.capture a{display:block}.capture img{display:block;width:100%;height:auto;border-radius:11px}
.capture figcaption{padding:9px 7px 3px;font-size:.92rem;font-weight:700;color:var(--muted)}
.capture a:hover img{outline:2px solid var(--accent);outline-offset:-2px}
.immersive .lastweek{display:none}
:root .headin nav{gap:clamp(11px,1.6vw,23px)}
@media screen and (max-width:1060px){
 #cards{grid-template-columns:1fr 1fr}.archivebody{gap:20px}
 .monthbox{padding:12px}.monthbox .legend{font-size:.7rem}
 :root .headin nav a{font-size:.84rem}
}
@media screen and (min-width:801px) and (max-width:940px){
 :root .headin nav a span{display:none}
 :root .headin nav{gap:10px}
 :root .headin .brand{font-size:1.25rem}
}
@media screen and (max-height:680px){.monthpane{position:static}}
@media screen and (max-width:800px){
 :root .headin nav{width:100%;justify-content:space-between;gap:4px}
 :root .headin nav a{font-size:clamp(.66rem,2.4vw,.88rem);padding-inline:0}
 .archives .archivehead{display:grid;gap:6px}
 .archivebody{grid-template-columns:1fr;gap:24px}
 .monthpane{position:static}
 :root .archives{margin:18px auto 40px;max-width:620px}
 #arcpick{padding:10px 12px}#arcpick label{flex:1}
 #monthdays small{font-size:.71rem}.monthbox .legend{font-size:.81rem}
 .archivehead p{font-size:.92rem}
 .lastweek{padding:14px;margin-top:22px}
 #recentdays{gap:5px}.weektitle a{white-space:nowrap;font-size:.84rem}.weektitle h2{font-size:1.14rem}
 .issuecard small{font-size:.72rem}.issuecard{font-size:.79rem}
}
@media screen and (max-width:510px){
 .weektitle h2{font-size:1rem}.weektitle a{font-size:.77rem}.weektitle span{font-size:.72rem}
 .lastweek{padding:12px 9px;margin-right:3px}.lastweek .legend{gap:9px;font-size:.69rem}
 #recentdays,#monthdays{gap:3px}.issuecard{font-size:.69rem;min-height:63px;padding:6px 0;gap:3px;border-radius:9px}
 .issuecard b{font-size:1.02rem}.issuecard small{font-size:.57rem}
 .monthbox{padding:10px;margin-right:3px}#monthdays small{font-size:.59rem}.monthbox .legend{font-size:.72rem}
 :root .headin nav a{font-size:clamp(.685rem,3.12vw,.84rem);min-height:42px}
 :root .headin nav{height:43px}
 #cards{gap:8px}#cards .archivecard{padding:12px 10px}.archivecard time{font-size:.87rem}
 #pager{gap:4px}#pager button{min-width:30px;height:36px;padding:2px}
 .arctop h2{font-size:1.14rem}#arcStatus{font-size:.8rem}
 .archivecard div span{font-size:.77rem}
}
.archives select,#arcMonth{background-image:url("data:image/svg+xml,%3Csvg width='14' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 2l6 6 6-6' stroke='%23462b6d' stroke-width='2' fill='none'/%3E%3C/svg%3E");background-position:right 9px center;background-repeat:no-repeat;padding-right:28px}
#monthfilter:not([hidden]){background:#e6dcff;padding:7px 13px;color:#452984;font-size:.88rem;margin-bottom:13px;border-radius:12px;font-weight:850}
#fullarchive{font-size:.86rem;font-weight:800}
.archivehead>div{flex:1}.archivehead label{width:min(330px,35%)}.archivehead label select{width:100%}
@media(max-width:800px){.archivehead label{width:100%}.archivehead{grid-template-columns:minmax(0,1fr)}}
@media(max-width:385px){#arcMonth{font-size:.93rem}#arctoday{font-size:.8rem}.arcbuttons{gap:5px}.archives .primary{padding-inline:10px}}
@media screen and (max-width:345px){:root .headin nav{gap:2px}:root .headin nav a{font-size:.655rem}}
@media (scripting:none){.lastweek,.archivebody,.archivehead label{display:none}}
@media print{.lastweek,.capture,.archives .monthpane,#pager,.archivehead label,.arctop select{display:none!important}}

/* Deux réponses partent de la même case vers le bas. Chaque flèche reste
   dans la moitié qui contient sa définition, à l'écran et à l'impression. */
:root .puzzle .def.twin-down button span{right:21%}
:root .puzzle .def.twin-down button .arr{width:20%;height:auto;aspect-ratio:1;left:auto;right:1%;bottom:auto;top:50%;transform:translateY(-50%);color:inherit}
:root .puzzle .def.twin-down button.selected .arr{color:inherit}


/* Les lettres affichées sont celles du joueur, sans indice ni correction. */
dialog:has(#cluelist){width:min(490px,95%);padding:20px 22px;overflow:hidden}
dialog:has(#cluelist) .row{margin-bottom:12px}
.cluefilters{display:flex;padding:4px;gap:4px;border-radius:13px;background:#eee8fc}
.cluefilters button{flex:1;min-height:40px;font-weight:800;gap:8px;color:#483765;border-radius:10px}
.cluefilters small{font-size:.8em;padding:1px 6px;background:#e2d8fc;border-radius:8px}
.cluefilters button[aria-pressed=true],.cluefilters button[aria-pressed=true]:is(:hover,:focus,:active){background:#5736bf;color:white}
.cluefilters button[aria-pressed=true] small{color:white}
.cluefilters [aria-pressed=true] small{background:#44259e}
.cluefilters button:disabled{opacity:.62}
#cluelist{max-height:min(55dvh,calc(90dvh - 211px));min-height:64px;margin:9px 0;scrollbar-width:thin;scrollbar-color:#ae9adf transparent}
#cluelist h3{display:flex;align-items:center;gap:8px;color:#5736bf;font-weight:900;padding:12px 9px 8px}
#cluelist h3 span{font-size:1.22rem;line-height:1}
#cluelist button{min-height:58px;padding:9px 11px;line-height:1.2;align-items:center}
#cluelist button[aria-current=true]{background:#eee6ff;box-shadow:inset 4px 0 #6840de}
#cluelist button:focus-visible{outline-offset:-3px}
#cluelist .cluecopy{font-size:1.04rem;font-weight:800}
#cluelist .pattern{display:block;color:#5a4287;font:bold 1rem/1.15 Consolas,monospace;letter-spacing:.2em;margin-top:4px;white-space:nowrap}
#cluelist button small{font-weight:700;font-size:.82rem;font-variant-numeric:tabular-nums}
.cluefoot{border-top:1px solid #ded2fa;padding-top:12px;text-align:center}
.cluefoot button{width:100%;gap:12px}
.cluefoot button span{font-size:1.36em}
@media screen{
 :root .readable #question{font-size:2.08rem;line-height:1.18}
 .readable #cluelist .cluecopy{font-size:1.22rem}
 .readable #cluelist .pattern{font-size:1.16rem}
 :root .readable .puzzle{background:#665583}
 :root .readable .puzzle .def button:not(.selected){color:#160d2d;background:#e6dafe}
 :root .readable .puzzle .def button.selected{background:#43249f;color:white}
 :root .readable .puzzle .cell.current{outline:3px solid #231431;outline-offset:-3px}
 :root .readable .puzzle .cell.chosen:not(.current):not(.given):not(.wrong){background:#ffc1dc}
}
@media(max-width:800px){
 :root body.readable .clue #question{font-size:1.4rem;line-height:1.1}
 .game .switch button{width:38px;height:38px;min-width:38px}
 dialog:has(#cluelist){padding:14px}
 #cluelist{max-height:min(57dvh,calc(90dvh - 198px))}
 .cluefilters button{padding:3px 5px;gap:5px;font-size:.92rem}
}
@media(max-width:370px){
 .game .switch button{min-width:33px;width:33px}
 .game .switch{gap:3px}
 .cluefilters button{font-size:.86rem}
 .cluefoot button{font-size:.94rem;padding:0 8px}
 #cluelist button{gap:8px;padding-inline:8px}
}
@media(max-height:460px){
 dialog:has(#cluelist){padding:9px 15px;max-height:96dvh;overflow:auto}
 dialog:has(#cluelist) .row{margin-bottom:4px}
 dialog:has(#cluelist) h2{font-size:1.22rem}
 #cluelist{max-height:calc(95dvh - 170px);margin:4px 0}
 .cluefoot{padding-top:5px}
 .cluefoot button.primary,.cluefilters button{min-height:34px}
}

/* La vue compacte est facultative sur ordinateur. */
#panelMode{display:none}
@media screen and (min-width:801px){
 body:not(.immersive) #panelMode{display:flex;color:#51359f;background:#eee8ff}
 #panelMode span{display:none}
 :root body.flatview:not(.immersive) .game{max-width:1080px}
 :root body[data-page=geants].flatview:not(.immersive) .game{max-width:1260px}
 :root body[data-page=mini].flatview:not(.immersive) .game{max-width:900px}
 :root body.flatview:not(.immersive) .play{display:flex;flex-direction:column;align-items:stretch;gap:12px}
 .flatview:not(.immersive) .play :is(.board,aside){display:contents}
 .flatview:not(.immersive) :is(.tools,.pan-note){display:none!important}
 :root .flatview:not(.immersive) .game .bar{margin:0;order:0}
 .flatview:not(.immersive) .commands{order:1;top:0;margin:0;min-height:55px;padding:5px 9px}
 .flatview:not(.immersive) .commands button{min-width:38px;min-height:40px;font-size:.96rem}
 .flatview:not(.immersive) .commands :is(#quickhint,#quickcheck,#quickclear){padding:4px 12px;border:1.5px solid var(--ink);box-shadow:0 2px var(--ink);color:var(--ink);font-weight:900;gap:7px;margin-bottom:2px}
 .flatview:not(.immersive) .commands :is(#quickhint,#quickcheck,#quickclear)::after{content:attr(aria-label)}
 .flatview:not(.immersive) #quickhint{background:#dacbff}
 .flatview:not(.immersive) #quickcheck{background:#c5f3e2}
 .flatview:not(.immersive) #quickclear{background:#fff}
 .flatview:not(.immersive) .commands :is(#quickhint,#quickcheck,#quickclear):hover:not(:disabled){transform:translateY(-1px);box-shadow:0 3px var(--ink)}
 :root .flatview:not(.immersive) .clue{position:sticky;z-index:4;top:55px;order:2;padding:11px 16px 12px;display:grid;grid-template-columns:clamp(126px,12.5vw,182px) minmax(0,1fr) minmax(250px,36%) auto;gap:4px 17px;align-items:center;border-radius:16px;box-shadow:0 2px var(--ink)}
 :root .flatview:not(.immersive) .clue .scene{display:block;grid-area:1/1/3/2;margin:0;width:100%;background-size:contain}
 .flatview:not(.immersive) .clue .row{display:contents}
 .flatview:not(.immersive) .kicker{grid-area:1/2;font-size:.82rem}
 .flatview:not(.immersive) .switch{grid-area:1/4/3/5}
 .flatview:not(.immersive) .switch button{width:40px;height:40px}
 .flatview:not(.immersive) #letters{grid-area:1/2;margin:0 0 0 145px;font-size:.98rem}
 :root .flatview:not(.immersive) #question{grid-area:2/2;margin:0;font-size:1.57rem;line-height:1.12;overflow-wrap:anywhere}
 :root .flatview.readable:not(.immersive) #question{font-size:1.84rem}
 .flatview:not(.immersive) #answer{grid-area:1/3/3/4;margin:0;justify-content:end}
 .flatview:not(.immersive) #answer button{min-width:0;max-width:46px;font-size:1.45rem}
 .flatview:not(.immersive) #grid .cell{font-size:clamp(20px,4.6cqw,85px)}
 .flatview:not(.immersive) #grid.small .cell{font-size:clamp(22px,6.2cqw,94px)}
 .flatview:not(.immersive) #grid.giant .cell{font-size:clamp(18px,3.1cqw,70px)}
 .flatview:not(.immersive) #grid .cell small{font-size:clamp(10px,1.5cqw,16px)}
 .flatview:not(.immersive) #grid.giant .cell small{font-size:clamp(9px,1.2cqw,15px)}
 .flatview:not(.immersive) .scrollgrid{order:3}
 .flatview:not(.immersive) .keys{order:4;width:min(100%,560px);align-self:center}
 .flatview:not(.immersive) .keys.enabled{position:sticky;bottom:4px;z-index:3;background:#eee7ff;border-radius:12px;padding:6px}
 .flatview:not(.immersive) .progress{order:5}
 :root .flatview:not(.immersive) .secret{order:6;display:grid;grid-template-columns:80px 1fr minmax(280px,44%);grid-template-rows:auto auto;gap:4px 17px;align-items:center;padding:19px 24px 23px}
 :root .flatview:not(.immersive) .secret .treasure{display:block;position:static;grid-area:1/1/3/2;width:72px}
 .flatview:not(.immersive) .secret h2{grid-area:1/2;margin:0}
 .flatview:not(.immersive) .secret p{grid-area:2/2;margin:0;max-width:100%;font-size:1rem}
 .flatview:not(.immersive) #mystery{grid-area:1/3/3/4;margin:0 0 14px;justify-content:end}
 .flatview:not(.immersive) .more{order:7}
 .flatview #panelMode span{display:inline}
}
@media screen and (min-width:801px) and (max-width:990px){
 :root .flatview:not(.immersive) .clue{grid-template-columns:108px minmax(0,1fr) minmax(225px,33%) auto;column-gap:12px;padding-inline:10px}
 :root .flatview:not(.immersive) .commands button{padding-inline:6px;font-size:.85rem;gap:4px}
 :root .flatview:not(.immersive) #listbtn span{display:none}
 :root .flatview:not(.immersive) #letters{font-size:.85rem;margin-left:131px}
 :root .flatview:not(.immersive) .kicker{font-size:.75rem}
 :root .flatview:not(.immersive) .switch{gap:4px}
 .flatview:not(.immersive) .switch button{width:34px;height:34px}
}
@media screen and (min-width:1240px){
 #panelMode span{display:inline}
}
@media screen and (min-width:801px) and (max-width:1000px){
 body:not(.flatview) #listbtn span{display:none}
}
@media screen and (min-width:801px) and (max-width:890px){
 .flatview:not(.immersive) #answer button{padding:0}
 .flatview:not(.immersive) #answer{gap:3px}
}

#fitAll{display:none}
@media screen and (min-width:801px){
 :root body.immersive .game{padding:10px 14px 12px}
 :root body.immersive .game .play{display:grid;max-width:none;width:100%;height:100%;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:8px;align-items:stretch}
 :root body.immersive .game :is(.board,aside){display:contents}
 .immersive .game :is(.tools,.secret,.more,.progress,.pan-note,#answer,.cell small){display:none!important}
 :root body.immersive .game .bar{grid-area:1/1;margin:0;align-self:center}
 :root body.immersive .game .commands{grid-area:2/1;margin:0;padding-inline:10px}
 .immersive .game #fitAll{display:flex;background:#ece5ff;color:#4e3299;padding-inline:12px}
 .immersive .game .scrollgrid{grid-area:3/1;min-width:0;scrollbar-gutter:stable both-edges;scrollbar-width:thin}
 :root body.immersive .game .clue{grid-area:4/1;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:16px;position:static;padding:8px 16px;border-radius:14px;box-shadow:0 2px var(--ink)}
 .immersive .game .clue .row{display:contents}
 .immersive .game .kicker{grid-column:1}
 .immersive .game .switch{grid-area:1/4}
 :root body.immersive .game #question{grid-area:1/2;font-size:clamp(1.25rem,1.6vw,1.7rem);line-height:1.12;margin:0}
 :root body.immersive.readable .game #question{font-size:clamp(1.55rem,1.9vw,2.2rem)}
 .immersive .game #letters{grid-area:1/3;margin:0}
 .immersive .game .keys{grid-area:5/1;width:min(100%,610px);margin:auto}
 .immersive .keys.enabled{display:grid}
 .immersive .keys button{height:clamp(28px,4.5dvh,42px)}
 .immersive .game #grid .cell{font-size:clamp(15px,4.4cqw,90px)}
 .immersive .game #grid.giant .cell{font-size:clamp(14px,3cqw,72px)}
 .immersive .game #grid.small .cell{font-size:clamp(16px,6cqw,104px)}
 .immersive #grid{--arrow-size:clamp(9px,1.5cqw,29px)}
 .immersive #grid.giant{--arrow-size:clamp(8px,1.1cqw,23px)}
 .immersive #grid.small{--arrow-size:clamp(10px,2cqw,35px)}
 .immersive #grid .def:not(.twin-down) .arr{width:var(--arrow-size);height:var(--arrow-size);color:#514170}
 .immersive #grid .def:not(.twin-down) .arr:is(.r,.rd){right:calc(-1 * var(--arrow-size));top:calc(50% - var(--arrow-size) / 2)}
 .immersive #grid .def:not(.twin-down) .arr:is(.d,.dr){bottom:calc(-1 * var(--arrow-size));left:calc(50% - var(--arrow-size) / 2)}
 .immersive #grid .def:not(.twin-down) .selected .arr{color:#59138d}
 .immersive #toast{bottom:84px}
}
@media screen and (min-width:1200px){
 :root body.immersive .game .play{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;column-gap:14px}
 :root body.immersive .game .bar{grid-area:1/1;gap:16px}
 :root body.immersive .game .commands{grid-area:1/2}
 :root body.immersive .game .scrollgrid{grid-area:2/1/3/-1}
 :root body.immersive .game .clue{grid-area:3/1/4/-1}
 :root body.immersive .game .keys{grid-area:4/1/5/-1}
}
@media screen and (min-width:1200px) and (max-width:1350px){
 .immersive .game #expand span,.immersive .game #listbtn span{display:none}
}
@media screen and (min-width:801px) and (max-height:540px){
 :root body.immersive .game .play{gap:4px}
 :root body.immersive .game .clue{padding:4px 10px}
 .immersive .game .keys button{height:25px}
}

/* La sortie reste dans la barre fixe, indépendamment du zoom de la grille. */
#exitFull[hidden],#expand[hidden]{display:none!important}
@media screen {
 :root body.immersive .game{
   padding-top:max(7px,env(safe-area-inset-top,0px));
   padding-left:max(9px,env(safe-area-inset-left,0px));
   padding-right:max(9px,env(safe-area-inset-right,0px));
   padding-bottom:max(8px,env(safe-area-inset-bottom,0px))
 }
 :root body.immersive .game .bar{min-width:0;flex-shrink:0}
 #exitFull{display:inline-flex;align-items:center;justify-content:center;flex:none;gap:7px;padding:0 14px;min-height:44px;white-space:nowrap;font-weight:900;font-size:1rem;line-height:1.15;color:#fff;background:#5130ad;border:2px solid #2d1c4c;border-radius:12px;box-shadow:0 2px 0 #2d1c4c;touch-action:manipulation;cursor:pointer}
 #exitFull .ico{width:20px;height:20px;flex:none}
 #exitFull:hover,#exitFull:active{background:#392079;color:white}
 #exitFull:focus-visible{outline:3px solid #b4276b;outline-offset:2px}
}
@media screen and (min-width:1200px){
 :root body.immersive .game .play{grid-template-columns:auto auto minmax(0,1fr) auto;column-gap:14px}
 :root body.immersive .game .bar{display:contents}
 :root body.immersive .game .bar .levels{grid-area:1/1;align-self:center}
 :root body.immersive .game .bar .timer{grid-area:1/2;align-self:center}
 :root body.immersive .game .commands{grid-area:1/3;min-width:0}
 #exitFull{grid-area:1/4;align-self:center;justify-self:end}
}
@media screen and (max-width:700px),screen and (min-width:1200px) and (max-width:1399px){
 #exitFull .exitdetail{display:none}
 #exitFull{padding-inline:10px;gap:4px;font-size:.96rem}
}
@media screen and (max-width:480px){
 :root body.immersive .game .bar{gap:3px}
 :root body.immersive .bar .levels b{display:none}
 #exitFull{padding-inline:8px;gap:3px;font-size:.92rem}
 #exitFull .ico{width:17px;height:17px}
}
@media screen and (max-width:370px){
 :root body.immersive .game .bar .levels a span{display:none}
 :root body.immersive .game .bar .levels a{min-width:26px;padding-inline:3px}
 #exitFull{padding-inline:6px}
}
@media screen and (max-width:1024px) and (max-height:510px){
 :root body.immersive .game .play{display:grid!important;grid-template-columns:minmax(195px,37%) minmax(0,1fr)!important;grid-template-rows:auto auto auto minmax(0,1fr);gap:6px!important}
 :root body.immersive .game .bar{grid-area:1/1/2/-1}
 :root body.immersive .game .commands{grid-area:2/2}
 :root body.immersive .game .clue{grid-area:2/1/4/2;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto;gap:4px;padding:6px 8px}
 :root body.immersive .game .clue .row{display:contents}
 :root body.immersive .game .clue :is(.kicker,#letters,#answer){display:none}
 :root body.immersive .game .clue #question{font-size:1.06rem;grid-area:1/1;line-height:1.1;margin:0}
 :root body.immersive .game .clue .switch{grid-area:1/2;flex-direction:column;gap:3px}
 :root body.immersive .game .scrollgrid{grid-area:3/2/5/3;min-height:0;height:100%}
 :root body.immersive .game .keys{grid-area:4/1;align-self:end;max-width:100%;gap:3px;padding:3px;margin:0}
 :root body.immersive .game .keys button{height:clamp(26px,8.7dvh,38px);font-size:.86rem;min-width:0}
 :root body.immersive .commands #listbtn span{display:none}
 :root body.immersive .commands #fitAll{display:none}
}


/* À 100 %, montrer la grille du jour en entier, clavier compris. */
@media screen{
 :root body:not(.immersive) .game .scrollgrid{width:var(--frame-w,100%);max-width:100%;margin-inline:auto;min-width:0}
 :root body:not(.immersive) .game #grid:not(:empty){min-width:0;height:var(--board-h,auto);grid-template-rows:repeat(var(--rows),minmax(0,1fr));margin-inline:auto}
 :root body:not(.immersive) .game #grid:not(:empty)>*{aspect-ratio:auto;min-height:0}
 :root body:not(.immersive) .game #grid .cell{font-size:var(--glyph,1.5rem)}
 :root body:not(.immersive) .game #grid .cell small{font-size:clamp(7px,calc(var(--glyph,24px) * .38),14px);top:1px;right:2px}
 :root body:not(.immersive) #grid .def button span{inset:1px 1.5px}
 :root body:not(.immersive) #grid .def:not(.twin-down) .arr{width:var(--pointer);height:var(--pointer)}
 :root body:not(.immersive) #grid .def:not(.twin-down) .arr:is(.r,.rd){right:calc(0px - var(--pointer));top:calc(50% - var(--pointer)/2)}
 :root body:not(.immersive) #grid .def:not(.twin-down) .arr:is(.d,.dr){bottom:calc(0px - var(--pointer));left:calc(50% - var(--pointer)/2)}
 :root body:not(.immersive) .game .pan-note{display:none}
 :root body:not(.immersive) .game .play.short-page .keys{position:static}
 :root body:not(.immersive) .game .progress{margin:0 auto;width:min(100%,760px)}
}
@media screen and (min-width:801px){
 body:has(main.game) .headin{height:clamp(52px,6.1dvh,70px)}
 :root body:not(.immersive) .game .intro{margin:clamp(8px,1.2dvh,18px) 0;gap:10px}
 :root body:not(.immersive) .game .heading{display:flex;align-items:center;flex-wrap:wrap;gap:4px 18px}
 :root body:not(.immersive) .game .issue{margin:0}
 :root body:not(.immersive) .game .intro h1{font-size:clamp(1.55rem,2.18vw,2.15rem)}
 :root body:not(.immersive) .game .actions button{min-height:39px;white-space:nowrap}
 :root body.flatview:not(.immersive) .game .play{gap:clamp(7px,1dvh,12px)}
 :root body.flatview:not(.immersive) .game .clue{padding:6px 13px;gap:1px 14px;grid-template-columns:clamp(98px,14dvh,166px) minmax(0,1fr) minmax(215px,32%) auto}
 :root body.flatview:not(.immersive) .game .clue .scene{max-height:62px}
 :root body.flatview:not(.immersive) .game #answer button{max-width:40px;padding:0}
 :root body.flatview:not(.immersive) .game #question{font-size:clamp(1.25rem,2.5dvh,1.58rem)}
 :root body.flatview.readable:not(.immersive) .game #question{font-size:1.84rem}
 :root body.flatview:not(.immersive) .game .commands{min-height:48px;padding-block:3px}
 :root body.flatview:not(.immersive) .game .clue{top:50px}
 :root body.flatview:not(.immersive) .game .progress{margin-top:5px}
}
@media screen and (min-width:1151px){
 :root body[data-page].flatview:not(.immersive) main.game{width:min(1160px,95%);max-width:1160px}
 :root body.flatview:not(.immersive) .game .play{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;column-gap:12px}
 :root body.flatview:not(.immersive) .game .bar{display:contents}
 :root body.flatview:not(.immersive) .game .bar .levels{grid-area:1/1;gap:5px}
 :root body.flatview:not(.immersive) .game .bar .levels a:not(:first-child) span{display:none}
 :root body.flatview:not(.immersive) .game .bar .levels :is(a,b){min-width:36px;padding-inline:8px}
 :root body.flatview:not(.immersive) .game .bar .timer{grid-area:1/3}
 :root body.flatview:not(.immersive) .game #expand{grid-area:1/4}
 :root body.flatview:not(.immersive) .game .commands{grid-area:1/2;align-self:start}
 :root body.flatview:not(.immersive) .game .commands button{padding-inline:7px;min-width:35px;gap:4px;font-size:.91rem}
 :root body.flatview:not(.immersive) .game .commands i{display:none}
 :root body.flatview:not(.immersive) .game :is(.clue,.keys,.scrollgrid,.progress,.secret,.more){grid-column:1/-1;min-width:0}
 :root body.flatview:not(.immersive) .game .keys{justify-self:center}
}
@media screen and (min-width:1151px){
 :root body.flatview:not(.immersive) .game .commands button{white-space:nowrap}
 :root body.flatview:not(.immersive) .game .commands #panelMode span{display:none}
 :root body.flatview:not(.immersive) .game .commands #listbtn span{display:none}
 :root body.flatview:not(.immersive) .game .bar .levels:has(b) a span{display:none}
 :root body.flatview:not(.immersive) .game .commands #panelMode{min-width:39px}
 body:has(main.game) .headin{width:min(1160px,95%)}
}
@media screen and (min-width:1250px){
 :root body.flatview:not(.immersive) .game .commands #listbtn span{display:inline}
}
@media screen and (max-width:800px){
 :root body:not(.immersive) .game .intro{margin:7px 0 9px;gap:5px}
 :root body:not(.immersive) .game .play{gap:6px}
 :root body:not(.immersive) .game .clue{padding:5px 9px}
 :root body:not(.immersive) .game .keys{padding-block:5px max(5px,env(safe-area-inset-bottom));gap:4px}
 :root body:not(.immersive) .game .keys button{height:clamp(31px,4.55dvh,40px)}
 :root body:not(.immersive) .game .scrollgrid{padding:3px}
 :root body:has(main.game) .headin{gap:0 4px;padding-top:3px}
 :root body:has(main.game) .headin nav{height:35px}
 :root body:not(.immersive) .game .clue #question{font-size:1.1rem;line-height:1.06}
 :root body.readable:not(.immersive) .game .clue #question{font-size:1.4rem}
}
@media screen and (max-width:660px) and (max-height:770px){
 :root body:not(.immersive) .game .intro{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 4px;margin:5px 0 7px}
 :root body:not(.immersive) .game .heading{display:contents}
 :root body:not(.immersive) .game .intro h1{grid-area:1/1;font-size:clamp(1.15rem,5.5vw,1.5rem)}
 :root body:not(.immersive) .game .intro .issue{grid-area:2/1/3/-1;margin:0}
 :root body:not(.immersive) .game .intro .actions{grid-area:1/2;width:auto;gap:7px}
 :root body:not(.immersive) .game .intro .actions :is(#choose,#shuffle){min-width:36px;min-height:32px;font-size:0;gap:0;padding:0 7px;border-radius:10px}
 :root body:not(.immersive) .game .intro .actions button .ico{width:18px;height:18px}
 :root body:not(.immersive) .game .play{gap:5px}
}
@media screen and (max-width:800px) and (max-height:700px){
 :root body:not(.immersive) .game .clue{grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto;gap:6px;min-height:43px;padding:3px 6px}
 :root body:not(.immersive) .game .clue .kicker{grid-area:1/1}
 :root body:not(.immersive) .game .clue #axis{display:none}
 :root body:not(.immersive) .game .clue #question{grid-area:1/2;margin:0;font-size:1rem}
 :root body:not(.immersive) .game .clue .switch{grid-area:1/3;gap:4px}
 :root body:not(.immersive) .game .clue #letters{display:none}
}
/* Téléphone à l’horizontale. La colonne de gauche contient les commandes et le clavier. */
@media screen and (min-width:560px) and (max-width:1024px) and (max-height:510px){
 :root body:has(.game) :is(.headin,main.game){width:96%;max-width:1000px}
 :root body:has(.game) .headin{height:43px;flex-wrap:nowrap;gap:9px;padding:0}
 :root body:has(.game) .headin .brand{font-size:1.1rem}
 :root body:has(.game) .headin .brand .sign{width:29px;height:29px;margin-right:3px}
 :root body:has(.game) .headin nav{order:0;width:auto;flex:1;gap:3px;height:100%;justify-content:space-evenly}
 :root body:has(.game) .headin nav a{font-size:clamp(.68rem,1.56vw,.86rem)}
 :root body:has(.game) .headin nav span{display:none}
 :root body:has(.game) .headin .utility button{width:30px;height:32px}
 :root body:not(.immersive) .game .intro{display:flex;flex-wrap:nowrap;margin:5px 0 7px;gap:6px}
 :root body:not(.immersive) .game .heading{display:flex;align-items:center;gap:4px 10px;flex-wrap:wrap}
 :root body:not(.immersive) .game .intro h1{font-size:1.15rem}
 :root body:not(.immersive) .game .issue{font-size:.77rem;margin:0;gap:5px}
 :root body:not(.immersive) .game .intro .actions{width:auto;gap:6px}
 :root body:not(.immersive) .game .intro .actions :is(#choose,#shuffle){min-height:31px;min-width:35px;padding:0 5px;gap:0;font-size:0;border-radius:9px}
 :root body.flatview:not(.immersive) .game .play{--split:1;display:grid;grid-template-columns:clamp(245px,41%,360px) minmax(0,1fr);gap:6px 10px;align-items:start}
 :root body.flatview:not(.immersive) .game .bar{grid-area:1/1;gap:3px;width:100%;margin:0}
 :root body.flatview:not(.immersive) .game .bar :is(#expand span,.timer>.ico,.levels b,.levels a span){display:none}
 :root body.flatview:not(.immersive) .game .bar .levels a{min-width:26px;min-height:30px;padding:2px 5px}
 :root body.flatview:not(.immersive) .game .bar .timer{font-size:.8rem;gap:1px}
 :root body.flatview:not(.immersive) .game .commands{grid-area:2/1;gap:0;min-height:35px;padding:2px;position:static}
 :root body.flatview:not(.immersive) .game .commands :is(#panelMode,#listbtn span,i){display:none}
 :root body.flatview:not(.immersive) .game .commands button{min-width:0;min-height:28px;padding:0 2px;flex:1;font-size:.71rem}
 :root body.flatview:not(.immersive) .game .commands .ico{width:17px;height:17px}
 :root body.flatview:not(.immersive) .game .commands #percentZoom{flex:1.65}
 :root body.flatview:not(.immersive) .game .commands :is(#quickhint,#quickcheck,#quickclear){border:none;box-shadow:none;margin:0}
 :root body.flatview:not(.immersive) .game .commands :is(#quickhint,#quickcheck,#quickclear)::after{content:none}
 :root body.flatview:not(.immersive) .game .clue{grid-area:3/1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;position:static;padding:5px 7px;width:100%}
 :root body.flatview:not(.immersive) .game .clue :is(.scene,#answer,#letters,.kicker){display:none}
 :root body.flatview:not(.immersive) .game .clue #question{grid-area:1/1;margin:0;font-size:1rem}
 :root body.flatview:not(.immersive) .game .clue .switch{grid-area:1/2;gap:3px}
 :root body.flatview:not(.immersive) .game .clue .switch button{width:31px;height:32px}
 :root body.flatview:not(.immersive) .game .keys{grid-area:4/1;position:static;display:grid;gap:4px;margin:0;padding:3px;align-self:start;width:100%}
 :root body.flatview:not(.immersive) .game .keys button{font-size:.84rem;height:clamp(25px,8dvh,35px)}
 :root body.flatview:not(.immersive) .game .scrollgrid{grid-area:1/2/5/3;max-height:var(--frame-h);align-self:start;padding:3px}
 :root body.flatview:not(.immersive) .game :is(.progress,.secret,.more){grid-column:1/-1}
}
