/* ==========================================================================
   MAMAIV — "Only Mine" (mam + eva)
   Retro 90s Ghibli Sunlit Wood & Golden-Hour Room Aesthetic
   Sampled directly from the cozy sunlit window & cushions reference palette
   ========================================================================== */

:root {
  --font-sans: "Host Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Retro Ghibli Golden-Hour Room & Warm Wood Palette (Default) */
  --bg-page: #ead5b3;
  --bg-page-gradient:
    /* Diagonal Golden Window Sunbeams */
    linear-gradient(125deg,
      rgba(255, 247, 210, 0.65) 0%,
      rgba(255, 238, 175, 0.35) 22%,
      transparent 42%,
      rgba(255, 242, 190, 0.32) 56%,
      transparent 74%
    ),
    /* Warm Toasted Parchment & Honey Wood Room Wash */
    linear-gradient(180deg, #f5e5c6 0%, #ebd4b0 48%, #dfbfa0 100%);

  --bg-surface: #fbf2e1;
  --bg-surface-elevated: #fff8eb;
  --bg-stage: #f0dec0;
  /* Diagonal Window Sunlight Stage Pedestal */
  --bg-stage-radial:
    linear-gradient(130deg, rgba(255, 252, 232, 0.72) 0%, rgba(255, 240, 185, 0.28) 38%, transparent 62%),
    radial-gradient(circle at 62% 35%, #fff9e6 0%, #f1ddb9 65%, #e2c59b 100%);
  --bg-pill: #e2caa5;
  --bg-glass: rgba(246, 231, 203, 0.9);

  /* Hand-Inked 90s Anime Cel-Shaded Walnut & Mahogany Ink */
  --ink: #2c1b12;
  --ink-secondary: #5c3f2e;
  --ink-muted: #87654f;
  --ink-outline: #3f281b;
  --border-hairline: rgba(63, 40, 27, 0.22);
  --border-strong: #4a3021;

  /* Sampled Cushion, Curtain & Dress Accents from Reference Painting */
  --accent-terracotta: #c85832;      /* Rust Fringe Throw Blanket & Mug */
  --accent-terracotta-soft: rgba(200, 88, 50, 0.16);
  --accent-olive: #5e7847;           /* Mossy Green Sunlit Cushion */
  --accent-olive-soft: rgba(94, 120, 71, 0.18);
  --accent-rose: #9e4750;            /* Dusty Berry-Rose Embroidered Cushion */
  --accent-rose-soft: rgba(158, 71, 80, 0.15);
  --accent-denim: #4d5b70;           /* Vintage Slate-Denim Apron Dress */
  --accent-denim-soft: rgba(77, 91, 112, 0.16);
  --accent-sun: #e8b44c;             /* Golden Window Cushion & Sunbeam */
  --accent-sun-glow: rgba(244, 196, 88, 0.55);

  --card-radius: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Retro Cel-Shaded Tactile Wood Shadow */
  --shadow-card: 3px 4px 0px rgba(58, 36, 24, 0.15), 0 10px 24px -10px rgba(58, 36, 24, 0.12);
  --shadow-card-hover: 5px 7px 0px rgba(58, 36, 24, 0.24), 0 16px 32px -10px rgba(58, 36, 24, 0.2);
}

/* Cozy Evening Lamp-Lit Mahogany Study Theme */
html[data-theme="noir"] {
  --bg-page: #1f1510;
  --bg-page-gradient:
    radial-gradient(circle at 75% 20%, rgba(242, 169, 75, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, #1b120e 0%, #241813 52%, #2c1d16 100%);
  --bg-surface: #2d1f18;
  --bg-surface-elevated: #36251d;
  --bg-stage: #38271e;
  --bg-stage-radial: radial-gradient(circle at 60% 35%, #4d3527 0%, #33231b 70%, #281b15 100%);
  --bg-pill: #3b2920;
  --bg-glass: rgba(33, 22, 17, 0.9);

  --ink: #f7ead4;
  --ink-secondary: #cbb296;
  --ink-muted: #967b63;
  --ink-outline: #6b4c39;
  --border-hairline: rgba(242, 188, 102, 0.2);
  --border-strong: #855e45;

  --accent-terracotta: #e37249;
  --accent-terracotta-soft: rgba(227, 114, 73, 0.2);
  --accent-olive: #82a364;
  --accent-olive-soft: rgba(130, 163, 100, 0.2);
  --accent-rose: #c76b74;
  --accent-denim: #7b8da6;
  --accent-sun: #f2be5c;
  --accent-sun-glow: rgba(242, 190, 92, 0.4);

  --shadow-card: 3px 4px 0px rgba(10, 6, 4, 0.45), 0 12px 28px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 5px 7px 0px rgba(10, 6, 4, 0.65), 0 18px 36px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  background-image: var(--bg-page-gradient);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open,
body.portal-active {
  overflow: hidden;
}

::selection {
  background: var(--accent-terracotta);
  color: #fff8eb;
}

button {
  appearance: none;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p, figure, h1, h2, h3, h4 {
  margin: 0;
}

.sr-only {
  clip-path: inset(50%);
  white-space: nowrap;
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
}

/* ==========================================================================
   0. Interactive Glowing Sun Landing Portal (.mm-sun-portal)
   Retro 90s Ghibli Sunlit Attic Window Room
   ========================================================================== */
.mm-sun-portal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    /* Diagonal Window Sunbeams */
    linear-gradient(128deg,
      rgba(255, 249, 212, 0.78) 0%,
      rgba(255, 232, 158, 0.42) 28%,
      transparent 52%
    ),
    radial-gradient(circle at 50% 44%, #fff3c4 0%, #ebd09e 48%, #c99d6e 88%, #9e714c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  transition: opacity 0.85s var(--ease-out), visibility 0.85s;
}

html[data-theme="noir"] .mm-sun-portal {
  background:
    radial-gradient(circle at 50% 44%, #543724 0%, #2e1e15 55%, #1a110c 100%);
}

.mm-sun-portal[data-dismissed="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Retro Wooden Window Frame Silhouette in Portal Background */
.mm-portal-window-frame {
  position: absolute;
  inset: 18px;
  border: 3px solid rgba(74, 48, 33, 0.28);
  border-radius: 18px;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(74, 48, 33, 0.18);
}

/* Floating Golden Dust Motes (like in the reference image!) */
.mm-dust-mote {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fffbe0;
  box-shadow: 0 0 10px 3px rgba(255, 224, 112, 0.85);
  pointer-events: none;
  animation: mm-mote-float 9s ease-in-out infinite alternate;
}

@keyframes mm-mote-float {
  0% { transform: translateY(0) translateX(0) scale(0.85); opacity: 0.55; }
  50% { opacity: 1; }
  100% { transform: translateY(-28px) translateX(16px) scale(1.15); opacity: 0.7; }
}

/* Painted Ghibli Clouds in Portal */
.mm-ghibli-cloud {
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
  animation: mm-cloud-drift 28s ease-in-out infinite alternate;
}

.mm-ghibli-cloud-1 {
  top: 10%;
  left: 6%;
  width: clamp(180px, 24vw, 320px);
}

.mm-ghibli-cloud-2 {
  top: 16%;
  right: 7%;
  width: clamp(200px, 26vw, 360px);
  animation-duration: 34s;
  animation-direction: alternate-reverse;
}

@keyframes mm-cloud-drift {
  0% { transform: translateX(-18px) translateY(0); }
  100% { transform: translateX(22px) translateY(-8px); }
}

/* Cozy Window Sill & Cushion Silhouette at Bottom of Portal */
.mm-portal-meadow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: clamp(85px, 14vh, 155px);
  pointer-events: none;
  z-index: 1;
}

.mm-portal-meadow svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Portal Center Content */
.mm-portal-center {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 650px;
}

.mm-portal-etymology-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 999px;
  background: #fbf2e1;
  border: 1.5px solid #4a3021;
  box-shadow: 2px 3px 0px rgba(58, 36, 24, 0.2);
  color: #2c1b12;
  margin-bottom: 26px;
}

html[data-theme="noir"] .mm-portal-etymology-pill {
  background: #2d1f18;
  color: #f2be5c;
  border-color: #855e45;
}

/* The Interactive Glowing Golden-Hour Sun Ball */
.mm-sun-orb-wrap {
  position: relative;
  width: 215px;
  height: 215px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 26px;
}

.mm-sun-corona-1,
.mm-sun-corona-2 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.mm-sun-corona-1 {
  width: 225px;
  height: 225px;
  background: radial-gradient(circle, rgba(255, 224, 115, 0.7) 0%, rgba(224, 130, 56, 0.25) 55%, transparent 75%);
  animation: mm-sun-pulse 3.6s ease-in-out infinite;
}

.mm-sun-corona-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 236, 160, 0.45) 0%, rgba(200, 88, 50, 0.12) 55%, transparent 75%);
  animation: mm-sun-pulse 5.2s ease-in-out infinite reverse;
}

.mm-sun-rays-svg {
  position: absolute;
  width: 255px;
  height: 255px;
  pointer-events: none;
  animation: mm-sun-spin 36s linear infinite;
}

@keyframes mm-sun-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes mm-sun-pulse {
  0%, 100% { transform: scale(0.94); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; }
}

.mm-sun-orb-btn {
  position: relative;
  z-index: 3;
  width: 146px;
  height: 146px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fffef4 0%, #ffe074 36%, #eb9c28 74%, #c85832 100%);
  border: 2px solid #4a3021;
  box-shadow:
    0 0 42px 14px rgba(255, 208, 84, 0.75),
    0 0 100px 32px rgba(235, 156, 40, 0.42),
    inset 0 4px 16px #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  cursor: pointer;
}

.mm-sun-orb-btn:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 60px 22px rgba(255, 218, 96, 0.92),
    0 0 135px 48px rgba(235, 156, 40, 0.6),
    inset 0 4px 20px #ffffff;
}

.mm-sun-orb-label {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #2c1b12;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mm-sun-orb-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5c2810;
  font-weight: 600;
  margin-top: 3px;
}

/* Full-Screen Golden Sunlight Expansion Bloom when Clicked */
.mm-sun-portal[data-expanding="true"] .mm-sun-orb-btn {
  transform: scale(32);
  border-color: transparent;
  background: radial-gradient(circle, #fffef7 0%, #ffea94 45%, #f0a830 100%);
  box-shadow: 0 0 220px 110px #fffDF2;
  transition: transform 0.95s cubic-bezier(0.4, 0, 0.2, 1), background 0.6s ease;
}

.mm-sun-portal[data-expanding="true"] .mm-sun-orb-label,
.mm-sun-portal[data-expanding="true"] .mm-sun-orb-sub,
.mm-sun-portal[data-expanding="true"] .mm-portal-copy,
.mm-sun-portal[data-expanding="true"] .mm-portal-etymology-pill {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mm-portal-copy {
  transition: opacity 0.3s ease;
}

.mm-portal-title {
  font-family: var(--font-serif);
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: #2c1b12;
  line-height: 1.05;
  text-shadow: 0 1px 0 rgba(255, 250, 235, 0.6);
}

html[data-theme="noir"] .mm-portal-title {
  color: #f7ead4;
  text-shadow: none;
}

.mm-portal-roots {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 23px);
  color: #a63d1e;
  font-weight: 500;
}

html[data-theme="noir"] .mm-portal-roots {
  color: #f2be5c;
}

.mm-portal-hint {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #5c3f2e;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html[data-theme="noir"] .mm-portal-hint {
  color: #cbb296;
}

/* Quick Jump Chips inside Portal Footer (Ordered: Stocks, Travel, Art, Things, Music) */
.mm-portal-quicklinks {
  margin-top: 22px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.mm-portal-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: #fbf2e1;
  border: 1.5px solid #4a3021;
  box-shadow: 2px 2px 0px rgba(58, 36, 24, 0.18);
  font-size: 12.5px;
  font-weight: 600;
  color: #2c1b12;
  transition: all 0.18s;
}

.mm-portal-chip:hover {
  background: #fff8eb;
  transform: translateY(-2px);
  box-shadow: 3px 4px 0px rgba(58, 36, 24, 0.26);
}

/* ==========================================================================
   Page Shell & Editorial Grid Container
   ========================================================================== */
.mm-shell {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3.2vw, 52px) 96px;
  min-height: 100dvh;
}

/* ==========================================================================
   1. Top Editorial Masthead & Floating World Navigation
   ========================================================================== */
.mm-masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  border-bottom: 1.5px solid var(--border-hairline);
  margin: 0 calc(-1 * clamp(18px, 3.2vw, 52px));
  padding: 12px clamp(18px, 3.2vw, 52px);
}

.mm-masthead-inner {
  max-width: 1420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mm-brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-logo {
  font-family: var(--font-serif);
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mm-sun-mini-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffef2 0%, #fbd043 52%, #c85832 100%);
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 0 12px rgba(232, 180, 76, 0.75);
  display: inline-grid;
  place-items: center;
  font-size: 14px;
  color: #2c1b12;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}

.mm-sun-mini-btn:hover {
  transform: scale(1.12) rotate(25deg);
  box-shadow: 0 0 18px rgba(232, 180, 76, 0.98);
}

.mm-logo-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-terracotta-soft);
  border: 1px solid rgba(200, 88, 50, 0.3);
  color: var(--accent-terracotta);
  font-weight: 600;
}

/* Segmented Chapter / World Dock */
.mm-worlds-dock {
  display: flex;
  align-items: center;
  background: var(--bg-pill);
  padding: 4px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  box-shadow: 2px 2px 0px rgba(58, 36, 24, 0.14);
  gap: 2px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}

.mm-worlds-dock::-webkit-scrollbar {
  display: none;
}

.mm-world-tab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s var(--ease-out);
}

.mm-world-tab:hover {
  color: var(--ink);
}

.mm-world-tab[data-active="true"] {
  background: var(--bg-surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  box-shadow: 1px 2px 0px rgba(58, 36, 24, 0.15);
  font-weight: 600;
}

.mm-world-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-terracotta);
  font-weight: 700;
}

