/* ===================================
   ぴにょぐらむphoto session - Appleデザインシステム版
   =================================== */

/* フォント設定 */
body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

/* リセット & 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* CSS変数 - Apple Design System */
:root {
    --primary: #C67DFF;
    --accent: #FF2D55;
    --secondary: #5856D6;
    --gray-900: #000000;
    --gray-700: #2C2C2E;
    --gray-600: #3A3A3C;
    --gray-50: #F2F2F7;
    --gradient-main: linear-gradient(135deg, #C67DFF, #5856D6);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.04);
}

/* ベーススタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 
                 'Helvetica Neue', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
    background: #F5F5F5;
    color: #000000;
    line-height: 1.47059;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    text-align: center; /* 子要素の中央配置を確実にする */
}

/* ヘッダー */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    font-size: 14px;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.65;
}

/* メインコンテナ */
.main-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* 左側：イベント一覧 */
.events-section {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.event-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(198,125,255,0.15);
    border-color: rgba(198,125,255,0.3);
}

.event-card:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(198,125,255,0.2);
}

.event-card-image {
    height: 150px;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.event-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.badge-new {
    background: rgba(52, 199, 89, 0.9);
    color: white;
}

.badge-popular {
    background: rgba(0, 122, 255, 0.9);
    color: white;
}

.badge-limited {
    background: rgba(255, 149, 0, 0.9);
    color: white;
}

.event-content {
    padding: 15px;
}

.event-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.event-info {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--gray-50);
    border-top: 1px solid rgba(0,0,0,0.04);
}

.event-price {
    font-size: 19px;
    font-weight: 600;
    color: var(--primary);
}

/* 右側：カレンダー */
.calendar-section {
    position: sticky;
    top: 80px;
    height: fit-content;
    min-height: 600px; /* カレンダーセクション全体の最小高さを固定 */
}

.calendar-container {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
    height: 560px; /* 高さを固定 */
    min-height: 560px; /* 最小高さも固定 */
    max-height: 560px; /* 最大高さも固定 */
    width: 100%; /* 幅を100%に固定 */
    box-sizing: border-box; /* ボックスサイズ計算を統一 */
    overflow: hidden; /* オーバーフローを隠す */
    display: flex;
    flex-direction: column; /* 縦方向のレイアウト */
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    height: 40px; /* ヘッダーの高さを固定 */
    min-height: 40px;
    max-height: 40px;
    flex-shrink: 0; /* ヘッダーは縮小しない */
    box-sizing: border-box;
}

.calendar-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--gray-900);
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    background: var(--gray-50);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-nav button:hover {
    background: rgba(198,125,255,0.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 80px); /* 各セル80px固定 */
    gap: 2px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    height: 480px; /* 固定高さ: 6行 × 80px = 480px */
    min-height: 480px; /* 最小高さも固定 */
    max-height: 480px; /* 最大高さも固定 */
    width: 100%; /* 幅を100%に固定 */
    overflow: hidden; /* オーバーフローを隠す */
    box-sizing: border-box; /* ボックスサイズ計算を統一 */
    flex-shrink: 0; /* グリッドは縮小しない */
}

.calendar-weekday {
    background: var(--gray-50);
    padding: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--gray-600);
}

.calendar-day {
    background: white;
    height: 80px; /* 固定高さ */
    min-height: 80px; /* 最小高さも固定 */
    max-height: 80px; /* 最大高さも固定 */
    padding: 5px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* オーバーフローを隠す */
    box-sizing: border-box; /* ボックスサイズ計算を統一 */
    border: none; /* ボーダーを削除してサイズを安定化 */
}

.calendar-day:hover {
    background: rgba(198,125,255,0.05);
}

.calendar-day-number {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    flex-shrink: 0; /* 日付番号は縮小しない */
}

.calendar-day.other-month {
    color: var(--gray-600);
    background: var(--gray-50);
}

.calendar-day.today {
    background: rgba(255,204,0,0.2);
}

.calendar-day.has-event {
    background: rgba(198,125,255,0.08);
}

.calendar-event {
    font-size: 10px;
    background: var(--gradient-main);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0; /* イベントも縮小しない */
    height: 16px; /* 高さを固定 */
    min-height: 16px; /* 最小高さも固定 */
    max-height: 16px; /* 最大高さも固定 */
    line-height: 12px; /* 行の高さを固定 */
    box-sizing: border-box; /* ボックスサイズ計算を統一 */
}

