/* Écran de scores d'une borne : pixel art agrandi par facteur entier --k (posé par page.js), aplats de nuit, page fixe ;
   aucun trait, cadre, arrondi ni ombre. Toutes les mesures sont des pixels natifs fois --k. */
:root { --k: 2; color-scheme: dark; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #0c0820; color: #fff4e0; }
body { position: relative; min-height: 100vh; font: 16px/1.4 ui-monospace, monospace; overflow-x: hidden; }
img, canvas { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
button:focus { outline: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.txt { display: inline-flex; flex-wrap: wrap; justify-content: center; column-gap: calc(2px * var(--k)); }

/* Fond : nuit, étoiles et toits dessinés une fois par page.js, sous toute la page ; la toile déborde d'un pixel natif au plus, coupé ici */
.nuit { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; z-index: 0; }
#fond { position: absolute; left: 0; top: 0; }

/* Colonne centrée dans la hauteur au-dessus de la scène du bas (toits, rue, Shangho) : logo, jeu, réglages, dix places, défi, note */
.borne { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(2px * var(--k)) 8px calc((var(--sol, 10) + 50) * var(--k) * 1px); }
.etroit .borne { padding-top: calc(6px * var(--k)); padding-bottom: calc(62px * var(--k)); }
.logo { display: flex; justify-content: center; gap: calc(4px * var(--k)); margin-bottom: calc(2px * var(--k)); }
.etroit .logo { gap: calc(3px * var(--k)); margin-bottom: calc(2px * var(--k)); }

/* Sélecteurs ◀ LIBELLÉ ▶ : le jeu seul sur sa ligne, puis mode, période et pays sur une ligne quand la largeur le permet */
.sel { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.sel button { padding: 0 calc(2px * var(--k)); flex: none; }
.sel .lib { display: flex; justify-content: center; min-width: 0; }
.jeu { margin-bottom: calc(1px * var(--k)); }
.reglages, .filtres { display: flex; flex-wrap: wrap; justify-content: center; column-gap: calc(8px * var(--k)); max-width: 100%; }
.etroit .reglages { flex-direction: column; align-items: center; }
.reglages {
  margin-bottom: calc(3px * var(--k)); }

/* Tableau : en-têtes ternes puis dix rangées de 12 pixels natifs ; rang à droite avec la médaille, initiales, score à droite, pays */
.tableau { position: relative; }
table { border-collapse: collapse; }
td, th { padding: 0; height: calc(12px * var(--k)); vertical-align: top; font-weight: normal; }
td > div, th > div { display: flex; align-items: flex-start; height: calc(12px * var(--k)); }
td:nth-child(1) > div, th:nth-child(1) > div { justify-content: flex-end; width: calc(32px * var(--k)); gap: calc(1px * var(--k)); }
td:nth-child(2) > div, th:nth-child(2) > div { padding-left: calc(6px * var(--k)); }
td:nth-child(3) > div, th:nth-child(3) > div { justify-content: flex-end; padding-left: calc(6px * var(--k)); min-width: calc(50px * var(--k)); }
td:nth-child(4) > div, th:nth-child(4) > div { padding-left: calc(6px * var(--k)); width: calc(32px * var(--k)); }
.txt canvas { flex: none; }
.medaille { margin-right: auto; }
th[hidden] { display: none; }
.vide { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-wrap: nowrap; justify-content: center; column-gap: calc(4px * var(--k)); }
.sans-score thead { visibility: hidden; }
.vide canvas { margin-bottom: calc(-2px * var(--k)); }

.defi { margin-top: calc(2px * var(--k)); max-width: 100%; }
.defi p { display: flex; flex-wrap: wrap; justify-content: center; column-gap: calc(4px * var(--k)); }

/* Pied : note d'une ligne sous le défi ; Shangho assis dans le coin bas droit, sur la rue, sous le texte sur un écran étroit */
.pied { width: 100%; display: flex; justify-content: center; margin-top: calc(1px * var(--k)); }
.pied p { display: flex; flex-wrap: wrap; justify-content: center; column-gap: calc(2px * var(--k)); }
.shangho { position: absolute; right: calc(6px * var(--k)); bottom: 0; }
.sans-js { position: relative; z-index: 1; padding: 16px; text-align: center; }