.mm-world-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-secondary);
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(63, 40, 27, 0.1);
}

.mm-masthead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mm-icon-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  box-shadow: 2px 2px 0px rgba(58, 36, 24, 0.14);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.18s var(--ease-out);
}

.mm-icon-btn:hover {
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
  box-shadow: 3px 3px 0px rgba(58, 36, 24, 0.22);
}

/* ==========================================================================
   2. HOME SANCTUARY VIEW (.mm-home-view): Etymology, Mini-Thesis & Portals
   ========================================================================== */
.mm-home-view {
  padding-top: clamp(28px, 4vw, 48px);
}

/* Top Etymology & Cozy Sunlit Window Room Banner */
.mm-home-banner {
  position: relative;
  border-radius: 18px;
  background:
    linear-gradient(125deg, rgba(255, 249, 210, 0.75) 0%, rgba(248, 224, 166, 0.45) 45%, rgba(218, 168, 118, 0.35) 100%),
    var(--bg-surface);
  border: 2px solid var(--border-strong);
  padding: clamp(26px, 4vw, 48px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 32px;
  align-items: center;
}

html[data-theme="noir"] .mm-home-banner {
  background: linear-gradient(135deg, #332219 0%, #291c15 55%, #211610 100%);
}

@media (max-width: 860px) {
  .mm-home-banner {
    grid-template-columns: 1fr;
  }
}

.mm-etymology-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-strong);
  color: var(--accent-terracotta);
  font-weight: 600;
  margin-bottom: 16px;
}

