@charset "UTF-8";
/* ==========================================================================
   TonariWeb Media (/media/) — Editorial Stylesheet
   Clean, flat, human-crafted B2B editorial layout (FIND CAREERS style)
   ========================================================================== */

:root {
  --color-black: #1f2c3d;
  --color-deep-blue: #2c5f7f;
  --color-mint: #66d4c4;
  --color-mint-light: #e6f4f1;
  --color-text: #222d38;
  --color-sub: #556370;
  --color-muted: #768390;
  --color-bg: #f7f9f9;
  --color-white: #ffffff;
  --color-line: #e3e8ec;
  --color-line-dark: #cfd7de;

  --ff-ja: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --ff-en: "Zalando Sans SemiExpanded", "Helvetica Neue", Arial, var(--ff-ja);

  --container-w: 100%;
  --side-pad: clamp(20px, 3.2vw, 52px);
  --header-h: 68px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body.media-body {
  margin: 0;
  font-family: var(--ff-ja);
  font-feature-settings: "palt";
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.85;
  font-size: 15px;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, h6, p, figure {
  margin: 0;
}

.m-container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

.m-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-black);
  color: var(--color-white);
  padding: 8px 14px;
  font-size: 13px;
  z-index: 9999;
}
.m-skip-link:focus {
  top: 12px;
}

.m-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   1. Sticky Header (includes/header.php) — Same Logo as Main Site
   ========================================================================== */
.m-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
}

.m-header__inner {
  width: 100%;
  max-width: var(--container-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.8vw, 24px);
}

/* Left: Exact TonariWeb Logo + Media Title */
.m-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-en);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: 0.04em;
  color: var(--color-black);
  white-space: nowrap;
}
.logo-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}
.m-logo-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 12px;
  border-left: 1px solid var(--color-line-dark);
  line-height: 1.25;
}
.m-logo-title__main {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-black);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.m-logo-title__sub {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--color-sub);
  margin-top: 2px;
  white-space: nowrap;
}

/* Center: Global Navigation (Categories) */
.m-gnav {
  flex: 1;
  display: flex;
  justify-content: center;
  height: 100%;
  min-width: 0;
}
.m-gnav__list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 100%;
}
.m-gnav__item {
  display: flex;
  align-items: stretch;
}
.m-gnav__link {
  display: inline-flex;
  align-items: center;
  padding: 0 clamp(9px, 1.1vw, 18px);
  font-size: clamp(12.5px, 0.96vw, 14px);
  font-weight: 600;
  color: var(--color-black);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.m-gnav__link:hover,
.m-gnav__link.is-active {
  color: var(--color-deep-blue);
  border-bottom-color: var(--color-deep-blue);
}

/* Right: Clean Solid CTA Button */
.m-header__cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--color-black);
  color: var(--color-white);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--color-black);
  line-height: 1.2;
  white-space: nowrap;
}
.m-btn:hover {
  background: var(--color-deep-blue);
  border-color: var(--color-deep-blue);
  color: var(--color-white);
}
.m-btn--outline {
  background: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-line-dark);
}
.m-btn--outline:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* Mobile Category Navigation */
.m-sp-catbar {
  display: none;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.m-sp-catbar__list {
  display: flex;
  padding: 0 16px;
  gap: 18px;
  white-space: nowrap;
}
.m-sp-catbar__link {
  display: inline-block;
  padding: 10px 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-sub);
  border-bottom: 2px solid transparent;
}
.m-sp-catbar__link.is-active {
  color: var(--color-deep-blue);
  border-bottom-color: var(--color-deep-blue);
}

@media (max-width: 1280px) {
  .m-logo-title__sub {
    display: none;
  }
}

@media (max-width: 1120px) {
  .m-gnav {
    display: none;
  }
  .m-sp-catbar {
    display: block;
    position: sticky;
    top: var(--header-h);
    z-index: 995;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-line);
    scrollbar-width: none;
  }
  .m-sp-catbar::-webkit-scrollbar {
    display: none;
  }
  .m-logo-title__sub {
    display: block;
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 62px;
  }
  .m-header__inner {
    padding: 0 16px;
    gap: 12px;
  }
  .m-gnav {
    display: none;
  }
  .m-sp-catbar {
    display: block;
  }
  .logo span {
    display: none;
  }
  .logo-mark {
    width: 32px;
    height: 32px;
  }
  .m-logo-wrap {
    gap: 10px;
  }
  .m-logo-title {
    padding-left: 10px;
  }
  .m-logo-title__main {
    font-size: 12.5px;
  }
  .m-logo-title__sub {
    font-size: 10px;
  }
  .m-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ==========================================================================
   2. Breadcrumb Navigation (Sticky under Header)
   ========================================================================== */