.calendar-event.individual {
    background: linear-gradient(135deg, #34C759, #C67DFF);
}

.calendar-event.group {
    background: linear-gradient(135deg, #FF2D55, #FF9500);
}

.calendar-event.more-events {
    background: linear-gradient(135deg, #8E8E93, #AEAEB2);
    font-weight: 600;
}

/* イベントリスト */
.event-list {
    margin-top: 20px;
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}

.event-list-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--gray-900);
}

.event-list-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--gray-50);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.event-list-item:hover {
    background: rgba(198,125,255,0.08);
    transform: translateX(4px);
}

.event-list-date {
    font-size: 21px;
    font-weight: 600;
    color: var(--primary);
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.event-list-info {
    flex: 1;
}

.event-list-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.event-list-type {
    font-size: 12px;
    color: var(--gray-600);
}

/* カード内のボタン */
.card-actions {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    background: var(--gray-50);
    border-top: 1px solid rgba(0,0,0,0.04);
}

.btn-detail {
    flex: 1;
    padding: 8px 16px;
    background: white;
    color: var(--primary);
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--primary);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    z-index: 10; /* カードのクリックイベントより上に配置 */
}

.btn-detail:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05); /* ホバー時の拡大効果 */
}

/* ===================================
   ヒーローセクション（修正版）
   =================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 400px; /* 高さを小さく */
    overflow: hidden;
    margin-bottom: 40px; /* 下の要素との間隔 */
}

.hero-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    cursor: pointer; /* クリック可能を示す */
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* リンクラッパー */
.hero-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

/* インジケーター */
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.indicator.active {
    background: white;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hero-section {
        height: 250px;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 200px;
        margin-bottom: 20px;
    }
    
    .hero-indicators {
        bottom: 10px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* メインコンテナの調整 */
.main-container {
    margin-top: 40px; /* ヒーローセクションとの間隔 */
}

/* フッター */
.site-footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 60px 0 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column {
    text-align: left;
}

.footer-column h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff6ec7, #C67DFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff6ec7, #C67DFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    display: inline-block;
    line-height: 1.2;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient-main);
    transform: scale(1.1);
}

.social-link i {
    font-size: 20px;
    color: white;
}

.contact-info {
    color: #cbd5e0;
    line-height: 1.8;
}

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: #ff6ec7;
    width: 16px;
    font-size: 0.9rem;
}

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

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: #ff6ec7;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #cbd5e0;
    font-size: 14px;
}

.contact-item i {
    color: var(--primary);
    font-size: 16px;
    width: 20px;
}

.footer-bottom {
    padding: 30px 0;
    text-align: center;
    color: #cbd5e0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}





/* レスポンシブ */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .calendar-section {
        position: relative;
        top: 0;
        min-height: 450px; /* タブレット用の最小高さ */
    }
    
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        font-size: 12px;
    }
    
    .calendar-day {
        height: 60px; /* モバイルでも固定サイズ */
        min-height: 60px;
        max-height: 60px;
    }
    
    .calendar-grid {
        grid-template-rows: repeat(6, 60px); /* 各セル60px固定 */
        height: 360px; /* 6行 × 60px = 360px */
        min-height: 360px;
        max-height: 360px;
    }

    /* ===================================
   ハンバーガーメニュー
   =================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s;
    display: block;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* モバイルナビゲーション */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        padding: 30px;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 999;
        gap: 1rem;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* ===================================
   レスポンシブデザイン - 完全版
   =================================== */

/* タブレット (1024px以下) */
@media (max-width: 1024px) {
    /* メインコンテナのレイアウト変更 */
    .main-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    /* カレンダーを上部に配置 */
    .calendar-section {
        order: -1;
        position: relative;
        top: 0;
        margin-bottom: 30px;
        min-height: 400px; /* モバイル用の最小高さ */
    }
    
    .events-section {
        order: 1;
    }
    
    /* イベントグリッドの調整 */
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    /* ヘッダーの調整 */
    nav {
        padding: 1rem 3%;
    }
}

