/* Images partagées par l’album principal et celui du Livre d’or. */
.echo-badge-emblem>img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.echo-badge-emblem[class*="grammaire_"] img,.echo-badge-emblem--fragile img{width:48px;height:48px;border-radius:0}
.echo-badge-emblem--lecture img{width:52px;height:52px}
.echo-badge-emblem--chut img{width:86%!important;height:86%!important;max-width:86%;max-height:86%;object-fit:contain!important}
.echo-badge-emblem--zoomies{width:56px;height:56px;border-radius:50%;background:radial-gradient(circle,#f9eedb,#e9d8bd)}
.echo-badge-music{display:block;width:100%;aspect-ratio:1;background:url('/assets/chat-musique-original.webp') center/contain no-repeat}
.echo-badge-water-paw,.echo-badge-drawing{display:block;width:100%;height:100%}

/* Le médaillon reste fixe ; la scène entière peut bouger sans découper la silhouette. */
.echo-badge-emblem.echo-badge-emblem--scene{width:56px;height:56px;padding:2px;border:2px solid #b8976d;border-radius:50%;background:radial-gradient(circle at 40% 28%,#fffdf5,#ead7b7 78%);box-shadow:inset 0 0 0 3px #fff6e6,0 2px 5px #4b382a22;overflow:visible}
.echo-badge-emblem.echo-badge-emblem--scene>.echo-badge-scene{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;filter:none;border-radius:0}
img.echo-badge-scene{display:block;object-fit:contain;transform-origin:50% 70%;transform:none;animation:none}
img.echo-badge-scene[data-badge-motion="running"],img.echo-badge-scene[data-badge-motion="paused"]{animation:echo-badge-scene-breathe 7.2s ease-in-out var(--badge-phase,0s) infinite;animation-play-state:paused}
img.echo-badge-scene[data-badge-motion="running"]{animation-play-state:running}
.echo-badge-card--locked .echo-badge-scene,[data-badge-locked="true"] .echo-badge-scene{animation:none!important;transform:none!important}
[hidden] .echo-badge-scene{animation-play-state:paused!important}
@keyframes echo-badge-scene-breathe{
 0%,55%,100%{transform:translateY(0) rotate(0deg)}
 20%{transform:translateY(-1.5px) rotate(-1.2deg)}
 38%{transform:translateY(-.5px) rotate(1.2deg)}
}
@media(prefers-reduced-motion:reduce){img.echo-badge-scene{animation:none!important;transform:none!important}}

/* Essai Firefox contre les traits de fond au zoom fractionnaire : un rayon
   très légèrement elliptique évite le chemin rapide du masque arrondi.
   Conserver les cercles des médaillons et toutes les règles de mouvement. */
@supports (-moz-appearance:none){
 .echo-badge-card{border-radius:14px / 14.1px}
}


/* This artwork already includes its approved fine circular frame. */
.echo-badge-emblem.echo-badge-emblem--medallion{width:56px;height:56px;padding:0;border:0;background:transparent;box-shadow:none;overflow:visible}

/* Four secret school-level medals use existing canonical Écholalie artwork. */
.echo-badge-emblem.echo-badge-emblem--contest{padding:0;border:0;background:none;overflow:visible}
.echo-contest-medal{--medal-colour:#428a9b;position:relative;display:inline-grid;place-items:center;width:100%;height:100%;aspect-ratio:1;border:2px solid #b18c56;border-radius:50%;background:radial-gradient(circle at 45% 35%,#fffbed 35%,#eedbbb 78%);box-shadow:inset 0 0 0 2px #fff8e9,inset 0 0 0 5px var(--medal-colour);overflow:hidden}
.echo-contest-medal--emeraude{--medal-colour:#4f8064}.echo-contest-medal--ambre{--medal-colour:#ad7136}.echo-contest-medal--amethyste{--medal-colour:#816399}
.echo-contest-medal>.echo-emoji{display:grid;place-items:center;width:76%;height:76%;margin-bottom:6%}.echo-contest-medal .echo-emoji>img{width:100%;height:100%;object-fit:contain}.echo-contest-medal-stars{position:absolute;bottom:0;left:0;right:0;text-align:center;color:var(--medal-colour);font-size:.7em;line-height:1.3}