.m-breadcrumb {
  position: sticky;
  top: var(--header-h);
  z-index: 990;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-line);
  padding: 9px 0;
  font-size: 12px;
  color: var(--color-muted);
}
.m-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.m-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.m-breadcrumb__item + .m-breadcrumb__item::before {
  content: "/";
  color: var(--color-line-dark);
}
.m-breadcrumb__item a:hover {
  color: var(--color-deep-blue);
  text-decoration: underline;
}

/* ==========================================================================
   3. Page Lead & Pickup Area (index.php)
   ========================================================================== */
.m-top-head {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  padding: 24px 0 28px;
}
.m-top-head__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.m-top-head__title {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  color: var(--color-black);
  letter-spacing: 0.01em;
}
.m-top-head__desc {
  font-size: 13.5px;
  color: var(--color-sub);
}

.m-featured {
  display: grid;
  grid-template-columns: calc((100% - 16px) * 2 / 3 + 7.62px) calc((100% - 16px) / 3 - 7.62px);
  gap: 16px;
  align-items: stretch;
}
.m-featured__main {
  display: flex;
}
.m-fv-card {
  position: relative;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  background: #eaeff2;
}
.m-fv-card__link {
  display: block;
  width: 100%;
  height: 100%;
}
.m-fv-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.m-fv-card:hover img {
  transform: scale(1.02);
}
.m-fv-card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 16px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  pointer-events: none;
}
.m-featured__main .m-fv-card__overlay {
  padding: 40px 22px 16px;
}
.m-fv-card__date {
  font-family: var(--ff-en);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #ffffff;
  line-height: 1;
}
.m-featured__main .m-fv-card__date {
  font-size: 14px;
}
.m-featured__main .m-fv-card {
  width: 100%;
  height: 100%;
}
.m-featured__sub {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}
.m-featured__sub .m-fv-card {
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .m-featured {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .m-featured__sub {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 14px;
  }
}
@media (max-width: 560px) {
  .m-featured__sub {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   4. Main 2-Column Layout (<main> + <aside>)
   ========================================================================== */
.m-layout {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 40px var(--side-pad) 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 44px;
  align-items: stretch;
}
.m-layout > main,
.m-layout > aside {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 980px) {
  .m-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 14px 64px;
    gap: 32px;
  }
}

.m-sec {
  margin-bottom: 52px;
}
.m-sec:last-child {
  margin-bottom: 0;
}
.m-sec__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-black);
}
.m-sec__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-black);
}
.m-sec__more {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-deep-blue);
  white-space: nowrap;
  flex-shrink: 0;
}
.m-sec__more:hover {
  text-decoration: underline;
}

/* Category Filter Tabs on Index */
.m-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.m-tabs__btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-sub);
  background: var(--color-white);
  border: 1px solid var(--color-line-dark);
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.m-tabs__btn:hover {
  color: var(--color-black);
  border-color: var(--color-black);
}
.m-tabs__btn.is-active {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* ==========================================================================
   5. Editorial Article Card Grid (index.php)
   ========================================================================== */
.m-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
}
.m-card-grid--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 1240px) {
  .m-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .m-card-grid,
  .m-card-grid--2col {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.m-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.m-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.m-card__thumb {
  position: relative;
  width: 100%;
  background: #eaeff2;
  overflow: hidden;
}
.m-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.m-card:hover .m-card__thumb img {
  transform: scale(1.02);
}
.m-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.m-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  margin-bottom: 8px;
}
.m-card__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.m-card__cat {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-deep-blue);
  background: var(--color-mint-light);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.m-card__level {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-sub);
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  padding: 1px 6px;
  border-radius: 2px;
  white-space: nowrap;
}
.m-card__date {
  font-family: var(--ff-en);
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
}
.m-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--color-black);
  margin-bottom: 8px;
}
.m-card:hover .m-card__title {
  color: var(--color-deep-blue);
}
.m-card__excerpt {
  font-size: 13px;
  color: var(--color-sub);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category Group Section */
.m-cat-group {
  margin-bottom: 36px;
}
.m-cat-group:last-child {
  margin-bottom: 0;
}
.m-cat-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.m-cat-group__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-black);
  padding-left: 10px;
  border-left: 3px solid var(--color-deep-blue);
}

/* ==========================================================================
   6. Sidebar (<aside>) — Sticky & Scroll-Tracking within Article/Main
   ========================================================================== */
