/*
 * Monvshe public skin (home + ordinary posts).
 * Every rule is scoped under body.mv-public and uses explicit mv- components, except the
 * reused legacy islands (header action area, search form, off-canvas drawer, pagination,
 * #mmp-resource card, comments, widgets) which are restyled strictly as descendants of
 * body.mv-public. No remote fonts/assets. Dark theme only (approved design).
 */

/* ---------- Tokens ---------- */
body.mv-public {
  --mv-primary: #a078ff;
  --mv-primary-strong: #8b5cf6;
  --mv-primary-text: #d0bcff;
  --mv-primary-soft: rgba(139, 92, 246, .18);
  --mv-secondary: #4edea3;
  --mv-secondary-soft: rgba(78, 222, 163, .14);
  --mv-accent: #e7c356;
  --mv-bg: #0d0b14;
  --mv-surface: #14121b;
  --mv-surface-1: #1c1a24;
  --mv-surface-2: #211e28;
  --mv-surface-3: #2b2933;
  --mv-border: rgba(255, 255, 255, .09);
  --mv-border-strong: rgba(160, 120, 255, .5);
  --mv-text: #e6e0ee;
  --mv-text-muted: #cbc3d7;
  --mv-text-dim: #a49cb3;
  --mv-danger: #ffb4ab;
  --mv-radius-sm: 6px;
  --mv-radius: 12px;
  --mv-radius-lg: 18px;
  --mv-gap: 1.5rem;
  --mv-container: 1280px;
  --mv-pad: 2rem;
  --mv-header-h: 72px;
  --mv-glow: 0 0 0 1px var(--mv-border-strong), 0 10px 28px rgba(0, 0, 0, .5);
  --mv-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mv-ease: .2s ease;

  background-color: var(--mv-bg);
  color: var(--mv-text);
  font-family: var(--mv-font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.mv-public *, body.mv-public *::before, body.mv-public *::after { box-sizing: border-box; }
body.mv-public .mv-main { display: block; min-height: 60vh; background: var(--mv-bg); overflow-x: clip; } /* clip (not hidden) keeps the sticky header working; guards 360px overflow from legacy islands */

/* ---------- Shared bits ---------- */
body.mv-public .mv-container { width: 100%; max-width: var(--mv-container); margin-inline: auto; padding-inline: var(--mv-pad); }
body.mv-public .mv-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.mv-public .mv-skip { position: fixed; inset-inline-start: 12px; top: -4rem; z-index: 1200; padding: .5rem 1rem; background: var(--mv-primary-strong); color: #fff; border-radius: var(--mv-radius-sm); text-decoration: none; }
body.mv-public .mv-skip:focus { top: 12px; }
body.mv-public .mv-link { color: var(--mv-primary-text); }
body.mv-public .mv-link:hover { color: var(--mv-accent); }
body.mv-public .mv-empty { padding: 2.5rem 1rem; text-align: center; color: var(--mv-text-dim); background: var(--mv-surface-1); border: 1px dashed var(--mv-border); border-radius: var(--mv-radius); }
body.mv-public .mv-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: .15rem .8rem; border-radius: 999px;
  background: var(--mv-surface-3); border: 1px solid var(--mv-border); color: var(--mv-text-muted); font-size: .8125rem; text-decoration: none;
  transition: color var(--mv-ease), border-color var(--mv-ease);
}
body.mv-public .mv-chip:hover { color: var(--mv-primary-text); border-color: var(--mv-border-strong); }
body.mv-public .mv-badge {
  display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.5;
  background: rgba(20, 18, 27, .85); color: var(--mv-primary-text); border: 1px solid var(--mv-border-strong);
}
body.mv-public .mv-badge--gold { color: var(--mv-accent); border-color: rgba(231, 195, 86, .5); }
body.mv-public .mv-badge--icon { padding-inline: .5rem; }

/* Focus (keyboard) */
body.mv-public .mv-header a:focus-visible, body.mv-public .mv-header button:focus-visible, body.mv-public .mv-header input:focus-visible,
body.mv-public .mv-header select:focus-visible, body.mv-public .mv-header [tabindex]:focus-visible,
body.mv-public .mv-main a:focus-visible, body.mv-public .mv-main button:focus-visible, body.mv-public .mv-main input:focus-visible,
body.mv-public .mv-main select:focus-visible, body.mv-public .mv-main textarea:focus-visible, body.mv-public .mv-main [tabindex]:focus-visible,
body.mv-public .mv-footer a:focus-visible, body.mv-public .mv-cta-bar button:focus-visible, body.mv-public .off-canvas a:focus-visible {
  outline: 2px solid var(--mv-accent); outline-offset: 2px;
}

/* ---------- Announcement bar ---------- */
body.mv-public .mv-announce { background: var(--mv-surface); border-bottom: 1px solid var(--mv-border); font-size: .8125rem; }
body.mv-public .mv-announce__inner { display: flex; align-items: center; gap: .75rem; max-width: var(--mv-container); margin-inline: auto; padding: .35rem var(--mv-pad); min-height: 36px; }
body.mv-public .mv-announce__tag { flex: none; color: var(--mv-accent); font-weight: 700; }
body.mv-public .mv-announce__text { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--mv-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.mv-public .mv-announce__more { flex: none; background: none; border: 0; padding: .25rem .5rem; color: var(--mv-primary-text); cursor: pointer; font: inherit; }
body.mv-public .mv-announce__more:hover { text-decoration: underline; }

/* ---------- Header ---------- */
body.mv-public .mv-header { position: sticky; top: 0; z-index: 1000; background: rgba(13, 11, 20, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--mv-border); box-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
body.admin-bar.mv-public .mv-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar.mv-public .mv-header { top: 46px; } }
body.mv-public .mv-header__bar { position: relative; }
body.mv-public .mv-header__inner { display: flex; align-items: center; gap: 1.5rem; height: var(--mv-header-h); max-width: var(--mv-container); margin-inline: auto; padding-inline: var(--mv-pad); }
body.mv-public .mv-logo { display: inline-flex; align-items: center; flex: none; line-height: 0; }
body.mv-public .mv-logo img { display: block; height: 56px; width: auto; max-width: none; object-fit: contain; }
body.mv-public .mv-logo--footer img { height: 72px; }

body.mv-public .mv-nav { flex: 1 1 auto; min-width: 0; display: block; margin: 0; padding: 0; background: none; }
body.mv-public .mv-nav .nav-list { display: flex; flex-wrap: nowrap; align-items: center; gap: .25rem; margin: 0; padding: 0; list-style: none; }
body.mv-public .mv-nav .nav-list > li { position: relative; margin: 0; padding: 0; }
body.mv-public .mv-nav .nav-list > li > a { display: inline-flex; align-items: center; gap: .25rem; min-height: 44px; padding: 0 .85rem; color: var(--mv-text-muted); font-weight: 600; font-size: .9375rem; line-height: 1.2; white-space: nowrap; text-decoration: none; border-radius: var(--mv-radius-sm); background: none; transition: color var(--mv-ease), background-color var(--mv-ease); }
body.mv-public .mv-nav .nav-list > li > a:hover,
body.mv-public .mv-nav .nav-list > li:focus-within > a { color: var(--mv-text); background: var(--mv-primary-soft); }
body.mv-public .mv-nav .nav-list > li.current-menu-item > a,
body.mv-public .mv-nav .nav-list > li.current-menu-ancestor > a,
body.mv-public .mv-nav .nav-list > li.current_page_item > a { color: var(--mv-primary-text); box-shadow: inset 0 -2px 0 var(--mv-primary-text); border-radius: 0; }
body.mv-public .mv-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 20; min-width: 180px; margin: 0; padding: .4rem; list-style: none; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); box-shadow: var(--mv-glow); }
body.mv-public .mv-nav li:hover > .sub-menu, body.mv-public .mv-nav li:focus-within > .sub-menu { display: block; }
body.mv-public .mv-nav .sub-menu a { display: block; padding: .5rem .75rem; color: var(--mv-text-muted); text-decoration: none; border-radius: var(--mv-radius-sm); white-space: nowrap; }
body.mv-public .mv-nav .sub-menu a:hover { background: var(--mv-primary-soft); color: var(--mv-text); }

/* Reused action island (theme/search/notify/login/avatar) */
body.mv-public .mv-actions { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; margin-right: 0; padding: 0; }
body.mv-public .mv-actions .toggle-color { display: none !important; } /* approved design is dark only */
body.mv-public .mv-actions .action-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0; padding: 0; color: var(--mv-text-muted); background: var(--mv-surface-3); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); cursor: pointer; transition: color var(--mv-ease), border-color var(--mv-ease); }
body.mv-public .mv-actions .action-btn:hover { color: var(--mv-accent); border-color: var(--mv-border-strong); }
body.mv-public .mv-actions .login-btn { width: auto; min-width: 40px; padding: 0 .9rem; gap: .4rem; font-weight: 600; font-size: .875rem; border-color: rgba(231, 195, 86, .4); }
body.mv-public .mv-actions .login-btn::after { content: "登录 / 注册"; }
body.mv-public .mv-actions .login-btn i { margin: 0 !important; }
body.mv-public .mv-actions .action-hover-menu { position: relative; display: inline-flex; align-items: center; }
body.mv-public .mv-actions .avatar-warp { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .4rem; color: var(--mv-text); text-decoration: none; }
body.mv-public .mv-actions .avatar-img { width: 32px; height: 32px; object-fit: cover; }
/* The legacy dropdown rules are all scoped under ".navbar", which the Monvshe header does not use; restyle the same island here */
body.mv-public .mv-actions .action-hover-menu::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 18px; }
body.mv-public .mv-actions .action-hover-menu .hover-warp { display: block; visibility: hidden; opacity: 0; position: absolute; overflow: hidden; z-index: 1100; top: calc(100% + 10px); right: 0; width: 340px; max-width: calc(100vw - 1.5rem); font-size: .875rem; color: var(--mv-text-muted); background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); box-shadow: var(--mv-glow); transform: translateY(-12px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
body.mv-public .mv-actions .action-hover-menu:hover > .hover-warp,
body.mv-public .mv-actions .action-hover-menu:focus-within > .hover-warp { visibility: visible; opacity: 1; transform: none; }
body.mv-public .mv-actions .action-hover-menu .hover-warp a { color: var(--mv-text-muted); text-decoration: none; }
body.mv-public .mv-actions .action-hover-menu .hover-warp a:hover { color: var(--mv-accent); }
body.mv-public .mv-actions .action-hover-menu .hover-info { padding: 1rem; background: linear-gradient(40deg, #14121b, #2b2933, #1c1a24); }
body.mv-public .mv-actions .action-hover-menu .hover-info b { color: var(--mv-text); }
body.mv-public .mv-actions .action-hover-menu .abstop-item { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; padding: 1rem; font-size: .75rem; }
body.mv-public .mv-actions .action-hover-menu .hover-item { display: block; position: relative; width: 100%; }
body.mv-public .mv-actions .action-hover-menu .hover-link { display: flex; flex-wrap: wrap; justify-content: space-between; }
body.mv-public .mv-actions .action-hover-menu .hover-link > a { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: .75rem; }
body.mv-public .mv-actions .action-hover-menu .hover-link > a > i { display: block; width: 40px; height: 40px; line-height: 40px; margin: 0; overflow: hidden; border-radius: 50%; color: var(--mv-text-dim); background: var(--mv-surface-3); font-size: 1rem; }
body.mv-public .mv-burger { display: none; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; color: var(--mv-text); background: transparent; border: 1px solid var(--mv-border); border-radius: var(--mv-radius); cursor: pointer; }

/* Search form (legacy searchform.php markup, reused in header panel and hero) */
body.mv-public .mv-search-panel { display: none; position: static; width: auto; height: auto; margin: 0; padding: 0; transform: none; opacity: 1; visibility: visible; box-shadow: none; border-radius: 0; border-top: 1px solid var(--mv-border); background: var(--mv-surface); }
body.mv-public .mv-search-panel.show { display: block; }
body.mv-public .mv-search-panel__inner { max-width: 760px; margin-inline: auto; padding: .75rem var(--mv-pad); }
body.mv-public .mv-search-panel .search-form form,
body.mv-public .mv-hero-search .search-form form { display: flex; flex-wrap: nowrap; gap: .5rem; align-items: stretch; margin: 0; }
body.mv-public .mv-search-panel .search-select,
body.mv-public .mv-hero-search .search-select { flex: 0 0 9rem; min-width: 0; }
body.mv-public .mv-search-panel .search-fields,
body.mv-public .mv-hero-search .search-fields { flex: 1 1 auto; display: flex; min-width: 0; position: relative; }
body.mv-public .mv-search-panel .search-select select,
body.mv-public .mv-hero-search .search-select select,
body.mv-public .mv-search-panel .search-fields input,
body.mv-public .mv-hero-search .search-fields input {
  width: 100%; height: 48px; padding: 0 1rem; color: var(--mv-text); background: var(--mv-surface-2); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); font: inherit; box-shadow: none;
}
body.mv-public .mv-search-panel .search-fields input,
body.mv-public .mv-hero-search .search-fields input { padding-inline-end: 3.5rem; }
body.mv-public .mv-search-panel .search-fields input::placeholder,
body.mv-public .mv-hero-search .search-fields input::placeholder { color: var(--mv-text-dim); }
body.mv-public .mv-search-panel .search-fields input:focus,
body.mv-public .mv-hero-search .search-fields input:focus,
body.mv-public .mv-search-panel .search-select select:focus,
body.mv-public .mv-hero-search .search-select select:focus { border-color: var(--mv-primary); outline: 2px solid var(--mv-accent); outline-offset: 0; background: var(--mv-surface); }
body.mv-public .mv-search-panel .search-fields button,
body.mv-public .mv-hero-search .search-fields button { position: absolute; top: 4px; right: 4px; bottom: auto; left: auto; width: 44px; height: 40px; padding: 0; opacity: 1; color: #fff; background: linear-gradient(110deg, var(--mv-primary-strong), var(--mv-primary)) !important; border: 0 !important; border-radius: calc(var(--mv-radius) - 2px); cursor: pointer; }
/* neutralize the legacy pill-shaped .search-form chrome (white bg, 5px ring, margins) inside the Monvshe containers */
body.mv-public .mv-search-panel .search-form,
body.mv-public .mv-hero-search .search-form { width: 100%; max-width: none; margin: 0; background: transparent; border-radius: 0; box-shadow: none; }
body.mv-public .mv-search-panel .search-fields,
body.mv-public .mv-hero-search .search-fields { overflow: visible; }
body.mv-public .mv-search-panel .search-select select,
body.mv-public .mv-hero-search .search-select select { appearance: auto; }

/* ---------- Home: search hero ---------- */
body.mv-public .mv-hero-search { position: relative; overflow: hidden; padding: 5rem 0 4rem; background: linear-gradient(180deg, #0f0d16, #1c1a24 60%, var(--mv-bg)); isolation: isolate; }
body.mv-public .mv-hero-search__deco { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 300px at 50% -40px, rgba(160, 120, 255, .22), transparent 70%),
    radial-gradient(320px 320px at 88% 40%, rgba(231, 195, 86, .08), transparent 70%),
    radial-gradient(280px 280px at 8% 100%, rgba(78, 222, 163, .08), transparent 70%); }
body.mv-public .mv-hero-search__deco::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: -3rem; width: min(38vw, 520px); background: url("logo.webp") center / contain no-repeat; opacity: .12; }
/* Configured background media (image/video via jarallax) stays; Monvshe only adds a scrim above it */
body.mv-public .mv-hero-search--media .mv-hero-search__deco { background: linear-gradient(to bottom, rgba(13, 11, 20, .45), rgba(13, 11, 20, .82)), radial-gradient(620px 300px at 50% -40px, rgba(160, 120, 255, .18), transparent 70%); }
body.mv-public .mv-hero-search--media .mv-hero-search__deco::after { display: none; }
body.mv-public .mv-hero-search.meimog-mobile-no-banner { background: linear-gradient(180deg, #0f0d16, #1c1a24 60%, var(--mv-bg)); }
body.mv-public .mv-hero-search__inner { z-index: 2; position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
body.mv-public .mv-hero-search__title { margin: 0 0 .75rem; font-size: 3rem; line-height: 1.2; font-weight: 800; color: var(--mv-text); text-shadow: 0 2px 12px rgba(0, 0, 0, .8); overflow-wrap: anywhere; }
body.mv-public .mv-hero-search__title span { color: var(--mv-primary-text); }
body.mv-public .mv-hero-search__desc { max-width: 42rem; margin: 0 0 2rem; color: var(--mv-text-muted); font-size: 1.0625rem; }
body.mv-public .mv-hero-search__form { width: 100%; max-width: 48rem; padding: .5rem; background: rgba(33, 30, 40, .9); border: 1px solid rgba(160, 120, 255, .3); border-radius: var(--mv-radius-lg); box-shadow: 0 16px 40px -10px rgba(5, 3, 10, .85); }
body.mv-public .mv-hero-search__hots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin-top: 1.25rem; }
body.mv-public .mv-hero-search__hots-label { color: var(--mv-text-dim); font-size: .8125rem; }

/* ---------- Sections ---------- */
body.mv-public .mv-section { padding-block: 2.5rem; }
body.mv-public .mv-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--mv-border); }
body.mv-public .mv-section__heading { min-width: 0; }
body.mv-public .mv-section__title { margin: 0; font-size: 1.5rem; line-height: 1.3; font-weight: 700; color: var(--mv-text); padding-inline-start: .75rem; border-inline-start: 4px solid var(--mv-primary); overflow-wrap: anywhere; }
body.mv-public .mv-section__desc { margin: .35rem 0 0; padding-inline-start: .75rem; color: var(--mv-text-dim); font-size: .875rem; }
body.mv-public .mv-section__more { flex: none; display: inline-flex; align-items: center; min-height: 44px; color: var(--mv-primary-text); font-size: .875rem; font-weight: 600; text-decoration: none; }
body.mv-public .mv-section__more:hover { color: var(--mv-accent); }
body.mv-public .mv-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
body.mv-public .mv-tabs__item { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border-radius: 999px; background: var(--mv-surface-2); border: 1px solid var(--mv-border); color: var(--mv-text-muted); font-size: .875rem; text-decoration: none; transition: color var(--mv-ease), border-color var(--mv-ease); }
body.mv-public .mv-tabs__item:hover { color: var(--mv-text); border-color: var(--mv-border-strong); }
body.mv-public .mv-tabs__item.is-active { background: var(--mv-primary-strong); border-color: var(--mv-primary-strong); color: #fff; }

/* ---------- Grid + cards ---------- */
body.mv-public .mv-grid { display: grid; gap: var(--mv-gap); grid-template-columns: repeat(var(--mv-cols, 2), minmax(0, 1fr)); }
@media (min-width: 768px)  { body.mv-public .mv-grid { grid-template-columns: repeat(var(--mv-cols-md, 3), minmax(0, 1fr)); } }
@media (min-width: 1024px) { body.mv-public .mv-grid { grid-template-columns: repeat(var(--mv-cols-lg, 4), minmax(0, 1fr)); } }
@media (min-width: 1200px) { body.mv-public .mv-grid { grid-template-columns: repeat(var(--mv-cols-xl, 4), minmax(0, 1fr)); } }

body.mv-public .mv-card-slot { display: flex; min-width: 0; }
body.mv-public .mv-card { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; overflow: hidden; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); transition: transform var(--mv-ease), border-color var(--mv-ease), box-shadow var(--mv-ease); }
body.mv-public .mv-card:hover, body.mv-public .mv-card:focus-within { transform: translateY(-3px); border-color: var(--mv-border-strong); box-shadow: var(--mv-glow); }
/* Every game cover box is landscape 3:2 (source Meimog baseline: ratio-3x2). The box size never depends on text height. */
body.mv-public .mv-card__media { position: relative; flex: 0 0 auto; aspect-ratio: 3 / 2; height: auto; min-height: 0; max-height: none; overflow: hidden; background: var(--mv-surface-2); }
body.mv-public .mv-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
body.mv-public .mv-card:hover .mv-card__media img { transform: scale(1.04); }
body.mv-public .mv-card__fallback { position: absolute; inset: 0; display: block;
  background: url("logo.webp") center / 58% no-repeat,
    radial-gradient(circle at 30% 20%, rgba(160, 120, 255, .28), transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(78, 222, 163, .16), transparent 55%), #16131f; }
body.mv-public .mv-card__badges { position: absolute; top: .6rem; inset-inline-start: .6rem; z-index: 2; display: flex; flex-wrap: wrap; gap: .35rem; }
body.mv-public .mv-card__badges--inline { position: static; margin-bottom: .5rem; }
body.mv-public .mv-card__body { display: flex; flex-direction: column; gap: .4rem; flex: 1; padding: .9rem 1rem 1rem; min-width: 0; }
body.mv-public .mv-card__cat { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .75rem; font-weight: 600; }
body.mv-public .mv-card__cat:empty { display: none; }
body.mv-public .mv-card__cat a { color: var(--mv-secondary); text-decoration: none; }
body.mv-public .mv-card__cat a:hover { color: var(--mv-accent); }
body.mv-public .mv-card__title { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.5; color: var(--mv-text); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
body.mv-public .mv-card__link { color: inherit; text-decoration: none; }
body.mv-public .mv-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
body.mv-public .mv-card:hover .mv-card__link { color: var(--mv-primary-text); }
body.mv-public .mv-card__desc { color: var(--mv-text-dim); font-size: .8125rem; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
body.mv-public .mv-card__meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--mv-border); color: var(--mv-text-dim); font-size: .75rem; }
body.mv-public .mv-card__meta-item { display: inline-flex; align-items: center; gap: .3rem; }

/* Original media part (hover audio/video preview). Legacy .post-item/.entry-media rules are reused through the
   .post-item wrapper; it is only repositioned/neutralized so the card's own media box sizes it. */
body.mv-public .mv-legacy-media.post-item { position: absolute; inset: 0; overflow: hidden; background: none; border-radius: 0; transition: none; }
body.mv-public .mv-legacy-media .entry-media { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; }
body.mv-public .mv-legacy-media .entry-media::before { display: none; }
body.mv-public .mv-legacy-media .entry-media .media-img { background-color: var(--mv-surface-2); }
/* the media anchor itself is the hit area, so the title's stretched link must not sit on top of the preview */
body.mv-public .mv-card--preview .mv-card__link::after { display: none; }
body.mv-public .mv-card--preview .mv-card__badges { z-index: 3; pointer-events: none; }

/* Featured card (CMS "large" slot): a normal vertical card. The cover stays 3:2 on its own box; the text area below absorbs
   any extra height needed to align with the neighbouring grid, so the image can never become portrait. */
body.mv-public .mv-card--grid-overlay .mv-card__body { padding: 1.25rem 1.5rem 1.5rem; gap: .6rem; }
body.mv-public .mv-card--grid-overlay .mv-card__title { font-size: 1.375rem; font-weight: 700; -webkit-line-clamp: 3; line-clamp: 3; }
body.mv-public .mv-card--grid-overlay .mv-card__desc { color: var(--mv-text-muted); font-size: .9375rem; -webkit-line-clamp: 4; line-clamp: 4; }

/* Horizontal list card: fixed-width 3:2 cover, top-aligned; its height never follows the text */
body.mv-public .mv-card--list { flex-direction: row; align-items: flex-start; }
body.mv-public .mv-card--list .mv-card__media { flex: 0 0 38%; align-self: flex-start; }
body.mv-public .mv-card--list .mv-card__body { align-self: stretch; justify-content: center; }

/* Announcement (title-only) card: no cover, no second title */
body.mv-public .mv-card--notice { border-top: 3px solid var(--mv-primary); }
body.mv-public .mv-card--notice .mv-card__body { padding: 1.1rem 1.25rem; gap: .6rem; }
body.mv-public .mv-card--notice .mv-card__title { -webkit-line-clamp: 3; line-clamp: 3; font-size: 1.0625rem; }

/* ---------- CMS: one large + four small ---------- */
body.mv-public .mv-cms { display: grid; gap: var(--mv-gap); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; }
body.mv-public .mv-cms__main { display: flex; min-width: 0; }
body.mv-public .mv-cms__main .mv-card-slot { flex: 1; }
body.mv-public .mv-cms__side { display: grid; gap: var(--mv-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; min-width: 0; }
body.mv-public .mv-cms--list .mv-cms__side { grid-template-columns: minmax(0, 1fr); }
body.mv-public .mv-cms--flip .mv-cms__main { order: 2; }
body.mv-public .mv-cms__side .mv-card__title { font-size: .9375rem; }

/* ---------- Pagination (legacy zb_pagination markup) ---------- */
body.mv-public .mv-pagination-wrap { margin-top: 2rem; }
body.mv-public .mv-pagination-wrap .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0; padding: 0; list-style: none; }
body.mv-public .mv-pagination-wrap .page-item { margin: 0; }
body.mv-public .mv-pagination-wrap .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .9rem; color: var(--mv-text); background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-sm); text-decoration: none; }
body.mv-public .mv-pagination-wrap a.page-link:hover { border-color: var(--mv-primary); color: var(--mv-primary-text); }
body.mv-public .mv-pagination-wrap .page-item.active .page-link { background: var(--mv-primary-strong); border-color: var(--mv-primary-strong); color: #fff; }
body.mv-public .mv-pagination-wrap .page-item.disabled .page-link { color: var(--mv-text-dim); }
body.mv-public .mv-pagination-wrap .page-nav, body.mv-public .mv-pagination-wrap .next-page, body.mv-public .mv-pagination-wrap .more-posts { text-align: center; }

/* ---------- Article ---------- */
body.mv-public .mv-single { padding-block: 1.5rem 2rem; }
body.mv-public .mv-breadcrumb { margin-bottom: 1rem; font-size: .875rem; color: var(--mv-text-dim); }
body.mv-public .mv-breadcrumb .breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; background: none; }
body.mv-public .mv-breadcrumb .breadcrumb-item { display: inline-flex; gap: .4rem; }
body.mv-public .mv-breadcrumb a { color: var(--mv-text-dim); text-decoration: none; }
body.mv-public .mv-breadcrumb a:hover { color: var(--mv-accent); }
body.mv-public .mv-legacy-hero { margin-bottom: 1.5rem; }

body.mv-public .mv-article-layout { display: grid; gap: var(--mv-gap); grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
body.mv-public .mv-article-layout--solo { grid-template-columns: minmax(0, 1fr); }
body.mv-public .mv-article { min-width: 0; display: flex; flex-direction: column; gap: var(--mv-gap); }
body.mv-public .mv-detail-hero { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; padding: 1.5rem; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); position: relative; overflow: hidden; }
body.mv-public .mv-detail-hero::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(160, 120, 255, .6), transparent); }
body.mv-public .mv-detail-hero--plain { grid-template-columns: minmax(0, 1fr); }
body.mv-public .mv-detail-hero__cover { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--mv-radius); background: var(--mv-surface-2); }
body.mv-public .mv-detail-hero__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.mv-public .mv-detail-hero__info { min-width: 0; }
body.mv-public .mv-detail-hero__title { margin: 0 0 .75rem; font-size: 1.75rem; line-height: 1.4; font-weight: 800; color: var(--mv-text); overflow-wrap: anywhere; }
body.mv-public .mv-detail-hero__meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; color: var(--mv-text-dim); font-size: .875rem; }
body.mv-public .mv-detail-hero__meta a { color: var(--mv-text-muted); text-decoration: none; }
body.mv-public .mv-detail-hero__meta a:hover { color: var(--mv-accent); }
body.mv-public .mv-detail-hero__meta i { margin-inline-end: .35rem; }

