/* 星墨站点增强 — deliberately namespaced to coexist with Puock. */
:root,
.xingmoo-auth-shell,
.xingmoo-dashboard,
.xingmoo-auth-required,
.xingmoo-index {
  /* Resolve at the component, not :root aliases of body-level Puock tokens.
     data-bs-theme is the source of truth even if puock-dark is stale. */
  --xms-ink: #0b1c15;
  --xms-surface: #11271c;
  --xms-surface-2: #19372a;
  --xms-surface-3: #234533;
  --xms-line: #3f604a;
  --xms-border-strong: #76a17e;
  --xms-text: #edf6e9;
  --xms-muted: #b4cbb7;
  --xms-placeholder: #a1bba8;
  --xms-green: #9bdd75;
  --xms-green-deep: #5baf53;
  --xms-cyan: #8cd9cd;
  --xms-gold: #f1c780;
  --xms-link: #b0e99c;
  --xms-button: #9bdd75;
  --xms-button-text: #17351e;
  --xms-focus: #8cd9cd;
  --xms-input: #0b1c15;
  --xms-danger: #ff9d9d;
  --xms-error-bg: #3f2223;
  --xms-error-text: #ffd1cc;
  --xms-success-bg: #173c26;
  --xms-success-text: #b7efc0;
  --xms-pending-bg: #3d3220;
  --xms-pending-text: #f4d495;
  --xms-shadow: 0 16px 36px rgba(2, 13, 7, .18);
  --xms-radius: 4px;
  color-scheme: dark;
}

.xingmoo-auth-shell,
.xingmoo-dashboard,
.xingmoo-auth-required {
  color: var(--xms-text);
  max-width: 1180px;
  margin: clamp(24px, 5vw, 72px) auto;
  padding: 0 clamp(16px, 3vw, 32px);
  position: relative;
  isolation: isolate;
}

.xingmoo-auth-shell {
  display: grid;
  grid-template-columns: minmax(200px, .8fr) minmax(320px, 1.2fr);
  align-items: stretch;
  min-height: 540px;
  max-width: 1080px;
  margin-block: clamp(20px, 3vw, 40px);
  padding: 0;
  background: linear-gradient(135deg, var(--xms-surface-2), var(--xms-ink) 62%);
  border: 1px solid var(--xms-line);
  border-radius: var(--xms-radius);
  overflow: hidden;
  box-shadow: var(--xms-shadow);
}

.xingmoo-auth-shell::before,
.xingmoo-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .36;
  background-image: linear-gradient(rgba(109, 217, 208, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(109, 217, 208, .045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(135deg, black, transparent 75%);
}

.xingmoo-auth-art {
  min-height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--xms-surface-2), var(--xms-ink) 76%);
  background-image: linear-gradient(160deg, color-mix(in srgb, var(--xms-surface-2) 74%, transparent), color-mix(in srgb, var(--xms-ink) 92%, transparent) 76%), url("xingmoo-pixel-landscape.svg");
  background-position: center, center;
  background-size: cover, cover;
}

.xingmoo-auth-art::before,
.xingmoo-auth-art::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(121, 227, 158, .25);
  transform: rotate(45deg);
  box-shadow: 0 0 0 18px rgba(121, 227, 158, .035), 0 0 0 36px rgba(121, 227, 158, .025);
}

.xingmoo-auth-art::before { top: 13%; left: 12%; }
.xingmoo-auth-art::after { right: -16%; bottom: -8%; width: 360px; height: 360px; border-color: rgba(109, 217, 208, .18); }

.xingmoo-pixel { position: absolute; display: block; width: 14px; height: 14px; background: var(--xms-green); box-shadow: 18px 0 var(--xms-green), 0 18px var(--xms-green), 18px 18px var(--xms-green); opacity: .85; }
.xingmoo-pixel-a { top: 22%; right: 19%; transform: scale(.72); }
.xingmoo-pixel-b { top: 63%; left: 20%; transform: scale(.46); background: var(--xms-cyan); box-shadow: 18px 0 var(--xms-cyan), 0 18px var(--xms-cyan), 18px 18px var(--xms-cyan); }
.xingmoo-pixel-c { bottom: 15%; right: 29%; transform: scale(.32); background: var(--xms-gold); box-shadow: 18px 0 var(--xms-gold), 0 18px var(--xms-gold), 18px 18px var(--xms-gold); }

.xingmoo-auth-card {
  align-self: center;
  box-sizing: border-box;
  width: min(100%, 560px);
  margin: 20px auto;
  padding: clamp(28px, 4vw, 52px);
}

