/* ============================================================
   NÉGOCIATEUR — Cellule de crise
   Néo-noir + cellule de crise tactique. Mobile-first portrait.
   ============================================================ */

:root {
  --bg: #07090d;
  --bg2: #0b0f16;
  --panel: #10151e;
  --panel2: #151b26;
  --ink: #d8d3c3;
  --dim: #8b8676;
  --amber: #ffb454;
  --amber-dim: #a97a3a;
  --green: #4fbf67;
  --red: #e23b3b;
  --blue: #3b7de2;
  --paper: #e8e0cd;
  --paper-ink: #2b2419;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; overscroll-behavior: none; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  touch-action: manipulation;
  user-select: none;
}
button, input { font: inherit; }

/* ---------- effets globaux ---------- */
#grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .05;
  background-image: repeating-conic-gradient(#000 0 .0001%, #fff .0002% .0003%);
  background-size: 170px 170px;
  mix-blend-mode: overlay;
}
#gyro {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  box-shadow:
    inset 0 0 60px rgba(226, 59, 59, calc(.10 + var(--threat, .3) * .25)),
    inset 0 0 120px rgba(59, 125, 226, calc(.06 + var(--threat, .3) * .2));
  animation: gyropulse 3s ease-in-out infinite alternate;
}
@keyframes gyropulse {
  from { filter: hue-rotate(0deg) brightness(1); }
  to   { filter: hue-rotate(-12deg) brightness(1.35); }
}
#flash {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: rgba(226, 30, 30, 0); transition: background .08s;
}
#flash.on { background: rgba(226, 30, 30, .38); }
body.shake { animation: shake .45s linear; }
@keyframes shake {
  0%,100% { transform: translate(0,0); }
  15% { transform: translate(-6px,2px); } 30% { transform: translate(5px,-3px); }
  45% { transform: translate(-4px,1px); } 60% { transform: translate(4px,2px); }
  75% { transform: translate(-2px,-1px); } 90% { transform: translate(2px,1px); }
}
@media (prefers-reduced-motion: reduce) {
  #grain { display: none; }
  #gyro { animation: none; }
  body.shake { animation: none; }
}

/* ---------- structure ---------- */
#app { position: relative; z-index: 2; height: var(--app-h, 100dvh); }
.col { max-width: 520px; margin: 0 auto; width: 100%; }
.screen {
  display: none; height: var(--app-h, 100dvh); overflow-y: auto;
  padding: calc(12px + var(--safe-t)) 14px calc(14px + var(--safe-b));
}
.screen.active { display: flex; flex-direction: column; }
body.in-game { overflow: hidden; }
.hidden { display: none !important; }
.muted { color: var(--dim); font-weight: normal; }

