/* =========================================================
   お金カテゴリー：HERO・5テーマ・家計特集・証券比較・テーマ別記事・新着・締め
========================================================= */

body.category-money-finance #primary.sf39-mg {
  margin: 0;
  padding: 0;

  max-width: none;
  width: 100%;
}

.sf39-mg {
  --mg-ink: #173f38;
  --mg-teal: #13515a;
  --mg-paper: #fffdf9;
  --mg-sand: #eee2c8;
  --mg-line: #d9d3c3;
  --mg-gold: #a78548;
  --mg-serif: 'Yu Mincho','Hiragino Mincho ProN',serif;

  background: var(--mg-paper);
  color: var(--mg-ink);

  font-family: 'Noto Sans JP','Hiragino Kaku Gothic ProN','Yu Gothic',sans-serif;

  overflow-wrap: break-word;
}

.sf39-mg,
.sf39-mg * {
  box-sizing: border-box;
}

.sf39-mg h1,
.sf39-mg h2,
.sf39-mg h3,
.sf39-mg p,
.sf39-mg figure,
.sf39-mg ul,
.sf39-mg dl,
.sf39-mg dd {
  margin: 0;
}

.sf39-mg a {
  color: inherit;

  text-decoration: none;
}

.sf39-mg img {
  display: block;

  width: 100%;
  max-width: 100%;

  object-fit: cover;

  border-radius: 0;
  filter: none;
  opacity: 1;
}

.sf39-mg h1,
.sf39-mg h2,
.sf39-mg h3,
.sf39-mg dt {
  font-family: var(--mg-serif);
  font-weight: 600;

  color: inherit;
}

.sf39-mg .mg-wrap {
  width: min(1180px,calc(100% - 80px));

  margin-inline: auto;
}

.sf39-mg .mg-section {
  margin-block: 68px;
}

.sf39-mg .mg-kicker {
  font: 500 11px/1.6 Georgia,serif;
  letter-spacing: .16em;

  color: var(--mg-gold);
}

.sf39-mg .mg-heading {
  margin-bottom: 30px;
}

.sf39-mg .mg-heading h2 {
  font-size: clamp(25px,2.5vw,34px);
  line-height: 1.55;

  margin-top: 12px;

  letter-spacing: .025em;
}

.sf39-mg .mg-icon {
  display: block;

  width: 43px;
  height: 43px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;

  flex: none;

  color: var(--mg-gold);
}

.sf39-mg .mg-read {
  display: flex;

  align-items: center;
  justify-content: flex-end;
  gap: 16px;

  font-size: 13px;
  line-height: 1.7;
  font-weight: 600;
}

.sf39-mg .mg-read b {
  font-size: 23px;
  font-weight: 400;

  color: var(--mg-gold);

  transition: transform .2s;
}

.sf39-mg :where(a,summary):focus-visible {
  outline: 2px solid #aa7644;
  outline-offset: 4px;
}

/* =========================================================
   HERO：文章、写真、青緑のサイドメッセージ
========================================================= */

.sf39-mg .mg-hero {
  display: grid;

  grid-template-columns: minmax(0,.96fr) minmax(0,1.06fr) minmax(105px,.28fr);

  margin-top: 12px;

  min-height: 410px;
}

.sf39-mg .mg-hero-copy {
  padding: 48px 25px 46px 0;

  align-self: center;
}

.sf39-mg .mg-hero-copy .mg-kicker::after {
  content: '';
  display: block;

  width: 43px;
  height: 2px;

  background: #cf7766;

  margin-top: 13px;
}

.sf39-mg .mg-hero h1 {
  font-size: clamp(36px,4.05vw,57px);
  line-height: 1.48;
  letter-spacing: .02em;

  margin-top: 21px;
}

.sf39-mg .mg-lead {
  font-size: 16px;
  line-height: 1.95;

  margin-top: 24px;
}

.sf39-mg .mg-hero-photo {
  height: 100%;
  min-height: 410px;

  object-position: 62% center;
}

