:root {
  --app-height: 100vh;
  --mm-bg-start: #fff8df;
  --mm-bg-end: #ffcf72;
  --mm-primary: #ff9f1c;
  --mm-primary-dark: #8a4b00;
  --mm-secondary: #2ec4b6;
  --mm-ink: #23180b;
  --mm-muted: #73582d;
  --mm-card: rgba(255, 255, 255, 0.86);
  --mm-card-solid: #fff7df;
  --mm-shadow-soft: 0 18px 45px rgba(103, 65, 0, 0.18);
  --mm-shadow-card: 0 12px 24px rgba(98, 64, 0, 0.22);
  --mm-radius-xl: 32px;
  --mm-radius-lg: 24px;
  --mm-radius-md: 18px;
  --mm-safe-bottom: env(safe-area-inset-bottom, 0px);
  --mm-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mmg-wordpress-shell,
.mmg-wordpress-shell * {
  box-sizing: border-box;
}

.mmg-wordpress-shell {
  width: 100%;
  min-height: var(--app-height, 100vh);
  margin: 0;
  font-family: var(--mm-font);
  color: var(--mm-ink);
  background: linear-gradient(150deg, var(--mm-bg-start), var(--mm-bg-end));
  overflow: hidden;
  touch-action: manipulation;
}

.mmg-app {
  position: relative;
  width: 100%;
  max-width: 620px;
  height: var(--app-height, 100vh);
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
}

.mmg-screen {
  position: relative;
  height: 100%;
  padding: 16px 14px calc(16px + var(--mm-safe-bottom));
  overflow: hidden;
}

.mmg-home {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.86), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(46, 196, 182, 0.22), transparent 27%),
    linear-gradient(150deg, #fff8df 0%, #ffe29b 46%, #ffb24f 100%);
}

.mmg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
  pointer-events: none;
}
.mmg-orb--a { width: 180px; height: 180px; left: -80px; top: 90px; background: rgba(255,255,255,.7); }
.mmg-orb--b { width: 220px; height: 220px; right: -110px; bottom: 100px; background: rgba(46,196,182,.22); }

.mmg-home__top { z-index: 1; align-self: end; }
.mmg-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--mm-shadow-soft);
  backdrop-filter: blur(14px);
}
.mmg-logo span { font-size: 28px; }
.mmg-logo strong { font-size: clamp(24px, 7vw, 36px); letter-spacing: -0.05em; color: #573000; }
.mmg-tagline {
  max-width: 320px;
  margin: 12px auto 0;
  color: var(--mm-muted);
  font-weight: 700;
  line-height: 1.35;
}

.mmg-demo-stack {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 74px);
  grid-auto-rows: 94px;
  justify-content: center;
  gap: 9px;
  transform: rotate(-2deg);
}
.mmg-demo-stack span {
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 34px;
  background: linear-gradient(160deg, #fffdf6, #ffe5a8);
  border: 2px solid rgba(255,255,255,.88);
  box-shadow: 0 14px 26px rgba(95, 59, 0, .18);
  animation: mmgFloat 3.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.25s);
}

