/* ネコノテマガジン固有スタイル。共通の /styles.css の後に読み込む前提
   （トークン・ヘッダー・フッター・soft-card・reveal は styles.css 側を使う） */

/* 一覧・記事共通のセクション（固定ヘッダーの逃げ） */
.mag-section {
  padding-top: 120px;
}

.section-heading h1 {
  margin: 0;
  color: var(--purple);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.35;
  letter-spacing: 0;
}

/* 記事カード一覧（マガジントップ／コーポレートトップの紹介セクション共用） */
.mag-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

/* カードはサムネイル画像のみ（タイトル等は画像内に描画済み・altで担保） */
.mag-card {
  display: block;
  padding: 0;
  border-radius: 28px;
  overflow: hidden;
}

.mag-card-thumb {
  display: block;
  width: 100%;
  height: auto;
}

/* バッジ（記事ページのメタ行で使用。サービスブランド色に合わせる） */
.mag-badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.badge-tenshoku {
  background: #009688;
}

.badge-fukugyo {
  background: #005ffe;
}

/* マガジン一覧への誘導ボタン行（コーポレートトップ用） */
.mag-more {
  margin-top: 30px;
  text-align: center;
}

/* スマホ幅で共通CSSがボタンをwidth:100%にするため、パディング込みで収める */
.mag-more .primary-button {
  box-sizing: border-box;
}

/* 記事ページ */
.mag-breadcrumb {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.mag-breadcrumb a {
  color: var(--purple);
}

.mag-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px clamp(24px, 5vw, 56px);
  text-align: left;
}

.mag-article-head h1 {
  margin: 12px 0 14px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.5;
  color: var(--purple-deep);
}

.mag-article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.mag-article-lead {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
}

.mag-article h2 {
  margin: 2.2em 0 0.7em;
  padding-left: 14px;
  border-left: 4px solid var(--purple);
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.5;
  color: var(--purple-deep);
}

.mag-article h3 {
  margin: 1.8em 0 0.6em;
  font-size: 17px;
  color: var(--ink);
}

.mag-article p {
  margin: 0.9em 0;
}

.mag-article ul,
.mag-article ol {
  padding-left: 1.6em;
}

.mag-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 1.2em 0;
}

.mag-article th,
.mag-article td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.mag-article th {
  background: rgba(169, 154, 242, 0.14);
  color: var(--purple-deep);
}

.mag-article a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 要点のマーカー（蛍光イエロー） */
.mag-article mark {
  background: linear-gradient(transparent 6%, rgba(255, 230, 100, 0.75) 6% 94%, transparent 94%);
  color: inherit;
  padding: 0 2px;
}

/* 要点サマリー（この記事でわかること） */
.mag-summary {
  margin: 18px 0 6px;
  padding: 18px 22px;
  border: 1px solid rgba(169, 154, 242, 0.4);
  border-radius: 16px;
  background: rgba(169, 154, 242, 0.08);
}

.mag-summary-title {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--purple-deep);
}

.mag-summary ul {
  margin: 0;
  padding-left: 1.4em;
}

.mag-summary li {
  font-size: 14.5px;
  margin: 4px 0;
}

/* 目次 */
.mag-toc {
  margin: 0 0 10px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.mag-toc-title {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--purple-deep);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 22px;
}

.mag-toc-title::-webkit-details-marker {
  display: none;
}

.mag-toc-title::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.mag-toc[open] .mag-toc-title::after {
  transform: rotate(225deg);
  top: 8px;
}

.mag-toc:not([open]) .mag-toc-title {
  margin-bottom: 0;
}

.mag-toc ol {
  margin: 0;
  padding-left: 1.5em;
}

.mag-toc li {
  font-size: 14px;
  margin: 3px 0;
}

.mag-toc a {
  color: var(--ink);
}

.mag-toc a:hover {
  color: var(--purple);
}

/* 制作元の注記（E-E-A-T） */
.mag-note {
  margin: 3em 0 0;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.mag-note a {
  color: var(--purple);
}

/* 見出しへのページ内ジャンプ時に固定ヘッダーで隠れないように */
.mag-article h2 {
  scroll-margin-top: 120px;
}

/* 登場人物プロフィール（記事冒頭） */
.mag-profiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0 30px;
}

