/* ============================================
   article.css - 記事詳細ページ専用スタイル
   デスクトップファースト設計
   ============================================
   
   目次 (Table of Contents)
   --------------------------------------------
   00. CSS変数定義（記事ページ専用）
   01. ベース設定
   02. ヒーローセクション
   03. 記事コンテナ
   04. 記事メタ情報
   05. 記事コンテンツ（見出し・段落・リスト等）
   06. 画像・ギャラリー
   07. 目次スタイル
   08. 関連記事・管理者エリア
   09. キャンペーンバナー
   99. メディアクエリ
   
   ============================================ */


/* ============================================
   00. CSS変数定義（記事ページ専用）
   ============================================ */

:root {
    /* 記事ページ専用カラー */
    --article-link: #0d6efd;
    --article-link-hover: #0a58ca;
    --article-text: #212529;
    --article-text-secondary: #6c757d;
    --article-text-muted: #868e96;
    --article-bg-light: #f8f9fa;
    --article-border: #dee2e6;
    
    /* キャンペーンカラー */
    --campaign-primary: #ff6b35;
    --campaign-secondary: #f7931e;
    --campaign-accent: #ffd93d;
}


/* ============================================
   01. ベース設定
   ============================================ */

body {
    font-family: "YuMincho", "Yu Mincho", "ヒラギノ明朝 ProN", "Hiragino Mincho ProN", serif !important;
}


/* ========================================
   ヒーローセクション（デスクトップ基準）
   ======================================== */

.inner-hero {
    height: 50vh;
}

.inner-hero .hero-overlay {
    background: rgba(0, 0, 0, 0);
}


/* ========================================
   記事コンテナ基本設定（デスクトップ基準）
   ======================================== */

.article-1st,
.preview-body {
    margin-top: 2vh;
    line-height: 1.8;
    word-break: break-word;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.article-container {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.article-container:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


/* ========================================
   記事メタ情報（デスクトップ基準）
   ======================================== */

.article-meta {
    padding: 1rem 0 0 0;
    margin-bottom: 0rem;
    color: var(--article-text-secondary);
    font-size: 0.875rem;
}

.article-divider {
    margin: 0 0 1.5rem 0;
}

.article-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    /* color は JS で設定される色クラスで制御 */
}

.article-icon i {
    font-size: 2rem;
    line-height: 1;
}


/* ========================================
   記事本文（デスクトップ基準）
   ======================================== */

.article-content {
    font-size: 1rem;
    line-height: 2;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
}


/* 見出しスタイル（デスクトップ基準）
   h2: セクション見出し（中央揃え・下線装飾）
   h3: Q&A/補足見出し（左揃え・左線装飾）
   ======================================== */

.article-content h1,
.article-1st h1,
.preview-body h1 {
    font-size: 1.625rem;
    font-weight: 700;
    margin: 2.5rem 0 1.25rem;
    padding: 0;
    border: none;
    color: #333;
    letter-spacing: 0.02em;
    text-align: center;
}

/* h2: セクション見出し - 中央揃え・下線 */
.article-content h2,
.article-1st h2,
.preview-body h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    padding: 0 0 0.625rem 0;
    border: none;
    border-bottom: 2px solid #ccc;
    color: #333;
    letter-spacing: 0.02em;
    text-align: center;
}

/* h3: Q&A/補足見出し - 左揃え・左線 */
.article-content h3,
.article-1st h3,
.preview-body h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 2.25rem 0 0.875rem;
    padding: 0.375rem 0 0.375rem 0.875rem;
    border: none;
    border-left: 3px solid #4a90a4;
    color: #333;
    letter-spacing: 0.01em;
    text-align: left;
    background-color: transparent;
}

.article-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 2rem 0 0.625rem;
    color: #555;
    text-align: left;
}


/* 最初の見出しの上マージンを削除 */

.article-content>h1:first-child,
.article-content>h2:first-child,
.article-content>h3:first-child,
.article-content>h4:first-child {
    margin-top: 0;
}


