/* TOMORO WORLD — menu & meta screens (title, world map, wardrobe, settings, pause, results, credits, confirm).
 * Sticker / toy language of playtomoro.com: ink outlines, hard "pop" shadows, rounded 26px, ZCOOL KuaiLe + Fredoka.
 * Everything is scoped under .mn (one root per screen) and prefixed mn- so it never collides with styles.css (E1).
 * Motion: entrance animations only on a screen's first render (.mn-in); exits via .mn-out; transforms/opacity only. */

/* ------------------------------------------------------------------ tokens & base */
.mn {
  --ink: #1E1B2E;
  --ink-2: #4A4660;
  --ink-3: #7C778F;
  --paper: #FFF6E6;
  --paper-2: #FFFDF8;
  --white: #fff;
  --orange: #EE7A2E;
  --horn: #6272E0;
  --visor: #A9B3F2;
  --yellow: #F5CD51;
  --purple: #8F58FB;
  --tangerine: #FCA148;
  --green: #A6CC5F;
  --sky: #73C2FD;
  --periwinkle: #7EA7F7;
  --pink: #FD749E;
  --teal: #6CE4D8;
  --gold: #F5CD51;
  --silver: #DDE3F0;
  --bronze: #E39A5B;

  --line: 3px solid var(--ink);
  --pop-sm: 3px 3px 0 var(--ink);
  --pop: 5px 5px 0 var(--ink);
  --pop-lg: 8px 8px 0 var(--ink);
  --r: 26px;
  --r-sm: 16px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(14px, 2.6vw, 34px);

  --f-display: 'Tomoro CJK Punct', 'ZCOOL KuaiLe', 'Fredoka', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; /* face: styles.css */
  --f-latin: 'Fredoka', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --f-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;

  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  font-family: var(--f-body);
  color: var(--ink);
  line-height: 1.45;
  pointer-events: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.mn:is([data-lang="en"], [data-lang="es"]) {
  --f-display: 'Fredoka', 'ZCOOL KuaiLe', system-ui, sans-serif;
  --f-body: 'Fredoka', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', sans-serif;
}
.mn[data-lang="ja"] {   /* Japanese faces (see styles.css html:lang(ja)) */
  --f-display: 'Fredoka', 'Hiragino Maru Gothic ProN', 'Hiragino Maru Gothic Pro', 'Zen Maru Gothic', 'M PLUS Rounded 1c', 'Yu Gothic UI', 'Yu Gothic', 'Meiryo', 'Noto Sans JP', sans-serif;
  --f-body: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', 'Meiryo', 'Noto Sans JP', 'Noto Sans CJK JP', system-ui, sans-serif;
}
.mn *, .mn *::before, .mn *::after { box-sizing: border-box; }
/* resets use :where() so every component class below out-ranks them */
.mn :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; }
.mn :where(h1, h2, h3, h4) { font-weight: 400; line-height: 1.1; }
.mn:is([data-lang="en"], [data-lang="es"]) :where(h1, h2, h3, h4) { font-weight: 600; }
.mn :where(ul, ol) { list-style: none; }
.mn :where(img) { display: block; max-width: 100%; }
.mn :where(button) { font: inherit; color: inherit; margin: 0; }
.mn :where(a) { color: inherit; }
.mn [hidden] { display: none !important; }
.mn-ico { width: 1em; height: 1em; display: block; flex: none; overflow: visible; }
.mn-mark { display: block; width: 100%; height: 100%; overflow: visible; }
.mn-glyph-gap { display: inline-block; width: .28em; }
.mn-num { font-family: var(--f-latin); font-weight: 700; font-variant-numeric: tabular-nums; }

/* shell integration: ui/manager.js wraps each screen root in .screen and marks focus with .is-focus (older builds:
 * .is-focused — both are styled). Menus draw their own focus art and backgrounds. */
.ui-root .mn :is(.is-focus, .is-focused) { outline: none; animation: none; }
.screen.screen-title:has(> .mn) { background: none; }
.screen:has(> .mn) { padding: 0; display: block; }
.mn-settings .mn-scrim, .mn-pause .mn-scrim { background: transparent; }
.screen:not(.has-backdrop) > .mn-settings .mn-scrim { background: rgba(18, 15, 28, .55); }
.screen:not(.has-backdrop) > .mn-pause .mn-scrim { background: linear-gradient(90deg, rgba(18, 15, 28, .7), rgba(18, 15, 28, .3)); }

/* ------------------------------------------------------------------ motion */
@keyframes mn-pop { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@keyframes mn-pop-panel { from { opacity: 0; transform: translateY(30px) scale(.9) rotate(-1.5deg); } }
@keyframes mn-fade { from { opacity: 0; } }
@keyframes mn-slide-l { from { opacity: 0; transform: translateX(-46px); } }
@keyframes mn-slide-panel { from { transform: translateX(-104%); } }
@keyframes mn-drop {
  0% { opacity: 0; transform: translateY(-90px) scale(.5) rotate(-14deg); }
  60% { opacity: 1; transform: translateY(8px) scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes mn-bob { 50% { transform: translateY(-5px) rotate(var(--bob-rot, 0deg)); } }
@keyframes mn-wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(4deg) translateY(-4px); } }
@keyframes mn-blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes mn-twinkle { 50% { transform: scale(.65) rotate(30deg); opacity: .7; } }
@keyframes mn-spin { to { transform: rotate(360deg); } }
@keyframes mn-pulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes mn-drift { from { transform: translate(-10px, 3px) scale(1); } to { transform: translate(12px, -5px) scale(1.03); } }
@keyframes mn-cloud { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }
@keyframes mn-shake { 20%, 60% { transform: translateX(-7px) rotate(-1deg); } 40%, 80% { transform: translateX(7px) rotate(1deg); } }
@keyframes mn-stamp {
  0% { opacity: 0; transform: scale(3.2) rotate(-28deg); }
  55% { opacity: 1; transform: scale(.88) rotate(-4deg); }
  75% { transform: scale(1.06) rotate(-9deg); }
  100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}
@keyframes mn-thud { 0% { transform: none; } 25% { transform: translate(3px, 5px) scale(.985); } 60% { transform: translate(-2px, -2px); } 100% { transform: none; } }
@keyframes mn-confetti {
  0% { transform: translate3d(0, -12vh, 0) rotate(0); opacity: 1; }
  100% { transform: translate3d(var(--dx, 0), 112vh, 0) rotate(var(--rot, 540deg)); opacity: 1; }
}
@keyframes mn-out { to { opacity: 0; transform: scale(.97); } }
@keyframes mn-rise { from { opacity: 0; transform: translateY(40px); } }
@keyframes mn-fog-lift { 30% { opacity: .9; } to { opacity: 0; transform: scale(1.4) translateY(-36px); } }
@keyframes mn-shine { 0%, 70% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(260%) skewX(-20deg); } }

.mn.mn-in .mn-pop:is(.is-focus, .is-focused, *) { animation: mn-pop .5s var(--spring) both; animation-delay: calc(var(--d, 0) * 55ms + 80ms); }
.mn.mn-in .mn-slide:is(.is-focus, .is-focused, *) { animation: mn-slide-l .5s var(--spring) both; animation-delay: calc(var(--d, 0) * 50ms + 120ms); }
.mn.mn-in .mn-fadein:is(.is-focus, .is-focused, *) { animation: mn-fade .6s ease both; animation-delay: calc(var(--d, 0) * 60ms); }
.mn.mn-out { animation: mn-out .18s ease-in forwards; pointer-events: none; }

/* ------------------------------------------------------------------ primitives */
.mn-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  border: var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 600 17px/1.1 var(--f-latin), var(--f-body);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  outline: none;
  overflow: visible;
  touch-action: manipulation;
  transition: transform .18s var(--spring), box-shadow .18s var(--spring), background-color .15s, color .15s;
}
.mn-btn .mn-ico { font-size: 22px; }
.mn-btn:active { transform: translate(3px, 3px) !important; box-shadow: 1px 1px 0 var(--ink) !important; transition-duration: .05s; }
.mn-btn--primary { background: var(--orange); color: var(--white); text-shadow: 0 2px 0 rgba(30, 27, 46, .28); }
.mn-btn--yellow { background: var(--yellow); }
.mn-btn--ink { background: var(--ink); color: var(--white); box-shadow: 4px 4px 0 var(--orange); }
.mn-btn--danger { background: var(--pink); color: var(--white); text-shadow: 0 2px 0 rgba(30, 27, 46, .28); }
.mn-btn--lg { min-height: 58px; padding: 12px 30px; font-size: 21px; }
.mn-btn--sm { min-height: 40px; padding: 7px 16px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.mn-btn--icon { width: 50px; min-height: 50px; height: 50px; padding: 0; }
.mn-btn--icon .mn-ico { font-size: 24px; }
.mn-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.mn-btn__label { font-family: var(--f-display); font-weight: 400; font-size: 1.12em; line-height: 1; letter-spacing: .01em; }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-btn__label { font-family: var(--f-latin); font-weight: 600; font-size: 1em; }

/* focus = the site's "picked" language: lift + bigger pop + yellow */
.mn [data-focus] { outline: none; }
.mn-btn:is(:hover, :focus-visible, .is-focus, .is-focused) { transform: translate(-2px, -3px); box-shadow: 6px 7px 0 var(--ink); }
.mn-btn:not(.mn-btn--primary, .mn-btn--ink, .mn-btn--danger):is(:focus-visible, .is-focus, .is-focused) { background: var(--yellow); }
.mn-btn:is(.mn-btn--primary, .mn-btn--danger):is(:focus-visible, .is-focus, .is-focused) { box-shadow: 6px 7px 0 var(--ink), 0 0 0 4px var(--paper-2), 0 0 0 7px var(--ink); }
.mn-btn--ink:is(:focus-visible, .is-focus, .is-focused) { box-shadow: 6px 7px 0 var(--orange), 0 0 0 4px var(--yellow); }

.mn-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--pop-sm);
  font: 700 16px/1 var(--f-latin);
  white-space: nowrap;
}
.mn-chip .mn-ico { font-size: 24px; }
.mn-chip small { font-weight: 600; font-size: 13px; color: var(--ink-3); }

.mn-scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, rgba(30, 27, 46, .45), rgba(30, 27, 46, .78));
}
.mn-in .mn-scrim { animation: mn-fade .3s ease both; }

.mn-panel {
  position: relative;
  background: var(--paper-2);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--pop-lg);
}
.mn-in .mn-panel { animation: mn-pop-panel .46s var(--spring) both; }

/* screen header: back + title sticker + counters */
.mn-head {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(var(--gutter), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  pointer-events: none;
}
.mn-head > * { pointer-events: auto; }
.mn-head__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 18px 8px;
  background: var(--white);
  border: var(--line);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-1.5deg);
}
.mn-head__title h2 { font-family: var(--f-display); font-size: 30px; line-height: 1; white-space: nowrap; }
.mn-head__title span { font: 700 13px var(--f-latin); letter-spacing: .14em; color: var(--ink-3); white-space: nowrap; }   /* (squeezed, it wrapped one glyph a line) */
.mn-head__end { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* shards: 3 slots */
.mn-slots { display: inline-flex; gap: 3px; align-items: center; }
.mn-slots .mn-ico { font-size: 26px; }
.mn-slot.is-on .mn-ico { filter: drop-shadow(0 0 5px rgba(169, 179, 242, .95)); }

.mn-medal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 15px/1 var(--f-latin), var(--f-body);
}
.mn-medal-pill .mn-ico { font-size: 28px; }
.mn-medal-pill.is-none { color: var(--ink-3); }
.mn-medal-pill.is-none .mn-ico { opacity: .35; filter: grayscale(1); }

