/*
 * Majiriki design refresh v2 (2026-11)
 * Calm & modern: warm paper background, sage green, apricot accent,
 * Zen Maru Gothic headings, Material Symbols Rounded icons.
 */

:root {
  --mjr-bg: #f7f5ef;
  --mjr-surface: #ffffff;
  --mjr-ink: #1f3a34;
  --mjr-text: #3b4c47;
  --mjr-muted: #6e7d78;
  --mjr-line: #e7e3d9;
  --mjr-primary: #2f7d6b;
  --mjr-primary-deep: #1f5c4f;
  --mjr-primary-soft: #e4f1ec;
  --mjr-accent: #ee9f5a;
  --mjr-accent-soft: #fdf0e2;
  --mjr-sky: #4c86bf;
  --mjr-sky-soft: #e7f0f9;
  --mjr-rose: #cf6d80;
  --mjr-rose-soft: #fbeaee;
  --mjr-radius: 20px;
  --mjr-radius-lg: 32px;
  --mjr-shadow-sm: 0 2px 8px rgba(31, 58, 52, .05);
  --mjr-shadow: 0 12px 32px rgba(31, 58, 52, .08);
  --mjr-shadow-lg: 0 24px 60px rgba(31, 58, 52, .12);
  --mjr-head: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  --mjr-body: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body.mjr {
  background: var(--mjr-bg) !important;
  color: var(--mjr-text);
  font-family: var(--mjr-body);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.mjr #wrapper, body.mjr #wrapper-in, body.mjr #content-w { background: transparent !important; }
body.mjr a { color: var(--mjr-primary); transition: color .2s ease; }
body.mjr a:hover { color: var(--mjr-primary-deep); }
body.mjr :focus-visible { outline: 3px solid var(--mjr-accent); outline-offset: 3px; border-radius: 6px; }
body.mjr .material-symbols-rounded.mjr-i {
  font-family: "Material Symbols Rounded" !important; font-weight: normal !important; font-style: normal;
  letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr;
  font-feature-settings: "liga" !important; display: inline-block; overflow: hidden;
  font-size: 1.25em; line-height: 1; vertical-align: -.2em;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none;
}

/* ---------- Header ---------- */
body.mjr #st-headwide,
body.mjr #headbox-bg,
body.mjr #header-full { background: rgba(255, 255, 255, .92) !important; }
body.mjr #st-headwide { border-bottom: 1px solid var(--mjr-line); box-shadow: none; }
body.mjr #headbox { padding-top: 14px !important; padding-bottom: 6px !important; }
body.mjr #headbox img.sitename-only-img { width: auto; max-height: 56px; margin: 0 auto; padding: 0; }

body.mjr #st-menuwide,
body.mjr #st-menubox { background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.mjr #st-menuwide nav { padding: 4px 16px 14px; }
body.mjr #st-menuwide .menu {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
  width: auto !important; max-width: 1180px; margin: 0 auto !important; border: 0 !important;
}
body.mjr #st-menuwide .menu::before, body.mjr #st-menuwide .menu::after { display: none !important; }
body.mjr #st-menuwide .menu > li {
  float: none !important; width: auto !important; height: auto !important;
  border: 0 !important; background: none !important; list-style: none;
}
body.mjr #st-menuwide .menu > li > a {
  display: inline-flex !important; align-items: center; gap: 6px;
  padding: 8px 16px !important; border: 0 !important; border-radius: 999px;
  background: transparent !important; color: var(--mjr-ink) !important;
  font-family: var(--mjr-head); font-size: 15px !important; font-weight: 700; line-height: 1.4 !important;
  transition: background-color .2s ease, color .2s ease;
}
body.mjr #st-menuwide .menu > li > a:hover,
body.mjr #st-menuwide .menu > li.current-menu-item > a {
  background: var(--mjr-primary-soft) !important; color: var(--mjr-primary-deep) !important;
}