/* 段落とテキスト（デスクトップ基準）- note風 */

.article-1st p,
.preview-body p,
.article-content p {
    margin: 0 0 1.75em 0;
    text-align: left;
    line-height: 1.9;
}

.article-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2vh 0;
}


/* リスト（デスクトップ基準）- note風 */

.article-1st ul,
.article-1st ol,
.preview-body ul,
.preview-body ol,
.article-content ul,
.article-content ol {
    margin: 0 0 1.75em 0;
    padding-left: 1.5rem;
    list-style-position: outside;
}

.article-content li {
    margin-bottom: 0.625rem;
    line-height: 2;
}


/* ========================================
   画像関連（デスクトップ基準）- note風
   ======================================== */

.article-1st img,
.preview-body img,
.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.75rem 0;
    border-radius: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-content img.loaded {
    opacity: 1;
}


/* 画像配置クラス */

.img-left {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
    max-width: 40%;
    border-radius: 0.5rem;
}

.img-right {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
    max-width: 40%;
    border-radius: 0.5rem;
}

.img-left-container,
.img-right-container {
    margin-bottom: 1rem;
}

.article-image-full {
    margin: 2rem 0;
    text-align: center;
}

.article-image-full img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-image-left {
    margin: 1.5rem 0;
}

.article-image-left img {
    float: left;
    max-width: 50%;
    height: auto;
    margin: 0 1.5rem 1rem 0;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.article-image-right {
    margin: 1.5rem 0;
}

.article-image-right img {
    float: right;
    max-width: 50%;
    height: auto;
    margin: 0 0 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}


/* ========================================
   その他の要素（デスクトップ基準）
   ======================================== */

.article-1st figure,
.preview-body figure,
.article-content figure {
    margin: 1.5rem 0;
}

.article-1st figcaption,
.preview-body figcaption,
.article-content figcaption {
    font-size: 0.9rem;
    color: var(--article-text-secondary);
    text-align: center;
    margin-top: 0.5rem;
}

.article-1st blockquote,
.preview-body blockquote,
.article-content blockquote {
    border-left: 4px solid rgba(13, 110, 253, 1);
    padding: 0.5rem 1rem;
    margin: 0 0 1.5rem;
    background: rgba(248, 249, 250, 1);
}

.article-content a {
    color: rgba(13, 110, 253, 1);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: rgba(10, 88, 202, 1);
    border-bottom-color: rgba(10, 88, 202, 1);
}

.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid rgba(222, 226, 230, 1);
}

.article-content th {
    background: rgba(248, 249, 250, 1);
    font-weight: 600;
    text-align: left;
}

.article-content pre {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(248, 249, 250, 1);
    border-radius: 4px;
    overflow-x: auto;
}

.article-content code {
    font-family: Monaco, Consolas, monospace;
    font-size: 0.875rem;
    padding: 0.125rem 0.25rem;
    background: rgba(248, 249, 250, 1);
    border-radius: 3px;
}


/* ========================================
   YouTubeブロック（デスクトップ基準）
   ======================================== */

/* ==== 目次スタイル ==== */

.article-toc {
    margin: 0 0 2.5rem 0;
    text-align: left;
}

.article-toc .toc-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1.5rem 0;
    padding: 0 0 0.625rem 0;
    border: none;
    border-bottom: 2px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
}

.article-toc .toc-title i {
    color: var(--article-text-secondary);
    font-size: 0.95rem;
}

.article-toc ul.toc-list,
.article-toc ol.toc-list,
.article-toc .toc-list {
    list-style: none !important;
    margin: 0;
    padding: 0 0 0 2rem;
    text-align: left;
}

.article-toc .toc-list li,
.article-toc .toc-item {
    list-style: none !important;
    margin: 0 0 0.5rem 0;
    padding: 0;
    line-height: 1.6;
    text-align: left;
}

/* H3レベル（Q&A）のインデント */
.article-toc .toc-level-3 {
    margin-left: 1rem;
    margin-bottom: 0.35rem;
}

