*{box-sizing:border-box}body{color:#e5f3ff;text-align:center;background:#101827;margin:0;font-family:system-ui}body.playing{touch-action:none;overflow:hidden}main{max-width:460px;margin:auto;padding:8px}h1{margin:4px;font-size:24px}p{margin:7px;font-size:12px}[hidden]{display:none!important}button{color:#102532;cursor:pointer;background:#64e4cc;border:0;border-radius:12px;min-width:44px;min-height:44px;padding:10px 24px;font-weight:700}button:focus-visible{outline-offset:3px;outline:3px solid #fff}button:disabled{color:#d9e0e8;background:#526174}#play>button{padding:10px 14px}canvas{touch-action:none;max-width:100%;margin:auto;display:block}#game{width:100%;height:min(640px,100svh - 265px);margin:auto}#play-area{touch-action:none;position:relative}.panel{z-index:2;background:#172d44f5;border:2px solid #64e4cc;border-radius:16px;width:min(320px,88%);max-height:90%;padding:12px;position:absolute;top:50%;left:50%;overflow:auto;transform:translate(-50%,-50%)}.panel h2{font-size:20px}.panel button{margin:4px;padding:10px}#level-list{grid-template-columns:1fr 1fr;display:grid}#level-list button{font-size:12px}#level-select{width:84%;max-height:90%}#touch-controls{touch-action:none;justify-content:center;gap:8px;margin-top:4px;display:none}@media (pointer:coarse){#touch-controls{display:flex}#game{height:min(640px,100svh - 315px)}}body.touch #touch-controls{display:flex}body.touch #game{height:min(640px,100svh - 315px)}.game-card{text-align:left;flex-direction:column;align-items:stretch;gap:10px;width:100%;margin:24px 0;padding:8px;line-height:1.8;display:flex}#topbar{grid-template-columns:44px minmax(0,1fr) auto 44px;align-items:center;gap:4px;height:48px;display:grid}#topbar button{padding:0;font-size:22px}#topbar #sound{grid-column:4}#topbar #pause{padding:0 8px;font-size:14px}#topbar h1{white-space:nowrap;font-size:22px}body.playing main{height:100svh}#game,body.touch #game{height:min(640px,100svh - 220px)}@media (pointer:coarse){#game{height:min(640px,100svh - 220px)}}.sr-only{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.sound-icon:before{content:"♫"}.joystick{touch-action:none;background:radial-gradient(circle,#64e4cc 0 15%,#172d44 16%);border:3px solid #64e4cc;border-radius:50%}#touch-controls{justify-content:space-between}.touch-slot{flex:1;align-items:center;gap:4px;display:flex}.touch-slot.center{justify-content:center}.touch-slot.right{justify-content:flex-end}#touch-help{display:none}@media (pointer:coarse){#keyboard-help{display:none}#touch-help{display:inline}}body.touch #keyboard-help{display:none}body.touch #touch-help{display:inline}#game-help{margin:4px 0;line-height:16px}#pause-panel{z-index:4}#game-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.game-thumbnail{touch-action:auto;border-radius:6px;width:160px;height:120px}.card-content{overflow-wrap:anywhere;min-width:0}.game-card{margin:0}.card-content{gap:6px;display:grid}.card-content strong{font-size:20px;line-height:1.2}.card-content small{font-size:12px;font-weight:400;line-height:1.5}@media (width>=600px){body:not(.playing) main{max-width:960px}#game-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}body.serpentin #touch-controls{justify-content:center;gap:4px}body.serpentin .touch-slot{flex:0}body.serpentin .touch-slot.center{flex-direction:column}body.serpentin #touch-controls button{width:56px;height:56px;padding:0;font-size:24px}@media (pointer:coarse){body.serpentin #game{height:min(640px,100svh - 290px)}}body.serpentin.touch #game{height:min(640px,100svh - 290px)}body.empilo #touch-controls{gap:4px;display:flex}body.empilo .touch-slot{flex:0;gap:4px}body.empilo #touch-controls button{width:56px;height:56px;padding:0;font-size:25px}body.empilo #game{height:min(640px,100svh - 230px)}body.orbite #touch-controls{align-items:center;display:flex}body.orbite #touch-controls button{padding:0;font-size:22px}body.orbite #game{height:min(640px,100svh - 240px)}body.orbite .orbite-options{cursor:pointer;touch-action:none;justify-content:center;align-items:center;gap:4px;min-width:44px;min-height:44px;font-size:13px;display:flex}body.orbite .orbite-options input{accent-color:#78ead5;width:22px;height:22px}body.essaim #touch-controls{align-items:center;display:flex}body.essaim #touch-controls button{padding:0;font-size:22px}body.essaim #game{height:min(640px,100svh - 272px)}body.essaim .essaim-options{cursor:pointer;touch-action:none;justify-content:center;align-items:center;gap:4px;min-width:44px;min-height:44px;font-size:13px;display:flex}body.essaim .essaim-options input{accent-color:#78ead5;width:22px;height:22px}body.dedale #touch-controls{justify-content:center;gap:4px;display:flex}body.dedale .touch-slot{flex:0}body.dedale .touch-slot.center{flex-direction:column}body.dedale #touch-controls button{width:56px;height:56px;padding:0;font-size:24px}body.dedale #game{height:min(640px,100svh - 290px)}body.ferraille #touch-controls{align-items:center;min-height:124px;display:flex}body.ferraille #touch-controls button{width:64px;height:64px;padding:0;font-size:18px}body.ferraille .touch-slot.center{flex:0}body.ferraille .touch-slot.right{flex:0;gap:8px}body.ferraille #game{height:min(640px,100svh - 300px)}body{padding-left:max(16px, env(safe-area-inset-left));padding-right:max(16px, env(safe-area-inset-right))}@media (pointer:coarse),(width<600px){body.playing main{max-width:none;height:100dvh;padding:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);flex-direction:column;display:flex}body.playing #topbar{flex:0 0 44px;grid-template-columns:44px minmax(0,1fr) auto 44px 44px;gap:0;height:44px}body.playing #topbar h1{text-overflow:ellipsis;font-size:18px;overflow:hidden}body.playing #topbar #pause{width:44px;padding:0;font-size:20px}body.playing #topbar #sound{grid-column:4}body.playing #game-menu-toggle{grid-column:5}body.playing #play{flex-direction:column;flex:1;min-height:0;display:flex}body.playing #play-area{flex:1;min-height:0;overflow:hidden}body.playing #game,body.playing.touch #game{width:100%;height:100%;position:absolute;inset:0}body.playing #touch-controls{flex:0 0 64px;justify-content:space-between;align-items:center;gap:4px;height:64px;min-height:64px;margin:0;display:flex}body.playing #touch-controls .touch-slot{flex-direction:row;flex:0 auto;gap:4px}body.playing #touch-controls button{width:56px;height:56px;padding:0;font-size:16px;min-width:56px!important;min-height:56px!important}body.playing #touch-controls button[aria-label=Tirer]{width:64px;height:64px}body.playing #touch-controls .orbite-options,body.playing #touch-controls .essaim-options{min-width:56px;min-height:56px;font-size:11px}body.playing #game-menu{display:none}body.playing.menu-open #game-menu{left:max(16px, env(safe-area-inset-left));right:max(16px, env(safe-area-inset-right));bottom:env(safe-area-inset-bottom);z-index:5;background:#172d44fa;border:2px solid #64e4cc;border-radius:12px;grid-template-columns:1fr 1fr;gap:4px;padding:8px 0 0;display:grid;position:fixed}body.playing #game-menu #status,body.playing #game-menu #game-help{order:-1;grid-column:1/-1}body.playing #game-menu button{height:56px}body.playing.ferraille #touch-controls{flex-basis:120px;height:120px;min-height:120px}body.playing.ferraille #touch-controls button{width:64px;height:64px}body.playing #orbite-fire,body.playing #essaim-fire{width:64px!important;height:64px!important}}@media (width<380px){body.playing.empilo #empilo-counterclockwise{display:none}}.mobile-pause{display:none}@media (pointer:coarse),(width<600px){.desktop-pause{display:none}.mobile-pause{display:inline}}#play-area,#touch-controls,#topbar button,#game-menu button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}#pwa-update{bottom:max(8px, env(safe-area-inset-bottom));z-index:100;color:#fff;pointer-events:auto;background:#101827;border-radius:8px;max-width:36rem;margin:0 auto;padding:8px 12px;font-size:.8rem;position:fixed;left:16px;right:16px}body.alunir #touch-controls .touch-slot.left{gap:4px}body.alunir #touch-controls #alunir-thrust{padding:0;font-size:16px;width:76px!important;min-width:64px!important;height:64px!important;min-height:64px!important}body.caisses #touch-controls{justify-content:center;gap:4px}body.caisses #touch-controls .touch-slot{flex:0;gap:4px}body.caisses #touch-controls button{width:56px;height:56px;padding:0}body.caisses #touch-controls .touch-slot:empty{display:none}body.caisses #restart,body.caisses #replay-level{min-width:56px;min-height:56px}body.traverse #touch-controls{justify-content:center;gap:4px}body.traverse #touch-controls .touch-slot{flex-direction:row;flex:0;gap:4px}body.traverse #touch-controls button{width:56px;height:56px;padding:0}body.derapage #touch-controls{justify-content:center;gap:4px}body.derapage #touch-controls .touch-slot{flex-direction:row;flex:0;gap:4px}body.playing.derapage #touch-controls button{width:64px;height:64px;padding:0;font-size:16px;min-width:64px!important;min-height:64px!important}body.playing.derapage #touch-controls{flex-basis:152px;justify-content:space-between;height:152px;min-height:152px}body.derapage #touch-controls .touch-slot.right{flex-direction:column-reverse;align-items:flex-end}body.playing.derapage #touch-controls #derapage-drift{width:88px;height:88px;min-width:88px!important;min-height:88px!important}body.playing.derapage #touch-controls #derapage-bonus{width:56px;height:56px;min-width:56px!important;min-height:56px!important}#derapage-steering{color:#c9f8ed;width:160px;min-height:48px;font-size:14px;display:block}#character-toggle{align-items:center;gap:4px;min-height:48px;font-size:.85rem;display:inline-flex}#character-toggle[hidden]{display:none}#characters-panel{color:#fff6e7;box-sizing:border-box;background:#192337;border:2px solid #aab7d2;border-radius:24px;width:min(1050px,100vw - 32px);max-height:88dvh;padding:20px;overflow:auto}#characters-panel::backdrop{background:#0a0e1acc}#characters-panel h2{margin-top:0}#characters-panel button,#characters-panel summary{touch-action:manipulation;min-width:48px;min-height:48px}.character-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:16px;display:grid}.character-grid article{text-align:center;border-bottom:5px solid var(--character-accent);background:#26334a;border-radius:20px;padding:8px}.character-grid canvas{max-width:100%;margin:auto;display:block}.character-grid h3{margin:4px 0 12px;font-size:1rem}.character-grid button{width:100%}.character-grid button[aria-pressed=true]{color:#322c39;background:#fff0c8}#characters-panel :focus-visible,#character-toggle:focus-visible{outline-offset:4px;outline:3px solid #ffe28c}.character-sheet{background:#26334a;flex-wrap:wrap;gap:6px;margin:12px 0;padding:8px;display:flex}.character-sheet figure{text-align:center;margin:0}#character-review{margin-top:24px}@media (width<=480px){#character-toggle{padding:2px 5px}#character-toggle span{font-size:.7rem}#characters-panel{padding:12px}.character-grid{grid-template-columns:1fr}}body:not(.playing) #topbar{grid-template-columns:48px minmax(0,1fr) auto 48px;height:56px}#topbar #character-toggle{grid-column:3;padding:0 8px;font-size:.85rem}body:not(.playing) #topbar h1{font-size:clamp(16px,4vw,22px)}body:not(.playing) #topbar>button{min-width:48px;min-height:48px}#characters-panel canvas{touch-action:pan-y}@media (width<=480px){#topbar #character-toggle{padding:0 4px}#character-toggle{flex-direction:column;gap:0}#character-toggle canvas{width:32px!important;height:32px!important}}.character-grid canvas{aspect-ratio:1;height:auto!important}.character-sheet canvas{max-width:none}#characters-panel p{font-size:14px;line-height:1.5}[data-build]{opacity:.65;font-size:.75rem}#home footer{text-align:center;margin-top:24px}#home-menu summary{cursor:pointer}body.playing #game-menu [data-build]{order:-2;grid-column:1/-1}#game-menu>[data-build]{display:none}body.playing.menu-open #game-menu>[data-build]{display:block}body.playing.bubble #touch-controls,body.playing.bubble #touch-controls .touch-slot{gap:2px}body.serpentin #touch-controls #serpentin-special,body.empilo #touch-controls #empilo-special{letter-spacing:-.06em;font-size:16px}#game-menu .compact-menu-control{min-width:56px;min-height:56px;font-size:16px}body.empilo #empilo-counterclockwise{display:none}body.dedale #touch-controls #dedale-special,body.orbite #touch-controls #orbite-special{letter-spacing:-.06em;font-size:16px}body.ferraille #touch-controls #ferraille-special,#touch-controls #briqueterie-special,body.essaim #touch-controls #essaim-special{letter-spacing:-.06em;width:56px;padding:2px;font-size:16px}body.ferraille .touch-slot.right{gap:4px}body.essaim .touch-slot{flex-flow:row}@media (pointer:coarse),(width<600px){body.playing.essaim #touch-controls{flex-basis:64px;height:64px;min-height:64px}body.playing.essaim #touch-controls .center{display:none}}@media (orientation:landscape) and (pointer:coarse){body.playing.essaim main{max-width:none}body.playing.essaim #play{position:relative}body.playing.essaim #play-area{margin:0 124px}body.playing.essaim #touch-controls{pointer-events:none;height:100%;min-height:0;position:absolute;inset:0}body.playing.essaim #touch-controls .touch-slot{pointer-events:auto;width:120px;position:absolute;bottom:8px}body.playing.essaim #touch-controls .left{left:0}body.playing.essaim #touch-controls .right{right:0}body.playing.essaim #touch-controls button{width:56px!important;min-width:56px!important;height:56px!important;min-height:56px!important}}.card-content strong{min-height:2.4em;max-height:2.4em;overflow:hidden}body.pepites #touch-controls{justify-content:space-between;gap:4px}body.pepites #touch-controls button{width:56px;height:56px;padding:0;font-size:16px}body.gourmandises #touch-controls{justify-content:center;gap:4px;display:flex}body.gourmandises #touch-controls .touch-slot:empty{display:none}body.gourmandises #touch-controls .touch-slot.center{flex-direction:row;flex:none;gap:8px}body.gourmandises #touch-controls button{width:56px;height:56px;padding:0;font-size:16px}body.gourmandises #touch-controls button[aria-pressed=true]{background:#626337;outline:3px solid #fff1a5}body.gourmandises #touch-controls button{background:linear-gradient(#60e9ff,#167cce);border:3px solid #d7fbff;border-radius:50%;width:64px;height:64px;position:relative;box-shadow:0 4px #194987,0 5px 12px #162b4c66}body.gourmandises #touch-controls button canvas{width:100%;height:100%;display:block}body.gourmandises .tool-count{color:#fff;background:#fa4598;border:2px solid #fff;border-radius:50%;min-width:24px;height:24px;font:700 16px/20px system-ui;position:absolute;bottom:0;right:0}body.gourmandises #touch-controls button:disabled{filter:grayscale();opacity:.55}body.gourmandises #touch-controls button[aria-pressed=true]{background:linear-gradient(#fff6a0,#ffbc42);box-shadow:0 0 18px #fff99d}body.artificiers #touch-controls{justify-content:space-between;gap:4px;display:flex}body.artificiers #touch-controls .touch-slot{flex:none;gap:4px}body.artificiers #touch-controls button{width:56px;height:56px;padding:0;font-size:14px}
