/* MaYaM — feuille de style du jeu (direction visuelle de Louise, v3 après retours iPad de Frédéric).
   Aucun style inline. Tout l'écran tient dans la hauteur visible (100dvh, zones sûres) : la feuille de
   score prend la hauteur restante et ses lignes se partagent cette hauteur (cases en position absolue). */
:root{
  --felt-900:#08291D; --felt-800:#0C3D2A; --felt-600:#14573D; --felt-400:#1F7050;
  --wood-900:#24150C; --wood-700:#3D2616; --wood-500:#5B3A22;
  --brass-700:#A67C1E; --brass-500:#E3B23C; --brass-300:#F6D675;
  --ivory:#F6EFD9; --ivory-dim:#C9CFBE; --ink:#14201A; --oxblood:#9B1C1C; --coral:#F29A8A;
  /* teintes des couronnes (Louise), éclaircies pour rester lisibles sur le feutre vert */
  --rank-or:#FFD012; --rank-argent:#D8E0E6; --rank-bronze:#E4A266;
  --panel:rgba(6,36,24,.72);
  --f-title:'Fraunces',Georgia,serif; --f-text:'DM Sans',system-ui,sans-serif; --f-num:'Barlow Condensed','Arial Narrow',sans-serif;
  --sat:env(safe-area-inset-top,0px); --sab:env(safe-area-inset-bottom,0px); --sal:env(safe-area-inset-left,0px); --sar:env(safe-area-inset-right,0px);
  --rail:12px; --topbar:104px; --logo-h:90px; --foot:34px;
  --die:96px; --cellf:24px; --tilt:0deg; --gap:14px;
  --ease-throw:cubic-bezier(.2,.8,.2,1);
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;height:100%}
body{margin:0;height:100%;color:var(--ivory);font-family:var(--f-text);font-size:16px;line-height:1.4;overflow:hidden;
  background:linear-gradient(180deg,#6A4527,var(--wood-500) 30%,var(--wood-700) 100%);
  padding:calc(var(--rail) + var(--sat)) calc(var(--rail) + var(--sar)) calc(var(--rail) + var(--sab)) calc(var(--rail) + var(--sal));
  -webkit-tap-highlight-color:transparent;overscroll-behavior:none}
button,input,select{font:inherit;color:inherit}
button{background:none;border:0;padding:0;cursor:pointer;touch-action:manipulation}
button:disabled{cursor:default}
:focus-visible{outline:3px solid var(--brass-300);outline-offset:2px}
.sheet-dialog:focus,.sheet-dialog:focus-visible{outline:none}
img{display:block}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* ---------- plateau ---------- */
.page{position:relative;height:100%;max-width:1400px;margin:0 auto;border-radius:12px;padding:0 20px;
  display:grid;grid-template-rows:var(--topbar) minmax(0,1fr) var(--foot);
  background:
    radial-gradient(120% 90% at 50% 0%,rgba(255,240,200,.20),rgba(255,240,200,0) 60%),
    radial-gradient(140% 120% at 50% 50%,rgba(0,0,0,0) 55%,rgba(0,0,0,.45) 100%),
    url(img/tapis-feutre-512.png) var(--felt-600);
  box-shadow:0 0 0 2px var(--brass-700),0 0 0 4px rgba(0,0,0,.45),inset 0 6px 22px rgba(0,0,0,.55)}
.panel{background:var(--panel);border-radius:16px;box-shadow:inset 0 0 0 1px rgba(227,178,60,.35),0 10px 24px rgba(0,0,0,.3)}
.felt{border-radius:18px;background:rgba(6,36,24,.28);box-shadow:inset 0 0 0 1px rgba(227,178,60,.35),inset 0 8px 26px rgba(0,0,0,.35)}
.label{font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--ivory-dim)}
.muted{color:var(--ivory-dim)}
.small{font-size:12.5px;color:var(--ivory-dim)}

/* ---------- en-tête : logo, menu d'icônes ---------- */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
.brand{display:block;flex:none}
/* logo v7 validé (logo-complet-refait, 311×182 natif) : réduction CSS seulement, jamais au-delà de la taille native */
.logo{height:var(--logo-h);width:auto;max-width:311px;max-height:182px}
.topbar-score{display:none}
.top-links{display:flex;align-items:center;gap:10px;margin-right:auto;margin-left:8px}
.top-btn{min-height:44px;padding:0 18px;border-radius:12px;font-size:14px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ivory);box-shadow:inset 0 0 0 1.5px rgba(246,239,217,.35)}
.top-btn:hover{background:rgba(246,239,217,.08)}
.ico-q{font-family:var(--f-title);font-weight:700;font-size:22px;line-height:1;color:var(--ivory)}
.icons{display:flex;align-items:center;gap:8px}
.icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:48px;height:48px;padding:0 10px;border-radius:14px;
  box-shadow:inset 0 0 0 1.5px rgba(246,239,217,.35);transition:background .15s}
.icon-btn:hover{background:rgba(246,239,217,.08)}
.icon-btn.is-on{box-shadow:inset 0 0 0 1.5px var(--brass-500)}
.icon-cap{font-size:13px;font-weight:700;letter-spacing:.08em;color:var(--brass-300)}
.icon-cap:empty{display:none}
.ico{display:inline-block;width:22px;height:22px;background:center/contain no-repeat}
.ico-user{background-image:url(img/ui/user.svg)}
.js-account-btn.is-logged .ico-user{background-image:url(img/ui/deconnexion.svg)}
.ico-home{background-image:url(img/ui/accueil.svg);width:18px;height:18px}
.btn-quit{text-decoration:none}
.ico-sound{background-image:url(img/ui/son.svg)}
.sound-btn.is-muted .ico-sound{background-image:url(img/ui/muet.svg)}
.ico-globe{background-image:url(img/ui/globe.svg)}
.ico-restart{background-image:url(img/ui/restart.svg);width:18px;height:18px}

/* ---------- mise en page ---------- */
.layout{min-height:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:20px;align-items:stretch;padding-bottom:6px}
.play{min-height:0;display:flex;flex-direction:column;gap:var(--gap)}
.noscript{padding:18px}