.mm-etymology-headline {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.8vw, 60px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink);
}

.mm-etymology-headline em {
  font-style: italic;
  color: var(--accent-terracotta);
}

.mm-etymology-equation {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  border: 1.5px dashed var(--border-strong);
  font-family: var(--font-mono);
  font-size: 13px;
}

.mm-eq-part {
  font-weight: 600;
  color: var(--ink);
}

.mm-eq-meaning {
  color: var(--accent-terracotta);
  font-weight: 700;
}

.mm-etymology-sub {
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.58;
  color: var(--ink-secondary);
  max-width: 54ch;
}

.mm-home-illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Published Mini-Thesis Section */
.mm-thesis-paper {
  margin-top: 32px;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: 18px;
  padding: clamp(26px, 4vw, 46px);
  box-shadow: var(--shadow-card);
  position: relative;
}

.mm-thesis-header {
  max-width: 820px;
  margin-bottom: 26px;
}

.mm-thesis-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-terracotta);
  font-weight: 600;
  margin-bottom: 8px;
}

.mm-thesis-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.mm-thesis-lead {
  margin-top: 14px;
  font-size: clamp(15.5px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--ink-secondary);
}

/* 3 Pillars tinted like the 3 Ghibli Cushions in the Reference Painting! */
.mm-thesis-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1.5px dashed var(--border-hairline);
}