/* Menu icons (PC + SP drawer) */
body.mjr .menu-item-5967 > a::before,
body.mjr .menu-item-5968 > a::before,
body.mjr .menu-item-5969 > a::before,
body.mjr .menu-item-5970 > a::before,
body.mjr .menu-item-4694 > a::before,
body.mjr .menu-item-379 > a::before {
  font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal;
  font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none;
  white-space: nowrap; direction: ltr; font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased; color: var(--mjr-primary);
  display: inline-block; margin: 0 !important; border: 0 !important; background: none !important;
  position: static !important; width: auto !important; height: auto !important;
}
body.mjr .menu-item-5967 > a::before { content: "edit_note"; }
body.mjr .menu-item-5968 > a::before { content: "school"; }
body.mjr .menu-item-5969 > a::before { content: "menu_book"; }
body.mjr .menu-item-5970 > a::before { content: "work"; }
body.mjr .menu-item-4694 > a::before { content: "forum"; }
body.mjr .menu-item-379  > a::before { content: "mail"; }

/* SP drawer */
body.mjr #s-navi dl.acordion { background: transparent; }
body.mjr #s-navi .acordion_button .op {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 8px;
  background: var(--mjr-primary-soft) !important; color: var(--mjr-primary-deep) !important; border-radius: 14px;
}
body.mjr #s-navi .acordion_button .op i { color: var(--mjr-primary-deep) !important; }
body.mjr #s-navi dd.acordion_tree { background: var(--mjr-surface) !important; }
body.mjr #s-navi dd.acordion_tree .menu > li > a {
  display: flex !important; align-items: center; gap: 10px;
  padding: 14px 18px !important; border-bottom: 1px solid var(--mjr-line) !important;
  color: var(--mjr-ink) !important; font-family: var(--mjr-head); font-weight: 700;
  background: none !important;
}

/* ---------- Layout ---------- */
body.mjr #content { box-sizing: border-box; max-width: 1180px; padding: 40px 24px 80px; background: transparent !important; }
body.mjr #contentInner, body.mjr main { background: transparent !important; }

@media (min-width: 960px) {
  body.mjr:not(.home) #content {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start;
  }
  body.mjr:not(.home) #content::before,
  body.mjr:not(.home) #content::after { display: none !important; }
  body.mjr:not(.home) #contentInner { float: none !important; width: auto !important; margin: 0 !important; }
  body.mjr:not(.home) #contentInner > main { margin: 0 !important; }
  body.mjr:not(.home) #side { float: none !important; width: auto !important; margin: 0 !important; }
}
body.mjr:not(.home) main {
  box-sizing: border-box; padding: clamp(22px, 4vw, 52px) !important;
  background: var(--mjr-surface) !important; border: 1px solid var(--mjr-line); border-radius: var(--mjr-radius-lg);
  box-shadow: var(--mjr-shadow-sm);
}

/* Home: full width, no sidebar chrome */
body.mjr.home #content,
body.mjr.home #contentInner,
body.mjr.home main {
  float: none !important; width: 100% !important; max-width: 1180px; margin-left: auto !important; margin-right: auto !important;
  padding-left: 0; padding-right: 0; border: 0 !important; box-shadow: none !important;
}
body.mjr.home #content { padding: 32px 24px 64px; }
body.mjr.home .mainbox, body.mjr.home #nocopy, body.mjr.home .entry-content { padding: 0 !important; margin: 0 !important; overflow: visible; }
body.mjr.home #st-headerbox,
body.mjr.home #st-header-under-widgets-box-wrap,
body.mjr.home #st-header-cardlink-wrapper,
body.mjr.home .entry-title,
body.mjr.home #breadcrumb { display: none !important; }

/* ---------- Front page ---------- */
.mjr-front { display: flex; flex-direction: column; gap: clamp(64px, 8vw, 104px); }
.mjr-front p { margin: 0; }
.mjr-front * { box-sizing: border-box; }

