/* ==========================================================================
   GTMF 2026 セッションスケジュール・ブースマップ（試作）
   index.html の #program セクション専用。gtmf2026.css の変数（:root）を前提にしている
   ========================================================================== */

.program { scroll-margin-top: 64px; }

.program-lead { margin: -8px 0 24px; font-size: 14px; color: var(--text-4); }

/* ------------------------------------------------------- 会場切り替えボタン
   会場カードの見出し色（大阪＝グリーン／東京＝ホワイト）に合わせて、選択中だけ塗る */
.venue-switch-label { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--text-3); }

/* 上の会場カード（.venue-grid）と同じく、コンテンツ幅いっぱいに2等分で並べる */
.venue-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}
.venue-switch button {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "city  date"
        "place place"
        "state state";
    align-items: baseline;
    gap: 6px 16px;
    padding: 24px 28px 22px;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, .22);
    background: var(--card);
    color: var(--text);
    font-family: var(--font-jp);
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.venue-switch button:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 208, 132, .16); }
.venue-switch button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.venue-switch .vs-city { grid-area: city; font-size: 24px; font-weight: 900; letter-spacing: -.01em; }
.venue-switch .vs-date { grid-area: date; font-family: var(--font-en); font-size: 32px; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.venue-switch .vs-date small { font-size: 14px; font-weight: 700; margin-left: 4px; }
.venue-switch .vs-place { grid-area: place; font-size: 13px; line-height: 1.6; opacity: .75; }
/* 選択中は「表示中」、それ以外は押せることが分かる文言を出す */
.venue-switch .vs-state { grid-area: state; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--green); }
.venue-switch .vs-state::before { content: 'クリックで切り替え →'; }
.venue-switch button[aria-selected="true"] .vs-state { color: inherit; }
.venue-switch button[aria-selected="true"] .vs-state::before { content: '✓ 表示中'; }

.venue-switch button[aria-selected="true"] { color: var(--bg); border-color: transparent; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.venue-switch button[data-venue="osaka"][aria-selected="true"] { background: var(--green); }
.venue-switch button[data-venue="tokyo"][aria-selected="true"] { background: #FFFFFF; }
/* 選択中のボタンから下のパネルへ向けた三角 */
.venue-switch button[aria-selected="true"]::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -11px;
    width: 22px;
    height: 22px;
    background: inherit;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 0 0 4px 0;
}

/* パネル内の小見出しとジャンプリンク */
.program-place { margin: 0 0 14px; font-size: 13px; color: var(--text-4); }
.program-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.program-jump a {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-2);
}
.program-jump a:hover { border-color: var(--green); color: var(--green-light); }

.program-h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 0 0 16px;
    font-size: 21px;
    font-weight: 900;
    scroll-margin-top: 72px;
}
.program-h3 .en { font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--green); }
.program-block + .program-block { margin-top: 56px; }

.program-panel { animation: pg-fade .35s ease; }
@keyframes pg-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- スケジュール */

.schedule { border-top: 1px solid var(--line); }