/* スマートフォン (768px以下) */
@media (max-width: 768px) {
    /* ヘッダー調整 */
    header {
        padding: 0;
    }
    
    nav {
        padding: 0.8rem 15px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    /* メインコンテンツ */
    main {
        padding: 20px 15px;
        margin-top: 60px;
    }
    
    /* セクションタイトル */
    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    /* イベントグリッド */
    .events-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* イベントカード */
    .event-card {
        border-radius: 12px;
    }
    
    .event-card-image {
        height: 180px;
    }
    
    .event-title {
        font-size: 16px;
    }
    
    .event-price {
        font-size: 17px;
    }
    
    /* カレンダー調整 */
    .calendar-container {
        padding: 15px;
        min-height: 420px; /* モバイル用の固定高さ */
    }
    
    .calendar-title {
        font-size: 17px;
    }
    
    .calendar-grid {
        gap: 1px;
    }
    
    .calendar-day {
        height: 50px; /* 小さな画面でも固定サイズ */
        min-height: 50px;
        max-height: 50px;
        padding: 3px;
        font-size: 12px;
    }
    
    .calendar-grid {
        grid-template-rows: repeat(6, 50px); /* 各セル50px固定 */
        height: 300px; /* 6行 × 50px = 300px */
        min-height: 300px;
        max-height: 300px;
    }
    
    .calendar-weekday {
        font-size: 11px;
        padding: 5px;
    }
    
    .calendar-event {
        font-size: 9px;
        padding: 1px 2px;
    }
    
    /* イベントリスト */
    .event-list {
        padding: 15px;
    }
    
    .event-list-title {
        font-size: 16px;
    }
    
    .event-list-item {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .event-list-date {
        font-size: 18px;
        min-width: 35px;
    }
    
    .event-list-name {
        font-size: 13px;
    }
    
    /* フッター調整 */
    .site-footer {
        padding: 40px 0 0;
        margin-top: 60px;
    }
    
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 30px;
    }
    

    
    .footer-logo {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .social-links {
        margin-bottom: 20px;
    }
    
    .contact-item {
        font-size: 14px;
    }
    
    .footer-bottom {
        padding: 20px 15px;
    }
    

}

/* 小型スマートフォン (480px以下) */
@media (max-width: 480px) {
    /* ナビゲーション */
    .logo {
        font-size: 1.1rem;
    }
    
    /* メインコンテンツ */
    main {
        padding: 15px 10px;
    }
    
    /* セクション */
    .events-section,
    .calendar-container,
    .event-list {
        padding: 15px;
        border-radius: 12px;
    }
    
    .calendar-container {
        min-height: 360px; /* 小さな画面用の固定高さ */
    }
    
    /* イベントカード */
    .event-card-image {
        height: 150px;
    }
    
    .event-content {
        padding: 12px;
    }
    
    .event-footer {
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .card-actions {
        width: 100%;
    }
    
    .btn-detail {
        width: 100%;
        padding: 10px;
    }
    
    /* カレンダー */
    .calendar-day {
        height: 45px; /* 最小画面でも固定サイズ */
        min-height: 45px;
        max-height: 45px;
        font-size: 11px;
    }
    
    .calendar-grid {
        grid-template-rows: repeat(6, 45px); /* 各セル45px固定 */
        height: 270px; /* 6行 × 45px = 270px */
        min-height: 270px;
        max-height: 270px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    /* フッター */
    .contact-item {
        font-size: 13px;
        flex-direction: column;
        gap: 5px;
    }
    
    .contact-item i {
        margin-bottom: 5px;
    }
    

}

/* 横向き対応 */
@media (max-width: 768px) and (orientation: landscape) {
    .calendar-section {
        position: relative;
        min-height: 350px; /* 最小画面用の最小高さ */
    }
    
    .calendar-grid {
        max-height: 300px;
        overflow-y: auto;
    }
}

/* コンテナの最大幅調整 */
@media (min-width: 1440px) {
    .main-container,
    nav,
    .footer-container {
        max-width: 1400px;
    }
}

/* セーフエリア対応（iPhone X以降） */
@supports (padding: env(safe-area-inset-left)) {
    .main-container,
    nav,
    .footer-container {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .site-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ========= Readability Upgrade (global) ========= */

/* 流体ベースフォント：画面幅に応じて16px～18.5px */
html{
  font-size: clamp(16px, 0.7vw + 12px, 18.5px);
}

/* 本文の標準設定（日本語向け行間と字間） */
body{
  font-family: 'M PLUS Rounded 1c', sans-serif;
  color: #0f172a;                  /* slate-900 */
  line-height: 1.7;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* コンテナ幅（読みやすい最大幅） */
main, .main, .content, .container{
  max-width: 1000px;               /* 読書幅 */
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

/* 見出しスケール（流体） */
h1{
  font-size: clamp(28px, 3.2vw + 12px, 42px);
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin-block: 24px 20px;
}
h2{
  font-size: clamp(22px, 2.2vw + 10px, 32px);
  line-height: 1.3;
  margin-block: 28px 16px;
}
h3{
  font-size: clamp(18px, 1.6vw + 8px, 24px);
  line-height: 1.35;
  margin-block: 20px 12px;
}

/* パラグラフと小要素 */
p{ margin-block: 0.75em 0.75em; }
small, .text-small{ font-size: 0.9em; color:#475569; } /* slate-600 */

/* 箇条書きの可読性 */
ul, ol{
  padding-left: 1.2em;
  margin-block: 0.6em 0.9em;
}
li{ margin-block: 0.35em; }

/* カード/ボックス（特定クラスのみに適用） */
.card, .info-card, .panel, .box, .section-box{
  background: #f8fafc;             /* slate-50 */
  border-radius: 16px;
  padding: clamp(16px, 1.2vw + 14px, 28px);
  box-shadow: 0 10px 24px rgba(2, 6, 23, .06);
}

/* カード内のタイトル（例：応募要項の各ブロック） */
.card h3, .info-card h3, .panel h3, .box h3{
  margin-bottom: 10px;
  font-weight: 700;
}

/* パンくず・補助テキストを少し大きくしつつ淡色 */
.breadcrumb, .subtle, .muted{
  font-size: clamp(14px, 0.4vw + 12px, 16px);
  color: #64748b;                   /* slate-500 */
}

/* ボタンの最低サイズ（指で押しやすい） */
button, .btn{
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.95rem;
  border-radius: 9999px;
}

/* 画像のデフォルト（はみ出し防止） */
img{ max-width: 100%; height: auto; }

/* 見出しの中央寄せ（任意・「応募要項」のH2など） */
.section-title{
  text-align: center;
  margin-block: 32px 20px;
}

/* アイコン＋見出しの整列（任意） */
.heading-with-icon{
  display: inline-flex;
  align-items: center;
  gap: .5em;
}
.heading-with-icon .icon{ font-size: 1.1em; }

/* ===== Apple-like Readable Bold UI ===== */
:root{
  /* フォントスタック：Apple端末は SF、その他は近似 */
  --font-sf: "SF Pro Text","SF Pro JP",-apple-system,BlinkMacSystemFont,
             "Helvetica Neue","Hiragino Sans","Hiragino Kaku Gothic ProN",
             "Yu Gothic UI","Noto Sans JP","Segoe UI",Arial,sans-serif;

  /* ウェイト（可変フォントが無くても機能する値に） */
  --fw-body: 600;     /* 本文を太め（Medium〜Semibold） */
  --fw-strong: 700;
  --fw-heavy: 800;

  /* カラー & 余白 */
  --text-900: #0f172a;    /* slate-900 */
  --text-600: #475569;    /* slate-600 */
  --card-bg:  #f8fafc;    /* slate-50 */
  --radius-xl: 16px;
}

/* ボールドUIのスコープ（全体に効かせる場合は html に付与不要）
   ページ限定で効かせたい時は <body data-style="bold"> にしてください。 */
html, body[data-style="bold"]{
  font-family: 'M PLUS Rounded 1c', sans-serif;
  color: var(--text-900);
  letter-spacing: .01em;          /* 詰めすぎない */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 流体ベースフォント。本文は太め、行間はゆったり */
body, body[data-style="bold"]{
  font-size: clamp(16px, 0.7vw + 12px, 18.5px);
  font-weight: var(--fw-body);
  line-height: 1.65;
}

/* 見出し：Appleっぽい締まり（やや詰め & 大きめ） */
h1{
  font-size: clamp(28px, 3.2vw + 12px, 44px);
  font-weight: var(--fw-heavy);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 28px 0 18px;
  text-align: center;              /* セクション見出し用 */
}
h2{
  font-size: clamp(22px, 2.1vw + 10px, 34px);
  font-weight: var(--fw-strong);
  line-height: 1.28;
  letter-spacing: -0.005em;
  margin: 26px 0 14px;
}
h3{
  font-size: clamp(18px, 1.4vw + 8px, 24px);
  font-weight: 700;
  line-height: 1.32;
  margin: 18px 0 10px;
}

/* 小見出し/ラベル（カードのタイトルなど） */
.heading-with-icon, .section-title, .block-title{
  font-weight: var(--fw-strong);
}

/* ナビゲーション・パンくず・ボタンは 600 で視認性UP */
nav, .nav, .breadcrumb, .btn, button{
  font-weight: 600;
}

/* 本文・リスト */
p{ margin: .75em 0; color: var(--text-900); }
small, .muted{ color: var(--text-600); font-weight: 500; }
ul,ol{ padding-left: 1.2em; margin: .6em 0 .9em; }
li{ margin: .35em 0; }

/* カード */
.card, .info-card, .panel, .box{
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: clamp(16px, 1.2vw + 14px, 28px);
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
}

/* フォトコンのバッジ/ピル（応募期間・結果発表） */
.bar, .milestone, .pill{
  font-weight: var(--fw-strong);
}

/* HERO 見出し下の説明行などのセカンダリ文 */
.meta, .subtle{ color: var(--text-600); font-weight: 500; }

/* 読みやすい最大幅（長文の1行を短く） */
main, .main, .content, .container{
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

/* 画像ははみ出し防止 */
img{ max-width: 100%; height: auto; border-radius: inherit; }

/* コントラスト確保（WCAG意識） */
a{ color:#C67DFF; font-weight: 600; }
a:hover{ text-decoration: underline; }

/* カード間隔を「24〜28px」で統一 */
.stack > * + *{ margin-top: clamp(16px, 1.4vw, 28px); }

/* ===== Media Frame 共通（既存） ===== */
.media-frame{
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  margin: 0;
  line-height: 0;
  background: #111;
  box-sizing: border-box;
}
.media-frame.is-40x21{ aspect-ratio: 40/21; width: 100%; }

.media-frame > img{
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  object-position: var(--pos, center);
  position: relative;
  z-index: 1;
}

.media-frame > .media-overlay{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  line-height: normal;
  box-sizing: border-box;
}

/* 自動2色グラデ（fill-gradient 用） */
.media-frame.fill-gradient::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, var(--c1,#1b1b1b), var(--c2,#2a2a2a));
}

/* ===== No-Overlap ガード（ヒーロー専用） ===== */
.hero.no-overlap{
  position: relative;
  z-index: 0;            /* ヘッダー等より下でOK */
  isolation: isolate;    /* ここで積層文脈を分離 */
  overflow: clip;        /* 子要素が枠外へ描画できない */
  margin-bottom: clamp(16px, 4vw, 28px);  /* 下のセクションとの空き */
}

/* ヒーローは必ず "全体表示"（縮小時に左右余白が出てもOK） */
.hero.no-overlap .media-frame{ aspect-ratio: 40/21; }
.hero.no-overlap .media-frame > img{
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}
/* 帯UIが枠外へ出ないよう明示 */
.hero.no-overlap .media-overlay{ inset: auto 0 0 0; }

/* 旧グローバル overlay の副作用を無効化（該当CSSを削除できるなら削除推奨） */
:root .overlay{
  position: static !important;
  inset: auto !important;
  left: auto !important; right: auto !important;
  top: auto !important;  bottom: auto !important;
}

/* height 直指定との競合を回避（過去の応急処置が残っていた場合の打ち消し） */
.hero img, .hero figure{ height: auto; } /* ← 基本は auto に戻す（下で img=100% を強制） */

/* ===============================
   HERO: 調整ポイント（セクション／画像を分離）
   =============================== */

/* --- セクション側のサイズ調整（ここだけで"横幅・丸み・間隔"を変えられる） --- */
:root{
  /* デフォルト：最大幅660px（20%+25%縮小）、左右はビューポート8vwまで広げる */
  --hero-max-w: 660px;
  --hero-side-vw: 8vw;            /* 余白の目安 */
  --hero-radius: 16px;            /* 角丸 */
  --hero-gap-bottom: clamp(8px, 4vw, 10px);
  /* 画像の既定比率（1200x630=40/21） */
  --hero-aspect: 40 / 21;
}

/* プリセット（幅だけ変えたい時にセクションへクラスを足す） */
.hero--sm { --hero-max-w: 528px;  --hero-side-vw: 6vw; }  /* 20%+25%縮小 */
.hero--md { --hero-max-w: 660px;  --hero-side-vw: 8vw; }  /* 20%+25%縮小 */
.hero--lg { --hero-max-w: 768px;  --hero-side-vw: 10vw; } /* 20%+25%縮小 */

/* セクション外枠：横いっぱいにしない／中央寄せ／他セクションに被らない */
.hero-shell{
  /* 確実に最大幅を適用 */
  width: var(--hero-max-w);
  max-width: var(--hero-max-w);
  margin: 12px auto var(--hero-gap-bottom) auto !important;
  isolation: isolate;     /* 積層分離 */
  overflow: clip;         /* はみ出し禁止 */
  z-index: 0;
  display: flex;          /* Flexboxで確実な中央配置 */
  justify-content: center; /* 水平中央配置 */
  align-items: center;    /* 垂直中央配置 */
  position: relative;     /* 相対位置で中央配置を確実にする */
  text-align: left;       /* ヒーロー内のテキストは左寄せ */
}

/* モバイルデバイスでのみビューポート幅を考慮 */
@media (max-width: 768px) {
  .hero-shell{
    width: min(var(--hero-max-w), 100vw - 2 * var(--hero-side-vw));
    margin: 12px auto var(--hero-gap-bottom) auto !important;
  }
}

/* --- 画像フレーム（比率追従） --- */
.hero-frame{
  position: relative;
  width: 100%;
  flex: 0 0 auto;        /* Flexbox内で適切に動作 */
  /* ★セクション自体が画像比率に追従：高さは幅から自動算出 */
  aspect-ratio: var(--hero-aspect);
  border-radius: var(--hero-radius);
  overflow: hidden;
  background: #111;
}

/* 背景（任意）：自動2色グラデ。fill-gradientを付けた時だけ出る */
.hero-frame.fill-gradient::before{
  content:"";
  position:absolute; inset:0; z-index:0;
  background: linear-gradient(90deg, var(--c1,#1b1b1b), var(--c2,#2a2a2a));
}

/* --- 画像の見せ方（セクションと独立に調整） --- */
.hero-frame>img{
  display:block;
  inline-size:100%;
  block-size:100%;
  object-fit: contain;          /* デフォルト：切れない */
  object-position: var(--hero-pos, center);
  z-index:1; position:relative;
  /* 画像だけ縮小のためのtransform */
  transform: scale(var(--img-scale, 1));
  transform-origin: center center;
  will-change: transform;
}

/* オプション：もしベタ張りが必要な箇所だけ .img-cover を hero-frame に追加 */
.hero-frame.img-cover>img{ object-fit: cover; }

/* 被写体寄せを属性で */
.hero-frame[data-pos="left"]   { --hero-pos: left  center; }
.hero-frame[data-pos="right"]  { --hero-pos: right center; }
.hero-frame[data-pos="top"]    { --hero-pos: center top; }
.hero-frame[data-pos="bottom"] { --hero-pos: center bottom; }

/* 帯UIは枠内に固定 */
.hero-frame>.media-overlay{
  position:absolute; left:0; right:0; bottom:0; z-index:2;
  line-height:normal;
}

/* 旧グローバル .overlay が残っていた場合の保険（可能なら元CSSを削除） */
:root .overlay{
  position: static !important;
  inset: auto !important;
  left:auto !important; right:auto !important;
  top:auto !important;  bottom:auto !important;
}

/* ===============================
   画像だけ縮小するための共通フック
   =============================== */

/* 画像だけ縮小するための共通フック */
.hero-frame,
.media-frame{ --img-scale: 0.8; }  /* 20%縮小（=80%表示） */

/* よく使う固定スケールのユーティリティ */
.hero-frame.img-75{ --img-scale: .75; }  /* 25%縮小（=75%表示） */
.hero-frame.img-50{ --img-scale: .5;  }  /* 50%縮小（=半分）  */
.hero-frame.img-90{ --img-scale: .9;  }  /* 10%縮小           */
.media-frame.img-75{ --img-scale: .75; }  /* 25%縮小（=75%表示） */
.media-frame.img-50{ --img-scale: .5;  }  /* 50%縮小（=半分）  */
.media-frame.img-90{ --img-scale: .9;  }  /* 10%縮小           */
}