body.mv-public .mv-detail-hero__actions { margin-top: 1rem; }
body.mv-public .mv-detail-hero__actions .mv-btn i { margin-inline-end: .1rem; }
body.mv-public .mv-article__card { display: block; position: relative; overflow: visible; min-width: 0; max-width: 100%; padding: 1.5rem; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); color: var(--mv-text-muted); font-size: 1rem; line-height: 1.85; overflow-wrap: anywhere; }
body.mv-public .mv-article__card.card { background-color: var(--mv-surface-1); }
/* body media keeps its own proportions: scale down only, never crop or force a ratio */
body.mv-public .mv-article__card figure, body.mv-public .mv-article__card .wp-caption { max-width: 100%; margin-inline: 0; }
body.mv-public .mv-article__card table { display: block; }
body.mv-public .mv-article__card .post-content { color: inherit; }
body.mv-public .mv-article__card h1, body.mv-public .mv-article__card h2, body.mv-public .mv-article__card h3, body.mv-public .mv-article__card h4 { color: var(--mv-text); line-height: 1.4; }
body.mv-public .mv-article__card a { color: var(--mv-primary-text); }
body.mv-public .mv-article__card a:hover { color: var(--mv-accent); }
body.mv-public .mv-article__card img, body.mv-public .mv-article__card video { max-width: 100%; height: auto; border-radius: var(--mv-radius-sm); }
body.mv-public .mv-article__card iframe { max-width: 100%; border: 0; }
body.mv-public .mv-article__card pre, body.mv-public .mv-article__card table { max-width: 100%; overflow-x: auto; }
body.mv-public .mv-article__card blockquote { margin: 1rem 0; padding: .75rem 1rem; border-inline-start: 4px solid var(--mv-primary); background: var(--mv-primary-soft); border-radius: 0 var(--mv-radius-sm) var(--mv-radius-sm) 0; }
body.mv-public .mv-article__card .entry-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--mv-border); }
body.mv-public .mv-article__card .entry-tags a { padding: .15rem .7rem; border-radius: var(--mv-radius-sm); background: var(--mv-surface-3); color: var(--mv-primary-text); font-size: .8125rem; text-decoration: none; }
body.mv-public .mv-article__card .pagination { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }

