body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    margin: 0;
    padding: 54px 0 40px 0; /* ★重要：ヘッダーの高さ(54px)の分だけ上に余白を作る */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- ★新しく追加：ほぼ日風スマートヘッダー --- */
.site-header {
    position: fixed; /* 画面の一番上に固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 54px;
    background-color: rgba(255, 255, 255, 0.85); /* ほんのり透ける上品な白 */
    backdrop-filter: blur(10px); /* 後ろの背景をぼかすApple/ほぼ日風の加工 */
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* カルーセルより上に重ねる */
}

/* ヘッダーの中身（コンテンツ幅と綺麗に揃える） */
.header-inner {
    width: 100%;
    max-width: 560px;
    padding: 0 16px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between; /* 左ロゴ、右メニューに泣き別れ */
    align-items: center;
}

/* 左側のロゴテキスト */
.header-logo {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1d1d1f;
    text-decoration: none;
    letter-spacing: -0.01em;
}

/* 右側のナビゲーションメニュー */
.header-nav {
    display: flex;
    gap: 12px; /* メニュー項目どうしのスキマ */
}

/* メニューのリンク項目（仮配置・ジャンルジャンプ用） */
.header-link {
    font-size: 0.72rem; /* 小さくスマートに */
    font-weight: 600;
    color: rgba(0, 0, 0, 0.55); /* 落ち着いた不透明度 */
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}
.header-link:hover {
    color: #ff4500; /* ホバーするとアクセントカラーに */
}

/* --- カルーセル・その他（前回分を維持・微調整） --- */
.carousel-container {
    width: 100%;
    max-width: 560px;
    height: 240px;
    position: relative;
    overflow: hidden;
    background-color: #e5e5ea;
    margin-bottom: 24px;
}

.carousel-wrapper {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #e8e8ed;
    border-bottom: 1px solid #d2d2d7;
    color: #86868b;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    box-sizing: border-box;
    padding: 20px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.dot {
    width: 6px;
    height: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    cursor: pointer;
}
.dot.active {
    background: #ff4500;
    width: 14px;
    border-radius: 3px;
}

h1 {
    font-size: 1.3rem;
    text-align: center;
    margin: 4px 0 16px 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.genre-container {
    width: 100%;
    max-width: 560px;
    padding: 0 16px;
    box-sizing: border-box;
    /* ★重要：ヘッダー固定によるジャンプ時の位置ズレを綺麗に防ぐ魔法のコード */
    scroll-behavior: smooth;
}

.genre-section {
    background: white;
    border-radius: 14px;
    padding: 16px 20px 12px 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    /* ★ヘッダーに被らないようジャンプ位置の余白を調整 */
    scroll-margin-top: 66px; 
}

.genre-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 2px 0;
    border-left: 3.5px solid #ff4500;
    padding-left: 8px;
}

.genre-description {
    font-size: 0.68rem;
    color: rgba(0, 0, 0, 0.4);
    margin: -1px 0 10px 12px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.video-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.video-card {
    text-decoration: none;
    color: inherit;
    width: 110px;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.video-card:hover { transform: translateY(-2px); }

.thumbnail-box {
    width: 100%;
    height: 180px;
    background-color: #f2f2f7;
    border-radius: 10px;
    border: 1px solid #e5e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.7rem;
    color: #86868b;
    padding: 8px;
    box-sizing: border-box;
    font-weight: 600;
    line-height: 1.3;
}

.video-title {
    font-size: 0.8rem;
    margin-top: 6px;
    line-height: 1.3;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 記事詳細用のスタイル */
#content {
    background: white;
    padding: 32px;
    border-radius: 14px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.back-link {
    color: #86868b;
    text-decoration: none;
    margin-bottom: 16px;
    display: inline-block;
    font-size: 0.9rem;
}
