/* Nobody — interface « fusain de guerre » (voir docs/DA.md §2) */
:root {
  --ink: #0b0a09;
  --ink-2: #161412;
  --ink-3: #221f1c;
  --paper: #e9e4da;
  --paper-2: #d8d1c3;
  --paper-dark: #b9b1a1;
  --grey: #8a8178;
  --grey-2: #5d564f;
  --orange: #e2702a;
  --orange-2: #ff9a4a;
  --red: #c23b22;
  --green: #8fb07a;
  --cyan: #4fd8ff;
  --font: 'Oswald', 'Arial Narrow', sans-serif;
  --type: 'Special Elite', 'Courier New', monospace;
  --hand: 'Caveat', cursive;
  --shadow: 0 6px 22px rgba(0, 0, 0, .55);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); color: var(--paper); font-family: var(--font); user-select: none; }
button { font-family: inherit; }
input, textarea, select { font-family: var(--font); }
#app { position: fixed; inset: 0; }
#world-layer, #map-layer, #overlay-layer, #ui-layer, #modal-layer, #toast-layer { position: absolute; inset: 0; }
#world-layer, #map-layer { z-index: 1; }
#map-layer { z-index: 2; }
#overlay-layer { z-index: 3; pointer-events: none; overflow: hidden; }
#ui-layer { z-index: 4; pointer-events: none; }
#ui-layer > * { pointer-events: auto; }
#modal-layer { z-index: 6; pointer-events: none; }
#modal-layer > * { pointer-events: auto; }
#ui-layer, #modal-layer, #toast-layer { zoom: var(--ui-scale, 1); }
#toast-layer { z-index: 7; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 14px; }
#grain { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.9'/></svg>"); }
.hidden { display: none !important; }

