/* ============================================================ 
   0. 変数定義 (Design Tokens)
============================================================ */
:root {
    /* Colors */
    --primary-color: #0074BF;
    --primary-light: #00BFFF;
    --text-main: #333;
    --text-sub: #555;
    --bg-light: #F8FAFC;
    --bg-grey: #F2F2F2;
    --white: #ffffff;

    /* Borders */
    --border-color: #E2E8F0;
    --border-soft: #E1E1E1;
    --border-strong: #AAB8C2;

    /* Typography & Layout */
    --font-main: "Noto Sans JP", sans-serif;
    --base-font-size: 14px;
    --container-width: 800px;
}

/* ============================================================ 
   1. ベース設定 & タイポグラフィ (Typography)
============================================================ */
body, .entry-content, .editor-styles-wrapper {
    font-family: var(--font-main);
}

/* 段落設定 */
:is(.entry-content, .editor-styles-wrapper) p {
    font-size: var(--base-font-size);
    line-height: 1.85;
    margin-bottom: 1rem;
}

/* 見出し共通設定 (h1〜h6) */
:is(.entry-content, .editor-styles-wrapper) :is(h1, h2, h3, h4, h5, h6) {
    color: var(--primary-color);
    font-weight: 500;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* 見出し個別設定 */
:is(.entry-content, .editor-styles-wrapper) h1 {
    font-size: 3rem;
    padding-bottom: 1.2rem;
    border-bottom: 3px solid var(--primary-color);
}

:is(.entry-content, .editor-styles-wrapper) h2 {
    font-size: 2.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid var(--border-soft);
    position: relative;
}

:is(.entry-content, .editor-styles-wrapper) h2::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 8rem; height: 3px;
    background-color: var(--primary-color);
}

:is(.entry-content, .editor-styles-wrapper) h3 { font-size: 1.8rem; padding: 1rem 0 2rem 0; margin: 0; border-bottom: none; }
:is(.entry-content, .editor-styles-wrapper) h4 { font-size: 1.5rem; color: #333; }
:is(.entry-content, .editor-styles-wrapper) :is(h5, h6) { font-size: 1.3rem; color: var(--text-sub); }

/* サブタイトル [my-subtitle] */
:is(.entry-content, .editor-styles-wrapper) :is(p, div).my-subtitle { 
    color: var(--primary-color); 
    font-size: 1.8rem; 
    line-height: 1.3; 
    display: block; 
    max-width: 840px; 
    margin: 0 auto 1rem auto; 
    padding: 1rem 0 0.5rem 0; 
}
.entry-content .my-subtitle { font-weight: bold; }
.editor-styles-wrapper .my-subtitle { font-weight: 500; }

/* ============================================================ 
   2. リスト・ボックス装飾 (List & Containers)
============================================================ */
/* リスト外枠共通 */
:is(.entry-content, .editor-styles-wrapper) :is(.my-list-clean, .my-list-check, .my-list-box),
.my-list-container {
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: var(--container-width);
}

/* リストアイテム共通 */
:is(.entry-content, .editor-styles-wrapper) :is(.my-list-clean, .my-list-check, .my-list-box) li {
    color: var(--text-main);
    font-size: var(--base-font-size);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}
:is(.entry-content, .editor-styles-wrapper) li:last-child { margin-bottom: 0; }

/* クリーン・チェックリストの特殊形式 */
:is(.entry-content, .editor-styles-wrapper) :is(.my-list-clean, .my-list-check) li {
    position: relative; 
    padding-left: 3.5rem; 
    list-style: none; 
}

/* ドット(•) */
:is(.entry-content, .editor-styles-wrapper) .my-list-clean li::before {
    content: "•"; color: var(--primary-color); position: absolute; left: 1rem; font-weight: bold;
}

/* チェックマーク(✓) */
:is(.entry-content, .editor-styles-wrapper) .my-list-check li::before {
    content: '✓'; 
    position: absolute; left: 0.75rem; top: 0; 
    transform: translateY(0.2rem);
    width: 2rem; height: 2rem;
    background-color: var(--primary-color); 
    color: var(--white); 
    border-radius: 50%;  
    display: flex; align-items: center; justify-content: center; 
    font-size: 14px;
}

/* ボックスリスト */
:is(.entry-content, .editor-styles-wrapper) .my-list-box { padding-left: 4rem; }
:is(.entry-content, .editor-styles-wrapper) .my-list-box li { padding-left: 1rem; }
:is(.entry-content, .editor-styles-wrapper) .my-list-box li::marker {
    color: var(--primary-color); font-weight: 800; font-size: 1.1rem;
}

/* 番号付き行スタイル [my-list-row] */
.my-list-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.my-list-row:last-child { margin-bottom: 0; }
.my-list-number {
    display: flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white); border-radius: 50%; font-weight: bold;
    flex-shrink: 0; align-self: flex-start; margin-top: 2px !important;
    font-size: 1.1rem !important;
}
.my-list-text { color: var(--text-main); font-size: var(--base-font-size); line-height: 1.6; margin: 0; }

/* カードデザイン [my-card] */
.my-card {
    background: var(--white); 
    border: 1px solid var(--border-color); 
    border-radius: 20px;  
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); 
    padding: 1rem;
    display: flex; flex-direction: column; align-items: center; 
}
.my-card img { display: block; max-width: 100%; height: auto; }
.my-card-body { width: 100%; max-width: 600px; color: var(--text-main); }
.my-card-title { font-weight: 800; color: var(--primary-color); font-size: 1.5rem; margin-bottom: 0.8rem; }
.my-card-text { font-size: 14px; line-height: 1.6; }

/* コンテンツボックス [my-content-box] */
.my-content-box { background-color: var(--bg-grey); padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px; }
.my-content-box p:last-child { margin-bottom: 0; }

