html, body { margin: 0; height: 100%; overflow: hidden; background: #070a17; color: #e8e4ff;
  font-family: 'Courier New', ui-monospace, monospace; user-select: none; -webkit-user-select: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none;
  /* L'image est agrandie sans lissage : les pixels restent nets. */
  image-rendering: pixelated; }
header { position: fixed; top: 14px; left: 16px; pointer-events: none; text-shadow: 0 2px 0 #000; }
.titre { display: block; font-weight: 900; font-size: 22px; letter-spacing: .3em; color: #ffd27a; }
.sous { font-size: 12px; letter-spacing: .15em; color: #8c93c4; }
/* Les trois vues : un sélecteur en haut à droite. */
#vues { position: fixed; top: 14px; right: 16px; display: flex; border: 2px solid #ffd27a; border-radius: 9px;
  overflow: hidden; box-shadow: 0 3px 0 #000, 0 0 14px rgba(255, 210, 122, .3); }
#vues button, #tourner button { font: 700 14px 'Courier New', monospace; color: #ffd27a; background: #11142a;
  border: 0; padding: 10px 13px; cursor: pointer; }
#vues button + button { border-left: 2px solid #ffd27a; }
#vues button.actif { background: #ffd27a; color: #11142a; }
/* Tourner la caméra : seulement en 3D. */
#tourner { position: fixed; top: 64px; right: 16px; display: none; gap: 8px; }
#tourner button { border: 2px solid #ffd27a; border-radius: 8px; font-size: 18px; padding: 6px 12px; box-shadow: 0 3px 0 #000; }
body[data-vue="3D"] #tourner { display: flex; }
#aide { position: fixed; bottom: 12px; left: 0; right: 0; margin: 0; text-align: center; font-size: 13px;
  color: #8c93c4; text-shadow: 0 2px 0 #000; pointer-events: none; transition: opacity .4s; }
#aide b { color: #ffd27a; }
#joystick { position: fixed; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%;
  border: 2px solid rgba(255, 210, 122, .5); background: rgba(255, 210, 122, .08); pointer-events: none; }
#joystick span { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border-radius: 50%; background: rgba(255, 210, 122, .7); }
#aide .tactile { display: none; }
/* Écran tactile sans souris : l'aide parle du doigt, pas du clavier. */
@media (hover: none) and (pointer: coarse) {
  #aide .clavier { display: none; }
  #aide .tactile { display: inline; }
}

/* ---------- Le jeu : la flamme, les étoiles, les messages, l'éclat, la nuit qui s'éteint. */
#hud { position: fixed; top: 62px; left: 16px; display: flex; align-items: center; gap: 14px; pointer-events: none; }
#flamme { width: 150px; height: 12px; border: 2px solid #ffd27a; border-radius: 7px; background: #11142a;
  box-shadow: 0 3px 0 #000, 0 0 12px rgba(255, 210, 122, .35); overflow: hidden; }
#flamme span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #e8902e, #ffd27a 70%, #fff6d8);
  transition: width .25s; }