/* ── Briques visuelles ────────────────────────────────────────── */
.paper {
  background: var(--paper); color: var(--ink);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(120,100,70,.18), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .27  0 0 0 0 .22  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
  box-shadow: var(--shadow);
}
.torn { filter: url(#rough); }
.chalk {
  background-color: #141312; color: var(--paper);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.06), transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(255,255,255,.04), transparent 50%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='c'><feTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23c)'/></svg>");
}
.frame { border: 10px solid var(--paper); box-shadow: 0 0 0 1px rgba(0,0,0,.4), var(--shadow); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.accent { color: var(--orange); }
.muted { color: var(--grey); }
.typed { font-family: var(--type); }
.hand { font-family: var(--hand); }

/* Bandes noires « coup de pinceau » */
.brush {
  position: relative; display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end;
  min-width: 210px; padding: 8px 18px 8px 26px; border: 0; cursor: pointer;
  color: var(--paper); background: #0e0d0c; text-transform: uppercase; font-size: 21px; letter-spacing: .03em;
  clip-path: polygon(0 8%, 3% 0, 96% 4%, 100% 18%, 98% 52%, 100% 86%, 95% 100%, 4% 94%, 0 100%, 1% 55%);
  transition: background .15s, color .15s, transform .15s;
}
.brush:hover { background: #1d1a17; color: #fff; transform: translateX(3px); }
.brush.on, .brush.orange { background: var(--orange); color: #fff; }
.brush.orange:hover { background: var(--orange-2); }
.brush:disabled { opacity: .45; cursor: default; transform: none; }
.brush .ic { width: 26px; height: 26px; }
.brush small { font-size: 13px; opacity: .8; text-transform: none; }

/* Boutons « ruban adhésif » */
.tape {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border: 0;
  padding: 9px 22px; min-width: 120px; font-size: 19px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--ink); background: var(--paper-2);
  background-image: linear-gradient(180deg, rgba(255,255,255,.35), rgba(0,0,0,.06));
  clip-path: polygon(2% 0, 98% 3%, 100% 30%, 97% 60%, 100% 96%, 3% 100%, 0 70%, 2% 40%, 0 12%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  transition: transform .12s, background .12s;
}
.tape:hover { background: #fff; transform: rotate(-.6deg) scale(1.03); }
.tape:disabled { opacity: .4; cursor: default; transform: none; }
.tape.dark { background: #2a2622; color: var(--paper); background-image: none; }
.tape.dark:hover { background: #3b3530; }
.tape.orange { background: var(--orange); color: #fff; background-image: none; }
.tape.small { font-size: 15px; padding: 6px 14px; min-width: 0; }

/* ── Écran titre ──────────────────────────────────────────────── */
.title-screen { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding-left: 8vw; gap: 12px;
  background: linear-gradient(90deg, rgba(8,7,6,.92) 0%, rgba(8,7,6,.65) 38%, rgba(8,7,6,0) 70%); }
.title-screen h1 { font-size: clamp(54px, 7.4vw, 112px); font-weight: 700; line-height: .9; letter-spacing: .01em; color: var(--paper); filter: url(#rough-sm); }
.title-screen h1 span { color: var(--orange); }
.title-screen .sub { font-family: var(--type); font-size: 17px; color: var(--paper-dark); max-width: 520px; margin-bottom: 26px; line-height: 1.5; }
.title-screen .menu { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.title-screen .row { display: flex; gap: 10px; align-items: center; }
.field { background: rgba(233,228,218,.92); color: var(--ink); border: 0; padding: 9px 12px; font-size: 18px; min-width: 200px;
  clip-path: polygon(0 4%, 99% 0, 100% 96%, 1% 100%); outline: none; }
.field:focus { background: #fff; }
.field.code { text-transform: uppercase; letter-spacing: .3em; width: 130px; min-width: 0; text-align: center; }
.credits { position: absolute; bottom: 14px; left: 8vw; font-size: 12px; color: var(--grey-2); font-family: var(--type); }

/* ── Lobby ────────────────────────────────────────────────────── */
.lobby { position: absolute; inset: 0; display: grid; grid-template-columns: 360px 1fr; gap: 28px; padding: 26px 34px 0; overflow: auto; align-items: start;
  background: radial-gradient(ellipse at 60% 40%, rgba(40,36,32,.55), rgba(8,7,6,.94)); }
.lobby .col { display: flex; flex-direction: column; gap: 16px; }
.dossier { padding: 18px 20px 20px; position: relative; }
.dossier h2 { font-size: 26px; margin-bottom: 10px; }
.dossier h3 { font-size: 17px; margin: 12px 0 6px; color: var(--grey-2); }
.dossier .stamp { position: absolute; top: 12px; right: 14px; font-family: var(--type); color: var(--red); border: 2px solid var(--red); padding: 2px 8px; transform: rotate(6deg); font-size: 15px; opacity: .85; }
.code-big { font-size: 46px; font-weight: 700; letter-spacing: .25em; color: var(--ink); }
.player-row { display: flex; align-items: center; gap: 10px; font-size: 18px; padding: 3px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px rgba(0,0,0,.25); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 0; padding: 6px 12px; font-size: 16px; background: rgba(0,0,0,.08); cursor: pointer; text-transform: uppercase; color: var(--ink-3); }
.seg button.on { background: var(--ink); color: var(--paper); }
.seg button:disabled { cursor: default; }
.geo-results { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; max-height: 160px; overflow: auto; }
.geo-results button { text-align: left; background: rgba(0,0,0,.06); border: 0; padding: 5px 8px; cursor: pointer; font-size: 14px; }
.geo-results button:hover { background: var(--ink); color: var(--paper); }
.cards { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.char-card { width: 230px; padding: 10px 10px 12px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); position: relative; transition: transform .15s; }
.char-card:nth-child(odd) { transform: rotate(-1.2deg); }
.char-card:nth-child(even) { transform: rotate(1.1deg); }
.char-card:hover { transform: rotate(0) scale(1.02); }
.char-card .photo { width: 100%; aspect-ratio: 4/5; background: #111; display: block; object-fit: cover; }
.char-card .name { font-size: 24px; font-weight: 500; text-transform: uppercase; margin-top: 6px; }
.char-card .prof { font-size: 15px; color: var(--grey-2); }
.char-card .traits { font-size: 13px; margin-top: 4px; line-height: 1.35; display: flex; flex-wrap: wrap; gap: 1px 8px; }
.char-card .traits .tr-i { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.char-card .traits .tr-i.pos { color: #2f5b22; }
.char-card .traits .tr-i.neg { color: #8c2412; }
.char-card .prof { display: flex; align-items: center; gap: 5px; }
.char-card .owner { position: absolute; top: 16px; left: 16px; font-size: 13px; padding: 1px 7px; color: #fff; }
.char-card .acts { display: flex; gap: 6px; margin-top: 8px; }
.char-card.add { display: flex; align-items: center; justify-content: center; min-height: 340px; cursor: pointer; background: rgba(233,228,218,.08); color: var(--paper); border: 2px dashed rgba(233,228,218,.3); box-shadow: none; font-size: 22px; text-transform: uppercase; }
.char-card.add:hover { background: rgba(233,228,218,.15); }
.lobby .bottom { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 2; padding: 12px 0 14px;
  background: linear-gradient(180deg, rgba(10,9,8,0) 0, rgba(10,9,8,.96) 12px); }
.lobby .bottom .brush small { margin-left: 4px; }

/* ── Créateur de personnage ───────────────────────────────────── */
.creator { position: absolute; inset: 0; display: grid; grid-template-columns: 380px 1fr 330px; grid-template-rows: 100%; gap: 22px; padding: 22px 28px; background: #0b0a09; overflow: hidden; }
.creator > * { min-height: 0; }
.creator .preview-box { display: flex; flex-direction: column; min-height: 0; }
.creator .preview-box { position: relative; }
.creator .preview { width: 100%; height: 440px; background: #1b1916; overflow: hidden; flex: none; }
.creator .preview canvas { width: 100% !important; height: 100% !important; object-fit: contain; display: block; }
.creator .look-rows { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; flex: 1; min-height: 0; overflow: auto; padding-right: 4px; }
.look-row { display: grid; grid-template-columns: 105px 26px 1fr 26px; align-items: center; gap: 6px; font-size: 15px; }
.look-row .lbl { color: var(--grey); text-transform: uppercase; font-size: 13px; }
.look-row .val { text-align: center; }
.look-row button { background: none; border: 0; color: var(--paper); font-size: 18px; cursor: pointer; }
.look-row button:hover { color: var(--orange); }
.swatches { display: flex; gap: 3px; flex-wrap: wrap; grid-column: 2 / 5; }
.swatch { width: 17px; height: 17px; border: 2px solid transparent; cursor: pointer; box-sizing: border-box; }
.swatch.on { border-color: var(--orange); }
.creator .mid { display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.creator .points { font-size: 34px; font-weight: 700; }
.creator .points.neg { color: var(--red); }
.creator .points.ok { color: var(--green); }
.creator .lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; overflow: auto; flex: 1; padding-right: 4px; }
.trait { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 8px; cursor: pointer; border-left: 3px solid transparent; background: rgba(255,255,255,.03); margin-bottom: 3px; }
.trait:hover { background: rgba(255,255,255,.08); }
.trait.on { border-left-color: var(--orange); background: rgba(226,112,42,.16); }
.trait.off { opacity: .35; cursor: not-allowed; }
.trait .nm { font-size: 17px; }
.trait .cost { font-size: 15px; font-weight: 700; }
.trait .cost.pos { color: var(--red); }
.trait .cost.neg { color: var(--green); }
.trait .ds { font-size: 12.5px; color: var(--grey); display: block; font-family: var(--font); font-weight: 300; }
.prof-select { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.prof-select button { background: rgba(255,255,255,.05); border: 0; color: var(--paper); padding: 6px 4px; cursor: pointer; font-size: 14px; text-align: center; }
.prof-select button.on { background: var(--orange); color: #fff; }
.prof-select button small { display: block; font-size: 12px; opacity: .8; }
.prof-select button { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.15; }
.prof-select button .ic { margin-bottom: 2px; opacity: .9; }
.prof-select button.on .ic { opacity: 1; }
.trait { align-items: center; }
.trait .ti { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.06); }
.trait.on .ti { background: rgba(226,112,42,.35); }
.trait .tx { flex: 1; min-width: 0; }
.prof-card { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 8px 10px; background: rgba(226,112,42,.16); border-left: 3px solid var(--orange); }
.prof-card b { display: block; font-size: 17px; font-weight: 500; }
.prof-card span { font-size: 13px; color: var(--grey); }
.trait-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; font-size: 14px; background: rgba(255,255,255,.06); }
.chip.pos { border-left: 2px solid var(--orange); }
.chip.neg { border-left: 2px solid var(--green); }
.creator .preview-hint { font-size: 12px; color: var(--grey); text-align: center; margin-top: 4px; letter-spacing: .03em; }
.creator .right { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.creator .right > div:first-of-type { overflow: auto; min-height: 0; flex: 1 1 auto; padding-right: 4px; }
.creator .right-btns { display: flex; flex-direction: column; gap: 8px; flex: none; }
.creator .right-btns .row2 { display: flex; gap: 8px; }
.creator .right-btns .row2 > * { flex: 1; min-width: 0; }
.creator h3.flaw { color: #d9826e; }
@media (max-height: 820px) { .creator .preview { height: 300px; } .creator { padding: 14px 22px; gap: 16px; } .creator .mid { gap: 6px; } .prof-select button { padding: 4px 3px; } }
.creator textarea { width: 100%; min-height: 110px; background: var(--paper); color: var(--ink); border: 0; padding: 10px; font-family: var(--hand); font-size: 20px; resize: none; }
.thread-opt { padding: 7px 9px; cursor: pointer; background: rgba(255,255,255,.04); margin-bottom: 4px; }
.thread-opt.on { background: rgba(226,112,42,.2); box-shadow: inset 3px 0 0 var(--orange); }
.thread-opt b { font-weight: 500; display: block; }
.thread-opt span { font-size: 13px; color: var(--grey); }

/* ── HUD en jeu ───────────────────────────────────────────────── */
.topband { position: absolute; top: 14px; left: 0; display: flex; align-items: center; gap: 22px; padding: 8px 36px 8px 26px; font-size: 38px; font-weight: 500; letter-spacing: .01em;
  clip-path: polygon(0 0, 97% 4%, 100% 40%, 98% 100%, 0 96%); }
.topband .day { font-size: 26px; text-transform: uppercase; color: var(--ink-3); }
.topband .day b { font-size: 40px; color: var(--red); font-weight: 700; margin-left: 6px; }
.topband .clock { display: flex; align-items: center; gap: 10px; }
.topband .clock svg { width: 40px; height: 40px; }
.topband .temp { color: var(--orange); display: flex; align-items: center; gap: 6px; }
.topband .weather { font-size: 15px; color: var(--grey-2); text-transform: uppercase; max-width: 100px; line-height: 1.1; }
.topband .paused { font-size: 16px; color: var(--red); text-transform: uppercase; }
.topband .paused.vote { color: #7a4a1c; }
.topband .paused.ff { color: #5d564f; }
.topband .paused.ff small { font-size: 12px; text-transform: none; }
.topband .clock.dawn { color: #8c2412; }
.topband .clock.dawn.hot { animation: dawnPulse 1.1s ease-in-out infinite; }
@keyframes dawnPulse { 50% { color: #e2702a; transform: scale(1.06); } }
.leftbar { position: absolute; top: 96px; left: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ready-count { font-size: 13px; opacity: .8; }
.scene-tabs { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.scene-tabs button { border: 0; background: rgba(14,13,12,.85); color: var(--paper); padding: 6px 14px; font-size: 15px; text-transform: uppercase; cursor: pointer; }
.scene-tabs button.on { background: var(--paper); color: var(--ink); }
.portraits { position: absolute; right: 18px; bottom: 16px; display: flex; align-items: flex-end; gap: 10px; }
.polaroid { background: var(--paper); padding: 8px 8px 10px; box-shadow: var(--shadow); color: var(--ink); cursor: pointer; position: relative; transition: transform .15s; }
.polaroid canvas, .polaroid img { display: block; background: #111; }
.polaroid .pn { font-size: 15px; text-transform: uppercase; font-weight: 500; margin-top: 4px; max-width: 96px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.polaroid.small { transform: rotate(var(--rot, 1deg)); opacity: .9; }
.polaroid.small:hover { transform: rotate(0) translateY(-6px); opacity: 1; }
.polaroid.small canvas { width: 92px; height: 112px; }
.polaroid.small.unctrl { filter: grayscale(.5); opacity: .7; }
.polaroid.dead { filter: grayscale(1) brightness(.6); }
.polaroid .badge { position: absolute; top: 3px; right: 3px; font-size: 11px; color: #fff; padding: 1px 5px; }
.polaroid .act-badge { position: absolute; left: 10px; bottom: 34px; font-size: 11px; color: var(--paper); background: rgba(0,0,0,.7); padding: 1px 5px; max-width: 86px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.polaroid .bar { position: absolute; left: 8px; right: 8px; bottom: 30px; height: 4px; background: rgba(0,0,0,.35); }
.polaroid .bar i { display: block; height: 100%; background: var(--orange); }
.big-polaroid { display: grid; grid-template-columns: 1fr 190px; gap: 12px; padding: 10px; width: 480px; transform: rotate(-1deg); cursor: default; }
.big-polaroid canvas { width: 190px; height: 232px; grid-column: 2; grid-row: 1 / 3; }
.big-polaroid .info { grid-column: 1; grid-row: 1; }
.big-polaroid .nm { font-size: 30px; font-weight: 500; text-transform: uppercase; line-height: 1; }
.big-polaroid .pf { font-size: 16px; color: var(--grey-2); margin-bottom: 6px; }
.big-polaroid .st { font-size: 15px; color: var(--orange); text-transform: uppercase; line-height: 1.3; }
.big-polaroid .st.bad { color: var(--red); }
.big-polaroid .tr { font-size: 12.5px; color: var(--grey-2); margin-top: 6px; line-height: 1.3; }
.big-polaroid .thread { font-family: var(--hand); font-size: 17px; color: var(--ink-3); margin-top: 6px; line-height: 1.1; }
.big-polaroid .modes { grid-column: 1; grid-row: 2; align-self: end; display: flex; gap: 4px; flex-wrap: wrap; }
.big-polaroid .modes button { border: 0; background: rgba(0,0,0,.1); padding: 4px 9px; font-size: 13px; cursor: pointer; text-transform: uppercase; }
.big-polaroid .modes button.on { background: var(--ink); color: var(--paper); }
.big-polaroid .pack { font-size: 13px; color: var(--ink-3); }

/* Icônes d'interaction dans la scène */
.obj-icon { color: var(--ink); position: absolute; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; background: rgba(233,228,218,.93); box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 3px 10px rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; cursor: pointer; pointer-events: auto; transition: transform .12s, background .12s; }
.obj-icon svg { width: 26px; height: 26px; }
.obj-icon:hover { transform: scale(1.18); background: #fff; }
.obj-icon.dim { opacity: .45; }
.obj-icon.danger { background: #f0d0c8; }
.obj-icon.theft { background: #f3c9b9; box-shadow: 0 0 0 2px var(--red), 0 3px 10px rgba(0,0,0,.6); }
.obj-icon .n { position: absolute; bottom: -6px; right: -6px; font-size: 12px; background: var(--ink); color: var(--paper); padding: 0 4px; }
.obj-icon.small { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
.obj-icon.small svg { width: 20px; height: 20px; }
.obj-label { position: absolute; transform: translate(-50%, -100%); margin-top: -28px; background: rgba(11,10,9,.9); color: var(--paper); padding: 3px 9px; font-size: 15px; white-space: nowrap; pointer-events: none; }
.act-menu { position: absolute; display: flex; flex-direction: column; gap: 3px; transform: translate(-50%, 0); pointer-events: auto; }
.act-menu button { color: var(--paper); border: 0; background: rgba(11,10,9,.93); color: var(--paper); padding: 6px 12px; font-size: 16px; cursor: pointer; text-align: left; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.act-menu button:hover { background: var(--orange); }
.act-menu button:disabled { opacity: .45; cursor: default; background: rgba(11,10,9,.93); }
.act-menu button small { opacity: .7; font-size: 12px; }
.act-menu button svg { width: 18px; height: 18px; }
.bubble { position: absolute; transform: translate(-50%, -100%); max-width: 240px; background: rgba(11,10,9,.88); color: var(--paper); padding: 5px 10px; font-size: 15px; text-align: center; line-height: 1.25; pointer-events: none; }
.bubble.say { background: rgba(233,228,218,.95); color: var(--ink); }
.bubble.warn { background: var(--red); color: #fff; font-weight: 500; }
.name-tag { position: absolute; transform: translate(-50%, 0); font-size: 13px; color: var(--paper); text-shadow: 0 1px 3px #000; pointer-events: none; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.name-tag i { display: block; height: 3px; margin-top: 2px; background: rgba(255,255,255,.2); }
.name-tag i b { display: block; height: 100%; background: var(--orange); }
.floater { position: absolute; transform: translate(-50%, 0); font-size: 17px; font-weight: 500; color: var(--paper); text-shadow: 0 2px 4px #000; pointer-events: none; white-space: nowrap; animation: floatup 1.8s ease-out forwards; }
@keyframes floatup { from { opacity: 0; transform: translate(-50%, 6px); } 15% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -46px); } }
.countdown { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); text-align: center; }
.countdown .t { font-size: 96px; font-weight: 700; line-height: 1; color: var(--paper); text-shadow: 0 4px 18px #000; }
.countdown .t.hot { color: var(--red); }
.countdown .t.warm { color: var(--orange); }
.countdown .h { font-family: var(--type); font-size: 15px; color: var(--paper); max-width: 560px; margin: 4px auto 0; padding: 5px 12px; background: rgba(14, 12, 10, .72); box-shadow: 0 4px 14px #0008; }
.countdown .radio-slip { margin: 10px auto 0; max-width: 520px; padding: 8px 14px 9px; background: var(--paper); color: var(--ink);
  font-family: var(--type); font-size: 14px; line-height: 1.35; text-align: left; transform: rotate(-0.6deg);
  box-shadow: 0 6px 18px #000a; clip-path: polygon(0 3%, 100% 0, 99% 97%, 1% 100%); animation: slipIn .5s ease-out; }
.countdown .radio-slip svg { vertical-align: -3px; margin-right: 6px; color: var(--red); }
.countdown .radio-slip .wanted { margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; }
.countdown .radio-slip .wanted b { font-family: var(--font); text-transform: uppercase; letter-spacing: .04em; font-size: 13px;
  border-bottom: 2px solid var(--red); padding: 0 2px; }
@keyframes slipIn { from { opacity: 0; transform: translateY(-8px) rotate(-2deg); } to { opacity: 1; transform: rotate(-0.6deg); } }
.bag-meter { position: absolute; left: 14px; top: 160px; padding: 10px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 18px; max-width: 330px; }
.bag-meter .items { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.bag-meter .items span { font-size: 13px; background: rgba(0,0,0,.1); padding: 1px 6px; }

/* Fenêtres (panneaux tableau noir) */
.panel-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5,4,4,.55); }
.panel { position: relative; width: min(1060px, 94vw); max-height: 88vh; display: flex; flex-direction: column; padding: 18px 22px 20px; border: 10px solid var(--paper); box-shadow: var(--shadow); }
.panel > h2 { font-size: 34px; margin-bottom: 2px; }
.panel > .sub { color: var(--orange); font-size: 22px; margin-bottom: 10px; }
.panel .close { position: absolute; top: 6px; right: 10px; width: 40px; height: 40px; background: none; border: 0; color: var(--paper); font-size: 32px; line-height: 1; cursor: pointer; opacity: .8; }
.panel .close:hover { opacity: 1; color: var(--orange); }
.panel .body { overflow: auto; flex: 1; }
.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.item { position: relative; padding: 8px 6px 6px; text-align: center; background: rgba(255,255,255,.03); border: 1px dashed rgba(233,228,218,.15); cursor: pointer; }
.item:hover { background: rgba(255,255,255,.08); border-color: rgba(233,228,218,.4); }
.item.sel { border: 1px solid var(--orange); background: rgba(226,112,42,.12); }
.item svg { width: 40px; height: 40px; }
.item .q { position: absolute; top: 4px; right: 6px; font-size: 18px; color: var(--orange); font-weight: 700; }
.item .nm { font-size: 13.5px; line-height: 1.15; margin-top: 2px; }
.item .w { font-size: 11px; color: var(--grey); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols3 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.recipe { display: flex; align-items: center; gap: 10px; padding: 6px 8px; cursor: pointer; border-left: 3px solid transparent; }
.recipe:hover { background: rgba(255,255,255,.05); }
.recipe.sel { border-left-color: var(--orange); background: rgba(226,112,42,.1); }
.recipe.locked { opacity: .4; }
.recipe svg { width: 34px; height: 34px; flex: none; }
.recipe .nm { font-size: 18px; }
.recipe .lv { font-size: 12px; color: var(--grey); }
.detail { padding: 14px; border: 2px solid rgba(233,228,218,.25); }
.detail h3 { color: var(--orange); font-size: 26px; }
.detail .desc { font-family: var(--font); font-weight: 300; font-size: 16px; color: var(--paper-2); margin: 6px 0 12px; }
.cost-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0; }
.cost-row .c { text-align: center; font-size: 16px; }
.cost-row .c svg { width: 34px; height: 34px; display: block; margin: 0 auto 2px; }
.cost-row .c.miss { color: var(--orange); }
.who-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.who-row button { border: 0; background: rgba(255,255,255,.08); color: var(--paper); padding: 5px 10px; cursor: pointer; font-size: 15px; }
.who-row button:hover:not(:disabled) { background: var(--orange); }
.who-row button:disabled { opacity: .35; cursor: default; }
.journal { background: var(--paper); color: var(--ink); padding: 18px 26px; font-family: var(--hand); font-size: 23px; line-height: 1.35;
  background-image: repeating-linear-gradient(180deg, transparent 0 30px, rgba(80,100,140,.18) 30px 31px); }
.journal .d { font-family: var(--font); font-size: 15px; color: var(--grey-2); margin-top: 8px; text-transform: uppercase; }
.journal p { margin: 0; }
.journal .death, .journal .danger, .journal .bad, .journal .moral { color: #8c2412; }
.journal .good { color: #2f5b22; }
.journal .story, .journal .thread { color: #253f6a; }

/* Votes / événements */
.event { width: min(620px, 92vw); padding: 26px 30px 22px; transform: rotate(-.6deg); }
.event h2 { font-size: 30px; }
.event .txt { font-family: var(--type); font-size: 17.5px; line-height: 1.55; margin: 10px 0 16px; color: var(--ink-3); }
.event .opts { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.event .opt { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; }
.event .opt .votes { display: flex; gap: 3px; }
.event .why { font-size: 13px; color: var(--red); font-family: var(--font); }
.event .result { font-family: var(--type); font-size: 17px; line-height: 1.5; padding: 10px 12px; background: rgba(0,0,0,.06); margin: 8px 0 12px; }
.event .timer { font-size: 14px; color: var(--grey-2); margin-top: 8px; }
.dice { display: flex; align-items: center; gap: 14px; margin: 10px 0; }
.d20 { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: var(--paper); background: var(--ink);
  clip-path: polygon(50% 0, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); }
.d20.roll { animation: roll .9s ease-out; }
.d20.ok { background: #2f5b22; }
.d20.ko { background: #8c2412; }
@keyframes roll { 0% { transform: rotate(0) scale(.6); } 60% { transform: rotate(540deg) scale(1.1); } 100% { transform: rotate(720deg) scale(1); } }

/* Toasts */
.toast { pointer-events: none; padding: 8px 16px; font-size: 18px; max-width: 70vw; animation: toastin .25s ease-out; color: var(--ink); background: var(--paper); box-shadow: var(--shadow);
  clip-path: polygon(0 6%, 99% 0, 100% 92%, 1% 100%); }
.toast.warn { background: #e8d3a8; }
.toast.danger, .toast.death { background: var(--red); color: #fff; }
.toast.good { background: #cfe0bf; }
.toast.story, .toast.radio { background: #1a1816; color: var(--paper); font-family: var(--type); font-size: 16px; }
@keyframes toastin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* Planification de nuit */
#ui-layer > .night-ui, .night-ui { position: absolute; inset: 0; pointer-events: none; }   /* laisse passer molette et glisser vers la carte */
.night-ui > * { pointer-events: auto; }
.night-left { position: absolute; top: 14px; left: 14px; bottom: 14px; width: 430px; display: flex; flex-direction: column; gap: 12px; overflow: auto; padding: 16px; }
.night-left h2 { font-size: 30px; }
.exp-slot { padding: 10px 12px; border: 1px dashed rgba(233,228,218,.25); }
.exp-slot.on { border: 1px solid var(--cyan); }
.exp-slot h3 { font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.exp-slot .poi { font-size: 21px; color: var(--cyan); }
.exp-slot .meta { font-size: 14px; color: var(--grey); }
.exp-slot .meta.warn { color: var(--orange); }
.roster-row { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(233,228,218,.08); }
.roster-row canvas { width: 54px; height: 66px; }
.roster-row .nm { font-size: 18px; text-transform: uppercase; }
.roster-row .st { font-size: 12px; color: var(--orange); }
.roles { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.roles button { border: 0; background: rgba(255,255,255,.07); color: var(--paper); font-size: 12.5px; padding: 3px 7px; cursor: pointer; text-transform: uppercase; }
.roles button.on { background: var(--orange); color: #fff; }
.roles button:disabled { opacity: .3; cursor: default; }
.gear { margin-top: 4px; font-size: 13px; }
.gear .w { color: var(--grey); }
.gear-list { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.gear-list button { border: 0; font-size: 12px; padding: 2px 6px; cursor: pointer; background: rgba(79,216,255,.12); color: var(--paper); }
.gear-list button.add { background: rgba(255,255,255,.05); }
.poi-card { position: absolute; width: 320px; padding: 14px 16px; pointer-events: auto; transform: translate(-50%, calc(-100% - 22px)); }
.poi-card.hover { pointer-events: none !important; width: 260px; padding: 10px 14px; }
.poi-card.hover h3 { font-size: 20px; }
.poi-card .hint-small { font-size: 12px; color: var(--grey-2); margin-top: 2px; }
.poi-card.docked { right: 18px; top: 62px; transform: rotate(-.4deg); width: 330px; max-height: calc(100% - 200px); overflow: auto; }
.poi-card .pc-x { position: absolute; right: 6px; top: 2px; width: 34px; height: 34px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--ink); }
.poi-card .pc-x:hover { color: var(--red); }
.poi-card h3 { font-size: 24px; }
.poi-card .tp { color: var(--grey-2); font-size: 15px; text-transform: uppercase; }
.poi-card .ds { font-family: var(--type); font-size: 14.5px; line-height: 1.45; margin: 6px 0; color: var(--ink-3); }
.poi-card .tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0; }
.poi-card .tags span { font-size: 12.5px; padding: 1px 7px; background: rgba(0,0,0,.08); }
.poi-card .tags span.d { background: var(--red); color: #fff; }
.poi-card .btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.night-right { position: absolute; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.map-hint { position: absolute; left: calc(458px + (100% - 458px) / 2); transform: translateX(-50%); top: 16px; font-family: var(--type); font-size: 13.5px; color: var(--paper-dark); background: rgba(11,10,9,.72); padding: 6px 12px; white-space: nowrap; pointer-events: none !important; transition: opacity .6s; }
.map-hint.faded { opacity: 0; }

/* Rapport du matin / fin */
.report { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8,7,6,.82); }
.report .sheet { width: min(980px, 94vw); max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; }
.report .sheet .journal { min-height: 100%; }
.report .side { background: #151311; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.report .side h3 { color: var(--orange); font-size: 20px; }
.report .found { display: flex; flex-wrap: wrap; gap: 6px; }
.report .found span { font-size: 14px; background: rgba(255,255,255,.06); padding: 2px 8px; }
.report .people { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.report .people div { font-size: 14px; }
.report .people b { display: block; text-transform: uppercase; font-weight: 500; }
.report .people span { color: var(--orange); font-size: 12.5px; }
.ending { position: absolute; inset: 0; background: #050404; overflow: auto; padding: 8vh 8vw 170px; }
.ending h1 { font-size: 80px; font-weight: 700; color: var(--paper); }
.ending .txt { font-family: var(--type); font-size: 20px; line-height: 1.6; max-width: 820px; color: var(--paper-2); margin: 20px 0 40px; }
.ending .epis { display: flex; flex-wrap: wrap; gap: 28px; }
.ending .epi { width: 300px; }
.ending .epi .polaroid { width: 210px; cursor: default; }
.ending .epi .polaroid canvas { width: 194px; height: 236px; }
.ending .epi p { font-family: var(--hand); font-size: 22px; line-height: 1.25; color: var(--paper); }

/* Trajet */
.trip-card { position: absolute; right: 4vw; top: 50%; transform: translateY(-50%) rotate(.8deg); width: min(560px, 92vw); padding: 24px 28px; }
.trip-card .step { font-size: 14px; color: var(--grey-2); text-transform: uppercase; }
.trip-progress { position: absolute; left: 20px; top: 20px; padding: 12px 16px; width: 360px; max-height: 70vh; overflow: auto; }
.trip-progress .log { font-family: var(--type); font-size: 13.5px; line-height: 1.45; margin-top: 6px; color: var(--paper-2); }
.trip-progress .log b { color: var(--orange); font-family: var(--font); font-weight: 500; }

/* Radio */
.radio-tuner { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); width: 560px; padding: 14px 18px; }
.radio-tuner .scale { position: relative; height: 34px; background: #1b1915; margin: 8px 0; overflow: hidden; }
.radio-tuner .scale i { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(233,228,218,.25); }
.radio-tuner .needle { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--orange); }
.radio-tuner input[type=range] { width: 100%; accent-color: var(--orange); cursor: pointer; }
.radio-tuner .sig { height: 8px; background: #2a2622; }
.radio-tuner .sig i { display: block; height: 100%; background: var(--green); transition: width .2s; }

/* Chargement */
.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(5,4,4,.92); font-family: var(--type); font-size: 20px; }
.loading .spin { width: 46px; height: 46px; border: 3px solid rgba(233,228,218,.2); border-top-color: var(--orange); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.chat { position: absolute; left: 14px; bottom: 14px; width: 330px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.chat .lines:empty { display: none; }
.chat .lines { background: linear-gradient(90deg, rgba(11,10,9,.55), rgba(11,10,9,0)); padding: 2px 6px; }
#app[data-phase=night_plan] .game-chat { left: 462px; top: 56px; bottom: auto; }
#app[data-phase=trip] .game-chat { left: 20px; bottom: 18px; }
.lobby-chat .chat { position: static; width: min(520px, 100%); margin-top: 6px; }
.chat .lines { max-height: 140px; overflow: auto; display: flex; flex-direction: column; gap: 2px; text-shadow: 0 1px 3px #000; }
.chat input { background: rgba(11,10,9,.75); border: 0; color: var(--paper); padding: 6px 8px; font-size: 14px; outline: none; }
.scrollbar-thin::-webkit-scrollbar, .body::-webkit-scrollbar, .lists::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(233,228,218,.25); }

/* Vocations (créateur) */
.voc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 4px 0 8px; }
.voc { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; padding: 6px 2px; background: rgba(255,255,255,.05); color: var(--paper); cursor: pointer; font-size: 12.5px; }
.voc:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.voc.on { background: var(--orange); color: #fff; }
.voc.taken { opacity: .3; cursor: not-allowed; text-decoration: line-through; }
.voc-detail { font-size: 13.5px; line-height: 1.4; padding: 8px 10px; background: rgba(255,255,255,.04); border-left: 3px solid var(--orange); display: flex; flex-direction: column; gap: 4px; }
.voc-detail b { font-size: 18px; font-weight: 500; }
.voc-detail .ds { color: var(--grey); }
.char-card .voc-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; background: var(--ink); color: var(--paper); padding: 1px 7px; margin-top: 4px; }
.big-polaroid .modes .ability-btn, .ability-btn { border: 0; background: var(--ink); color: var(--paper); padding: 5px 10px; font-size: 13px; cursor: pointer; text-transform: uppercase; display: inline-flex; gap: 5px; align-items: center; }
.big-polaroid .modes .ability-btn:hover:not(:disabled), .ability-btn:hover:not(:disabled) { background: var(--orange); }
.ability-btn:disabled { opacity: .45; cursor: default; }
.big-polaroid .st.dying { color: #fff; background: var(--red); padding: 0 5px; display: inline-block; }
.big-polaroid .voc-line { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 4px; }
.big-polaroid .pf { display: flex; align-items: center; gap: 4px; }
.big-polaroid .tr { display: flex; flex-wrap: wrap; gap: 2px 8px; }
.big-polaroid .tr-i { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.big-polaroid .tr-i.neg .ic { opacity: .75; }
.def-score { display: flex; align-items: center; gap: 6px; font-size: 22px; color: var(--ink-3); }
.def-score b { color: var(--ink); }
.pets { display: flex; gap: 6px; align-items: flex-end; }
.pet { background: var(--paper); color: var(--ink); padding: 4px 6px; font-size: 12px; text-transform: uppercase; box-shadow: var(--shadow); display: flex; align-items: center; gap: 4px; }
.flair-hint { position: absolute; transform: translate(-50%, -100%); display: flex; gap: 3px; pointer-events: none; }
.flair-hint span { background: rgba(226,112,42,.92); color: #fff; font-size: 11px; padding: 1px 5px; text-transform: uppercase; }
/* Rapport du matin : mur de plâtre sombre */
.report .sheet.plaster { grid-template-columns: 1.3fr 1fr; background: #1d1b19;
  background-image: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.06), transparent 60%), radial-gradient(ellipse at 80% 90%, rgba(0,0,0,.4), transparent 60%),
  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='.02 .09' numOctaves='4'/><feColorMatrix values='0 0 0 0 .8  0 0 0 0 .78  0 0 0 0 .72  0 0 0 .16 0'/></filter><rect width='100%' height='100%' filter='url(%23w)'/></svg>"); }
.report .wall { padding: 26px 30px; font-family: var(--hand); font-size: 25px; line-height: 1.35; color: #e6e0d4; }
.report .wall h2 { font-family: var(--font); font-size: 34px; color: #f1ece2; text-transform: uppercase; margin-bottom: 6px; }
.report .wall .d { font-family: var(--font); font-size: 15px; color: #a39b8c; text-transform: uppercase; margin-bottom: 10px; }
.report .wall p { margin: 2px 0; }
.report .wall .bad, .report .wall .death { color: #e3a08f; }
.report .wall .good { color: #b9d3a6; }
.report .wall .story, .report .wall .map { color: #a9c4e6; }
.report .wall .verdict { font-family: var(--font); font-size: 15px; color: var(--orange); text-transform: uppercase; }

/* Trajet : objet utilisé / requis sur une option */
.tape.opt { text-align: left; }
.tape.opt:disabled { opacity: .55; }
.opt .opt-item, .opt .opt-why { display: block; font-family: var(--type); font-size: 12.5px; letter-spacing: 0; text-transform: none; margin-top: 2px; }
.opt .opt-item { color: #7a4a1c; }
.opt .opt-why { color: #8c2412; opacity: .85; }

/* Commandes système discrètes (hôte) : haut droite */
.sys-ctl { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; align-items: center; }
.sys-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(11,10,9,.55); color: var(--paper); cursor: pointer; opacity: .55; transition: opacity .15s, background .15s; }
.sys-btn:hover { opacity: 1; background: rgba(11,10,9,.85); }
.sys-btn.on { opacity: 1; background: var(--red); }
.sys-note { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--paper); background: rgba(140,36,18,.8); padding: 3px 9px; }
/* Portrait sélectionné : surélevé, avec ses actions */
.polaroid.small.sel { transform: rotate(0) translateY(-10px); opacity: 1; box-shadow: 0 0 0 3px var(--orange), var(--shadow); }
.polaroid.small.sel.pinned { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--orange), var(--shadow); }
.polaroid .mini-acts { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.polaroid .mini { width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ink); color: var(--paper); cursor: pointer; font-size: 14px; box-shadow: 0 2px 6px #0008; }
.polaroid .mini:hover:not(:disabled) { background: var(--orange); }
.polaroid .mini.ready { box-shadow: 0 0 0 2px var(--orange), 0 2px 6px #0008; }
.polaroid .mini:disabled { opacity: .45; cursor: not-allowed; }
/* Fiche détaillée flottante */
.char-pop { position: absolute; right: 18px; bottom: 200px; opacity: 0; transform: translateY(10px); transition: opacity .16s, transform .16s; pointer-events: none !important; }
.char-pop.show { opacity: 1; transform: none; pointer-events: auto !important; }

/* Confirmation */
.confirm-veil { position: absolute; inset: 0; background: rgba(8,7,6,.62); display: grid; place-items: center; pointer-events: auto; z-index: 20; }
.confirm-box { max-width: 460px; padding: 22px 26px 18px; color: var(--ink); }
.confirm-box h3 { margin: 0 0 8px; font-size: 26px; font-weight: 600; text-transform: uppercase; }
.confirm-box p { margin: 0 0 18px; font-family: var(--type); font-size: 15px; line-height: 1.45; }
.confirm-box .row { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
button.brush.red { background: var(--red); color: #fff; }
/* Titre */
.title-screen .stamp-sub { font-family: var(--type); font-size: 18px; color: var(--red); border: 2px solid var(--red); padding: 2px 10px; transform: rotate(-3deg); align-self: flex-start; margin: -4px 0 6px 6px; letter-spacing: .08em; opacity: .9; }

/* ── Passe interface (QA) ─────────────────────────────────────── */
/* Commandes système : titre, salon, partie */
.title-sys { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; z-index: 5; }
.sys-ctl { z-index: 5; }
.sys-note.vote { background: rgba(122,74,28,.88); }
.act-title { background: rgba(233,228,218,.94); color: var(--ink); padding: 3px 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; }

/* Lobby */
.scen-note { font-family: var(--type); font-size: 13px; margin-top: 4px; color: #3a342e; line-height: 1.35; }
.geo-pending { font-family: var(--type); font-size: 12.5px; margin-top: 6px; padding: 5px 8px; background: rgba(226,112,42,.16); border-left: 3px solid var(--orange); color: #3a342e; }
.geo-wait { display: flex; align-items: center; gap: 8px; font-family: var(--type); font-size: 12.5px; color: #5d564f; }
.spin.small { width: 14px; height: 14px; border: 2px solid rgba(0,0,0,.15); border-top-color: var(--orange); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
.char-card.add.shared { min-height: 120px; font-size: 17px; }
.saves-panel { width: min(820px, 94vw); }
.save-list { display: flex; flex-direction: column; gap: 6px; }
.save-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: rgba(255,255,255,.04); border-left: 3px solid rgba(233,228,218,.15); }
.save-row:hover { background: rgba(255,255,255,.08); border-left-color: var(--orange); }
.save-main { flex: 1; min-width: 0; }
.save-title { font-size: 18px; }
.save-title b { font-weight: 500; text-transform: uppercase; }
.save-meta { font-size: 13px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-left: 8px; padding: 1px 6px; background: rgba(233,228,218,.12); vertical-align: 2px; }
.save-kind.manual { background: rgba(226,112,42,.3); }
.save-del { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--grey); cursor: pointer; }
.save-del:hover { color: var(--red); }

/* Réglages */
.set-veil { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,4,4,.6); z-index: 30; }
.set-panel { width: min(640px, 94vw); max-height: 88vh; }
.set-tabs { display: flex; gap: 6px; margin: 4px 0 12px; }
.set-tabs button { border: 0; background: rgba(255,255,255,.07); color: var(--paper); padding: 6px 14px; font-size: 15px; text-transform: uppercase; cursor: pointer; }
.set-tabs button.on { background: var(--orange); color: #fff; }
.set-body { overflow: auto; }
.set-row { display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(233,228,218,.08); }
.set-lbl { font-size: 17px; text-transform: uppercase; }
.set-lbl small { display: block; text-transform: none; font-size: 12.5px; color: var(--grey); font-family: var(--font); margin-top: 2px; }
.set-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg.dark button { background: rgba(255,255,255,.07); color: var(--paper); }
.seg.dark button.on { background: var(--paper); color: var(--ink); }
.set-vol { display: flex; align-items: center; gap: 10px; width: 100%; }
.set-vol input { flex: 1; accent-color: var(--orange); }
.set-vol b { min-width: 46px; text-align: right; font-weight: 500; }
.set-ico { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: rgba(255,255,255,.07); color: var(--paper); cursor: pointer; }
.set-ico:hover { background: var(--orange); }
.controls-sheet { display: flex; flex-direction: column; gap: 2px; }
.ctl-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid rgba(233,228,218,.06); font-size: 15px; }
.ctl-row kbd { font-family: var(--font); font-size: 14px; text-transform: uppercase; color: var(--orange); letter-spacing: .03em; }
.ctl-row span { color: var(--paper-2); font-weight: 300; }

/* Astuces */
.hint-note { position: absolute; right: 300px; top: 12px; transform: rotate(-.4deg); width: min(440px, calc(100vw - 840px)); padding: 10px 14px 8px; z-index: 4; pointer-events: auto; animation: slipIn .4s ease-out; }
.hint-note.at-top { top: 14px; }
#app[data-phase=night] .hint-note { top: 60px; }
.hint-note.at-map { top: auto; bottom: 18px; left: 474px; transform: rotate(-.4deg); width: min(470px, calc(100% - 474px - 330px)); }
.hint-note .hn-head { display: flex; align-items: center; gap: 7px; font-size: 17px; text-transform: uppercase; color: #7a2a1a; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; font-family: var(--font); }
.hint-note .hn-count { font-size: 12px; color: var(--grey-2); margin-left: 4px; }
.hint-note .hn-chev { margin-left: auto; font-size: 13px; color: var(--grey-2); }
.hint-note.small { width: auto; padding: 6px 12px; }

.hint-note .hn-head b { font-weight: 500; letter-spacing: .03em; }
.hint-note p { margin: 4px 0 5px; font-family: var(--type); font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.hn-check { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.hn-check li { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1.15; color: var(--ink-3); }
.hn-check li.ok { color: #5d564f; text-decoration: line-through; }
.hn-check .box { width: 15px; height: 15px; flex: none; border: 1.5px solid var(--ink-3); display: grid; place-items: center; color: #2f5b22; }
.hn-btns { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.hn-off { border: 0; background: none; font-family: var(--font); font-size: 13px; color: var(--grey-2); text-decoration: underline; cursor: pointer; }

/* Fiche perso */
.big-polaroid .modes .why { flex-basis: 100%; font-size: 12px; color: var(--grey-2); line-height: 1.2; }

/* Fabrication */
.recipe-list { max-height: 58vh; overflow: auto; padding-right: 4px; }
.recipe .nm { color: #b9b1a1; }
.recipe.can .nm { color: var(--paper); }
.recipe .ok-tag { font-size: 11px; text-transform: uppercase; margin-left: 8px; padding: 0 5px; background: rgba(143,176,122,.25); color: var(--green); vertical-align: 2px; }
.recipe .lv { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.craft-why { margin-top: 8px; color: var(--orange); font-size: 15px; }
.loot-hint { font-family: var(--type); font-size: 13px; color: var(--paper-dark); margin: -4px 0 8px; }

/* Nuit : lieux connus, équipement */
.places { border: 1px dashed rgba(233,228,218,.18); padding: 8px 10px; }
.places-head { font-size: 16px; display: flex; justify-content: space-between; cursor: pointer; }
.place-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; max-height: 190px; overflow: auto; }
.place { display: flex; flex-direction: column; align-items: flex-start; border: 0; background: rgba(255,255,255,.04); color: var(--paper); padding: 4px 8px; cursor: pointer; text-align: left; border-left: 3px solid transparent; }
.place:hover { background: rgba(255,255,255,.1); }
.place.sel { border-left-color: var(--paper); }
.place.picked { border-left-color: var(--cyan); }
.place.closed { opacity: .5; }
.place .pl-name { font-size: 15px; }
.place .pl-name b { color: var(--cyan); font-weight: 500; }
.place .pl-meta { font-size: 11.5px; color: var(--grey); }
.gear-head { display: flex; align-items: center; gap: 8px; }
.gear .w.full { color: var(--orange); }
.gear-toggle { border: 0; background: rgba(79,216,255,.16); color: var(--paper); font-size: 12px; padding: 2px 8px; cursor: pointer; text-transform: uppercase; }
.gear-toggle:hover { background: rgba(79,216,255,.3); }
.gear-list button:disabled { opacity: .35; cursor: default; }
.gear-list button small { opacity: .6; }
.gear-pick { margin-top: 5px; padding: 6px 8px; background: rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 4px; }
.gp-row { display: flex; flex-direction: column; gap: 2px; }
.gp-cat { font-size: 11px; text-transform: uppercase; color: var(--grey); letter-spacing: .04em; }
.night-warn { font-family: var(--type); font-size: 13px; color: #fff; background: rgba(140,36,18,.85); padding: 5px 10px; max-width: 300px; }

/* Rapport, fin */
.raid-box { padding: 8px 10px; font-size: 14px; border-left: 3px solid var(--red); background: rgba(194,59,34,.14); display: flex; flex-direction: column; gap: 2px; }
.raid-box.good { border-left-color: var(--green); background: rgba(143,176,122,.12); }
.raid-box b { font-weight: 500; text-transform: uppercase; font-size: 15px; }
.report .people span.fine { color: var(--green); }
.ending .places-epi { margin-top: 36px; max-width: 820px; }
.ending .places-epi h3 { font-size: 18px; color: #8a8178; margin-bottom: 6px; }
.ending .places-epi p { margin: 4px 0; font-family: var(--hand); font-size: 24px; color: var(--paper-2); }
.end-guest { display: flex; gap: 14px; align-items: center; margin-top: 24px; font-family: var(--type); }

/* Échec de lancement */
.load-fail { max-width: 520px; padding: 22px 26px 18px; color: var(--ink); font-family: var(--font); font-size: 16px; }
.load-fail h3 { font-size: 24px; margin-bottom: 8px; }
.load-fail p { font-family: var(--type); font-size: 15px; line-height: 1.45; margin: 0 0 16px; }
.load-fail .row { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }

/* Petits écrans (1280×720) */
@media (max-height: 760px) {
  .topband { font-size: 32px; padding: 6px 30px 6px 22px; top: 10px; }
  .topband .clock svg { width: 32px; height: 32px; }
  .leftbar { top: 80px; gap: 6px; }
  .brush { font-size: 19px; padding: 6px 16px 6px 22px; min-width: 190px; }
  .polaroid.small canvas { width: 80px; height: 98px; }
  .char-pop { bottom: 176px; }
  .bag-meter { top: 140px; }
  .night-left { width: 410px; }
  .hint-note p { font-size: 13px; }
}
#app[data-phase=ending] .game-chat { background: rgba(5,4,4,.92); padding: 6px; }

/* Créateur : options devenues inaccessibles (points ou incompatibilités) */
.prof-select button.off, .voc.off { opacity: .32; cursor: not-allowed; }

/* ── 60 secondes : mains, sac en couleur, sortie (fondu + carte d'attente) ── */
.countdown .t.look { font-size: 34px; font-weight: 500; letter-spacing: .02em; margin-top: 64px; }
.countdown .t.look b { font-size: 44px; color: var(--orange-2); margin-left: 4px; }
.countdown .t.panic { font-size: 64px; margin-top: 70px; text-transform: uppercase; animation: panicShake .35s linear infinite; }
@keyframes panicShake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3px, 1px); } 75% { transform: translate(3px, -1px); } }
.name-tag .hands { display: block; margin-top: 1px; font-size: 12px; letter-spacing: 0; text-transform: none; color: #d8d1c3; }
.name-tag .hands svg { vertical-align: -2px; margin-right: 3px; }
.name-tag .hands.some { color: #fff; }
.name-tag .hands.full { color: var(--orange-2); }
.obj-icon.bag-icon { width: 50px; height: 50px; margin: -25px 0 0 -25px; background: var(--orange); color: #fff;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0,0,0,.6), 0 3px 14px rgba(0,0,0,.7); }
.obj-icon.bag-icon svg { width: 30px; height: 30px; }
.obj-icon.bag-icon:hover { background: var(--orange-2); }
.obj-icon.bag-icon .n { background: #fff; color: var(--ink); font-weight: 600; border-radius: 8px; }
.obj-icon.bag-icon.urgent { background: var(--red); animation: bagPulse .8s ease-in-out infinite; }
@keyframes bagPulse { 0%, 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0,0,0,.6), 0 0 0 0 rgba(194,59,34,.8); } 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0,0,0,.6), 0 0 0 16px rgba(194,59,34,0); } }
.bag-meter .bag-ico { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--ink); }
.bag-meter .hands-line { font-size: 14px; margin-top: 2px; }
.bag-meter .hands-line svg { vertical-align: -3px; margin-right: 4px; }
.bag-meter .hands-line b { margin-right: 2px; }
.bag-meter .hands-line.full b { color: var(--red); }
.intro-fade { position: absolute; inset: 0; background: #050404; opacity: 0; transition: opacity 1.1s ease-in; pointer-events: none; }
.intro-fade.on { opacity: 1; pointer-events: auto; }
.intro-fade.panic { background: radial-gradient(ellipse at center, #1a0604 0%, #050404 70%); }
.intro-gone { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; color: var(--paper); opacity: 0; transition: opacity .8s ease-out .3s; pointer-events: none; }
.intro-gone.show { opacity: 1; }
.intro-gone .big { font-size: 64px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; text-shadow: 0 4px 18px #000; }
.intro-gone .sub { font-family: var(--type); font-size: 18px; color: var(--paper-2); margin-top: 6px; }
.intro-gone .wait { font-family: var(--hand); font-size: 30px; color: var(--orange-2); margin-top: 18px; }
/* 60 s : les messages s'affichent en bas, pour ne jamais masquer le compte à rebours ni la fiche radio */
#app[data-phase=intro] #toast-layer { justify-content: flex-end; padding: 0 0 150px; }