body.mv-public .mv-article__after { display: flex; flex-direction: column; gap: var(--mv-gap); min-width: 0; }
body.mv-public .mv-article__after .entry-navigation .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; }
body.mv-public .mv-article__after .entry-navigation .row > * { width: auto; max-width: none; padding: 0; margin: 0; }
body.mv-public .mv-article__after .entry-navigation a { display: flex; align-items: center; gap: .75rem; height: 100%; padding: .75rem 1rem; color: var(--mv-text); background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); text-decoration: none; }
body.mv-public .mv-article__after .entry-navigation a:hover { border-color: var(--mv-border-strong); }
body.mv-public .mv-article__after .entry-navigation { margin-top: 0; }
body.mv-public .mv-article__after .entry-navigation .entry-page-prev,
body.mv-public .mv-article__after .entry-navigation .entry-page-next { transform: none; box-shadow: none; }
body.mv-public .mv-article__after .entry-navigation .entry-page-info { text-align: start; }
body.mv-public .mv-article__after .entry-navigation .rnav { color: var(--mv-text-dim); font-size: .75rem; }
body.mv-public .mv-article__after .entry-navigation .title { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
body.mv-public .mv-article__after .related-posts { margin-top: 0; padding: 1.25rem; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); }
body.mv-public .mv-article__after .related-posts-title { margin: 0 0 1rem; font-size: 1.125rem; font-weight: 700; color: var(--mv-text); }
/* related cards: new card markup sits directly under the legacy .row wrapper, so rebuild the grid here
   (2 / 3 columns, 4 only when the article column is wide enough) and cancel the legacy row-cols widths + gutters */
