/* Maru Writer / Butterfly skin v13: fast page, uncropped screenshots, click-anywhere lightbox */
:root {
  --maru-bg: #09040b;
  --maru-ink: #f8eedf;
  --maru-muted: #cbbdca;
  --maru-dim: #9e8a9c;
  --maru-card: rgba(18, 8, 20, 0.82);
  --maru-line: rgba(255,255,255,0.11);
  --maru-orange: #ff6a3d;
  --maru-pink: #c83d86;
  --maru-violet: #8b5cf6;
}

html,
body {
  background-color: var(--maru-bg) !important;
  background-image:
    radial-gradient(circle at 75% 0%, rgba(139,92,246,.16), transparent 34%),
    linear-gradient(180deg, rgba(9,4,11,.10), rgba(9,4,11,.88)),
    url('/img/maru_bg.svg') !important;
  background-size: auto, cover, cover !important;
  background-position: center top, center top, center top !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  color: var(--maru-muted);
}

#body-wrap,
#content-inner,
.layout,
.recent-posts,
#archive,
#tag,
#category { background: transparent !important; }

#page-header {
  background-color: #09040b !important;
  background-image:
    linear-gradient(90deg, rgba(9,4,11,.76), rgba(9,4,11,.20) 52%, rgba(9,4,11,.60)),
    linear-gradient(180deg, rgba(9,4,11,.05), rgba(9,4,11,.68)),
    url('/img/maru-writer-hero.jpg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

#page-header.full_page,
#page-header.not-home-page,
#page-header.post-bg {
  height: 300px !important;
  min-height: 300px !important;
}

#page-header::before { background: rgba(9,4,11,.22) !important; }
#page-site-info, #post-info { top: 50% !important; }
#page-site-info #site-title:empty { display: none !important; }

#site-title,
#post-info .post-title {
  color: var(--maru-ink) !important;
  text-shadow: 0 4px 28px rgba(0,0,0,.55), 0 0 34px rgba(200,61,134,.30) !important;
  letter-spacing: -.035em;
}

#nav.show {
  background: rgba(9,4,11,.88) !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.20);
}

#nav .site-icon {
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  margin-right: .48rem !important;
}

#nav .site-name,
#nav a,
#nav span.site-page { color: var(--maru-ink) !important; }

#page,
#post,
.card-widget,
.recent-post-item,
#archive .article-sort-item,
#tag .article-sort-item,
#category .article-sort-item {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)), var(--maru-card) !important;
  border: 1px solid var(--maru-line) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 56px rgba(0,0,0,.30), 0 0 36px rgba(139,92,246,.07) !important;
}

#article-container {
  position: relative;
  color: var(--maru-muted) !important;
  font-size: 1.06rem;
  line-height: 1.72;
}

#article-container p,
#article-container li { font-size: 1.06rem; }

#article-container h1,
#article-container h2,
#article-container h3,
#article-container h4 {
  color: var(--maru-ink) !important;
  letter-spacing: -.028em;
}

#article-container h1 { font-size: clamp(2.25rem, 4.2vw, 3.7rem); line-height: 1.04; }
#article-container h2 { position: relative; padding-top: .35rem; font-size: clamp(1.72rem, 2.8vw, 2.35rem); }
#article-container h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

#article-container h2::after {
  content: '';
  display: block;
  width: 92px;
  height: 3px;
  margin-top: .58rem;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--maru-orange), var(--maru-pink), var(--maru-violet));
  box-shadow: 0 0 18px rgba(200,61,134,.35);
}

#article-container a {
  color: #ffd6ec !important;
  text-decoration-color: rgba(200,61,134,.42) !important;
}

#article-container hr {
  border: 0 !important;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248,238,223,.18), transparent) !important;
  margin: 2.25rem 0;
}

.maru-page-hero,
.maru-hero-copy {
  position: relative;
  text-align: center;
  padding: 2.1rem 1rem .8rem;
}

.maru-page-hero::before,
.maru-hero-copy::before {
  content: '✦';
  position: absolute;
  top: .55rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(248,238,223,.76);
  text-shadow: 0 0 12px rgba(248,238,223,.60), 0 0 28px rgba(200,61,134,.48);
  opacity: .78;
}