.article-toc .toc-link {
    display: inline;
    padding: 0;
    color: var(--article-link);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    transition: color 0.2s ease;
}

.article-toc .toc-link:hover {
    color: var(--article-link-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-toc .toc-number {
    font-weight: 600;
    color: var(--article-link);
    margin-right: 0.25rem;
}

.article-toc .toc-text {
    /* インライン表示 */
}

/* H3以下のインデント表示（Q&A等） */
.article-toc .toc-level-3 .toc-link {
    font-size: 0.85rem;
    color: var(--article-text-muted);
    padding-left: 0;
}

.article-toc .toc-level-3 .toc-link:hover {
    color: #666;
}

.article-toc .toc-level-4 .toc-link {
    font-size: 0.8rem;
    color: var(--article-text-muted);
    padding-left: 0;
}

/* ==== アクセシビリティ ==== */

.article-content:focus {
    outline: 2px solid var(--article-link);
    outline-offset: 4px;
}

.article-content img:focus {
    outline: 3px solid var(--article-link);
    outline-offset: 2px;
}

.article-youtube {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-youtube .ratio {
    background-color: #000;
}

.article-youtube iframe {
    width: 100%;
    height: 100%;
}


/* ========================================
   リンクブロック（デスクトップ基準）
   ======================================== */

.article-link {
    margin: 2rem 0;
}

.link-card {
    display: block;
    padding: 1.5rem;
    background: var(--article-bg-light);
    border: 1px solid var(--article-border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-card:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.link-card-content {
    color: #333;
}

.link-card-title {
    color: var(--article-link);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.link-card-text {
    color: var(--article-text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.link-card-url {
    color: var(--article-text-secondary);
    font-size: 0.8rem;
    word-break: break-all;
}


/* ========================================
   その他のコンポーネント（デスクトップ基準）
   ======================================== */

#article-updated {
    color: var(--article-text-secondary);
    font-size: 0.9rem;
}

.image-preview {
    max-width: 100%;
    max-height: 150px;
    margin-top: 10px;
    display: none;
}

.btn-grab {
    cursor: grab;
}

.btn-remove {
    color: rgba(220, 53, 69, 1);
}

.related-articles {
    margin-top: 2.5rem;
    padding: 2rem 0;
}

.related-articles h4 {
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.related-articles h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--campaign-primary), var(--campaign-secondary));
    border-radius: 1px;
}

/* 関連記事グリッド */
#related-articles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* 関連記事カード */
.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.related-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-card__link:hover {
    text-decoration: none;
    color: inherit;
}

/* サムネイル */
.related-card__thumb {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 アスペクト比 */
    overflow: hidden;
    background: #f0f0f0;
}

.related-card__thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: auto;
    object-fit: cover;
    transition: transform 0.4s ease;
    opacity: 1 !important; 
}

.related-card:hover .related-card__thumb img {
    transform: scale(1.05);
}

/* グラデーション背景（サムネイルがない場合） */
.related-card__thumb--gradient {
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card__thumb--gradient i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* コンテンツエリア */
.related-card__content {
    padding: 1rem 1.25rem 1.25rem;
}

.related-card__category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--campaign-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.related-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.related-card:hover .related-card__title {
    color: var(--campaign-primary);
}

.related-card__excerpt {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.6;
    margin: 0 !important;
    padding: 0;
    text-align: left !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   キャンペーン誘導バナー（リデザイン版）
   ======================================== */

/* バナーコンテナ */
.campaign-banner {
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff8f3 0%, #fff 50%, #fffbf7 100%);
    box-shadow: 
        0 4px 24px rgba(255, 107, 53, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}



/* リンク全体 */
.campaign-banner__link {
    display: block;
    padding: 2.5rem 3rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
}

.campaign-banner__link:hover {
    text-decoration: none;
    color: inherit;
}

/* 装飾要素（そろばん珠モチーフ） */
.campaign-banner__deco {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    transition: all 0.6s ease;
    pointer-events: none;
}

.campaign-banner__deco--1 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--campaign-primary) 0%, #ff8f65 100%);
    top: -40px;
    right: -20px;
    opacity: 0.15;
}

.campaign-banner__deco--2 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--campaign-accent) 0%, #ffe066 100%);
    bottom: -30px;
    left: 10%;
    opacity: 0.2;
}

.campaign-banner__deco--3 {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--campaign-primary) 0%, #ff8f65 100%);
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    opacity: 0.1;
}

.campaign-banner:hover .campaign-banner__deco--1 {
    transform: scale(1.2) rotate(10deg);
    opacity: 0.2;
}

.campaign-banner:hover .campaign-banner__deco--2 {
    transform: scale(1.15) rotate(-5deg);
    opacity: 0.25;
}

.campaign-banner:hover .campaign-banner__deco--3 {
    transform: translateY(-50%) scale(1.3);
    opacity: 0.15;
}

/* コンテンツエリア */
.campaign-banner__content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* キャッチコピー部分 */
.campaign-banner__catch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.campaign-banner__badge {
    display: inline-block;
    padding: 4px 14px;
    background: linear-gradient(135deg, var(--campaign-primary) 0%, #e85a2a 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 100px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.campaign-banner__sub {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* メインメッセージ（W特典） */
.campaign-banner__main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.campaign-banner__highlight {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--campaign-primary);
    font-family: "Helvetica Neue", Arial, sans-serif;
    text-shadow: 2px 2px 0 rgba(255, 107, 53, 0.1);
    transition: transform 0.3s ease;
}

.campaign-banner:hover .campaign-banner__highlight {
    transform: scale(1.05);
}

.campaign-banner__free {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--campaign-primary);
    position: relative;
    padding-bottom: 4px;
}

.campaign-banner__free::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--campaign-primary) 0%, var(--campaign-accent) 100%);
    border-radius: 2px;
}

