/* ==========================================================================
   Game: Mystery Word Movies (mystery-word-movies)
   Self-contained — every class is prefixed .mm-. A cinematic dark stage:
   velvet-curtain gradients, marquee bulbs and a film-strip edge, in both
   site themes. Tile colours: gold = right spot, blue = in the word,
   charcoal = not in the word.
   ========================================================================== */
.mm {
  --mm-bg: #140d14;
  --mm-card: rgba(255, 255, 255, .06);
  --mm-card-hover: rgba(255, 255, 255, .11);
  --mm-line: rgba(255, 255, 255, .13);
  --mm-text: #fff;
  --mm-sub: rgba(255, 255, 255, .74);
  --mm-correct: #f2c14e;
  --mm-present: #3fa9d9;
  --mm-absent: #3a3036;
  --mm-key: #5c4a55;
  --mm-bad: #ff5c8a;
  --mm-gold: #ffd84d;
  --mm-len: 5;

  position: relative;
  margin: 10px 0 40px;
  padding: 36px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 55% at 50% -5%, rgba(255, 214, 140, .2), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .28) 0 14px, rgba(255, 255, 255, 0) 14px 40px),
    linear-gradient(90deg, #5a0f1e 0%, #2a0b16 16%, #140d14 30%, #140d14 70%, #2a0b16 84%, #5a0f1e 100%);
  color: var(--mm-text);
  isolation: isolate;
  min-height: 520px;
}
:root[data-theme="dark"] .mm { border: 1px solid var(--line); }

/* Film-strip edge along the top and bottom (decorative) */
.mm::before,
.mm::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  height: 14px;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(255, 255, 255, .22) 8px 18px, transparent 18px 26px) center / 100% 6px no-repeat,
    #0b070b;
}
.mm::before { top: 0; }
.mm::after { bottom: 0; }

.mm-screen[hidden], .mm [hidden] { display: none !important; }
.mm-screen { animation: mm-fade .35s var(--ease); }
@keyframes mm-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.mm-ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Shared buttons ---------- */
.mm-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid var(--mm-line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--mm-text);
  font: 600 .875rem/1.2 var(--font);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.mm-ghost:hover { background: var(--mm-card-hover); }
.mm-ghost--danger { color: var(--mm-sub); }
.mm-ghost--danger.is-confirm { border-color: var(--mm-bad); color: var(--mm-bad); }
.mm-ghost .mm-ico--off { display: none; }
.mm-ghost.is-off .mm-ico--on { display: none; }
.mm-ghost.is-off .mm-ico--off { display: block; }

.mm-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--mm-line);
  border-radius: 12px;
  background: var(--mm-card);
  color: var(--mm-text);
  cursor: pointer;
  transition: background-color .2s var(--ease);
}
.mm-icon-btn:hover { background: var(--mm-card-hover); }

.mm .btn-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 24px; }
.mm .btn-pill:not(.btn-pill--hot) { background: var(--brand-soft); color: var(--night); }
.mm button:focus-visible { outline: 3px solid var(--mm-gold); outline-offset: 2px; }

/* ==========================================================================
   Screen 1: home
   ========================================================================== */
.mm-home__head { display: flex; align-items: flex-start; gap: 22px; max-width: 760px; }