/* ---------- feuille de score ---------- */
.sheet{padding:6px 10px;align-self:stretch;min-width:0;min-height:0;display:flex;flex-direction:column}
.grid{border-collapse:separate;border-spacing:3px;table-layout:fixed;width:100%;flex:1 1 auto;height:100%}
.layout>.sheet .grid{width:calc(84px + 3 * var(--colw) + 12px)}
:root{--colw:84px}
.grid thead th{height:34px;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--ivory-dim);font-weight:700;vertical-align:bottom;padding:0 0 2px}
.arrow{display:block;width:24px;height:24px;margin:0 auto 3px;background:center/contain no-repeat}
.arrow-down{background-image:url(img/ui/triangle-bas.svg)}
.arrow-free{background-image:url(img/ui/losange-coupe.svg)}
.arrow-up{background-image:url(img/ui/triangle-haut.svg)}
.grid .corner{width:84px}
.grid td,.grid th{padding:0}
.grid td{position:relative}
.grid tbody th{height:auto}
.row-head{display:flex;align-items:center;gap:8px;min-height:18px;padding-left:4px;font-weight:700;font-size:13px;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
.row-die{width:22px;height:22px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.5))}
/* Aligné-milieu (Frédéric, 29/11) : le libellé et sa case partagent le même centre vertical */
.grid tbody th.row-head{display:table-cell;vertical-align:middle;line-height:1;text-align:left}
.row-head>.row-label{line-height:18px}
.row-head>.row-die,.row-head>.row-label{display:inline-block;vertical-align:middle}
.row-head>.row-die{margin-right:8px}
.sum-head{color:var(--brass-300)}
.row.sep th{padding-top:6px}
.row.sep .cell{top:6px}
.sum-upper th{padding-bottom:2px}
.sum-upper .sum-cell{bottom:2px}
.cell,.sum-cell{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:8px;
  font-family:var(--f-num);font-weight:600;font-size:clamp(14px, 2.5dvh, var(--cellf));line-height:1;font-variant-numeric:tabular-nums;
  background:rgba(0,0,0,.28);color:transparent;transition:background .2s,box-shadow .2s,color .2s}
