/* ===================================================
   ハダカノメ - 共通CSS (SWELL風デザイン / Mobile First)
   =================================================== */

:root {
  --color-primary: #2d6fba;
  --color-primary-light: #e8f1fb;
  --color-primary-dark: #1b4f8a;
  --color-accent: #e8a735;
  --color-accent-light: #fff8eb;
  --color-text: #333;
  --color-text-light: #666;
  --color-text-muted: #999;
  --color-bg: #f7f7f7;
  --color-white: #fff;
  --color-border: #e0e0e0;
  --color-pr-bg: #fef3f3;
  --color-pr-text: #c0392b;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--color-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ===== PR BANNER ===== */
.pr-banner {
  background: var(--color-pr-bg);
  border-bottom: 1px solid #f0d0d0;
  text-align: center;
  padding: 6px 12px;
  font-size: .72rem;
  color: var(--color-pr-text);
  font-weight: 500;
}

/* ===== HEADER (Mobile Base - SWELL風) ===== */
.site-header {
  background: var(--color-white);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-logo {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -.02em;
}
.site-logo span { color: var(--color-accent); }
.site-tagline {
  display: block;
  font-size: .55rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: .08em;
  line-height: 1;
  margin-top: 1px;
}
.header-link {
  font-size: .8rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  padding: 6px 14px;
  border: 1.5px solid var(--color-primary);
  border-radius: 20px;
  transition: all .2s;
  white-space: nowrap;
}
.header-link:hover {
  background: var(--color-primary);
  color: #fff;
}
.global-nav { display: none; }

/* ===== HERO (Mobile Base) ===== */
.article-hero {
  background: linear-gradient(135deg, #1a3a5c 0%, #2d6fba 60%, #4a9eed 100%);
  padding: 32px 16px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hero-category {
  background: var(--color-accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
}
.hero-date { font-size: .75rem; opacity: .8; }
.article-hero h1 {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.5;
}

/* ===== LAYOUT (Mobile Base: single column) ===== */
.layout-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 12px;
  display: block;
}

/* ===== DISCLAIMER (SWELL風) ===== */
.medical-disclaimer {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef4 100%);
  border: 1px solid #c0d0e0;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 18px 18px;
  margin-bottom: 24px;
  font-size: .8rem;
  line-height: 1.8;
  color: var(--color-text-light);
  position: relative;
}
.medical-disclaimer strong { color: var(--color-text); font-weight: 700; }
.medical-disclaimer p + p { margin-top: 6px; }

/* ===== ARTICLE BODY (Mobile Base) ===== */
.article-body {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 16px;
}
.article-body h2 {
  font-size: 1.15rem;
  font-weight: 900;
  padding: 14px 16px 14px 20px;
  margin: 40px 0 22px;
  border-left: 4px solid var(--color-primary);
  background: linear-gradient(90deg, var(--color-primary-light) 0%, rgba(232,241,251,0) 100%);
  border-radius: 0 var(--radius) var(--radius) 0;
  line-height: 1.5;
  position: relative;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  padding: 0 0 8px 8px;
  margin: 32px 0 16px;
  border-bottom: 2px solid var(--color-primary-light);
  position: relative;
}
.article-body h3::before {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 40px; height: 2px;
  background: var(--color-primary);
}
.article-body p { margin-bottom: 18px; font-size: .9rem; }

/* ===== SWELL風 UL (チェックマーク付きリスト) ===== */
.article-body ul {
  margin: 0 0 20px;
  padding: 20px 20px 20px 20px;
  background: #f8fafb;
  border-radius: var(--radius-lg);
  border: 1px solid #e8eef4;
  list-style: none;
}
.article-body ul li {
  margin-bottom: 10px;
  font-size: .9rem;
  padding-left: 26px;
  position: relative;
  line-height: 1.8;
}
.article-body ul li:last-child { margin-bottom: 0; }
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 16px; height: 16px;
  background: var(--color-primary);
  border-radius: 50%;
  /* checkmark */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 11.5L3 8l1-1 2.5 2.5L11 5l1 1z' fill='white'/%3E%3C/svg%3E");
  background-size: 16px;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
/* strong付きli（ラベル+説明パターン）の装飾 */
.article-body ul li strong {
  color: var(--color-primary-dark);
}

/* ===== SWELL風 OL (ステップフロー) ===== */
.article-body ol:not(.toc ol) {
  margin: 0 0 20px;
  padding: 24px 20px 20px;
  background: linear-gradient(135deg, #f8fbff 0%, #f0f6ff 100%);
  border-radius: var(--radius-lg);
  border: 1px solid #d4e4f7;
  list-style: none;
  counter-reset: step-counter;
}
.article-body ol:not(.toc ol) li {
  counter-increment: step-counter;
  margin-bottom: 16px;
  font-size: .9rem;
  padding-left: 42px;
  position: relative;
  line-height: 1.8;
  padding-bottom: 16px;
  border-bottom: 1px dashed #d4e4f7;
}
.article-body ol:not(.toc ol) li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.article-body ol:not(.toc ol) li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0; top: 2px;
  width: 28px; height: 28px;
  background: var(--color-primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(45,111,186,.25);
}
.article-body ol:not(.toc ol) li strong {
  color: var(--color-primary-dark);
}

/* ===== SWELL BOXES (リニューアル) ===== */
.swell-box {
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  margin: 24px 0;
  font-size: .87rem;
  position: relative;
  overflow: hidden;
}
.swell-box p:last-child { margin-bottom: 0; }

.swell-box--point {
  background: linear-gradient(135deg, #fffcf4 0%, var(--color-accent-light) 100%);
  border: 1px solid #f0d9a0;
  border-left: 4px solid var(--color-accent);
}
.swell-box--point::before {
  content: '📌 ポイント';
  display: block;
  font-size: .78rem;
  font-weight: 900;
  color: var(--color-accent);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #f0d9a0;
}

.swell-box--caution {
  background: linear-gradient(135deg, #fffafa 0%, #fff5f5 100%);
  border: 1px solid #f0c0c0;
  border-left: 4px solid #c0392b;
}
.swell-box--caution::before {
  content: '⚠ 注意';
  display: block;
  font-size: .78rem;
  font-weight: 900;
  color: #c0392b;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #f0c0c0;
}

.swell-box--info {
  background: linear-gradient(135deg, #f4f9ff 0%, var(--color-primary-light) 100%);
  border: 1px solid #b0ccec;
  border-left: 4px solid var(--color-primary);
}
.swell-box--info::before {
  content: 'ℹ️ 補足情報';
  display: block;
  font-size: .78rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #b0ccec;
}

.swell-box ul {
  background: transparent;
  border: none;
  margin: 8px 0 0;
  padding: 0 0 0 18px;
}
.swell-box ul li::before {
  background: var(--color-primary);
  width: 14px; height: 14px;
  top: 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 11.5L3 8l1-1 2.5 2.5L11 5l1 1z' fill='white'/%3E%3C/svg%3E");
  background-size: 14px;
}
.swell-box ul li {
  padding-left: 24px;
  margin-bottom: 6px;
}

/* ===== TABLE (SWELL風 ストライプ＆丸角) ===== */
.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  border: 1px solid #d4dfe8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: .82rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.article-body th, .article-body td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e8eef4;
  white-space: nowrap;
}
.article-body th {
  background: linear-gradient(135deg, #1a3a5c 0%, var(--color-primary) 100%);
  color: #fff;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .02em;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:nth-child(even) td { background: #f6f9fc; }
.article-body tr:hover td { background: #edf3fa; transition: background .15s; }
.article-body td strong { color: var(--color-primary-dark); }

/* ===== INTERNAL LINK CARD (SWELL風ブログカード) ===== */
.internal-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 20px 0;
  text-decoration: none;
  color: var(--color-text);
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
.internal-link::after {
  content: '›';
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  opacity: 0;
  transition: opacity .25s, right .25s;
}
.internal-link:hover {
  box-shadow: 0 4px 16px rgba(45,111,186,.12);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.internal-link:hover::after { opacity: 1; right: 14px; }
.internal-link::before {
  content: '';
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: var(--color-primary-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232d6fba'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 2l5 5h-5V4zM6 20V4h5v7h7v9H6z'/%3E%3C/svg%3E");
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
}
.internal-link-text {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-primary-dark);
  padding-right: 20px;
}

/* ===== PROFILE BOX (SWELL風) ===== */
.profile-box {
  background: linear-gradient(135deg, #f8fbff 0%, #f0f6ff 100%);
  border: 1px solid #d4e4f7;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  position: relative;
}
.profile-box::before {
  content: 'PROFILE';
  position: absolute;
  top: -10px; left: 20px;
  background: var(--color-primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 14px;
  border-radius: 20px;
  letter-spacing: .1em;
}
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-light), #c4daf0);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(45,111,186,.15);
}
.profile-info { font-size: .83rem; }
.profile-info dt {
  font-weight: 700;
  font-size: .72rem;
  color: var(--color-primary);
  margin-top: 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.profile-info dd { margin-left: 0; color: var(--color-text); }

/* ===== リサーチデータボックス ===== */
div[style*="background:#f0f6ff"] {
  border-radius: var(--radius-lg) !important;
  border-left-width: 4px !important;
  box-shadow: 0 1px 4px rgba(45,111,186,.06);
}
div[style*="background:#f0f6ff"] small {
  display: block;
  margin-top: 8px;
  font-size: .72rem;
  color: var(--color-text-muted);
}

/* ===== FAQ Q&A (SWELL風アコーディオン風) ===== */
.article-body h3[id]:not([id=""]) + p,
.article-body h3:not([id]) + p {
  /* Q&A回答テキストのスタイル（h3のあとに来るp） */
}

/* ===== 強調テキスト装飾 ===== */
.article-body strong {
  background: linear-gradient(transparent 60%, #fff3c8 60%);
  padding: 0 2px;
  font-weight: 700;
}

/* ===== TOC (SWELL風) ===== */
.toc {
  background: linear-gradient(135deg, #fafcff 0%, #f4f8fc 100%);
  border: 1px solid #d4e4f7;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 28px;
  position: relative;
}
.toc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.toc-title {
  font-size: .95rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-primary-dark);
  position: relative;
}
.toc-title::after {
  content: '';
  display: block;
  width: 36px; height: 3px;
  background: var(--color-primary);
  margin: 6px auto 0;
  border-radius: 2px;
}
.toc ol { list-style: none; counter-reset: toc-counter; padding: 0; margin: 0; background: transparent; border: none; }
.toc li { counter-increment: toc-counter; margin-bottom: 0; background: transparent; padding-left: 0; border-bottom: none; padding-bottom: 0; }
.toc li::before { display: none; }  /* article-body ol li::before を打ち消し */
.toc > ol > li > a {
  display: block;
  padding: 10px 0 10px 36px;
  font-size: .84rem; font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px dashed #d4e4f7;
  position: relative;
  transition: all .2s;
}
.toc > ol > li > a::before {
  content: counter(toc-counter);
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px;
  background: var(--color-primary); color: #fff;
  font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(45,111,186,.2);
}
.toc > ol > li > a:hover {
  color: var(--color-primary);
  padding-left: 40px;
}
.toc > ol > li:last-child > a { border-bottom: none; }

/* ===== SIDEBAR (Hidden on mobile) ===== */
.sidebar { display: none; }
.sidebar-widget {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}
.sidebar-widget h4 {
  font-size: .85rem; font-weight: 700;
  padding-bottom: 10px; margin-bottom: 16px;
  border-bottom: 2px solid var(--color-primary);
}
.sidebar-category-list { list-style: none; padding: 0; margin: 0; background: transparent; }
.sidebar-category-list li { margin-bottom: 0; background: transparent; }
.sidebar-category-list a {
  display: block; padding: 10px 0; font-size: .85rem;
  color: var(--color-text); text-decoration: none;
  border-bottom: 1px solid #f0f0f0; transition: color .2s;
}
.sidebar-category-list a:hover { color: var(--color-primary); }
.sidebar-category-list li:last-child a { border-bottom: none; }

/* ===== TOP PAGE (Mobile Base) ===== */
.top-hero {
  background: linear-gradient(135deg, #1a3a5c 0%, #2d6fba 60%, #4a9eed 100%);
  padding: 40px 16px;
  color: #fff;
  text-align: center;
}
.top-hero h1 { font-size: 1.6rem; font-weight: 900; margin-bottom: 8px; }
.top-hero p { font-size: .9rem; opacity: .85; }
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  overflow: hidden;
  transition: all .3s ease;
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: row;
  border: 1px solid transparent;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(45,111,186,.12);
  transform: translateY(-3px);
  border-color: var(--color-primary-light);
}
.card-thumb {
  width: 90px; min-height: 90px;
  background: var(--color-primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; flex-shrink: 0;
}
.card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.card-category {
  display: inline-block; background: var(--color-primary); color: #fff;
  font-size: .65rem; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; margin-bottom: 6px; align-self: flex-start;
}
.card-title { font-size: .85rem; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.card-date { font-size: .7rem; color: var(--color-text-muted); margin-top: auto; }

/* ===== FOOTER (SWELL風) ===== */
.site-footer {
  background: linear-gradient(180deg, #1a2a3a 0%, #0f1d2d 100%);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 32px 16px;
  font-size: .75rem;
  margin-top: 48px;
}
.site-footer a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  transition: color .2s;
}
.site-footer a:hover { color: #fff; }

/* ==========================================================
   TABLET (min-width: 600px)
   ========================================================== */
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .card { flex-direction: column; }
  .card-thumb { width: 100%; height: 140px; }
  .article-body { padding: 32px 24px; }
  .layout-wrapper { padding: 32px 20px; }
  .article-hero { padding: 40px 20px 36px; }
  .article-hero h1 { font-size: 1.5rem; }
  .article-body table { display: table; }
  .article-body th, .article-body td { white-space: normal; }
  .profile-box { flex-direction: row; text-align: left; align-items: flex-start; }
}

/* ==========================================================
   DESKTOP (min-width: 960px)
   ========================================================== */
@media (min-width: 960px) {
  .header-inner { padding: 0 24px; height: 64px; }
  .site-logo { font-size: 1.25rem; }
  .global-nav { display: flex; gap: 24px; list-style: none; }
  .global-nav a { color: var(--color-text); text-decoration: none; font-size: .875rem; font-weight: 500; transition: color .2s; }
  .global-nav a:hover { color: var(--color-primary); }
  .article-hero { padding: 56px 24px 48px; }
  .article-hero::before { width: 500px; height: 500px; }
  .article-hero h1 { font-size: 2rem; }
  .layout-wrapper { padding: 40px 24px; max-width: 860px; margin: 0 auto; }
  .sidebar { display: block; position: sticky; top: 88px; align-self: start; }
  .article-body { padding: 48px 40px; }
  .article-body h2 { font-size: 1.35rem; padding: 16px 20px 16px 24px; margin: 48px 0 24px; }
  .article-body h3 { font-size: 1.1rem; margin: 36px 0 18px; }
  .article-body p { font-size: .95rem; margin-bottom: 20px; }
  .article-body li { font-size: .95rem; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
  .card-thumb { height: 180px; font-size: 3rem; }
  .card-title { font-size: .95rem; }
  .top-hero { padding: 64px 24px; }
  .top-hero h1 { font-size: 2.4rem; }
  .top-hero p { font-size: 1rem; }
  .swell-box { padding: 24px; }
  .medical-disclaimer { padding: 20px 24px; font-size: .85rem; }
}
