/* les mots trouvés → maîtrisés ★ : fin de duel, Carnet, rappel des révisions, cartes de grammaire */

/* fin d'un duel de rival : les mots maîtrisés */
.cap-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 14px auto; max-width: 640px; }
.cap-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 104px; padding: 8px 6px;
  border-radius: 10px; background: rgba(255, 255, 255, 0.55); border: 2px solid var(--accent, #c9a86a); text-align: center;
}
.cap-tile b { font-size: 0.92em; }
.cap-tile i { font-size: 0.72em; opacity: 0.7; font-style: normal; }
.cap-tile.ok { animation: cap-pop 0.45s ease both; }
.cap-tile.miss { opacity: 0.55; border-style: dashed; filter: grayscale(0.8); }
@keyframes cap-pop { from { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.08); } }

/* Carnet : trouvé mais pas maîtrisé = gris ; maîtrisé = étoile dorée */
.entry.seen .entry-pic { filter: grayscale(1) opacity(0.6); }
.entry.seen .entry-target { opacity: 0.55; }
.entry.seen .entry-native { color: #8a6a48; font-style: normal; }
.entry { position: relative; }
.entry-star { position: absolute; top: 2px; right: 4px; color: #e0a020; font-size: 0.95em; text-shadow: 0 1px 0 #7a4a10; }
.pin-btn.quiz-btn { background: #f0c04a; color: #2a1a10; }

/* rappel des révisions dues (sous les badges) */
.hud-due {
  pointer-events: auto; align-self: flex-end; cursor: pointer; font-family: var(--pixel); font-size: 0.8em;
  padding: 4px 10px; border-radius: 10px; border: 2px solid #8a5a1c; background: #fff3c8; color: #4e2716;
  box-shadow: 0 3px 0 #8a5a1c; animation: cap-pulse-soft 2.4s ease-in-out infinite;
}
.hud-due:hover { background: #ffe9a0; }
@keyframes cap-pulse-soft { 50% { transform: translateY(-1px); box-shadow: 0 4px 0 #8a5a1c, 0 0 10px rgba(240, 192, 74, 0.6); } }

/* bandeau des mots récents : un mot vu mais pas encore capturé est éteint */
.rw-chip.seen { opacity: 0.55; filter: grayscale(0.9); border-style: dashed; }

/* v9.62 : la demande d'un habitant en cours (sous la fiche de quête) */
.hud-request {
  align-self: flex-end; font-family: var(--pixel); font-size: 0.86em; padding: 5px 12px; border-radius: 10px;
  background: #fff8e0; color: #4e2716; border: 2px solid #e0a030; box-shadow: 0 3px 0 #8a5a1c;
}

/* v9.71 — mots rares ✦ dans le Carnet, phrases-clés de l'étape, cartes de grammaire */
.qt-step { margin-top: 5px; font-size: 0.74em; color: var(--ink-soft); line-height: 1.3; }
.qt-phrases { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-top: 5px; font-size: 0.74em; color: var(--ink-soft); }
.qt-phrases .qt-hint { opacity: 0.75; font-style: italic; }
.qt-phrases.done { color: #3f8a4a; }

.screen-layer.gc { display: flex; align-items: center; justify-content: center; background: rgba(12, 16, 28, 0.55); }
.gc-card {
  width: min(620px, 92vw); max-height: 88vh; overflow: auto; padding: 22px 26px 20px; border-radius: 16px;
  background: #fbf6e8; color: #2a2016; border: 3px solid #3f6fb0; box-shadow: 0 10px 0 #24467a, 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: gc-in 0.35s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes gc-in { from { transform: translateY(24px) scale(0.92); opacity: 0; } }
.gc-kicker { font-family: var(--pixel); font-size: 0.72em; letter-spacing: 0.12em; color: #3f6fb0; text-transform: uppercase; }
.gc-title { margin: 6px 0 4px; font-size: 1.5em; line-height: 1.15; }
.gc-rule { margin: 0 0 14px; font-size: 1.02em; line-height: 1.4; color: #4a3c2c; }
.gc-rows { display: flex; flex-direction: column; gap: 8px; }
.gc-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; text-align: left; cursor: pointer;
  background: #fff; border: 2px solid #e2d6b8; font: inherit; color: inherit;
}
.gc-row:hover { border-color: #3f6fb0; }
.gc-row.bad { opacity: 0.62; cursor: default; }
.gc-row.bad .gc-t .tl-main { text-decoration: line-through; text-decoration-color: #c0403a; text-decoration-thickness: 2px; }
.gc-pics { display: flex; gap: 4px; flex: none; min-width: 40px; }
.gc-pics canvas { width: 40px; height: 40px; image-rendering: pixelated; }
.gc-t { flex: 1; font-size: 1.22em; font-weight: 700; }
.gc-t mark { background: #ffd65a; color: inherit; border-radius: 4px; padding: 0 3px; }
.gc-t .tl-roman, .gc-qt .tl-roman, .gc-opt .tl-roman { display: block; font-size: 0.62em; font-weight: 400; opacity: 0.7; }
.gc-say { opacity: 0.45; }
.gc-x { color: #c0403a; font-weight: 900; font-size: 1.3em; }
.gc-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.gc-q { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 18px; }
.gc-qt { font-size: 1.5em; font-weight: 700; }
.gc-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gc-opt {
  min-width: 120px; padding: 12px 18px; border-radius: 12px; font: inherit; font-size: 1.15em; font-weight: 700; cursor: pointer;
  background: #fff; border: 3px solid #c9b88e; box-shadow: 0 4px 0 #a8946a; color: #2a2016;
}
.gc-opt:hover, .gc-opt:focus { border-color: #3f6fb0; outline: none; transform: translateY(-1px); }
.gc-opt.right { background: #d8f5dc; border-color: #3fae6a; box-shadow: 0 4px 0 #2a7a48; animation: cap-pop 0.4s ease both; }
.gc-opt.wrong { background: #fbe0dc; border-color: #c0403a; box-shadow: 0 4px 0 #8a2a24; animation: gc-shake 0.3s ease; }
@keyframes gc-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.gc-card.result { text-align: center; }
.gc-card.result.perfect { border-color: #e0a020; box-shadow: 0 10px 0 #9a6a10, 0 18px 40px rgba(0, 0, 0, 0.45); }
.gc-big { font-size: 3em; }
.phrase.gram .entry-num { font-size: 1.1em; }
.gc-card .gc-row { flex-direction: row !important; justify-content: flex-start; font-size: 16px; width: 100%; min-height: 0; height: auto; }
.gc-card .gc-t, .gc-card .gc-qt { font-size: 1.35em !important; font-weight: 700; align-items: flex-start; font-family: var(--serif, Georgia, serif); }
.gc-card .gc-qt { font-size: 1.6em !important; align-items: center; }
.gc-card .gc-opt { flex-direction: column; align-items: center; font-family: var(--serif, Georgia, serif); }
.gc-card .gc-opt .tl { font-size: 1.15em; align-items: center; }
.gc-card .gc-rows .gc-say, .gc-card .gc-rows .gc-x { margin-left: auto; }
.gc-card .gc-t, .gc-card .gc-qt, .gc-card .gc-opt { font-style: normal; }

/* v9.72 : plaques d'étape au-dessus des portes (ui/worldLabel.js showPlaques) */
.step-plaque { position: absolute; left: 0; top: 0; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center;
  font-family: var(--pixel); font-size: 13px; line-height: 1; color: #fff; background: var(--c, #888); border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(40, 24, 20, 0.85), 0 3px 0 2px rgba(40, 24, 20, 0.5); pointer-events: none; opacity: 0.88; white-space: nowrap; }
.step-plaque::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 6px; margin-left: -1px; background: rgba(40, 24, 20, 0.85); }
.step-plaque.now { height: 26px; font-size: 16px; padding: 0 8px; opacity: 1; animation: step-plaque 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(40, 24, 20, 0.9), 0 3px 0 2px rgba(40, 24, 20, 0.5), 0 0 14px var(--c); }
.step-plaque.done { opacity: 0.55; filter: saturate(0.5); }
@keyframes step-plaque { 50% { margin-top: -3px; } }
html[data-learn] .step-plaque { word-spacing: 0; }

/* v9.72 : les quartiers d'étape sur la carte du Carnet (ui/pages.js) */
.pg-quarter { position: absolute; border: 2px dashed var(--c); border-radius: 8px; background: color-mix(in srgb, var(--c) 12%, transparent);
  pointer-events: none; opacity: 0.5; }
.pg-quarter > b { position: absolute; left: 3px; top: 3px; padding: 1px 5px; border-radius: 5px; background: var(--c); color: #fff;
  font: 11px/1.3 var(--pixel); white-space: nowrap; }
/* v10.18 : « Île n · nom » sur chaque île ; sur une île étroite, le nom passe à la ligne au lieu d'être recouvert */
.pg-quarter > b { white-space: normal; max-width: calc(100% - 12px); width: max-content; }
.pg-quarter.now { opacity: 1; border-style: solid; background: color-mix(in srgb, var(--c) 22%, transparent); animation: pg-quarter 1.8s ease-in-out infinite; }
.pg-quarter.done { opacity: 0.3; }
/* ville 2 : quartier encore fermé (voile gris, cadenas) */
.pg-quarter.locked { opacity: 1; border-style: dashed; border-color: rgba(60, 50, 60, 0.55); background: rgba(70, 64, 76, 0.42); }
.pg-quarter.locked > b { background: #5a5060; }
.pg-pin.shut { opacity: 0.35; filter: grayscale(1); }
.pg-mk.gate { font-size: 13px; filter: drop-shadow(0 1px 0 #4a2f3c); }
@keyframes pg-quarter { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent); } }
.pg-pin > .pg-step { position: absolute; right: -9px; bottom: -6px; min-width: 13px; height: 13px; padding: 0 2px; border-radius: 4px;
  background: var(--c); color: #fff; font: 9px/13px var(--pixel); text-align: center; font-style: normal; white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(40, 24, 20, 0.7); }
/* v10.18 : étape dans l'île (core/islands.js) — faite / en cours / fermée */
.pg-pin > .pg-step.done { background: #6a8a5a; }
.pg-pin > .pg-step.locked { background: #5a5060; }
.pg-pin > .pg-step.now { right: -14px; bottom: -8px; height: 16px; min-width: 20px; padding: 0 4px; font-size: 11px; line-height: 16px;
  box-shadow: 0 0 0 2px #fff6c8, 0 0 8px var(--c); animation: pg-step-now 1.2s ease-in-out infinite; }
@keyframes pg-step-now { 50% { transform: translateY(-2px); } }
.pg-pin.now { z-index: 2; }
/* v10.18 : mot bonus (pas obligatoire pour le maître, pièces ×2) */
.entry-bonus { position: absolute; bottom: 3px; right: 5px; padding: 0 4px; border-radius: 3px; background: rgba(176, 120, 40, 0.16); color: #9a6420; font-size: 0.55em; letter-spacing: 0.04em; text-transform: uppercase; }