.maru-page-hero h1,
.maru-hero-copy h1 {
  color: var(--maru-ink);
  font-size: clamp(2.45rem, 5vw, 4.3rem);
  line-height: 1.03;
  margin: 0 0 .78rem;
  letter-spacing: -.058em;
}

.maru-page-hero p,
.maru-hero-copy p,
.maru-lede,
.maru-section-lede {
  color: var(--maru-muted);
  max-width: 840px;
  margin: .75rem auto;
  font-size: clamp(1.08rem, 1.55vw, 1.24rem) !important;
  line-height: 1.65;
}

.maru-section-lede { margin: .35rem 0 1.4rem; }

.maru-cta-row {
  position: relative;
  text-align: center;
  margin: 2.2rem 0 2.8rem;
}

.maru-cta-row a,
a.maru-btn,
a.btn-beautify,
#article-container a.btn-beautify,
#article-container a.maru-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  margin: .42rem;
  padding: .92rem 1.46rem;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.17);
  color: var(--maru-ink) !important;
  font-size: 1.02rem;
  font-weight: 780;
  text-decoration: none !important;
  background: radial-gradient(circle at 18% 18%, rgba(255,238,223,.30), transparent 24%), linear-gradient(135deg, var(--maru-orange) 0%, var(--maru-pink) 48%, var(--maru-violet) 100%);
  box-shadow: 0 15px 36px rgba(200,61,134,.30), 0 0 34px rgba(139,92,246,.20);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.maru-cta-row a::before,
a.maru-btn::before,
a.btn-beautify::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(115deg, transparent 0%, transparent 34%, rgba(255,255,255,.42) 45%, rgba(255,255,255,.12) 52%, transparent 64%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
  pointer-events: none;
}

.maru-cta-row a::after,
a.maru-btn::after,
a.btn-beautify::after {
  content: '✦';
  position: absolute;
  right: .86rem;
  top: .36rem;
  color: rgba(248,238,223,.90);
  font-size: .68rem;
  text-shadow: 0 0 8px rgba(248,238,223,.72), 0 0 18px rgba(200,61,134,.66);
  pointer-events: none;
}

.maru-cta-row a:hover,
a.maru-btn:hover,
a.btn-beautify:hover {
  transform: translateY(-2px);
  filter: saturate(1.1) brightness(1.06);
  box-shadow: 0 18px 44px rgba(200,61,134,.40), 0 0 50px rgba(139,92,246,.28);
}

.maru-cta-row a:hover::before,
a.maru-btn:hover::before,
a.btn-beautify:hover::before { transform: translateX(120%); }

.maru-cta-row a.secondary,
a.maru-btn.secondary,
a.btn-beautify.secondary {
  background: radial-gradient(circle at 18% 18%, rgba(255,238,223,.12), transparent 26%), rgba(255,255,255,.07);
  border: 1px solid rgba(248,238,223,.17);
  box-shadow: 0 10px 28px rgba(0,0,0,.22), 0 0 26px rgba(139,92,246,.10);
}

.maru-cta-row::before,
.maru-cta-row::after {
  content: '✦';
  position: absolute;
  color: rgba(248,238,223,.72);
  pointer-events: none;
  text-shadow: 0 0 8px rgba(248,238,223,.62), 0 0 20px rgba(200,61,134,.54);
}

.maru-cta-row::before { left: calc(50% - 155px); top: -.8rem; font-size: .72rem; opacity: .72; }
.maru-cta-row::after { right: calc(50% - 175px); bottom: -.6rem; font-size: .96rem; opacity: .58; }

.maru-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.05rem;
  margin: 2.1rem 0;
}

.maru-feature-card,
.maru-download-card,
.maru-callout {
  position: relative;
  padding: 1.22rem 1.12rem;
  border-radius: 22px;
  background: radial-gradient(circle at top right, rgba(139,92,246,.16), transparent 36%), radial-gradient(circle at 0% 0%, rgba(255,106,61,.08), transparent 30%), rgba(255,255,255,.052);
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 15px 34px rgba(0,0,0,.20), 0 0 22px rgba(139,92,246,.05);
}

.maru-feature-card strong,
.maru-download-card strong,
.maru-callout strong {
  color: var(--maru-ink);
  font-size: 1.12rem;
}

.maru-feature-card p,
.maru-download-card p,
.maru-callout p { margin-bottom: 0; }

.maru-feature-kicker {
  color: #ffd6ec;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem !important;
  font-weight: 800;
  opacity: .88;
}