.mm-pillar-card {
  background: var(--bg-stage-radial);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 2px 3px 0px rgba(58, 36, 24, 0.12);
}

.mm-pillar-card:nth-child(1) {
  border-top: 5px solid var(--accent-terracotta); /* Rust Blanket */
}
.mm-pillar-card:nth-child(2) {
  border-top: 5px solid var(--accent-olive);      /* Mossy Green Cushion */
}
.mm-pillar-card:nth-child(3) {
  border-top: 5px solid var(--accent-rose);       /* Dusty Berry Cushion */
}

.mm-pillar-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-terracotta);
  font-weight: 700;
}

.mm-pillar-heading {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  margin: 8px 0;
  color: var(--ink);
}

.mm-pillar-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.mm-thesis-footer {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1.5px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mm-thesis-closing {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-secondary);
  max-width: 66ch;
}

/* 5 World Portals Grid on Home Page (Ordered: Stocks, Travel, Art, Things, Music) */
.mm-portals-heading {
  margin-top: 44px;
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.mm-portals-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
}

.mm-portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 18px;
}

.mm-portal-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 20px 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

/* Distinct Retro Ghibli Cushion Accent Tops for the 5 Chapters */
.mm-portal-card:nth-child(1) { border-top: 5px solid var(--accent-terracotta); } /* 01 Stocks: Rust Blanket */
.mm-portal-card:nth-child(2) { border-top: 5px solid var(--accent-olive); }      /* 02 Travel: Moss Cushion */
.mm-portal-card:nth-child(3) { border-top: 5px solid var(--accent-rose); }       /* 03 Art: Berry Cushion */
.mm-portal-card:nth-child(4) { border-top: 5px solid var(--accent-sun); }        /* 04 Things: Mustard Cushion */
.mm-portal-card:nth-child(5) { border-top: 5px solid var(--accent-denim); }      /* 05 Music: Slate Denim */