body.mv-public .mv-article__after .related-posts .row { display: grid; gap: 1rem; margin: 0; width: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.mv-public .mv-article__after .related-posts .row > * { width: auto; max-width: none; flex: none; padding: 0; margin: 0; }
@media (min-width: 768px)  { body.mv-public .mv-article__after .related-posts .row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1344px) { body.mv-public .mv-article__after .related-posts .row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Comments (legacy comments.php markup) */
body.mv-public .mv-comments { padding: 1.5rem; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); color: var(--mv-text-muted); }
body.mv-public .mv-comments h2, body.mv-public .mv-comments h3, body.mv-public .mv-comments .comments-title, body.mv-public .mv-comments .comment-reply-title { color: var(--mv-text); }
body.mv-public .mv-comments a { color: var(--mv-primary-text); }
body.mv-public .mv-comments textarea, body.mv-public .mv-comments input[type="text"], body.mv-public .mv-comments input[type="email"], body.mv-public .mv-comments input[type="url"] { width: 100%; padding: .6rem .8rem; color: var(--mv-text); background: var(--mv-surface-2); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-sm); }
body.mv-public .mv-comments input[type="submit"], body.mv-public .mv-comments button[type="submit"] { min-height: 44px; padding: 0 1.4rem; color: #fff; background: var(--mv-primary-strong); border: 0; border-radius: var(--mv-radius); cursor: pointer; }
body.mv-public .mv-comments .comment-list { padding-inline-start: 0; list-style: none; }

/* Sidebar: legacy widgets + injected #mmp-resource card (presentation only) */
body.mv-public .mv-sidebar { min-width: 0; }
body.mv-public .mv-sidebar__inner { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
body.mv-public .mv-sidebar .widget { margin: 0; padding: 1.1rem; color: var(--mv-text-muted); background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); }
body.mv-public .mv-sidebar .widget-title { margin: 0 0 .75rem; font-size: 1rem; font-weight: 700; color: var(--mv-text); }
body.mv-public .mv-sidebar .widget a { color: var(--mv-text-muted); text-decoration: none; }
body.mv-public .mv-sidebar .widget a:hover { color: var(--mv-accent); }
/* ---- Download presentation (presentation only: the business markup, ids, handlers and checks are untouched) ----
   Used by both the injected sidebar card (#mmp-resource) and the [rihide] block (.ri-hide-warp):
   purple = primary action / login, green = unlocked / granted state, gold = price & permission emphasis */
body.mv-public #mmp-resource, body.mv-public #mmp-download-content, body.mv-public .ri-hide-warp { scroll-margin-top: calc(var(--mv-header-h) + 16px); }
body.mv-public .mmp-resource-card { padding: 1.25rem; margin: 0; color: var(--mv-text-muted); background: linear-gradient(180deg, rgba(139, 92, 246, .14), rgba(28, 26, 36, .96) 55%); border: 1px solid var(--mv-border-strong); border-radius: var(--mv-radius-lg); box-shadow: var(--mv-glow); overflow: visible; }
body.mv-public .mmp-resource-card h2 { margin: 0 0 .9rem; font-size: 1.125rem; font-weight: 700; color: var(--mv-primary-text); }
body.mv-public .ri-hide-warp { margin: 0 0 1.25rem; padding: 1.1rem 1.25rem; color: var(--mv-text-muted); background: linear-gradient(180deg, rgba(139, 92, 246, .12), rgba(28, 26, 36, .9)); border: 1px solid var(--mv-border-strong); border-radius: var(--mv-radius); }
body.mv-public .ri-hide-warp .hide-msg { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: .6rem; padding: .1rem .7rem; border-radius: 999px; font-size: .8125rem; font-weight: 700; color: var(--mv-accent); background: rgba(231, 195, 86, .12); border: 1px solid rgba(231, 195, 86, .4); }
body.mv-public .mmp-resource-card .down-buy-warp, body.mv-public .mmp-resource-card .ri-down-warp, body.mv-public .ri-hide-warp .hide-buy-warp { color: var(--mv-text-muted); background: transparent; border: 0; box-shadow: none; padding: 0; }
body.mv-public .mmp-resource-card .buy-title, body.mv-public .ri-hide-warp .buy-title { margin-bottom: .6rem; font-size: 1.0625rem; font-weight: 700; color: var(--mv-secondary); }
body.mv-public .ri-hide-warp .hide-msg .fa-lock + *, body.mv-public .ri-hide-warp .buy-title .fa-lock { color: var(--mv-accent); }
body.mv-public .mmp-resource-card .prices-info, body.mv-public .mmp-resource-card .prices-default,
body.mv-public .ri-hide-warp .prices-info, body.mv-public .ri-hide-warp .prices-default { color: var(--mv-text-muted); }
body.mv-public .mmp-resource-card .prices-default, body.mv-public .ri-hide-warp .price-item { color: var(--mv-accent); }
body.mv-public .mmp-resource-card .buy-count, body.mv-public .ri-hide-warp .buy-count, body.mv-public .mmp-resource-card .buy-desc, body.mv-public .ri-hide-warp .buy-desc { color: var(--mv-text-dim); font-size: .8125rem; }
body.mv-public .mmp-resource-card .ml-key-value { color: var(--mv-text-muted); }
body.mv-public .mmp-resource-card .ml-key-value strong { color: var(--mv-text); }
/* buttons: login / buy / view = purple, granted download = green */
body.mv-public .mmp-resource-card .btn, body.mv-public .ri-hide-warp .btn, body.mv-public .mmp-resource-card .ml-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; font-weight: 700; border-radius: var(--mv-radius); text-decoration: none; }
body.mv-public .mmp-resource-card .btn-danger, body.mv-public .mmp-resource-card .btn-info, body.mv-public .mmp-resource-card .ml-btn,
body.mv-public .ri-hide-warp .btn-danger, body.mv-public .ri-hide-warp .btn-info { color: #fff !important; background: linear-gradient(110deg, var(--mv-primary-strong), #6d3bd7); border: 1px solid var(--mv-primary-strong); box-shadow: none; }
body.mv-public .mmp-resource-card .btn-success, body.mv-public .ri-hide-warp .btn-success { color: #052e1d !important; background: linear-gradient(110deg, var(--mv-secondary), #2fbf86); border: 1px solid var(--mv-secondary); box-shadow: none; }
body.mv-public .mmp-resource-card .btn:hover, body.mv-public .ri-hide-warp .btn:hover, body.mv-public .mmp-resource-card .ml-btn:hover { filter: brightness(1.1); }
body.mv-public .mmp-resource-card .ml-btn.secondary { color: var(--mv-primary-text) !important; background: var(--mv-surface-3); border-color: var(--mv-border-strong); }
body.mv-public .mmp-resource-card .copy-pwd { color: #052e1d !important; }
body.mv-public .mmp-resource-card .btn-group { display: flex; width: 100%; }
body.mv-public .mmp-resource-card .btn-group > .btn:first-child { flex: 1 1 auto; min-width: 0; }
body.mv-public .ri-hide-warp .buy-btns { margin: .75rem 0; }
body.mv-public #mmp-resource:target, body.mv-public #mmp-resource:focus, body.mv-public .ri-hide-warp:focus { outline: 2px solid var(--mv-accent); outline-offset: 3px; }
/* confirmation popups opened by the original handler (rihide) sit on a dark card too */
body.mv-public .rihide-confirm-box .rihide-popup-title, body.mv-public .rihide-content-box .rihide-popup-title { color: #333; }

/* Legacy shop/video hero islands inside the dark shell */
body.mv-public .mv-legacy-hero .archive-hero { border-radius: var(--mv-radius-lg); overflow: hidden; }

/* Mobile CTA bar (created by public.js only when a real download target exists) */
body.mv-public .mv-cta-bar { display: none; }

/* ---------- Buttons ---------- */
body.mv-public .mv-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .5rem 1.25rem; border: 1px solid transparent; border-radius: var(--mv-radius); font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: filter var(--mv-ease), border-color var(--mv-ease), box-shadow var(--mv-ease); }
body.mv-public .mv-btn--primary { color: #fff; background: linear-gradient(110deg, var(--mv-primary-strong), var(--mv-primary)); box-shadow: 0 0 20px rgba(160, 120, 255, .3); }
body.mv-public .mv-btn--primary:hover { color: #fff; filter: brightness(1.1); }
body.mv-public .mv-btn--ghost { color: var(--mv-text); background: var(--mv-surface-3); border-color: var(--mv-border); }
body.mv-public .mv-btn--ghost:hover { color: var(--mv-primary-text); border-color: var(--mv-border-strong); }

/* ---------- Archive / search / page / 404 ---------- */
body.mv-public .mv-page { padding-top: 1.5rem; }
body.mv-public .mv-archive-hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding: 2rem; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); overflow: hidden; }
body.mv-public .mv-archive-hero::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(160, 120, 255, .6), transparent); }
body.mv-public .mv-archive-hero.has-bg { background-image: linear-gradient(90deg, rgba(13, 11, 20, .94), rgba(13, 11, 20, .6)), var(--mv-archive-bg); background-size: cover; background-position: center; }
body.mv-public .mv-archive-hero__text { min-width: 0; flex: 1 1 auto; }
body.mv-public .mv-archive-hero__title { margin: 0; font-size: 2rem; line-height: 1.3; font-weight: 800; color: var(--mv-text); overflow-wrap: anywhere; }
body.mv-public .mv-archive-hero__desc { margin: .6rem 0 0; max-width: 62ch; color: var(--mv-text-muted); }
body.mv-public .mv-archive-hero__count { flex: none; padding: .25rem .9rem; border-radius: 999px; font-size: .8125rem; font-weight: 700; color: var(--mv-accent); background: rgba(231, 195, 86, .12); border: 1px solid rgba(231, 195, 86, .4); }
body.mv-public .mv-archive-hero__form, body.mv-public .mv-404__search { width: 100%; max-width: 42rem; margin-top: 1rem; }
body.mv-public .mv-archive-hero__form .search-form, body.mv-public .mv-404__search .search-form { width: 100%; max-width: none; margin: 0; background: transparent; border-radius: 0; box-shadow: none; }
body.mv-public .mv-archive-hero__form .search-form form, body.mv-public .mv-404__search .search-form form { display: flex; flex-wrap: nowrap; gap: .5rem; align-items: stretch; margin: 0; }
body.mv-public .mv-archive-hero__form .search-select, body.mv-public .mv-404__search .search-select { flex: 0 0 9rem; min-width: 0; }
body.mv-public .mv-archive-hero__form .search-fields, body.mv-public .mv-404__search .search-fields { flex: 1 1 auto; display: flex; min-width: 0; position: relative; overflow: visible; }
body.mv-public .mv-archive-hero__form .search-select select, body.mv-public .mv-404__search .search-select select,
body.mv-public .mv-archive-hero__form .search-fields input, body.mv-public .mv-404__search .search-fields input { width: 100%; height: 48px; padding: 0 1rem; color: var(--mv-text); background: var(--mv-surface-2); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); font: inherit; box-shadow: none; }
body.mv-public .mv-archive-hero__form .search-fields input, body.mv-public .mv-404__search .search-fields input { padding-inline-end: 3.5rem; }
body.mv-public .mv-archive-hero__form .search-fields button, body.mv-public .mv-404__search .search-fields button { position: absolute; top: 4px; right: 4px; width: 44px; height: 40px; padding: 0; opacity: 1; color: #fff; background: linear-gradient(110deg, var(--mv-primary-strong), var(--mv-primary)) !important; border: 0 !important; border-radius: calc(var(--mv-radius) - 2px); cursor: pointer; }
body.mv-public .mv-archive__list { padding-top: .5rem; }

/* original archive-filter markup, restyled (class names/links/query args untouched) */
body.mv-public .mv-filter { margin-bottom: 1.25rem; padding: .5rem 1.25rem; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); }
body.mv-public .mv-filter .filter-warp { background: transparent; }
body.mv-public .mv-filter .filter-warp .container { max-width: none; padding: 0; }
body.mv-public .mv-filter .filter-item { padding: .55rem 0; border-bottom: 1px dashed var(--mv-border); }
body.mv-public .mv-filter .filter-item .filter-name { color: var(--mv-text-dim); padding: .5rem .25rem; }
body.mv-public .mv-filter .filter-item .filter-link > a { padding: .45rem .85rem; border-radius: 999px; color: var(--mv-text-muted); line-height: 1.2; }
body.mv-public .mv-filter .filter-item .filter-link > a:hover { color: var(--mv-text); background: var(--mv-primary-soft); }
body.mv-public .mv-filter .filter-item .filter-link.active > a { color: var(--mv-primary-text); background: var(--mv-primary-soft); box-shadow: inset 0 0 0 1px var(--mv-border-strong); }
body.mv-public .mv-filter .filter-item .filter-link.active > a::after, body.mv-public .mv-filter .filter-item .filter-link:hover > a::after { display: none; }