/* "新 / NEW" sticker */
.mn-new {
  position: absolute;
  z-index: 2;
  right: -8px;
  top: -10px;
  padding: 3px 8px 4px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
  color: var(--white);
  font: 700 12px/1 var(--f-latin), var(--f-body);
  letter-spacing: .04em;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(8deg);
  animation: mn-new 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes mn-new { 50% { transform: rotate(8deg) scale(1.12); } }
.mn-look__new { right: 6px; top: 34px; }

/* keycaps */
.mn-key {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 2.5px solid var(--ink);
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 3px 0 var(--ink);
  font: 600 14px/1 var(--f-latin);
  white-space: nowrap;
}
.mn-key--wide { min-width: 76px; }
.mn-key--pad { border-radius: 50%; min-width: 34px; padding: 0; color: var(--white); -webkit-text-stroke: .6px var(--ink); font-weight: 700; }

/* ------------------------------------------------------------------ TITLE */
.mn-title {
  display: grid;
  grid-template-columns: minmax(0, 600px) 1fr;
  grid-template-rows: auto 1fr auto;
  padding: max(var(--gutter), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}
.mn-title__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 27, 46, .22), rgba(30, 27, 46, 0) 48%), linear-gradient(0deg, rgba(30, 27, 46, .25), rgba(30, 27, 46, 0) 22%);
  pointer-events: none;
}
.mn-title__top { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 10px; position: relative; z-index: 2; }
/* Settings and Credits: two small buttons beside the language pill (ui/screens/title.js) */
.mn-title__corner { width: 46px; height: 46px; min-height: 46px; flex: none; }
.mn-title__corner .mn-ico { font-size: 22px; }
@media (max-width: 640px), (max-height: 520px) { .mn-title__corner { width: 42px; height: 42px; min-height: 42px; } .mn-title__top { gap: 8px; } }
.mn-title__left {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(14px, 3.4vh, 34px);
  min-height: 0;
}
.mn-title__brand { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: clamp(10px, 2.2vh, 20px); }
.mn-title .mn-menu { position: relative; z-index: 2; }
.mn-title__foot {
  grid-column: 1 / -1;
  grid-row: 3;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* logo lock-up */
.mn-logo {
  --size: clamp(52px, min(8.4vw, 14.5vh), 116px);
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "mark main" ". sub";
  align-items: center;
  column-gap: calc(var(--size) * .14);
  row-gap: calc(var(--size) * .06);
  width: max-content;
  max-width: 100%;
}
.mn-logo__mark {
  grid-area: mark;
  width: calc(var(--size) * .92);
  height: calc(var(--size) * .92);
  align-self: center;
  filter: drop-shadow(4px 4px 0 var(--ink));
  transform-origin: 50% 85%;
  animation: mn-wiggle 4.2s ease-in-out infinite;
}
.mn-logo__mark .mn-mark__eye { transform-box: fill-box; transform-origin: center; animation: mn-blink 4.6s infinite; }
.mn-logo__main {
  grid-area: main;
  display: flex;
  font-size: var(--size);
  line-height: .92;
  color: var(--white);
  -webkit-text-stroke: calc(var(--size) * .052) var(--ink);
  paint-order: stroke fill;
  white-space: nowrap;
}
.mn-logo__main .mn-glyph { display: inline-block; text-shadow: calc(var(--size) * .06) calc(var(--size) * .065) 0 var(--ink); animation: mn-bob 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.28s); }
.mn-logo__main .mn-glyph:nth-child(3n+2) { --bob-rot: -2deg; }
.mn-logo__main .mn-glyph:nth-child(3n) { --bob-rot: 2deg; }
.mn-in .mn-logo__main .mn-glyph { animation: mn-drop .7s var(--spring) both, mn-bob 3.4s ease-in-out .9s infinite; animation-delay: calc(var(--i) * 70ms + 120ms), calc(var(--i) * -.28s + 1.2s); }
.mn-logo__main .mn-glyph:nth-child(4n+1) { color: var(--white); }
.mn-logo__main .mn-glyph:nth-child(4n+2) { color: var(--yellow); }
.mn-logo__main .mn-glyph:nth-child(4n+3) { color: var(--white); }
.mn-logo__main .mn-glyph:nth-child(4n) { color: var(--tangerine); }
.mn-logo--zh .mn-logo__main { font-family: 'ZCOOL KuaiLe', var(--f-display); letter-spacing: .02em; }
.mn-logo--en .mn-logo__main { font-family: 'Fredoka', var(--f-display); font-weight: 700; letter-spacing: -.01em; }
.mn-logo__main--2 { font-size: calc(var(--size) * .62); -webkit-text-stroke-width: calc(var(--size) * .04); }
.mn-logo__main--2 .mn-glyph { text-shadow: calc(var(--size) * .045) calc(var(--size) * .05) 0 var(--ink); }
.mn-logo__sub {
  grid-area: sub;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mn-logo__tag {
  display: inline-block;
  padding: calc(var(--size) * .05) calc(var(--size) * .16) calc(var(--size) * .065);
  border: var(--line);
  border-radius: 14px;
  background: var(--ink);
  color: var(--yellow);
  box-shadow: 4px 4px 0 var(--orange);
  font-size: calc(var(--size) * .3);
  line-height: 1;
  transform: rotate(-3deg);
  white-space: nowrap;
}
.mn-logo--zh .mn-logo__tag { font: 700 calc(var(--size) * .27)/1 'Fredoka', sans-serif; letter-spacing: .16em; }
.mn-logo--en .mn-logo__tag { font-family: 'ZCOOL KuaiLe', sans-serif; letter-spacing: .12em; background: var(--visor); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.mn-in .mn-logo__tag { animation: mn-pop .55s var(--spring) .75s both; }
.mn-logo__stack { display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--size) * .08); }
/* 「明天见」 seal stamp (STORY chapter-card red #E0524A) */
.mn-seal {
  --seal: #E0524A;
  position: relative;
  display: inline-block;
  padding: calc(var(--size, 80px) * .06) calc(var(--size, 80px) * .12) calc(var(--size, 80px) * .07);
  border: var(--line);
  border-radius: 8px;
  background: var(--seal);
  color: var(--white);
  box-shadow: 3px 3px 0 var(--ink), inset 0 0 0 3px var(--seal), inset 0 0 0 5px rgba(255, 255, 255, .85);
  font-family: 'ZCOOL KuaiLe', var(--f-display);
  font-size: calc(var(--size, 80px) * .3);
  line-height: 1;
  letter-spacing: .08em;
  white-space: nowrap;
  transform: rotate(4deg);
}
.mn-logo--en .mn-seal { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: calc(var(--size) * .15); letter-spacing: .08em; text-transform: uppercase; transform: rotate(-2deg); margin-left: calc(var(--size) * .06); }
.mn-in .mn-seal { animation: mn-stamp .55s var(--spring) 1s both; }
.mn-in .mn-logo--en .mn-seal { animation-name: mn-stamp-en; }
@keyframes mn-stamp-en { 0% { opacity: 0; transform: scale(2.6) rotate(-14deg); } 60% { opacity: 1; transform: scale(.94) rotate(0); } 100% { transform: rotate(-2deg); } }

/* Lu You's epigraph: fades in after 20 s idle; a vertical calligraphy column in Chinese */
.mn-title__epigraph {
  position: absolute;
  z-index: 2;
  right: max(4vw, env(safe-area-inset-right));
  top: 16vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: 340px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.6s ease, transform 1.6s var(--out);
  pointer-events: none;
}
.mn-title.is-idle .mn-title__epigraph { opacity: 1; transform: none; }
/* Japanese: translated seal / epigraph text in the Japanese faces (ZCOOL KuaiLe has no kana; its kanji are Chinese forms) */
.mn[data-lang="ja"] :is(.mn-seal, .mn-title__epigraph p) { font-family: var(--f-display); }
.mn-title__epigraph p {
  font-family: 'ZCOOL KuaiLe', var(--f-display);
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
  text-shadow: 0 0 8px rgba(255, 253, 248, .95), 0 0 2px rgba(255, 253, 248, .95);
}
.mn-title__epigraph cite { font: normal 600 13px/1 var(--f-latin), var(--f-body); color: var(--ink-2); text-shadow: 0 0 6px rgba(255, 253, 248, .95); }
.mn-title:is([data-lang="zh"], [data-lang="ja"]) .mn-title__epigraph { flex-direction: row-reverse; align-items: flex-start; max-width: none; }
.mn-title:is([data-lang="zh"], [data-lang="ja"]) .mn-title__epigraph p { writing-mode: vertical-rl; height: 9.4em; font-size: 26px; letter-spacing: .12em; }
.mn-title:is([data-lang="zh"], [data-lang="ja"]) .mn-title__epigraph cite { writing-mode: vertical-rl; letter-spacing: .2em; margin-top: auto; }
.mn-title:is([data-lang="en"], [data-lang="es"]) .mn-title__epigraph { top: auto; bottom: 12vh; text-align: right; }
.mn-title:is([data-lang="en"], [data-lang="es"]) .mn-title__epigraph p { font-family: 'Fredoka', sans-serif; font-weight: 500; font-size: 19px; font-style: italic; }
.mn-logo__spark { position: absolute; color: var(--yellow); font-size: calc(var(--size) * .36); animation: mn-twinkle 2.4s ease-in-out infinite; }
.mn-logo__spark--1 { right: calc(var(--size) * -.34); top: calc(var(--size) * -.2); }
.mn-logo__spark--2 { right: calc(var(--size) * -.02); top: calc(var(--size) * .9); font-size: calc(var(--size) * .2); color: var(--teal); animation-delay: .8s; }
.mn-logo__spark--3 { left: calc(var(--size) * -.16); top: calc(var(--size) * -.14); font-size: calc(var(--size) * .18); color: var(--pink); animation-delay: 1.4s; }

.mn-title__sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 8px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  box-shadow: var(--pop-sm);
  font-family: var(--f-display);
  font-size: clamp(16px, 2.6vh, 21px);
  line-height: 1.1;
}
.mn-title__sub .mn-ico { font-size: 1.15em; color: var(--horn); }

/* title menu */
.mn-menu { display: flex; flex-direction: column; gap: clamp(8px, 1.4vh, 12px); width: min(340px, 100%); }
.mn-menu__row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.4vh, 12px); }
.mn-menu__item { justify-content: flex-start; padding: 6px 20px 6px 7px; min-height: clamp(46px, 7vh, 54px); gap: 12px; font-size: 19px; }
.mn-menu__row .mn-menu__item { font-size: 16px; padding-right: 12px; gap: 9px; }
.mn-menu__badge {
  display: grid;
  place-items: center;
  width: clamp(34px, 5.4vh, 40px);
  height: clamp(34px, 5.4vh, 40px);
  flex: none;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--c, var(--paper));
  color: var(--ink);
}
.mn-menu__badge .mn-ico { font-size: 22px; }
.mn-menu__row .mn-menu__badge { width: 32px; height: 32px; }
.mn-menu__row .mn-menu__badge .mn-ico { font-size: 19px; }
.mn-menu__text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.mn-menu__text small { font: 600 12.5px/1 var(--f-latin), var(--f-body); opacity: .82; letter-spacing: .02em; }
.mn-menu__item::after {
  content: '';
  position: absolute;
  right: 16px;
  width: 10px;
  height: 10px;
  border-top: 3.5px solid currentColor;
  border-right: 3.5px solid currentColor;
  border-radius: 2px;
  transform: translateX(-8px) rotate(45deg);
  opacity: 0;
  transition: transform .25s var(--spring), opacity .15s;
}
.mn-menu__item:is(:hover, :focus-visible, .is-focus, .is-focused)::after { opacity: 1; transform: translateX(0) rotate(45deg); }
.mn-menu__row .mn-menu__item::after { display: none; }
.mn-menu__item.mn-btn--primary { min-height: clamp(52px, 8.4vh, 62px); font-size: 22px; }
.mn-menu__item.mn-btn--primary .mn-menu__badge { background: var(--white); color: var(--orange); }
.mn-menu__item.mn-btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  width: 40%;
  animation: mn-shine 3.6s ease-in-out 1.6s infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.mn-menu__item.mn-btn--primary { overflow: hidden; }

/* language toggle (one focusable, toggles) */
.mn-lang {
  display: inline-flex;
  padding: 3px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--pop-sm);
  cursor: pointer;
  transition: transform .18s var(--spring), box-shadow .18s var(--spring);
}
.mn-lang span {
  min-width: 40px;
  padding: 6px 11px;
  border-radius: 999px;
  font: 700 14px/1.1 var(--f-latin), var(--f-body);
  text-align: center;
  color: var(--ink-2);
  transition: background .2s, color .2s;
}
.mn-lang span.is-on { background: var(--ink); color: var(--white); }
.mn-lang:is(:hover, :focus-visible, .is-focus, .is-focused) { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink), 0 0 0 4px var(--yellow); }

/* the way back to the website: a round home button (owner, 2026-11-30: "should be an icon not a text") */
.mn-sitelink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--pop-sm);
  font: 700 14px/1 var(--f-latin);
  text-decoration: none;
  transition: transform .18s var(--spring), box-shadow .18s var(--spring), background .15s;
}
.mn-sitelink .mn-ico { font-size: 22px; }
.mn-sitelink:is(:hover, :focus-visible, .is-focus, .is-focused) { background: var(--yellow); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.mn-disclaimer {
  text-wrap: balance;
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .82);
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ink-2);
}
.mn-title__bubble {
  position: absolute;
  z-index: 2;
  left: 60%;
  top: 22%;
  padding: 10px 16px;
  border: var(--line);
  border-radius: 20px 20px 20px 6px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--f-display);
  font-size: clamp(16px, 2.4vh, 20px);
  white-space: nowrap;
  animation: mn-bob 3.2s ease-in-out infinite;
  pointer-events: none;
}
.mn-title__bubble::after {
  content: '';
  position: absolute;
  left: var(--tail, 20px);
  bottom: -11px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border-right: var(--line);
  border-bottom: var(--line);
  transform: rotate(45deg) skew(10deg, 10deg);
}
.mn-in .mn-title__bubble { animation: mn-pop .5s var(--spring) 1.3s both, mn-bob 3.2s ease-in-out 1.8s infinite; }
.mn-title__bubble.is-occluded { visibility: hidden; }