.mm-portal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  background: var(--bg-surface-elevated);
}

.mm-portal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-terracotta);
}

.mm-portal-card-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}

.mm-portal-card-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.mm-portal-card-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   3. Chapter Hero Banner (For Stocks, Travel, Art, Things, Music)
   ========================================================================== */
.mm-hero {
  padding: clamp(28px, 4vw, 50px) 0 clamp(22px, 2.5vw, 32px);
  border-bottom: 1.5px solid var(--border-hairline);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: end;
}

@media (max-width: 900px) {
  .mm-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 20px;
  }
}

.mm-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-terracotta);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mm-hero-eyebrow::before {
  content: "☀";
  color: var(--accent-terracotta);
}

.mm-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ink);
}

.mm-hero-blurb {
  margin-top: 14px;
  font-size: clamp(15px, 1.15vw, 17.5px);
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 58ch;
}

.mm-hero-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

@media (max-width: 900px) {
  .mm-hero-controls {
    align-items: flex-start;
  }
}

/* Ownership / Status Filter Segmented Bar */
.th-own {
  background: var(--bg-pill);
  padding: 4px;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  box-shadow: 2px 2px 0px rgba(58, 36, 24, 0.14);
  display: inline-flex;
  position: relative;
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
}

.th-own-pill {
  transition: transform 0.25s var(--ease-out), width 0.25s var(--ease-out);
  will-change: transform, width;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  box-shadow: 1px 1px 0px rgba(58, 36, 24, 0.12);
  pointer-events: none;
}

