:root {
    --ink: #1c2b39;
    --ink-soft: #4a5b6b;
    --paper: #faf6ee;
    --paper-raised: #ffffff;
    --line: #e4dcc9;
    --navy: #132a3d;
    --navy-deep: #0b1c2a;
    --vermillion: #c1442e;
    --vermillion-soft: #f3d9d0;
    --gold: #b98a2e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 64px;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 8%, rgba(193, 68, 46, 0.05), transparent 40%),
        radial-gradient(circle at 85% 92%, rgba(19, 42, 61, 0.05), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

/* ===== ヘッダー ===== */
header {
    position: relative;
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: #f4ede1;
    padding: 14px 24px 12px;
    overflow: hidden;
}

header::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(244, 237, 225, 0.12);
    border-radius: 50%;
}

header::before {
    content: '';
    position: absolute;
    right: 20px;
    top: 20px;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(244, 237, 225, 0.1);
    border-radius: 50%;
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    column-gap: 14px;
    row-gap: 2px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9.5px;
    letter-spacing: .12em;
    font-weight: 700;
    color: var(--navy-deep);
    background: #f4ede1;
    padding: 2px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    order: 1;
}

.badge::before {
    content: '●';
    color: var(--vermillion);
    font-size: 7px;
}

header h1 {
    font-family: 'Shippori Mincho', serif;
    font-weight: 600;
    font-size: clamp(17px, 2.4vw, 22px);
    letter-spacing: .02em;
    order: 0;
    flex: 1 0 auto;
}

header .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 11.5px;
    color: #cfd9e2;
    order: 2;
    flex-basis: 100%;
}

header .meta strong {
    color: #f4ede1;
    font-weight: 700;
}

/* ===== タブ ===== */
.tabbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(19, 42, 61, 0.06);
}

.tabbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    padding: 0 24px;
    overflow-x: auto;
}

.day-tab {
    appearance: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    padding: 8px 12px 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-soft);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .15s;
}

.day-tab .day-num {
    font-family: 'Shippori Mincho', serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--vermillion);
    margin-right: 6px;
}

.day-tab:hover {
    color: var(--ink);
}

.day-tab.active {
    color: var(--ink);
    border-bottom-color: var(--vermillion);
}

/* ===== メイン ===== */
main {
    max-width: 1180px;
    margin: 20px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.day-panel {
    display: none;
}

.day-panel.active {
    display: block;
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(19, 42, 61, 0.06);
    overflow: hidden;
}

.timeline-scroll {
    overflow-x: hidden;
}

.timeline-grid {
    display: flex;
    width: 100%;
}

/* 時間軸ガター */
.gutter {
    width: clamp(30px, 7vw, 60px);
    flex-shrink: 0;
    position: sticky;
    left: 0;
    z-index: 12;
    background: var(--paper-raised);
    border-right: 1px solid var(--line);
}

.gutter-head {
    height: 44px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-raised);
    position: sticky;
    top: 0;
    z-index: 13;
}

.gutter-body {
    position: relative;
}

.hour-label {
    position: absolute;
    left: 0;
    right: 0;
    padding-top: 2px;
    text-align: center;
    font-size: clamp(9px, 2.4vw, 10.5px);
    font-weight: 700;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

/* 会場カラム */
.venue-col {
    flex: 1 1 0;
    min-width: 0;
    border-right: 1px solid var(--line);
    position: relative;
}

.venue-col:last-child {
    border-right: none;
}

.venue-head {
    height: 44px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fbf8f1, #f4efe3);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 11;
}

.venue-head .v-name {
    font-family: 'Shippori Mincho', serif;
    font-weight: 700;
    font-size: clamp(9.5px, 2.6vw, 13.5px);
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.venue-body {
    position: relative;
}

/* グリッド罫線（時間） */
.gridline {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid var(--line);
}

.gridline.hour {
    border-top-color: #d8cfb8;
}

/* イベントブロック */
.event {
    position: absolute;
    left: 3px;
    right: 3px;
    border-radius: 7px;
    border: 1px solid;
    padding: 6px 6px 5px;
    overflow: hidden;
    cursor: default;
    word-break: break-word;
    overflow-wrap: break-word;
    transition: box-shadow .15s, transform .15s;
}

.event:hover {
    box-shadow: 0 4px 14px rgba(19, 42, 61, 0.18);
    transform: translateY(-1px);
    z-index: 5;
}

.event .e-tag {
    font-size: clamp(7.5px, 1.9vw, 9.5px);
    font-weight: 700;
    letter-spacing: .02em;
    opacity: .75;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.event .e-title {
    font-size: clamp(9px, 2.3vw, 11.5px);
    font-weight: 700;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event .e-time {
    font-size: clamp(7.5px, 1.9vw, 9.5px);
    font-weight: 500;
    opacity: .7;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}

.event.short {
    display: flex;
    align-items: center;
    padding: 2px 6px;
}

.event.short .e-tag {
    display: none;
}

.event.short .e-title {
    -webkit-line-clamp: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.event.short .e-time {
    display: none;
}

footer {
    max-width: 1180px;
    margin: 34px auto 0;
    padding: 0 24px;
    font-size: 11.5px;
    color: var(--ink-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

@media (max-width:640px) {
    header {
        padding: 28px 16px 24px;
    }

    .tabbar-inner {
        padding: 0 12px;
    }

    main {
        padding: 0 12px;
    }

    .day-panel.active {
        position: relative;
        display: flow-root;
    }

    .timeline-card {
        margin-top: 34px;
    }

    .day-panel::before {
        content: 'SCROLL →';
        position: absolute;
        top: 4px;
        right: 8px;
        z-index: 20;
        padding: 4px 8px;
        border-radius: 999px;
        background: rgba(19, 42, 61, 0.85);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.08em;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .day-panel.is-scrolled::before {
        opacity: 0;
    }

    .timeline-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .timeline-grid {
        width: max-content;
        min-width: 100%;
    }

    .venue-col {
        flex: 0 0 132px;
        min-width: 132px;
    }
}
