/* =====================================================
   pages/news.css — マガジン（記事一覧・記事詳細）
   依存：tokens.css → base.css → layout.css → components.css
   ※ 共通コンポーネント（.work-modal, .pickup-card, .plan-card,
     .partner-card, .filter-info, .pagination, .page-btn, .detail-nav,
     .detail-nav-btn）は components.css 側に統合済み。
   ※ 全面ライトテーマで統一済み（旧暗テーマ remnant は削除）。
===================================================== */

/* 固定ヘッダー（140px）の下に収まるよう上端に余白 */
#newsall,
#news {
  padding-top: 160px;
}


/* =====================================================
   1. 記事一覧（news-list）
===================================================== */

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-brand-border);
}

.news-link {
  display: flex;
  gap: 20px;
  width: 100%;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  align-items: center;
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  border-radius: var(--radius);
}

.news-link:hover {
  background: var(--color-brand-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.news-thumb {
  width: 280px;
  height: 186px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 4px;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-link:hover .news-thumb img { transform: scale(1.05); }

.news-meta-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-date {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.news-meta-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding-left: 10px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.news-category-text {
  margin-right: 12px;
}

/* NEW バッジ */
.badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: bold;
}

.badge.new {
  background: var(--color-brand-deep);
  color: var(--color-text-inverse);
}

.news-tags-label {
  margin-right: 0;
  padding-right: 0;
}

.news-tags {
  display: inline-flex;
  gap: 6px;
}

.tag-badge {
  display: inline-block;
  background: var(--color-brand-bg);
  color: var(--color-brand-primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
}

.news-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.5;
}

.news-link:hover .news-title {
  color: var(--color-brand-primary);
}

.news-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.news-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--color-text-disabled);
  font-size: var(--text-base);
}


/* =====================================================
   2. レイアウト（メイン + サイドバー 2カラム）
   ※ .sidebar スタイル本体は layout.css
===================================================== */

#newsall .layout-wrapper,
#news .layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 1024px) { /* bp-tablet-landscape */
  #newsall .layout-wrapper,
  #news .layout-wrapper {
    grid-template-columns: 1fr;
  }
  .news-main { order: 1; min-width: 0; }
  .sidebar { width: 100%; box-sizing: border-box; }
}

@media (max-width: 900px) { /* bp-tablet */
  .news-thumb { width: 180px; height: 120px; }
}

@media (max-width: 520px) { /* bp-phone */
  .news-link {
    flex-direction: column;
    align-items: flex-start;
  }
  .news-thumb {
    width: 100%;
    height: 180px;
  }
}

/* 本文エリアは中央寄せ・読みやすい幅で固定 */
.news-main {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--color-text-primary);
}

.article-body > * {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}


/* =====================================================
   3. ページ件数表示（補助）
===================================================== */

.range-info {
  margin-top: 16px;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-disabled);
}


/* =====================================================
   4. 記事詳細：タイトル・メタ
===================================================== */

#prev-article,
#next-article { display: none; }

hr {
  margin: 20px 0;
  border-color: var(--color-brand-border);
}

.detail-title {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.detail-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 700px;
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    var(--color-brand-primary),
    var(--color-brand-light),
    var(--color-brand-deep),
    var(--color-brand-light),
    rgba(192, 80, 112, 0));
}

.detail-info {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 25px;
}

.detail-date {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.detail-category-label,
.detail-tags-label {
  font-weight: 600;
  color: var(--color-text-muted);
}

.detail-category-text {
  margin-left: 6px;
  color: var(--color-text-secondary);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.detail-tag-item {
  display: inline-block;
  background: var(--color-brand-bg);
  color: var(--color-brand-primary);
  padding: 2px 10px;
  margin: 4px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  white-space: nowrap;
}


/* =====================================================
   5. 記事内画像
===================================================== */

#article-images img {
  width: 100%;
  max-width: 100%;
  display: block;
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.detail-thumb {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-brand-border);
  box-shadow: var(--shadow-sm);
  padding: 6px;
  margin-bottom: 20px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}


/* =====================================================
   6. 記事本文：見出し・段落・装飾
===================================================== */

.article-h2 {
  border-left: 10px solid var(--color-brand-light);
  font-size: var(--text-2xl);
  font-weight: bold;
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-brand-border);
  padding-bottom: 6px;
  margin-top: 40px;
  padding-left: 14px;
}