#flamme.faible { animation: faible .8s infinite alternate; }
@keyframes faible { to { border-color: #e8602e; box-shadow: 0 3px 0 #000, 0 0 16px rgba(232, 96, 46, .7); } }
#compteur { font-weight: 900; font-size: 18px; color: #ffd27a; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255, 210, 122, .6); }
#message { position: fixed; top: 18%; left: 50%; transform: translate(-50%, 8px); width: min(560px, 86vw); margin: 0;
  text-align: center; font-size: 17px; font-weight: 700; color: #fff6d8; text-shadow: 0 2px 0 #000;
  background: rgba(10, 12, 28, .72); border: 2px solid rgba(255, 210, 122, .45); border-radius: 10px; padding: 10px 16px;
  opacity: 0; transition: opacity .5s, transform .5s; pointer-events: none; }
#message.visible { opacity: 1; transform: translate(-50%, 0); }
#eclat { position: fixed; right: 22px; bottom: 54px; width: 74px; height: 74px; border-radius: 50%;
  border: 3px solid #ffd27a; background: radial-gradient(#3a3060, #11142a); color: #ffd27a; font-size: 34px;
  box-shadow: 0 4px 0 #000, 0 0 18px rgba(255, 210, 122, .5); cursor: pointer; display: none; touch-action: none; }
#eclat:active { transform: scale(.94); }
#voile { position: fixed; inset: 0; background: #03040a; opacity: 0; pointer-events: none; }
@media (hover: none) and (pointer: coarse) {
  #eclat { display: block; }
}

/* ---------- La nuit : le nom de l'île, et l'écran de l'aube. */
#ile { position: fixed; top: 88px; left: 16px; font-size: 12px; letter-spacing: .08em; color: #c8b0ff;
  text-shadow: 0 2px 0 #000; pointer-events: none; }
#fin { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center;
  background: linear-gradient(#1b1f4a 0%, #6a4a8a 45%, #f0a060 80%, #ffe0a0 100%); animation: aube 2.5s ease-out; }
#fin[hidden] { display: none; }
@keyframes aube { from { opacity: 0; } }
#fin h2 { margin: 0; font-size: 44px; letter-spacing: .3em; color: #fff6d8; text-shadow: 0 3px 0 #000, 0 0 24px #ffd27a; }
#fin p { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.6; color: #fff6d8; text-shadow: 0 2px 0 #000; }
#fin p b { color: #ffd27a; }
#fin button { font: 700 18px 'Courier New', monospace; color: #11142a; background: #ffd27a; border: 0; border-radius: 10px;
  padding: 14px 22px; box-shadow: 0 4px 0 #000; cursor: pointer; }

/* ---------- Les pouvoirs : les signes sous le nom de l'île, et l'écran de choix entre deux îles. */
#pouvoirs { position: fixed; top: 106px; left: 16px; display: flex; gap: 6px; pointer-events: auto; }
#pouvoirs span { width: 26px; height: 26px; display: grid; place-items: center; font-size: 15px; color: #ffd27a;
  background: #11142a; border: 2px solid #ffd27a; border-radius: 6px; box-shadow: 0 2px 0 #000; cursor: help; }
#choix { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 20px; text-align: center; background: radial-gradient(circle at 50% 40%, #2a2058 0%, #070a17 75%); }
#choix[hidden] { display: none; }
#choix h2 { margin: 0; font-size: 34px; letter-spacing: .2em; color: #ffd27a; text-shadow: 0 3px 0 #000, 0 0 20px rgba(255, 210, 122, .6); }
#choix > p { margin: 0 0 8px; color: #c8b0ff; font-size: 16px; }
#choix-cartes { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.carte { position: relative; width: 210px; min-height: 230px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 16px 18px; font: 15px 'Courier New', monospace; color: #e8e4ff; text-align: center; cursor: pointer;
  background: linear-gradient(#1b1f4a, #11142a); border: 3px solid #6a5aa8; border-radius: 14px; box-shadow: 0 5px 0 #000;
  transition: transform .15s, border-color .15s, box-shadow .15s; }
.carte:hover, .carte:focus-visible { transform: translateY(-6px); border-color: #ffd27a; box-shadow: 0 11px 0 #000, 0 0 24px rgba(255, 210, 122, .45); outline: none; }
.carte .signe { font-size: 46px; line-height: 1; color: #ffd27a; text-shadow: 0 0 16px rgba(255, 210, 122, .7); }
.carte b { font-size: 18px; color: #fff6d8; }
.carte kbd { position: absolute; top: 8px; right: 10px; font: 700 12px 'Courier New', monospace; color: #8c93c4; }
@media (max-width: 720px) {
  .carte { width: min(86vw, 340px); min-height: 0; flex-direction: row; text-align: left; padding: 14px; }
  .carte .signe { font-size: 34px; }
  .carte b { min-width: 110px; }
  .carte kbd { display: none; }
}

/* ---------- Mobile : les vues et la rotation en bas à gauche, sous le pouce (le bouton ✦ est à droite). */
@media (hover: none) and (pointer: coarse) {
  #vues { top: auto; right: auto; left: 16px; bottom: calc(52px + env(safe-area-inset-bottom)); }
  #vues button { font-size: 17px; padding: 16px 18px; }
  #tourner { top: auto; right: auto; left: 16px; bottom: calc(122px + env(safe-area-inset-bottom)); }
  #tourner button { font-size: 22px; padding: 10px 18px; }
  #eclat { bottom: calc(52px + env(safe-area-inset-bottom)); }
  #aide { bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ---------- Le bouton du son, à côté du titre. */
#son { position: fixed; top: 16px; left: 196px; width: 36px; height: 36px; font: 700 18px 'Courier New', monospace;
  color: #ffd27a; background: #11142a; border: 2px solid #ffd27a; border-radius: 8px; box-shadow: 0 3px 0 #000; cursor: pointer; }
#son.muet { color: #6a6f99; border-color: #6a6f99; }

/* Les boutons ne déclenchent ni zoom ni défilement au toucher. */
#vues button, #tourner button, #son, #eclat { touch-action: none; -webkit-tap-highlight-color: transparent; }

/* ---------- La jauge du rêve lucide (sous la flamme), la barre de la Peur, le cauchemar. */
#hud { flex-wrap: wrap; width: 260px; row-gap: 4px; }
#lucide { order: 3; width: 150px; height: 6px; border: 1px solid #9a7ae8; border-radius: 4px; background: #11142a; overflow: hidden; }
#lucide span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6a4ad8, #c8b0ff); transition: width .25s; }
#lucide.actif { box-shadow: 0 0 12px #c8b0ff; border-color: #fff; }
#lucide.actif span { background: linear-gradient(90deg, #fff6d8, #c8b0ff, #fff6d8); }
#ile { top: 96px; }
#pouvoirs { top: 114px; }
body.cauchemar #ile { color: #ff9aa8; }
#peur { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); width: min(460px, 60vw); text-align: center;
  pointer-events: none; text-shadow: 0 2px 0 #000; }
#peur b { display: block; font-size: 16px; letter-spacing: .12em; color: #ffb0c0; }
#peur div { height: 10px; margin: 4px 0; border: 2px solid #ffb0c0; border-radius: 6px; background: #11142a; overflow: hidden; }
#peur i { display: block; height: 100%; background: linear-gradient(90deg, #8a2a4a, #e05070); transition: width .3s; }
#peur em { font-size: 13px; color: #fff6d8; font-style: normal; }
/* ---------- Le village : l'écran d'accueil. */
body.au-village #hud, body.au-village #ile, body.au-village #pouvoirs, body.au-village #eclat, body.au-village #aide { display: none; }
#village { position: fixed; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center; background: radial-gradient(circle at 50% 35%, rgba(42, 32, 88, .82), rgba(7, 10, 23, .94) 70%); overflow-y: auto; }
#village[hidden] { display: none; }
#village h1 { margin: 0; font-size: clamp(40px, 9vw, 72px); letter-spacing: .3em; color: #ffd27a; text-shadow: 0 4px 0 #000, 0 0 26px rgba(255, 210, 122, .6); }
#village .accroche { margin: 0; color: #c8b0ff; font-size: 16px; line-height: 1.5; }
#maisons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.maison { width: 180px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 12px 12px;
  font: 14px 'Courier New', monospace; color: #e8e4ff; background: #11142a; border: 3px solid #3a3a6a; border-radius: 12px;
  box-shadow: 0 4px 0 #000; cursor: pointer; transition: transform .15s, border-color .15s; }
.maison:disabled { opacity: .45; cursor: default; }
.maison.choisie { border-color: #ffd27a; transform: translateY(-4px); box-shadow: 0 8px 0 #000, 0 0 20px rgba(255, 210, 122, .35); }
.maison .toit { width: 0; height: 0; border-left: 40px solid transparent; border-right: 40px solid transparent; border-bottom: 26px solid #6a3a3a; }
.maison .mur { width: 64px; height: 40px; background: #3a2c22; display: grid; place-items: center; margin-top: -2px; }
.maison .fenetre { width: 18px; height: 16px; background: #1a1a2a; border: 2px solid #20140c; }
.maison.choisie .fenetre { background: #6a4ad8; box-shadow: 0 0 10px #8a6af8; }
.maison.sauve .fenetre { background: #ffd27a; box-shadow: 0 0 12px #ffd27a; }
.maison b { font-size: 18px; color: #fff6d8; }
.maison em { font-style: normal; font-size: 12px; color: #ffd27a; }
#lanternes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 720px; }
#lanternes[hidden] { display: none; }
.lanterne-choix { width: 220px; display: flex; flex-direction: column; gap: 4px; padding: 10px; text-align: left;
  font: 12px 'Courier New', monospace; color: #c8c4e8; background: #11142a; border: 2px solid #3a3a6a; border-radius: 10px; cursor: pointer; }
.lanterne-choix b { color: #fff6d8; font-size: 14px; }
.lanterne-choix.choisie { border-color: #ffd27a; }
#village-go { font: 700 20px 'Courier New', monospace; color: #11142a; background: #ffd27a; border: 0; border-radius: 12px;
  padding: 16px 26px; box-shadow: 0 5px 0 #000, 0 0 24px rgba(255, 210, 122, .5); cursor: pointer; }
#village .comment { max-width: 620px; color: #9a9ac8; font-size: 13px; line-height: 1.5; }
#village .comment summary { cursor: pointer; color: #c8b0ff; }
#village .comment b { color: #ffd27a; }
/* ---------- L'aube : les souvenirs du dormeur. */
#fin strong { color: #fff6d8; font-size: 20px; }
#fin small { display: inline-block; margin-top: 6px; font-size: 14px; color: #ffe8c0; }
#fin .souvenirs { max-width: 600px; margin: 12px auto 0; padding: 0; list-style: none; text-align: left; font-size: 14px; line-height: 1.5; }
#fin .souvenirs li::before { content: '✦ '; color: #ffd27a; }
#fin .annonce { margin: 6px 0 0; padding: 6px 12px; font-size: 14px; color: #11142a; background: #ffd27a; border-radius: 8px; text-shadow: none; }
#fin { overflow-y: auto; }

/* L'en-tête du jeu : la flamme et le compteur, la jauge lucide dessous, puis l'île et les pouvoirs. */
#hud { display: grid; grid-template-columns: 150px auto; align-items: center; gap: 5px 14px; width: auto; }
#lucide { order: 0; grid-column: 1; grid-row: 2; }
#compteur { grid-column: 2; grid-row: 1; white-space: nowrap; }
#ile { top: 106px; }
#pouvoirs { top: 126px; }
#fin { justify-content: safe center; }
#fin h2 { margin-top: 8px; }


/* =====================================================================================
   L'INTERFACE DE JEU : police pixel, cadres pixel (coins crantés), boutons qui s'enfoncent,
   cartes distribuées, boîte de dialogue. (Écrase les styles plus haut.)
   ===================================================================================== */
@font-face { font-family: 'Pixelify Sans'; src: url('polices/PixelifySans.ttf') format('truetype'); font-weight: 400 700; font-display: swap; }
/* Les chiffres viennent de Press Start 2P (ceux de Pixelify se confondent : 2/8, 5/S). */
@font-face { font-family: 'Pixelify Sans'; src: url('polices/PressStart2P.ttf') format('truetype'); font-weight: 400 700; unicode-range: U+0030-0039; size-adjust: 60%; ascent-override: 100%; font-display: swap; }
:root { --or: #ffd27a; --or-fonce: #b8862e; --creme: #fff6d8; --nuit: #141836; --encre: #070a17; --violet: #6a5aa8; --violet-clair: #c8b0ff; }
html, body, button, #village .comment, .carte, .maison, .lanterne-choix, #fin-rejouer, #village-go, #vues button, #tourner button, #son {
  font-family: 'Pixelify Sans', 'Courier New', monospace; }
img { image-rendering: pixelated; }

/* Le cadre pixel : fond plein, bord en 4 ombres décalées (coins crantés), reflet en haut, ombre en bas. */
.cadre, .carte, .maison, .lanterne-choix, #message, #village-go, #fin-rejouer, #vues, #tourner button, #son, #hud, #peur, #fin .texte-aube {
  border: 0 !important; border-radius: 0 !important;
  box-shadow: 0 -4px 0 0 var(--bord, var(--or)), 0 4px 0 0 var(--bord, var(--or)), -4px 0 0 0 var(--bord, var(--or)), 4px 0 0 0 var(--bord, var(--or)),
    inset 0 4px 0 0 rgba(255, 255, 255, .12), inset 0 -4px 0 0 rgba(0, 0, 0, .35) !important;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .75));
}

/* ---------- Le titre du jeu et les bannières. */
header .titre { font-size: 26px; letter-spacing: .22em; text-shadow: 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000, 0 4px 0 #000; }
header .sous { display: none; }
.banniere { position: relative; padding: 14px 54px 16px; background: linear-gradient(#ffe39c, var(--or) 55%, var(--or-fonce));
  clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 50%, 100% 100%, 0 100%, 22px 50%); filter: drop-shadow(0 6px 0 #000); }
.banniere h2 { margin: 0; font-size: clamp(24px, 4vw, 38px); letter-spacing: .08em; color: #2a1606 !important; text-shadow: 0 2px 0 rgba(255, 255, 255, .45) !important; }

/* ---------- L'en-tête du jeu : un panneau avec la flamme (segments), le compteur, la jauge lucide. */
#hud { top: 54px; left: 16px; padding: 10px 14px; background: rgba(14, 16, 40, .82); --bord: #3a3a6a; }
#flamme { height: 16px; border: 0; border-radius: 0; background: #2a1a10; box-shadow: inset 0 0 0 2px #000; }
#flamme span { background: linear-gradient(#fff2b0, var(--or) 45%, #e8902e); position: relative; }
#flamme span::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 12px, rgba(0, 0, 0, .45) 12px 14px); }
#flamme.faible span { background: linear-gradient(#ffb0a0, #e8602e); }
#lucide { height: 8px; border: 0; border-radius: 0; box-shadow: inset 0 0 0 2px #000; }
#compteur { font-size: 20px; }
#ile { top: 126px; left: 18px; font-size: 14px; letter-spacing: .04em; color: var(--violet-clair); }
#pouvoirs { top: 148px; }
#pouvoirs span { width: 32px; height: 32px; border: 0; border-radius: 0; background: var(--nuit); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--or-fonce); }
#pouvoirs img { width: 24px; height: 24px; }

/* ---------- Les boutons : ils s'enfoncent quand on appuie. */
#vues { --bord: var(--or); background: var(--nuit); overflow: visible; }
#vues button { font-size: 16px; padding: 10px 14px; }
#vues button + button { border-left: 2px solid #000; }
#vues button:active, #tourner button:active, #son:active, #village-go:active, #fin-rejouer:active { transform: translateY(3px); }
#son { --bord: var(--or); width: 38px; height: 38px; top: 14px; left: 214px; font-size: 20px; }
#tourner button { --bord: var(--or); }
#eclat { border-radius: 0; border: 0; background: radial-gradient(#4a3a8a, #141836); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  box-shadow: inset 0 0 0 4px var(--or), inset 0 0 0 8px #000; filter: drop-shadow(0 6px 0 #000); }

/* ---------- La boîte de dialogue (les messages), qui s'écrit lettre par lettre. */
#message { --bord: var(--or); background: rgba(14, 16, 40, .94); padding: 14px 20px 14px 46px; text-align: left; font-size: 18px; line-height: 1.35;
  color: var(--creme); width: min(620px, 88vw); min-height: 24px; }
#message::before { content: '✦'; position: absolute; left: 16px; top: 12px; color: var(--or); font-size: 20px; animation: battre 1s infinite alternate; }
@keyframes battre { to { transform: scale(1.25); opacity: .7; } }

/* ---------- La barre de la Peur. */
#peur { --bord: #e05070; background: rgba(30, 8, 20, .85); padding: 8px 14px 10px; width: min(480px, 62vw); }
#peur b { font-size: 18px; }
#peur div { border: 0; border-radius: 0; height: 12px; box-shadow: inset 0 0 0 2px #000; }

/* ---------- L'écran du choix des pouvoirs. */
#choix { gap: 18px; background: radial-gradient(circle at 50% 38%, #3a2878 0%, #141836 45%, #05060f 85%); overflow: hidden; }
#choix .rayons { position: absolute; left: 50%; top: 38%; width: 1600px; height: 1600px; margin: -800px 0 0 -800px; pointer-events: none; opacity: .16;
  background: repeating-conic-gradient(var(--or) 0 6deg, transparent 6deg 18deg); animation: tourne 60s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 60%); mask: radial-gradient(circle, #000 0%, transparent 60%); }
@keyframes tourne { to { transform: rotate(360deg); } }
#choix-sous { margin: 0; font-size: 17px; color: var(--violet-clair); position: relative; }
#choix-cartes { gap: 26px; position: relative; }
.carte { --bord: #8a7ad8; width: 220px; min-height: 270px; padding: 26px 16px 20px; gap: 12px; font-size: 15px; line-height: 1.35;
  background: linear-gradient(#262a5a, #161a3c 60%, #10122a); color: #d8d4f4;
  animation: distribuer .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i) * 140ms); }
@keyframes distribuer { from { opacity: 0; transform: translateY(60px) rotate(calc((var(--i) - 1) * 8deg)) scale(.7); } }
.carte:hover, .carte:focus-visible { --bord: var(--or); transform: translateY(-12px) !important; box-shadow: none; }
.carte .medaillon { width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, #5a46a8 0%, #2a2058 60%, #141836 100%); box-shadow: 0 0 0 4px #000, 0 0 0 8px var(--or-fonce), 0 0 26px rgba(255, 210, 122, .45);
  animation: respirer 2.4s ease-in-out infinite; }
@keyframes respirer { 50% { box-shadow: 0 0 0 4px #000, 0 0 0 8px var(--or), 0 0 40px rgba(255, 210, 122, .75); } }
.carte .medaillon img { width: 64px; height: 64px; }
.carte b { font-size: 21px; color: var(--creme); letter-spacing: .02em; }
.carte .texte { color: #c8c4e8; }
.carte kbd { top: auto; bottom: -14px; right: auto; left: 50%; transform: translateX(-50%); padding: 4px 10px 6px; font: 700 15px 'Pixelify Sans', monospace;
  color: #2a1606; background: linear-gradient(#fff2c0, var(--or)); box-shadow: 0 0 0 2px #000, 0 4px 0 2px #000; }
.carte.prise { --bord: #fff; animation: prise .65s ease-out forwards; }
@keyframes prise { 30% { transform: translateY(-20px) scale(1.12); filter: drop-shadow(0 0 30px #ffd27a) brightness(1.5); } 100% { transform: translateY(-40px) scale(.9); opacity: 0; } }
.carte.laissee { animation: laissee .4s ease-in forwards; }
@keyframes laissee { to { transform: translateY(40px) scale(.85); opacity: 0; } }
#choix-possedes { display: flex; align-items: center; gap: 8px; min-height: 34px; color: #8c93c4; font-size: 14px; position: relative; }
#choix-possedes span { margin-right: 6px; }
#choix-possedes img { width: 32px; height: 32px; background: var(--nuit); box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--or-fonce); padding: 4px; }
@media (max-width: 720px) {
  .carte { width: min(88vw, 360px); min-height: 0; flex-direction: row; text-align: left; padding: 14px 14px 14px 12px; gap: 12px; }
  .carte .medaillon { width: 60px; height: 60px; flex: none; }
  .carte .medaillon img { width: 40px; height: 40px; }
  .carte b { font-size: 17px; min-width: 0; }
  .carte .texte { font-size: 13px; }
  .carte kbd { display: none; }
  #choix-cartes { gap: 16px; }
}

/* ---------- Le village. */
#village { background: radial-gradient(circle at 50% 30%, rgba(58, 40, 120, .85), rgba(7, 10, 23, .95) 70%); }
#village h1 { font-size: clamp(48px, 10vw, 88px); letter-spacing: .18em;
  text-shadow: 4px 4px 0 #000, -4px 4px 0 #000, 4px -4px 0 #000, -4px -4px 0 #000, 0 8px 0 #000, 0 0 40px rgba(255, 210, 122, .6); }
#village .accroche { font-size: 18px; }
.maison { --bord: #3a3a6a; width: 190px; background: linear-gradient(#1e2250, #12142e); font-size: 15px; }
.maison.choisie { --bord: var(--or); box-shadow: none; }
.maison b { font-size: 22px; }
.maison .toit { border-bottom-color: #8a3a3a; filter: drop-shadow(0 -3px 0 #000); }
.maison .mur { box-shadow: 0 0 0 3px #000; }
.lanterne-choix { --bord: #3a3a6a; background: #141836; font-size: 13px; }
.lanterne-choix.choisie { --bord: var(--or); }
#village-go, #fin-rejouer { --bord: #000; font-size: 22px; padding: 16px 30px; color: #2a1606; background: linear-gradient(#fff2c0, var(--or) 50%, var(--or-fonce));
  animation: appeler 1.6s ease-in-out infinite; }
@keyframes appeler { 50% { filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .75)) drop-shadow(0 0 16px rgba(255, 210, 122, .8)); } }
#village .comment { font-size: 15px; }

/* ---------- L'aube. */
#fin h2 { font-family: 'Pixelify Sans', monospace; letter-spacing: .2em; text-shadow: 4px 4px 0 #000, 0 0 30px #ffd27a; }
#fin p { font-size: 17px; }
#fin .souvenirs { font-size: 15px; background: rgba(20, 16, 40, .55); padding: 12px 16px; box-shadow: 0 0 0 3px rgba(0, 0, 0, .4); }
#fin .annonce { border-radius: 0; box-shadow: 0 0 0 3px #000; font-size: 15px; }
#aide { font-size: 14px; }

/* ---------- L'objectif du moment, sous le titre de la Peur / en haut au centre. */
#objectif { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); width: min(640px, 64vw); margin: 0; padding: 8px 14px;
  text-align: center; font-size: 16px; line-height: 1.3; color: var(--creme); background: rgba(14, 16, 40, .78); pointer-events: none;
  box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--violet); text-shadow: 0 2px 0 #000; }
#objectif:empty { display: none; }
#objectif b { margin-right: 8px; padding: 1px 8px 2px; color: #2a1606; background: var(--or); text-shadow: none; }
#objectif.nouveau { animation: objectif .6s ease-out; }
@keyframes objectif { 0% { transform: translateX(-50%) scale(1.12); box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--or), 0 0 24px var(--or); } }
body:has(#peur:not([hidden])) #objectif { top: 92px; }
body.au-village #objectif { display: none; }
#message { top: 22%; }
@media (max-width: 720px) {
  #objectif { top: auto; bottom: calc(150px + env(safe-area-inset-bottom)); width: 92vw; font-size: 14px; }
  body:has(#peur:not([hidden])) #objectif { top: auto; }
}
/* Les messages en bas, comme une boîte de dialogue ; l'objectif reste en haut. */
#message { top: auto; bottom: 64px; transform: translate(-50%, 8px); }
#message.visible { transform: translate(-50%, 0); }
#peur em { display: none; }
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  #message { bottom: auto; top: 150px; font-size: 15px; }
}

/* ---------- Le bouton pause, le menu pause, la reprise au village. */
#menu { position: fixed; top: 14px; left: 262px; width: 38px; height: 38px; font: 700 20px 'Pixelify Sans', monospace; color: var(--or);
  background: var(--nuit); cursor: pointer; touch-action: none; --bord: var(--or);
  box-shadow: 0 -4px 0 0 var(--or), 0 4px 0 0 var(--or), -4px 0 0 0 var(--or), 4px 0 0 0 var(--or); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .75)); border: 0; }
body.au-village #menu { display: none; }
#pause { position: fixed; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(5, 6, 15, .78); text-align: center; }
#pause[hidden] { display: none; }
#dialogue { position: fixed; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 20px; background: rgba(5, 6, 15, .96); text-align: center; }
#dialogue[hidden] { display: none; }
#dialogue p { margin: 0; max-width: 440px; color: var(--creme); font-size: 17px; line-height: 1.45; }
#dialogue .pause-boutons button:first-child:not(.principal) { color: var(--creme) !important; background: linear-gradient(#262a5a, #161a3c) !important;
  box-shadow: 0 -4px 0 0 #8a7ad8, 0 4px 0 0 #8a7ad8, -4px 0 0 0 #8a7ad8, 4px 0 0 0 #8a7ad8 !important; }
#dialogue .pause-boutons button.principal { color: #2a1606; background: linear-gradient(#fff2c0, var(--or) 50%, var(--or-fonce));
  box-shadow: 0 -4px 0 0 #000, 0 4px 0 0 #000, -4px 0 0 0 #000, 4px 0 0 0 #000; }
#pause-info { margin: 0; color: var(--violet-clair); font-size: 17px; }
.pause-boutons { display: flex; flex-direction: column; gap: 16px; width: min(340px, 84vw); }
.pause-boutons button, #reprise button { font: 700 19px 'Pixelify Sans', monospace; padding: 12px 16px; color: var(--creme); background: linear-gradient(#262a5a, #161a3c);
  border: 0; cursor: pointer; box-shadow: 0 -4px 0 0 #8a7ad8, 0 4px 0 0 #8a7ad8, -4px 0 0 0 #8a7ad8, 4px 0 0 0 #8a7ad8; filter: drop-shadow(0 6px 0 #000); }
.pause-boutons button:first-child, #reprise-go { color: #2a1606 !important; background: linear-gradient(#fff2c0, var(--or) 50%, var(--or-fonce)) !important;
  box-shadow: 0 -4px 0 0 #000, 0 4px 0 0 #000, -4px 0 0 0 #000, 4px 0 0 0 #000 !important; }
.pause-boutons button:hover, #reprise button:hover { filter: drop-shadow(0 6px 0 #000) brightness(1.2); }
.pause-boutons button:active, #reprise button:active { transform: translateY(3px); }
#pause .petit { margin: 0; max-width: 420px; font-size: 14px; color: #8c93c4; }
#reprise { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; padding: 12px 18px; background: rgba(42, 30, 90, .7);
  box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--or); }
#reprise[hidden] { display: none; }
#reprise-texte { width: 100%; color: var(--creme); font-size: 17px; }
#village-go.secondaire { animation: none; font-size: 18px; padding: 12px 22px; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .75)) saturate(.6); }
#village-effacer { margin-top: 10px; font: 13px 'Pixelify Sans', monospace; color: #ff9aa8; background: none; border: 1px solid #ff9aa8; padding: 4px 10px; cursor: pointer; }

/* La barre de la Peur : elle baisse à chaque progrès (lanternes, coups dans le dos, coups sur l'îlot). */
#peur i { transition: width .6s cubic-bezier(.2, 1.4, .4, 1); }

/* La vue qui aiderait maintenant : son bouton clignote. */
#vues button.utile { animation: utile .7s ease-in-out infinite alternate; }
@keyframes utile { from { background: var(--nuit); color: var(--or); } to { background: #6a4ad8; color: #fff; box-shadow: inset 0 0 0 2px #fff; } }

/* =====================================================================================
   MOBILE : une barre compacte en haut (titre, ♪ ☰ ; flamme, étoiles, pouvoirs), l'objectif
   dessous sur toute la largeur, les messages en bas au-dessus des boutons.
   ===================================================================================== */
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  header { top: 10px; left: 12px; }
  header .titre { font-size: 17px; letter-spacing: .12em; }
  #son, #menu { top: 6px; width: 34px; height: 34px; font-size: 17px; }
  #son { left: auto; right: 62px; }
  #menu { left: auto; right: 14px; }
  #hud { top: 50px; left: 12px; padding: 6px 10px; gap: 4px 10px; grid-template-columns: 104px auto; }
  #flamme, #lucide { width: 104px; }
  #flamme { height: 12px; }
  #lucide { height: 5px; }
  #compteur { font-size: 15px; }
  #pouvoirs { top: 54px; left: auto; right: 14px; gap: 4px; }
  #pouvoirs span { width: 26px; height: 26px; }
  #pouvoirs img { width: 20px; height: 20px; }
  #ile { top: 96px; left: 14px; font-size: 11px; }
  #tourner { top: 92px; right: 14px; bottom: auto; left: auto; gap: 6px; }
  #tourner button { font-size: 16px; padding: 4px 10px; }
  #objectif { top: 116px; bottom: auto; left: 10px; right: 10px; width: auto; transform: none; font-size: 13px; line-height: 1.25; padding: 6px 8px; text-align: left; }
  #objectif.nouveau { animation: none; }
  #objectif b { font-size: 11px; margin-right: 6px; }
  #peur { top: 116px; width: calc(100vw - 24px); padding: 4px 10px 6px; }
  #peur b { font-size: 14px; }
  #peur div { height: 8px; margin: 2px 0 0; }
  body:has(#peur:not([hidden])) #objectif { top: 166px; }
  #message { top: auto !important; bottom: calc(112px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); font-size: 14px; line-height: 1.3;
    padding: 8px 10px 8px 34px; }
  #message::before { left: 10px; top: 8px; font-size: 16px; }
  #vues { bottom: calc(22px + env(safe-area-inset-bottom)); }
  #vues button { font-size: 16px; padding: 14px 16px; }
  #eclat { bottom: calc(18px + env(safe-area-inset-bottom)); width: 70px; height: 70px; }
  #aide { display: none; }
}
#message, #objectif, #peur { box-sizing: border-box; }

/* ---------- Le village sur téléphone : tout tient sur un écran (maisons côte à côte). */
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  #village { justify-content: safe center; gap: 12px; padding: 14px 10px calc(14px + env(safe-area-inset-bottom)); }
  #village h1 { font-size: 38px; letter-spacing: .14em; }
  #village .accroche { font-size: 13px; line-height: 1.35; }
  #village .accroche br { display: none; }
  #reprise { gap: 8px 10px; padding: 8px 10px; }
  #reprise-texte { font-size: 13px; }
  #reprise button { font-size: 14px; padding: 8px 10px; }
  #maisons { flex-wrap: nowrap; gap: 8px; width: 100%; }
  .maison { width: auto; flex: 1 1 0; min-width: 0; padding: 8px 4px 8px; gap: 3px; font-size: 11px; line-height: 1.2; }
  .maison .toit { border-left-width: 22px; border-right-width: 22px; border-bottom-width: 14px; }
  .maison .mur { width: 36px; height: 22px; }
  .maison .fenetre { width: 10px; height: 9px; }
  .maison b { font-size: 15px; }
  .maison em { font-size: 10px; }
  #lanternes { gap: 6px; }
  .lanterne-choix { width: calc(50vw - 20px); padding: 6px 8px; font-size: 10px; }
  .lanterne-choix b { font-size: 12px; }
  #village-go { font-size: 17px; padding: 12px 18px; }
  #village .comment { font-size: 12px; }
}
body.au-village #vues, body.au-village #tourner, body.au-village #objectif { display: none !important; }

/* ---------- Rêve / cauchemar : le bouton ☾ (au-dessus de l'éclat) et la jauge rouge sous la flamme. */
#bascule { position: fixed; right: 30px; bottom: 150px; width: 58px; height: 58px; z-index: 3; border: 0; cursor: pointer;
  font: 700 30px 'Pixelify Sans', monospace; color: #e8d8ff; background: radial-gradient(#5a3a9a, #1a1036); touch-action: none;
  -webkit-tap-highlight-color: transparent; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  box-shadow: inset 0 0 0 4px #b48aff, inset 0 0 0 8px #000; filter: drop-shadow(0 5px 0 #000); }
#bascule:active { transform: translateY(3px); }
#bascule.bloque { opacity: .45; }
body.cauchemar #bascule { color: #fff2c0; background: radial-gradient(#8a6a2a, #2a1a08); box-shadow: inset 0 0 0 4px var(--or), inset 0 0 0 8px #000; }
body.au-village #bascule, body.au-village #paix { display: none; }
#paix { grid-column: 1; grid-row: 3; width: 150px; height: 6px; border: 1px solid #8ab8ff; border-radius: 4px; background: #0a1024; overflow: hidden; }
#paix[hidden] { display: none; }
#paix span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #4a7ae8, #d8ecff); transition: width .25s; }
#paix.danger { animation: jauge-danger .5s steps(2) infinite; }
#paix.danger span { background: linear-gradient(90deg, #8a1a3a, #ff4a5a); }
@keyframes jauge-danger { 50% { box-shadow: 0 0 10px #ff4a5a; border-color: #fff; } }
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  #bascule { right: 102px; bottom: calc(26px + env(safe-area-inset-bottom)); width: 56px; height: 56px; font-size: 28px; }
}

/* L'objectif sur grand écran : à droite de l'en-tête (il cachait le compteur d'étoiles). */
@media (min-width: 721px) and (hover: hover) {
  #objectif { left: 300px; transform: none; width: min(640px, calc(100vw - 330px)); text-align: left; }
  #objectif.nouveau { animation: objectif-pc .6s ease-out; }
}
@keyframes objectif-pc { 0% { box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--or), 0 0 24px var(--or); } }

/* ==========================================================================================
   L'habillage : fin et élégant. Des filets dorés d'un pixel (doublés d'un filet discret à
   l'intérieur), quatre petits losanges aux coins, un fond de verre sombre, une ombre douce ;
   des boutons plats aux reflets subtils ; des médaillons ronds pour ✦ et ☾ / ☼.
   ========================================================================================== */
:root {
  --trait: rgba(255, 214, 138, .85); --trait-doux: rgba(255, 214, 138, .22);
  --verre: linear-gradient(180deg, rgba(26, 29, 64, .9), rgba(9, 10, 26, .93));
  --losange: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M4 0L8 4 4 8 0 4z' fill='%23ffd68a'/%3E%3Cpath d='M4 2L6 4 4 6 2 4z' fill='%23fff6d8'/%3E%3C/svg%3E");
}
html body :is(#hud, #message, #objectif, #peur, #vues, #reprise),
html body :is(.carte, .maison, .lanterne-choix, .texte-aube) {
  border: 0 !important; border-image: none !important; border-radius: 6px !important; filter: none !important;
  background:
    var(--losange) 2px 2px / 8px no-repeat, var(--losange) calc(100% - 2px) 2px / 8px no-repeat,
    var(--losange) 2px calc(100% - 2px) / 8px no-repeat, var(--losange) calc(100% - 2px) calc(100% - 2px) / 8px no-repeat,
    var(--fond, var(--verre)) !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .9), inset 0 0 0 1px var(--ligne, var(--trait)), inset 0 0 0 3px rgba(6, 7, 18, .85),
    inset 0 0 0 4px var(--trait-doux), 0 8px 22px rgba(0, 0, 0, .45) !important;
}
#peur { --ligne: rgba(255, 110, 140, .9); --fond: linear-gradient(180deg, rgba(58, 14, 32, .9), rgba(20, 4, 12, .93)); }
.carte:hover, .carte:focus-visible, .maison.choisie, .lanterne-choix.choisie { --ligne: #fff2c8; }
html body :is(.carte:hover, .carte:focus-visible, .maison.choisie, .lanterne-choix.choisie) {
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #fff2c8, inset 0 0 0 3px rgba(6, 7, 18, .85), inset 0 0 0 4px rgba(255, 214, 138, .5),
    0 0 24px rgba(255, 210, 122, .35), 0 10px 24px rgba(0, 0, 0, .5) !important; }

/* Les boutons. */
html body :is(#son, #menu, #tourner button, .pause-boutons button, #reprise button, #village-go, #fin-rejouer) {
  border: 0 !important; border-image: none !important; border-radius: 6px !important; filter: none !important;
  background: linear-gradient(180deg, rgba(44, 48, 100, .96), rgba(18, 20, 48, .96)) !important; color: var(--or) !important;
  text-shadow: 0 1px 0 #000; letter-spacing: .02em; transition: transform .08s, box-shadow .2s, filter .2s;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--trait), inset 0 2px 0 1px rgba(255, 255, 255, .07), 0 4px 12px rgba(0, 0, 0, .45) !important; }
html body :is(#village-go, #fin-rejouer, .pause-boutons button.principal, #pause .pause-boutons button:first-child, #reprise #reprise-go) {
  background: linear-gradient(180deg, #fff0c0, #f4c46a 55%, #d8963c) !important; color: #2a1606 !important; text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px #3a2408, inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -2px 0 rgba(120, 70, 10, .3), 0 4px 16px rgba(255, 196, 96, .28) !important; }
html body #dialogue .pause-boutons button:first-child:not(.principal) {
  background: linear-gradient(180deg, rgba(44, 48, 100, .96), rgba(18, 20, 48, .96)) !important; color: var(--or) !important; text-shadow: 0 1px 0 #000;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px var(--trait), 0 4px 12px rgba(0, 0, 0, .45) !important; }
@media (hover: hover) {
  html body :is(#son, #menu, #tourner button, .pause-boutons button, #reprise button, #village-go, #fin-rejouer):hover { filter: brightness(1.15) !important; }
}
html body :is(#son, #menu, #tourner button, .pause-boutons button, #reprise button, #village-go, #fin-rejouer):active { transform: translateY(1px); filter: brightness(.9) !important; }
html body :is(#son, #menu) { padding: 0; display: grid; place-items: center; }

/* Le sélecteur de vues. */
html body #vues { padding: 3px; gap: 2px; }
html body #vues button { background: none; color: var(--or); text-shadow: 0 1px 0 #000; border: 0; border-radius: 4px; }
html body #vues button + button { box-shadow: -2px 0 0 -1px var(--trait-doux); }
html body #vues button.actif { background: linear-gradient(180deg, #fff0c0, #f4c46a 55%, #d8963c); color: #2a1606; text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 1px #3a2408, inset 0 1px 0 rgba(255, 255, 255, .7); }
html body #vues button:active { transform: translateY(1px); }

/* Les médaillons ronds ✦ et ☾ / ☼. */
html body :is(#eclat, #bascule) { clip-path: none !important; border: 0 !important; border-radius: 50% !important; filter: none !important;
  background: radial-gradient(circle at 50% 38%, var(--m1, #6a58c8), var(--m2, #1a1c48) 72%) !important;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1.5px var(--m-trait, var(--or)), inset 0 0 0 4px rgba(8, 8, 24, .85), inset 0 0 0 5px var(--m-doux, rgba(255, 214, 138, .3)),
    0 0 20px var(--m-halo, rgba(255, 210, 122, .3)), 0 6px 14px rgba(0, 0, 0, .5) !important;
  color: #fff2c0; text-shadow: 0 0 10px rgba(255, 224, 150, .9), 0 1px 0 #000; transition: transform .08s; }
#bascule { --m1: #8a5ad8; --m2: #1c1040; --m-trait: #d8c0ff; --m-doux: rgba(216, 192, 255, .3); --m-halo: rgba(170, 120, 255, .4); color: #f2e8ff; }
body.cauchemar #bascule { --m1: #ffb04a; --m2: #4a1e06; --m-trait: var(--or); --m-doux: rgba(255, 214, 138, .35); --m-halo: rgba(255, 170, 70, .5); color: #fff6d8; }
html body :is(#eclat, #bascule):active { transform: scale(.95); }

/* Les jauges : fines, arrondies, avec un reflet. */
html body :is(#flamme, #lucide, #paix, #peur div) { border-radius: 3px !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, .9), inset 0 1px 2px rgba(0, 0, 0, .6) !important; }
html body :is(#lucide span, #paix span, #peur i) { border-radius: 3px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }

/* L'étiquette « Objectif ». */
html body #objectif b { border-radius: 3px; box-shadow: 0 0 0 1px #3a2408, inset 0 1px 0 rgba(255, 255, 255, .6); background: linear-gradient(#fff0c0, #f4c46a 60%, #d8963c); }

/* Les places : rien ne se chevauche. */
#hud { top: 60px; }
#ile { top: 142px; }
#pouvoirs { top: 164px; }
@media (min-width: 721px) and (hover: hover) { #menu { left: 276px; } #objectif { left: 320px; width: min(640px, calc(100vw - 350px)); } }
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  #hud { top: 52px; }
  #paix { width: 104px; }
  #ile { top: 112px; }
  #pouvoirs { top: 58px; }
  #objectif { top: 132px; }
  #peur { top: 132px; }
  body:has(#peur:not([hidden])) #objectif { top: 188px; }
  #tourner { top: 116px; }
}
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  #maisons { gap: 10px; padding: 0 6px; box-sizing: border-box; }
  #reprise { margin: 0 6px; }
}

/* Les bannières (Pause, choix, aube) : plus fines, un reflet, une ombre douce. */
html body .banniere { padding: 10px 46px 12px; background: linear-gradient(#fff0c0, #f4c46a 55%, #d8963c);
  filter: drop-shadow(0 0 1px #3a2408) drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }

/* Le choix des pouvoirs, au style fin : médaillon à anneau fin ; sur mobile, l'icône à gauche, le nom au-dessus du texte. */
html body .carte .medaillon { box-shadow: 0 0 0 1px #000, inset 0 0 0 1.5px var(--or), inset 0 0 0 4px rgba(8, 8, 24, .85), inset 0 0 0 5px rgba(255, 214, 138, .3),
  0 0 22px rgba(255, 210, 122, .3) !important; background: radial-gradient(circle at 50% 38%, #5a48b8, #1a1c48 72%) !important; animation: none; }
html body .carte kbd { border-radius: 4px; box-shadow: 0 0 0 1px #3a2408, inset 0 1px 0 rgba(255, 255, 255, .6) !important; background: linear-gradient(#fff0c0, #f4c46a 60%, #d8963c) !important; }
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  html body .carte { display: grid; grid-template-columns: 60px 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; align-items: center; padding: 14px 16px; }
  html body .carte .medaillon { grid-row: 1 / 3; }
  html body .carte b { grid-column: 2; align-self: end; font-size: 17px; }
  html body .carte .texte { grid-column: 2; align-self: start; font-size: 13px; line-height: 1.3; }
  #choix .banniere { padding: 8px 34px 10px; }
  #choix h2, #choix .banniere h2 { font-size: 24px !important; letter-spacing: .06em; }
}

/* L'aube, au style fin : les souvenirs dans un cadre de verre, les annonces en filets dorés. */
body:has(#fin:not([hidden])) :is(#bascule, #eclat, #vues, #hud, #ile, #pouvoirs, #objectif, #message, #menu, #tourner, #paix) { display: none !important; }
html body #fin-rejouer { font-family: 'Pixelify Sans', monospace !important; font-weight: 700; }
html body #fin .souvenirs:empty { display: none; }
html body #fin .souvenirs { border-radius: 6px; background: rgba(14, 12, 36, .55) !important; padding: 12px 18px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 214, 138, .45), 0 8px 22px rgba(0, 0, 0, .3) !important; }
html body #fin .annonce { max-width: 560px; margin: 8px auto 0; padding: 8px 16px; border-radius: 6px; color: var(--creme); font-size: 14px;
  background: linear-gradient(180deg, rgba(42, 30, 80, .75), rgba(20, 14, 44, .8)) !important; text-shadow: 0 1px 0 #000;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 214, 138, .7), 0 0 18px rgba(255, 210, 122, .2) !important; }
html body #fin .annonce::before { content: '✦ '; color: var(--or); }
