/* --- 共通変数・基本設定 --- */
:root {
    --accent: #7030A0;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f1f5f9;
    color: #334155;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100vw;
}

.text-accent { color: var(--accent); }
.bg-accent { background-color: var(--accent); }

/* コンテンツ幅の中央寄せ */
.content-width {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* ヒーローグラデーション */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #2e1065 100%);
}

/* 記事カード（index/contentsで使用） */
.article-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(0,0,0,0.1);
}

/* --- PHP出力パーツの画像巨大化・改行問題の修正 --- */
.php-content-list ul, .sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 特定のアイコン画像のみサイズを制限 */
.php-content-list img[src*="category"], .sidebar-widget img[src*="category"],
.php-content-list img[src*="calendar"], .sidebar-widget img[src*="owner-theme"],
.php-content-list img[src*="view"], .sidebar-widget img[src*="link-theme"],
.php-content-list img[src*="hot-entry"], .php-content-list img[src*="iine_color"],
.sidebar-widget img[src*="iine_color"] {
    display: inline-block !important;
    height: 1rem !important;
    width: auto !important;
    vertical-align: middle !important;
    margin-right: 0.3rem !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

/* --- サイドバーパーツのスタイル --- */
.sidebar-item-box {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sidebar-widget .left-contents-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #f8fafc;
}

.sidebar-widget a.left-contents-link {
    color: #475569;
    text-decoration: none;
    font-size: 0.85rem;
}

.sidebar-widget a.left-contents-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* メタ情報アイコン */
.meta-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* --- 副産物ページ（byproduct）専用デザイン --- */
.byproduct-container {
    color: #475569;
}

/* 目次（アンカーリンク） */
.byproduct-container > a[href^="#"] {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin: 0.25rem;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    transition: all 0.2s;
}
.byproduct-container > a[href^="#"]:hover {
    background: white;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.byproduct-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 3.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
}

.byproduct-container h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.byproduct-open, .byproduct-close {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.byproduct-open { background-color: #dcfce7 !important; color: #166534 !important; }
.byproduct-close { background-color: #f1f5f9 !important; color: #64748b !important; }

.byproduct-container p { margin-bottom: 1rem; font-size: 0.95rem; }
.byproduct-container ul { 
    background: #f8fafc;
    padding: 1.25rem 1.25rem 1.25rem 2.5rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
    list-style: disc;
}
.byproduct-container li { margin-bottom: 0.4rem; font-size: 0.9rem; }

/* --- モバイルメニュー・ドロワー --- */
#nav-toggle:checked ~ .drawer-content { transform: translateX(0); }
#nav-toggle:checked ~ .drawer-overlay { display: block; opacity: 1; pointer-events: auto; }

.drawer-overlay {
    transition: opacity 0.3s ease;
    pointer-events: none;
}