.mmg-home__actions {
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(100%, 360px);
  margin: 0 auto;
}
.mmg-home__mini {
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(68, 40, 0, .7);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.mmg-home__mini span {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
}

.mmg-btn {
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 900 16px/1 var(--mm-font);
  color: #fff;
  background: linear-gradient(180deg, #ffb432, #f08000);
  box-shadow: 0 14px 26px rgba(173, 91, 0, .3), inset 0 1px 0 rgba(255,255,255,.42);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.mmg-btn:active { transform: translateY(1px) scale(.99); }
.mmg-btn:disabled { opacity: .48; cursor: not-allowed; }
.mmg-btn--soft {
  color: #603600;
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 22px rgba(92, 56, 0, .13), inset 0 0 0 1px rgba(255,255,255,.55);
}
.mmg-btn--outline {
  color: #173a34;
  background: rgba(46,196,182,.18);
  box-shadow: inset 0 0 0 2px rgba(46,196,182,.45), 0 12px 24px rgba(0, 89, 77, .12);
}
.mmg-btn__icon { font-size: 20px; }

.mmg-setup {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 10px;
  background: linear-gradient(150deg, #fff9e8, #ffd37f);
}
.mmg-setup__header,
.mmg-game-header {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 12px 26px rgba(93, 58, 0, .12);
  backdrop-filter: blur(16px);
}
.mmg-setup__header div strong,
.mmg-game-title strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.mmg-setup__header div small,
.mmg-game-title small { display: block; color: var(--mm-muted); font-weight: 750; font-size: 11px; line-height: 1.2; }
.mmg-icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  color: #5d3400;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
  cursor: pointer;
}
.mmg-stepper { display: flex; gap: 5px; padding-right: 6px; }
.mmg-stepper span { width: 8px; height: 8px; border-radius: 50%; background: rgba(110, 70, 0, .22); }
.mmg-stepper span.is-active { background: var(--mm-primary); }
.mmg-panel-title h2 { margin: 4px 4px 0; font-size: 22px; letter-spacing: -0.04em; color: #4d2c00; }

.mmg-grid-options,
.mmg-mode-list {
  overflow-y: auto;
  padding: 2px 2px 86px;
  display: grid;
  gap: 10px;
  scrollbar-width: none;
}
.mmg-grid-options::-webkit-scrollbar,
.mmg-mode-list::-webkit-scrollbar { display: none; }
.mmg-grid-options--formats { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.mmg-grid-options--categories { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.mmg-mode-list { grid-template-columns: 1fr; align-content: start; }

.mmg-option {
  min-height: 74px;
  width: 100%;
  border: 0;
  border-radius: 22px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--mm-ink);
  background: rgba(255,255,255,.65);
  box-shadow: 0 10px 22px rgba(95, 60, 0, .12), inset 0 0 0 1px rgba(255,255,255,.6);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.mmg-option:active { transform: scale(.99); }
.mmg-option.is-selected {
  background: linear-gradient(160deg, #fff, #fff0bd);
  box-shadow: 0 12px 26px rgba(176, 98, 0, .22), inset 0 0 0 2px #ffae2d;
}
.mmg-option__icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 164, 28, .16);
  font-size: 22px;
  color: #b66a00;
  font-weight: 900;
}
.mmg-option__text { display: grid; gap: 3px; min-width: 0; }
.mmg-option__text strong { font-size: 14px; letter-spacing: -.02em; }
.mmg-option__text small { color: var(--mm-muted); font-size: 11px; font-weight: 750; line-height: 1.25; }
.mmg-check { margin-left: auto; font-weight: 1000; color: #00a88d; }

.mmg-field {
  display: grid;
  gap: 6px;
  text-align: left;
  color: #5b3600;
  font-weight: 850;
  font-size: 12px;
}
.mmg-field--compact { margin: 0 4px; }
.mmg-field input {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 14px;
  font: 850 16px/1 var(--mm-font);
  color: var(--mm-ink);
  background: rgba(255,255,255,.84);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(148, 91, 0, .12), 0 8px 18px rgba(92, 56, 0, .08);
}

.mmg-setup__footer {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(12px + var(--mm-safe-bottom));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 24px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 14px 34px rgba(95, 59, 0, .18);
  backdrop-filter: blur(14px);
}
.mmg-config-preview { text-align: left; display: grid; gap: 2px; min-width: 0; }
.mmg-config-preview strong { font-size: 14px; }
.mmg-config-preview span { color: var(--mm-muted); font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mmg-setup__footer .mmg-btn { min-height: 44px; padding: 0 14px; }

.mmg-game {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.75), transparent 32%),
    linear-gradient(150deg, #fff6db, #ffcc70);
}
.mmg-game-header {
  grid-template-columns: 38px 1fr auto;
  align-self: start;
  padding: 7px;
  border-radius: 22px;
  z-index: 5;
}
.mmg-game-header .mmg-icon-btn { width: 34px; height: 34px; border-radius: 12px; }
.mmg-stats {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
  font-weight: 950;
  font-size: 11px;
  color: #4e2e00;
}
.mmg-stats span {
  padding: 7px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.65);
}
.mmg-players {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-left: 4px;
  scrollbar-width: none;
}
.mmg-players::-webkit-scrollbar { display: none; }
.mmg-players span {
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(46,196,182,.16);
  font-size: 11px;
  font-weight: 900;
}

.mmg-grid-wrap {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 2px 4px 78px;
}
.mmg-memory-grid {
  display: grid;
  grid-template-columns: repeat(var(--mmg-cols), var(--mmg-card-w));
  grid-auto-rows: var(--mmg-card-h);
  gap: var(--mmg-gap);
  justify-content: center;
  align-content: center;
  max-width: 100%;
  margin: auto;
}
.mmg-card {
  width: var(--mmg-card-w);
  height: var(--mmg-card-h);
  border: 0;
  padding: 0;
  background: transparent;
  perspective: 900px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mmg-card:disabled { cursor: default; }
.mmg-card__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .36s cubic-bezier(.2,.8,.2,1);
}
.mmg-card.is-open .mmg-card__inner,
.mmg-card.is-matched .mmg-card__inner { transform: rotateY(180deg); }
.mmg-card__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: clamp(10px, calc(var(--mmg-card-w) * .18), 20px);
  backface-visibility: hidden;
  box-shadow: var(--mm-shadow-card);
}
.mmg-card__back {
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.5), transparent 30%),
    linear-gradient(160deg, #ffb62e, #e57b00);
  border: 2px solid rgba(255,255,255,.72);
}
.mmg-card__back span {
  width: 54%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  color: #fff8e7;
  font-size: clamp(18px, calc(var(--mmg-card-w) * .42), 34px);
  font-weight: 1000;
  text-shadow: 0 2px 4px rgba(80, 40, 0, .2);
}
.mmg-card__front {
  transform: rotateY(180deg);
  background: #fff8e7;
  border: 2px solid rgba(255,255,255,.85);
}
.mmg-card__front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
}
.mmg-card__visual { font-size: clamp(20px, calc(var(--mmg-card-w) * .55), 44px); }
.mmg-card__front small {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  padding: 3px 4px;
  border-radius: 999px;
  color: #4a2b00;
  background: rgba(255,255,255,.78);
  font-size: clamp(8px, calc(var(--mmg-card-w) * .14), 12px);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mmg-card.is-matched .mmg-card__face { animation: mmgMatch .55s ease both; box-shadow: 0 0 0 2px rgba(46,196,182,.45), 0 0 22px rgba(46,196,182,.45); }

.mmg-floating-hint {
  position: absolute;
  left: 50%;
  bottom: calc(14px + var(--mm-safe-bottom));
  transform: translateX(-50%);
  z-index: 20;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px 8px 12px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(160deg, #22c7af, #0a8f7c);
  box-shadow: 0 14px 30px rgba(0, 100, 86, .3), inset 0 1px 0 rgba(255,255,255,.38);
  cursor: pointer;
}
.mmg-floating-hint__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.mmg-floating-hint strong {
  padding: 8px 10px;
  border-radius: 999px;
  color: #083e36;
  background: rgba(255,255,255,.86);
}
.mmg-floating-hint.is-pulsing { animation: mmgPulse 1.2s ease infinite; }

.mmg-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  align-items: end;
}
.mmg-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(28, 16, 0, .34);
}
.mmg-sheet {
  position: relative;
  width: min(100%, 620px);
  max-height: min(82vh, 680px);
  margin: 0 auto;
  overflow-y: auto;
  padding: 14px 14px calc(16px + var(--mm-safe-bottom));
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, #fffdf6, #ffe5ad);
  box-shadow: 0 -20px 48px rgba(54, 32, 0, .25);
  animation: mmgSheetIn .28s ease both;
}
.mmg-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.mmg-sheet header strong { display: block; font-size: 20px; letter-spacing: -.04em; }
.mmg-sheet header small { color: var(--mm-muted); font-weight: 800; }
.mmg-hidden-word {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.mmg-hidden-word span {
  width: 30px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 -2px 0 rgba(255, 159, 28, .35);
  font-weight: 1000;
  color: #5a3100;
}
.mmg-hidden-word .is-space { width: 12px; background: transparent; box-shadow: none; }
.mmg-hints-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  margin: 8px 0 12px;
}
.mmg-hints-list p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: #4d2d00;
  background: rgba(255,255,255,.62);
  font-size: 13px;
  font-weight: 750;
}
.mmg-message {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(46,196,182,.16);
  color: #075246;
  font-size: 13px;
  font-weight: 850;
}
.mmg-message.is-error,
.mmg-sync-error { background: #ffe3d8; color: #8a2300; }

.mmg-learning-toast,
.mmg-solved-badge,
.mmg-sync-error,
.mmg-room-code-pill {
  position: absolute;
  z-index: 30;
  left: 16px;
  right: 16px;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 14px 28px rgba(59, 35, 0, .16);
  font-weight: 850;
}
.mmg-learning-toast {
  top: 92px;
  display: grid;
  gap: 3px;
  color: #073f37;
  background: rgba(236, 255, 250, .92);
  animation: mmgToast .24s ease both;
}
.mmg-learning-toast strong { font-size: 14px; }
.mmg-learning-toast span { font-size: 12px; }
.mmg-solved-badge { top: 92px; color: #5b3400; background: rgba(255,255,255,.86); text-align: center; }
.mmg-sync-error { top: 72px; }
.mmg-room-code-pill {
  top: 12px;
  left: auto;
  right: 14px;
  width: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(14px);
  font-size: 11px;
}
.mmg-room-code-pill button {
  border: 0;
  border-radius: 999px;
  padding: 7px 9px;
  color: #fff;
  background: #0a8f7c;
  font-weight: 950;
}

.mmg-result {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 20px 12px 90px;
}
.mmg-result__card {
  width: min(100%, 360px);
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 30px;
  background: rgba(255,255,255,.78);
  text-align: center;
  box-shadow: var(--mm-shadow-soft);
}
.mmg-result__icon { font-size: 54px; }
.mmg-result__card h2 { margin: 0; font-size: 27px; letter-spacing: -.05em; }
.mmg-result__card p { margin: 0; color: var(--mm-muted); font-weight: 750; }
.mmg-result__stats { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.mmg-result__stats span { padding: 8px 10px; border-radius: 999px; background: rgba(255, 159, 28, .14); }

.mmg-online-menu,
.mmg-join {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  background: linear-gradient(150deg, #fff9e8, #ffd37f);
}
.mmg-online-cards { display: grid; gap: 12px; align-content: center; }
.mmg-online-card {
  min-height: 138px;
  border: 0;
  border-radius: 28px;
  padding: 18px;
  display: grid;
  gap: 6px;
  text-align: left;
  color: var(--mm-ink);
  background: rgba(255,255,255,.7);
  box-shadow: var(--mm-shadow-soft);
  cursor: pointer;
}
.mmg-online-card span { font-size: 32px; }
.mmg-online-card strong { font-size: 22px; letter-spacing: -.04em; }
.mmg-online-card small { color: var(--mm-muted); font-size: 13px; font-weight: 800; }
.mmg-note {
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.42);
  color: var(--mm-muted);
  font-size: 12px;
  font-weight: 800;
}
.mmg-form-card {
  align-self: center;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
  background: rgba(255,255,255,.7);
  box-shadow: var(--mm-shadow-soft);
}
.mmg-waiting {
  position: absolute;
  z-index: 25;
  left: 16px;
  right: 16px;
  top: 110px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  text-align: center;
  box-shadow: var(--mm-shadow-soft);
}
.mmg-waiting p { margin: 4px 0 0; color: var(--mm-muted); font-weight: 800; }

@keyframes mmgFloat { 0%,100%{ transform: translateY(0) rotate(0deg);} 50%{ transform: translateY(-7px) rotate(2deg);} }
@keyframes mmgMatch { 0%{ transform: scale(1);} 45%{ transform: scale(1.08);} 100%{ transform: scale(1);} }
@keyframes mmgPulse { 0%,100%{ box-shadow: 0 14px 30px rgba(0,100,86,.3), 0 0 0 0 rgba(46,196,182,.34);} 50%{ box-shadow: 0 14px 30px rgba(0,100,86,.3), 0 0 0 10px rgba(46,196,182,0);} }
@keyframes mmgSheetIn { from{ transform: translateY(14%); opacity: .6;} to{ transform: translateY(0); opacity: 1;} }
@keyframes mmgToast { from{ transform: translateY(-8px); opacity: 0;} to{ transform: translateY(0); opacity: 1;} }

@media (max-height: 690px) {
  .mmg-demo-stack { grid-template-columns: repeat(3, 62px); grid-auto-rows: 78px; gap: 7px; }
  .mmg-demo-stack span { border-radius: 18px; font-size: 28px; }
  .mmg-logo strong { font-size: 24px; }
  .mmg-tagline { font-size: 13px; margin-top: 8px; }
  .mmg-home__actions .mmg-btn { min-height: 48px; }
  .mmg-grid-wrap { padding-bottom: 64px; }
  .mmg-floating-hint { min-height: 46px; }
}

@media (max-width: 360px) {
  .mmg-grid-options--categories,
  .mmg-grid-options--formats { grid-template-columns: 1fr; }
  .mmg-stats span { padding: 6px; }
  .mmg-setup__footer { grid-template-columns: 1fr; }
}

/* MemoQuest 2.2.1 — puzzle de lettres + micro-interactions premium */
.mmg-card:not(.is-open):not(.is-matched):active .mmg-card__inner {
  transform: scale(1.06);
  transition: transform .14s cubic-bezier(.2,.9,.2,1);
}
.mmg-card.is-open .mmg-card__inner,
.mmg-card.is-matched .mmg-card__inner {
  transform: rotateY(180deg) scale(1);
}
.mmg-letter-sheet {
  max-height: min(88vh, 720px);
}
.mmg-mystery-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -2px 0 8px;
}
.mmg-mystery-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  color: #704000;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mmg-hidden-word .mmg-letter-slot {
  width: 30px;
  height: 38px;
  border: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 -2px 0 rgba(255,159,28,.35), 0 8px 16px rgba(84,48,0,.08);
  color: #5a3100;
  font-weight: 1000;
  font-size: 16px;
  cursor: pointer;
}
.mmg-hidden-word .mmg-letter-slot.is-filled {
  background: linear-gradient(180deg,#fff,#fff1c9);
  box-shadow: inset 0 -3px 0 rgba(255,159,28,.45), 0 10px 18px rgba(84,48,0,.12);
}
.mmg-hidden-word .mmg-letter-slot.is-locked {
  color: #fff;
  background: linear-gradient(160deg,#22c7af,#0a8f7c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 20px rgba(0,105,90,.18);
}
.mmg-hidden-word .is-separator {
  width: 16px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  color: #7b4a00;
  font-weight: 1000;
}
.mmg-letter-pool {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  gap: 8px;
  margin: 12px 0 10px;
}
.mmg-letter-tile {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  color: #533000;
  background: linear-gradient(180deg,#fffaf0,#ffd98f);
  box-shadow: 0 8px 18px rgba(80,45,0,.13), inset 0 1px 0 rgba(255,255,255,.7);
  font-size: 16px;
  font-weight: 1000;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .14s ease, opacity .14s ease;
}
.mmg-letter-tile:active { transform: scale(1.08); }
.mmg-letter-tile.is-used {
  opacity: .28;
  transform: scale(.92);
  pointer-events: none;
}
.mmg-letter-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 8px;
}
.mmg-small-action {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #5b3500;
  background: rgba(255,255,255,.68);
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.mmg-score-pop {
  position: absolute;
  z-index: 36;
  left: 50%;
  top: 82px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(160deg,#27c9af,#0d8f78);
  box-shadow: 0 18px 36px rgba(0,120,100,.28), inset 0 1px 0 rgba(255,255,255,.35);
  font-weight: 1000;
  animation: mmgScorePop 1.15s ease both;
  pointer-events: none;
}
@keyframes mmgScorePop {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(.85); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  72% { opacity: 1; transform: translate(-50%, -8px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -26px) scale(.96); }
}
@media (max-width: 380px) {
  .mmg-hidden-word .mmg-letter-slot { width: 27px; height: 35px; font-size: 14px; }
  .mmg-letter-pool { grid-template-columns: repeat(auto-fit, minmax(34px, 1fr)); gap: 6px; }
  .mmg-letter-tile { min-height: 38px; border-radius: 12px; }
}

/* MemoQuest 2.3.0 — multijoueur tour par tour premium */
.mmg-game-header--online {
  grid-template-columns: 38px 1fr auto;
  align-items: start;
  row-gap: 8px;
}
.mmg-game-header--online .mmg-game-title strong {
  font-size: 14px;
}
.mmg-online-top-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 7px 8px;
  border-radius: 999px;
  color: #4e2e00;
  background: rgba(255,255,255,.68);
  font-size: 11px;
  font-weight: 950;
}
.mmg-online-scoreboard {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}
.mmg-player-score-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 17px;
  color: #583300;
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.mmg-player-score-card.is-active {
  background: linear-gradient(160deg, #fffdf7, #fff0bf);
  box-shadow: inset 0 0 0 2px #ffad2b, 0 10px 22px rgba(177,94,0,.18);
  transform: translateY(-1px);
}
.mmg-player-score-card.is-me .mmg-player-avatar {
  background: linear-gradient(160deg, #24c7b1, #0a8f7c);
  color: #fff;
}
.mmg-player-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,159,28,.16);
  font-size: 15px;
}
.mmg-player-info {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.mmg-player-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: -.02em;
}
.mmg-player-info small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #7a5522;
  font-size: 9px;
  font-weight: 900;
}
.mmg-player-score-card b {
  min-width: 32px;
  padding: 6px 7px;
  border-radius: 999px;
  text-align: center;
  color: #fff;
  background: linear-gradient(160deg,#ffaf2d,#f07f00);
  font-size: 12px;
  font-weight: 1000;
}
.mmg-turn-line {
  grid-column: 1 / -1;
  padding: 7px 10px;
  border-radius: 999px;
  color: #694300;
  background: rgba(255,255,255,.52);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}
.mmg-turn-banner {
  position: absolute;
  z-index: 18;
  left: 16px;
  right: 16px;
  top: 142px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 18px;
  color: #5b3500;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 26px rgba(95,59,0,.16), inset 0 0 0 1px rgba(255,255,255,.55);
  backdrop-filter: blur(14px);
  text-align: center;
  font-size: 12px;
  font-weight: 950;
}
.mmg-turn-banner.is-your-turn {
  color: #053f37;
  background: rgba(236,255,250,.9);
  box-shadow: 0 12px 26px rgba(0,95,82,.14), inset 0 0 0 2px rgba(46,196,182,.38);
}
.mmg-turn-banner.is-mystery {
  background: linear-gradient(160deg, rgba(255,255,255,.94), rgba(255,239,187,.92));
  box-shadow: 0 14px 30px rgba(180,94,0,.18), inset 0 0 0 2px rgba(255,173,43,.44);
}
.mmg-turn-banner span {
  min-width: 0;
  line-height: 1.22;
}
.mmg-turn-banner button {
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  color: #fff;
  background: linear-gradient(160deg, #ffad2b, #f07f00);
  font-size: 11px;
  font-weight: 1000;
  box-shadow: 0 8px 16px rgba(160, 82, 0, .18);
}
.mmg-turn-banner button:last-child {
  color: #5b3500;
  background: rgba(255,255,255,.76);
}
.mmg-game-header--online + .mmg-turn-banner + .mmg-grid-wrap {
  padding-top: 54px;
}
.mmg-small-action--danger {
  color: #812700;
  background: rgba(255,226,215,.78);
}
@media (max-width: 380px), (max-height: 720px) {
  .mmg-turn-banner { top: 136px; min-height: 40px; font-size: 11px; }
  .mmg-online-scoreboard { gap: 5px; }
  .mmg-player-score-card { grid-template-columns: 26px 1fr auto; gap: 5px; padding: 6px; border-radius: 14px; }
  .mmg-player-avatar { width: 26px; height: 26px; border-radius: 10px; }
  .mmg-player-info strong { font-size: 11px; }
  .mmg-player-info small { font-size: 8px; }
  .mmg-player-score-card b { min-width: 28px; padding: 5px 6px; font-size: 11px; }
  .mmg-game-header--online + .mmg-turn-banner + .mmg-grid-wrap { padding-top: 48px; }
}

/* MemoQuest 2.3.1 — correctif responsive multi-smartphones */
@supports (height: 100dvh) {
  :root { --app-height: 100dvh; }
}
.mmg-wordpress-shell {
  width: 100%;
  height: var(--app-height, 100vh);
  min-height: 100vh;
  min-height: 100dvh;
  max-height: var(--app-height, 100vh);
  overflow: hidden;
}
.mmg-app {
  height: var(--app-height, 100vh);
  max-height: var(--app-height, 100vh);
  min-height: 0;
  overflow: hidden;
}
.mmg-screen {
  min-height: 0;
  height: 100%;
  padding: clamp(10px, 2vh, 16px) clamp(10px, 3.6vw, 14px) calc(clamp(10px, 2vh, 16px) + var(--mm-safe-bottom));
}
.mmg-setup__header,
.mmg-game-header {
  grid-template-columns: clamp(34px, 9.2vw, 42px) minmax(0, 1fr) auto;
  gap: clamp(7px, 2.4vw, 10px);
  padding: clamp(6px, 1.6vh, 8px);
  border-radius: clamp(18px, 6vw, 24px);
}
.mmg-setup__header div,
.mmg-game-title {
  min-width: 0;
}
.mmg-setup__header div strong,
.mmg-game-title strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(14px, 4.2vw, 16px);
}
.mmg-setup__header div small,
.mmg-game-title small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(10px, 3.2vw, 12px);
}
.mmg-icon-btn {
  width: clamp(34px, 9.4vw, 38px);
  height: clamp(34px, 9.4vw, 38px);
  border-radius: clamp(12px, 4vw, 14px);
}
.mmg-panel-title h2 {
  margin-top: 2px;
  font-size: clamp(20px, 6.4vw, 28px);
  line-height: 1.05;
}
.mmg-btn {
  min-height: clamp(44px, 7vh, 52px);
  border-radius: clamp(16px, 5vw, 18px);
  font-size: clamp(14px, 4.2vw, 16px);
}
.mmg-setup,
.mmg-online-menu,
.mmg-join {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.mmg-setup::-webkit-scrollbar,
.mmg-online-menu::-webkit-scrollbar,
.mmg-join::-webkit-scrollbar { display: none; }
.mmg-setup {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.8vh, 10px);
}
.mmg-grid-options,
.mmg-mode-list {
  min-height: 0;
  padding-bottom: clamp(10px, 2vh, 18px);
}
.mmg-option {
  min-height: clamp(62px, 10vh, 74px);
  border-radius: clamp(18px, 5.8vw, 22px);
  padding: clamp(10px, 3vw, 12px);
}
.mmg-option__icon {
  flex-basis: clamp(34px, 9vw, 38px);
  width: clamp(34px, 9vw, 38px);
  height: clamp(34px, 9vw, 38px);
  border-radius: clamp(12px, 4vw, 14px);
  font-size: clamp(19px, 5.5vw, 22px);
}
.mmg-option__text strong { font-size: clamp(13px, 3.8vw, 14px); }
.mmg-option__text small { font-size: clamp(10px, 3vw, 11px); }
.mmg-field input {
  min-height: clamp(46px, 7vh, 54px);
  padding: 0 clamp(12px, 3.6vw, 14px);
  font-size: 16px;
}
.mmg-setup__footer {
  position: sticky;
  left: auto;
  right: auto;
  bottom: calc(8px + var(--mm-safe-bottom));
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: auto;
  padding: clamp(8px, 2vh, 10px);
  border-radius: clamp(20px, 6vw, 24px);
}
.mmg-setup__footer .mmg-btn {
  min-height: clamp(42px, 6.5vh, 46px);
  white-space: nowrap;
}
.mmg-game {
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(5px, 1.4vh, 10px);
  overflow: hidden;
}
.mmg-grid-wrap {
  min-height: 0;
  overflow: hidden;
  padding: clamp(0px, .7vh, 4px) 4px calc(clamp(50px, 8vh, 78px) + var(--mm-safe-bottom));
}
.mmg-memory-grid {
  max-height: 100%;
  max-width: 100%;
}
.mmg-card__face {
  border-radius: clamp(8px, calc(var(--mmg-card-w) * .16), 18px);
}
.mmg-online-menu,
.mmg-join {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 2.2vh, 14px);
}
.mmg-online-cards {
  min-height: 0;
  align-content: center;
  gap: clamp(10px, 2.2vh, 12px);
}
.mmg-online-card {
  min-height: clamp(104px, 19vh, 138px);
  border-radius: clamp(22px, 7vw, 28px);
  padding: clamp(14px, 4vw, 18px);
}
.mmg-online-card span { font-size: clamp(26px, 8vw, 32px); }
.mmg-online-card strong { font-size: clamp(19px, 6vw, 22px); }
.mmg-online-card small { font-size: clamp(11px, 3.5vw, 13px); }
.mmg-note {
  margin-bottom: 0;
  padding: clamp(9px, 2.4vw, 12px);
  font-size: clamp(10px, 3.2vw, 12px);
  line-height: 1.25;
}
.mmg-form-card {
  align-self: center;
  max-height: 100%;
  overflow: auto;
  padding: clamp(13px, 4vw, 16px);
}
.mmg-sheet {
  max-height: min(86vh, calc(var(--app-height, 100vh) - 12px));
}
.mmg-letter-sheet { max-height: min(90vh, calc(var(--app-height, 100vh) - 10px)); }
.mmg-room-code-pill {
  top: max(8px, env(safe-area-inset-top, 0px));
}

@media (max-height: 760px) {
  .mmg-online-cards { align-content: start; }
  .mmg-online-card { min-height: 104px; }
  .mmg-setup { gap: 8px; }
  .mmg-panel-title h2 { margin-bottom: 0; }
  .mmg-grid-wrap { padding-bottom: calc(50px + var(--mm-safe-bottom)); }
}
@media (max-height: 660px) {
  .mmg-screen { padding-top: 8px; padding-left: 10px; padding-right: 10px; }
  .mmg-online-card {
    min-height: 86px;
    grid-template-columns: 42px 1fr;
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
  }
  .mmg-online-card span { grid-row: 1 / span 2; }
  .mmg-online-card strong { line-height: 1.08; }
  .mmg-online-card small { line-height: 1.2; }
  .mmg-option { min-height: 58px; }
  .mmg-option__icon { flex-basis: 32px; width: 32px; height: 32px; font-size: 18px; }
  .mmg-setup__footer { bottom: calc(6px + var(--mm-safe-bottom)); }
  .mmg-floating-hint { min-height: 42px; padding: 6px 8px 6px 10px; }
  .mmg-floating-hint__icon { width: 30px; height: 30px; }
}
@media (max-width: 380px) {
  .mmg-screen { padding-left: 10px; padding-right: 10px; }
  .mmg-setup__footer { grid-template-columns: 1fr; }
  .mmg-config-preview { text-align: center; }
  .mmg-online-scoreboard { grid-template-columns: 1fr; }
}
@media (max-width: 340px) {
  .mmg-grid-options--categories,
  .mmg-grid-options--formats { grid-template-columns: 1fr; }
  .mmg-option { min-height: 56px; }
  .mmg-online-card { border-radius: 20px; }
}


/* MemoQuest 2.4.0 — images intégrées + football + victoire premium */
.mmg-card.is-owned-by-me .mmg-card__front {
  border-color: #ff3b4f;
  box-shadow: inset 0 0 0 3px rgba(255,59,79,.78), 0 0 18px rgba(255,59,79,.38), var(--mm-shadow-card);
}
.mmg-card.is-owned-by-opponent .mmg-card__front {
  border-color: #2878ff;
  box-shadow: inset 0 0 0 3px rgba(40,120,255,.78), 0 0 18px rgba(40,120,255,.35), var(--mm-shadow-card);
}
.mmg-card.is-owned-by-me .mmg-card__front::after,
.mmg-card.is-owned-by-opponent .mmg-card__front::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
.mmg-solved-badge--wow {
  top: 88px;
  color: #3f2600;
  background: linear-gradient(160deg, rgba(255,255,255,.98), rgba(255,225,132,.96));
  border: 2px solid rgba(255,174,45,.7);
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 1000;
  text-align: center;
  animation: mmgVictoryWow 1.35s ease both;
}
.mmg-result__card--online {
  border: 2px solid rgba(255,174,45,.45);
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,232,166,.82));
}
.mmg-result__card--online.is-win {
  box-shadow: 0 20px 60px rgba(255,159,28,.35), inset 0 0 0 2px rgba(255,255,255,.65);
}
.mmg-result__card--online.is-lose {
  box-shadow: 0 20px 50px rgba(52,65,95,.22), inset 0 0 0 2px rgba(255,255,255,.52);
}
.mmg-duel-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.mmg-duel-player {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,.64);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.58);
}
.mmg-duel-player.is-me {
  box-shadow: inset 0 0 0 2px rgba(255,59,79,.58), 0 10px 22px rgba(255,59,79,.12);
}
.mmg-duel-player strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.mmg-duel-player b {
  color: #4e2e00;
  font-size: 24px;
  line-height: 1;
}
.mmg-duel-player small { color: var(--mm-muted); font-weight: 900; }
.mmg-hidden-word .mmg-letter-slot.is-locked {
  animation: mmgLetterReveal .28s ease both;
}
@keyframes mmgVictoryWow {
  0% { opacity: 0; transform: translateY(-10px) scale(.92); }
  25% { opacity: 1; transform: translateY(0) scale(1.04); }
  70% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(.96); }
}
@keyframes mmgLetterReveal {
  from { transform: scale(.86); opacity: .55; }
  to { transform: scale(1); opacity: 1; }
}
@media (max-width: 380px) {
  .mmg-duel-result { grid-template-columns: 1fr; }
  .mmg-solved-badge--wow { top: 82px; }
}