.th-own-btn {
  z-index: 1;
  height: 32px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s var(--ease-out);
}

.th-own-btn[aria-checked="true"] {
  color: var(--ink);
  font-weight: 700;
}

.th-own-n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* Status Indicator Dots */
.th-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.th-mark[data-state="primary"] {
  background: var(--accent-olive);
  border: 1px solid var(--border-strong);
}

.th-mark[data-state="wish"] {
  background: var(--accent-sun);
  border: 1.5px solid var(--accent-terracotta);
}

.th-mark[data-state="former"] {
  background: var(--accent-rose);
  opacity: 0.75;
}

.mm-subcontrols {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mm-pill-group {
  background: var(--bg-pill);
  padding: 3px;
  border-radius: 8px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.mm-pill-btn {
  padding: 4px 10px;
  border-radius: 5px;
  color: var(--ink-secondary);
  transition: all 0.15s;
}

.mm-pill-btn[data-active="true"] {
  background: var(--bg-surface);
  color: var(--ink);
  font-weight: 700;
  border: 1px solid var(--border-strong);
}

.th-tally {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding-left: 4px;
}

/* ==========================================================================
   4. Category Filter Ribbon (.mm-cat-ribbon)
   ========================================================================== */
.mm-cat-ribbon {
  padding: 16px 0;
  border-bottom: 1.5px solid var(--border-hairline);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mm-cat-ribbon::-webkit-scrollbar {
  display: none;
}

.th-cat {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  box-shadow: 2px 2px 0px rgba(58, 36, 24, 0.12);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: all 0.18s var(--ease-out);
}

.th-cat:hover {
  background: var(--bg-surface-elevated);
  color: var(--ink);
  transform: translateY(-1px);
}

.th-cat[data-active="true"] {
  background: var(--accent-terracotta);
  color: #fff8eb;
  border-color: var(--border-strong);
}

.th-cat[data-empty="true"]:not([data-active="true"]) {
  opacity: 0.45;
}

.th-cat-n {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.85;
}

/* ==========================================================================
   5. Tactile Collector Cards Grid (.mm-grid)
   ========================================================================== */
.mm-grid {
  margin-top: clamp(24px, 3vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: clamp(18px, 2vw, 26px);
}

.mm-card-item {
  display: flex;
}

.mm-card-item[data-wide="true"] {
  grid-column: span 2;
}

@media (max-width: 720px) {
  .mm-card-item[data-wide="true"] {
    grid-column: span 1;
  }
}

.mm-card-link {
  width: 100%;
  text-decoration: none;
  color: inherit;
  display: flex;
}

.mm-card {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s;
}

.mm-card:hover {
  transform: translate(-2px, -4px);
  box-shadow: var(--shadow-card-hover);
  background: var(--bg-surface-elevated);
}

.mm-card-top {
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1.5px solid var(--border-hairline);
  background: rgba(226, 202, 165, 0.28);
  font-family: var(--font-mono);
  font-size: 11px;
}

.mm-card-cat {
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mm-card-serial {
  color: var(--accent-terracotta);
  font-weight: 700;
}

.mm-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(63, 40, 27, 0.2);
}

.mm-card-badge[data-state="primary"] {
  background: var(--accent-olive-soft);
  color: var(--accent-olive);
}

.mm-card-badge[data-state="wish"] {
  background: rgba(232, 180, 76, 0.25);
  color: #9a441d;
}

html[data-theme="noir"] .mm-card-badge[data-state="wish"] {
  color: #f2be5c;
}

.mm-card-badge[data-state="former"] {
  background: var(--accent-rose-soft);
  color: var(--accent-rose);
}

/* Sunlit Window Pedestal Stage inside Card */
.th-stage {
  height: 220px;
  background: var(--bg-stage-radial);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
  overflow: hidden;
}

.mm-card-item[data-wide="true"] .th-stage {
  height: 235px;
}

.th-stage::before {
  content: "✦";
  position: absolute;
  top: 9px;
  left: 13px;
  font-size: 11px;
  color: var(--accent-terracotta);
  opacity: 0.45;
}

.th-stage::after {
  content: "✦";
  position: absolute;
  bottom: 9px;
  right: 13px;
  font-size: 11px;
  color: var(--accent-olive);
  opacity: 0.45;
}

.th-obj {
  width: calc(var(--s, 0.75) * 100%);
  height: calc(var(--s, 0.75) * 100%);
  max-height: 176px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.38s var(--ease-out);
}

.mm-card:hover .th-obj {
  transform: translateY(-5px) scale(1.04);
}

.th-img, .th-svg-wrap {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
}

.th-svg-wrap svg {
  width: 100%;
  height: 100%;
  max-height: 170px;
  overflow: visible;
  display: block;
}

.th-shadow {
  width: 62%;
  height: 10px;
  background: radial-gradient(closest-side, rgba(58, 36, 24, 0.24), transparent);
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.38s var(--ease-out), opacity 0.38s var(--ease-out);
  pointer-events: none;
}

.mm-card:hover .th-shadow {
  transform: translateX(-50%) scale(0.82);
  opacity: 0.45;
}

.mm-card-body {
  padding: 16px 18px 18px;
  border-top: 1.5px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.mm-card-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-terracotta);
  font-weight: 700;
}

.mm-card-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.mm-card-hook {
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.mm-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1.5px dashed var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mm-card-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.mm-card-cta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-olive);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.18s, transform 0.18s;
}

.mm-card:hover .mm-card-cta {
  color: var(--accent-terracotta);
  transform: translateX(2px);
}

/* ==========================================================================
   6. Editorial Index / Table View Mode
   ========================================================================== */
.mm-index-list {
  margin-top: 24px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--card-radius);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.mm-index-row {
  display: grid;
  grid-template-columns: 52px 1.4fr 1.8fr 120px 130px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-hairline);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.mm-index-row:last-child {
  border-bottom: 0;
}

.mm-index-row:hover {
  background: var(--bg-stage);
}

@media (max-width: 820px) {
  .mm-index-row {
    grid-template-columns: 44px 1fr auto;
  }
  .mm-index-hook, .mm-index-cat {
    display: none;
  }
}

.mm-index-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-stage);
  border: 1px solid var(--border-hairline);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mm-index-thumb svg, .mm-index-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   7. Concise Detail Modal + IG 4:5 Post Card Mode
   ========================================================================== */
.mm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(34, 21, 14, 0.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 36px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease-out);
}