/* ---------- accueil ---------- */
#scr-home {
  position: relative; overflow: hidden;
  /* voile sombre en haut pour le titre, léger voile global pour l'ambiance */
  background:
    linear-gradient(180deg, rgba(11,15,22,.88) 0%, rgba(11,15,22,.55) 14%, rgba(11,15,22,.10) 30%, rgba(11,15,22,0) 45%),
    linear-gradient(0deg, rgba(11,15,22,.45) 0%, rgba(11,15,22,0) 18%),
    url('../assets/accueil.jpg') center 32% / cover no-repeat #0b0f16;
}
.home-inner {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: calc(env(safe-area-inset-top, 0px) + 6vh) 18px 0;
}
.home-top { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.home-spacer { flex: 1; }
.home-actions {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 100%; max-width: 340px;
  background: rgba(9, 12, 19, .78);
  border: 1px solid #2a3342; border-radius: 12px;
  padding: 14px 16px 10px;
}
/* laisse visible la console de crise au bas de l'illustration */
.home-clear { height: 24%; flex-shrink: 0; }
.home-actions .btn-big { width: 100%; }
.home-badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  color: var(--amber); border: 1px solid var(--amber-dim);
  padding: 6px 12px; border-radius: 3px;
  background: rgba(9, 12, 19, .55);
}
.home-title {
  font-family: var(--mono); font-size: clamp(38px, 11vw, 56px); margin: 8px 0 0;
  letter-spacing: .08em; color: var(--amber);
  text-shadow: 0 0 24px rgba(255, 180, 84, .35), 0 2px 10px rgba(0,0,0,.9);
}
.home-sub { color: #d8d2c0; margin: 0; font-style: italic; text-shadow: 0 1px 6px rgba(0,0,0,.9); }
.home-note { font-size: 11px; color: #8a857a; margin: 0; }
.home-ver { font-family: var(--mono); font-size: 10px; color: #6a6558; margin: -2px 0 0; letter-spacing: .1em; }
/* écrans plus larges que hauts (paysage / tablette) : boutons en bas,
   l'image est recadrée de toute façon */
@media (orientation: landscape) {
  .home-clear { height: 4vh; }
  .home-inner { padding-top: 4vh; }
}
@media (max-height: 560px) {
  .home-clear { height: 2vh; }
  .home-top { gap: 8px; }
}

/* ---------- boutons ---------- */
.btn {
  min-height: 44px; padding: 10px 18px; border-radius: 6px;
  border: 1px solid #2a3342; background: var(--panel2); color: var(--ink);
  cursor: pointer; letter-spacing: .03em;
}
.btn:active { transform: translateY(1px); filter: brightness(1.2); }
.btn-primary {
  background: linear-gradient(180deg, #7a5320, #5a3d16);
  border-color: var(--amber-dim); color: #ffe6bf; font-weight: 600;
}
.btn-big { font-size: 17px; padding: 14px 30px; }
.btn-small { min-height: 44px; font-size: 13px; padding: 8px 12px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.icon-btn {
  min-width: 44px; min-height: 44px; border-radius: 8px; font-size: 20px;
  border: 1px solid #2a3342; background: var(--panel2); color: var(--ink);
}
.row-btns { display: flex; gap: 10px; justify-content: space-between; margin-top: 16px; }
.row-btns.wrap { flex-wrap: wrap; justify-content: flex-start; }

/* ---------- écrans panneau ---------- */
.panel-inner { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.screen-title { font-family: var(--mono); color: var(--amber); font-size: 20px; margin: 4px 0; letter-spacing: .06em; }
.section-title { font-family: var(--mono); color: var(--dim); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 14px 0 4px; }

/* ---------- papier / dossier ---------- */
.paper {
  background: linear-gradient(160deg, var(--paper), #d9cfb6);
  color: var(--paper-ink); font-family: var(--serif);
  border-radius: 2px; padding: 18px 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,.5);
  position: relative;
}
.paper::before {
  content: 'CONFIDENTIEL';
  position: absolute; top: 10px; right: 10px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  color: #a33; border: 1.5px solid #a33; border-radius: 3px;
  padding: 2px 6px; transform: rotate(6deg); opacity: .75;
}
.paper-label { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: #7a6a4a; margin: 0 0 10px; }
.paper-hint { font-size: 12px; color: #6d604a; font-style: italic; }
.field { display: flex; flex-direction: column; gap: 6px; font-family: var(--serif); }
.field span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: #6d604a; }
.field input {
  min-height: 44px; font-size: 17px; padding: 8px 10px;
  background: #f4eedd; border: none; border-bottom: 2px solid #8a7a56;
  color: var(--paper-ink); border-radius: 2px;
}
.field input:focus { outline: 2px solid var(--amber-dim); }

/* ---------- QG ---------- */
.hq-head { display: flex; justify-content: space-between; align-items: flex-start; }
.hq-agent { color: var(--dim); font-size: 13px; }
.hud-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  font-family: var(--mono); font-size: 11px;
}
.hud-strip .stat {
  background: var(--panel); border: 1px solid #222b38; border-radius: 6px;
  padding: 8px 6px; text-align: center;
}
.hud-strip .stat b { display: block; font-size: 16px; color: var(--amber); }
.stress-warning {
  border: 1px solid var(--red); color: #ffb3b3; background: rgba(226,59,59,.12);
  border-radius: 6px; padding: 10px 12px; font-size: 13px;
}
.missions { display: flex; flex-direction: column; gap: 8px; }
.mission-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid #222b38; border-radius: 8px;
  padding: 12px; min-height: 44px; cursor: pointer; text-align: left; color: var(--ink);
  width: 100%;
}
.mission-card.locked { opacity: .45; cursor: default; }
.mission-card .m-num {
  font-family: var(--mono); font-size: 22px; color: var(--amber); width: 34px;
  text-align: center; flex-shrink: 0;
}
.mission-card .m-body { flex: 1; }
.mission-card .m-title { font-weight: 600; }
.mission-card .m-sub { font-size: 12px; color: var(--dim); }
.mission-card .m-meta { font-size: 11px; font-family: var(--mono); color: var(--amber-dim); margin-top: 2px; }
.skills { display: flex; flex-direction: column; gap: 6px; }
.skillpoints { color: var(--amber); }
.skill-card {
  display: flex; gap: 10px; align-items: center;
  background: var(--panel); border: 1px solid #222b38; border-radius: 8px;
  padding: 10px 12px; font-size: 13px;
}
.skill-card.owned { border-color: var(--amber-dim); background: rgba(255,180,84,.06); }
.skill-card .s-name { font-weight: 600; min-width: 130px; }
.skill-card .s-desc { color: var(--dim); font-size: 12px; flex: 1; }
.skill-card .btn { margin-left: auto; }

.settings-row {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 1px solid #222b38; border-radius: 8px;
  padding: 10px 14px; min-height: 44px;
}
.setting { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.setting input[type=range] { width: 110px; accent-color: var(--amber); height: 24px; }
.setting input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--amber); }

/* ---------- options ---------- */
.options { display: flex; flex-direction: column; gap: 6px; }
.opt {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--panel); border: 1px solid #222b38; border-radius: 8px;
  padding: 10px 12px; cursor: pointer; min-height: 44px;
}
.opt.on { border-color: var(--amber-dim); }
.opt .o-box {
  width: 22px; height: 22px; border: 1px solid var(--amber-dim); border-radius: 4px;
  flex-shrink: 0; margin-top: 2px; text-align: center; line-height: 20px;
  font-family: var(--mono); color: var(--amber);
}
.opt .o-name { font-weight: 600; }
.opt .o-mult { font-family: var(--mono); color: var(--amber); font-size: 12px; }
.opt .o-desc { color: var(--dim); font-size: 12px; }

/* ---------- HUD de partie ---------- */
#scr-game { display: none; }
#scr-game.active {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  height: var(--app-h, 100dvh); max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg);
}
@media (min-width: 600px) { #scr-game.active { max-width: 560px; } }
.counters { flex-shrink: 0; }
#game-hud {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px;
  font-family: var(--mono); font-size: 10px; flex-shrink: 0;
}
.hud-cell {
  background: var(--panel); border: 1px solid #222b38; border-radius: 6px;
  padding: 5px 4px; text-align: center; min-height: 44px;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.hud-cell .h-label { color: var(--dim); letter-spacing: .08em; }
.hud-cell .h-val { font-size: 14px; color: var(--amber); }
.hud-cell .h-nowrap { white-space: nowrap; font-size: 12.5px; letter-spacing: -.02em; }
.threat-pips { display: flex; gap: 2px; justify-content: center; }
.threat-pips .pip { width: 7px; height: 10px; border-radius: 1px; background: #222b38; }
.threat-pips .pip.on1 { background: var(--green); }
.threat-pips .pip.on2 { background: var(--amber); }
.threat-pips .pip.on3 { background: var(--red); }
.pressure-bar { height: 6px; background: #222b38; border-radius: 3px; overflow: hidden; }
.pressure-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--red)); }

#phase-banner {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--amber); text-align: center; padding: 6px 0 2px;
  text-transform: uppercase; flex-shrink: 0;
}
#phase-banner .chrono { color: var(--red); font-size: 14px; }

/* ---------- transcription ---------- */
.transcript {
  flex: 1; overflow-y: auto; padding: 8px 4px; min-height: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.tl { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.45; animation: tlin .25s ease-out; }
@keyframes tlin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.tl .who {
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  flex-shrink: 0; width: 58px; padding-top: 3px; text-align: right;
}
.tl-player .who { color: var(--blue); }
.tl-taker .who { color: var(--red); }
.tl-sys .who { color: var(--dim); }
.tl-radio .who { color: var(--amber); }
.tl-terror .who { color: #c77; }
.tl-death .who { color: var(--red); }
.tl-dice .who { color: var(--green); }
.tl-clue .who { color: var(--amber); }
.tl-psy .who { color: #4fc9bd; }
.tl-epilogue .who { color: var(--amber); }
.tl .txt { flex: 1; }
.tl-player .txt { color: #bcd0ea; font-style: italic; }
.tl-taker .txt { color: #f0c8c8; }
.tl-sys .txt { color: var(--dim); font-family: var(--mono); font-size: 12px; }
.tl-radio .txt { color: var(--amber); font-size: 12.5px; }
.tl-terror .txt { color: #d8a0a0; }
.tl-death .txt { color: #ff9b9b; font-weight: 600; }
.tl-dice .txt { color: var(--green); font-family: var(--mono); font-size: 12px; }
.tl-clue .txt { color: var(--amber); }
.tl-psy .txt { color: #8fd8cf; font-size: 12.5px; }
.tl-epilogue .txt { color: var(--ink); font-family: var(--serif); font-style: italic; }

/* ---------- zone de dés ---------- */
.dice-zone {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  min-height: 44px; flex-shrink: 0; padding: 2px 0;
}
.die {
  width: 40px; height: 40px; border-radius: 7px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 19px; font-weight: 700;
  background: #1a2230; border: 1px solid #33405a; color: var(--ink);
}
.die.rolling { animation: roll .5s linear infinite; }
@keyframes roll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }
.die.win { background: #17351f; border-color: var(--green); color: #9fe8b0; box-shadow: 0 0 10px rgba(79,191,103,.4); }
.die.lose { opacity: .55; }
.dice-result { font-family: var(--mono); font-size: 12px; color: var(--green); }

/* ---------- main de cartes ---------- */
.hand {
  display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px;
  flex-shrink: 0; scrollbar-width: none;
}
.hand::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 118px; min-height: 118px; border-radius: 8px; padding: 8px;
  background: linear-gradient(165deg, #1a2230, #121826);
  border: 1px solid #2c3a52; display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; color: var(--ink); text-align: left;
}
.card:active { transform: scale(.97); }
.card .c-name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.card .c-meta { font-family: var(--mono); font-size: 10px; color: var(--amber); }
.card .c-tag { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.card .c-cost { margin-top: auto; font-family: var(--mono); font-size: 11px; color: var(--blue); }
.card.single { border-style: dashed; }
.card.disabled { opacity: .38; }
.card.used { opacity: .3; }

/* ---------- onglets / panneau ---------- */
#game-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr) 1.4fr 40px; gap: 4px;
  padding: 4px 0 0; flex-shrink: 0;
}
#game-tabs button {
  min-height: 44px; border-radius: 6px; font-size: 11.5px;
  border: 1px solid #222b38; background: var(--panel); color: var(--dim);
  font-family: var(--mono); letter-spacing: .04em;
}
#game-tabs button.on { color: var(--amber); border-color: var(--amber-dim); }
#game-tabs .btn-endphase {
  background: linear-gradient(180deg, #7a5320, #5a3d16);
  border-color: var(--amber-dim); color: #ffe6bf; font-weight: 700;
}
.tab-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 520px; margin: 0 auto; max-height: 62dvh;
  background: var(--bg2); border-top: 1px solid var(--amber-dim);
  border-radius: 12px 12px 0 0; overflow-y: auto;
  padding: 14px 14px calc(18px + var(--safe-b));
  box-shadow: 0 -8px 40px rgba(0,0,0,.7);
}
.tab-panel h4 { font-family: var(--mono); color: var(--amber); margin: 4px 0 10px; letter-spacing: .1em; font-size: 13px; }
.shop-card, .team-card, .clue-card, .demand-card {
  background: var(--panel); border: 1px solid #222b38; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px;
}
.shop-card .row, .team-card .row, .demand-card .row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.shop-card .c-name, .team-card .t-name, .demand-card .d-label { font-weight: 600; font-size: 14px; }
.shop-card .c-desc, .team-card .t-desc { font-size: 12px; color: var(--dim); }
.price { font-family: var(--mono); color: var(--amber); font-size: 12px; }
.clue-card { background: linear-gradient(160deg, #e8e0cd, #d9cfb6); color: var(--paper-ink); font-family: var(--serif); }
.clue-card .cl-name { font-weight: 700; }
.clue-card .cl-desc { font-size: 12.5px; }
.clue-card.hidden-clue { background: var(--panel); color: var(--dim); font-family: inherit; }
.demand-card .d-status { font-family: var(--mono); font-size: 11px; }
.demand-card .d-status.pending { color: var(--red); }
.demand-card .d-status.conceded { color: var(--amber); }
.demand-card .d-status.neutralized { color: var(--green); }
.demand-card .d-detail { font-size: 12px; color: var(--dim); }
.panel-close { width: 100%; margin-top: 6px; }

/* ---------- tuto ---------- */
.tuto-overlay {
  position: fixed; inset: 0; z-index: 55; background: rgba(4,6,10,.55);
  pointer-events: none;
}
.tuto-overlay .tuto-box { pointer-events: auto; }
.tuto-box {
  position: absolute; left: 16px; right: 16px; bottom: calc(90px + var(--safe-b));
  max-width: 480px; margin: 0 auto;
  background: var(--paper); color: var(--paper-ink); border-radius: 6px;
  padding: 14px; font-family: var(--serif); font-size: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.8);
}
.tuto-spot { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; position: relative; z-index: 56; }

/* ---------- modale carte ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(4,6,10,.75);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal .m-card {
  width: 100%; max-width: 480px; background: var(--bg2);
  border: 1px solid var(--amber-dim); border-radius: 12px 12px 0 0;
  padding: 18px 16px calc(20px + var(--safe-b));
  display: flex; flex-direction: column; gap: 10px;
}
.m-card .m-name { font-size: 18px; font-weight: 700; }
.m-card .m-meta { font-family: var(--mono); font-size: 12px; color: var(--amber); }
.m-card .m-desc { color: var(--dim); font-size: 13px; }
.m-card .m-effects { font-size: 12px; font-family: var(--mono); color: var(--green); }
.m-card .m-cond { font-size: 12px; color: var(--red); }
.m-card .targets { display: flex; flex-wrap: wrap; gap: 6px; }
.target-btn { border: 1px solid var(--amber-dim); border-radius: 6px; padding: 8px 12px; background: var(--panel2); color: var(--ink); min-height: 44px; }
.reroll-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }

/* ---------- briefing / débriefing ---------- */
.briefing p { margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.briefing p:first-child { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: #7a6a4a; }
.debrief h3 { font-family: var(--mono); color: #7a6a4a; letter-spacing: .12em; font-size: 12px; }
.debrief .d-outcome { font-size: 20px; font-weight: 700; margin: 8px 0; }
.debrief .d-outcome.win { color: #2f7a3a; }
.debrief .d-outcome.lose { color: #a33; }
.debrief .d-grade {
  font-family: var(--mono); font-size: 40px; color: #a33; border: 3px solid #a33;
  display: inline-block; padding: 4px 18px; border-radius: 6px; transform: rotate(-6deg);
  margin: 10px 0;
}
.debrief table { width: 100%; font-size: 13px; border-collapse: collapse; }
.debrief td { padding: 3px 0; border-bottom: 1px dotted #b8ab8c; }
.debrief td:last-child { text-align: right; font-family: var(--mono); }
.debrief .d-promo {
  margin-top: 10px; padding: 8px 10px; border: 2px solid #8a6a2a;
  color: #8a5c00; font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  border-radius: 4px; transform: rotate(-1deg);
}
.debrief .d-epi { font-style: italic; font-size: 13.5px; margin-top: 12px; line-height: 1.5; }
.debrief .d-stamp {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: #7a6a4a;
  margin-top: 14px; text-align: center;
}

@media (min-width: 600px) {
  .col { max-width: 560px; }
  body { font-size: 16px; }
}

/* ---------- compteurs de scénario ---------- */
.counters {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px;
  border-bottom: 1px solid var(--panel2);
}
.counter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  border: 1px solid #4a4436; border-radius: 3px; padding: 3px 8px;
  color: #cfc3a0; background: rgba(0,0,0,.35);
}
.counter-chip .cc-icon { font-size: 12px; }
.counter-chip .cc-val { color: var(--amber); font-weight: 700; }
.counter-chip.hot { border-color: #a33; color: #e8b0a0; animation: pulse 1.6s infinite; }
.counter-chip.hot .cc-val { color: #ff7043; }

/* ---------- indicateur d'acte ---------- */
#phase-banner .act-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--amber); border: 1px solid #6a5a30; padding: 2px 6px;
  border-radius: 3px; margin-right: 4px;
}
.tl-act {
  display: block; border-top: 1px solid #6a5a30; border-bottom: 1px solid #6a5a30;
  padding: 6px 4px; margin: 8px 0;
}
.tl-act .who {
  display: block; font-family: var(--mono); letter-spacing: .2em; text-align: center;
  color: var(--amber); font-size: 13px; font-weight: 700;
}
.tl-act .txt { display: block; text-align: center; font-style: italic; color: #cfc3a0; }

/* ---------- modale DÉCISION ---------- */
.choice-modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 6, 10, .82); padding: 16px;
}
.choice-modal.hidden { display: none; }
.ch-card {
  width: 100%; max-width: 400px; max-height: 86vh; overflow-y: auto;
  background: linear-gradient(178deg, #efe6cf, #e4d7b8);
  color: #2b2418; border-radius: 4px; padding: 18px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  font-family: Georgia, 'Times New Roman', serif;
}
.ch-title {
  font-family: var(--mono); font-size: 13px; letter-spacing: .34em;
  color: #8a2020; text-align: center; border-bottom: 2px solid #8a2020;
  padding-bottom: 8px; margin-bottom: 12px; font-weight: 700;
}
.ch-prompt { font-size: 14.5px; line-height: 1.55; font-style: italic; margin-bottom: 14px; }
.ch-opts { display: flex; flex-direction: column; gap: 10px; }
.ch-opt {
  text-align: left; padding: 12px 14px; border: 2px solid #6a5a30;
  border-radius: 4px; background: #f4ecd9; cursor: pointer;
  font-family: inherit; min-height: 56px;
}
.ch-opt:active { background: #e8dcc0; transform: scale(.99); }
.ch-opt .co-label { font-weight: 700; font-size: 14px; color: #4a1f1f; margin-bottom: 4px; }
.ch-opt .co-desc { font-size: 12.5px; color: #5a4c34; line-height: 1.45; }

/* question du preneur : dialogue (portrait + bulle + chips de ton) */
.ch-dialog { background: linear-gradient(178deg, #1a2028, #141a22); color: #d8d2c0; }
.ch-dialog .ch-title { color: #5fb8b0; border-bottom-color: #5fb8b0; }
.ch-speaker { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ch-speaker .ch-portrait { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 3px; }
.ch-speaker .ch-title { text-align: left; border-bottom: none; padding-bottom: 0; margin-bottom: 2px; }
.ch-name { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: #8a929e; text-transform: uppercase; }
.ch-bubble {
  position: relative; font-size: 14.5px; font-style: italic; line-height: 1.55;
  background: #232c38; border: 1px solid #3a4656; border-radius: 8px;
  padding: 12px 14px; margin: 0 0 14px 20px; color: #e8e2d0;
}
.ch-bubble::before {
  content: ''; position: absolute; left: -9px; top: 18px;
  border: 5px solid transparent; border-right-color: #3a4656;
}
.ch-reply { background: #212a36; border-color: #46566c; }
.ch-reply:active { background: #2b3646; transform: scale(.99); }
.ch-reply .co-label { color: #d8e4f0; font-weight: 600; }
.co-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.co-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  padding: 2px 7px; border-radius: 3px; border: 1px solid;
}
.co-tag.tag-empathie { color: #7fc98f; border-color: #4a7a54; }
.co-tag.tag-autorite { color: #d8a94a; border-color: #8a6c30; }
.co-tag.tag-pression { color: #d86a5a; border-color: #8a4438; }
.co-tag.tag-ruse { color: #9a8fd8; border-color: #5c5490; }
.co-tag.tag-default { color: #8a929e; border-color: #4a525e; }
.co-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: #5fd08a; border: 1px solid #2f7a4a; padding: 2px 7px; border-radius: 3px;
}

/* ---------- missions avancées ---------- */
.mission-card.adv { border-left: 3px solid #8a5c00; }
.mission-card.adv .m-title { color: #d8a94a; }
.adv-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: #8a5c00;
  border: 1px solid #8a5c00; padding: 5px 8px; margin-bottom: 12px;
  display: inline-block; border-radius: 3px;
}

/* ---------- bilan humain ---------- */
.d-bilan {
  margin: 12px 0; padding: 10px 12px; border: 1px solid #a89878;
  background: rgba(255,255,255,.25); border-radius: 3px;
}
.d-bilan h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  color: #7a2a2a; margin: 0 0 8px; border-bottom: 1px solid #a89878; padding-bottom: 5px;
}
.d-bilan-grid { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; font-size: 13px; }
.d-bilan-grid .bl { color: #4a3f2c; }
.d-bilan-grid b { font-family: var(--mono); }
.bl-act { font-family: var(--mono); font-size: 11px; color: #6a5a30; margin-top: 8px; letter-spacing: .08em; }
.d-deaths { margin-top: 8px; border-top: 1px dotted #a89878; padding-top: 6px; }
.d-deaths .dd { font-size: 12.5px; color: #6a1f1f; padding: 1.5px 0; }

/* ---------- cartes : effets visibles ---------- */
.card {
  flex: 0 0 130px; min-height: 166px; gap: 3px;
}
.card .c-metarow { display: flex; justify-content: space-between; align-items: baseline; }
.card .c-cost { margin-top: 0; font-family: var(--mono); font-size: 10px; color: var(--blue); }
.card .c-eff {
  flex: 1; font-family: var(--mono); font-size: 10.5px; line-height: 1.35;
  color: var(--green); border-top: 1px solid #22304a; padding-top: 3px;
  display: flex; flex-direction: column; gap: 1px; overflow: hidden;
}
.card .c-effline { display: flex; gap: 4px; }
.card .c-tier { color: #7fd695; font-weight: 700; min-width: 16px; }
.card .c-odds, .shop-card .c-odds { color: var(--dim); font-family: var(--mono); font-size: .85em; min-width: 26px; }
.card .c-risk {
  margin-top: 2px; font-size: 9.5px; line-height: 1.25; font-weight: 600;
  color: #ff8080;
}
.m-risk { margin: 8px 0; color: #ff8080; font-weight: 600; font-size: 13px; }
.btn-danger { background: #8c2f2f !important; border-color: #ff6b6b !important; color: #fff !important; }
.card .c-tagrow { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.card .c-block { font-family: var(--mono); font-size: 9px; color: var(--amber); text-align: right; line-height: 1.2; }
.card.disabled .c-block { color: var(--red); }
.card.used .c-block { color: var(--dim); }
.shop-card .c-eff { font-family: var(--mono); font-size: 11px; color: var(--green); display: flex; flex-direction: column; gap: 1px; }
.shop-card .c-effline { display: flex; gap: 5px; }
.shop-card .c-tier { color: #7fd695; font-weight: 700; min-width: 18px; }

/* ---------- bandeau scène / caméra ---------- */
#scene-bar {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  height: 110px; margin: 2px 0 4px; padding: 6px 10px;
  background: #0a0d13; border: 1px solid #1f2937; border-radius: 8px;
  position: relative; overflow: hidden; cursor: pointer;
}
#scene-bar::after {  /* scanlines */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.22) 2px 3px);
}
.sb-bg {  /* scène pixel-art en plein cadre, recadrée (cover) */
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; image-rendering: pixelated;
}
.sb-veil { /* dégradé sombre sous le médaillon et l'identité */
  position: absolute; top: 0; bottom: 0; left: 0; width: 64%; z-index: 1;
  background: linear-gradient(90deg, rgba(4,7,10,.92) 0%, rgba(4,7,10,.55) 60%, transparent 100%);
  pointer-events: none;
}
.sb-med {
  position: relative; z-index: 2;
  flex: 0 0 76px; height: 76px; border-radius: 50%;
  border: 2px solid var(--amber-dim); overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #1c2836, #0b0f16);
  display: grid; place-items: center;
}
.sb-med canvas { width: 68px; height: 68px; image-rendering: pixelated; }
.sb-id { position: relative; z-index: 2; flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.sb-name { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ink); line-height: 1.25; text-shadow: 0 1px 3px #000, 0 0 6px rgba(0,0,0,.8); }
.sb-mood { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-shadow: 0 1px 3px #000, 0 0 6px rgba(0,0,0,.8); }
.sb-mood.m-calme { color: var(--green); }
.sb-mood.m-tendu { color: var(--amber); }
.sb-mood.m-furieux { color: var(--red); }
.sb-mood.m-abattu { color: var(--e, #7a92b8); }
.sb-hud {
  position: absolute; top: 4px; right: 8px; z-index: 3; display: flex; gap: 8px;
  font-family: var(--mono); font-size: 9px; color: #ff8a8a; letter-spacing: .1em;
  text-shadow: 0 0 4px rgba(0,0,0,.9);
}
.sb-rec { animation: recblink 1.2s steps(2) infinite; }
@keyframes recblink { 50% { opacity: .2; } }
.sb-cam {
  position: absolute; bottom: 4px; right: 8px; z-index: 3;
  font-family: var(--mono); font-size: 9px; color: #9ab; letter-spacing: .12em;
  text-shadow: 0 0 4px rgba(0,0,0,.9);
}
#scene-bar.collapsed { height: 44px; }
#scene-bar.collapsed .sb-med { flex-basis: 32px; height: 32px; border-width: 1px; }
#scene-bar.collapsed .sb-med canvas { width: 28px; height: 28px; }
@media (max-height: 700px) {
  #scene-bar { height: 72px; }
  .sb-med { flex-basis: 52px; height: 52px; }
  .sb-med canvas { width: 46px; height: 46px; }
  .sb-name { font-size: 9px; }
}
@media (max-height: 620px) {
  .card { flex: 0 0 118px; min-height: 140px; }
  .card .c-eff { font-size: 10px; line-height: 1.3; }
  .dice-zone { min-height: 34px; }
  .die { width: 32px; height: 32px; font-size: 16px; border-radius: 6px; }
}
@media (max-height: 540px) {
  #scene-bar { display: none; }
  #game-hud { font-size: 9px; gap: 4px; }
  .hud-cell { min-height: 34px; padding: 3px 2px; gap: 1px; }
  .hud-cell .h-val { font-size: 12px; }
  .hud-cell .h-nowrap { font-size: 11px; }
  #phase-banner { font-size: 10px; padding: 3px 0 0; }
}

/* ---------- transcript avatars ---------- */
.tl-av { width: 16px; height: 16px; image-rendering: pixelated; border-radius: 3px; flex-shrink: 0; margin-top: 2px; }

/* ---------- vignettes d'événements ---------- */
.vig-overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center;
  background: rgba(3,4,7,.82);
}
.vig-box { text-align: center; animation: vigin .18s ease-out; }
@keyframes vigin { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.vig-box canvas {
  width: min(84vw, 420px); image-rendering: pixelated;
  border: 1px solid #2c3a52; border-radius: 6px;
  box-shadow: 0 14px 60px rgba(0,0,0,.8);
}
.vig-title { font-family: var(--mono); letter-spacing: .24em; color: var(--ink); margin-top: 12px; font-size: 14px; }
.vig-hint { font-size: 11px; color: var(--dim); margin-top: 6px; }
.d-vig {
  width: 100%; max-height: 150px; object-fit: cover; image-rendering: pixelated;
  border-radius: 3px; margin-bottom: 8px;
  filter: sepia(.35) brightness(.92);
}

/* ---------- tuto : position dynamique + lien étape ---------- */
.tuto-box { transition: top .2s, bottom .2s; }
.tuto-skiplink {
  background: none; border: none; color: #6a5a30; font-family: var(--mono);
  font-size: 11px; letter-spacing: .04em; padding: 8px 4px; min-height: 44px;
  text-decoration: underline; cursor: pointer;
}

/* ---------- modale règles ---------- */
.rules-modal {
  position: fixed; inset: 0; z-index: 75; background: rgba(4,6,10,.78);
  display: flex; align-items: flex-end; justify-content: center;
}
.rules-card {
  width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto;
  background: var(--bg2); border: 1px solid var(--amber-dim);
  border-radius: 12px 12px 0 0; padding: 14px 14px calc(20px + var(--safe-b));
}
.rules-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rules-title { font-family: var(--mono); color: var(--amber); letter-spacing: .18em; font-size: 14px; }
.rule-sec { border: 1px solid #222b38; border-radius: 8px; margin-bottom: 6px; background: var(--panel); }
.rule-sec summary {
  list-style: none; cursor: pointer; padding: 12px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; color: var(--ink);
}
.rule-sec summary::before { content: '▸ '; color: var(--amber-dim); }
.rule-sec[open] summary::before { content: '▾ '; }
.rule-sec summary::after { content: ''; }
.rule-body { padding: 0 12px 12px; font-size: 12.5px; color: #b8b2a0; line-height: 1.5; }
.rule-body p { margin: 0 0 7px; }
.rule-body b { color: var(--ink); }
.rule-body code { font-family: var(--mono); color: var(--amber); font-size: 11.5px; }

/* ---------- info contextuel ⓘ ---------- */
.info-dot {
  background: none; border: none; color: var(--amber-dim); font-size: 13px;
  padding: 0 4px; margin-left: 4px; cursor: pointer; min-height: 20px; line-height: 1;
}
.info-dot:active { color: var(--amber); }

/* ---------- galerie debug ---------- */
#scr-gallery .gal-row { display: flex; gap: 10px; flex-wrap: nowrap; }
#scr-gallery .gal-row.wrap { flex-wrap: wrap; }
#scr-gallery .gal-cell { text-align: center; }
#scr-gallery .gal-cell canvas { image-rendering: pixelated; border: 1px solid #2c3a52; border-radius: 4px; background: #0b0f16; }
#scr-gallery .gal-lbl { font-family: var(--mono); font-size: 9px; color: var(--dim); margin-top: 3px; }
#scr-gallery h3 { font-family: var(--mono); color: var(--amber); font-size: 13px; letter-spacing: .16em; margin: 18px 0 8px; }
#scr-gallery h4 { font-family: var(--mono); color: var(--dim); font-size: 11px; margin: 12px 0 6px; }
#scr-gallery .gal-scene { width: 100%; image-rendering: pixelated; border: 1px solid #2c3a52; }

/* ---------- barre d'onglets + bouton ? ---------- */
#game-tabs { grid-template-columns: repeat(4, 1fr) 1.4fr 44px; }

@media (prefers-reduced-motion: reduce) {
  .vig-box { animation: none; }
  .sb-rec { animation: none; }
  .tuto-box { transition: none; }
}

/* ---------- teinte de menace (bords seulement) ---------- */
#threat-tint {
  position: fixed; inset: 0; z-index: 30; pointer-events: none; display: none;
}
body[data-tt="3"] #threat-tint {
  display: block;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(255,180,84,.11) 100%);
}
body[data-tt="4"] #threat-tint {
  display: block;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(255,180,84,.20) 100%);
}
body[data-tt="5"] #threat-tint {
  display: block;
  background: radial-gradient(ellipse at center, transparent 46%, rgba(226,59,59,.32) 100%);
  animation: ttpulse 2.4s ease-in-out infinite;
}
body[data-tt="6"] #threat-tint {
  display: block;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(226,59,59,.44) 100%);
  animation: ttpulse 1.5s ease-in-out infinite;
}
body[data-tt="7"] #threat-tint {
  display: block;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(226,59,59,.55) 100%);
  animation: ttpulse .95s ease-in-out infinite;
}
@keyframes ttpulse { 50% { opacity: .45; } }
/* légère désaturation de l'écran de jeu au point de rupture */
body[data-tt="7"] #game-hud, body[data-tt="7"] #counters, body[data-tt="7"] #phase-banner,
body[data-tt="7"] #scene-bar, body[data-tt="7"] #transcript, body[data-tt="7"] #dice-zone,
body[data-tt="7"] #hand, body[data-tt="7"] #game-tabs {
  filter: saturate(.78);
}
/* flash rouge de bord à la montée de menace */
#threat-tint.tt-flash { display: block; animation: ttflash .45s ease-out; }
@keyframes ttflash {
  0% { box-shadow: inset 0 0 60px 18px rgba(226,59,59,.65); }
  100% { box-shadow: inset 0 0 60px 18px rgba(226,59,59,0); }
}
@media (prefers-reduced-motion: reduce) {
  #threat-tint { animation: none !important; }
}

/* ---------- cinématiques plein écran ---------- */
.cut-overlay {
  position: fixed; inset: 0; z-index: 73; background: #030409;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 6vh;
}
.cut-overlay.hidden { display: none; }
.cut-stage {
  position: relative; width: 100%; display: flex; justify-content: center;
}
#cut-canvas {
  width: 100%; max-width: 560px; image-rendering: pixelated;
  max-height: calc(var(--app-h, 100dvh) * 0.62); object-fit: contain;
  background: #000;
}
.cut-scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
}
.cut-dialog {
  width: min(92%, 460px); margin-top: 14px; position: relative;
  background: #0b0f16;
  border: 2px solid var(--amber-dim); box-shadow: 0 0 0 2px #0b0f16, 0 0 0 4px var(--amber-dim);
  border-radius: 4px;
  padding: 12px 14px; min-height: 72px;
}
#cut-text {
  font-family: var(--mono); font-size: 15px; line-height: 1.55; color: var(--ink);
  white-space: pre-wrap;
}
.cut-next {
  position: absolute; right: 10px; bottom: 6px; color: var(--amber);
  font-family: var(--mono); font-size: 12px; animation: cutblink .8s steps(2) infinite;
}
@keyframes cutblink { 50% { opacity: 0; } }
#btn-cut-skip {
  position: absolute; top: calc(10px + var(--safe-t)); right: 10px; z-index: 2;
  opacity: .8;
}
@media (prefers-reduced-motion: reduce) {
  .cut-next { animation: none; }
}

/* ---- otages nommés ---- */
.hud-otages { cursor: pointer; }
.host-list { margin-top: 4px; }
.host-row {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--mono); font-size: 11px; padding: 3px 0;
  border-bottom: 1px dotted #2a3342;
}
.host-icon { width: 16px; flex-shrink: 0; }
.host-name { flex: 1; }
.host-dead .host-name { color: var(--red, #e23b3b); text-decoration: line-through; }
.host-freed .host-name { color: var(--green, #4fbf67); }
.host-badge {
  font-size: 9px; padding: 1px 5px; border-radius: 8px; letter-spacing: .4px;
}
.host-badge.vulnerable { color: #ffe08a; border: 1px solid #ffe08a66; }
.host-badge.heros { color: var(--amber); border: 1px solid var(--amber-dim); }
.host-fate { font-size: 9px; color: var(--dim); }
.d-hostages { margin-top: 8px; }
.d-hostages .dh { font-family: var(--mono); font-size: 11px; padding: 2px 0; }
.d-hostages .host-dead { color: var(--red, #e23b3b); }
.d-hostages .host-freed { color: var(--green, #4fbf67); }

/* ---------- Relations (réputation QG + débrief) ---------- */
.rel-row, .d-react {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px dotted #2a3342;
}
.rel-av { flex-shrink: 0; image-rendering: pixelated; width: 64px; height: 64px; }
.rel-body { flex: 1; min-width: 0; }
.rel-head { display: flex; align-items: baseline; gap: 8px; }
.rel-head b { font-size: 12.5px; color: var(--ink, #e8e0cd); }
.rel-role { font-size: 10px; color: var(--dim); }
.rel-bar { display: flex; gap: 2px; align-items: center; margin: 4px 0; }
.rel-cell { width: 10px; height: 8px; background: #1b2635; border: 1px solid #2c3749; }
.rel-cell.on { background: var(--amber); border-color: var(--amber); }
.rel-val { font-family: var(--mono); font-size: 10px; color: var(--amber); margin-left: 6px; }
.rel-note { font-size: 11.5px; color: var(--dim); font-style: italic; line-height: 1.4; }
.rel-mod { font-family: var(--mono); font-size: 10px; color: var(--amber); margin-top: 4px; }
.rel-delta { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.rel-delta.up { color: var(--green, #4fbf67); }
.rel-delta.down { color: var(--red, #e23b3b); }

/* débrief : RÉACTIONS / DÉROULÉ sur le papier clair */
.d-reactions, .d-deroule {
  margin: 12px 0; padding: 10px 12px; border: 1px solid #a89878;
  background: rgba(255,255,255,.25); border-radius: 3px;
}
.d-reactions h4, .d-deroule h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  color: #7a2a2a; margin: 0 0 8px; border-bottom: 1px solid #a89878; padding-bottom: 5px;
}
.d-react { border-bottom-color: #c8b898; }
.d-react .rel-head b { color: #2a2015; }
.d-react .rel-role { color: #6a5a30; }
.d-react .rel-note { color: #4a3f2c; }
.d-timeline {
  display: block; width: 100%; height: 118px;
  border: 1px solid #2c3749; border-radius: 3px;
  image-rendering: pixelated; background: #0e1520;
}
.d-moments { margin-top: 8px; }
.d-moments .dm {
  font-family: var(--mono); font-size: 10.5px; color: #4a3f2c;
  padding: 1.5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* briefing : encart Contexte (réputation) */
.ctx-box {
  margin: 10px 0; padding: 8px 10px;
  border: 1px solid #a89878; border-left: 3px solid var(--amber);
  background: rgba(138,106,74,.12); border-radius: 3px;
}
.ctx-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  color: #7a2a2a; margin-bottom: 5px;
}
.ctx-line { font-size: 12px; color: #4a3f2c; padding: 2px 0; line-height: 1.4; }

/* ---------- lot 5 : promesse, trophées, journal, export ---------- */
.clue-card.promise-warn { background: linear-gradient(160deg, #efe0b8, #e0cf9f); border-left: 3px solid var(--amber); }
.clue-card.promise-warn .cl-desc { color: #6a3a12; font-weight: 600; }

.d-trophy {
  margin: 8px 0; padding: 7px 10px; font-size: 12.5px; font-weight: 600;
  color: #6a4a10; background: rgba(255,200,90,.18);
  border: 1px solid #a89878; border-left: 3px solid var(--amber); border-radius: 3px;
}

.trophies { display: flex; flex-wrap: wrap; gap: 6px; }
.trophy {
  flex: 1 1 44%; min-width: 150px;
  background: var(--panel); border: 1px solid #222b38; border-radius: 8px;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 2px;
  opacity: .55; filter: grayscale(.7);
}
.trophy.on { opacity: 1; filter: none; border-color: var(--amber-dim); background: rgba(255,180,84,.07); }
.trophy .tr-name { font-size: 12.5px; font-weight: 600; }
.trophy .tr-desc { font-size: 11px; color: var(--dim); font-style: italic; line-height: 1.35; }

.journal-row { border-bottom-style: dashed; }

.io-card textarea.io-text {
  width: 100%; box-sizing: border-box; resize: vertical;
  font-family: var(--mono); font-size: 11px; line-height: 1.4;
  color: var(--ink, #e8e0cd); background: #0e1520;
  border: 1px solid #2c3749; border-radius: 6px; padding: 8px;
  word-break: break-all;
}
.io-err { min-height: 16px; color: var(--red, #e23b3b); font-size: 12px; font-family: var(--mono); }