.m-sidebar {
  position: relative;
  height: 100%;
}
.m-sidebar__sticky {
  position: sticky;
  top: calc(var(--header-h) + 52px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.m-side-box {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 4px;
  padding: 18px 20px;
}
.m-side-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-line);
}
.m-side-box__title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-black);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-line);
}
.m-side-box__head .m-side-box__title {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}
.m-side-box__pct {
  font-family: var(--ff-en);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-deep-blue);
}
.m-side-box__desc {
  font-size: 12.5px;
  color: var(--color-sub);
  line-height: 1.65;
  margin-bottom: 14px;
}
.m-side-box .m-btn {
  width: 100%;
  padding: 9px 14px;
  font-size: 13px;
}

/* Sidebar Help / Web-Production CTA Card (.m-side-help-box) */
.m-side-help-box {
  background: linear-gradient(180deg, #f4fbf9 0%, #ffffff 100%);
  border: 2px solid var(--color-deep-blue);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(44, 95, 127, 0.08);
}
.m-side-help-box__badge {
  display: inline-block;
  background: var(--color-deep-blue);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.m-side-help-box__title {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--color-black);
  margin: 0 0 10px;
}
.m-side-help-box__thumb {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  margin-bottom: 10px;
}
.m-side-help-box__thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.m-side-help-box__desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--color-sub);
  margin: 0 0 10px;
}
.m-side-help-box__points {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.6;
}
.m-side-help-box__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 12px;
  background: var(--color-deep-blue);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  text-align: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.m-side-help-box__btn:hover {
  background: var(--color-black);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* Reading Progress Bar inside Sticky TOC */
.m-read-progress {
  width: 100%;
  height: 3px;
  background: var(--color-line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.m-read-progress__bar {
  width: 0%;
  height: 100%;
  background: var(--color-deep-blue);
  transition: width 0.15s ease-out;
}

/* Interactive ScrollSpy TOC in Sidebar */
.m-side-toc {
  position: relative;
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--color-line);
  margin-left: 4px;
}
.m-side-toc__link {
  position: relative;
  display: block;
  padding: 6px 8px 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-muted);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.m-side-toc__link--sub {
  padding-left: 24px;
  font-size: 12px;
}
.m-side-toc__link:hover {
  color: var(--color-black);
}
.m-side-toc__link.is-active {
  color: var(--color-deep-blue);
  font-weight: 700;
  border-left-color: var(--color-deep-blue);
  background: var(--color-mint-light);
  border-radius: 0 3px 3px 0;
}

/* Anchor scroll offset so sticky header + breadcrumb never overlap */
[id^="sec-"],
[id^="cat-"] {
  scroll-margin-top: calc(var(--header-h) + 56px);
}

/* Ranking List */
.m-rank-list {
  counter-reset: rank;
  display: flex;
  flex-direction: column;
}
.m-rank-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--color-line);
}
.m-rank-item:first-child {
  padding-top: 0;
}
.m-rank-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.m-rank-item a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-black);
}
.m-rank-item a:hover {
  color: var(--color-deep-blue);
}
.m-rank-item a::before {
  counter-increment: rank;
  content: counter(rank);
  font-family: var(--ff-en);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-deep-blue);
  min-width: 18px;
}

/* Keyword Tags */
.m-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.m-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--color-sub);
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  padding: 4px 10px;
  border-radius: 2px;
}
.m-tag:hover {
  color: var(--color-deep-blue);
  border-color: var(--color-deep-blue);
  background: var(--color-white);
}

/* Recommended Category Banners in Sidebar */
.m-side-banners {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m-side-banner-link {
  display: block;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.m-side-banner-link img {
  width: 100%;
  height: auto;
  display: block;
}
.m-side-banner-link:hover {
  transform: translateY(-1px);
  border-color: var(--color-deep-blue);
  box-shadow: 0 4px 12px rgba(31, 44, 61, 0.08);
}

/* ==========================================================================
   7. Article Detail Page (article.php) & Embed Styles
   ========================================================================== */
.m-article {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 4px;
  padding: clamp(24px, 4vw, 48px);
}
.m-article__header {
  margin-bottom: 32px;
}
.m-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--color-muted);
}
.m-article__cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-deep-blue);
  background: var(--color-mint-light);
  padding: 3px 10px;
  border-radius: 2px;
}
.m-article__level {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-sub);
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  padding: 2px 8px;
  border-radius: 2px;
}
.m-article__title {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-black);
  margin-bottom: 22px;
}
.m-article__eyecatch {
  border: 1px solid var(--color-line);
  border-radius: 4px;
  overflow: hidden;
  background: #eaeff2;
}
.m-article__eyecatch img {
  width: 100%;
  height: auto;
  display: block;
}

