:root {
  --primary: #0f9d8a;
  --primary-dark: #0b7a6b;
  --primary-soft: #e3f5f2;
  --accent: #ff8a3d;
  --accent-soft: #fff1e6;
  --danger: #e5484d;
  --warn: #c77700;
  --line: #06c755;
  --bg: #f3f6f5;
  --card: #ffffff;
  --text: #1f2d2b;
  --muted: #6b7c79;
  --border: #e2e8e6;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 50, 45, .08), 0 4px 14px rgba(20, 50, 45, .05);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--primary-dark); }
button { font: inherit; color: inherit; }
h2, h3 { margin: 0; }
code { background: var(--primary-soft); padding: 1px 6px; border-radius: 6px; font-weight: 700; }

#app { max-width: 640px; margin: 0 auto; min-height: 100vh; }
.loading { padding: 80px 16px; text-align: center; color: var(--muted); }
.page { padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.trip-page { padding-bottom: calc(90px + var(--safe-bottom)); }

/* ───────── 頂部列 ───────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--primary); color: #fff;
}
.topbar-title { flex: 1; font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-icon { font-size: 24px; width: 38px; text-align: center; }
.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: transparent;
  font-size: 22px; cursor: pointer;
}
.topbar .icon-btn { color: #fff; font-size: 26px; }
.topbar .icon-btn:active { background: rgba(255, 255, 255, .18); }
.icon-btn.ghost { visibility: hidden; }
.icon-btn.sm { width: 32px; height: 32px; font-size: 16px; background: var(--bg); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.people-chip {
  border: 0; border-radius: 999px; padding: 6px 12px;
  background: rgba(255, 255, 255, .2); color: #fff; cursor: pointer; white-space: nowrap;
}

/* ───────── 卡片與按鈕 ───────── */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; display: block; color: inherit; text-decoration: none;
}
.card-title { font-weight: 700; font-size: 17px; }
.section-title { font-size: 15px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; background: var(--card); border-radius: var(--radius); border: 1.5px dashed var(--border); }
.empty.small { padding: 12px; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.error-card { border-left: 4px solid var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 42px; padding: 8px 16px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--card); color: var(--text);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-text { border-color: transparent; background: transparent; color: var(--danger); }
.btn.warn { color: var(--warn); }
.btn.line { background: var(--line); border-color: var(--line); color: #fff; }
.btn.dashed { border-style: dashed; color: var(--primary-dark); background: transparent; }
.btn.small { min-height: 34px; padding: 4px 11px; font-size: 14px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.big { min-height: 52px; font-size: 17px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn-row .btn { flex: 1; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }

.demo-card { background: #fffbea; border: 1.5px solid #f3dd8a; box-shadow: none; }
.demo-card p { margin: 6px 0; }

/* ───────── 群組 ───────── */
.group-card { display: flex; align-items: center; gap: 12px; }
.group-icon { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; background: var(--primary-soft); border-radius: 14px; }
.chev { font-size: 26px; color: var(--muted); }
.big-icon { font-size: 54px; }
.code-box {
  font-size: 30px; font-weight: 800; letter-spacing: 6px;
  background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 12px; padding: 8px 14px; margin: 4px auto 12px; display: inline-block;
}
.card.center h2 { margin: 4px 0; }
.card.center p { margin: 10px 0 2px; }

.avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
  border: 2px solid #fff;
}
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatars { display: flex; align-items: center; }
.avatars .avatar + .avatar { margin-left: -8px; }
.avatars.link { border: 0; background: none; padding: 0; cursor: pointer; }
.avatars .count, .avatars .more { margin-left: 8px; font-size: 14px; color: var(--muted); }

.member-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--card); cursor: pointer; font-size: 15px;
}
.member-chip.me { border-color: var(--primary); }
.member-chip.on { background: var(--primary-soft); border-color: var(--primary); }
.member-chip .check { color: var(--primary); font-weight: 800; }
.member-chip.add { padding-left: 12px; border-style: dashed; color: var(--primary-dark); }

/* ───────── 行程卡片 ───────── */
.trip-card { padding: 0; overflow: hidden; }
.cover {
  height: 120px; background: linear-gradient(135deg, #46c6b3, #2b8fd6 60%, #6c5ce7);
  background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.cover.tall { height: 170px; }
.cover-emoji { font-size: 44px; opacity: .85; }
.trip-card-body { padding: 12px 14px 14px; }
.trip-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.trip-card-foot .count { flex: 1; font-size: 14px; color: var(--muted); }
.list.past .trip-card { opacity: .8; }

.trip-info { padding: 0; overflow: hidden; }
.trip-info-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.trip-info p { margin: 4px 0; }
.trip-title { font-size: 21px; }
.meet { background: var(--accent-soft); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.people-row { justify-content: space-between; margin-top: 4px; }

/* ───────── 下一站橫幅 ───────── */
.sticky-stack { position: sticky; top: 58px; z-index: 15; }
.next-banner {
  background: linear-gradient(90deg, var(--accent), #ff6b6b);
  color: #fff; box-shadow: 0 4px 12px rgba(255, 120, 60, .25);
}
.next-inner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.next-text { flex: 1; min-width: 0; }
.next-label { font-size: 12px; font-weight: 700; opacity: .9; display: flex; gap: 8px; }
.next-time { background: rgba(255, 255, 255, .25); border-radius: 6px; padding: 0 6px; }
.next-name { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-cur { font-size: 12px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-actions { display: flex; flex-direction: column; gap: 6px; }
.nav-btn { background: #fff; border-color: #fff; color: #e2602a; }
.ghost-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }

/* ───────── 地點時間軸 ───────── */
.day { display: flex; flex-direction: column; gap: 10px; }
.day-title { font-size: 18px; padding-top: 6px; }
.day-title .muted { font-size: 15px; font-weight: 500; }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.stop { display: grid; grid-template-columns: 46px 14px 1fr; gap: 6px; align-items: start; position: relative; }
.stop::before { content: ""; position: absolute; left: 52px; top: 22px; bottom: -16px; width: 2px; background: var(--border); }
.timeline .stop:last-child::before { display: none; }
.stop-time { font-weight: 700; font-size: 14px; color: var(--primary-dark); padding-top: 12px; text-align: right; }
.stop-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid var(--primary-soft); margin-top: 15px; z-index: 1; }
.stop-card { padding: 0; overflow: hidden; }
.stop-photo { width: 100%; max-height: 200px; object-fit: cover; display: block; }
.stop-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.stop-name { font-weight: 700; font-size: 17px; }
.stop-note { font-size: 14px; background: var(--bg); border-radius: 8px; padding: 6px 8px; margin-top: 4px; }
.stop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.stop-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.stop-badges:empty { display: none; }
.badge { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 7px; }
.badge.cur { background: var(--primary-soft); color: var(--primary-dark); }
.badge.next { background: var(--accent-soft); color: #d2621f; }
.badge.off { background: #f1f1f1; color: #888; }
.stop.cur .stop-card { outline: 2.5px solid var(--primary); }
.stop.next .stop-card { outline: 2.5px solid var(--accent); }
.stop.next .stop-dot { background: var(--accent); border-color: var(--accent-soft); }
.stop.off .stop-card { opacity: .55; }
.stop.off .stop-name { text-decoration: line-through; }
.stop.off .stop-dot { background: #bbb; }

.map-wrap { display: flex; flex-direction: column; gap: 10px; }
.map-box { height: 300px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e8eeec; }
.map-box.map-empty { height: auto; padding: 16px; color: var(--muted); font-size: 14px; }
.pin {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 13px;
  display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.pin.cur { background: var(--primary-dark); }
.pin.next { background: var(--accent); }

.soon { padding: 40px 16px; }
.soon h3 { margin: 8px 0; }

/* ───────── 底部分頁 ───────── */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 20;
  display: flex; background: var(--card); border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 6px 0 8px; font-size: 12px; color: var(--muted); text-decoration: none;
}
.tab-icon { font-size: 22px; filter: grayscale(1); opacity: .7; }
.tab.on { color: var(--primary-dark); font-weight: 700; }
.tab.on .tab-icon { filter: none; opacity: 1; }

/* ───────── 彈出視窗與表單 ───────── */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 30, 28, .45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.overlay.show { opacity: 1; }
.sheet {
  width: 100%; max-width: 640px; max-height: 92vh; overflow: auto;
  background: var(--card); border-radius: 20px 20px 0 0;
  padding-bottom: calc(16px + var(--safe-bottom));
  transform: translateY(30px); transition: transform .2s;
}
.overlay.show .sheet { transform: none; }
.sheet-head { position: sticky; top: 0; background: var(--card); display: flex; align-items: center; padding: 12px 12px 6px 18px; z-index: 1; }
.sheet-head h3 { flex: 1; font-size: 18px; }
.sheet-body { padding: 4px 18px 8px; }
.confirm-msg { font-size: 16px; margin: 4px 0 18px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.req { color: var(--danger); }
.hint { color: var(--muted); font-size: 12px; }
input, textarea, select {
  font: inherit; font-size: 16px; color: var(--text);
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; }
.form-error { color: var(--danger); font-size: 14px; min-height: 0; }
.form-error:empty { display: none; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-opt { font-size: 24px; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--border); background: #fff; cursor: pointer; }
.emoji-opt.on { border-color: var(--primary); background: var(--primary-soft); }
.photo-input { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.photo-preview {
  width: 100%; min-height: 90px; border: 1.5px dashed var(--border); border-radius: 12px;
  display: grid; place-items: center; overflow: hidden; cursor: pointer; background: var(--bg);
}
.photo-preview img { width: 100%; max-height: 180px; object-fit: cover; display: block; }

/* ───────── 提示 ───────── */
.toasts {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(80px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  width: calc(100% - 32px); max-width: 480px; pointer-events: none;
}
.toast {
  background: rgba(25, 40, 38, .92); color: #fff; border-radius: 12px;
  padding: 10px 16px; font-size: 15px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: none; }

/* ───────── 多選成員 ───────── */
.picker { display: flex; flex-direction: column; gap: 8px; }
.picker-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.picker .member-chip:not(.on) .check { visibility: hidden; }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; border-width: 1px; }

/* ───────── 統計數字 ───────── */
.stat-row { display: flex; gap: 6px; }
.stat { flex: 1; display: flex; flex-direction: column; align-items: center; background: var(--bg); border-radius: 10px; padding: 8px 4px; }
.stat b { font-size: 20px; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.warn b { color: var(--danger); }
.stat.good b, b.good { color: var(--primary-dark); }
.stat.bad b, b.bad { color: var(--danger); }
.alert { background: #fdecec; color: #b42328; border-radius: 10px; padding: 8px 10px; font-size: 14px; font-weight: 600; }
.alert.soft { background: var(--accent-soft); color: #b25516; }
.right { text-align: right; }

/* ───────── 車子 ───────── */
.cars, .money { display: flex; flex-direction: column; gap: 14px; }
.car-summary { display: flex; flex-direction: column; gap: 10px; }
.my-seat { background: var(--primary-soft); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.free-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mini-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 999px; padding: 2px 10px 2px 2px; font-size: 14px; }
.car-card { display: flex; flex-direction: column; gap: 12px; }
.car-body {
  background: linear-gradient(#f6faf9, #eef4f2); border: 2px solid var(--border);
  border-radius: 40px 40px 18px 18px; padding: 12px 14px 16px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.car-front { font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.seat-row { display: flex; gap: 10px; justify-content: center; width: 100%; }
.seat-row:first-of-type { justify-content: space-between; }
.seat {
  width: 76px; min-height: 76px; border-radius: 16px 16px 12px 12px;
  border: 2px dashed #c9d6d3; background: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px;
}
.seat.taken { border-style: solid; border-color: var(--primary); background: var(--primary-soft); }
.seat.driver { border-color: #f0b98f; }
.seat.driver.taken { border-color: var(--accent); background: var(--accent-soft); }
.seat.me { box-shadow: 0 0 0 3px rgba(15, 157, 138, .35); }
.seat-empty { font-size: 22px; color: #9fb3ae; line-height: 32px; }
.seat-name { font-size: 12px; font-weight: 600; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick-list h4 { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.pick-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; text-align: left;
}

/* ───────── 記帳 ───────── */
.money-summary { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.big-money { font-size: 36px; font-weight: 800; color: var(--primary-dark); line-height: 1.1; }
.cat-bar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.cat-pill { background: var(--bg); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.settle { display: flex; flex-direction: column; gap: 10px; }
.settle h3 { font-size: 17px; }
.transfers { display: flex; flex-direction: column; gap: 8px; }
.transfer { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; background: var(--bg); }
.transfer.mine { background: var(--accent-soft); }
.transfer .tname { font-weight: 600; font-size: 15px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transfer .arrow { color: var(--muted); }
.transfer b { font-size: 17px; }
.balances summary { cursor: pointer; font-weight: 600; }
.bal-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--bg); }
.exp-list { display: flex; flex-direction: column; gap: 8px; }
.exp-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; cursor: pointer; padding: 12px; }
.exp-icon { font-size: 24px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--bg); border-radius: 12px; flex: none; }
.exp-title { font-weight: 700; }
.exp-amount { font-size: 17px; }
.transfer-item { background: #f7fbfa; box-shadow: none; border: 1.5px dashed var(--border); }

/* ───────── 聊天未讀 ───────── */
.tab { position: relative; }
.badge-dot {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; filter: none; line-height: 1;
}

/* ───────── 聊天室 ───────── */
.trip-page.chat-page { padding-bottom: calc(200px + var(--safe-bottom)); }
.chat-list { display: flex; flex-direction: column; gap: 6px; }
.chat-day { align-self: center; font-size: 12px; color: var(--muted); background: #e6ecea; border-radius: 999px; padding: 2px 12px; margin: 8px 0 4px; }
.msg { display: flex; align-items: flex-end; gap: 6px; max-width: 86%; }
.msg.grouped { margin-top: -2px; }
.msg.mine { align-self: flex-end; }
.avatar-space { width: 28px; flex: none; }
.msg-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msg-name { font-size: 12px; color: var(--muted); margin-left: 4px; }
.msg-row { display: flex; align-items: flex-end; gap: 4px; }
.msg.mine .msg-row { flex-direction: row-reverse; }
.bubble {
  background: var(--card); border-radius: 16px 16px 16px 4px; padding: 8px 12px;
  box-shadow: var(--shadow); word-break: break-word; font-size: 15px;
}
.msg.mine .bubble { background: #c9f0e4; border-radius: 16px 16px 4px 16px; cursor: pointer; }
.bubble.has-img { padding: 4px; }
.bubble img { display: block; max-width: 220px; max-height: 260px; border-radius: 12px; cursor: zoom-in; }
.bubble.has-img span { display: block; padding: 4px 8px; }
.msg-time { font-size: 11px; color: var(--muted); flex: none; }
.full-img { width: 100%; border-radius: 12px; }

.composer {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(58px + var(--safe-bottom)); z-index: 19;
  width: 100%; max-width: 640px;
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 6px;
}
.quick-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.quick-row::-webkit-scrollbar { display: none; }
.quick {
  flex: none; border: 1.5px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 4px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.composer-row { display: flex; align-items: flex-end; gap: 4px; }
.chat-input { flex: 1; resize: none; border-radius: 20px; padding: 9px 14px; max-height: 120px; line-height: 1.4; }
.send-btn {
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 18px; cursor: pointer;
}

/* ───────── 點名 ───────── */
.roll-strip {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: #3949ab; color: #fff; cursor: pointer;
}
.roll-strip.done { background: var(--primary-dark); }
.roll-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roll-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .3); overflow: hidden; margin: 4px 0 2px; }
.roll-bar span { display: block; height: 100%; background: #ffd54f; border-radius: 999px; transition: width .3s; }
.roll-bar.big { height: 12px; background: var(--bg); }
.roll-bar.big span { background: var(--primary); }
.roll-btn { background: #ffd54f; border-color: #ffd54f; color: #3a2e00; }
.roll-ok { font-weight: 700; font-size: 14px; white-space: nowrap; }
.more { display: flex; flex-direction: column; gap: 14px; }
.roll-card { display: flex; flex-direction: column; gap: 10px; }
.roll-card.live { border: 2px solid #3949ab; }
.roll-card h3 { font-size: 18px; }
.roll-card h4 { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.roll-big { font-size: 18px; text-align: center; }
.roll-big b { font-size: 40px; color: #3949ab; }
.all-here { text-align: center; font-weight: 700; color: var(--primary-dark); background: var(--primary-soft); border-radius: 10px; padding: 8px; }
.roll-list { display: flex; flex-direction: column; gap: 6px; }
.roll-person {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; cursor: pointer;
}
.roll-person.missing { border-color: #f3c0c0; background: #fff6f6; }
.roll-person.here { background: var(--primary-soft); border-color: transparent; }
.tap-hint { color: #3949ab; font-weight: 600; }
.roll-history summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.soon-card { display: flex; align-items: center; gap: 12px; opacity: .75; }
.soon-icon { font-size: 28px; }

/* ───────── 更多：選單與子頁 ───────── */
.menu-grid { display: flex; flex-direction: column; gap: 10px; }
.menu-tile { display: flex; align-items: center; gap: 12px; }
.menu-icon { font-size: 28px; width: 50px; height: 50px; display: grid; place-items: center; background: var(--primary-soft); border-radius: 14px; flex: none; }
.sub-head { display: flex; align-items: center; gap: 10px; }
.sub-head h2 { font-size: 19px; }
.pill { font-size: 13px; font-weight: 700; background: var(--accent-soft); color: #b25516; border-radius: 999px; padding: 2px 10px; }
.pill.ok, .ok { color: var(--primary-dark); }
.pill.ok { background: var(--primary-soft); }

/* ───────── 須知與清單 ───────── */
.check-card { display: flex; flex-direction: column; gap: 8px; }
.check-card h3 { font-size: 17px; }
.notice { border-radius: 12px; background: var(--bg); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.notice.unread { background: var(--accent-soft); border-left: 4px solid var(--accent); }
.notice-text { cursor: pointer; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--bg); }
.check-row > .grow { cursor: pointer; min-width: 0; }
.check-row.done .check-text { text-decoration: line-through; color: var(--muted); }
.checkbox {
  width: 30px; height: 30px; flex: none; border-radius: 9px; border: 2px solid #b9c9c5; background: #fff;
  color: #fff; font-weight: 900; font-size: 17px; cursor: pointer; display: grid; place-items: center;
}
.checkbox.on { background: var(--primary); border-color: var(--primary); }

/* ───────── 投票 ───────── */
.poll { display: flex; flex-direction: column; gap: 8px; }
.poll h3 { font-size: 17px; }
.poll.closed { opacity: .85; }
.closed-tag { color: var(--danger); }
.poll-options { display: flex; flex-direction: column; gap: 8px; }
.poll-opt {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 46px; padding: 8px 12px; text-align: left;
  border: 1.5px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer;
}
.poll-opt:disabled { cursor: default; color: inherit; }
.poll-opt.mine { border-color: var(--primary); }
.poll-opt.win { font-weight: 700; }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: var(--primary-soft); transition: width .3s; z-index: 0; }
.poll-opt.mine .poll-fill { background: #c9f0e4; }
.poll-label, .poll-who { position: relative; z-index: 1; }
.poll-label { flex: 1; }
.poll-who { display: flex; align-items: center; gap: 2px; }
.poll-who b { margin-left: 6px; font-size: 16px; }

/* ───────── 相簿 ───────── */
.album-group { display: flex; flex-direction: column; gap: 8px; }
.album-title { font-size: 16px; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.album-cell { aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: #dde5e3; }
.album-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.viewer { display: flex; flex-direction: column; gap: 10px; }
.viewer-bar { margin-top: 4px; }
.pick-row.strong { border-color: var(--primary); background: var(--primary-soft); }

/* ───────── 天氣 ───────── */
.stop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.stop-chips:empty { display: none; }
.wx { font-size: 13px; background: #eaf3fb; color: #23527a; border-radius: 8px; padding: 1px 8px; text-decoration: none; }
.wx:empty { display: none; }
.wx.rainy { background: #e3e8fb; color: #2f3fa0; font-weight: 600; }
.photo-chip { background: #fbeef3; color: #a2335f; }
.day-head { flex-wrap: wrap; }
.day-wx { font-size: 13px; }

/* ───────── 加到主畫面 ───────── */
.install-card { position: relative; background: linear-gradient(135deg, #e3f5f2, #fff1e6); box-shadow: none; border: 1.5px solid #bfe6de; padding-right: 44px; }
.install-card p { margin: 6px 0 10px; font-size: 14px; }
.install-close { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .7); }
.steps { margin: 8px 0 0; padding-left: 22px; font-size: 14px; }
.steps li { margin: 3px 0; }
.offline-bar { background: #5b6770; color: #fff; text-align: center; font-size: 13px; padding: 4px 8px; }
.warn-card { background: #fff4f4; border-color: #f3b4b4; }
.hint-card { background: #f4f8ff; box-shadow: none; border: 1.5px solid #cfdcf3; }
.hint-card p { margin: 6px 0 0; font-size: 14px; }