/* ============================================================ 
   3. テーブル・プロフィール (Tables & Profile)
============================================================ */
/* 全テーブル共通ベーススタイル */
:is(.my-table-01, .my-table-02, .my-table-03, .table_design03) {
    border-collapse: collapse !important; 
    width: 100%; 
    max-width: var(--container-width);
    margin: 2rem auto; 
    font-size: var(--base-font-size); 
    line-height: 1.6;
    border: 2px solid var(--border-strong) !important;
}

:is(.my-table-01, .my-table-02, .my-table-03, .table_design03) :is(td, th) {
    padding: 1em; 
    border: 1px solid var(--white); 
    text-align: center;
}

/* テーブルの端の線調整 */
:is(.my-table-01, .my-table-02, .my-table-03, .table_design03) :is(th, td):first-child { border-left: none !important; }
:is(.my-table-01, .my-table-02, .my-table-03, .table_design03) :is(th, td):last-child { border-right: none !important; }
:is(.my-table-01, .my-table-02, .my-table-03, .table_design03) th { border-top: none !important; }
:is(.my-table-01, .my-table-02, .my-table-03, .table_design03) tr:last-child td { border-bottom: none !important; }

/* テーブル個別配色 */
.my-table-01 th { background-color: var(--primary-color) !important; color: var(--white) !important; font-weight: bold; }
.my-table-01 td { background-color: var(--bg-light); }
.my-table-02 th { background-color: #EDF4F9 !important; color: var(--primary-color) !important; font-weight: bold; }
.my-table-02 td { background-color: var(--white); }
.my-table-03 th, .table_design03 th { background-color: var(--white) !important; color: var(--primary-color) !important; font-weight: bold; }
.my-table-03 td, .table_design03 td { background-color: var(--white); }

/* ストライプ設定 */
:is(.my-table-01, .my-table-02, .my-table-03, .table_design03).is-striped tr:nth-child(even) td {
    background-color: #F2F7FA !important; 
}

/* プロフィールテーブル [my-table-profile] */
.my-table-profile {
    border: none !important;
    border-collapse: collapse !important;
    width: 100%;
    max-width: var(--container-width);
    margin: 2rem auto;
    font-size: var(--base-font-size);
}
.my-table-profile :is(th, td) {
    padding: 1rem;
    border: none !important;
    border-bottom: 2px solid #c1c7c6 !important;
    text-align: left;
}
.my-table-profile th {
    color: var(--primary-color);
    font-weight: bold;
    width: 30%;
    min-width: 120px;
    border-bottom: 2px solid #4d9bc1 !important;
}

/* プロフィール形式カラム [my-profile-row] */
:is(.entry-content, .editor-styles-wrapper) .my-profile-row { margin-bottom: 0; }
:is(.entry-content, .editor-styles-wrapper) .my-profile-row .wp-block-column {
    padding: 1rem 0;
    margin: 0;
    border-bottom: 2px solid #c1c7c6;
}
:is(.entry-content, .editor-styles-wrapper) .my-profile-row .wp-block-column:first-child {
    border-bottom-color: #4d9bc1;
    font-weight: bold;
    color: var(--primary-color);
    width: 30%;
}
:is(.entry-content, .editor-styles-wrapper) .my-profile-row .wp-block-column:last-child { 
    border-bottom-color: #c1c7c6; 
    color: var(--text-main); 
}
:is(.entry-content, .editor-styles-wrapper) .my-profile-row .wp-block-column p { 
    margin-bottom: 0; 
    line-height: 1.4; 
}

/* ============================================================ 
   4. 小さな装飾パーツ (UI Accents)
============================================================ */

/* マーカー [marker] */
:is(.entry-content, .editor-styles-wrapper) .marker {
    background: linear-gradient(transparent 65%, rgba(0, 116, 191, 0.2) 65%);
    padding: 0 .1em;
    border-radius: 2px;
}

/* ============================================================ 
   5. WordPress 特有設定 & ボタン (WP System)
============================================================ */
/* タイトル (WPエディタ上書き用) */
.editor-post-title__input, 
.wp-block-post-title {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    padding: 1rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 800 !important;
    font-size: 2.4rem !important;
}

/* テキスト配置ユーティリティ */
.has-text-align-center { text-align: center !important; }
.has-text-align-right  { text-align: right !important; }
.has-text-align-left   { text-align: left !important; }

/* ボタン共通スタイル */
:is(.entry-content, .editor-styles-wrapper) .wp-block-button {
    margin: 0.5rem 0 1.5rem 0 !important;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-button__link {
    background-color: var(--primary-color);
    color: var(--white);
    font-family: var(--font-main);
    font-weight: 700;
    font-size: var(--base-font-size);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    border: none;
}

/* ボタンホバー & アウトライン */
:is(.entry-content, .editor-styles-wrapper) .wp-block-button__link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    opacity: 1;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.4rem 1.4rem;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* ホバーアニメーション [my-btn-hover] */
:is(.entry-content, .editor-styles-wrapper) .my-btn-hover .wp-block-button__link {
    transition: opacity 0.3s ease, transform 0.2s ease;
}
:is(.entry-content, .editor-styles-wrapper) .my-btn-hover .wp-block-button__link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    color: var(--white);
}

/* エディタ用スペーサー */
.editor-styles-wrapper .wp-block-spacer {
    background-color: rgba(0, 116, 191, 0.05); border: 1px dashed #ccc; position: relative;
}
.editor-styles-wrapper .wp-block-spacer::after {
    content: "Spacer (Official)"; position: absolute; left: 10px; top: 2px; font-size: 10px; color: #aaa;
}

/* レイアウト調整 */
.my-list-box.is-layout-flex, .wp-block-group.is-layout-flex { gap: 1em !important; }