/* MONEROPOLIS — interface : fenêtres Windows 98 × cadres WoW, repeinte en couleurs vives (thème en fin de fichier).
   Coins carrés, biseaux 3D de 2 px (clair en haut à gauche, sombre en bas à droite),
   barres de titre ardoise → acier, cadres ornementaux discrets en étain. Aucun orange. */
:root {
  color-scheme: dark;
  --panel: #2f353f;
  --panel-2: #262b33;
  --panel-3: #1d2128;
  --hi: #5a6372;
  --lo: #14181e;
  --text: #d6dbe0;
  --text-2: #8f99a6;
  --accent: #6f8fa6;
  --teal: #7fa39a;
  --danger: #a35a5a;
  --xmr: #9fb7c9;
  --pewter: #7d858f;
  --pewter-dk: #4a515b;
  --lcd: #a9b8ae;
  --lcd-ink: #26302b;
  --f-title: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --f-text: 'Pixelify Sans', 'Lucida Console', 'Courier New', monospace;
  --f-num: 'VT323', 'Lucida Console', 'Courier New', monospace;
  --bevel: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo);
  --sunken: inset 2px 2px 0 var(--lo), inset -2px -2px 0 var(--hi);
  --pz-css-loaded: 1;
}
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: #0d1014; color: var(--text); overflow: hidden; }
body { font: 15px/1.35 var(--f-text); -webkit-font-smoothing: none; user-select: none; -webkit-user-select: none; touch-action: none; }
#app { position: fixed; inset: 0; overflow: hidden; background: #0d1014; }
#view { position: absolute; left: 0; top: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; display: block; outline: none; }
#view.cur-default { cursor: var(--cur-default, default); }
#view.cur-talk { cursor: var(--cur-talk, pointer); }
#view.cur-coin { cursor: var(--cur-coin, pointer); }
#view.cur-door { cursor: var(--cur-door, pointer); }
#view.cur-hand { cursor: var(--cur-hand, pointer); }
#view.cur-look { cursor: var(--cur-look, help); }
#view.cur-orbit { cursor: var(--cur-orbit, move); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 1px dotted var(--teal); outline-offset: 1px; }