.maru-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  margin: 2rem 0;
}

.maru-download-panel {
  text-align: center;
  padding: 1.6rem 1.2rem;
  border-radius: 26px;
  background: radial-gradient(circle at 72% 14%, rgba(200,61,134,.20), transparent 34%), linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  border: 1px solid rgba(248,238,223,.14);
  box-shadow: 0 18px 44px rgba(0,0,0,.24), 0 0 34px rgba(200,61,134,.08);
}

.maru-download-panel img {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  margin: 0 auto 1rem;
}

.maru-small-note { color: var(--maru-dim); font-size: .95rem !important; }

.maru-bottom-brand {
  text-align: center;
  margin: 4.2rem auto .8rem;
  padding: 2rem 1rem 0;
}

.maru-bottom-brand img {
  display: block;
  width: min(420px, 90%);
  height: auto;
  margin: 0 auto 1rem;
}

.maru-bottom-brand p { color: var(--maru-muted); opacity: .72; font-size: .95rem; margin: 0; }

#footer {
  background: rgba(9,4,11,.74) !important;
  border-top: 1px solid rgba(255,255,255,.08);
}

#sidebar #sidebar-menus { background: rgba(13,6,16,.96) !important; }

/* Theme screenshots: fast thumbnails, no cropped tops. */
.maru-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 1.7rem 0 2.4rem;
}

.maru-theme-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(circle at 14% 0%, rgba(255,106,61,.10), transparent 28%), radial-gradient(circle at 88% 4%, rgba(139,92,246,.16), transparent 32%), rgba(255,255,255,.052);
  border: 1px solid rgba(248,238,223,.14);
  box-shadow: 0 18px 48px rgba(0,0,0,.28), 0 0 28px rgba(200,61,134,.09);
}

.maru-shot-link {
  position: relative;
  display: block;
  color: inherit !important;
  text-decoration: none !important;
  cursor: zoom-in;
  background: rgba(9,4,11,.55);
}

.maru-shot-link::after {
  content: 'Click to enlarge';
  position: absolute;
  right: .85rem;
  bottom: .85rem;
  z-index: 2;
  padding: .38rem .62rem;
  border-radius: 999px;
  color: #f8eedf;
  font-size: .78rem;
  font-weight: 800;
  background: rgba(9,4,11,.72);
  border: 1px solid rgba(248,238,223,.18);
  box-shadow: 0 8px 24px rgba(0,0,0,.30), 0 0 18px rgba(200,61,134,.14);
}

.maru-theme-card img,
.maru-shot-link img {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: top center !important;
  border-radius: 22px 22px 0 0;
  transform: none !important;
}

.maru-theme-card figcaption {
  padding: 1rem 1.1rem 1.1rem;
  background: linear-gradient(180deg, rgba(9,4,11,.42), rgba(9,4,11,.78)), rgba(18,8,20,.74);
  border-top: 1px solid rgba(248,238,223,.10);
}

.maru-theme-card figcaption strong {
  display: block;
  color: var(--maru-ink);
  font-size: 1.12rem;
  line-height: 1.25;
  margin-bottom: .2rem;
}

.maru-theme-card figcaption span {
  display: block;
  color: var(--maru-muted);
  font-size: .98rem;
  line-height: 1.45;
}

/* Same-page fullscreen image viewer. Click anywhere to close. */
.maru-css-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(5, 2, 7, .92);
}

.maru-css-lightbox:target { display: block; }

.maru-css-lightbox-hitarea {
  position: fixed;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
  color: inherit !important;
  text-decoration: none !important;
}

.maru-css-lightbox-hitarea img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 92vw !important;
  max-height: 86vh !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 18px;
  background: #09040b;
  box-shadow: 0 22px 80px rgba(0,0,0,.62), 0 0 0 1px rgba(248,238,223,.16);
}

.maru-css-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 2147483002;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #f8eedf;
  font-size: 34px;
  line-height: 1;
  background: rgba(9,4,11,.72);
  border: 1px solid rgba(248,238,223,.20);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  pointer-events: none;
}

/* Hide Butterfly's light/dark/theme shortcut; keep the up button. */
#rightside #darkmode,
#rightside .fa-adjust,
#rightside .fa-moon,
#rightside .fa-sun,
#rightside button[title*='dark' i],
#rightside button[title*='light' i],
#rightside button[title*='mode' i],
#rightside button[onclick*='dark'],
#rightside button[onclick*='Light'] { display: none !important; }