/* Table of Contents */
.m-toc {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: 4px;
  padding: 20px 24px;
  margin: 28px 0 36px;
}
.m-toc__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-line);
}
.m-toc__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  margin: 0 !important;
  padding-left: 0 !important;
}
.m-toc__list li {
  list-style: none !important;
  margin-bottom: 0 !important;
}
.m-toc__list a {
  color: var(--color-text);
  font-weight: 600;
}
.m-toc__list a:hover {
  color: var(--color-deep-blue);
  text-decoration: underline;
}
.m-toc__sublist {
  margin: 6px 0 0 !important;
  padding-left: 16px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.m-toc__sublist li {
  list-style: none !important;
  margin-bottom: 0 !important;
}
.m-toc__sublist a {
  font-weight: 400;
  color: var(--color-sub);
}

/* Article Body Typography */
.m-article-body {
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--color-text);
}
.m-article-body p {
  margin-bottom: 1.6em;
}
.m-article-body h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: var(--color-black);
  margin: 2.5em 0 1em;
  padding: 10px 0 10px 14px;
  border-left: 4px solid var(--color-deep-blue);
  border-bottom: 1px solid var(--color-line);
  line-height: 1.45;
}
.m-article-body h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-black);
  margin: 2em 0 0.8em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-line);
  line-height: 1.5;
}
.m-article-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-black);
  margin: 1.6em 0 0.6em;
}
.m-article-body ul,
.m-article-body ol {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}
.m-article-body ul li {
  list-style: disc;
  margin-bottom: 0.45em;
}
.m-article-body ol li {
  list-style: decimal;
  margin-bottom: 0.45em;
}

.m-note-box {
  background: var(--color-bg);
  border-left: 3px solid var(--color-deep-blue);
  padding: 16px 20px;
  margin: 1.8em 0;
  font-size: 14.5px;
}
.m-note-box__title {
  display: block;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 6px;
}

.m-table-wrap {
  overflow-x: auto;
  margin: 1.8em 0;
}
.m-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}
.m-table th,
.m-table td {
  border: 1px solid var(--color-line-dark);
  padding: 11px 14px;
  text-align: left;
}
.m-table thead th {
  background: var(--color-bg);
  color: var(--color-black);
  font-weight: 700;
}

/* ==========================================================================
   8. YouTube & Instagram Embed Styles
   ========================================================================== */
.m-embed {
  margin: 2em 0;
}
.m-embed-youtube {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid var(--color-line);
  border-radius: 4px;
  overflow: hidden;
}
.m-embed-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.m-embed-instagram {
  display: flex;
  justify-content: center;
  margin: 2em 0;
}
.m-embed-instagram blockquote.instagram-media,
.m-article-body blockquote {
  width: 100%;
  max-width: 540px !important;
  margin: 0 auto !important;
  background: var(--color-white);
  border: 1px solid var(--color-line-dark);
  border-radius: 4px;
  padding: 18px 22px;
  font-size: 14.5px;
  color: var(--color-text);
}
.m-article-body blockquote cite {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--color-muted);
  font-style: normal;
}

/* Editorial Figures (画像①・画像②) */
.m-figure {
  margin: 2em 0;
  border: 1px solid var(--color-line-dark);
  border-radius: 4px;
  background: var(--color-white);
  overflow: hidden;
}
.m-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.m-figure figcaption {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--color-sub);
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
  line-height: 1.55;
}

/* Video Slot (動画内容・挿入箇所) */
.m-video-slot {
  margin: 1.8em 0 2.2em;
  padding: 18px 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-line-dark);
  border-left: 4px solid var(--color-deep-blue);
  border-radius: 4px;
}
.m-video-slot__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.m-video-slot__badge {
  font-family: var(--ff-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-white);
  background: var(--color-deep-blue);
  padding: 2px 8px;
  border-radius: 2px;
}
.m-video-slot__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-black);
}
.m-video-slot__desc {
  font-size: 13.5px;
  color: var(--color-sub);
  line-height: 1.75;
  margin: 0 !important;
}

/* FAQ List in H2-6 */
.m-faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 1.4em 0 2em;
}
.m-faq-item {
  border: 1px solid var(--color-line-dark);
  border-radius: 4px;
  background: var(--color-white);
  padding: 16px 20px;
}
.m-faq-item__q {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-black);
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  line-height: 1.5;
}
.m-faq-item__a {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.8;
  margin: 0 !important;
}