/* compact title menu (phones): primary on top, secondary items as tiles */
@media (max-width: 640px), (max-height: 520px) {
  .mn-title .mn-menu { display: flex; flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 8px; }
  .mn-title .mn-menu > .mn-btn--primary { flex: 1 1 100%; }
  .mn-title .mn-menu__row { display: contents; }
  .mn-title .mn-menu__item:not(.mn-btn--primary) {
    flex: 1 1 calc(100% / var(--cols, 3) - 8px);
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-height: 66px;
    padding: 7px 4px 8px;
    border-radius: 18px;
    font-size: 14px;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .mn-title .mn-menu__item:not(.mn-btn--primary) .mn-menu__text { align-items: center; }
  .mn-title .mn-menu__item:not(.mn-btn--primary) .mn-menu__badge { width: 32px; height: 32px; }
  .mn-title .mn-menu__item:not(.mn-btn--primary) .mn-menu__badge .mn-ico { font-size: 18px; }
  .mn-title .mn-menu__item:not(.mn-btn--primary) .mn-btn__label { font-size: 15px; }
  .mn-title:is([data-lang="en"], [data-lang="es"]) .mn-menu__item:not(.mn-btn--primary) .mn-btn__label { font-size: 13.5px; }
  .mn-title .mn-menu__item::after { display: none; }
  .mn-title .mn-menu__item:not(.mn-btn--primary):is(:hover, :focus-visible, .is-focus, .is-focused) { transform: translateY(-3px); box-shadow: 4px 5px 0 var(--ink); }
  .mn-title .mn-menu__item:not(.mn-btn--primary) .mn-btn__label { white-space: normal; text-align: center; line-height: 1.05; }
  .mn-title .mn-menu__item:not(.mn-btn--primary) .mn-menu__text small { display: none; }   /* a tile has no room for a sub-line */
  .mn-logo--en .mn-seal { display: none; }
  .mn-title__sub { max-width: 100%; }
}
@media (max-width: 640px) {
  .mn-title .mn-menu[data-n="5"] { --cols: 2; }
  .mn-title .mn-menu[data-n="6"] { --cols: 3; }
}
@media (max-height: 520px) {
  .mn-title .mn-menu { --cols: 5; }
  .mn-title .mn-menu[data-n="5"] { --cols: 4; }
  .mn-title .mn-menu__item:not(.mn-btn--primary) { min-height: 58px; padding: 5px 3px 6px; gap: 3px; }
  .mn-title .mn-menu__item:not(.mn-btn--primary) .mn-menu__badge { width: 28px; height: 28px; }
  .mn-title .mn-menu__item:not(.mn-btn--primary) .mn-btn__label { font-size: 13.5px; }
  .mn-title:is([data-lang="en"], [data-lang="es"]) .mn-menu__item:not(.mn-btn--primary) .mn-btn__label { font-size: 12.5px; }
}
/* short landscape phones ≤ 640 px wide (568×320, 640×320 with browser bars): the portrait 3-column rule above would
   wrap the five tiles into a second row below the screen edge (Settings / Credits out of reach) — keep one row */
@media (max-height: 520px) and (orientation: landscape) {
  .mn-title .mn-menu[data-n="6"] { --cols: 5; }
}
/* a title menu with one more line (a series' own item: eight items, seven tiles): portrait 4 + 3, landscape one row */
@media (max-width: 640px) { .mn-title .mn-menu[data-n="8"] { --cols: 4; } }
@media (max-height: 520px) { .mn-title .mn-menu[data-n="8"] { --cols: 7; } }

/* fallback painted backdrop (when the 3D diorama isn't available) */
.mn-backdrop { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(180deg, #FFD9A6 0%, #FFE9C7 34%, #BFE3F2 70%, #9FCB7E 70.2%, #7FBB5C 100%); }
.mn-backdrop svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 62%; }
.mn-backdrop__cloud { position: absolute; left: 0; width: 180px; height: 64px; animation: mn-cloud 70s linear infinite; }
.mn-backdrop__cloud:nth-child(2) { top: 12%; animation-duration: 90s; animation-delay: -40s; transform-origin: left; }
.mn-backdrop__cloud:nth-child(3) { top: 26%; animation-duration: 110s; animation-delay: -75s; width: 120px; }

/* ------------------------------------------------------------------ WORLD MAP */
.mn-levelselect { overflow: hidden; background: #A9C79A; }
.mn-map__view { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.mn-map__view.is-dragging { cursor: grabbing; }
.mn-map__world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
  transition: transform .75s var(--out);
}
.mn-map__view:is(.is-dragging, .is-zooming) .mn-map__world, .mn-map__world.no-anim { transition: none; }
.mn-map__art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mn-in .mn-map__world { animation: mn-fade .6s ease both; }
.mn-fog { position: absolute; pointer-events: none; animation: mn-drift 8s ease-in-out infinite alternate; }
.mn-fog svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mn-fog.is-lifting { animation: mn-fog-lift 1.4s ease-in forwards; }
.mn-fog:nth-of-type(2n) { animation-duration: 10s; animation-delay: -3s; }
.mn-map__cloud { position: absolute; z-index: 1; left: 0; width: 150px; height: 56px; pointer-events: none; animation: mn-cloud 64s linear infinite; opacity: .95; }
.mn-map__cloud:nth-of-type(2) { animation-duration: 84s; animation-delay: -50s; width: 110px; }
.mn-map__cloud:nth-of-type(3) { animation-duration: 96s; animation-delay: -20s; width: 180px; }

.mn-node {
  --c: var(--green);
  --s: clamp(46px, 7.6vh, 62px);
  position: absolute;
  z-index: 2;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  padding: 0;
  border: var(--line);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 5px 0 var(--ink);
  cursor: pointer;
  transition: transform .25s var(--spring), box-shadow .25s var(--spring);
  touch-action: manipulation;
}
.mn-node::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 2.5px dashed rgba(30, 27, 46, .35);
}
.mn-node__num {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  font: 700 calc(var(--s) * .44)/1 var(--f-latin);
  color: var(--white);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}
.mn-node__lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--s) * .5); }
.mn-node__medal { position: absolute; right: -9px; top: -9px; font-size: calc(var(--s) * .46); filter: drop-shadow(2px 2px 0 var(--ink)); }
.mn-node__label {
  position: absolute;
  left: 50%;
  top: calc(100% + 9px);
  transform: translateX(-50%) rotate(-1.5deg);
  padding: 3px 11px 4px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: var(--f-display);
  font-size: 15px;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform .25s var(--spring), background .15s;
}
.mn-node.is-locked { --c: #CFC7E4; }
.mn-node.is-locked .mn-node__label { color: var(--ink-3); background: #EEEAF6; }
.mn-node.is-done::after {
  content: '';
  position: absolute;
  left: -7px;
  bottom: -5px;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.5l4 4L18.5 7.5' fill='none' stroke='%231E1B2E' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.mn-node.is-next:not(.is-sel) .mn-node__num::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid var(--yellow);
  animation: mn-pulse 1.6s ease-out infinite;
}
.mn-node:is(:hover, :focus-visible, .is-focus, .is-focused, .is-sel) { transform: translateY(-4px) scale(1.1); box-shadow: 0 8px 0 var(--ink), 0 0 0 5px var(--yellow); z-index: 3; }
.mn-node:is(:focus-visible, .is-focus, .is-focused, .is-sel) .mn-node__label { background: var(--yellow); transform: translateX(-50%) rotate(1deg) scale(1.06); }
.mn .mn-node.is-denied:is(.is-focus, .is-focused, *) { animation: mn-shake .4s ease; }
.mn-node--home { --s: 40px; background: var(--yellow); cursor: default; }
/* a series' hub: as big as a level, off the road — its name in bold on ink so it reads as the place to come back to */
.mn-node--hub { --c: #FFF6E6; }
.mn-node--hub .mn-node__num .mn-ico { font-size: calc(var(--s) * .52); }
.mn-node--hub .mn-node__label { font-weight: 700; background: var(--ink); color: var(--white); letter-spacing: .01em; }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-node--hub .mn-node__label { font-family: var(--f-latin); font-weight: 700; }
.mn-node--hub:is(:hover, :focus-visible, .is-focus, .is-focused, .is-sel) .mn-node__label { background: var(--yellow); color: var(--ink); }
.mn-node--home .mn-node__num .mn-ico { font-size: 22px; }
/* the hub's pin is out of the picture: a pointer on the nearest edge (levelselect.js placeHubTip) */
.mn-hubtip { position: absolute; z-index: 4; width: 46px; height: 46px; margin: -23px 0 0 -23px; padding: 0; border: var(--line); border-radius: 50%;
  background: #FFF6E6; color: var(--ink); box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; cursor: pointer; font-size: 22px; }
.mn-hubtip[hidden] { display: none; }
.mn-hubtip::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid var(--yellow); animation: mn-pulse 1.6s ease-out infinite; pointer-events: none; }
.mn-hubtip:is(:hover, :focus-visible) { background: var(--yellow); }
.mn-hubtip__arrow { position: absolute; inset: -10px; transform: rotate(var(--a, 0rad)); pointer-events: none; }
.mn-hubtip__arrow::after { content: ''; position: absolute; right: -8px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-left: 11px solid var(--ink); }

.mn-marker { position: absolute; left: 0; top: 0; z-index: 4; width: 0; height: 0; pointer-events: none; will-change: transform; }
.mn-marker__body {
  position: absolute;
  left: -27px;
  top: calc(var(--node-s, 62px) * -.5 - 64px);
  width: 54px;
  height: 54px;
  filter: drop-shadow(3px 4px 0 var(--ink));
  animation: mn-bob 1.1s ease-in-out infinite;
}
.mn-marker__body::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -12px;
  border: 8px solid transparent;
  border-top-color: var(--ink);
  transform: translateX(-50%);
}
.mn-marker.is-walking .mn-marker__body { animation: mn-bob .28s ease-in-out infinite; }


/* level card */
.mn-lcard {
  --c: var(--green);
  --cd: #5E9B3E;
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(820px, calc(100% - 2 * var(--gutter)));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 10px 18px 10px 16px;
  background: var(--paper-2);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--pop-lg);
  overflow: hidden;
}
.mn-in .mn-lcard { animation: mn-rise .55s var(--spring) .2s both; }
.mn-lcard::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: var(--c);
  border-right: var(--line);
}
.mn-lcard__emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin-left: 6px;
  border: var(--line);
  border-radius: 22px;
  background: var(--c);
  box-shadow: var(--pop-sm);
  transform: rotate(-4deg);
}
.mn-lcard__emblem .mn-ico { font-size: 50px; }
.mn-lcard__emblem b {
  position: absolute;
  right: -10px;
  bottom: -10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  font: 700 17px/1 var(--f-latin);
  transform: rotate(4deg);
}
.mn-lcard__text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.mn-lcard__kicker { font: 700 12.5px/1.2 var(--f-latin), var(--f-body); letter-spacing: .08em; color: var(--cd); text-transform: uppercase; }
.mn-lcard__name { font-family: var(--f-display); font-size: 31px; line-height: 1.05; }
.mn-lcard__tag { font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.mn-lcard__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 4px; }
.mn-lcard__stat { display: inline-flex; align-items: center; gap: 7px; font: 600 14.5px/1 var(--f-latin), var(--f-body); }
.mn-lcard__stat .mn-ico { font-size: 24px; }
.mn-lcard__stat b { font-size: 17px; font-weight: 700; font-family: var(--f-latin); font-variant-numeric: tabular-nums; }
.mn-lcard__stat em { font-style: normal; color: var(--ink-3); font-weight: 600; font-size: 13px; }
.mn-lcard__play { min-width: 168px; }
.mn-lcard.is-locked { --c: #CFC7E4; --cd: var(--ink-3); }
.mn-lcard.is-locked .mn-lcard__emblem .mn-ico:first-child { opacity: .35; filter: grayscale(1); }
.mn-lcard__lockmsg { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); }
.mn-lcard__lockmsg .mn-ico { font-size: 22px; }
.mn-lcard.is-swap .mn-lcard__text, .mn-lcard.is-swap .mn-lcard__emblem { animation: mn-pop .38s var(--spring) both; }

/* ------------------------------------------------------------------ WARDROBE */
.mn-wardrobe {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(30, 27, 46, .1) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  overflow: hidden;
}
.mn-wardrobe__body {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  padding: calc(max(var(--gutter), env(safe-area-inset-top)) + 70px) max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-bottom)) max(calc(var(--gutter) + 12px), env(safe-area-inset-left));
}
.mn-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; min-height: 0; height: 100%; justify-content: center; }
.mn-stage__card {
  --c: var(--visor);
  position: relative;
  height: min(100% - 76px, 560px);
  aspect-ratio: 576 / 1000;
  max-width: 100%;
  border: var(--line);
  border-radius: 30px;
  background: var(--c);
  box-shadow: var(--pop-lg);
  overflow: hidden;
  transform: rotate(-2deg);
  transition: background .35s;
}
.mn-stage__back {
  position: absolute;
  height: min(100% - 76px, 560px);
  aspect-ratio: 576 / 1000;
  top: 50%;
  border: var(--line);
  border-radius: 30px;
  background: var(--c2, var(--pink));
  box-shadow: var(--pop);
  transform: translate(18%, calc(-50% - 30px)) rotate(7deg) scale(.93);
  transition: background .35s;
}
.mn-stage__card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; transition: transform .45s var(--spring), opacity .2s, filter .3s; }
.mn-stage__card img.is-flat { object-fit: contain; padding: 14% 10% 8%; }
.mn-stage__card.is-swapping img { opacity: 0; transform: scale(.92) translateY(14px); }
.mn-stage__card.is-locked img, .mn-look.is-locked img { filter: blur(7px) saturate(.25) brightness(1.08); transform: scale(1.12); }
/* locked looks are "hidden in the fog of doubt": lavender mist + swirls over a blurred card */
.mn-stage__card.is-locked::after, .mn-look.is-locked::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 160'%3E%3Cg fill='none' stroke='%238E86B0' stroke-width='3.6' stroke-linecap='round' opacity='.7'%3E%3Cpath d='M20 38a11 11 0 1 1 14 8.5 6.5 6.5 0 1 1-5.6-7.6'/%3E%3Cpath d='M86 116a13 13 0 1 1 16.5 10 7.6 7.6 0 1 1-6.6-8.8'/%3E%3Cpath d='M70 26q10-6 20 0t20 0' opacity='.7'/%3E%3Cpath d='M10 132q10-6 20 0t20 0' opacity='.7'/%3E%3C/g%3E%3C/svg%3E") center / var(--swirl, 100% 100%),
    linear-gradient(180deg, rgba(232, 227, 246, .74), rgba(205, 198, 230, .8));
  pointer-events: none;
}
.mn-stage__card.is-locked::after { --swirl: 150px 200px; }
.mn-stage__lock, .mn-look__lock, .mn-look__no, .mn-stage__tag, .mn-stage__worn, .mn-stage__line { z-index: 1; }
.mn-stage__lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.mn-stage__lock .mn-ico { font-size: 64px; filter: drop-shadow(3px 3px 0 var(--ink)); }
.mn-stage__lock b { padding: 5px 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--white); font: 700 16px/1.1 var(--f-latin), var(--f-body); box-shadow: var(--pop-sm); }
.mn-stage__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px 6px 6px;
  border: var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  max-width: calc(100% - 28px);
}
.mn-stage__tag em { font: normal 700 12px/1 var(--f-latin); padding: 4px 8px; border-radius: 999px; background: var(--ink); color: var(--white); }
/* a long name wraps to a balanced second line ('Clean-up / Captain') instead of an ellipsis; one line wherever it fits.
   CJK names wrap only at a space (「23 号 / 球员」, never 「清 / 洁」) */
.mn-stage__tag b { font-family: var(--f-display); font-weight: 400; font-size: 20px; line-height: 1.05; text-wrap: balance; word-break: keep-all; overflow-wrap: break-word; }
.mn-stage__card { container: stage-card / inline-size; } /* a very narrow card restacks its tag (short landscape, below) */
.mn:is([data-lang="en"], [data-lang="es"]) .mn-stage__tag b { font-weight: 600; }
.mn-stage__worn {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px 5px 6px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--green);
  font: 700 13px/1 var(--f-latin), var(--f-body);
  box-shadow: 2px 2px 0 var(--ink);
}
.mn-stage__worn .mn-ico { font-size: 16px; }
.mn-stage__cta { min-width: 200px; }
.mn-stage__cta.is-worn { background: var(--green); opacity: 1; cursor: default; }
.mn-stage__line { display: none; }
/* live 3D preview (wardrobe.js Turntable): the canvas fills the stage card once its first frame is up; the site's
   render then becomes the card's back, peeking out behind it (grid cards keep it too). Without WebGL nothing changes. */