/* announcement / title-only categories: one row per item, title only */
body.mv-public .mv-grid.mv-grid--rows { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
body.mv-public .mv-grid--rows .mv-card--notice { border-top-width: 1px; border-inline-start: 3px solid var(--mv-primary); }
body.mv-public .mv-grid--rows .mv-card--notice .mv-card__body { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .9rem 1.25rem; }
body.mv-public .mv-grid--rows .mv-card--notice .mv-card__title { flex: 1 1 18rem; min-width: 0; -webkit-line-clamp: 2; line-clamp: 2; }
body.mv-public .mv-grid--rows .mv-card--notice .mv-card__meta { margin-top: 0; padding-top: 0; border-top: 0; }

body.mv-public .mv-empty > i { display: block; margin-bottom: .6rem; font-size: 2rem; color: var(--mv-primary-text); }
body.mv-public .mv-empty__title { margin: 0 0 .4rem; font-size: 1.125rem; font-weight: 700; color: var(--mv-text); }
body.mv-public .mv-empty__desc { margin: 0 0 1rem; }
body.mv-public .mv-empty .mv-btn { margin-top: .5rem; }

body.mv-public .mv-404 { position: relative; overflow: hidden; padding: 3.5rem 0 3rem; background: radial-gradient(620px 320px at 50% 0, rgba(160, 120, 255, .2), transparent 70%); }
body.mv-public .mv-404__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
body.mv-public .mv-404__mark img { display: block; height: 120px; width: auto; opacity: .92; }
body.mv-public .mv-404__code { margin: .25rem 0; font-size: 6rem; font-weight: 800; line-height: 1.1; background: linear-gradient(180deg, var(--mv-primary-text), var(--mv-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.mv-public .mv-404__title { margin: 0; font-size: 1.75rem; font-weight: 800; color: var(--mv-text); }
body.mv-public .mv-404__desc { margin: .5rem 0 0; color: var(--mv-text-muted); }
body.mv-public .mv-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1rem; }

/* ---------- Configured home widgets that keep their original markup/JS (presentation only) ---------- */
body.mv-public .home-widget .container { max-width: var(--mv-container); padding-inline: var(--mv-pad); }
body.mv-public .home-widget .widget-catbox-item { border-radius: var(--mv-radius-lg); overflow: hidden; border: 1px solid var(--mv-border); }
body.mv-public .home-widget .catbox-title { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
body.mv-public .home-widget .widget-slider-item { border-radius: var(--mv-radius-lg); overflow: hidden; }
body.mv-public .home-widget .division-item { display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); }
body.mv-public .home-widget .division-title, body.mv-public .home-widget .division-title a { margin: 0; color: var(--mv-text); text-decoration: none; }
body.mv-public .home-widget .division-title a:hover { color: var(--mv-accent); }
body.mv-public .home-widget .division-desc { margin: .15rem 0 0; color: var(--mv-text-dim); font-size: .8125rem; }
body.mv-public .home-widget .bg-warp { margin-block: 1.5rem; border-radius: var(--mv-radius-lg); overflow: hidden; color: #fff; }
body.mv-public .home-widget .bg-title, body.mv-public .home-widget .bg-desc { color: #fff; }
body.mv-public .home-widget .dynamic-warp { color: var(--mv-text-muted); }
body.mv-public .home-widget .dynamic-warp a { color: var(--mv-primary-text); }

/* ---------- Game Wiki (Meimog Game Wiki plugin output, reskinned; selectors are the plugin's own) ----------
   The plugin keeps rendering all data/markup/SEO; only its presentation is overridden here. Covers are 3:2 landscape,
   gallery images keep a landscape 16:9 box with object-fit: contain (no cropping, never portrait). */
body.mv-public .meimog-wiki-shell { width: 100%; max-width: var(--mv-container); margin: 0 auto; padding: 1.5rem var(--mv-pad) 3rem; color: var(--mv-text-muted); }
body.mv-public .meimog-wiki-breadcrumbs { flex-wrap: wrap; margin: 0 0 1rem; color: var(--mv-text-dim); font-size: .875rem; }
body.mv-public .meimog-wiki-breadcrumbs a { color: var(--mv-text-dim); }
body.mv-public .meimog-wiki-breadcrumbs a:hover { color: var(--mv-accent); text-decoration: none; }
body.mv-public .meimog-wiki-breadcrumbs span:last-child { color: var(--mv-text); }
body.mv-public .meimog-wiki-eyebrow { margin: 0 0 .5rem; color: var(--mv-secondary); font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
body.mv-public .meimog-wiki-title h1, body.mv-public .meimog-wiki-index-header h1 { margin: 0; color: var(--mv-text); font-weight: 800; }

/* index */
body.mv-public .meimog-wiki-index-header { position: relative; padding: 2rem; overflow: hidden; background: linear-gradient(135deg, rgba(139, 92, 246, .16), var(--mv-surface-1) 55%); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); }
body.mv-public .meimog-wiki-index-header::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(160, 120, 255, .6), transparent); }
body.mv-public .meimog-wiki-index-header p { max-width: 62ch; color: var(--mv-text-muted); }
body.mv-public .meimog-wiki-index-meta { display: inline-block; margin-top: 1rem; padding: .25rem .9rem; border-radius: 999px; color: var(--mv-accent); font-size: .8125rem; font-weight: 700; background: rgba(231, 195, 86, .12); border: 1px solid rgba(231, 195, 86, .4); }
body.mv-public .meimog-wiki-directory { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--mv-gap); margin-top: 1.5rem; background: transparent; border: 0; }
@media (min-width: 640px)  { body.mv-public .meimog-wiki-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { body.mv-public .meimog-wiki-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { body.mv-public .meimog-wiki-directory { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
body.mv-public .meimog-wiki-directory-item { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); transition: transform var(--mv-ease), border-color var(--mv-ease), box-shadow var(--mv-ease); }
body.mv-public .meimog-wiki-directory-item:hover, body.mv-public .meimog-wiki-directory-item:focus-within { transform: translateY(-3px); border-color: var(--mv-border-strong); box-shadow: var(--mv-glow); }
body.mv-public .meimog-wiki-directory-media { display: block; flex: 0 0 auto; aspect-ratio: 3 / 2; height: auto; min-height: 0; overflow: hidden; background: var(--mv-surface-2); }
body.mv-public .meimog-wiki-directory-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.mv-public .meimog-wiki-directory-copy { display: flex; flex-direction: column; flex: 1 1 auto; gap: .4rem; min-width: 0; padding: 1rem 1.1rem 1.15rem; }
body.mv-public .meimog-wiki-directory-copy h2 { margin: 0; color: var(--mv-text); font-size: 1.0625rem; line-height: 1.5; font-weight: 700; overflow-wrap: anywhere; }
body.mv-public .meimog-wiki-directory-copy h2 a { color: inherit; text-decoration: none; }
body.mv-public .meimog-wiki-directory-copy h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
body.mv-public .meimog-wiki-directory-item:hover h2 a { color: var(--mv-primary-text); text-decoration: none; }
body.mv-public .meimog-wiki-directory-copy p { color: var(--mv-text-dim); font-size: .8125rem; line-height: 1.65; }
body.mv-public .meimog-wiki-directory-meta { margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--mv-border); color: var(--mv-text-dim); font-size: .75rem; }
body.mv-public .meimog-wiki-directory-meta span:first-child { color: var(--mv-secondary); font-weight: 600; }
body.mv-public .meimog-wiki-pagination { flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
body.mv-public .meimog-wiki-page-numbers { flex-wrap: wrap; justify-content: center; gap: .4rem; }
body.mv-public .meimog-wiki-page-numbers a, body.mv-public .meimog-wiki-page-numbers span { display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 44px; height: 44px; padding: 0 .6rem; color: var(--mv-text); background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-sm); text-decoration: none; }
body.mv-public .meimog-wiki-page-numbers a:hover { color: var(--mv-primary-text); border-color: var(--mv-primary); }
body.mv-public .meimog-wiki-page-numbers span { color: #fff; background: var(--mv-primary-strong); border-color: var(--mv-primary-strong); }
body.mv-public .meimog-wiki-page-direction { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; color: var(--mv-text); background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-sm); }
body.mv-public .meimog-wiki-page-direction:hover { color: var(--mv-primary-text); border-color: var(--mv-primary); }

/* detail: cover (3:2) beside the title block, then dark section cards */
body.mv-public .meimog-wiki-entry { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.25rem 1.5rem; align-items: center; }
body.mv-public .meimog-wiki-entry > * { min-width: 0; }
body.mv-public .meimog-wiki-cover { grid-column: 1; grid-row: 1; display: block; margin: 0; aspect-ratio: 3 / 2; height: auto; overflow: hidden; border-radius: var(--mv-radius-lg); background: var(--mv-surface-2); border: 1px solid var(--mv-border); }
body.mv-public .meimog-wiki-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.mv-public .meimog-wiki-title { grid-column: 2; grid-row: 1; padding: 0; border: 0; }
body.mv-public .meimog-wiki-title-meta { margin-top: 1rem; gap: .5rem; color: var(--mv-text-dim); }
body.mv-public .meimog-wiki-title-meta > * { padding: .2rem .75rem; border-radius: 999px; background: var(--mv-surface-2); border: 1px solid var(--mv-border); }
body.mv-public .meimog-wiki-title-meta > span:first-child { color: var(--mv-secondary); }
body.mv-public .meimog-wiki-section { grid-column: 1 / -1; padding: 1.5rem; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-lg); }
body.mv-public .meimog-wiki-section h2 { margin: 0 0 1rem; padding-inline-start: .75rem; border-inline-start: 4px solid var(--mv-primary); color: var(--mv-text); font-size: 1.25rem; font-weight: 700; }
body.mv-public .meimog-wiki-section p { color: var(--mv-text-muted); }
body.mv-public .meimog-wiki-section .meimog-wiki-section-intro { color: var(--mv-text-dim); }
body.mv-public .meimog-wiki-facts { gap: .6rem; border: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.mv-public .meimog-wiki-facts > div { grid-template-columns: minmax(92px, .6fr) minmax(0, 1.4fr); overflow: hidden; background: var(--mv-surface-2); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); }
body.mv-public .meimog-wiki-facts dt { color: var(--mv-text-dim); background: rgba(255, 255, 255, .03); }
body.mv-public .meimog-wiki-facts dd { color: var(--mv-text); }
body.mv-public .meimog-wiki-gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .75rem; }
body.mv-public .meimog-wiki-gallery figure { aspect-ratio: 16 / 9; height: auto; border-radius: var(--mv-radius); background: var(--mv-surface-2); border: 1px solid var(--mv-border); }
body.mv-public .meimog-wiki-gallery img { object-fit: contain; }
body.mv-public .meimog-wiki-timeline li { border-left-color: rgba(160, 120, 255, .4); }
body.mv-public .meimog-wiki-timeline li::before { background: linear-gradient(135deg, var(--mv-primary), var(--mv-secondary)); }
body.mv-public .meimog-wiki-timeline h3 { color: var(--mv-text); }
body.mv-public .meimog-wiki-timeline span { color: var(--mv-text-dim); }
body.mv-public .meimog-wiki-points li::marker { color: var(--mv-secondary); }
body.mv-public .meimog-wiki-points li, body.mv-public .meimog-wiki-sources li { color: var(--mv-text-muted); }
body.mv-public .meimog-wiki-version-list { border-top: 0; display: grid; gap: .5rem; }
body.mv-public .meimog-wiki-version-list a { min-height: 56px; padding: .75rem 1rem; color: var(--mv-text); background: var(--mv-surface-2); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); transition: border-color var(--mv-ease); }
body.mv-public .meimog-wiki-version-list a:hover { border-color: var(--mv-border-strong); }
body.mv-public .meimog-wiki-version-list a:hover span { color: var(--mv-primary-text); text-decoration: none; }
body.mv-public .meimog-wiki-version-list time { color: var(--mv-accent); }
body.mv-public .meimog-wiki-sources a { color: var(--mv-primary-text); }
body.mv-public .meimog-wiki-sources a:hover { color: var(--mv-accent); }
body.mv-public .meimog-wiki-sources li span { padding: .05rem .5rem; border-radius: 999px; color: var(--mv-text-dim); background: var(--mv-surface-3); }
body.mv-public .meimog-wiki-empty { padding: 3rem 1.5rem; text-align: center; background: var(--mv-surface-1); border: 1px dashed var(--mv-border); border-radius: var(--mv-radius-lg); }
body.mv-public .meimog-wiki-empty h1 { margin: 0 0 1rem; color: var(--mv-text); }
body.mv-public .meimog-wiki-empty a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.25rem; color: #fff; background: linear-gradient(110deg, var(--mv-primary-strong), var(--mv-primary)); border-radius: var(--mv-radius); font-weight: 700; text-decoration: none; }

@media (max-width: 767.98px) {
  body.mv-public .meimog-wiki-entry { grid-template-columns: minmax(0, 1fr); }
  body.mv-public .meimog-wiki-cover { grid-column: 1; grid-row: 1; }
  body.mv-public .meimog-wiki-title { grid-column: 1; grid-row: 2; }
  body.mv-public .meimog-wiki-index-header { padding: 1.25rem; }
  body.mv-public .meimog-wiki-section { padding: 1.1rem; }
  body.mv-public .meimog-wiki-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 559.98px) {
  /* compact horizontal directory cards: the cover stays a 3:2 landscape box, only narrower */
  body.mv-public .meimog-wiki-directory-item { flex-direction: row; align-items: flex-start; }
  body.mv-public .meimog-wiki-directory-media { flex: 0 0 38%; }
  body.mv-public .meimog-wiki-directory-copy { padding: .75rem .85rem; }
  body.mv-public .meimog-wiki-directory-copy p { -webkit-line-clamp: 2; }
  body.mv-public .meimog-wiki-directory-meta { padding-top: .4rem; }
}

/* ---- Wiki blocks the plugins append inside ordinary articles ---- */
body.mv-public .meimog-article-wiki-entry { gap: 1rem; margin: 1.5rem 0 .5rem; padding: 1rem 1.25rem; background: linear-gradient(135deg, rgba(139, 92, 246, .16), var(--mv-surface-2)); border: 1px solid var(--mv-border-strong); border-radius: var(--mv-radius); }
body.mv-public .meimog-article-wiki-entry strong { color: var(--mv-text); }
body.mv-public .meimog-article-wiki-entry span { color: var(--mv-text-dim); }
body.mv-public .meimog-article-wiki-entry a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.25rem; color: #fff; background: linear-gradient(110deg, var(--mv-primary-strong), var(--mv-primary)); border-radius: var(--mv-radius); font-weight: 700; text-decoration: none; }
body.mv-public .meimog-article-wiki-entry a:hover { color: #fff; text-decoration: none; filter: brightness(1.1); }
body.mv-public .meimog-game-hub { margin: 2rem 0 0; color: var(--mv-text-muted); background: var(--mv-surface-2); border: 1px solid var(--mv-border-strong); border-radius: var(--mv-radius-lg); }
body.mv-public .meimog-game-hub__header { border-bottom-color: var(--mv-border); }
body.mv-public .meimog-game-hub__eyebrow { color: var(--mv-accent); }
body.mv-public .meimog-game-hub__header h2, body.mv-public .meimog-game-hub__section h3, body.mv-public .meimog-game-hub__versions h3 { color: var(--mv-text); border-bottom-color: var(--mv-border); }
body.mv-public .meimog-game-hub__verified { color: #6ee7b7; background: var(--mv-secondary-soft); border-color: rgba(78, 222, 163, .4); }
body.mv-public .meimog-game-hub__facts { gap: .5rem; border: 0; }
body.mv-public .meimog-game-hub__facts > div { overflow: hidden; background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius-sm); }
body.mv-public .meimog-game-hub__facts dt { color: var(--mv-text-dim); background: rgba(255, 255, 255, .03); }
body.mv-public .meimog-game-hub__facts dd { color: var(--mv-text); }
body.mv-public .meimog-game-hub__timeline li { border-left-color: rgba(160, 120, 255, .4); }
body.mv-public .meimog-game-hub__timeline li::before { background: linear-gradient(135deg, var(--mv-primary), var(--mv-secondary)); }
body.mv-public .meimog-game-hub__timeline strong { color: var(--mv-text); }
body.mv-public .meimog-game-hub__timeline span, body.mv-public .meimog-game-hub__sources li span { color: var(--mv-text-dim); }
body.mv-public .meimog-game-hub__bullets li::marker { color: var(--mv-secondary); }
body.mv-public .meimog-game-hub__versions { background: rgba(255, 255, 255, .03); border-top-color: var(--mv-border); }
body.mv-public .meimog-game-hub__versions summary { display: flex; align-items: center; min-height: 44px; color: var(--mv-text); }
body.mv-public .meimog-game-hub__versions .is-current { color: var(--mv-text-dim); }
body.mv-public .meimog-game-hub__versions .is-current small, body.mv-public .meimog-more-versions .is-current small { color: var(--mv-accent); }
body.mv-public .meimog-game-hub a, body.mv-public .meimog-more-versions a { color: var(--mv-primary-text); text-decoration: none; }
body.mv-public .meimog-game-hub a:hover, body.mv-public .meimog-more-versions a:hover { color: var(--mv-accent); text-decoration: underline; }
body.mv-public .meimog-more-versions { margin: 1.75rem 0 0; color: var(--mv-text-muted); background: var(--mv-surface-2); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); }
body.mv-public .meimog-more-versions h2 { color: var(--mv-text); }
body.mv-public .meimog-more-versions .is-current span { color: var(--mv-text-dim); }
@media (max-width: 767.98px) {
  body.mv-public .meimog-game-hub__facts { grid-template-columns: minmax(0, 1fr); }
  body.mv-public .meimog-article-wiki-entry a { width: 100%; }
}

/* ---------- Shop-style hero cover (original entry-shop.php markup, CSS only): landscape 3:2; video heroes untouched ---------- */
body.mv-public .mv-legacy-hero .shop-hero .img-box { height: auto; max-width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--mv-radius); }
body.mv-public .mv-legacy-hero .shop-hero .img-box img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Game-cover image wall (page-templates/page-instagram-wall.php, body.mv-public-gallery only) ----------
   Original #ig-wall markup, query, AJAX/nonce and login gate are untouched; only presentation. Cards are 3:2 landscape
   (this wall lists game covers); the same rule applies to items appended by the original infinite scroll. */
