/* --- イベントスケジュール タイムテーブル (縦軸：時間) --- */

.gakusai-schedule-wrapper.v-axis-time {
    margin: 40px auto;
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
    box-sizing: border-box;
}

.gakusai-schedule-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.gakusai-schedule-container {
    min-width: 1000px; /* 横幅を担保 */
    position: relative;
}

/* ヘッダー：場所（横軸） */
.sch-header-row {
    display: flex;
    background: var(--bg-theme);
    color: #fff;
    font-weight: bold;
    font-family: var(--font-mincho);
    position: sticky;
    top: 0;
    z-index: 100;
}

.sch-time-corner {
    width: 80px; /* 時間軸の幅に合わせる */
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.1);
}

.sch-place-head {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    font-size: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* タイムテーブル本体 */
.sch-body {
    display: flex;
    position: relative;
}

/* 縦軸：時間ラベル */
.sch-time-axis {
    width: 80px;
    flex-shrink: 0;
    position: sticky;
    left: 0;
    background: #f8fafc;
    z-index: 50;
    border-right: 2px solid var(--accent-blue);
}

.sch-hour-marker {
    position: absolute;
    width: 100%;
    text-align: center;
    transform: translateY(-50%); /* 線の中心に文字を合わせる */
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--text-black);
    padding: 5px 0;
}

/* グリッドエリア */
.sch-grid-content {
    flex: 1;
    position: relative;
    background-color: #fff;
}

.sch-horizontal-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
}

.sch-vertical-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0, 0, 0, 0.05);
}

/* イベントカード */
.sch-event-card {
    position: absolute;
    padding: 5px;
    box-sizing: border-box;
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sch-event-card:hover {
    transform: scale(1.02);
    z-index: 20;
}

.sch-event-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #3b82f6 100%);
    color: #fff;
    border-radius: 12px;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 色バリエーション（列ごとに変える） */
.sch-event-card[style*="left: 0%"] .sch-event-inner { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3); }
.sch-event-card:nth-of-type(3n) .sch-event-inner { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3); }
.sch-event-card:nth-of-type(3n+1) .sch-event-inner { background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%); box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3); }

.sch-event-time {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    align-self: flex-start;
}

.sch-event-title {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
}

.sch-event-place-hint {
    display: none; /* デスクトップでは不要 */
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
    .gakusai-schedule-wrapper.v-axis-time {
        padding: 0 10px;
    }
    .sch-time-axis, .sch-time-corner {
        width: 60px;
    }
    .sch-place-head {
        font-size: 0.85rem;
        padding: 10px 5px;
    }
    .sch-event-title {
        font-size: 0.8rem;
    }
}
