/* ══════════════════════════════════════════════════════════════════════════
   weather 路線設定 ›「每個點的抵達時間」（2026-11-15 整體優化第 5 班第一段；定稿原型 Version 17 的「訂時間」）
   手機面板與桌機面板同一份清單（#wp-list），所以不分寬度。放在頁內 <style>、weather.css 之後，同權重以這裡為準。

   一列＝拖曳把手｜序號｜名字＋距上一點多久｜抵達時間（按一下展開改時間）｜⋯（更多動作）
   每一天一條標題，按一下收起；順序不對的點所在那一天一律打開（頁面那邊處理）。
   可以按的東西都至少 44 高（手指）；字最小 12px。
   ══════════════════════════════════════════════════════════════════════════ */

#wp-list.wpt { gap: 6px; }

/* ── 整條行程一起挪 ── */
.wpt-shift {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  margin: 2px 0 2px;
}
.wpt-shift__label { font-size: 12.5px; line-height: 1.35; color: rgba(214, 222, 235, 0.82); padding-right: 2px; }
.wpt-shift button {
  min-height: 44px;
  padding: 0 2px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--pk-white, #fff);
  font: 600 12.5px var(--pk-font-family);
  white-space: nowrap;
  cursor: pointer;
}
.wpt-shift button:hover { border-color: rgba(230, 179, 138, 0.7); }

/* 有點的時間已經過了 */
.wpt-past-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(242, 195, 143, 0.12);
  color: #F7D9B5;
  font-size: 13px;
  line-height: 1.55;
}
.wpt-past-note .pk-i { flex: none; margin-top: 2px; }

/* ── 每一天的標題（按一下收起；拖曳時靠它判斷落在哪一天，所以仍是 .wp-day-header、帶 data-date） ── */
#wp-list.wpt .wp-day-header { padding: 4px 0 0; letter-spacing: 0; text-transform: none; }
#wp-list.wpt .wp-day-header:first-child { padding-top: 0; }
.wpt-dayh {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: rgba(214, 222, 235, 0.86);
  font: 700 13px var(--pk-font-family);
  font-variant-numeric: tabular-nums;
  text-align: left;
  cursor: pointer;
}
.wpt-dayh b {
  flex: none;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--pk-amber-soft, #E6B38A);
  color: #1E2330;
  font-size: 12.5px;
}
.wpt-dayh__txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpt-dayh__sp { flex: 1; }
.wpt-dayh .pk-i { flex: none; opacity: 0.8; }

/* ── 一列 ── */
#wp-list.wpt .wp-item {
  display: grid;
  grid-template-columns: 30px 24px minmax(0, 1fr) auto 44px;
  gap: 6px;
  align-items: center;
  min-height: 58px;
  padding: 2px 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  overflow: visible;
  position: relative;
}
#wp-list.wpt .wp-item[hidden] { display: none; }
#wp-list.wpt .wp-item--warn { border-color: rgba(242, 195, 143, 0.85); }
#wp-list.wpt .wp-item.is-editing { border-color: var(--pk-amber-soft, #E6B38A); }
#wp-list.wpt .wp-item.is-past > :not(.wpt-menu) { opacity: 0.62; }