body.mv-public-gallery #ig-wall { max-width: var(--mv-container); margin: 0 auto; padding: 1.5rem var(--mv-pad) 2rem; }
body.mv-public-gallery #ig-wall .ig-current-cat { flex-wrap: wrap; justify-content: flex-start; gap: .5rem .75rem; margin-bottom: 1rem; padding: .75rem 1rem; color: var(--mv-text); background: var(--mv-surface-1); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); }
body.mv-public-gallery #ig-wall .ig-current-cat a { min-height: 44px; padding: 0 1rem; color: var(--mv-primary-text); background: var(--mv-surface-3); border: 1px solid var(--mv-border); }
body.mv-public-gallery #ig-wall .ig-current-cat a:hover { color: var(--mv-accent); border-color: var(--mv-border-strong); background: var(--mv-surface-3); }
body.mv-public-gallery #ig-wall .ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: .75rem; column-count: auto; }
body.mv-public-gallery #ig-wall .ig-grid > :not(.ig-item) { grid-column: 1 / -1; font-size: .9375rem; color: var(--mv-text-dim); }
body.mv-public-gallery #ig-wall .ig-item { display: block; width: auto; aspect-ratio: 3 / 2; height: auto; background: var(--mv-surface-2); border: 1px solid var(--mv-border); border-radius: var(--mv-radius); }
body.mv-public-gallery #ig-wall .ig-item img { width: 100%; height: 100%; object-fit: cover; }
body.mv-public-gallery #ig-wall .ig-overlay { background: linear-gradient(to bottom, transparent 0%, rgba(13, 11, 20, .35) 35%, rgba(13, 11, 20, .88) 100%); }
body.mv-public-gallery #ig-wall .ig-title { font-size: .8125rem; }
body.mv-public-gallery #ig-wall .ig-loading, body.mv-public-gallery #ig-wall .ig-end-msg { color: var(--mv-text-dim); }
body.mv-public-gallery #ig-gate { background: linear-gradient(to bottom, transparent 0%, var(--mv-bg) 48%); padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
body.mv-public-gallery #ig-gate .ig-gate-inner p { color: var(--mv-text); }
body.mv-public-gallery #ig-gate .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: #fff; background: linear-gradient(110deg, var(--mv-primary-strong), var(--mv-primary)); border: 0; font-weight: 700; }
@media (max-width: 599.98px) {
  body.mv-public-gallery #ig-wall .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.mv-public-gallery #ig-wall .ig-item:hover img { transform: none; }
}