.mn-stage__view { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mn-stage__gl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .35s ease; pointer-events: auto; touch-action: pan-y; cursor: grab; }
.mn-stage__gl:active { cursor: grabbing; }
.mn-stage.has-3d .mn-stage__gl { opacity: 1; }
.mn-stage.has-3d .mn-stage__card { background: radial-gradient(90% 55% at 50% 44%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%), var(--c); }
.mn-stage.has-3d .mn-stage__card > img { opacity: 0; }
.mn-stage__back img { display: none; }
.mn-stage.has-3d .mn-stage__back { overflow: hidden; background: var(--c3, var(--c2)); transform: translate(24%, calc(-50% - 30px)) rotate(7deg) scale(.93); }
.mn-stage.has-3d .mn-stage__back img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; transform: translateX(30%); }
.mn-stage.has-3d .mn-stage__back img.is-flat { object-fit: contain; padding: 14% 10% 8%; }
.mn-stage.has-3d .mn-stage__card.is-locked::after { opacity: .5; }
.mn-stage.has-3d .mn-stage__back.is-locked img { filter: blur(7px) saturate(.25) brightness(1.08); transform: translateX(30%) scale(1.12); }
.mn-stage.has-3d .mn-stage__back.is-locked::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(232, 227, 246, .8), rgba(205, 198, 230, .86)); }
.mn-stage.has-3d .mn-stage__lock { place-content: end center; padding: 0 12px 70px; gap: 6px; pointer-events: none; }
.mn-stage.has-3d .mn-stage__lock .mn-ico { font-size: 44px; }

.mn-closet { display: flex; flex-direction: column; gap: 16px; min-height: 0; height: 100%; justify-content: center; }
.mn-closet__say {
  position: relative;
  align-self: flex-start;
  max-width: min(560px, 100%);
  min-height: 52px;
  padding: 12px 18px;
  border: var(--line);
  border-radius: 20px 20px 20px 6px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--f-display);
  font-size: 19px;
  line-height: 1.3;
}
.mn:is([data-lang="en"], [data-lang="es"]) .mn-closet__say { font-weight: 500; font-size: 17px; }
.mn-closet__say::before {
  content: '';
  position: absolute;
  left: -13px;
  bottom: 12px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-left: var(--line);
  border-bottom: var(--line);
  transform: rotate(45deg) skew(8deg, 8deg);
}
.mn-closet__say.is-swap { animation: mn-pop .35s var(--spring) both; }
.mn-closet__foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font: 600 14px/1.2 var(--f-latin), var(--f-body); color: var(--ink-2); }
.mn-closet__next { display: inline-flex; align-items: center; gap: 7px; }
.mn-closet__next .mn-ico { font-size: 20px; }
.mn-closet__bar { flex: 0 1 220px; min-width: 120px; height: 16px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--white); overflow: hidden; }
.mn-closet__bar i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--visor) 0 8px, #C2C9F6 8px 16px); border-right: 2.5px solid var(--ink); }
/* the rack: once the build holds more looks than fit, the grid scrolls inside its own box — never under the header,
   never over the say or the foot. The box bleeds past the tiles (--bleed above, --bleed-b below, --bleed-x beside) so
   tilts, shadows and the focus ring are not cut. wardrobe.js marks the rack: data-fits = every look fits (then the grid
   is no scroll box at all and looks as it always did), data-more = where more looks hang ('up', 'down', both). */
.mn-closet__say, .mn-closet__foot { flex: none; }
.mn-closet__rack {
  --bleed: 16px;
  --bleed-b: 10px;
  --bleed-x: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
  margin: calc(-1 * var(--bleed)) calc(-1 * var(--bleed-x)) calc(-1 * var(--bleed-b));
}
.mn-closet__grid {
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: max-content; /* a row stays as tall as its tiles when the box is shorter than the rack */
  align-content: start;
  gap: clamp(10px, 1.4vw, 18px);
  padding: var(--bleed) var(--bleed-x) var(--bleed-b);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mn-closet__grid::-webkit-scrollbar { display: none; }
.mn-closet__rack[data-fits] .mn-closet__grid { overflow: visible; }
.mn-closet__rack[data-more] .mn-closet__grid {
  --fu: 0px;
  --fd: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fu), #000 calc(100% - var(--fd)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fu), #000 calc(100% - var(--fd)), transparent 100%);
}
.mn-closet__rack[data-more~="up"] .mn-closet__grid { --fu: 10px; }
.mn-closet__rack[data-more~="down"] .mn-closet__grid { --fd: 10px; }
.mn-closet__more {
  display: none;
  position: absolute;
  z-index: 3;
  left: calc(50% - 16px);
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--white) center / 14px 14px no-repeat;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform .15s var(--spring), box-shadow .15s;
}
.mn-closet__more::after { content: ''; position: absolute; inset: -7px; } /* a finger-sized target */
.mn-closet__more:hover { background-color: var(--yellow); }
.mn-closet__more:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.mn-closet__rack[data-more~="up"] .mn-closet__more--up, .mn-closet__rack[data-more~="down"] .mn-closet__more--down { display: block; animation: mn-fade .2s both; }
.mn-closet__more--up { top: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 9.2 7 4.8l4.5 4.4' fill='none' stroke='%231E1B2E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.mn-closet__more--down { bottom: 3px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 4.8 7 9.2l4.5-4.4' fill='none' stroke='%231E1B2E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.mn-look {
  --c: var(--visor);
  position: relative;
  aspect-ratio: 576 / 740;
  min-height: 0;
  padding: 0;
  border: var(--line);
  border-radius: 20px;
  background: var(--c);
  box-shadow: var(--pop);
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s var(--spring), box-shadow .25s;
}
.mn-look:nth-child(3n+1) { rotate: -1.2deg; }
.mn-look:nth-child(3n+2) { rotate: .8deg; }
.mn-look:nth-child(3n) { rotate: -.4deg; }
.mn-look img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; transition: transform .4s var(--spring); pointer-events: none; }
.mn-look img.is-flat { object-fit: contain; padding: 12% 8% 4%; }
.mn-look__no { position: absolute; left: 7px; top: 7px; padding: 3px 7px; border-radius: 999px; background: var(--ink); color: var(--white); font: 700 11px/1 var(--f-latin); }
.mn-look__lock { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 5px; }
.mn-look__lock .mn-ico { font-size: 30px; filter: drop-shadow(2px 2px 0 var(--ink)); }
.mn-look__lock b { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px 3px 5px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font: 700 12.5px/1 var(--f-latin); }
.mn-look__lock b .mn-ico { font-size: 15px; filter: none; }
.mn-look__worn { position: absolute; right: 6px; top: 6px; display: grid; place-items: center; width: 26px; height: 26px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--green); }
.mn-look__worn .mn-ico { font-size: 16px; }
.mn-look:is(:hover, :focus-visible, .is-focus, .is-focused) { transform: translateY(-6px) rotate(1.5deg); box-shadow: 8px 9px 0 var(--ink), 0 0 0 5px var(--yellow); z-index: 2; }
.mn-look:is(:hover, :focus-visible, .is-focus, .is-focused) img { transform: scale(1.07); }
.mn .mn-look.is-denied:is(.is-focus, .is-focused, *) { animation: mn-shake .4s ease; }

/* ------------------------------------------------------------------ SETTINGS */
.mn-settings { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: max(var(--gutter), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); }
.mn-settings .mn-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1060px, 100%);
  max-height: 100%;
  overflow: hidden;
}
.mn-panel__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px 24px; border-bottom: var(--line); background: var(--white); }
.mn-panel__head h2 { font-family: var(--f-display); font-size: 32px; line-height: 1; }
.mn-panel__head span { font: 700 13px var(--f-latin); letter-spacing: .14em; color: var(--ink-3); }
.mn-panel__head .mn-btn { margin-left: auto; }
.mn-settings__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 20px 24px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.mn-settings__col { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.mn-settings__label { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; font: 700 13px/1 var(--f-latin), var(--f-body); letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }
.mn-settings__label:not(:first-child) { margin-top: 8px; }
.mn-settings__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.mn-settings__grid .mn-toggle__txt { display: none; }
.mn-settings__grid .mn-row { gap: 8px; padding-right: 10px; }
.mn-settings__grid .mn-row__label { gap: 8px; font-size: 15px; }
.mn-settings__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: var(--line); background: var(--paper); }
.mn-settings__foot p { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

.mn-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 7px 12px 7px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--pop-sm);
  cursor: pointer;
  transition: transform .18s var(--spring), box-shadow .18s var(--spring), background .15s;
  touch-action: manipulation;
}
.mn-row:is(:focus-visible, .is-focus, .is-focused) { background: #FFF4CF; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink), 0 0 0 4px var(--yellow); }
.mn-row__label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-weight: 700; font-size: 16px; }
.mn-row__label .mn-ico { font-size: 26px; }
.mn-row__value { font: 700 15px/1 var(--f-latin); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
/* Play offline (settings): its state can run long (es / ja) — it goes under the name rather than squeezing it */
.mn-row[data-key="offline"] { flex-wrap: wrap; row-gap: 4px; }
.mn-row[data-key="offline"] .mn-row__label { flex: 1 0 auto; max-width: 100%; }
.mn-row[data-key="offline"] .mn-toggle__txt { margin-left: auto; min-width: 0; text-align: right; line-height: 1.25; }

.mn-slider { position: relative; width: clamp(130px, 16vw, 210px); height: 34px; flex: none; touch-action: none; cursor: pointer; }
.mn-slider__track { position: absolute; left: 0; right: 0; top: 50%; height: 16px; margin-top: -8px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.mn-slider__fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); background: repeating-linear-gradient(-45deg, var(--orange) 0 7px, var(--tangerine) 7px 14px); }
.mn-slider__knob {
  position: absolute;
  top: 50%;
  left: calc(var(--v) * (100% - 30px));
  width: 30px;
  height: 30px;
  margin-top: -15px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .15s var(--spring);
}
.mn-row:is(:focus-visible, .is-focus, .is-focused) .mn-slider__knob { transform: scale(1.12); background: var(--yellow); }

.mn-seg { display: inline-flex; flex: none; padding: 3px; gap: 2px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper); }
.mn-seg button {
  min-width: 52px;
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: 700 14px/1.1 var(--f-latin), var(--f-body);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s var(--spring);
}
.mn-seg button.is-on { background: var(--ink); color: var(--white); }
.mn-seg button:not(.is-on):hover { color: var(--ink); background: rgba(30, 27, 46, .08); }

.mn-toggle { position: relative; flex: none; width: 64px; height: 34px; border: 2.5px solid var(--ink); border-radius: 999px; background: #E2DDEA; transition: background .2s; }
.mn-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 25px;
  height: 25px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  transition: transform .25s var(--spring);
}
.mn-toggle.is-on { background: var(--green); }
.mn-toggle.is-on::after { transform: translateX(30px); }
.mn-toggle__txt { font: 700 14px/1 var(--f-latin), var(--f-body); min-width: 26px; text-align: right; color: var(--ink-2); }

.mn-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.mn-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 9px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font: 700 14.5px/1 var(--f-latin), var(--f-body);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .18s var(--spring), box-shadow .18s var(--spring), background .15s;
}
.mn-tab .mn-ico { font-size: 22px; }
.mn-tab.is-on { background: var(--ink); color: var(--white); box-shadow: 2px 2px 0 var(--orange); }
.mn-tab:is(:hover, :focus-visible, .is-focus, .is-focused) { transform: translate(-1px, -2px); box-shadow: 4px 4px 0 var(--ink), 0 0 0 4px var(--yellow); }
.mn-controls { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 2.5px solid var(--ink); border-radius: 20px; background: var(--paper); }
.mn-controls__list { display: grid; gap: 9px; }
.mn-controls__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.mn-controls__item > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.mn-controls__item small { font-weight: 600; font-size: 12.5px; color: var(--ink-3); }
.mn-controls__keys { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px; }
.mn-controls__keys i { font-style: normal; font-size: 12px; color: var(--ink-3); font-weight: 600; margin: 0 2px; }
.mn-controls__note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--white); border: 2px dashed var(--ink-3); font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.mn-controls__note .mn-ico { font-size: 20px; }
.mn-controls__art { display: block; width: 100%; max-width: 360px; margin: 0 auto; height: auto; }

/* ------------------------------------------------------------------ PAUSE */
.mn-pause .mn-scrim { background: linear-gradient(90deg, rgba(30, 27, 46, .72) 0%, rgba(30, 27, 46, .35) 60%, rgba(30, 27, 46, .2)); }
.mn-pause__panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  gap: clamp(9px, 1.8vh, 16px);
  padding: max(24px, env(safe-area-inset-top)) 28px max(24px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
  background: var(--paper-2);
  background-image: radial-gradient(rgba(30, 27, 46, .07) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  border-right: var(--line);
  box-shadow: 8px 0 0 var(--ink);
  overflow-y: auto;
  scrollbar-width: none;
}
.mn-in .mn-pause__panel { animation: mn-slide-panel .45s var(--out) both; }
.mn-pause__title { display: flex; align-items: baseline; gap: 12px; }
.mn-pause__title h2 { font-family: var(--f-display); font-size: clamp(36px, 7vh, 56px); line-height: 1; color: var(--white); -webkit-text-stroke: 2.6px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); letter-spacing: .04em; }
.mn-pause__title span { font: 700 14px var(--f-latin); letter-spacing: .18em; color: var(--ink-3); }
/* the title stays on one line in every language (a wrapped title pushed a two-line quote's attribution off the
   panel): a long one is set smaller, and the small second-language label is what gives way if a row is still short */
