/* Chantier du camp (Machopeur), boutique selon son niveau, coffres scellés chez Xatu (pavé 5 du playtest, 30/10). */
.chantier .am-titre { margin: 10px 0 4px; }
.am-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 8px; }
.am-carte { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px; overflow: hidden; }
.am-carte > .grow { min-width: 0; }
.am-apercu { flex: none; width: 96px; height: 72px; image-rendering: pixelated; background: radial-gradient(ellipse at 50% 80%, rgba(120,170,90,.35), rgba(0,0,0,.25) 70%); border: 2px solid rgba(143,208,255,.35); border-radius: 4px; }
.am-nom { font-size: 22px; font-weight: normal; color: #fff; display: block; line-height: 1.1; }
.am-pips { font-size: 16px; letter-spacing: 1px; color: var(--gold); }
.am-pips .pxi { margin: 0 1px; }
.am-etat { font-size: 16px; line-height: 1.2; color: #d8e4ff; }
.am-suiv { color: #9fe39a; }
.am-carte .btn { flex: none; white-space: nowrap; }
.am-carte.am-fait { animation: amFait .7s steps(6, end); }
/* Décoration cachée (31/10) : son aperçu pâlit ; emplacements du camp : un monument au choix par emplacement */
.am-carte.am-cachee .am-apercu { opacity: .4; filter: grayscale(.7); }
.am-aff { min-width: 118px; }
.am-emplacements { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; }
.am-emp { gap: 8px; flex-wrap: wrap; align-items: center; }
.am-emp .btn { white-space: nowrap; }
@keyframes amFait { 0% { transform: translateY(0); } 20% { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--gold); } 40% { transform: translateY(0); } 60% { transform: translateY(-2px); } 100% { transform: none; } }
.am-poussiere { position: absolute; bottom: 10px; width: 6px; height: 6px; background: #e8d6a8; box-shadow: 0 0 0 1px #8a6a3a; pointer-events: none;
  animation: amPoussiere .8s steps(8, end) forwards; }
@keyframes amPoussiere { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.shop-niveau { margin: 0 0 8px; font-size: 16px; color: #d8e4ff; }

/* Xatu : choix et coffres scellés */
.xatu-choix .btn { justify-content: flex-start; }
.xc-corps { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 12px; margin-top: 6px; align-items: start; }
.xc-scene { position: relative; }
.xc-scene canvas { display: block; width: 100%; image-rendering: pixelated; border: 3px solid #4b3a8a; border-radius: 6px; box-shadow: inset 0 0 0 2px #1a1438; }
.xc-res { margin-top: 8px; }
.xc-res:empty { display: none; }
.xc-res.montre .xc-carte { animation: xcCarte .5s steps(5, end); }
@keyframes xcCarte { from { transform: translateY(18px) scale(.9); opacity: 0; } }
.xc-carte { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px; background: rgba(10,8,30,.92); border: 3px solid var(--rc); border-radius: 6px; box-shadow: 0 0 18px -4px var(--rc); }
.xc-obj { width: 48px; height: 48px; image-rendering: pixelated; }
.xc-nom { font-size: 22px; font-weight: normal; color: #fff; }
.xc-desc { font-size: 15px; }
.xc-plus { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 17px; color: var(--gold); }
.xc-plus .pxi { margin: -4px 0; }
.xc-cote { display: flex; flex-direction: column; gap: 8px; }
.xc-liste { display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow: auto; scrollbar-width: none; }
.xc-liste::-webkit-scrollbar { display: none; }
.xc-item { justify-content: flex-start; gap: 8px; }
.xc-item img { width: 32px; height: 32px; image-rendering: pixelated; margin: -6px 0; }
.xc-probas h3 { margin: 0 0 4px; }
.xc-p { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 17px; padding: 2px 0; border-bottom: 1px dashed rgba(143,208,255,.2); }
.xc-p b { font-weight: normal; min-width: 96px; }
.xc-pc { margin-left: auto; color: #fff; }
.xc-objs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; flex: 1 0 100%; padding-left: 38px; min-width: 0; }
.xc-objs-plus { font-size: 14px; color: #c9c2ef; margin-left: 4px; }
.xc-objs img { width: 24px; height: 24px; image-rendering: pixelated; }
.xc-p .pxi { margin: -4px 2px -4px 0; }
.xc-bonus-t { margin-top: 6px; font-size: 15px; color: #8fd0ff; }
@media (max-width: 640px) { .xc-corps { grid-template-columns: 1fr; } .xc-cote #xc-ouvrir { order: -1; } .xc-scene canvas { max-height: 34vh; width: auto; max-width: 100%; margin: 0 auto; } }
/* Téléphone à l'horizontale : la scène et la liste côte à côte, le bouton Ouvrir reste visible */
@media (max-height: 520px) {
  .xc-corps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .xc-scene canvas { max-height: calc(100dvh - 150px); width: auto; max-width: 100%; margin: 0 auto; }
  .xc-liste { max-height: 84px; }
  .xc-cote #xc-ouvrir { order: -1; }
  .xc-cote { max-height: calc(100dvh - 150px); overflow: auto; scrollbar-width: none; }
  .xc-p { font-size: 14px; }
  .xc-probas h3 { font-size: 16px; }
  .xc-carte { padding: 4px 8px; }
  .xc-obj { width: 32px; height: 32px; }
}
@media (max-width: 820px), (max-height: 520px) {
  .am-grille { grid-template-columns: 1fr; }
  .am-apercu { width: 72px; height: 54px; }
  .am-carte { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px; }
}
/* Invocations : les Pokémon d'une bannière en grand (pavé 5, 5.8) */
.pdm-box { width: min(1000px, calc(96vw / var(--ui, 1))) !important; max-height: calc(88vh / var(--ui, 1)); display: flex; flex-direction: column; }
.pdm-liste { overflow: auto; scrollbar-width: none; }
.pdm-liste::-webkit-scrollbar { display: none; }
.pdm-liste h3 { margin: 10px 0 4px; }
.pdm-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pdm-pk { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 136px; padding: 6px 4px; background: rgba(8,12,30,.55); border: 2px solid rgba(143,208,255,.25); border-radius: 6px; }
.pdm-pk.a { border-color: rgba(255,216,90,.55); }
.pdm-c { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.pdm-c canvas { image-rendering: pixelated; max-width: 150px; max-height: 150px; }
.pdm-pk figcaption { font-size: 18px; text-align: center; color: #e8f0ff; }

/* 31/10 : en 1366 × 768, « Démonter 150 000 » écrasait le texte de la carte « Deuxième objet » : le texte garde 150 px au moins,
   et le bouton de démontage tient sur deux lignes (le mot, puis le prix). */
.am-carte { grid-template-columns: 96px minmax(150px, 1fr) auto; }
.am-carte .btn[data-remb] { flex-direction: column; gap: 0; line-height: 1.05; white-space: nowrap; font-size: 19px; padding-top: 4px; padding-bottom: 4px; }
@media (max-width: 820px), (max-height: 520px) { .am-carte { grid-template-columns: 72px minmax(120px, 1fr) auto; } }
/* Téléphone en portrait : l'aperçu et le texte côte à côte, le bouton en dessous sur toute la largeur (test de main, 30/10) */
@media (max-width: 520px) {
  .am-carte { grid-template-columns: 64px minmax(0, 1fr); }
  .am-carte .btn { grid-column: 1 / -1; justify-self: stretch; }
  .am-apercu { width: 64px; height: 48px; }
}
/* Téléphone à l'horizontale : l'objet sorti du coffre s'affiche sur la scène, pas sous l'écran */
@media (max-height: 520px) {
  .xc-res { position: absolute; left: 6px; right: 6px; bottom: 6px; margin: 0; }
}
/* Boutons Discord et « Soutenir le jeu » à côté du plein écran (liens.js) : seulement à l'écran titre et au camp. */
.liens-haut { position: fixed; right: var(--tools-r); top: 6px; z-index: 13; display: flex; align-items: center; gap: 6px; }
.liens-haut .fs-btn { position: static; }
.lien-btn { display: none; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; cursor: pointer; opacity: .9; background: none; border: none; transition: transform .1s steps(2, end), opacity .15s; }
body.in-camp .lien-btn, body:has(.title-screen) .lien-btn { display: flex; }
body.in-donjon .lien-btn { display: none !important; }
.lien-btn:hover { opacity: 1; transform: translateY(-2px); }
.lien-btn:active { transform: scale(.9); }
.lien-discord img { width: 32px; height: 32px; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.lien-pika .pika { display: block; width: 28px; height: 28px; border: 2px solid #c99a2e; border-radius: 4px; box-shadow: 0 2px 0 rgba(0,0,0,.6);
  background: #fff3c0 url('assets/pkmn/0025/portrait.png') -6px -3px no-repeat; image-rendering: pixelated; }
.lien-pika.content .pika { background-image: url('assets/pkmn/0025/portrait-happy.png'); animation: pikaSaute .5s steps(4, end) 2; }
@keyframes pikaSaute { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
body.is-touch .lien-btn { width: 30px; height: 30px; opacity: .8; }
body.is-touch .lien-discord img { width: 30px; height: 30px; }
body.is-touch .lien-pika .pika { width: 26px; height: 26px; background-position: -7px -4px; }
/* (13/11, Kiko) dernier onglet du menu du camp (« Plus… ») : une petite ligne discrète, pas un gros bouton */
.cm-reste .cm-soutien { grid-column: 1 / -1; justify-self: center; display: flex; align-items: center; gap: 6px; min-height: 0; height: auto; padding: 2px 10px; margin-top: 2px;
  font-size: 15px; opacity: .75; background: none; border-color: transparent; box-shadow: none; }
/* sur téléphone, le menu est une grille d icônes : « Soutenir » y prend une case comme les autres, sans ajouter de ligne */
body.is-touch .hub-mini .cm .cm-reste .cm-soutien { grid-column: auto; justify-self: stretch; flex-direction: column; justify-content: center; margin-top: 0; padding: 2px; font-size: 13px; }
/* téléphone couché : pas la place d une ligne de plus (le menu ne doit pas défiler) ; le Pikachu en haut à droite reste là */
@media (orientation: landscape) { body.is-touch .hub-mini .cm .cm-reste .cm-soutien { display: none; } }
.cm-reste .cm-soutien:hover, .cm-reste .cm-soutien:focus-visible, .cm-reste .cm-soutien.focus { opacity: 1; }
.cm-soutien .pika { display: block; width: 18px; height: 18px; border: 1px solid #c99a2e; border-radius: 3px; background: #fff3c0 url('assets/pkmn/0025/portrait.png') -11px -8px no-repeat; image-rendering: pixelated; }
.soutien-box { width: min(560px, 94vw); }
.soutien-haut { display: flex; align-items: center; gap: 14px; }
.soutien-haut h2 { margin: 0 0 4px; }
.soutien-haut p { margin: 0; }
.soutien-pika { width: 80px; height: 80px; image-rendering: pixelated; border: 3px solid #c99a2e; border-radius: 6px; background: #fff3c0; animation: pikaSaute .6s steps(4, end) 2; }
.soutien-btns { justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.soutien-btns img { width: 24px; height: 24px; image-rendering: pixelated; margin: -4px 4px -4px 0; vertical-align: middle; }

/* Roulette du coffre scellé chez Xatu (31/10) : la bande des lots défile au-dessus de la scène et s'arrête sur le lot gagné. */
.xc-roul { position: absolute; left: 8px; right: 8px; top: 8px; display: none; }
.xc-roul.montre { display: block; animation: xcCarte .3s steps(3, end); }
.xc-roul-fen { position: relative; overflow: hidden; background: rgba(10,8,30,.94); border: 3px solid #b07cff; border-radius: 6px; box-shadow: 0 0 0 2px #1a1438, 0 4px 0 #050414; padding: 6px 0; }
.xc-roul-bande { display: flex; gap: 6px; will-change: transform; padding-left: 6px; }
.xc-roul-case { flex: 0 0 92px; height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px solid var(--lc, #4b3a8a); border-radius: 5px; background: #16123a; text-align: center; }
.xc-roul-case small { font-size: 12px; line-height: 1.05; color: #e8e2ff; padding: 0 3px; }
.xc-roul-case.leg { box-shadow: inset 0 0 12px rgba(255,138,92,.45); }
.xc-roul-case.faille { box-shadow: inset 0 0 12px rgba(196,140,255,.55); }
.xc-roul-case.gagne { border-color: #fff; background: #2a1f60; animation: xcGagne .6s steps(4, end) 2; }
@keyframes xcGagne { 50% { transform: scale(1.12); box-shadow: 0 0 18px #fff; } }
.xc-roul-fleche { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; border-left: 2px solid #ffd35c; box-shadow: 0 0 6px #ffd35c; pointer-events: none; }
.xc-roul-fleche::before { content: ''; position: absolute; left: -7px; top: 0; border: 6px solid transparent; border-top-color: #ffd35c; }
.xc-lot-ico { display: inline-flex; align-items: center; min-width: 30px; }
.xc-lot-bd, .xc-roul-case .xc-lot-bd { width: 32px; height: 32px; image-rendering: pixelated; }
.xc-x3 { font-size: 13px; color: #ffd35c; margin-left: 1px; }
