/* HUNARIX — interface. Palette tirée de Layer_Sample : bleu ardoise, rose parapluie, crème, mousse. */
:root {
  --bg: rgba(22, 34, 46, 0.74);
  --bg2: rgba(32, 48, 62, 0.86);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f6eee3;
  --muted: #b9c4c8;
  --pink: #e77382;
  --pink2: #f3a6b8;
  --teal: #8fd0dc;
  --moss: #afbe4c;
  --gold: #e9c46a;
  --danger: #ff7a5a;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d1620; color: var(--text); font-family: var(--sans); font-size: var(--fs); }
#app, #canvas-wrap { position: fixed; inset: 0; }
#canvas-wrap canvas { display: block; width: 100%; height: 100%; }
#ui { position: fixed; inset: 0; pointer-events: none; user-select: none; }
#ui.taille-petite { --fs: 13px; }
#ui.taille-moyenne { --fs: 15px; }
#ui.taille-grande { --fs: 18px; }
#ui { font-size: var(--fs); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.ico { width: 1.3em; height: 1.3em; vertical-align: -0.25em; }
#erreur { display: none; position: fixed; left: 20px; bottom: 20px; right: 20px; background: #7a2b2b; color: #fff; padding: 12px 16px; font-family: monospace; z-index: 99; border-radius: 8px; }

/* ---------- écrans ---------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
#loading { background: radial-gradient(ellipse at 50% 40%, #2c4a5e 0%, #0d1620 70%); transition: opacity 0.8s; z-index: 50; }
#loading.fade-out { opacity: 0; }
.load-box { text-align: center; }
.load-box h1 { font-family: var(--serif); font-size: 64px; margin: 0; letter-spacing: 6px; color: #fff; text-shadow: 0 0 30px rgba(231, 115, 130, 0.5); }
.load-box .sub { font-family: var(--serif); font-style: italic; color: var(--pink2); margin: 4px 0 28px; }
.lbar-wrap { width: 340px; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; margin: 0 auto; }
#lbar { height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--pink2)); transition: width 0.25s; }
#ltext { color: var(--muted); font-size: 13px; margin-top: 12px; }

button { font-family: var(--sans); font-size: 1em; color: var(--text); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 22px; cursor: pointer; transition: background 0.15s, transform 0.15s, box-shadow 0.15s; pointer-events: auto; }
button:hover { background: rgba(255, 255, 255, 0.16); box-shadow: 0 0 14px rgba(243, 166, 184, 0.35); transform: translateY(-1px); }
button.primary { background: linear-gradient(135deg, #e77382, #c95a76); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
button.primary:hover { box-shadow: 0 0 22px rgba(231, 115, 130, 0.6); }
button.danger { border-color: rgba(255, 122, 90, 0.5); color: #ffc2b0; }
button.small { padding: 6px 14px; font-size: 0.85em; }

.logo { font-family: var(--serif); font-size: 92px; font-weight: 400; letter-spacing: 8px; margin: 0; color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15), 0 0 40px rgba(231, 115, 130, 0.55); }
.logo-sub { font-family: var(--serif); font-style: italic; font-size: 22px; color: #fde6ec; margin: 0 0 36px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }
.title-screen { background: linear-gradient(90deg, rgba(10, 20, 30, 0.55) 0%, rgba(10, 20, 30, 0.1) 45%, rgba(0, 0, 0, 0) 100%); justify-content: flex-start; }
.title-box { margin-left: 8vw; }
.title-menu { display: flex; flex-direction: column; gap: 10px; width: 280px; }
.title-menu button { text-align: left; padding: 12px 24px; backdrop-filter: blur(4px); }
.title-foot { position: absolute; bottom: 18px; left: 8vw; color: rgba(255, 255, 255, 0.75); font-size: 13px; font-style: italic; text-shadow: 0 1px 4px #0008; }

.menu-screen { background: rgba(8, 14, 22, 0.45); backdrop-filter: blur(3px); z-index: 20; }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); min-width: 420px;
  max-width: min(1100px, 94vw); max-height: 90vh; display: flex; flex-direction: column; }
.ptitle { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 8px; border-bottom: 1px solid var(--line); }
.ptitle h2 { font-family: var(--serif); font-weight: 400; font-size: 1.7em; margin: 0; color: #fff; }
.ptitle .close { padding: 4px 12px; }
.pbody { padding: 16px 22px 20px; overflow: auto; }
.pause-menu { display: flex; flex-direction: column; gap: 8px; min-width: 300px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { padding: 7px 16px; }
.tabs button.on { background: var(--pink); color: #fff; }

/* sauvegardes */
.slots { display: flex; flex-direction: column; gap: 10px; min-width: 520px; }
.slot { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.04); cursor: pointer; }
.slot:hover { border-color: var(--pink2); background: rgba(231, 115, 130, 0.12); }
.slot-n { font-family: var(--serif); font-size: 1.2em; min-width: 130px; }
.slot-info { flex: 1; }
.slot.vide .slot-info { color: var(--muted); }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; }
.hud-tl { position: absolute; top: 18px; left: 22px; }
.bar { position: relative; height: 16px; width: 270px; background: rgba(10, 18, 26, 0.6); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 9px; overflow: hidden;
  margin-bottom: 6px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); transition: width 0.4s; }