/* 特典詳細（2カラム） */
.campaign-banner__benefits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.campaign-banner__benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.campaign-banner__benefit-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.campaign-banner__benefit-text {
    font-size: 1.125rem;
    color: #333;
    font-weight: 700;
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
    padding: 6px 16px;
    border-radius: 8px;
    border: 2px solid var(--campaign-primary);
    white-space: nowrap;
}

.campaign-banner__benefit-divider {
    font-size: 1.25rem;
    color: var(--campaign-primary);
    font-weight: 700;
}

.sp-only {
    display: none;
}

/* CTAボタン */
.campaign-banner__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--campaign-primary) 0%, #e85a2a 100%);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 100px;
    box-shadow: 
        0 4px 16px rgba(255, 107, 53, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.campaign-banner:hover .campaign-banner__cta {
    background: linear-gradient(135deg, #e85a2a 0%, #d14a1a 100%);
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.campaign-banner__cta-text {
    letter-spacing: 0.05em;
}

.campaign-banner__arrow {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.campaign-banner:hover .campaign-banner__arrow {
    transform: translateX(4px);
}


/* フォーカス状態 */

.article-content:focus {
    outline: 2px solid rgba(13, 110, 253, 1);
    outline-offset: 4px;
}

.article-content img:focus {
    outline: 3px solid rgba(13, 110, 253, 1);
    outline-offset: 2px;
}


/* クリアフィックス */

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}


/* エディタ関連（デスクトップ基準） */

.ProseMirror {
    min-height: 400px;
    padding: 1rem;
    border: 1px solid rgba(206, 212, 218, 1);
    border-radius: 0.25rem;
    outline: none;
    line-height: 1.8;
    background: rgba(255, 255, 255, 1);
}

.ProseMirror p {
    margin: 0 0 1.25rem;
}

.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3 {
    margin: 2rem 0 1rem;
    font-weight: 700;
}

.ProseMirror ul,
.ProseMirror ol {
    margin: 0 0 1.25rem 1.25rem;
}

.ProseMirror img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.ProseMirror figure {
    margin: 1.5rem 0;
}

.ProseMirror figcaption {
    font-size: 0.9rem;
    color: var(--article-text-secondary);
    text-align: center;
    margin-top: 0.5rem;
}

.ProseMirror blockquote {
    border-left: 4px solid rgba(13, 110, 253, 1);
    padding: 0.5rem 1rem;
    margin: 0 0 1.5rem;
    background: rgba(248, 249, 250, 1);
}

.ProseMirror-selectednode {
    outline: 2px solid rgba(13, 110, 253, 1);
    outline-offset: 2px;
}


/* ========================================
   タブレット対応（1024px以下）
   ======================================== */

@media (max-width: 1024px) {
    .inner-hero {
        height: 45vh;
    }
    .article-content {
        width: 90%;
        padding-left: 5%;
    }
    .article-content h1 {
        font-size: 1.875rem;
        margin: 2.5rem 0 1.25rem;
    }
    .article-content h2 {
        font-size: 1.625rem;
        margin: 2.25rem 0 1.125rem;
    }
    .article-content h3 {
        font-size: 1.375rem;
        margin: 1.875rem 0 0.875rem;
    }
    .article-content h4 {
        font-size: 1.125rem;
        margin: 1.375rem 0 0.625rem;
    }
    .article-1st p,
    .preview-body p,
    .article-content p {
        margin: 0 0 1.125rem 1.5rem;
    }
    .article-content img.loaded {
        margin-left: 1.5rem;
    }
    .img-left,
    .img-right {
        max-width: 45%;
    }
    .article-image-left img,
    .article-image-right img {
        max-width: 45%;
    }
}


/* ========================================
   タブレット対応（1024px以下）
   ======================================== */

@media (max-width: 1024px) {
    #related-articles-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .related-card__content {
        padding: 0.875rem 1rem;
    }
    .related-card__title {
        font-size: 0.9rem;
    }
    .related-card__excerpt {
        -webkit-line-clamp: 1;
    }
}

/* ========================================
   小型タブレット対応（768px以下）
   ======================================== */

@media (max-width: 768px) {
    .inner-hero {
        height: 40vh;
    }
    .article-content {
        font-size: 1rem;
        width: 100%;
        max-width: none;
        padding: 0 1rem;
    }
    .article-content h1 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem;
    }
    .article-content h2 {
        font-size: 1.25rem;
        margin: 2.5rem 0 1.25rem;
        padding: 0 0 0.5rem 0;
        border-bottom: 2px solid #ccc;
        text-align: center;
    }
    .article-content h3 {
        font-size: 1.0625rem;
        margin: 1.75rem 0 0.75rem;
        padding: 0.25rem 0 0.25rem 0.75rem;
        border-left: 3px solid #4a90a4;
        text-align: left;
    }
    .article-content h4 {
        font-size: 1rem;
        margin: 1.5rem 0 0.5rem;
    }
    .article-1st p,
    .preview-body p,
    .article-content p {
        margin: 0 0 1.5em 0;
    }
    .article-content img.loaded {
        margin-left: 0;
    }
    /* 画像を中央配置に変更 */
    .img-left,
    .img-right,
    .article-image-left img,
    .article-image-right img {
        float: none;
        margin: 1rem auto;
        max-width: 100%;
        display: block;
    }
    .article-content table {
        font-size: 0.875rem;
    }
    .article-content th,
    .article-content td {
        padding: 0.5rem;
    }
    .link-card {
        padding: 1.25rem;
    }
    .link-card-title {
        font-size: 1rem;
    }
    .link-card-text {
        font-size: 0.875rem;
    }
    .ProseMirror {
        min-height: 350px;
        font-size: 0.9375rem;
    }
    /* キャンペーンバナー（タブレット） */
    .campaign-banner {
        margin: 2.5rem 0;
        border-radius: 12px;
    }
    .campaign-banner__link {
        padding: 2rem;
    }
    .campaign-banner__highlight {
        font-size: 3.5rem;
    }
    .campaign-banner__free {
        font-size: 2.75rem;
    }
    .campaign-banner__benefits {
        gap: 1rem;
    }
    .campaign-banner__benefit-text {
        font-size: 1rem;
        padding: 5px 12px;
    }
    .campaign-banner__deco--1 {
        width: 100px;
        height: 100px;
    }
    .campaign-banner__deco--2 {
        width: 60px;
        height: 60px;
    }
    .campaign-banner__deco--3 {
        display: none;
    }
}


/* ========================================
   モバイル対応（576px以下）
   ======================================== */

@media (max-width: 576px) {
    .inner-hero {
        height: 35vh;
        min-height: 250px;
    }
    .article-1st,
    .preview-body {
        margin-top: 1.5rem;
    }
    .article-container {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    .article-meta {
        font-size: 0.75rem;
        padding: 0.5rem 0 0 0;
    }
    .article-divider {
        margin: 0.5rem 0 1rem 0;
    }
    .article-icon {
        width: 28px;
        height: 28px;
    }
    .article-content {
        font-size: 1rem;
        width: 100%;
        padding: 0 0.75rem;
        line-height: 1.9;
    }
    .article-content h1 {
        font-size: 1.375rem;
        margin: 1.75rem 0 0.875rem;
        padding: 0;
        border: none;
    }
    .article-content h2 {
        font-size: 1.125rem;
        margin: 2rem 0 1rem;
        padding: 0 0 0.5rem 0;
        border: none;
        border-bottom: 2px solid #ccc;
        text-align: center;
    }
    .article-content h3 {
        font-size: 1rem;
        margin: 1.5rem 0 0.625rem;
        padding: 0.25rem 0 0.25rem 0.625rem;
        border: none;
        border-left: 3px solid #4a90a4;
        text-align: left;
    }
    .article-content h4 {
        font-size: 0.9375rem;
        margin: 1.25rem 0 0.5rem;
    }
    .article-1st p,
    .preview-body p,
    .article-content p {
        margin: 0 0 1.5em 0;
        text-align: left;
        line-height: 1.9;
        font-size: 1rem;
    }
    .article-text p {
        text-align: left;
    }
    .article-1st ul,
    .article-1st ol,
    .preview-body ul,
    .preview-body ol,
    .article-content ul,
    .article-content ol {
        margin: 0 0 1.5em 0;
        padding-left: 1.25rem;
    }
    .article-content li {
        margin-bottom: 0.5rem;
        line-height: 1.9;
    }
    /* 画像 */
    .article-1st img,
    .preview-body img,
    .article-content img {
        margin: 1.5rem 0;
        border-radius: 0;
    }
    .article-content img.loaded {
        margin-left: 0;
    }
    .img-left,
    .img-right,
    .article-image-left img,
    .article-image-right img {
        float: none;
        margin: 0.75rem auto;
        max-width: 100%;
        display: block;
    }
    .article-image-full {
        margin: 1.25rem 0;
    }
    .article-image-full img {
        border-radius: 0.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    /* その他の要素 */
    .article-1st blockquote,
    .preview-body blockquote,
    .article-content blockquote {
        padding: 0.5rem 0.75rem;
        margin: 0 0 1rem;
        font-size: 0.875rem;
    }
    .article-content table {
        font-size: 0.75rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .article-content th,
    .article-content td {
        padding: 0.375rem 0.5rem;
        white-space: nowrap;
    }
    .article-content pre {
        margin: 1rem 0;
        padding: 0.75rem;
        font-size: 0.75rem;
    }
    .article-content code {
        font-size: 0.8125rem;
    }
    /* YouTube・リンクカード */
    .article-youtube {
        margin: 1.25rem 0;
        border-radius: 0.5rem;
    }
    .article-link {
        margin: 1.25rem 0;
    }
    .link-card {
        padding: 1rem;
        border-radius: 0.5rem;
    }
    .link-card-title {
        font-size: 0.9375rem;
        margin-bottom: 0.25rem;
    }
    .link-card-text {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }
    .link-card-url {
        font-size: 0.6875rem;
    }
    /* その他 */
    #article-updated {
        font-size: 0.75rem;
    }
    /* 関連記事（モバイル） */
    .related-articles {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
    .related-articles h4 {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    #related-articles-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .related-card {
        display: flex;
        flex-direction: row;
        border-radius: 10px;
    }
    .related-card__thumb {
        flex-shrink: 0;
        width: 100px;
        height: auto;
        padding-bottom: 0;
        aspect-ratio: 1;
        border-radius: 10px 0 0 10px;
    }
    .related-card__thumb--gradient i {
        font-size: 1.5rem;
    }
    .related-card__content {
        flex: 1;
        padding: 0.875rem 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .related-card__category {
        font-size: 0.65rem;
        margin-bottom: 0.25rem;
    }
    .related-card__title {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
        -webkit-line-clamp: 2;
    }
    .related-card__excerpt {
        display: none;
    }
    /* キャンペーンバナー（モバイル） */
    .campaign-banner {
        margin: 2rem 0;
        border-radius: 10px;
    }
    .campaign-banner__link {
        padding: 1.75rem 1.5rem;
    }
    .campaign-banner__catch {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 0.75rem;
    }
    .campaign-banner__badge {
        font-size: 0.6875rem;
        padding: 3px 12px;
    }
    .campaign-banner__sub {
        font-size: 0.875rem;
    }
    .campaign-banner__main {
        margin-bottom: 1.25rem;
        gap: 6px;
    }
    .campaign-banner__highlight {
        font-size: 3rem;
    }
    .campaign-banner__free {
        font-size: 2.25rem;
    }
    .campaign-banner__free::after {
        height: 3px;
    }
    .campaign-banner__benefits {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    .campaign-banner__benefit {
        flex-direction: row;
        gap: 8px;
    }
    .campaign-banner__benefit-label {
        font-size: 0.6875rem;
        min-width: 45px;
    }
    .campaign-banner__benefit-text {
        font-size: 0.9375rem;
        padding: 4px 12px;
    }
    .campaign-banner__benefit-divider {
        display: none;
    }
    .sp-only {
        display: inline;
    }
    .campaign-banner__cta {
        padding: 10px 24px;
        font-size: 0.875rem;
    }
    .campaign-banner__deco--1 {
        width: 80px;
        height: 80px;
        top: -30px;
        right: -15px;
    }
    .campaign-banner__deco--2 {
        width: 50px;
        height: 50px;
        bottom: -20px;
        left: 5%;
    }
    .campaign-banner__deco--3 {
        display: none;
    }
    .image-preview {
        max-height: 100px;
    }
    /* エディタ */
    .ProseMirror {
        min-height: 300px;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    .ProseMirror p {
        margin: 0 0 0.875rem;
    }
    .ProseMirror h1,
    .ProseMirror h2,
    .ProseMirror h3 {
        margin: 1.5rem 0 0.75rem;
    }
    .ProseMirror ul,
    .ProseMirror ol {
        margin: 0 0 0.875rem 1rem;
    }
    .ProseMirror img {
        margin: 1rem 0;
    }
}


/* ========================================
   小型モバイル対応（400px以下）
   ======================================== */

@media (max-width: 400px) {
    .article-content {
        font-size: 0.875rem;
        padding: 0 0.75rem;
    }
    .article-content h1 {
        font-size: 1.375rem;
    }
    .article-content h2 {
        font-size: 1.125rem;
    }
    .article-content h3 {
        font-size: 1rem;
    }
    .article-content h4 {
        font-size: 0.9375rem;
    }
    .article-content table {
        font-size: 0.6875rem;
    }
    .link-card {
        padding: 0.875rem;
    }
    .link-card-title {
        font-size: 0.875rem;
    }
    .link-card-text {
        font-size: 0.75rem;
    }
}


/* ========================================
   印刷対応
   ======================================== */

@media print {
    .article-content {
        font-size: 11pt;
        line-height: 1.6;
        width: 100% !important;
        padding: 0 !important;
    }
    .article-1st p,
    .preview-body p,
    .article-content p {
        margin: 0 0 1rem 0 !important;
    }
    .article-content img {
        margin-left: 0 !important;
    }
    .article-image-full img,
    .article-image-left img,
    .article-image-right img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    .article-content h1,
    .article-content h2,
    .article-content h3,
    .article-content h4 {
        page-break-after: avoid;
    }
    .inner-hero,
    .related-articles,
    .campaign-banner {
        display: none !important;
    }
}
/* ============================================
   テキスト装飾クラス（記事本文用）
   ============================================ */

/* 色指定クラス */
.text-red {
    color: #dc3545 !important;
}

.text-blue {
    color: #0d6efd !important;
}

.text-green {
    color: #198754 !important;
}

.text-yellow {
    color: #ffc107 !important;
}

.text-orange {
    color: #fd7e14 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

.text-pink {
    color: #d63384 !important;
}

.text-gray {
    color: #6c757d !important;
}

/* 背景色クラス */
.bg-light {
    background-color: #f8f9fa !important;
}

.bg-dark {
    background-color: #212529 !important;
    color: #fff;
}

.bg-white {
    background-color: #fff !important;
}

/* フォントウェイトクラス */
.fw-bold {
    font-weight: 700 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

.fw-light {
    font-weight: 300 !important;
}

/* 取り消し線（伏字）スタイル */
.article-content strike,
.article-content s,
.article-content del {
    text-decoration: line-through;
    color: inherit;
}
/* ============================================
   テキスト装飾クラス（記事本文用）
   ============================================ */

/* 色指定クラス */
.text-red {
    color: #dc3545 !important;
}

.text-blue {
    color: #0d6efd !important;
}

.text-green {
    color: #198754 !important;
}

.text-yellow {
    color: #ffc107 !important;
}

.text-orange {
    color: #fd7e14 !important;
}

.text-purple {
    color: #6f42c1 !important;
}

.text-pink {
    color: #d63384 !important;
}

.text-gray {
    color: #6c757d !important;
}

/* 背景色クラス */
.bg-light {
    background-color: #f8f9fa !important;
}

.bg-dark {
    background-color: #212529 !important;
    color: #fff;
}

.bg-white {
    background-color: #fff !important;
}

/* フォントウェイトクラス */
.fw-bold {
    font-weight: 700 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

.fw-light {
    font-weight: 300 !important;
}

/* 取り消し線（伏字）スタイル */
.article-content strike,
.article-content s,
.article-content del {
    text-decoration: line-through;
    color: inherit;
}

/* ============================================
   記事ページ タイプライター・フェードインアニメーション
   ============================================ */

/* カーソル点滅アニメーション（白） */
@keyframes blink-caret-white {
    from, to { border-color: transparent; }
    50% { border-color: rgba(255, 255, 255, 0.9); }
}

/* フェードインアニメーション */
@keyframes articleFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTAボタン用フェードイン（スケール付き） */
@keyframes ctaFadeInScale {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ヒーローセクションのタイトル（タイプライター用） */
.inner-hero #hero-title {
    opacity: 1;
    min-height: 1.5em; /* 空でも高さを確保 */
}

.inner-hero #hero-title.typing {
    opacity: 1;
}

.inner-hero #hero-title.completed {
    opacity: 1;
}

/* ヒーローセクションの概要（フェードイン用） */
.inner-hero #hero-excerpt {
    opacity: 0;
    transform: translateY(8px);
    transition: none; /* JSでクラス追加時にアニメーション */
}

.inner-hero #hero-excerpt.fade-in {
    animation: articleFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* CTAボタン（フェードイン用） */
.inner-hero .trial-btn {
    opacity: 0;
    transform: translateY(10px);
    transition: none;
}

.inner-hero .trial-btn.fade-in {
    animation: ctaFadeInScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* アクセシビリティ: 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    .inner-hero #hero-title,
    .inner-hero #hero-excerpt,
    .inner-hero .trial-btn {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
    
    .inner-hero #hero-excerpt.fade-in,
    .inner-hero .trial-btn.fade-in {
        animation: none !important;
        opacity: 1 !important;
    }
}