/* Mopys Fix17.1 — EDIT THESE VARIABLES for your colors and fonts.
   This file loads last. Keep text/background pairs readable when changing them. */
body.m17-site {
  --mopys-page: #f1f5f2;
  --mopys-surface: #fffef9;
  --mopys-card: #ffffff;
  --mopys-text: #243a31;
  --mopys-muted: #4f6258;
  --mopys-heading: #184b38;
  --mopys-accent: #205b43;
  --mopys-link: #125c48;
  --mopys-tint: #e6eee8;
  --mopys-border: #cddbd1;
  --mopys-body-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mopys-heading-font: Georgia, "Times New Roman", serif;
  --m17-paper: var(--mopys-page);
  --m17-ink: var(--mopys-text);
  --m17-muted: var(--mopys-muted);
  --m17-forest: var(--mopys-heading);
  --m17-jade: var(--mopys-accent);
  background-color: var(--mopys-page);
  font-family: var(--mopys-body-font);
}
body.m17-site :is(h1,h2,h3,h4,h5,h6) {
  font-family: var(--mopys-heading-font) !important;
}

/* The old dark theme set both !important colors and legacy variables. */
body.m17-site.m17-legacy {
  --bg: var(--mopys-page); --bg-2: var(--mopys-page);
  --text: var(--mopys-text); --muted: var(--mopys-muted);
  --white-soft: var(--mopys-text); --gold-2: var(--mopys-heading);
  --panel: var(--mopys-card); --panel-2: var(--mopys-surface);
  --panel-strong: var(--mopys-card); --panel-soft: var(--mopys-surface);
  --mx-bg: var(--mopys-page); --mx-bg-2: var(--mopys-page);
  --mx-panel: var(--mopys-card); --mx-panel-2: var(--mopys-surface);
  --mx-text: var(--mopys-text); --mx-muted: var(--mopys-muted);
  --mx-gold: var(--mopys-heading); --mx-gold-2: var(--mopys-heading);
  background: var(--mopys-page) !important;
  color: var(--mopys-text) !important;
  font-family: var(--mopys-body-font) !important;
}
body.m17-legacy :is(.mopys-fx,.fx-particles) { display: none !important; }

body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) {
  background: var(--mopys-surface) !important;
  color: var(--mopys-text) !important;
  border-color: var(--mopys-border) !important;
  box-shadow: 0 10px 30px #193f2920 !important;
}
body.m17-legacy :is(.system-card,.soft-card,.settings-card,.dashboard-card,.panel,.card,.post,.topic,.category,.category-card,.topic-card,.profile-card,.hero-card,.gallery-card,.metric-card,.ticket-card,.notice-card,.result-card,.event-card,.leader-card,.thread-card,.download-card,.news-card,.poll-card,.admin-card,.hero-panel,.hero-side,.queue-card,.item,.user-link,.bubble-card,.section-block,.store-card,.store-item,.roadmap-card,.balance-card,.voucher-row,.ledger-row,.table-wrap) {
  background: var(--mopys-card) !important;
  color: var(--mopys-text) !important;
  border-color: var(--mopys-border) !important;
  box-shadow: 0 4px 16px #193f2910 !important;
}

/* Explicitly beat historical p/label/strong rules, without recoloring nav/footer. */
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell,main,.wrap) :is(p,li,label,small,span,td,th,dt,dd,strong,b,em,.desc,.description,.section-copy,.system-copy,.system-sub,.info,.summary,.under-copy,.empty-copy,.roadmap-copy,.post-body,.message-body,.chat) {
  color: var(--mopys-text) !important;
  text-shadow: none !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell,main,.wrap) :is(h1,h2,h3,h4,h5,h6,.category-link,.topic-title,.forum-title,.mini-title,.system-title,.page-title,.dashboard-title) {
  color: var(--mopys-heading) !important;
  font-family: var(--mopys-heading-font) !important;
  text-shadow: none !important;
  -webkit-text-fill-color: currentColor !important;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem) !important;
  line-height: 1.2 !important;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) p {
  font-family: var(--mopys-body-font) !important;
  line-height: 1.75;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) :is(.muted,.subtle,.meta,.post-meta,.topic-meta,.category-meta,.leader-meta,.notice-meta,.thread-meta,.event-meta,.gallery-meta,.metric-label,.system-footer-note) {
  color: var(--mopys-muted) !important;
  text-shadow: none !important;
}
body.m17-legacy :is(.stat,.meta-pill,.leader-pill,.badge,.pill,.tag,.logged-strip,.coins,.price-pill,.flag,.stat-chip,.kicker,.rank-no,.status-pill) {
  background: var(--mopys-tint) !important;
  color: var(--mopys-text) !important;
  border-color: var(--mopys-border) !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) a:where(:not([role=button]):not(.btn):not(.button):not(.category-link):not(.back):not(.back-link-row a)) {
  color: var(--mopys-link) !important;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.m17-site.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) a:not([role=button]):not(.btn):not(.button):not(.back):not(.back-link-row a):hover {
  color: var(--mopys-link) !important;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) :is(button,input[type=submit],a[role=button],.btn,.button,.back,.back-link-row a) {
  background: var(--mopys-accent) !important;
  color: #ffffff !important;
  border-color: var(--mopys-accent) !important;
  text-shadow: none !important;
  -webkit-text-fill-color: currentColor !important;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) :is(button,input[type=submit],a[role=button],.btn,.button,.back,.back-link-row a) :is(span,strong,small) {
  color: #ffffff !important;
}
body.m17-site.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) :is(button,input[type=submit],a[role=button],.btn,.button,.back,.back-link-row a):is(:hover,:focus-visible) {
  background: var(--mopys-accent) !important;
  color: #ffffff !important;
}
body.m17-legacy :is(.portal,.container,.system-shell,.store-shell,.forum-shell,.dashboard-shell,.profile-shell) :is(input:not([type=submit]):not([type=checkbox]):not([type=radio]),textarea,select) {
  background: #ffffff !important;
  color: var(--mopys-text) !important;
  border-color: var(--mopys-border) !important;
  font-family: var(--mopys-body-font) !important;
  text-shadow: none !important;
}
body.m17-legacy :is(input,textarea)::placeholder { color: #58685e !important; opacity: 1 !important; }
body.m17-legacy :is(.status-online,.status-resolved) { color: #205b43 !important; }
body.m17-legacy :is(.status-offline,.status-closed,.error,.danger) { color: #8d2430 !important; }
body.m17-legacy :is(.status-maintenance,.status-pending,.warning) { color: #76520d !important; }
