/* « Ma maison » (5/11) : catalogue des décorations, statues de type, barre du quadrillage. */
.ma-cat .ma-catalogue { width: min(1040px, 96vw); max-height: 92vh; overflow: auto; }
.ma-onglets { gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.ma-onglets .btn { padding: 6px 12px; }
.ma-aide { margin: 4px 0 8px; font-size: 17px; }
/* (G9) ses Pokémon à 100 % dans une statue : petite couronne en pixels */
.ma-propre-aide { color: #ffe9a0; display: flex; align-items: center; gap: 6px; margin-top: -4px; }
.ma-cr { display: inline-block; width: 15px; height: 11px; flex: none; }
.ma-cr .pxi { --k: 1px; }
.ma-propre { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: #ffd35c; line-height: 1; }
.ma-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 8px; }
.ma-carte { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; }
.ma-carte > .grow { min-width: 0; }
.ma-carte b { font-size: 20px; font-weight: normal; color: #fff; display: block; line-height: 1.1; }
.ma-apercu { width: 72px; height: 54px; image-rendering: pixelated; background: radial-gradient(ellipse at 50% 85%, rgba(110,170,80,.45), rgba(0,0,0,.25) 70%); border: 2px solid rgba(143,208,255,.35); border-radius: 4px; }
.ma-statue .ma-apercu { height: 64px; background: radial-gradient(ellipse at 50% 80%, color-mix(in srgb, var(--type) 40%, transparent), rgba(0,0,0,.35) 70%); border-color: color-mix(in srgb, var(--type) 70%, #000); }
.ma-statue { border-left: 4px solid var(--type); }
.ma-desc { font-size: 15px; line-height: 1.2; }
.ma-boutons, .ma-bascules { gap: 4px; }
.ma-carte .btn { white-space: nowrap; }
.ma-finales { gap: 3px; flex-wrap: wrap; margin-top: 4px; }
.ma-finales .btn.mini { padding: 1px 3px; min-height: 0; }
.ma-carte.ma-pop { animation: maPop .6s steps(6, end); }
@keyframes maPop { 0% { transform: none; } 25% { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--gold); } 50% { transform: none; } 75% { transform: translateY(-2px); } 100% { transform: none; } }
/* Barre du quadrillage, en bas de l'écran */
.ma-barre { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 40; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 8px 12px; max-width: min(900px, 96vw); animation: maBarre .3s steps(4, end); }
.ma-barre-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 260px; }
.ma-barre-t .muted { font-size: 15px; line-height: 1.15; }
.ma-barre-b { gap: 6px; flex-wrap: wrap; }
.ma-barre-b .btn { padding: 6px 12px; }
@keyframes maBarre { from { transform: translate(-50%, 24px); opacity: 0; } }
.f-visite .pxi { margin: -4px 2px -4px 0; }
.am-maison { gap: 10px; align-items: center; margin: 8px 0; padding: 8px 12px; font-size: 17px; }
body.is-touch .ma-barre { bottom: 6px; }
@media (max-width: 700px) {
  .ma-carte { grid-template-columns: 60px minmax(0, 1fr); }
  .ma-carte .ma-boutons, .ma-carte .ma-bascules { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .ma-apercu { width: 60px; height: 45px; }
}
/* Téléphone : barre compacte, boutons sur une ligne, aide courte */
@media (max-width: 700px), (max-height: 500px) {
  .ma-barre { bottom: 6px; padding: 6px 8px; gap: 4px 8px; width: calc(100vw - 16px); }
  .ma-barre-t .muted { font-size: 13px; }
  .ma-barre .ma-barre-b { flex-direction: row !important; flex-wrap: wrap; width: 100%; justify-content: space-between; }
  .ma-barre .ma-barre-b .btn { flex: 1 1 0; min-width: 0; padding: 6px 4px; font-size: 16px; }
}
/* (6/11) Agrandir ma maison : l'étage du bas, la grotte de la Falaise Requin (vendue par Machopeur) */
.ma-agrandir { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; margin: 8px 0 4px; }
.ma-agrandir b { font-size: 20px; font-weight: normal; color: #fff; display: block; line-height: 1.1; }
.ma-agr-img { width: 150px; height: 72px; background: url(assets/maison/grotte.png) -165px -132px / 528px 384px no-repeat; image-rendering: pixelated;
  border: 2px solid rgba(143,208,255,.45); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); }
.ma-agrandir.gold .ma-agr-img { border-color: var(--gold); }
.ma-agrandir .ma-boutons { align-items: flex-end; }
.ma-look { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px 2px 2px; min-height: 0; }
.ma-look img { width: 24px; height: 24px; image-rendering: pixelated; }
/* Fenêtre « Choisir le Pokémon de la statue » : grand aperçu à gauche, grille des Pokémon du stade à droite */
.ma-choix .ma-choix-box { width: min(860px, 96vw); max-height: 92vh; overflow: auto; border-left: 4px solid var(--type); }
.ma-choix-stade { font-size: 18px; }
.ma-choix-corps { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: start; }
.ma-choix-vue { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 6px;
  background: radial-gradient(ellipse at 50% 78%, color-mix(in srgb, var(--type) 45%, transparent), rgba(0,0,0,.4) 72%); border: 2px solid color-mix(in srgb, var(--type) 70%, #000); }
.ma-choix-grand { width: 204px; height: 204px; image-rendering: pixelated; }
.ma-choix-nom { font-size: 24px; font-weight: normal; color: #fff; text-shadow: 0 2px 0 #000; }
.ma-choix-aura { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: #e8f0ff; }
.ma-choix-aura i { width: 10px; height: 10px; border-radius: 50%; background: var(--type); box-shadow: 0 0 6px 2px var(--type); }
.ma-choix-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ma-choix-carte { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 4px; cursor: pointer; font: inherit; color: #e8f0ff;
  background: rgba(10,16,40,.75); border: 2px solid rgba(143,208,255,.35); border-radius: 6px; transition: transform .08s steps(2, end); }
.ma-choix-carte canvas { width: 96px; height: 85px; image-rendering: pixelated;
  background: radial-gradient(ellipse at 50% 85%, color-mix(in srgb, var(--type) 35%, transparent), transparent 70%); }
.ma-choix-carte b { font-size: 17px; font-weight: normal; line-height: 1.1; text-align: center; }
.ma-choix-coche { font-size: 14px; color: var(--gold); visibility: hidden; }
.ma-choix-carte:hover, .ma-choix-carte:focus-visible { border-color: #ffd35c; transform: translateY(-2px); outline: none; }
.ma-choix-carte.sel { border-color: var(--gold); background: rgba(60,46,10,.75); box-shadow: 0 0 0 2px rgba(0,0,0,.6), 0 0 10px color-mix(in srgb, var(--type) 60%, transparent); }
.ma-choix-carte.sel .ma-choix-coche { visibility: visible; }
.ma-choix-carte.ma-pop { animation: maPop .6s steps(6, end); }
@media (max-width: 700px), (max-height: 500px) {
  .ma-agrandir { grid-template-columns: 96px minmax(0, 1fr); }
  .ma-agrandir .ma-boutons { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; align-items: center; }
  .ma-agr-img { width: 96px; height: 60px; background-position: -110px -88px; background-size: 352px 256px; }
  .ma-choix-corps { grid-template-columns: 1fr; }
  .ma-choix-vue { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .ma-choix-grand { width: 120px; height: 120px; }
  .ma-choix-grille { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .ma-choix-carte canvas { width: 72px; height: 64px; }
}
/* (7/11, Kiko) Pendant qu'on place une décoration, les menus du camp (menu de gauche, cadre du salon, bouton « Menu »
   du téléphone) s'effacent en fondu pour laisser voir toute la maison ; ils reviennent en fondu à la fin du placement.
   Seuls restent la barre du quadrillage (Poser, Tourner, Ranger, Lâcher…) et ses consignes. */
body.ma-placement #ui > .screen, body.ma-placement #tel-menu, body.ma-placement #emote-btn {
  opacity: 0 !important; visibility: hidden; pointer-events: none !important; animation: maMenusPartent .22s ease-out; }
@keyframes maMenusPartent { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: visible; } }
body.ma-placement-fin #ui > .screen, body.ma-placement-fin #tel-menu, body.ma-placement-fin #emote-btn { animation: maMenusReviennent .28s ease-out; }
@keyframes maMenusReviennent { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.ma-placement #ui > .screen, body.ma-placement-fin #ui > .screen { animation: none; } }
/* (13/11) un favori dans le choix du Pokémon d'une statue : son étoile, en haut à gauche de la carte */
.ma-choix-carte { position: relative; }
.ma-choix-carte .ma-fav { position: absolute; left: 2px; top: 2px; z-index: 2; }