.sched-head,
.sched-row {
    display: grid;
    grid-template-columns: 92px repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.sched-head { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sched-head span {
    font-family: var(--font-en);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--text-3);
    text-align: center;
}
.sched-row { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }

.sched-time {
    padding-top: 12px;
    font-family: var(--font-en);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.sched-time small { display: block; font-size: 12px; font-weight: 600; color: var(--text-5); }

/* 休憩・懇親会の帯 */
.sched-row.is-break .sched-time { padding-top: 0; font-size: 14px; color: var(--text-4); }
.sched-row.is-break .sched-time small { display: inline; margin-left: 4px; }
.sched-break {
    grid-column: 2 / -1;
    align-self: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-4);
    text-align: center;
    letter-spacing: .08em;
}
.sched-break.is-party { color: var(--green-light); }

/* セッションカード */
.sess {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-height: 128px;
    padding: 14px 16px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .09);
    background: var(--card);
    color: var(--text);
    font-family: var(--font-jp);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.sess:hover { border-color: rgba(0, 208, 132, .55); transform: translateY(-2px); background: #0F1619; }
.sess:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sess-room { display: none; }
.sess-company { font-size: 12px; font-weight: 700; color: var(--green); line-height: 1.4; }
/* 全角の社名（ＣＲＩ）は幅が広く1文字だけ折り返すため、文字間を詰める */
.sess-company[data-ex="cri"] { letter-spacing: -.04em; }
.sess-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
}
.sess-speaker { margin-top: auto; font-size: 12px; color: var(--text-4); line-height: 1.5; }
.sess-tag {
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--green-light);
    color: var(--bg);
}
/* KEYNOTE（13:00 全ルーム）。現状は空き枠のため、メインカラーを薄めて控えめに見せる */
.sess.is-keynote {
    grid-column: 2 / -1;
    min-height: 96px;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(120deg, rgba(0, 208, 132, .22), rgba(0, 208, 132, .10));
    border-color: rgba(0, 208, 132, .35);
    color: var(--text-2);
    box-shadow: none;
}
.sess.is-keynote:hover { background: linear-gradient(120deg, rgba(0, 208, 132, .28), rgba(0, 208, 132, .14)); border-color: rgba(0, 208, 132, .5); }
.sess.is-keynote .sess-title { font-size: 20px; font-weight: 800; }
.sess.is-keynote .sess-speaker { margin-top: 0; color: var(--text-3); font-weight: 700; }
.sess.is-keynote .sess-tag { align-self: center; background: rgba(0, 208, 132, .25); color: var(--green-light); letter-spacing: .08em; }