/* MemoQuest 2.4.1 — logos intégrés + grille pleine largeur/hauteur mobile */
.mmg-game {
  gap: clamp(3px, .9vh, 6px);
  padding-left: clamp(6px, 2.2vw, 10px);
  padding-right: clamp(6px, 2.2vw, 10px);
}
.mmg-game-header {
  width: 100%;
  max-width: 100%;
  padding: clamp(5px, 1.25vh, 7px);
  border-radius: clamp(16px, 4.8vw, 20px);
}
.mmg-game-header--online {
  row-gap: clamp(4px, .9vh, 6px);
}
.mmg-online-scoreboard {
  gap: clamp(4px, 1.3vw, 6px);
}
.mmg-player-score-card {
  padding: clamp(5px, 1.2vh, 7px) clamp(6px, 1.9vw, 8px);
  border-radius: clamp(13px, 4vw, 16px);
  grid-template-columns: clamp(24px, 7vw, 30px) minmax(0, 1fr) auto;
}
.mmg-player-avatar {
  width: clamp(24px, 7vw, 30px);
  height: clamp(24px, 7vw, 30px);
  border-radius: clamp(9px, 3vw, 12px);
}
.mmg-player-info strong { font-size: clamp(10px, 3.15vw, 12px); }
.mmg-player-info small { font-size: clamp(7px, 2.4vw, 9px); }
.mmg-player-score-card b {
  min-width: clamp(26px, 7.2vw, 32px);
  padding: 5px 6px;
  font-size: clamp(10px, 3vw, 12px);
}
.mmg-turn-line {
  padding: clamp(4px, .9vh, 7px) 8px;
  font-size: clamp(8px, 2.5vw, 10px);
}
.mmg-grid-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 0 calc(clamp(44px, 7vh, 56px) + var(--mm-safe-bottom));
  align-items: center;
  justify-items: center;
}
.mmg-memory-grid {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  place-content: center;
}
.mmg-card__front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mmg-floating-hint {
  bottom: calc(8px + var(--mm-safe-bottom));
  min-height: clamp(42px, 6.8vh, 48px);
  padding: 6px 9px 6px 10px;
}
.mmg-floating-hint__icon {
  width: clamp(29px, 8vw, 34px);
  height: clamp(29px, 8vw, 34px);
}
.mmg-game-header--online + .mmg-turn-banner + .mmg-grid-wrap {
  padding-top: clamp(38px, 6.6vh, 48px);
}
.mmg-turn-banner {
  top: clamp(118px, 18.5vh, 142px);
  left: clamp(8px, 2.4vw, 14px);
  right: clamp(8px, 2.4vw, 14px);
  min-height: clamp(36px, 6.2vh, 44px);
  padding: 6px 8px;
  border-radius: clamp(14px, 4vw, 18px);
  font-size: clamp(10px, 2.9vw, 12px);
}
.mmg-turn-banner button {
  padding: 6px 8px;
  font-size: clamp(9px, 2.7vw, 11px);
}
@media (max-height: 660px) {
  .mmg-game { padding-top: 6px; padding-bottom: calc(6px + var(--mm-safe-bottom)); }
  .mmg-game-header .mmg-icon-btn { width: 30px; height: 30px; border-radius: 10px; }
  .mmg-game-title strong { font-size: 12px; }
  .mmg-game-title small { font-size: 9px; }
  .mmg-stats span { padding: 5px 6px; }
  .mmg-online-top-stat { min-width: 52px; padding: 5px 6px; }
  .mmg-turn-banner { top: 108px; }
  .mmg-game-header--online + .mmg-turn-banner + .mmg-grid-wrap { padding-top: 36px; }
  .mmg-grid-wrap { padding-bottom: calc(40px + var(--mm-safe-bottom)); }
}