.mm-modal-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.mm-modal {
  width: min(680px, 100%);
  max-height: min(88dvh, 860px);
  overflow-y: auto;
  background: var(--bg-surface);
  color: var(--ink);
  border: 2px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 6px 8px 0px rgba(44, 27, 18, 0.35), 0 28px 70px -16px rgba(0, 0, 0, 0.4);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.28s var(--ease-out), width 0.28s var(--ease-out);
  position: relative;
  display: flex;
  flex-direction: column;
}

.mm-modal-backdrop[data-open="true"] .mm-modal {
  transform: translateY(0) scale(1);
}

.mm-modal[data-ig-mode="true"] {
  width: min(460px, 100%);
  border: 2.5px solid var(--border-strong);
  border-radius: 14px;
}

.mm-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1.5px solid var(--border-hairline);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 5;
}

.mm-modal-crumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mm-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mm-ig-toggle {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-pill);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.mm-ig-toggle[data-active="true"] {
  background: var(--accent-terracotta);
  color: #fff8eb;
  border-color: var(--border-strong);
}

.mm-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--bg-pill);
}

.mm-modal-body {
  padding: clamp(20px, 3vw, 32px);
}

.mm-modal-stage {
  height: 210px;
  background: var(--bg-stage-radial);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  position: relative;
  border: 1.5px solid var(--border-strong);
  padding: 18px;
}

