/* The Last — page d'accueil « Nether ». Les textures sont dessinées par nether.js (aucune image externe). */

:root {
  --bg: #0a0608;
  --fg: #f6efe8;
  --fg-2: #dccfc5;
  --fg-3: #a3948e;
  --ember: #ff6b2c;
  --gold: #ffb547;
  --soul: #6fe6f2;
  --px: 3px;                       /* taille d'un pixel de texture dans les strates */
  --b: calc(var(--px) * 16);       /* un bloc */
  --u: 3px;                        /* épaisseur des bordures « pixel » */
  --pin: 95vh;                     /* longueur du plan-séquence : la caméra descend vers le pêcheur */
  --notch: polygon(var(--u) 0, calc(100% - var(--u)) 0, calc(100% - var(--u)) var(--u), 100% var(--u),
    100% calc(100% - var(--u)), calc(100% - var(--u)) calc(100% - var(--u)), calc(100% - var(--u)) 100%,
    var(--u) 100%, var(--u) calc(100% - var(--u)), 0 calc(100% - var(--u)), 0 var(--u), var(--u) var(--u));
  color-scheme: dark;
}
@media (max-width: 700px) { :root { --px: 2px; --u: 2px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--fg);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffd9a0; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 99; padding: 10px 14px; background: #000; color: #fff; }
.skip:focus { top: 12px; }

/* ---------- Titres en pixels (dessinés par nether.js) ---------- */
.px { display: flex; flex-wrap: wrap; gap: 0 calc(var(--fs, 3px) * var(--k, 1) * 4); margin: 0; --k: 1; color: #fff; }
.px svg {
  display: block; flex: none;
  width: calc(var(--fs, 3px) * var(--k) * var(--w));
  height: calc(var(--fs, 3px) * var(--k) * 12);
  filter: drop-shadow(calc(var(--fs, 3px) * var(--k)) calc(var(--fs, 3px) * var(--k)) 0 #3f3f3f);
}
@media (max-width: 700px) { .px { --k: .75; } }
@media (max-width: 420px) { .px { --k: .625; } }

/* ---------- Boutons et panneaux ---------- */
.btn, .tbtn {
  --c: #2c1f1e; --hi: #57403b; --lo: #140c0c;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer; text-decoration: none; text-align: center;
  color: var(--fg); background: var(--c);
  font: 600 13px/1.2 "Sora", sans-serif; letter-spacing: .08em; text-transform: uppercase;
  padding: 12px 16px;
  box-shadow: inset 0 0 0 var(--u) #060304, inset calc(var(--u) * 2) calc(var(--u) * 2) 0 var(--hi),
    inset calc(var(--u) * -2) calc(var(--u) * -2) 0 var(--lo);
  clip-path: var(--notch);
  transition: filter .12s, transform .08s;
}
.btn:hover, .tbtn:hover { color: var(--fg); filter: brightness(1.18); }
.btn:active, .tbtn:active { transform: translateY(2px); }
.btn-main, .tbtn-main, .tab[aria-selected="true"] { --c: #e7591d; --hi: #ffa066; --lo: #9c300c; color: #1c0a03; font-weight: 700; }
.btn-main:hover, .tbtn-main:hover { color: #1c0a03; }
.btn-big { padding: 18px 26px; font-size: 15px; }
.btn-sm { padding: 10px 12px; font-size: 12px; }
.btn[disabled] { --c: #3a2d2b; --hi: #584541; --lo: #1f1514; color: #c4b5ad; cursor: not-allowed; filter: none; transform: none; }

.panel {
  background: #191113;
  box-shadow: inset 0 0 0 var(--u) #050304, inset calc(var(--u) * 2) calc(var(--u) * 2) 0 #4f3a35,
    inset calc(var(--u) * -2) calc(var(--u) * -2) 0 #0d0808;
  clip-path: var(--notch);
}
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 8px 12px; background: rgb(12 5 6 / .78); color: #ffe9c9;
  font: 600 12px/1.3 "Sora", sans-serif; letter-spacing: .07em; text-transform: uppercase;
  box-shadow: inset 0 0 0 2px #050304, inset 4px 4px 0 rgb(255 181 71 / .22);
}
.pill i { flex: none; width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: blink 1.6s step-end infinite; }
.note { color: #e2d3c8; font-size: 13.5px; text-shadow: 0 1px 0 #000, 0 0 10px rgb(0 0 0 / .8); }
.sub { margin: 14px 0 26px; max-width: 640px; color: #fbeadb; font-size: 17px; text-shadow: 0 1px 0 #000, 0 0 12px rgb(0 0 0 / .85); }
.wrap { position: relative; width: min(1080px, 100%); margin: 0 auto; }
.wrap-narrow { width: min(760px, 100%); }

/* ---------- En-tête ---------- */
.top {
  position: fixed; z-index: 30; inset: 0 0 auto 0; height: 60px;
  display: flex; align-items: center; gap: 12px; padding: 0 14px; pointer-events: none;
}
.top::before { content: ""; position: absolute; inset: 0 0 -26px; z-index: -1; background: linear-gradient(rgb(8 4 6 / .8), rgb(8 4 6 / 0)); }
.top.solid::before { background: linear-gradient(rgb(8 4 6 / .97) 55%, rgb(8 4 6 / 0)); }
.top > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none;
  font: 700 14px/1 "Sora", sans-serif; letter-spacing: .22em;
  opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s;
}
.brand:hover { color: #fff; }
.top.solid .brand, html:not(.js) .brand { opacity: 1; transform: none; }
.top nav { display: flex; gap: 8px; margin-left: auto; }
.top .tbtn { padding: 10px 13px; font-size: 12px; }

/* ---------- Jauge de profondeur ---------- */
.depth { position: fixed; z-index: 25; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.depth ol { list-style: none; margin: 0; padding: var(--u); display: flex; flex-direction: column; gap: var(--u); background: #050304; }
.depth a { display: block; position: relative; width: 22px; height: 22px; background: #3a2020 0 0 / 100% 100%; image-rendering: pixelated; filter: brightness(.55) saturate(.8); transition: filter .2s; }
.depth a:hover, .depth a[aria-current="true"] { filter: none; }
.depth a[aria-current="true"] { outline: var(--u) solid #fff; z-index: 1; }
.depth a span {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  white-space: nowrap; padding: 4px 9px; background: rgb(16 2 18 / .95); outline: 2px solid #3a12a8;
  font: 600 12px/1.4 "Sora", sans-serif; color: #fff; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.depth a:hover span, .depth a:focus-visible span { opacity: 1; }
.depth-y { display: none; margin: 0; padding: 3px 6px; background: rgb(5 3 4 / .75); color: #ffe2bf; font: 700 11px/1.3 "Sora", sans-serif; letter-spacing: .08em; white-space: nowrap; }
@media (max-width: 700px), (pointer: coarse) { .depth { display: none; } }

/* ---------- Le lac : une scène 3D fixée derrière la page, pilotée par le défilement ---------- */
main { position: relative; overflow-x: clip; }
#scene { position: fixed; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; background: #0a0406; opacity: 0; transition: opacity .9s; }
.ready.gl #scene { opacity: 1; }
.no-gl #scene { display: none; }
.hero { position: relative; height: calc(100vh + var(--pin)); height: calc(100svh + var(--pin)); min-height: 560px; }
.no-gl .hero, html:not(.js) .hero { --pin: 0px; background: #1a0806 url("hero-poster.jpg") center / cover no-repeat; }
@media (max-aspect-ratio: 4/5) { .no-gl .hero, html:not(.js) .hero { background-image: url("hero-poster-tall.jpg"); background-position: center top; } }
.hero-ui { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 560px; pointer-events: none; }
.hero-ui > * { pointer-events: auto; }
.loader { position: absolute; left: 0; right: 0; top: 46%; margin: 0; display: flex; justify-content: center; transition: opacity .5s; }
.loader .px { justify-content: center; animation: blink 1.2s step-end infinite; }
.ready .loader, html:not(.js) .loader { opacity: 0; pointer-events: none; }
.no-gl .loader { display: none; }
.hero-cap {
  position: absolute; right: 16px; bottom: 16px; max-width: min(42vw, 520px); margin: 0;
  padding: 10px 14px 11px; background: rgb(10 4 5 / .74); box-shadow: inset 0 0 0 2px #050304, inset 4px 4px 0 rgb(255 181 71 / .2);
  transition: opacity .3s;
}
.cap-k { display: flex; align-items: center; gap: 10px; margin: 0; color: #ffe9c9; }
.cap-k i { flex: none; width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: blink 1.6s step-end infinite; }
.cap-l { margin: 6px 0 0; color: #f3e4d8; font-size: 14.5px; line-height: 1.45; }
.hero-hint {
  position: absolute; left: calc(50% + 22px); bottom: 16px; padding: 8px 10px; text-decoration: none;
  background: rgb(12 5 6 / .78); box-shadow: inset 0 0 0 2px #050304;
  animation: nudge 1.2s step-end infinite; transition: opacity .3s;
}
.scrolled .hero-hint, .scrolled .hero-cap { opacity: 0; pointer-events: none; }
@media (max-width: 700px), (max-aspect-ratio: 4/5) {
  .hero-cap { top: 64px; bottom: auto; left: 10px; right: auto; max-width: calc(100% - 20px); padding: 8px 10px; }
}
@media (max-width: 700px) {
  .cap-l { display: none; }
  .cap-l { font-size: 13px; }
}
@keyframes blink { 50% { opacity: .25; } }
@keyframes nudge { 50% { transform: translateY(5px); } }

/* ---------- La canne à pêche ---------- */
#rig { position: fixed; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
html:not(.js) #rig, .no-gl #rig { display: none; }
#rig i { position: absolute; left: 0; top: 0; display: block; will-change: transform; }
.rig-line {
  width: 2px; margin-left: -1px; transform-origin: 50% 0;
  background: linear-gradient(to bottom, #171011 0, #171011 var(--air, 0px), rgb(40 14 6 / .78) var(--air, 0px));
  box-shadow: 0 0 2px rgb(255 226 170 / .55);
}
/* le flotteur du jeu : 8 x 8 texels de 3 px (2 px sur téléphone) ; la ligne s'attache en haut de la bouée */
.rig-bob {
  width: 24px; height: 24px; margin: -3px 0 0 -13.5px; background: url("mc/fishing_hook.png") center / 100% 100% no-repeat; image-rendering: pixelated;
  filter: drop-shadow(0 0 4px rgb(255 220 120 / .6)); transition: opacity .2s;
}
.rig-bob.sunk { filter: drop-shadow(1px 0 0 #2a0c02) drop-shadow(-1px 0 0 #2a0c02) drop-shadow(0 1px 0 #2a0c02) drop-shadow(0 0 6px rgb(255 230 160 / .8)); }
@media (max-width: 700px) { .rig-bob { width: 16px; height: 16px; margin: -2px 0 0 -9px; } }

/* ---------- Strates ---------- */
.stratum { position: relative; isolation: isolate; padding: calc(var(--b) * 3) 16px calc(var(--b) * 4.5); }
[id] { scroll-margin-top: 64px; }
.stratum::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background: var(--col, #201012) var(--tile, none) 0 0 / var(--ts, var(--b)) auto;
  image-rendering: pixelated;
}
.stratum::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(to bottom, rgb(var(--vc, 10 3 4) / 0), rgb(var(--vc, 10 3 4) / var(--va, .45)) calc(var(--b) * 5),
    rgb(var(--vc, 10 3 4) / var(--va, .45)) calc(100% - var(--b) * 9), rgb(var(--vc, 10 3 4) / .1) calc(100% - var(--b) * 3));
}
.blend, .seep {
  position: absolute; left: 0; right: 0; pointer-events: none; image-rendering: pixelated;
  background-repeat: repeat-x; background-size: calc(var(--px) * 512) auto;
}
.blend { bottom: 100%; height: calc(var(--b) * 6); background-image: var(--blend); background-position: 0 100%; z-index: 2; }
.seep { top: 0; height: calc(var(--b) * 3); background-image: var(--seep); background-position: 0 0; z-index: -1; }

.s-lava { padding-top: 24vh; padding-bottom: calc(var(--b) * 6); }
.s-lava::before, .s-lava::after { display: none; }
.no-gl .s-lava, html:not(.js) .s-lava { background: #c8480c var(--lava, none) 0 0 / calc(var(--px) * 32) auto; image-rendering: pixelated; }
.s-magma {
  --col: #3d150c; --tile: var(--t-magma); --ts: calc(var(--px) * 256); --blend: var(--b-magma); --seep: var(--s-magma);
  --va: .42;
}
.s-magma .wrap::before {
  content: ""; position: absolute; inset: -10% -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 18% 30%, rgb(255 120 30 / .26), transparent 55%), radial-gradient(ellipse at 84% 72%, rgb(255 90 20 / .22), transparent 55%);
  animation: breathe 4.5s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .35; } }
.s-rack {
  --col: #5d2325; --tile: var(--t-rack); --ts: calc(var(--px) * 640); --blend: var(--b-rack); --seep: var(--s-rack);
  --vc: 12 3 5; --va: .5;
}
.s-soul {
  --col: #44342a; --tile: var(--t-soul); --ts: calc(var(--px) * 640); --blend: var(--b-soul); --seep: var(--s-soul);
  --vc: 5 10 12; --va: .5;
}
.s-bedrock::after { background: linear-gradient(to bottom, rgb(4 4 5 / 0), rgb(4 4 5 / .86) calc(var(--b) * 2)); }
.s-bedrock {
  --col: #232323; --tile: var(--t-bedrock); --ts: calc(var(--px) * 128); --blend: var(--b-bedrock);
  padding-top: calc(var(--b) * 2.5); padding-bottom: 44px; color: var(--fg-3); font-size: 14px;
}

/* ---------- La prise : le launcher ---------- */
.catch { position: relative; width: min(620px, 100%); margin: 0 auto; scroll-margin-top: 20vh; transform-origin: 50% 0; }
.catch .ring {
  position: absolute; left: 50%; top: calc(var(--u) * -5); z-index: 1;
  width: calc(var(--u) * 6); height: calc(var(--u) * 6); margin-left: calc(var(--u) * -3);
  box-shadow: inset 0 0 0 var(--u) #e4e9ee, inset 0 0 0 calc(var(--u) * 2) #6b7078;
}
.catch .panel { padding: 40px 28px 24px; text-align: center; }
.catch .px { justify-content: center; }
.lead { margin: 16px auto 22px; max-width: 460px; color: var(--fg-2); }
.dl-meta { margin: 12px 0 0; color: var(--fg-3); font-size: 13px; }
.only { margin: 18px auto 0; max-width: 470px; color: var(--fg-3); font-size: 13px; }
.js .catch { transform: translateY(28px); filter: brightness(.5) saturate(.7); transition: transform .5s cubic-bezier(.3, 1.8, .5, 1), filter .45s; }
.js .catch:not(.hooked) { animation: drop .5s cubic-bezier(.3, 1.8, .5, 1), sway 5s ease-in-out .5s infinite; }
@keyframes drop { from { transform: none; } }
.js .catch.hooked { transform: none; filter: none; animation: swing 2.2s ease-in-out 1; }
@keyframes sway { 50% { transform: translateY(36px) rotate(.5deg); } }
@keyframes swing { 0% { transform: translateY(28px); } 16% { transform: translateY(-12px) rotate(1.4deg); } 40% { transform: rotate(-1deg); } 65% { transform: rotate(.5deg); } 100% { transform: none; } }

/* Barre d'objets et infobulle */
.tips { list-style: none; margin: 22px 0 0; padding: 0; text-align: left; display: grid; gap: 10px; }
.tips strong { display: block; color: var(--gold); }
.tips span { color: var(--fg-2); font-size: 14.5px; }
.hotbar { display: flex; width: max-content; max-width: 100%; margin: 24px auto 0; padding: var(--u); background: #050304; }
.slot {
  position: relative; display: grid; place-items: center; flex: none; width: 56px; height: 56px; padding: 0; border: 0;
  background: #2b1f20; box-shadow: inset var(--u) var(--u) 0 #120b0c, inset calc(var(--u) * -1) calc(var(--u) * -1) 0 #523f3f;
}
button.slot { cursor: pointer; }
.slot canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.slot[aria-selected="true"] { outline: var(--u) solid #fff; z-index: 1; background: #3d2c2c; }
.tip {
  margin: 12px auto 0; max-width: 460px; min-height: 98px; padding: 12px 14px; text-align: left;
  background: rgb(16 2 18 / .95); border: 2px solid; border-image: linear-gradient(#5a22ff, #2a0a80) 1; outline: 2px solid #100010;
}
.tip strong { display: block; color: var(--gold); font: 600 15px/1.4 "Sora", sans-serif; }
.tip span { color: #c5bcd6; font-size: 14.5px; }
@media (max-width: 420px) { .slot { width: 46px; height: 46px; } .slot canvas { width: 32px; height: 32px; } .catch .panel { padding: 34px 16px 20px; } }

/* ---------- Tableaux ---------- */
.paintings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: calc(var(--b) * .6); }
.painting {
  display: block; padding: calc(var(--px) * 4); border: 0; cursor: zoom-in; text-align: left; color: var(--fg);
  background: #6b4a2b var(--oak, none) 0 0 / calc(var(--px) * 16) auto; image-rendering: pixelated;
  box-shadow: inset 0 0 0 var(--u) #1e120a, inset calc(var(--u) * 2) calc(var(--u) * 2) 0 #93653c,
    inset calc(var(--u) * -2) calc(var(--u) * -2) 0 #3a2414, 0 calc(var(--u) * 2) 0 rgb(0 0 0 / .5);
  transition: transform .15s;
}
.painting:hover { transform: translateY(-4px) rotate(-.4deg); }
.painting img { display: block; width: 100%; height: auto; image-rendering: auto; box-shadow: 0 0 0 var(--u) #1e120a, 0 0 0 calc(var(--u) * 2) rgb(0 0 0 / .35); }
.painting:nth-child(odd) { rotate: -.6deg; } .painting:nth-child(even) { rotate: .5deg; }
.painting span { display: block; padding: 10px 4px 2px; color: #fff3df; text-shadow: 1px 1px 0 #2a1608; font: 600 12.5px/1.3 "Sora", sans-serif; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Boutique ---------- */
.shop-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; margin-bottom: 26px; }
.shop-head .sub { margin-bottom: 16px; }
.keeper { display: flex; align-items: flex-start; gap: 12px; margin-left: auto; }
.keeper-pig { flex: none; display: block; width: 172px; height: 200px; margin: -30px -10px -22px 0; }
.keeper-pig canvas { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 0 rgb(0 0 0 / .35)); }
.bubble {
  position: relative; margin: 6px 0 0; padding: 7px 10px; max-width: 230px; background: rgb(0 0 0 / .62); color: #fff;
  font: 500 14px/1.4 "Inter", sans-serif; text-shadow: 1px 1px 0 #3f3f3f;
}
.bubble b { color: #ffd35a; font-weight: 700; }
.bubble::after { display: none; content: ""; position: absolute; left: 100%; top: 14px; width: calc(var(--u) * 2); height: calc(var(--u) * 2); background: #fff3df; box-shadow: var(--u) 0 0 #1a0c04, 0 var(--u) 0 #1a0c04, 0 calc(var(--u) * -1) 0 #1a0c04; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.item { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; padding: 18px; transition: transform .15s; }
.item:hover { transform: translateY(-3px); }
.slot.big { width: 72px; height: 72px; background: radial-gradient(circle, #5a4038 0, #3a2a28 55%, #2b1f20 80%); }
.slot.big canvas { width: 48px; height: 48px; }
.item h3 { margin: 0 0 4px; font: 600 17px/1.25 "Sora", sans-serif; }
.item p { margin: 0; color: var(--fg-2); font-size: 14px; line-height: 1.5; }
.item-buy { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { color: var(--gold); font: 700 18px/1 "Sora", sans-serif; white-space: nowrap; }
.fly { position: fixed; z-index: 60; pointer-events: none; image-rendering: pixelated; }

.cartbar {
  position: fixed; z-index: 40; left: 8px; right: 8px; bottom: 12px; width: max-content; max-width: calc(100vw - 16px); margin-inline: auto;
  display: flex; align-items: center; gap: 12px; padding: calc(var(--u) * 3);
  background: #191113; box-shadow: inset 0 0 0 var(--u) #050304, inset calc(var(--u) * 2) calc(var(--u) * 2) 0 #4f3a35, 0 8px 30px rgb(0 0 0 / .6);
  transform: translateY(180%); transition: transform .35s cubic-bezier(.3, 1.5, .5, 1);
}
.cartbar.on.near { transform: none; }
.cartbar .btn { white-space: nowrap; }
.has-cart #boutique { padding-bottom: calc(var(--b) * 4.5 + 90px); }
.cart-slots { display: flex; min-width: 44px; }
.cart-slots .slot { width: 44px; height: 44px; }
.cart-slots .slot canvas { width: 32px; height: 32px; }
.slot .n { position: absolute; right: 4px; bottom: 1px; color: #fff; font: 700 12px/1.2 "Sora", sans-serif; text-shadow: 1px 1px 0 #3a3a3a, 0 0 4px #000; }
.cart-total { color: var(--gold); font: 700 15px/1 "Sora", sans-serif; white-space: nowrap; }
@media (max-width: 560px) { .cart-slots .slot:nth-child(n+4) { display: none; } .cartbar { gap: 8px; } }

dialog { border: 0; padding: 0; background: none; color: var(--fg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
dialog::backdrop { background: rgb(6 2 3 / .82); }
.chest { padding: 24px; }
.chest h2 { margin: 0 0 12px; font: 700 20px/1.2 "Sora", sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.line { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 2px solid #2c1e20; }
.line .slot { width: 44px; height: 44px; }
.line .slot canvas { width: 32px; height: 32px; }
.line-name { font: 600 15px/1.3 "Sora", sans-serif; overflow-wrap: anywhere; }
.line .price { font-size: 15px; text-align: right; }
.qty { display: inline-flex; align-items: center; }
.qty b { min-width: 28px; text-align: center; }
.qty button { width: 30px; height: 30px; border: 0; cursor: pointer; background: #2c1f1e; color: var(--fg); font: 700 16px/1 "Sora", sans-serif; box-shadow: inset 0 0 0 2px #060304, inset 4px 4px 0 #57403b; }
.chest-sum { display: flex; justify-content: space-between; margin: 16px 0; font: 600 16px/1 "Sora", sans-serif; }
.chest-total { color: var(--gold); font-size: 20px; }
.chest-pay { display: flex; flex-wrap: wrap; gap: 10px; }
.chest-pay .btn-main { flex: 1; }
.chest .note { text-shadow: none; color: var(--fg-3); }
#lightbox { width: auto; max-width: 96vw; cursor: zoom-out; }
#lightbox img { display: block; max-width: 96vw; max-height: 90vh; box-shadow: 0 0 0 var(--u) #1e120a, 0 0 0 calc(var(--u) * 3) #5d3c22, 0 0 0 calc(var(--u) * 4) #1e120a; margin: calc(var(--u) * 4); }

/* ---------- Questions ---------- */
.faq { max-width: 760px; }
.faq details {
  margin: 0 0 12px; background: #10171a; clip-path: var(--notch);
  box-shadow: inset 0 0 0 var(--u) #04080a, inset calc(var(--u) * 2) calc(var(--u) * 2) 0 #2b4a52, inset calc(var(--u) * -2) calc(var(--u) * -2) 0 #081014;
}
.faq summary { display: flex; align-items: center; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; font: 600 16.5px/1.3 "Sora", sans-serif; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: var(--soul); }
.faq details p { margin: 0; padding: 0 20px 20px; color: #d3e6e9; }
.faq a { color: var(--soul); }
.flame {
  flex: none; width: calc(var(--px) * 12); height: calc(var(--px) * 12); margin: calc(var(--px) * -2) 0;
  background: var(--soullamp) center / 100% 100% no-repeat; image-rendering: pixelated;
  animation: lamp 2.6s ease-in-out infinite; filter: drop-shadow(0 0 8px rgb(95 227 240 / .7));
}
.faq details[open] .flame, .faq summary:hover .flame { animation: none; filter: drop-shadow(0 0 12px rgb(95 227 240 / .95)) brightness(1.15); }
@keyframes lamp { 50% { filter: drop-shadow(0 0 3px rgb(95 227 240 / .35)) brightness(.86); } }

/* ---------- Le fond ---------- */
.s-bedrock .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 24px; }
.s-bedrock nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.s-bedrock nav a { color: var(--fg-2); text-decoration: none; }
.s-bedrock nav a:hover { color: #fff; }
.disclaimer { margin: 24px 0; padding-top: 18px; border-top: 2px solid rgb(255 255 255 / .09); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.disclaimer p { margin: 4px 0; }
.up { font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root { --pin: 0px; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Petits écrans ---------- */
.cart-slots, .cart-total { flex: none; }
@media (max-width: 700px) {
  .brand span { display: none; }
  .stratum { padding-left: 12px; padding-right: 26px; }
  .s-lava { padding-left: 12px; padding-right: 12px; }
  .cartbar { left: 0; right: 0; bottom: 0; width: auto; max-width: none; justify-content: space-between; }
  .keeper-pig { width: 112px; height: 130px; margin: -10px 0 -12px; }
  .shop-head { gap: 10px 16px; margin-bottom: 16px; }
}
@media (pointer: coarse) { .qty button { width: 40px; height: 40px; } .top .tbtn { min-height: 44px; } }

/* ---------- Police du jeu sur les petites étiquettes ---------- */
.pxl { display: inline-flex; align-items: center; gap: 0 calc(var(--fs, 2px) * 4); --fs: 2px; }
.pxl svg { display: block; flex: none; width: calc(var(--fs) * var(--w)); height: calc(var(--fs) * 12); filter: drop-shadow(var(--fs) var(--fs) 0 rgb(0 0 0 / .45)); }
.btn-main .pxl svg, .tab[aria-selected="true"] .pxl svg { filter: drop-shadow(var(--fs) var(--fs) 0 rgb(255 220 180 / .35)); }
.btn.pxl-host, .tbtn.pxl-host { padding-top: 9px; padding-bottom: 9px; }

/* ---------- Téléchargement verrouillé, compte à rebours, lien communauté ---------- */
.btn-locked { --c: #241a1a; --hi: #3c2c2a; --lo: #120b0b; color: #e8d8cc; cursor: not-allowed; }
.btn-locked::before { content: ""; width: 16px; height: 18px; flex: none; background: var(--lock) center / 100% 100% no-repeat; image-rendering: pixelated; }
.btn[disabled].btn-locked { --c: #241a1a; --hi: #3c2c2a; --lo: #120b0b; color: #e8d8cc; }
.countdown { margin: 10px 0 0; color: var(--gold); font: 700 14px/1.3 "Sora", sans-serif; }
.community { margin-top: 12px; }

/* ---------- Notifications de progrès, comme en jeu ---------- */
.toasts { position: fixed; z-index: 70; top: 68px; right: 12px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 2px 14px; width: 320px; height: 64px; padding: 0 16px;
  background: url("mc/toast.png") 0 0 / 320px 64px no-repeat; image-rendering: pixelated;
  transform: translateX(120%); transition: transform .45s cubic-bezier(.2, .9, .3, 1);
}
.toast.in { transform: none; }
.toast-ic { grid-row: span 2; width: 32px; height: 32px; }
.toast-ic canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.toast-t { color: #ffff55; } .toast-n { color: #fff; }
.toast .pxl svg { filter: none; }
@media (max-width: 700px) { .toasts { top: auto; bottom: 70px; right: 8px; } }

/* ---------- Écran de débogage F3 ---------- */
.f3 { position: fixed; z-index: 24; left: 8px; top: 66px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; pointer-events: none; color: #e0e0e0; transition: opacity .3s; }
.f3 > span { padding: 1px 2px 0; background: rgb(80 80 80 / .55); }
.f3 .pxl svg { filter: drop-shadow(2px 2px 0 #383838); }
.f3 .hi { color: #ffff55; }
@media (max-width: 999px), (pointer: coarse) { .f3 { display: none; } }
.ready:not(.scrolled) .f3, .ready:not(.in-scene) .f3 { opacity: 0; }

/* ---------- La prise : une vraie présence sur la lave ---------- */
.js .catch.hooked { filter: drop-shadow(0 16px 0 rgb(0 0 0 / .32)) drop-shadow(0 0 36px rgb(255 120 30 / .45)); }

/* ---------- Squelette englouti à droite de l'encart ---------- */
.bones { position: absolute; z-index: 1; pointer-events: none; display: flex; align-items: center; }
.bones canvas {
  display: block; width: 100%;
  /* la lave passe devant lui par endroits, et ses bords se fondent dans la coupe */
  -webkit-mask-image: var(--lavamask), radial-gradient(closest-side, #000 72%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  mask-image: var(--lavamask), radial-gradient(closest-side, #000 72%, transparent);
  -webkit-mask-size: calc(var(--px) * 64) auto, 100% 100%; mask-size: calc(var(--px) * 64) auto, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat; mask-repeat: repeat, no-repeat;
  image-rendering: pixelated; filter: drop-shadow(0 0 14px rgb(255 110 30 / .35));
  animation: veil 48s linear infinite;
}
@keyframes veil { to { -webkit-mask-position: calc(var(--px) * 64) calc(var(--px) * -64), 0 0; mask-position: calc(var(--px) * 64) calc(var(--px) * -64), 0 0; } }