.mm-logo {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: radial-gradient(circle at 30% 25%, #ffe39a, #f2c14e 45%, #b8862a);
  box-shadow: 0 0 0 4px rgba(242, 193, 78, .18), 0 12px 30px rgba(242, 193, 78, .3);
}
/* clapperboard.svg carries its stroke and the clapper animation (reduced motion handled inside the file) */
.mm-logo__img { width: 48px; height: 48px; }

/* Marquee title with bulbs */
.mm-title { text-shadow: 0 0 18px rgba(242, 193, 78, .35); }
.mm-home__head { padding-bottom: 16px; border-bottom: 2px dotted rgba(242, 193, 78, .5); }

.mm-kicker {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(242, 193, 78, .18);
  color: #f7d27a;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mm-title { margin: 0 0 8px; font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -.035em; line-height: 1.05; }
.mm-lead { margin: 0; color: var(--mm-sub); }

.mm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 28px 0 22px;
}
.mm-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mm-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--mm-line);
  border-radius: var(--radius-pill);
  background: var(--mm-card);
}
.mm-chip__label { color: var(--mm-sub); font-size: .78rem; font-weight: 500; }
.mm-chip strong { color: var(--mm-gold); font-size: 1rem; }
.mm-toolbar__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Daily card */
.mm-daily {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 28px;
  padding: 22px 24px;
  border: 1px solid rgba(242, 193, 78, .45);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, rgba(242, 193, 78, .2), rgba(255, 255, 255, .04) 60%);
}
.mm-daily__body { flex: 1 1 300px; min-width: 0; }
.mm-daily__tag { color: #f7d27a; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mm-daily__title { margin: 4px 0 4px; font-size: 1.35rem; }
.mm-daily__status { margin: 0; color: var(--mm-sub); font-size: .92rem; }
.mm-daily__count { margin: 8px 0 0; color: var(--mm-sub); font-size: .88rem; }
.mm-daily__count strong { color: var(--mm-gold); font-variant-numeric: tabular-nums; }
.mm-daily__play { flex: none; }
.mm.is-daily-done .mm-daily { border-color: var(--mm-line); background: var(--mm-card); }

.mm-subtitle { margin: 0 0 14px; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mm-sub); }

.mm-stages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mm-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--mm-line);
  border-radius: var(--radius-md);
  background: var(--mm-card);
  color: var(--mm-text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.mm-stage:hover:not(:disabled) { transform: translateY(-3px); border-color: rgba(242, 193, 78, .6); background: var(--mm-card-hover); }
.mm-stage.is-cleared { border-color: rgba(242, 193, 78, .45); }
.mm-stage.is-locked { cursor: not-allowed; opacity: .5; }
.mm-stage__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mm-stage__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--mm-correct);
  color: #2a1a00;
  font-size: 1.1rem;
  font-weight: 800;
}
.mm-stage.is-locked .mm-stage__num { background: rgba(255, 255, 255, .14); }
.mm-stage__tiles { display: flex; gap: 3px; }
.mm-stage__tiles span { width: 11px; height: 11px; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.mm-stage__body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mm-stage__name { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.mm-stage__blurb { color: var(--mm-sub); font-size: .82rem; line-height: 1.45; }
.mm-stage__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--mm-line); }
.mm-stage__best { color: var(--mm-sub); font-size: .78rem; font-weight: 600; }

.mm-star { color: rgba(255, 255, 255, .22); font-size: 1.05rem; line-height: 1; }
.mm-star.is-on { color: var(--mm-gold); text-shadow: 0 0 12px rgba(255, 216, 77, .5); }

.mm-noscript { margin: 16px 0 0; padding: 14px 18px; border-radius: var(--radius-sm); background: rgba(255, 92, 138, .15); }

/* ==========================================================================
   Screen 2: playing
   ========================================================================== */