/* MemoQuest 2.6.1 — Gems compact UI polish */
.mmg-gems-pill {
  position: absolute;
  z-index: 30;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: 12px;
  height: 30px;
  min-width: 88px;
  max-width: 112px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 3px 8px 3px 5px;
  background: rgba(255,255,255,.9);
  color: #073f20;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(0, 78, 38, .14), inset 0 0 0 1px rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  cursor: pointer;
}
.mmg-gems-pill strong { font-size: 15px; line-height: 1; letter-spacing: -.02em; }
.mmg-gems-pill .mmg-gems-label { font-size: 9px; line-height: 1; text-transform: uppercase; letter-spacing: .07em; color: rgba(7,63,32,.66); }
.mmg-gem-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,255,255,.2)); flex: 0 0 auto; }
.mmg-gem-icon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,130,62,.26)); }
.mmg-gem-icon--small { width: 18px; height: 18px; border-radius: 6px; background: transparent; }
.mmg-gem-icon--small img { filter: drop-shadow(0 3px 6px rgba(0,130,62,.2)); }
.mmg-gem-icon--tiny { width: 13px; height: 13px; border-radius: 4px; background: transparent; }
.mmg-gem-icon--tiny img { filter: drop-shadow(0 2px 4px rgba(0,130,62,.18)); }
.mmg-option { position: relative; }
.mmg-option.is-locked { opacity: .9; filter: saturate(.94); }
.mmg-option.is-locked::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(120deg, rgba(255,255,255,.08), rgba(0,0,0,.025)); pointer-events: none; }
.mmg-option__text { flex: 1 1 auto; min-width: 0; }
.mmg-option__text small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mmg-lock-badge {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  min-width: 54px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(238,255,241,.88), rgba(211,248,217,.72));
  color: #07552b;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(15, 163, 84, .18), 0 4px 10px rgba(0, 97, 43, .06);
  white-space: nowrap;
  position: relative;
  z-index: 2;
}
.mmg-lock-badge strong { font-size: 12px; line-height: 1; letter-spacing: -.01em; }
.mmg-lock-badge__lock { font-size: 9px; line-height: 1; opacity: .52; margin-right: 1px; }
.mmg-shop-layer, .mmg-unlock-layer {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 14px 12px calc(14px + var(--mm-safe-bottom));
}
.mmg-shop-backdrop, .mmg-unlock-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(33, 23, 7, .38);
  backdrop-filter: blur(8px);
}
.mmg-shop-modal, .mmg-unlock-modal {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  border-radius: 34px;
  padding: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,.98), rgba(239,255,242,.96) 52%, rgba(255,236,181,.96));
  box-shadow: 0 28px 80px rgba(24, 51, 18, .34), inset 0 0 0 1px rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.72);
  animation: mmgSheetIn .22s ease both;
}
.mmg-shop-modal header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mmg-shop-title { display: flex; align-items: center; gap: 10px; }
.mmg-shop-title .mmg-gem-icon { width: 42px; height: 42px; }
.mmg-shop-title strong { display: block; font-size: 22px; letter-spacing: -.04em; color: #073f20; }
.mmg-shop-title small { display: block; font-weight: 850; color: rgba(7,63,32,.68); }
.mmg-shop-hero {
  margin: 14px 0;
  padding: 18px 14px;
  border-radius: 26px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(0,211,105,.2), transparent 60%), rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 1px rgba(21, 172, 85, .14);
}
.mmg-shop-hero .mmg-gem-icon { margin: 0 auto 6px; width: 86px; height: 86px; }
.mmg-shop-hero h3 { margin: 0; font-size: 32px; letter-spacing: -.06em; color: #064c25; }
.mmg-shop-hero p { margin: 6px auto 0; max-width: 300px; color: rgba(56,43,10,.74); font-weight: 750; line-height: 1.35; }
.mmg-shop-buy {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 20px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(180deg, #21d871, #069f49);
  box-shadow: 0 16px 30px rgba(0,125,54,.26), inset 0 1px 0 rgba(255,255,255,.5);
  font: 950 16px/1 var(--mm-font);
  cursor: pointer;
}
.mmg-shop-buy strong { font-size: 18px; }
.mmg-shop-note { display: block; margin-top: 10px; color: rgba(58, 43, 12, .58); font-weight: 750; line-height: 1.3; text-align: center; }
.mmg-unlock-modal { text-align: center; padding: 20px 16px 16px; }
.mmg-unlock-close { position: absolute; top: 12px; right: 12px; }
.mmg-unlock-visual { display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 0; margin: 4px auto 8px; }
.mmg-unlock-visual .mmg-gem-icon { width: 82px; height: 82px; }
.mmg-unlock-visual span { margin-left: -14px; margin-top: 46px; padding: 7px 9px; border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 8px 16px rgba(0,0,0,.12); }
.mmg-unlock-modal h3 { margin: 0; font-size: 26px; letter-spacing: -.05em; color: #13210f; }
.mmg-unlock-modal p { margin: 8px auto 10px; max-width: 300px; color: rgba(41,34,20,.72); font-weight: 800; line-height: 1.35; }
.mmg-unlock-balance { display: flex; justify-content: space-between; align-items: center; margin: 10px auto 14px; max-width: 310px; padding: 10px 12px; border-radius: 18px; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.mmg-unlock-balance span { color: rgba(32,45,25,.62); font-weight: 850; }
.mmg-unlock-balance strong { color: #065b2b; font-weight: 950; }
.mmg-small-action--gems { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: #065b2b; background: linear-gradient(180deg, rgba(231,255,235,.96), rgba(188,255,201,.82)); box-shadow: inset 0 0 0 1px rgba(41,183,91,.22); }
.mmg-small-action--gems .mmg-gem-icon { width: 14px; height: 14px; }
@media (max-width: 390px) {
  .mmg-gems-pill { right: 8px; top: max(8px, env(safe-area-inset-top, 0px)); height: 28px; min-width: 78px; max-width: 96px; padding: 3px 7px 3px 4px; }
  .mmg-gems-pill .mmg-gem-icon--small { width: 16px; height: 16px; }
  .mmg-gems-pill strong { font-size: 14px; }
  .mmg-gems-pill .mmg-gems-label { font-size: 8px; letter-spacing: .05em; }
  .mmg-lock-badge { min-width: 45px; height: 22px; gap: 3px; padding: 0 5px; }
  .mmg-lock-badge strong { font-size: 11px; }
  .mmg-lock-badge__lock { display: none; }
  .mmg-gem-icon--tiny { width: 12px; height: 12px; }
  .mmg-shop-modal, .mmg-unlock-modal { border-radius: 28px; }
}
@media (max-width: 350px) {
  .mmg-gems-pill .mmg-gems-label { display: none; }
  .mmg-gems-pill { min-width: 60px; }
  .mmg-lock-badge { min-width: 40px; height: 21px; }
}



/* MemoQuest 2.7.0 — PayPal Checkout UI */
.mmg-shop-buy--paypal {
  background: linear-gradient(135deg, #0070ba, #003087) !important;
  color: #fff !important;
  box-shadow: 0 18px 34px rgba(0, 48, 135, .24), inset 0 1px 0 rgba(255,255,255,.22) !important;
}
.mmg-shop-buy--paypal span::before {
  content: 'PayPal';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .02em;
}
.mmg-payment-toast {
  position: fixed;
  left: 50%;
  top: max(16px, env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 10040;
  width: min(92vw, 430px);
  padding: 12px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,255,242,.98));
  border: 1px solid rgba(0,128,64,.16);
  box-shadow: 0 22px 60px rgba(22, 56, 34, .18);
  color: #17381f;
  font-weight: 900;
  text-align: center;
  animation: mmgToastIn .28s ease both;
}
@keyframes mmgToastIn {
  from { opacity: 0; transform: translate(-50%, -8px) scale(.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@media (max-width: 420px) {
  .mmg-payment-toast { top: max(10px, env(safe-area-inset-top, 0px)); font-size: 12px; border-radius: 16px; }
  .mmg-shop-buy--paypal span::before { margin-right: 6px; padding: 2px 6px; font-size: 10px; }
}

/* MemoQuest 2.8.0 — Memory + Quiz intelligent */
.mmg-quiz-layer .mmg-sheet {
  max-width: min(94vw, 460px);
}
.mmg-quiz-sheet {
  border: 1px solid rgba(255,255,255,.72);
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.95), rgba(255,255,255,.78) 32%, transparent 58%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,250,255,.9));
  box-shadow: 0 26px 90px rgba(16, 22, 55, .25), inset 0 1px 0 rgba(255,255,255,.88);
}
.mmg-quiz-card-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  margin: 8px 0 12px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(14, 22, 52, .06), rgba(0, 170, 120, .07));
  border: 1px solid rgba(9, 30, 66, .08);
}
.mmg-quiz-card-preview img {
  width: 76px;
  height: 94px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(12, 18, 45, .18);
}
.mmg-quiz-card-preview > span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-size: 34px;
  background: rgba(255,255,255,.86);
}
.mmg-quiz-card-preview strong {
  display: block;
  font-size: 20px;
  letter-spacing: -.04em;
  color: #0b1738;
}
.mmg-quiz-card-preview small {
  display: block;
  margin-top: 4px;
  color: rgba(13, 26, 60, .62);
  font-weight: 800;
  line-height: 1.25;
}
.mmg-quiz-question {
  margin: 8px 0 14px;
  font-size: clamp(20px, 5vw, 27px);
  line-height: 1.08;
  letter-spacing: -.055em;
  color: #081634;
}
.mmg-quiz-choices {
  display: grid;
  gap: 9px;
}
.mmg-quiz-choice {
  min-height: 56px;
  border: 1px solid rgba(9, 30, 66, .1);
  border-radius: 19px;
  background: rgba(255,255,255,.82);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 10px;
  text-align: left;
  color: #0c1737;
  box-shadow: 0 10px 22px rgba(12, 18, 45, .08);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.mmg-quiz-choice:not(:disabled):active { transform: scale(.985); }
.mmg-quiz-choice span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #172044, #4f5c93);
  color: white;
  font-weight: 1000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.mmg-quiz-choice strong {
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.mmg-quiz-choice.is-correct {
  border-color: rgba(0, 166, 93, .58);
  background: linear-gradient(135deg, rgba(226,255,242,.96), rgba(255,255,255,.92));
  box-shadow: 0 14px 34px rgba(0, 135, 78, .18);
}
.mmg-quiz-choice.is-correct span { background: linear-gradient(135deg, #00a75d, #37d98b); }
.mmg-quiz-choice.is-wrong {
  border-color: rgba(222, 50, 75, .48);
  background: linear-gradient(135deg, rgba(255,232,236,.96), rgba(255,255,255,.92));
}
.mmg-quiz-choice.is-wrong span { background: linear-gradient(135deg, #e32748, #ff7b91); }
.mmg-quiz-feedback {
  margin-top: 12px;
  padding: 12px 13px;
  border-radius: 18px;
  display: grid;
  gap: 4px;
  font-weight: 850;
  animation: mmg-pop .28s ease both;
}
.mmg-quiz-feedback strong { font-size: 16px; }
.mmg-quiz-feedback span { font-size: 13px; line-height: 1.35; color: rgba(12, 23, 55, .7); }
.mmg-quiz-feedback.is-correct { background: rgba(214,255,237,.9); color: #075d35; }
.mmg-quiz-feedback.is-wrong { background: rgba(255,232,237,.92); color: #9f1230; }
.mmg-turn-banner .mmg-gem-icon + span { margin-left: 4px; }
@media (max-width: 380px) {
  .mmg-quiz-card-preview { grid-template-columns: 64px minmax(0,1fr); border-radius: 18px; }
  .mmg-quiz-card-preview img { width: 64px; height: 80px; border-radius: 15px; }
  .mmg-quiz-choice { min-height: 50px; grid-template-columns: 30px minmax(0,1fr); border-radius: 16px; }
  .mmg-quiz-choice span { width: 30px; height: 30px; border-radius: 10px; }
  .mmg-quiz-choice strong { font-size: 14px; }
}


/* MemoQuest 2.10.1 — notification quiz + dos de cartes dynamiques */
.mmg-floating-hint {
  position: absolute;
  overflow: visible;
}
.mmg-floating-hint--quiz {
  background: linear-gradient(135deg, #0ea5ff 0%, #1bd2bd 58%, #08a081 100%);
  box-shadow: 0 16px 38px rgba(0, 135, 170, .34), 0 0 0 1px rgba(255,255,255,.28) inset;
}
.mmg-floating-hint--quiz .mmg-floating-hint__icon {
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 0 18px rgba(255,255,255,.22);
}
.mmg-floating-hint__notice {
  position: absolute;
  top: -12px;
  right: 10px;
  min-width: 58px;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #063b34;
  font-style: normal;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff, #d9fff5);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 10px 20px rgba(0, 91, 82, .22), 0 0 0 4px rgba(29, 210, 189, .13);
  pointer-events: none;
  animation: mmgNoticePop 1.05s ease-in-out infinite;
}
.mmg-floating-hint.is-notifying {
  animation: mmgQuizButtonNotify 1.08s ease-in-out infinite;
}
.mmg-floating-hint.is-notifying::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 2px solid rgba(41, 224, 202, .52);
  opacity: 0;
  animation: mmgQuizRipple 1.08s ease-out infinite;
  pointer-events: none;
}
@keyframes mmgQuizButtonNotify {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); filter: brightness(1); }
  42% { transform: translateX(-50%) translateY(-3px) scale(1.035); filter: brightness(1.08); }
  70% { transform: translateX(-50%) translateY(0) scale(1.012); }
}
@keyframes mmgQuizRipple {
  0% { opacity: .65; transform: scale(.96); }
  100% { opacity: 0; transform: scale(1.18); }
}
@keyframes mmgNoticePop {
  0%, 100% { transform: translateY(0) scale(1); }
  48% { transform: translateY(-2px) scale(1.04); }
}

.mmg-card-theme--memory-sun .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.58), transparent 30%), linear-gradient(155deg, #ffba35, #f07a00); }
.mmg-card-theme--memory-coral .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.5), transparent 30%), linear-gradient(155deg, #ff7a59, #d7374a); }
.mmg-card-theme--memory-mint .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.5), transparent 30%), linear-gradient(155deg, #62e6ba, #0ea67f); }
.mmg-card-theme--learning-leaf .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.52), transparent 30%), linear-gradient(155deg, #94df50, #2e9f44); }
.mmg-card-theme--learning-sky .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.55), transparent 30%), linear-gradient(155deg, #67d8ff, #2586e8); }
.mmg-card-theme--learning-lime .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.56), transparent 30%), linear-gradient(155deg, #c4f53f, #58ba19); }
.mmg-card-theme--mystery-gold .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.55), transparent 30%), linear-gradient(155deg, #ffd45a, #b66b00); }
.mmg-card-theme--mystery-plum .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.43), transparent 30%), linear-gradient(155deg, #9d6cff, #5825b8); }
.mmg-card-theme--mystery-rose .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.47), transparent 30%), linear-gradient(155deg, #ff78b4, #bd206f); }
.mmg-card-theme--complete-royal .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.46), transparent 30%), linear-gradient(155deg, #416cff, #152ea8); }
.mmg-card-theme--complete-amber .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.54), transparent 30%), linear-gradient(155deg, #ffc348, #df5c00); }
.mmg-card-theme--complete-teal .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.5), transparent 30%), linear-gradient(155deg, #35dbc6, #067d84); }
.mmg-card-theme--quiz-azure .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.58), transparent 30%), linear-gradient(155deg, #2bd5ff, #006dff); }
.mmg-card-theme--quiz-emerald .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.53), transparent 30%), linear-gradient(155deg, #37e69f, #00946f); }
.mmg-card-theme--quiz-violet .mmg-card__back { background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.48), transparent 30%), linear-gradient(155deg, #8b7dff, #3b2fbd); }

.mmg-card-theme--quiz-azure .mmg-card__back,
.mmg-card-theme--quiz-emerald .mmg-card__back,
.mmg-card-theme--quiz-violet .mmg-card__back {
  border-color: rgba(255,255,255,.8);
  box-shadow: 0 14px 28px rgba(0, 75, 132, .22), inset 0 1px 0 rgba(255,255,255,.42);
}
@media (max-width: 380px), (max-height: 700px) {
  .mmg-floating-hint__notice {
    top: -10px;
    right: 8px;
    min-width: 48px;
    min-height: 18px;
    padding: 3px 6px;
    font-size: 8px;
  }
}

/* MemoQuest 2.11.0 — Mega UX update: story mode, in-game Gems, smarter mystery help and online chat */
.mmg-home .mmg-gems-pill { display: none !important; }
.mmg-home__actions { gap: 12px; }
.mmg-home__actions .mmg-btn:first-child {
  min-height: 64px;
  background: linear-gradient(160deg, #ffb331, #fb7f00);
  box-shadow: 0 20px 42px rgba(197, 93, 0, .34), inset 0 1px 0 rgba(255,255,255,.42);
}
.mmg-story {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.86), transparent 32%), linear-gradient(150deg, #fff8df, #ffd37f);
}
.mmg-story-progress {
  min-width: 48px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #6b3d00;
  font-weight: 950;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}
.mmg-story-road {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 2px 2px 84px;
  scrollbar-width: none;
}
.mmg-story-road::-webkit-scrollbar { display: none; }
.mmg-story-level {
  min-height: 82px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 25px;
  padding: 12px;
  color: #2d1b05;
  background: rgba(255,255,255,.72);
  box-shadow: 0 14px 28px rgba(94, 58, 0, .12), inset 0 0 0 1px rgba(255,255,255,.72);
  text-align: left;
}
.mmg-story-level__badge {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(160deg, #fff9e7, #ffe0a5);
  font-size: 24px;
  font-weight: 950;
}
.mmg-story-level__text strong { display: block; font-size: 16px; letter-spacing: -.03em; }
.mmg-story-level__text small { display: block; margin-top: 4px; color: rgba(80,55,17,.7); font-weight: 800; line-height: 1.28; }
.mmg-story-level em {
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
  color: #006c52;
  background: rgba(46,196,182,.14);
  border-radius: 999px;
  padding: 7px 9px;
}
.mmg-story-level.is-done { background: rgba(235,255,237,.8); }
.mmg-story-level.is-done .mmg-story-level__badge { color: #077a38; background: rgba(207,255,216,.9); }
.mmg-story-level.is-locked { opacity: .56; filter: grayscale(.2); }
.mmg-story-level.is-locked em { color: #806037; background: rgba(255,255,255,.52); }

.mmg-gems-mini {
  position: absolute;
  left: 12px;
  bottom: calc(12px + var(--mm-safe-bottom));
  z-index: 26;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  padding: 4px 9px 4px 6px;
  color: #064322;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 24px rgba(0,90,43,.16), inset 0 0 0 1px rgba(255,255,255,.82);
  font-weight: 950;
  cursor: pointer;
  animation: mmgGemMiniPulse 2.8s ease-in-out infinite;
}
.mmg-gems-mini .mmg-gem-icon--tiny { width: 16px; height: 16px; }
.mmg-gems-mini strong { font-size: 14px; line-height: 1; }
.mmg-gems-mini span:last-child { font-size: 8px; text-transform: uppercase; letter-spacing: .08em; opacity: .68; }
@keyframes mmgGemMiniPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 10px 24px rgba(0,90,43,.16), 0 0 0 0 rgba(16,190,90,.0); }
  50% { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,90,43,.18), 0 0 0 5px rgba(16,190,90,.08); }
}

.mmg-letter-actions { flex-wrap: wrap; gap: 8px; }
.mmg-small-action--wide { min-width: min(100%, 210px); }
@media (max-width: 380px) {
  .mmg-small-action { padding: 7px 9px; font-size: 12px; }
  .mmg-small-action--wide { min-width: 175px; }
}

.mmg-chat {
  position: absolute;
  right: 12px;
  bottom: calc(12px + var(--mm-safe-bottom));
  z-index: 42;
}
.mmg-chat-bubble {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #19c7ae, #056d64);
  box-shadow: 0 18px 36px rgba(0,91,80,.3), inset 0 1px 0 rgba(255,255,255,.38);
  font-size: 23px;
  cursor: pointer;
}
.mmg-chat-bubble em {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ff3b5f;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  font-style: normal;
  box-shadow: 0 6px 16px rgba(255,59,95,.32);
}
.mmg-chat-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(62vh, 500px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,255,249,.97));
  box-shadow: 0 24px 70px rgba(18,42,34,.32), inset 0 0 0 1px rgba(255,255,255,.8);
  animation: mmgChatIn .18s ease both;
}
@keyframes mmgChatIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.mmg-chat-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 9px;
  color: #063e35;
  border-bottom: 1px solid rgba(0,110,80,.08);
}
.mmg-chat-panel header strong { font-size: 17px; letter-spacing: -.03em; }
.mmg-chat-panel header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 12px;
  background: rgba(0,0,0,.04);
  font-size: 20px;
  font-weight: 900;
}
.mmg-chat-list {
  min-height: 160px;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.mmg-chat-empty { margin: 20px 8px; text-align: center; color: rgba(24,57,48,.56); font-weight: 800; }
.mmg-chat-msg {
  max-width: 82%;
  justify-self: start;
  padding: 8px 10px;
  border-radius: 18px 18px 18px 6px;
  background: #f1efe8;
  color: #1e1a10;
  box-shadow: 0 8px 18px rgba(48,36,16,.08);
}
.mmg-chat-msg.is-me {
  justify-self: end;
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(160deg, #dfffee, #b8f7d1);
}
.mmg-chat-msg small { display: block; margin-bottom: 3px; color: rgba(0,73,50,.62); font-size: 10px; font-weight: 950; }
.mmg-chat-msg p { margin: 0; font-size: 13px; font-weight: 800; line-height: 1.28; word-break: break-word; }
.mmg-chat-msg img { display: block; max-width: 210px; max-height: 190px; border-radius: 14px; object-fit: cover; }
.mmg-chat-msg audio { width: 210px; max-width: 100%; }
.mmg-chat-panel footer {
  display: grid;
  grid-template-columns: 34px 34px 1fr 38px;
  gap: 6px;
  align-items: center;
  padding: 9px;
  border-top: 1px solid rgba(0,110,80,.08);
}
.mmg-chat-panel footer input[type="text"], .mmg-chat-panel footer input:not([type]) {
  min-width: 0;
}
.mmg-chat-panel footer input[type="file"] { display: none; }
.mmg-chat-file,
.mmg-chat-audio,
.mmg-chat-panel footer button:last-child {
  height: 34px;
  border: 0;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(46,196,182,.14);
  color: #075247;
  font-weight: 950;
  cursor: pointer;
}
.mmg-chat-audio.is-recording { background: #ffedf1; color: #c21d44; animation: mmgPulse 1s ease infinite; }
.mmg-chat-panel footer input[type="text"],
.mmg-chat-panel footer input:not([type]) {
  height: 36px;
  border: 0;
  border-radius: 14px;
  padding: 0 10px;
  background: rgba(0,0,0,.045);
  color: #1f1a12;
  font-weight: 800;
  outline: none;
}
.mmg-chat-panel footer button:last-child {
  background: linear-gradient(160deg, #24d2b9, #068879);
  color: #fff;
}
@media (max-height: 660px) {
  .mmg-chat-panel { max-height: 56vh; }
  .mmg-chat-bubble { width: 42px; height: 42px; font-size: 20px; }
  .mmg-gems-mini { height: 27px; bottom: calc(8px + var(--mm-safe-bottom)); }
}

/* MemoQuest 2.12.0 — Story stars + robust online media chat */
.mmg-story-stars {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #f49b00;
  background: rgba(255, 207, 76, .16);
  font-size: 14px;
  letter-spacing: .06em;
  font-weight: 950;
}
.mmg-story-complete {
  width: 100%;
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,.78), rgba(255,244,201,.72));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.78), 0 12px 26px rgba(91,64,0,.08);
}
.mmg-story-complete strong {
  font-size: 16px;
  letter-spacing: -.03em;
  color: #2d1b05;
}
.mmg-story-complete__stars {
  font-size: 30px;
  line-height: 1;
  letter-spacing: .08em;
  color: #ffb000;
  text-shadow: 0 3px 10px rgba(255, 166, 0, .22);
}
.mmg-story-complete small {
  max-width: 320px;
  color: rgba(61,42,10,.72);
  font-weight: 850;
  line-height: 1.3;
}
.mmg-story-complete.is-unlocked {
  background: linear-gradient(160deg, rgba(228,255,237,.92), rgba(255,250,216,.84));
}
.mmg-story-complete.is-retry {
  background: linear-gradient(160deg, rgba(255,243,226,.92), rgba(255,232,199,.78));
}
.mmg-chat-msg img {
  width: auto;
  height: auto;
  background: rgba(255,255,255,.5);
}
.mmg-chat-msg audio {
  display: block;
  border-radius: 999px;
}
.mmg-chat-file:active,
.mmg-chat-audio:active,
.mmg-chat-panel footer button:last-child:active {
  transform: scale(.96);
}

/* MemoQuest 2.16.0 — PWA installable robuste + fallback Chrome/iOS */
.mmg-install-toast {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(14px + var(--mm-safe-bottom));
  z-index: 180;
  display: grid;
  grid-template-columns: 42px 1fr auto 32px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .84);
  box-shadow: 0 18px 42px rgba(91, 58, 0, .20);
  backdrop-filter: blur(18px);
  animation: mmgInstallSlide .42s cubic-bezier(.2, .9, .2, 1) both;
}
.mmg-install-toast img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(0, 116, 70, .22);
}
.mmg-install-toast strong {
  display: block;
  font-size: 14px;
  letter-spacing: -.02em;
  color: #1f1709;
}
.mmg-install-toast span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.18;
  font-weight: 800;
  color: rgba(78, 55, 18, .72);
}
.mmg-install-toast button {
  border: 0;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
.mmg-install-toast button:not(.mmg-install-toast__close) {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #00a66a, #1ec4a7);
  box-shadow: 0 10px 20px rgba(0, 132, 87, .22);
}
.mmg-install-toast__close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #684400;
  background: rgba(255, 238, 186, .82);
  font-size: 20px;
  line-height: 1;
}
.mmg-sound-control {
  position: absolute;
  right: 12px;
  top: calc(72px + env(safe-area-inset-top, 0px));
  z-index: 70;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  gap: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
  color: #704300;
  box-shadow: 0 12px 28px rgba(94, 62, 0, .16);
  backdrop-filter: blur(14px);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
.mmg-sound-control span {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  line-height: .9;
}
.mmg-sound-control small {
  display: block;
  margin-top: -2px;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(93,64,17,.68);
}
.mmg-sound-control.is-on {
  color: #006b43;
  background: rgba(239, 255, 239, .82);
  box-shadow: 0 12px 28px rgba(0, 133, 77, .18);
}

.mmg-install-toast.is-ready {
  box-shadow: 0 20px 48px rgba(0, 137, 86, .22), 0 0 0 1px rgba(0, 174, 112, .14) inset;
}
.mmg-install-guide {
  position: absolute;
  inset: 0;
  z-index: 230;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(44, 26, 0, .28);
  backdrop-filter: blur(8px);
}
.mmg-install-guide__card {
  width: min(100%, 520px);
  position: relative;
  padding: 20px;
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(255,248,219,.96));
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: 0 26px 70px rgba(52, 34, 0, .28);
  color: #291a04;
  animation: mmgInstallSlide .32s cubic-bezier(.2, .9, .2, 1) both;
}
.mmg-install-guide__card > img {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(112, 70, 0, .18);
}
.mmg-install-guide__card h2 {
  margin: 12px 0 6px;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.mmg-install-guide__card p,
.mmg-install-guide__card li {
  color: rgba(62, 43, 9, .78);
  font-weight: 850;
  line-height: 1.32;
}
.mmg-install-guide__card ol {
  margin: 12px 0 0;
  padding-left: 21px;
}
.mmg-install-guide__card li + li { margin-top: 8px; }
.mmg-install-guide__close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 237, 192, .86);
  color: #654000;
  font: inherit;
  font-size: 24px;
  font-weight: 950;
}
.mmg-install-guide__diag {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0, 120, 78, .08);
  color: #075b3b !important;
  font-size: 12px;
  font-weight: 900 !important;
}