/* 招待講演。ゴールド系の枠と背景で一般セッションと区別する */
.sess.is-invited {
    border-color: rgba(242, 208, 107, .65);
    background: linear-gradient(160deg, rgba(242, 208, 107, .16), rgba(242, 208, 107, .03) 70%), var(--card);
}
.sess.is-invited:hover { border-color: #F2D06B; background: linear-gradient(160deg, rgba(242, 208, 107, .22), rgba(242, 208, 107, .05) 70%), #0F1619; }
.sess.is-invited .sess-tag { background: #F2D06B; color: var(--bg); }
.sess.is-invited .sess-company { color: #F2D06B; }
/* 調整中の枠はクリックさせない */
.sess.is-tba { cursor: default; border-style: dashed; background: transparent; justify-content: center; align-items: center; text-align: center; }
.sess.is-tba:hover { transform: none; border-color: rgba(255, 255, 255, .09); background: transparent; }
.sess.is-tba .sess-title { color: var(--text-3); font-size: 13px; }
.sess.is-tba .sess-speaker { margin-top: 0; }
.sess-empty { min-height: 128px; }
/* 全ルームにまたがる枠（招待セッション 調整中 など） */
.sess.is-span { grid-column: 2 / -1; min-height: 64px; }

.schedule-note { margin: 14px 0 0; font-size: 12px; color: var(--text-6); }

/* ------------------------------------------------------------- ブースマップ */

/* min-width:0 がないと、スマホで地図の min-width（720px）に列が引っ張られてページごと横にはみ出す */
.booth-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.booth-layout > * { min-width: 0; }
/* 大阪は縦長の会場なので、地図と出展社一覧を横に並べる */
.booth-layout.is-tall { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; }

.booth-map-wrap {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #080C0E;
    padding: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.booth-map { display: block; width: 100%; height: auto; }
.booth-scroll-hint { display: none; margin: 8px 0 0; font-size: 12px; color: var(--text-5); }

.booth-map .room-line { fill: none; stroke: #4A5457; stroke-width: 2.6; }
.booth-map .room { fill: #121A1D; }
.booth-map .staff { fill: url(#pg-hatch); stroke: rgba(255, 255, 255, .12); stroke-width: .8; }
.booth-map .mark rect { fill: #1E282C; stroke: rgba(255, 255, 255, .16); stroke-width: .8; }
.booth-map .mark.entrance rect { fill: var(--green); stroke: none; }
.booth-map .mark text, .booth-map .staff-label { fill: var(--text-3); font-family: var(--font-jp); font-weight: 700; }
.booth-map .mark.entrance text { fill: var(--bg); }

.booth-map .booth { cursor: pointer; outline: none; }
.booth-map .booth rect.b { stroke: #05080A; stroke-width: 1.2; transition: filter .2s ease, stroke .2s ease; }
.booth-map .booth text { fill: #05080A; font-family: var(--font-jp); font-weight: 700; pointer-events: none; }
.booth-map .booth text.no { font-family: var(--font-en); font-weight: 900; opacity: .6; }
.booth-map .booth:hover rect.b,
.booth-map .booth:focus-visible rect.b,
.booth-map .booth.is-hl rect.b { filter: brightness(1.12); stroke: var(--green); stroke-width: 3; }
.booth-map .booth.is-pulse rect.b { animation: pg-pulse 1.1s ease 2; }
@keyframes pg-pulse { 50% { stroke: var(--green-light); stroke-width: 6; } }

/* ブース・チップの色はティアによらず運営委員会（ＣＲＩ）と同じ色に統一 */
.tier-pearl, .tier-gold, .tier-silver, .tier-committee, .tier-invited { --tier: #6EF0BB; }
.booth-map .booth rect.b { fill: var(--tier); }

.booth-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--text-4); }
.booth-legend li { display: flex; align-items: center; gap: 6px; }
.booth-legend i { width: 14px; height: 10px; border-radius: 3px; background: var(--tier); }
.booth-legend i.is-entrance { background: var(--green); }
.booth-legend i.is-staff { background: repeating-linear-gradient(45deg, #2A3337 0 2px, #121A1D 2px 5px); }

/* 出展社一覧（地図のラベルが小さい画面向けの代替導線も兼ねる） */
.booth-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.booth-layout.is-tall .booth-list { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
/* 社名の長さで高さがばらつかないよう、全行を一番高い行（3行折り返し）に揃える */
.booth-list { grid-auto-rows: 1fr; }
.booth-list li { display: flex; }
.booth-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--card);
    color: var(--text);
    font-family: var(--font-jp);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.booth-list button:hover, .booth-list button.is-hl { border-color: rgba(0, 208, 132, .55); background: #0F1619; }
.booth-list button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.booth-list .no {
    flex: 0 0 auto;
    min-width: 40px;
    padding: 3px 6px;
    border-radius: 6px;
    background: var(--tier);
    color: var(--bg);
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}
.booth-list-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--text-4); }

/* ------------------------------------------------------------------ モーダル */

.pg-modal {
    width: min(640px, calc(100vw - 32px));
    max-height: min(86vh, 860px);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 20px;
    background: var(--card);
    color: var(--text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .65);
    overflow: hidden;
}
.pg-modal[open] { display: flex; flex-direction: column; animation: pg-pop .25s ease; }
.pg-modal::backdrop { background: rgba(3, 5, 6, .8); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes pg-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.pg-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 14px 24px;
    border-bottom: 1px solid var(--line);
}
.pg-modal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.pg-modal-meta .time { font-family: var(--font-en); font-size: 15px; font-weight: 700; color: var(--text); }
.pg-chip {
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
}
.pg-chip.is-venue-osaka { background: var(--green); color: var(--bg); border-color: transparent; }
.pg-chip.is-venue-tokyo { background: #FFFFFF; color: var(--bg); border-color: transparent; }
.pg-chip.is-tier { background: var(--tier); color: var(--bg); border-color: transparent; font-family: var(--font-jp); }
.pg-modal-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .05);
    color: #FFFFFF;
    font-size: 18px;
    cursor: pointer;
}
.pg-modal-close:hover { background: rgba(255, 255, 255, .14); }

.pg-modal-body { padding: 22px 24px 26px; overflow-y: auto; overscroll-behavior: contain; }
.pg-modal-body h3 { margin: 0 0 14px; font-size: 20px; font-weight: 900; line-height: 1.5; letter-spacing: -.01em; }
.pg-company { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.pg-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 56px;
    padding: 8px;
    border-radius: 10px;
    background: #FFFFFF;
}
.pg-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pg-logo.is-large { width: 100%; height: 150px; padding: 26px; margin-bottom: 18px; }

.pg-text p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--text-2); }
.pg-text p + p { margin-top: 10px; }
.pg-text p.li + p.li { margin-top: 2px; }
.pg-pending { margin: 0; font-size: 14px; color: var(--text-5); }

.pg-section-title { margin: 24px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--green); font-family: var(--font-en); }
.pg-speaker { padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.pg-speaker + .pg-speaker { margin-top: 8px; }
.pg-speaker .name { font-size: 15px; font-weight: 900; }
.pg-speaker .title { margin-top: 2px; font-size: 12px; color: var(--text-4); line-height: 1.6; }
.pg-speaker .profile { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--text-3); }

.pg-related { display: grid; gap: 8px; }
.pg-related button {
    display: flex;
    gap: 12px;
    align-items: baseline;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: transparent;
    color: var(--text);
    font-family: var(--font-jp);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
    text-align: left;
    cursor: pointer;
}
.pg-related button:hover { border-color: rgba(0, 208, 132, .55); }
.pg-related .t { flex: 0 0 auto; font-family: var(--font-en); color: var(--green); }

.pg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pg-actions .btn { padding: 12px 18px; font-size: 13px; }
.pg-actions button.btn { font-family: var(--font-jp); cursor: pointer; border: 0; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
    .booth-layout.is-tall { grid-template-columns: 1fr; }
    .booth-layout.is-tall .booth-map-wrap { max-width: 460px; }
}

@media (max-width: 760px) {
    /* スマホではルーム列をやめ、時間ごとに縦積み。カードにルーム名を出す */
    .sched-head { display: none; }
    .sched-row { grid-template-columns: 1fr; gap: 8px; padding: 14px 0; }
    .sched-time { padding-top: 0; }
    .sched-time small { display: inline; margin-left: 6px; }
    .sched-row.is-break { grid-template-columns: auto 1fr; align-items: center; }
    .sched-break { grid-column: auto; text-align: left; }
    .sess, .sess.is-keynote, .sess.is-span { grid-column: auto; min-height: 0; }
    .sess-room { display: inline-block; align-self: flex-start; font-family: var(--font-en); font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--text-4); }
    .sess-empty { display: none; }
    /* 東京は横長なので、ラベルが潰れない幅を確保して横スクロールさせる */
    .booth-map-wrap.is-wide .booth-map { min-width: 720px; }
    .booth-map-wrap.is-wide + .booth-scroll-hint { display: block; }
}

@media (max-width: 640px) {
    /* スマホは2列のまま、会場名と日付を縦積みにして施設名は省く */
    .venue-switch { gap: 10px; }
    .venue-switch button { grid-template-columns: 1fr; grid-template-areas: "city" "date" "state"; gap: 6px; padding: 16px 16px 14px; }
    .venue-switch .vs-city { font-size: 18px; }
    .venue-switch .vs-date { font-size: 24px; }
    .venue-switch .vs-place { display: none; }
    .venue-switch .vs-state { margin-top: 4px; font-size: 12px; }
    .venue-switch .vs-state::before { content: 'タップで切り替え'; }
    .program-h3 { font-size: 18px; }
    .pg-modal-body { padding: 18px 18px 22px; }
    .pg-modal-bar { padding: 12px 12px 12px 18px; }
    .pg-modal-body h3 { font-size: 18px; }
    .pg-actions .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .program-panel, .pg-modal[open] { animation: none; }
    .booth-map .booth.is-pulse rect.b { animation: none; }
    .sess:hover, .venue-switch button:hover { transform: none; }
}

/* ブースマップ準備中の表示 */
.program-coming-soon {
    margin: 0 0 8px;
    padding: 36px 16px 8px;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--green-light);
}
.program-block .program-coming-soon + .pg-pending { padding-bottom: 36px; text-align: center; }
