/* Les Mathémons : même vert que le reste du site (#16855a, #5cc79a) */
#features.mm-section { padding-top: 1em; }
.mm-outil { max-width: 72em; width: 100%; box-sizing: border-box; margin: 0 auto; text-align: left; }
.mm { position: relative; font-family: 'Nunito', 'Segoe UI', Arial, sans-serif; color: #444; -webkit-user-select: none; user-select: none; }
.mm [hidden] { display: none !important; }
.mm h2, .mm h3, .mm b, .mm-go, .mm-touche, .mm-saisie { font-family: 'Fredoka', 'Nunito', sans-serif; }
.mm h2 { margin: 0 0 .5em; color: #16855a; font-size: 1.6em; line-height: 1.2; text-align: center; }
.mm h3 { margin: 1.2em 0 .6em; color: #16855a; font-size: 1.05em; text-align: center; letter-spacing: .04em; }
.mm [role="button"] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mm [role="button"]:focus-visible { outline: 3px solid #f2b01e; outline-offset: 2px; }
.mm-rgpd { text-align: center; color: #999; font-size: .85em; margin: 1em 0 0; }
.mm-centre { text-align: center; margin-top: 1.2em; }
.mm-bts { display: flex; flex-wrap: wrap; gap: .8em; justify-content: center; align-items: center; }
.mm-info { color: #888; text-align: center; font-size: .92em; }
.mm-ecran { background: #fff; border: 2px solid #e5e5e5; border-radius: 1.2em; padding: 1em 1.2em 1.4em; min-height: 30em; }
.mm-boite { max-width: 60em; margin: 0 auto; }
.mm-go { display: inline-flex; align-items: center; gap: .4em; padding: .7em 1.4em; border-radius: .8em; background: #16855a; color: #fff; font-weight: 600; font-size: 1.02em; box-shadow: 0 .2em 0 #0e5c3d; }
.mm-go:hover { background: #127048; }
.mm-go:active { transform: translateY(.15em); box-shadow: 0 .05em 0 #0e5c3d; }
.mm-go small { font-weight: 400; opacity: .8; }
.mm-go2 { background: #fff; color: #16855a; border: 2px solid #16855a; box-shadow: none; }
.mm-go2:hover { background: #eaf7f1; }
.mm-lien { display: inline; color: #16855a; text-decoration: underline; }
.mm-mini { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4em; height: 2.4em; padding: 0 .7em; border-radius: 1.2em; background: #f3f5f4; color: #555; font-weight: 700; white-space: nowrap; }
.mm-mini:hover { background: #eaf7f1; color: #16855a; }
.mm-bete { width: 100%; height: 100%; display: block; overflow: visible; }
.mm-ico-mini { display: inline-block; width: 1.6em; height: 1.6em; vertical-align: middle; }
.mm-type { display: inline-block; padding: .05em .55em; border-radius: 1em; color: #fff; font-size: .75em; font-weight: 800; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); white-space: nowrap; }

/* Tuiles */
.mm-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14em, 1fr)); gap: .8em; }
.mm-tuile { display: flex; flex-direction: column; gap: .2em; padding: .85em 1em; border: 2px solid #e5e5e5; border-radius: 1em; color: #777; line-height: 1.4; text-align: center; transition: border-color .2s, box-shadow .2s, transform .15s; }
.mm-tuile b { color: #16855a; font-size: 1.12em; font-weight: 600; }
.mm-tuile span { font-size: .88em; }
.mm-tuile:hover { border-color: #5cc79a; transform: translateY(-2px); }
.mm-tuile.actif { border-color: #16855a; box-shadow: 0 0 0 3px #d4efe3; background: #f6fcf9; }
.mm-zone { border-left: .5em solid var(--c); }
.mm-tuile.fait { background: #f6fcf9; }
.mm-ligue { border-color: #f2b01e; background: #fffaf0; }

/* Accueil */
.mm-intro { text-align: center; max-width: 44em; margin: 0 auto 1em; }
.mm-intro p { line-height: 1.6; }
.mm-trio { display: flex; justify-content: center; gap: .5em; height: 6.5em; }
.mm-trio .mm-bete { width: 6.5em; animation: mm-saut 2.4s ease-in-out infinite; }
.mm-trio .mm-bete:nth-child(2) { animation-delay: .3s; } .mm-trio .mm-bete:nth-child(3) { animation-delay: .6s; }
@keyframes mm-saut { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-.6em); } }
.mm-choix { display: flex; flex-wrap: wrap; justify-content: center; gap: 1em; }

/* Fiches de Mathémons */
.mm-fiche { display: flex; flex-direction: column; align-items: center; gap: .15em; width: 11em; padding: .6em .7em .7em; border: 2px solid #e5e5e5; border-radius: 1em; background: #fff; text-align: center; }
.mm-fiche .mm-bete { width: 5.5em; height: 5.5em; }
.mm-fiche b { color: #333; font-size: 1.05em; }
.mm-fiche > span { font-size: .85em; color: #777; }
.mm-fiche small { font-size: .75em; color: #888; }
.mm-fiche:hover { border-color: #5cc79a; }
.mm-fiche.ko { filter: grayscale(1); opacity: .6; }
.mm-fiche.dans-equipe { border-color: #16855a; box-shadow: 0 0 0 3px #d4efe3; background: #f6fcf9; }
.mm-starter .mm-bete { width: 7em; height: 7em; }
.mm-starter:hover .mm-bete { animation: mm-saut .8s ease; }
.mm-pv { width: 100%; height: .6em; border-radius: 1em; background: #e9ecea; overflow: hidden; margin-top: .3em; }
.mm-pv > div { height: 100%; background: #3cbf7c; border-radius: 1em; transition: width .5s ease; }
.mm-pv > div.orange { background: #f2b01e; } .mm-pv > div.rouge { background: #e0524d; }
.mm-xp { width: 100%; height: .3em; border-radius: 1em; background: #eef; overflow: hidden; margin-top: .2em; }
.mm-xp > div { height: 100%; background: #6cb8f0; }
.mm-grille { display: flex; flex-wrap: wrap; justify-content: center; gap: .8em; }

/* Barre et village */
.mm-barre { display: flex; flex-wrap: wrap; align-items: center; gap: .5em 1.2em; padding: 0 0 .8em; margin-bottom: .8em; border-bottom: 2px solid #f0f0f0; font-weight: 700; color: #555; }
.mm-badges { display: flex; gap: .25em; }
.mm-badge { width: 1.8em; height: 1.8em; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f0f0f0; filter: grayscale(1); opacity: .45; }
.mm-badge.on { filter: none; opacity: 1; background: #fff3cf; box-shadow: 0 0 0 2px #f2b01e; }
.mm-droite { margin-left: auto; }
.mm-equipe-mini { display: flex; flex-wrap: wrap; justify-content: center; gap: .8em; }
.mm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; margin: 1em 0 .5em; }

/* Mathédex */
.mm-grille-dex { gap: .6em; }
.mm-dex { width: 8.5em; padding: .5em; border: 2px dashed #e5e5e5; border-radius: 1em; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .15em; }
.mm-dex.pris { border-style: solid; }
.mm-dex .mm-bete { width: 4.5em; height: 4.5em; }
.mm-dex small { color: #aaa; font-size: .75em; }
.mm-dex b { font-size: .95em; color: #333; }
.mm-inconnu { width: 3em; height: 3em; margin: .75em; border-radius: 50%; background: #f0f0f0; color: #bbb; font: 700 1.6em/1.9em 'Fredoka', sans-serif; }

/* Sauvegarde */
.mm-code { display: block; width: 100%; max-width: 40em; margin: 0 auto; box-sizing: border-box; font: 600 .95em/1.4 monospace; padding: .7em; border: 2px solid #e5e5e5; border-radius: .7em; background: #f7f7f7; color: #333; word-break: break-all; resize: vertical; -webkit-user-select: text; user-select: text; }

/* Combat */
.mm-arene { display: grid; grid-template-rows: auto auto; gap: .2em; padding: .6em 1em; border-radius: 1em; background: linear-gradient(#e8f6ff 0%, #f3fbf6 55%, #dff3e7 100%); }
.mm-cote { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.mm-cote.lui { flex-direction: row; }
.mm-cote.moi { flex-direction: row; }
.mm-socle { position: relative; width: 7.5em; height: 7.5em; }
.mm-socle::after { content: ''; position: absolute; left: 5%; right: 5%; bottom: -.3em; height: 1.4em; border-radius: 50%; background: rgba(22, 133, 90, .18); z-index: -1; }
.mm-cote.moi .mm-socle { width: 8.5em; height: 8.5em; }
.mm-cote.moi .mm-bete { transform: scaleX(-1); }
.mm-socle.touche .mm-bete { animation: mm-touche .5s ease; }
.mm-socle.attaque { animation: mm-elan .45s ease; }
.mm-socle.secoue .mm-bete { animation: mm-touche .8s ease; }
@keyframes mm-touche { 20%, 60% { opacity: .2; } 40%, 80% { opacity: 1; filter: brightness(1.8); } }
@keyframes mm-elan { 50% { transform: translateX(1.2em) scale(1.05); } }
.mm-cote.lui .mm-socle.attaque { animation-name: mm-elan2; }
@keyframes mm-elan2 { 50% { transform: translateX(-1.2em) scale(1.05); } }
.mm-carton { flex: 0 1 18em; background: #fff; border-radius: .9em; padding: .6em .9em; box-shadow: 0 .2em .6em rgba(0, 0, 0, .08); }
.mm-carton b { font-size: 1.15em; color: #333; }
.mm-carton > span { color: #777; font-weight: 700; font-size: .9em; }
.mm-carton > small:first-child { display: block; color: #888; }
.mm-reste { margin-top: .2em; letter-spacing: .2em; color: #16855a; }
.mm-reste .ko { color: #ccc; } .mm-reste .on { color: #e0524d; }
.mm-message { margin: .8em 0; padding: .7em 1em; min-height: 1.6em; border: 2px solid #e5e5e5; border-radius: .9em; background: #fafafa; font-size: 1.05em; line-height: 1.5; }
.mm-commandes { display: grid; grid-template-columns: 1fr auto; gap: 1em; align-items: start; }
.mm-attaques { display: grid; grid-template-columns: repeat(auto-fit, minmax(12em, 1fr)); gap: .6em; }
.mm-attaque { position: relative; display: flex; flex-direction: column; gap: .1em; padding: .7em .9em; border-radius: .9em; border: 2px solid var(--c); border-left-width: .5em; background: #fff; }
.mm-attaque:hover { background: #fafafa; transform: translateY(-2px); }
.mm-attaque b { color: #333; font-size: 1.05em; }
.mm-attaque span { font-size: .85em; color: #777; }
.mm-attaque em { font-style: normal; font-size: .75em; font-weight: 800; color: #16855a; }
.mm-attaque em.bof { color: #c0392b; }
.mm-autres { display: flex; flex-direction: column; gap: .5em; }
.mm-autres .mm-go { justify-content: center; }

/* Fin de combat */
.mm-gain { font-size: 1.15em; margin: .5em 0; }
.mm-niveaux { list-style: none; padding: 0; margin: .5em 0; line-height: 1.8; }
.mm-evolution { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1em; margin: 1em auto; padding: 1em; max-width: 30em; border-radius: 1em; background: radial-gradient(#fffbe8, #fff); }
.mm-evolution > div { width: 7em; height: 7em; }
.mm-evolution > span { font-size: 2em; color: #f2b01e; }
.mm-evolution p { flex-basis: 100%; margin: 0; font-size: 1.1em; }
.mm-evo-de { animation: mm-evo-de 2.4s ease forwards; }
.mm-evo-vers { animation: mm-evo-vers 2.4s ease forwards; }
@keyframes mm-evo-de { 0%, 40% { filter: none; } 70%, 100% { filter: brightness(3) grayscale(1); opacity: .4; } }
@keyframes mm-evo-vers { 0%, 50% { opacity: 0; transform: scale(.3); filter: brightness(3); } 85% { transform: scale(1.15); filter: none; } 100% { opacity: 1; transform: none; } }

/* Fenêtre de question */
#mm-modale { position: fixed; inset: 0; z-index: 10000; background: rgba(30, 50, 40, .5); display: flex; align-items: center; justify-content: center; padding: 1em; overflow: auto; }
#mm-modale > div { margin: auto; }
.mm-question { background: #fff; border-radius: 1.2em; width: 100%; max-width: 34em; padding: 1em 1.3em 1.3em; box-shadow: 0 1em 3em rgba(0, 0, 0, .25); border-top: .5em solid #16855a; animation: mm-pop .25s ease; }
@keyframes mm-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.mm-q-haut { display: flex; flex-wrap: wrap; gap: .4em 1em; align-items: center; font-weight: 700; color: #555; }
.mm-etoiles { color: #f2b01e; letter-spacing: .1em; }
.mm-th { margin-left: auto; padding: .1em .7em; border-radius: 1em; background: #eaf7f1; color: #16855a; font-size: .8em; }
.mm-enonce { font: 600 clamp(1.4em, 3.6vw, 2.1em)/1.4 'Fredoka', 'Nunito', sans-serif; color: #222; text-align: center; margin: .7em 0 .5em; }
.mm-enonce small { display: block; font: 400 .45em/1.4 'Nunito', sans-serif; color: #888; margin-top: .4em; }
.mm-saisie { min-height: 1.6em; margin: 0 auto .6em; max-width: 12em; padding: .2em .6em; border: 3px solid #16855a; border-radius: .7em; text-align: center; font-size: 1.8em; font-weight: 600; color: #222; }
.mm-saisie.vide { color: #bbb; font-size: 1.3em; line-height: 1.6em; font-weight: 400; }
.mm-pave { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45em; max-width: 19em; margin: 0 auto; }
.mm-touche { height: 2.6em; border-radius: .6em; background: #f3f5f4; display: flex; align-items: center; justify-content: center; font-size: 1.3em; font-weight: 600; color: #333; box-shadow: 0 .15em 0 #d5dad7; }
.mm-touche:active { transform: translateY(.1em); box-shadow: none; }
.mm-touche:hover { background: #eaf7f1; }
.mm-touche.ok { grid-column: span 2; background: #16855a; color: #fff; box-shadow: 0 .15em 0 #0e5c3d; }
.mm-verdict { text-align: center; font: 700 1.5em 'Fredoka', sans-serif; margin: .5em 0; animation: mm-pop .3s ease; }
.mm-verdict.ok { color: #16855a; } .mm-verdict.ko { color: #c0392b; font-size: 1.25em; }
.mm-verdict.crit { color: #d48c00; font-size: 1.8em; }
.mm-verdict small { font-size: .6em; } .mm-verdict b { color: inherit; }
.mm-correction { background: #f6fcf9; border-left: 4px solid #5cc79a; border-radius: .5em; padding: .7em 1em; line-height: 1.6; color: #333; }
.mm-moitie { text-align: center; color: #c0392b; font-weight: 700; margin: .6em 0 0; }
.mm-chrono { position: relative; height: 2em; max-width: 22em; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06); margin: 0 auto .7em; border-radius: 1em; background: #eef1ef; overflow: hidden; }
.mm-chrono > div { height: 100%; width: 100%; background: #16855a; border-radius: 1em; transition: width .1s linear, background .3s; }
.mm-chrono.crit > div { background: linear-gradient(90deg, #f2b01e, #ffd95e); }
.mm-chrono.urgent > div { background: #e0524d; }
.mm-chrono span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1em; color: #222; }
.mm .tn-f { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .12em; line-height: 1.1; }
.mm .tn-f > span { padding: 0 .2em; }
.mm .tn-f > span:first-child { border-bottom: .08em solid currentColor; }
.mm .tn-rac { border-top: .08em solid currentColor; padding: 0 .1em; }
.mm sup { font-size: .6em; vertical-align: super; line-height: 0; }

#mm-toast { position: fixed; left: 50%; bottom: 1.5em; transform: translate(-50%, 1em); z-index: 10001; background: #333; color: #fff; padding: .6em 1.1em; border-radius: .8em; max-width: 90%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
#mm-toast.on { opacity: 1; transform: translate(-50%, 0); }

.mm-outil:fullscreen { background: #fff; max-width: none; padding: 1em; overflow: auto; }
.mm-outil:fullscreen .mm-rgpd { display: none; }
.mm-outil:fullscreen .mm-ecran { min-height: calc(100vh - 2.4em); border: 0; }

@media screen and (max-width: 840px) {
	.mm-commandes { grid-template-columns: 1fr; }
	.mm-autres { flex-direction: row; flex-wrap: wrap; justify-content: center; }
	.mm-socle, .mm-cote.moi .mm-socle { width: 7em; height: 7em; }
}
@media (prefers-reduced-motion: reduce) {
	.mm *, .mm *::before, .mm *::after { animation: none !important; transition: none !important; }
	.mm-evo-de { opacity: .4; }
}

/* Rareté */
.mm-rar { display: inline-block; padding: .05em .55em; border-radius: 1em; color: #fff; font-size: .72em; font-weight: 800; white-space: nowrap; }
.mm-dex { border-color: var(--r); border-width: 3px; }
.mm-dex.pris { background: linear-gradient(#fff 60%, color-mix(in srgb, var(--r) 12%, #fff)); }
.mm-habitat { color: #999; font-size: .7em !important; }
.mm-go.off { opacity: .45; filter: grayscale(.6); }

/* Carte d'un lieu : une fenêtre de 16 × 9 cases qui suit le joueur */
.mm-zone-haut { display: flex; flex-wrap: wrap; align-items: center; gap: .3em 1em; margin-bottom: .6em; }
.mm-zone-haut b { font-size: 1.2em; color: #16855a; }
.mm-zone-haut span { color: #888; font-size: .88em; flex: 1; }
.mm-vue { position: relative; max-width: 64em; margin: 0 auto; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .8em; background: var(--sol); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .1); touch-action: none; }
.mm-monde { position: absolute; left: 0; top: 0; display: grid; transition: transform .18s linear; will-change: transform; }
.mm-case { position: relative; background-color: var(--sol); background-size: 100% 100%; background-repeat: no-repeat; cursor: pointer; }
.mm-case.c { background-color: var(--chemin); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .03); }
.mm-case.f { background-color: var(--chemin); display: flex; align-items: center; justify-content: center; }
.mm-case.f span { font-size: 1.6vw; animation: mm-battement 1.4s ease-in-out infinite; }
@media (min-width: 1100px) { .mm-case.f span { font-size: 1.3em; } }
@keyframes mm-battement { 50% { transform: scale(1.25); } }
.mm-case.e { background: linear-gradient(160deg, #7cc4f4 0%, #5aaeea 50%, #7cc4f4 100%); background-size: 200% 200%; animation: mm-eau 3s ease-in-out infinite; }
@keyframes mm-eau { 50% { background-position: 100% 100%; } }
.mm-z5 .mm-case.h, .mm-z5 .mm-case.o { background-color: #3d3170; }

/* Personnages (joueur et PNJ) */
.mm-perso { position: absolute; width: calc(100% / 26); height: calc(100% / 15); z-index: 3; pointer-events: none; }
.mm-perso .mm-perso-svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 125%; overflow: visible; }
.mm-joueur { z-index: 4; transition: left .18s linear, top .18s linear; }
.mm-perso.d-gauche .mm-perso-svg { transform: scaleX(-1); }
.mm-perso .jg, .mm-perso .jd, .mm-perso .bg, .mm-perso .bd { transform-box: fill-box; }
.mm-perso .jg, .mm-perso .jd { transform-origin: 50% 0; }
.mm-perso .bg, .mm-perso .bd { transform-origin: 50% 10%; }
.mm-perso.marche.d-bas .jg, .mm-perso.marche.d-haut .jg { animation: mm-pied .18s ease-in-out infinite alternate; }
.mm-perso.marche.d-bas .jd, .mm-perso.marche.d-haut .jd { animation: mm-pied .18s ease-in-out infinite alternate-reverse; }
.mm-perso.marche.d-gauche .jg, .mm-perso.marche.d-droite .jg { animation: mm-jambe .18s ease-in-out infinite alternate; }
.mm-perso.marche.d-gauche .jd, .mm-perso.marche.d-droite .jd { animation: mm-jambe .18s ease-in-out infinite alternate-reverse; }
.mm-perso.marche .bg { animation: mm-bras .18s ease-in-out infinite alternate-reverse; }
.mm-perso.marche .bd { animation: mm-bras .18s ease-in-out infinite alternate; }
.mm-perso.marche .mm-perso-svg { animation: mm-rebond .09s ease-in-out infinite alternate; }
.mm-perso.marche.d-gauche .mm-perso-svg { animation-name: mm-rebond-g; }
@keyframes mm-pied { from { transform: translateY(0); } to { transform: translateY(-14%); } }
@keyframes mm-jambe { from { transform: rotate(28deg); } to { transform: rotate(-28deg); } }
@keyframes mm-bras { from { transform: rotate(22deg); } to { transform: rotate(-22deg); } }
@keyframes mm-rebond { to { transform: translateY(-3%); } }
@keyframes mm-rebond-g { from { transform: scaleX(-1); } to { transform: scaleX(-1) translateY(-3%); } }
.mm-pnj i { position: absolute; top: -45%; left: 50%; margin-left: -.65em; width: 1.3em; height: 1.3em; border-radius: 50%; background: #f2b01e; color: #fff; font: 800 .8em/1.3em 'Fredoka', sans-serif; font-style: normal; text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); animation: mm-saut 1.2s ease-in-out infinite; }
.mm-portrait .mm-perso { position: relative; display: inline-block; width: 1.4em; height: 1.4em; }
.mm-portrait .mm-perso .mm-perso-svg { height: 100%; }

/* Mathémons sur la carte */
.mm-sprite { position: absolute; width: calc(100% / 26); height: calc(100% / 15); display: flex; align-items: center; justify-content: center; z-index: 2; pointer-events: none; transition: left .5s ease, top .5s ease; animation: mm-arrive .5s ease; }
.mm-sprite .mm-bete { width: 92%; height: 92%; animation: mm-saut 1.6s ease-in-out infinite; }
.mm-sprite.r2::before, .mm-sprite.r3::before, .mm-sprite.r4::before, .mm-sprite.r5::before { content: ''; position: absolute; inset: 6%; border-radius: 50%; }
.mm-sprite.r2::before { box-shadow: 0 0 0 2px #2fa86b; }
.mm-sprite.r3::before { box-shadow: 0 0 0 3px #2f7dd6, 0 0 10px #2f7dd6; }
.mm-sprite.r4::before { box-shadow: 0 0 0 3px #e8920c, 0 0 18px #ffcf4d; animation: mm-pulse 1s ease-in-out infinite; }
.mm-sprite.r5::before { box-shadow: 0 0 0 3px #e0479e, 0 0 20px #ff9fd0; animation: mm-pulse 1s ease-in-out infinite; }
@keyframes mm-pulse { 50% { transform: scale(1.12); } }
@keyframes mm-arrive { from { transform: scale(0); opacity: 0; } }
.mm-sprite.part { opacity: .45; }
.mm-sous-carte { display: flex; flex-direction: column; align-items: center; gap: .8em; max-width: 64em; margin: .8em auto 0; }
.mm-sous-carte .mm-dpad { order: -1; }
.mm-equipe-pv { justify-content: center; }
.mm-equipe-pv { display: flex; flex-wrap: wrap; gap: .5em; }
.mm-pv-mini { display: inline-flex; align-items: center; gap: .3em; padding: .2em .7em .2em .3em; border-radius: 1em; background: #f3f5f4; font-weight: 700; font-size: .9em; }
.mm-pv-mini small { color: #888; }
.mm-pv-mini.ko { filter: grayscale(1); opacity: .55; }
.mm-dpad { display: grid; grid-template-columns: repeat(3, 3.4em); grid-template-rows: repeat(2, 3.4em); gap: .3em; touch-action: none; }
.mm-fl { display: flex; align-items: center; justify-content: center; border-radius: .7em; background: #16855a; color: #fff; font-size: 1.3em; box-shadow: 0 .15em 0 #0e5c3d; -webkit-user-select: none; user-select: none; }
.mm-fl:active { transform: translateY(.1em); box-shadow: none; }
.mm-fl[data-d="0,-1"] { grid-column: 2; grid-row: 1; } .mm-fl[data-d="-1,0"] { grid-column: 1; grid-row: 2; }
.mm-fl[data-d="0,1"] { grid-column: 2; grid-row: 2; } .mm-fl[data-d="1,0"] { grid-column: 3; grid-row: 2; }

/* Altérations et objets */
.mm-etat { display: inline-block; padding: .05em .5em; border-radius: 1em; background: #fff3e0; color: #b35c00; font-size: .75em; font-weight: 800; }
.mm-etat.boost { background: #ffe9e9; color: #c0392b; }
.mm-tuile small { color: #999; font-size: .78em; }
.mm-tuile.off { opacity: .45; }

/* Personnages et quête */
.mm-dialogue { border-top-color: #f2b01e; }
.mm-dial-haut { display: flex; align-items: center; gap: .6em; font-size: 1.2em; color: #333; }
.mm-portrait { font-size: 2.4em; line-height: 1; }
.mm-dial-texte { line-height: 1.6; font-size: 1.05em; margin: .6em 0; text-align: left; }
.mm-astuce { background: #fffaf0; border-left: 4px solid #f2b01e; border-radius: .5em; padding: .5em .8em; }
.mm-legende { display: flex; flex-wrap: wrap; align-items: center; gap: .6em 1em; padding: .7em 1em; margin: 0 auto 1em; max-width: 50em; border: 2px solid #f6d58e; border-radius: 1em; background: #fffaf0; color: #666; line-height: 1.4; }
.mm-legende:hover { border-color: #f2b01e; }
.mm-prof { font-size: 2.2em; }
.mm-legende > span:nth-child(2) { flex: 1; min-width: 14em; }
.mm-leg-liste { display: flex; gap: .3em; }
.mm-leg-etat { width: 2.2em; height: 2.2em; border-radius: 50%; background: #f0f0f0; display: inline-flex; align-items: center; justify-content: center; }
.mm-leg-etat.q2 { background: #fff3cf; box-shadow: 0 0 0 2px #f2b01e; }
.mm-leg-etat.q3 { background: #fff; box-shadow: 0 0 0 2px #e8920c; }
.mm-leg-etat .mm-ico-mini { width: 1.9em; height: 1.9em; }