@media (max-width: 900px) {
  .maru-theme-grid,
  .maru-split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  #page-header.full_page,
  #page-header.not-home-page,
  #page-header.post-bg { height: 230px !important; min-height: 230px !important; }

  .maru-page-hero,
  .maru-hero-copy { padding-top: 1.35rem; }

  .maru-page-hero h1,
  .maru-hero-copy h1 { font-size: 2.35rem; }

  .maru-cta-row a,
  a.maru-btn,
  a.btn-beautify { width: min(100%, 330px); }

  .maru-css-lightbox-hitarea { padding: 3vh 3vw; }

  .maru-css-lightbox-hitarea img { max-width: 94vw !important; max-height: 82vh !important; }

  .maru-css-lightbox-close { width: 42px; height: 42px; font-size: 30px; top: 12px; right: 12px; }
}

/* ---------------------------------------------------------
   Normal nav + right-side cleanup
   --------------------------------------------------------- */

/* Let Butterfly handle nav show/hide normally; undo any prior sticky pack if cached/merged. */
#nav {
  position: absolute !important;
  top: 0 !important;
  transform: none;
}

/* Remove Butterfly config / theme widgets without touching the up-arrow button. */
#rightside #rightside-config,
#rightside #rightside-config-show,
#rightside .rightside-config-hide,
#rightside .rightside-config-show,
#rightside button[title*='config' i],
#rightside button[aria-label*='config' i],
#rightside button[title*='setting' i],
#rightside button[aria-label*='setting' i],
#rightside button[title*='theme' i],
#rightside button[aria-label*='theme' i],
#rightside button[title*='dark' i],
#rightside button[aria-label*='dark' i],
#rightside button[title*='light' i],
#rightside button[aria-label*='light' i],
#rightside button[title*='mode' i],
#rightside button[aria-label*='mode' i],
#rightside #rightside #rightside #rightside #rightside  {
  display: none !important;
}

/* Keep/restore the up button. It may still only appear after scroll depending on Butterfly JS. */
#rightside #go-up,
#rightside .go-up,
#rightside button[title*='up' i],
#rightside button[aria-label*='up' i],
#rightside #rightside #rightside #rightside button:has(.fa-caret-up) {
  display: block !important;
  visibility: visible !important;
}

/* ---------------------------------------------------------
   Maru back-to-top button: restored, independent of Butterfly
   --------------------------------------------------------- */

#maru-go-up {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 2147482000;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(248,238,223,.18);
  border-radius: 999px;
  color: #f8eedf;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,238,223,.18), transparent 32%),
    rgba(9,4,11,.78);
  box-shadow:
    0 12px 32px rgba(0,0,0,.34),
    0 0 28px rgba(200,61,134,.18);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

#maru-go-up.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#maru-go-up:hover,
#maru-go-up:focus-visible {
  box-shadow:
    0 16px 38px rgba(0,0,0,.40),
    0 0 38px rgba(200,61,134,.28);
  outline: none;
}

/* Keep Butterfly's right-side theme/config controls hidden; Maru's arrow is separate. */
#rightside { pointer-events: none; }
#rightside * { pointer-events: none !important; }
#rightside #go-up,
#rightside .go-up { display: none !important; }

@media (max-width: 768px) {
  #maru-go-up {
    right: 16px;
    bottom: 18px;
    width: 42px;
    height: 42px;
  }
}

/* ---------------------------------------------------------
   Download page OS chooser
   --------------------------------------------------------- */

.maru-download-hero p {
  max-width: 860px;
}

.maru-download-primary {
  margin: 1.6rem 0 2.4rem;
}

.maru-download-panel-primary {
  max-width: 820px;
  margin: 0 auto;
}

.maru-download-primary-cta {
  margin-bottom: 1.1rem;
}

.maru-download-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.6rem 0 2.2rem;
}

