/* ANIU WORLD — menu & meta screens (title, world map, wardrobe, settings, pause, results, credits, confirm).
 * Sticker / toy language of aniu.world: 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: 'Aniu 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[data-lang="en"] {
  --f-display: 'Fredoka', 'ZCOOL KuaiLe', system-ui, sans-serif;
  --f-body: 'Fredoka', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 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[data-lang="en"] :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[data-lang="en"] .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; }
.mn-head__title span { font: 700 13px var(--f-latin); letter-spacing: .14em; color: var(--ink-3); }
.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; }
.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; }
.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[data-lang="zh"] .mn-title__epigraph { flex-direction: row-reverse; align-items: flex-start; max-width: none; }
.mn-title[data-lang="zh"] .mn-title__epigraph p { writing-mode: vertical-rl; height: 9.4em; font-size: 26px; letter-spacing: .12em; }
.mn-title[data-lang="zh"] .mn-title__epigraph cite { writing-mode: vertical-rl; letter-spacing: .2em; margin-top: auto; }
.mn-title[data-lang="en"] .mn-title__epigraph { top: auto; bottom: 12vh; text-align: right; }
.mn-title[data-lang="en"] .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); }

.mn-sitelink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  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: 16px; }
.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: 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[data-lang="en"] .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-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[data-lang="en"] .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; }
}

/* 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-dragging .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; }
.mn-node--home .mn-node__num .mn-ico { font-size: 22px; }

.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[data-lang="en"] .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[data-lang="en"] .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); }
.mn-closet__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); }
.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; }

.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); }
.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[data-lang="en"] .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[data-lang="en"] .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; }
.mn-dash { font-family: 'Aniu 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[data-lang="en"] .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[data-lang="en"] .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); }
.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 11.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[data-lang="en"] .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[data-lang="en"] .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[data-lang="en"] .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: hidden; background: radial-gradient(120% 90% at 50% 0%, #3A2F5E 0%, #231E38 55%, #16131F 100%); color: var(--white); }
.mn-credits__stars { position: absolute; inset: -10% 0 0; background-size: 420px 420px; opacity: .8; animation: mn-stars 120s linear infinite; }
@keyframes mn-stars { to { transform: translateY(10%); } }
.mn-credits__lanterns i { position: absolute; bottom: 0; width: 40px; height: 56px; opacity: 0; filter: drop-shadow(0 0 14px rgba(252, 161, 72, .75)); animation: mn-lantern var(--t, 24s) linear var(--d, 0s) infinite; }
.mn-credits__lanterns svg { width: 100%; height: 100%; display: block; }
@keyframes mn-lantern {
  0% { opacity: 0; transform: translate(0, 10vh) scale(var(--s, 1)) rotate(-4deg); }
  10% { opacity: .85; }
  50% { transform: translate(24px, -52vh) scale(var(--s, 1)) rotate(4deg); }
  85% { opacity: .75; }
  100% { opacity: 0; transform: translate(-10px, -115vh) scale(calc(var(--s, 1) * .8)) rotate(-3deg); }
}
.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[data-lang="en"] .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[data-lang="en"] .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[data-lang="en"] .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[data-lang="en"] .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 */
@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-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[data-lang="en"] .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__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 { 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 { font-size: 12.5px; padding: 4px 11px 4px 8px; }
  .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__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; }
  .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: 11.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; }
  .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[data-lang="en"] .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 { min-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; }
}
