/*
 * FICHIER GÉNÉRÉ — ne pas modifier à la main.
 * Assemblage de 27 feuilles de style, dans l'ordre de chargement du jeu.
 * Pour changer un style : modifier css/<fichier>.css puis lancer « npm run css » (dossier TESTS_NON_REGRESSION).
 */

/* ===== css/jeu-base.css ===== */
/*
 * Base du jeu : regroupe les 13 anciennes feuilles qui ne servent qu'au jeu (jamais à l'atelier),
 * dans leur ordre d'origine (l'ordre compte : la dernière règle gagne).
 * Les règles entièrement écrasées par une règle identique plus loin dans la cascade ont été supprimées.
 * Source de css/game.css : après modification, lancer « npm run css » (dossier TESTS_NON_REGRESSION).
 */

/* ===== style (ancienne feuille css/style.css) ===== */
:root {
  font-family: system-ui,Segoe UI,Arial,sans-serif;
  color: #fff1da;
  background: #0e1018;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  background: radial-gradient(ellipse at 55% 5%,#403047 0,#181925 45%,#090c15 100%);
}

button {
  font: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid #ffda8b;
  outline-offset: 2px;
}

.app {
  max-width: 1260px;
  margin: auto;
  padding: 12px;
}

.top {
  min-height: 63px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
}

.logomark {
  font-size: 33px;
  color: #e9ba68;
  text-shadow: 0 0 18px #e5ae7299;
}

.logo strong {
  display: block;
  font: 900 clamp(19px,2.6vw,30px) Georgia,serif;
  letter-spacing: .065em;
  color: #f6d69b;
}

.logo small {
  display: block;
  font-size: 10px;
  letter-spacing: .18em;
  color: #adbbca;
  margin-top: 3px;
}