/* Section heading */
.mjr-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.mjr-head__label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px !important;
  color: var(--mjr-primary); font-size: 12px; font-weight: 700; letter-spacing: .18em;
}
.mjr-head__label::before { content: ""; width: 18px; height: 2px; background: var(--mjr-accent); border-radius: 2px; }
body.mjr .mjr-front h2.mjr-h2,
body.mjr .mjr-front h3.mjr-res__title {
  margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important;
  color: var(--mjr-ink) !important; font-family: var(--mjr-head); text-align: left !important; position: static;
}
body.mjr .mjr-front h2.mjr-h2::before, body.mjr .mjr-front h2.mjr-h2::after,
body.mjr .mjr-front h3.mjr-res__title::before, body.mjr .mjr-front h3.mjr-res__title::after { content: none !important; display: none !important; }
body.mjr .mjr-front h2.mjr-h2 { font-size: clamp(24px, 3vw, 32px) !important; font-weight: 700; line-height: 1.45 !important; letter-spacing: .02em; }
.mjr-head__lead { margin-top: 8px !important; color: var(--mjr-muted); font-size: 15px; line-height: 1.8; }
body.mjr .mjr-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; color: var(--mjr-primary-deep);
  font-weight: 700; font-size: 15px; text-decoration: none;
}
body.mjr .mjr-link .mjr-i { transition: transform .2s ease; }
body.mjr .mjr-link:hover .mjr-i { transform: translateX(4px); }

