/* Lot 15 : preserve the approved scenes, keep tools accessible on phones. */
html #app .ghead .grules{flex:none;width:34px;min-width:34px;height:34px;font:700 19px/1 system-ui;color:inherit;border:1px solid currentColor;border-radius:50%;background:transparent}
html #app .vs .g15-record{max-width:100px;font:600 10px/1.2 system-ui;white-space:normal;text-align:center;color:inherit}
.g15-global{font-size:14px;color:var(--muted)}
html #app #v-play[data-game=wmyst] .wm-grid{width:100%;max-width:calc(var(--wm-len,5) * 42px + 28px);margin-inline:auto}
html #app #v-play[data-game=wmyst] .wm-row{display:grid!important;width:100%;grid-template-columns:repeat(var(--wm-len,5),minmax(0,1fr))!important}
html #app #v-play[data-game=wmyst] .wm-mrow{grid-template-columns:repeat(var(--wm-len,5),minmax(0,1fr))!important}
html #app #v-play[data-game=wmyst] .wm-c{width:100%!important;height:auto!important;aspect-ratio:1;min-width:0;font-size:clamp(14px,5vw,27px)!important}
html #app #v-play .g15-clock{font:700 18px/1.2 system-ui;text-align:center;margin:3px 0;color:var(--scene-ink)}
html #app #v-play .g15-draw .dr-canvas{display:block;width:min(100%,max(100px,calc(var(--play-h,500px) - 230px)),330px)!important;max-width:100%;height:auto!important;aspect-ratio:1;touch-action:none;margin:3px auto}
html #app #v-play .g15-draw .dr-tools{display:flex!important;flex-wrap:wrap!important;justify-content:center;align-items:center;gap:4px!important;margin:4px 0!important}
html #app #v-play .g15-draw .dr-pal{display:flex;justify-content:center;flex:1 0 100%;gap:6px}
html #app #v-play .g15-draw .dr-c{width:32px;min-width:32px;height:32px;min-height:32px}
html #app #v-play .g15-draw .dr-c.er{width:62px;color:#222;font:600 11px system-ui}
html #app #v-play .g15-draw .dr-wd{display:flex!important;gap:3px}
html #app #v-play .g15-draw .dr-w{min-width:32px;min-height:32px;width:32px;height:32px}
html #app #v-play .g15-draw .mini{min-height:32px;padding:4px 9px}
html #app #v-play .g15-draw .dr-word{font-size:18px!important;margin:3px 0!important}
html #app #v-play .g15-draw.g15-guess .dr-canvas{width:min(100%,max(100px,calc(var(--play-h,500px) - 280px)),330px)!important}
html #app #v-play .g15-guess .g4-in{min-height:40px;padding-block:8px}
html #app #v-play .g15-draw .dr-dot{background:#185b50!important}
html #app #v-play[data-game=draw] .wy-skip{color:#174a44!important;background:#fff8e9!important;border-color:#a98d58!important}
html #app #v-play[data-palette=light] .g15-record{color:#19453b!important}
html #app #v-play .g15-spelling{display:block;font:12px/1.3 system-ui;text-align:center;margin:3px 0;opacity:.88}
.g15-votes{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.g15-votes small{flex:1 0 100%}.g15-votes .mini{min-height:36px;font-size:12px}
html #app #v-play[data-game=draw] .g15-draw .g7-go{min-height:40px;padding-block:8px;margin:3px auto}

/* Bataille navale — placement : grille pleine largeur, bateaux glissés sur la carte, bouton pour pivoter */
html #app #v-play[data-game=battle] .bt-grid.setup,html #app #v-play[data-fit][data-game=battle][data-phase] .bt-grid.setup{width:min(100%,max(270px,calc(var(--play-h,480px) - 30px)))!important;max-width:520px!important;margin-inline:auto;flex:none;touch-action:none}
html #app #v-play[data-game=battle] .bt-grid.setup .bt-c{pointer-events:none}
html #app #v-play[data-game=battle] .bt-lay{position:absolute;left:var(--ax,15px);top:var(--ax,15px);right:0;bottom:0;z-index:4;pointer-events:none}
html #app #v-play[data-game=battle] .bt-sv{position:absolute;box-sizing:border-box;pointer-events:auto;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;transition:left .12s ease,top .12s ease,width .12s ease,height .12s ease;outline:none;filter:drop-shadow(0 2px 2px #04121a99)}
html #app #v-play[data-game=battle] .bt-sv img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;-webkit-user-drag:none}
html #app #v-play[data-game=battle] .bt-sv.sel{filter:drop-shadow(0 0 3px #ffe29a) drop-shadow(0 0 7px #ffd06a99);z-index:2}
html #app #v-play[data-game=battle] .bt-sv.drag{transition:none;cursor:grabbing;z-index:5;opacity:.92}
html #app #v-play[data-game=battle] .bt-sv:focus-visible{outline:2px solid #ffe29a;outline-offset:1px}
html #app #v-play[data-game=battle] .bt-gh{position:absolute;box-sizing:border-box;border:2px dashed #8cf0b0;background:#58e08a33;border-radius:4px;pointer-events:none;z-index:1}
html #app #v-play[data-game=battle] .bt-gh.bad{border-color:#ff8f7a;background:#ff5a4033}
html #app #v-play[data-game=battle] .bt-tools{display:flex;gap:8px;justify-content:center}
html #app #v-play[data-game=battle] .bt-tools .g7-go{flex:1;max-width:200px}
html #app #v-play[data-game=battle] .bt-sethint{text-align:center;min-height:2.6em}
/* bateaux : ils occupent exactement leurs cases (pas de marge qui les déborde) */
html #app #v-play[data-game=battle] .fleet-vessel{padding:0;box-sizing:border-box;object-fit:fill}
html #app #v-play[data-game=battle] .bt-tools .g7-go,html #app #v-play[data-game=battle] .bt-sethint+.bt-grid~.g7-go{white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;flex-direction:row}

/* lot 17 : rien ne reste affiché par-dessus une fenêtre de choix */
html body.has-scrim #app :is(.rcard,.act,.dockbar,.dock,.drawbar){visibility:hidden!important}
html body.has-scrim .result-float{display:none!important}

/* lot 17 : Dessine-moi — la palette (noir compris), les épaisseurs, « annuler » et « effacer tout » passent à la ligne au lieu d'être coupés ; chrono bien visible */
html #app #v-play[data-game=draw] .dr-tools,html #app #v-play[data-fit][data-game=draw] .dr-tools{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;gap:6px 8px!important;width:100%;box-sizing:border-box;margin:6px 0!important;overflow:visible!important}
html #app #v-play[data-game=draw] .dr-pal,html #app #v-play[data-fit][data-game=draw] .dr-pal{display:flex!important;flex:1 0 100%!important;flex-wrap:wrap!important;justify-content:center!important;gap:7px!important}
html #app #v-play[data-game=draw] .dr-c,html #app #v-play[data-fit][data-game=draw] .dr-c{flex:0 0 auto;width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;border-radius:50%!important;border:2px solid #ffffffaa!important;box-shadow:0 0 0 1px #0004}
html #app #v-play[data-game=draw] .dr-c:first-child{border-color:#fff!important;box-shadow:0 0 0 1px #0007,0 0 0 3px #ffffff55}
html #app #v-play[data-game=draw] .dr-c.er,html #app #v-play[data-fit][data-game=draw] .dr-c.er{width:auto!important;min-width:64px!important;padding:0 10px!important;border-radius:17px!important;color:#222;font:700 12px system-ui}
html #app #v-play[data-game=draw] .dr-c.sel{outline:3px solid #ffd98a;outline-offset:1px}
html #app #v-play[data-game=draw] .dr-wd{display:flex;gap:6px;flex:0 0 auto}
html #app #v-play[data-game=draw] .dr-tools .mini{flex:0 0 auto;min-height:36px;white-space:nowrap}
html #app #v-play[data-game=draw] .g15-clock{display:block!important;margin:4px auto 6px!important;padding:5px 16px;border-radius:999px;background:#17372bf0;color:#fff!important;font:800 21px/1.2 system-ui!important;letter-spacing:.02em;width:max-content;max-width:90%;text-align:center;box-shadow:0 3px 10px #0004;font-variant-numeric:tabular-nums}
html #app #v-play[data-game=draw] .g15-clock.low{background:#b3261e;animation:drpulse .9s ease-in-out infinite}
@keyframes drpulse{50%{transform:scale(1.06)}}
@media (prefers-reduced-motion:reduce){html #app #v-play[data-game=draw] .g15-clock.low{animation:none}}
html #app #v-play[data-game=draw] .bt-tools{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}

/* lot 17 : Tier list — les longs tableaux de résultats (15 éléments) défilent jusqu'au bouton « Manche suivante » ; titre lisible */
html #app #v-play[data-game=tier] .pbody,html #app #v-play[data-fit][data-game=tier] .pbody,html #app #v-play[data-fit][data-game=tier]:not([data-phase=result]) .pbody{overflow-y:auto!important;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;display:block!important;min-height:0}
html #app #v-play[data-game=tier] .pbody .tr .rv-t{touch-action:pan-y}
html #app #v-play[data-game=tier] .pbody .tr-sum,html #app #v-play[data-game=tier] .pbody .tr-sum.big{color:#2b1d12!important;text-shadow:none!important;background:#fffaf0f0;border-radius:14px;padding:8px 12px;margin:10px auto;max-width:92%;font:700 14px/1.35 system-ui;text-align:center}
html #app #v-play[data-game=tier] .tr-co-info{font:600 13.5px/1.35 system-ui;text-align:center;margin:4px 6px 8px;color:#3a2a1c}
html #app #v-play[data-game=tier] .pbody .g7-go,html #app #v-play[data-game=tier] .pbody .wy-next{margin-top:10px}
/* lot17 : canvas plus petit pour laisser place a l'horloge et aux outils */
html #app #v-play[data-game=draw] .g15-draw .dr-canvas{width:min(100%,max(90px,calc(var(--play-h,500px) - 320px)),330px)!important}
html #app #v-play[data-game=draw] .g15-draw.g15-guess .dr-canvas{width:min(100%,max(90px,calc(var(--play-h,500px) - 360px)),330px)!important}

/* ===== lot18 : Ludo — dés séparés, cible visible, pions jouables bien visibles ===== */
html #app #v-play[data-game=ludo] .lc-board{width:min(100%,calc(var(--play-h,480px) - 200px),460px)!important}
html #app #v-play[data-game=ludo] .lc-side{display:flex;align-items:center;gap:8px;min-height:44px;padding:2px 10px;border-radius:12px;transition:opacity .2s}
html #app #v-play[data-game=ludo] .lc-side.op{align-self:flex-start;margin:0 0 4px}
html #app #v-play[data-game=ludo] .lc-side.me{order:2}
html #app #v-play[data-game=ludo] .lc-who{font:700 13px system-ui;color:inherit;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html #app #v-play[data-game=ludo] .lc-side .lc-die{width:42px!important;padding:5px!important}
html #app #v-play[data-game=ludo] .lc-side.turn{background:#ff6a0026;box-shadow:0 0 0 2px #ff6a00}
html #app #v-play[data-game=ludo] .lc-side.wait .lc-die{opacity:.4}
html #app #v-play[data-game=ludo] .lc-side.wait .lc-who{opacity:.65}
html #app #v-play[data-game=ludo] .lc-controls{justify-content:center;gap:14px}
html #app #v-play[data-game=ludo] .lc-away{visibility:hidden}
html #app #v-play .lc-board .lc-dest{border:3px solid #ff5a00;background:#ff5a0033;box-shadow:0 0 0 2px #fff,0 0 8px #ff5a0099;color:#b33a00}
html #app #v-play .lc-board .lc-dest::after{content:'';position:absolute;left:50%;top:50%;width:34%;height:34%;transform:translate(-50%,-50%);border-radius:50%;background:#ff5a00}
html #app #v-play .lc-board .lc-dest.cap{border-color:#8f0f1f;background:#d9223755;color:#fff;box-shadow:0 0 0 2px #fff,0 0 8px #8f0f1faa;text-shadow:0 1px 2px #000}
html #app #v-play .lc-board .lc-dest.cap::after{display:none}
html #app #v-play .lc-board .lc-pawn.legal{outline:3px solid #ff5a00;outline-offset:2px}
html #app #v-play .lc-board .lc-pawn.picked{outline:3px solid #8f2a00;outline-offset:3px}
html #app #v-play .lc-board .lc-cell.safe{color:#b57d00;font-size:clamp(11px,3.8vw,18px);background:#ffe9a8;box-shadow:inset 0 0 0 2px #e0b13d}

/* ===== lot18 : Bataille navale — rotation rigide et fluide, ma flotte visible en haut ===== */
html #app #v-play[data-game=battle] .bt-sv{transform:translate(var(--dx,0px),var(--dy,0px)) rotate(var(--rot,0deg));will-change:transform;transition:left .25s cubic-bezier(.3,.7,.2,1),top .25s cubic-bezier(.3,.7,.2,1),transform .34s cubic-bezier(.4,0,.2,1)}
html #app #v-play[data-game=battle] .bt-sv.drag{transition:none}
html #app #v-play[data-game=battle] .bt-sv img{object-fit:fill;transform-origin:center}
@media (prefers-reduced-motion:reduce){html #app #v-play[data-game=battle] .bt-sv{transition:none}}
html #app #v-play[data-game=battle] .bt-top{display:flex;gap:10px;align-items:flex-start;justify-content:space-between;margin:2px 0 6px}
html #app #v-play[data-game=battle] .bt-topl{flex:1 1 0;min-width:0}
html #app #v-play[data-game=battle] .bt-topr{flex:0 0 auto;width:min(40%,158px)}
html #app #v-play[data-game=battle] .bt-topr:empty{display:none}
html #app #v-play[data-game=battle] .bt-topr .bt-title{margin:0 0 3px;text-align:center}
html #app #v-play[data-game=battle][data-phase=play] .bt-topr .bt-grid,html #app #v-play[data-fit][data-game=battle][data-phase=play] .bt-topr .bt-grid{width:100%!important;max-width:none;margin:0}
html #app #v-play[data-game=battle][data-phase=play] .bt-grid.enemy,html #app #v-play[data-fit][data-game=battle][data-phase=play] .bt-grid.enemy{width:min(100%,max(250px,calc(var(--play-h,480px) - 250px)))!important;margin-inline:auto}
html #app #v-play[data-game=battle] .bt-topl .bt-fleetrow{justify-content:flex-start}

/* ===== lot19 : Dessine-moi — grande feuille, chrono et mot sur une seule ligne, outils compacts ===== */
html #app #v-play[data-game=draw] .dr-head{display:flex;align-items:center;justify-content:center;gap:10px;margin:2px 0 4px;min-width:0}
html #app #v-play[data-game=draw] .dr-head .g15-clock{margin:0!important;padding:3px 12px;font-size:17px!important;flex:0 0 auto}
html #app #v-play[data-game=draw] .dr-head .dr-word{margin:0!important;font-size:16px!important;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html #app #v-play[data-game=draw] .g15-draw:not(.g15-guess) .dr-canvas{width:min(100%,max(120px,calc(var(--play-h,500px) - 180px)),372px)!important;margin:2px auto!important}
html #app #v-play[data-game=draw] .dr-tools{gap:4px 6px!important;margin:3px 0!important}
html #app #v-play[data-game=draw] .dr-c,html #app #v-play[data-game=draw][data-fit] .dr-c{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important}
html #app #v-play[data-game=draw] .dr-c.er,html #app #v-play[data-game=draw][data-fit] .dr-c.er{width:auto!important;min-width:56px!important;height:30px!important;font-size:11px!important}
html #app #v-play[data-game=draw] .dr-w{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important}
html #app #v-play[data-game=draw] .dr-tools .mini{min-height:30px!important;padding:3px 10px}
html #app #v-play[data-game=draw] .g15-draw:not(.g15-guess) .g7-go{min-height:36px!important;padding-block:6px!important;margin:3px auto!important}
html #app #v-play[data-game=draw] .g15-draw.g15-guess .dr-canvas{width:min(100%,max(120px,calc(var(--play-h,500px) - 255px)),372px)!important;margin:4px auto!important}

/* ===== lot19 : Tier list à deux — les mots à classer d'abord (en haut), rangs compacts ===== */
html #app #v-play[data-game=tier] .tr-co .rank-studio{display:flex;flex-direction:column}
html #app #v-play[data-game=tier] .tr-co .rank-help{order:-3;margin:2px 0}
html #app #v-play[data-game=tier] .tr-co .rank-tray{order:-2;margin:2px 0 6px}
html #app #v-play[data-game=tier] .tr-co .rank-board{order:-1}
html #app #v-play[data-game=tier] .tr-co .tr-co-lead{margin:2px 0;font-size:12.5px;line-height:1.25}
html #app #v-play[data-game=tier] .tr-co .tr-co-info{margin:2px 0;font-size:13px}
html #app #v-play[data-game=tier] .tr-co .rank-level{min-height:0!important;height:46px}
html #app #v-play[data-game=tier] .tr-co .rank-zone{min-height:0!important}
html #app #v-play[data-game=tier] .tr-co .rank-help{display:none}
html #app #v-play[data-game=tier] .tr-co .rank-level{height:43px}
html #app #v-play[data-game=tier] .tr-co .rank-zone .rank-tile{height:38px!important;min-height:0}

/* ===== lot19 : Mémoire — vrai retournement 3D (dos / face) ===== */
html #app #v-play[data-game=memory] .mem-card.mem3{background:none!important;border:0!important;box-shadow:none!important;animation:none!important;padding:0!important;perspective:620px;overflow:visible;position:relative;transition:none;font-size:0}
html #app #v-play[data-game=memory] .mem-card.mem3::after{display:none!important}
html #app #v-play[data-game=memory] .mem-card.mem3:not([disabled]):active{transform:scale(.96)}
html #app #v-play[data-game=memory] .mem3 .mem-in{position:absolute;inset:0;display:block;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;transition:transform .55s cubic-bezier(.45,.05,.2,1);will-change:transform}
html #app #v-play[data-game=memory] .mem3.up .mem-in{transform:rotateY(180deg)}
html #app #v-play[data-game=memory] .mem3 .mem-f,html #app #v-play[data-game=memory] .mem3 .mem-b{position:absolute;inset:0;display:grid;place-items:center;border-radius:10px;backface-visibility:hidden;-webkit-backface-visibility:hidden;box-sizing:border-box;border:2px solid #c8ad7f}
html #app #v-play[data-game=memory] .mem3 .mem-f{background:repeating-linear-gradient(45deg,#284f58 0 3px,#315d65 3px 6px);box-shadow:0 2px 3px #0004,inset 0 0 0 3px #00000022}
html #app #v-play[data-game=memory] .mem3 .mem-f::after{content:'◇';font:24px Georgia,serif;color:#ead8b8;width:62%;height:62%;display:grid;place-items:center;border:1px solid #c6ab7d;border-radius:7px}
html #app #v-play[data-game=memory] .mem3 .mem-b{background:#fff1d5;color:#382b1d;transform:rotateY(180deg);font-size:clamp(20px,7vw,30px);line-height:1;box-shadow:0 2px 4px #0004}
html #app #v-play[data-game=memory] .mem3.found.mine .mem-b{border-color:#4ade9a;box-shadow:0 0 0 2px #4ade9a99,0 0 12px #4ade9a66}
html #app #v-play[data-game=memory] .mem3.found.theirs .mem-b{border-color:#ffb27a;box-shadow:0 0 0 2px #ffb27a99,0 0 12px #ffb27a66}
@media (prefers-reduced-motion:reduce){html #app #v-play[data-game=memory] .mem3 .mem-in{transition:none}}
