/* Marché de nuit de Shangho : pixel art agrandi par facteur entier, aplats de nuit, aucun trait, cadre, arrondi ni ombre */
:root {
  --k: 3;
  --nuit0: #0c0820; --nuit1: #160e36; --nuit2: #22164c; --nuit3: #30205e; --nuit4: #46286a;
  --sol: #130b2a; --sol2: #0f0822; --sol3: #07040f;
  --creme: #fff4e0; --or: #ffc830; --braise: #ff7a3a; --prune: #2a0a1c; --terne: #8a78b0;
  color-scheme: dark;
}
@media (max-width: 560px) { :root { --k: 2; } }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--nuit0); color: var(--creme); }
body { min-height: 100vh; display: flex; flex-direction: column; 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; }

.ciel { background: var(--nuit1) url(/img/ciel.png) center / 100% 100% no-repeat; padding: calc(8px * var(--k)) 16px 0; text-align: center; }
.logo { display: flex; justify-content: center; align-items: flex-end; gap: calc(6px * var(--k)); flex-wrap: wrap; }
.logo img:first-child { width: calc(88px * var(--k)); height: calc(20px * var(--k)); }
.logo img:last-child { width: calc(76px * var(--k)); height: calc(20px * var(--k)); }
.corde { position: relative; width: calc(240px * var(--k)); max-width: 100%; margin: calc(4px * var(--k)) auto 0; aspect-ratio: 240 / 64; }
.corde canvas { width: 100%; height: 100%; }
.lanternes { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; }
.lanternes button { flex: 1; height: 100%; }
.nom-jeu { min-height: calc(14px * var(--k)); display: flex; justify-content: center; padding-bottom: calc(4px * var(--k)); }

main { flex: 1; width: 100%; }
.reglages { background: var(--nuit2); padding: calc(4px * var(--k)) 16px; display: flex; flex-direction: column; gap: calc(2px * var(--k)); }
.choix { display: flex; flex-wrap: wrap; justify-content: center; column-gap: calc(3px * var(--k)); row-gap: calc(1px * var(--k)); }
.choix button { padding: calc(1px * var(--k)) 0; }
.pays { align-items: center; }

.tableau { padding: calc(8px * var(--k)) 16px calc(6px * var(--k)); }
.titre { display: flex; justify-content: center; margin-bottom: calc(4px * var(--k)); }
table { width: 100%; max-width: calc(160px * var(--k)); margin: 0 auto; border-collapse: collapse; }
th > div, td > div { display: flex; }
td, th { padding: calc(1px * var(--k)) calc(3px * var(--k)); }
thead th { padding-bottom: calc(2px * var(--k)); }
td:nth-child(1) > div, th:nth-child(1) > div { justify-content: flex-start; }
td:nth-child(3) > div, th:nth-child(3) > div { justify-content: flex-end; }
td:nth-child(2) > div, td:nth-child(4) > div, th:nth-child(2) > div, th:nth-child(4) > div { justify-content: center; }
tbody tr:nth-child(odd) { background: var(--nuit1); }
tbody tr:nth-child(even) { background: var(--nuit0); }
.vide { display: flex; flex-direction: column; align-items: center; gap: calc(3px * var(--k)); padding: calc(6px * var(--k)) 0; }
.vide[hidden] { display: none; }

.defi { background: var(--nuit3); padding: calc(6px * var(--k)) 16px; display: flex; flex-direction: column; align-items: center; gap: calc(2px * var(--k)); }
.defi p { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(3px * var(--k)); }

.sol { background: var(--sol); padding: calc(4px * var(--k)) 16px calc(6px * var(--k)); display: flex; align-items: flex-end; justify-content: center; gap: calc(4px * var(--k)); }
.shangho { width: calc(36px * (var(--k) + 1)); height: calc(40px * (var(--k) + 1)); flex: none; }
.sol p { display: flex; flex-wrap: wrap; gap: calc(3px * var(--k)); max-width: calc(160px * var(--k)); padding-bottom: calc(4px * var(--k)); }
.sans-js { padding: 16px; text-align: center; }