#article-container .maru-download-option,
.maru-download-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .85rem;
  align-items: center;
  padding: 1.1rem 1rem;
  min-height: 112px;
  border-radius: 22px;
  color: var(--maru-ink) !important;
  text-decoration: none !important;
  background:
    radial-gradient(circle at top right, rgba(139,92,246,.16), transparent 38%),
    radial-gradient(circle at 0% 0%, rgba(255,106,61,.08), transparent 30%),
    rgba(255,255,255,.052);
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 15px 40px rgba(0,0,0,.24), 0 0 26px rgba(139,92,246,.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.maru-download-option:hover,
.maru-download-option:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(248,238,223,.22);
  box-shadow: 0 19px 48px rgba(0,0,0,.30), 0 0 42px rgba(200,61,134,.15);
  filter: brightness(1.05);
}

.maru-download-option.is-recommended {
  border-color: rgba(255,214,236,.40);
  box-shadow:
    0 20px 54px rgba(0,0,0,.34),
    0 0 46px rgba(200,61,134,.22),
    0 0 0 1px rgba(255,255,255,.055) inset;
}

.maru-download-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--maru-ink);
  font-size: 1.35rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--maru-orange), var(--maru-pink), var(--maru-violet));
  box-shadow: 0 12px 28px rgba(200,61,134,.24);
}

.maru-download-option strong {
  display: block;
  color: var(--maru-ink);
  font-size: 1.14rem;
  line-height: 1.22;
  margin-bottom: .2rem;
}

.maru-download-option em {
  display: block;
  color: var(--maru-muted);
  font-style: normal;
  font-size: .95rem;
  line-height: 1.35;
}

.maru-recommended-badge {
  position: absolute;
  right: .8rem;
  top: .75rem;
  padding: .24rem .52rem;
  border-radius: 999px;
  color: #f8eedf;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  background: rgba(200,61,134,.46);
  border: 1px solid rgba(248,238,223,.18);
  box-shadow: 0 8px 22px rgba(0,0,0,.25), 0 0 18px rgba(200,61,134,.22);
}

.maru-download-arm {
  margin: 1rem 0 2.2rem;
}

#article-container a.maru-text-link,
a.maru-text-link {
  color: #ffd6ec !important;
  font-weight: 760;
  text-decoration: underline !important;
  text-decoration-color: rgba(200,61,134,.42) !important;
  text-underline-offset: .18em;
}

@media (max-width: 900px) {
  .maru-download-options {
    grid-template-columns: 1fr;
  }

  .maru-download-option {
    min-height: 96px;
  }
}

/* ---------------------------------------------------------
   Download page copy refinements v21
   --------------------------------------------------------- */
.maru-download-panel-primary .maru-small-note {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.maru-download-arm .maru-callout {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* v22 small print for user-controlled sync note */
.maru-fine-print {
  max-width: 820px;
  margin: .65rem auto 1.6rem;
  color: var(--maru-dim) !important;
  font-size: .92rem !important;
  line-height: 1.5;
  text-align: center;
}

/* ---------------------------------------------------------
   Dark-by-default Butterfly fixes
   --------------------------------------------------------- */
html,
html[data-theme="dark"],
body,
body.dark {
  color-scheme: dark !important;
}

/* Nav dropdowns: Butterfly can default these to white unless dark mode lands early. */
#nav .menus_items .menus_item .menus_item_child,
#nav .menus_item_child,
#sidebar .menus_item_child,
#menus .menus_item_child {
  background: rgba(13, 6, 16, 0.98) !important;
  border: 1px solid rgba(248, 238, 223, 0.12) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 0 28px rgba(200, 61, 134, 0.10) !important;
  backdrop-filter: blur(14px);
}

#nav .menus_item_child li,
#sidebar .menus_item_child li,
#menus .menus_item_child li {
  background: transparent !important;
}

#nav .menus_item_child a,
#sidebar .menus_item_child a,
#menus .menus_item_child a,
#nav .menus_item_child span,
#sidebar .menus_item_child span,
#menus .menus_item_child span {
  color: var(--maru-ink) !important;
  background: transparent !important;
}

#nav .menus_item_child a:hover,
#sidebar .menus_item_child a:hover,
#menus .menus_item_child a:hover {
  color: #ffd6ec !important;
  background: rgba(255, 255, 255, 0.07) !important;
}

/* Make common Butterfly surfaces dark even before/without its own dark-mode JS. */
[data-theme="light"] #page,
[data-theme="light"] #post,
[data-theme="light"] .card-widget,
[data-theme="light"] .recent-post-item,
[data-theme="light"] #archive .article-sort-item,
[data-theme="light"] #tag .article-sort-item,
[data-theme="light"] #category .article-sort-item {
  color: var(--maru-muted) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.042), rgba(255,255,255,.014)),
    var(--maru-card) !important;
}