.mm-play { position: relative; }
.mm-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 14px; }
.mm-hud__label {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(242, 193, 78, .2);
  color: #f7d27a;
  font-size: .82rem;
  font-weight: 700;
}
.mm.is-hard .mm-hud__label { background: rgba(255, 92, 138, .2); color: #ff9ab7; }
.mm-hud__stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.mm-hud__btns { display: flex; gap: 8px; }
.mm-stat { display: flex; flex-direction: column; line-height: 1.2; }
.mm-stat__label { color: var(--mm-sub); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.mm-stat strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.mm-note {
  margin: 0 auto 12px;
  max-width: 520px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 92, 138, .12);
  color: var(--mm-sub);
  font-size: .85rem;
  text-align: center;
}
.mm-note strong { color: #ff9ab7; }

.mm-stagearea { position: relative; max-width: 560px; margin: 0 auto; }

/* Toast */
.mm-toast {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 4;
  padding: 9px 16px;
  border-radius: 10px;
  background: #fff;
  color: #140d14;
  font-weight: 700;
  font-size: .92rem;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transform: translateX(-50%);
  pointer-events: none;
}
.mm-toast.is-in { animation: mm-toast .25s var(--ease); }
@keyframes mm-toast { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translateX(-50%); } }

/* Board */
.mm-board {
  outline: none;
  display: grid;
  gap: 6px;
  width: min(100%, calc(var(--mm-len) * 62px));
  margin: 0 auto 18px;
}
.mm-board.is-in { animation: mm-fade .35s var(--ease); }
.mm-row { display: grid; grid-template-columns: repeat(var(--mm-len), minmax(0, 1fr)); gap: 6px; }
.mm-row.is-shake { animation: mm-shake .45s ease; }
@keyframes mm-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.mm-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 2px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  color: #fff;
  font-size: clamp(1.15rem, 4.6vw, 1.85rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.mm-tile[data-state="tbd"] { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .06); }
.mm-tile[data-state="correct"] { border-color: var(--mm-correct); background: var(--mm-correct); color: #2a1a00; box-shadow: 0 0 14px rgba(242, 193, 78, .45); }
.mm-tile[data-state="present"] { border-color: var(--mm-present); background: var(--mm-present); color: #fff; }
.mm-tile[data-state="absent"]  { border-color: var(--mm-absent); background: var(--mm-absent); color: rgba(255, 255, 255, .85); }
.mm-tile.is-pop { animation: mm-pop .12s ease-out; }
.mm-tile.is-flip { animation: mm-flip .48s ease-in-out both; }
.mm-tile.is-win { animation: mm-bounce .6s ease both; }
@keyframes mm-pop { 50% { transform: scale(1.1); } }
@keyframes mm-flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes mm-bounce { 0%, 100% { transform: none; } 40% { transform: translateY(-14px); } 70% { transform: translateY(3px); } }

/* Word done */
.mm-done {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 4px 0 0 var(--mm-correct);
  animation: mm-fade .3s var(--ease);
}
.mm-done.is-bad { box-shadow: inset 4px 0 0 var(--mm-bad); }
.mm-done > div { flex: 1 1 240px; min-width: 0; }
.mm-done__title { margin: 0 0 2px; font-weight: 700; font-size: 1.05rem; }
.mm-done.is-good .mm-done__title { color: #f7d27a; }
.mm-done.is-bad .mm-done__title { color: var(--mm-bad); }
.mm-done__text { margin: 0; color: var(--mm-sub); font-size: .88rem; }

/* Keyboard */
.mm-keyboard { display: flex; flex-direction: column; gap: 7px; user-select: none; touch-action: manipulation; }
.mm-kb-row { display: flex; justify-content: center; gap: 6px; }
.mm-kb-row:nth-child(2) { padding: 0 4.5%; }
.mm-key {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  min-width: 0;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--mm-key);
  color: #fff;
  font: 700 1rem/1 var(--font);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s var(--ease), transform .08s;
}
.mm-key:active { transform: scale(.95); }
.mm-key--wide { flex: 1.55 1 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; }
.mm-key .mm-ico { width: 22px; height: 22px; }
.mm-key[data-state="correct"] { background: var(--mm-correct); color: #2a1a00; }
.mm-key[data-state="present"] { background: var(--mm-present); color: #fff; }
.mm-key[data-state="absent"]  { background: #221a1f; color: rgba(255, 255, 255, .45); }

/* Hint (movie clue) */
.mm-hintbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px 6px 10px;
  border: 1px solid rgba(242, 193, 78, .6);
  border-radius: 12px;
  background: rgba(242, 193, 78, .12);
  color: #f7d27a;
  font: 700 .85rem/1 var(--font);
  cursor: pointer;
  transition: background-color .2s var(--ease), opacity .2s var(--ease);
}
.mm-hintbtn small { color: var(--mm-sub); font-size: .72rem; font-weight: 600; }
.mm-hintbtn:hover:not(:disabled) { background: rgba(242, 193, 78, .24); }
.mm-hintbtn:disabled { cursor: not-allowed; opacity: .4; }
.mm-hintbtn.is-used { text-decoration: line-through; }
.mm-hintbox {
  margin: 0 auto 14px;
  max-width: 520px;
  padding: 10px 14px;
  border: 1px dashed rgba(242, 193, 78, .55);
  border-radius: var(--radius-sm);
  background: rgba(242, 193, 78, .08);
  font-size: .92rem;
  text-align: center;
  animation: mm-fade .3s var(--ease);
}
.mm-hintbox__tag, .mm-dres__clue::before {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--mm-correct);
  color: #2a1a00;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.mm-dres__clue { margin: -6px 0 14px; color: var(--mm-sub); font-size: .9rem; }
.mm-dres__clue::before { content: "Clue"; }

/* Pause overlay */
.mm-play.is-paused .mm-stagearea { filter: blur(14px); pointer-events: none; user-select: none; }
.mm-paused { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; }
.mm-paused__card, .mm-modal__card {
  position: relative;
  max-width: 400px;
  width: 100%;
  padding: 28px;
  border: 1px solid var(--mm-line);
  border-radius: var(--radius-md);
  background: rgba(24, 14, 20, .96);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
  text-align: center;
}
.mm-paused__title, .mm-modal__title { margin: 0 0 6px; font-size: 1.6rem; }
.mm-paused__card p { margin: 0 0 20px; color: var(--mm-sub); font-size: .9rem; }
.mm-paused__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Stats modal */
.mm-modal { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: rgba(10, 4, 8, .65); }
.mm-modal__card { max-width: 440px; }
.mm-modal__close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; }
.mm-modal__title { margin-bottom: 16px; font-size: 1.35rem; }

.mm-statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.mm-statgrid div { padding: 10px 4px; border: 1px solid var(--mm-line); border-radius: var(--radius-sm); background: var(--mm-card); }
.mm-statgrid dt { order: 2; color: var(--mm-sub); font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.mm-statgrid dd { margin: 0; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.mm-statgrid div { display: flex; flex-direction: column-reverse; }

.mm-dres__head { margin: 0 0 10px; color: var(--mm-sub); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.mm-dist { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; text-align: left; }
.mm-dist__row { display: flex; align-items: center; gap: 8px; }
.mm-dist__n { width: 14px; font-weight: 700; font-size: .85rem; }
.mm-dist__bar {
  display: flex;
  justify-content: flex-end;
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--mm-absent);
  font-size: .8rem;
  font-weight: 700;
  transition: width .5s var(--ease);
}
.mm-dist__bar.is-now { background: var(--mm-correct); color: #2a1a00; }

/* ==========================================================================
   Screen 3: results
   ========================================================================== */
.mm-result { max-width: 640px; margin: 0 auto; padding: 10px 0; text-align: center; }
.mm-result__stars { display: flex; justify-content: center; gap: 10px; margin-bottom: 8px; }
.mm-result__stars:empty { display: none; }
.mm-star--big { font-size: clamp(3rem, 9vw, 4.25rem); opacity: 0; animation: mm-star-in .5s var(--ease) forwards; }
@keyframes mm-star-in { from { opacity: 0; transform: scale(.3) rotate(-30deg); } to { opacity: 1; transform: none; } }
.mm-result__title { margin: 0 0 6px; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.mm-result__new {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--mm-gold);
  color: var(--night);
  font-size: .8rem;
  font-weight: 700;
}
.mm-result__text { margin: 0 auto 20px; max-width: 480px; color: var(--mm-sub); }

.mm-res-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.mm-res-word {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border: 1px solid var(--mm-line);
  border-radius: var(--radius-sm);
  background: var(--mm-card);
}
.mm-res-word strong { letter-spacing: .14em; font-size: 1.05rem; }
.mm-res-word span { color: var(--mm-sub); font-size: .78rem; }
.mm-res-word.is-good { border-color: rgba(242, 193, 78, .55); }
.mm-res-word.is-bad { border-color: rgba(255, 92, 138, .55); }

.mm-result__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; }
.mm-result__stats div { padding: 14px 8px; border: 1px solid var(--mm-line); border-radius: var(--radius-sm); background: var(--mm-card); }
.mm-result__stats dt { color: var(--mm-sub); font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.mm-result__stats dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.mm-dres { max-width: 420px; margin: 0 auto 24px; }
.mm-dres__answer { margin: 0 0 14px; color: var(--mm-sub); }
.mm-dres__answer strong { display: block; margin-top: 4px; color: #f7d27a; font-size: 1.6rem; letter-spacing: .2em; }
.mm-dres__grid { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0 0 16px; }
.mm-dres__grid:empty { display: none; }
.mm-mini-row { display: flex; gap: 4px; }
.mm-mini { width: 22px; height: 22px; border-radius: 4px; }
.mm-mini.is-correct { background: var(--mm-correct); }
.mm-mini.is-present { background: var(--mm-present); }
.mm-mini.is-absent { background: var(--mm-absent); }
.mm-share { display: flex !important; width: fit-content; margin: 0 auto 6px; }
.mm-dres .mm-daily__count { margin: 6px 0 22px; }

.mm-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ==========================================================================
   How-to-play section (site theme)
   ========================================================================== */
.mm-guide { margin: 0 0 56px; }
.mm-guide .section-head__title { margin-bottom: 22px; }
.mm-guide__item {
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.mm-guide__item h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.mm-guide__item p { margin: 0; color: var(--sub); font-size: .9rem; }
.mm-guide__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--onbrand);
  font-weight: 700;
}
.mm-guide__back { margin: 24px 0 0; }
.mm-legend { line-height: 2; }
.mm-legend__tile {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  border-radius: 5px;
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  vertical-align: middle;
}
.mm-legend__tile.is-correct { background: #f2c14e; color: #2a1a00; }
.mm-legend__tile.is-present { background: #3fa9d9; }
.mm-legend__tile.is-absent { background: #3a3036; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 767.98px) {
  .mm { padding: 24px 20px; min-height: 0; }
  .mm-result__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-hud__stats { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
  .mm-hud__btns { margin-left: auto; }
}
@media (max-width: 575.98px) {
  .mm { margin-left: -4px; margin-right: -4px; padding: 20px 12px; border-radius: var(--radius-md); }
  .mm-home__head { flex-direction: column; gap: 16px; }
  .mm-toolbar { flex-direction: column; align-items: stretch; }
  .mm-toolbar__actions .mm-ghost { flex: 1 1 auto; }
  .mm-daily { padding: 18px; }
  .mm-daily__play { width: 100%; }
  .mm-stages { grid-template-columns: 1fr; }
  .mm-hud { margin-bottom: 10px; }
  .mm-board { gap: 5px; width: min(100%, calc(var(--mm-len) * 52px)); margin-bottom: 14px; }
  .mm-row { gap: 5px; }
  .mm-keyboard { gap: 6px; margin: 0 -4px; }
  .mm-kb-row { gap: 4px; }
  .mm-key { height: 52px; font-size: .92rem; border-radius: 6px; }
  .mm-key--wide { font-size: .66rem; }
  .mm-statgrid dd { font-size: 1.2rem; }
  .mm-done .btn-pill { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .mm-screen, .mm-board.is-in, .mm-done, .mm-toast.is-in { animation: none; }
  .mm-tile.is-pop, .mm-tile.is-flip, .mm-tile.is-win, .mm-row.is-shake { animation: none; }
  .mm-star--big { opacity: 1; animation: none; }
  .mm-stage, .mm-key, .mm-dist__bar { transition: none; }
}