.article-h3 {
  position: relative;
  font-size: var(--text-xl);
  font-weight: 700;
  padding: 0 0 0 38px;
  color: var(--color-brand-light);
  margin-top: 30px;
}

.article-h3::before {
  content: "✦";
  position: absolute;
  left: 12px;
  font-size: 18px;
  color: var(--color-brand-light);
  opacity: 0.9;
}

.article-p {
  margin: 16px 25px;
}

.emphasis {
  background: linear-gradient(transparent 70%, rgba(255, 184, 108, 0.7) 70%);
  font-weight: bold;
  padding: 0 2px;
}

.divider {
  height: 2px;
  width: 100%;
  background: var(--color-brand-border);
  margin: 30px 0;
}

.image-wrap {
  width: 100%;
  text-align: center;
  margin: 20px 0;
}

.image-wrap img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}

.alert-box {
  background: #ffefaf;
  color: var(--color-text-primary);
  padding: 14px 18px;
  border-left: 6px solid #ffcc00;
  margin: 24px 0;
  border-radius: 6px;
}

.article-quote {
  border-left: 3px solid var(--color-brand-light);
  padding-left: 12px;
  margin: 20px 0;
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.external-btn {
  display: inline-block;
  padding: 12px 20px;
  background: var(--color-brand-light);
  color: var(--color-text-inverse);
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  margin: 20px 0;
  transition: opacity var(--transition-fast);
}

.external-btn:hover {
  color: var(--color-text-inverse);
  text-shadow: none;
  opacity: 0.85;
}


/* =====================================================
   7. 箇条書きボックス
===================================================== */

.article-ul-wrapper {
  background: rgba(255, 233, 241, 0.5);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 25px 0;
  border: 1px solid var(--color-brand-border);
}

.article-ul-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-brand-primary);
  margin-bottom: 12px;
}

.article-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-ul li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: var(--text-base);
  line-height: 1.6;
}

.article-ul li::before {
  content: "•";
  position: absolute;
  left: 5px;
  top: 6px;
  color: var(--color-brand-light);
  font-size: var(--text-sm);
}


/* =====================================================
   8. クリエイターコメントカード（記事埋め込み）
===================================================== */

.creator-comment-card {
  background: linear-gradient(135deg, var(--color-brand-pale), #ffcfbd);
  border: 1px solid #ffe0c8;
  border-radius: var(--radius);
  padding: 20px;
  margin: 32px 0;
  box-shadow: 0 3px 10px rgba(255, 160, 200, 0.15);
}

.creator-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.creator-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-brand-light);
}

.creator-info {
  flex: 1;
}

.creator-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-brand-light);
  margin-bottom: 4px;
}

.creator-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.creator-comment {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--color-surface-white);
  border-left: 4px solid var(--color-brand-light);
  border-radius: 6px;
  font-size: var(--text-base);
  color: var(--color-text-primary);
  line-height: 1.7;
}


/* =====================================================
   9. 目次（TOC）
===================================================== */

.toc-box {
  background: rgba(255, 233, 241, 0.5);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 35px;
  border: 1px solid var(--color-brand-border);
}

.toc-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-brand-primary);
  letter-spacing: 1px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0 20px;
}

.toc-list li {
  margin: 10px 0;
  position: relative;
  padding-left: 22px;
}

.toc-list .toc-h2::before,
.toc-list .toc-h3::before {
  content: "◆";
  position: absolute;
  left: -20px;
  color: var(--color-brand-light);
}

.toc-list .toc-h2::before { top: 7px; font-size: 12px; }
.toc-list .toc-h3::before { top: 5px; font-size: 10px; }