.mn-pause__title h2 { white-space: nowrap; flex: none; }
.mn-pause__title span { min-width: 0; white-space: nowrap; overflow: hidden; }
.mn-pause__title .mn-pause__fs { flex: none; }
.mn[data-lang="ja"] .mn-pause__title h2 { font-size: clamp(30px, 5.6vh, 42px); letter-spacing: .02em; }
.mn-pause__level { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 2.5px solid var(--ink); border-radius: 18px; background: var(--white); box-shadow: var(--pop-sm); }
.mn-pause__emblem { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--c, var(--green)); transform: rotate(-4deg); }
.mn-pause__emblem .mn-ico { font-size: 28px; }
.mn-pause__lvtext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mn-pause__lvtext small { font: 700 12px/1 var(--f-latin), var(--f-body); letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; }
.mn-pause__lvtext b { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-pause__lvtext b { font-weight: 600; }
.mn-pause__stats { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 0 4px; }
.mn-pause__stat { display: inline-flex; align-items: center; gap: 6px; font: 700 17px/1 var(--f-latin); font-variant-numeric: tabular-nums; }
.mn-pause__stat .mn-ico { font-size: 24px; }
.mn-pause__menu { display: flex; flex-direction: column; gap: clamp(6px, 1.1vh, 10px); }
.mn-pause__menu .mn-btn { justify-content: flex-start; padding: 4px 18px 4px 8px; min-height: clamp(40px, 6vh, 48px); }
.mn-pause__menu .mn-btn .mn-menu__badge { width: 32px; height: 32px; }
.mn-pause__menu .mn-btn .mn-menu__badge .mn-ico { font-size: 19px; }
.mn-pause__quote { margin: auto 0 0; padding: 12px 16px; border-left: 4px solid #E0524A; background: rgba(255, 255, 255, .72); border-radius: 0 14px 14px 0; }
.mn-pause__quote blockquote { margin: 0; font-family: var(--f-display); font-size: 17px; line-height: 1.4; text-wrap: pretty; }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-pause__quote blockquote { font-weight: 500; font-size: 15.5px; }
.mn-pause__quote figcaption { margin-top: 4px; font: 600 12.5px/1.2 var(--f-latin), var(--f-body); color: var(--ink-3); text-align: right; }
/* the panel fits itself (ui/screens/pause.js fit): 1 = packed tighter, 2 = and the quote steps out */
.mn-pause[data-fit] .mn-pause__panel { gap: 8px; padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.mn-pause[data-fit] .mn-pause__title h2 { font-size: clamp(30px, 5.6vh, 42px); }
.mn-pause[data-fit] .mn-pause__level { padding: 6px 12px 6px 8px; }
.mn-pause[data-fit] .mn-pause__emblem { width: 40px; height: 40px; }
.mn-pause[data-fit] .mn-pause__emblem .mn-ico { font-size: 24px; }
.mn-pause[data-fit] .mn-pause__menu { gap: 6px; }
.mn-pause[data-fit] .mn-pause__menu .mn-btn { min-height: 40px; }
.mn-pause[data-fit] .mn-pause__quote { padding: 8px 14px; }
.mn-pause[data-fit="2"] .mn-pause__quote { display: none; }
.mn-dash { font-family: 'Tomoro CJK Punct', var(--f-body); font-weight: 400; } /* one unbroken 破折号, not Fredoka's two short dashes */

/* ------------------------------------------------------------------ RESULTS */
/* one full-screen scroller holds the column (auto margins centre it and collapse safely when it is taller than the
 * screen); the action row is sticky at the scroller's bottom, so Next / Replay / Map can never leave the screen */
.mn-results { overflow: hidden; }
.mn-results__scroll {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: max(var(--gutter), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}
.mn-results__scroll::-webkit-scrollbar { display: none; }
.mn-results .mn-scrim { background: radial-gradient(90% 80% at 50% 45%, rgba(30, 27, 46, .35), rgba(30, 27, 46, .8)); }
.mn-results__rays {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: repeating-conic-gradient(from 0deg, rgba(245, 205, 81, .16) 0 9deg, transparent 9deg 18deg);
  mask-image: radial-gradient(circle, #000 0, transparent 55%);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 55%);
  animation: mn-spin 60s linear infinite;
  pointer-events: none;
}
.mn-results__col { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2.4vh, 22px); width: min(820px, 100%); margin: auto; }
.mn-ribbon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 56px 14px;
  background: var(--orange);
  border: var(--line);
  border-radius: 16px;
  box-shadow: var(--pop);
  transform: rotate(-2deg);
}
.mn-ribbon::before, .mn-ribbon::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 18px;
  width: 58px;
  height: 100%;
  background: #C8612A;
  border: var(--line);
}
.mn-ribbon::before { left: -40px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 26% 50%); }
.mn-ribbon::after { right: -40px; clip-path: polygon(0 0, 100% 0, 74% 50%, 100% 100%, 0 100%); }
.mn-ribbon h2 {
  display: flex;
  font-family: var(--f-display);
  font-size: clamp(36px, 8vh, 66px);
  line-height: 1;
  color: var(--white);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
  white-space: nowrap;
}
.mn:is([data-lang="en"], [data-lang="es"]) .mn-ribbon h2 { font-weight: 700; }
.mn-ribbon h2 .mn-glyph { display: inline-block; }
.mn-in .mn-ribbon { animation: mn-drop .7s var(--spring) both; }
.mn-in .mn-ribbon h2 .mn-glyph { animation: mn-drop .6s var(--spring) both; animation-delay: calc(var(--i) * 55ms + 250ms); }
.mn-ribbon small { margin-top: 4px; font: 700 13px/1 var(--f-latin), var(--f-body); letter-spacing: .2em; color: var(--ink); opacity: .75; }
.mn-results__level { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: clamp(18px, 3vh, 24px); color: var(--white); text-shadow: 0 2px 0 var(--ink); }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-results__level { font-weight: 600; }
.mn-results__level .mn-ico { font-size: 1.3em; filter: drop-shadow(2px 2px 0 var(--ink)); }

.mn-results__card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
  width: 100%;
  overflow: hidden;
}
.mn-results__stats { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: clamp(10px, 2vh, 20px) 24px; }
.mn-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: clamp(6px, 1.3vh, 11px) 4px;
  border-bottom: 2.5px dashed rgba(30, 27, 46, .18);
}
.mn-stat:last-child { border-bottom: 0; }
.mn-stat > .mn-ico { font-size: 32px; }
.mn-stat__label { font-weight: 700; font-size: 17px; }
.mn-stat__label small { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-3); }
.mn-stat__value { display: flex; align-items: center; gap: 8px; font: 700 clamp(22px, 4vh, 30px)/1 var(--f-latin); font-variant-numeric: tabular-nums; }
.mn-stat__value small { font-size: .62em; color: var(--ink-3); }
.mn-stat__value .mn-slots .mn-ico { font-size: 30px; }
.mn-stat.is-counting .mn-stat__value { color: var(--orange); }
.mn-in .mn-stat { animation: mn-slide-l .45s var(--spring) both; animation-delay: calc(var(--d) * 80ms + 420ms); }
/* a stage's own first row (stats.headline) and its line under the medal's (stats.medalNote) — ui/screens/results.js */
.mn-stat--headline .mn-stat__label { font-family: var(--f-display); font-weight: 400; font-size: clamp(18px, 3.1vh, 22px); line-height: 1.15; }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-stat--headline .mn-stat__label { font-family: inherit; font-weight: 700; font-size: clamp(17px, 2.8vh, 20px); }
.mn-stat--headline .mn-stat__value { font-family: var(--f-latin), var(--f-body); font-size: clamp(18px, 3.1vh, 22px); }
.mn-results__note { max-width: 240px; line-height: 1.35; text-align: center; text-wrap: balance; }
.mn-slot.is-pop { animation: mn-drop .45s var(--spring) both; }
.mn-record {
  padding: 4px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
  color: var(--white);
  font: 700 12.5px/1 var(--f-latin), var(--f-body);
  letter-spacing: .04em;
  transform: rotate(-4deg);
  animation: mn-pop .4s var(--spring) both;
  -webkit-text-stroke: 0;
}
.mn-results__medal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 18px 20px;
  background: var(--paper);
  border-left: var(--line);
  background-image: radial-gradient(rgba(30, 27, 46, .08) 1.4px, transparent 1.6px);
  background-size: 18px 18px;
}
.mn-results__stamp { width: clamp(90px, 19vh, 132px); aspect-ratio: 120 / 140; opacity: 0; filter: drop-shadow(4px 5px 0 var(--ink)); }
.mn-results__stamp.is-in { opacity: 1; animation: mn-stamp .6s var(--spring) both; }
.mn-results__stamp svg { width: 100%; height: 100%; display: block; }
.mn-results__mlabel { font-family: var(--f-display); font-size: 26px; line-height: 1; opacity: 0; }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-results__mlabel { font-weight: 700; }
.mn-results__mlabel.is-in { opacity: 1; animation: mn-pop .4s var(--spring) both; }
.mn-results__line {
  position: relative;
  max-width: 240px;
  padding: 9px 13px;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--pop-sm);
  font-family: var(--f-display);
  font-size: 15.5px;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  white-space: pre-line;
  opacity: 0;
}
.mn:is([data-lang="en"], [data-lang="es"]) .mn-results__line { font-weight: 500; font-size: 14.5px; }
.mn-results__line::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -10px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  background: var(--white);
  border-left: 2.5px solid var(--ink);
  border-top: 2.5px solid var(--ink);
  transform: rotate(45deg);
}
.mn-results__line.is-in { opacity: 1; animation: mn-pop .45s var(--spring) both; }
.mn-results__goal { font: 600 12.5px/1 var(--f-latin), var(--f-body); color: var(--ink-3); }
/* next-medal checklist (replaces the bare gold target below gold): each rule ticked or crossed against this run */
.mn-results__req { display: flex; flex-direction: column; align-items: center; gap: 5px; line-height: 1.2; }
.mn-results__req b { font-weight: 700; color: var(--ink-2); }
.mn-results__req ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.mn-results__req li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px 3px 5px; border: 2px solid rgba(30, 27, 46, .25); border-radius: 999px; background: var(--white); color: var(--ink-2); white-space: nowrap; }
.mn-results__req li .mn-ico { font-size: 15px; }
.mn-results__req li i { font-style: normal; font-weight: 700; color: #C0453D; }
.mn-results__req li.is-ok { border-color: #7FA84A; }
.mn-results__req li.is-ok i { color: #4E8A2E; }
.mn-results__perfect {
  position: absolute;
  top: 12px;
  right: -34px;
  padding: 5px 40px;
  background: var(--teal);
  border-block: 2.5px solid var(--ink);
  font: 700 12px/1 var(--f-latin), var(--f-body);
  letter-spacing: .08em;
  transform: rotate(35deg);
  opacity: 0;
}
.mn-results__perfect.is-in { opacity: 1; transition: opacity .3s; }
.mn-results__card.is-thud { animation: mn-thud .35s ease-out; }
.mn-results__news { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.mn-results__news .mn-chip { animation: mn-pop .45s var(--spring) both; }
/* 八十一难 — once a game: a red-sealed scroll line, wraps instead of running off narrow screens */
.mn-results__news .mn-chip--scripture {
  flex-basis: 100%;
  max-width: 44em;
  justify-content: center;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  padding: 9px 18px 9px 10px;
  background: var(--paper);
  border-color: #E0524A;
  box-shadow: 4px 4px 0 #E0524A;
  font-family: var(--f-display);
  font-weight: 400;
  color: #8F2C26;
}
.mn:is([data-lang="en"], [data-lang="es"]) .mn-chip--scripture { font-family: var(--f-latin); font-weight: 600; }
.mn-results__actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-bottom: max(var(--gutter), env(safe-area-inset-bottom));
}
/* backing that only shows while the stats scroll under the pinned row */
.mn-results__actions::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: -50vw;
  right: -50vw;
  top: -26px;
  bottom: 0;
  background: linear-gradient(0deg, rgba(22, 19, 33, .94) 0, rgba(22, 19, 33, .88) calc(100% - 26px), rgba(22, 19, 33, 0));
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.mn-results.is-overflow .mn-results__actions::before { opacity: 1; }
.mn-in .mn-results__actions { animation: mn-rise .5s var(--spring) .9s both; }
/* laptop heights (1366×657, 1280×720): tighten the vertical rhythm so a first clear's news fits above the buttons */
@media (max-height: 800px) and (min-height: 521px) and (min-width: 641px) {
  .mn-results__col { gap: clamp(8px, 1.7vh, 22px); }
  .mn-ribbon { padding: 8px 50px 11px; }
  .mn-ribbon h2 { font-size: clamp(36px, 7vh, 66px); }
  .mn-stat { padding: clamp(5px, .95vh, 11px) 4px; }
  .mn-results__stats { padding-block: clamp(8px, 1.4vh, 20px); }
  .mn-results__medal { gap: 8px; padding-block: 12px 14px; }
  .mn-results__stamp { width: clamp(84px, 15vh, 132px); }
  .mn-results__news { gap: 7px; }
  .mn-results__news .mn-chip { font-size: 14.5px; padding: 5px 12px 5px 7px; }
  .mn-results__news .mn-chip .mn-ico { font-size: 21px; }
}
.mn-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mn-confetti i {
  position: absolute;
  top: 0;
  width: 10px;
  height: 16px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  animation: mn-confetti var(--t, 3s) cubic-bezier(.3, .4, .6, 1) both;
}

/* ------------------------------------------------------------------ CREDITS */
.mn-credits { overflow: auto; background: transparent; color: var(--ink); }
.mn-wait { position: relative; min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(28px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); text-align: center; gap: 190px; }
.mn-wait__message { max-width: 760px; }
.mn-wait__lead { margin: 0 0 12px; font-size: 16px; }
.mn-wait h2 { margin: 0; font: 700 clamp(24px, 4vw, 40px)/1.15 var(--f-display); }
.mn-wait__date { display: block; margin-top: 6px; font: 700 clamp(30px, 5vw, 58px)/1.15 var(--f-display); text-wrap: balance; }
.mn-wait__chapter { margin: 14px 0 0; font-size: 17px; text-wrap: balance; }
.mn-wait__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (max-height: 450px) and (min-aspect-ratio: 1/1) {
  .mn-wait { padding-top: max(12px, env(safe-area-inset-top)); gap: 100px; }
  .mn-wait__lead { margin-bottom: 5px; font-size: 13px; }
  .mn-wait h2 { font-size: 23px; }
  .mn-wait__date { font-size: 30px; }
  .mn-wait__chapter { margin-top: 5px; font-size: 14px; }
}
.mn-btn--ink .mn-ico { filter: invert(1); }
.mn-credits__view { position: absolute; inset: 0; overflow: hidden; mask-image: linear-gradient(transparent 0, #000 14%, #000 84%, transparent 100%); -webkit-mask-image: linear-gradient(transparent 0, #000 14%, #000 84%, transparent 100%); }
.mn-roll { position: absolute; left: 50%; top: 0; width: min(680px, calc(100% - 40px)); margin-left: max(-340px, calc(-50% + 20px)); display: flex; flex-direction: column; align-items: center; gap: 56px; padding: 0 0 20vh; text-align: center; will-change: transform; }
.mn-roll__logo { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mn-roll__logo .mn-mark { width: 96px; height: 96px; filter: drop-shadow(4px 4px 0 #000); }
.mn-roll__logo h2 { font-family: 'ZCOOL KuaiLe', var(--f-display); font-size: 64px; line-height: 1; color: var(--white); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--orange); }
.mn-roll__logo p { font: 700 20px/1 var(--f-latin); letter-spacing: .3em; color: var(--yellow); }
.mn-roll__lead { font-family: var(--f-display); font-size: 22px; color: #E9DEFF; }
.mn-roll__sec { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mn-roll__sec h3 { display: inline-block; padding: 5px 16px 7px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--yellow); color: var(--ink); font-family: var(--f-display); font-size: 22px; line-height: 1.1; box-shadow: 3px 3px 0 var(--orange); transform: rotate(-2deg); margin-bottom: 6px; }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-roll__sec h3 { font-weight: 600; font-size: 19px; }
.mn-roll__sec p { font-size: 21px; line-height: 1.35; font-weight: 600; color: var(--white); }
.mn-roll__sec p.is-small { font-size: 16px; font-weight: 500; color: #CFCBE0; max-width: 560px; }
/* CJK lines break at punctuation (——, ，) and balance, never 「…任何采 / 样」; anywhere is the overflow fallback */
.mn-roll__lead, .mn-roll__sec p, .mn-roll__table dd { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.mn-roll__logo .mn-seal { --size: 64px; font-size: 16px; vertical-align: 2px; letter-spacing: .1em; }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-roll__logo .mn-seal { font-family: 'Fredoka', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; } /* like the title's EN seal */
.mn-roll__table { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; margin: 0; text-align: left; }
.mn-roll__table dt { text-align: right; font-family: var(--f-display); font-size: 18px; color: var(--yellow); }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-roll__table dt { font-weight: 600; font-size: 16px; }
.mn-roll__table dd { margin: 0; font-size: 18px; font-weight: 600; color: var(--white); }
.mn-roll__table dd small { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; color: #CFCBE0; }
.mn-roll__family { display: grid; grid-template-columns: repeat(3, 78px); gap: 10px 12px; justify-content: center; }
.mn-roll__family img { width: 78px; aspect-ratio: 576 / 900; object-fit: cover; object-position: 50% 62%; border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--orange); rotate: var(--r); }
.mn-roll__legal { max-width: 560px; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border: 2.5px dashed rgba(255, 255, 255, .35); border-radius: 18px; font-size: 14.5px; color: #CFCBE0; line-height: 1.55; }
.mn-roll__end { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 10vh; }
.mn-roll__end h2 { font-family: var(--f-display); font-size: 54px; line-height: 1; color: var(--yellow); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-roll__end h2 { font-weight: 700; }
.mn-roll__end p { font-family: var(--f-display); font-size: 20px; color: #E9DEFF; }
.mn-credits__bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); }
.mn-credits__hint { font: 600 13px/1.2 var(--f-latin), var(--f-body); color: rgba(255, 255, 255, .6); }
.mn-credits .mn-btn { box-shadow: 4px 4px 0 var(--orange); border-color: var(--ink); }
.mn-credits .mn-btn--ink { background: var(--ink); border-color: #4A4660; }
.mn-credits .mn-btn:is(:hover, :focus-visible, .is-focus, .is-focused) { box-shadow: 6px 7px 0 var(--orange), 0 0 0 4px var(--yellow); }
/* ending roll: 「长按跳过」 — the button fills left → right while held */
.mn-credits__skip { overflow: hidden; isolation: isolate; }
.mn-credits__fill { position: absolute; z-index: -1; inset: 0; background: var(--orange); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); border-radius: inherit; }
.mn-credits__skip.is-nudge { animation: mn-shake .4s ease; }
.mn-credits__lanterns { position: absolute; inset: 0; pointer-events: none; }

/* ------------------------------------------------------------------ CONFIRM */
.mn-confirm { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: var(--gutter); z-index: 20; }
.mn-confirm .mn-panel { width: min(460px, 100%); padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 12px; text-align: center; align-items: center; }
.mn-confirm__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-top: -58px; border: var(--line); border-radius: 50%; background: var(--yellow); box-shadow: var(--pop-sm); }
.mn-confirm__icon .mn-ico { font-size: 34px; }
.mn-confirm.is-danger .mn-confirm__icon { background: var(--pink); }
.mn-confirm h2 { font-family: var(--f-display); font-size: 30px; }
.mn-confirm p { color: var(--ink-2); font-size: 16px; line-height: 1.5; max-width: 360px; }
.mn-confirm__actions { display: flex; gap: 12px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.mn-confirm__actions .mn-btn { min-width: 140px; }
.mn-confirm.is-denied .mn-panel { animation: mn-shake .4s ease; }

/* ------------------------------------------------------------------ responsive */

/* tablets / small laptops */
@media (max-width: 1100px) {
  .mn-closet__grid { gap: 10px; }
  .mn-lcard__name { font-size: 30px; }
}

/* narrow: portrait phones */
/* Chapter navigation gets its own row before the header can squeeze it into a
 * vertical stack. Keep the row scrollable as chapters accumulate. */
@media (max-width: 1500px) {
  .mn-map-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px;
  }
  .mn-map-head .mn-head__title { min-width: 0; justify-self: start; }
  .mn-map-head .mn-head__title h2 { white-space: normal; overflow-wrap: anywhere; }
  .mn-map-head .mn-head__title > span { display: none; }
  .mn-map-head .mn-scrolls {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 6px 7px 2px;
    touch-action: pan-x;
  }
  .mn-map-head .mn-scrolls .mn-scroll {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
  .mn-map-head .mn-scroll small, .mn-map-head .mn-scroll-name { display: none; }
  .mn-map-head .mn-scroll-n { display: inline-block; }
}

@media (max-width: 640px) {
  .mn-head { gap: 10px; }
  .mn-head__title { padding: 5px 13px 7px; }
  .mn-head__title h2 { font-size: 24px; }
  .mn-head__title span { display: none; }
  .mn-btn--icon { width: 44px; height: 44px; min-height: 44px; }
  .mn-chip { font-size: 14px; padding: 5px 11px 5px 6px; }
  .mn-chip .mn-ico { font-size: 20px; }
  .mn-map-head { column-gap: 7px; }
  .mn-map-head .mn-head__title { padding: 5px 8px 7px; }
  .mn-map-head .mn-head__title h2 { font-size: clamp(16px, 4.5vw, 24px); }
  .mn-map-head > .mn-chip { padding: 5px; gap: 3px; }

  .mn-title { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
  .mn-title__top { grid-row: 1; }
  .mn-title__left { display: contents; }
  .mn-title__brand { grid-row: 2; align-items: center; justify-self: center; padding-top: 1vh; }
  .mn-title .mn-menu { grid-row: 4; justify-self: center; width: min(380px, 100%); margin-bottom: 12px; }
  .mn-title__foot { grid-row: 5; justify-content: center; text-align: center; }
  .mn-title__shade { background: linear-gradient(0deg, rgba(30, 27, 46, .4), rgba(30, 27, 46, 0) 50%); }
  .mn-logo { --size: clamp(46px, 15.5vw, 72px); justify-items: center; }
  .mn-title__bubble { left: 56%; top: 31%; }
  .mn-title__epigraph { display: none; }

    .mn-node__label { font-size: 13px; }
  .mn-lcard { grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding: 14px 14px 14px 18px; }
  .mn-lcard__text { display: contents; }
  .mn-lcard__emblem { grid-row: 1 / span 2; align-self: center; }
  .mn-lcard__kicker { grid-column: 2; align-self: end; }
  .mn-lcard__name { grid-column: 2; align-self: start; }
  .mn-lcard__tag, .mn-lcard__stats, .mn-lcard__lockmsg { grid-column: 1 / -1; }
  .mn-lcard__tag { margin-top: 8px; }
  .mn-lcard__stats { margin-top: 6px; }
  .mn-lcard__actions { margin-top: 10px; }
  .mn-lcard__emblem { width: 60px; height: 60px; border-radius: 17px; }
  .mn-lcard__emblem .mn-ico { font-size: 36px; }
  .mn-lcard__emblem b { width: 28px; height: 28px; font-size: 14px; right: -8px; bottom: -8px; }
  .mn-lcard__name { font-size: 25px; }
  .mn-lcard__tag { font-size: 13.5px; }
  .mn-lcard__stats { gap: 6px 12px; }
  .mn-lcard__actions { grid-column: 1 / -1; }
  .mn-lcard__play { width: 100%; }

  .mn-wardrobe__body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; align-items: stretch; gap: 14px; padding-top: calc(max(var(--gutter), env(safe-area-inset-top)) + 60px); padding-left: var(--gutter); }
  .mn-stage { gap: 12px; }
  .mn-stage__card, .mn-stage__back { height: min(100% - 64px, 460px); }
  .mn-closet__say { display: none; }
  .mn-stage__line {
    display: block;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    border: 2.5px solid var(--ink);
    border-radius: 14px;
    background: var(--white);
    font-family: var(--f-display);
    font-size: 14.5px;
    line-height: 1.3;
    text-align: center;
  }
  .mn:is([data-lang="en"], [data-lang="es"]) .mn-stage__line { font-size: 13px; font-weight: 500; }
  .mn-stage__tag { bottom: auto; top: 12px; }
  .mn-stage__worn { display: none; }
  .mn-stage__card.is-locked .mn-stage__line { display: none; }
  .mn-closet__foot { font-size: 12.5px; gap: 10px; }
  .mn-closet__bar { flex-basis: 110px; min-width: 90px; }
  .mn-stage__cta { min-width: 180px; min-height: 50px; }
  .mn-closet { height: auto; gap: 10px; }
  .mn-closet__rack { --bleed: 14px; max-height: calc(44vh + var(--bleed) + var(--bleed-b)); } /* the closet is as tall as its rack here: the stage keeps its room */
  .mn-closet__grid { gap: 7px; }
  .mn-look { border-radius: 13px; border-width: 2.5px; box-shadow: 3px 3px 0 var(--ink); }
  .mn-look__no { display: none; }
  .mn-look__lock .mn-ico { font-size: 20px; }
  .mn-look__lock b { font-size: 10.5px; padding: 2px 5px 2px 3px; }
  .mn-look__lock b .mn-ico { font-size: 11px; }
  .mn-look__worn { width: 20px; height: 20px; right: 3px; top: 3px; }
  .mn-look__worn .mn-ico { font-size: 12px; }

  .mn-settings { padding: 0; }
  .mn-settings .mn-panel { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; box-shadow: none; }
  .mn-panel__head { padding: max(14px, env(safe-area-inset-top)) 14px 12px 18px; }
  .mn-settings__body { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
  .mn-settings__foot { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .mn-settings__foot p { display: none; }
  .mn-settings__foot .mn-btn { width: 100%; }
  .mn-row { flex-wrap: wrap; }
  .mn-row--seg .mn-seg { width: 100%; }
  .mn-row--seg .mn-seg button { flex: 1; min-width: 0; }
  .mn-slider { flex: 1; min-width: 120px; }
  .mn-settings__grid { grid-template-columns: 1fr; }
  .mn-settings__grid .mn-toggle__txt { display: block; }

  .mn-pause__panel {
    top: auto;
    width: 100%;
    max-height: 94%;
    border-right: 0;
    border-top: var(--line);
    border-radius: var(--r) var(--r) 0 0;
    box-shadow: 0 -6px 0 var(--ink);
    padding: 22px 20px max(20px, env(safe-area-inset-bottom));
  }
  .mn-in .mn-pause__panel { animation: mn-rise .45s var(--out) both; }
  .mn-pause .mn-scrim { background: transparent; }
  .mn-pause__quote { margin-top: 6px; }

  .mn-results__card { grid-template-columns: 1fr; }
  /* medal as one compact row: stamp left; label, quip and the next-medal checklist stacked beside it */
  .mn-results__medal { order: -1; border-left: 0; border-bottom: var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; padding: 10px 14px; gap: 5px 12px; }
  .mn-results__stamp { grid-row: 1 / span 3; width: 66px; align-self: center; }
  .mn-results__mlabel { font-size: 22px; }
  .mn-results__line { max-width: 100%; font-size: 13px; padding: 5px 10px; text-align: left; }
  .mn-results__line::before { display: none; }
  .mn-results__goal { font-size: 12px; }
  .mn-results__req { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 6px; }
  .mn-results__req ul { justify-content: flex-start; }
  .mn-results__req li { padding: 2px 6px 2px 4px; }
  .mn-results__stats { padding: 4px 16px; }
  .mn-stat { padding: 7px 4px; }
  .mn-results__news { gap: 6px; }
  .mn-results__news .mn-chip { white-space: normal; line-height: 1.2; text-align: left; font-size: 13.5px; }
  .mn-stat__label { font-size: 15px; }
  .mn-stat > .mn-ico { font-size: 26px; }
  .mn-ribbon { padding: 8px 30px 11px; }
  .mn-ribbon::before, .mn-ribbon::after { width: 36px; top: 12px; }
  .mn-ribbon::before { left: -24px; }
  .mn-ribbon::after { right: -24px; }
  .mn-ribbon h2 { font-size: clamp(30px, 10vw, 44px); }
  .mn-results__actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mn-results__actions .mn-btn--primary,
  .mn-results__actions .mn-btn--invite { grid-column: 1 / -1; }
  .mn-results__actions .mn-btn--lg { min-height: 50px; padding-block: 8px; }

  .mn-roll__logo h2 { font-size: 46px; }
  .mn-roll__sec p { font-size: 18px; }
  .mn-roll__end h2 { font-size: 40px; }
}

/* short: landscape phones */
@media (max-height: 520px) {
  .mn { --gutter: 14px; }
  .mn-head__title { padding: 4px 13px 6px; }
  .mn-head__title h2 { font-size: 22px; }
  .mn-btn--icon { width: 42px; height: 42px; min-height: 42px; }
  .mn-chip { font-size: 14px; padding: 4px 11px 4px 5px; }
  .mn-chip .mn-ico { font-size: 20px; }
  .mn-btn { min-height: 42px; font-size: 15px; padding: 7px 18px; }
  .mn-btn--lg { min-height: 46px; font-size: 17px; }

  .mn-title { grid-template-columns: minmax(0, 470px) 1fr; }
  .mn-title__left { gap: 12px; justify-content: center; }
  .mn-title__brand { gap: 8px; }
  .mn-logo { --size: clamp(40px, 13.5vh, 64px); }
  .mn-title__sub { font-size: 14px; padding: 4px 12px 5px; }
  .mn-title .mn-menu { width: min(470px, 100%); }
  .mn-menu__item.mn-btn--primary { min-height: 48px; font-size: 18px; padding: 4px 14px 4px 5px; }
  .mn-menu__item.mn-btn--primary .mn-menu__badge { width: 36px; height: 36px; }
  .mn-disclaimer { font-size: 11px; }
  .mn-sitelink { width: 38px; height: 38px; }
  .mn-title__bubble { top: 16%; }

    .mn-node { --s: 42px; }
  .mn-node__label { font-size: 12.5px; top: calc(100% + 6px); padding: 2px 8px 3px; }
  .mn-marker__body { width: 40px; height: 40px; left: -20px; top: calc(var(--node-s, 42px) * -.5 - 50px); }
  .mn-lcard { gap: 12px; padding: 10px 12px 10px 14px; bottom: 10px; }
  .mn-lcard::before { width: 7px; }
  .mn-lcard__emblem { width: 54px; height: 54px; border-radius: 15px; margin-left: 2px; }
  .mn-lcard__emblem .mn-ico { font-size: 32px; }
  .mn-lcard__emblem b { width: 24px; height: 24px; font-size: 13px; right: -7px; bottom: -7px; border-width: 2px; }
  .mn-lcard__name { font-size: 22px; }
  .mn-lcard__tag { display: none; }
  .mn-lcard__kicker { font-size: 11px; }
  .mn-lcard__stats { margin-top: 1px; gap: 4px 12px; }
  .mn-lcard__stat { font-size: 13px; }
  .mn-lcard__stat .mn-ico { font-size: 20px; }
  .mn-slots .mn-ico { font-size: 21px; }
  .mn-lcard__play { min-width: 130px; }

  .mn-wardrobe__body { padding-top: 64px; grid-template-columns: minmax(170px, 26%) minmax(0, 1fr); gap: 18px; padding-bottom: 12px; }
  .mn-stage { gap: 8px; }
  .mn-stage__card, .mn-stage__back { height: calc(100% - 50px); border-radius: 20px; }
  .mn-stage__tag { left: 6px; right: 6px; top: auto; bottom: 6px; max-width: none; padding: 3px 9px 3px 3px; gap: 5px; border-radius: 14px; } /* top: the portrait rule also matches 568×320 */
  .mn-stage__tag em { font-size: 10px; padding: 3px 6px; }
  .mn-stage__tag b { font-size: 13.5px; line-height: 1.1; }
  .mn-stage__worn { font-size: 11px; right: 6px; top: 6px; padding: 3px 8px 3px 4px; }
  .mn-closet__say, .mn-stage__line { display: none; }
  .mn-closet__foot { display: none; }
  .mn-stage__lock .mn-ico { font-size: 40px; }
  .mn-stage.has-3d .mn-stage__lock { padding-bottom: 48px; gap: 4px; }
  .mn-stage.has-3d .mn-stage__lock .mn-ico { font-size: 26px; }
  .mn-stage.has-3d .mn-stage__lock b { font-size: 11px; padding: 4px 9px; border-width: 2px; }
  .mn-stage__lock b { font-size: 12.5px; }
  .mn-stage__cta { min-width: 0; width: 100%; }
  .mn-closet { gap: 8px; }
  .mn-closet__rack { --bleed: 12px; } /* the room under the header chips, and above the screen's foot */
  .mn-closet__grid { gap: 9px; }
  .mn-look { aspect-ratio: 576 / 700; border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
  .mn-look__lock .mn-ico { font-size: 22px; }
  .mn-look__lock b { font-size: 11px; }
  /* 568×320: the stage card is ~105 px wide — the number sits above the name, which then gets the tag's whole width
     (not one glyph per line), and the unlock note clears the taller tag (the Locked button keeps the padlock) */
  @container stage-card (max-width: 132px) {
    .mn-stage__tag { flex-direction: column; align-items: flex-start; gap: 3px; padding: 4px 8px 5px; }
    .mn-stage__lock, .mn-stage.has-3d .mn-stage__lock { place-content: start center; padding: 8px 4px 0; }
    .mn-stage__lock .mn-ico { display: none; }
  }

  .mn-settings { padding: 8px; }
  .mn-panel__head { padding: 8px 12px 8px 18px; }
  .mn-panel__head h2 { font-size: 24px; }
  .mn-settings__body { padding: 12px 16px; gap: 16px; }
  .mn-settings__foot { display: none; }
  .mn-row { min-height: 48px; padding: 6px 10px 6px 12px; }
  .mn-row__label { font-size: 14.5px; }
  .mn-row__label .mn-ico { font-size: 22px; }
  .mn-settings__label:not(:first-child) { margin-top: 6px; }

  .mn-pause__panel { width: min(400px, 100%); gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .mn-pause__title h2 { font-size: 34px; }
  .mn-pause__level { padding: 6px 10px 6px 6px; }
  .mn-pause__emblem { width: 36px; height: 36px; border-radius: 11px; }
  .mn-pause__emblem .mn-ico { font-size: 22px; }
  .mn-pause__lvtext b { font-size: 18px; }
  .mn-pause__menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mn-pause__menu .mn-btn { min-height: 40px; font-size: 14px; padding: 4px 10px 4px 5px; gap: 7px; white-space: normal; text-align: left; line-height: 1.1; }
  .mn-pause__menu .mn-btn:first-child, .mn-pause__menu .mn-btn:last-child:nth-child(even) { grid-column: 1 / -1; }
  /* (in a THINK room the ask row shares Resume's row — world/help.js — so the card grows no taller) */
  .mn-pause__menu.has-ask .mn-btn:first-child, .mn-pause__menu.has-ask .mn-btn:last-child:nth-child(even) { grid-column: auto; }
  .mn-pause__menu.has-ask .mn-btn[data-act="ask"] { grid-column: 1; grid-row: 2; }   /* (F42c: the answer right under Resume — ↓ reaches it) */
  .mn-pause__menu .mn-btn .mn-menu__badge { width: 28px; height: 28px; }
  .mn-pause__menu .mn-btn .mn-menu__badge .mn-ico { font-size: 16px; }
  .mn-pause__quote { display: none; }

  .mn-results__col { gap: 8px; }
  .mn-ribbon { padding: 5px 34px 8px; }
  .mn-ribbon::before, .mn-ribbon::after { width: 40px; top: 10px; }
  .mn-ribbon::before { left: -28px; }
  .mn-ribbon::after { right: -28px; }
  .mn-ribbon h2 { font-size: 32px; }
  .mn-ribbon small { display: none; }
  .mn-results__level { font-size: 16px; }
  .mn-results__card { width: min(700px, 100%); grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr); }
  .mn-results__stats { padding: 4px 18px; }
  .mn-stat { padding: 4px; gap: 10px; }
  .mn-stat > .mn-ico { font-size: 24px; }
  .mn-stat__label { font-size: 14.5px; }
  .mn-stat__label small { display: none; }
  .mn-stat__value { font-size: 21px; }
  .mn-stat__value .mn-slots .mn-ico { font-size: 22px; }
  .mn-results__medal { padding: 8px 12px; gap: 5px; }
  .mn-results__stamp { width: 74px; }
  .mn-results__mlabel { font-size: 18px; }
  .mn-results__line { font-size: 12.5px; padding: 6px 10px; }
  .mn-results__goal { font-size: 12.5px; }
  .mn-results__req { gap: 3px; }
  .mn-results__req li { padding: 1px 6px 1px 4px; }
  .mn-results__req li .mn-ico { font-size: 13px; }
  .mn-results__medal:has(.mn-results__req) .mn-results__line { display: none; } /* the rule matters more than the quip here */
  /* news as one compact row (scrolls sideways if it has to), auto margins keep it centred when it fits */
  .mn-results__news { flex-wrap: nowrap; justify-content: flex-start; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 1px 6px 5px 2px; }
  .mn-results__news::-webkit-scrollbar { display: none; }
  .mn-results__news > :first-child { margin-left: auto; }
  .mn-results__news > :last-child { margin-right: auto; }
  .mn-results__news .mn-chip { flex: none; font-size: 12.5px; padding: 3px 10px 3px 5px; box-shadow: 2px 2px 0 var(--ink); }
  .mn-results__news .mn-chip .mn-ico { font-size: 17px; }
  /* TIGHT (ui/screens/results.js sync: set once when the column overflows a short screen — a headline row and news at
     844×390): everything a little smaller so the banner stays in the picture; a column that fits never gets it */
  .mn-results.is-tight .mn-results__scroll { padding-top: max(6px, env(safe-area-inset-top)); }
  .mn-results.is-tight .mn-results__col { gap: 5px; }
  .mn-results.is-tight .mn-ribbon { padding: 3px 28px 5px; }
  .mn-results.is-tight .mn-ribbon h2 { font-size: 26px; -webkit-text-stroke-width: 2.5px; text-shadow: 3px 3px 0 var(--ink); }
  .mn-results.is-tight .mn-results__level { font-size: 14px; }
  .mn-results.is-tight .mn-results__stats { padding: 2px 16px; }
  .mn-results.is-tight .mn-stat { padding-block: 2px; }
  .mn-results.is-tight .mn-stat__value { font-size: 19px; }
  .mn-results.is-tight .mn-stat > .mn-ico { font-size: 21px; }
  .mn-results.is-tight .mn-results__medal { padding: 6px 10px; gap: 3px; }
  .mn-results.is-tight .mn-results__stamp { width: 62px; }
  .mn-results.is-tight .mn-results__actions .mn-btn--lg { min-height: 42px; padding-block: 5px; }
  /* …and a sixth row (a stage's own headline: 3-6's quiz, 3-3's place) on top of that: slimmer rows still, and room
     under the last one (2026-11-13, G7 — the integration check: at 844×390 the Trials row sat on the panel's bottom
     edge and the column ran 8 px past the screen) */
  .mn-results.is-tight .mn-results__stats.has-headline { padding: 5px 16px 6px; gap: 0; }
  .mn-results.is-tight .has-headline .mn-stat { padding-block: 1px; gap: 9px; }
  .mn-results.is-tight .has-headline .mn-stat > .mn-ico { font-size: 18px; }
  .mn-results.is-tight .has-headline .mn-stat__label { font-size: 13.5px; }
  .mn-results.is-tight .has-headline .mn-stat--headline .mn-stat__label,
  .mn-results.is-tight .has-headline .mn-stat--headline .mn-stat__value { font-size: 15px; }
  .mn-results.is-tight .has-headline .mn-stat__value { font-size: 17px; }
  .mn-results.is-tight .has-headline .mn-stat__value .mn-slots .mn-ico { font-size: 18px; }
  .mn-results.is-tight .has-headline .mn-record { padding: 2px 7px; font-size: 11px; }
  .mn-results__news .mn-chip--scripture { flex-basis: auto; max-width: none; white-space: nowrap; }
  .mn-results__actions { gap: 10px; }
  .mn-results__actions .mn-btn--lg { min-height: 44px; font-size: 15px; }

  .mn-confirm .mn-panel { padding: 18px 20px 16px; gap: 8px; }
  .mn-confirm__icon { width: 50px; height: 50px; margin-top: -40px; }
  .mn-confirm__icon .mn-ico { font-size: 26px; }
  .mn-confirm h2 { font-size: 24px; }
  .mn-confirm p { font-size: 14.5px; }

  .mn-roll { gap: 40px; }
}

/* large viewports: scale the whole sticker UI (1280×720 is the design size) */
@media (min-width: 1560px) and (min-height: 880px) { .mn { zoom: 1.18; } }
@media (min-width: 1880px) and (min-height: 1040px) { .mn { zoom: 1.32; } }
@media (min-width: 2400px) and (min-height: 1340px) { .mn { zoom: 1.7; } }

@media (prefers-reduced-motion: reduce) {
  .mn *, .mn *::before, .mn *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .mn-map__world { transition: none; }
}

/* credits photo album (after the epilogue) */
.mn-album__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 10px auto 12px; max-width: 640px; }
.mn-album__card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 6px 12px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  rotate: var(--r, -1.5deg);
}
.mn-album__card:nth-child(even) { --r: 1.5deg; }
.mn-album__card b { font: 400 15px/1.2 var(--f-display); }
.mn:is([data-lang="en"], [data-lang="es"]) .mn-album__card b { font: 600 13px/1.2 var(--f-latin); }
.mn-album__medal { display: grid; place-items: center; width: 46px; height: 46px; }
.mn-album__medal:empty::before { content: ''; width: 34px; height: 34px; border-radius: 50%; border: 2.5px dashed var(--ink-3); }
.mn-album__medal svg { width: 100%; height: 100%; }
.mn-album__shards { display: flex; gap: 4px; }
.mn-album__shards i { width: 10px; height: 13px; clip-path: polygon(50% 0, 100% 30%, 82% 100%, 18% 100%, 0 30%); background: var(--ink-3); opacity: .45; }
.mn-album__shards i.is-on { background: var(--visor); opacity: 1; box-shadow: inset 0 0 0 2px var(--ink); }
.mn-album__totals { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.mn-album__totals b { color: var(--yellow); font-family: var(--f-latin); font-weight: 700; }
@media (max-width: 640px) { .mn-album__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* portrait phones: the role sheet stacks (a 160 px value column broke 「原创配乐与全部音 / 效」) */
@media (max-width: 480px) {
  .mn-roll__table { grid-template-columns: 1fr; gap: 4px; text-align: center; }
  .mn-roll__table dt { text-align: center; margin-top: 12px; }
  .mn-roll__table dt:first-child { margin-top: 0; }
}
.mn-nw { white-space: nowrap; }

/* touch screens: every target at least 44 × 44 px (segments, language pill, site link, tabs; icon buttons, map
 * nodes and pause buttons that the short-screen rules above shrink to 40–42) */
@media (pointer: coarse) {
  .mn-seg button { min-height: 44px; }
  .mn-lang span { display: inline-grid; place-items: center; min-width: 46px; min-height: 38px; }
  .mn-sitelink { width: 44px; height: 44px; }
  .mn-tab { min-height: 44px; }
  .mn-btn--icon { width: 44px; height: 44px; min-height: 44px; }
}
@media (pointer: coarse) and (max-height: 520px) {
  .mn-node { --s: 44px; }
  .mn-pause__menu .mn-btn { min-height: 44px; }
}

/* ---- side games offered where they open (2026-11-19): the results screen's button, in the chapter's colour, and the
   map pin's sticker */
.mn-lcard__actions .mn-card-mode .mn-new { right: -6px; top: -9px; font-size: 10px; padding: 2px 5px 3px; }
/* a side game's own pin: a size smaller, level with the pin of the stage that opens it and to its right (the second
   one to its left) — clear of Tomoro's marker, which stands over the stage's pin, and of the stage's name under it —
   in the chapter's colour; its name shows on its far side while it is picked */
.mn-node--side {
  --s2: calc(var(--s) * .74);
  z-index: 3;
  width: var(--s2);
  height: var(--s2);
  margin: calc(var(--s) * -.37) 0 0 calc(var(--s) * .78);
  box-shadow: 0 4px 0 var(--ink);
}
.mn-node--side.is-left { margin-left: calc(var(--s) * -1.52); }
.mn-node--side::before { inset: 3px; border-width: 2px; }
.mn-node--side .mn-node__num .mn-ico { font-size: calc(var(--s) * .42); }
.mn-node--side .mn-node__label,
.mn-node--side:is(:focus-visible, .is-focus, .is-focused, .is-sel) .mn-node__label { left: calc(100% + 9px); top: 50%; transform: translateY(-50%) rotate(-1.5deg); font-size: 13px; opacity: 0; pointer-events: none; }
.mn-node--side.is-left .mn-node__label,
.mn-node--side.is-left:is(:focus-visible, .is-focus, .is-focused, .is-sel) .mn-node__label { left: auto; right: calc(100% + 9px); }
.mn-node--side:is(:hover, :focus-visible, .is-focus, .is-focused, .is-sel) .mn-node__label { opacity: 1; }
.mn-node--side:is(:hover, :focus-visible, .is-focus, .is-focused, .is-sel) { box-shadow: 0 6px 0 var(--ink), 0 0 0 4px var(--yellow); z-index: 4; }
.mn-node--side .mn-new { right: -14px; top: -11px; font-size: 10px; padding: 2px 5px 3px; }
.mn-node--side.is-new { animation: mn-side-pop .7s var(--spring) .9s both; }
@keyframes mn-side-pop { from { transform: scale(0) rotate(-50deg); } }
@media (prefers-reduced-motion: reduce) { .mn-node--side.is-new { animation: none; } }
.mn-lcard__emblem--side .mn-ico { font-size: 44px; }

/* ---- a map card's side games (registerScreenExtras('levelcard')): under the play button, a size smaller, in the
   chapter's colour (each extra's `color` → --c). Moved here from Series 4 when the title's Modes line went (2026-10-23). */
.mn-lcard__actions.has-extras { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.mn-lcard__actions .mn-card-mode { min-height: 40px; padding-top: 4px; padding-bottom: 4px; font-size: 15px; }
.mn-lcard__actions .mn-card-mode .mn-ico { font-size: 22px; }
.mn-lcard__actions .mn-card-mode .mn-btn__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@media (max-height: 520px) {
  .mn-lcard__actions.has-extras { gap: 5px; }
  .mn-lcard__actions.has-extras .mn-lcard__play { min-height: 40px; }
  .mn-lcard__actions .mn-card-mode { min-height: 32px; font-size: 13px; }
}
@media (max-width: 640px) { .mn-lcard__actions.has-extras { flex-direction: row; flex-wrap: wrap; } .mn-lcard__actions.has-extras > * { flex: 1 1 0; min-width: 0; } }

/* ------------------------------------------------------------------ TELL US ("Something wrong here?", tell.js) */
.mn-tell-link { align-self: flex-start; padding: 6px 4px; border: 0; background: none; color: var(--ink); font: 600 14px/1.2 var(--f-latin), var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 8px; }
.mn-tell-link:is(:hover, :focus-visible) { color: var(--ink); }
.mn-tell-link--results { align-self: center; color: #fff; text-shadow: 0 1px 2px rgba(30, 27, 46, .6); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.mn-tell-link--results:is(:hover, :focus-visible) { color: #fff; }
.mn-pause[data-fit] .mn-tell-link { padding: 2px 4px; font-size: 13px; }
/* online with a friend: under Resume, that the game goes on for them (pause.js) */
.mn-pause__goes { margin: -4px 4px 2px; font: 600 13px/1.3 var(--f-latin), var(--f-body); color: var(--ink-2); }
.mn-pause[data-fit] .mn-pause__goes { margin: -2px 4px 0; font-size: 12px; }
.mn-tell { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: var(--gutter); z-index: 20; }
.mn-tell__panel { width: min(480px, 100%); max-height: 100%; overflow: auto; padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.mn-tell__panel h2 { font-family: var(--f-display); font-size: 28px; text-align: center; }
.mn-tell__kinds { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.mn-tell__kind { min-height: 44px; padding: 4px 10px; justify-content: center; text-align: center; }
.mn-tell__kind.is-on { background: var(--yellow); }
.mn-tell__note { width: 100%; box-sizing: border-box; resize: none; padding: 10px 12px; border: var(--line); border-radius: 14px; background: #fff; color: var(--ink); font: 500 16px/1.4 var(--f-latin), var(--f-body); -webkit-user-select: text; user-select: text; touch-action: auto; }
.mn-tell__about { color: var(--ink-3); font-size: 13px; line-height: 1.4; }
.mn-tell__msg { min-height: 1.4em; font-size: 15px; line-height: 1.4; color: var(--ink-2); text-align: center; }
.mn-tell__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mn-tell__actions .mn-btn { min-width: 130px; }
.mn-tell__actions .mn-btn[aria-disabled="true"] { opacity: .5; }
@media (max-height: 460px) {
  .mn-tell__panel { padding: 12px 16px 10px; gap: 6px; }
  .mn-tell__panel h2 { font-size: 20px; }
  .mn-tell__panel { width: min(560px, 100%); }
  .mn-tell__kinds { gap: 6px; }
  .mn-tell__kind { min-height: 34px; font-size: 13px; }
  .mn-tell__note { padding: 6px 10px; height: 52px; }
  .mn-tell__msg { min-height: 0; }
  .mn-tell__actions .mn-btn { min-height: 40px; }
  .mn-pause .mn-tell-link { padding: 0 4px; font-size: 12px; line-height: 1; margin-top: -2px; }
  .mn-tell__about { font-size: 12px; }
}

/* Endless climb: release date stays above the play field; controls retain their normal touch layer. */
.climb-overlay { position: absolute; z-index: 16; inset: 0; pointer-events: none; color: #1e1b2e; text-align: center; padding: max(10px, env(safe-area-inset-top)) 56px 0 12px; font-family: var(--f-latin),var(--f-body); box-sizing: border-box; }
.climb-release { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 3px 8px; font-size: 15px; }
.climb-release strong { font-size: 22px; }
.climb-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 7px; font-size: 14px; }
.climb-stats b { color: #7a3522; }
.climb-hint { display: inline-block; max-width: 30em; margin: 12px 0; padding: 7px 12px; border-radius: 12px; background: #fff6e6e6; font-size: 13px; }
.mn-credits:has(.mn-climb-end) { background: #a9d8eecc; backdrop-filter: blur(7px); }
.mn-climb-end { box-sizing: border-box; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: max(18px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom)); text-align: center; color: #1e1b2e; background: #b5def0e8; }
.mn-climb-end p, .mn-climb-end h2 { margin: 0; }
.mn-climb-end h2 { font: 700 28px/1.15 var(--f-display); }
.mn-climb-end__release { font-weight: 700; font-size: 17px; margin-bottom: 10px !important; }
.mn-climb-end__score { font: 700 64px/1 var(--f-display); }
@media (max-width: 500px) { .climb-release { font-size: 12px; } .climb-release strong { font-size: 16px; } .climb-stats { gap: 5px 12px; font-size: 12px; } }
@media (max-height: 450px) { .climb-release strong { font-size: 17px; } .climb-stats { margin-top: 3px; } .climb-hint { margin-top: 5px; font-size: 11px; } .mn-climb-end { gap: 6px; } .mn-climb-end__score { font-size: 44px; } }

/* the results card's side game button (tester round 14, 2026-11-19: a direct button that stands out from the others) */
.mn-btn.mn-btn--side { position: relative; background: #E0524A; color: var(--white); text-shadow: 0 2px 0 rgba(30, 27, 46, .28); }
.mn-btn.mn-btn--side:is(:hover, :focus-visible, .is-focus, .is-focused) { background: #E0524A; box-shadow: 6px 7px 0 var(--ink), 0 0 0 4px var(--paper-2), 0 0 0 7px var(--ink); }
.mn-btn.mn-btn--side .mn-new { right: -10px; top: -13px; }
.mn-in .mn-results__actions .mn-btn--side { animation: mn-side-nudge 2.6s ease-in-out 1.6s infinite; }
@keyframes mn-side-nudge { 0%, 78%, 100% { transform: none; } 84% { transform: translateY(-4px) rotate(-1.2deg); } 92% { transform: translateY(0) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .mn-in .mn-results__actions .mn-btn--side { animation: none; } }

/* ============ Calm pass (owner, 2026-11-20: "design in homepage feels cleaner, the rest are too big") ============
 * The homepage (app/site.css .hg-*) is the reference: rows set in from the edge, every row a name and a short line with
 * an arrow, no ring around the first button until a pad or the keys move, smaller headings in the panels. */
@media (min-width: 900px) and (min-height: 521px) {
  .mn-title__left { padding-left: clamp(0px, calc((100vw - 1200px) / 2 + 90px), 160px); }
}
/* (the list layout only: phones and short screens keep their tiles, ui/menus.css above) */
@media (min-width: 641px) and (min-height: 521px) {
.mn-title .mn-menu { width: min(360px, 100%); gap: clamp(10px, 1.5vh, 14px); }
.mn-title .mn-menu__item { min-height: clamp(52px, 7vh, 60px); padding-right: 40px; }
.mn-title .mn-menu__item.mn-btn--primary { min-height: clamp(60px, 8.4vh, 70px); }
.mn-title .mn-menu__badge { width: clamp(38px, 5.4vh, 44px); height: clamp(38px, 5.4vh, 44px); }
.mn-title .mn-menu__text { gap: 4px; }
.mn-title .mn-menu__text small { font-size: 12.5px; line-height: 1.15; }
/* the arrow on every row, faint until the row is picked (as on the homepage) */
.mn-title .mn-menu__item::after { opacity: .5; transform: translateX(0) rotate(45deg); width: 9px; height: 9px; right: 18px; }
.mn-title .mn-menu__item:is(:hover, :focus-visible, .is-focus, .is-focused)::after { opacity: 1; }
/* the first button: lifted when picked, the double ring only for a keyboard / pad (the homepage shows none at rest) */
.mn-title .mn-menu__item.mn-btn--primary:is(.is-focus, .is-focused):not(:focus-visible) { box-shadow: 6px 7px 0 var(--ink); }
}

/* the pause card and the panels: smaller headings, slimmer rows */
.mn-pause__title h2 { font-size: clamp(28px, 5vh, 40px); -webkit-text-stroke-width: 2px; text-shadow: 3px 3px 0 var(--ink); }
.mn[data-lang="ja"] .mn-pause__title h2, .mn-pause[data-fit] .mn-pause__title h2 { font-size: clamp(24px, 4.4vh, 34px); }
.mn-pause__menu .mn-btn { min-height: clamp(40px, 5.6vh, 46px); font-size: 16px; }
.mn-panel__head h2 { font-size: 26px; }
.mn-btn--lg { min-height: 52px; padding: 10px 26px; font-size: 19px; }
.mn-pause__menu .mn-btn:not(:is(:hover, :focus-visible, .is-focus, .is-focused)) { box-shadow: 3px 3px 0 var(--ink); }

/* the Sky Climb at night (world/climb.js): the HUD's words go light on the dark sky */
.climb-overlay.is-night { color: #fff8e8; text-shadow: 0 1px 0 #1e1b2e, 0 0 8px rgba(30, 27, 46, .8); }
.climb-overlay.is-night .climb-stats b { color: #ffc58c; }
.climb-overlay.is-night .climb-hint { color: #1e1b2e; text-shadow: none; }