.mmg-install-guide__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.mmg-install-guide__actions button {
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
.mmg-install-guide__actions button:first-child {
  color: #fff;
  background: linear-gradient(135deg, #00a66a, #1ec4a7);
  box-shadow: 0 12px 24px rgba(0, 132, 87, .20);
}
.mmg-install-guide__actions button:last-child {
  color: #684400;
  background: rgba(255, 237, 195, .90);
}

@keyframes mmgInstallSlide {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 380px) {
  .mmg-install-toast { grid-template-columns: 36px minmax(0,1fr) auto 28px; gap: 8px; padding: 8px; border-radius: 20px; }
  .mmg-install-toast img { width: 36px; height: 36px; border-radius: 12px; }
  .mmg-install-toast span { display: none; }
  .mmg-install-toast button:not(.mmg-install-toast__close) { min-height: 30px; padding: 0 10px; font-size: 12px; }
  .mmg-install-toast__close { width: 28px; height: 28px; }
  .mmg-sound-control { width: 42px; height: 42px; border-radius: 15px; right: 10px; top: calc(66px + env(safe-area-inset-top, 0px)); }
}
@media (display-mode: standalone) {
  .mmg-install-toast { display: none !important; }
}


/* MemoQuest 2.16.0 — installation PWA finale, viewport stable, son sans bouton */
.mmg-sound-control { display: none !important; }
.mmg-wordpress-shell {
  position: relative;
  width: 100%;
  height: var(--app-height, 100dvh);
  min-height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
}
.mmg-app {
  width: min(100vw, 620px);
  height: var(--app-height, 100dvh);
  min-height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  margin-inline: auto;
  overflow: hidden;
}
.mmg-screen {
  min-height: 0;
  max-height: var(--app-height, 100dvh);
}
.mmg-home .mmg-tagline {
  padding-inline: 10px;
  max-width: min(96vw, 440px);
}
.mmg-home__top {
  max-width: 100%;
  overflow: hidden;
}
.mmg-logo {
  max-width: min(94vw, 520px);
}
.mmg-logo strong {
  white-space: nowrap;
  font-size: clamp(22px, 8.2vw, 36px);
}
.mmg-room-code-pill.is-hidden,
.mmg-room-code-pill[hidden] {
  display: none !important;
}
.mmg-install-toast {
  bottom: calc(10px + var(--mm-safe-bottom));
  max-width: min(94vw, 560px);
  margin-inline: auto;
}
.mmg-install-toast button:not(.mmg-install-toast__close) {
  letter-spacing: -.02em;
}
@media (max-height: 700px) {
  .mmg-home { gap: 8px; grid-template-rows: auto 1fr auto auto; }
  .mmg-logo { padding-block: 8px; }
  .mmg-demo-stack { grid-template-columns: repeat(3, 64px); grid-auto-rows: 78px; gap: 7px; }
  .mmg-demo-stack span { border-radius: 19px; font-size: 28px; }
  .mmg-home__actions .mmg-btn { min-height: 46px; border-radius: 16px; }
}
@media (max-width: 360px) {
  .mmg-logo strong { font-size: clamp(20px, 7.4vw, 28px); }
  .mmg-tagline { font-size: 13px; }
}
@media (display-mode: standalone) {
  .mmg-install-toast, .mmg-install-guide { display: none !important; }
}


/* MemoQuest 2.18.0 — branding, SEO accessibility and final mobile polish */
.mmg-seo-content {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mmg-logo--image {
  padding: 8px 12px;
  border-radius: 28px;
  max-width: min(92vw, 500px);
  background: rgba(255, 255, 255, .58);
}
.mmg-logo__image {
  display: block;
  width: min(82vw, 390px);
  height: auto;
  max-height: 112px;
  object-fit: contain;
}
@media (max-height: 720px) {
  .mmg-logo__image { max-height: 86px; width: min(78vw, 340px); }
}
@media (max-width: 360px) {
  .mmg-logo__image { max-height: 76px; width: min(82vw, 310px); }
}


/* MemoQuest 2.20.0 — content split + professional launch splash */
.mmg-splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 15%, #ffffff 0%, #fff8e8 38%, #f6e2b3 100%);
  animation: mmg-splash-out .42s ease 1.52s both;
}
.mmg-splash-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px;
  transform-origin: center;
}
.mmg-splash-logo {
  width: min(78vw, 360px);
  max-height: 210px;
  object-fit: contain;
  padding: 14px;
  border-radius: 28px;
  background: #fff;
  animation: mmg-logo-reveal .9s cubic-bezier(.2,.9,.2,1) both;
}
.mmg-splash-title {
  color: #0e3f2a;
  font-size: clamp(28px, 8vw, 48px);
  letter-spacing: -.04em;
  text-shadow: 0 2px 0 rgba(255,255,255,.7);
  opacity: 0;
  transform: translateY(10px);
  animation: mmg-title-reveal .55s ease .62s both;
}
@keyframes mmg-logo-reveal {
  from { opacity: 0; transform: scale(.82) translateY(12px); filter: blur(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
@keyframes mmg-title-reveal {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mmg-splash-out {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