.mag-profile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgba(140, 205, 220, 0.4);
  border-radius: 16px;
  background: rgba(140, 205, 220, 0.1);
}

.mag-profile.is-guide {
  border-color: rgba(169, 154, 242, 0.45);
  background: rgba(169, 154, 242, 0.1);
}

.mag-profile img {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
}

.mag-profile-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.mag-profile-role {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

@media (max-width: 700px) {
  .mag-profiles {
    grid-template-columns: 1fr;
  }
}

/* 会話形式（吹き出しUI）。解説役すぅ=左・紫系、聞き役ふたば=右・水色系 */
.talk {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 1.4em 0;
}

.talk.is-listener {
  flex-direction: row-reverse;
}

.talk-avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
}

.talk-body {
  max-width: 82%;
}

.talk-name {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

.talk.is-listener .talk-name {
  text-align: right;
}

.talk-bubble {
  position: relative;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(140, 205, 220, 0.16);
  border: 1px solid rgba(140, 205, 220, 0.35);
}

.talk.is-guide .talk-bubble {
  background: rgba(169, 154, 242, 0.16);
  border-color: rgba(169, 154, 242, 0.4);
}

.talk-bubble p {
  margin: 0;
}

.talk-bubble p + p {
  margin-top: 0.6em;
}

@media (max-width: 560px) {
  .talk-avatar {
    width: 44px;
    height: 44px;
  }

  .talk-body {
    max-width: 100%;
  }
}

/* FAQ（Q&Aカード） */
.mag-faq-item {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.mag-article .mag-faq-item h3 {
  position: relative;
  margin: 0;
  padding: 14px 18px 14px 48px;
  font-size: 15.5px;
  color: var(--purple-deep);
  background: rgba(169, 154, 242, 0.14);
}

.mag-article .mag-faq-item p {
  position: relative;
  margin: 0;
  padding: 14px 18px 16px 48px;
}

.mag-faq-item h3::before,
.mag-faq-item p::before {
  position: absolute;
  left: 16px;
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mag-faq-item h3::before {
  content: "Q";
  background: var(--purple);
}

.mag-faq-item p::before {
  content: "A";
  background: var(--coral);
  top: 15px;
}

/* 共通CVセクション（全記事末尾。転職・副業の2択をロゴ付きで提示） */
.mag-cv {
  margin: 3em 0 0;
}

.mag-cv-heading {
  margin: 0 0 14px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--purple-deep);
}

.mag-cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* .mag-article a の色・下線指定より詳細度を上げる */
.mag-article a.mag-cv-card,
.mag-cv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 20px 36px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(87, 69, 151, 0.08);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.mag-cv-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(87, 69, 151, 0.16);
}

.mag-cv-card img {
  width: min(100%, 190px);
  height: 58px;
  object-fit: contain;
}

.mag-cv-label {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--purple-deep);
}

.mag-cv-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.mag-cv-arrow {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: var(--purple);
  font-weight: 900;
}

@media (max-width: 700px) {
  .mag-cv-grid {
    grid-template-columns: 1fr;
  }
}

.mag-author {
  margin-top: 2.2em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.mag-author-name {
  margin: 0 0 4px;
  font-weight: 800;
  color: var(--ink);
}

.mag-author-bio {
  margin: 0;
}

.mag-related {
  max-width: 1120px;
  margin: 40px auto 0;
}

.mag-related-heading {
  margin: 0 0 14px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--purple-deep);
}

.mag-back {
  max-width: 860px;
  margin: 26px auto 0;
}

.mag-back a {
  color: var(--purple);
  font-weight: 800;
}

@media (max-width: 760px) {
  .mag-section {
    padding-top: 104px;
  }

  /* 4列以上の表は潰して折り返すより、表内だけ横スクロールさせる方が読める */
  .mag-article table:has(th:nth-child(4)) {
    display: block;
    overflow-x: auto;
  }

  .mag-article table:has(th:nth-child(4)) th,
  .mag-article table:has(th:nth-child(4)) td {
    min-width: 8.5em;
  }
}
