/* ==========================================================================
   Game: Mystery Word (mystery-word)
   Self-contained — every class is prefixed .mw-. The game panel is a dark
   "stage" in both site themes. Tile colours: green = right spot,
   amber = in the word, slate = not in the word.
   ========================================================================== */

.mw {
  --mw-bg: #121633;
  --mw-card: rgba(255, 255, 255, .06);
  --mw-card-hover: rgba(255, 255, 255, .11);
  --mw-line: rgba(255, 255, 255, .13);
  --mw-text: #fff;
  --mw-sub: rgba(255, 255, 255, .74);
  --mw-correct: #1fb37f;
  --mw-present: #f2a93b;
  --mw-absent: #3b3f63;
  --mw-key: #5a5f8f;
  --mw-bad: #ff5c8a;
  --mw-gold: #ffd84d;
  --mw-len: 5;

  position: relative;
  margin: 10px 0 40px;
  padding: 36px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(31, 179, 127, .28), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(91, 61, 245, .45), transparent 60%),
    var(--mw-bg);
  color: var(--mw-text);
  isolation: isolate;
  min-height: 520px;
}
:root[data-theme="dark"] .mw { border: 1px solid var(--line); }

/* Faint letter-grid texture (decorative) */
.mw::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
}

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

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

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

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

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

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

.mw-logo { display: grid; grid-template-columns: repeat(2, 34px); gap: 5px; flex: none; }
.mw-logo span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  animation: mw-logo 3.2s ease-in-out infinite;
}
.mw-logo span:nth-child(1) { background: var(--mw-correct); }
.mw-logo span:nth-child(2) { background: var(--mw-present); color: #2e1d00; animation-delay: .2s; }
.mw-logo span:nth-child(3) { background: var(--mw-absent); animation-delay: .4s; }
.mw-logo span:nth-child(4) { background: var(--mw-correct); animation-delay: .6s; }
@keyframes mw-logo { 0%, 70%, 100% { transform: none; } 80% { transform: rotateX(90deg); } }

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

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

/* Daily card */
.mw-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(31, 179, 127, .45);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, rgba(31, 179, 127, .2), rgba(255, 255, 255, .04) 60%);
}
.mw-daily__body { flex: 1 1 300px; min-width: 0; }
.mw-daily__tag { color: #6be3b6; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mw-daily__title { margin: 4px 0 4px; font-size: 1.35rem; }
.mw-daily__status { margin: 0; color: var(--mw-sub); font-size: .92rem; }
.mw-daily__count { margin: 8px 0 0; color: var(--mw-sub); font-size: .88rem; }
.mw-daily__count strong { color: var(--mw-gold); font-variant-numeric: tabular-nums; }
.mw-daily__play { flex: none; }
.mw.is-daily-done .mw-daily { border-color: var(--mw-line); background: var(--mw-card); }

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

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

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

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

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

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

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

/* Toast */
.mw-toast {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 4;
  padding: 9px 16px;
  border-radius: 10px;
  background: #fff;
  color: #121633;
  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;
}
.mw-toast.is-in { animation: mw-toast .25s var(--ease); }
@keyframes mw-toast { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translateX(-50%); } }

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

.mw-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;
}
.mw-tile[data-state="tbd"] { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .06); }
.mw-tile[data-state="correct"] { border-color: var(--mw-correct); background: var(--mw-correct); }
.mw-tile[data-state="present"] { border-color: var(--mw-present); background: var(--mw-present); color: #2e1d00; }
.mw-tile[data-state="absent"]  { border-color: var(--mw-absent); background: var(--mw-absent); color: rgba(255, 255, 255, .85); }
.mw-tile.is-pop { animation: mw-pop .12s ease-out; }
.mw-tile.is-flip { animation: mw-flip .48s ease-in-out both; }
.mw-tile.is-win { animation: mw-bounce .6s ease both; }
@keyframes mw-pop { 50% { transform: scale(1.1); } }
@keyframes mw-flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes mw-bounce { 0%, 100% { transform: none; } 40% { transform: translateY(-14px); } 70% { transform: translateY(3px); } }

/* Word done */
.mw-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(--mw-correct);
  animation: mw-fade .3s var(--ease);
}
.mw-done.is-bad { box-shadow: inset 4px 0 0 var(--mw-bad); }
.mw-done > div { flex: 1 1 240px; min-width: 0; }
.mw-done__title { margin: 0 0 2px; font-weight: 700; font-size: 1.05rem; }
.mw-done.is-good .mw-done__title { color: #6be3b6; }
.mw-done.is-bad .mw-done__title { color: var(--mw-bad); }
.mw-done__text { margin: 0; color: var(--mw-sub); font-size: .88rem; }

/* Keyboard */
.mw-keyboard { display: flex; flex-direction: column; gap: 7px; user-select: none; touch-action: manipulation; }
.mw-kb-row { display: flex; justify-content: center; gap: 6px; }
.mw-kb-row:nth-child(2) { padding: 0 4.5%; }
.mw-key {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  min-width: 0;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--mw-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;
}
.mw-key:active { transform: scale(.95); }
.mw-key--wide { flex: 1.55 1 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; }
.mw-key .mw-ico { width: 22px; height: 22px; }
.mw-key[data-state="correct"] { background: var(--mw-correct); }
.mw-key[data-state="present"] { background: var(--mw-present); color: #2e1d00; }
.mw-key[data-state="absent"]  { background: #262947; color: rgba(255, 255, 255, .45); }

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

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

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

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

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

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

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

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

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

/* ==========================================================================
   How-to-play section (site theme)
   ========================================================================== */
.mw-guide { margin: 0 0 56px; }
.mw-guide .section-head__title { margin-bottom: 22px; }
.mw-guide__item {
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.mw-guide__item h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.mw-guide__item p { margin: 0; color: var(--sub); font-size: .9rem; }
.mw-guide__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--onbrand);
  font-weight: 700;
}
.mw-guide__back { margin: 24px 0 0; }
.mw-legend { line-height: 2; }
.mw-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;
}
.mw-legend__tile.is-correct { background: #1fb37f; }
.mw-legend__tile.is-present { background: #f2a93b; color: #2e1d00; }
.mw-legend__tile.is-absent { background: #3b3f63; }

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

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