.bar .fill { position: absolute; inset: 0; width: 100%; z-index: 2; transition: width 0.12s; }
.bar .ghost-fill { position: absolute; inset: 0; width: 100%; background: rgba(255, 220, 200, 0.55); z-index: 1; }
.bar.hp .fill { background: linear-gradient(90deg, #d9576f, #f39aae); }
.bar.hp .val { position: absolute; z-index: 3; right: 8px; top: 0; font-size: 11px; line-height: 16px; color: #fff; text-shadow: 0 1px 2px #000a; }
.bar.st { height: 8px; width: 200px !important; }
.bar.st .fill { background: linear-gradient(90deg, #7fc8d8, #c8eef2); }
.bar.st.low .fill { background: linear-gradient(90deg, #e98a5a, #f3c28a); }
.hud-items { display: flex; gap: 16px; margin-top: 4px; font-size: 0.95em; text-shadow: 0 1px 3px #000c; }
.hud-items small { color: var(--muted); }
.amb { color: #ffb347; }
.hud-top { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); }
.compass { position: relative; width: 300px; height: 30px; overflow: hidden; border-radius: 15px; background: rgba(10, 18, 26, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.compass .strip { position: absolute; top: 0; left: 0; height: 100%; }
.compass .strip span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.compass .strip span.card { color: #fff; font-weight: 600; font-size: 13px; }
.compass .needle { position: absolute; left: 50%; top: 0; width: 2px; height: 7px; background: var(--pink2); transform: translateX(-50%); }
.compass .marker { position: absolute; top: 6px; transform: translateX(-50%); color: var(--gold); font-size: 12px; white-space: nowrap; text-shadow: 0 1px 3px #000; }
.hud-tr { position: absolute; top: 16px; right: 22px; text-align: right; text-shadow: 0 1px 3px #000c; }
.frags { font-family: var(--serif); font-size: 1.5em; }
.clock { color: var(--muted); font-size: 0.9em; }
.fps { color: var(--moss); font-size: 0.8em; }
.hud-quest { position: absolute; top: 96px; right: 22px; max-width: 320px; text-align: right; text-shadow: 0 1px 4px #000; background: linear-gradient(270deg, rgba(10, 18, 26, 0.45), transparent);
  padding: 8px 12px; border-radius: 10px; }
.hud-quest .qt { font-family: var(--serif); color: var(--gold); font-size: 1.05em; }
.hud-quest .qo { font-size: 0.92em; }
.hud-abil { position: absolute; bottom: 22px; left: 22px; display: flex; gap: 8px; }
.hud-abil .ab { background: rgba(10, 18, 26, 0.55); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 0.82em; }
.hud-abil .ab b { color: var(--pink2); margin-right: 4px; }
.hud-abil .ab.cd { opacity: 0.55; }
.key { display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: #22313d; font-weight: 700;
  font-size: 0.85em; text-align: center; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); margin: 0 1px; }
.key.pad { background: #3a4f6a; color: #fff; }
#prompt { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); background: rgba(10, 18, 26, 0.7); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-size: 1.02em; white-space: nowrap; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
#region { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity 1s; pointer-events: none; }
#region.show { opacity: 1; }
#region div { font-family: var(--serif); font-size: 3em; color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5); letter-spacing: 2px; }
#region small { color: var(--gold); letter-spacing: 3px; text-transform: uppercase; font-size: 0.8em; }
#hint { position: absolute; left: 22px; bottom: 70px; max-width: 460px; background: rgba(10, 18, 26, 0.72); border-left: 3px solid var(--pink); border-radius: 8px;
  padding: 10px 14px; font-size: 0.95em; line-height: 1.45; }
#hint b { color: var(--pink2); margin-right: 6px; }
#lockon { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid var(--pink2); border-radius: 50%;
  box-shadow: 0 0 10px rgba(243, 166, 184, 0.8); }
#lockon.pulse { border-color: #fff; }
.ebar { position: absolute; left: 0; top: 0; transform-origin: 0 0; margin-left: -45px; width: 90px; text-align: center; }
.ebar .en { font-size: 11px; text-shadow: 0 1px 3px #000; white-space: nowrap; }
.ebar .eb { height: 5px; background: rgba(0, 0, 0, 0.55); border-radius: 3px; overflow: hidden; }
.ebar .eb .fill { height: 100%; background: linear-gradient(90deg, #ff6a5a, #ffb08a); }
.ebar.stun .en { color: var(--gold); }
.float { position: absolute; left: 0; top: 0; font-weight: 800; font-size: 1.15em; color: #fff; text-shadow: 0 2px 4px #000c; pointer-events: none; white-space: nowrap; }
.float.fort { color: var(--gold); font-size: 1.35em; }
.float.faible { color: #9fb2c4; }
.float.info { color: var(--pink2); font-size: 1em; }
#bossbar { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(640px, 80vw); text-align: center; }
#bossbar .bname { font-family: var(--serif); font-size: 1.5em; text-shadow: 0 2px 8px #000; }
#bossbar .btitle { color: var(--muted); font-style: italic; font-size: 0.88em; margin-bottom: 4px; }
#bossbar .bbar { position: relative; height: 12px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 6px; overflow: hidden; }
#bossbar .bbar .fill { height: 100%; width: 100%; background: linear-gradient(90deg, #a0485f, #e77382); transition: width 0.2s; }
#bossbar.boss-maitre_pluie .fill { background: linear-gradient(90deg, #3f6f9a, #9fd8ff); }
#bossbar.boss-seigneur_bourrasques .fill { background: linear-gradient(90deg, #a8662a, #f0c070); }
#bossbar.boss-gardien_miroir .fill { background: linear-gradient(90deg, #6a5f9a, #e0dcff); }
#bossbar .tick { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, 0.6); }
#bossbar .bhint { margin-top: 6px; font-size: 0.92em; color: var(--gold); text-shadow: 0 1px 4px #000; min-height: 1.2em; }
#bossline { position: absolute; left: 50%; bottom: 140px; transform: translateX(-50%); max-width: 70vw; text-align: center; font-family: var(--serif);
  font-style: italic; font-size: 1.15em; text-shadow: 0 2px 8px #000; }
#bossline b { font-style: normal; color: var(--pink2); margin-right: 6px; }
#clickhint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(10, 18, 26, 0.75); border: 1px solid var(--pink2);
  border-radius: 999px; padding: 10px 22px; font-size: 1.05em; animation: pulse 1.6s infinite; }
#saveicon { position: absolute; right: 22px; bottom: 22px; font-size: 0.9em; color: var(--muted); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* toasts */
#toasts { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 15; }
.toast { background: rgba(10, 18, 26, 0.78); border: 1px solid var(--line); border-radius: 999px; padding: 7px 18px; font-size: 0.95em; animation: tin 0.3s;
  transition: opacity 0.4s, transform 0.4s; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast.quete { border-color: rgba(233, 196, 106, 0.6); }
.toast.danger { border-color: rgba(255, 122, 90, 0.7); color: #ffd2c4; }
.toast.parade { border-color: #fff; color: #fff; font-weight: 700; letter-spacing: 1px; }
.toast.journal { border-color: rgba(143, 208, 220, 0.6); }
.toast.butin { border-color: rgba(255, 179, 71, 0.6); }
.toast.big { border-radius: 14px; text-align: center; padding: 10px 24px; }
.toast.big small { color: var(--gold); text-transform: uppercase; letter-spacing: 2px; font-size: 0.72em; }
.toast.big div { font-family: var(--serif); font-size: 1.35em; }
.toast.big em { display: block; color: var(--muted); font-size: 0.9em; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } }

#caption { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); max-width: 70vw; text-align: center; font-family: var(--serif); font-size: 1.45em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); opacity: 0; transition: opacity 0.8s; }
#caption.show { opacity: 1; }
#caption b { color: var(--pink2); font-style: italic; }
#skip { position: absolute; right: 22px; bottom: 22px; color: rgba(255, 255, 255, 0.6); font-size: 0.85em; }
.title-card, .boss-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  animation: fadein 1.2s; transition: opacity 1s; pointer-events: none; }
.title-card.out, .boss-card.out { opacity: 0; }
.boss-card h1 { font-family: var(--serif); font-weight: 400; font-size: 3.6em; margin: 0; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8); letter-spacing: 2px; }
.boss-card small { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.3em; text-shadow: 0 2px 10px #000; }
@keyframes fadein { from { opacity: 0; } }
.ability-pop { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); background: var(--bg2); border: 1px solid rgba(233, 196, 106, 0.6); border-radius: 18px;
  padding: 18px 30px; text-align: center; max-width: 520px; box-shadow: 0 0 40px rgba(233, 196, 106, 0.25); animation: tin 0.5s; transition: opacity 0.6s; }
.ability-pop.out { opacity: 0; }
.ability-pop small { color: var(--gold); text-transform: uppercase; letter-spacing: 3px; }
.ability-pop h2 { font-family: var(--serif); font-weight: 400; font-size: 2.2em; margin: 4px 0; }

/* dialogue */
#dialogue { position: absolute; left: 50%; bottom: 4vh; transform: translateX(-50%); width: min(900px, 92vw); display: flex; gap: 18px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; pointer-events: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); cursor: pointer; animation: tin 0.25s; }
#dialogue .portrait { width: 112px; height: 112px; flex: none; border-radius: 50%; overflow: hidden; background: radial-gradient(circle, #3e5a6e, #1b2a36);
  border: 2px solid rgba(255, 255, 255, 0.2); }
#dialogue .portrait img { width: 100%; height: 100%; object-fit: cover; }
#dialogue .hportrait { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 52px; }
#dialogue .dbody { flex: 1; position: relative; }
#dialogue .dname { font-family: var(--serif); font-size: 1.35em; margin-bottom: 6px; }
#dialogue .dname small { font-family: var(--sans); font-size: 0.6em; color: var(--muted); margin-left: 8px; }
#dialogue .dtext { font-size: 1.1em; line-height: 1.5; min-height: 3em; }
#dialogue.hunarix .dtext { font-style: italic; color: #fde6ec; }
#dialogue .dnext { position: absolute; right: 0; bottom: -6px; color: var(--pink2); animation: bob 1s infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
#dialogue .dchoices { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
#dialogue .dchoices button { text-align: left; border-radius: 10px; padding: 8px 14px; }
#dialogue .dchoices button span { display: inline-block; width: 1.4em; color: var(--pink2); font-weight: 700; }
#dialogue .dchoices button.sel { border-color: var(--pink2); background: rgba(231, 115, 130, 0.25); }

/* souvenir */
.memory { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse, rgba(80, 40, 70, 0.35), rgba(20, 10, 25, 0.7));
  pointer-events: auto; animation: fadein 1.2s; transition: opacity 0.8s; cursor: pointer; z-index: 40; }
.memory.out { opacity: 0; }
.mem-in { max-width: 760px; text-align: center; padding: 30px; }
.mem-in small { color: var(--pink2); letter-spacing: 3px; text-transform: uppercase; }
.mem-in h1 { font-family: var(--serif); font-weight: 400; font-size: 3em; margin: 8px 0 2px; text-shadow: 0 0 30px rgba(255, 180, 210, 0.6); }
.mem-lieu { color: var(--muted); font-style: italic; margin-bottom: 22px; }
.mem-text p { font-family: var(--serif); font-size: 1.3em; line-height: 1.6; margin: 0 0 12px; animation: fadein 1.6s; text-shadow: 0 2px 10px #000; }
.mem-clue { margin-top: 20px; color: var(--gold); font-style: italic; animation: fadein 1.5s; }
.mem-cont { margin-top: 18px; color: var(--muted); font-size: 0.85em; animation: pulse 1.6s infinite; }

/* journal */
.journal .panel { width: min(980px, 94vw); }
.jlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.jentry { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; line-height: 1.5; }
.jentry h3 { font-family: var(--serif); font-weight: 400; margin: 0 0 6px; font-size: 1.25em; color: #fff; }
.jentry h3 small { font-family: var(--sans); color: var(--muted); font-size: 0.65em; margin-left: 6px; }
.jentry p { margin: 4px 0; }
.jentry.locked { opacity: 0.5; }
.jentry.npc { display: flex; gap: 14px; }
.jentry.npc img { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, #3e5a6e, #1b2a36); flex: none; }
.jentry.quest .obj { color: var(--gold); }
.jentry.quest.tracked { border-color: rgba(233, 196, 106, 0.6); }
.jentry.done { opacity: 0.65; }
.jentry.boss { border-color: rgba(231, 115, 130, 0.5); }
.tag { display: inline-block; font-size: 0.75em; padding: 2px 8px; border-radius: 999px; background: rgba(233, 196, 106, 0.25); color: var(--gold); }
h3.sub { font-family: var(--serif); font-weight: 400; color: var(--pink2); margin: 10px 0 8px; }
.clues li { margin: 8px 0; font-family: var(--serif); font-size: 1.15em; font-style: italic; }

/* carte */
.map-screen .panel { width: min(1100px, 96vw); }
.map-wrap { display: flex; gap: 18px; align-items: flex-start; }
.map { position: relative; width: min(74vh, 70vw); height: min(74vh, 70vw); background-size: cover; border-radius: 12px; border: 1px solid var(--line); flex: none;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35); image-rendering: auto; }
.mk { position: absolute; transform: translate(-50%, -50%); font-size: 16px; text-shadow: 0 1px 3px #000; cursor: default; }
.mk span { display: none; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); white-space: nowrap; background: rgba(10, 18, 26, 0.85); padding: 3px 8px;
  border-radius: 6px; font-size: 12px; z-index: 5; }
.mk:hover span { display: block; }
.mk.shrine { color: #c8c2b8; font-size: 18px; }
.mk.shrine.on { color: var(--pink2); }
.mk.shrine.travel { cursor: pointer; animation: pulse 1.2s infinite; font-size: 22px; }
.mk.shrine.travel span { display: block; }
.mk.beacon { color: #9a8a70; }
.mk.beacon.on { color: #ffb347; }
.mk.arena { color: #ff8a7a; font-size: 18px; }
.mk.arena.on { color: var(--moss); }
.mk.npc { color: var(--teal); font-size: 11px; }
.mk.quest { color: var(--gold); cursor: pointer; }
.mk.quest.tracked { font-size: 20px; }
.mk.player { color: #fff; font-size: 20px; text-shadow: 0 0 6px var(--pink); z-index: 6; }
.mk.label { font-family: var(--serif); font-style: italic; font-size: 12px; color: rgba(255, 255, 255, 0.85); pointer-events: none; }
.map-legend div { margin: 6px 0; font-size: 0.9em; }

/* réglages */
.settings .panel { width: min(820px, 94vw); }
.row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.row span { flex: 1; }
.row input[type="range"] { width: 220px; accent-color: var(--pink); }
.row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--pink); }
.row select { background: #22313d; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; min-width: 200px; }
.row output { width: 56px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.presets { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.presets button.on { background: var(--pink); color: #fff; }
.binds { width: 100%; border-collapse: collapse; }
.binds td { padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.binds button.bind { min-width: 150px; border-radius: 8px; padding: 5px 10px; font-size: 0.9em; }
.binds button.bind.wait { border-color: var(--gold); color: var(--gold); }
.controls { border-collapse: collapse; width: 100%; }
.controls td, .controls th { padding: 6px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); text-align: left; }
.controls th { color: var(--pink2); font-weight: 600; }

/* mort, crédits */
.gameover { background: radial-gradient(ellipse, rgba(40, 20, 40, 0.5), rgba(5, 5, 10, 0.85)); animation: fadein 1.5s; }
.go-box { text-align: center; }
.go-box h1 { font-family: var(--serif); font-weight: 400; font-size: 3em; margin: 0 0 8px; }
.go-box p { color: var(--muted); font-style: italic; margin-bottom: 24px; }
.credits { background: #070d14; flex-direction: column; z-index: 45; }
.cred-roll { text-align: center; animation: roll 26s linear forwards; }
.cred-roll h3 { font-family: var(--serif); font-weight: 400; color: var(--pink2); margin: 26px 0 4px; }
.cred-roll p { margin: 0; color: #e8e0d6; }
.cred-roll .gold { color: var(--gold); margin-top: 10px; }
.cred-btn { position: absolute; bottom: 30px; right: 30px; }
@keyframes roll { from { transform: translateY(45vh); } to { transform: translateY(-20vh); } }

@media (max-width: 800px) {
  .logo { font-size: 56px; }
  .title-box { margin-left: 6vw; }
  .jlist { grid-template-columns: 1fr; }
  .map-wrap { flex-direction: column; }
  .slots { min-width: 0; }
  .panel { min-width: 0; }
}

/* données & profil */
.consent { z-index: 60; }
.consent .panel { max-width: 720px; }
.consent p { line-height: 1.55; }
.code { font-family: ui-monospace, Menlo, monospace; letter-spacing: 1px; color: var(--gold); white-space: nowrap; }
input.txt { background: #22313d; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 220px; font-size: 1em; }
.row input.txt { text-transform: none; }