/* Keep the light/dark/config controls hidden; Maru supplies only its own up-arrow. */
#rightside #darkmode,
#rightside #rightside-config,
#rightside #rightside-config-show,
#rightside .rightside-config-hide,
#rightside .rightside-config-show,
#rightside button[title*='dark' i],
#rightside button[aria-label*='dark' i],
#rightside button[title*='light' i],
#rightside button[aria-label*='light' i],
#rightside button[title*='theme' i],
#rightside button[aria-label*='theme' i],
#rightside button[title*='mode' i],
#rightside button[aria-label*='mode' i],
#rightside button[title*='config' i],
#rightside button[aria-label*='config' i],
#rightside #rightside #rightside #rightside #rightside  {
  display: none !important;
}

/* v25: original screenshots, no cropped tops, PDF preview card. */
.maru-theme-grid-single {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 980px;
  margin-left: auto !important;
  margin-right: auto !important;
}

.maru-theme-card,
.maru-shot-link {
  overflow: hidden !important;
}

.maru-theme-card img,
.maru-shot-link img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: top center !important;
  transform: none !important;
}

.maru-css-lightbox-hitarea {
  padding: 3vh 3vw !important;
  box-sizing: border-box !important;
}

.maru-css-lightbox-hitarea img {
  width: auto !important;
  height: auto !important;
  max-width: 94vw !important;
  max-height: 88vh !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* ---------------------------------------------------------
   Buy page polish
   --------------------------------------------------------- */

.maru-buy-panel {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
  gap: 1.25rem;
  align-items: stretch;
  margin: 2rem 0 2.4rem;
}

.maru-buy-price-card,
.maru-buy-copy-card {
  position: relative;
  padding: 1.45rem 1.35rem;
  border-radius: 26px;
  background:
    radial-gradient(circle at 72% 14%, rgba(200,61,134,.20), transparent 34%),
    radial-gradient(circle at 0% 0%, rgba(255,106,61,.08), transparent 30%),
    rgba(255,255,255,.052);
  border: 1px solid rgba(248,238,223,.14);
  box-shadow: 0 18px 50px rgba(0,0,0,.28), 0 0 44px rgba(200,61,134,.10);
}

.maru-buy-price-card h2 {
  margin: .25rem 0 .35rem !important;
  font-size: clamp(2.4rem, 5vw, 4rem) !important;
  line-height: 1 !important;
}

.maru-buy-cta {
  margin: 1.35rem 0 1rem;
}

.maru-check-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.maru-check-list li {
  position: relative;
  margin: 0 0 .82rem;
  padding-left: 1.75rem;
}

.maru-check-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: .02rem;
  color: #ffd6ec;
  text-shadow: 0 0 10px rgba(200,61,134,.55);
}

.maru-check-list strong {
  color: var(--maru-ink);
}

@media (max-width: 900px) {
  .maru-buy-panel {
    grid-template-columns: 1fr;
  }
}


/* v29: intro price lockup for Buy page */
.maru-price-lockup {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .9rem;
  margin: .35rem 0 .75rem;
}

.maru-price-old {
  position: relative;
  color: rgba(248,238,223,.52);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -.03em;
}

.maru-price-old::after {
  content: "";
  position: absolute;
  left: -.12em;
  right: -.12em;
  top: 52%;
  height: .12em;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--maru-orange), var(--maru-pink), var(--maru-violet));
  box-shadow: 0 0 14px rgba(200,61,134,.45);
  transform: rotate(-8deg);
}

.maru-price-now {
  color: var(--maru-ink);
  font-size: clamp(3.35rem, 7vw, 5.2rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.075em;
  text-shadow:
    0 0 22px rgba(248,238,223,.18),
    0 0 42px rgba(200,61,134,.34);
}

.maru-buy-price-card > p strong {
  color: var(--maru-ink);
}

.maru-resend-message {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 600;
}

.maru-resend-message-success {
  border: 1px solid rgba(120, 255, 190, 0.35);
  background: rgba(120, 255, 190, 0.10);
}

.maru-resend-message-pending {
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.08);
}

.maru-resend-message-error {
  border: 1px solid rgba(255, 120, 120, 0.40);
  background: rgba(255, 120, 120, 0.10);
}