.hud {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.pill,
.tiny {
  border-radius: 10px;
  padding: 8px 11px;
  background: #202738dd;
  border: 1px solid #71624d;
  color: #f8e7ca;
  font-size: 12px;
  white-space: nowrap;
}

.tiny {
  background: #333340;
}

.tiny:hover {
  background: #65523f;
}

.scene {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #201916;
  border: 2px solid #b8996688;
  border-radius: 14px;
  box-shadow: 0 19px 62px #000a;
  touch-action: none;
}

.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: linear-gradient(130deg,#0a0d19ef,#191a29d5 55%,#17131ae5);
  overflow: auto;
}

.overlay.hidden {
  display: none;
}

.dialog {
  width: min(690px,100%);
  max-height: 100%;
  overflow: auto;
  padding: 22px;
  background: linear-gradient(145deg,#252333f8,#151a2cf8);
  border: 1px solid #bda06fbd;
  border-radius: 18px;
  box-shadow: 0 16px 60px #000c;
  text-align: center;
}

.dialog .eyebrow {
  color: #e7c588;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: bold;
}

.dialog h1,
.dialog h2 {
  color: #f8d998;
  font: 700 clamp(25px,4vw,43px) Georgia,serif;
  line-height: 1.08;
  margin: 8px 0 10px;
}

.dialog h2 {
  font-size: clamp(22px,3vw,32px);
}

.dialog p {
  margin: 9px auto 15px;
  color: #d7deeb;
  line-height: 1.48;
  max-width: 600px;
  font-size: 14px;
}

.dialog .note {
  color: #c4ad84;
  font-size: 12px;
}

.btn {
  border: 1px solid #ffe3ac;
  border-radius: 9px;
  background: linear-gradient(#fce8b4,#c8944f);
  padding: 11px 18px;
  color: #2c211f;
  font-weight: 800;
  box-shadow: 0 3px 0 #805b37;
}

.btn.alt {
  background: #344254;
  color: #faf0da;
  border-color: #8cabc0;
  box-shadow: none;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.buttons,
.choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 15px;
}

.choices {
  flex-direction: column;
}

.choice {
  padding: 12px;
  border: 1px solid #8c8068;
  background: #303a4b;
  border-radius: 9px;
  color: #f4ead7;
  text-align: left;
}

.choice:hover {
  background: #45556a;
}

.choice:disabled {
  opacity: .7;
}

.era-cards {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.era-card {
  overflow: hidden;
  padding: 0;
  color: #f4e8d0;
  text-align: left;
}

.era-card img,
.era-card .medieval-art {
  width: 100%;
  height: 85px;
  object-fit: cover;
  display: block;
}

.medieval-art {
  background: linear-gradient(130deg,#1c2c44,#6a5648 47%,#d7a86b);
  position: relative;
}

.medieval-art:after {
  content: '♜';
  position: absolute;
  right: 25%;
  top: 8px;
  color: #ffe0a1;
  font-size: 58px;
  text-shadow: 0 7px 10px #0008;
}

.era-card .detail {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.era-card .detail b {
  font-size: 14px;
}

.era-card:not(:disabled):hover {
  border-color: #ffe3b0;
}

.toast {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: #111b29e8;
  border: 1px solid #d4b47d;
  padding: 9px 14px;
  border-radius: 10px;
  max-width: 85%;
  text-align: center;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}

.toast.visible {
  opacity: 1;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  touch-action: none;
  margin: 10px 0;
  user-select: none;
  -webkit-user-select: none;
}

.controls button {
  background: #263348;
  border: 1px solid #8c91a2;
  color: #f9e8c6;
  font-weight: 800;
  padding: 13px 18px;
  border-radius: 12px;
  touch-action: none;
  min-height: 52px;
}

.controls button.pressed {
  background: #72654c;
  transform: translateY(2px);
}

.direction,
.actions {
  display: flex;
  gap: 9px;
}

.hint {
  font-size: 12px;
  color: #aebac7;
  text-align: center;
}

.mobile-note {
  display: none;
  font-size: 12px;
  color: #e8cc9b;
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  color: #98a7b8;
  font-size: 11px;
}

footer button {
  border: 0;
  background: none;
  color: #e8cf9a;
  text-decoration: underline;
  padding: 8px;
}

@media (max-width:760px) {
  .app {
    padding: 6px;
  }
  .logo strong {
    font-size: 20px;
  }
  .logo small {
    font-size: 8px;
  }
  .top {
    gap: 5px;
    margin-bottom: 5px;
  }
  .pill,
  .tiny {
    padding: 5px 7px;
    font-size: 10px;
  }
  .hint {
    display: none;
  }
  .controls button {
    min-height: 49px;
    padding: 11px 15px;
  }
  .dialog {
    padding: 12px;
  }
  .dialog p {
    font-size: 12px;
  }
  .era-card img,
  .era-card .medieval-art {
    height: 55px;
  }
  .mobile-note {
    display: block;
  }
  footer {
    font-size: 9px;
  }
}

@media (max-height:450px) {
  .top {
    min-height: 38px;
  }
  .logo strong {
    font-size: 18px;
  }
  .logo small {
    display: none;
  }
  .controls {
    margin: 4px 0;
  }
  .controls button {
    min-height: 39px;
    padding: 6px 13px;
  }
  .dialog {
    padding: 8px;
  }
  .dialog h1 {
    font-size: 24px;
  }
  .dialog p {
    margin: 5px auto;
  }
  .era-card img,
  .era-card .medieval-art {
    height: 42px;
  }
  .scene {
    max-height: calc(100dvh - 104px);
    margin: auto;
  }
  .mobile-note,
  footer {
    display: none;
  }
}

@media (max-width:500px) and (orientation:portrait) {
  .scene {
    aspect-ratio: 4/3;
  }
  .mobile-note {
    display: block;
  }
  .era-cards {
    gap: 5px;
  }
}


/* V0.4.1 — interface plein écran adaptative, bureau et téléphone */
.app:fullscreen,
.app:-webkit-full-screen {
  max-width: none;
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 8px 12px;
  background: #0b101a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app:fullscreen main,
.app:-webkit-full-screen main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.app:fullscreen .top,
.app:-webkit-full-screen .top {
  flex: 0 0 auto;
  margin-bottom: 5px;
  min-height: 43px;
}

.app:fullscreen .scene,
.app:-webkit-full-screen .scene {
  width: min(100%,calc((100dvh - 155px) * 16 / 9));
  max-height: calc(100dvh - 155px);
  aspect-ratio: 16 / 9;
  margin: auto;
  flex-shrink: 1;
  min-height: 0;
}

.app:fullscreen .controls,
.app:-webkit-full-screen .controls {
  width: 100%;
  flex: 0 0 auto;
  margin: 4px 0;
  min-height: 44px;
}

.app:fullscreen .mobile-note,
.app:fullscreen footer,
.app:-webkit-full-screen .mobile-note,
.app:-webkit-full-screen footer {
  display: none;
}

.app:fullscreen .dialog,
.app:-webkit-full-screen .dialog {
  max-height: calc(100dvh - 155px);
}

@media (max-width:850px) and (orientation:landscape) {
  .app:fullscreen,
  .app:-webkit-full-screen {
    padding: 3px 8px;
  }
  .app:fullscreen .top,
  .app:-webkit-full-screen .top {
    min-height: 33px;
  }
  .app:fullscreen .scene,
  .app:-webkit-full-screen .scene {
    width: min(100%,calc((100dvh - 112px) * 16 / 9));
    max-height: calc(100dvh - 112px);
  }
  .app:fullscreen .controls button,
  .app:-webkit-full-screen .controls button {
    min-height: 38px;
    padding: 6px 13px;
  }
  .app:fullscreen .dialog,
  .app:-webkit-full-screen .dialog {
    max-height: calc(100dvh - 112px);
  }
}


/* V0.5 : fenêtres de jeu, détails et petits écrans */
#inventory,
#save {
  background: #4a3f39;
  border-color: #b99562;
}

.scene:focus-within {
  outline: 1px solid #d7b578;
}

.dialog .story {
  font-family: Georgia,serif;
  font-size: 17px;
  color: #f1d9a8;
  line-height: 1.55;
}

.dialog .quote {
  border-left: 3px solid #dfb66a;
  text-align: left;
  padding: 9px 14px;
  background: #ffffff0d;
  color: #f1e2c9;
  font-style: italic;
  margin: 12px 0;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(145px,1fr));
  gap: 10px;
  margin: 15px 0;
}

.item {
  border: 1px solid #89765b;
  background: #26303c;
  padding: 12px;
  border-radius: 9px;
  text-align: left;
  color: #eedfc5;
}

.item b {
  display: block;
  font-size: 14px;
}

.item span {
  display: block;
  font-size: 12px;
  color: #b7c7d4;
  margin-top: 5px;
}

.dialog .status {
  color: #efd7a0;
  font-size: 13px;
}

.app:fullscreen .dialog {
  max-width: 780px;
}

@media (max-width:700px) {
  .top .hud {
    gap: 4px;
  }
  .top .hud .pill {
    padding: 4px;
  }
  .top .tiny {
    padding: 5px;
  }
  .dialog .story {
    font-size: 14px;
  }
}


/* V0.6 — énigme intégrée au décor et accessibilité mobile */
.puzzle-help {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 9;
  transform: translateX(-50%);
  width: min(92%,620px);
  padding: 10px 14px;
  border: 1px solid #e6c589;
  border-radius: 12px;
  background: #111a28f7;
  color: #ffe7b7;
  text-align: center;
  font-size: 13px;
  box-shadow: 0 7px 30px #0008;
}

.puzzle-help button {
  margin-left: 9px;
  padding: 6px 9px;
  background: #3b4a59;
  border: 1px solid #dab87e;
  border-radius: 8px;
  color: #fff2d7;
}

.puzzle-help[hidden] {
  display: none;
}

.scene.puzzle-mode {
  cursor: pointer;
}

.scene.puzzle-mode canvas {
  touch-action: manipulation;
}

@media (max-width:680px) {
  .puzzle-help {
    font-size: 11px;
    bottom: 5px;
    padding: 7px;
  }
  .puzzle-help button {
    padding: 5px;
    margin-left: 3px;
  }
}


/* V0.7 : commandes et interface de l'énigme murale, sans popup. */
#v07-hint {
  z-index: 9;
  max-width: 96%;
  background: linear-gradient(120deg,#30251ded,#131b26f2);
  border: 1px solid #d5b27d;
  box-shadow: 0 8px 30px #080b1099;
}

#v07-hint button {
  font: inherit;
  border: 1px solid #dbc18f;
  color: #fbe4b5;
  background: #473322;
  border-radius: 7px;
  padding: 5px 9px;
  margin-left: 8px;
  cursor: pointer;
}

@media (max-width:650px) {
  #v07-hint {
    font-size: 11px;
    line-height: 1.45;
  }
  #v07-hint button {
    margin-left: 3px;
  }
}


/* V0.8 — cinématiques accessibles souris, clavier et tactile */
.cinematic[hidden] {
  display: none !important;
}

.cinematic {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.cinematic::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 33% 42%,#efb9632b,transparent 52%);
  pointer-events: none;
}

.cin-bars {
  height: 7%;
  position: absolute;
  left: 0;
  right: 0;
  background: #07080c;
  z-index: 3;
}

.top-bar {
  top: 0;
}

.bottom-bar {
  bottom: 0;
}

.cin-portrait {
  position: absolute;
  left: 6%;
  bottom: 4%;
  width: 35%;
  height: 86%;
  max-width: 360px;
  background-repeat: no-repeat;
}

.cin-panel {
  position: relative;
  margin: 0 5% 8% auto;
  max-width: 56%;
  width: 55%;
  padding: clamp(14px,3vw,30px);
  border: 1px solid #d5b37f8a;
  border-radius: 12px;
  background: linear-gradient(125deg,#171a28f3,#262234ed);
  box-shadow: 0 16px 45px #0009;
  z-index: 2;
  animation: panel-in .38s ease both;
}

.cin-kicker {
  font-size: clamp(9px,1.2vw,13px);
  letter-spacing: .15em;
  color: #e5bf79;
  font-weight: 800;
}

.cin-panel h2 {
  font-family: Georgia,serif;
  color: #f5dfb3;
  font-size: clamp(17px,3vw,33px);
  margin: 8px 0;
}

.cin-panel p {
  font-size: clamp(12px,1.7vw,18px);
  line-height: 1.45;
  color: #f7e9d5;
  min-height: 2.7em;
  margin: 7px 0 16px;
}

.cin-panel .btn {
  min-height: 38px;
  padding: 8px 15px;
  background: #c4a06c;
  color: #13131a;
  border: 0;
  border-radius: 9px;
  font-weight: 800;
}

.cin-counter {
  float: right;
  color: #ccbfae;
  font-size: 12px;
  padding-top: 13px;
}

@keyframes portrait-in {
  from {
    transform: translateX(-35px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes panel-in {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width:650px) {
  .cin-portrait {
    left: 0;
    width: 43%;
    height: 75%;
  }
  .cin-panel {
    max-width: 69%;
    width: 67%;
    margin: 0 2% 7% auto;
    padding: 11px;
  }
  .cin-panel p {
    font-size: 11px;
    margin: 5px 0 8px;
  }
  .cin-panel h2 {
    font-size: 16px;
    margin: 5px 0;
  }
  .cin-panel .btn {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
  }
}


/* V0.9 : Navigation, carnet archéologique, lisibilité */
#questmap,
#codex {
  background: #384c50;
  border-color: #bda779;
}

.objective {
  position: absolute;
  z-index: 4;
  left: 16px;
  bottom: 72px;
  max-width: min(52%,470px);
  background: linear-gradient(90deg,#101722f2,#222b36df);
  color: #fff0c9;
  border-left: 3px solid #f2c481;
  box-shadow: 0 8px 26px #0008;
  backdrop-filter: blur(4px);
  padding: 9px 13px;
  font-size: 12px;
  pointer-events: none;
  border-radius: 8px;
  line-height: 1.35;
}

.cq-map {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
  margin: 18px 0 10px;
  align-items: stretch;
}

.cq-room {
  position: relative;
  min-height: 155px;
  padding: 15px 8px 12px;
  text-align: center;
  background: linear-gradient(165deg,#4b3d2c,#202a35 65%,#15202c);
  color: #f8e1b8;
  border: 1px solid #96754e;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.cq-room:disabled {
  opacity: .48;
  filter: grayscale(.8);
  cursor: not-allowed;
}

.cq-room.current {
  outline: 2px solid #ffd894;
  box-shadow: 0 0 23px #bd995744;
}

.cq-room span.symbol {
  font-size: 37px;
  color: #e8c182;
  text-shadow: 0 4px 14px #f0c27a55;
}

.cq-room strong {
  font-family: Georgia,serif;
  font-size: 17px;
}

.cq-room small {
  font-size: 11px;
  color: #d5cbb9;
}

.cq-room:not(:disabled):hover {
  background: linear-gradient(165deg,#685135,#33495a);
}

.cq-map-note {
  color: #d8bf98 !important;
  font-size: 12px !important;
}

.cq-journal {
  text-align: left;
  display: grid;
  gap: 10px;
  max-height: min(360px,45vh);
  overflow: auto;
  margin: 14px 0;
}

.cq-entry {
  border: 1px solid #88724e;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(125deg,#263242,#1b202c);
}

.cq-entry b {
  display: block;
  color: #f4d79d;
  font-family: Georgia,serif;
  font-size: 16px;
  margin-bottom: 5px;
}

.cq-entry p {
  margin: 0 !important;
  color: #dde0e4 !important;
  font-size: 13px !important;
}

.cq-notfound {
  color: #b6c2ce;
  font-size: 12px;
}

.cq-progress {
  font-size: 13px;
  color: #e6c98e;
  margin: 5px;
}

@media (max-width:760px) {
  .objective {
    max-width: 70%;
  }
  .cq-map {
    gap: 5px;
  }
  .cq-room {
    min-height: 102px;
    padding: 7px 4px;
  }
  .cq-room strong {
    font-size: 11px;
  }
  .cq-room span.symbol {
    font-size: 23px;
  }
  .cq-room small {
    font-size: 9px;
  }
}

@media (max-height:450px) {
  .objective {
    bottom: 5px;
    max-width: 55%;
    font-size: 10px;
    padding: 4px 6px;
  }
  .cq-room {
    min-height: 82px;
  }
  .cq-journal {
    max-height: 180px;
  }
}


/* V1.0 beta 3 — progression et actions visibles. */
.interaction-status {
  position: absolute;
  z-index: 8;
  right: 16px;
  top: 16px;
  left: auto;
  bottom: auto;
  transform: none;
  max-width: min(42%,430px);
  width: auto;
  text-align: left;
  pointer-events: none;
  background: rgba(12,18,28,.94);
  border: 1px solid #e3bb73;
  border-radius: 11px;
  padding: 8px 12px;
  color: #ffe4ab;
  font: 600 clamp(10px,1.15vw,13px)/1.4 system-ui,sans-serif;
  box-shadow: 0 8px 24px #0008;
  white-space: normal;
  backdrop-filter: blur(4px);
}

.scene.ui-busy .objective,
.scene.ui-busy .interaction-status,
.scene.ui-busy .toast {
  opacity: 0;
  visibility: hidden;
}

.scene.ui-busy .interaction-status,
.scene.ui-busy .objective,
.scene.ui-busy .toast {
  transition: opacity .15s ease,visibility .15s ease;
}

@media (max-width:760px) {
  .objective {
    bottom: 60px;
    max-width: min(64%,360px);
    padding: 7px 10px;
    font-size: 11px;
  }
  .interaction-status {
    right: 8px;
    top: 8px;
    max-width: 58%;
    padding: 6px 8px;
    font-size: 10px;
  }
}

@media (max-width:650px) {
  .interaction-status {
    right: 6px;
    top: 6px;
    max-width: 64%;
    padding: 5px 8px;
    font-size: 10px;
  }
  .objective {
    bottom: 58px;
    left: 8px;
    max-width: 62%;
    padding: 5px 8px;
    font-size: 10px;
  }
}


/* Chrono Quest bêta 7 — Carnet de l'explorateur / Néfertiti */
.dialog:has(.cq-codex) {
  width: min(910px,100%);
  padding: clamp(12px,2vw,20px);
  text-align: left;
  background: linear-gradient(145deg,#201d2dfb,#101b29fb);
}

.cq-codex {
  color: #ecdfcb;
}

.cq-hero {
  display: grid;
  grid-template-columns: 126px minmax(0,1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.cq-nefertiti {
  width: 126px;
  height: 155px;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  border: 2px solid #caa365;
  box-shadow: 0 9px 22px #0009;
}

.cq-codex h2 {
  font-size: clamp(21px,2.8vw,30px);
  margin: 5px 0 8px;
}

.dialog .cq-nefertiti-note {
  margin: 0 0 8px;
  color: #d6c4a4;
  font-size: 11px;
  font-style: italic;
  max-width: none;
}

.dialog .cq-optional {
  max-width: none;
  color: #ffdfa0;
  font-weight: 650;
}

.dialog .cq-how {
  margin: 0;
  color: #dce4ed;
  max-width: none;
  font-size: 12px;
  line-height: 1.35;
}

.cq-codex-content {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(220px,.85fr);
  gap: 12px;
  align-items: start;
}

.cq-journal-updated {
  max-height: none;
  margin: 0;
  gap: 7px;
}

.cq-journal-updated .cq-entry {
  padding: 9px 11px;
  background: #1d2935e8;
  border-color: #846b46;
}

.cq-journal-updated .cq-entry b {
  font-size: 14px;
  margin-bottom: 3px;
}

.cq-journal-updated .cq-entry p {
  font-size: 11px !important;
  line-height: 1.35;
}

.cq-entry-found {
  border-color: #83bca3 !important;
}

.cq-location-guide h3 {
  font: 700 17px Georgia,serif;
  margin: 0 0 10px;
  color: #f8d69c;
}

.cq-location-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.cq-location-node {
  display: grid;
  grid-template-columns: 31px minmax(0,1fr);
  column-gap: 8px;
  background: #1c2733;
  border: 1px solid #655d4e;
  border-radius: 7px;
  align-items: center;
  text-align: left;
}

.cq-room-number {
  grid-row: span 2;
  font: 700 14px Georgia,serif;
}

.cq-location-node b {
  font: 700 12px Georgia,serif;
  color: #ffe0aa;
}

.cq-location-node small {
  font-size: 10px;
  color: #d3c8b8;
}

.cq-location-node.found {
  border-color: #76b59b;
}

@media (max-width:780px) {
  .cq-hero {
    grid-template-columns: 72px minmax(0,1fr);
    gap: 10px;
    margin-bottom: 8px;
  }
  .cq-nefertiti {
    width: 72px;
    height: 93px;
  }
  .cq-codex h2 {
    font-size: 20px;
    margin: 3px 0;
  }
  .dialog .cq-nefertiti-note {
    font-size: 10px;
  }
  .dialog .cq-how {
    font-size: 10px;
  }
  .dialog .cq-optional {
    font-size: 11px;
    padding: 4px 7px;
  }
  .cq-codex-content {
    grid-template-columns: 1fr;
  }
  .cq-journal-updated {
    max-height: none;
  }
  .cq-codex-actions {
    margin-top: 8px !important;
  }
}

@media (max-height:480px) {
  .dialog:has(.cq-codex) {
    padding: 8px 12px;
  }
  .cq-hero {
    grid-template-columns: 55px minmax(0,1fr);
    gap: 8px;
  }
  .cq-nefertiti {
    width: 55px;
    height: 73px;
  }
  .cq-codex h2 {
    font-size: 17px;
  }
  .cq-location-track {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .cq-location-node {
    grid-template-columns: 1fr;
    text-align: center;
    place-items: center;
    gap: 2px;
    padding: 4px;
  }
  .cq-room-number {
    grid-row: auto;
  }
  .cq-codex-actions .btn {
    min-height: 33px;
    padding: 6px 10px;
    font-size: 12px;
  }
}


/* Beta 8 — guides historiques et carnet enrichi */
.guide-card {
  display: grid;
  grid-template-columns: 120px minmax(0,1fr);
  gap: 14px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #8d7247;
  border-radius: 16px;
}

.guide-card.compact {
  grid-template-columns: 82px minmax(0,1fr);
  padding: 8px 10px;
}

.guide-portrait {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #d2ac67;
  box-shadow: 0 8px 20px #0007;
  animation: guideFloat 3.2s ease-in-out infinite;
}

.guide-card.compact .guide-portrait {
  height: 98px;
}

.guide-copy h3 {
  margin: 2px 0 8px;
  font: 700 26px Georgia,serif;
  color: #f8d998;
}

.guide-card.compact .guide-copy h3 {
  font-size: 22px;
}

.guide-voice {
  margin: 0 !important;
  max-width: none !important;
  color: #e7dcc7 !important;
  font-style: italic;
}

@keyframes guideFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.dialog:has(.cq-codex-epic) {
  width: min(1220px,100%);
  padding: 18px;
  background: linear-gradient(145deg,#221d2cf5,#121b28f7);
}

.cq-codex-epic {
  color: #f1e4d0;
}

.cq-codex-grid {
  display: grid;
  grid-template-columns: 280px minmax(0,1.2fr) 320px;
  gap: 18px;
  align-items: start;
}

.cq-guide-panel,
.cq-side-panel,
.cq-main-panel {
  background: linear-gradient(180deg,#1b2330f0,#111a26f0);
  border: 1px solid #8f7445;
  border-radius: 18px;
  box-shadow: 0 10px 26px #0006;
}

.cq-guide-panel {
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.cq-guide-panel::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 90px;
  background: linear-gradient(180deg,#0000,#af6e1318);
}

.cq-guide-figure {
  width: 100%;
  border-radius: 16px;
  border: 2px solid #d2ac67;
  box-shadow: 0 12px 28px #0007;
}

.cq-guide-scroll {
  position: relative;
  margin-top: 12px;
  padding: 16px;
  background: linear-gradient(180deg,#ecd6a8,#d7bb89);
  color: #22150d;
  border-radius: 18px;
  border: 1px solid #a37a3d;
  box-shadow: inset 0 0 0 1px #f9e6bf;
}

.cq-guide-scroll h3 {
  margin: 0 0 10px;
  font: 700 20px Georgia,serif;
}

.cq-guide-scroll p {
  margin: 0 0 8px;
  max-width: none;
  color: #2f2218;
  font-size: 13px;
  line-height: 1.45;
}

.cq-guide-note {
  font-style: italic;
  color: #483529 !important;
}

.cq-main-panel {
  padding: 18px;
}

.cq-main-panel h2 {
  font-size: clamp(30px,3.2vw,52px);
  margin: 8px 0 10px;
}

.dialog .cq-theme,
.dialog .cq-lead {
  max-width: none;
  margin: 0 0 10px;
}

.dialog .cq-theme {
  color: #f4e2b4;
  font-size: 17px;
  font-family: Georgia,serif;
}

.dialog .cq-lead {
  color: #dfe7f0;
  font-size: 15px;
  line-height: 1.45;
}

.dialog .cq-optional {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #dfbc7a;
  background: linear-gradient(180deg,#2d2216,#171e2c);
  margin: 10px 0 12px;
  font-size: 15px;
}

.dialog .cq-optional strong {
  font-size: 22px;
  color: #ffe9b8;
  font-family: Georgia,serif;
}

.cq-journal-epic {
  max-height: none;
  gap: 12px;
}

.cq-journal-epic .cq-entry {
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg,#11283a,#1a2230);
  border: 1px solid #896f44;
}

.cq-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 4px;
}

.cq-entry-head span {
  font-size: 12px;
  color: #e6d9c2;
  background: #ffffff12;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #7a6a52;
}

.cq-side-panel {
  padding: 14px;
}

.cq-side-panel h3 {
  margin: 0 0 12px;
  font: 700 18px Georgia,serif;
  color: #ffdca6;
  text-align: center;
}

.cq-mini-map {
  position: relative;
  height: 245px;
  margin-bottom: 14px;
  border-radius: 18px;
  border: 1px solid #a78653;
  background: radial-gradient(circle at 50% 30%,#b08b4f66,#2b241f 60%,#191e27 100%);
  overflow: hidden;
}

.cq-mini-room {
  position: absolute;
  border: 3px solid #d0ae6d;
  background: #332719;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px #f0d7a455;
}

.cq-mini-map .a {
  left: 26px;
  bottom: 34px;
  width: 96px;
  height: 78px;
}

.cq-mini-map .b {
  left: 112px;
  top: 26px;
  width: 100px;
  height: 82px;
}

.cq-mini-map .c {
  right: 28px;
  bottom: 44px;
  width: 102px;
  height: 84px;
}

.cq-mini-path {
  position: absolute;
  background: #d4b06d;
  border-radius: 999px;
  opacity: .9;
}

.cq-mini-path.one {
  left: 105px;
  top: 108px;
  width: 44px;
  height: 10px;
  transform: rotate(-28deg);
}

.cq-mini-path.two {
  left: 200px;
  top: 125px;
  width: 68px;
  height: 10px;
  transform: rotate(35deg);
}

.cq-mini-entry {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: #f0cf87;
  color: #302217;
  font-weight: 700;
  font-size: 13px;
}

.cq-mini-map.renaissance .a,
.cq-mini-map.renaissance .b,
.cq-mini-map.renaissance .c {
  border-style: dashed;
}

.cq-mini-map.medieval .a,
.cq-mini-map.medieval .b,
.cq-mini-map.medieval .c {
  background: #1f2733;
}

.cq-location-guide {
  border: 1px solid #967d54;
  background: linear-gradient(#2d241e,#162232);
  border-radius: 14px;
  padding: 12px;
}

.cq-location-guide h4 {
  margin: 0 0 10px;
  font: 700 16px Georgia,serif;
  color: #f8d69c;
}

.cq-location-node {
  grid-template-columns: 34px minmax(0,1fr);
  padding: 8px 9px;
}

.cq-room-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #d8b570;
  color: #23170f;
  font-weight: 800;
}

.cq-codex-actions {
  margin-top: 16px !important;
}

.cq-codex-actions .btn:first-child {
  font-size: 17px;
  padding: 14px 24px;
}

@media (max-width:1020px) {
  .cq-codex-grid {
    grid-template-columns: 1fr;
  }
  .cq-guide-panel {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    align-items: start;
  }
  .cq-guide-figure {
    max-height: 180px;
  }
  .cq-main-panel h2 {
    font-size: 34px;
  }
}

@media (max-width:760px) {
  .guide-card {
    grid-template-columns: 72px 1fr;
  }
  .guide-portrait {
    height: 96px;
  }
  .guide-copy h3 {
    font-size: 20px;
  }
  .dialog:has(.cq-codex-epic) {
    padding: 10px;
  }
  .cq-guide-panel {
    grid-template-columns: 1fr;
  }
  .cq-guide-figure {
    max-height: 220px;
  }
  .cq-main-panel {
    padding: 12px;
  }
  .dialog .cq-theme {
    font-size: 14px;
  }
  .dialog .cq-lead {
    font-size: 12px;
  }
  .dialog .cq-optional {
    font-size: 12px;
    padding: 8px 10px;
  }
  .dialog .cq-optional strong {
    font-size: 18px;
  }
  .cq-side-panel {
    padding: 10px;
  }
}


/* Bêta 9 — cinematic intros, spoken guides and history QCM */
.cinematic {
  background: linear-gradient(90deg,#080d17e8,#0d101a6a 52%,#080d17ed),url('../assets/renaissance.webp') center/cover no-repeat;
}

.cinematic[data-era="0"] {
  background: radial-gradient(circle at 20% 40%,#785f4080,#0c1422e0),linear-gradient(110deg,#1f3047,#5b423a 54%,#101725);
}

.cinematic[data-era="1"] {
  background: linear-gradient(90deg,#070a10eb,#10141a85,#0c1018e8),url('../assets/egypte.webp') center/cover no-repeat;
}

.cinematic[data-era="2"] {
  background: linear-gradient(90deg,#070a10e9,#10141a85,#0c1018e8),url('../assets/renaissance.webp') center/cover no-repeat;
}

.cinematic .cin-portrait {
  background-position: center center;
  background-size: contain;
  border: 2px solid #d4ae79;
  border-radius: 18px;
  box-shadow: 0 0 45px #000b,inset 0 0 20px #0006;
  bottom: 12%;
  height: 72%;
  width: 31%;
  max-width: 320px;
  animation: portraitFloat 4s ease-in-out infinite;
}

.cinematic .cin-panel {
  width: min(57%,630px);
  margin: 0 5% 8% auto;
  max-width: none;
  padding: clamp(14px,2.5vw,28px);
  background: linear-gradient(130deg,#131924f6,#241d29f5);
}

.cinematic.cin-swap .cin-panel {
  animation: panel-in .5s ease both;
}

.cinematic .cin-panel h2 {
  color: #f9db99;
  font-size: clamp(19px,2.8vw,34px);
}

.cq9-cinema-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.cq9-cinema-actions .btn {
  font-size: 13px;
  min-height: 41px;
}

.cq9-voice-status {
  margin-top: 8px;
  color: #f4d5a7;
  font-size: 11px;
}

@keyframes portraitFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.cq9-quiz {
  max-width: 640px;
  margin: auto;
  color: #f5e6c6;
}

.cq9-quiz h2 {
  font-size: clamp(24px,3.1vw,36px);
  margin: 8px 0 16px;
}

.dialog .cq9-question {
  font-family: Georgia,serif;
  font-weight: 600;
  font-size: clamp(18px,2.4vw,25px);
  color: #ffdfa6;
  line-height: 1.4;
  max-width: none;
}

.cq9-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin: 16px 0;
}

.cq9-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid #998268;
  border-radius: 12px;
  background: #273545;
  color: #fff0d5;
  text-align: left;
  font-size: 15px;
}

.cq9-choice strong {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  background: #ba9862;
  border-radius: 7px;
  color: #241910;
}

.cq9-choice.correct {
  border-color: #93e5b8;
  background: #1f513d;
}

.cq9-choice.wrong {
  border-color: #ef9d9d;
  background: #4b2831;
}

.cq9-choice:disabled {
  opacity: .75;
}

.dialog .cq9-feedback {
  min-height: 46px;
  font-size: 13px;
  max-width: none;
  color: #e4d1b2;
}

@media (max-width:780px) {
  .cinematic .cin-portrait {
    left: 3%;
    width: 28%;
    bottom: 12%;
    height: 62%;
  }
  .cinematic .cin-panel {
    width: 67%;
    margin: 0 2% 8% auto;
    padding: 12px;
  }
  .cq9-cinema-actions .btn {
    font-size: 11px;
    padding: 8px 9px;
    min-height: 36px;
  }
  .cq9-voice-status {
    font-size: 10px;
  }
  .cq9-choice {
    padding: 9px 11px;
    font-size: 12px;
  }
}

@media (max-height:470px) {
  .cinematic .cin-portrait {
    height: 68%;
    bottom: 9%;
    width: 23%;
  }
  .cinematic .cin-panel {
    width: 74%;
    margin: 0 2% 5% auto;
    padding: 9px;
  }
  .cinematic .cin-panel p {
    font-size: 11px;
    margin: 4px 0 8px;
  }
  .cinematic .cin-panel h2 {
    font-size: 17px;
  }
  .cq9-cinema-actions {
    margin-top: 5px;
  }
  .cq9-cinema-actions .btn {
    min-height: 29px;
    padding: 5px 7px;
  }
  .cinematic .cin-bars {
    height: 4%;
  }
}


/* BÊTA 10 · Personnages illustrés à fond transparent, carnets et cinématiques */
.guide-card {
  background: radial-gradient(ellipse at 15% 35%,#8c6e463b,transparent 52%),linear-gradient(125deg,#212638,#18212f);
  overflow: hidden;
}

.guide-card .guide-portrait {
  object-fit: contain;
  object-position: center bottom;
  background: radial-gradient(ellipse at 50% 68%,#bd8d5340,transparent 70%);
  border: 0;
  box-shadow: none;
}

.cq-guide-figure {
  object-fit: contain;
  object-position: center bottom;
  background: radial-gradient(ellipse at 50% 55%,#caa36535,transparent 65%),#161e2b;
  max-height: 340px;
}

.cq-guide-panel {
  background: radial-gradient(ellipse at 50% 35%,#b8975840,transparent 75%),#182230;
}

.cin-portrait {
  background-size: contain;
  background-position: center bottom;
  filter: drop-shadow(0 12px 28px #000a);
  animation: portrait-in .65s ease both,guide-breathe 3.6s ease-in-out infinite alternate;
}

@keyframes guide-breathe {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-5px) scale(1.008);
  }
}

@media (max-width:800px) {
  .cq-guide-figure {
    max-height: 190px;
  }
  .guide-card .guide-portrait {
    height: 115px;
  }
  .cin-portrait {
    height: 74%;
  }
}


/* Bêta 16 — Palmarès */
.cq16-table {
  width: 100%;
  overflow-y: auto;
  background: #121a24b8;
}

.cq16-tr {
  grid-template-columns: 48px minmax(0,1fr) 110px;
}

.cq16-tr:last-child {
  border-bottom: 0;
}

.cq16-tr strong {
  font-variant-numeric: tabular-nums;
}

.cq16-filter select,
#cq16-pseudo {
  font: inherit;
  max-width: 100%;
}

#cq16-register {
  display: grid;
  gap: 12px;
}

#cq16-register label {
  font-weight: bold;
}

@media (max-width:700px) {
  .cq16-tr {
    grid-template-columns: 38px minmax(0,1fr) 78px;
  }
}


/* ===== mobile-v6 (ancienne feuille css/mobile-v6.css) ===== */
/* Chrono Quest V1.0 Bêta 6 — desktop, mobile, tablette, plein écran */
:root {
  --cq-gold: #edca8c;
}

[hidden] {
  display: none !important;
}

.seal-ui {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: clamp(8px,2vw,18px);
  background: rgba(5,9,18,.97);
  font-family: system-ui,Arial,sans-serif;
  color: #f9e9ca;
  isolation: isolate;
  touch-action: manipulation;
  overscroll-behavior: contain;
}

.seal-card {
  width: min(850px,100%);
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  border: 2px solid #d1aa70;
  border-radius: 18px;
  background: linear-gradient(145deg,#352b2a,#161e2c 62%,#121d29);
  padding: clamp(10px,2.2vw,22px);
  box-shadow: 0 18px 65px #000b;
}

.seal-head {
  text-align: center;
}

.seal-eyebrow {
  font-size: 10px;
  letter-spacing: .14em;
  color: #d8c39d;
  font-weight: 700;
}

.seal-head h2 {
  font: 700 clamp(19px,3.5vw,34px)/1.1 Georgia,serif;
  color: #f6d99e;
  margin: 6px 0;
}

.seal-head p {
  font-size: clamp(10px,1.35vw,14px);
  line-height: 1.35;
  color: #d9dfeb;
  margin: 4px auto 10px;
  max-width: 690px;
}

.seal-section-label {
  display: block;
  text-align: center;
  letter-spacing: .1em;
  color: #f6dfaf;
  font-size: clamp(10px,1.15vw,13px);
  font-weight: 800;
  margin-bottom: 6px;
}

.seal-target {
  border: 1px solid #bd9b6a;
  border-radius: 12px;
  background: #131c2bbb;
  padding: 9px;
  margin: 7px 0;
}

.seal-targets,
.seal-discs {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  justify-items: center;
  gap: 12px;
}

.seal-target-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--ring-color);
}

.seal-target-item strong {
  display: grid;
  place-items: center;
  width: clamp(37px,6vw,58px);
  height: clamp(37px,6vw,58px);
  font: 700 clamp(25px,3.3vw,38px) Georgia,serif;
  border-radius: 50%;
  background: #25303e;
  border: 2px solid var(--ring-color);
  box-shadow: 0 0 14px color-mix(in srgb,var(--ring-color),transparent 55%);
}

.seal-target-item span {
  font-size: 10px;
  color: #e1d4bc;
}

.seal-board {
  margin-top: 10px;
}

.seal-disc {
  width: min(100%,160px);
  min-height: clamp(90px,15vw,155px);
  background: radial-gradient(circle at 50% 35%,#38485c,#16202f 70%);
  border: 3px solid var(--ring-color);
  border-radius: 18px;
  color: var(--ring-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 0 18px color-mix(in srgb,var(--ring-color),transparent 70%);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .13s,border-color .13s;
}

.seal-disc:active {
  transform: scale(.95);
}

.seal-disc:focus-visible {
  outline: 3px solid white;
  outline-offset: 4px;
}

.seal-disc strong {
  font: 700 clamp(34px,6vw,66px) Georgia,serif;
  line-height: 1;
}

.seal-disc span {
  font-size: clamp(10px,1.25vw,13px);
  color: #ffebc8;
  font-weight: 650;
}

.seal-disc em {
  font-style: normal;
  font-weight: 800;
  font-size: 10px;
  color: #c7c5c3;
}

.seal-disc.matched {
  background: radial-gradient(circle at 50% 35%,#2e5949,#132c2d 77%);
}

.seal-disc.matched em {
  color: #9ef3bd;
}

.seal-result {
  margin: 9px auto 6px;
  text-align: center;
  color: #f2d49d;
  font-size: clamp(11px,1.3vw,14px);
}

.seal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #d2dbe8;
  font-size: clamp(10px,1.1vw,12px);
  margin-top: 8px;
}

.seal-close {
  border: 1px solid #d6bd8d;
  border-radius: 9px;
  background: #334050;
  color: #fff0d5;
  padding: 8px 14px;
  min-height: 39px;
  white-space: nowrap;
  font-weight: 700;
}

@media (max-width:800px) {
  .app {
    width: 100%;
    max-width: none;
    padding: 7px;
  }
  .top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .logo strong {
    font-size: clamp(18px,4vw,25px);
  }
  .hud {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .hud .pill,
  .hud .tiny {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 7px 9px;
    min-height: 34px;
  }
  .controls {
    gap: 8px;
  }
  .controls .hint {
    display: none;
  }
  .controls button {
    min-width: 51px;
    min-height: 52px;
    font-size: 14px;
  }
  .direction,
  .actions {
    gap: 6px;
  }
  .objective {
    bottom: 62px;
  }
  footer {
    font-size: 10px;
  }
}

@media (max-width:760px) and (orientation:portrait) {
  .scene {
    aspect-ratio: 16/9;
  }
  .seal-ui {
    position: fixed;
    inset: 0;
    z-index: 300;
    padding: 8px;
    align-items: center;
  }
  .seal-card {
    max-height: calc(100dvh - 16px);
  }
  .seal-head p {
    font-size: 12px;
  }
  .seal-target-item strong {
    width: 52px;
    height: 52px;
    font-size: 32px;
  }
  .seal-disc {
    min-height: 110px;
    width: 100%;
  }
  .seal-disc strong {
    font-size: 43px;
  }
  .seal-footer {
    flex-wrap: wrap;
  }
  .controls button {
    min-height: 56px;
  }
}

@media (max-height:480px) and (orientation:landscape) {
  .app {
    padding: 3px 6px;
  }
  .top {
    flex-direction: row;
    align-items: center;
    gap: 5px;
  }
  .logo strong {
    font-size: 16px;
  }
  .logo small {
    display: none;
  }
  .hud {
    flex: 1;
  }
  .hud .pill,
  .hud .tiny {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 10px;
  }
  .scene {
    max-height: calc(100dvh - 100px);
  }
  .seal-ui {
    padding: 4px;
  }
  .seal-card {
    max-height: 100%;
    padding: 8px 13px;
    border-radius: 10px;
  }
  .seal-head h2 {
    font-size: 20px;
    margin: 2px;
  }
  .seal-head p {
    margin: 1px auto 5px;
    font-size: 10px;
  }
  .seal-target {
    padding: 4px;
    margin: 3px 0;
  }
  .seal-target-item {
    gap: 0;
  }
  .seal-target-item strong {
    width: 32px;
    height: 32px;
    font-size: 22px;
  }
  .seal-target-item span {
    font-size: 9px;
  }
  .seal-disc {
    min-height: 76px;
    width: min(100%,138px);
    border-radius: 12px;
    gap: 1px;
  }
  .seal-disc strong {
    font-size: 38px;
  }
  .seal-disc span,
  .seal-disc em {
    font-size: 9px;
  }
  .seal-board {
    margin-top: 4px;
  }
  .seal-section-label {
    margin-bottom: 3px;
    font-size: 10px;
  }
  .seal-result {
    margin: 3px 0;
    font-size: 10px;
  }
  .seal-footer {
    margin-top: 2px;
  }
  .seal-close {
    min-height: 29px;
    padding: 4px 9px;
  }
  .controls button {
    min-height: 40px;
    padding: 6px 12px;
  }
  .controls {
    margin: 3px 0;
  }
  .mobile-note,
  footer {
    display: none;
  }
}

.app:fullscreen .seal-ui,
.app:-webkit-full-screen .seal-ui {
  inset: 0;
}


/* Old helper is superseded by the accessible puzzle toolbar. */
.scene:has(.seal-ui:not([hidden])) #puzzle-help {
  display: none !important;
}


/* Always-visible close action, especially on low landscape phones. */
.seal-close {
  position: absolute;
  right: clamp(8px,1.5vw,18px);
  top: clamp(7px,1.5vw,16px);
  z-index: 5;
  box-shadow: 0 3px 10px #0009;
}

.seal-card {
  position: relative;
}

.seal-footer {
  padding-right: 100px;
}

@media (max-width:900px) and (max-height:500px) and (orientation:landscape) {
  .seal-ui {
    position: fixed;
    inset: 0;
    z-index: 300;
    padding: 5px;
  }
  .seal-card {
    width: min(820px,99vw);
    max-height: calc(100dvh - 10px);
  }
  .seal-close {
    right: 12px;
    top: 10px;
    min-height: 31px;
  }
}


/* Bêta 13 — optimisation paysage smartphone : commandes toujours visibles. */
@media (max-height:500px) and (orientation:landscape) {
  html,
  body {
    min-height: 0;
  }
  .app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
    padding: 3px 6px;
    overflow: hidden;
  }
  .app .top {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    flex: 0 0 32px;
    min-height: 32px;
    height: 32px;
    margin-bottom: 3px;
  }
  .app .logo {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .app .logo strong {
    font-size: 15px;
    letter-spacing: .02em;
  }
  .app .logo small {
    display: none;
  }
  .app .logomark {
    font-size: 17px;
  }
  .app .hud {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 0;
    scrollbar-width: none;
  }
  .app .hud::-webkit-scrollbar {
    display: none;
  }
  .app .hud .pill,
  .app .hud .tiny {
    min-height: 25px;
    padding: 3px 6px;
    font-size: 9px;
  }
  .app main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    width: 100%;
  }
  .app .scene {
    width: min(100%,calc((100dvh - 88px)*16/9));
    max-height: calc(100dvh - 88px);
    height: auto;
    aspect-ratio: 16/9;
    flex-shrink: 1;
    margin: 0 auto;
  }
  .app .controls {
    width: 100%;
    height: 44px;
    flex: 0 0 44px;
    margin: 3px 0 0;
    align-items: center;
  }
  .app .controls button {
    min-height: 38px;
    padding: 5px 13px;
    font-size: 13px;
  }
  .app footer,
  .app .mobile-note,
  .app .hint {
    display: none;
  }
}


/* ===== mobile-v15 (ancienne feuille css/mobile-v15.css) ===== */
/* Bêta 15 — mode immersif smartphone, commandes tactiles au-dessus de l'image. */
#mobile-landscape {
  display: none;
}

@media (pointer:coarse) and (max-width:1050px) {
  #mobile-landscape {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .controls button {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
}

@media (pointer:coarse) and (orientation:landscape) and (max-height:600px) {
  html,
  body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  .app,
  .app:fullscreen,
  .app:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    max-width: none !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: block !important;
    background: #070e16 !important;
  }
  .app main,
  .app:fullscreen main,
  .app:-webkit-full-screen main {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
  }
  .app .scene,
  .app:fullscreen .scene,
  .app:-webkit-full-screen .scene {
    position: absolute !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: none !important;
    min-height: 0 !important;
    max-width: none !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    margin: 0 !important;
  }
  .app .scene canvas,
  .app:fullscreen .scene canvas,
  .app:-webkit-full-screen .scene canvas {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: fill;
  }
  .app .top,
  .app:fullscreen .top,
  .app:-webkit-full-screen .top {
    position: absolute !important;
    z-index: 40;
    left: env(safe-area-inset-left,0px);
    right: env(safe-area-inset-right,0px);
    top: 0 !important;
    height: 37px !important;
    min-height: 37px !important;
    margin: 0 !important;
    padding: 2px 7px !important;
    background: linear-gradient(#0a111ddd,#0a111d55) !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }
  .app .logo {
    display: none !important;
  }
  .app .hud {
    display: flex !important;
    flex: 1 !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    min-width: 0 !important;
    gap: 4px !important;
  }
  .app .hud .pill,
  .app .hud .tiny {
    white-space: nowrap !important;
  }
  .app .controls,
  .app:fullscreen .controls,
  .app:-webkit-full-screen .controls {
    position: absolute !important;
    z-index: 41 !important;
    bottom: max(8px,env(safe-area-inset-bottom,0px)) !important;
    left: max(10px,env(safe-area-inset-left,0px)) !important;
    right: max(10px,env(safe-area-inset-right,0px)) !important;
    width: auto !important;
    height: 55px !important;
    min-height: 55px !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: transparent !important;
    pointer-events: none !important;
  }
  .app .controls .direction,
  .app .controls .actions {
    pointer-events: auto !important;
    display: flex !important;
    gap: 9px !important;
  }
  .app .controls button {
    width: auto !important;
    min-width: 57px !important;
    min-height: 53px !important;
    border: 1px solid #e9c687 !important;
    border-radius: 14px !important;
    background: #17283be8 !important;
    color: #fff0c9 !important;
    font-size: 15px !important;
    box-shadow: 0 3px 14px #000a !important;
  }
  .app .controls .hint,
  .app .mobile-note,
  .app footer {
    display: none !important;
  }
  .app .objective {
    bottom: 72px !important;
    left: 10px !important;
    max-width: 46% !important;
  }
  .app .interaction-status {
    top: 45px !important;
    right: 10px !important;
    max-width: 45% !important;
  }
  .app .overlay,
  .app .cinematic,
  .app .seal-ui {
    position: absolute !important;
    inset: 0 !important;
  }
  .app .dialog {
    max-height: calc(100dvh - 20px) !important;
    overflow: auto !important;
  }
  .app .seal-card {
    max-height: calc(100dvh - 10px) !important;
    overflow: auto !important;
  }
}


/* ===== qcm-v15 (ancienne feuille css/qcm-v15.css) ===== */
.cq-difficulty {
  display: inline-flex;
  margin: 5px auto 10px;
  padding: 6px 12px;
  border: 1px solid #d5b47c;
  border-radius: 20px;
  background: #292f3d;
  color: #ffe1a4;
  font: 700 12px system-ui,sans-serif;
  letter-spacing: .025em;
}


/* ===== palmares-v16-1 (ancienne feuille css/palmares-v16-1.css) ===== */
/* Profil et palmarès — Bêta 16.1 */
.cq16-avatars {
  display: grid;
  grid-template-columns: repeat(8,minmax(0,1fr));
  gap: 7px;
  margin: 12px auto;
  max-width: 500px;
}

.cq16-avatar-option {
  position: relative;
  cursor: pointer;
}

.cq16-avatar-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cq16-avatar-option span {
  display: grid;
  place-items: center;
  min-height: 47px;
  font-size: 28px;
  border: 2px solid #75634c;
  border-radius: 12px;
  background: #29344b;
  transition: transform .15s,border-color .15s;
}

.cq16-avatar-option input:checked+span {
  border-color: #ffd887;
  background: #4a3b36;
  transform: scale(1.08);
  box-shadow: 0 0 0 2px #ffcf7c55;
}

.cq16-avatar-option input:focus-visible+span {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.cq16-label {
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}

#cq16-pseudo {
  display: block;
  width: min(420px,100%);
  margin: 8px auto;
  padding: 12px;
  border: 1px solid #bba77e;
  border-radius: 10px;
  background: #f8f1e4;
  color: #25212a;
  font-size: 17px;
}

.cq16-player {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  order: 99;
  max-width: 240px;
  border-color: #d6b36d;
  background: #393046;
  color: #fff0ce;
}

.cq16-player[hidden] {
  display: none !important;
}

.cq16-player-avatar {
  font-size: 23px;
  line-height: 1;
}

.cq16-player-name {
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.cq16-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px auto;
}

.cq16-filter select {
  padding: 8px;
  border-radius: 8px;
  background: #253449;
  color: #fff3db;
  border: 1px solid #bba77e;
}

.cq16-table {
  max-height: 260px;
  overflow: auto;
  margin: 12px auto;
  border: 1px solid #6e6256;
  border-radius: 9px;
}

.cq16-tr {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) 105px;
  gap: 7px;
  align-items: center;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #ffffff1a;
  font-size: 13px;
}

.cq16-tr strong {
  text-align: right;
}

.cq16-th {
  background: #39435a;
  color: #ffe0a6;
  font-weight: 700;
}

.cq16-board-avatar {
  font-size: 19px;
  vertical-align: middle;
}

@media (max-width:700px) {
  .cq16-avatars {
    grid-template-columns: repeat(8,minmax(0,1fr));
    gap: 4px;
  }
  .cq16-avatar-option span {
    min-height: 37px;
    font-size: 22px;
  }
  .cq16-player {
    max-width: 145px;
    padding: 4px 7px !important;
  }
  .cq16-player-name {
    max-width: 90px;
  }
  .cq16-tr {
    grid-template-columns: 36px minmax(0,1fr) 85px;
    padding: 6px;
    font-size: 11px;
  }
}

@media (orientation:landscape) and (max-height:500px) {
  .cq16-avatars {
    grid-template-columns: repeat(8,minmax(0,1fr));
    gap: 4px;
    margin: 5px auto;
  }
  .cq16-avatar-option span {
    min-height: 30px;
    font-size: 19px;
  }
  .cq16-player {
    order: 99;
  }
}

.cq16-avatar-option.cq16-locked {
  opacity: .45;
  cursor: not-allowed;
}

.cq16-avatar-option.cq16-locked span {
  position: relative;
}

.cq16-avatar-option.cq16-locked small {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 11px;
}


/* ===== visual-coherence-v164 (ancienne feuille css/visual-coherence-v164.css) ===== */
/* Bêta 16.4 — cartes d’époque clairement différenciées, cohérentes avec les niveaux */
.dialog:has(.era-cards) {
  width: min(860px,100%);
  border-color: #d8b377;
  background: linear-gradient(145deg,#222232f8,#101725f8);
  box-shadow: 0 20px 70px #05060bd9,inset 0 1px #f6d7a533;
}

.dialog:has(.era-cards) .eyebrow {
  color: #f3c77e;
}

.dialog:has(.era-cards) h1 {
  text-shadow: 0 3px 16px #b76c2838;
}

.era-cards {
  gap: 14px;
  margin: 19px 0 14px;
}

.era-card {
  position: relative;
  border: 2px solid #b68b4e;
  border-radius: 14px;
  background: linear-gradient(180deg,#303448,#191c2c);
  box-shadow: 0 8px 20px #0008,inset 0 1px #fff2;
  transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.era-card img {
  height: clamp(100px,14vw,156px);
  object-fit: cover;
  object-position: center 50%;
  filter: saturate(1.13) contrast(1.05);
}

.era-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(100px,14vw,156px);
  pointer-events: none;
  background: linear-gradient(180deg,transparent 62%,#12182bd1);
}

.era-card::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(100px,14vw,156px);
  pointer-events: none;
  background: url('../assets/chronoquest-emblem-header.png?v=2') 50% 48%/34% auto no-repeat,radial-gradient(circle at 50% 48%,transparent 0 14%,#c7fff7c7 15%,#38eee5a8 18%,#00aeb866 24%,transparent 39%),radial-gradient(circle at 50% 48%,#36fff13d 0 8%,transparent 48%);
  mix-blend-mode: screen;
  transform: scale(.22);
  opacity: 0;
  filter: blur(1px) saturate(1.25) drop-shadow(0 0 8px #31fff0);
  transition: transform .65s cubic-bezier(.2,.8,.2,1),opacity .2s ease,filter .65s ease;
}

.era-card .detail {
  position: relative;
  z-index: 1;
  min-height: 66px;
  padding: 11px 13px;
  color: #e5d5b8;
}

.era-card .detail b {
  font: 700 clamp(13px,1.5vw,17px) Georgia,serif;
  color: #ffe1a2;
}

.era-card[data-start="0"] {
  border-color: #8d9cb7;
}

.era-card[data-start="0"] .detail {
  border-top: 2px solid #a1b6ce;
}

.era-card[data-start="1"] {
  border-color: #d7a84d;
}

.era-card[data-start="1"] .detail {
  border-top: 2px solid #e6b74b;
}

.era-card[data-start="2"] {
  border-color: #b99069;
}

.era-card[data-start="2"] .detail {
  border-top: 2px solid #d7a87a;
}

.era-card:not(:disabled):hover,
.era-card:not(:disabled):focus-visible {
  transform: translateY(-4px) scale(1.015);
  border-color: #ffe1a1;
  box-shadow: 0 10px 28px #0009,0 0 0 1px #f5be55,0 0 18px #27e9df66,0 0 32px #ffce7140;
}

.era-card:not(:disabled):hover::before,
.era-card:not(:disabled):focus-visible::before {
  transform: scale(1.03);
  opacity: 1;
  filter: blur(0) saturate(1.4) drop-shadow(0 0 11px #31fff0);
}

.era-card:disabled {
  filter: none;
  cursor: not-allowed;
}

.era-card:disabled img {
  filter: grayscale(.45) brightness(.7);
}

@media (max-width:760px) {
  .era-cards {
    gap: 7px;
    margin: 10px 0;
  }
  .era-card img,
  .era-card::after,
  .era-card::before {
    height: clamp(60px,13vw,95px);
  }
  .era-card .detail {
    padding: 7px;
    min-height: 58px;
    font-size: 10px;
  }
  .era-card .detail b {
    font-size: 11px;
  }
}

@media (max-height:460px) {
  .era-card img,
  .era-card::after,
  .era-card::before {
    height: 56px;
  }
  .era-card .detail {
    min-height: 42px;
    padding: 5px;
  }
  .era-cards {
    margin: 6px 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .era-card::before {
    display: none;
  }
}


/* ===== passport-v169 (ancienne feuille css/passport-v169.css) ===== */
/* Passeport 16.9 */
.cq169-passport {
  text-align: left;
  margin: auto;
}

.cq169-passport h3 {
  margin: 22px 0 12px;
  font-size: 1.1rem;
  color: #f8d69a;
}

.cq169-rank {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
  background: linear-gradient(110deg,#322537,#171f32);
  border: 1px solid #947c58;
  border-radius: 14px;
}

.cq169-rank p {
  margin: 5px 0 0;
  color: #e1d7c4;
}

.cq169-rank-icon {
  font-size: 38px;
}

.cq169-meter {
  height: 10px;
  border-radius: 10px;
  background: #35323a;
  overflow: hidden;
  margin: 13px 0 6px;
}

.cq169-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,#c28d48,#eada89);
  transition: width .3s;
}

.cq169-eras {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
}

.cq169-era {
  background: #201b29;
  border: 1px solid #534655;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cq169-era.earned {
  border-color: #d5b271;
  background: #302b2c;
}

.cq169-era span {
  font-size: .85rem;
  opacity: .88;
}

.cq169-medals {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}

.cq169-medal {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #6c574a;
  border-radius: 10px;
  background: #282331;
}

.cq169-medal.locked {
  opacity: .59;
}

.cq169-medal.earned {
  border-color: #d2ae68;
  background: #383028;
}

.cq169-medal-icon {
  font-size: 25px;
}

.cq169-medal>div {
  flex: 1;
  min-width: 0;
}

.cq169-medal strong,
.cq169-medal small {
  display: block;
}

.cq169-medal small {
  font-size: .77rem;
  line-height: 1.35;
}

.cq169-status {
  font-size: .75rem;
  white-space: nowrap;
}

.cq169-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cq169-stats span {
  padding: 8px 11px;
  border-radius: 9px;
  background: #2f2934;
  border: 1px solid #655364;
}

.cq169-earned {
  color: #f2d58b;
  font-weight: 600;
}

.cq169-hud {
  white-space: nowrap;
}

@media (max-width:650px) {
  .cq169-eras,
  .cq169-medals {
    grid-template-columns: 1fr;
  }
  .cq169-passport h2 {
    font-size: 1.4rem;
  }
}


/* ===== trophies-v170 (ancienne feuille css/trophies-v170.css) ===== */
/* Bêta 17.0 — Passeport large et Salle des Trophées */
.scene:has(.cq169-passport) .dialog,
.scene:has(.cq170-trophies) .dialog,
.scene:has(.cq170-reset) .dialog {
  width: min(1130px,100%);
  max-width: none;
  padding: clamp(11px,1.5vw,20px);
}

.scene:has(.cq169-passport) .overlay,
.scene:has(.cq170-trophies) .overlay {
  padding: 12px;
}

.cq169-passport {
  max-width: none;
  width: 100%;
}

.cq170-pass-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.cq170-pass-head h2 {
  margin: 3px 0 11px;
}

.cq170-icon-close {
  border-radius: 9px;
  border: 1px solid #ab936a;
  background: #282c3c;
  color: #eed6a8;
  padding: 8px 12px;
  font-size: 18px;
}

.cq170-pass-layout {
  display: grid;
  grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr);
  gap: 18px;
}

.cq170-pass-layout h3 {
  margin: 10px 0 7px;
  font-size: 1rem;
}

.cq170-pass-right h3 {
  margin-top: 0;
}

.cq169-passport .cq169-rank {
  padding: 9px 12px;
}

.cq169-passport .cq169-rank-icon {
  font-size: 29px;
}

.cq169-passport .cq169-rank p {
  margin: 2px 0;
  font-size: 12px;
}

.cq169-passport .cq169-meter {
  margin: 9px 0 3px;
}

.cq169-passport .cq169-era {
  padding: 9px 7px;
  font-size: 12px;
}

.cq169-passport .cq169-era span {
  font-size: 11px;
}

.cq169-passport .cq169-medals {
  gap: 6px;
}

.cq169-passport .cq169-medal {
  padding: 7px 9px;
  gap: 7px;
}

.cq169-passport .cq169-medal-icon {
  font-size: 20px;
}

.cq169-passport .cq169-medal strong {
  font-size: 12px;
}

.cq169-passport .cq169-medal small {
  font-size: 10px;
}

.cq169-passport .cq169-status {
  font-size: 10px;
}

.cq169-passport .cq169-stats span {
  padding: 7px;
  font-size: 11px;
}

.cq169-passport .cq169-stats {
  gap: 5px;
}

.cq169-passport .cq170-pass-footnote {
  margin: 7px 0;
}

.cq170-pass-actions {
  margin-top: 9px;
}

.cq170-pass-actions .btn {
  font-size: 12px;
  padding: 8px 11px;
}

.cq170-trophies {
  text-align: left;
}

.cq170-trophy-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cq170-trophy-head h2 {
  margin: 4px 0;
}

.cq170-trophy-lead {
  margin: 2px 0 10px !important;
  max-width: none !important;
}

.cq170-gallery {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}

.cq170-era-gallery {
  position: relative;
  min-height: 168px;
  border: 1px solid #b69565;
  border-radius: 13px;
  overflow: hidden;
  background: #1a1e2b;
}

.cq170-era-gallery img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
  filter: brightness(.62) saturate(.85);
  transition: transform .7s,filter .4s;
}

.cq170-era-gallery:hover img {
  transform: scale(1.09);
  filter: brightness(.85);
}

.cq170-era-gallery.locked img {
  filter: grayscale(.95) brightness(.35);
}

.cq170-gallery-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 20px 10px 10px;
  background: linear-gradient(transparent,#0c0c17ed);
}

.cq170-gallery-caption strong,
.cq170-gallery-caption small {
  display: block;
}

.cq170-gallery-caption small {
  font-size: 11px;
  color: #e5d4b7;
  margin-top: 3px;
}

.cq170-relic {
  position: absolute;
  top: 9px;
  right: 10px;
  font-size: 37px;
  filter: drop-shadow(0 2px 8px #ffcf83);
  animation: cq170-float 3.4s ease-in-out infinite;
}

.locked .cq170-relic {
  filter: grayscale(1);
  animation: none;
  opacity: .5;
}

.cq170-section-title {
  margin: 12px 0 7px !important;
  font-size: 15px !important;
  color: #f6d59b;
}

.cq170-wall {
  display: grid;
  grid-template-columns: repeat(8,minmax(0,1fr));
  gap: 7px;
}

.cq170-plaque {
  text-align: center;
  min-width: 0;
  padding: 8px 3px;
  border: 1px solid #9c754f;
  border-radius: 11px;
  background: linear-gradient(140deg,#45382f,#252537);
  box-shadow: inset 0 2px 14px #e8bd4a12;
}

.cq170-plaque.locked {
  filter: grayscale(1);
  opacity: .52;
}

.cq170-plaque-icon {
  font-size: 28px;
  display: block;
  animation: cq170-glow 3s ease-in-out infinite;
}

.cq170-plaque.locked .cq170-plaque-icon {
  animation: none;
}

.cq170-plaque strong {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.cq170-avatars {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cq170-avatar {
  border-radius: 11px;
  padding: 8px 12px;
  border: 1px solid #a18457;
  background: #302c30;
  text-align: center;
  font-size: 12px;
}

.cq170-avatar b {
  font-size: 22px;
  display: block;
}

.cq170-avatar.locked {
  opacity: .55;
  filter: grayscale(1);
}

.cq170-secrets {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
}

.cq170-secret {
  background: #252334;
  padding: 9px;
  border: 1px solid #675c6c;
  border-radius: 9px;
  font-size: 12px;
}

.cq170-secret.done {
  border-color: #d5b271;
  background: #35302b;
}

.cq170-secret strong {
  display: block;
  margin-bottom: 3px;
}

.cq170-trophy-actions {
  margin: 11px 0 0;
}

.cq170-trophy-actions .btn {
  font-size: 12px;
  padding: 8px 11px;
}

.cq170-reset p {
  max-width: none;
}

.cq170-reset input {
  width: min(290px,100%);
  background: #181d2b;
  border: 1px solid #c5a574;
  border-radius: 9px;
  padding: 11px;
  color: #fff3d7;
  font-size: 16px;
  text-align: center;
}

.cq170-danger {
  border-color: #eb9c86 !important;
  background: #783b39 !important;
  color: #fff !important;
}

.cq170-warning {
  color: #ffcead !important;
}

@keyframes cq170-float {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-6px) rotate(5deg);
  }
}

@keyframes cq170-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 2px #ffd47455);
  }
  50% {
    filter: drop-shadow(0 0 9px #f4c161aa);
  }
}

@media (prefers-reduced-motion:reduce) {
  .cq170-relic,
  .cq170-plaque-icon {
    animation: none !important;
  }
  .cq170-era-gallery img {
    transition: none;
  }
}

@media (max-width:850px) {
  .cq170-pass-layout {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .cq170-wall {
    grid-template-columns: repeat(4,1fr);
  }
  .cq170-gallery {
    gap: 5px;
  }
  .cq170-era-gallery,
  .cq170-era-gallery img {
    height: 130px;
    min-height: 130px;
  }
  .cq170-secrets {
    grid-template-columns: 1fr;
  }
}

@media (max-width:540px) {
  .cq169-passport .cq169-medals {
    grid-template-columns: 1fr;
  }
  .cq169-passport .cq169-eras {
    grid-template-columns: 1fr;
  }
  .cq170-gallery {
    grid-template-columns: 1fr;
  }
  .cq170-era-gallery,
  .cq170-era-gallery img {
    height: 105px;
    min-height: 105px;
  }
  .cq170-pass-head h2 {
    font-size: 21px;
  }
  .cq170-wall {
    grid-template-columns: repeat(2,1fr);
  }
}


/* ===== trophies-v171 (ancienne feuille css/trophies-v171.css) ===== */
/* Chrono Quest Bêta 17.1 — effet de vitrines et remise de médailles */
.cq171-immersive .cq170-gallery {
  perspective: 850px;
}

.cq171-showcase {
  cursor: pointer;
  isolation: isolate;
  transition: border-color .35s,box-shadow .4s,transform .4s;
  box-shadow: inset 0 0 20px #ffd17c12,0 8px 16px #0006;
}

.cq171-showcase:focus-visible {
  outline: 3px solid #ffdb91;
  outline-offset: 2px;
}

.cq171-showcase:hover,
.cq171-showcase.cq171-selected {
  border-color: #ffe6ad;
  box-shadow: inset 0 0 32px #ffce803f,0 0 25px #dfa94f55,0 14px 24px #0006;
  transform: translateY(-3px);
}

.cq171-showcase.cq171-selected img {
  filter: brightness(.9) saturate(1.12);
}

.cq171-showcase.locked.cq171-selected img {
  filter: grayscale(.8) brightness(.48);
}

.cq171-glass {
  position: absolute;
  z-index: 2;
  inset: -30% auto -30% -70%;
  width: 32%;
  transform: rotate(22deg);
  pointer-events: none;
  background: linear-gradient(90deg,transparent,#fff6d31d,#fff5d34d,#fff6d31d,transparent);
  animation: cq171-sweep 6s ease-in-out infinite;
}

.cq171-immersive .cq170-gallery-caption {
  z-index: 3;
}

.cq171-immersive .cq170-relic {
  z-index: 4;
}

.cq171-dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.cq171-dust i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffdf93;
  box-shadow: 0 0 9px 3px #f8b94879;
  opacity: .45;
  animation: cq171-floatdust var(--duration) ease-in-out var(--delay) infinite alternate;
}

.cq171-vitrine-info {
  margin: 7px 0 5px !important;
  padding: 5px 11px;
  color: #ffe2aa !important;
  font-size: 12px !important;
  max-width: none !important;
  border-left: 2px solid #d5aa61;
  background: #ddaf4910;
}

.cq171-gallery-hint {
  color: #f6ce85;
}

.cq171-lit {
  animation: cq171-medal-aura 3.5s ease-in-out var(--delay,0s) infinite;
}

.cq171-immersive .cq170-avatar:not(.locked) {
  animation: cq171-medal-aura 4s ease-in-out var(--delay,0s) infinite;
}

.cq171-ceremony {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 12px;
  background: radial-gradient(ellipse at center,#6b4d35f0,#100e1af5 78%);
  overflow: hidden;
  isolation: isolate;
}

.cq171-ceremony-card {
  position: relative;
  z-index: 2;
  text-align: center;
  width: min(560px,100%);
  max-height: 100%;
  overflow: auto;
  padding: clamp(12px,2.3vw,24px);
  border-radius: 20px;
  border: 1px solid #ffdb93;
  background: linear-gradient(155deg,#3c2d30,#1c2338 65%,#24202e);
  box-shadow: 0 0 0 5px #ffe09b12,0 0 64px #d99f4d70;
}

.cq171-ceremony-kicker {
  font-size: 10px;
  letter-spacing: .17em;
  color: #ffdfa0;
  font-weight: 800;
}

.cq171-medallion {
  width: 92px;
  height: 92px;
  margin: 10px auto 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 53px;
  background: radial-gradient(circle at 32% 20%,#ffecb9,#bd7f30 65%,#5f3a25);
  border: 5px double #ffdc87;
  box-shadow: 0 0 0 6px #f3b45419,0 0 40px #e6a8489f;
  animation: cq171-reveal .85s cubic-bezier(.17,.85,.3,1.3) both,cq171-orbitglow 2.6s ease-in-out .85s infinite;
}

.cq171-ceremony-card h2 {
  font: 700 clamp(23px,3vw,36px) Georgia,serif;
  margin: 6px 0;
  color: #ffe3a1;
}

.cq171-ceremony-card p {
  font-size: 13px;
  color: #ddd6d3;
  margin: 0 0 8px;
}

.cq171-earned-list {
  display: grid;
  gap: 6px;
  max-width: 470px;
  margin: 8px auto;
  text-align: left;
}

.cq171-earned-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff10;
  border: 1px solid #d7ad6d7c;
  border-radius: 10px;
  padding: 7px 12px;
  animation: cq171-enter .45s ease both;
  animation-delay: calc(var(--order)*.11s);
}

.cq171-earned-row>span {
  font-size: 25px;
}

.cq171-earned-row strong,
.cq171-earned-row small {
  display: block;
}

.cq171-earned-row strong {
  color: #ffe5ad;
  font-size: 13px;
}

.cq171-earned-row small {
  font-size: 11px;
  color: #d0ced2;
}

.cq171-ceremony-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cq171-ceremony-actions button {
  font-size: 12px;
  padding: 9px 12px;
}

.cq171-ceremony-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.cq171-ceremony-stars i {
  position: absolute;
  left: 50%;
  top: 43%;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #ffe2a0;
  box-shadow: 0 0 13px #ffe2a0;
  animation: cq171-spark 1.6s ease-out var(--delay) both;
}

@keyframes cq171-sweep {
  0%,
  27% {
    left: -70%;
  }
  60%,
  100% {
    left: 140%;
  }
}

@keyframes cq171-floatdust {
  from {
    transform: translateY(7px) scale(.7);
    opacity: .16;
  }
  to {
    transform: translateY(-18px) scale(1.2);
    opacity: .75;
  }
}

@keyframes cq171-medal-aura {
  0%,
  100% {
    box-shadow: 0 0 0 #ffd58d00,inset 0 0 9px #f6b86218;
  }
  50% {
    box-shadow: 0 0 16px #ffd58d55,inset 0 0 14px #f6b86222;
  }
}

@keyframes cq171-reveal {
  from {
    transform: translateY(35px) rotate(-50deg) scale(.15);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0) scale(1);
    opacity: 1;
  }
}

@keyframes cq171-orbitglow {
  50% {
    box-shadow: 0 0 0 7px #f3b45430,0 0 55px #f8c66dd7;
  }
}

@keyframes cq171-enter {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes cq171-spark {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(0) scale(.15);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--distance)) scale(.3);
  }
}

@media (prefers-reduced-motion:reduce) {
  .cq171-showcase,
  .cq171-glass,
  .cq171-dust i,
  .cq171-lit,
  .cq171-immersive .cq170-avatar:not(.locked),
  .cq171-medallion,
  .cq171-earned-row,
  .cq171-ceremony-stars i {
    animation: none !important;
    transition: none !important;
  }
  .cq171-showcase:hover {
    transform: none;
  }
}

@media (max-height:500px) {
  .cq171-medallion {
    width: 55px;
    height: 55px;
    font-size: 30px;
    margin: 3px auto;
  }
  .cq171-ceremony-card {
    padding: 8px;
  }
  .cq171-ceremony-card h2 {
    font-size: 21px;
  }
  .cq171-earned-list {
    max-height: 92px;
    overflow: auto;
  }
}


/* ===== museum-v174 (ancienne feuille css/museum-v174.css) ===== */
/* Chrono Quest — Bêta 17.3 · Musée des Civilisations en mode aventure */
.cq173-museum {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  flex-direction: column;
  color: #f7ebd1;
  background: radial-gradient(circle at top,#2d2441,#121728 55%,#0b0e18);
  font-family: system-ui,Segoe UI,sans-serif;
  overflow: hidden;
  isolation: isolate;
}

.cq173-museum button {
  cursor: pointer;
  color: #ffead0;
  border: 1px solid #cba979;
  background: #2d3549;
  border-radius: 12px;
}

.cq173-top {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 2.4%;
  background: linear-gradient(110deg,#171a2e,#3f3346 55%,#1b2134);
  border-bottom: 1px solid #a88b59;
  box-shadow: 0 12px 30px #0008;
}

.cq173-kicker {
  font-size: 10px;
  letter-spacing: .24em;
  font-weight: 700;
  color: #d6b477;
  text-transform: uppercase;
}

.cq173-top h2 {
  margin: 2px 0;
  font: 700 clamp(20px,2.5vw,32px) Georgia,serif;
  color: #ffe0a0;
}

.cq173-top p {
  margin: 0;
  font-size: 12px;
  color: #d8d0c3;
}

.cq173-top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cq173-exit,
.cq173-guide-inline {
  font-weight: 700;
  padding: 9px 12px;
  white-space: nowrap;
  font-size: 12px;
}

.cq173-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 0;
  background: linear-gradient(180deg,#101425,#0c1020);
}

.cq173-stage-wrap {
  position: relative;
  min-height: 0;
  border-right: 1px solid #8f724a88;
  box-shadow: inset -20px 0 40px #0005;
}

.cq173-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background-color: #161b2d;
  background-size: cover;
  background-position: center 40%;
  background-image: linear-gradient(180deg,#0c1429dd,#2a2d45 59%,#0b101d);
  perspective: 1000px;
}

.cq173-stage.cq173-secret {
  background-image: radial-gradient(circle at 50% 18%,#f7cb8240,transparent 25%),linear-gradient(120deg,#19183b,#2e2145 60%,#111523);
}

.cq173-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cq173-arch {
  position: absolute;
  top: 2%;
  height: 62%;
  width: 28%;
  border-radius: 48% 48% 0 0 / 34% 34% 0 0;
  border: 10px solid #957251;
  border-bottom: 0;
  background: radial-gradient(ellipse at top,#ffffff10,#ffffff00 58%),linear-gradient(180deg,#ffffff08,#00000015 60%,transparent);
  box-shadow: inset 0 0 28px #ffdb9f25,0 0 40px #0008;
}

.cq173-arch.a {
  left: 7%;
}

.cq173-arch.b {
  left: 36%;
  width: 28%;
  border-color: #c1aa85;
}

.cq173-arch.c {
  right: 7%;
}

.cq173-banner {
  position: absolute;
  top: 8%;
  width: 26px;
  height: 160px;
  background: linear-gradient(180deg,#d9b26c,#744d2d 88%,#d9b26c);
  filter: drop-shadow(0 10px 10px #0008);
}

.cq173-banner.left {
  left: 4%;
  clip-path: polygon(0 0,100% 0,100% 88%,50% 100%,0 88%);
}

.cq173-banner.right {
  right: 4%;
  clip-path: polygon(0 0,100% 0,100% 88%,50% 100%,0 88%);
}

.cq173-plinth {
  position: absolute;
  left: 50%;
  top: 70%;
  width: 110px;
  height: 40px;
  transform: translateX(-50%);
  background: linear-gradient(180deg,#b78f5f,#735239);
  border: 2px solid #e5be7d;
  border-radius: 12px 12px 4px 4px;
  box-shadow: 0 12px 16px #0007;
}

.cq173-particles {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%,#ffd88822 0 1px,transparent 2px) 0 0/120px 120px,radial-gradient(circle at 60% 40%,#fff1b322 0 1px,transparent 2px) 0 0/140px 140px,radial-gradient(circle at 80% 20%,#f3cf7c22 0 1px,transparent 2px) 0 0/170px 170px;
  animation: cq173-drift 24s linear infinite;
}

.cq173-spot {
  position: absolute;
  z-index: 3;
  min-width: 108px;
  max-width: 28%;
  padding: 9px 11px;
  transform: translate(-50%,-50%);
  background: linear-gradient(160deg,#2d2941f5,#131b2cf7) !important;
  box-shadow: 0 0 0 2px #4e3f29,0 10px 24px #0009,inset 0 0 18px #f7c36a2e;
  border: 2px solid #d2a86d !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.cq173-spot:hover,
.cq173-spot:focus-visible {
  filter: brightness(1.12);
  transform: translate(-50%,-53%) scale(1.04);
  box-shadow: 0 0 0 2px #f0c57f,0 18px 34px #000a,inset 0 0 18px #f7c36a44;
}

.cq173-spot.secret {
  border-style: dashed !important;
  background: linear-gradient(120deg,#241f3f,#472d44) !important;
}

.cq173-spot-icon {
  font-size: clamp(20px,3.4vw,38px);
  line-height: 1.06;
  filter: drop-shadow(0 0 9px #ffd2859c);
  animation: cq173-float 3.2s ease-in-out infinite alternate;
}

.cq173-spot-label {
  font-size: clamp(10px,1vw,13px);
  font-weight: 800;
  text-shadow: 0 1px 4px #000;
}

.cq173-hero {
  position: absolute;
  z-index: 7;
  transform: translate(-50%,-78%);
  width: clamp(38px,5vw,72px);
  height: clamp(56px,8vw,98px);
  pointer-events: none;
  filter: drop-shadow(0 10px 7px #000b);
}

.cq173-hero-sprite {
  display: block;
  width: 100%;
  height: 100%;
  background: url('../assets/v13_hero.webp') center bottom/contain no-repeat;
  animation: cq173-breathe 2.2s ease-in-out infinite;
}

.cq173-hero-shadow {
  position: absolute;
  bottom: -3px;
  left: 8%;
  width: 84%;
  height: 12px;
  border-radius: 50%;
  background: #0008;
  filter: blur(3px);
}

.cq173-near {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  z-index: 8;
  background: #111a2ae8;
  border: 1px solid #a98c65;
  border-radius: 999px;
  padding: 7px 14px;
  color: #dbd7ca;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 8px 20px #0008;
}

.cq173-near.ready {
  border-color: #f6cd84;
  color: #ffe2a1;
}

.cq173-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(180deg,#14192b,#0d1120);
  overflow: auto;
}

.cq173-guide,
.cq173-collection {
  background: linear-gradient(160deg,#2d2a3f,#181e30);
  border: 1px solid #a48658;
  border-radius: 18px;
  box-shadow: 0 16px 28px #0007;
  padding: 14px;
}

.cq173-guide {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
}

.cq173-guide-portrait-wrap {
  position: relative;
  align-self: start;
}

.cq173-guide-portrait {
  box-shadow: 0 0 0 4px #fff1,0 10px 18px #0008;
}

.cq173-guide-kicker {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #e0bf84;
}

.cq173-guide h3,
.cq173-collection h3 {
  margin: .15rem 0 .4rem;
  font: 700 20px Georgia,serif;
  color: #ffe3a6;
}

.cq173-guide p {
  margin: .3rem 0;
  color: #e3dccd;
}

.cq173-guide-talk {
  margin-top: 8px;
  padding: 8px 12px;
  font-weight: 800;
}

.cq173-rare-list {
  display: grid;
  gap: 9px;
}

.cq173-rare {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  border: 1px solid #8c734b;
  background: linear-gradient(180deg,#25283b,#171d2f);
}

.cq173-rare span {
  filter: drop-shadow(0 0 8px #ffd17a77);
}

.cq173-rare strong {
  display: block;
}

.cq173-rare small {
  display: block;
  color: #d1c6b4;
  font-size: 11px;
}

.cq173-rare.locked {
  opacity: .68;
  filter: saturate(.5);
}

.cq173-rare.owned {
  box-shadow: inset 0 0 18px #f7d18820,0 6px 12px #0005;
}

.cq173-bottom {
  flex: 0 0 auto;
  background: #141b2a;
  border-top: 1px solid #a98c62;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 2%;
  font-size: 11px;
}

.cq173-progress {
  color: #f9d993;
  font-weight: 800;
}

.cq173-instructions {
  color: #c5d0db;
}

.cq173-touch {
  display: flex;
  gap: 5px;
  align-items: center;
}

.cq173-touch button {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 750;
  touch-action: none;
  user-select: none;
}

.cq173-examine {
  background: #735b3d !important;
}

.cq173-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #090d17cf;
  display: grid;
  place-items: center;
  padding: 16px;
}

.cq173-overlay[hidden],
.cq173-notice[hidden] {
  display: none !important;
}

.cq173-card {
  width: min(680px,92vw);
  background: linear-gradient(160deg,#322e44,#161c2d);
  border: 2px solid #e3ba78;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 24px 60px #000a;
  color: #f7edd7;
}

.cq173-card-head {
  margin-bottom: 12px;
}

.cq173-badge {
  display: inline-block;
  margin-bottom: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #d5b06a22;
  border: 1px solid #d9b773;
  color: #f5d899;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cq173-card h3 {
  margin: 0;
  font: 700 clamp(22px,3vw,34px) Georgia,serif;
  color: #ffe0a8;
}

.cq173-card p {
  line-height: 1.56;
  color: #efe6d5;
}

.cq173-card-note {
  font-size: 13px;
  color: #e1bf80;
}

.cq173-card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.cq173-question {
  font-size: 16px;
  margin: .5rem 0 1rem;
}

.cq173-options {
  display: grid;
  gap: 10px;
}

.cq173-option {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  background: linear-gradient(180deg,#2b3043,#1a2031);
}

.cq173-option.correct {
  border-color: #75d38e !important;
  box-shadow: 0 0 0 2px #75d38e44 inset;
}

.cq173-option.wrong {
  border-color: #ef7a7a !important;
  animation: cq173-shake .25s linear 2;
}

.cq173-reward {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid #d0a86a;
  background: linear-gradient(180deg,#2f3245,#1a1f31);
}

.cq173-reward span {
  font-size: 32px;
}

.cq173-reward.new {
  box-shadow: 0 0 0 1px #e6c47b inset,0 0 24px #e6c47b24;
}

.cq173-guide-dialog {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
}

.cq173-guide-dialog img {
  width: 100px;
  height: 120px;
  object-fit: contain;
  border-radius: 14px;
  background: linear-gradient(180deg,#38455f,#1a2133);
  border: 1px solid #d0ab70;
}

.cq173-guide-extra {
  font-style: italic;
  color: #f6d69a;
}

.cq173-notice {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  min-width: 260px;
  z-index: 25;
  text-align: center;
  padding: 14px 19px;
  background: #1e283cf6;
  border: 2px solid #e1b76c;
  border-radius: 14px;
  box-shadow: 0 12px 37px #000b;
  font-size: 13px;
}

@keyframes cq173-drift {
  to {
    background-position: 120px 120px,160px 140px,180px 160px;
  }
}

@keyframes cq173-float {
  to {
    transform: translateY(-6px);
  }
}

@keyframes cq173-breathe {
  50% {
    translate: 0 -2px;
  }
}

@keyframes cq173-walk {
  to {
    translate: 0 -6px;
    rotate: 3deg;
  }
}

@keyframes cq173-shake {
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

@media (max-width:980px) {
  .cq173-main {
    grid-template-columns: 1fr;
  }
  .cq173-side {
    display: none;
  }
  .cq173-stage-wrap {
    border-right: 0;
  }
  .cq173-guide-inline {
    display: inline-flex;
  }
  .cq173-spot {
    max-width: 34%;
  }
}

@media (max-width:700px) {
  .cq173-top {
    padding: 6px 10px;
  }
  .cq173-kicker,
  .cq173-top p {
    font-size: 9px;
  }
  .cq173-top h2 {
    font-size: 17px;
  }
  .cq173-exit,
  .cq173-guide-inline {
    font-size: 10px;
    padding: 6px 8px;
  }
  .cq173-arch {
    border-width: 5px;
  }
  .cq173-banner {
    height: 100px;
    width: 16px;
  }
  .cq173-spot {
    padding: 4px 6px;
    min-width: 68px;
    max-width: 34%;
  }
  .cq173-spot-label {
    font-size: 9px;
  }
  .cq173-bottom {
    padding: 4px 8px;
    font-size: 9px;
  }
  .cq173-instructions {
    display: none;
  }
  .cq173-touch button {
    padding: 5px 8px;
  }
  .cq173-near {
    bottom: 2%;
    font-size: 9px;
  }
  .cq173-card {
    padding: 14px;
  }
  .cq173-guide-dialog {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .cq173-guide-dialog img {
    margin: 0 auto;
  }
}

@media (max-height:470px) {
  .cq173-top p {
    display: none;
  }
  .cq173-bottom {
    padding: 3px 6px;
  }
  .cq173-spot-icon {
    font-size: 18px;
  }
  .cq173-hero {
    height: 46px;
    width: 38px;
  }
  .cq173-near {
    display: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .cq173-particles,
  .cq173-spot-icon,
  .cq173-guide-portrait,
  .cq173-hero-sprite {
    animation: none !important;
  }
}


/* Bêta 17.4 — galerie illustrée, Ariane HD, quête et vitrines cinématiques */
.cq173-stage.cq173-hall {
  background-image: linear-gradient(180deg,rgba(9,12,27,.06) 0%,rgba(9,12,27,.10) 40%,rgba(8,10,21,.75) 100%),url('../assets/musee_galerie_1866.png') !important;
  background-size: cover;
  background-position: center center;
}

.cq173-hall .cq173-arch,
.cq173-hall .cq173-banner,
.cq173-hall .cq173-plinth {
  display: none;
}

.cq173-hall .cq173-spot {
  background: linear-gradient(160deg,#1e1b34e0,#131b30f1) !important;
  backdrop-filter: blur(3px);
  border-color: #ffc876 !important;
  box-shadow: 0 0 0 1px #e3ac56,0 8px 24px #000c,0 0 30px #d99e4133;
}

.cq173-guide {
  grid-template-columns: 112px minmax(0,1fr);
  padding: 12px;
  gap: 11px;
}

.cq173-guide-portrait {
  height: 156px;
  width: 112px;
  object-fit: cover;
  object-position: center 23%;
  border: 2px solid #e3ba78;
  border-radius: 13px;
  background: #242538;
  animation: cq173-float 3.6s ease-in-out infinite alternate;
}

.cq173-guide h3 {
  font-size: 19px;
}

.cq173-guide p {
  font-size: 12px;
  line-height: 1.4;
}

.cq173-spot {
  overflow: visible;
  isolation: isolate;
}

.cq173-spot::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -7px;
  border: 1px solid #f6d39472;
  border-radius: 14px;
  opacity: .45;
  transition: opacity .2s,transform .2s;
}

.cq173-spot:hover::before {
  opacity: 1;
  transform: scale(1.04);
}

.cq173-spot.cq174-opening {
  animation: cq174-case-open .75s cubic-bezier(.22,.9,.24,1) both;
  z-index: 9;
}

.cq173-spot.cq174-opening::after {
  content: '';
  position: absolute;
  inset: -20px;
  z-index: -2;
  background: radial-gradient(circle,#fff7b3aa,#ffd57944 34%,transparent 70%);
  animation: cq174-glow .75s ease-out both;
  pointer-events: none;
}

.cq174-speech {
  position: absolute;
  z-index: 12;
  left: 5%;
  bottom: 18%;
  width: min(370px,48%);
  background: linear-gradient(160deg,#fff7df,#e6cfa7);
  border: 3px solid #9e702d;
  border-radius: 19px;
  padding: 13px 17px;
  box-shadow: 0 14px 38px #000a;
  color: #2e2440;
  pointer-events: none;
  transform-origin: bottom left;
}

.cq174-speech[hidden] {
  display: none !important;
}

.cq174-speech.talking {
  animation: cq174-bubble .38s cubic-bezier(.22,1.4,.4,1) both;
}

.cq174-speech::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 34px;
  border-width: 14px 14px 0 0;
  border-style: solid;
  border-color: #9e702d transparent transparent transparent;
}

.cq174-speaker {
  display: block;
  font-weight: 850;
  color: #633d15;
  font-size: 12px;
  letter-spacing: .03em;
}

.cq174-speech p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: #332742;
}

.cq174-quest {
  background: linear-gradient(160deg,#38304a,#191e31);
  border: 1px solid #c39a5c;
  border-radius: 17px;
  padding: 13px;
  box-shadow: 0 10px 25px #0006;
}

.cq174-quest-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: Georgia,serif;
}

.cq174-quest-head span {
  font-size: 11px;
  color: #e8c47b;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cq174-quest-head strong {
  font-size: 18px;
  color: #ffe1a1;
}

.cq174-quest p {
  margin: 7px 0;
  font-size: 11px;
  color: #e5ddcd;
  line-height: 1.4;
}

.cq174-quest ol {
  padding: 0;
  margin: 7px 0 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.cq174-quest li {
  padding: 5px 7px;
  background: #12192ab8;
  border-radius: 8px;
  font-size: 11px;
  color: #ecd9b8;
}

.cq174-quest li.done {
  color: #a8eac1;
  background: #1b473556;
}

.cq173-collection {
  flex-shrink: 0;
}

.cq173-rare {
  padding: 7px 9px;
}

.cq173-rare span {
  font-size: 21px;
}

@keyframes cq174-bubble {
  from {
    opacity: 0;
    transform: scale(.85) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes cq174-case-open {
  0% {
    transform: translate(-50%,-50%) scale(1);
    filter: brightness(1);
  }
  30% {
    transform: translate(-50%,-54%) scale(1.12);
    filter: brightness(1.7);
  }
  65% {
    transform: translate(-50%,-58%) scale(1.08);
    filter: brightness(1.9);
  }
  100% {
    transform: translate(-50%,-50%) scale(1);
    filter: brightness(1);
  }
}

@keyframes cq174-glow {
  0% {
    opacity: 0;
    transform: scale(.4);
  }
  35% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

@media (max-width:980px) {
  .cq174-speech {
    width: min(360px,55%);
    bottom: 12%;
  }
}

@media (max-width:700px) {
  .cq174-speech {
    left: 3%;
    bottom: 11%;
    width: 55%;
    padding: 7px 9px;
    border-width: 2px;
  }
  .cq174-speech p {
    font-size: 10px;
  }
  .cq174-speaker {
    font-size: 10px;
  }
}

@media (max-height:440px) {
  .cq174-speech {
    bottom: 14%;
    max-height: 35%;
    overflow: hidden;
  }
  .cq174-speech p {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .cq174-speech.talking,
  .cq173-spot.cq174-opening,
  .cq173-spot.cq174-opening::after {
    animation: none !important;
  }
}


/* ===== fluide-v175 (ancienne feuille css/fluide-v175.css) ===== */
/* Chrono Quest 17.5 — fluidité et mobile */
.direction {
  gap: 5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

#down {
  touch-action: none;
  min-width: 44px;
}

.cq173-stage {
  transition: filter .32s ease, opacity .28s ease;
}

.cq173-spot {
  transition: transform .23s ease,box-shadow .23s ease,filter .23s ease;
}

.cq173-spot:focus-visible {
  outline: 3px solid #ffe9a6;
  outline-offset: 4px;
}

.cq173-hero.cq175-museum-hero {
  transition: left .055s linear,top .055s linear;
}

.cq173-hero.walking .cq173-hero-sprite {
  animation: cq175-museum-step .25s ease-in-out infinite alternate;
}

@keyframes cq175-museum-step {
  from {
    translate: 0 0;
    rotate: -2deg;
  }
  to {
    translate: 0 -5px;
    rotate: 2deg;
  }
}

@media (max-width:720px) {
  #down {
    min-width: 40px;
  }
  .direction {
    gap: 3px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .cq173-stage,
  .cq173-spot,
  .cq173-hero.cq175-museum-hero {
    transition: none !important;
  }
  .cq173-hero.walking .cq173-hero-sprite {
    animation: none !important;
  }
}


/* Les nouveaux sprites HD du héros sont utilisés dans les galeries. */
.cq173-hero-sprite {
  background-size: contain !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
}

.cq173-stage.cq175-room-enter {
  animation: cq175-room-enter .38s ease-out both;
}

@keyframes cq175-room-enter {
  from {
    opacity: .25;
    filter: brightness(.6) blur(2px);
  }
  to {
    opacity: 1;
    filter: brightness(1) blur(0);
  }
}

@media (prefers-reduced-motion:reduce) {
  .cq173-stage.cq175-room-enter {
    animation: none !important;
  }
}


/* ===== movement-v177 (ancienne feuille css/movement-v177.css) ===== */
/* Beta 17.7 — travel fades and correct HD sprite orientation. */
.cq173-museum .cq173-stage {
  transition: opacity .19s ease,filter .19s ease,transform .19s ease;
}

.cq173-museum.cq177-switching .cq173-stage {
  opacity: .12;
  filter: blur(3px) brightness(.65);
  transform: scale(1.018);
}

.cq173-museum.cq177-arriving .cq173-stage {
  animation: cq177-arrive .42s cubic-bezier(.2,.6,.2,1) both;
}

@keyframes cq177-arrive {
  from {
    opacity: .13;
    filter: brightness(.6) blur(4px);
    transform: scale(1.018);
  }
  to {
    opacity: 1;
    filter: brightness(1) blur(0);
    transform: scale(1);
  }
}


/* The supplied HD frames face left in the source file: flip when walking to the right. */
.cq173-hero .cq173-hero-sprite {
  transform: scaleX(-1) !important;
}

.cq173-hero.facing-left .cq173-hero-sprite {
  transform: scaleX(1) !important;
}

@media (prefers-reduced-motion:reduce) {
  .cq173-museum .cq173-stage {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }
}


/* ===== content-v18 (ancienne feuille css/content-v18.css) ===== */
.cq18-signature a {
  color: #8fd8cf;
  margin-left: 10px;
}

.cq18-prompt {
  font-size: 19px;
  line-height: 1.6;
}

.cq18-answers {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.cq18-answers label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border: 1px solid #c5aa664a;
  border-radius: 9px;
  background: #ffffff08;
  cursor: pointer;
}

.cq18-answers label:has(input:checked) {
  background: #67d6bf20;
  border-color: #8ed2ba;
}

.cq18-answers input {
  width: 19px;
  height: 19px;
  accent-color: #6fbea7;
  flex-shrink: 0;
}

.cq18-answers span {
  line-height: 1.5;
}

.cq18-good {
  color: #99e0bd;
}

.cq18-wrong {
  color: #ffc3a6;
}

.cq18-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.cq18-media .btn {
  text-decoration: none;
}

.cq18-video {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 8px;
}

.cq18-editor-link {
  color: #b6d4c7;
  font-size: 12px;
  padding: 8px;
}

.cq18-media .note {
  margin: 0;
}

#cq18-feedback {
  line-height: 1.65;
}

.cq18-answers input:focus-visible {
  outline: 3px solid #e6c579;
  outline-offset: 5px;
}

.cq182-note {
  padding: 15px;
  text-align: left;
  margin: 12px 0;
  border: 1px solid #a3bfa13b;
  border-radius: 8px;
}

.cq182-note strong {
  color: #f4d497;
}

.cq182-note small {
  color: #bdcbbb;
}

.era-cards {
  max-height: 340px;
  overflow: auto;
  align-content: start;
}

.era-card:disabled {
  opacity: .55;
}


/* ===== note du palmarès (classement ludique) ===== */
.cq16-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
  opacity: .75;
}

/* ===== css/guides-v183.css ===== */
.cq183-preface{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:22px;background:#173139;border:1px solid #a88b5466;border-radius:12px;padding:20px;color:#e1eae5;text-align:left}.cq183-preface-art>img{width:100%;max-height:430px;min-height:180px;object-fit:cover;border-radius:8px}.cq183-credits{display:block;font-size:11px!important;color:#b7c8c3!important;line-height:1.5;margin-top:9px}.cq183-preface h1{font:700 30px/1.15 Georgia,serif!important;color:#f1d8a4!important;margin:9px 0 15px!important}.cq183-preface .cq183-subtitle{font-size:12px!important;letter-spacing:.06em;color:#c6bd9a!important;margin:8px 0!important}.cq183-preface .cq183-kicker{font-size:10px;letter-spacing:1.5px;color:#d8ba7c}.cq183-preface .cq183-preface-body,.cq183-preface .cq183-mission p{font-size:13px!important;line-height:1.7!important;white-space:pre-line;color:#d6e3df!important}.cq183-guide-summary{display:flex;gap:14px;align-items:center;margin:18px 0}.cq183-guide-summary>img{width:65px;height:90px;object-fit:contain;border-radius:6px;background:#ffffff09}.cq183-guide-summary strong,.cq183-guide-summary span,.cq183-guide-summary small{display:block}.cq183-guide-summary strong{font-size:17px;color:#f1d49b}.cq183-guide-summary span{font-size:12px;margin:5px 0;color:#bdcdc8}.cq183-guide-summary small{font-size:11px;color:#aebfb9}.cq183-biography{font-size:12px;color:#c8d8cf;line-height:1.7;margin-bottom:14px}.cq183-biography summary{cursor:pointer}.cq183-biography p{white-space:pre-line;line-height:1.7!important;font-size:12px!important}.cq183-preface blockquote{margin:15px 0;padding:10px 14px;border-left:2px solid #c4a469;font:italic 14px/1.6 Georgia,serif;color:#d9d3b9}.cq183-mission{padding:12px 14px;background:#ffffff08;border-radius:7px}.cq183-mission>strong{font-size:11px;letter-spacing:1px;text-transform:uppercase;color:#cfb57f}.cq183-mission p{margin:7px 0!important}.cq183-preface .buttons{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.cq183-preface .btn,.cq183-guide-library .btn{border:1px solid #d4b476;background:#d5b87e;color:#18343b;border-radius:7px;font:600 12px system-ui;padding:11px 14px;cursor:pointer}.cq183-preface .btn.alt,.cq183-guide-library .btn.alt{background:#29444a;color:#f0e2c1}.cq183-guide-library{padding:16px;background:#173139;border-radius:10px;color:#dae6df;text-align:left}.cq183-guide-library h2{color:#f1d49b!important}.cq183-guide-list{display:grid;gap:15px}.cq183-guide-detail{padding:14px;border:1px solid #a6c5b635;border-radius:9px;margin:12px 0;background:#ffffff04}.cq183-guide-detail p{white-space:pre-line;font-size:13px;line-height:1.7}.cq183-guide-detail .cq183-guide-summary{margin-top:0}.cq183-inline-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:15px}.cq183-builder-guides{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:24px}.cq183-image-editor{padding:16px;border:1px solid #dbe4dc;border-radius:9px;margin:18px 0}.cq183-editor-image{display:block;max-width:100%;width:170px;height:180px;object-fit:contain;border-radius:7px;background:#e9eee8;margin:12px 0}#preface-illustration-preview{width:100%;height:210px;object-fit:cover}#question-preview:has(.cq183-preface){max-width:980px}.dialog:has(.cq183-preface){width:min(930px,100%);padding:12px}#primary-guide,#edit-guide{max-width:100%}@media(max-width:750px){.cq183-preface,.cq183-builder-guides{grid-template-columns:1fr}.cq183-preface{padding:13px;gap:14px}.cq183-preface-art>img{height:170px;min-height:0}.cq183-preface h1{font-size:25px!important}}@media(max-height:500px){.cq183-preface-art>img{min-height:130px;max-height:230px}.cq183-preface h1{font-size:23px!important}}

/* ===== css/heroes-v185.css ===== */
.cq185-hero-editor{margin:24px 0;padding:22px 0;border-top:1px solid #cfded2}.cq185-hero-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:20px 0}.cq185-hero-card{display:flex;align-items:center;flex-direction:column;min-width:0;padding:10px 8px 16px;border:1px solid #ccdace;border-radius:10px;background:linear-gradient(#e9efe4,#f8faf5);color:#214d4b;cursor:pointer;transition:transform .15s,border-color .15s}.cq185-hero-card:hover{transform:translateY(-3px);border-color:#6c9d87}.cq185-hero-card.selected{border:2px solid #367766;background:linear-gradient(#d9e9da,#f5f7ed);box-shadow:0 0 0 2px #c8ded199}.cq185-hero-card>canvas{display:block;width:100%;max-width:150px;height:170px;object-fit:contain}.cq185-hero-card>strong{font:700 19px Georgia,serif;margin-top:4px}.cq185-hero-card>span{font-size:11px;color:#6c8272;margin-top:5px;text-align:center}.cq185-custom{display:grid;grid-template-columns:170px minmax(0,1fr);gap:25px;padding:20px;border:1px solid #d1dfd1;border-radius:10px;background:#f7f9f3}.cq185-custom canvas{display:block;margin:auto;max-width:100%;height:170px;object-fit:contain}.cq185-inherit{display:flex;gap:9px;align-items:center;font-size:13px;color:#567267}.cq185-inherit input{accent-color:#286f5a}.cq185-player-panel .cq185-hero-cards{gap:9px}.cq185-player-panel .cq185-hero-card{color:#efe1b9;border-color:#9b885653;background:linear-gradient(#3f5144,#1e3537)}.cq185-player-panel .cq185-hero-card.selected{border-color:#e3c37c;background:linear-gradient(#5c6044,#294744);box-shadow:none}.cq185-player-panel .cq185-hero-card>span{color:#c2ccaf}.dialog:has(.cq185-player-panel){width:min(930px,100%)}.media-card-image canvas[data-hero-preview]{display:block;width:100%;height:100%;object-fit:contain}@media(max-width:900px){.cq185-hero-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:560px){.cq185-hero-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.cq185-custom{grid-template-columns:1fr}.cq185-hero-card>canvas{height:145px}.cq185-hero-card>strong{font-size:17px}.cq185-player-panel .cq185-hero-card>canvas{height:115px}}

/* ===== css/locales-v186.css ===== */
.cq186-language-control{display:flex;align-items:center;gap:6px;font-size:11px;color:#e7d7b1}.cq186-language-control select{border:1px solid #ac956b55;border-radius:7px;background:#173139;color:#f5e9c9;padding:6px;max-width:125px}.cq186-language-control[hidden]{display:none}.cq186-countries{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px;max-height:330px;overflow:auto;padding:15px;background:#f5f8f1}.cq186-countries label,.cq186-config-langs label{display:flex;gap:8px;align-items:center;font-size:13px}.cq186-config-langs{display:flex;flex-wrap:wrap;gap:20px;margin:20px 0}.cq186-translation-row{margin:18px 0;padding:15px;border:1px solid #d5dfd3;border-radius:8px}.cq186-translation-row>label{display:flex;gap:8px;font-weight:bold;font-size:14px}.cq186-translation-row small{display:block;white-space:pre-wrap;color:#637a72;margin:10px 0;max-height:120px;overflow:auto}.cq186-translation-row textarea{box-sizing:border-box;width:100%;min-height:80px;padding:10px;background:#fcfdf9;color:#243e3c;border:1px solid #cad9ca;border-radius:6px}.cq186-translation-row textarea:disabled{opacity:.55}.cq186-board-country{display:block;font-size:11px;color:#bdcbb7;margin-top:4px}#cq16-register select{display:block;box-sizing:border-box;width:100%;margin:8px 0 18px;padding:10px;background:#19333c;color:#f6e8bd;border:1px solid #b69e7066;border-radius:8px}#cq16-register>label{display:block;margin-top:14px}#cq186-board-country{max-width:260px}.cq16-filter{flex-wrap:wrap}

/* ===== css/finish-v1863.css ===== */
/* 18.6.3 — écrans d’accueil et musée : une mise en scène commune au jeu. */
/* Le dialogue est l’unique zone de défilement du menu, quel que soit le nombre d’époques. */
#overlay{overflow:hidden;min-height:0}
#dialog{overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b99154 #151c2b;min-height:0;max-height:100%}
#dialog .era-cards{max-height:none;overflow:visible;align-content:start;padding:2px}
#dialog:has(.era-cards){width:min(960px,100%);border-radius:22px;background:radial-gradient(ellipse at 25% 0,#8e674025,transparent 52%),linear-gradient(145deg,#222536f7,#111b2bf9);padding:clamp(16px,2.6vw,30px);box-shadow:0 22px 70px #000a,inset 0 1px #ffe4b02b}
#dialog:has(.era-cards) h1{font-size:clamp(27px,4.2vw,46px);line-height:1.1}
#dialog .era-cards .era-card{min-width:0}
#dialog .era-cards img{height:clamp(90px,12vw,144px)}
#dialog:has(.era-cards)>.buttons{margin:18px 0 4px}
/* Préface : cadre nocturne, illustration entière, portrait fondu et dorures. */
#dialog:has(.cq183-preface){width:min(1050px,100%);padding:0;border-color:#c6a36b99;border-radius:22px;background:#131e2b;box-shadow:0 24px 80px #000b,inset 0 1px #ffe0a738}
#dialog .cq183-preface{position:relative;isolation:isolate;overflow:hidden;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(18px,3vw,38px);border:0;border-radius:20px;padding:clamp(20px,3vw,34px);background:radial-gradient(ellipse at 10% 12%,#ad7d4036,transparent 48%),linear-gradient(135deg,#192d38,#181c2e 72%);color:#ece2ce}
.cq183-preface::before{content:'';position:absolute;inset:10px;border:1px solid #e2bd7528;border-radius:15px;pointer-events:none;z-index:-1}
#dialog .cq183-preface-art{align-self:center;min-width:0;position:relative;padding:9px;border:1px solid #d9b16b59;border-radius:16px;background:linear-gradient(145deg,#d7a45a14,#00000012);box-shadow:0 18px 42px #0006}
#dialog .cq183-preface-art>img{display:block;width:100%;min-height:0;height:auto;max-height:350px;object-fit:contain;border-radius:10px;box-shadow:0 6px 24px #0006}
#dialog .cq183-preface h1{font-size:clamp(25px,3.2vw,36px)!important;letter-spacing:-.025em;color:#ffe0a3!important;text-shadow:0 4px 20px #0005}
#dialog .cq183-preface .cq183-subtitle{color:#cfb788!important;letter-spacing:.13em;text-transform:uppercase;font-size:10px!important}
#dialog .cq183-preface .cq183-preface-body{font:14px/1.75 Georgia,serif!important;color:#e3dfd5!important;max-width:none}
#dialog .cq183-guide-summary{gap:20px;position:relative;min-height:158px;margin:18px 0 4px}
#dialog .cq183-guide-summary>img{width:112px;height:166px;flex:0 0 112px;object-fit:contain;object-position:center bottom;background:none;border:0;border-radius:0;filter:drop-shadow(0 5px 16px #e9b65b38);mask-image:linear-gradient(#000 0%,#000 78%,transparent 100%);animation:cq187-guide-drift 5s ease-in-out infinite}
#dialog .cq183-guide-summary strong{font:700 22px/1.2 Georgia,serif;color:#ffe1a8}
#dialog .cq183-guide-summary span{color:#c8c9c6;font-size:12px;line-height:1.5}
#dialog .cq183-preface blockquote{font:italic 15px/1.65 Georgia,serif;border-left:2px solid #d8b676;padding:8px 16px;margin:10px 0 18px;color:#e9ddc4}
#dialog .cq183-mission{background:linear-gradient(110deg,#d8b37513,#ffffff03);border:1px solid #b598603b;border-radius:12px;padding:14px 17px}
#dialog .cq183-mission>strong{color:#edca8c;font-size:10px;letter-spacing:.18em}
#dialog .cq183-mission p{color:#d9dcd9!important;font-size:12px!important;line-height:1.65!important}
#dialog .cq183-guide-library{background:linear-gradient(135deg,#1e3039,#181e2e);border-radius:16px;padding:20px}
#dialog .cq183-guide-detail{border-color:#c6a36b44;border-radius:14px;background:#ffe3ae04}
/* Boutons de chapitre : relief discret, lumière au survol et focus lisible. */
#dialog .cq183-preface .btn,#dialog .cq183-guide-library .btn,#cinematic .btn{position:relative;overflow:hidden;isolation:isolate;min-height:46px;padding:12px 22px;border:1px solid #f1cf8d;border-radius:12px;background:linear-gradient(180deg,#ffe7b1,#e0b66c 58%,#b77c39);box-shadow:0 4px 0 #6b4729,0 9px 24px #0004,inset 0 1px #fff4d9c9;color:#332419;font:750 13px/1.3 system-ui,sans-serif;letter-spacing:.015em;transition:filter .18s,transform .18s,box-shadow .18s}
#dialog .cq183-preface .btn::before,#cinematic .btn::before{content:'';position:absolute;z-index:-1;inset:-100% -30%;background:linear-gradient(105deg,transparent 42%,#fff4c84d 50%,transparent 58%);transform:translateX(-75%);transition:transform .6s;pointer-events:none}
#dialog .cq183-preface .btn:hover,#cinematic .btn:hover{filter:brightness(1.08);transform:translateY(-2px);box-shadow:0 6px 0 #6b4729,0 12px 28px #0005}
#dialog .cq183-preface .btn:hover::before,#cinematic .btn:hover::before{transform:translateX(75%)}
#dialog .cq183-preface .btn:active,#cinematic .btn:active{transform:translateY(2px);box-shadow:0 1px 0 #6b4729}
#dialog .cq183-preface .btn.alt,#dialog .cq183-guide-library .btn.alt,#cinematic .btn.alt{background:linear-gradient(#354451,#23313f);border-color:#bda47588;color:#e9dfca;box-shadow:0 3px 0 #111b27,inset 0 1px #fff1}
#dialog .cq183-preface .btn:focus-visible,#cinematic .btn:focus-visible{outline:3px solid #ffe1a0;outline-offset:4px}
/* Rencontres 1/2 et 2/2 : grand guide transparent, décor de l’époque et poussière lumineuse. */
.scene #cinematic{align-items:center;background:linear-gradient(90deg,#11172766,#11182733 34%,#101727b8 66%,#0e1524ed),var(--cq187-epoch-art,none) center/cover no-repeat}
.scene #cinematic::before{inset:0;z-index:0;background:radial-gradient(ellipse at 26% 45%,#f6c56c47,transparent 48%),linear-gradient(0deg,#0a111cbd,transparent 32%,transparent 78%,#0c12247d)}
.scene #cinematic::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(circle,#f9dea477 0 1px,transparent 2px) 0 0/137px 137px,radial-gradient(circle,#ffdf9b55 0 1px,transparent 2px) 35px 45px/191px 173px;animation:cq187-dust 22s linear infinite;opacity:.6}
.scene #cinematic .cin-portrait{left:0;bottom:-2%;width:48%;height:99%;max-width:none;border:0;border-radius:0;background-position:center bottom;background-size:contain;background-color:transparent;box-shadow:none;filter:drop-shadow(0 12px 28px #0007) drop-shadow(0 0 20px #ffc87430);mask-image:linear-gradient(180deg,#000 0%,#000 78%,transparent 100%);opacity:.97;animation:cq187-guide-drift 5.5s ease-in-out infinite;z-index:2}
.scene #cinematic .cin-panel{position:relative;z-index:3;width:53%;max-width:none;max-height:90%;overflow:auto;overscroll-behavior:contain;margin:0 3.5% 0 auto;padding:clamp(18px,2.8vw,32px);border:1px solid #d6b2778c;border-radius:20px;background:linear-gradient(140deg,#1b2735ed,#171d2dee);box-shadow:0 22px 60px #0008,inset 0 1px #ffe3b72b;backdrop-filter:blur(9px);scrollbar-width:thin;scrollbar-color:#b99154 #151c2b}
.scene #cinematic .cin-panel h2{font:700 clamp(22px,3.3vw,39px)/1.12 Georgia,serif;letter-spacing:-.02em;color:#ffdda2;margin:10px 0 18px}
.scene #cinematic .cin-panel p{font:clamp(13px,1.45vw,16px)/1.75 Georgia,serif;color:#ece4d6;margin:10px 0 20px;white-space:pre-line}
.scene #cinematic .cin-kicker{color:#e3c187;font-size:10px;letter-spacing:.19em;line-height:1.6}
.scene #cinematic .cq9-cinema-actions{gap:10px;align-items:stretch}
.scene #cinematic .cq9-cinema-actions #cin-next{flex:1}
.scene #cinematic .cin-counter{display:block;position:static;margin-top:15px;font-size:10px;letter-spacing:.16em;color:#a9b8bc;text-align:right}
#voice-status:empty{display:none}
.scene #cinematic .cin-bars{height:10px;z-index:4;opacity:.55;pointer-events:none}
/* Musée : l’image entière et ses repères partagent le même rectangle de coordonnées. */
.cq173-stage-wrap{display:flex;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(ellipse,#3e3440,#0b1422 80%)}
.cq173-stage-wrap>.cq173-stage{flex:none;max-width:100%;max-height:100%;background-size:contain!important;background-repeat:no-repeat;background-position:center!important}
.cq173-museum .cq173-hero{transform:translate(-50%,-100%);filter:drop-shadow(0 8px 7px #0006);max-width:none;max-height:none}
.cq173-museum .cq173-hero-sprite{display:block;width:100%;height:100%;background:none!important;animation:none!important;transform:none!important;translate:none!important;rotate:none!important}
.cq173-museum .cq173-hero-shadow{bottom:5px;left:29%;width:42%;height:8px;opacity:.6}
.cq173-museum .cq173-side{scrollbar-width:thin;scrollbar-color:#a98753 #151c2b;overscroll-behavior:contain;min-width:0}
.cq173-museum .cq173-side>section{flex:0 0 auto;min-width:0}
.cq173-museum .cq173-guide{grid-template-columns:108px minmax(0,1fr);align-items:start}
.cq173-museum .cq173-guide-portrait{width:108px;height:174px;object-fit:contain;object-position:center;border-radius:10px;background:linear-gradient(#d3b27110,#0a1427);box-shadow:0 8px 22px #0005}
.cq173-museum .cq173-guide-content{min-width:0;overflow-wrap:anywhere}
.cq173-museum .cq173-guide-talk{width:100%;font-size:12px;padding:10px 7px}
.cq173-museum .cq173-guide-dialog{grid-template-columns:140px minmax(0,1fr)}
.cq173-museum .cq173-guide-dialog img{width:140px;height:210px;object-fit:contain;object-position:center;background:transparent;border:0;filter:drop-shadow(0 7px 18px #e0b56c25)}
.cq173-museum .cq173-overlay{overflow:hidden}
.cq173-museum .cq173-card{max-width:100%;max-height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
@keyframes cq187-guide-drift{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes cq187-dust{to{background-position:137px -137px,226px -128px}}
@media(max-width:760px){#dialog:has(.era-cards){padding:16px}#dialog .era-cards img{height:90px}#dialog .cq183-preface{grid-template-columns:1fr;gap:16px;padding:21px}#dialog .cq183-preface-art>img{max-height:180px}#dialog .cq183-guide-summary{min-height:128px}#dialog .cq183-guide-summary>img{width:96px;height:140px;flex-basis:96px}.scene #cinematic .cin-panel{width:61%;margin-right:2%;padding:16px;border-radius:14px;max-height:94%}.scene #cinematic .cin-portrait{left:-8%;width:51%;height:94%}.scene #cinematic .cin-panel h2{font-size:23px}.scene #cinematic .cin-panel p{font-size:12px;line-height:1.65}.scene #cinematic .btn{font-size:11px;padding:9px 12px;min-height:38px}.cq173-museum .cq173-guide-dialog{grid-template-columns:1fr}.cq173-museum .cq173-guide-dialog img{margin:auto;height:160px;width:110px}}
@media(max-height:480px){#dialog:has(.era-cards) h1{font-size:27px}#dialog .era-cards{gap:9px;margin:12px 0}#dialog .era-cards img{height:72px}#dialog .era-card .detail{min-height:44px;padding:7px}.scene #cinematic .cin-panel{padding:14px 18px}.scene #cinematic .cin-panel h2{font-size:24px;margin:6px 0 10px}.scene #cinematic .cin-panel p{font-size:12px;line-height:1.55;margin:8px 0 12px}.scene #cinematic .cin-counter{margin-top:9px}.scene #cinematic .btn{min-height:35px;padding:8px 12px}}
@media(prefers-reduced-motion:reduce){.scene #cinematic::after,.scene #cinematic .cin-portrait,#dialog .cq183-guide-summary>img{animation:none!important}#dialog .cq183-preface .btn,#cinematic .btn{transition:none}#dialog .cq183-preface .btn::before,#cinematic .btn::before{display:none}}
.scene #cinematic .cin-counter{float:none;padding-top:0}
@media (pointer:coarse) and (orientation:landscape) and (max-height:600px){
 .app:has(.cq173-museum)>.top,.app:has(.cq173-museum) .controls,.app:has(#cinematic:not([hidden])) .controls,.app:has(#overlay:not(.hidden)) .controls{visibility:hidden;pointer-events:none}
 #dialog{max-height:100%!important}
}

/* ===== css/finish-v1864.css ===== */
/* 18.6.4 — carnet à pages, guides, profils et drapeaux SVG. */
.cq1864-flag{display:inline-block;width:24px;height:18px;object-fit:contain;flex:none;vertical-align:middle;border-radius:3px;box-shadow:0 0 0 1px #ffffff20;margin-right:5px}.cq1864-native-select{display:none!important}.cq1864-combo{position:relative;min-width:0}.cq1864-combo-button{display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;min-height:42px;padding:10px 12px;border:1px solid #af996d88;border-radius:10px;background:linear-gradient(#243c47,#192b3a);color:#f4e6c9;font:inherit;font-size:13px;text-align:left;cursor:pointer}.cq1864-combo-button>span:not(.cq1864-chevron){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cq1864-chevron{margin-left:auto;color:#d0b67e}.cq1864-combo-button:focus-visible{outline:3px solid #e8c37f;outline-offset:3px}.cq1864-combo-popup{position:fixed;inset:auto;z-index:9999;box-sizing:border-box;margin:0;padding:8px;border:1px solid #d8b87e;border-radius:12px;background:linear-gradient(#243443,#121f2d);color:#f5e5c7;box-shadow:0 20px 60px #0009;overflow:hidden;font:13px system-ui,sans-serif}.cq1864-combo-search{display:block;width:100%;box-sizing:border-box;margin:0 0 6px!important;padding:9px 11px;border:1px solid #a98d5f;border-radius:7px;background:#102432;color:#fff0d4;font:inherit}.cq1864-combo-list{max-height:260px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b99762 #152431}.cq1864-combo-list [role=option]{display:flex;align-items:center;gap:8px;width:100%;border:0;border-radius:6px;padding:9px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.cq1864-combo-list [role=option]>span:first-of-type{flex:1}.cq1864-combo-list [role=option]:hover,.cq1864-combo-list [role=option]:focus{outline:0;background:#b58d4933}.cq1864-combo-list [aria-selected=true]{background:#b58d491f;color:#ffdfa3}.cq1864-empty{padding:12px}.cq1864-language-control .cq1864-combo-button,.cq1864-language-control{font-size:11px}.cq186-language-control .cq1864-combo-button{padding:5px 8px;min-height:30px;font-size:11px}.cq16-player-avatar{display:inline-flex;align-items:center;gap:5px}.cq1864-profile-columns{display:grid;grid-template-columns:1fr 1fr;gap:15px;text-align:left;margin:14px auto 5px;max-width:520px}.cq1864-profile-columns label{display:block;color:#dec994;font-size:12px;margin:0 0 6px}#dialog:has(#cq16-register){width:min(650px,100%);padding:20px 26px;overflow:hidden}#dialog:has(#cq16-register)>h2{font-size:31px;margin:7px 0 9px}#dialog:has(#cq16-register)>p{font-size:12px;margin:6px 0 12px}#cq16-register{margin:auto;max-width:540px;min-height:0}#cq16-register #cq16-pseudo{font-size:15px;padding:10px;margin:7px auto 10px}#cq16-register .cq16-avatars{grid-template-columns:repeat(10,minmax(0,1fr));gap:6px;margin:9px auto}#cq16-register .cq16-avatar-option span{min-height:38px;font-size:24px;border-radius:9px}#cq16-register .cq16-label{font-size:12px}#cq16-register .note{font-size:10px;margin:5px 0}#cq16-register .buttons{margin-top:14px}#cq16-register-error:empty{display:none}.cq1864-avatar-section>summary{cursor:pointer;color:#e0cda5;font-size:12px;padding:5px}.cq1864-avatar-section{margin:6px auto}
/* HUD disponible en jeu ; une modale conserve l’exclusivité du clavier et des clics. */
.app>.top{position:sticky;top:0;z-index:45;background:linear-gradient(#172331f2,#172331dc);backdrop-filter:blur(8px);border-radius:12px;padding:8px}.hud.cq1864-modal-active{opacity:.5}.controls .direction{display:grid;grid-template-columns:repeat(3,54px);gap:8px;align-items:center}.controls .direction button{display:grid;place-items:center;width:54px;height:52px;min-height:52px;margin:0;padding:0;line-height:1;font-size:20px}
/* Carnet : le cadre ne défile pas ; les quatre pages sont sélectionnables. */
#dialog:has(.cq1864-notebook){width:min(1200px,100%);height:100%;max-height:100%!important;overflow:hidden!important;padding:16px;background:linear-gradient(145deg,#1e2632,#111e2b);border-radius:20px}.cq1864-notebook{height:100%;min-height:0;display:flex;flex-direction:column;gap:12px;text-align:left}.cq1864-notebook-head{display:flex;justify-content:space-between;align-items:center;gap:15px;flex:none;padding:3px 4px 10px;border-bottom:1px solid #c3a36b40}.cq1864-notebook-head .eyebrow{font-size:9px;letter-spacing:.14em}.cq1864-notebook-head h2{font:700 clamp(21px,2.5vw,32px)/1.2 Georgia,serif!important;margin:6px 0!important}.cq1864-count{flex:none;display:flex;flex-direction:column;align-items:center;padding:7px 12px;border:1px solid #c3a36b66;border-radius:10px;background:#e5c38a0a}.cq1864-count strong{font:700 24px Georgia,serif;color:#ffe0a5}.cq1864-count span{font-size:10px;color:#c3c9c7;margin-top:3px}.cq1864-notebook .cq-codex-grid{flex:1;min-height:0;grid-template-columns:minmax(160px,.75fr) minmax(0,1.4fr) minmax(250px,1fr);gap:14px;align-items:stretch}.cq1864-notebook [data-notebook-pane]{min-height:0;min-width:0;padding:14px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ab8a56 transparent}.cq1864-notebook .cq-guide-panel{display:flex;flex-direction:column}.cq1864-notebook .cq-guide-figure{flex:1;min-height:80px;max-height:250px;object-fit:contain;border:0;background:radial-gradient(ellipse,#c89d4b19,transparent 70%);box-shadow:none;border-radius:0;mask-image:linear-gradient(#000 85%,transparent)}.cq1864-notebook .cq-guide-scroll{flex:none;padding:13px;margin-top:8px;border-radius:12px}.cq1864-notebook .cq-guide-scroll h3{font-size:16px;margin-bottom:7px}.cq1864-notebook .cq-guide-scroll p{font-size:11px;line-height:1.5;margin:5px 0}.cq1864-notebook summary{cursor:pointer;font-size:11px;line-height:1.5}.cq1864-notebook .cq-theme{font:16px/1.5 Georgia,serif;margin:0 0 10px}.cq1864-guide-advice{font-size:12px;padding:9px 0;border-bottom:1px solid #baa16d33}.cq1864-guide-advice p{font-size:12px!important;line-height:1.6!important;margin:8px 0!important}.cq1864-entry-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:14px 0}.cq1864-entry-tabs button,.cq1864-notebook-views button{font:650 11px system-ui;color:#dcd7c5;border:1px solid #9d865849;background:#243441;padding:9px 5px;border-radius:7px;cursor:pointer}.cq1864-entry-tabs [aria-selected=true],.cq1864-notebook-views [aria-pressed=true]{border-color:#d4af6f;background:#b78b3b2b;color:#ffe0a1}.cq1864-entry-tabs button:focus-visible{outline:2px solid #f4ce86;outline-offset:2px}.cq1864-notebook .cq-journal{max-height:none;overflow:visible;display:block}.cq1864-notebook .cq-entry{margin:0;padding:16px;border-radius:12px}.cq1864-notebook .cq-entry[hidden]{display:none}.cq1864-notebook .cq-entry b{font:700 18px/1.4 Georgia,serif;color:#f9dba1}.cq1864-notebook .cq-entry p{font-size:13px;line-height:1.75;margin:13px 0;max-width:none}.cq1864-notebook .cq-entry small{font-size:11px;color:#b8c7c5;line-height:1.6;display:block}.cq1864-notebook .cq-entry-head{align-items:start;flex-wrap:wrap}.cq1864-notebook .cq-entry-head span{font-size:10px}.cq1864-entry-place{display:flex;flex-direction:column;gap:4px;margin-top:18px;padding-top:12px;border-top:1px solid #c7a46e3b;font-size:12px;color:#c3d0c9}.cq1864-entry-place strong{font-size:10px;text-transform:uppercase;color:#dabc82;letter-spacing:.12em}.cq1864-temple-map{border:1px solid #b396614d;border-radius:12px;background:radial-gradient(ellipse at top,#b3934d20,#101e2b);padding:5px;margin-bottom:12px}.cq1864-temple-map svg{display:block;width:100%;height:auto;max-height:170px}.cq1864-map-path{fill:none;stroke:#bfa16b;stroke-width:3;stroke-dasharray:3 3}.cq1864-map-arrow{fill:none;stroke:#d6b678;stroke-width:2}.cq1864-map-room rect{fill:#263645;stroke:#af966b;stroke-width:1.5}.cq1864-map-room.current rect{fill:#71562d55;stroke:#f6d497;stroke-width:2.5}.cq1864-map-room.found rect{stroke:#86bda3}.cq1864-map-room.locked rect{fill:#1b2530;stroke:#647078;stroke-dasharray:4 3}.cq1864-map-room text{fill:#deded2;text-anchor:middle;font:10px system-ui,sans-serif}.cq1864-map-room .cq1864-map-number{fill:#f6d496;font:bold 16px Georgia,serif}.cq1864-map-room .cq1864-map-state{font-size:8px;fill:#abbdb7}.cq1864-map-pointer{fill:#f1cd83}.cq1864-map-room .cq1864-map-you{font-size:8px;fill:#f3d698}.cq1864-notebook .cq-location-guide{padding:11px;border-radius:10px;background:#172735}.cq1864-notebook .cq-location-guide h4{font-size:14px;line-height:1.4;margin:0 0 10px}.cq1864-notebook .cq-location-guide h4 span{font:10px system-ui;color:#c4b087}.cq1864-notebook .cq-location-track{display:grid;grid-template-columns:1fr;gap:8px}.cq1864-notebook .cq-location-node{display:grid;grid-template-columns:25px minmax(0,1fr);gap:10px;text-align:left;padding:9px;align-items:start}.cq1864-notebook .cq-location-node b{display:block;font:700 12px/1.4 Georgia,serif}.cq1864-notebook .cq-location-node small{display:block;font-size:10px;line-height:1.6;margin-top:5px;color:#bfcbc8}.cq1864-notebook .cq-room-number{width:23px;height:23px;font-size:12px;grid-row:auto}.cq1864-notebook .cq-codex-actions{flex:none;margin:0!important;padding-top:9px;border-top:1px solid #c3a36b40}.cq1864-notebook .cq-codex-actions .btn{min-height:39px;padding:9px 16px;font-size:12px}.cq1864-notebook-views{display:none;flex:none;gap:6px}.cq1864-notebook [hidden]{display:none!important}
/* Pages des guides : portrait présent, contenu hiérarchisé et actions à droite. */
#dialog:has(.cq183-guide-library){width:min(980px,100%);padding:15px;background:linear-gradient(135deg,#25343c,#141d2b);border-radius:22px}#dialog .cq183-guide-library{padding:22px;background:radial-gradient(ellipse at 15% 10%,#c59d5620,transparent 55%),linear-gradient(140deg,#1b303b,#171e2c)}#dialog .cq183-guide-library>h2{font-size:clamp(25px,3vw,36px);margin:10px 0 24px}#dialog .cq183-guide-library .cq183-guide-detail{display:grid;grid-template-columns:200px minmax(0,1fr);gap:8px 28px;padding:24px;margin:0;border:1px solid #c6a36b70;border-radius:16px;background:linear-gradient(120deg,#f5d08a08,#ffffff03)}#dialog .cq183-guide-library .cq183-guide-summary{display:contents}#dialog .cq183-guide-library .cq183-guide-summary>img{grid-column:1;grid-row:1 / span 5;width:200px;height:280px;max-height:100%;object-fit:contain;align-self:center;flex:none;filter:drop-shadow(0 8px 18px #d1aa5633)}#dialog .cq183-guide-library .cq183-guide-summary>div,#dialog .cq183-guide-library .cq183-biography,#dialog .cq183-guide-library .cq183-credits,#dialog .cq183-guide-library .cq183-quote,#dialog .cq183-guide-library [data-talk-guide]{grid-column:2}#dialog .cq183-guide-library .cq183-guide-summary strong{font:700 29px/1.2 Georgia,serif}#dialog .cq183-guide-library .cq183-guide-summary span{font-size:12px;margin:9px 0;color:#b8c9c6}#dialog .cq183-guide-library .cq183-quote{font:italic 17px/1.7 Georgia,serif;margin:15px 0;color:#e9ddc5;max-width:none}#dialog .cq183-guide-library [data-talk-guide]{justify-self:start;align-self:start;margin:4px 0 8px;padding:12px 22px}#dialog .cq183-guide-library .buttons{margin-top:22px}
@media(max-width:1050px){.cq1864-notebook-views{display:flex}.cq1864-notebook .cq-codex-grid{display:block}.cq1864-notebook [data-notebook-pane]{height:100%;display:none}.cq1864-notebook[data-view=journal] [data-notebook-pane=journal],.cq1864-notebook[data-view=map] [data-notebook-pane=map]{display:block}.cq1864-notebook[data-view=guide] [data-notebook-pane=guide]{display:flex}.cq1864-notebook [data-notebook-pane=guide]{flex-direction:row;gap:20px;align-items:center}.cq1864-notebook .cq-guide-figure{width:35%;height:100%;max-height:300px;min-height:0}.cq1864-notebook .cq-guide-scroll{flex:1}.cq1864-notebook .cq-location-track{grid-template-columns:repeat(3,minmax(0,1fr))}.cq1864-notebook .cq-location-node{grid-template-columns:1fr;gap:6px}.cq1864-notebook .cq1864-temple-map{max-width:530px;margin:0 auto 10px}}
@media(max-width:650px){#dialog:has(.cq1864-notebook){padding:10px;border-radius:13px}.cq1864-notebook{gap:8px}.cq1864-notebook-head{gap:8px}.cq1864-notebook-head h2{font-size:20px!important}.cq1864-notebook-head .eyebrow{font-size:8px}.cq1864-count{padding:6px}.cq1864-count strong{font-size:20px}.cq1864-count span{font-size:8px}.cq1864-notebook .cq-location-track{grid-template-columns:1fr}.cq1864-notebook .cq-location-node{grid-template-columns:25px minmax(0,1fr)}#dialog .cq183-guide-library{padding:12px}#dialog .cq183-guide-library .cq183-guide-detail{grid-template-columns:105px minmax(0,1fr);padding:15px;gap:8px 15px}#dialog .cq183-guide-library .cq183-guide-summary>img{width:105px;height:190px}#dialog .cq183-guide-library .cq183-guide-summary strong{font-size:23px}#dialog .cq183-guide-library .cq183-quote{font-size:14px}#dialog:has(#cq16-register){padding:12px 18px}#cq16-register .cq16-avatars{grid-template-columns:repeat(8,minmax(0,1fr))}#cq16-register .cq16-avatar-option span{font-size:22px;min-height:32px}.cq1864-profile-columns{gap:10px}.cq1864-combo-button{font-size:11px;padding:8px}.cq1864-flag{width:21px;height:16px}.controls .direction{grid-template-columns:repeat(3,46px)}.controls .direction button{width:46px;height:49px;min-height:49px}}
@media(max-height:480px){#dialog:has(#cq16-register){padding:10px 20px}#dialog:has(#cq16-register)>h2{font-size:24px}#dialog:has(#cq16-register)>.eyebrow,#dialog:has(#cq16-register)>p{display:none}#cq16-register .cq16-avatar-option span{min-height:27px;font-size:19px}#cq16-register .cq16-avatars{margin:5px auto;gap:4px}#cq16-register .cq1864-profile-columns{margin-top:7px}#cq16-register .buttons{margin-top:8px}.cq1864-combo-button{min-height:33px;padding:7px 10px}.cq1864-notebook-head h2{font-size:21px!important}.cq1864-notebook [data-notebook-pane]{padding:10px}.cq1864-notebook .cq-codex-actions{padding-top:6px}.cq1864-notebook .cq-entry{padding:11px}.cq1864-notebook .cq-entry p{margin:8px 0}.cq1864-notebook .cq1864-temple-map svg{max-height:110px}}
@media(pointer:coarse) and (orientation:landscape) and (max-height:600px){.app .controls .direction{display:grid!important;grid-template-columns:repeat(3,52px);align-items:center!important;gap:7px!important}.app .controls .direction button{width:52px!important;min-width:52px!important;height:51px!important;min-height:51px!important;padding:0!important}.app:has(#dialog .cq1864-notebook)>.top{visibility:visible}.cq1864-notebook-views{display:flex}.cq1864-notebook .cq-codex-grid{display:block}.cq1864-notebook [data-notebook-pane]{display:none;height:100%}.cq1864-notebook[data-view=journal] [data-notebook-pane=journal],.cq1864-notebook[data-view=map] [data-notebook-pane=map],.cq1864-notebook[data-view=guide] [data-notebook-pane=guide]{display:block}}
.cq1864-combo-popup{display:flex;flex-direction:column}.cq1864-combo-search{flex:none}.cq1864-combo-list{min-height:0;flex:1 1 auto}.cq1864-custom-grid{display:grid;grid-template-columns:minmax(170px,.7fr) minmax(0,1.3fr);gap:16px;flex:1;min-height:0}.cq1864-custom-grid>aside,.cq1864-custom-grid>.cq-main-panel{min-height:0;overflow:auto;scrollbar-width:thin}.cq1864-custom-grid .cq183-guide-summary{display:flex;flex-direction:column;text-align:center;margin-top:0!important}.cq1864-custom-grid .cq183-guide-summary>img{height:180px!important;width:125px!important}.cq1864-custom-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.cq1864-custom-pager span{font-size:12px;color:#d4bb89}.cq1864-custom-pager button{padding:6px 14px}.cq1864-custom-guide{padding:12px;border:1px solid #a88c544d;border-radius:12px;background:#182835}.cq1864-custom-guide .cq183-guide-summary strong{font-size:22px!important}#dialog:has(#cq16-register){display:flex;flex-direction:column}#cq16-register{width:100%;overflow:auto;scrollbar-width:none;overscroll-behavior:contain}#cq16-register::-webkit-scrollbar{display:none}#cq16-register .buttons{position:sticky;bottom:0;padding:8px 0 3px;background:linear-gradient(0deg,#17202df5,#17202dd9);z-index:1}
@media(max-width:650px){.cq1864-custom-grid{grid-template-columns:1fr}.cq1864-custom-guide{display:none}}
.cq1864-hint-tabs{display:flex;gap:5px;margin:0 0 9px}.cq1864-hint-tabs button{flex:1;min-width:0;border:1px solid #a88b554d;border-radius:6px;padding:6px 3px;font:600 10px system-ui;background:#263746;color:#cdd4cb;cursor:pointer}.cq1864-hint-tabs button[aria-pressed=true]{background:#bd934836;border-color:#d3af72;color:#ffe3aa}.cq1864-notebook .cq1864-temple-map svg{max-height:130px}.cq1864-notebook .cq-location-track{grid-template-columns:1fr}.cq1864-notebook .cq-location-node{grid-template-columns:25px minmax(0,1fr)}.cq1864-notebook .cq-side-panel{scrollbar-width:none}.cq1864-notebook .cq-side-panel::-webkit-scrollbar{display:none}

/* ===== css/admin-icons-v1864.css ===== */
@font-face{font-family:'CQ Font Awesome';font-style:normal;font-weight:900;font-display:block;src:url('../assets/vendor/fontawesome/fa-solid-900.woff2') format('woff2')}.cq-fa{font-family:'CQ Font Awesome'!important;font-style:normal;font-weight:900;font-variant:normal;text-rendering:auto;display:inline-block;width:1.25em;text-align:center;line-height:1;margin-right:.45em;-webkit-font-smoothing:antialiased}.sidebar .cq-fa{color:#d5b47a}.toolbar .cq-fa{font-size:13px}
.cq-fa-book-open::before{content:"\f518"}
.cq-fa-layer-group::before{content:"\f5fd"}
.cq-fa-globe::before{content:"\f0ac"}
.cq-fa-user-astronaut::before{content:"\f4fb"}
.cq-fa-circle-info::before{content:"\f05a"}
.cq-fa-cloud-arrow-up::before{content:"\f0ee"}
.cq-fa-images::before{content:"\f302"}
.cq-fa-floppy-disk::before{content:"\f0c7"}
.cq-fa-right-from-bracket::before{content:"\f2f5"}
.cq-fa-play::before{content:"\f04b"}
.cq-fa-house::before{content:"\f015"}
.cq-fa-user-gear::before{content:"\f4fe"}
.cq-fa-gear::before{content:"\f013"}
.cq-fa-star::before{content:"\f005"}
.cq-fa-gem::before{content:"\f3a5"}
.cq-fa-heart::before{content:"\f004"}
.cq-fa-expand::before{content:"\f065"}
.cq-fa-compress::before{content:"\f066"}
.cq-fa-volume-high::before{content:"\f028"}
.cq-fa-volume-xmark::before{content:"\f6a9"}
.cq-fa-pause::before{content:"\f04c"}
.cq-fa-key::before{content:"\f084"}
.cq-fa-gears::before{content:"\f085"}
.cq-fa-door-open::before{content:"\f52b"}
.cq-fa-circle::before{content:"\f111"}
.cq-fa-check::before{content:"\f00c"}
.cq-fa-wand-magic-sparkles::before{content:"\e2ca"}
.cq-fa-map-location-dot::before{content:"\f5a0"}
.cq-fa-suitcase::before{content:"\f0f2"}
.cq-fa-trophy::before{content:"\f091"}
.cq-fa-id-card::before{content:"\f2c2"}
.cq-fa-landmark::before{content:"\f66f"}
.cq-fa-medal::before{content:"\f5a2"}
.cq-fa-users::before{content:"\f0c0"}
.cq-fa-user::before{content:"\f007"}
.cq-fa-language::before{content:"\f1ab"}
.cq-fa-comment-dots::before{content:"\f4ad"}
.cq-fa-hourglass-half::before{content:"\f252"}
.cq-fa-chess-rook::before{content:"\f447"}
.cq-fa-ankh::before{content:"\f644"}
.cq-fa-palette::before{content:"\f53f"}

/* ===== css/nav-v1865.css ===== */
/* 18.6.5 — une ligne de navigation, une ligne d’informations de partie. */
.app>.top{display:flex;flex-wrap:nowrap;align-items:center;gap:14px;min-height:58px;margin-bottom:6px;padding:9px 12px;overflow:visible}.app>.top .logo{flex:0 1 auto;min-width:0;gap:8px}.app>.top .logo strong{display:flex;align-items:baseline;white-space:nowrap;font-size:clamp(17px,1.8vw,24px);letter-spacing:.035em;line-height:1.2}.cq1865-era-title{display:inline-flex;gap:4px;min-width:0;margin-left:6px;font:500 clamp(12px,1.2vw,16px)/1.3 Georgia,serif;letter-spacing:0;color:#dbc697}#era{display:inline-block;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app>.top .logo small{font-size:8px;letter-spacing:.13em}.app>.top .logomark{font-size:27px}.app>.top .hud{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;flex:1;min-width:0;gap:5px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:4px 2px}.app>.top .hud::-webkit-scrollbar{display:none}.app>.top .hud>button{display:inline-flex;align-items:center;justify-content:center;flex:none;white-space:nowrap;min-height:34px;padding:7px 9px;font-size:11px;gap:5px;border-radius:9px}.app>.top .hud .cq-fa{margin:0;width:1.15em;font-size:13px}.cq1865-icon-button{width:35px;min-width:35px;padding:7px!important}.cq1865-nav-label{white-space:nowrap}.app>.top .cq16-player{max-width:135px;padding:5px 8px}.app>.top .cq16-player-name{max-width:85px;font-size:10px}.app>.top .cq16-player-avatar{font-size:19px}.app>.top .cq16-player .cq1864-flag{width:18px;height:14px;margin-right:0}.cq186-language-control [data-cq186-language-label]{display:none}.cq186-language-control{gap:0;flex:none}.cq186-language-control .cq1864-combo-button{min-height:32px;max-width:125px;padding:6px 8px;font-size:10px}.cq186-language-control .cq1864-flag{width:18px;height:14px;margin:0}.cq186-language-control .cq1864-chevron{font-size:10px}
.cq1865-statusbar{display:flex;align-items:center;gap:10px;min-height:36px;margin:0 2px 8px;padding:0 3px;min-width:0}.cq1865-counters{display:flex;align-items:center;gap:7px;flex:none}.cq1865-counters .pill{display:flex;align-items:center;gap:6px;min-height:32px;padding:6px 10px;font-size:11px;border-color:#ad925c80;background:linear-gradient(#26333f,#1a2735);box-shadow:inset 0 1px #fff1}.cq1865-counters .cq-fa{margin:0;font-size:11px;color:#ddc18a}.cq1865-counters .cq-fa-gem{color:#5ed6f0}.cq1865-counters .cq1865-life-icon{color:#ef5c66;filter:drop-shadow(0 0 4px #f4636344)}#hearts{font-size:13px;letter-spacing:1px;color:#f0d6a1;white-space:nowrap}.cq1865-statusbar #interaction-status{position:static!important;inset:auto!important;display:flex;align-items:center;flex-wrap:nowrap;gap:7px;min-width:0;max-width:none!important;margin-left:auto;padding:6px 11px;font-size:10px;line-height:1.3;border-color:#a78b5370;background:#172735cc;box-shadow:none;opacity:1;visibility:visible;white-space:nowrap;overflow:hidden}.cq1865-mechanism{display:inline-flex;align-items:center;gap:4px;flex:none}.cq1865-mechanism .cq-fa{margin:0;font-size:11px;width:auto;color:#dec18b}.cq1865-mechanism .cq-fa-circle{font-size:5px;opacity:.5}.cq1865-mechanism .cq-fa-check{font-size:9px}.cq1865-mechanism.done .cq-fa{color:#8bd8b2}.cq1865-status-dot{color:#8d9b9e}.cq1865-status-prompt{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:9px;color:#c4ceca;padding-left:7px;border-left:1px solid #b89a5d55}.cq1865-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Lumière et relief partagés avec les boutons de départ d’époque. */
.btn,.tiny,.button,.controls button,.cq1864-combo-button{position:relative;isolation:isolate;overflow:hidden;transition:filter .18s,box-shadow .18s,transform .18s,border-color .18s}.btn::before,.tiny::before,.button::before,.controls button::before,.cq1864-combo-button::before{content:'';position:absolute;inset:-100% -30%;z-index:-1;background:linear-gradient(105deg,transparent 42%,#fff4c84a 50%,transparent 58%);transform:translateX(-75%);transition:transform .55s;pointer-events:none}.btn:not(:disabled):hover,.tiny:not(:disabled):hover,.button:not(:disabled):hover,.controls button:not(:disabled):hover,.cq1864-combo-button:not(:disabled):hover{filter:brightness(1.1);border-color:#ebc17c;box-shadow:0 4px 0 #65462b,0 8px 20px #0004,inset 0 1px #ffe9c12e;transform:translateY(-2px)}.btn:not(:disabled):hover::before,.tiny:not(:disabled):hover::before,.button:not(:disabled):hover::before,.controls button:not(:disabled):hover::before,.cq1864-combo-button:not(:disabled):hover::before{transform:translateX(75%)}.btn:not(:disabled):active,.tiny:not(:disabled):active,.button:not(:disabled):active,.controls button:not(:disabled):active{transform:translateY(1px);box-shadow:0 1px 0 #65462b}.btn:focus-visible,.tiny:focus-visible,.button:focus-visible{outline:2px solid #ffe0a1;outline-offset:3px}.cq1864-modal-active .tiny:hover{transform:none;box-shadow:none}
/* Une seule ligne de repères et une illustration qui respire discrètement. */
#dialog .cq183-preface .cq183-kicker{display:flex;align-items:center;gap:6px;white-space:nowrap;min-width:0;max-width:100%;font-size:10px;line-height:1.5;letter-spacing:.09em;color:#e0bf86}.cq183-kicker .cq-fa{margin:0;font-size:10px;width:1.1em;flex:none}.cq183-preface-art{isolation:isolate;overflow:hidden}#dialog .cq183-preface-art>img{animation:cq1865-art-breathe 7s ease-in-out infinite;transform-origin:center;will-change:transform}#dialog .cq183-preface-art::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(110deg,transparent 28%,#ffe3ab17 46%,transparent 67%);background-size:250% 100%;animation:cq1865-art-light 12s ease-in-out infinite;mix-blend-mode:screen}#dialog .cq183-preface-art{animation:cq1865-art-glow 7s ease-in-out infinite}
@keyframes cq1865-art-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-3px) scale(1.008)}}@keyframes cq1865-art-light{0%,100%{background-position:140% 0;opacity:.15}50%{background-position:-40% 0;opacity:.6}}@keyframes cq1865-art-glow{0%,100%{box-shadow:0 18px 42px #0006,0 0 0 #d1aa5d00}50%{box-shadow:0 18px 42px #0006,0 0 24px #d1aa5d20}}
@media(max-width:1500px){.app>.top .cq1865-nav-label{display:none}.app>.top .hud>button{width:34px;min-width:34px;padding:7px}.app>.top .hud>#cq16-player{width:auto;min-width:0}.app>.top .hud .cq16-player-name{max-width:72px}.app>.top .logo strong{font-size:21px}.app>.top .logomark{display:none}.app>.top .cq1865-era-title{font-size:14px}#era{max-width:185px}}
@media(max-width:850px){.app>.top{gap:8px;padding:7px;min-height:47px}.app>.top .logo strong{font-size:16px}.app>.top .logo small{display:none}.app>.top .cq1865-era-title{font-size:12px;margin-left:3px}#era{max-width:130px}.app>.top .hud{gap:4px}.app>.top .hud>button{width:31px;min-width:31px;min-height:31px;padding:5px}.app>.top .hud .cq16-player-name{display:none}.app>.top .cq16-player-avatar{font-size:16px}.cq1865-statusbar{gap:7px;margin-bottom:6px}.cq1865-counters{gap:5px}.cq1865-counters .pill{font-size:10px;padding:5px 7px;min-height:28px}.cq1865-statusbar #interaction-status{padding:5px 7px;gap:5px}.cq1865-status-prompt{display:none}#dialog .cq183-preface .cq183-kicker{font-size:9px;letter-spacing:.04em}}
@media(max-width:500px){.app>.top .logo strong{font-size:14px}.app>.top .cq1865-era-title{font-size:11px}#era{max-width:105px}.cq1865-statusbar{gap:5px}.cq1865-counters .pill{gap:4px;padding:5px 6px}.cq1865-statusbar #interaction-status{gap:4px;padding:5px 6px}.cq1865-mechanism .cq-fa{font-size:9px}.cq1865-status-dot{display:none}.cq1865-counters{gap:4px}}
@media(pointer:coarse) and (orientation:landscape) and (max-height:600px){.app>.top .logo{display:flex!important;max-width:38vw}.app>.top .logo strong{font-size:12px}.app>.top .logo small,.app>.top .logomark{display:none!important}.app>.top .cq1865-era-title{font-size:10px}#era{max-width:100px}.app .hud{justify-content:flex-start}.app .hud .tiny{width:29px!important;min-width:29px!important}.app .hud #cq16-player{width:auto!important;min-width:0!important}.app .cq1865-statusbar{position:absolute;left:7px;right:7px;top:41px;z-index:39;min-height:25px;margin:0;padding:0;pointer-events:none}.app .cq1865-statusbar .pill{min-height:25px;padding:4px 7px}.app .cq1865-statusbar #interaction-status{position:static!important;top:auto!important;right:auto!important;max-width:none!important;min-height:25px;padding:4px 7px}.app:has(.cq173-museum) .cq1865-statusbar,.app:has(#cinematic:not([hidden])) .cq1865-statusbar,.app:has(#overlay:not(.hidden)) .cq1865-statusbar{visibility:hidden}}
@media(prefers-reduced-motion:reduce){#dialog .cq183-preface-art,#dialog .cq183-preface-art>img,#dialog .cq183-preface-art::after{animation:none!important;will-change:auto}.btn,.tiny,.button,.controls button,.cq1864-combo-button{transition:none}.btn::before,.tiny::before,.button::before,.controls button::before,.cq1864-combo-button::before{display:none}}
/* La largeur réelle du bandeau prime sur celle de l’écran. */
.app>.top{container-type:inline-size}.app>.top .cq1865-nav-label{display:none}.app>.top .hud>button{width:34px;min-width:34px}.app>.top .hud>#cq16-player{width:auto;min-width:0}
@container(min-width:1450px){.app>.top .cq1865-nav-label{display:inline}.app>.top .hud>button{width:auto}.app>.top .hud>.cq1865-icon-button{width:35px}}

/* Emblème Chrono Quest transparent : identité du header, adaptée aux petits écrans. */
.app>.top .cq-brand-emblem{display:block;flex:none;width:48px;height:48px;object-fit:contain;opacity:.9;filter:drop-shadow(0 0 6px #24e4e066) drop-shadow(0 2px 3px #0009)}
@media(max-width:850px){.app>.top .cq-brand-emblem{width:38px;height:38px;opacity:.86}}
@media(max-width:500px){.app>.top .cq-brand-emblem{width:32px;height:32px}}
@media(pointer:coarse) and (orientation:landscape) and (max-height:600px){.app>.top .cq-brand-emblem{width:29px;height:29px;opacity:.82}}

/* Titre seul : centre turquoise et bordure dorée, comme l'emblème en couleurs inversées. */
.app>.top .cq-brand-title{color:#35e1dc;background:linear-gradient(180deg,#b9fff8 0%,#42e4de 42%,#079a9f 78%,#72f4eb 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;-webkit-text-stroke:1px #e7aa2a;paint-order:stroke fill;text-shadow:0 1px 0 #6b3500,0 0 8px #12dcd04d}

#dialog .cq183-preface .cq183-kicker{overflow:hidden}
.cq182-resume-row{display:flex;justify-content:center;margin:15px 0 3px}.cq182-resume-row .btn{min-width:min(100%,280px)}

/* ===== css/finish-v1866.css ===== */
/* 18.6.6 — musée recadré et accueil limité aux cartes d’époques. */
.cq173-museum .cq173-stage{background-size:contain!important;background-repeat:no-repeat;background-position:center!important;transform:none}
.cq173-museum .cq173-stage-wrap{min-width:0;min-height:0;overflow:hidden}
.cq173-museum .cq173-guide-portrait{object-fit:contain!important;object-position:center}
.app:has(.cq173-museum) .controls{display:none!important}
#dialog:has(.era-cards)>.buttons,#dialog:has(.era-cards)>.note{display:none!important}
.app.cq1866-epoch-menu .controls{display:none!important}
#dialog:has(.era-cards) .era-cards{margin-bottom:0}
@media (prefers-reduced-motion: reduce){.cq173-museum .cq173-stage{transform:none!important}}

/* 18.6.7 — conserver le décor illustré sans les anciennes arches superposées. */
.cq173-museum .cq173-backdrop .cq173-arch,
.cq173-museum .cq173-backdrop .cq173-banner,
.cq173-museum .cq173-backdrop .cq173-plinth{display:none!important}

/* Les actions des guides partagent le même reflet et un relief discret. */
.cq173-museum .cq173-guide-inline,
.cq173-museum .cq173-guide-talk,
.cq173-museum .cq173-exit{position:relative;isolation:isolate;overflow:hidden;transition:transform .18s ease,filter .18s ease,border-color .18s ease,box-shadow .18s ease;box-shadow:inset 0 1px #ffe6b11c,0 3px 8px #0003}
.cq173-museum .cq173-guide-inline::before,
.cq173-museum .cq173-guide-talk::before,
.cq173-museum .cq173-exit::before{content:'';position:absolute;z-index:-1;inset:-120% -35%;pointer-events:none;background:linear-gradient(105deg,transparent 40%,#ffe7ad40 50%,transparent 60%);transform:translateX(-85%);transition:transform .55s ease}
.cq173-museum .cq173-guide-inline:not(:disabled):hover,
.cq173-museum .cq173-guide-talk:not(:disabled):hover,
.cq173-museum .cq173-exit:not(:disabled):hover{transform:translateY(-2px);filter:brightness(1.1);border-color:#f0cb85;box-shadow:0 4px 0 #5f472d,0 9px 18px #0005,0 0 14px #e6b76b1c,inset 0 1px #fff1ce40}
.cq173-museum .cq173-guide-inline:not(:disabled):hover::before,
.cq173-museum .cq173-guide-talk:not(:disabled):hover::before,
.cq173-museum .cq173-exit:not(:disabled):hover::before{transform:translateX(85%)}
.cq173-museum .cq173-guide-inline:not(:disabled):active,
.cq173-museum .cq173-guide-talk:not(:disabled):active,
.cq173-museum .cq173-exit:not(:disabled):active{transform:translateY(1px);box-shadow:0 1px 0 #5f472d,inset 0 1px #fff1ce20}
.cq173-museum .cq173-guide-inline:focus-visible,
.cq173-museum .cq173-guide-talk:focus-visible,
.cq173-museum .cq173-exit:focus-visible{outline:2px solid #ffe1a3;outline-offset:3px;border-color:#ffe1a3}
@media (prefers-reduced-motion: reduce){
 .cq173-museum .cq173-guide-inline,.cq173-museum .cq173-guide-talk,.cq173-museum .cq173-exit{transition:none}
 .cq173-museum .cq173-guide-inline::before,.cq173-museum .cq173-guide-talk::before,.cq173-museum .cq173-exit::before{display:none}
 .cq173-museum .cq173-guide-inline:hover,.cq173-museum .cq173-guide-talk:hover,.cq173-museum .cq173-exit:hover,.cq173-museum .cq173-guide-inline:active,.cq173-museum .cq173-guide-talk:active,.cq173-museum .cq173-exit:active{transform:none}
}

/* ===== css/finish-v1868.css ===== */
/* 18.6.8 — commandes plus fines et signature en deux lignes. */
.app .controls{align-items:center;margin:8px 0;gap:10px}
.app .controls .direction{grid-template-columns:repeat(3,46px);gap:7px}
.app .controls .direction button{width:46px;height:40px;min-height:40px;min-width:46px;padding:0;font-size:17px;line-height:1}
.app .controls .actions{align-items:center;gap:8px}
.app .controls .actions button{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:75px;min-height:40px;height:40px;padding:7px 14px;white-space:nowrap;font-size:12px;line-height:1.15}
.app .controls .hint{font-size:10px;line-height:1.5}
.cq18-signature{padding:12px 12px 4px;text-align:center;font-size:12px;line-height:1.6;color:#e0cc9f}
.cq1868-preview-label{display:block;margin-bottom:4px;font-size:9px;letter-spacing:.13em;color:#bfc8c8}
.app main>.cq1868-footer{display:block;padding:4px 12px 13px;margin:0;text-align:center;color:#9facb6;font-size:10px;line-height:1.6}
.cq173-room-title{display:flex;align-items:center;gap:10px}
.cq173-room-title>.cq-fa{flex:none;font-size:.78em;width:1.15em;margin:0;color:#e8c17c;filter:drop-shadow(0 2px 6px #d8a64d22)}
.cq173-room-title>span{min-width:0}
.cq185-hero-card:has(canvas[data-preview-motion=walk]){border-color:#e2bd77;box-shadow:0 0 0 2px #d4ab5f22,0 8px 20px #0002}
@media(max-width:650px){.app .controls .direction{grid-template-columns:repeat(3,42px);gap:6px}.app .controls .direction button{width:42px;min-width:42px;height:38px;min-height:38px}.app .controls .actions button{height:38px;min-height:38px;min-width:65px;padding:6px 10px;font-size:11px}.cq18-signature{font-size:11px;padding-top:9px}.app main>.cq1868-footer{font-size:9px}}
@media(pointer:coarse) and (orientation:landscape) and (max-height:600px){.app .controls{height:46px!important;min-height:46px!important}.app .controls .direction{grid-template-columns:repeat(3,46px)!important;gap:6px!important}.app .controls .direction button{width:46px!important;min-width:46px!important;height:44px!important;min-height:44px!important;padding:0!important}.app .controls .actions button{height:44px!important;min-height:44px!important;min-width:65px!important;padding:6px 10px!important;font-size:12px!important}}
@media(prefers-reduced-motion:reduce){.cq185-hero-card:has(canvas[data-preview-motion=walk]){box-shadow:none}}

/* ===== css/finish-v1869.css ===== */
/* Guide and dialogue remain one group: visibility, timing and room changes. */
.cq173-museum .cq174-speech{display:grid;grid-template-columns:88px minmax(0,1fr);column-gap:14px;align-items:center;width:min(500px,65%);max-height:none;overflow:visible;padding:12px 17px 12px 10px}
.cq174-speech .cq1869-speech-guide{grid-column:1;grid-row:1 / 3;width:88px;height:140px;object-fit:contain;filter:drop-shadow(0 5px 5px #54371855)}
.cq174-speech .cq1869-curator{height:128px;border-radius:12px;box-shadow:0 0 0 1px #9e702d66}
.cq174-speech .cq174-speaker{grid-column:2;align-self:end;margin-bottom:5px}
.cq174-speech .cq174-speech-text{grid-column:2;align-self:start;margin:0;overflow-wrap:anywhere}
.workspace .card h2>.cq-fa,.workspace .card h3>.cq-fa{color:#b48337;font-size:.86em;vertical-align:.03em}
@media(max-width:700px){
 .cq173-museum .cq174-speech{grid-template-columns:52px minmax(0,1fr);column-gap:8px;width:min(360px,72%);padding:8px;bottom:10%;max-height:none}
 .cq174-speech .cq1869-speech-guide{width:52px;height:92px}
 .cq174-speech .cq1869-curator{height:84px}
}
@media(max-height:440px){
 .cq173-museum .cq174-speech{grid-template-columns:46px minmax(0,1fr);padding:7px 10px;column-gap:8px;bottom:10%;max-height:none;overflow:visible}
 .cq174-speech .cq1869-speech-guide{width:46px;height:76px}
 .cq174-speech .cq1869-curator{height:72px}
}

/* A small cross, with a comfortable touch and keyboard target. */
.cq173-museum .cq174-speech{padding-right:40px}
.cq174-speech .cq18611-speech-close{position:absolute;top:5px;right:5px;display:grid;place-items:center;width:30px;height:30px;min-width:30px;min-height:30px;padding:0;border:1px solid #9e702d80;border-radius:50%;background:#fff7df;color:#633d15;font:700 24px/1 sans-serif;cursor:pointer;pointer-events:auto;touch-action:manipulation;box-shadow:none;transform:none;transition:background .15s,color .15s}
.cq174-speech .cq18611-speech-close:hover{background:#633d15;color:#fff7df}
.cq174-speech .cq18611-speech-close:focus-visible{outline:3px solid #633d15;outline-offset:2px}

/* ===== css/features-v18612.css ===== */
.cq-fa-eye::before{content:"\f06e"}
.cq-fa-shield-halved::before{content:"\f3ed"}
.cq183-preface-art{position:relative;isolation:isolate}
.cq18612-fireflies{position:absolute;inset:0;z-index:2;overflow:hidden;border-radius:inherit;pointer-events:none}
.cq18612-fireflies span{position:absolute;left:calc(8% + var(--i)*8.5%);top:calc(18% + var(--i)*6%);width:4px;height:4px;border-radius:50%;background:#ffefb3;box-shadow:0 0 5px 2px #ffe19b99,0 0 12px #ffd272;opacity:0;animation:cq18612-firefly calc(5s + var(--i)*.37s) ease-in-out infinite;animation-delay:calc(var(--i)*-.91s)}
@keyframes cq18612-firefly{0%,100%{opacity:0;transform:translate(-6px,10px) scale(.6)}30%{opacity:.8}60%{opacity:.3;transform:translate(10px,-18px) scale(1)}80%{opacity:.7;transform:translate(-5px,-28px) scale(.8)}}
.cq18612-guardian,.cq18612-voice{margin:20px 0;padding:18px;border:1px solid #aa874c77;border-radius:14px}
.cq18612-voice legend{padding:0 8px;font-weight:700}
#cq18612-guardian-preview{display:block;width:min(100%,320px);height:auto;border:1px solid #a6854a77;border-radius:14px;background:radial-gradient(ellipse at 50% 80%,#3d454d,#172230 75%)}
@media(prefers-reduced-motion:reduce){.cq18612-fireflies{display:none}}

/* ===== css/questions-v18613.css ===== */
.cq-fa-arrow-up::before{content:"\f062"}
.cq-fa-arrow-down::before{content:"\f063"}
.cq-fa-trash::before{content:"\f1f8"}
.cq18613-question-item{margin:0 0 10px;border:1px solid #dce2df;border-radius:9px;background:#fff;overflow:hidden}
.cq18613-question-item[draggable]{cursor:grab}
.cq18613-question-item .question-row{margin:0;border-radius:8px 8px 0 0;cursor:pointer}
.cq18613-question-tools{display:flex;justify-content:flex-end;gap:6px;padding:5px 8px;background:#f6f8f5;border-top:1px solid #e9ede8}
.cq18613-question-tools button{display:grid;place-items:center;width:32px;height:30px;padding:0;border:1px solid #c9d5cf;border-radius:6px;background:white;color:#234e50}
.cq18613-question-tools button .cq-fa{margin:0;width:auto}
.cq18613-question-tools [data-question-delete]{color:#a33e3c;margin-left:6px}
.cq18613-delete-panel{padding:16px;margin-bottom:20px;background:#fff6ed;border:1px solid #cf9d73;border-radius:10px;overflow-wrap:anywhere}
.cq18613-delete-panel p{font-size:13px;line-height:1.6}
.cq18613-delete-actions{display:flex;gap:9px;flex-wrap:wrap}
.cq18613-video-check{margin:-8px 0 22px}
.cq18613-youtube{display:flex;flex-direction:column;align-items:flex-start;gap:10px;width:100%;min-width:0;max-width:100%}
.cq18613-youtube iframe.cq18-video{display:block;width:100%;height:auto;aspect-ratio:16 / 9;min-height:200px;border:0;border-radius:9px;background:#111}
.cq18613-youtube-link{font-size:13px;color:inherit;text-underline-offset:3px}
.cq18613-youtube .note{margin:0;font-size:12px;line-height:1.5;text-align:left}
@media(max-width:600px){.cq18613-question-tools button{width:38px;height:36px}}

/* ===== css/video-segments-v18614.css ===== */
.cq-fa-video::before{content:"\f03d"}
.cq18614-video-badge{display:grid;place-items:center;flex:none;width:32px;height:30px;color:#286b70;background:#e5f0ef;border:1px solid #b5d0cc;border-radius:6px;cursor:help}
.cq18614-video-badge .cq-fa{margin:0;width:auto}
.cq18614-video-settings{margin:0 0 22px;padding:16px;border:1px solid #ccdcd6;border-radius:10px;min-width:0}
.cq18614-video-settings legend{padding:0 7px;color:#234e50;font-size:13px;font-weight:700}
.cq18614-autoplay{display:flex;align-items:flex-start;gap:9px;font-size:13px;line-height:1.6}
.cq18614-autoplay input{flex:none;margin-top:4px;width:18px;height:18px;accent-color:#234e50}
.cq18614-video-settings .cq18613-video-check{margin:12px 0 0}
.cq18614-youtube-player{width:100%;min-width:0}
.cq18614-youtube-player:empty{display:none}
.cq18614-segment-caption{font-size:12px;font-weight:650;margin:0;line-height:1.5}
@media(max-width:600px){.cq18614-video-badge{width:38px;height:36px}.cq18614-video-settings .two-cols{grid-template-columns:1fr}}

/* ===== css/gems-v18616.css ===== */
.cq-fa-bug::before{content:"\f188"}
.cq18616-gems{margin:22px 0;padding:18px;border:1px solid #aa874c77;border-radius:14px}
#cq18616-gem-preview{display:block;width:min(100%,320px);height:auto;background:radial-gradient(ellipse at center,#354957,#172230 75%);border:1px solid #9f895c77;border-radius:13px}
#cq18616-gem-color{height:45px;padding:5px;cursor:pointer}
@media(max-width:600px){.cq18616-gems .two-cols{grid-template-columns:1fr}}

/* ===== css/scene-music-v18617.css ===== */
.cq18617-hud-gem{display:block;flex:none;width:24px;height:24px;margin:-3px 0}
.cq18617-music{min-width:0;margin:22px 0;padding:18px;border:1px solid #aa874c77;border-radius:14px}
.cq18617-music legend{padding:0 8px;font-weight:700;color:#234e50}
.cq18617-music-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cq18617-music-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:13px;border:1px solid #d4dfd8;border-radius:10px;background:#fafcf9}
.cq18617-music-card:has(input:checked){border-color:#3f8378;background:#edf6ef}
.cq18617-music-card label{display:flex;align-items:flex-start;gap:9px;cursor:pointer;font-size:13px;line-height:1.5}
.cq18617-music-card input{margin-top:4px;accent-color:#29675f;flex:none}
.cq18617-music-card small{display:block;color:#667b72;line-height:1.5;margin-top:4px}
.cq18617-music-card .button{padding:6px 10px}
.cq18617-music-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}
.cq18617-music-actions .help{margin:0}
@media(max-width:700px){.cq18617-music-grid{grid-template-columns:1fr}}

/* ===== css/life-bonus-v18619.css ===== */
.cq18619-hearts{margin:22px 0;padding:18px;border:1px solid #bc8d9a77;border-radius:14px}
.cq18619-hearts h3>.cq-fa{color:#d43661}
.cq18619-enable{display:flex;align-items:flex-start;gap:9px;line-height:1.6;font-size:13px;font-weight:650;margin-bottom:18px}
.cq18619-enable input{flex:none;accent-color:#d43661;width:18px;height:18px;margin-top:3px}
#cq18619-heart-preview{display:block;width:min(100%,260px);height:auto;border:1px solid #ad7d8b66;border-radius:13px;background:radial-gradient(ellipse at center,#443245,#172230 80%)}
.cq18619-hearts-off #cq18619-heart-preview{opacity:.5}
@media(max-width:600px){.cq18619-hearts .two-cols{grid-template-columns:1fr}}

/* ===== css/traps-v18620.css ===== */
.cq-fa-triangle-exclamation::before{content:"\f071"}
.cq18620-traps{margin:22px 0;padding:18px;border:1px solid #bd986c99;border-radius:14px}
.cq18620-traps h3>.cq-fa{color:#9e652a}
.cq18620-check{display:flex;align-items:flex-start;gap:9px;font-size:13px;line-height:1.6;margin-bottom:16px;font-weight:600}
.cq18620-check input{flex:none;width:18px;height:18px;margin-top:3px;accent-color:#95631f}
#cq18620-trap-preview{display:block;width:min(100%,330px);height:auto;border-radius:14px;border:1px solid #bd986c99;background:radial-gradient(ellipse at top,#45404a,#172230)}
#cq18620-trap-error{font-size:13px;color:#9f293b;font-weight:650}
@media(max-width:650px){.cq18620-traps .two-cols{grid-template-columns:1fr}}

/* ===== css/wing-v18621.css ===== */
.cq18621-wing{margin:22px 0;padding:18px;border:1px solid #b7986799;border-radius:14px}
.cq18621-discovery{border-left:3px solid #d5ae68;padding:10px 16px;background:#f2d08b0b;border-radius:0 12px 12px 0;line-height:1.6}
.cq18621-discovery p{white-space:pre-wrap}
.cq18621-wing textarea{min-height:130px}
.cq18621-wing .two-cols>div{min-width:0}
@media(max-width:650px){.cq18621-wing .two-cols{grid-template-columns:1fr}}

.cq1864-entry-tabs:has([data-notebook-page="4"]){grid-template-columns:repeat(5,minmax(0,1fr))}
.cq1864-entry-tabs:has([data-notebook-page="4"]) button{min-width:0;overflow-wrap:anywhere}

/* ===== css/difficulty-v18622.css ===== */
.cq18622-presets{border:1px solid #c1a471;border-radius:14px;padding:20px;background:linear-gradient(130deg,#fffaf0,#f1f6f1);margin:0 0 24px}
.cq18622-presets h3{margin:0 0 12px;color:#244746}.cq18622-presets h3>.cq-fa{color:#9a6c1f}
.cq18622-profile-controls{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}.cq18622-profile-controls .field{flex:1;min-width:180px;margin:0}.cq18622-profile-controls .button{margin-bottom:2px}
#cq18622-profile-state{font-size:13px;font-weight:650;color:#2c6455}.cq18622-custom{color:#825b27!important}
.cq18622-profile-table{overflow-x:auto;margin:18px 0}.cq18622-profile-table table{width:100%;border-collapse:collapse;font-size:12px;line-height:1.5;text-align:left}.cq18622-profile-table caption{text-align:left;font-size:12px;color:#50665f;margin-bottom:9px}.cq18622-profile-table th,.cq18622-profile-table td{padding:10px;border:1px solid #cdd8ce;min-width:85px;vertical-align:top}.cq18622-profile-table thead th{background:#214b48;color:#fff4dc}.cq18622-profile-table tbody th{background:#e7eee8;color:#244746}.cq18622-profile-table td{background:#ffffff90}.cq18622-profile-table .cq18622-stars{display:flex;margin-top:5px}
.cq18622-stars{display:inline-flex;align-items:center;gap:3px;color:#f1c56b;white-space:nowrap}.cq18622-stars .cq-fa{margin:0;width:auto;font-size:12px;filter:drop-shadow(0 1px 2px #0006)}
.cq18622-level{display:inline-flex;align-items:center;gap:7px;flex:none;margin-left:auto;padding:6px 10px;min-height:29px;border:1px solid #a78b5370;border-radius:11px;background:linear-gradient(#29313d,#192532);font-size:10px;line-height:1.3;color:#ead8b2;white-space:nowrap}
.cq1865-statusbar .cq18622-level+#interaction-status{margin-left:0}.cq18622-level-label{font-size:10px}
@media(max-width:650px){.cq18622-presets{padding:14px}.cq18622-level{padding:5px 7px;gap:5px}.cq18622-level .cq-fa{font-size:10px}}
@media(max-width:540px){.cq18622-level-label{display:none}.cq18622-level{padding:5px 6px}.cq18622-level .cq18622-stars{gap:2px}}

/* ===== css/word-question-v18624.css ===== */
.cq18624-word-settings{padding:18px;border:1px solid #c2a77b;border-radius:13px;background:#faf6e9;margin:20px 0}
.cq18624-word-game{padding:16px;border:1px solid #b69a6680;border-radius:16px;background:linear-gradient(135deg,#243341,#1c2031);color:#f5e7cf;text-align:center}
.cq18624-word-game .buttons{justify-content:center}.cq18624-word-game [hidden]{display:none!important}
.cq18624-parchments{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;min-height:40px;padding:6px 0}
.cq18624-parchment{position:relative;display:block;width:27px;height:35px;border:1px solid #ebcc8b;border-radius:3px 7px 3px 3px;background:repeating-linear-gradient(0deg,transparent 0 6px,#8d5c2d66 7px 8px),linear-gradient(120deg,#ffe6af,#c49b61);box-shadow:0 3px 8px #0005;transition:opacity .2s,transform .2s}
.cq18624-parchment-lost{opacity:.16;transform:translateY(4px) rotate(-9deg);border-style:dashed}
.cq18624-attempts{font-size:12px;color:#efd295;margin:12px 0}.cq18624-word-board{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin:20px 0 24px}
.cq18624-letter{display:inline-flex;justify-content:center;align-items:center;width:32px;min-height:42px;border-bottom:2px solid #d4ae68;border-radius:5px;background:#fff0c80d;color:#f8dfab;font:bold 23px Georgia,serif}.cq18624-separator{display:inline-flex;justify-content:center;align-items:center;width:16px;min-height:42px;font-size:22px}
.cq18624-word-keyboard{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:5px;max-width:650px;margin:0 auto 18px}.cq18624-word-keyboard button{min-width:0;min-height:44px;border:1px solid #b99a66;border-radius:7px;background:#334556;color:#fff0ce;font:700 14px system-ui;cursor:pointer}.cq18624-word-keyboard button:disabled{opacity:.48;cursor:default}.cq18624-word-keyboard button.cq18624-letter-good{background:#225949;color:#c9ffdf;border-color:#80c9a2;opacity:.8}.cq18624-word-keyboard button.cq18624-letter-wrong{background:#63383d;color:#ffd9d9;opacity:.7}.cq18624-word-keyboard button:focus-visible{outline:3px solid #ffe2a0;outline-offset:2px}.cq18624-word-keyboard button:not(:disabled):hover{background:#536277;border-color:#ffdc95}
.cq18624-word-feedback,.cq18624-extra-hint{line-height:1.6;white-space:pre-wrap}.cq18624-extra-hint{color:#f4d797;font-style:italic}.cq18624-word-media{max-width:750px;margin:auto}.cq18624-word-media p{color:#ecdfc5}
@media(max-width:600px){.cq18624-word-keyboard{grid-template-columns:repeat(7,minmax(0,1fr))}.cq18624-word-game{padding:12px}.cq18624-letter{width:26px;min-height:36px;font-size:20px}.cq18624-parchment{width:21px;height:29px}.cq18624-parchments{gap:5px}}
@media(prefers-reduced-motion:reduce){.cq18624-parchment{transition:none}.cq18624-parchment-lost{transform:none}}

.cq18624-word-game .btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #f3d59a;border-radius:10px;padding:10px 17px;font:700 13px system-ui;background:linear-gradient(#ffe7ae,#bb8950);color:#382410;box-shadow:0 3px 0 #79522c;cursor:pointer}.cq18624-word-game .btn.alt{background:#334556;color:#ffe8bd;border-color:#b6a17c;box-shadow:0 3px 0 #19212b}.cq18624-word-game .btn:focus-visible{outline:3px solid #ffe2a0;outline-offset:3px}.cq18624-word-feedback.cq18-good{color:#a8ebc4}.cq18624-word-feedback.cq18-wrong{color:#ffb3ad}

/* ===== css/arrangement-question-v18625.css ===== */
.cq18625-editor{padding:18px;border:1px solid #bda578;border-radius:14px;background:#faf7ee;margin:20px 0}.cq18625-edit-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #d9ddce}.cq18625-edit-fields{display:flex;gap:12px;flex:1;min-width:0}.cq18625-edit-fields .field{flex:1;min-width:0;margin:0}.cq18625-edit-tools{display:flex;gap:4px}.cq18625-edit-tools .button{padding:7px 9px}.cq18625-number{color:#795a29;font-weight:700}.cq18625-editor>#cq18625-add-item{margin:14px 0 22px}
.cq18625-activity{padding:18px;border:1px solid #b69a6680;border-radius:16px;background:linear-gradient(135deg,#243341,#1c2031);color:#f5e7cf;text-align:left}.cq18625-activity [hidden]{display:none!important}.cq18625-instructions{font-size:13px;line-height:1.6;color:#e6d3ac;margin:0 0 18px}.cq18625-board{margin-bottom:18px}.cq18625-timeline{position:relative;display:flex;flex-direction:column;gap:10px}.cq18625-timeline::before{content:'';position:absolute;left:14px;top:16px;bottom:16px;width:2px;background:#c3a46a;opacity:.6}.cq18625-time-row{display:flex;align-items:center;gap:10px;position:relative}.cq18625-position{display:flex;align-items:center;justify-content:center;flex:none;width:30px;height:30px;border-radius:50%;background:#dfbd79;color:#33271e;font:bold 13px system-ui}.cq18625-time-card,.cq18625-pair-card{border:1px solid #b89c6e;border-radius:10px;background:#304254;color:#fff0d1;font:600 14px/1.5 system-ui;cursor:pointer;text-align:left;overflow-wrap:anywhere}.cq18625-time-card{flex:1;min-width:0;min-height:52px;padding:12px 15px}.cq18625-time-tools{display:flex;flex-direction:column;gap:3px}.cq18625-time-tools button{min-width:36px;min-height:30px;border:1px solid #8e8e7c;border-radius:6px;background:#263743;color:#ffe3ab;font-size:17px;cursor:pointer}.cq18625-time-tools button:disabled{opacity:.3;cursor:default}.cq18625-selected{border-color:#ffda83!important;box-shadow:0 0 0 2px #ffda8366;background:#4e4b42!important}.cq18625-activity button:focus-visible{outline:3px solid #ffe2a0;outline-offset:3px}
.cq18625-pairs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.cq18625-pairs-grid h3{font:600 13px system-ui;color:#eccd91;margin:0 0 10px}.cq18625-pair-card{display:flex;flex-direction:column;gap:5px;min-height:68px;width:100%;padding:12px;margin:0 0 10px}.cq18625-pair-card small{font:400 11px/1.5 system-ui;color:#d8d5c7}.cq18625-linked{border-color:#80b3a2}.cq18625-good{color:#a9eac7!important}.cq18625-pair-card.cq18625-good{border-color:#90d5ae}.cq18625-wrong{color:#ffb6ad!important}.cq18625-pair-card.cq18625-wrong{border-color:#de8c83}
.cq18625-hint,.cq18625-feedback{line-height:1.6;white-space:pre-wrap}.cq18625-hint{color:#f1d59e;font-style:italic}.cq18625-media{max-width:750px;margin:auto}.cq18625-activity .buttons{justify-content:center;flex-wrap:wrap}.cq18625-activity .btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #f3d59a;border-radius:10px;padding:10px 17px;min-height:44px;font:700 13px system-ui;background:linear-gradient(#ffe7ae,#bb8950);color:#382410;box-shadow:0 3px 0 #79522c;cursor:pointer}.cq18625-activity .btn.alt{background:#334556;color:#ffe8bd;border-color:#b6a17c;box-shadow:0 3px 0 #19212b}.cq18625-activity .btn:disabled{opacity:.4;cursor:default}.cq18625-activity button:disabled{cursor:default}
@media(max-width:650px){.cq18625-edit-row{align-items:flex-start;flex-wrap:wrap}.cq18625-edit-fields{flex-direction:column}.cq18625-edit-tools{margin-left:auto}.cq18625-activity{padding:12px}.cq18625-pairs-grid{gap:10px}.cq18625-pair-card{font-size:12px;padding:9px}.cq18625-time-card{font-size:12px;padding:10px}.cq18625-time-row{gap:7px}}

/* ===== css/challenges-v18628.css ===== */
.cq18628-station-edit{border:1px solid #c6d8d2;border-radius:12px;padding:18px;margin:16px 0;background:#f7fbf9}.cq18628-station-edit ol{padding-left:24px;line-height:1.6}.cq18628-sequence{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}.cq18628-series-progress{padding:10px 14px;border:1px solid #b2945d;border-radius:10px;color:#ffe0a3;background:#202939;font-weight:700}.cq18628-symbol-stage{min-height:100px;display:grid;place-items:center;font-size:2rem;border:1px solid #b2945d;border-radius:14px;margin:14px 0;background:#172333;color:#ffe0a3}.cq18628-symbol-keys{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.cq18628-symbol-keys button{white-space:normal;min-height:48px}.cq18628-memory .buttons{flex-wrap:wrap}.cq18628-memory-answer{min-height:32px;line-height:1.6}.cq18628-memory-feedback{line-height:1.6}.cq18628-memory [hidden]{display:none!important}.cq18628-memory button:focus-visible{outline:3px solid #51d8dc;outline-offset:3px}@media(max-width:600px){.cq18628-symbol-keys{grid-template-columns:repeat(2,minmax(0,1fr))}.cq18628-symbol-stage{min-height:74px;font-size:1.5rem}}

.cq18628-symbol-keys .cq18629-lit{opacity:1!important;color:#172333!important;background:#ffe3a3!important;box-shadow:0 0 22px #ffd267;outline:2px solid #fff3c8}

/* ───── 18.6.51 — smartphone : sélection de langue / pays tactile, cibles agrandies, fluidité ───── */
button,select,[role=option],[role=combobox],.era-card,.btn{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.cq1864-combo-search{font-size:16px!important}               /* ≥16 px : iOS ne zoome plus la page quand on tape dans la recherche */
.cq1864-combo-backdrop{position:fixed;inset:0;z-index:9998;background:#02060cc4}
.cq1864-combo-popup.cq1864-sheet{left:0!important;right:0!important;top:auto!important;bottom:0!important;width:auto!important;max-width:none!important;max-height:min(76dvh,560px)!important;border-radius:20px 20px 0 0;padding:6px 12px calc(12px + env(safe-area-inset-bottom,0px));overscroll-behavior:contain}
.cq1864-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 8px;font-size:17px;color:#ffe3a3}
.cq1864-sheet-head strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cq1864-sheet-close{flex:none;min-width:48px;min-height:48px;border-radius:14px;border:1px solid #b99762aa;background:#1b3040;color:#f5e5c7;font-size:20px;line-height:1;cursor:pointer}
.cq1864-sheet .cq1864-combo-list{max-height:none!important;-webkit-overflow-scrolling:touch}
.cq1864-sheet .cq1864-combo-list [role=option]{min-height:54px;padding:10px 14px;font-size:17px;gap:12px;border-radius:12px;margin-bottom:4px;background:#ffffff0d}
.cq1864-sheet .cq1864-combo-list [aria-selected=true]{background:#b58d4940;outline:2px solid #e8c37f88}
.cq1864-sheet .cq1864-flag{width:32px;height:24px}
@media (orientation:landscape) and (max-height:560px){
 .cq1864-combo-popup.cq1864-sheet{max-height:86dvh!important;padding-top:4px}
 .cq1864-sheet-head{padding-bottom:4px;font-size:15px}
 .cq1864-sheet-close{min-height:44px}
 .cq1864-sheet .cq1864-combo-list{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px}
 .cq1864-sheet .cq1864-combo-list [role=option]{min-height:48px;margin:0}
}
@media (pointer:coarse){
 .cq1864-combo-button{min-height:46px!important;font-size:15px!important;padding:8px 12px!important}
 .cq186-language-control{font-size:13px}
 .cq186-language-control .cq1864-combo-button{min-height:44px!important}
 #cq16-register input,#cq16-register select{font-size:16px}
 /* le flou d'arrière-plan sous la barre du haut et les bandeaux est recalculé à chaque image du canvas : trop coûteux sur mobile */
 .app>.top,.objective,.interaction-status,.scene #cinematic .cin-panel{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
 .scene #game{transform:translateZ(0)}
}
/* mode plein écran paysage du téléphone : barre du haut un peu plus haute, cibles plus grandes, langue réduite au drapeau */
@media (pointer:coarse) and (orientation:landscape) and (max-height:600px){
 .app .top,.app:fullscreen .top,.app:-webkit-full-screen .top{height:46px!important;min-height:46px!important}
 .app .hud .pill,.app .hud .tiny{min-height:38px!important;min-width:38px;font-size:12px!important;padding:5px 9px!important}
 .app .hud .cq186-language-control .cq1864-combo-button{min-height:38px!important;min-width:64px;padding:4px 8px!important}
 .app .hud .cq186-language-control .cq1864-combo-button>span:not(.cq1864-chevron),.app .hud .cq186-language-control [data-cq186-language-label]{display:none}
 .app .hud .cq186-language-control .cq1864-flag{margin-right:0}
}
/* repli automatique (appareil lent) : décors animés superflus coupés */
body.cq-lowfx .cq18612-fireflies,body.cq-lowfx .scene #cinematic::after{display:none!important}

/* ===== css/intro-portal-v18650.css ===== */
/* Chrono Quest 18.6.50 — Intro « portail temporel » : logo central, héros autour, puis menu des époques.
   Tout est dimensionné en unités de conteneur (cqh / cqw) : l'intro suit la taille de la scène (16:9, 4:3, plein écran). */

.cq-intro{position:absolute;inset:0;z-index:40;overflow:hidden;container-type:size;background:#020712;color:#fff1da;font-family:Georgia,'Times New Roman',serif;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.cq-intro *{box-sizing:border-box}
.cq-intro-bg{position:absolute;inset:0;background:radial-gradient(ellipse 62% 78% at 50% 50%,#0d3f58 0,#082033 38%,#030a18 72%,#020610 100%)}
.cq-intro-lay{position:absolute;inset:0;--d:min(74cqh,56cqw);--cy:50%;--ease:cubic-bezier(.2,1.25,.4,1)}
.cq-intro-fx{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.cq-intro-scene{position:absolute;inset:0;transform-origin:50% var(--cy);pointer-events:none}

/* Vortex et anneaux d'énergie derrière l'emblème */
.cq-intro-vortex{position:absolute;left:50%;top:var(--cy);width:calc(var(--d)*1.6);aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);opacity:0;background:conic-gradient(from 0deg,transparent 0,#19f0e08a 10%,#19f0e022 18%,transparent 30%,#2a7cff77 46%,transparent 64%,#19f0e09c 80%,#19f0e022 90%,transparent 100%);-webkit-mask-image:radial-gradient(circle,#000 20%,transparent 62%);mask-image:radial-gradient(circle,#000 20%,transparent 62%);animation:cqiSpin 7s linear infinite}
.cq-intro.is-playing .cq-intro-vortex{animation:cqiSpin 3.2s linear infinite,cqiVortexIn 1.6s ease-out forwards}
.cq-intro-ring{position:absolute;left:50%;top:var(--cy);width:var(--d);aspect-ratio:1;border-radius:50%;border:3px solid #86fff1;box-shadow:0 0 3cqh #28f5e6,inset 0 0 3cqh #28f5e688;opacity:0;transform:translate(-50%,-50%) scale(.4)}
.cq-intro.is-playing .cq-intro-ring.r1{animation:cqiRing 1.5s ease-out 1.55s both}
.cq-intro.is-playing .cq-intro-ring.r2{animation:cqiRing 1.7s ease-out 1.8s both}

/* Emblème */
.cq-intro-stage{position:absolute;left:50%;top:var(--cy);width:var(--d);aspect-ratio:1;transform:translate(-50%,-50%)}
.cq-intro-emblem{display:block;width:100%;height:100%;object-fit:contain;transform:scale(.38);opacity:.65;filter:drop-shadow(0 0 2.4cqh #1fe9dcaa);animation:cqiIdle 2.8s ease-in-out infinite;pointer-events:none}
.cq-intro.is-playing .cq-intro-emblem{animation:cqiEmblemIn 2.3s cubic-bezier(.3,.1,.2,1) forwards}
.cq-intro.is-shown .cq-intro-emblem{transform:none;opacity:1;animation:cqiFloat 3.4s ease-in-out infinite}

/* Héros : disposition grand écran (2 + 2 sur les côtés, Alex au centre devant le portail) */
.cq-intro-heroes{position:absolute;inset:0;pointer-events:none}
.cq-intro-hero{position:absolute;left:var(--x);bottom:var(--b);height:var(--h);z-index:var(--z,1);opacity:0;transform:translate(-50%,0)}
.cq-intro-hero .bob{height:100%}
.cq-intro-hero canvas{display:block;height:100%;width:auto;filter:drop-shadow(0 0 1.4cqh #2ff8ea77)}
.cq-intro-hero::after{content:'';position:absolute;left:50%;bottom:-1.2%;width:78%;height:7%;transform:translateX(-50%);border-radius:50%;background:radial-gradient(ellipse,#000b 0,#0000 70%);z-index:-1}
.cq-intro-hero:nth-child(1){--x:50%;--b:1.5cqh;--h:28cqh;--z:3}
.cq-intro-hero:nth-child(2){--x:7.5%;--b:26cqh;--h:34cqh;--z:1}
.cq-intro-hero:nth-child(3){--x:20%;--b:7cqh;--h:40cqh;--z:2}
.cq-intro-hero:nth-child(4){--x:80%;--b:7cqh;--h:40cqh;--z:2}
.cq-intro-hero:nth-child(5){--x:92.5%;--b:26cqh;--h:34cqh;--z:1}
.cq-intro-hero:nth-child(n+4) canvas{transform:scaleX(-1)}
.cq-intro.is-playing .cq-intro-hero{animation:cqiHeroIn 1s var(--ease) var(--d,1.7s) both}
.cq-intro.is-shown .cq-intro-hero{opacity:1;animation:none}
.cq-intro.is-shown .cq-intro-hero .bob{animation:cqiBob 2.6s ease-in-out infinite;animation-delay:calc(var(--i,0)*-.45s)}

/* Titre */
.cq-intro-title{position:absolute;left:0;right:0;top:2.4cqh;text-align:center;opacity:0;transform:translateY(-1.4cqh);transition:opacity 1.1s ease,transform 1.1s cubic-bezier(.2,.8,.2,1);filter:drop-shadow(0 .3cqh .8cqh #000c);pointer-events:none}
.cq-intro.is-title .cq-intro-title{opacity:1;transform:none}
.cq-intro-title strong{display:block;font-size:clamp(15px,5.6cqh,60px);line-height:1;letter-spacing:.2em;padding-left:.2em;font-weight:900;background:linear-gradient(#fff4c8,#f0c46a 52%,#a96d24);-webkit-background-clip:text;background-clip:text;color:transparent}
.cq-intro-title span{display:block;margin-top:.9cqh;font-size:clamp(8px,1.9cqh,19px);letter-spacing:.46em;padding-left:.46em;color:#9fe9e2}

/* Lumières */
.cq-intro-flash{position:absolute;inset:0;pointer-events:none;opacity:0;background:radial-gradient(circle at 50% var(--cy),#fff 0,#b9fff6 14%,#27e8dc66 38%,transparent 64%)}
.cq-intro.is-playing .cq-intro-flash{animation:cqiFlash 1.1s ease-out 1.5s both}
.cq-intro.is-leaving .cq-intro-flash{animation:cqiFlashLeave .9s ease-in both}

/* Écran de départ : un seul bouton, obligatoire (il débloque aussi le son du navigateur) */
@property --cqi-a{syntax:'<angle>';inherits:false;initial-value:0deg}
.cq-intro-start{position:absolute;left:0;right:0;bottom:6cqh;z-index:6;display:flex;flex-direction:column;align-items:center;gap:1.6cqh;transition:opacity .35s ease,transform .35s ease}
.cq-intro.is-playing .cq-intro-start,.cq-intro.is-leaving .cq-intro-start{opacity:0;transform:translateY(2cqh);pointer-events:none}
.cq-intro-go{position:relative;overflow:hidden;cursor:pointer;font:800 clamp(12px,2.9cqh,21px) Georgia,'Times New Roman',serif;letter-spacing:.16em;text-transform:uppercase;color:#e9fffd;text-shadow:0 0 .8cqh #19f0e0aa;padding:.95em 2.4em;border-radius:999px;border:2px solid transparent;
 background:linear-gradient(#0f4254,#061c2a) padding-box,conic-gradient(from var(--cqi-a),#19f0e0,#ffe28a,#2a7cff,#19f0e0) border-box;
 box-shadow:0 0 2.2cqh #19f0e055,inset 0 0 1.6cqh #19f0e033;animation:cqiAng 3.6s linear infinite,cqiGo 2.4s ease-in-out infinite;
 transition:transform .25s cubic-bezier(.2,.9,.3,1.3),letter-spacing .3s ease,color .2s,text-shadow .2s,box-shadow .25s}
.cq-intro-go::before{content:'';position:absolute;top:0;bottom:0;left:-70%;width:45%;background:linear-gradient(100deg,transparent,#ffffff77,transparent);transform:skewX(-22deg);transition:left .75s ease;pointer-events:none}
.cq-intro-go:hover,.cq-intro-go:focus-visible{transform:scale(1.08);letter-spacing:.22em;color:#fff;text-shadow:0 0 1.4cqh #7ffff0,0 0 3cqh #19f0e0;box-shadow:0 0 4.5cqh #5ffff2cc,0 0 10cqh #19f0e066,inset 0 0 3cqh #19f0e066;animation:cqiAng .9s linear infinite;outline:none}
.cq-intro-go:hover::before,.cq-intro-go:focus-visible::before{left:130%}
.cq-intro-go:active{transform:scale(.97)}
.cq-intro-hint{font-size:clamp(9px,1.7cqh,13px);letter-spacing:.3em;text-transform:uppercase;color:#8fd8d2;opacity:.8}
/* Le portail réagit quand on survole le bouton */
.cq-intro:not(.is-playing):has(.cq-intro-go:hover) .cq-intro-vortex,.cq-intro:not(.is-playing):has(.cq-intro-go:focus-visible) .cq-intro-vortex{opacity:.9}
.cq-intro:not(.is-playing):has(.cq-intro-go:hover) .cq-intro-emblem,.cq-intro:not(.is-playing):has(.cq-intro-go:focus-visible) .cq-intro-emblem{animation:cqiHover 1s ease-in-out infinite}
.cq-intro-vortex{transition:opacity .5s ease}

/* Sortie : on plonge dans le portail, le menu apparaît derrière */
.cq-intro.is-leaving{animation:cqiRootOut .9s ease-in both}
.cq-intro.is-leaving .cq-intro-scene{animation:cqiSceneOut .9s cubic-bezier(.6,0,.9,.4) both}
.cq-intro.is-leaving .cq-intro-fx{opacity:0;transition:opacity .3s}
.cq-intro.is-fast.is-leaving,.cq-intro.is-fast.is-leaving .cq-intro-scene,.cq-intro.is-fast.is-leaving .cq-intro-flash{animation-duration:.45s}

/* Apparition du menu des époques */
.overlay.cq-intro-reveal .dialog{animation:cqiDialogIn .9s cubic-bezier(.2,.8,.2,1) .35s both}
.overlay.cq-intro-reveal .era-card{animation:cqiCardIn .7s cubic-bezier(.2,.8,.2,1) both}
.overlay.cq-intro-reveal .era-card:nth-child(1){animation-delay:.65s}
.overlay.cq-intro-reveal .era-card:nth-child(2){animation-delay:.8s}
.overlay.cq-intro-reveal .era-card:nth-child(3){animation-delay:.95s}

/* Écran étroit (téléphone en portrait, 4:3) : emblème en haut, héros alignés en bas */
@container (max-aspect-ratio: 3/2){
 .cq-intro-lay{--d:min(60cqh,74cqw);--cy:41%}
 .cq-intro-hero{--h:25cqh;--b:1.5cqh}
 .cq-intro-hero:nth-child(1){--x:50%;--z:3}
 .cq-intro-hero:nth-child(2){--x:14%;--z:1}
 .cq-intro-hero:nth-child(3){--x:32%;--z:2}
 .cq-intro-hero:nth-child(4){--x:68%;--z:2}
 .cq-intro-hero:nth-child(5){--x:86%;--z:1}

 .cq-intro-start{bottom:3cqh}
}

@keyframes cqiSpin{to{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes cqiVortexIn{0%{opacity:0}55%{opacity:.95}100%{opacity:.7}}
@keyframes cqiRing{0%{opacity:.95;transform:translate(-50%,-50%) scale(.5);border-width:7px}100%{opacity:0;transform:translate(-50%,-50%) scale(2.3);border-width:1px}}
@keyframes cqiIdle{0%,100%{transform:scale(.38);opacity:.6}50%{transform:scale(.405);opacity:.85}}
@keyframes cqiEmblemIn{
 0%{transform:scale(.38) rotate(0);opacity:.65}
 38%{transform:scale(.3) rotate(-110deg);opacity:.95}
 70%{transform:scale(1.1) rotate(8deg);opacity:1}
 100%{transform:scale(1) rotate(0);opacity:1}
}
@keyframes cqiFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-.9cqh)}}
@keyframes cqiHeroIn{
 0%{opacity:0;transform:translate(calc(-50% + var(--ox,0px)),var(--oy,0px)) scale(.12)}
 45%{opacity:1}
 100%{opacity:1;transform:translate(-50%,0) scale(1)}
}
@keyframes cqiBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-.8cqh)}}
@keyframes cqiFlash{0%{opacity:0}12%{opacity:1}100%{opacity:0}}
@keyframes cqiFlashLeave{0%{opacity:0}55%{opacity:.55}100%{opacity:1}}
@keyframes cqiGo{0%,100%{box-shadow:0 0 2.2cqh #19f0e055,inset 0 0 1.6cqh #19f0e033}50%{box-shadow:0 0 3.6cqh #19f0e0aa,inset 0 0 2.2cqh #19f0e055}}
@keyframes cqiAng{to{--cqi-a:360deg}}
@keyframes cqiHover{0%,100%{transform:scale(.45);opacity:.9}50%{transform:scale(.5);opacity:1}}
@keyframes cqiSceneOut{0%{transform:scale(1)}70%{transform:scale(2.6)}100%{transform:scale(5.5)}}
@keyframes cqiRootOut{0%,45%{opacity:1}100%{opacity:0}}
@keyframes cqiDialogIn{0%{opacity:0;transform:scale(.92)}100%{opacity:1;transform:none}}
@keyframes cqiCardIn{0%{opacity:0;transform:translateY(2.4cqh) scale(.94)}100%{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
 .cq-intro *,.overlay.cq-intro-reveal .dialog,.overlay.cq-intro-reveal .era-card{animation-duration:.01s!important;animation-delay:0s!important;animation-iteration-count:1!important}
 .cq-intro.is-leaving{animation:none;opacity:0;transition:opacity .5s ease}
 .cq-intro.is-leaving .cq-intro-scene{animation:none}
}

/* ===== css/hero-profile-v18652.css ===== */
#cq1852-identity-button[hidden]{display:none!important}
.dialog:has(.cq1852-sheet){width:min(880px,100%);padding:14px 20px 16px;scrollbar-width:none;-ms-overflow-style:none}
.dialog:has(.cq1852-sheet)::-webkit-scrollbar{display:none}
.cq1852-sheet{--cq1852-accent:#c98a3d;--cq1852-light:color-mix(in srgb,var(--cq1852-accent) 62%,#fff);text-align:left}
.cq1852-ico{width:1em;height:1em;fill:currentColor;flex:none;vertical-align:-.125em}
.cq1852-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.cq1852-top .eyebrow{display:flex;align-items:center;gap:8px}
.cq1852-back{display:inline-flex;align-items:center;gap:7px;padding:6px 14px;border:1px solid #8cabc0;border-radius:9px;background:#344254;color:#faf0da;font-weight:700;font-size:13px}
.cq1852-back:hover{background:#45556a}
.cq1852-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}
.cq1852-card{padding:12px 14px;text-align:center;border:1px solid color-mix(in srgb,var(--cq1852-accent) 55%,transparent);border-radius:14px;background:linear-gradient(160deg,color-mix(in srgb,var(--cq1852-accent) 26%,#1c2a33),#1b2230)}
.cq1852-card canvas{display:block;width:100%;max-width:140px;height:160px;object-fit:contain;margin:0 auto 4px}
.cq1852-card h2{margin:0;font:700 28px Georgia,serif;line-height:1.1}
.dialog .cq1852-card p{margin:4px 0 0;max-width:none}
.dialog .cq1852-role{color:var(--cq1852-light);font-weight:700;letter-spacing:.04em;font-size:14px}
.dialog .cq1852-tagline{font-style:italic;font-size:13px;opacity:.9}
.cq1852-facts{display:grid;gap:7px;margin:12px 0 0;padding-top:10px;border-top:1px solid color-mix(in srgb,var(--cq1852-accent) 40%,transparent);text-align:left}
.cq1852-facts dt{display:flex;align-items:center;gap:7px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--cq1852-light)}
.cq1852-facts dd{margin:1px 0 0 22px;font-size:13px}
.cq1852-body{min-width:0}
.cq1852-quote{display:flex;gap:10px;align-items:flex-start;margin:0 0 10px;padding:9px 14px;border-left:4px solid var(--cq1852-accent);font:italic 17px/1.35 Georgia,serif;background:rgba(255,255,255,.05);border-radius:0 8px 8px 0}
.cq1852-quote .cq1852-ico{margin-top:3px;color:var(--cq1852-light);opacity:.85}
.cq1852-block{margin:0 0 10px}
.cq1852-block h3{display:flex;align-items:center;gap:7px;margin:0 0 3px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--cq1852-light)}
.dialog .cq1852-block p{margin:0;max-width:none;font-size:13.5px;line-height:1.45;text-align:left}
.cq1852-traits{display:flex;flex-wrap:wrap;gap:7px;list-style:none;margin:0 0 10px;padding:0}
.cq1852-traits li{padding:3px 12px;border-radius:999px;border:1px solid var(--cq1852-accent);background:color-mix(in srgb,var(--cq1852-accent) 18%,transparent);font-size:12.5px}
.cq1852-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
@media(max-height:560px) and (min-width:700px){.dialog:has(.cq1852-sheet){padding:8px 16px 10px}.cq1852-top{margin-bottom:6px}.cq1852-card canvas{height:110px;max-width:100px}.cq1852-card h2{font-size:22px}.cq1852-quote{font-size:15px;padding:6px 12px;margin-bottom:6px}.cq1852-block,.cq1852-traits{margin-bottom:6px}.dialog .cq1852-block p{font-size:12.5px;line-height:1.35}.cq1852-facts{margin-top:6px;padding-top:6px;gap:4px}}
@media(max-width:700px){.cq1852-layout{grid-template-columns:1fr}.cq1852-card{display:grid;grid-template-columns:96px minmax(0,1fr);column-gap:12px;text-align:left;align-items:center}.cq1852-card canvas{grid-row:1/span 3;height:110px;margin:0}.cq1852-facts{grid-column:1/-1}.cq1852-cols{grid-template-columns:1fr;gap:0}.cq1852-card h2{font-size:24px}}
/* Atelier */
.cq1852-admin{margin-top:24px}
.cq1852-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.cq1852-form{display:grid;gap:12px;max-width:760px}
.cq1852-form textarea{width:100%;font:inherit;resize:vertical}
.cq1852-notice{margin-left:14px;font-size:13px}
.cq1852-notice.error{color:#a32323;font-weight:700}

/* ===== css/social-links-v18652.css ===== */
/* 18.6.52 : liens réseaux sociaux dans le pied de page du jeu. Icônes : Font Awesome Free 6.5.2 (CC BY 4.0). */
.app main>.cq1868-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 18px}
.cq1852-social{display:inline-flex;flex-wrap:wrap;justify-content:center;gap:8px}
.cq1852-social a{display:inline-flex;align-items:center;gap:7px;padding:5px 12px;border:1px solid #71624d;border-radius:999px;background:#202738dd;color:#e8cf9a;font-size:11px;line-height:1;text-decoration:none;transition:background .15s,border-color .15s,color .15s,transform .15s}
.cq1852-social a b{font-weight:700;letter-spacing:.04em}
.cq1852-social svg{width:14px;height:14px;fill:currentColor;flex:none}
.cq1852-social a:hover,.cq1852-social a:focus-visible{background:#65523f;border-color:#ffe3ac;color:#fff1da;transform:translateY(-1px)}
.cq1852-social a:focus-visible{outline:3px solid #ffda8b;outline-offset:2px}
@media(max-width:650px){.cq1852-social a{padding:5px 10px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.cq1852-social a{transition:none}.cq1852-social a:hover,.cq1852-social a:focus-visible{transform:none}}

/* ===== css/gameplay-v18653.css ===== */
/* 18.6.53 : chrono, bonus de fin d'époque et réglages du jeu. */
.cq1853-timer[hidden]{display:none!important}
.cq1853-timer b{font-variant-numeric:tabular-nums;letter-spacing:.04em}
.cq1853-timer-warn{border-color:#e0a23a!important;color:#ffd58a}
.cq1853-timer-danger{border-color:#ff6b6b!important;color:#ffb3b3;animation:cq1853-pulse 1s ease-in-out infinite}
.cq1853-timer-over{border-color:#ff6b6b!important;color:#ff9a9a;opacity:.85}
@keyframes cq1853-pulse{50%{background:#5a2330cc}}
@media(prefers-reduced-motion:reduce){.cq1853-timer-danger{animation:none}}
.cq1853-recap{margin:12px 0;padding:10px 14px;border:1px solid #d4b47d;border-radius:12px;background:#ffffff0d;text-align:left}
.cq1853-recap h3{margin:0 0 6px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#ffd98f}
.cq1853-recap ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.cq1853-recap li{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:8px;align-items:center;font-size:14px}
.cq1853-gain{color:#9df0b0;font-size:16px}
/* Atelier */
.cq1853-settings{max-width:760px;margin-bottom:16px}
.cq1853-check{display:flex;align-items:center;gap:8px;margin:8px 0;font-weight:600}
.cq1853-time-fields{display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin:8px 0}
.cq1853-time-fields .field{width:110px}
.cq1853-timer-preview{font:700 28px/1 ui-monospace,Consolas,monospace;padding:8px 14px;border:1px solid #d4b47d;border-radius:10px;background:#172735;color:#ffe2a3}
.cq1853-timer-off .cq1853-timer-preview{opacity:.45}
