/* 會議資訊入口 — 依 TSPCCM 2026 主視覺(議程 PDF):淡薄荷灰底、漸層球、青綠主色、圓體數字、水彩葉片 */
:root {
  --accent: #36a1a2;          /* 主視覺青綠 */
  --accent-deep: #1f6e70;
  --accent-weak: #e3f1f0;
  --pink: #cf6486;            /* 議程分類 */
  --amber: #c26d00;           /* 贊助商 */
  --green: #42912c;           /* 休息 */
  --green-band: #e6eedb;
  --cream: #fbf2e7;           /* 午餐衛星會 */
  --text: #24302f;
  --text-2: #5e6b69;
  --text-3: #8d9896;
  --line: #dde5e1;
  --bg: #ecf0ec;
  --card: #ffffff;
  --live: #c2410c;
  --tabbar-h: 60px;
  --appbar-h: 56px;
  --num: "Nunito", "Avenir Next", "Segoe UI", sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.hidden { display: none !important; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.filled { fill: currentColor; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* 主視覺背景:兩顆柔焦漸層球固定在角落 */
body::before, body::after {
  content: ''; position: fixed; z-index: -1; pointer-events: none;
  background: url(/img/orb.webp) center / contain no-repeat; filter: blur(28px);
}
body::before { width: 360px; height: 360px; left: -170px; top: -150px; opacity: .55; transform: rotate(160deg); }
body::after { width: 460px; height: 460px; right: -230px; bottom: -170px; opacity: .6; }

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 10; height: var(--appbar-h);
  padding: 0 16px; padding-top: env(safe-area-inset-top);
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.appbar-back { width: 36px; height: 36px; margin-left: -8px; display: grid; place-items: center; border-radius: 10px; color: var(--accent-deep); }
.appbar-back:active { background: var(--accent-weak); }
.appbar-text { min-width: 0; }
.appbar-title { font-size: 17px; font-weight: 600; color: var(--accent-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.view { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px); max-width: 640px; margin: 0 auto; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--line);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--text-3); }
.tabbar a.active { color: var(--accent-deep); font-weight: 600; }
.tabbar a.active::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tabbar .dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }

/* ---------- Sections ---------- */
.section { padding: 22px 20px 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.section-title { font-size: 15px; font-weight: 600; color: var(--accent-deep); }
.section-title .num { font-weight: 700; }
.section-link { font-size: 13px; color: var(--accent-deep); font-weight: 600; }
.muted { color: var(--text-3); font-size: 13px; }
.empty { padding: 24px 20px; color: var(--text-2); font-size: 14px; }

/* 白色圓角卡片(取代整排分隔線);沒有陰影 */
.list, #agendaList, .group, .detail, .news-list {
  margin: 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}

/* ---------- 首頁抬頭 ---------- */
.hero { position: relative; padding: 28px 20px 22px; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; top: -18px; right: -70px; width: 260px; height: 160px; z-index: 0; pointer-events: none;
  background: url(/img/leaf.webp) right top / contain no-repeat; opacity: .85;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero > * { position: relative; z-index: 1; }
.hero-kicker { font-family: var(--num); font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--accent-deep); }
.hero-name { margin-top: 6px; font-size: 22px; font-weight: 600; line-height: 1.35; color: var(--accent-deep); max-width: 15em; }
.hero-date { margin-top: 14px; font-family: var(--num); color: var(--accent); line-height: 1.1; }
.hero-date .d { font-size: 30px; font-weight: 700; }
.hero-date .w { margin-left: 6px; font-size: 18px; font-weight: 400; letter-spacing: .04em; }
.hero-meta { margin-top: 8px; color: var(--text-2); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.countdown { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--accent-deep); padding: 4px 12px; border: 1px solid var(--accent); border-radius: 999px; }

/* 公告橫條 */
/* 首頁最新公告:與其他卡片同一套細框,不用彩色側條;右側箭頭表示可點 */
.notice { display: flex; gap: 12px; align-items: center; margin: 4px 12px 0; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.notice .body { flex: 1; min-width: 0; }
.notice .meta { font-size: 12px; color: var(--text-3); }
.notice .meta .label { color: var(--pink); font-weight: 600; }
.notice .t { margin-top: 2px; font-size: 15px; font-weight: 600; color: var(--text); }
.notice .i { color: var(--text-3); }

/* ---------- 議程列 ---------- */
.row { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.row:last-child { border-bottom: 0; }
.row:active { background: var(--accent-weak); }
.row.sponsored { background: var(--cream); }
.row-main { flex: 1; min-width: 0; }
.row-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; font-size: 12px; color: var(--text-2); }
.row-meta .num { font-size: 13px; font-weight: 700; color: var(--accent-deep); }
.room { font-weight: 600; color: var(--text); }
.track { color: var(--pink); font-weight: 600; }
.live-tag { color: var(--live); font-weight: 600; white-space: nowrap; }
.row-title { margin-top: 3px; font-size: 15px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row-people { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.row-sponsor { margin-top: 3px; font-size: 12px; color: var(--amber); font-weight: 600; }
.row.past .row-title, .row.past .row-people { color: var(--text-3); }
.star { flex: none; width: 36px; height: 36px; margin: -6px -8px 0 0; display: grid; place-items: center; color: #b9c4c1; border-radius: 10px; }
.star.on { color: #e0a100; }
.star:active { background: var(--accent-weak); }

/* 時段列:主視覺表頭的青綠帶 */
.slot { position: sticky; top: calc(var(--appbar-h) + var(--filters-h, 0px)); z-index: 4; padding: 6px 16px; font-family: var(--num); font-size: 14px; font-weight: 700; color: #fff; background: var(--accent-deep); }
.slot.live { background: var(--accent-deep); }
.slot .tag { margin-left: 8px; font-family: inherit; font-size: 12px; font-weight: 600; opacity: .9; }
.slot, .row { scroll-margin-top: calc(var(--appbar-h) + var(--filters-h, 0px)); }
/* 休息/報到:主視覺 Coffee break 的淺綠帶 */
.break-row { padding: 10px 16px; background: var(--green-band); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--green); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.break-row .num { font-weight: 700; color: var(--green); }

/* ---------- 篩選列 ---------- */
.filters { position: sticky; top: var(--appbar-h); z-index: 5; background: var(--bg); padding-bottom: 4px; margin-bottom: 10px; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin: 0 12px; padding-top: 12px; }
.days button { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px 0 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text-3); }
.days button .dn { font-family: var(--num); font-size: 24px; font-weight: 700; line-height: 1; }
.days button .dw { font-family: var(--num); font-size: 13px; letter-spacing: .06em; }
.days button.on { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.chips { display: flex; gap: 8px; padding: 10px 12px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 6px 12px; font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.chip.on { border-color: var(--accent-deep); color: var(--accent-deep); background: var(--accent-weak); font-weight: 600; }
.search { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 0 14px; height: 42px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text-3); }
.search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--text); outline: none; min-width: 0; }

/* ---------- 詳細頁 ---------- */
.detail { margin-top: 12px; padding: 18px 18px 6px; }
.detail.sponsored { background: linear-gradient(var(--cream), var(--cream)); }
.detail-track { font-size: 13px; color: var(--pink); font-weight: 600; }
.detail-title { margin-top: 4px; font-size: 20px; font-weight: 600; line-height: 1.35; color: var(--accent-deep); }
.kv { margin-top: 16px; display: grid; grid-template-columns: 56px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.kv .sp { color: var(--amber); font-weight: 600; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.btn { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--accent-deep); }
.btn.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn.on { color: #a66d00; border-color: #f0d58f; background: #fff8e6; }
.talks { margin-top: 22px; }
.talks .section-title { margin-bottom: 4px; }
.talk { padding: 12px 0; border-top: 1px solid var(--line); }
.talk-time { font-family: var(--num); font-size: 13px; font-weight: 700; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.talk-title { margin-top: 2px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.talk-people { margin-top: 2px; font-size: 13px; color: var(--text-2); }

/* ---------- 公告 ---------- */
.news-list { margin-top: 12px; }
.news { padding: 16px; border-bottom: 1px solid var(--line); }
.news:last-child { border-bottom: 0; }
.news-head { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-3); }
.news-head .num { font-weight: 700; }
.pin { color: var(--accent-deep); font-weight: 600; }
.new { color: var(--pink); font-weight: 600; }
.news-title { margin-top: 4px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.news-body { margin-top: 6px; font-size: 14px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }

/* ---------- 資訊 ---------- */
.group { margin-top: 12px; }
.group-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 4px; }
.group-name { font-size: 16px; font-weight: 600; color: var(--accent-deep); }
.link-btn { font-size: 13px; color: var(--accent-deep); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.items { margin: 0; padding: 0 16px 6px; list-style: none; }
.items li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.items li:last-child { border-bottom: 0; }
.foot { padding: 28px 16px; font-size: 12px; color: var(--text-3); text-align: center; }
.foot a { color: var(--text-2); text-decoration: underline; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); z-index: 20; padding: 12px 14px; border-radius: 12px; background: var(--accent-deep); color: #fff; font-size: 14px; }

/* 議程列表內有 sticky 時段帶:外框不能 overflow:hidden(會讓 sticky 以外框為基準而錯位壓字),改由頭尾列自己帶圓角 */
#agendaList { overflow: visible; }
#agendaList > :first-child { border-radius: 15px 15px 0 0; }
#agendaList > :last-child { border-radius: 0 0 15px 15px; }

/* 搜尋時「其他日期還有 N 筆」 */
.other-day { display: block; width: 100%; padding: 12px 16px; text-align: left; font-size: 14px; font-weight: 600; color: var(--accent-deep); background: var(--accent-weak); border-top: 1px solid var(--line); }

/* 離線提示與離線地圖 */
.offline-bar { position: sticky; top: var(--appbar-h); z-index: 6; padding: 8px 16px; font-size: 13px; color: var(--text); background: var(--cream); border-bottom: 1px solid var(--line); }
.offline-map { padding: 16px; }
.offline-map-img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.offline-map .empty { padding: 12px 4px 0; }

/* 語言選擇 */
.lang-pick { display: flex; flex-direction: column; gap: 12px; padding: 32px 16px; }
.lang-pick .btn { width: 100%; height: 56px; font-size: 17px; }
.lang-row { display: flex; align-items: center; gap: 8px; padding: 16px; font-size: 14px; color: var(--text-2); }
.lang-row span { margin-right: auto; }

/* 我的行程 */
.sched-row .row-title { color: var(--accent-deep); }
.sched-row .i { color: var(--accent-deep); }
.actions .wide { grid-column: 1 / -1; }
.conflict { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--pink); font-weight: 600; }
.conflict::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* 會場頁 */
.room-where { display: flex; align-items: center; gap: 6px; padding: 16px 16px 0; font-size: 14px; color: var(--text-2); }
.room-actions { padding: 16px; }
.room-actions .btn { width: 100%; }

/* 主視覺版開頭(素材取自大會主視覺 AI 檔):字形、顏色照海報,版面依手機調整 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-brand { padding: 24px 20px 8px; }
.hero-brand img { display: block; max-width: 100%; height: auto; }
.b-top { display: flex; align-items: center; gap: 12px; }
.hero-brand .b-year { height: 36px; width: auto; }
.hero-brand .b-logos { height: 36px; width: auto; }
.b-title { width: 100%; max-width: 360px; margin-top: 12px; }
.b-joint { width: 92%; max-width: 330px; margin-top: 8px; }
.b-title-en-text { margin-top: 12px; font-size: 17px; font-weight: 600; line-height: 1.4; color: #231816; max-width: 22em; }
.b-joint-en-text { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--text-2); max-width: 26em; }
.b-row { display: flex; align-items: flex-end; gap: 8px; margin-top: 12px; }
.b-col { flex: none; width: 38%; padding-bottom: 16px; }
.b-date { width: 100%; max-width: 132px; }
.b-col .countdown { margin-top: 12px; }
.b-hero { flex: 1; min-width: 0; width: 62%; margin-right: -12px; }