/* ── primitives ─────────────────────────────────────────────────────────── */
.bevel { background: var(--panel); box-shadow: var(--bevel); }
.sunken { background: var(--panel-3); box-shadow: var(--sunken); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 28px; padding: 3px 12px; border: 0; border-radius: 0;
  background: var(--panel); color: var(--text); box-shadow: var(--bevel); cursor: pointer;
  font: 15px var(--f-text); letter-spacing: 0.02em;
}
.btn:hover { background: #363d48; }
.btn:active, .btn.on { box-shadow: var(--sunken); background: #2a3039; padding: 4px 11px 2px 13px; }
.btn.primary { background: linear-gradient(180deg, #4f6577, #3e5162); }
.btn.primary:hover { background: linear-gradient(180deg, #5a7186, #46596b); }
.btn.danger { background: #4a3235; }
.btn[disabled] { color: var(--text-2); cursor: default; filter: saturate(0.4); }
.label { font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.08em; }
.num { font-family: var(--f-num); font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.xmr { color: var(--xmr); }
hr.groove { border: 0; height: 2px; margin: 8px 0; background: linear-gradient(var(--lo) 50%, var(--hi) 50%); }

/* cadre ornemental (étain) façon WoW : double filet + rivets aux coins */
.orn { position: relative; }
.orn::before { content: ''; position: absolute; inset: 3px; border: 1px solid var(--pewter-dk); pointer-events: none; box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset; }
.orn::after {
  content: ''; position: absolute; inset: -1px; pointer-events: none;
  background:
    linear-gradient(var(--pewter), var(--pewter)) top left / 6px 2px no-repeat,
    linear-gradient(var(--pewter), var(--pewter)) top left / 2px 6px no-repeat,
    linear-gradient(var(--pewter), var(--pewter)) top right / 6px 2px no-repeat,
    linear-gradient(var(--pewter), var(--pewter)) top right / 2px 6px no-repeat,
    linear-gradient(var(--pewter), var(--pewter)) bottom left / 6px 2px no-repeat,
    linear-gradient(var(--pewter), var(--pewter)) bottom left / 2px 6px no-repeat,
    linear-gradient(var(--pewter), var(--pewter)) bottom right / 6px 2px no-repeat,
    linear-gradient(var(--pewter), var(--pewter)) bottom right / 2px 6px no-repeat;
}

/* ── fenêtres ───────────────────────────────────────────────────────────── */
.win { position: absolute; min-width: 220px; max-width: calc(100vw - 32px); background: var(--panel); box-shadow: var(--bevel), 0 6px 18px rgba(0,0,0,0.45); padding: 3px; z-index: 30; display: flex; flex-direction: column; }
.win .titlebar { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 3px 0 8px; background: linear-gradient(90deg, #39424f, #6f8fa6); color: #eef1f4; cursor: grab; font: 600 14px var(--f-title); letter-spacing: 0.06em; text-shadow: 1px 1px 0 #1b2027; }
.win .titlebar .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win .titlebar button { width: 20px; height: 18px; padding: 0; min-height: 0; font: 14px/1 var(--f-num); }
.win.inactive .titlebar { background: linear-gradient(90deg, #3a3f47, #5d6570); color: #b8bfc7; }
.win .body { padding: 10px 12px 12px; overflow: auto; max-height: calc(100vh - 120px); }
.win.min .body { display: none; }

/* ── écran de chargement / titre ───────────────────────────────────────── */
.screen { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 50; }
/* v4 : les fenêtres vivent dans leur propre calque (leur ordre de premier plan ne déborde plus sur les annonces ni le
   fondu) ; pendant l'écran de connexion, ce calque passe devant lui (la fenêtre Avatar restait derrière) */
#windows { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
#windows > .win { pointer-events: auto; }
body:has(#title:not([hidden])) #windows { z-index: 55; }
#loading { background: radial-gradient(ellipse at 50% 40%, #1d232c 0%, #0b0e12 70%); }
#title { pointer-events: none; place-items: center start; padding-left: max(16px, 7vw); }
@media (max-width: 760px) { #title { place-items: end center; padding: 16px; } }
#title .splash { pointer-events: auto; }
.splash { width: min(520px, 100%); padding: 22px 26px 20px; display: flex; flex-direction: column; gap: 12px; }
.logo { margin: 0; font: 700 clamp(30px, 7vw, 46px)/1 var(--f-title); letter-spacing: 0.14em; color: #cfd6dd; text-shadow: 2px 2px 0 #14181e; text-wrap: balance; }
.logo .z { color: var(--xmr); }
.tagline { margin: 0; color: var(--text-2); font-size: 15px; }
.bar { height: 18px; padding: 3px; }
.bar .fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 10px, #5d7a8f 10px 12px); transition: width 0.2s steps(4); }
.step { font-family: var(--f-num); font-size: 19px; color: var(--teal); min-height: 1.2em; }
.tip { font-size: 13px; color: var(--text-2); min-height: 2.6em; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fine { font-size: 12px; color: #6b7480; }
.namefield { display: flex; gap: 8px; align-items: center; }
.namefield input { flex: 1; min-width: 0; height: 28px; padding: 2px 8px; border: 0; border-radius: 0; background: var(--panel-3); box-shadow: var(--sunken); color: var(--text); font: 16px var(--f-num); }

/* ── HUD (phase 1 : cadre d'unité minimal, horloge, aide) ──────────────── */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
#hud > * { pointer-events: auto; }
.unit { position: absolute; left: 12px; top: 12px; display: flex; gap: 8px; padding: 6px; align-items: center; }
.unit .portrait { width: 56px; height: 56px; image-rendering: pixelated; background: var(--panel-3); box-shadow: var(--sunken); display: block; }
.unit .who { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.unit .name { font: 600 15px var(--f-title); letter-spacing: 0.05em; }
.unit .bal { font-family: var(--f-num); font-size: 20px; color: var(--xmr); }
.clock { position: absolute; right: 12px; top: 12px; padding: 5px 10px; display: flex; gap: 10px; align-items: baseline; }
.clock .zone { font-size: 12px; color: var(--text-2); }
.hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 12px; font-size: 13px; color: var(--text-2); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.hint b { color: var(--text); font-weight: 400; }
.hudbtns { position: absolute; right: 12px; bottom: 14px; display: flex; gap: 4px; }
.alti { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); padding: 4px 12px; font-family: var(--f-num); font-size: 19px; color: var(--xmr); letter-spacing: 0.04em; white-space: nowrap; }
.fps { position: absolute; right: 12px; top: 52px; font-family: var(--f-num); font-size: 18px; color: var(--teal); padding: 2px 8px; }

/* fondu (portes, métro) */
#fade { position: absolute; inset: 0; background: #07080a; opacity: 0; pointer-events: none; transition: opacity 0.25s steps(5); z-index: 45; }
#fade.on { opacity: 1; }
/* bulles de texte */
.bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 15; overflow: hidden; }
.bubble { position: absolute; left: 0; top: 0; max-width: 220px; padding: 4px 8px; background: rgba(214, 219, 224, 0.95); color: #1d2128; font: 13px/1.25 var(--f-text); box-shadow: 2px 2px 0 rgba(20, 24, 30, 0.6); text-align: center; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; border: 6px solid transparent; border-top-color: rgba(214, 219, 224, 0.95); border-bottom: 0; transform: translateX(-50%); }
.bubble.car { background: rgba(159, 183, 201, 0.96); }
.bubble.car::after { border-top-color: rgba(159, 183, 201, 0.96); }

/* info-bulle */
#tooltip { position: absolute; z-index: 60; pointer-events: none; padding: 6px 9px; max-width: 280px; background: rgba(29,33,40,0.94); box-shadow: var(--bevel); }
#tooltip .tt-name { font: 600 14px var(--f-title); letter-spacing: 0.04em; color: #e6eaee; }
#tooltip .tt-type { font-size: 12px; color: var(--text-2); }
#tooltip .tt-act { font-size: 12px; color: var(--teal); margin-top: 2px; }

/* alerte façon « raid warning » (sobre) */
#alerts { position: absolute; right: 12px; top: 12px; z-index: 40; pointer-events: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; width: min(300px, calc(100vw - 24px)); }
.alert { font: 600 clamp(16px, 2.6vw, 22px) var(--f-title); letter-spacing: 0.06em; color: #dfe5ea; text-shadow: 2px 2px 0 #10131a; text-align: center; animation: alertIn 0.25s steps(3); }
.alert.warn { color: #d7b4b4; }
.alert.good { color: #b8d3cb; }
@keyframes alertIn { from { opacity: 0; transform: scale(1.15); } to { opacity: 1; transform: none; } }

/* dialogue texte simple */
.dialog p { margin: 0 0 8px; max-width: 46ch; }
.dialog .src { font-size: 12px; color: var(--text-2); }

/* réglages & debug */
.form { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; }
.form label { color: var(--text-2); font-size: 14px; }
.form select, .form input[type=range] { width: 100%; min-width: 0; }
.form select { height: 26px; border: 0; border-radius: 0; background: var(--panel-3); box-shadow: var(--sunken); padding: 0 6px; }
.seg { display: flex; gap: 2px; flex-wrap: wrap; }
.seg .btn { min-height: 24px; padding: 1px 8px; font-size: 14px; }
input[type=range] { accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--teal); width: 16px; height: 16px; }
.dbg { font-family: var(--f-num); font-size: 17px; line-height: 1.15; }
.dbg.kv, .dbg .kv { display: grid; grid-template-columns: 7ch 1fr; gap: 0 10px; }
.dbg .k { color: var(--text-2); }
.report { max-height: 220px; overflow: auto; padding: 6px; font-family: var(--f-num); font-size: 16px; line-height: 1.15; }
.report .ok { color: var(--teal); }
.report .ko { color: var(--danger); }
.report .rowr { display: grid; grid-template-columns: 3ch 1fr auto; gap: 6px; }
.dbgsec { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.dbgrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dbgrow select { flex: 1; min-width: 0; height: 26px; border: 0; border-radius: 0; background: var(--panel-3); box-shadow: var(--sunken); }

/* contraste élevé */
.hc { --text: #f2f5f7; --text-2: #c2cad3; --panel: #20252c; --hi: #8090a3; }

@media (max-width: 560px) {
  .unit .who { min-width: 0; }
  .hint { display: none; }
  .clock { top: auto; bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) { .alert { animation: none; } .bar .fill { transition: none; } }

/* ── dialogue PNJ ───────────────────────────────────────────────────────── */
.talk { display: flex; flex-direction: column; gap: 8px; }
.talk-head { display: flex; gap: 10px; align-items: center; }
.talk-head .portrait { width: 96px; height: 96px; flex: none; image-rendering: pixelated; background: var(--panel-3); box-shadow: var(--sunken); }
.talk-head .name { font: 700 18px var(--f-title); letter-spacing: 0.05em; color: #e6eaee; }
.talk-head .role { font-size: 13px; color: var(--text-2); }
.talk .line { margin: 0; min-height: 4.4em; padding: 8px 10px; background: var(--panel-3); box-shadow: var(--sunken); font-size: 15px; line-height: 1.4; cursor: pointer; max-width: none; }
.talk .line.narr { font-style: italic; color: var(--text-2); }
.talk .src { font-size: 12px; color: var(--teal); min-height: 1em; }
.bubble.animal { font-style: italic; background: rgba(196, 208, 200, 0.95); }
.bubble.animal::after { border-top-color: rgba(196, 208, 200, 0.95); }

/* ── créateur d'avatar ─────────────────────────────────────────────────── */
.avatar { display: flex; flex-direction: column; gap: 10px; }
.av-grid { display: grid; grid-template-columns: 240px 1fr; gap: 12px; min-height: 0; }
.av-left { display: flex; flex-direction: column; gap: 8px; }
.av-viewseg { justify-content: center; }
.av-view { width: 240px; height: 300px; image-rendering: pixelated; box-shadow: var(--sunken); background: var(--panel-3); cursor: grab; touch-action: none; }
.av-id { display: flex; gap: 8px; align-items: center; padding: 6px; background: var(--panel-2); box-shadow: var(--sunken); }
.av-id .portrait { width: 48px; height: 48px; image-rendering: pixelated; }
.av-id .name { font: 600 14px var(--f-title); }
.av-right { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.av-tabs .btn { min-height: 24px; padding: 1px 8px; font-size: 14px; }
.av-ctrls { display: flex; flex-direction: column; gap: 6px; max-height: 330px; overflow: auto; padding: 6px 8px; background: var(--panel-2); box-shadow: var(--sunken); }
.av-row { display: grid; grid-template-columns: 9.5em 1fr 3.4em; gap: 8px; align-items: center; }
.av-row label { color: var(--text-2); font-size: 14px; }
.av-row select { grid-column: 2 / 4; height: 26px; border: 0; border-radius: 0; background: var(--panel-3); box-shadow: var(--sunken); padding: 0 6px; }
.av-row .v { text-align: right; font-size: 18px; color: var(--xmr); }
.av-sw { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 3px; }
/* v4 (T40) : garde-robe des cosmétiques exclusifs */
.av-wset { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 3px; }
.av-wset .btn.small { font-size: 13px; padding: 2px 7px; min-height: 24px; }
.av-wset .btn.locked { opacity: 0.45; letter-spacing: 0.15em; }
.av-wnote { margin: 0 0 4px; }
.talk-me { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.talk-me canvas { width: 32px; height: 32px; image-rendering: pixelated; box-shadow: var(--sunken); }
.av-sw .sw { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 0; box-shadow: var(--bevel); cursor: pointer; }
.av-sw .sw.on { box-shadow: 0 0 0 2px var(--text), var(--sunken); }
@media (max-width: 640px) { .av-grid { grid-template-columns: 1fr; } .av-view { width: 100%; height: 220px; } .av-row { grid-template-columns: 7.5em 1fr 3em; } }

/* ── économie : terminal XMR·TERM, reçus, dette, suivi de livraison ─────── */
.term { display: flex; flex-direction: column; gap: 8px; }
.term .lcd { background: var(--lcd); color: var(--lcd-ink); box-shadow: var(--sunken); padding: 8px 10px; font: 17px/1.1 var(--f-num); display: flex; flex-direction: column; gap: 2px; text-shadow: 1px 1px 0 rgba(255,255,255,0.18); }
.term .lcd .hd { text-align: center; letter-spacing: 0.06em; border-bottom: 1px dashed rgba(38,48,43,0.5); padding-bottom: 3px; margin-bottom: 3px; }
.term .tr { display: grid; grid-template-columns: 8ch 1fr; gap: 6px; }
.term .tr .v { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term .tr.big { font-size: 20px; }
.term .tr.bad .v { text-decoration: line-through; }
.term .sub { display: grid; grid-template-columns: 100px 1fr; gap: 8px; align-items: center; margin-top: 4px; }
.term .qr { width: 100px; height: 100px; image-rendering: pixelated; display: block; }
.term .addr .k { font-size: 14px; opacity: 0.75; }
.term .addr .mono { word-break: break-all; font-size: 16px; }
.term .ring { text-align: center; letter-spacing: 0.08em; margin-top: 4px; }
.term .warn { text-align: center; background: var(--lcd-ink); color: var(--lcd); padding: 1px 4px; }
.term .status { font-size: 13px; color: var(--text-2); min-height: 1.2em; }
.unit .debt { font-family: var(--f-num); font-size: 16px; color: #d7a0a0; }
.unit .bal.tick { animation: balTick 0.4s steps(2); }
@keyframes balTick { 0% { color: #e8f0f6; } 100% { color: var(--xmr); } }
.receipts { position: absolute; right: 12px; top: 54px; display: flex; flex-direction: column; gap: 4px; width: 230px; pointer-events: none !important; }
.receipt { padding: 5px 9px; font-size: 13px; transition: opacity 0.4s steps(3), transform 0.4s steps(3); }
.receipt.out { opacity: 0; transform: translateX(16px); }
.receipt .rh { font-size: 11px; color: var(--text-2); letter-spacing: 0.08em; }
.receipt .ra { font: 20px/1 var(--f-num); color: var(--teal); }
.receipt .rl { color: var(--text); }
.job { position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); padding: 5px 10px; font-size: 14px; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; display: flex; gap: 8px; align-items: center; }
.job .num { font-size: 19px; color: var(--xmr); }
.job .late { color: #d7a0a0; }
.job button { min-height: 20px; padding: 0 6px; font-size: 13px; }
.bubble.warn { background: #d7b4b4; font: 700 18px var(--f-num); padding: 0 8px; }
.bubble.warn::after { border-top-color: #d7b4b4; }
.list { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow: auto; }
.list .it { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 4px 6px; background: var(--panel-2); box-shadow: var(--sunken); }
.list .it .nm { font-weight: 600; }
.list .it .sm { font-size: 12px; color: var(--text-2); }
.list .it .pr { font: 18px var(--f-num); color: var(--xmr); }
.kv2 { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 14px; }
.kv2 .k { color: var(--text-2); }
.kv2 .v { font: 18px var(--f-num); color: var(--xmr); }
.dialog input[type=text] { width: 100%; height: 28px; border: 0; border-radius: 0; background: var(--panel-3); box-shadow: var(--sunken); padding: 2px 8px; color: var(--text); font: 16px var(--f-num); box-sizing: border-box; }

/* ── HUD complet (phase 6) ──────────────────────────────────────────────── */
#hud .tl { position: absolute; left: 12px; top: 12px; display: flex; gap: 8px; align-items: flex-start; }
#hud .unit, #hud .target { position: static; }
#hud .unit .stats { font: 15px/1.1 var(--f-num); color: var(--text-2); white-space: nowrap; }
#hud .target { display: flex; gap: 8px; padding: 6px 30px 6px 6px; align-items: center; position: relative; }
#hud .target .portrait { width: 44px; height: 44px; image-rendering: pixelated; background: var(--panel-3); box-shadow: var(--sunken); }
#hud .target .name { font: 600 14px var(--f-title); letter-spacing: 0.04em; }
#hud .target .tx { position: absolute; right: 4px; top: 4px; width: 20px; height: 18px; min-height: 0; padding: 0; font: 14px/1 var(--f-num); }
#hud .rcol { position: absolute; right: 12px; top: 12px; width: 196px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; pointer-events: none; }
#hud .rcol > * { pointer-events: auto; }
#hud .mapframe { padding: 8px 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
#hud .minimap { width: 168px; height: 168px; image-rendering: pixelated; border-radius: 50%; cursor: var(--cur-hand, pointer); display: block; }
#hud .clock { position: static; box-shadow: none; background: none; padding: 0; justify-content: center; }
#hud .fps { position: static; text-align: right; }
#hud .track { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
#hud .track-row { position: static; transform: none; padding: 0; white-space: normal; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 13px; left: auto; top: auto; bottom: auto; max-width: none; background: none; box-shadow: none; }
#hud .track-row.alti { font: 17px var(--f-num); color: var(--xmr); letter-spacing: 0.02em; }
#hud .receipts { position: static; width: auto; }
#hud .actionbar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 3px; padding: 5px; }
#hud .slot { position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0; background: var(--panel-2); box-shadow: var(--bevel); display: grid; place-items: center; cursor: pointer; }
#hud .slot:hover { background: #363d48; }
#hud .slot:active, #hud .slot.on { box-shadow: var(--sunken); }
#hud .slot .icon { width: 32px; height: 32px; image-rendering: pixelated; }
#hud .slot .kb { position: absolute; left: 3px; top: 1px; font: 12px var(--f-num); color: var(--text-2); }
#hud .slot .sl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#hud .hint { bottom: 70px; }
#hud .chatslot { position: absolute; left: 12px; bottom: 10px; }
.chat { width: 330px; display: flex; flex-direction: column; padding: 4px; gap: 3px; background: rgba(47, 53, 63, 0.88); }
.chat .chead { display: flex; gap: 4px; align-items: center; }
.chat .ctabs { display: flex; gap: 2px; flex: 1; }
.chat .ctabs .btn, .chat .cmin { min-height: 22px; padding: 0 8px; font-size: 13px; }
.chat .clist { height: 132px; overflow-y: auto; padding: 4px 6px; background: rgba(20, 24, 30, 0.55); box-shadow: var(--sunken); font-size: 13px; line-height: 1.3; user-select: text; -webkit-user-select: text; }
.chat .cl .ct { color: #5a6372; font: 13px var(--f-num); margin-right: 4px; }
.chat .cl .cf { color: var(--xmr); }
.chat .cl.me .cf { color: var(--teal); }
.chat .cl.sys, .chat .cl.in { color: var(--text-2); }
.chat .cl.warn { color: #d7b4b4; }
.chat .cl.good, .chat .cl.in { color: #b8d3cb; }
.chat .cl.wh .cf { color: #b4a2d2; }
.chat .cin { height: 24px; border: 0; border-radius: 0; background: var(--panel-3); box-shadow: var(--sunken); padding: 2px 6px; color: var(--text); font: 14px var(--f-text); }
.chat.collapsed .clist, .chat.collapsed .cin { display: none; }
.emotewheel { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; z-index: 35; border-radius: 50%; background: radial-gradient(circle, rgba(29,33,40,0.85) 0 60%, rgba(29,33,40,0) 61%); }
.emotewheel .btn { position: absolute; transform: translate(-50%, -50%); min-width: 64px; }
.emotewheel .btn.mid { left: 110px; top: 110px; min-width: 0; width: 32px; }
.ctxmenu { position: absolute; z-index: 36; display: flex; flex-direction: column; gap: 2px; padding: 4px; min-width: 150px; }
.ctxmenu .ctxh { font: 600 13px var(--f-title); padding: 2px 6px 4px; color: var(--text-2); }
.ctxmenu .btn { justify-content: flex-start; min-height: 24px; font-size: 14px; }
.radio-lcd { background: var(--lcd); color: var(--lcd-ink); box-shadow: var(--sunken); padding: 8px 10px; font: 17px/1.15 var(--f-num); min-height: 70px; margin-bottom: 8px; }
.radio-lcd .big { font-size: 22px; letter-spacing: 0.04em; }
.radio-lcd .sub { margin-top: 4px; font-style: italic; }
.helpl { margin: 2px 0 8px; padding-left: 18px; font-size: 14px; }
.helpl li { margin: 2px 0; }
.list.hist .hrow { display: grid; grid-template-columns: 5ch 1fr auto; gap: 8px; font-size: 13px; padding: 1px 4px; }
.list.hist .hrow.in .num { color: var(--teal); }
.list.hist .hrow.out .num, .list.hist .hrow.stolen .num, .list.hist .hrow.debt .num { color: #d7a0a0; }
.list.hist .hrow .num { font-size: 16px; }
.kv2 .v.bad { color: #d7a0a0; }
.bigmap { width: 100%; height: auto; image-rendering: pixelated; display: block; box-shadow: var(--sunken); cursor: var(--cur-hand, pointer); }
@media (max-width: 900px) { .chat { width: 260px; } .chat .clist { height: 90px; } #hud .slot { width: 36px; height: 36px; } #hud .slot .icon { width: 24px; height: 24px; } }
@media (max-width: 640px) { #hud .rcol { width: 128px; } #hud .minimap { width: 112px; height: 112px; } #hud .chatslot { bottom: 60px; } #hud .unit .stats { display: none; } #hud .target { display: none; } }
.bubble.me { background: rgba(184, 211, 203, 0.95); }
.bubble.me::after { border-top-color: rgba(184, 211, 203, 0.95); }
#hud .hint { font-size: 12px; padding: 4px 10px; max-width: calc(100vw - 720px); }
@media (max-width: 1100px) { #hud .hint { display: none; } }
.chat .clist { height: 110px; }
.nametag { position: absolute; left: 0; top: 0; padding: 1px 6px; font: 15px/1.1 var(--f-num); color: #e6eaee; background: rgba(29, 33, 40, 0.75); box-shadow: 1px 1px 0 rgba(0,0,0,0.5); white-space: nowrap; pointer-events: none; }
.chat .cl.news { color: #b4a2d2; }
#title .step { font-size: 16px; }

/* ── phase 8 : badge de profil, Room Zero (quatrième mur), générique ───────── */
.unit .nrow { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pbadge { font: 12px/1 var(--f-num); letter-spacing: 0.08em; color: #cfe3d6; background: #35503f; padding: 2px 5px; box-shadow: var(--bevel); white-space: nowrap; }
/* Room Zero : l'interface perd ses pixels, ses biseaux et sa police rétro */
body.rz { --panel: #f4f3ef; --panel-2: #ebe9e3; --panel-3: #ffffff; --hi: #ffffff; --lo: #cfcbc2; --text: #2a2e34; --text-2: #6b7078; --accent: #4f8fae; --teal: #3d7a6a; --xmr: #2f6f8f;
  --f-text: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; --f-num: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; --f-title: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --bevel: 0 0 0 1px #dedad2; --sunken: inset 0 0 0 1px #dedad2; -webkit-font-smoothing: antialiased; }
body.rz #view { image-rendering: auto; }
body.rz .win { border-radius: 12px; box-shadow: 0 0 0 1px #dedad2, 0 18px 50px rgba(40, 40, 50, 0.22); padding: 0; overflow: hidden; }
body.rz .win .titlebar { background: #ffffff; color: #2a2e34; text-shadow: none; height: 32px; border-bottom: 1px solid #ebe8e1; font: 600 13px var(--f-title); letter-spacing: 0.02em; }
body.rz .btn { border-radius: 8px; box-shadow: 0 0 0 1px #d6d2c9; background: #ffffff; color: #2a2e34; }
body.rz .btn.primary { background: #2f6f8f; color: #ffffff; box-shadow: none; }
body.rz .talk-head .name, body.rz .unit .name { color: #1e2228; }
body.rz .talk-head .portrait { image-rendering: auto; border-radius: 50%; box-shadow: 0 0 0 1px #dedad2; background: #e8e6e0; }
body.rz .talk .line { border-radius: 8px; font-size: 16px; line-height: 1.5; }
body.rz .bubble { font-family: var(--f-text); border-radius: 12px; }
body.rz .unit, body.rz .target, body.rz .mapframe, body.rz .actionbar, body.rz .clock, body.rz .track, body.rz .chat { border-radius: 10px; }
body.rz .orn::before, body.rz .orn::after { display: none !important; }
.rzwin .src { color: #6b7078; font-style: italic; }
/* cartes plein écran de la séance */
.rz-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 24px; box-sizing: border-box; cursor: pointer; animation: rzin 0.6s ease-out; font-family: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
@keyframes rzin { from { opacity: 0; } to { opacity: 1; } }
.rz-overlay .hintc { margin-top: 18px; font-size: 13px; color: #8a9098; letter-spacing: 0.06em; }
.rz-card { background: rgba(250, 249, 246, 0.97); color: #1e2228; text-align: center; }
.rz-card .big { font: 600 clamp(22px, 3.6vw, 40px)/1.25 Georgia, 'Times New Roman', serif; max-width: 860px; }
.rz-card .small { font: italic 400 clamp(18px, 2.4vw, 26px)/1.4 Georgia, serif; color: #4f5660; }
.rz-notes { background: rgba(40, 42, 48, 0.55); }
.rz-notes .paper { background: #fffef8; color: #2a2e34; width: min(620px, 100%); padding: 22px 26px 18px 54px; box-sizing: border-box; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  background-image: linear-gradient(#fffef8 31px, #d8e4ee 32px); background-size: 100% 32px; background-position: 0 14px; position: relative; font: 17px/32px 'Segoe Print', 'Bradley Hand', 'Comic Neue', 'Chalkboard SE', cursive; }
.rz-notes .paper::before { content: ''; position: absolute; left: 38px; top: 0; bottom: 0; width: 2px; background: #e8b4b4; }
.rz-notes .ph { font: 700 13px/32px system-ui, sans-serif; letter-spacing: 0.08em; color: #8a3a5a; }
.rz-notes ul { margin: 0; padding-left: 18px; }
.rz-notes .sig { text-align: right; color: #6b7078; font-size: 15px; }
.rz-ad { background: linear-gradient(160deg, #e9f4f8, #cfe6ef); color: #233540; text-align: center; cursor: default; }
.rz-ad .adk { position: absolute; top: 16px; left: 18px; font: 600 12px system-ui, sans-serif; letter-spacing: 0.12em; color: #5d7a88; }
.rz-ad .logo { font: 800 clamp(48px, 9vw, 110px)/1 Georgia, serif; color: #2f6f8f; letter-spacing: -0.02em; text-shadow: none; }
.rz-ad .tag { font: italic 500 clamp(20px, 3vw, 32px) Georgia, serif; }
.rz-ad .copy { max-width: 620px; font-size: 18px; line-height: 1.5; }
.rz-ad .fine { max-width: 640px; font-size: 11px; color: #5d7a88; line-height: 1.4; }
.rz-ad .skip { position: absolute; right: 22px; bottom: 22px; padding: 10px 16px; border: 0; border-radius: 6px; background: rgba(20, 30, 36, 0.78); color: #fff; font: 600 14px system-ui, sans-serif; cursor: pointer; }
.rz-ad .skip:disabled { opacity: 0.7; cursor: default; }
.rz-ins .ih { font: 700 13px system-ui, sans-serif; letter-spacing: 0.06em; color: #5a2a3a; margin-bottom: 8px; }
.rz-ins .tr { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed #d6d2c9; }
.rz-ins .tr .k { color: #6b7078; } .rz-ins .tr.bad .v { color: #b03a3a; font-weight: 700; letter-spacing: 0.08em; }
/* générique */
.credits { position: fixed; inset: 0; z-index: 180; overflow: hidden; cursor: pointer; background: linear-gradient(rgba(8, 10, 14, 0.15), rgba(8, 10, 14, 0.55)); transition: opacity 0.6s; }
.credits.out { opacity: 0; }
.credits .roll { position: absolute; left: 50%; top: 0; width: min(560px, 92vw); transform: translate(-50%, 100vh); animation: croll 70s linear forwards; text-align: center; color: #eef1f4; text-shadow: 0 2px 6px rgba(0,0,0,0.7); }
@keyframes croll { to { transform: translate(-50%, -100%); } }
.credits .logo { font: 700 44px var(--f-title); letter-spacing: 0.1em; color: #eef1f4; } .credits .logo .z { color: var(--xmr); }
.credits .sub { margin: 6px 0 46px; color: #b8c2cc; font-style: italic; }
.credits .cs { margin: 0 0 42px; } .credits .ct { font: 600 15px var(--f-title); letter-spacing: 0.18em; color: #9fb7c9; margin-bottom: 12px; text-transform: uppercase; }
.credits .cp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 3px 0; } .credits .ck { text-align: right; } .credits .cv { text-align: left; color: #c8d0d8; font-style: italic; }
.credits .cl { padding: 3px 0; } .credits .cl.dim { color: #9aa4ae; margin-bottom: 60vh; }
.credits .end { font: 700 28px var(--f-title); margin: 70px 0 10px; letter-spacing: 0.06em; }
.credits .skiphint { position: absolute; right: 16px; bottom: 14px; font-size: 12px; color: #b8c2cc; }
body.rz .chat { background: rgba(244, 243, 239, 0.92); border-radius: 10px; } body.rz .chat .clist { background: rgba(255, 255, 255, 0.85); border-radius: 6px; } body.rz .chat .cl .ct { color: #9aa0a8; }
body.credits-on #hud { display: none; }

/* ══ THÈME MONEROPOLIS : couleurs vives (violet nuit, magenta, or, menthe) ══════════════════════════ */
:root {
  --panel: #2b1250; --panel-2: #22103f; --panel-3: #160a2b; --hi: #7a4fd6; --lo: #0b0418;
  --text: #fff4fb; --text-2: #c9b3f0; --accent: #ff2e93; --teal: #19f0c8; --danger: #ff4d6d; --xmr: #ffb703;
  --pewter: #19f0c8; --pewter-dk: #5d2ea8; --lcd: #d9ff6b; --lcd-ink: #1d2a05;
  --f-title: 'Bungee', 'Arial Black', Impact, sans-serif;
  --hot: linear-gradient(90deg, #ff2e93 0%, #ff7a00 62%, #ffcc00 100%);
}
html, body, #app { background: #0d0618; }
.btn:hover { background: #3d1a70; }
.btn:active, .btn.on { background: #1f0c3a; }
.btn.primary { background: linear-gradient(180deg, #ff4fa6, #d61a76); color: #fff; text-shadow: 1px 1px 0 #5a0632; }
.btn.primary:hover { background: linear-gradient(180deg, #ff6bb5, #e72c88); }
.btn.danger { background: #8a1f3a; }
.win { box-shadow: var(--bevel), 0 0 0 1px #ff2e93, 0 10px 26px rgba(5, 0, 15, 0.6); }
.win .titlebar { background: var(--hot); color: #fff; text-shadow: 1px 1px 0 #5a0632, 0 0 6px rgba(90, 6, 50, 0.6); font: 400 13px var(--f-title); letter-spacing: 0.04em; }
.win.inactive .titlebar { background: linear-gradient(90deg, #4b2380, #7a4fb0); color: #e3d6ff; }
.win .titlebar button { color: #2a0845; background: #ffe7f3; }
#loading { background: radial-gradient(ellipse at 50% 35%, #3a1470 0%, #160a2b 55%, #07020f 100%); }
.splash { box-shadow: var(--bevel), 0 0 0 2px #ff2e93, 0 0 0 4px #2a0845, 0 0 46px rgba(255, 46, 147, 0.35); }
.bar .fill { background: repeating-linear-gradient(90deg, #ff2e93 0 10px, #ffb703 10px 20px, #19f0c8 20px 30px); }
.fine { color: #9a84c4; }
.tagline { color: #e0cff8; }
/* logo : lettres épaisses, dégradés vifs, contour, relief, pièce qui tourne */
.logo { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 2px; margin: 6px 0 8px; padding-right: 54px;
  font: 400 clamp(34px, 7.4vw, 56px)/0.95 var(--f-title); letter-spacing: 0.01em; color: #fff; text-shadow: none; transform: rotate(-3deg) skewX(-7deg); transform-origin: left center; }
.logo .w1, .logo .w2 { background: linear-gradient(180deg, #fff59a 0%, #ffcc00 38%, #ff7a00 72%, #ff2e93 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #2a0845; filter: drop-shadow(2px 2px 0 #2a0845) drop-shadow(2px 2px 0 #2a0845) drop-shadow(2px 2px 0 #ff2e93) drop-shadow(0 0 12px rgba(255, 46, 147, 0.5)); }
.logo .w2 { background-image: linear-gradient(180deg, #d6fff8 0%, #19f0c8 40%, #3fa9ff 70%, #b14bff 100%); filter: drop-shadow(2px 2px 0 #2a0845) drop-shadow(2px 2px 0 #2a0845) drop-shadow(2px 2px 0 #19f0c8) drop-shadow(0 0 12px rgba(25, 240, 200, 0.45)); }
/* HUD vif */
.unit .name, #hud .target .name, .talk-head .name, #tooltip .tt-name { font-family: var(--f-title); font-weight: 400; letter-spacing: 0.03em; color: #fff; }
.unit .bal { color: var(--xmr); text-shadow: 0 0 8px rgba(255, 183, 3, 0.35); }
#hud .slot { background: linear-gradient(180deg, #3a1a6b, #241046); }
#hud .slot:hover { background: linear-gradient(180deg, #55259a, #34176a); }
#hud .actionbar { box-shadow: var(--bevel), 0 0 0 1px #ff2e93, 0 0 18px rgba(255, 46, 147, 0.25); }
#hud .mapframe { box-shadow: var(--bevel), 0 0 0 1px #19f0c8, 0 0 16px rgba(25, 240, 200, 0.2); }
#hud .minimap { box-shadow: 0 0 0 2px #19f0c8, 0 0 0 4px #2a0845; }
#tooltip { background: rgba(22, 10, 43, 0.95); box-shadow: var(--bevel), 0 0 0 1px #ff2e93; }
.alert { color: #fff; text-shadow: 2px 2px 0 #2a0845, 0 0 12px rgba(255, 46, 147, 0.6); font-weight: 400; }
.alert.warn { color: #ffb3c6; text-shadow: 2px 2px 0 #3a0418, 0 0 12px rgba(255, 77, 109, 0.6); }
.alert.good { color: #a6ffe9; text-shadow: 2px 2px 0 #062a24, 0 0 12px rgba(25, 240, 200, 0.6); }
.chat { background: rgba(34, 16, 63, 0.9); box-shadow: var(--bevel), 0 0 0 1px rgba(255, 46, 147, 0.6); }
.chat .clist { background: rgba(11, 4, 24, 0.6); }
.chat .cl .ct { color: #7d68a8; }
.chat .cl.news { color: #ffc6e6; }
.chat .cl.warn, .unit .debt, .job .late, .kv2 .v.bad { color: #ff8fa8; }
.bubble { background: rgba(255, 248, 252, 0.97); color: #2a0845; box-shadow: 2px 2px 0 #2a0845; border: 1px solid #2a0845; }
.bubble::after { border-top-color: #2a0845; }
.bubble.me { background: #b9fff0; } .bubble.me::after { border-top-color: #2a0845; }
.bubble.car { background: #ffe08a; } .bubble.car::after { border-top-color: #2a0845; }
.bubble.animal { background: #ffd6ea; } .bubble.animal::after { border-top-color: #2a0845; }
.nametag { background: rgba(43, 18, 80, 0.85); color: #fff; box-shadow: 0 0 0 1px #19f0c8; }
.pbadge { color: #2a0845; background: linear-gradient(90deg, #19f0c8, #ffcc00); box-shadow: none; }
.receipt .ra { color: var(--teal); }
.emotewheel { background: radial-gradient(circle, rgba(43, 18, 80, 0.9) 0 60%, rgba(43, 18, 80, 0) 61%); }

/* ══ BUTIN & COMBAT : barre de vie, vignette de dégâts, chiffres de dégâts, sac à dos ═════════════════ */
#view.cur-grab { cursor: var(--cur-grab, pointer); }
#view.cur-fight { cursor: var(--cur-fight, crosshair); }
.hpbar { position: relative; height: 13px; min-width: 132px; background: #12051f; box-shadow: inset 0 0 0 1px #2a0845, 0 0 0 1px #ff2e93; overflow: hidden; margin: 2px 0 1px; }
.hpbar .fill { position: absolute; inset: 0 auto 0 0; width: 100%; transition: width 0.18s steps(4); background: repeating-linear-gradient(90deg, #19f0c8 0 6px, #12d6b0 6px 8px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35); }
.hpbar.mid .fill { background: repeating-linear-gradient(90deg, #ffcc00 0 6px, #e0a800 6px 8px); }
.hpbar.low .fill { background: repeating-linear-gradient(90deg, #ff2e93 0 6px, #d61a76 6px 8px); animation: hpPulse 0.8s steps(2) infinite; }
.hpbar .t { position: absolute; inset: 0; display: grid; place-items: center; font: 13px/1 var(--f-num, VT323, monospace); color: #fff; text-shadow: 1px 1px 0 #2a0845; letter-spacing: 0.05em; }
@keyframes hpPulse { 50% { filter: brightness(1.5); } }
@media (prefers-reduced-motion: reduce) { .hpbar.low .fill { animation: none; } }
#hurt { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 4; background: radial-gradient(ellipse at 50% 50%, rgba(255, 20, 80, 0) 48%, rgba(255, 20, 80, 0.38) 78%, rgba(120, 0, 40, 0.8) 100%); }
.bubble.dmg { background: none; border: 0; box-shadow: none; padding: 0; color: #ffcc00; font: 400 18px/1 var(--f-title); text-shadow: 2px 2px 0 #2a0845, -1px -1px 0 #2a0845; white-space: nowrap; }
.bubble.dmg::after { display: none; }
.bubble.dmg.me { color: #ff4d6d; font-size: 16px; }
.backpack .tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.backpack .bp-top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.backpack .bp-hp .hpbar { min-width: 0; }
.backpack .bp-w { display: flex; gap: 6px; align-items: center; }
.backpack .nm { font: 400 14px var(--f-title); color: #fff; }
.backpack .sm { font-size: 13px; color: var(--text-2); }
.backpack .bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; margin: 4px 0 8px; }
.backpack .bp-cell { position: relative; width: 44px; height: 44px; display: grid; place-items: center; background: linear-gradient(180deg, #3a1a6b, #241046); border: 0; box-shadow: var(--bevel); cursor: pointer; padding: 0; }
.backpack .bp-cell .icon { image-rendering: pixelated; }
.backpack .bp-cell .n { position: absolute; right: 2px; bottom: 0; font: 14px var(--f-num, VT323, monospace); color: #fff; text-shadow: 1px 1px 0 #12051f; }
.backpack .bp-cell.k-weapon { box-shadow: var(--bevel), inset 0 0 0 1px #ff2e93; }
.backpack .bp-cell.k-food { box-shadow: var(--bevel), inset 0 0 0 1px #19f0c8; }
.backpack .bp-cell.eq::before { content: 'E'; position: absolute; left: 2px; top: 0; font: 12px var(--f-num, VT323, monospace); color: #ffcc00; }
.backpack .bp-cell.sel { outline: 2px solid #ffcc00; outline-offset: -2px; }
.backpack .bp-detail { padding: 8px; min-height: 92px; background: rgba(11, 4, 24, 0.55); margin-bottom: 6px; }
.backpack .bp-dh { display: flex; gap: 8px; align-items: center; }
.backpack .bp-detail p { margin: 6px 0; font-size: 14px; }
.backpack .bp-warn { margin: 6px 0; padding: 6px; background: rgba(255, 46, 147, 0.18); box-shadow: inset 0 0 0 1px #ff2e93; display: flex; gap: 6px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.backpack .bp-mis { padding: 6px 8px; margin-bottom: 6px; background: rgba(11, 4, 24, 0.5); box-shadow: inset 0 0 0 1px #7a4fd6; }
.backpack .bp-mis.done { box-shadow: inset 0 0 0 1px #19f0c8; opacity: 0.85; }
.backpack .bp-mis .pr { font: 15px var(--f-num, VT323, monospace); color: #ffcc00; margin-left: 6px; }
.backpack .mbar { height: 6px; background: #12051f; margin-top: 4px; }
.backpack .mbar > div { height: 100%; background: linear-gradient(90deg, #ff2e93, #ffcc00); }
.nametag { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.nametag .hpw { display: block; width: 46px; height: 4px; background: #12051f; box-shadow: 0 0 0 1px #2a0845; }
.nametag .hp { display: block; height: 100%; background: #19f0c8; }
.nametag .hp.mid { background: #ffcc00; } .nametag .hp.low { background: #ff2e93; }
/* ── T16 : musique (playlist) ── */
.music .mrowbar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.music .mbar { flex: 1; height: 6px; background: #12051f; }
.music .mbar .fill { height: 100%; width: 0; background: linear-gradient(90deg, #ff2e93, #ffcc00); }
.music .mtime { font: 15px var(--f-num, VT323, monospace); white-space: nowrap; }
.music .mctrl { flex-wrap: wrap; justify-content: flex-start; gap: 4px; margin: 0 0 6px; }
.music .msearch { width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 4px 6px; font: 15px var(--f-text); background: #12051f; color: #fff; border: 0; box-shadow: var(--sunken); }
.music .mlist { max-height: 240px; overflow-y: auto; padding: 2px; background: rgba(11, 4, 24, 0.55); }
.music .mrow { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px; padding: 2px 4px; }
.music .mrow:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.music .mrow.cur { background: rgba(255, 46, 147, 0.2); box-shadow: inset 2px 0 0 #ff2e93; }
.music .mrow.ghost .mt { color: #a6ffe9; font-style: italic; letter-spacing: 0.04em; }
.music .mrow .btn { min-height: 22px; padding: 0 7px; font-size: 13px; }
.music .mrow .mt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.music .mrow .mt i { color: var(--text-2); font-style: normal; }
.music .mrow .md { font: 14px var(--f-num, VT323, monospace); color: var(--text-2); }
.music .mqueue { margin-top: 6px; }
.music .mrowq { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; padding: 1px 4px; }
.music .mrowq .btn { min-height: 20px; padding: 0 6px; font-size: 12px; }
#hud .subtitles { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); z-index: 41; pointer-events: none; max-width: min(680px, calc(100vw - 32px)); text-align: center; }
#hud .subtitles span { display: inline-block; padding: 4px 10px; background: rgba(8, 3, 18, 0.78); color: #f2f2f2; font: 17px/1.3 var(--f-text); letter-spacing: 0.02em; box-shadow: 0 0 0 1px rgba(166, 255, 233, 0.35); }
.chat .cl.music span:last-child { color: #c9a6ff; }
/* ── T18 : chaleur (étoiles) ── */
#hud .heat { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 3px 8px; margin-top: 4px; background: linear-gradient(90deg, #4a0820, #2a0845); }
#hud .heat .lbl { font: 13px var(--f-title); color: #ffb3c6; letter-spacing: 0.08em; text-transform: uppercase; }
#hud .heat b { font: 20px/1 var(--f-num, VT323, monospace); color: #ffcc00; letter-spacing: 3px; text-shadow: 0 0 8px rgba(255, 204, 0, 0.6); animation: heatPulse 1s steps(2) infinite; }
@keyframes heatPulse { 50% { color: #ff4d6d; } }
/* ── T21 : cartes à collectionner, boutique COZYDROP, album, mode Décorer ── */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 6px 0; max-height: 52vh; overflow: auto; padding: 2px; }
.cardgrid.mini { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); max-height: 40vh; }
.fcard { --rc: #9aa4ad; position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 5px; background: linear-gradient(160deg, #2a2440, #16131f); border: 2px solid var(--rc); box-shadow: 0 0 0 1px #000, 0 3px 0 #000; color: var(--text); font: 12px var(--f-text); text-align: center; overflow: hidden; }
button.fcard { cursor: pointer; } button.fcard:hover, .fcard.on { filter: brightness(1.25); }
.fcard .pic { position: relative; background: #1c1a2a; box-shadow: var(--sunken); aspect-ratio: 1; }
.fcard .pic img, .fcard.mini img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.fcard .n { position: absolute; right: 3px; top: 2px; font: 16px var(--f-num); color: #ffcc00; text-shadow: 1px 1px 0 #000; }
.fcard.mini .n { position: absolute; right: 4px; top: 3px; }
.fcard .nm { font-weight: 600; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; justify-content: center; }
.fcard.mini .nm { font-size: 10px; min-height: 2.2em; }
.fcard .rar { font: 11px var(--f-num); color: var(--rc); letter-spacing: 0.06em; text-transform: uppercase; }
.fcard .ser { font: 13px var(--f-num); color: #ff9ac8; }
.fcard .buy { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 2px; }
.fcard .buy .pr { font: 15px var(--f-num); color: #ffcc00; }
.fcard .btn.small { font-size: 11px; padding: 2px 5px; width: 100%; }
.fcard.locked img { filter: brightness(0) opacity(0.55); }
.fcard.locked { background: linear-gradient(160deg, #1d1b26, #121018); }
.r-C { --rc: #9aa4ad; } .r-U { --rc: #5ad87a; } .r-R { --rc: #4aa8ff; } .r-E { --rc: #b46aff; } .r-L { --rc: #ffb02a; } .r-X { --rc: #ff3a8a; }
.rar.r-C, .rar.r-U, .rar.r-R, .rar.r-E, .rar.r-L, .rar.r-X { color: var(--rc); font: 13px var(--f-num); text-transform: uppercase; }
.fcard.holo::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.0) 42%, rgba(255, 120, 220, 0.28) 47%, rgba(120, 220, 255, 0.32) 50%, rgba(255, 255, 140, 0.26) 53%, transparent 58%); animation: holo 3.2s linear infinite; pointer-events: none; mix-blend-mode: screen; }
@keyframes holo { from { transform: translateX(-35%) rotate(0.001deg); } to { transform: translateX(35%) rotate(0.001deg); } }
.fcard.r-X { box-shadow: 0 0 0 1px #000, 0 0 12px rgba(255, 58, 138, 0.55); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.tabs .btn.tab { font-size: 12px; padding: 3px 7px; }
.tabs .btn.tab.done { color: #ffcc00; }
.cozy-banner { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; margin-bottom: 4px; background: linear-gradient(90deg, #ff2e93, #7b2cff 60%, #19c9f0); color: #fff; box-shadow: var(--bevel); }
.cozy-banner b { font: 26px/1 'Bungee', var(--f-title); letter-spacing: 0.04em; text-shadow: 2px 2px 0 #2a0845; }
.cozy-banner span { font-size: 12px; }
.shopwin .it.mystery { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 8px; background: linear-gradient(90deg, #3a1a50, #1a1030); box-shadow: var(--sunken); }
.shopwin .it.mystery .nm { font-weight: 600; color: #ffcc00; } .shopwin .it.mystery .sm { font-size: 11px; color: var(--text-2); }
.shopwin .it.mystery .pr { font: 18px var(--f-num); color: #ffcc00; }
.fcardrow { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: center; }
.fcardrow img { width: 72px; height: 72px; image-rendering: pixelated; box-shadow: var(--sunken); background: #1c1a2a; }
.decorwin .cardgrid.mini { margin-top: 4px; }
/* ── T22 : PC « XMR·OS 2041 » (plein écran façon CRT) ── */
.pcos { position: fixed; inset: 0; z-index: 900; background: #000; display: flex; align-items: center; justify-content: center; font: 15px var(--f-text); color: #e6f4ff; }
.pcos .crt { position: relative; width: min(1100px, 100vw); height: min(720px, 100vh); display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 40%, #1f5f8a 0%, #12385a 55%, #081a2c 100%); border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.75), 0 0 0 10px #1a1a1e, 0 0 0 14px #2a2a30; }
.pcos .scan { position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; animation: crtflick 4s steps(40) infinite; }
@keyframes crtflick { 50% { opacity: 0.85; } }
.pc-top { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: linear-gradient(90deg, #ff2e93, #7b2cff 50%, #19c9f0); box-shadow: 0 2px 0 #000; }
.pc-top .logo { font: 20px/1 'Bungee', var(--f-title); color: #fff; text-shadow: 2px 2px 0 #2a0845; margin-right: 6px; }
.pc-top .sp { flex: 1; } .pc-top .pc-clock { font: 20px var(--f-num); margin: 0 6px; }
.pc-btn { font: 14px var(--f-text); color: #e6f4ff; background: #1a2a44; border: 0; padding: 4px 9px; box-shadow: inset 2px 2px 0 #3a5a8a, inset -2px -2px 0 #0a1424; cursor: pointer; }
.pc-btn:hover, .pc-btn.on { background: #2a4a7a; } .pc-btn.hot { background: #a8205a; } .pc-btn:disabled { opacity: 0.6; cursor: default; }
.pc-body { flex: 1; overflow: auto; padding: 14px; position: relative; }
.pc-icons { display: grid; grid-template-columns: repeat(auto-fill, 110px); gap: 18px; }
.pc-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; background: transparent; border: 0; color: #fff; font: 14px var(--f-text); text-shadow: 1px 1px 0 #000; cursor: pointer; }
.pc-icon canvas { image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.5)); }
.pc-icon:hover span { background: #ff2e93; }
.pc-wall { position: absolute; right: 24px; bottom: 24px; }
.pc-note { width: 190px; padding: 10px; background: #ffe86a; color: #3a2a0a; font: 15px var(--f-num); transform: rotate(-3deg); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); }
.pc-bar { display: flex; gap: 6px; } .pc-addr, .pc-q { flex: 1; font: 15px var(--f-num); padding: 5px 8px; background: #0a1424; color: #9fe8ff; border: 0; box-shadow: inset 2px 2px 0 #000; }
.pc-marks { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.pc-page { background: #f4f0e6; color: #1a1a22; padding: 14px 18px; min-height: 60%; box-shadow: inset 0 0 0 2px #000; }
.pc-page .fine { color: #5a5a66; font-size: 12px; } .pc-page .label { margin-top: 10px; font: 13px var(--f-num); text-transform: uppercase; color: #7b2cff; letter-spacing: 0.08em; }
.pc-page h1.brand { font: 34px/1.1 'Bungee', var(--f-title); margin: 0 0 4px; } .pc-page h1.brand i { color: #ff2e93; font-style: normal; } .pc-page h1.brand b { color: #19a9d0; }
.pc-page h1.rnn { color: #b0102a; } .pc-page h1.doom { color: #7b2cff; } .pc-page h1.lo { color: #1a4a8a; } .pc-page h1.rh { color: #d0402a; } .pc-page h1.wiki { font-family: Georgia, serif; } .pc-page h1.th { color: #2a8a6a; } .pc-page h1.pw { color: #4a6a8a; }
.pc-page .srch { display: flex; gap: 6px; margin: 10px 0; } .pc-page .pc-q { background: #fff; color: #1a1a22; box-shadow: inset 2px 2px 0 #8a8a96; }
.pc-page .res { padding: 6px 0; border-bottom: 1px dashed #c8c0b0; } .pc-page .res .url { font: 13px var(--f-num); color: #2a8a4a; } .pc-page .res.ad { color: #8a6a1a; }
.pc-page button.link { background: none; border: 0; padding: 0; color: #1a3aa8; font: 17px var(--f-text); text-decoration: underline; cursor: pointer; }
.pc-page .news { padding: 6px 8px; margin: 4px 0; background: #fff; border-left: 4px solid #b0102a; } .pc-page .news.live { border-color: #ff2e93; background: #fff0f6; }
.pc-page .post { padding: 8px; margin: 6px 0; background: #fff; box-shadow: 2px 2px 0 #c8c0b0; } .pc-page .post p { margin: 4px 0; }
.pc-page .job { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px; margin: 6px 0; background: #fff; box-shadow: 2px 2px 0 #c8c0b0; } .pc-page .job p { margin: 4px 0 0; }
.pc-page .article h2 { font-family: Georgia, serif; border-bottom: 1px solid #aaa; }
.pc-page .chatlog { height: 260px; overflow: auto; background: #fff; padding: 8px; box-shadow: inset 2px 2px 0 #8a8a96; }
.pc-page .msg { margin: 6px 0; padding: 6px 10px; max-width: 75%; border-radius: 10px; } .pc-page .msg.bot { background: #e0f4ea; } .pc-page .msg.me { background: #e6e0ff; margin-left: auto; }
.pc-page .wx { display: flex; gap: 10px; flex-wrap: wrap; } .pc-page .wxd { flex: 1; min-width: 140px; background: #fff; padding: 10px; text-align: center; box-shadow: 2px 2px 0 #c8c0b0; } .pc-page .wxd .big { font-size: 40px; }
.pc-page.site-cozydrop { background: #1d1a2c; color: var(--text); }
.pc-page.site-404 h2 { color: #b0102a; font: 40px 'Bungee', var(--f-title); }
.mailapp { display: grid; grid-template-columns: 320px 1fr; gap: 10px; height: 100%; }
.mlist { display: flex; flex-direction: column; gap: 3px; overflow: auto; background: #0a1424; padding: 6px; box-shadow: inset 2px 2px 0 #000; }
.mlist .mtools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.mitem { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding: 6px 8px; background: #12233a; color: #c8d8e8; border: 0; font: 13px var(--f-text); cursor: pointer; }
.mitem b { font-size: 12px; color: #8ab8d8; } .mitem.unread { background: #1a3a5a; color: #fff; } .mitem.unread b::before { content: '● '; color: #ff2e93; } .mitem.on { outline: 2px solid #19c9f0; }
.mread { background: #f4f0e6; color: #1a1a22; padding: 14px; overflow: auto; box-shadow: inset 0 0 0 2px #000; } .mread .mhead { border-bottom: 1px solid #c8c0b0; margin-bottom: 8px; padding-bottom: 6px; } .mread .fine { color: #5a5a66; font-size: 12px; }
.gamelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gamecard { text-align: left; padding: 14px; background: #12233a; color: #e6f4ff; border: 0; box-shadow: inset 2px 2px 0 #3a5a8a, inset -2px -2px 0 #0a1424; cursor: pointer; font: 14px var(--f-text); }
.gamecard b { font: 22px 'Bungee', var(--f-title); color: #ffcc00; } .gamecard:hover { background: #1a3a5a; }
.gamewrap { display: flex; justify-content: center; } .gcv { image-rendering: pixelated; box-shadow: 0 0 0 4px #000; max-width: 100%; }
.ginfo { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 8px; }
.sweep { display: grid; grid-template-columns: repeat(9, 34px); gap: 2px; padding: 6px; background: #0a1424; }
.sweep .sc { width: 34px; height: 34px; padding: 0; border: 0; background: #3a5a8a; box-shadow: inset 2px 2px 0 #6a8aba, inset -2px -2px 0 #1a2a44; color: #fff; font: 20px var(--f-num); cursor: pointer; }
.sweep .sc.r { background: #c8d0dc; box-shadow: none; color: #1a1a22; } .sweep .sc.m { background: #ff3a5a; color: #fff; } .sweep .sc.f { color: #ffcc00; }
.sweep .sc[data-n="1"] { color: #1a4ad8; } .sweep .sc[data-n="2"] { color: #1a8a3a; } .sweep .sc[data-n="3"] { color: #d81a3a; } .sweep .sc[data-n="4"] { color: #5a1a8a; }

/* ── T23 : TV, catalogue du ciné-club, lecteur plein écran ── */
.tvos, .tvplayer { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; font: 14px var(--f-text); color: #f4ead6; }
.tvos { background: repeating-linear-gradient(90deg, #3a0a10 0 18px, #4e0f18 18px 30px, #2c070c 30px 40px); }
.tvos .tv-box { width: min(1180px, 100vw); height: min(780px, 100vh); display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; box-sizing: border-box; background: rgba(12, 8, 8, 0.9); box-shadow: 0 0 0 3px #b08a3a, 0 0 60px #000; overflow: hidden; }
.tvos .tv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tvos h1 { margin: 0; font: 400 26px var(--f-title); letter-spacing: 2px; color: #f0c860; text-shadow: 0 2px 0 #6a3a10, 0 0 14px rgba(240, 180, 80, 0.4); }
.tvos .fine, .tvplayer .fine { color: #c8b898; font-size: 12px; }
.tvos .tv-now { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: #1e1410; border: 1px solid #6a4a20; flex-wrap: wrap; }
.tvos .tv-now .dot { width: 10px; height: 10px; border-radius: 50%; background: #ff4a4a; animation: tvblink 1s steps(2) infinite; }
.tvos .tv-now .dot.paused { background: #ffd24a; animation: none; }
.tvos .tv-now .sp, .tvplayer .sp { flex: 1; }
@keyframes tvblink { 50% { opacity: 0.25; } }
.tvos .tv-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tvos .tv-tab { font: inherit; color: #f4ead6; background: #2a1a14; border: 1px solid #6a4a20; padding: 5px 12px; cursor: pointer; }
.tvos .tv-tab.on { background: #b08a3a; color: #1a0e08; font-weight: bold; }
.tvos .tv-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding-right: 4px; align-content: start; }
.tvos .tv-card { display: flex; gap: 10px; padding: 8px; background: #1a1210; border: 1px solid #3a2a1a; }
.tvos .tv-card.playing { border-color: #f0c860; box-shadow: 0 0 12px rgba(240, 200, 96, 0.35); }
.tvos .tv-poster { width: 96px; height: 136px; flex: none; image-rendering: pixelated; box-shadow: 0 2px 0 #000; }
.tvos .tv-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tvos .tv-title { font-weight: bold; color: #ffe8b0; line-height: 1.2; }
.tvos .tv-meta { color: #e0c890; font-size: 12px; }
.tvos .tv-dir { color: #b8a888; font-size: 12px; font-style: italic; }
.tvos .tv-why { color: #a8c8a0; font-size: 11px; line-height: 1.25; }
.tvos .tv-src { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvos .tv-card .btn { margin-top: auto; align-self: flex-start; }
.tvos .tv-foot { margin: 0; }
.tvplayer { background: #000; flex-direction: column; align-items: stretch; justify-content: flex-start; }
.tvplayer .tvp-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #120c0a; border-bottom: 1px solid #3a2a1a; flex-wrap: wrap; }
.tvplayer .tvp-title { color: #ffe8b0; }
.tvplayer .tvp-time { font: 18px var(--f-num); color: #e0c890; }
.tvplayer .tvp-screen { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.tvplayer .tvp-stage { width: min(100vw, calc((100vh - 90px) * 16 / 9)); aspect-ratio: 16 / 9; background: #050505; display: flex; align-items: center; justify-content: center; }
.tvplayer .tvp-frame { width: 100%; height: 100%; border: 0; }
.tvplayer .tvp-empty { color: #c8b898; }
.tvplayer .tvp-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; background: rgba(0, 0, 0, 0.82); }
.tvplayer .tvp-fallback[hidden] { display: none; }
.tvplayer .tvp-status { padding: 4px 10px; background: #120c0a; }
@media (max-width: 640px) { .tvos .tv-grid { grid-template-columns: 1fr; } .tvos .tv-poster { width: 72px; height: 102px; } .tvos h1 { font-size: 20px; } }

/* ── T25 : entrées automatiques, boutons contextuels, réticule, choix des contrôles ── */
.entry-prompt { position: fixed; left: 50%; bottom: 128px; transform: translateX(-50%); z-index: 60; min-width: 260px; max-width: min(460px, calc(100vw - 32px)); padding: 8px 12px 10px; background: rgba(6, 14, 12, 0.92); color: #b8ffd8; border: 2px solid #3affa0; box-shadow: 0 0 0 2px #0a1a14, 0 0 18px rgba(58, 255, 160, 0.35), inset 0 0 24px rgba(58, 255, 160, 0.12); font: 14px var(--f-text, monospace); pointer-events: auto; }
.entry-prompt[hidden] { display: none; }
.entry-prompt .ep-q { font-weight: bold; margin-bottom: 8px; }
.entry-prompt .ep-actions { display: flex; gap: 8px; }
.ctxbar { position: fixed; right: 16px; bottom: 16px; z-index: 55; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: auto; }
.ctxbar .ctx { font: bold 13px var(--f-text, monospace); color: #ffe8b0; background: rgba(20, 12, 30, 0.88); border: 2px solid #c08aff; padding: 7px 14px; min-width: 112px; cursor: pointer; box-shadow: 0 0 10px rgba(192, 138, 255, 0.35); }
.ctxbar .ctx:hover, .ctxbar .ctx:focus-visible { background: #c08aff; color: #14081e; outline: none; }
.ctxbar .ctx-strike { border-color: #ff5a5a; box-shadow: 0 0 10px rgba(255, 90, 90, 0.4); }
.ctxbar .ctx-steal, .ctxbar .ctx-exit { border-color: #ffd24a; }
.crosshair { position: fixed; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; z-index: 58; pointer-events: none; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); }
.crosshair[hidden], .lockhint[hidden] { display: none; }
.lockhint { position: fixed; left: 50%; top: 60%; transform: translateX(-50%); z-index: 58; pointer-events: none; padding: 6px 12px; background: rgba(0, 0, 0, 0.6); color: #fff; font: 13px var(--f-text, monospace); }
.ctrl-pick .pick { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ctrl-pick .btn.big { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; text-align: left; }
.ctrl-pick .btn.big span { font-size: 12px; opacity: 0.85; font-weight: normal; }
@media (max-width: 640px) { .ctxbar { bottom: 96px; right: 8px; } .ctxbar .ctx { min-width: 88px; padding: 6px 10px; } .entry-prompt { bottom: 150px; } }

/* ── T26 : barre de chargement du terminal XMR ── */
.term .progress { margin: 8px 0 4px; }
.term .progress[hidden] { display: none; }
.term .progress .bar { height: 12px; border: 2px solid #26302b; background: #a9b8ae; padding: 1px; }
.term .progress .fill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, #26302b 0 6px, #3e4a43 6px 8px); transition: width 0.05s linear; }
.term .progress .step { font: 16px var(--f-num); margin-top: 4px; min-height: 1.3em; }
.term .receipt-line { margin-top: 6px; font: 15px var(--f-num); border-top: 1px dashed #26302b; padding-top: 4px; }

/* ── v3 · T27 : histoire guidée (ligne d'objectif, carte d'étape, astuce unique, boutons qui arrivent) ── */
#hud .objective { padding: 6px 8px 7px; display: flex; flex-direction: column; gap: 3px; background: rgba(18, 12, 4, 0.9); box-shadow: var(--bevel), 0 0 0 1px #ffc93a, 0 0 14px rgba(255, 201, 58, 0.25); }
#hud .objective[hidden] { display: none; }
#hud .objective .ob-head { display: flex; align-items: center; gap: 5px; }
#hud .objective .ob-gem { color: #ffc93a; font-size: 13px; animation: obgem 1.6s ease-in-out infinite; }
#hud .objective .ob-k { font: 15px/1.05 var(--f-num); color: #ffd76a; letter-spacing: 0.04em; }
#hud .objective .ob-g { font: 13px/1.25 var(--f-text); color: #fff3d0; }
#hud .objective.done { box-shadow: var(--bevel), 0 0 0 1px #7fa39a; }
#hud .objective.done .ob-gem, #hud .objective.done .ob-k { color: #9fd8d0; animation: none; }
@keyframes obgem { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.8); } }

#hud .storycard { position: absolute; left: 50%; top: 142px; transform: translateX(-50%); z-index: 42; width: min(540px, calc(100vw - 460px)); min-width: 300px; padding: 10px 14px 8px; cursor: pointer;
  background: linear-gradient(180deg, rgba(26, 17, 4, 0.95), rgba(12, 8, 2, 0.95)); box-shadow: 0 0 0 2px #ffc93a, 0 0 0 4px #2a1c05, 0 0 26px rgba(255, 201, 58, 0.3); color: #fff3d0; }
#hud .storycard[hidden] { display: none; }
#hud .storycard.in { animation: cardin 0.45s cubic-bezier(.2, .9, .3, 1.2); }
#hud .storycard .sc-k { font: 20px/1 var(--f-num); color: #ffc93a; letter-spacing: 0.06em; margin-bottom: 4px; }
#hud .storycard .sc-who { font: 12px var(--f-text); color: #c9a95a; text-transform: uppercase; letter-spacing: 0.08em; }
#hud .storycard .sc-line { font: 15px/1.35 var(--f-text); margin: 2px 0 6px; }
#hud .storycard .sc-goal { font: 14px/1.3 var(--f-text); color: #ffd76a; }
#hud .storycard .sc-x { font: 11px var(--f-num); color: #8a7440; text-align: right; margin-top: 2px; }
@keyframes cardin { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }

#hud .tipbox { position: absolute; left: 12px; top: 172px; z-index: 41; max-width: 330px; display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px 7px 9px; background: rgba(10, 18, 22, 0.92); box-shadow: 0 0 0 1px #19f0c8, 0 0 12px rgba(25, 240, 200, 0.2); color: #dff7f2; font: 13px/1.35 var(--f-text); }
#hud .tipbox[hidden] { display: none; }
#hud .tipbox .tb-i { flex: none; width: 18px; height: 18px; display: grid; place-items: center; background: #19f0c8; color: #06221c; font: 15px/1 var(--f-num); }
#hud .tipbox .tb-t { flex: 1; }
#hud .tipbox .btn.tx { flex: none; width: 20px; height: 18px; min-height: 0; padding: 0; font: 13px/1 var(--f-num); }

#hud .slot[hidden] { display: none; }
#hud .slot.fresh { animation: slotnew 1s ease-in-out infinite; }
@keyframes slotnew { 0%, 100% { box-shadow: var(--bevel), 0 0 0 2px #ffc93a; } 50% { box-shadow: var(--bevel), 0 0 0 2px #ffc93a, 0 0 14px #ffc93a; } }
#hud .chatslot[hidden], #hud .unit .stats[hidden] { display: none; }
.talk .actions .btn.story { box-shadow: 0 0 0 2px #ffc93a, 0 0 10px rgba(255, 201, 58, 0.45); }
.talk .actions.choices { flex-direction: column; align-items: stretch; }
.talk .actions.choices .btn { text-align: left; }
@media (max-width: 900px) { #hud .storycard { width: calc(100vw - 260px); } #hud .tipbox { top: auto; bottom: 70px; max-width: 260px; } }
@media (max-width: 640px) { #hud .objective .ob-g { font-size: 12px; } #hud .storycard { left: 8px; transform: none; width: calc(100vw - 150px); min-width: 0; } }
/* v3 · T28 : jauge du jetpack */
#hud .track-row.fuel { font: 16px var(--f-num); color: #ffc93a; letter-spacing: 0.02em; }
#hud .track-row.fuel b { font-weight: 400; color: #19f0c8; }
#hud .track-row.fuel b.low { color: #ff4d6d; animation: obgem 0.8s ease-in-out infinite; }

/* ══ v3 · T31 : TERMINAUX RÉTRO-FUTURISTES ════════════════════════════════════════════════════════════
   Chaque fenêtre (.win.tsk) et chaque module du HUD (.tmod) est un appareil : boîtier (cs-*), vis, voyant, nom de
   système gravé, écran au phosphore (ph-*) avec lignes de balayage et lueur. Le titre et le chargement s'affichent
   sur un moniteur (.crt). Règles écrites avec :where() : faible spécificité, les styles propres à un contenu gardent
   la main. Room Zero (body.rz) : aucune de ces règles, l'interface « propre » du quatrième mur reprend la main. */
.ph-green { --ph: #4dff9a; --ph2: #3bd07a; --ph3: #1f7a46; --scr: #03150b; --hl: #e0ffec; }
.ph-amber { --ph: #ffbf3f; --ph2: #e0a334; --ph3: #7d5714; --scr: #160d01; --hl: #fff2cc; }
.ph-cyan { --ph: #5ef3ff; --ph2: #45c9d4; --ph3: #1c6f78; --scr: #021317; --hl: #dcfcff; }
.ph-magenta { --ph: #ff7ae6; --ph2: #e06ccc; --ph3: #7d2f70; --scr: #15041a; --hl: #ffe3f9; }
.ph-ice { --ph: #e8f4ff; --ph2: #b4c8dd; --ph3: #4c5f75; --scr: #0a1019; --hl: #ffffff; }
.ph-red { --ph: #ff7a7a; --ph2: #ec6464; --ph3: #7d2a2a; --scr: #170405; --hl: #ffe3e3; }
.ph-violet { --ph: #cdacff; --ph2: #ab8fe0; --ph3: #57438a; --scr: #0d0720; --hl: #f3ebff; }
.ph-paper { --ph: #26221c; --ph2: #554d41; --ph3: #a59a86; --scr: #ebe4d2; --hl: #000000; --glow: none; --sl: 0.05; --well: rgba(255, 255, 255, 0.45); }
.ph-bios { --ph: #ffffff; --ph2: #d4d5ff; --ph3: #8080ff; --scr: #0000a8; --hl: #ffff55; --glow: 0 0 4px rgba(255, 255, 255, 0.35); }
.ph-lcd { --ph: #1b2705; --ph2: #3a4a12; --ph3: #6f8a2c; --scr: #c3dc6a; --hl: #000000; --glow: none; --sl: 0.06; --well: rgba(255, 255, 255, 0.4); }
.cs-graphite { --case: #43464f; --case2: #24262c; --case-ink: #c9cdd6; --emb: rgba(0, 0, 0, 0.6); --key: #585d68; --key2: #30333a; --screw: #a3a9b4; }
.cs-beige { --case: #e2d8bb; --case2: #b3a785; --case-ink: #463e2e; --emb: rgba(255, 255, 255, 0.55); --key: #f3ebd4; --key2: #c5ba98; --screw: #8a8068; }
.cs-white { --case: #f3f4f8; --case2: #c0c4cf; --case-ink: #434a5c; --emb: rgba(255, 255, 255, 0.7); --key: #ffffff; --key2: #d0d4de; --screw: #959aa8; }
.cs-military { --case: #646b45; --case2: #383d25; --case-ink: #eef1d2; --emb: rgba(0, 0, 0, 0.5); --key: #767e57; --key2: #454b2f; --screw: #c0c49a; }
.cs-chrome { --case: #dfe4ea; --case2: #7b8592; --case-ink: #1c222b; --emb: rgba(255, 255, 255, 0.6); --key: #f2f5f8; --key2: #a2abb6; --screw: #59616d;
  --case-grad: linear-gradient(180deg, #f1f4f7 0%, #c3cad3 42%, #e4e8ed 52%, #9aa3ae 78%, #737d8a 100%); }
.cs-neon { --case: #43197d; --case2: #1d0839; --case-ink: #ffdcf4; --emb: rgba(0, 0, 0, 0.6); --key: #63309f; --key2: #2e1058; --screw: #ff6fc3; }
.cs-red { --case: #82242e; --case2: #450d14; --case-ink: #ffe0e0; --emb: rgba(0, 0, 0, 0.55); --key: #9b3341; --key2: #5a141c; --screw: #f0a8a8; }

/* palette du contenu : les variables de l'interface prennent les teintes du phosphore */
:where(body:not(.rz)) :is(.tsk, .tmod) {
  --text: var(--ph); --text-2: var(--ph2); --accent: var(--ph); --teal: var(--ph);
  --panel: color-mix(in srgb, var(--ph) 16%, transparent); --panel-2: color-mix(in srgb, var(--ph) 8%, transparent); --panel-3: var(--well, rgba(0, 0, 0, 0.32));
  --hi: var(--ph3); --lo: rgba(0, 0, 0, 0.6);
  --bevel: inset 0 0 0 1px var(--ph3); --sunken: inset 0 0 0 1px color-mix(in srgb, var(--ph3) 75%, transparent);
  --scw: radial-gradient(circle, var(--screw) 0 1.3px, rgba(0, 0, 0, 0.55) 1.5px 2.4px, transparent 2.7px);
}
:where(body:not(.rz)) :is(.ph-paper, .ph-lcd) { --xmr: var(--ph); --danger: #9a1020; }
:where(body.hc:not(.rz)) :is(.tsk, .tmod) { --text-2: color-mix(in srgb, var(--ph2) 50%, var(--ph)); --slk: 0.6; }

/* ── fenêtres ── */
:where(body:not(.rz)) .win.tsk {
  padding: 6px 10px 18px; border-radius: 12px; min-width: 240px;
  background: var(--scw) 3px 3px / 9px 9px no-repeat, var(--scw) calc(100% - 3px) 3px / 9px 9px no-repeat,
    var(--scw) 3px calc(100% - 3px) / 9px 9px no-repeat, var(--scw) calc(100% - 3px) calc(100% - 3px) / 9px 9px no-repeat,
    var(--case-grad, linear-gradient(180deg, var(--case), var(--case2)));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.28), 0 14px 30px rgba(5, 0, 15, 0.55);
}
:where(body:not(.rz)) .win.tsk.cs-neon { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.3), 0 0 0 2px #ff2e93, 0 0 22px rgba(255, 46, 147, 0.35), 0 14px 30px rgba(5, 0, 15, 0.55); }
:where(body:not(.rz)) .win.tsk::after { content: attr(data-model); position: absolute; left: 16px; bottom: 3px; max-width: calc(100% - 96px); overflow: hidden; white-space: nowrap; pointer-events: none;
  font: 12px/12px var(--f-num); letter-spacing: 0.14em; color: var(--case-ink); opacity: 0.65; text-shadow: 0 1px 0 var(--emb); }
:where(body:not(.rz)) .win.tsk::before { content: ''; position: absolute; right: 16px; bottom: 6px; width: 46px; height: 6px; border-radius: 2px; pointer-events: none; opacity: 0.7;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.42) 0 3px, transparent 3px 6px); }
:where(body:not(.rz)) .win.tsk .titlebar { height: 26px; padding: 0 6px 4px 9px; gap: 7px; background: none; color: var(--case-ink); text-shadow: 0 1px 0 var(--emb); font: 400 19px/1 var(--f-num); letter-spacing: 0.06em; }
:where(body:not(.rz)) .win.tsk.inactive .titlebar { background: none; color: var(--case-ink); opacity: 0.78; }
.win.tsk .titlebar .led { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ph); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 7px var(--ph); }
.win.tsk:is(.ph-paper, .ph-lcd, .ph-bios) .titlebar .led { background: #4dff9a; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 7px #4dff9a; }
.win.tsk.inactive .titlebar .led { background: #2b2e34; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55); }
.win.tsk .titlebar .sys { flex: 0 0.25 auto; min-width: 3em; overflow: hidden; white-space: nowrap; }
:where(body:not(.rz)) .win.tsk .titlebar .t { flex: 1 1 0; min-width: 0; padding-left: 7px; border-left: 1px solid color-mix(in srgb, var(--case-ink) 35%, transparent); font: 13px/1.15 var(--f-text); letter-spacing: 0; opacity: 0.85; }
:where(body:not(.rz)) .win.tsk .titlebar button { flex: none; width: 24px; height: 19px; min-height: 0; padding: 0; border-radius: 4px; color: var(--case-ink); font: 15px/1 var(--f-num); text-shadow: 0 1px 0 var(--emb);
  background: linear-gradient(180deg, var(--key), var(--key2)); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.35); }
:where(body:not(.rz)) .win.tsk .titlebar button:hover { background: linear-gradient(180deg, var(--key), var(--key2)); filter: brightness(1.15); }
:where(body:not(.rz)) .win.tsk .titlebar button:active { padding: 0; transform: translateY(2px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 1px 2px rgba(0, 0, 0, 0.4); }
:where(body:not(.rz)) .win.tsk .body {
  margin-top: 1px; padding: 12px 14px 14px; border-radius: 9px; box-sizing: border-box; max-height: calc(100vh - 64px);
  color: var(--ph); text-shadow: var(--glow, 0 0 6px color-mix(in srgb, var(--ph) 40%, transparent));
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, calc(var(--sl, 0.16) * var(--slk, 1))) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--ph) 10%, var(--scr)) 0%, var(--scr) 78%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.85), inset 0 0 26px rgba(0, 0, 0, 0.5), 0 0 0 3px var(--case2), 0 0 0 4px rgba(0, 0, 0, 0.3);
  scrollbar-color: var(--ph3) transparent; scrollbar-width: thin;
  animation: scrOn 0.3s ease-out;
}
/* allumage de l'écran : un éclair, le contenu reste lisible dès la première image (machines lentes) */
@keyframes scrOn { from { filter: brightness(1.9) saturate(0.5); } to { filter: none; } }

/* boutons et champs sur un écran (fenêtres et modules du HUD) */
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) .btn { background: transparent; color: var(--ph); box-shadow: inset 0 0 0 1px var(--ph3); text-shadow: inherit; border-radius: 3px; }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) .btn:hover { background: color-mix(in srgb, var(--ph) 16%, transparent); box-shadow: inset 0 0 0 1px var(--ph2); }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) .btn:is(:active, .on) { background: var(--ph); color: var(--scr); text-shadow: none; box-shadow: none; }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) .btn.primary { background: var(--ph); color: var(--scr); text-shadow: none; font-weight: 600; box-shadow: 0 0 10px color-mix(in srgb, var(--ph) 40%, transparent); }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) .btn.primary:hover { background: var(--hl); }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) .btn.danger { color: #ff8a8a; box-shadow: inset 0 0 0 1px #ff8a8a; }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) .btn[disabled] { opacity: 0.45; filter: none; }
:where(body:not(.rz)) :is(.win.tsk.ph-paper, .win.tsk.ph-lcd) .body .btn.danger { color: #9a1020; box-shadow: inset 0 0 0 1px #9a1020; }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) :is(input:not([type]), input[type=text], input[type=search], input[type=password], input[type=number], select, textarea) { background: var(--panel-3); color: var(--ph); box-shadow: inset 0 0 0 1px var(--ph3); caret-color: var(--ph); }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) option { background: var(--scr); color: var(--ph); }
:where(body:not(.rz)) :is(.win.tsk .body, .tmod) :is(input[type=range], input[type=checkbox]) { accent-color: var(--ph); }
/* contenus particuliers recolorés au phosphore */
:where(body:not(.rz)) .win.tsk .list { margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px dashed var(--ph3); }
:where(body:not(.rz)) .win.tsk .radio-lcd { background: var(--panel-3); color: var(--ph); box-shadow: inset 0 0 0 1px var(--ph3); text-shadow: inherit; }
:where(body:not(.rz)) .win.tsk .music .mrow.cur { background: color-mix(in srgb, var(--ph) 18%, transparent); box-shadow: inset 2px 0 0 var(--ph); }
:where(body:not(.rz)) .win.tsk :is(.music .mbar .fill, .backpack .mbar > div) { background: var(--ph); }
:where(body:not(.rz)) .win.tsk .music .msearch { background: var(--panel-3); color: var(--ph); }
:where(body:not(.rz)) .win.tsk .backpack .bp-cell { background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--ph3); border-radius: 3px; }
:where(body:not(.rz)) .win.tsk .backpack .bp-cell.k-weapon { box-shadow: inset 0 0 0 1px #ff6aa8; }
:where(body:not(.rz)) .win.tsk .backpack .bp-cell.k-food { box-shadow: inset 0 0 0 1px #5ef3ff; }
:where(body:not(.rz)) .win.tsk .backpack :is(.bp-detail, .bp-mis) { background: var(--panel-3); }
:where(body:not(.rz)) .win.tsk .backpack .nm { color: var(--hl); }
:where(body:not(.rz)) .win.tsk.ph-bios .body :is(.form label, .label) { color: var(--ph2); }
:where(body:not(.rz)) .win.tsk.ph-bios .body :is(h3, b, .num) { color: var(--hl); }

/* ── modules du HUD : écran dans un petit boîtier, nom de système gravé au-dessus, voyant et vis ── */
:where(body:not(.rz)) :is(#hud .tmod, .entry-prompt.tmod) {
  border: 5px solid transparent; border-top-width: 17px; border-radius: 9px;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, calc(var(--sl, 0.16) * var(--slk, 1))) 0 1px, transparent 1px 3px) padding-box,
    radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--ph) 11%, var(--scr)) 0%, var(--scr) 80%) padding-box,
    var(--case-grad, linear-gradient(180deg, var(--case), var(--case2))) border-box;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), inset 0 0 14px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.7), 0 6px 16px rgba(4, 0, 12, 0.45);
  color: var(--ph); text-shadow: var(--glow, 0 0 5px color-mix(in srgb, var(--ph) 40%, transparent));
}
:where(body:not(.rz)) :is(#hud .tmod, .entry-prompt.tmod)::before {
  content: attr(data-sys); content: attr(data-sys) / ""; position: absolute; inset: auto; left: 0; top: -16px; height: 15px; padding-left: 12px; border: 0; box-shadow: none; pointer-events: none;
  background: radial-gradient(circle at 4px 7px, var(--ph) 0 2.4px, rgba(0, 0, 0, 0.5) 2.6px 3.4px, transparent 3.6px) no-repeat;
  font: 15px/15px var(--f-num); letter-spacing: 0.1em; color: var(--case-ink); text-shadow: 0 1px 0 var(--emb); white-space: nowrap;
}
:where(body:not(.rz)) :is(#hud .tmod, .entry-prompt.tmod)::after { content: ''; position: absolute; inset: auto; right: 1px; top: -13px; width: 8px; height: 8px; border: 0; box-shadow: none; pointer-events: none; background: var(--scw); }
:where(body:not(.rz)) #hud .tmod.cs-neon { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), inset 0 0 14px rgba(0, 0, 0, 0.5), 0 0 0 1px #ff2e93, 0 0 16px rgba(255, 46, 147, 0.3), 0 6px 16px rgba(4, 0, 12, 0.45); }
:where(body:not(.rz)) #hud .tmod:is(.unit, .target, .mapframe, .objective, .heat, .fps, .track, .chat) { position: relative; inset: auto; }
:where(body:not(.rz)) #hud .tmod.track > .label { display: none; }
:where(body:not(.rz)) #hud .tmod.storycard { top: 160px; }
:where(body:not(.rz)) #hud .tmod.objective.done { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), inset 0 0 14px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.7), 0 6px 16px rgba(4, 0, 12, 0.45); }
:where(body:not(.rz)) #hud .tmod.heat { margin-top: 0; }
:where(body:not(.rz)) #hud .tmod.hint { bottom: 98px; overflow: visible; white-space: normal; text-align: center; }
:where(body:not(.rz)) #hud .tmod .minimap { box-shadow: 0 0 0 2px var(--ph3), 0 0 14px color-mix(in srgb, var(--ph) 30%, transparent); }
:where(body:not(.rz)) #hud .rcol { gap: 8px; }
:where(body:not(.rz)) #hud .tl { gap: 10px; }
:where(body:not(.rz)) #hud .tmod .slot { border-radius: 4px; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--ph3); }
:where(body:not(.rz)) #hud .tmod .slot:hover { background: color-mix(in srgb, var(--ph) 16%, transparent); box-shadow: inset 0 0 0 1px var(--ph); }
:where(body:not(.rz)) #hud .tmod .slot:is(:active, .on) { background: color-mix(in srgb, var(--ph) 30%, transparent); box-shadow: inset 0 0 0 1px var(--hl); }
:where(body:not(.rz)) #hud .tmod .slot .kb { color: var(--ph2); }
:where(body:not(.rz)) #hud .tmod.chat .clist { background: var(--panel-3); }
:where(body:not(.rz)) #hud .tmod.chat .cl .ct { color: var(--ph3); }
:where(body:not(.rz)) #hud .tmod.chat .cl .cf { color: var(--hl); }
:where(body:not(.rz)) #hud .tmod.storycard .sc-x, :where(body:not(.rz)) #hud .tmod.storycard .sc-who { color: var(--ph2); }
:where(body:not(.rz)) #hud .tmod.tipbox .tb-i { background: var(--ph); color: var(--scr); text-shadow: none; }
:where(body:not(.rz)) .entry-prompt.tmod { padding: 8px 12px 10px; color: var(--ph); }
/* reçus : ticket de caisse thermique (bord dentelé), imprimés à gauche du radar (la colonne de droite reste courte) */
:where(body:not(.rz)) #hud .rcol .receipts { position: absolute; top: 0; right: calc(100% + 10px); width: 180px; }
:where(body:not(.rz)) #hud .tmod.unit .who { max-width: 196px; }
:where(body:not(.rz)) #hud .tmod.unit .stats { white-space: normal; font-size: 14px; }
:where(body:not(.rz)) #hud .tmod.target { max-width: 250px; box-sizing: border-box; }
:where(body:not(.rz)) #hud .tmod.target .who { min-width: 0; }
/* écran étroit : pendant les quelques secondes de la carte d'étape, l'astuce s'efface (une seule information à la fois) */
@media (max-width: 1100px) { :where(body:not(.rz)) #hud .storycard:not([hidden]) ~ .tipbox { visibility: hidden; } }
@media (max-height: 640px) {
  :where(body:not(.rz)) #hud .tmod .minimap { width: 112px; height: 112px; }
  :where(body:not(.rz)) #hud .tmod.objective .ob-g { font-size: 12px; }
  :where(body:not(.rz)) .ctxbar { gap: 4px; }
  :where(body:not(.rz)) .ctxbar .ctx { padding: 4px 10px 4px 18px; min-width: 100px; font-size: 16px; }
  :where(body:not(.rz)) .ctxbar .ctx::before { top: 5px; bottom: 5px; }
}
:where(body:not(.rz)) #hud .receipt { background: #f4f1e8; color: #26221c; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35); padding: 6px 10px 10px; font: 14px/1.2 var(--f-text);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 8px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 8px 100%; }
:where(body:not(.rz)) #hud .receipt .rh { color: #6b6253; font: 13px var(--f-num); letter-spacing: 0.12em; }
:where(body:not(.rz)) #hud .receipt .ra { color: #1a1612; text-shadow: none; }
:where(body:not(.rz)) #hud .receipt .rl { color: #26221c; }
/* boutons d'action contextuels : touches de clavier mécanique, bande de couleur selon l'action */
:where(body:not(.rz)) .ctxbar .ctx { position: relative; border: 0; border-radius: 6px; padding: 7px 14px 7px 20px; min-width: 120px; text-align: left; color: #f2f4f8; font: 19px/1 var(--f-num); letter-spacing: 0.08em; text-transform: uppercase; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7);
  background: linear-gradient(180deg, #555a66, #2b2e35); box-shadow: 0 4px 0 #121317, 0 0 0 1px #000, inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 12px rgba(0, 0, 0, 0.4); --kc: #cdacff; }
:where(body:not(.rz)) .ctxbar .ctx::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 4px; border-radius: 2px; background: var(--kc); box-shadow: 0 0 8px var(--kc); }
:where(body:not(.rz)) .ctxbar .ctx:is(:hover, :focus-visible) { background: linear-gradient(180deg, #666c79, #353840); color: #fff; outline: none; box-shadow: 0 4px 0 #121317, 0 0 0 1px var(--kc), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 14px color-mix(in srgb, var(--kc) 45%, transparent); }
:where(body:not(.rz)) .ctxbar .ctx:active { transform: translateY(3px); box-shadow: 0 1px 0 #121317, 0 0 0 1px #000, inset 0 1px 0 rgba(255, 255, 255, 0.2); }
:where(body:not(.rz)) .ctxbar .ctx-strike { --kc: #ff5a6a; }
:where(body:not(.rz)) .ctxbar :is(.ctx-steal, .ctx-exit) { --kc: #ffd24a; }
/* info-bulle : mini-terminal */
:where(body:not(.rz)) #tooltip { background: radial-gradient(ellipse at 50% 30%, #0f1d18, #050b09 85%); border-radius: 6px; box-shadow: 0 0 0 1px #1f7a46, 0 0 0 3px #2a2d33, 0 6px 14px rgba(0, 0, 0, 0.5); color: #e0ffec; text-shadow: 0 0 5px rgba(77, 255, 154, 0.35); }
:where(body:not(.rz)) #tooltip .tt-type { color: #3bd07a; }
:where(body:not(.rz)) #tooltip .tt-act { color: #4dff9a; }
/* Room Zero : l'appareil disparaît */
body.rz .win .titlebar :is(.led, .sys) { display: none; }

/* ── moniteur du titre et du chargement ── */
#loading { background: radial-gradient(ellipse at 30% 40%, #2a1050 0%, #120726 55%, #05020c 100%); place-items: center start; padding-left: max(16px, 7vw); }
@media (max-width: 760px) { #loading { place-items: center; padding: 16px; } }
#title .crt { pointer-events: auto; }
.crt { --ph: #a8f6ff; --ph2: #74d4e0; --ph3: #2b6a73; --hl: #ff8ae9; position: relative; box-sizing: border-box; width: min(600px, calc(100vw - 32px)); padding: 16px 16px 0;
  border-radius: 26px 26px 20px 20px; background: linear-gradient(172deg, #585c69 0%, #35373f 38%, #222429 100%);
  box-shadow: 0 0 0 1px #000, inset 0 2px 0 rgba(255, 255, 255, 0.22), inset 0 -4px 0 rgba(0, 0, 0, 0.45), 0 0 0 3px #1a0a33, 0 0 0 4px rgba(255, 46, 147, 0.55), 0 0 40px rgba(255, 46, 147, 0.22), 0 30px 70px rgba(4, 0, 12, 0.7); }
.crt-glass { position: relative; padding: 5px; border-radius: 18px; background: #07080a; overflow: hidden; box-shadow: inset 0 0 0 2px #000, 0 0 0 3px #1b1c21, 0 2px 0 4px rgba(255, 255, 255, 0.07); }
.crt-glass::after { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: 18px;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px), radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.55) 100%), linear-gradient(165deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 30%); }
/* barre lumineuse qui descend (écran titre seulement : animée par transform, sans relayout ; le chargement reste immobile, il travaille) */
.crt-glass::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 20%; z-index: 4; pointer-events: none; background: linear-gradient(transparent, rgba(190, 255, 255, 0.045), transparent); transform: translateY(-110%); }
#title .crt-glass::before { animation: crtroll 8s linear infinite; will-change: transform; }
@keyframes crtroll { from { transform: translateY(-110%); } to { transform: translateY(560%); } }
.crt-scr { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 16px; border-radius: 14px; color: var(--ph);
  background: radial-gradient(ellipse at 50% 40%, #0e1c26 0%, #070d13 62%, #020406 100%); box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.8);
  text-shadow: 0 0 6px color-mix(in srgb, var(--ph) 45%, transparent); }
#title .crt.on .crt-scr { animation: crton 0.6s ease-out both; }
@keyframes crton { 0% { transform: scale(1.03, 0.006); filter: brightness(5) saturate(0); } 40% { transform: scale(1.03, 0.006); filter: brightness(4) saturate(0); } 75% { transform: scale(1, 1.02); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
.crt-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px dashed color-mix(in srgb, var(--ph3) 85%, transparent); font: 17px/1 var(--f-num); letter-spacing: 0.12em; color: var(--ph2); }
.crt-sp { flex: 1; }
#title .crt-blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tlogo { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
.mglyph { flex: none; display: block; width: 64px; height: 60px; filter: drop-shadow(0 0 8px rgba(94, 243, 255, 0.45)); }
.mglyph svg, .mglyph img { display: block; width: 100%; height: 100%; object-fit: contain; }
#title .mglyph .mcur { animation: blink 1s steps(2) infinite; }
.crt .logo { margin: 0; padding: 0; transform: none; display: flex; flex-wrap: wrap; gap: 0 2px; font: 400 clamp(30px, 6vw, 50px)/1 var(--f-title); letter-spacing: 0.02em; }
.crt .logo .w1, .crt .logo .w2 { background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-stroke: 0; filter: none; color: #ff8ae9;
  text-shadow: -2px 0 rgba(255, 40, 120, 0.55), 2px 0 rgba(40, 220, 255, 0.55), 0 0 14px rgba(255, 122, 230, 0.7); }
.crt .logo .w2 { color: #8ff6ff; text-shadow: -2px 0 rgba(255, 40, 120, 0.5), 2px 0 rgba(40, 220, 255, 0.55), 0 0 14px rgba(94, 243, 255, 0.7); }
.crt .tagline { margin: 0; color: var(--ph2); font: 15px/1.35 var(--f-text); }
.crt .namefield { gap: 10px; }
.crt .namefield .label { min-width: 6.4em; color: var(--ph2); font: 18px/1 var(--f-num); letter-spacing: 0.1em; }
.crt .namefield .label::after { content: ' >'; color: var(--hl); }
.crt .namefield input { height: 32px; padding: 2px 10px; border-radius: 3px; background: rgba(0, 0, 0, 0.4); box-shadow: inset 0 0 0 1px var(--ph3); color: #fff; caret-color: var(--hl); font: 22px var(--f-num); text-shadow: 0 0 6px rgba(168, 246, 255, 0.5); }
.crt .namefield input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ph), 0 0 10px color-mix(in srgb, var(--ph) 35%, transparent); }
.crt .cmds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.crt .cmds .btn { justify-content: flex-start; min-height: 32px; padding: 3px 10px; border-radius: 3px; background: transparent; box-shadow: none; color: var(--ph); font: 21px/1 var(--f-num); letter-spacing: 0.08em; text-transform: uppercase; text-shadow: inherit; }
.crt .cmds .btn::before { content: '>'; margin-right: 8px; color: var(--ph3); }
.crt .cmds .btn:is(:hover, :focus-visible) { background: color-mix(in srgb, var(--ph) 18%, transparent); box-shadow: inset 0 0 0 1px var(--ph); outline: none; }
.crt .cmds .btn:is(:hover, :focus-visible)::before { content: '▶'; color: var(--hl); }
.crt .cmds .btn:active { transform: translateY(1px); padding: 3px 10px; }
.crt .cmds .btn.primary { grid-column: 1 / -1; justify-content: center; min-height: 40px; font-size: 26px; color: #08060f; text-shadow: none; background: linear-gradient(90deg, #ff8ae9, #8ff6ff); box-shadow: 0 0 16px rgba(255, 122, 230, 0.35); }
.crt .cmds .btn.primary::before { content: '▶'; color: #08060f; }
.crt .cmds .btn.primary:is(:hover, :focus-visible) { background: linear-gradient(90deg, #ffaaf1, #c6fbff); box-shadow: 0 0 0 2px #fff, 0 0 22px rgba(255, 122, 230, 0.55); }
.crt .step { min-height: 1.2em; color: var(--ph); font: 19px/1.2 var(--f-num); }
.crt .step::before { content: '» '; color: var(--hl); }
#title .crt .step { font-size: 18px; }
.crt .fine { color: var(--ph2); font: 15px var(--f-num); letter-spacing: 0.04em; }
.crt .tip { color: var(--ph2); font-size: 13px; min-height: 2.6em; }
.crt .bootlog { display: flex; flex-direction: column; justify-content: flex-end; min-height: 6em; margin: 0; padding: 0; list-style: none; color: var(--ph2); font: 17px/1.2 var(--f-num); }
.crt .bootlog li { display: flex; gap: 8px; white-space: nowrap; overflow: hidden; }
.crt .bootlog li::before { content: '>'; color: var(--ph3); }
.crt .bootlog li b { margin-left: auto; color: #7dffb0; font-weight: 400; }
.crt .bar { height: 18px; padding: 3px; border-radius: 2px; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 1px var(--ph3); }
.crt .bar .fill { background: repeating-linear-gradient(90deg, var(--ph) 0 9px, transparent 9px 12px); }
.crt .boot { position: absolute; inset: 0; z-index: 3; padding: 16px 20px; border-radius: 14px; overflow: hidden; cursor: pointer; white-space: pre; color: var(--ph); font: 20px/1.35 var(--f-num);
  background: radial-gradient(ellipse at 50% 40%, #0e1c26 0%, #070d13 62%, #020406 100%); transition: opacity 0.16s steps(3); }
.crt .boot div:last-child::after { content: '▮'; animation: blink 0.8s steps(2) infinite; }
.crt .boot.done { opacity: 0; }
.crt-chin { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 8px 0 10px; color: #b8bcc8; font: 15px/1 var(--f-num); letter-spacing: 0.16em; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8); white-space: nowrap; overflow: hidden; }
.crt-model { color: #858a97; letter-spacing: 0.1em; }
.crt-knob { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #7a7f8c 0%, #3a3d45 55%, #1c1d22 100%); box-shadow: 0 0 0 1px #000, 0 2px 0 rgba(255, 255, 255, 0.08); }
.crt-knob::after { content: ''; position: absolute; left: 8px; top: 2px; width: 2px; height: 6px; border-radius: 1px; background: #c8ccd6; transform-origin: 1px 7px; transform: rotate(35deg); }
.crt-knob + .crt-knob::after { transform: rotate(-60deg); }
.crt-led { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #ff3d9a; box-shadow: 0 0 0 1px #000, 0 0 10px #ff3d9a; }
#title .crt-led { animation: ledp 2.6s ease-in-out infinite; }
@keyframes ledp { 50% { opacity: 0.55; } }
@media (max-width: 560px) { .crt-model { display: none; } .crt .cmds { grid-template-columns: 1fr; } .crt .namefield .label { min-width: 0; } }
@media (prefers-reduced-motion: reduce) {
  #title .crt.on .crt-scr, #title .crt-glass::before, #title .crt-led, #title .crt-blink, #title .mglyph .mcur, .crt .boot div:last-child::after, :where(body:not(.rz)) .win.tsk .body { animation: none !important; }
}

/* ── v3 · T32 : musique (bandeau du morceau dans le radar, lecteur de poche, chaîne hi-fi à 3 playlists) ── */
#hud .mapframe { position: relative; }
#hud .np { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 22px; display: flex; align-items: center; padding: 0 6px; overflow: hidden; pointer-events: none;
  border-radius: 3px; background: var(--scr, #0b0418); box-shadow: inset 0 0 0 1px var(--ph3, #7a4fd6), 0 0 10px rgba(255, 122, 230, 0.25); }
#hud .np[hidden] { display: none; }
#hud .np .np-t { white-space: nowrap; font: 17px/1 var(--f-num); color: #ff9df0; text-shadow: 0 0 6px rgba(255, 122, 230, 0.55); }
#hud .np.run .np-t { animation: npScroll 7s linear 1s both; }
@keyframes npScroll { to { transform: translateX(calc(-1 * var(--np-shift))); } }
.music .mvolrow { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.music .mvolrow .mvol { flex: 1; min-width: 0; }
.music .mtabs { margin: 2px 0 6px; }
.music .mtabs .btn.tab { font-size: 13px; padding: 3px 9px; }
.music .mempty { padding: 8px; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { #hud .np.run .np-t { animation: none; } }

/* ── v3 · T34 : mode cinéma (bande-annonce) : rien d'autre que l'image et les cartons du film ── */
body.cine #hud, body.cine .bubbles, body.cine #alerts, body.cine #windows, body.cine #tooltip, body.cine .entry-prompt, body.cine .ctxbar, body.cine .nametag, body.cine #hurt, body.cine #fade { display: none !important; }
.cinecard { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; pointer-events: none; text-align: center; color: #fff; }
.cinecard.black { background: #050208; }
.cinecard .ct-logo { font: 400 clamp(60px, 9vw, 150px)/1 var(--f-title); letter-spacing: 0.04em; }
.cinecard .ct-logo .w1 { color: #ff8ae9; text-shadow: -3px 0 rgba(255, 40, 120, 0.55), 3px 0 rgba(40, 220, 255, 0.55), 0 0 30px rgba(255, 122, 230, 0.7); }
.cinecard .ct-logo .w2 { color: #8ff6ff; text-shadow: -3px 0 rgba(255, 40, 120, 0.5), 3px 0 rgba(40, 220, 255, 0.55), 0 0 30px rgba(94, 243, 255, 0.7); }
.cinecard .ct-line { font: 400 clamp(30px, 3vw, 58px)/1.3 var(--f-text); color: #e9dcff; max-width: 70vw; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }
.cinecard .ct-small { font: 400 clamp(34px, 3.4vw, 64px)/1 var(--f-num); letter-spacing: 0.3em; color: #8ff6ff; text-shadow: 0 0 18px rgba(94, 243, 255, 0.75), 0 0 2px #fff; }
.cinecard .mglyph { width: 150px; height: 138px; display: block; }
.cinecard .mglyph img { width: 100%; height: 100%; object-fit: contain; }

/* ── v3 : annonces discrètes (plus de gros texte au milieu de l'écran) : petites lignes sous l'affichage FPS / draw calls ── */
#hud .alerts-mini { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; pointer-events: none; max-width: 100%; }
#hud .alerts-mini:empty { display: none; }
#hud .alerts-mini .alert, #alerts .alert { font: 400 13px/1.25 var(--f-text); letter-spacing: 0; text-align: right; color: #e6ecf0; text-shadow: 1px 1px 0 #0a0c10, 0 0 4px rgba(0, 0, 0, 0.8); background: rgba(8, 10, 16, 0.55); padding: 2px 6px; border-radius: 2px; max-width: 100%; animation: alertIn 0.2s steps(2); }
#hud .alerts-mini .alert.warn, #alerts .alert.warn { color: #ffb3c6; }
#hud .alerts-mini .alert.out, #alerts .alert.out { opacity: 0; transition: opacity 0.45s steps(4); }
#hud .alerts-mini .alert.good, #alerts .alert.good { color: #a6ffe9; }
@media (max-width: 640px) { #hud .alerts-mini .alert, #alerts .alert { font-size: 12px; } }

/* v4 (T44) : cinématiques (bandes, fondus, sous-titres, bouton passer) et générique */
.cine-layer { position: fixed; inset: 0; z-index: 170; pointer-events: none; }
.cine-bar { position: absolute; left: 0; right: 0; height: 7vh; background: #000; }
.cine-bar.top { top: 0; } .cine-bar.bot { bottom: 0; }
.cine-layer.cine-real .cine-bar { height: 5vh; }
.cine-fade { position: absolute; inset: 0; background: #000; opacity: 0; }
.cine-fade.white { background: #fff; }
.cine-sub { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); max-width: min(920px, 90vw); text-align: center; color: #fff; font: 500 19px/1.35 system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; text-shadow: 0 2px 4px #000, 0 0 2px #000; opacity: 0; transition: opacity 0.35s; padding: 4px 12px; }
.cine-sub.on { opacity: 1; }
.cine-sub.title { bottom: 44vh; font: 700 34px var(--f-title); letter-spacing: 0.24em; }
.cine-skip { position: absolute; right: 16px; bottom: calc(7vh + 12px); pointer-events: auto; opacity: 0.75; }
.credits .cl.big { font-size: 1.12em; margin-bottom: 14px; }
.credits .cs.user .cl { padding: 6px 0; }
.credits .cl.trk { font-size: 0.86em; color: #d8dee4; padding: 2px 0; }
.credits .cl.trk .orig { font: 0.92em system-ui, -apple-system, 'Segoe UI', 'Noto Sans CJK JP', sans-serif; color: #9aa4ae; }
.credits.v-escape { background: linear-gradient(rgba(4, 6, 10, 0.1), rgba(4, 6, 10, 0.5)); }
/* v4.2 : bande-annonce — fenêtres et bulles visibles pendant certains plans */
body.cine.cine-ui #windows, body.cine.cine-bubbles .bubbles { display: block !important; }
body.cine.cine-ui #windows > .win { transform: scale(1.55); transform-origin: center center; }
body.cine.cine-ui .pcos .crt { transform: scale(1.35); }
body.cine.cine-bubbles .bubble, body.cine.cine-ui .bubble { font-size: 25px; max-width: 520px; padding: 8px 14px; }
/* v4.3 : plein écran — petit bouton icône (titre, barre du radar), touche P */
.fs-btn:not(.fs-text) { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 18px; padding: 0; margin: 0; border: 0; border-radius: 3px; background: transparent; color: inherit; cursor: pointer; opacity: 0.85; box-shadow: none; }
.fs-btn:not(.fs-text):hover, .fs-btn:not(.fs-text):focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 18%, transparent); outline: none; }
.fs-btn[hidden] { display: none !important; }
.fs-btn svg { display: block; pointer-events: none; }
.crt-head .fs-btn { color: var(--ph2); margin-left: 2px; }
.crt-head .fs-btn:hover { color: var(--ph); }
#hud .mapframe .fs-btn { position: absolute; top: 4px; right: 4px; z-index: 2; }
:where(body:not(.rz)) #hud .tmod.mapframe .fs-btn { top: -17px; right: 12px; width: 18px; height: 16px; color: var(--case-ink); }