.xingmoo-kicker {
  color: var(--xms-cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.xingmoo-auth-card h1,
.xingmoo-dashboard h1,
.xingmoo-auth-required h1 {
  color: var(--xms-text);
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -.035em;
  line-height: 1.1;
  margin: 12px 0 14px;
}

.xingmoo-auth-lede,
.xingmoo-dashboard-head p,
.xingmoo-auth-required p {
  color: var(--xms-muted);
  line-height: 1.75;
  margin: 0 0 28px;
}

.xingmoo-form { display: grid; gap: 18px; }
.xingmoo-bot-trap { height: 1px; left: -10000px; opacity: 0; overflow: hidden; position: absolute; top: auto; width: 1px; }
.xingmoo-field { display: grid; gap: 7px; }
.xingmoo-field label { color: var(--xms-text); font-size: 14px; font-weight: 650; }
.xingmoo-field small,
.xingmoo-password-details small { color: var(--xms-muted); font-size: 12px; line-height: 1.55; }
.xingmoo-field input,
.xingmoo-field textarea {
  appearance: none;
  background: var(--xms-ink);
  border: 1px solid rgba(175, 197, 181, .35);
  border-radius: var(--xms-radius);
  box-sizing: border-box;
  color: var(--xms-text);
  font: inherit;
  line-height: 1.45;
  min-height: 46px;
  padding: 11px 13px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  width: 100%;
}
.xingmoo-field textarea { min-height: 112px; resize: vertical; }
.xingmoo-field input::placeholder,
.xingmoo-field textarea::placeholder { color: #93aa9b; }
.xingmoo-field input:hover,
.xingmoo-field textarea:hover { border-color: rgba(121, 227, 158, .62); }
.xingmoo-field input:focus,
.xingmoo-field textarea:focus,
.xingmoo-button:focus-visible,
.xingmoo-text-link:focus-visible,
.xingmoo-password-toggle:focus-visible,
.xingmoo-form a:focus-visible,
.xingmoo-auth-nav a:focus-visible { outline: 3px solid rgba(109, 217, 208, .62); outline-offset: 3px; }

.xingmoo-password-wrap { position: relative; }
.xingmoo-password-wrap input { padding-right: 72px; }
.xingmoo-password-toggle {
  background: transparent;
  border: 0;
  border-radius: var(--xms-radius);
  color: var(--xms-cyan);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
}
.xingmoo-password-toggle:hover { color: var(--xms-text); }

.xingmoo-form-row { align-items: center; display: flex; font-size: 13px; justify-content: space-between; gap: 12px; }
.xingmoo-form a,
.xingmoo-auth-switch a,
.xingmoo-text-link { color: var(--xms-green); text-decoration: underline; text-decoration-color: rgba(121, 227, 158, .45); text-underline-offset: 3px; }
.xingmoo-form a:hover,
.xingmoo-auth-switch a:hover,
.xingmoo-text-link:hover { color: var(--xms-text); }
.xingmoo-check { align-items: center; color: var(--xms-muted); cursor: pointer; display: inline-flex; gap: 7px; }
.xingmoo-check input { accent-color: var(--xms-green-deep); height: 16px; width: 16px; }

.xingmoo-button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--xms-radius);
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 750;
  gap: 12px;
  justify-content: center;
  line-height: 1.3;
  min-height: 46px;
  padding: 11px 17px;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.xingmoo-button:hover { transform: translateY(-2px); }
.xingmoo-button-primary { background: var(--xms-button); color: var(--xms-button-text) !important; box-shadow: 0 8px 18px rgba(7, 34, 20, .22); }
.xingmoo-button-primary:hover { background: var(--xms-button); box-shadow: 0 10px 22px rgba(7, 34, 20, .28); }
.xingmoo-button-secondary { background: transparent; border-color: rgba(121, 227, 158, .55); color: var(--xms-green) !important; }
.xingmoo-button-secondary:hover { background: rgba(121, 227, 158, .11); }
.xingmoo-auth-card .xingmoo-button { margin-top: 4px; width: 100%; }
.xingmoo-auth-switch { color: var(--xms-muted); font-size: 13px; margin: 24px 0 0; text-align: center; }

.xingmoo-notice { border: 1px solid; border-radius: var(--xms-radius); font-size: 13px; line-height: 1.6; margin: 0 0 18px; padding: 11px 13px; }
.xingmoo-notice-error { background: rgba(137, 35, 50, .20); border-color: rgba(255, 157, 157, .48); color: #ffd0d0; }
.xingmoo-notice-success { background: rgba(34, 123, 79, .22); border-color: rgba(121, 227, 158, .48); color: #c9f7d5; }

.xingmoo-auth-required { background: linear-gradient(145deg, var(--xms-surface), var(--xms-ink)); border: 1px solid var(--xms-line); border-radius: var(--xms-radius); box-shadow: var(--xms-shadow); max-width: 700px; padding: clamp(28px, 6vw, 70px); text-align: center; }
.xingmoo-auth-required .xingmoo-button { margin-top: 8px; }

.xingmoo-dashboard { max-width: 1240px; }
.xingmoo-dashboard-head { align-items: end; display: flex; gap: 22px; justify-content: space-between; margin-bottom: 28px; }
.xingmoo-dashboard-head h1 { margin-bottom: 8px; }
.xingmoo-dashboard-head .xingmoo-button { flex: 0 0 auto; }
.xingmoo-profile-grid { align-items: start; display: grid; gap: 22px; grid-template-columns: minmax(220px, .75fr) minmax(0, 1.6fr); }
.xingmoo-profile-card,
.xingmoo-dashboard-main { background: var(--xms-surface); border: 1px solid var(--xms-line); border-radius: var(--xms-radius); box-shadow: var(--xms-shadow); }
.xingmoo-profile-card { padding: 24px; position: sticky; top: 20px; }
.xingmoo-avatar-frame { background: linear-gradient(145deg, var(--xms-surface-2), var(--xms-surface)); border: 1px solid var(--xms-border-strong, rgba(121, 227, 158, .46)); border-radius: var(--xms-radius); display: grid; height: 96px; margin-bottom: 18px; overflow: hidden; place-items: center; width: 96px; }
.xingmoo-avatar-frame img { height: 100%; object-fit: cover; width: 100%; }
.xingmoo-profile-card h2 { color: var(--xms-text); font-size: 22px; margin: 0 0 4px; }
.xingmoo-muted { color: var(--xms-muted); font-size: 13px; }
.xingmoo-profile-meta { border-top: 1px solid rgba(175, 197, 181, .16); display: flex; font-size: 12px; justify-content: space-between; gap: 12px; padding: 13px 0; }
.xingmoo-profile-meta span { color: var(--xms-muted); }
.xingmoo-profile-meta strong { color: var(--xms-text); font-weight: 650; text-align: right; }
.xingmoo-profile-card .xingmoo-text-link { display: inline-block; font-size: 13px; margin-top: 12px; }
.xingmoo-dashboard-main { padding: clamp(20px, 3vw, 34px); }
.xingmoo-section-heading { align-items: end; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 20px; }
.xingmoo-section-heading h2 { color: var(--xms-text); font-size: 24px; margin: 5px 0 0; }
.xingmoo-status-dot { align-items: center; color: var(--xms-link); display: inline-flex; font-size: 12px; gap: 6px; }
.xingmoo-status-dot::before { background: var(--xms-green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(121, 227, 158, .14); content: ""; display: inline-block; height: 7px; width: 7px; }
.xingmoo-form-columns { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.xingmoo-profile-form { border-bottom: 1px solid rgba(175, 197, 181, .15); padding-bottom: 28px; }
.xingmoo-password-details { border: 1px solid rgba(175, 197, 181, .18); border-radius: var(--xms-radius); padding: 12px 14px; }
.xingmoo-password-details summary { color: var(--xms-text); cursor: pointer; font-size: 13px; font-weight: 650; }
.xingmoo-password-details[open] { display: grid; gap: 15px; }
.xingmoo-submissions-heading { margin-top: 28px; }
.xingmoo-submissions { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.xingmoo-submission { align-items: center; background: var(--xms-ink); border: 1px solid rgba(175, 197, 181, .17); border-radius: var(--xms-radius); display: flex; gap: 14px; justify-content: space-between; padding: 13px 15px; }
.xingmoo-submission h3 { font-size: 14px; margin: 0 0 4px; }
.xingmoo-submission h3 a { color: var(--xms-text); text-decoration: none; }
.xingmoo-submission h3 a:hover { color: var(--xms-green); }
.xingmoo-submission time { color: var(--xms-muted); font-size: 11px; }
.xingmoo-badge { border: 1px solid; border-radius: 999px; font-size: 11px; line-height: 1.2; padding: 5px 9px; white-space: nowrap; }
.xingmoo-badge-publish { background: rgba(49, 182, 110, .16); border-color: rgba(121, 227, 158, .48); color: #bdf5cd; }
.xingmoo-badge-pending { background: rgba(244, 204, 122, .13); border-color: rgba(244, 204, 122, .48); color: #ffe4a8; }
.xingmoo-badge-draft,
.xingmoo-badge-private { background: rgba(175, 197, 181, .10); border-color: rgba(175, 197, 181, .40); color: var(--xms-text); }
.xingmoo-empty { background: var(--xms-ink); border: 1px dashed rgba(175, 197, 181, .28); border-radius: var(--xms-radius); padding: 28px; text-align: center; }
.xingmoo-empty-icon { color: var(--xms-cyan); display: block; font-size: 28px; margin-bottom: 6px; }
.xingmoo-empty h3 { color: var(--xms-text); font-size: 17px; margin: 0 0 6px; }
.xingmoo-empty p { color: var(--xms-muted); font-size: 13px; margin: 0 0 14px; }

/* Public resource atlas (also serves the former ?cosmdl_tree=1 entry). */
.xingmoo-index { color: var(--xms-text); margin: clamp(24px, 5vw, 64px) auto; max-width: 1240px; padding: 0 clamp(16px, 3vw, 32px); }
.xingmoo-index-hero { background: linear-gradient(135deg, var(--xms-surface-2), var(--xms-ink)); background-image: linear-gradient(135deg, color-mix(in srgb, var(--xms-surface-2) 90%, transparent), color-mix(in srgb, var(--xms-ink) 96%, transparent)), url("xingmoo-pixel-landscape.svg"); background-position: center, center; background-size: cover, cover; border: 1px solid var(--xms-line); border-radius: var(--xms-radius); box-shadow: var(--xms-shadow); padding: clamp(24px, 5vw, 52px); position: relative; }
.xingmoo-index-hero::after { background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(109, 217, 208, .07) 10px 11px); content: ""; inset: 0; pointer-events: none; position: absolute; }
.xingmoo-index-hero > * { position: relative; z-index: 1; }
.xingmoo-index-hero h1 { color: var(--xms-text); font-size: clamp(28px, 4vw, 46px); letter-spacing: -.035em; line-height: 1.12; margin: 12px 0; }
.xingmoo-index-hero p { color: var(--xms-muted); line-height: 1.8; margin: 0 0 22px; max-width: 760px; }
.xingmoo-index-search { display: flex; gap: 10px; max-width: 680px; }
.xingmoo-index-search input { background: var(--xms-ink); border: 1px solid var(--xms-line); border-radius: var(--xms-radius); color: var(--xms-text); font: inherit; min-height: 46px; min-width: 0; padding: 10px 13px; width: 100%; }
.xingmoo-index-search input:focus { outline: 3px solid rgba(109, 217, 208, .62); outline-offset: 2px; }
.xingmoo-index-search .xingmoo-button { flex: 0 0 auto; }
.xingmoo-index-categories { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.xingmoo-index-categories a { align-items: center; border: 1px solid var(--xms-line); border-radius: var(--xms-radius); color: var(--xms-muted); display: inline-flex; font-size: 13px; gap: 7px; padding: 8px 11px; text-decoration: none; }
.xingmoo-index-categories a:hover,
.xingmoo-index-categories a.is-active { background: var(--xms-surface-2); border-color: var(--xms-green); color: var(--xms-text); }
.xingmoo-index-categories a span { color: var(--xms-cyan); font-size: 11px; }
.xingmoo-index-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.xingmoo-index-card { background: var(--xms-surface); border: 1px solid var(--xms-line); border-radius: var(--xms-radius); box-shadow: var(--xms-shadow); min-width: 0; overflow: hidden; transition: transform .18s ease, border-color .18s ease; }
.xingmoo-index-card:hover { border-color: var(--xms-border-strong, var(--xms-green)); transform: translateY(-3px); }
.xingmoo-index-card-link { color: inherit; display: block; height: 100%; text-decoration: none; }
.xingmoo-index-thumb { align-items: center; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--xms-surface-2), var(--xms-ink)); color: var(--xms-green); display: flex; font-size: 34px; justify-content: center; overflow: hidden; }
.xingmoo-index-thumb img { height: 100%; object-fit: cover; width: 100%; }
.xingmoo-index-card-body { padding: 16px; }
.xingmoo-index-card-meta { align-items: center; color: var(--xms-cyan); display: flex; font-size: 11px; justify-content: space-between; gap: 8px; }
.xingmoo-index-card-meta time { color: var(--xms-muted); }
.xingmoo-index-card-body h2 { color: var(--xms-text); font-size: 18px; line-height: 1.35; margin: 10px 0 8px; }
.xingmoo-index-card-body p { color: var(--xms-muted); font-size: 13px; line-height: 1.65; margin: 0 0 14px; min-height: 42px; }
.xingmoo-index-card-body .xingmoo-text-link { font-size: 12px; }
.xingmoo-index-pagination { margin-top: 26px; }
.xingmoo-index-pagination ul { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 0; padding: 0; }
.xingmoo-index-pagination a,
.xingmoo-index-pagination span { border: 1px solid var(--xms-line); border-radius: var(--xms-radius); color: var(--xms-muted); display: inline-block; padding: 7px 11px; text-decoration: none; }
.xingmoo-index-pagination .current,
.xingmoo-index-pagination a:hover { background: var(--xms-green); color: #082017; }

/* Auth links appended to the existing Puock menu. */
.xingmoo-auth-nav a { align-items: center; display: inline-flex; gap: 7px; }
.xingmoo-auth-nav-register a { background: var(--xms-green); border-radius: var(--xms-radius); color: #082017 !important; font-weight: 700; padding: 6px 11px; }
.xingmoo-auth-nav-register a:hover { background: #9bf2b7; }
.xingmoo-nav-avatar { align-items: center; background: linear-gradient(135deg, var(--xms-green), var(--xms-cyan)); border-radius: 50%; color: #082017; display: inline-flex; font-size: 10px; font-weight: 800; height: 24px; justify-content: center; width: 24px; }

/* Puock's page template reserves a sidebar; account surfaces need the full
   content column so the dashboard remains readable on laptop widths. */
/* Puock does not always pass body_class through its custom template. Use the
   rendered plugin wrappers (and :has where an ancestor is required) so these
   rules work in both the stock and customized header templates. */
#post-main:has(.xingmoo-auth-shell),
#post-main:has(.xingmoo-dashboard),
#post-main:has(.xingmoo-index),
#post-main:has(.xingmoo-auth-required) { width: 100% !important; max-width: 100% !important; flex-basis: 100% !important; }
#post-main:has(.xingmoo-auth-shell) + #sidebar,
#post-main:has(.xingmoo-dashboard) + #sidebar,
#post-main:has(.xingmoo-index) + #sidebar,
#post-main:has(.xingmoo-auth-required) + #sidebar { display: none !important; }
#post-main:has(.xingmoo-auth-shell) .post-content,
#post-main:has(.xingmoo-dashboard) .post-content,
#post-main:has(.xingmoo-index) .post-content,
#post-main:has(.xingmoo-auth-required) .post-content { padding-left: 0 !important; padding-right: 0 !important; }
/* Puock wraps shortcode pages in a light/dark card. Let the branded surface
   own the canvas so the pixel landscape and panels do not sit on a second
   opaque rectangle. */
#post-main:has(.xingmoo-auth-shell) .p-block,
#post-main:has(.xingmoo-dashboard) .p-block,
#post-main:has(.xingmoo-index) .p-block,
#post-main:has(.xingmoo-auth-required) .p-block,
#post-main:has(.xingmoo-auth-shell) .p-block .entry-content,
#post-main:has(.xingmoo-dashboard) .p-block .entry-content,
#post-main:has(.xingmoo-index) .p-block .entry-content,
#post-main:has(.xingmoo-auth-required) .p-block .entry-content {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#post-main:has(.xingmoo-auth-shell) #post-title,
#post-main:has(.xingmoo-dashboard) #post-title,
#post-main:has(.xingmoo-index) #post-title,
#post-main:has(.xingmoo-auth-required) #post-title,
#post-main:has(.xingmoo-auth-shell) .p-block .options,
#post-main:has(.xingmoo-dashboard) .p-block .options,
#post-main:has(.xingmoo-index) .p-block .options,
#post-main:has(.xingmoo-auth-required) .p-block .options { display: none !important; }
#post-main:has(.xingmoo-auth-shell) .p-block .mt20.puock-text,
#post-main:has(.xingmoo-dashboard) .p-block .mt20.puock-text,
#post-main:has(.xingmoo-index) .p-block .mt20.puock-text,
#post-main:has(.xingmoo-auth-required) .p-block .mt20.puock-text { margin-top: 0 !important; }

@media (max-width: 760px) {
  .xingmoo-auth-shell { display: block; min-height: 0; }
  .xingmoo-auth-art { min-height: 125px; }
  .xingmoo-auth-card { margin: 0 auto; padding: 28px 20px 34px; }
  .xingmoo-dashboard-head { align-items: start; flex-direction: column; }
  .xingmoo-dashboard-head .xingmoo-button { width: 100%; }
  .xingmoo-profile-grid { grid-template-columns: 1fr; }
  .xingmoo-profile-card { position: static; }
  .xingmoo-form-columns { grid-template-columns: 1fr; }
  .xingmoo-section-heading { align-items: start; flex-direction: column; }
  .xingmoo-index-search { align-items: stretch; flex-direction: column; }
  .xingmoo-index-search .xingmoo-button { width: 100%; }
  .xingmoo-index-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .xingmoo-button,
  .xingmoo-field input,
  .xingmoo-field textarea { transition: none; }
  .xingmoo-button:hover { transform: none; }
}

/* Account and atlas theme contract. Puock changes data-bs-theme at runtime,
   while some versions leave html:not([data-bs-theme]) body.puock-dark behind. Defining every token on
   the rendered wrapper prevents stale :root aliases leaking into light mode. */
html[data-bs-theme="light"] .xingmoo-auth-shell,
html[data-bs-theme="light"] .xingmoo-dashboard,
html[data-bs-theme="light"] .xingmoo-auth-required,
html[data-bs-theme="light"] .xingmoo-index,
html:not([data-bs-theme]) body.puock-light .xingmoo-auth-shell,
html:not([data-bs-theme]) body.puock-light .xingmoo-dashboard,
html:not([data-bs-theme]) body.puock-light .xingmoo-auth-required,
html:not([data-bs-theme]) body.puock-light .xingmoo-index {
  --xms-ink: #f0f7ed;
  --xms-surface: #ffffff;
  --xms-surface-2: #e5f1e2;
  --xms-surface-3: #d5e9d2;
  --xms-line: #b8d0b9;
  --xms-border-strong: #4c8e58;
  --xms-text: #173b27;
  --xms-muted: #3b5c48;
  --xms-placeholder: #617966;
  --xms-green: #4d9d4a;
  --xms-green-deep: #34783f;
  --xms-cyan: #087486;
  --xms-gold: #a55c24;
  --xms-link: #246e39;
  --xms-button: #86ce5a;
  --xms-button-text: #14351f;
  --xms-focus: #087486;
  --xms-input: #ffffff;
  --xms-error-bg: #fff1f0;
  --xms-error-text: #8b2e2a;
  --xms-success-bg: #edf9ed;
  --xms-success-text: #276b39;
  --xms-pending-bg: #fff7df;
  --xms-pending-text: #78541b;
  --xms-shadow: 0 14px 30px rgba(32, 77, 39, .13);
  color-scheme: light;
}

/* Puock's post rules are more specific than a shortcode stylesheet. Keep the
   reset narrow to our wrappers and remove its decorative heading underline. */
#post-main:has(.xingmoo-auth-shell) .entry-content,
#post-main:has(.xingmoo-dashboard) .entry-content,
#post-main:has(.xingmoo-auth-required) .entry-content,
#post-main:has(.xingmoo-index) .entry-content { color: var(--xms-text); }
#post-main:has(.xingmoo-auth-shell) .entry-content h1::after,
#post-main:has(.xingmoo-dashboard) .entry-content h1::after,
#post-main:has(.xingmoo-auth-required) .entry-content h1::after,
#post-main:has(.xingmoo-index) .entry-content h1::after { display: none !important; }

.xingmoo-form a,
.xingmoo-form a:visited,
.xingmoo-auth-switch a,
.xingmoo-auth-switch a:visited,
.xingmoo-text-link,
.xingmoo-text-link:visited,
.xingmoo-index-card-link,
.xingmoo-index-card-link:visited { color: var(--xms-link) !important; }
.xingmoo-form a:hover,
.xingmoo-auth-switch a:hover,
.xingmoo-text-link:hover { color: var(--xms-text) !important; }
.xingmoo-form > p { margin: 0; }
.xingmoo-form > p > br { display: none; }
.xingmoo-form .xingmoo-field > p { margin: 0; }

.xingmoo-field input,
.xingmoo-field textarea,
.xingmoo-index-search input,
.xingmoo-field select {
  background: var(--xms-input);
  border-color: var(--xms-line);
  color: var(--xms-text);
}
.xingmoo-field input::placeholder,
.xingmoo-field textarea::placeholder,
.xingmoo-index-search input::placeholder { color: var(--xms-placeholder); opacity: 1; }
.xingmoo-field input:focus,
.xingmoo-field textarea:focus,
.xingmoo-index-search input:focus {
  border-color: var(--xms-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--xms-focus) 22%, transparent);
}
.xingmoo-field input:-webkit-autofill,
.xingmoo-field input:-webkit-autofill:hover,
.xingmoo-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--xms-text);
  -webkit-box-shadow: 0 0 0 1000px var(--xms-input) inset;
  transition: background-color 9999s ease-in-out 0s;
}
.xingmoo-password-toggle { color: var(--xms-link); }
.xingmoo-password-toggle:hover { color: var(--xms-text); }
.xingmoo-notice-error { background: var(--xms-error-bg); color: var(--xms-error-text); }
.xingmoo-notice-success { background: var(--xms-success-bg); color: var(--xms-success-text); }
.xingmoo-badge-publish { background: color-mix(in srgb, var(--xms-green) 18%, transparent); color: var(--xms-success-text); }
.xingmoo-badge-pending { background: var(--xms-pending-bg); color: var(--xms-pending-text); }

html[data-bs-theme="light"] .xingmoo-auth-shell,
html:not([data-bs-theme]) body.puock-light .xingmoo-auth-shell {
  background: linear-gradient(135deg, #ffffff, #e8f3e6);
  border-color: #a9cbaa;
}
html[data-bs-theme="light"] .xingmoo-auth-art,
html:not([data-bs-theme]) body.puock-light .xingmoo-auth-art {
  background-image: linear-gradient(160deg, rgba(227, 241, 225, .68), rgba(205, 229, 205, .82)), url("xingmoo-pixel-landscape.svg");
}
html[data-bs-theme="light"] .xingmoo-index-hero,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-hero {
  background-image: linear-gradient(135deg, rgba(229, 241, 226, .78), rgba(213, 233, 211, .88)), url("xingmoo-pixel-landscape.svg");
}
html[data-bs-theme="light"] .xingmoo-button-primary,
html:not([data-bs-theme]) body.puock-light .xingmoo-button-primary {
  background: var(--xms-button) !important;
  border-color: #4d9d4a !important;
  color: var(--xms-button-text) !important;
  box-shadow: 0 8px 18px rgba(39, 100, 48, .20);
}
html[data-bs-theme="light"] .xingmoo-button-primary:hover,
html:not([data-bs-theme]) body.puock-light .xingmoo-button-primary:hover { background: #91d765 !important; }
html[data-bs-theme="light"] .xingmoo-button-secondary,
html:not([data-bs-theme]) body.puock-light .xingmoo-button-secondary { border-color: #4d9d4a; color: #246e39 !important; }
html[data-bs-theme="light"] .xingmoo-index-categories a,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-categories a { color: #205b38 !important; }
html[data-bs-theme="light"] .xingmoo-index-categories a span,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-categories a span { color: #287b59 !important; }
html[data-bs-theme="light"] .xingmoo-index-categories a:hover,
html[data-bs-theme="light"] .xingmoo-index-categories a:focus-visible,
html[data-bs-theme="light"] .xingmoo-index-categories a.is-active,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-categories a:hover,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-categories a:focus-visible,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-categories a.is-active {
  background: #d5f2dc !important;
  border-color: #2d7f4a !important;
  color: #123b25 !important;
}
html[data-bs-theme="light"] .xingmoo-index-categories a:hover span,
html[data-bs-theme="light"] .xingmoo-index-categories a:focus-visible span,
html[data-bs-theme="light"] .xingmoo-index-categories a.is-active span,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-categories a:hover span,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-categories a:focus-visible span,
html:not([data-bs-theme]) body.puock-light .xingmoo-index-categories a.is-active span { color: #1b5a35 !important; }

@media (max-width: 760px) {
  .xingmoo-auth-shell { margin-inline: 10px; }
  .xingmoo-auth-card { padding: 28px 22px 34px; }
}

/* Explicit dark attribute wins over a stale html:not([data-bs-theme]) body.puock-light class. */
html[data-bs-theme="dark"] .xingmoo-auth-shell,
html[data-bs-theme="dark"] .xingmoo-dashboard,
html[data-bs-theme="dark"] .xingmoo-auth-required,
html[data-bs-theme="dark"] .xingmoo-index {
  --xms-ink: #0b1c15;
  --xms-surface: #11271c;
  --xms-surface-2: #19372a;
  --xms-surface-3: #234533;
  --xms-line: #3f604a;
  --xms-border-strong: #76a17e;
  --xms-text: #edf6e9;
  --xms-muted: #b4cbb7;
  --xms-placeholder: #a1bba8;
  --xms-green: #9bdd75;
  --xms-green-deep: #5baf53;
  --xms-cyan: #8cd9cd;
  --xms-gold: #f1c780;
  --xms-link: #b0e99c;
  --xms-button: #9bdd75;
  --xms-button-text: #17351e;
  --xms-focus: #8cd9cd;
  --xms-input: #0b1c15;
  --xms-error-bg: #3f2223;
  --xms-error-text: #ffd1cc;
  --xms-success-bg: #173c26;
  --xms-success-text: #b7efc0;
  --xms-pending-bg: #3d3220;
  --xms-pending-text: #f4d495;
  --xms-shadow: 0 16px 36px rgba(2, 13, 7, .18);
  color-scheme: dark;
}
html[data-bs-theme="dark"] .xingmoo-auth-shell { background: linear-gradient(135deg, var(--xms-surface-2), var(--xms-ink) 62%) !important; border-color: var(--xms-line) !important; }
html[data-bs-theme="dark"] .xingmoo-auth-art { background-image: linear-gradient(160deg, rgba(25, 55, 42, .74), rgba(11, 28, 21, .92)), url("xingmoo-pixel-landscape.svg") !important; }
html[data-bs-theme="dark"] .xingmoo-index-hero { background-image: linear-gradient(135deg, rgba(25, 55, 42, .90), rgba(11, 28, 21, .96)), url("xingmoo-pixel-landscape.svg") !important; }
html[data-bs-theme="dark"] .xingmoo-button-primary { background: var(--xms-button) !important; border-color: transparent !important; color: var(--xms-button-text) !important; }
html[data-bs-theme="dark"] .xingmoo-index-categories a:hover,
html[data-bs-theme="dark"] .xingmoo-index-categories a:focus-visible,
html[data-bs-theme="dark"] .xingmoo-index-categories a.is-active { background: var(--xms-surface-2) !important; border-color: var(--xms-green) !important; color: var(--xms-text) !important; }

/* Final component boundary against legacy Puock post/editor selectors. */
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) :is(h1, h2, h3, label, summary) {
  color: var(--xms-text) !important;
  text-shadow: none !important;
}
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) :is(h1, h2, h3)::before,
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) :is(h1, h2, h3)::after { display: none !important; }
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) .xingmoo-kicker { color: var(--xms-cyan) !important; }
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) :is(.xingmoo-auth-lede, .xingmoo-muted, .xingmoo-auth-switch, .xingmoo-check, small) { color: var(--xms-muted) !important; }
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) :is(.xingmoo-field input, .xingmoo-field textarea, .xingmoo-index-search input) {
  background: var(--xms-input) !important;
  border: 1px solid var(--xms-border-strong) !important;
  color: var(--xms-text) !important;
  caret-color: var(--xms-text);
  box-shadow: none;
  font-size: 16px;
}
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) :is(.xingmoo-field input, .xingmoo-field textarea, .xingmoo-index-search input):focus {
  outline-color: var(--xms-focus);
  border-color: var(--xms-focus) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--xms-focus) 22%, transparent);
}
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) .xingmoo-password-toggle {
  background: transparent !important;
  color: var(--xms-link) !important;
  box-shadow: none !important;
  border: 0 !important;
  min-height: 36px;
  margin: 0 !important;
}
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) :is(.xingmoo-text-link, .xingmoo-form a, .xingmoo-auth-switch a, .xingmoo-index-categories a),
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) :is(.xingmoo-text-link, .xingmoo-form a, .xingmoo-auth-switch a, .xingmoo-index-categories a):visited { color: var(--xms-link) !important; }
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) .xingmoo-button { font-family: inherit; }
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) .xingmoo-button-primary { background: var(--xms-button) !important; color: var(--xms-button-text) !important; }
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) .xingmoo-button:disabled { cursor: progress; opacity: .7; transform: none; }
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) ::selection { background: var(--xms-button); color: var(--xms-button-text); }


/* Match the component boundary so Chromium autofill cannot restore a pale field in night mode. */
#post-main :is(.xingmoo-auth-shell, .xingmoo-dashboard, .xingmoo-auth-required, .xingmoo-index) .xingmoo-field input:is(:autofill, :-webkit-autofill) {
  -webkit-text-fill-color: var(--xms-text) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--xms-input) inset !important;
  box-shadow: 0 0 0 1000px var(--xms-input) inset !important;
  caret-color: var(--xms-text);
}