/* cases marquées : couleur selon le par (Frédéric) */
.cell.is-filled{background:rgba(246,239,217,.10);color:var(--ivory)}
.cell.g-par,.cell.g-plain{color:#FFFFFF}
.cell.g-under,.cell.g-x{color:#F4A9A0}
.cell.g-over{color:#F3DC9A}
.cell.g-perfect{color:var(--ink);background:linear-gradient(180deg,var(--brass-300),var(--brass-500));font-weight:700}
/* croix unique pour « échec marqué » et « échec possible » (même dessin, même taille) */
.cross{display:block;width:.62em;height:.62em;background:currentColor;
  -webkit-mask:url(img/ui/croix.svg) center/contain no-repeat;mask:url(img/ui/croix.svg) center/contain no-repeat}
/* cases jouables : aperçu atténué */
.cell.is-possible{background:rgba(227,178,60,.08);box-shadow:inset 0 0 0 1.5px rgba(227,178,60,.55);color:rgba(246,215,117,.55);font-style:italic}
.cell.is-possible:hover{background:rgba(227,178,60,.18)}
.cell.is-best{background:rgba(227,178,60,.20);box-shadow:inset 0 0 0 2px rgba(246,214,117,.85);color:rgba(255,244,204,.85);font-style:normal;animation:pulse 1.6s ease-in-out infinite}
.cell.is-best::after{content:"";position:absolute;right:5px;top:5px;width:6px;height:6px;border-radius:50%;background:var(--brass-300)}
.no-help .cell.is-possible{color:transparent}
.no-help .cell.is-best{animation:none;background:rgba(227,178,60,.08);box-shadow:inset 0 0 0 1.5px rgba(227,178,60,.55)}
.no-help .cell.is-best::after{display:none}
.sum-cell{background:rgba(0,0,0,.36);color:var(--brass-300)}
.sum-cell small{font-size:.5em;font-weight:500;color:var(--ivory-dim);margin-left:3px;letter-spacing:.04em;font-family:var(--f-text)}
.sum-cell.is-earned{color:#FFF1BF;background:rgba(227,178,60,.22)}
.sum-upper .sum-cell,.sum-lower .sum-cell{background:linear-gradient(180deg,rgba(227,178,60,.28),rgba(227,178,60,.14));color:#FFF1BF;font-weight:700}
.cell .cross{position:absolute;inset:9% 7%;width:auto;height:auto;
  -webkit-mask:url(img/ui/croix-case.svg) center/100% 100% no-repeat;mask:url(img/ui/croix-case.svg) center/100% 100% no-repeat}
.cell.g-x .cross{background:#F4A9A0}
/* bonus : il manque (80 − total), très atténué ; 20 = par + ; 40 = perfect */
.sum-cell.b-missing{color:rgba(246,239,217,.26);font-weight:500}
.sum-cell.b-over{color:#F3DC9A;background:rgba(227,178,60,.16)}
.sum-cell.b-perfect{color:var(--ink);background:linear-gradient(180deg,var(--brass-300),var(--brass-500));font-weight:700}
.cell.just-marked{animation:stamp .25s ease-out}
@keyframes stamp{from{transform:scale(1.25)}to{transform:scale(1)}}
@keyframes pulse{0%,100%{box-shadow:inset 0 0 0 2px rgba(246,214,117,.85),0 0 6px rgba(246,214,117,.25)}50%{box-shadow:inset 0 0 0 2px rgba(246,214,117,.85),0 0 16px rgba(246,214,117,.55)}}
tr.sweep .cell,tr.sweep .sum-cell,tr.sweep .row-head{background-image:linear-gradient(100deg,transparent 30%,rgba(246,214,117,.55) 50%,transparent 70%);background-size:250% 100%;background-repeat:no-repeat;animation:sweep .6s ease-out}
@keyframes sweep{from{background-position:130% 0}to{background-position:-30% 0}}

/* ---------- bandeau tour / lancers / score, liens Règles · Scores · À propos ---------- */
.status{padding:10px 20px 12px;display:flex;flex-direction:column;gap:2px}
.links{display:flex;gap:4px;flex-wrap:wrap;margin-left:-10px}
.link-btn{display:inline-flex;align-items:center;min-height:32px;padding:4px 10px;border-radius:999px;font-weight:600;font-size:14px;color:var(--ivory);text-decoration:none}
.link-btn:hover{background:rgba(246,239,217,.08);color:var(--brass-300)}
.link-btn.inline{min-height:0;padding:0;font-size:inherit;text-decoration:underline;color:var(--brass-300)}
.status-main{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}
.stat{display:flex;flex-direction:column;gap:4px}
.turn{font-family:var(--f-num);font-weight:600;font-size:38px;line-height:1}
.turn-max{font-size:22px;color:var(--ivory-dim)}
.pips{display:flex;gap:7px}
/* pastilles de lancers : même hauteur de ligne que « 1 / 36 », centrées verticalement sur ce chiffre */
.turn.pips{height:1em;align-items:center}
.pips i{display:block;width:16px;height:16px;border-radius:50%;box-shadow:inset 0 0 0 2px var(--brass-500);transition:background .2s}
.pips i.on{background:radial-gradient(circle at 35% 30%,var(--brass-300),var(--brass-500))}
.score-box{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.big-score{font-family:var(--f-num);font-weight:700;font-size:72px;line-height:.85;color:var(--brass-300);text-shadow:0 3px 0 rgba(0,0,0,.35);font-variant-numeric:tabular-nums}

/* ---------- dés ---------- */
.tray{padding:22px 14px 10px;display:flex;flex-direction:column;align-items:center;gap:12px;min-width:0;overflow:hidden}
.dice{display:flex;justify-content:center;align-items:flex-end;gap:calc(var(--die) * .14);max-width:100%;padding-top:calc(var(--die) * .18)}
.die{position:relative;flex:none;width:var(--die);height:var(--die);border-radius:24%;transition:transform .16s ease-out}
.die-face{width:100%;height:100%;transform:rotate(var(--tilt));filter:drop-shadow(0 6px 6px rgba(0,0,0,.45)) drop-shadow(0 1px 1px rgba(0,0,0,.6))}
.die::before{content:"";position:absolute;inset:-5px;border-radius:30%;transition:box-shadow .16s ease-out;pointer-events:none}
.die.is-held{transform:translateY(-16%)}
.die.is-held::before{box-shadow:0 0 0 3px var(--brass-500),0 0 18px rgba(246,214,117,.5)}
.die-tag{position:absolute;left:50%;top:calc(100% + 8px);transform:translateX(-50%);font-size:11px;font-weight:700;letter-spacing:.12em;color:var(--brass-300);text-transform:uppercase;white-space:nowrap}
.die.is-blank{opacity:.55}
.tilt-0{--tilt:-7deg}.tilt-1{--tilt:-6deg}.tilt-2{--tilt:-5deg}.tilt-3{--tilt:-4deg}.tilt-4{--tilt:-3deg}.tilt-5{--tilt:-2deg}.tilt-6{--tilt:-1deg}
.tilt-7{--tilt:0deg}.tilt-8{--tilt:1deg}.tilt-9{--tilt:2deg}.tilt-10{--tilt:3deg}.tilt-11{--tilt:4deg}.tilt-12{--tilt:5deg}
.die.is-rolling{transform:none}
.die.is-rolling::before{box-shadow:none}
.die.is-rolling .die-face{animation:throw .68s var(--ease-throw) both}
.die.is-rolling.d1 .die-face{animation-duration:.76s}
.die.is-rolling.d2 .die-face{animation-duration:.84s}
.die.is-rolling.d3 .die-face{animation-duration:.92s}
.die.is-rolling.d4 .die-face{animation-duration:1s}
.die.is-rolling.d5 .die-face{animation-duration:1.08s}
@keyframes throw{
  0%{transform:translateY(0) rotate(var(--tilt)) scale(1)}
  30%{transform:translateY(calc(var(--die) * -.3)) rotate(calc(var(--tilt) + 300deg)) scale(1.05);filter:drop-shadow(0 20px 12px rgba(0,0,0,.3)) blur(.6px)}
  62%{transform:translateY(0) rotate(calc(var(--tilt) + 610deg)) scale(1)}
  80%{transform:translateY(calc(var(--die) * -.08)) rotate(calc(var(--tilt) + 700deg)) scale(1.02)}
  100%{transform:translateY(0) rotate(calc(var(--tilt) + 720deg)) scale(1);filter:drop-shadow(0 6px 6px rgba(0,0,0,.45)) drop-shadow(0 1px 1px rgba(0,0,0,.6))}
}
.hint{margin:16px 0 0;text-align:center;font-size:13px;color:var(--ivory-dim)}

/* ---------- meilleurs choix + interrupteur d'aide ---------- */
.best{padding:10px 14px;display:flex;flex-direction:column;gap:8px}
.best-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.best-list{display:flex;gap:10px;min-height:52px}
.best-item{flex:1;display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:52px;padding:4px 12px;border-radius:12px;background:rgba(246,239,217,.07);text-align:left;min-width:0}
.best-item.is-top{background:rgba(227,178,60,.18);box-shadow:inset 0 0 0 2px var(--brass-300)}
.best-line{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.best-kind{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--brass-300)}
.best-name{font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.best-pts{font-family:var(--f-num);font-size:26px;line-height:1;color:var(--brass-300)}
.best-pts .cross{width:16px;height:16px;color:#F4A9A0}
.best-empty{align-self:center;font-size:13px;color:var(--ivory-dim)}
.switch{display:inline-flex;align-items:center;gap:10px;min-height:40px;font-size:14px;font-weight:600;color:var(--ivory)}
.switch-track{position:relative;flex:none;width:42px;height:24px;border-radius:999px;background:rgba(0,0,0,.4);box-shadow:inset 0 0 0 1.5px rgba(246,239,217,.4);transition:background .15s}
.switch-knob{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--ivory-dim);transition:transform .15s}
.switch[aria-checked="true"] .switch-track{background:var(--brass-500);box-shadow:none}
.switch[aria-checked="true"] .switch-knob{transform:translateX(18px);background:var(--ink)}

/* ---------- boutons d'action : Lancer, et « Nouvelle partie » isolé en bas à droite ---------- */
.actions{margin-top:auto;display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
/* (29/11 10:28) Nouvelle partie puis Quitter contre la grille, Annuler puis LANCER en bas à droite */
:root{--roll-h:60px} /* hauteur de LANCER = côté du bouton Annuler */
.actions-side,.actions-play{display:flex;align-items:center;gap:12px;min-width:0}
.actions-play{margin-left:auto}
.btn-roll{display:inline-flex;align-items:center;justify-content:center;gap:14px;min-height:60px;padding:0 30px;border-radius:16px;
  font-weight:700;font-size:22px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink);
  background:linear-gradient(180deg,var(--brass-300),var(--brass-500) 55%,var(--brass-700));
  box-shadow:0 5px 0 #6E5012,0 12px 20px rgba(0,0,0,.45),inset 0 2px 0 rgba(255,255,255,.55);transition:transform .08s,box-shadow .08s,filter .2s}
.btn-roll:active:not(:disabled){transform:translateY(4px);box-shadow:0 1px 0 #6E5012,0 6px 12px rgba(0,0,0,.45),inset 0 2px 0 rgba(255,255,255,.55)}
.btn-roll:disabled{filter:grayscale(.7) brightness(.75)}
.actions .btn-roll{min-width:200px;height:var(--roll-h);min-height:0;font-size:22px}
/* (29/11 10:46) Annuler : carré, côté = hauteur de LANCER, rouge du logo (#990000, mot MaYaM sur fond vert),
   signe annuler seul ; centré verticalement sur LANCER ; grisé et non cliquable quand inactif */
.ico-undo{background-image:url(img/ui/annuler.svg)}
.btn-undo{flex:none;width:var(--roll-h);height:var(--roll-h);display:inline-grid;place-items:center;border-radius:16px;
  background:#990000;box-shadow:0 5px 0 #4D0000,0 12px 20px rgba(0,0,0,.45),inset 0 2px 0 rgba(255,255,255,.22);transition:transform .08s,box-shadow .08s}
.btn-undo .ico-undo{width:52%;height:52%}
.btn-undo:active:not(:disabled){transform:translateY(4px);box-shadow:0 1px 0 #4D0000,0 6px 12px rgba(0,0,0,.45),inset 0 2px 0 rgba(255,255,255,.22)}
.btn-undo:disabled{background:#6E706B;box-shadow:0 5px 0 #3F413D,0 8px 14px rgba(0,0,0,.3);cursor:default;pointer-events:none}
.btn-undo:disabled .ico-undo{opacity:.5}
.roll-left{display:inline-grid;place-items:center;min-width:34px;height:34px;padding:0 6px;border-radius:9px;background:rgba(20,32,26,.18);font-family:var(--f-num);font-size:22px}
.btn-new{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:12px;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ivory-dim);box-shadow:inset 0 0 0 1.5px rgba(246,239,217,.35)}
.btn-new:hover{color:var(--ivory);background:rgba(246,239,217,.06)}
.btn-ghost{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:0 20px;border-radius:14px;
  font-weight:700;font-size:15px;letter-spacing:.06em;text-transform:uppercase;color:var(--ivory);box-shadow:inset 0 0 0 2px rgba(246,239,217,.55);text-decoration:none;text-align:center}
.btn-ghost:hover{background:rgba(246,239,217,.08)}
.wide{width:100%}

/* ---------- pied : copyright + menu (langues, mentions légales, contact) ---------- */
.foot{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12.5px;color:var(--ivory-dim);min-width:0}
.copyright{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.foot-menu{display:flex;align-items:center;gap:4px}
.foot-menu .link-btn{font-size:12.5px;min-height:30px;padding:2px 8px;color:var(--ivory-dim);white-space:nowrap}
.foot-lang{display:inline-flex;align-items:center;gap:2px;margin-right:6px}
.lang-btn{min-width:32px;min-height:30px;font-size:12.5px;font-weight:600;color:var(--ivory-dim);letter-spacing:.06em}
.lang-btn[aria-pressed="true"]{color:var(--brass-300);font-weight:700}

/* ---------- message ---------- */
.toast{position:fixed;left:50%;top:22%;z-index:50;transform:translate(-50%,-10px);max-width:90vw;padding:14px 24px;border-radius:16px;
  background:rgba(6,36,24,.94);box-shadow:inset 0 0 0 2px var(--brass-500),0 18px 40px rgba(0,0,0,.5);
  font-weight:700;font-size:18px;color:var(--brass-300);text-align:center;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.is-big{font-family:var(--f-title);font-variation-settings:'opsz' 72,'SOFT' 100;font-weight:800;font-size:40px;padding:20px 34px}

/* ---------- fenêtres ---------- */
.sheet-dialog{width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 32px - var(--sat) - var(--sab));overflow:auto;padding:24px 26px;border:0;border-radius:20px;color:var(--ivory);
  background:radial-gradient(120% 90% at 50% 0%,rgba(255,240,200,.14),rgba(255,240,200,0) 60%),url(img/tapis-feutre-512.png) var(--felt-800);
  box-shadow:0 0 0 2px var(--brass-700),0 30px 60px rgba(0,0,0,.6)}
.sheet-dialog[open]{animation:fade .3s ease-out}
.sheet-dialog::backdrop{background:rgba(10,6,3,.62)}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.dlg-title{margin:0 0 14px;font-family:var(--f-title);font-variation-settings:'opsz' 72,'SOFT' 100;font-weight:700;font-size:28px;line-height:1.15;color:var(--brass-300)}
.dlg-body{margin:0 0 16px;padding:14px 18px;border-radius:14px;background:var(--panel);box-shadow:inset 0 0 0 1px rgba(227,178,60,.3)}
.dlg-body p{margin:0 0 10px}
.dlg-body h3{margin:4px 0 8px;font-size:13px;letter-spacing:.14em;text-transform:uppercase;color:var(--ivory-dim)}
.dlg-body b{color:var(--brass-300)}
.settings{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.rules-list{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;margin:12px 0}
.rules-list dt{font-weight:700;color:var(--brass-300);text-transform:uppercase;letter-spacing:.04em;font-size:15px}
.rules-list dd{margin:0}
.dlg-close{width:100%;min-height:52px;font-size:18px}
.dlg-actions{display:flex;gap:14px;flex-wrap:wrap}
.dlg-actions>*{flex:1;white-space:nowrap}
.dlg-actions .btn-roll{font-size:18px;padding:0 18px}
.hall,.recent{margin:0;padding:0;list-style:none;display:grid;gap:6px}
.hall{counter-reset:h}
.hall li,.recent li{display:flex;align-items:baseline;gap:14px;padding:6px 10px;border-radius:10px;background:rgba(246,239,217,.06)}
.hall li::before{counter-increment:h;content:counter(h);width:22px;color:var(--ivory-dim);font-weight:700}
.hall-score{min-width:56px;font-family:var(--f-num);font-weight:700;font-size:26px;color:var(--brass-300);font-variant-numeric:tabular-nums}
.hall-date{font-size:14px;color:var(--ivory-dim)}
.about-logo{width:260px;height:auto;max-width:min(621px,100%);margin:0 auto 14px}
.end-dialog{text-align:center;width:min(480px,calc(100vw - 32px))}
.end-logo{height:90px;width:auto;max-width:311px;margin:0 auto 10px}
/* (29/11 21:43) Partie terminée : SCORE FINAL, total, titre des colonnes et cartes centrés comme dans l'app */
.end-dialog .dlg-body,.end-dialog .dlg-title,.end-dialog .label,.end-score,.end-record{text-align:center}
.end-score{margin:0 0 6px;font-family:var(--f-num);font-weight:700;font-size:96px;line-height:1;color:var(--brass-300)}
.end-record{font-family:var(--f-title);font-weight:800;font-size:24px;color:var(--brass-300)}
.end-cols{display:flex;gap:10px;margin:8px 0 14px;justify-content:center}
.end-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;padding:8px;border-radius:12px;background:rgba(246,239,217,.07);text-align:center}
.end-col-name{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--ivory-dim);text-align:center}
.end-col-pts{font-family:var(--f-num);font-weight:700;font-size:30px;text-align:center}
/* Bouton Nouvelle partie : libellé sur une seule ligne (toutes langues) ; si les deux boutons ne tiennent pas, ils s'empilent */
.end-dialog .dlg-actions{flex-wrap:wrap}
.end-dialog .dlg-actions>*{flex:1 0 auto;white-space:nowrap}
.end-dialog .dlg-actions .btn-roll,.end-dialog .dlg-actions .btn-ghost{white-space:nowrap;flex-wrap:nowrap}

/* ---------- popup compte ---------- */
.account-dialog{width:min(520px,calc(100vw - 24px))}
/* onglets du compte (Frédéric, 29/11 14:51) : trois colonnes égales, libellés centrés et alignés-milieu,
   marges intérieures égales ; libellé trop long : deux lignes centrées plutôt que déborder */
.tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-bottom:14px;padding:4px;border-radius:14px;background:rgba(0,0,0,.25)}
.tab{display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;padding:5px 14px;border-radius:10px;
  font-weight:700;font-size:13px;line-height:1.15;text-align:center;text-wrap:balance;color:var(--ivory-dim)}
@media (max-width:400px){.tab{font-size:12px;padding:5px 8px}}
@media (max-width:360px){.tabs{gap:2px;padding:3px}.tab{font-size:11px;padding:4px 5px}}
.tab[aria-selected="true"]{background:rgba(246,239,217,.12);color:var(--brass-300);box-shadow:inset 0 0 0 1.5px var(--brass-500)}
.acc-form{display:grid;gap:12px;margin-bottom:14px}
.field{display:grid;gap:4px;margin:0;padding:0;border:0;min-width:0}
.field>span,.field legend{font-size:13px;font-weight:700;letter-spacing:.06em;color:var(--ivory-dim);padding:0;margin-bottom:4px}
.field small{font-size:12px;color:var(--ivory-dim)}
.field input,.field select,.field textarea{width:100%;min-height:46px;padding:8px 12px;border-radius:10px;border:0;background:rgba(246,239,217,.94);color:var(--ink);font-size:16px}
.field input[aria-invalid="true"],.field select[aria-invalid="true"],.field textarea[aria-invalid="true"]{box-shadow:0 0 0 3px #E0786A}
.birth{display:grid;grid-template-columns:1fr 1.6fr 1.2fr;gap:8px}
.birth legend{grid-column:1/-1;float:left;width:100%}
.check{display:flex;align-items:center;gap:10px;font-size:14px}
.check input{width:22px;height:22px;accent-color:var(--brass-500)}
.acc-msg{margin:0 0 12px;padding:10px 14px;border-radius:10px;font-size:14px;font-weight:600;background:rgba(155,28,28,.35);box-shadow:inset 0 0 0 1px #E0786A}
.acc-msg.ok{background:rgba(31,112,80,.45);box-shadow:inset 0 0 0 1px var(--brass-500)}
.field-err{font-size:12.5px;font-weight:600;color:#F4A9A0}
.acc-hello{font-family:var(--f-title);font-weight:700;font-size:22px;color:var(--ivory);margin:0}

/* =========================================================
   Mises en page
   ========================================================= */
/* Large, paysage (ordinateur, iPad paysage) : feuille à gauche, jeu à droite */
@media (min-width:900px) and (min-aspect-ratio:1/1){
  .layout>.sheet .grid{width:calc(88px + 3 * clamp(74px, 9vw, 104px) + 12px)}
}
@media (min-width:900px) and (min-aspect-ratio:1/1) and (max-height:820px){
  :root{--die:84px}
  .big-score{font-size:60px}
  .tray{padding-top:18px}
}
@media (min-width:900px) and (min-aspect-ratio:1/1) and (max-width:1100px){
  :root{--die:76px}
  .actions .btn-roll{min-width:170px}
}

/* Portrait et petits écrans : une seule colonne, rien ne défile */
@media (max-width:899px), (max-aspect-ratio:1/1){
  :root{--rail:0px;--topbar:76px;--logo-h:64px;--foot:30px;--gap:10px;--die:80px;--cellf:22px}
  body{background:var(--felt-800)}
  .page{border-radius:0;box-shadow:none;padding:0 calc(14px + var(--sar)) 0 calc(14px + var(--sal))}
  .layout{display:flex;flex-direction:column;gap:var(--gap)}
  .play{display:contents}
  .status{order:1}
  .tray{order:2;padding:14px 10px 8px}
  .dice{padding-bottom:22px}
  .best{order:3;flex-direction:row;align-items:center;padding:8px 12px}
  .best-head{flex-direction:column;align-items:flex-start;gap:0;width:110px;flex:none}
  .best-list{flex:1;min-height:52px}
  .sheet{order:4;align-self:stretch;padding:4px 6px;flex:1 1 0}
  .status,.tray,.best,.actions{flex:none}
  .actions{order:5;margin-top:0}
  .layout>.sheet .grid{width:100%}
  .grid .corner{width:96px}
  .hint{margin-top:10px}
}
/* iPad portrait : 768×1024 */
@media (min-width:600px) and (max-aspect-ratio:1/1){
  .big-score{font-size:56px}
}
/* Téléphone */
@media (max-width:599px){
  :root{--topbar:60px;--logo-h:52px;--foot:36px;--gap:8px;--cellf:20px;
    --die:min(50px, calc((100vw - 28px - 5 * 7px - 20px) / 6))}
  .page{padding:0 calc(10px + var(--sar)) 0 calc(10px + var(--sal))}
  .status{padding:6px 12px 8px}
  .links{margin-left:-8px}
  .link-btn{font-size:13px;padding:2px 8px;min-height:28px}
  .status-main{align-items:center}
  .stat{flex-direction:row;align-items:center;gap:8px}
  .stat .label{font-size:10.5px}
  .turn{font-size:22px}.turn-max{font-size:15px}
  .pips i{width:13px;height:13px}
  .small{display:none}
  .big-score{font-size:34px}
  .score-label{font-size:10.5px}
  .tray{padding:10px 6px 6px;border-radius:14px}
  .dice{gap:7px;padding-top:8px;padding-bottom:0}
  .die::before{inset:-3px}
  .die-tag{display:none}
  .hint{margin-top:2px;font-size:11.5px;line-height:1.2}
  .best{display:none}
  .grid .corner{width:78px}
  .row-head{font-size:11.5px;gap:6px}
  .row-head>.row-die{margin-right:6px}
  .grid thead th{height:28px;font-size:10px}
  .arrow{width:18px;height:18px;margin-bottom:1px}
  .score-box{flex-direction:row;align-items:center;gap:8px}
  .btn-new{min-height:44px;padding:0 12px;font-size:11px}
  .actions,.actions-side,.actions-play{gap:8px}
  .actions-side .btn-new{padding:0 11px}
  .actions-side .btn-cap{display:none} /* téléphone : icônes seules (libellé en aria-label) */
  .actions-play{flex:1;justify-content:flex-end}
  :root{--roll-h:48px}
  .btn-undo{border-radius:12px}
  .actions .btn-roll{flex:1;min-width:0;max-width:220px;padding:0 12px;gap:8px;font-size:17px;border-radius:12px}
  .actions .btn-roll .roll-left{min-width:24px;height:24px;font-size:14px}
  .topbar{gap:6px}
  .icon-btn{min-width:34px;height:40px;padding:0 4px;border-radius:11px}
  .icon-cap{display:none}
  .icons{gap:3px}
  .ico-q{font-size:19px}
  .top-links{gap:4px;margin-left:0}
  .top-btn{min-height:40px;padding:0 7px;font-size:10.5px;letter-spacing:.02em;border-radius:10px}
  .foot{flex-direction:column;justify-content:center;gap:0;font-size:11px;line-height:1.1}
  .foot-menu .link-btn,.lang-btn{font-size:11px;padding:0 6px;min-height:20px}
  .copyright{font-size:10.5px;overflow:visible}
  .toast.is-big{font-size:30px}
  .sheet-dialog{padding:18px 14px}
  .dlg-title{font-size:24px}
  .rules-list{grid-template-columns:1fr;gap:2px}
  .rules-list dd{margin-bottom:8px}
}
/* Très peu de hauteur : on autorise le défilement plutôt que d'écraser la feuille */
@media (max-height:560px){
  body{overflow:auto}
  .page{height:auto;min-height:100%}
}

/* ---------- mouvements réduits ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* ---------- alertes animées (YAM, suite, full, carré, perfect, bonus) ---------- */
.stage{flex:1 1 auto;min-height:0;position:relative;pointer-events:none}
.tray{position:relative}
.alert{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;pointer-events:none;
  animation:alert-pop 1.7s var(--ease-throw) both}
.alert-text{font-family:var(--f-title);font-variation-settings:'opsz' 72,'SOFT' 100;font-weight:800;line-height:1;font-size:clamp(44px,8vw,104px);
  color:var(--brass-300);letter-spacing:.02em;text-shadow:0 4px 0 rgba(0,0,0,.45),0 0 34px rgba(246,214,117,.45)}
.alert-sub{font-size:13px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:var(--ivory)}
.alert-yam{animation:alert-yam 2.2s var(--ease-throw) both}
.alert-yam .alert-text{font-size:clamp(64px,13vw,170px);color:#FFE9A8}
.alert-perfect .alert-text{background:linear-gradient(180deg,#FFF3C4,var(--brass-300) 45%,var(--brass-500));-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;filter:drop-shadow(0 4px 0 rgba(0,0,0,.45))}
.alert-bonus .alert-text{color:#F3DC9A}
.tray>.alert{border-radius:inherit;background:rgba(6,36,24,.62)}
.tray>.alert .alert-text{font-size:clamp(36px,10vw,76px)}
.tray>.alert-yam .alert-text{font-size:clamp(48px,14vw,104px)}
@keyframes alert-pop{0%{opacity:0;transform:scale(.4)}14%{opacity:1;transform:scale(1.12)}24%{transform:scale(1)}80%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.04)}}
@keyframes alert-yam{0%{opacity:0;transform:scale(.3) rotate(-8deg)}12%{opacity:1;transform:scale(1.18) rotate(3deg)}20%{transform:scale(.96) rotate(-2deg)}28%{transform:scale(1.04) rotate(1deg)}36%{transform:scale(1) rotate(0)}82%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.06)}}
@keyframes alert-fade{0%{opacity:0}10%{opacity:1}85%{opacity:1}100%{opacity:0}}
@media (max-width:899px), (max-aspect-ratio:1/1){ .stage{display:none} }
@media (prefers-reduced-motion:reduce){ .alert,.alert-yam{animation:alert-fade 1.6s linear both} }
.stage{container-type:size}
.stage>.alert .alert-text{font-size:min(8vw,104px,62cqh)}
.stage>.alert-yam .alert-text{font-size:min(13vw,170px,80cqh)}
.alert-info{animation:alert-fade 1.9s ease-out both}
.alert-info .alert-text,.stage>.alert-info .alert-text,.tray>.alert-info .alert-text{font-family:var(--f-text);font-variation-settings:normal;font-size:17px;font-weight:600;letter-spacing:0;color:var(--ivory);text-shadow:none;
  padding:10px 18px;border-radius:14px;background:rgba(6,36,24,.88);box-shadow:inset 0 0 0 1.5px rgba(227,178,60,.7),0 10px 24px rgba(0,0,0,.4);max-width:90%;text-align:center}
.tray>.alert-info{background:none}

/* Contact (29/11/2026) : zone de message ; champ piège anti-robot hors écran (modèle SYLM, classe .hp) */
.field textarea{min-height:140px;resize:vertical;font-family:inherit;line-height:1.4}
.hp{position:absolute!important;left:-10000px!important;top:auto;width:1px;height:1px;overflow:hidden}
.btn-roll.is-busy{opacity:.7;cursor:progress}

/* Contact, connecté : nom et e-mail du compte verrouillés (Frédéric, 29/11 14:18) */
.field.is-locked input{background:rgba(246,239,217,.6) url(img/ui/cadenas.svg) no-repeat right 12px center/18px;color:#2E3A33;padding-right:42px;cursor:not-allowed;box-shadow:inset 0 0 0 2px rgba(20,32,26,.25)}
.field.is-locked>span::after{content:"";display:inline-block;width:12px;height:12px;margin-left:6px;vertical-align:-1px;background:url(img/ui/cadenas.svg) no-repeat center/contain;filter:invert(1)}

/* Scores (29/11 14:25) */
/* Fenêtre Scores (Frédéric, 29/11 22:09) : titre, onglets et Fermer restent visibles ; seul le contenu de l'onglet défile. Ne dépasse jamais l'écran (dont mobile et iPad). */
.js-dialog-scores[open]{display:flex;flex-direction:column;overflow:hidden;
  max-height:calc(100dvh - 32px - var(--sat) - var(--sab));
  max-height:calc(100svh - 32px - var(--sat) - var(--sab))}
.js-dialog-scores .dlg-title,.js-dialog-scores>.dlg-close{flex:none}
.js-dialog-scores .js-scores-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.js-dialog-scores .js-scores-tabs{flex:none}
.js-dialog-scores .scores-panel:not([hidden]){flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.scores-cta{width:100%;margin:2px 0 4px;padding:0 10px}
.scores-sum{margin:6px 0 0;font-weight:700;color:var(--ivory)}
/* Scores v25 : classement général, effacement de l'historique */
.board-list{margin:0;padding:0;list-style:none;display:grid;gap:6px}
.board-list li{display:flex;align-items:baseline;gap:12px;padding:6px 10px;border-radius:10px;background:rgba(246,239,217,.06)}
.board-list li.is-me{background:rgba(227,178,60,.18);box-shadow:inset 0 0 0 1.5px rgba(246,214,117,.6)}
.board-rank{min-width:26px;color:var(--ivory-dim);font-weight:700;font-variant-numeric:tabular-nums}
.board-pseudo{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
.board-score{font-family:var(--f-num);font-weight:700;font-size:22px;color:var(--brass-300);font-variant-numeric:tabular-nums}
.board-me{margin:8px 0 0;font-weight:700}
.board-more,.scores-clear{width:100%;margin-top:10px}
.scores-clear{min-height:44px;font-size:14px;color:#F4A9A0;border-color:rgba(244,169,160,.45)}
@media (max-width:359px){.scores-cta{letter-spacing:.03em;font-size:14px}}
/* v28 — onglets de la fenêtre Scores (Frédéric, 29/11 15:10) */
.tabs.tabs-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.tabs[hidden],.scores-panel[hidden]{display:none}
.js-scores-tabs .tab{white-space:nowrap}
.js-scores-tabs .lab-short{display:none}
@media (max-width:400px){.js-scores-tabs .lab-full{display:none}.js-scores-tabs .lab-short{display:inline}}
/* badges des classements (dessins de Louise, 29/11) : devant le pseudo, alignés sur le texte */
.badge{display:inline-block;flex:none;vertical-align:middle;object-fit:contain}
.badges{display:inline-flex;align-items:center;gap:2px;margin-right:4px;vertical-align:middle;white-space:nowrap}
.badges .badge{width:1.3em;height:1.3em}
.board-pseudo{display:flex;align-items:center;gap:6px;min-width:0}
.board-pseudo .badge{width:22px;height:22px}
.board-title{margin:0 0 10px;font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:var(--ivory-dim)}
.board-list li{align-items:center}
.board-name{min-width:0;overflow:hidden;text-overflow:ellipsis}
/* Pseudo selon le meilleur rang (Frédéric, 29/11 22:04) : 1 Hof/mois or, 2 argent, 3 bronze, 4-5 Hof gras */
.pseudo.is-rank-or,.pseudo.is-rank-argent,.pseudo.is-rank-bronze,.pseudo.is-rank-hof{font-weight:700}
.pseudo.is-rank-or{color:var(--rank-or)}
.pseudo.is-rank-argent{color:var(--rank-argent)}
.pseudo.is-rank-bronze{color:var(--rank-bronze)}
.pseudo.is-rank-hof{color:var(--ivory)}
.badge-gap{display:inline-block;flex:none;width:22px;height:22px}
/* v27 — popup Mon compte (Frédéric, 29/11 14:54 / 15:01) : 4 onglets égaux avec icône, gestion du compte, préférences */
.ico-gear{background-image:url(img/ui/roue.svg)}
.js-account-btn.is-logged .ico-user{background-image:url(img/ui/user-plein.svg)}
.tabs.tabs-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.tabs .tab[hidden]{display:none}
.tab{flex-direction:column;gap:3px;min-height:56px}
.tab-ico{display:block;flex:none;width:20px;height:20px;background:currentColor;-webkit-mask:center/contain no-repeat;mask:center/contain no-repeat}
.ti-user{-webkit-mask-image:url(img/ui/user.svg);mask-image:url(img/ui/user.svg)}
.ti-plus{-webkit-mask-image:url(img/ui/user-plus.svg);mask-image:url(img/ui/user-plus.svg)}
.ti-key{-webkit-mask-image:url(img/ui/cle.svg);mask-image:url(img/ui/cle.svg)}
.ti-card{-webkit-mask-image:url(img/ui/fiche.svg);mask-image:url(img/ui/fiche.svg)}
.ti-gear{-webkit-mask-image:url(img/ui/roue.svg);mask-image:url(img/ui/roue.svg)}
.ti-out{-webkit-mask-image:url(img/ui/deconnexion.svg);mask-image:url(img/ui/deconnexion.svg)}
.tab .lab-short{display:none}
.acc-panel{display:grid;gap:12px;margin-bottom:14px}
.acc-panel[hidden]{display:none}
.acc-id{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0;padding:10px 14px;border-radius:12px;background:rgba(246,239,217,.06)}
.acc-id dt{font-size:13px;font-weight:700;letter-spacing:.06em;color:var(--ivory-dim)}
.acc-id dd{margin:0;font-weight:700;min-width:0;overflow-wrap:anywhere}
.acc-sec{border-radius:12px;background:rgba(0,0,0,.18);box-shadow:inset 0 0 0 1px rgba(246,239,217,.14)}
.acc-sec>summary{cursor:pointer;padding:12px 14px;font-weight:700;list-style-position:inside}
.acc-sec[open]>summary{color:var(--brass-300)}
.acc-sec>.acc-form{margin:0;padding:0 14px 14px}
.acc-danger>summary{color:#F4A9A0}
.btn-danger{color:#F4A9A0;box-shadow:inset 0 0 0 2px rgba(244,169,160,.6)}
.btn-danger.is-armed{background:rgba(155,28,28,.45);color:#FFF1EC}
.form-msg{margin:0;padding:8px 12px;border-radius:10px;font-size:14px;font-weight:600;background:rgba(155,28,28,.35);box-shadow:inset 0 0 0 1px #E0786A}
.form-msg.ok{background:rgba(31,112,80,.45);box-shadow:inset 0 0 0 1px var(--brass-500)}
.link-inline{color:var(--brass-300);text-decoration:underline;text-underline-offset:2px}
.pref-lang{display:flex;flex-direction:column;align-items:stretch;gap:8px;width:100%}
.pref-label{font-weight:600;font-size:14px;margin:0}
.pref-lang-btn{min-height:40px;padding:0 8px;border-radius:10px;box-shadow:inset 0 0 0 1.5px rgba(246,239,217,.35);font-size:14px;letter-spacing:0;font-weight:600;white-space:nowrap}
.pref-lang-btn[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--brass-500);color:var(--brass-300)}
/* 7 langues : grille 4 colonnes égales ; ligne 1 = 1-4, ligne 2 = 5-7 (case vide sous le 4e) */
.lang-btns{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:100%;justify-items:stretch}
.lang-btns .pref-lang-btn{min-width:0;width:auto;text-align:center}
.legal-privacy{margin-top:0}
@media (max-width:400px){.tab{font-size:11px;padding:5px 4px}.tab .lab-full.has-short{display:none}.tab .lab-short{display:block}}
@media (max-width:340px){.tab{font-size:10.5px;padding:4px 2px}}
.js-scores-tabs .tab{min-height:44px}
/* drapeaux et dates des classements (Frédéric, 29/11 15:40) */
.flag{display:inline-block;flex:none;width:20px;height:15px;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.35);vertical-align:middle;object-fit:cover}
.board-date{flex:none;font-size:12px;color:var(--ivory-dim);white-space:nowrap}
.board-list li{gap:8px}
.hall li .flag{margin-right:2px}
@media (max-width:360px){.board-list li{gap:6px;padding:6px 8px}.board-date{font-size:11px}}
.flag-gap{display:inline-block;flex:none;width:20px;height:15px}
.board-score{flex:none}
.board-pseudo{flex:1 1 auto}
@media (max-width:400px){.board-list li{gap:6px;padding:6px 8px}.board-rank{min-width:20px}.board-pseudo{gap:4px}.board-score{font-size:19px}.board-pseudo .badge,.badge-gap{width:20px;height:20px}}
@media (max-width:360px){.board-list li{gap:4px;padding:5px 6px}.board-rank{min-width:16px;font-size:13px}.board-date{font-size:10.5px}.board-score{font-size:17px}.board-pseudo .badge,.badge-gap{width:18px;height:18px}.flag,.flag-gap{width:18px;height:13.5px}}

html[lang="ru"]{--f-title:'DM Sans',Georgia,serif}
html[lang="zh"]{--f-title:'Noto Sans SC','DM Sans',sans-serif;--f-text:'Noto Sans SC','DM Sans',system-ui,sans-serif;--f-num:'Barlow Condensed','Noto Sans SC',sans-serif}
html[lang="ja"]{--f-title:'Noto Sans JP','DM Sans',sans-serif;--f-text:'Noto Sans JP','DM Sans',system-ui,sans-serif;--f-num:'Barlow Condensed','Noto Sans JP',sans-serif}
.lang-menu{margin:0 0 16px}
.foot-lang{flex-wrap:wrap;row-gap:0;max-width:100%}
@media (max-width:599px){
  .lang-btns{gap:6px}
  .pref-lang-btn{font-size:12.5px;padding:0 4px;min-height:40px}
}