/* Buttons */
body.mjr .mjr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--mjr-head); font-size: 16px; font-weight: 700; line-height: 1.3; text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
body.mjr .mjr-btn:hover { transform: translateY(-2px); }
body.mjr .mjr-btn--primary { background: var(--mjr-primary); color: #fff !important; box-shadow: 0 10px 24px rgba(47, 125, 107, .25); }
body.mjr .mjr-btn--primary:hover { background: var(--mjr-primary-deep); }
body.mjr .mjr-btn--ghost { background: var(--mjr-surface); border-color: var(--mjr-line); color: var(--mjr-ink) !important; }
body.mjr .mjr-btn--ghost:hover { border-color: var(--mjr-primary); color: var(--mjr-primary-deep) !important; }

/* Hero */
.mjr-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: clamp(32px, 5vw, 72px);
  padding: clamp(36px, 6vw, 80px); overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(238, 159, 90, .14), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(47, 125, 107, .14), transparent 48%),
    var(--mjr-surface);
  border: 1px solid var(--mjr-line); border-radius: var(--mjr-radius-lg); box-shadow: var(--mjr-shadow);
}
.mjr-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; margin-bottom: 22px !important;
  background: var(--mjr-primary-soft); color: var(--mjr-primary-deep); border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
}
.mjr-hero__title {
  color: var(--mjr-ink); font-family: var(--mjr-head); font-size: clamp(30px, 4.2vw, 50px); font-weight: 700;
  line-height: 1.45; letter-spacing: .02em;
}
.mjr-hero__mark {
  color: var(--mjr-primary);
  background: linear-gradient(transparent 68%, rgba(238, 159, 90, .35) 68%, rgba(238, 159, 90, .35) 92%, transparent 92%);
}
.mjr-hero__lead { max-width: 34em; margin-top: 22px !important; color: var(--mjr-text); font-size: clamp(15px, 1.5vw, 17px); line-height: 2; }
.mjr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.mjr-hero__visual { position: relative; display: grid; place-items: center; min-height: 320px; }
.mjr-blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.mjr-blob--a { width: 78%; aspect-ratio: 1; background: var(--mjr-primary-soft); border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%; animation: mjr-morph 14s ease-in-out infinite; }
.mjr-blob--b { width: 34%; aspect-ratio: 1; right: 2%; top: 4%; background: var(--mjr-accent-soft); }
.mjr-float {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px;
  background: var(--mjr-surface); border-radius: 16px; box-shadow: var(--mjr-shadow);
  animation: mjr-bob 6s ease-in-out infinite;
}
.mjr-float .mjr-i { font-size: 26px; vertical-align: 0; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.mjr-float--1 { left: 4%; top: 10%; color: var(--mjr-rose); }
.mjr-float--2 { right: 0; bottom: 18%; color: var(--mjr-sky); animation-delay: -2s; }
.mjr-float--3 { left: 10%; bottom: 4%; color: var(--mjr-accent); animation-delay: -4s; }

.mjr-count {
  position: relative; z-index: 1; width: min(300px, 100%); padding: 26px 26px 22px;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px);
  border: 1px solid var(--mjr-line); border-radius: 24px; box-shadow: var(--mjr-shadow-lg); text-align: center;
}
.mjr-count__label { display: inline-flex; align-items: center; gap: 6px; color: var(--mjr-muted); font-size: 13px; font-weight: 700; }
.mjr-count__label .mjr-i { color: var(--mjr-primary); }
.mjr-count__num { margin-top: 6px !important; color: var(--mjr-ink); font-family: var(--mjr-head); font-size: 18px; font-weight: 700; }
.mjr-count__num strong { margin: 0 6px; color: var(--mjr-primary); font-size: 64px; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mjr-count__date { margin-top: 2px !important; color: var(--mjr-muted); font-size: 13px; }
body.mjr .mjr-count__link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; padding: 8px 16px;
  background: var(--mjr-primary-soft); color: var(--mjr-primary-deep); border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
body.mjr .mjr-count__link:hover { background: var(--mjr-primary); color: #fff; }
.mjr-count--plain { padding: 32px; }

@keyframes mjr-morph {
  0%, 100% { border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%; transform: rotate(0deg); }
  50% { border-radius: 56% 44% 42% 58% / 40% 56% 44% 60%; transform: rotate(8deg); }
}
@keyframes mjr-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Guide tiles */
.mjr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
body.mjr a.mjr-tile {
  --tile: var(--mjr-primary); --tile-soft: var(--mjr-primary-soft);
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 22px;
  background: var(--mjr-surface); border: 1px solid var(--mjr-line); border-radius: var(--mjr-radius);
  color: var(--mjr-text); text-decoration: none; box-shadow: var(--mjr-shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
body.mjr a.mjr-tile:hover { transform: translateY(-6px); box-shadow: var(--mjr-shadow); border-color: var(--tile); color: var(--mjr-text); }
.mjr-tile--2 { --tile: var(--mjr-sky) !important; --tile-soft: var(--mjr-sky-soft) !important; }
.mjr-tile--3 { --tile: #d98a3f !important; --tile-soft: var(--mjr-accent-soft) !important; }
.mjr-tile--4 { --tile: var(--mjr-rose) !important; --tile-soft: var(--mjr-rose-soft) !important; }
.mjr-tile__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; background: var(--tile-soft); color: var(--tile); border-radius: 18px; }
.mjr-tile__icon .mjr-i { font-size: 30px; vertical-align: 0; }
.mjr-tile__name { color: var(--mjr-ink); font-family: var(--mjr-head); font-size: 19px; font-weight: 700; line-height: 1.5; }
.mjr-tile__desc { flex: 1; color: var(--mjr-muted); font-size: 13.5px; line-height: 1.8; }
.mjr-tile__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--tile); font-size: 14px; font-weight: 700; }
.mjr-tile__more .mjr-i { transition: transform .2s ease; }
body.mjr a.mjr-tile:hover .mjr-tile__more .mjr-i { transform: translateX(4px); }

/* Ranking (WordPress Popular Posts) */
body.mjr .mjr-ranking .wpp-list {
  counter-reset: mjr-rank; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  margin: 0 !important; padding: 0 !important; list-style: none;
}
body.mjr .mjr-ranking .wpp-list li {
  counter-increment: mjr-rank; position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 18px;
  margin: 0 !important; padding: 14px 20px 14px 14px !important;
  background: var(--mjr-surface); border: 1px solid var(--mjr-line); border-radius: var(--mjr-radius);
  box-shadow: var(--mjr-shadow-sm); transition: transform .25s ease, box-shadow .25s ease; list-style: none;
}
body.mjr .mjr-ranking .wpp-list li:hover { transform: translateY(-3px); box-shadow: var(--mjr-shadow); }
body.mjr .mjr-ranking .wpp-list li::before {
  content: counter(mjr-rank); position: absolute; left: 6px; top: 6px; z-index: 2;
  display: grid; place-items: center; width: 28px; height: 28px;
  background: var(--mjr-ink); color: #fff; border-radius: 50%; border: 2px solid #fff;
  font-family: var(--mjr-head); font-size: 13px; font-weight: 700;
}
body.mjr .mjr-ranking .wpp-list li:nth-child(1)::before { background: #d9a23f; }
body.mjr .mjr-ranking .wpp-list li:nth-child(2)::before { background: #9aa5ab; }
body.mjr .mjr-ranking .wpp-list li:nth-child(3)::before { background: #c08562; }
body.mjr .mjr-ranking .wpp-list .wpp-thumbnail {
  display: block; width: 88px !important; height: 88px !important; margin: 0 !important; float: none !important;
  object-fit: cover; border-radius: 14px;
}
body.mjr .mjr-ranking .wpp-list .wpp-post-title { color: var(--mjr-ink); font-size: 15px; font-weight: 700; line-height: 1.7; text-decoration: none; }
body.mjr .mjr-ranking .wpp-list .wpp-post-title:hover { color: var(--mjr-primary); }
body.mjr .mjr-ranking .wpp-list .wpp-meta { display: none; }

/* Resources */
.mjr-res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mjr-res {
  display: flex; flex-direction: column; gap: 16px; padding: 24px;
  background: var(--mjr-surface); border: 1px solid var(--mjr-line); border-radius: var(--mjr-radius); box-shadow: var(--mjr-shadow-sm);
}
body.mjr .mjr-front h3.mjr-res__title { display: flex !important; align-items: center; gap: 10px; font-size: 17px !important; font-weight: 700; line-height: 1.5 !important; }
.mjr-res__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; background: var(--mjr-accent-soft); color: #c97a32; border-radius: 12px; }
.mjr-res__icon .mjr-i { font-size: 22px; vertical-align: 0; }
body.mjr a.mjr-res__item {
  flex: 1; display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px;
  background: var(--mjr-bg); border-radius: 16px; color: var(--mjr-ink); font-size: 14px; font-weight: 700; line-height: 1.7; text-decoration: none;
  transition: background-color .2s ease;
}
body.mjr a.mjr-res__item:hover { background: var(--mjr-primary-soft); color: var(--mjr-ink); }
body.mjr a.mjr-res__item img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; margin: 0; }
body.mjr a.mjr-res__btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 18px;
  border: 1.5px solid var(--mjr-line); border-radius: 999px; color: var(--mjr-primary-deep);
  font-size: 14px; font-weight: 700; text-decoration: none; transition: border-color .2s ease, background-color .2s ease;
}
body.mjr a.mjr-res__btn:hover { border-color: var(--mjr-primary); background: var(--mjr-primary-soft); }

/* Related site */
.mjr-related {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 32px clamp(24px, 4vw, 44px);
  background: linear-gradient(120deg, var(--mjr-accent-soft), #fff 55%, var(--mjr-primary-soft));
  border: 1px solid var(--mjr-line); border-radius: var(--mjr-radius-lg);
}
.mjr-related__icon { display: grid; place-items: center; width: 64px; height: 64px; background: #fff; color: var(--mjr-accent); border-radius: 20px; box-shadow: var(--mjr-shadow-sm); }
.mjr-related__icon .mjr-i { font-size: 34px; vertical-align: 0; }
.mjr-related__name { color: var(--mjr-ink); font-family: var(--mjr-head); font-size: 22px; font-weight: 700; line-height: 1.5; }
.mjr-related__text { margin-top: 4px !important; color: var(--mjr-muted); font-size: 14px; line-height: 1.8; }

/* Latest heading sits right above the theme's tab list */
.mjr-latest .mjr-head { margin-bottom: 0; }
body.mjr.home .st-tab-category { margin-top: 24px; }

/* ---------- Tabs & post cards (theme parts) ---------- */
body.mjr .st-tab-content { display: flex; flex-wrap: wrap; justify-content: flex-start !important; gap: 8px; }
body.mjr .st-tab-content > label::before,
body.mjr .st-tab-content > label::after { content: none !important; display: none !important; }
body.mjr .st-tab-content > label {
  top: 0 !important; flex: 0 0 auto;
  margin: 0 !important; padding: 8px 20px !important; width: auto !important;
  background: var(--mjr-surface) !important; border: 1px solid var(--mjr-line) !important; border-radius: 999px !important;
  color: var(--mjr-text) !important; font-size: 14px; font-weight: 700 !important; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
body.mjr .st-tab-content > input:checked + label { background: var(--mjr-ink) !important; border-color: var(--mjr-ink) !important; color: #fff !important; }
body.mjr .st-tab-content .st-tab-main { flex-basis: 100%; margin-top: 16px; padding: 0 !important; border: 0 !important; background: none !important; }

body.mjr .post-card-list { gap: 20px !important; }
body.mjr .post-card-list-item {
  overflow: hidden; margin: 0 !important; background: var(--mjr-surface); border: 1px solid var(--mjr-line); border-radius: var(--mjr-radius);
  box-shadow: var(--mjr-shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
body.mjr .post-card-list-item:hover { transform: translateY(-4px); box-shadow: var(--mjr-shadow); }
body.mjr .post-card-image { position: relative; }
body.mjr .post-card-image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
body.mjr .post-card-body { padding: 16px 18px 20px !important; }
body.mjr .post-card-title { margin: 0 !important; font-size: 15px !important; line-height: 1.7 !important; }
body.mjr .post-card-title a { color: var(--mjr-ink) !important; text-decoration: none; }
body.mjr .post-card-excerpt { margin-top: 6px; color: var(--mjr-muted); font-size: 13px; line-height: 1.8; height: auto !important; max-height: none !important; }
body.mjr .post-card-excerpt p {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0 !important; font-size: 13px !important; line-height: 1.8 !important; max-height: none !important;
}
body.mjr .post-card-date { color: var(--mjr-muted); font-size: 12px; }

/* Category chips */
body.mjr .catname, body.mjr .st-catgroup a .catname {
  display: inline-block; padding: 3px 12px !important; background: rgba(255, 255, 255, .92) !important;
  border: 0 !important; border-radius: 999px !important; color: var(--mjr-primary-deep) !important;
  font-size: 11px !important; font-weight: 700; box-shadow: var(--mjr-shadow-sm);
}
body.mjr:not(.home) main .catname { background: var(--mjr-primary-soft) !important; box-shadow: none; }

/* Load more / theme buttons */
body.mjr .st-mybtn, body.mjr .st-mybtn[style] {
  max-width: 420px; margin: 24px auto !important; background: var(--mjr-primary) !important; border-color: var(--mjr-primary) !important;
  border-radius: 999px !important; box-shadow: 0 10px 22px rgba(47, 125, 107, .2);
}
body.mjr .load-more-action button, body.mjr .st-load-more-button {
  background: var(--mjr-surface) !important; border: 1.5px solid var(--mjr-line) !important; border-radius: 999px !important;
  color: var(--mjr-primary-deep) !important; font-weight: 700;
}

/* ---------- Article pages ---------- */
body.mjr:not(.home) #breadcrumb { font-size: 12px; color: var(--mjr-muted); }
body.mjr:not(.home) .entry-title {
  color: var(--mjr-ink) !important; font-family: var(--mjr-head); font-size: clamp(24px, 3.4vw, 34px) !important;
  font-weight: 700; line-height: 1.55 !important; letter-spacing: .01em !important;
}
body.mjr:not(.home) .entry-content { font-size: 16px; line-height: 2; color: var(--mjr-text); }
body.mjr:not(.home) .entry-content p { margin-bottom: 1.5em; }

body.mjr:not(.home) .entry-content h2:not([class*="is-style-st-heading-custom-"]) {
  position: relative; margin: 64px 0 28px !important; padding: 16px 22px 16px 26px !important;
  background: var(--mjr-primary-soft) !important; border: 0 !important; border-radius: 16px !important; box-shadow: none !important;
  color: var(--mjr-ink) !important; font-family: var(--mjr-head); font-size: clamp(20px, 2.6vw, 24px) !important; font-weight: 700; line-height: 1.6 !important;
}
body.mjr:not(.home) .entry-content h2:not([class*="is-style-st-heading-custom-"])::before {
  content: "" !important; display: block !important; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 5px; height: auto !important;
  background: var(--mjr-primary) !important; border: 0 !important; border-radius: 4px;
}
body.mjr:not(.home) .entry-content h2:not([class*="is-style-st-heading-custom-"])::after { content: none !important; display: none !important; }

body.mjr:not(.home) .entry-content h3:not([class*="is-style-st-heading-custom-"]) {
  margin: 44px 0 20px !important; padding: 0 0 10px 0 !important; background: none !important;
  border: 0 !important; border-bottom: 2px solid var(--mjr-line) !important; border-radius: 0 !important; box-shadow: none !important;
  color: var(--mjr-ink) !important; font-family: var(--mjr-head); font-size: clamp(18px, 2.2vw, 21px) !important; font-weight: 700; line-height: 1.6 !important;
  background-image: linear-gradient(var(--mjr-accent), var(--mjr-accent)) !important; background-size: 64px 2px !important;
  background-position: left bottom !important; background-repeat: no-repeat !important;
}
body.mjr:not(.home) .entry-content h3:not([class*="is-style-st-heading-custom-"])::before,
body.mjr:not(.home) .entry-content h3:not([class*="is-style-st-heading-custom-"])::after { content: none !important; display: none !important; }

body.mjr:not(.home) .entry-content h4:not([class*="is-style-st-heading-custom-"]) {
  padding: 0 0 0 14px !important; border: 0 !important; border-left: 4px solid var(--mjr-accent) !important; background: none !important;
  color: var(--mjr-ink) !important; font-size: 17px !important;
}
body.mjr:not(.home) .entry-content ul:not([class]) li::marker,
body.mjr:not(.home) .entry-content ol:not([class]) li::marker { color: var(--mjr-primary); }
body.mjr:not(.home) .entry-content img { border-radius: 14px; }
body.mjr:not(.home) .entry-content blockquote {
  margin: 28px 0; padding: 20px 24px; background: var(--mjr-bg); border: 0; border-left: 4px solid var(--mjr-primary); border-radius: 0 14px 14px 0;
}
body.mjr:not(.home) .entry-content table { border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--mjr-line); border-radius: 14px; }
body.mjr:not(.home) .entry-content th { background: var(--mjr-primary-soft); color: var(--mjr-ink); }
body.mjr:not(.home) .entry-content #toc_container, body.mjr:not(.home) .entry-content .st-h-ad + #toc_container,
body.mjr:not(.home) .entry-content .st-toc {
  border: 1px solid var(--mjr-line) !important; border-radius: var(--mjr-radius) !important; background: var(--mjr-bg) !important;
}

/* Related card links inside articles */
body.mjr:not(.home) .st-cardbox.kanren {
  padding: 14px !important; background: var(--mjr-bg); border: 1px solid var(--mjr-line) !important; border-radius: 16px; transition: background-color .2s ease;
}
body.mjr .st-cardbox:hover { opacity: 1 !important; }
body.mjr:not(.home) a.st-cardlink:hover .st-cardbox { background: var(--mjr-primary-soft); }
body.mjr .st-card-img img { border-radius: 12px; }

/* Sidebar */
body.mjr #side aside,
body.mjr #side aside > div { padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
body.mjr #side .side-widgets {
  padding: 22px; margin: 0 0 20px !important; background: var(--mjr-surface);
  border: 1px solid var(--mjr-line); border-radius: var(--mjr-radius); box-shadow: var(--mjr-shadow-sm);
}
body.mjr #side .side-widgets > p:empty { display: none; }

/* Home: ranking is already in the page, so show the remaining widgets as a row */
body.mjr.home #side {
  float: none !important; width: 100% !important; max-width: 1180px; margin: 64px auto 0 !important; padding: 0 !important;
}
body.mjr.home #side aside,
body.mjr.home #side .side-topad { float: none !important; width: 100% !important; max-width: none !important; }
body.mjr.home #side #block-2 { display: none !important; }
body.mjr.home #side .side-topad { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
body.mjr.home #side .side-widgets { margin: 0 !important; }
body.mjr #side .st-widgets-title, body.mjr #side aside h4 {
  margin: 0 0 14px !important; padding: 0 !important; background: none !important; border: 0 !important;
  color: var(--mjr-ink) !important; font-family: var(--mjr-head); font-size: 16px !important; font-weight: 700;
}
body.mjr #side .st-widgets-title::before, body.mjr #side .st-widgets-title::after { display: none !important; }
body.mjr #side .wpp-list { margin: 0 !important; padding: 0 !important; }
body.mjr #side .wpp-list li {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px;
  margin: 0 !important; padding: 10px 0 !important; border-bottom: 1px solid var(--mjr-line); list-style: none;
}
body.mjr #side .wpp-list li:last-child { border-bottom: 0; }
body.mjr #side .wpp-list .wpp-thumbnail { display: block; width: 64px !important; height: 64px !important; margin: 0 !important; float: none !important; object-fit: cover; border-radius: 12px; }
body.mjr #side .wpp-list .wpp-post-title { color: var(--mjr-ink); font-size: 13.5px; font-weight: 700; line-height: 1.6; text-decoration: none; }
body.mjr #side .wpp-list .wpp-meta { display: none; }
body.mjr #search input[type="text"], body.mjr #search input[type="search"] {
  border: 1px solid var(--mjr-line) !important; border-radius: 999px !important; background: var(--mjr-bg) !important; padding-left: 18px !important;
}

/* Header slider on article pages */
body.mjr #st-header-under-widgets-box-wrap { background: transparent !important; }
body.mjr .post-slide-image img { border-radius: 14px; }
body.mjr .post-slide-title a { color: var(--mjr-ink) !important; }
body.mjr #st-header-cardlink-wrapper img, body.mjr #st-header-cardlink-wrapper .st-cardlink-card-link { border-radius: 16px; overflow: hidden; }

/* ---------- Footer ---------- */
body.mjr #footer {
  margin-top: 40px; background: var(--mjr-ink) !important; color: rgba(255, 255, 255, .78);
  border-radius: var(--mjr-radius-lg) var(--mjr-radius-lg) 0 0;
}
body.mjr #footer a { color: #fff !important; }
body.mjr #footer #footer-in, body.mjr #footer #footer-wrapper { background: transparent !important; }
body.mjr #footer .head-telno a, body.mjr #footer p { color: rgba(255, 255, 255, .78); }
body.mjr #page-top a {
  display: grid !important; place-items: center; width: 52px; height: 52px;
  background: var(--mjr-primary) !important; border-radius: 50% !important; box-shadow: var(--mjr-shadow);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .mjr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mjr-res-grid { grid-template-columns: 1fr; }
}
@media (max-width: 959px) {
  body.mjr #content, body.mjr.home #content { padding: 24px 16px 56px; }
  .mjr-hero { grid-template-columns: 1fr; }
  .mjr-hero__visual { min-height: 260px; }
  body.mjr .mjr-ranking .wpp-list { grid-template-columns: 1fr; }
  body.mjr.home #side .side-topad { grid-template-columns: 1fr; }
  body.mjr:not(.home) #side { margin-top: 32px !important; }
  .mjr-related { grid-template-columns: auto minmax(0, 1fr); }
  .mjr-related .mjr-btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 599px) {
  body.mjr #headbox img.sitename-only-img { max-height: 44px; }
  .mjr-front { gap: 56px; }
  .mjr-hero { padding: 32px 22px 26px; border-radius: 24px; }
  .mjr-hero__title { font-size: 28px; }
  .mjr-hero__eyebrow { font-size: 12px; }
  .mjr-hero__actions { display: grid; grid-template-columns: 1fr; }
  .mjr-hero__visual { min-height: 230px; }
  .mjr-float { width: 44px; height: 44px; border-radius: 14px; }
  .mjr-count__num strong { font-size: 52px; }
  .mjr-tiles { grid-template-columns: 1fr; gap: 12px; }
  body.mjr a.mjr-tile {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "icon name more" "icon desc more";
    align-items: center; gap: 2px 14px; padding: 16px 16px 16px 14px;
  }
  .mjr-tile__icon { grid-area: icon; width: 52px; height: 52px; margin: 0; border-radius: 16px; }
  .mjr-tile__name { grid-area: name; font-size: 17px; }
  .mjr-tile__desc { grid-area: desc; font-size: 12.5px; line-height: 1.6; }
  .mjr-tile__more { grid-area: more; margin: 0; font-size: 0; }
  .mjr-tile__more .mjr-i { font-size: 22px; }
  body.mjr .mjr-ranking .wpp-list li { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 12px 14px 12px 12px !important; }
  body.mjr .mjr-ranking .wpp-list .wpp-thumbnail { width: 72px !important; height: 72px !important; }
  body.mjr .mjr-ranking .wpp-list .wpp-post-title { font-size: 14px; }
  .mjr-related { grid-template-columns: 1fr; text-align: left; padding: 26px 22px; }
  .mjr-related .mjr-btn { width: 100%; }
  body.mjr:not(.home) main { border-radius: 22px; padding: 22px 18px !important; }
  body.mjr #footer { border-radius: 24px 24px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