#wp-list.wpt .wp-item__handle {
  width: 30px;
  height: 52px;
  border: 0;
  background: none;
  border-radius: 10px 0 0 10px;
}
#wp-list.wpt .wp-item__seq {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(174, 189, 212, 0.18);
  color: var(--pk-white, #fff);
  font-size: 12px;
  line-height: 24px;
  text-align: center;
  display: block;
}
#wp-list.wpt .wp-item--warn .wp-item__seq { background: rgba(242, 195, 143, 0.28); color: #F7D9B5; }
#wp-list.wpt .wp-item__body { padding: 0; min-width: 0; }
#wp-list.wpt .wp-item__name { font-size: 14px; margin: 0; }
.wpt-sub {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(214, 222, 235, 0.74);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wpt-sub.is-bad { color: #F2C38F; }
.wpt-sub .pk-i { flex: none; }

/* 改名時名字那一格換成輸入框（16px：iOS 才不會自己放大畫面） */
.wpt-renin {
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--pk-amber-soft, #E6B38A);
  background: rgba(10, 14, 24, 0.6);
  color: var(--pk-white, #fff);
  font: 600 16px var(--pk-font-family);
}

/* 抵達時間：按一下展開改時間 */
.wpt-time {
  min-width: 66px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 14, 24, 0.45);
  color: var(--pk-white, #fff);
  font: 600 15.5px var(--pk-font-family);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.wpt-time[aria-expanded="true"] { border-color: var(--pk-amber-soft, #E6B38A); box-shadow: inset 0 -3px 0 var(--pk-amber-soft, #E6B38A); }
.wp-item--warn .wpt-time { border-color: rgba(242, 195, 143, 0.85); }

.wpt-more {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: rgba(214, 222, 235, 0.86);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.wpt-more:hover, .wpt-more[aria-expanded="true"] { background: rgba(255, 255, 255, 0.08); }

/* ⋯ 選單 */
.wpt-menu {
  position: absolute;
  right: 4px;
  top: calc(100% - 4px);
  z-index: 6;
  min-width: 210px;
  padding: 6px;
  border-radius: 12px;
  background: #F5F1E8;
  color: #1E2330;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}
.wpt-menu button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #1E2330;
  font: 500 14px var(--pk-font-family);
  text-align: left;
  cursor: pointer;
}
.wpt-menu button:hover, .wpt-menu button:focus-visible { background: #E8E1D6; outline: none; }
.wpt-menu button.is-danger { color: #9E2F2F; }

/* ── 改時間 ── */
.wpt-ted {
  margin: -2px 0 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--pk-amber-soft, #E6B38A);
  background: rgba(10, 14, 24, 0.55);
}
.wpt-ted__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wpt-ted__lbl { width: 44px; font-size: 13px; color: rgba(214, 222, 235, 0.82); }
.wpt-ted__days { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.wpt-ted__days button, .wpt-ted__mm button, .wpt-ted__step {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--pk-white, #fff);
  font: 600 13.5px var(--pk-font-family);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.wpt-ted__days button { min-width: 52px; padding: 2px 6px; display: grid; place-items: center; line-height: 1.15; }
.wpt-ted__days button small { font-size: 12px; font-weight: 500; color: rgba(214, 222, 235, 0.8); }
.wpt-ted__days button[aria-pressed="true"], .wpt-ted__mm button[aria-pressed="true"] {
  border-color: var(--pk-amber-soft, #E6B38A);
  background: rgba(230, 179, 138, 0.2);
}
.wpt-ted__days button:disabled { opacity: 0.38; cursor: default; }
.wpt-ted__step { width: 44px; display: grid; place-items: center; }
.wpt-ted__hh { min-width: 34px; text-align: center; font: 600 24px var(--pk-font-family); font-variant-numeric: tabular-nums; color: var(--pk-white, #fff); }
.wpt-ted__mm { display: flex; gap: 6px; margin-left: auto; }
.wpt-ted__mm button { width: 50px; }
.wpt-casc { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 13.5px; color: var(--pk-white, #fff); cursor: pointer; }
.wpt-casc input { width: 20px; height: 20px; accent-color: #E6B38A; }
.wpt-ted__ok {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--pk-white, #fff);
  font: 700 14px var(--pk-font-family);
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 底下那一行「第 N 點比第 N−1 點早」：原本的 #wp-warn，字放大一點、用軟琥珀 */
#wp-warn.wp-warn-msg { font-size: 13px; line-height: 1.5; }

/* 底下放不下（被「查詢天氣」那一條蓋住）就往上開 */
.wpt-menu.is-up { top: auto; bottom: calc(100% - 4px); }

/* ══════════════════════════════════════════════════════════════════════════
   出發日：三週月曆（2026-11-15 第 5 班第二段；取代原本那一排日期鈕）
   視窗是淺色卡片（var(--pk-mist)）。一格至少 44 高；字最小 11.5px 的小標（月份、今天、D1）。
   ══════════════════════════════════════════════════════════════════════════ */
.dcal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0 8px;
}
.dcal__wd { text-align: center; font-size: 12px; font-weight: 600; color: #5B6577; padding-bottom: 2px; }
.dcal__d {
  min-height: 50px;
  padding: 3px 0;
  border-radius: 10px;
  border: 1px solid rgba(30, 35, 48, 0.12);
  background: #fff;
  color: #1E2330;
  font: 500 13px var(--pk-font-family);
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  cursor: pointer;
}
.dcal__d b { font-size: 15px; font-weight: 700; }
.dcal__d small { font-size: 11.5px; color: #5B6577; }
.dcal__d.is-we b { color: #A04A3C; }
.dcal__d.is-span { background: rgba(196, 132, 90, 0.18); border-color: rgba(196, 132, 90, 0.45); }
.dcal__d.is-start { background: #A16743; border-color: #A16743; color: #fff; }
.dcal__d.is-start b, .dcal__d.is-start small { color: #fff; }
.dcal__d.is-cur { outline: 2px dashed #5B6577; outline-offset: -4px; }
.dcal__d.is-today:not(.is-start) { border-color: #1E2330; }
.dcal__d:disabled { background: transparent; border-color: rgba(30, 35, 48, 0.06); color: #9AA2B1; cursor: default; }
.dcal__d:disabled b, .dcal__d:disabled small { color: #9AA2B1; }
.dcal__d.is-out { background: repeating-linear-gradient(135deg, rgba(196, 132, 90, 0.12) 0 4px, transparent 4px 8px); }
.dcal__d:focus-visible { outline: 3px solid #4A6FA5; outline-offset: 1px; }
.dcal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #5B6577; margin-bottom: 8px; }
.dcal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dcal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.dcal-legend .lg-start { background: #A16743; }
.dcal-legend .lg-span { background: rgba(196, 132, 90, 0.3); }
.dcal-legend .lg-cur { outline: 2px dashed #5B6577; outline-offset: -2px; }
.dcal-legend .lg-we { background: #A04A3C; width: 6px; border-radius: 50%; height: 6px; }
.dcal-sum { font-size: 13.5px; line-height: 1.6; color: #1E2330; margin-bottom: 12px; }
.dcal-sum .dcal-warn { display: flex; gap: 6px; align-items: flex-start; color: #8A4B1F; margin-top: 2px; }
.dcal-sum .dcal-warn .pk-i { flex: none; margin-top: 3px; }
.dcal-sum .dcal-first { display: block; color: #5B6577; }

/* ══════════ 精選清單：天數篩選、南北配色說明、每張卡的一行（2026-11-15 第 5 班第二段；面板是深色） ══════════ */
.pday { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.pday button {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--pk-white, #fff);
  font: 600 13.5px var(--pk-font-family);
  cursor: pointer;
}
.pday button span { margin-left: 2px; font-weight: 500; color: rgba(214, 222, 235, 0.8); font-variant-numeric: tabular-nums; }
.pday button[aria-pressed="true"] { background: rgba(230, 179, 138, 0.2); border-color: var(--pk-amber-soft, #E6B38A); }
.pday button:disabled { opacity: 0.4; cursor: default; }
.platleg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 2px 8px; font-size: 12px; color: rgba(214, 222, 235, 0.78); }
.platleg__bar { display: inline-flex; align-items: center; gap: 5px; }
.platleg__bar b { font-weight: 600; }
.platleg__bar i { display: inline-block; width: 64px; height: 8px; border-radius: 4px; }
.panel-route-card__sub { font-size: 12px; line-height: 1.45; color: rgba(214, 222, 235, 0.74); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ══════════ 路線設定的第一列：最近查過（2026-11-15 第 5 班第二段；只有手機面板與桌機新面板有） ══════════ */
.msh-srecent { margin: 2px 0 10px; }
.msh-srecent[hidden] { display: none; }
.msh-srow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.msh-srow button {
  flex: 0 0 auto;
  max-width: 220px;
  min-height: 52px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--pk-white, #fff);
  font-family: var(--pk-font-family);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
.msh-srow button b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 196px; }
.msh-srow button small { font-size: 12px; color: rgba(214, 222, 235, 0.8); white-space: nowrap; }
.msh-srow button[aria-busy="true"] { border-color: var(--pk-amber-soft, #E6B38A); }

/* 從別的地方帶進來的（行程、連結）：清單最上面一行 */
.wpt-srcnote {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(174, 189, 212, 0.12);
  color: rgba(226, 232, 242, 0.92);
  font-size: 13px;
  line-height: 1.55;
}
.wpt-srcnote .pk-i { flex: none; margin-top: 2px; }

/* 「訂時間 ⓘ 每個點都有自己的抵達時間…」那一列：標題被右邊那句擠成直排（「訂時／間」，375 寬的手機上一直是這樣）——標題不縮、右邊那句照舊省略 */
#tab-custom .wp-info-row__label { flex: none; white-space: nowrap; }

/* 月曆比原本那一排日期鈕高很多：矮的視窗（手機橫拿、系統字放大）確認鈕會被切掉——卡片放不下就自己捲（審查 12）。
   原本的 overflow:hidden 是怕出現沒必要的捲軸；auto 只在真的放不下時才出現。 */
#date-modal .date-modal__card { max-height: calc(100dvh - 24px); overflow-y: auto; }