/* Inline Internal Links */
.m-inline-link {
  color: var(--color-deep-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.m-inline-link:hover {
  color: var(--color-black);
}

/* Internal Link Navigation Box (6画像を3×2で並べるステップアップ・関連記事) */
.m-article-nav {
  margin-top: 2.6em;
  padding: 22px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-line-dark);
  border-radius: 4px;
}
.m-article-nav__heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-black);
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-line);
}
.m-rel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 780px) {
  .m-rel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .m-rel-grid {
    grid-template-columns: 1fr;
  }
}
.m-rel-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.m-rel-card:hover {
  border-color: var(--color-deep-blue);
  box-shadow: 0 4px 12px rgba(31, 44, 61, 0.08);
  transform: translateY(-2px);
}
.m-rel-card__thumb {
  width: 100%;
  background: #eaeff2;
  overflow: hidden;
  border-bottom: 1px solid var(--color-line);
}
.m-rel-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}
.m-rel-card:hover .m-rel-card__thumb img {
  transform: scale(1.02);
}
.m-rel-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px 4px;
}
.m-rel-card__role {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-deep-blue);
  background: var(--color-mint-light);
  padding: 2px 7px;
  border-radius: 2px;
}
.m-rel-card__id {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
}
.m-rel-card__title {
  padding: 4px 12px 12px;
  margin: 0 !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-black);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.m-rel-card:hover .m-rel-card__title {
  color: var(--color-deep-blue);
}

/* End-of-article CTA Box */
.m-article-cta {
  margin-top: 3em;
  padding: 28px;
  background: var(--color-bg);
  border: 1px solid var(--color-line-dark);
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.m-article-cta__body {
  max-width: 520px;
}
.m-article-cta__title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 6px;
}
.m-article-cta__desc {
  font-size: 13.5px;
  color: var(--color-sub);
  margin: 0 !important;
}

/* Representative Author Profile Box (この記事を書いた人) */
.m-author-box {
  margin-top: 2.4em;
  padding: 26px 28px;
  background: var(--color-white);
  border: 1px solid var(--color-line-dark);
  border-radius: 4px;
}
.m-author-box__head {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-line);
}
.m-author-box__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-deep-blue);
  margin-bottom: 6px;
}
.m-author-box__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.m-author-box__name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.4;
  margin: 0 !important;
}
.m-author-box__en {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-sub);
}
.m-author-box__role {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-sub);
  margin: 0 !important;
}
.m-author-box__ig {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  font-family: var(--ff-en);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-black);
  background: var(--color-bg);
  border: 1px solid var(--color-line-dark);
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.m-author-box__ig svg {
  color: #d62976;
  flex-shrink: 0;
}
.m-author-box__ig:hover {
  color: var(--color-deep-blue);
  border-color: var(--color-deep-blue);
  background: var(--color-white);
}
.m-author-box__philosophy {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-deep-blue);
  background: var(--color-mint-light);
  padding: 10px 14px;
  border-left: 3px solid var(--color-deep-blue);
  border-radius: 2px;
  margin: 0 0 14px !important;
  line-height: 1.55;
}
.m-author-box__bio p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--color-text);
  margin: 0 0 10px !important;
}
.m-author-box__bio p:last-child {
  margin-bottom: 0 !important;
}

/* ==========================================================================
   9. Multi-Column SEO Footer (includes/footer.php)
   ========================================================================== */
.m-footer {
  background: var(--color-black);
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid var(--color-line);
  font-size: 13px;
}

.m-footer__main {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 52px var(--side-pad) 44px;
  display: grid;
  grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
  gap: 32px;
}
@media (max-width: 1024px) {
  .m-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .m-footer__main {
    grid-template-columns: 1fr;
    padding: 36px 16px 32px;
    gap: 28px;
  }
}

.m-footer .logo {
  color: var(--color-white);
}
.m-footer__desc {
  margin: 14px 0 18px;
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.68);
}

.m-footer__heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.m-footer__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.m-footer__list a {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}
.m-footer__list a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.m-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}
.m-footer__bottom-inner {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--side-pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.m-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
}
.m-footer__legal a {
  color: rgba(255, 255, 255, 0.68);
}
.m-footer__legal a:hover {
  color: var(--color-white);
}
.m-footer__copy {
  font-family: var(--ff-en);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   10. Prompt Copy Button & Recipe Box
   ========================================================================== */
.m-prompt-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.m-prompt-box__head .m-note-box__title {
  margin-bottom: 0;
}
.m-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--color-white);
  color: var(--color-deep-blue);
  border: 1px solid var(--color-deep-blue);
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.m-copy-btn:hover {
  background: var(--color-deep-blue);
  color: var(--color-white);
}
.m-copy-btn.is-copied {
  background: #1b6e44;
  border-color: #1b6e44;
  color: var(--color-white);
}
.m-prompt-pre {
  margin: 0;
  padding: 13px 15px;
  background: #ffffff;
  border: 1px solid var(--color-line-dark);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--color-black);
}

/* ==========================================================================
   11. Mobile / PWA Bottom Navigation & Slide-up Sheets
   ========================================================================== */
#chatPopupOverlay {
  z-index: 2100 !important;
}

