/* Livre 3 des Quêtes histoire (23/11) : fenêtre « Qui incarnes-tu ? » (client/js/equipe-crane.js). Style des fenêtres du jeu
   (cadre bleu nuit, or), teinte violette de l'Équipe Crâne, animations en pas (pixel art). */
.modal.ec-modal { z-index: 60; animation: ecFond .2s steps(4, end); }
.modal.ec-modal.ec-sort { animation: ecSort .28s steps(4, end) forwards; }
@keyframes ecFond { from { opacity: 0; } to { opacity: 1; } }
@keyframes ecSort { to { opacity: 0; } }
.ec-box { width: min(900px, calc(96vw / var(--ui, 1))); max-height: calc(100vh / var(--ui, 1) - 24px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(#1d1238, #0d1030 60%); box-shadow: inset 0 0 0 2px #7b4fc4, 0 0 0 2px #0a0618, 0 6px 0 #05030f; animation: ecPop .3s steps(5, end); }
@keyframes ecPop { 0% { scale: .86; opacity: 0; } 70% { scale: 1.03; opacity: 1; } 100% { scale: 1; } }
.ec-tete { display: flex; align-items: center; gap: 12px; }
.ec-crane { display: grid; place-items: center; width: 52px; height: 52px; background: #6a3fb5; box-shadow: inset 0 0 0 2px #b48cff, 0 3px 0 #05030f; animation: ecCrane 1.6s steps(2, end) infinite; }
.ec-crane img { width: 48px; height: 48px; image-rendering: pixelated; }
@keyframes ecCrane { 50% { translate: 0 -3px; rotate: -6deg; } }
.ec-titre { display: block; font-size: 30px; line-height: 34px; text-shadow: 0 2px 0 #000; }
.ec-sous { display: block; color: var(--dim); font-size: 17px; }
.ec-cartes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ec-carte { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 34px; color: inherit; font: inherit; cursor: pointer;
  background: linear-gradient(#2b1d55, #15123a); border: 0; box-shadow: inset 0 0 0 2px #4e3a8e, 0 3px 0 #05030f; transition: transform .1s steps(2, end);
  animation: ecArrive .35s steps(5, end) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes ecArrive { from { translate: 0 18px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.ec-carte:hover:not([disabled]), .ec-carte:focus-visible { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--gold), 0 6px 0 #05030f; outline: none; }
.ec-carte.moi { background: linear-gradient(#5a3c12, #2a1d40); box-shadow: inset 0 0 0 3px var(--gold), 0 0 14px rgba(255,210,90,.45), 0 3px 0 #05030f; }
.ec-carte.prise { filter: grayscale(.7) brightness(.7); cursor: default; }
.ec-carte.saute { animation: ecSaute .3s steps(3, end); }
@keyframes ecSaute { 50% { translate: 0 -8px; } }
.ec-por { width: 80px; height: 80px; background: #0c0a24; box-shadow: inset 0 0 0 2px #6a50b0; display: grid; place-items: center; }
.ec-por img { width: 80px; height: 80px; image-rendering: pixelated; }
.ec-carte.moi .ec-por { animation: ecBrille 1.2s steps(2, end) infinite; }
@keyframes ecBrille { 50% { box-shadow: inset 0 0 0 2px var(--gold), 0 0 10px rgba(255,210,90,.6); } }
.ec-nom { font-size: 21px; line-height: 24px; }
.ec-role { font-size: 14px; color: var(--dim); text-align: center; min-height: 34px; }
.ec-et { color: var(--gold); font-size: 16px; letter-spacing: 2px; }
.ec-et i { color: #3b3266; font-style: normal; }
.ec-atts { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.ec-att { font-size: 13px; line-height: 18px; padding: 0 5px; color: #0a1020; background: var(--c); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.ec-qui { position: absolute; left: 8px; right: 8px; bottom: 7px; font-size: 15px; line-height: 22px; text-align: center; background: #0b0920; box-shadow: inset 0 0 0 2px #3a2d6e; }
.ec-qui.moi { color: #20160a; background: var(--gold); box-shadow: none; }
.ec-qui.libre { color: #b9f3c7; }
.ec-bas { display: flex; flex-direction: column; gap: 6px; }
.ec-note { font-size: 16px; color: var(--dim); }
.ec-chrono { display: block; height: 8px; background: #0b0920; box-shadow: inset 0 0 0 2px #3a2d6e; }
.ec-chrono i { display: block; height: 100%; width: 100%; background: linear-gradient(#b48cff, #7b4fc4); transition: width .2s linear; }
.ec-chrono i.vite { background: linear-gradient(#ff9a8a, #d2453a); }
@media (max-width: 720px), (max-height: 520px) {
  .ec-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ec-por, .ec-por img { width: 56px; height: 56px; }
  .ec-titre { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .ec-crane, .ec-carte, .ec-carte.moi .ec-por { animation: none; } }
/* Onglet Quêtes histoire : le livre 3 (crâne violet) */
.hq-lv-crane .hq-lvp { background: #6a3fb5; border-color: #b48cff; }
.hq-ico-crane { width: 26px; height: 26px; image-rendering: pixelated; vertical-align: middle; }
.hq-pretes .hq-balance img { width: 40px; height: 40px; image-rendering: pixelated; }
.hq-lv-crane.sel .hq-lvp { animation: ecCrane 1.6s steps(2, end) infinite; }