.toc-list a {
  color: var(--color-brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  border-bottom: 1px dashed transparent;
}

.toc-list .toc-h2 {
  margin-left: 0;
  font-weight: 600;
  padding: 4px 0;
}

.toc-list .toc-h3 {
  margin-left: 16px;
  font-size: var(--text-sm);
  padding: 3px 0;
}

.toc-list a:hover {
  color: var(--color-brand-deep);
  border-bottom: 1px dashed var(--color-brand-light);
}


/* =====================================================
   10. 記事内埋め込み（nagi-embed）
   ※ 内部のカード（pickup/plan/partner）は components.css の共通スタイルを利用
===================================================== */

.nagi-embed {
  margin: 32px 0;
}

.nagi-embed-loading,
.nagi-embed-empty {
  text-align: center;
  padding: 24px;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* クリエイター: 1列縦並び */
.nagi-embed-grid--creator {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* プラン: auto-fill グリッド */
.nagi-embed-grid--plan {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* 実績: 1列縦並び */
.nagi-embed-grid--work {
  display: flex;
  flex-direction: column;
  gap: 16px;
}


/* =====================================================
   11. ec-card — 記事埋め込み用クリエイター横長カード
===================================================== */

.ec-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--color-surface-card);
  border: 1px solid var(--color-brand-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-decoration: none;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.ec-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--color-text-primary);
}

.ec-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-brand-border);
}
.ec-card__avatar--empty {
  background: linear-gradient(135deg, var(--color-brand-pale), var(--color-brand-light));
}

.ec-card__body {
  flex: 1;
  min-width: 0;
}

.ec-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.ec-card__name {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.2;
}
.ec-card__status {
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1.5px solid;
  white-space: nowrap;
  line-height: 1.6;
}

.ec-card__catch {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0 0 10px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ec-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px 0 7px;
  border-radius: var(--radius-full);
  background: var(--color-brand-bg);
  border: 1px solid var(--color-brand-border);
}
.ec-badge img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.ec-badge__label {
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--color-brand-primary);
  white-space: nowrap;
}

@media (max-width: 480px) { /* bp-phone-sm */
  .ec-card { gap: 12px; padding: 12px 14px; }
  .ec-card__avatar { width: 60px; height: 60px; }
  .ec-card__name { font-size: var(--text-base); }
}

/* 実績カード（pickup-card）モーダル起動型 */
.work-embed-trigger {
  cursor: pointer;
  user-select: none;
}
.work-embed-trigger:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}


/* =====================================================
   12. 記事ページ：sub-Pre の余白
===================================================== */

@media (max-width: 520px) { /* bp-phone */
  .news-main,
  .page-container,
  .layout-wrapper {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
  .detail-thumb,
  .zoom-image,
  #article-images img {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* ── 限定記事（2026-07 追加） ─────────────────────────── */
.badge.lock {
  background: var(--color-night-deep, #3a1c0e);
  color: var(--color-warm-gold-soft, #ffcf9a);
}

.detail-paywall {
  text-align: center;
  border: 1.5px dashed var(--color-brand-border, rgba(232, 93, 26, .18));
  border-radius: var(--radius-lg, 16px);
  background: var(--color-brand-bg, rgba(232, 93, 26, .06));
  padding: var(--space-10, 40px) var(--space-6, 24px);
  margin-top: var(--space-6, 24px);
}
.detail-paywall__icon { font-size: 2.2rem; margin: 0 0 8px; }
.detail-paywall__lead { font-weight: 700; margin: 0 0 20px; }
.detail-paywall__btn {
  display: inline-block;
  background: var(--color-brand-primary, #e85d1a); color: #fff;
  border: none; border-radius: var(--radius-full, 999px);
  padding: 10px 26px; font-size: var(--text-sm, 13px); font-weight: 700;
  font-family: inherit; cursor: pointer; text-decoration: none;
  margin: 0 6px 8px;
}
.detail-paywall__btn:hover { background: var(--color-brand-deep, #d2440f); }
.detail-paywall__btn--ghost {
  background: none; color: var(--color-text-secondary, #555);
  border: 1.5px solid #ccc;
}