.m-sp-bottom-nav,
.m-sp-sheet,
.m-sp-backdrop {
  display: none;
}

@media (max-width: 960px) {
  #supportLauncherBtn {
    display: none !important;
  }
  /* PWA / Mobile Tap Comfort & Safe Area */
  html {
    scroll-padding-top: 112px;
    -webkit-tap-highlight-color: rgba(44, 95, 127, 0.08);
  }
  body.media-body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  /* Sticky Category Bar right below Header */
  .m-sp-catbar {
    display: block;
    position: sticky;
    top: var(--header-h);
    z-index: 995;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-line);
    scrollbar-width: none;
  }
  .m-sp-catbar::-webkit-scrollbar {
    display: none;
  }
  .m-sp-catbar__list {
    padding: 6px 14px;
    gap: 8px;
    align-items: center;
  }
  .m-sp-catbar__link {
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: 999px;
    line-height: 1.2;
  }
  .m-sp-catbar__link.is-active {
    background: var(--color-deep-blue);
    color: var(--color-white);
    border-color: var(--color-deep-blue);
  }

  /* Single-line Horizontal Scrollable Breadcrumb (does not hog screen height) */
  .m-breadcrumb {
    position: relative;
    top: auto;
    z-index: 10;
    padding: 8px 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
  }
  .m-breadcrumb__list {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .m-breadcrumb__list::-webkit-scrollbar {
    display: none;
  }

  /* Main Layout & Comfort Margins on Mobile */
  .m-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 14px 44px;
    gap: 28px;
  }
  .m-article {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  /* Fixed Bottom Navigation Bar */
  .m-sp-bottom-nav {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-line-dark);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(31, 44, 61, 0.06);
  }
  .m-sp-progress {
    position: absolute;
    top: -2px;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--color-deep-blue);
    transition: width 0.1s linear;
  }
  .m-sp-bottom-nav__inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: 58px;
    max-width: 600px;
    margin: 0 auto;
  }
  .m-sp-bottom-nav__item {
    appearance: none;
    background: none;
    border: none;
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--color-sub);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .m-sp-bottom-nav__item:active,
  .m-sp-bottom-nav__item.is-active,
  .m-sp-bottom-nav__item[aria-expanded="true"] {
    color: var(--color-deep-blue);
    font-weight: 700;
  }
  .m-sp-bottom-nav__item--cta {
    color: var(--color-white);
    background: var(--color-deep-blue);
    margin: 7px 6px;
    border-radius: 6px;
    height: 44px;
  }
  .m-sp-bottom-nav__item--cta:active,
  .m-sp-bottom-nav__item--cta:hover {
    color: var(--color-white);
    background: var(--color-black);
  }

  /* Slide-up Backdrop & Bottom Sheet */
  .m-sp-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(20, 30, 42, 0.48);
    opacity: 0;
    transition: opacity 0.22s ease;
  }
  .m-sp-backdrop.is-open {
    opacity: 1;
  }
  .m-sp-backdrop[hidden] {
    display: none !important;
  }
  .m-sp-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    z-index: 1045;
    max-height: 74vh;
    background: var(--color-white);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid var(--color-line-dark);
    box-shadow: 0 -8px 28px rgba(20, 30, 42, 0.16);
    transform: translateY(104%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .m-sp-sheet.is-open {
    transform: translateY(0);
  }
  .m-sp-sheet[hidden] {
    display: none !important;
  }
  .m-sp-sheet__handle {
    width: 38px;
    height: 4px;
    background: var(--color-line-dark);
    border-radius: 999px;
    margin: 9px auto 4px;
    flex-shrink: 0;
  }
  .m-sp-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 12px;
    border-bottom: 1px solid var(--color-line);
    flex-shrink: 0;
  }
  .m-sp-sheet__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-black);
  }
  .m-sp-sheet__close {
    appearance: none;
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 13px;
    color: var(--color-sub);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .m-sp-sheet__body {
    padding: 16px 18px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .m-sp-sheet__subtitle {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-sub);
    margin: 0 0 10px;
  }
  .m-sp-sheet__subsec {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--color-line);
  }

  /* Mobile TOC List inside Sheet */
  .m-sp-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .m-sp-toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-black);
    line-height: 1.45;
  }
  .m-sp-toc-link:active {
    background: var(--color-mint-light);
    border-color: var(--color-deep-blue);
  }
  .m-sp-toc-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-deep-blue);
    color: var(--color-white);
    font-family: var(--ff-en);
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Sibling Step Pills inside TOC Sheet */
  .m-sp-step-pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .m-sp-step-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: 6px;
    text-align: center;
    gap: 2px;
  }
  .m-sp-step-pill.is-current {
    background: var(--color-mint-light);
    border-color: var(--color-deep-blue);
  }
  .m-sp-step-pill__lv {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-deep-blue);
  }
  .m-sp-step-pill__txt {
    font-size: 10.5px;
    color: var(--color-sub);
  }

  /* Level & Category Banners inside Category Sheet */
  .m-sp-level-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .m-sp-level-card {
    display: flex;
    flex-direction: column;
    padding: 10px 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    border-radius: 6px;
    text-align: center;
    gap: 3px;
  }
  .m-sp-level-card strong {
    font-size: 13px;
    color: var(--color-black);
  }
  .m-sp-level-card span {
    font-size: 10.5px;
    color: var(--color-sub);
    line-height: 1.3;
  }
  .m-sp-cat-banners {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .m-sp-cat-banner-item {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--color-line);
  }
  .m-sp-cat-banner-item img {
    width: 100%;
    height: auto;
    display: block;
  }
}