/* ---------- Existing image-mode floating dock / prompt: colours only (buttons, links and rules unchanged) ---------- */
body.mv-public .ripro-igmode-dock { background: linear-gradient(180deg, rgba(33, 30, 40, .96), rgba(13, 11, 20, .96)); border-color: var(--mv-border-strong); box-shadow: var(--mv-glow); }
body.mv-public .ripro-igmode-float { background: linear-gradient(145deg, #a078ff 0%, #8b5cf6 55%, #6d3bd7 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 24px rgba(139, 92, 246, .3); }
body.mv-public .ripro-igmode-dock.is-normal-target .ripro-igmode-float { background: linear-gradient(145deg, #2fbf86 0%, #6d3bd7 70%, #8b5cf6 100%); }
body.mv-public .ripro-igmode-float:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), 0 14px 31px rgba(139, 92, 246, .4); }
body.mv-public .ripro-igmode-new { background: var(--mv-secondary); }
body.mv-public .ripro-igmode-cat-link { background: rgba(160, 120, 255, .12); border-color: var(--mv-border); }
body.mv-public .ripro-igmode-cat-link.is-active { background: linear-gradient(135deg, #f5d061, #caa83d); box-shadow: 0 8px 18px rgba(231, 195, 86, .22); }
body.mv-public .ripro-igmode-prompt { background: rgba(20, 18, 27, .94); border-color: var(--mv-border-strong); }
body.mv-public .ripro-igmode-prompt-badge, body.mv-public .ripro-igmode-prompt-go { background: linear-gradient(135deg, #a078ff, #6d3bd7); box-shadow: 0 10px 24px rgba(139, 92, 246, .3); }

/* ---------- Footer ---------- */
body.mv-public .mv-footer { position: relative; margin-top: 2.5rem; background: #0a0810; border-top: 1px solid var(--mv-border); color: var(--mv-text-dim); font-size: .875rem; }
body.mv-public .mv-footer::before { content: ""; position: absolute; inset: -1px 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(160, 120, 255, .55), rgba(231, 195, 86, .35), transparent); pointer-events: none; }
body.mv-public .mv-footer__inner { max-width: var(--mv-container); margin-inline: auto; padding: 2.75rem var(--mv-pad) 1.75rem; }
/* The columns follow whichever blocks really render (--cN = number of columns beside the brand): no phantom tracks. */
body.mv-public .mv-footer__cols { display: grid; gap: 2rem 2.5rem; margin-bottom: 1.75rem; grid-template-columns: minmax(0, 1fr); }
body.mv-public .mv-footer__cols--c1 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
body.mv-public .mv-footer__cols--c2 { grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); }
body.mv-public .mv-footer__cols--c3 { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
body.mv-public .mv-footer__cols > * { min-width: 0; }
body.mv-public .mv-footer__brand { display: grid; align-content: start; gap: .85rem; max-width: 34rem; }
body.mv-public .mv-footer__cols--c0 .mv-footer__brand { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.25rem 2rem; max-width: none; }
body.mv-public .mv-footer .mv-logo--footer { margin-inline: 0; justify-self: start; max-width: 100%; }
body.mv-public .mv-footer .mv-logo--footer img { height: 64px; width: auto; max-width: 100%; object-fit: contain; }
body.mv-public .mv-footer__desc { margin: 0; line-height: 1.8; color: var(--mv-text-muted); overflow-wrap: anywhere; }
body.mv-public .mv-footer__desc img, body.mv-public .mv-footer__contact img { max-width: 100%; height: auto; }
body.mv-public .mv-footer__title { display: flex; align-items: center; gap: .55rem; margin: 0 0 .9rem; font-size: 1rem; font-weight: 700; letter-spacing: .04em; color: var(--mv-text); }
body.mv-public .mv-footer__title::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--mv-primary); box-shadow: 0 0 6px rgba(160, 120, 255, .8); }
body.mv-public .mv-footer__col--about .mv-footer__title::before { background: var(--mv-accent); box-shadow: 0 0 6px rgba(231, 195, 86, .8); }
body.mv-public .mv-footer__col--contact .mv-footer__title::before { background: var(--mv-secondary); box-shadow: 0 0 6px rgba(78, 222, 163, .8); }
body.mv-public .mv-footer__list { margin: 0; padding: 0; list-style: none; display: grid; gap: .15rem; }
body.mv-public .mv-footer__list li { margin: 0; min-width: 0; }
body.mv-public .mv-footer__cols .mv-footer__list a { display: inline-flex; align-items: center; gap: .4rem; min-height: 32px; overflow-wrap: anywhere; }
body.mv-public .mv-footer__cols .mv-footer__list a::before { content: ""; flex: none; width: 5px; height: 5px; border-top: 1.5px solid var(--mv-text-dim); border-right: 1.5px solid var(--mv-text-dim); transform: rotate(45deg); transition: border-color var(--mv-ease), transform var(--mv-ease); }
body.mv-public .mv-footer__cols .mv-footer__list a:hover::before, body.mv-public .mv-footer__cols .mv-footer__list a:focus-visible::before { border-color: var(--mv-accent); transform: translateX(2px) rotate(45deg); }
body.mv-public .mv-footer__list--inline { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
body.mv-public .mv-footer__friends { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1.25rem; }
body.mv-public .mv-footer a { color: var(--mv-text-muted); text-decoration: none; }
body.mv-public .mv-footer a:hover { color: var(--mv-accent); text-decoration: underline; text-underline-offset: 3px; }
body.mv-public .mv-footer__contact { display: flow-root; line-height: 1.8; overflow-wrap: anywhere; }
body.mv-public .mv-footer__pending { margin: 0; color: var(--mv-text-dim); font-size: .8125rem; opacity: .8; }
body.mv-public .mv-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--mv-border); font-size: .8125rem; }
body.mv-public .mv-footer__bottom > * { min-width: 0; overflow-wrap: anywhere; }
body.mv-public .mv-footer__copy { flex: 1 1 auto; }
body.mv-public .mv-footer__sitemap { flex: none; }

/* Reused legacy drawer + bottom bar, dark-skinned (behavior stays legacy) */
body.mv-public .off-canvas { background: var(--mv-surface); color: var(--mv-text); }
body.mv-public .off-canvas .logo-wrapper { display: none; }
body.mv-public .off-canvas::before { content: ""; display: block; height: 56px; margin: 1rem 1rem .5rem; background: url("logo.webp") left center / contain no-repeat; }
body.mv-public .off-canvas a { color: var(--mv-text-muted); }
body.mv-public .off-canvas a:hover { color: var(--mv-accent); }
body.mv-public .off-canvas .canvas-close { color: var(--mv-text); cursor: pointer; }
body.mv-public .m-navbar { background: #0f0d16; border-top: 1px solid var(--mv-border); }
body.mv-public .m-navbar a { color: var(--mv-text-muted); }

/* ---------- Tablet ---------- */
@media (max-width: 1023.98px) {
  body.mv-public { --mv-pad: 1rem; --mv-header-h: 60px; }
  body.mv-public .mv-header__inner { gap: .5rem; }
  body.mv-public .mv-burger { display: inline-flex; }
  body.mv-public .mv-nav { display: none; }
  body.mv-public .mv-logo img { height: 44px; }
  body.mv-public .mv-logo { margin-inline: auto; }
  body.mv-public .mv-actions { margin-inline-start: 0; }
  body.mv-public .mv-actions .login-btn::after { content: none; }
  body.mv-public .mv-actions .login-btn { width: 40px; padding: 0; }
  body.mv-public .mv-cms { grid-template-columns: minmax(0, 1fr); }
  /* Brand takes its own row; the rendered columns share the next row evenly */
  body.mv-public .mv-footer__cols--c1 { grid-template-columns: minmax(0, 1fr); }
  body.mv-public .mv-footer__cols--c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.mv-public .mv-footer__cols--c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.mv-public .mv-footer__cols > .mv-footer__brand { grid-column: 1 / -1; max-width: none; }

  /* Article: hero, then the existing resource card, then body, then the rest */
  /* contents-generated flex items must fill the column: stretch (the desktop grid rule sets align-items:start) */
  body.mv-public .mv-article-layout { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; }
  body.mv-public .mv-article, body.mv-public .mv-sidebar, body.mv-public .mv-sidebar__inner { display: contents; }
  body.mv-public .mv-detail-hero { order: 1; width: auto; max-width: 100%; }
  body.mv-public .mv-sidebar__inner > #mmp-resource { order: 2; width: auto; max-width: 100%; }
  body.mv-public .mv-article__card { order: 3; width: auto; }
  body.mv-public .mv-article__after { order: 4; width: auto; }
  body.mv-public .mv-sidebar__inner > *:not(#mmp-resource) { order: 5; width: auto; }
  body.mv-public .mv-detail-hero { grid-template-columns: minmax(0, 1fr); padding: .9rem; }
}

/* ---------- Mobile (390px target) ---------- */
@media (max-width: 767.98px) {
  body.mv-public { --mv-gap: .75rem; }
  body.mv-public .mv-hero-search { padding: 2.5rem 0 2rem; }
  body.mv-public .mv-hero-search__title { font-size: 1.75rem; }
  body.mv-public .mv-hero-search__desc { font-size: .9375rem; margin-bottom: 1.25rem; }
  body.mv-public .mv-search-panel .search-select, body.mv-public .mv-hero-search .search-select { flex-basis: 6.5rem; }
  body.mv-public .mv-hero-search__form { padding: .4rem; }
  body.mv-public .mv-section { padding-block: 1.5rem; }
  body.mv-public .mv-section__title { font-size: 1.25rem; }
  body.mv-public .mv-card__body { padding: .65rem .75rem .75rem; }
  body.mv-public .mv-card__title { font-size: .9375rem; }
  body.mv-public .mv-card__meta-item--extra { display: none; }
  body.mv-public .mv-card--grid-overlay .mv-card__body { padding: 1rem; }
  body.mv-public .mv-card--grid-overlay .mv-card__title { font-size: 1.125rem; }
  body.mv-public .mv-archive-hero { flex-direction: column; align-items: flex-start; padding: 1.25rem; }
  body.mv-public .mv-archive-hero__title { font-size: 1.5rem; }
  body.mv-public .mv-archive-hero__form .search-select, body.mv-public .mv-404__search .search-select { flex-basis: 6.5rem; }
  body.mv-public .mv-404 { padding: 2rem 0; }
  body.mv-public .mv-404__code { font-size: 4.5rem; }
  body.mv-public .mv-404__mark img { height: 88px; }
  body.mv-public .mv-filter { padding: .25rem .9rem; }
  body.mv-public .mv-grid--rows .mv-card--notice .mv-card__body { padding: .75rem 1rem; }
  body.mv-public .mv-detail-hero__actions .mv-btn { width: 100%; }
  body.mv-public .mv-detail-hero__title { font-size: 1.375rem; }
  body.mv-public .mv-article__card, body.mv-public .mv-comments { padding: 1rem; }
  body.mv-public .mv-article__after .entry-navigation .row { grid-template-columns: minmax(0, 1fr); }
  body.mv-public .mv-footer__cols--c2, body.mv-public .mv-footer__cols--c3 { grid-template-columns: minmax(0, 1fr); }
  body.mv-public .mv-footer__cols--c0 .mv-footer__brand { grid-template-columns: minmax(0, 1fr); }
  body.mv-public .mv-footer__inner { padding-top: 2rem; }
  body.mv-public .mv-announce__inner { padding-inline: 1rem; }

  body.mv-public .mv-cta-bar { position: fixed; inset-inline: 0; bottom: var(--mv-cta-offset, 0px); z-index: 900; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: rgba(13, 11, 20, .96); border-top: 1px solid var(--mv-border); }
  body.mv-public .mv-cta-bar.is-visible { display: block; }
  body.mv-public .mv-cta-bar__btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; color: #fff; background: linear-gradient(110deg, var(--mv-primary-strong), var(--mv-primary)); border: 0; border-radius: var(--mv-radius); font: inherit; font-weight: 700; cursor: pointer; }
  body.mv-public.mv-has-cta .mv-footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 400px) {
  body.mv-public .mv-logo img { height: 38px; }
  body.mv-public .mv-footer .mv-logo--footer img { height: 56px; }
}
@media (min-width: 1024px) {
  body.mv-public .mv-burger { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body.mv-public *, body.mv-public *::before, body.mv-public *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  body.mv-public .mv-card:hover, body.mv-public .mv-card:focus-within, body.mv-public .mv-card:hover .mv-card__media img { transform: none; }
}