.mm-modal-stage-inner {
  width: 220px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mm-modal-stage-inner svg, .mm-modal-stage-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mm-modal-header {
  margin-bottom: 18px;
}

.mm-modal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-pill);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  margin-bottom: 10px;
}

.mm-modal-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.mm-modal-subtitle {
  font-size: 14.5px;
  color: var(--ink-secondary);
  margin-top: 6px;
}

.mm-hook-box {
  padding: 14px 16px;
  background: var(--bg-stage);
  border-left: 4px solid var(--accent-terracotta);
  border-radius: 0 10px 10px 0;
  font-size: 15px;
  line-height: 1.52;
  color: var(--ink);
  margin-bottom: 20px;
}

.mm-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.mm-metric-cell {
  background: var(--bg-stage);
  border: 1.5px solid var(--border-hairline);
  border-radius: 10px;
  padding: 10px 12px;
}

.mm-metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  display: block;
}

.mm-metric-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 3px;
  display: block;
}

.mm-section-block {
  margin-bottom: 18px;
}

.mm-section-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-terracotta);
  margin-bottom: 10px;
  font-weight: 700;
}

.mm-bullet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mm-bullet-item {
  font-size: 14.5px;
  line-height: 1.52;
  color: var(--ink);
  padding-left: 18px;
  position: relative;
}

.mm-bullet-item::before {
  content: "✦";
  font-size: 10px;
  position: absolute;
  left: 0;
  top: 3px;
  color: var(--accent-terracotta);
}

.mm-modal-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1.5px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mm-ig-watermark {
  display: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  padding-top: 12px;
  border-top: 1.5px solid var(--border-strong);
  justify-content: space-between;
  align-items: center;
}

.mm-modal[data-ig-mode="true"] .mm-ig-watermark {
  display: flex;
}

.mm-btn-primary {
  background: var(--accent-terracotta);
  color: #fff8eb;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  box-shadow: 2px 2px 0px rgba(58, 36, 24, 0.22);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mm-btn-secondary {
  background: var(--bg-pill);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  border: 1.5px solid var(--border-strong);
  box-shadow: 2px 2px 0px rgba(58, 36, 24, 0.14);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   8. Quick Search Command Palette (/ or ⌘K)
   ========================================================================== */
.mm-search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(34, 21, 14, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s var(--ease-out);
}

.mm-search-backdrop[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.mm-search-box {
  width: min(560px, 100%);
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 6px 8px 0px rgba(44, 27, 18, 0.35), 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.mm-search-input-wrap {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1.5px solid var(--border-hairline);
  gap: 10px;
}

.mm-search-input {
  width: 100%;
  border: 0;
  outline: none;
  font-family: var(--font-sans);
  font-size: 15.5px;
  color: var(--ink);
  background: transparent;
}

.mm-search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.mm-search-item {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mm-search-item:hover {
  background: var(--bg-stage);
}

.mm-search-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-search-item-world {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-pill);
  border: 1px solid var(--border-hairline);
  color: var(--ink-secondary);
}

.th-empty {
  grid-column: 1 / -1;
  padding: 64px 20px;
  text-align: center;
  color: var(--ink-secondary);
  font-size: 18px;
}

.th-reset {
  color: var(--accent-terracotta);
  text-decoration: underline;
  font-weight: 600;
}

/* Footer */
.mm-footer {
  margin-top: clamp(64px, 8vw, 110px);
  padding-top: 24px;
  border-top: 1.5px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.mm-footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.mm-footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.mm-footer-links a:hover {
  color: var(--accent-terracotta);
}