/* ==========================================================================
   12. Smartphone Fine-Tuning (<= 640px) — Stress-Free Spacing & Readability
   ========================================================================== */
@media (max-width: 640px) {
  :root {
    --side-pad: 16px;
  }

  /* Header compact adjustment */
  .m-logo-title__sub {
    display: none;
  }
  .m-logo-title__main {
    font-size: 13.5px;
  }
  .m-header__cta .m-btn {
    padding: 7px 11px;
    font-size: 11.5px;
  }

  /* Top Hero / FV Area */
  .m-top-head {
    padding: 14px 0 18px;
  }
  .m-top-head__bar {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }
  .m-top-head__title {
    font-size: 17px;
  }
  .m-featured {
    gap: 10px;
  }
  .m-featured__sub {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .m-featured__sub .m-fv-card__overlay {
    padding: 16px 8px 6px;
  }
  .m-featured__sub .m-fv-card__date {
    font-size: 10.5px;
  }

  /* Horizontal Scrollable Category Tabs on Index */
  .m-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .m-tabs::-webkit-scrollbar {
    display: none;
  }
  .m-tabs__btn {
    flex-shrink: 0;
    padding: 7px 13px;
    font-size: 12.5px;
    border-radius: 999px;
  }

  /* Article Cards Grid on Index */
  .m-card-grid {
    gap: 16px;
  }
  .m-card__body {
    padding: 14px 15px 16px;
  }
  .m-card__title {
    font-size: 15.5px;
    line-height: 1.5;
  }

  /* Single Article Container & Typography */
  .m-article {
    padding: 18px 14px 24px;
    border-radius: 6px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .m-article__header {
    margin-bottom: 20px;
  }
  .m-article__meta {
    gap: 6px 10px;
    margin-bottom: 10px;
    font-size: 11.5px;
  }
  .m-article__cat,
  .m-article__level {
    font-size: 11px;
    padding: 2px 7px;
  }
  .m-article__title {
    font-size: 17.5px;
    line-height: 1.45;
    margin-bottom: 14px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .m-article__lead {
    padding: 12px 13px;
    font-size: 13.5px;
    line-height: 1.75;
    margin-bottom: 18px;
  }

  /* Inline TOC Box */
  .m-toc {
    padding: 14px 15px;
    margin: 18px 0 22px;
  }
  .m-toc__title {
    font-size: 13px;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
  .m-toc__list {
    font-size: 13px;
    gap: 6px;
  }
  .m-toc__sublist {
    font-size: 12px;
    padding-left: 12px !important;
  }

  /* Article Body Prose — Compact & Easy to read on mobile screens */
  .m-article-body {
    font-size: 14.5px;
    line-height: 1.82;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
    max-width: 100%;
  }
  .m-article-body p {
    margin-bottom: 1.35em;
  }
  .m-article-body h2 {
    font-size: 16.5px;
    line-height: 1.42;
    margin: 32px 0 14px;
    padding: 8px 10px;
  }
  .m-article-body h3 {
    font-size: 15px;
    line-height: 1.42;
    margin: 22px 0 10px;
    padding-bottom: 5px;
  }
  .m-note-box {
    padding: 12px 13px;
    margin: 16px 0;
    font-size: 13.5px;
    line-height: 1.75;
    max-width: 100%;
    overflow: hidden;
  }
  .m-prompt-box__head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .m-copy-btn {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .m-prompt-pre {
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.7;
    max-width: 100%;
    overflow-x: auto;
  }

  /* Tables on Mobile: Stacked Cards (Zero Horizontal Overflow) */
  .m-table-wrap {
    margin: 16px 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
  }
  .m-table,
  .m-table tbody,
  .m-table tr,
  .m-table td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  .m-table thead {
    display: none;
  }
  .m-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--color-line-dark);
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-white);
  }
  .m-table tr:last-child {
    margin-bottom: 0;
  }
  .m-table td {
    border: none;
    border-bottom: 1px solid var(--color-line);
    padding: 10px 12px;
    font-size: 13.5px;
    line-height: 1.68;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .m-table td:first-child {
    background: var(--color-bg);
    color: var(--color-deep-blue);
    font-weight: 700;
    padding: 8px 12px;
    font-size: 13.5px;
  }
  .m-table td:first-child br {
    display: none;
  }
  .m-table td:first-child strong {
    display: inline;
  }
  .m-table td:last-child {
    border-bottom: none;
    background: #f9fbfb;
    font-size: 12.5px;
    color: var(--color-sub);
  }
  .m-table td:last-child::before {
    content: "💡 ポイント：";
    font-weight: 700;
    color: var(--color-deep-blue);
  }

  /* FAQ & Related Nav on Mobile */
  .m-faq-item {
    padding: 13px 14px;
  }
  .m-faq-item__q {
    font-size: 14px;
  }
  .m-faq-item__a {
    font-size: 13.5px;
  }
  .m-article-nav {
    padding: 15px 13px;
    margin-top: 2em;
  }
  .m-article-nav__heading {
    font-size: 14px;
    margin-bottom: 12px;
  }

  /* 6 Related Cards: 2x3 Grid on Mobile for effortless browsing */
  .m-rel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .m-rel-card__body {
    padding: 9px 10px 11px;
    gap: 5px;
  }
  .m-rel-card__meta {
    gap: 4px;
  }
  .m-rel-card__badge {
    font-size: 10px;
    padding: 1px 6px;
  }
  .m-rel-card__cat {
    font-size: 10px;
  }
  .m-rel-card__title {
    font-size: 12px;
    line-height: 1.45;
    -webkit-line-clamp: 3;
  }

  /* Author Profile Box on Mobile */
  .m-author-box {
    padding: 18px 16px;
    margin-top: 32px;
  }
  .m-author-box__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .m-author-box__sns-btn {
    width: 100%;
    justify-content: center;
    padding: 9px 14px;
  }
  .m-author-box__philosophy {
    font-size: 13.5px;
    padding: 9px 12px;
  }
  .m-author-box__bio p {
    font-size: 13.5px;
    line-height: 1.8;
  }

  /* Bottom CTA inside Article */
  .m-article-cta {
    padding: 20px 16px;
    margin-top: 30px;
  }
  .m-article-cta__title {
    font-size: 16.5px;
  }
  .m-article-cta__actions {
    flex-direction: column;
  }
  .m-article-cta__actions .m-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* ==========================================================================
   13. Works / Case Studies Section below Author Profile (6 Cards: 3x2 Grid)
   ========================================================================== */
.m-works-sec {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--color-line-dark);
}
.m-works-sec__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.m-works-sec__eyebrow {
  display: block;
  font-family: var(--ff-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-deep-blue);
  margin-bottom: 3px;
}
.m-works-sec__title {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  color: var(--color-black) !important;
  line-height: 1.35 !important;
}
.m-works-sec__more {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-deep-blue);
  text-decoration: none;
}
.m-works-sec__more:hover {
  text-decoration: underline;
}
.m-works-sec__lead {
  margin: 0 0 18px !important;
  font-size: 13.5px !important;
  line-height: 1.75 !important;
  color: var(--color-sub) !important;
}

.m-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.m-work-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-line-dark);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none !important;
  color: var(--color-black) !important;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.m-work-card:hover {
  border-color: var(--color-deep-blue);
  transform: translateY(-2px);
}
.m-work-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #eaeff2;
  overflow: hidden;
  border-bottom: 1px solid var(--color-line);
}
.m-work-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.m-work-card:hover .m-work-card__thumb img {
  transform: scale(1.03);
}
.m-work-card__body {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.m-work-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.m-work-card__badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-white);
  background: var(--color-deep-blue);
  padding: 2px 7px;
  border-radius: 3px;
  line-height: 1.3;
}
.m-work-card__client {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-sub);
}
.m-work-card__title {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: var(--color-black) !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .m-works-sec {
    margin-top: 28px;
    padding-top: 24px;
  }
  .m-works-sec__title {
    font-size: 17px !important;
  }
  .m-works-sec__lead {
    font-size: 13px !important;
    margin-bottom: 14px !important;
  }
  .m-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .m-work-card__body {
    padding: 9px 10px 11px;
    gap: 5px;
  }
  .m-work-card__badge {
    font-size: 9.5px;
    padding: 1px 5px;
  }
  .m-work-card__client {
    font-size: 10px;
  }
  .m-work-card__title {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
}