.sf39-mg .mg-hero-note {
  display: flex;

  flex-direction: column;
  justify-content: center;
  gap: 28px;

  padding: 28px 23px;

  color: #fff9ed;
  background: linear-gradient(130deg,#1d6268,#104650);
}

.sf39-mg .mg-hero-note p:first-child {
  font: 16px/1.7 Georgia,serif;
  letter-spacing: .08em;
}

.sf39-mg .mg-hero-note p:last-child {
  font-size: 12px;
  line-height: 2.1;

  color: #eee8da;
}

.sf39-mg .mg-hero-note>span {
  width: 32px;
  height: 1px;

  background: #b8bdad;
}

.sf39-mg .mg-ribbon {
  display: flex;

  align-items: center;
  gap: 20px;

  padding-block: 28px;
}

.sf39-mg .mg-ribbon::before,
.sf39-mg .mg-ribbon::after {
  content: '';

  flex: 1;

  border-top: 1px solid var(--mg-line);
}

.sf39-mg .mg-ribbon p {
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}

.sf39-mg .mg-ribbon+.mg-section {
  margin-top: 28px;
}

/* =========================================================
   5テーマ：大小の枠
========================================================= */

.sf39-mg .mg-theme-grid {
  display: grid;

  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
}

.sf39-mg .mg-theme {
  display: grid;

  grid-template-columns: 40px minmax(0,1fr) 24px;
  align-items: center;
  gap: 18px;

  border: 1px solid var(--mg-line);

  padding: 24px 22px;

  min-height: 138px;

  background: #fffdfa;

  transition: background .2s,
    border-color .2s;
}

.sf39-mg .mg-theme h3 {
  font-size: 23px;
  line-height: 1.5;

  margin-bottom: 8px;
}

.sf39-mg .mg-theme p {
  font-size: 14px;
  line-height: 1.85;

  color: #52635a;
}

.sf39-mg .mg-circle {
  display: grid;

  place-items: center;

  width: 26px;
  height: 26px;

  border: 1px solid #bf9c68;
  border-radius: 50%;

  font-size: 17px;

  color: var(--mg-gold);
}

.sf39-mg .mg-theme-main {
  grid-row: span 2;

  display: flex;

  align-items: flex-start;
  flex-direction: column;
  justify-content: center;

  position: relative;

  padding: 32px;

  background: linear-gradient(120deg,#f2e9d7,#e7d8b9);
}

.sf39-mg .mg-theme-main .mg-icon {
  width: 70px;
  height: 70px;

  margin-bottom: 20px;
}

.sf39-mg .mg-theme-main h3 {
  font-size: 31px;

  margin-bottom: 14px;
}

.sf39-mg .mg-theme-main p {
  padding-right: 20px;
}

.sf39-mg .mg-theme-main .mg-circle {
  position: absolute;
  bottom: 25px;
  right: 23px;

  width: 32px;
  height: 32px;
}

/* =========================================================
   棚卸し特集
========================================================= */

.sf39-mg .mg-guide {
  display: grid;

  grid-template-columns: minmax(0,.7fr) minmax(0,1.5fr);
  gap: 42px;
  align-items: center;
}

.sf39-mg .mg-guide h2 {
  font-size: clamp(29px,3.1vw,42px);
  line-height: 1.55;

  margin-top: 18px;

  letter-spacing: .02em;
}

.sf39-mg .mg-guide h2::after {
  content: '';
  display: block;

  width: 48px;
  height: 2px;

  background: #cf7766;

  margin-top: 20px;
}

.sf39-mg .mg-guide-copy>p:last-child {
  margin-top: 24px;

  font-size: 15px;
  line-height: 2.05;

  color: #4e6259;
}

.sf39-mg .mg-guide-story>img {
  aspect-ratio: 1.85;
}

.sf39-mg .mg-guide-caption {
  display: flex;

  justify-content: space-between;
  align-items: start;
  gap: 22px;

  padding-top: 16px;
}

.sf39-mg .mg-guide-caption p {
  font-size: 12px;
  line-height: 1.8;

  color: #617169;
}

.sf39-mg .mg-guide-caption .mg-read {
  flex: none;

  padding-bottom: 5px;

  border-bottom: 1px solid #b9a787;
}

/* =========================================================
   NISA比較特集
========================================================= */

.sf39-mg .mg-nisa {
  padding-block: 44px;

  color: #fffdf7;
  background: linear-gradient(105deg,#173f48,#0f5c66);
}

.sf39-mg .mg-nisa-inner {
  display: grid;

  grid-template-columns: minmax(0,.9fr) minmax(0,1.25fr);
  gap: 44px;
  align-items: center;
}

.sf39-mg .mg-nisa .mg-kicker {
  color: #ddc496;
}

.sf39-mg .mg-nisa h2 {
  font-size: clamp(28px,3.15vw,42px);
  line-height: 1.6;

  margin-top: 17px;
}

.sf39-mg .mg-nisa-copy>p:last-child {
  font-size: 15px;
  line-height: 1.95;

  margin-top: 24px;

  color: #f3ede1;
}

.sf39-mg .mg-companies {
  display: grid;

  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
}

.sf39-mg .mg-company {
  display: flex;

  flex-direction: column;

  background: #fffaf0;
  color: var(--mg-ink);

  padding: 23px 18px 18px;

  border: 1px solid #e5ddcd;
  border-radius: 4px;
}

.sf39-mg .mg-company h3 {
  font-size: 17px;
  line-height: 1.6;

  padding-bottom: 15px;

  border-bottom: 1px solid #e4dccb;
}

.sf39-mg .mg-company ul {
  list-style: none;

  padding: 16px 0 20px;

  font-size: 13px;
  line-height: 1.9;

  color: #685f4a;
}

.sf39-mg .mg-company li+li {
  margin-top: 7px;
}

.sf39-mg .mg-company li::before {
  content: '✓';

  margin-right: 8px;

  color: #a18146;
}

.sf39-mg .mg-company-link {
  display: flex;

  justify-content: flex-end;
  align-items: center;
  gap: 9px;

  font-size: 11px;
  line-height: 1.7;

  margin-top: auto;

  color: #426259;
}

.sf39-mg .mg-company-link b {
  font-size: 18px;
  font-weight: 400;
}

.sf39-mg .mg-gold-button {
  display: flex;

  align-items: center;
  justify-content: center;
  gap: 28px;

  width: fit-content;

  margin: 20px 0 0 auto;
  padding: 11px 24px;

  min-height: 44px;

  background: linear-gradient(110deg,#e7cc92,#c4a168);
  border: 1px solid #ddbe7f;
  border-radius: 999px;
  color: #293e37;

  font-size: 13px;
  font-weight: 600;
}

.sf39-mg .mg-gold-button span {
  font-size: 21px;
}

/* =========================================================
   テーマ別の記事：公開記事をすべて表示
========================================================= */

.sf39-mg .mg-topic {
  border: 1px solid var(--mg-line);
  background: #fffefb;

  scroll-margin-top: 130px;

  margin-bottom: 9px;
}

.sf39-mg .mg-topic summary {
  display: flex;

  align-items: center;
  gap: 20px;

  list-style: none;
  cursor: pointer;

  padding: 19px 24px;

  min-height: 72px;

  border-left: 4px solid transparent;

  transition: background .2s;
}

.sf39-mg .mg-topic summary::-webkit-details-marker {
  display: none;
}

.sf39-mg .mg-topic summary .mg-icon {
  width: 31px;
  height: 31px;

  color: #2c6670;
}

.sf39-mg .mg-topic-label {
  display: flex;

  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
  flex: 1;

  min-width: 0;
}

.sf39-mg .mg-topic-label strong {
  font-family: var(--mg-serif);
  font-size: 21px;
  line-height: 1.7;
  font-weight: 600;
}

.sf39-mg .mg-topic-label small {
  font-size: 13px;
  line-height: 1.8;

  color: #677168;
}

.sf39-mg .mg-toggle {
  display: grid;

  place-items: center;

  width: 29px;
  height: 29px;

  flex: none;

  border: 1px solid #c8b07f;
  border-radius: 50%;
  color: #5b7976;
}

.sf39-mg .mg-toggle::after {
  content: '+';

  font: 20px/1 Arial,sans-serif;
}

.sf39-mg .mg-topic[open]>summary {
  background: #e9ede2;
  border-left-color: #15545b;
}

.sf39-mg .mg-topic[open] .mg-toggle::after {
  content: '−';
}

.sf39-mg .mg-topic-body {
  padding: 8px 24px 24px;
}

.sf39-mg .mg-entry-grid {
  display: grid;

  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 32px;
}

.sf39-mg .mg-entry {
  display: grid;

  grid-template-columns: 112px minmax(0,1fr);
  gap: 20px;
  align-items: start;

  padding: 24px 0;

  border-bottom: 1px solid #e5dfd2;
}

.sf39-mg .mg-entry>img {
  width: 112px;
  aspect-ratio: 1;
  height: auto;
}

.sf39-mg .mg-entry h3 {
  font-size: 18px;
  line-height: 1.7;

  overflow-wrap: anywhere;
}

.sf39-mg .mg-entry p {
  margin-top: 10px;

  font-size: 14px;
  line-height: 1.9;

  color: #54665c;
}

.sf39-mg .mg-entry .mg-read {
  margin-top: 12px;

  font-size: 12px;
}

.sf39-mg .mg-entry-text {
  grid-template-columns: 1fr;
}

.sf39-mg .mg-empty {
  padding: 22px;

  font-size: 15px;
  line-height: 1.9;

  color: #5b6c60;
}

/* =========================================================
   新着記事
========================================================= */

.sf39-mg .mg-heading-row {
  display: flex;

  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.sf39-mg .mg-latest-grid {
  display: grid;

  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 26px;
}

.sf39-mg .mg-latest-card {
  display: flex;

  flex-direction: column;

  min-width: 0;

  border-bottom: 1px solid #e3ddcf;
}

.sf39-mg .mg-latest-card>img {
  aspect-ratio: 1;
  height: auto;
}

.sf39-mg .mg-latest-card>div {
  display: flex;

  flex-direction: column;
  flex: 1;

  padding: 20px 2px 18px;
}

.sf39-mg .mg-latest-card time {
  display: block;

  font-size: 11px;
  line-height: 1.7;

  color: #84734f;

  letter-spacing: .04em;

  margin-bottom: 10px;
}

.sf39-mg .mg-latest-card h3 {
  font-size: 18px;
  line-height: 1.8;

  overflow-wrap: anywhere;
}

.sf39-mg .mg-latest-card .mg-read {
  margin-top: auto;
  padding-top: 19px;

  font-size: 12px;
}

/* =========================================================
   全記事入口：写真なし、控えめな文字サイズ
========================================================= */

.sf39-mg .mg-archive {
  display: flex;

  justify-content: space-between;
  align-items: center;
  gap: 30px;

  padding: 25px 0 30px;

  border-top: 1px solid var(--mg-line);

  margin-bottom: 0;
}

.sf39-mg .mg-archive h2 {
  font-size: 24px;
  line-height: 1.7;

  margin-top: 8px;
}

.sf39-mg .mg-outline-button {
  display: flex;

  justify-content: center;
  align-items: center;
  gap: 24px;

  padding: 11px 23px;

  min-width: 175px;
  min-height: 46px;

  border: 1px solid #74918c;
  border-radius: 999px;

  font-size: 13px;

  flex: none;
}

.sf39-mg .mg-outline-button span {
  font-size: 21px;

  color: #a78548;
}

/* =========================================================
   締め：下端から深緑に馴染ませる
========================================================= */

.sf39-mg .mg-closing {
  padding: 48px 0 78px;

  background: linear-gradient(180deg,#f0e5ce 0%,#eee0c3 70%,#173f38 100%);
}

.sf39-mg .mg-closing-inner {
  display: grid;

  grid-template-columns: minmax(0,.85fr) minmax(0,1.35fr);
  gap: 65px;
  align-items: start;
}

.sf39-mg .mg-closing h2 {
  font-size: clamp(27px,2.7vw,36px);
  line-height: 1.6;
}

.sf39-mg .mg-closing h2::after {
  content: '';
  display: block;

  width: 44px;
  height: 2px;

  background: #bd775c;

  margin-top: 19px;
}

.sf39-mg .mg-closing-inner>div>p {
  font-size: 15px;
  line-height: 1.9;

  margin-top: 22px;

  color: #566253;
}

.sf39-mg .mg-closing-prompts>div {
  display: grid;

  grid-template-columns: 155px minmax(0,1fr);
  gap: 22px;
  align-items: baseline;

  padding: 18px 0;

  border-bottom: 1px solid #cbbb9b;
}

.sf39-mg .mg-closing-prompts>div:first-child {
  padding-top: 4px;
}

.sf39-mg .mg-closing-prompts>div:last-child {
  border-bottom: 0;
}

.sf39-mg .mg-closing dt {
  font-size: 22px;
  line-height: 1.7;
}

.sf39-mg .mg-closing dd {
  font-size: 14px;
  line-height: 1.9;

  color: #536150;
}

body.category-money-finance .sf-footer {
  margin-top: 0;
}

@media (hover:hover) {
  .sf39-mg .mg-theme:hover {
    background: #f2eddf;
    border-color: #b7a580;
  }

  .sf39-mg :where(.mg-entry,.mg-latest-card):hover h3 {
    color: #a26d44;
  }

  .sf39-mg a:hover .mg-read b {
    transform: translateX(4px);
  }

  .sf39-mg .mg-company:hover {
    background: #f2ebdc;
  }

  .sf39-mg .mg-outline-button:hover {
    background: #e9eee5;
  }

  .sf39-mg .mg-gold-button:hover {
    background: #e7c990;
  }
}

@media (min-width:768px) and (max-width:1050px) {
  .sf39-mg .mg-wrap {
    width: calc(100% - 48px);
  }

  .sf39-mg .mg-hero {
    grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) 100px;

    min-height: 360px;
  }

  .sf39-mg .mg-hero h1 {
    font-size: 38px;
  }

  .sf39-mg .mg-hero-note {
    padding: 20px 14px;
  }

  .sf39-mg .mg-hero-note p:first-child {
    font-size: 13px;
  }

  .sf39-mg .mg-hero-photo {
    min-height: 360px;
  }

  .sf39-mg .mg-theme-grid {
    gap: 14px;
  }

  .sf39-mg .mg-theme {
    padding: 20px 16px;

    grid-template-columns: 30px 1fr;
    gap: 12px;
  }

  .sf39-mg .mg-theme .mg-icon {
    width: 32px;
  }

  .sf39-mg .mg-theme .mg-circle {
    grid-column: 2;
    justify-self: end;
  }

  .sf39-mg .mg-theme-main {
    padding: 25px;
  }

  .sf39-mg .mg-theme-main .mg-icon {
    width: 60px;
    height: 60px;
  }

  .sf39-mg .mg-theme-main h3 {
    font-size: 27px;
  }

  .sf39-mg .mg-guide {
    gap: 30px;
    grid-template-columns: .8fr 1.3fr;
  }

  .sf39-mg .mg-guide-caption {
    flex-direction: column;
    gap: 10px;
  }

  .sf39-mg .mg-guide-caption .mg-read {
    align-self: end;
  }

  .sf39-mg .mg-nisa-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .sf39-mg .mg-nisa h2 br {
    display: none;
  }

  .sf39-mg .mg-company {
    padding: 23px;
  }

  .sf39-mg .mg-company h3 {
    font-size: 21px;
  }

  .sf39-mg .mg-entry {
    grid-template-columns: 85px 1fr;
    gap: 16px;
  }

  .sf39-mg .mg-entry>img {
    width: 85px;
  }

  .sf39-mg .mg-entry-text {
    grid-template-columns: 1fr;
  }

  .sf39-mg .mg-latest-grid {
    gap: 18px;
  }

  .sf39-mg .mg-latest-card h3 {
    font-size: 17px;
  }

  .sf39-mg .mg-closing-inner {
    gap: 35px;
    grid-template-columns: .8fr 1.2fr;
  }

  .sf39-mg .mg-closing-prompts>div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width:767px) {
  .sf39-mg .mg-wrap {
    width: calc(100% - 36px);
  }

  .sf39-mg .mg-section {
    margin-block: 42px;
  }

  .sf39-mg .mg-heading {
    margin-bottom: 24px;
  }

  .sf39-mg .mg-heading h2 {
    font-size: 25px;

    margin-top: 10px;
  }

  .sf39-mg .mg-hero {
    grid-template-columns: minmax(0,1fr) 86px;

    min-height: 0;

    margin-top: 0;
  }

  .sf39-mg .mg-hero-copy {
    grid-column: 1/-1;

    padding: 30px 0 26px;
  }

  .sf39-mg .mg-hero h1 {
    font-size: clamp(34px,9vw,48px);
    line-height: 1.5;
  }

  .sf39-mg .mg-lead {
    font-size: 16px;
    line-height: 1.9;

    margin-top: 20px;
  }

  .sf39-mg .mg-hero-photo {
    min-height: 0;
    height: 260px;

    object-position: 62% center;
  }

  .sf39-mg .mg-hero-note {
    padding: 20px 11px;

    gap: 18px;
  }

  .sf39-mg .mg-hero-note p:first-child {
    font-size: 11px;
    letter-spacing: .02em;
  }

  .sf39-mg .mg-hero-note p:last-child {
    font-size: 10px;
    line-height: 2;
  }

  .sf39-mg .mg-ribbon {
    padding-block: 23px;

    gap: 12px;
  }

  .sf39-mg .mg-ribbon p {
    font-size: 13px;

    max-width: 260px;
  }

  .sf39-mg .mg-ribbon+.mg-section {
    margin-top: 20px;
  }

  .sf39-mg .mg-theme-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
  }

  .sf39-mg .mg-theme {
    display: flex;

    align-items: flex-start;
    flex-direction: column;

    position: relative;

    padding: 20px 18px 46px;

    gap: 14px;

    min-height: 0;
  }

  .sf39-mg .mg-theme h3 {
    font-size: 21px;
  }

  .sf39-mg .mg-theme p {
    font-size: 14px;
    line-height: 1.85;
  }

  .sf39-mg .mg-theme .mg-circle {
    position: absolute;
    bottom: 15px;
    right: 15px;
  }

  .sf39-mg .mg-theme-main {
    grid-row: auto;
    grid-column: 1/-1;

    display: grid;

    grid-template-columns: 65px minmax(0,1fr);
    gap: 20px;

    padding: 25px 45px 25px 22px;

    align-items: center;
  }

  .sf39-mg .mg-theme-main .mg-icon {
    width: 60px;
    height: 60px;

    margin: 0;
  }

  .sf39-mg .mg-theme-main h3 {
    font-size: 27px;
  }

  .sf39-mg .mg-theme-main p {
    padding: 0;
  }

  .sf39-mg .mg-theme-main .mg-circle {
    width: 28px;
    height: 28px;
  }

  .sf39-mg .mg-guide {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .sf39-mg .mg-guide h2 {
    font-size: 34px;
    line-height: 1.55;
  }

  .sf39-mg .mg-guide-copy>p:last-child {
    font-size: 16px;
    line-height: 1.9;
  }

  .sf39-mg .mg-guide-copy>p:last-child br {
    display: none;
  }

  .sf39-mg .mg-guide-story>img {
    aspect-ratio: 1.4;
  }

  .sf39-mg .mg-guide-caption {
    display: block;

    padding-top: 15px;
  }

  .sf39-mg .mg-guide-caption .mg-read {
    width: fit-content;

    margin: 14px 0 0 auto;

    font-size: 14px;
  }

  .sf39-mg .mg-nisa {
    padding-block: 34px;
  }

  .sf39-mg .mg-nisa-inner {
    grid-template-columns: 1fr;
    gap: 27px;
  }

  .sf39-mg .mg-nisa h2 {
    font-size: 31px;
  }

  .sf39-mg .mg-nisa-copy>p:last-child {
    font-size: 16px;
    line-height: 1.9;
  }

  .sf39-mg .mg-companies {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sf39-mg .mg-company {
    padding: 20px 23px;
  }

  .sf39-mg .mg-company h3 {
    font-size: 23px;

    padding-bottom: 12px;
  }

  .sf39-mg .mg-company ul {
    display: flex;

    flex-wrap: wrap;
    gap: 8px 17px;

    padding: 14px 0;

    font-size: 14px;
  }

  .sf39-mg .mg-company li+li {
    margin-top: 0;
  }

  .sf39-mg .mg-company-link {
    font-size: 13px;
  }

  .sf39-mg .mg-gold-button {
    min-height: 48px;

    font-size: 14px;
  }

  .sf39-mg .mg-topic summary {
    padding: 18px 14px;

    gap: 12px;

    min-height: 76px;
  }

  .sf39-mg .mg-topic summary .mg-icon {
    width: 28px;
    height: 28px;
  }

  .sf39-mg .mg-topic-label {
    display: block;
  }

  .sf39-mg .mg-topic-label strong {
    font-size: 19px;
    line-height: 1.65;
  }

  .sf39-mg .mg-topic-label small {
    display: block;

    margin-top: 5px;

    font-size: 13px;
    line-height: 1.8;
  }

  .sf39-mg .mg-toggle {
    width: 26px;
    height: 26px;
  }

  .sf39-mg .mg-topic-body {
    padding: 0 15px 18px;
  }

  .sf39-mg .mg-entry-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sf39-mg .mg-entry {
    grid-template-columns: 86px minmax(0,1fr);
    gap: 16px;

    padding: 24px 0;
  }

  .sf39-mg .mg-entry>img {
    width: 86px;
  }

  .sf39-mg .mg-entry h3 {
    font-size: 18px;
    line-height: 1.75;
  }

  .sf39-mg .mg-entry p {
    font-size: 15px;
    line-height: 1.9;
  }

  .sf39-mg .mg-entry .mg-read {
    font-size: 13px;
  }

  .sf39-mg .mg-entry-text {
    grid-template-columns: 1fr;
  }

  .sf39-mg .mg-heading-row {
    align-items: start;
    gap: 14px;
  }

  .sf39-mg .mg-heading-row>.mg-read {
    font-size: 11px;

    margin-top: 5px;

    gap: 8px;

    max-width: 135px;

    flex-wrap: wrap;
  }

  .sf39-mg .mg-latest-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 27px 17px;
  }

  .sf39-mg .mg-latest-card>div {
    padding: 18px 0;
  }

  .sf39-mg .mg-latest-card h3 {
    font-size: 17px;
    line-height: 1.8;
  }

  .sf39-mg .mg-latest-card .mg-read {
    font-size: 12px;

    gap: 10px;

    padding-top: 18px;
  }

  .sf39-mg .mg-archive {
    align-items: start;
    flex-direction: column;
    gap: 22px;

    padding-block: 24px;
  }

  .sf39-mg .mg-archive h2 {
    font-size: 22px;
  }

  .sf39-mg .mg-outline-button {
    align-self: end;

    min-height: 48px;
  }

  .sf39-mg .mg-closing {
    padding: 35px 0 85px;

    background: linear-gradient(180deg,#f0e5ce 0%,#eee0c3 86%,#173f38 100%);
  }

  .sf39-mg .mg-closing-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .sf39-mg .mg-closing h2 {
    font-size: 29px;
  }

  .sf39-mg .mg-closing-inner>div>p {
    font-size: 16px;
    line-height: 1.9;
  }

  .sf39-mg .mg-closing-prompts>div {
    grid-template-columns: 1fr;
    gap: 8px;

    padding-block: 20px;
  }

  .sf39-mg .mg-closing dt {
    font-size: 23px;
  }

  .sf39-mg .mg-closing dd {
    font-size: 15px;
    line-height: 1.9;
  }
}

@media (max-width:380px) {
  .sf39-mg .mg-wrap {
    width: calc(100% - 30px);
  }

  .sf39-mg .mg-hero {
    grid-template-columns: minmax(0,1fr) 76px;
  }

  .sf39-mg .mg-hero-photo {
    height: 240px;
  }

  .sf39-mg .mg-hero h1 {
    font-size: 34px;
  }

  .sf39-mg .mg-theme {
    padding-inline: 15px;
  }

  .sf39-mg .mg-entry {
    grid-template-columns: 72px 1fr;
    gap: 13px;
  }

  .sf39-mg .mg-entry>img {
    width: 72px;
  }

  .sf39-mg .mg-entry-text {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion:reduce) {
  .sf39-mg *,
  .sf39-mg *::before,
  .sf39-mg *::after {
    scroll-behavior: auto !important;

    transition: none !important;
  }
}

/* =========================================================
   写真付きテーマと雑誌風の新着カード：承認デザイン
========================================================= */

.sf39-mg .mg-theme-grid {
  grid-template-columns: minmax(0,1.35fr) repeat(2,minmax(0,1fr));
  gap: 22px;
  align-items: stretch;
}

.sf39-mg .mg-theme {
  position: relative;
  display: grid;

  grid-template-columns: 72px minmax(0,1fr);
  gap: 15px;

  padding: 20px 35px 20px 18px;

  align-items: center;

  background: #fffdf9;
}

.sf39-mg .mg-theme-photo {
  display: block;

  width: 100%;
  height: auto;
  aspect-ratio: 1;

  object-fit: cover;
}

.sf39-mg .mg-theme h3 {
  font-size: 25px;

  margin-bottom: 10px;
}

.sf39-mg .mg-theme p {
  font-size: 15px;
  line-height: 1.85;
}

.sf39-mg .mg-theme .mg-circle {
  position: absolute;
  right: 14px;
  bottom: 20px;

  width: 28px;
  height: 28px;
}

.sf39-mg .mg-theme-main {
  grid-row: span 2;

  display: flex;

  flex-direction: column;

  padding: 0;

  gap: 0;
  justify-content: flex-start;
  align-items: stretch;

  background: #eee3cb;
}

.sf39-mg .mg-theme-main .mg-theme-photo {
  aspect-ratio: 2.4;

  object-position: center 60%;

  height: auto;
}

.sf39-mg .mg-theme-main .mg-theme-copy {
  padding: 25px 52px 25px 27px;
  margin-block: auto;
}

.sf39-mg .mg-theme-main h3 {
  font-size: 31px;

  margin-bottom: 14px;
}

.sf39-mg .mg-theme-main p {
  padding: 0;
}

.sf39-mg .mg-theme-main .mg-circle {
  right: 20px;
  bottom: 25px;

  width: 33px;
  height: 33px;
}

.sf39-mg .mg-latest-grid {
  gap: 22px;
  align-items: stretch;
}

.sf39-mg .mg-latest-card {
  padding: 9px;

  border: 1px solid #ded6c8;
  background: #fffefa;

  transition: box-shadow .25s,
    border-color .25s,
    transform .25s;
}

.sf39-mg .mg-latest-card>img {
  width: 100%;
  aspect-ratio: 4/3;
  height: auto;

  object-fit: cover;
}

.sf39-mg .mg-latest-card>div {
  padding: 18px 9px 10px;

  gap: 0;
}

.sf39-mg .mg-latest-meta {
  display: flex;

  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;

  margin-bottom: 12px;
}

.sf39-mg .mg-latest-topic {
  font-size: 12px;

  color: #9b733d;

  line-height: 1.6;

  padding-right: 12px;

  border-right: 1px solid #b9b6a8;
}

.sf39-mg .mg-latest-card time {
  font-size: 11px;

  color: #66736e;

  margin: 0;
}

.sf39-mg .mg-latest-card h3 {
  font-size: 18px;
  line-height: 1.75;

  margin-bottom: 24px;
}

.sf39-mg .mg-latest-card .mg-read {
  border-top: 1px solid #e2dacd;

  padding-top: 15px;
  margin-top: auto;

  min-height: 42px;

  font-size: 12px;
}

@media (hover:hover) {
  .sf39-mg .mg-latest-card:hover {
    transform: translateY(-3px);

    border-color: #b4aa93;
    box-shadow: 0 8px 20px rgba(23,63,56,.06);
  }
}

@media (min-width:768px) and (max-width:1050px) {
  .sf39-mg .mg-theme-grid {
    grid-template-columns: minmax(0,1.2fr) repeat(2,minmax(0,1fr));
    gap: 15px;
  }

  .sf39-mg .mg-theme {
    grid-template-columns: 48px minmax(0,1fr);
    gap: 11px;

    padding: 18px 13px 45px;
  }

  .sf39-mg .mg-theme h3 {
    font-size: 23px;
  }

  .sf39-mg .mg-theme p {
    font-size: 14px;
  }

  .sf39-mg .mg-theme-main {
    padding: 0;
  }

  .sf39-mg .mg-theme-main .mg-theme-photo {
    aspect-ratio: 1.5;
  }

  .sf39-mg .mg-theme-main .mg-theme-copy {
    padding: 22px 22px 55px;
  }

  .sf39-mg .mg-theme-main h3 {
    font-size: 27px;
  }

  .sf39-mg .mg-latest-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 24px;
  }
}

@media (max-width:767px) {
  .sf39-mg .mg-theme-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
  }

  .sf39-mg .mg-theme {
    display: flex;

    flex-direction: column;
    align-items: stretch;

    padding: 12px 12px 45px;

    gap: 16px;
  }

  .sf39-mg .mg-theme h3 {
    font-size: 23px;
  }

  .sf39-mg .mg-theme p {
    font-size: 15px;
    line-height: 1.85;
  }

  .sf39-mg .mg-theme-main {
    display: flex;

    grid-column: 1/-1;
    grid-row: auto;

    padding: 0;

    gap: 0;
  }

  .sf39-mg .mg-theme-main .mg-theme-photo {
    aspect-ratio: 2;
  }

  .sf39-mg .mg-theme-main .mg-theme-copy {
    padding: 23px 53px 25px 23px;
  }

  .sf39-mg .mg-theme-main h3 {
    font-size: 28px;
  }

  .sf39-mg .mg-latest-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 22px 15px;
  }

  .sf39-mg .mg-latest-card {
    padding: 7px;
  }

  .sf39-mg .mg-latest-card>div {
    padding: 15px 5px 8px;
  }

  .sf39-mg .mg-latest-meta {
    gap: 7px;

    margin-bottom: 10px;
  }

  .sf39-mg .mg-latest-topic {
    font-size: 12px;

    padding-right: 7px;
  }

  .sf39-mg .mg-latest-card h3 {
    font-size: 17px;
    line-height: 1.8;

    margin-bottom: 20px;
  }

  .sf39-mg .mg-latest-card .mg-read {
    font-size: 12px;

    gap: 10px;
  }
}

@media (max-width:380px) {
  .sf39-mg .mg-latest-grid {
    grid-template-columns: 1fr;
  }

  .sf39-mg .mg-latest-card h3 {
    font-size: 19px;
  }

  .sf39-mg .mg-theme h3 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .sf39-mg .mg-latest-card {
    transition: none;
  }

  .sf39-mg .mg-latest-card:hover {
    transform: none;
  }
}

/* =========================================================
   6ページ共通の余白基準：PC / スマホ
   セクション間は次のセクション側だけに設定し、二重の余白を防ぐ。
========================================================= */

body .sf39-mg {
  --sf39-section-space: 64px;
  --sf39-heading-space: 28px;
  --sf39-card-space: 24px;
  --sf39-feature-space: 56px;
  --sf39-closing-space: 64px;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  display: flow-root;
}

/* 通常のセクション：外側の余白と内側の上下余白を整理 */

body .sf39-mg > :is(.mg-section, .mg-archive, .mg-closing) {
  margin-block: 0 !important;
  padding-block: 0 !important;
}

body .sf39-mg > * + :is(.mg-section, .mg-archive, .mg-closing) {
  margin-top: var(--sf39-section-space) !important;
}

/* 見出しからカード・本文まで */

body .sf39-mg .mg-heading,
body .sf39-mg .mg-heading-row {
  margin-bottom: var(--sf39-heading-space) !important;
}

/* カード同士：写真やカードの寸法は既存の指定を使用 */

body .sf39-mg .mg-theme-grid,
body .sf39-mg .mg-companies,
body .sf39-mg .mg-entry-grid,
body .sf39-mg .mg-latest-grid {
  gap: var(--sf39-card-space) !important;
}

/* 背景色が変わる特集：内側の上下余白 */

body .sf39-mg .mg-nisa,
body .sf39-mg .mg-archive {
  padding-block: var(--sf39-feature-space) !important;
}

/* 最後の締め：内側の上下余白 */

body .sf39-mg .mg-closing {
  padding-block: var(--sf39-closing-space) !important;
}

/* フッターとの接続：締めの外側に白い余白を残さない */

body:has(.sf39-mg) :is(.sf-footer, .sf-site-footer) {
  margin-top: 0 !important;
}

body:has(.sf39-mg) :is(.sf-site, #content, .site-content) {
  padding-bottom: 0 !important;
}

@media (max-width: 767px) {
  body .sf39-mg {
    --sf39-section-space: 40px;
    --sf39-heading-space: 22px;
    --sf39-card-space: 18px;
    --sf39-feature-space: 36px;
    --sf39-closing-space: 40px;
  }

}
