/* uiv2_result.css（A 結果頁，11/17）：只用 u2r- 開頭的新 class，或只掛在 .u2r-card / .u2r-* 底下；不改寫既有 class 的全站樣式。
   模板旗標 uiv2_result 關掉時這些 class 都不會出現。手機 375px 為主；顏色全用 pub.css 的 token（亮／暗自動換）。 */

/* ---------- 價格卡（單一目的地＝第一屏主角；多個目的地＝每張卡同一個樣式） ---------- */
.scard.u2r-card{position:relative;padding:16px 16px 14px;border-radius:20px;overflow:visible}
.scard.u2r-hero{margin-top:var(--s2,8px);border:1.5px solid color-mix(in srgb,var(--bk-b,#7950f0) 32%,var(--line,#dfe5ee));box-shadow:0 8px 28px color-mix(in srgb,var(--bk-b,#7950f0) 14%,transparent)}
.scard.u2r-hero.hit{border-color:color-mix(in srgb,var(--save,#1e9e6a) 55%,var(--line,#dfe5ee))}
.u2r-card .srt{margin:0 0 2px;font-size:1.25rem;line-height:1.25;font-weight:900}
.u2r-card .srt small{font-size:.8125rem;font-weight:600;color:var(--text-2,#475569);margin-left:6px}
.u2r-when{margin:0 0 8px;font-size:.9375rem;font-weight:700;color:var(--text-2,#475569);line-height:1.4}
.u2r-card .efnote{margin:4px 0 8px}

/* 價格區：F 的 .u2-pb 在多張卡片裡略縮，單一目的地維持最大 */
.u2r-card:not(.u2r-hero) .u2-pb .sprice.u2-price b{font-size:2.25rem}
.u2r-hero .u2-pb .sprice.u2-price b{font-size:3rem}
.u2r-card .u2-pb{margin:4px 0 6px}
.u2r-card .u2-save{margin:6px 0 4px}
.u2r-card .u2-bl{margin:6px 0 4px}
.u2r-card:not(.u2r-hero) .u2-bl .buyv span{display:none}      /* 多張卡：燈號只留標題，理由太長，進單一目的地再看 */
.u2r-card:not(.u2r-hero) .u2-bl .buyv{padding-top:8px;padding-bottom:8px}
.u2r-card .u2r-fi{display:flex;flex-wrap:wrap;align-items:center;gap:2px 12px;margin:8px 0 2px;font-size:.875rem;font-weight:600;color:var(--text,#0f172a)}
.u2r-card .u2r-fi .alg{width:24px;height:24px;margin-right:6px;vertical-align:-7px;border-radius:6px}
.u2r-card .doubt{margin:8px 0}
.u2r-card .tcx{margin:8px 0 0}

/* ---------- 兩顆大按鈕：訂票（主）＋降價通知 ---------- */
.u2r-ctas{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:12px 0 0}
.u2r-card:not(.u2r-hero) .u2r-ctas{grid-template-columns:minmax(0,1fr) 52px;align-items:center;gap:8px;margin-top:10px}
.u2r-card a.bk.u2r-buy{display:flex;width:100%;box-sizing:border-box;min-height:56px!important;padding:0 16px;margin:0;border-radius:16px;font-size:1.1875rem;font-weight:800;letter-spacing:.01em;box-shadow:0 6px 18px color-mix(in srgb,var(--bk-b,#7950f0) 32%,transparent)}
.u2r-card:not(.u2r-hero) a.bk.u2r-buy{min-height:52px!important;font-size:1rem;padding:0 10px;border-radius:14px}
/* 通知鈕＝次要樣式（淺底描邊 48px），不跟藍色主鈕搶；全頁（含沒有確切價格的卡）同一套 */
.u2r-card .u2r-watch,.u2r-card .u2r-watch[hidden],.u2r-card .nolive .watch,.u2r-card .nolive .watch[hidden]{display:flex!important;align-items:center;justify-content:center;gap:6px;width:100%;box-sizing:border-box;min-height:48px;margin:0;padding:6px 12px;border-radius:14px;font-size:.9375rem;font-weight:700;line-height:1.25;white-space:normal;text-align:center;background:var(--surface,transparent)!important;color:var(--text,#0f172a)!important;border:1.5px solid var(--line-2,#cbd5e1)!important;box-shadow:none!important;text-shadow:none}
.u2r-card .u2r-watch[aria-pressed="true"]{border-color:color-mix(in srgb,var(--save,#1e9e6a) 60%,transparent)!important}
/* 多個目的地：通知鈕縮成鈴鐺圖示（按了狀態照樣換：🔔→✅） */
.u2r-card .u2r-bell,.u2r-card .u2r-bell[hidden]{width:52px;min-width:52px;min-height:52px;padding:0;font-size:0!important;border-radius:14px}
.u2r-bell::before{content:"🔔";font-size:1.25rem;line-height:1}
.u2r-bell[aria-pressed="true"]::before{content:"✅"}
.u2r-disc{margin:6px 0 0;font-size:.75rem;line-height:1.5;color:var(--text-3,#64748b)}
.u2r-disc .disclose{font-weight:700}
.u2r-ctas .u2r-disc{margin:-2px 0 2px}
.u2r-disc-list{margin:10px 2px 4px}
.u2r-facts{margin:4px 0 0;font-size:.8125rem;line-height:1.5;color:var(--text-2,#475569)}
.u2r-lv{margin:6px 0 4px;font-size:.875rem}

/* 一行小字：Google 航班連結（左）＋分享（右） */
.u2r-sub{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 12px;margin:4px 0 0}
.u2r-card a.bk.gf.u2r-glink,.u2r-card .nolive .bkrow a.bk.gf{display:inline-flex;width:auto;min-height:44px!important;padding:0 2px;margin:0;border:0!important;border-radius:0;background:transparent!important;color:var(--text-2,#475569)!important;font-size:.8125rem;font-weight:600;text-decoration:underline;text-underline-offset:3px;box-shadow:none;text-shadow:none}
.u2r-card a.bk.gf.u2r-glink::after{content:" ↗"}
.u2r-share{flex:0 0 auto;margin-left:auto}
.u2r-share .fx-share>summary{min-height:44px;padding:0 14px;font-size:.875rem}
.u2r-share .fx-share[open]{display:block}
.u2r-hero .u2r-sub:has(.fx-share[open]) .u2r-share{flex-basis:100%;margin-left:0}

/* 價格區的可信度提示收成一行：標籤右側放小按鈕「重新確認」，失敗說明文字不再另佔一行 */
.u2r-card .u2-cert-row{align-items:center}
.u2r-card .u2-pb .recheck.failed{display:none}
.u2r-card .u2-cert-row .u2-retry{position:relative;margin:0 0 0 auto;min-height:32px;padding:0 12px;border:1px solid var(--line-2,#cbd5e1);border-radius:999px;background:var(--surface,transparent);color:var(--text,#0f172a);font-size:.8125rem;font-weight:700;text-decoration:none}
.u2r-card .u2-cert-row .u2-retry::before{content:"↻ "}
.u2r-card .u2-cert-row .u2-retry::after{content:"";position:absolute;inset:-6px -2px}
.u2r-card .u2-pb:has(.recheck.wait) .u2-retry{display:none}
.u2r-card .u2-cert-row .u2-retry.u2r-busy{pointer-events:none;opacity:.7}

/* ---------- 住宿大區（C 的 .u2s）在結果頁：只放 2 張精選、卡片壓矮，大按鈕一定看得到 ---------- */
.u2r-stay .u2s{margin:12px 0;padding:14px}
.u2r-stay .u2s-h{font-size:1.125rem}
.u2r-stay .u2s-sub{margin-bottom:6px}
.u2r-stay .u2s-list{gap:8px;margin:8px 0}
.u2r-stay .u2s-card:nth-child(n+3){display:none}
.u2r-stay .u2s-card{padding:10px 12px}
.u2r-stay .u2s-ph{flex-basis:56px;width:56px;height:56px}
.u2r-stay .u2s-name{font-size:1rem}
.u2r-stay .u2s-why{margin-top:4px;font-size:.875rem;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.u2r-stay .u2s-px{display:none}
.u2r-stay .u2s-go{min-height:28px;margin-top:4px}
.u2r-stay .u2s-all{margin-top:8px}

/* ---------- 地球縮成小條（功能保留：照樣可以拖、可以點目的地） ---------- */
.u2r-globewrap{position:relative;margin:12px 0 4px}
.u2r-gl{position:absolute;left:12px;top:8px;z-index:2;margin:0;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,.78);color:#334155;font-size:.6875rem;font-weight:700;pointer-events:none}
.u2r-globewrap .globebox.gb-res.gb-band{margin-bottom:0}
/* 地球上的價格卡（.gpanel）：規則放在檔案最後面（單一目的地捲回價格卡、多個目的地浮卡） */
@media (max-width:600px){.globebox.gb-res.gb-u2m{height:150px;max-height:150px}}
.u2r-globewrap .globebox.gb-res{margin-top:0}

/* ---------- 其他日期（單一目的地：自己的小標題；多張卡：收合） ---------- */
.scard.u2r-more{padding:14px 14px 12px;border-radius:18px}
.scard.u2r-more:not(:has(*)){display:none}
.u2r-more .u2r-h{margin:0 0 4px;font-size:1.0625rem;font-weight:900}
.u2r-more .u2r-h:has(~ .u2f[hidden]):not(:has(~ .u2r-alt)){display:none}      /* 熱力圖沒資料、也沒有其他日期可列：整個「改日期」區不留空標題 */
.u2r-alt{margin:10px 0 0;border-top:1px solid var(--line,#dfe5ee)}
.u2r-alt>summary{display:flex;align-items:center;gap:8px;min-height:48px;cursor:pointer;list-style:none;font-size:.9375rem;font-weight:800;color:var(--text,#0f172a)}
.u2r-alt>summary::-webkit-details-marker{display:none}
.u2r-alt>summary::after{content:"▾";margin-left:auto;font-size:.8em;color:var(--text-2,#475569)}
.u2r-alt[open]>summary::after{content:"▴"}
/* 多個目的地：每張卡一列精簡（城市＋價格＋標籤＋訂票＋鈴鐺），其他日期收合 */
.scard.u2r-card:not(.u2r-hero){padding:12px 14px;border-radius:18px}
.u2r-card:not(.u2r-hero) .srt{font-size:1.125rem}
.u2r-card:not(.u2r-hero) .u2r-when{margin-bottom:4px;font-size:.875rem}
.u2r-card:not(.u2r-hero) .u2r-dates{margin-top:6px}
.u2r-card:not(.u2r-hero) .u2r-dates>summary{min-height:40px;font-size:.875rem;font-weight:700;color:var(--text-2,#475569)}
.u2r-card:not(.u2r-hero) .nolive .bknote,.u2r-card:not(.u2r-hero) .nolive .bkrow .disclose{display:none}
.u2r-dates{margin:10px 0 0;border-top:1px solid var(--line,#dfe5ee)}
.u2r-dates>summary{display:flex;align-items:center;gap:8px;min-height:48px;cursor:pointer;list-style:none;font-size:.9375rem;font-weight:800;color:var(--text,#0f172a)}
.u2r-dates>summary::-webkit-details-marker{display:none}
.u2r-dates>summary::after{content:"▾";margin-left:auto;font-size:.8em;color:var(--text-2,#475569)}
.u2r-dates[open]>summary::after{content:"▴"}

/* ---------- 沒有確切價格（估價範圍／參考價／還在查／遠日期）：沿用原本內容，只把按鈕排成同一套 ---------- */
.u2r-card .nolive{display:flex;flex-direction:column}
.u2r-card .nolive .sprice{gap:2px 8px}
.u2r-card .nolive .sprice b{font-size:clamp(1.5rem,7vw,2.25rem);white-space:normal;line-height:1.15}
.u2r-hero .nolive .sprice b{font-size:clamp(1.5rem,7.4vw,2.5rem)}
.u2r-card .miss{font-size:.9375rem;font-weight:600;line-height:1.55;margin:8px 0 0}
.u2r-card .nolive .bkrow{order:1;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:6px 10px;margin:12px 0 0}
.u2r-card .nolive .bkrow a.bk:not(.gf){flex:1 1 100%;width:100%;box-sizing:border-box;min-height:56px!important;border-radius:16px;font-size:1.125rem;font-weight:800;box-shadow:0 6px 18px color-mix(in srgb,var(--bk-b,#7950f0) 32%,transparent)}
.u2r-card .nolive .bkrow .disclose{flex:1 1 100%}
.u2r-card .nolive>p:has(.watch){order:2;margin:10px 0 0}
.u2r-card .nolive>p[hidden]:has(.watch){display:block!important}      /* 地球程式會把「同一組」的降價通知鈕所在的 p 藏起來；新版這顆是主按鈕，不能被藏 */
.u2r-card .nolive .watch[hidden]{display:flex!important}
.u2r-card .nolive .bknote{order:3}
.u2r-card .nolive .bkrow:has(a.bk.gf){order:4;margin-top:2px}
.u2r-card .nolive>*:not(.bkrow):not(p):not(.bknote){order:0}

/* ---------- 固定在底部的價格＋訂票條：和第一屏同一個風格（只在新版結果頁） ---------- */
body:has(.u2r-hero) .bkdock{border-radius:20px;border:1.5px solid color-mix(in srgb,var(--bk-b,#7950f0) 32%,var(--line-2,#cbd5e1));box-shadow:0 10px 30px color-mix(in srgb,var(--bk-b,#7950f0) 26%,rgba(20,40,80,.2));padding:8px 8px 8px 16px}
body:has(.u2r-hero) .bkdock .bkd-p b{font-size:1.5rem;font-weight:800}
body:has(.u2r-hero) .bkdock a.bk{min-height:52px!important;border-radius:14px;font-size:1.0625rem;font-weight:800;padding:0 18px}

/* 第三輪：頁尾本身已有「訂票條＋導覽列」的底部留白（pub.css .foot），主內容不再多留 150px（原本和頁尾疊加成約 300px 空白） */
body:has(.u2r-card) main,body:has(.u2r-card) #main{padding-bottom:var(--s4,16px)}

/* 第三輪：熱力圖在畫面中時，底部固定訂票條讓位（uiv2_result.js 加 .u2r-yield） */
.bkdock.u2r-yield{display:none!important}

/* ---------- 進場：價格區淡入（尊重「減少動態」） ---------- */
@keyframes u2rIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes u2rFlash{0%{background:color-mix(in srgb,var(--save,#1e9e6a) 28%,transparent)}100%{background:transparent}}
.u2r-hero .u2-pb,.u2r-hero .u2r-ctas{animation:u2rIn .32s ease-out both}
.u2r-hero .u2-price b.u2r-flash{animation:u2rFlash 1.1s ease-out;border-radius:8px}
@media (prefers-reduced-motion:reduce){.u2r-hero .u2-pb,.u2r-hero .u2r-ctas,.u2r-hero .u2-price b.u2r-flash{animation:none}}
@media print{.u2r-globewrap{display:none}}

/* ================= 第二輪（11/17）：表單／摘要列／每月低價概覽／地球價格卡 ================= */

/* 日期欄：空的時候寫「選日期」（pub.js 會在空值日期欄加 .empty；手機空欄位原本只剩日曆圖示）。這裡只對新版表單（.u2r-form）加強：字更清楚、整格都能點 */
.u2r-form .u2r-fld{position:relative}
.u2r-form .u2r-fld input[type=date]{position:relative}
.u2r-form .u2r-fld:has(input[type=date].empty:not(:focus))::after{content:attr(data-u2-ph);position:absolute;left:12px;bottom:12px;color:var(--text-2,#475569);font-size:1rem;font-weight:700;line-height:1.2;pointer-events:none}
.u2r-form .u2r-fld input[type=date].empty:not(:focus){color:transparent}
.u2r-form .u2r-fld input[type=date].empty:not(:focus)::-webkit-calendar-picker-indicator{opacity:0;position:absolute;inset:0;width:auto;height:auto}
/* 轉機：縮成小 chip（同一個 select，功能不變），不再佔整列 */
.qform.u2r-form .u2r-chip{flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;width:max-content;max-width:100%;min-height:40px;padding:0 6px 0 14px;border-radius:999px}
.u2r-chip span{flex:none;font-size:.8125rem;white-space:nowrap}
.qform.u2r-form .u2r-chip select{width:auto;min-height:38px;padding:0 24px 0 2px;font-size:.9375rem;font-weight:800}
/* 搜尋摘要列（手機收成一行的「台北 → 東京・12/1–12/5・1 人」）：人數不拆行、不被切 */
.u2r-form .qsum{height:auto;min-height:48px;align-items:center}
.u2r-form .qsum>span{min-width:0;overflow-wrap:anywhere}
.u2r-form .qsum [data-pax-label]{white-space:nowrap;display:inline-block}
.u2r-form .qsum i{white-space:nowrap}

/* ---------- 沒填日期：每個月最低價概覽（資料＝網站日期價格表） ---------- */
.u2r-ov{margin:14px 0 6px}
.u2r-ovh{margin:0 0 2px;font-size:1.1875rem;font-weight:900;line-height:1.3}
.u2r-ovsub{margin:0 0 10px;font-size:.875rem;line-height:1.5;color:var(--text-2,#475569)}
.u2r-ovl{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.u2r-ovc{display:flex;flex-direction:column;gap:2px;min-height:96px;box-sizing:border-box;padding:12px 14px;border-radius:18px;border:1.5px solid var(--line,#dfe5ee);background:var(--surface,#fff);color:var(--text,#0f172a);text-decoration:none}
.u2r-ovc:active{transform:scale(.98)}
.u2r-ovc.is-best{border-color:color-mix(in srgb,var(--save,#1e9e6a) 55%,var(--line,#dfe5ee));box-shadow:0 4px 16px color-mix(in srgb,var(--save,#1e9e6a) 14%,transparent)}
.u2r-ovm{display:flex;align-items:center;gap:6px;font-size:.9375rem;font-weight:800;color:var(--text-2,#475569)}
.u2r-ovm em{font-style:normal;font-size:.6875rem;font-weight:800;padding:1px 7px;border-radius:999px;background:color-mix(in srgb,var(--save,#1e9e6a) 16%,transparent);color:var(--save,#1e9e6a)}
.u2r-ovp{font-size:1.5rem;font-weight:900;line-height:1.2;letter-spacing:-.01em;white-space:nowrap}
.u2r-ovp .approx{font-size:.8125rem;font-weight:700;margin-right:2px;color:var(--text-2,#475569)}
.u2r-ovd,.u2r-ovn{font-size:.8125rem;line-height:1.4;color:var(--text-2,#475569)}
.u2r-ovn{font-weight:700}
.u2r-ovnote{margin:10px 2px 0}

/* ---------- 地球價格卡（gpanel）：點地球上的目的地要看得到價格 ----------
   單一目的地：價格卡就在第一屏 → 點地球時捲回價格卡並閃一下（uiv2_result.js），地球上的重複卡不開。
   多個目的地：地球卡片改成浮在畫面下方的小浮卡（價格＋訂票鈕），不用在頁底找 */
/* 第三輪：載入時地球程式自動打開的卡片一律收起；使用者點地球上的目的地才加 .u2r-gp-on（uiv2_result.js）才顯示 */
.u2r-globewrap:not(.u2r-gp-on) .gpanel{display:none!important}
body:has(.u2r-card:not(.u2r-hero)) .u2r-globewrap.u2r-gp-on .gpanel:not([hidden]){display:grid!important;position:fixed;left:12px;right:12px;bottom:calc(72px + env(safe-area-inset-bottom,0px));top:auto;margin:0;z-index:60;max-height:55vh;overflow:auto;padding-right:40px;background:var(--surface,#fff);color:var(--text,#0f172a);box-shadow:0 12px 36px rgba(20,40,80,.28)}
.u2r-gx{position:absolute;top:6px;right:6px;width:36px;height:36px;border:0;border-radius:999px;background:var(--surface-2,#eef2f7);color:var(--text,#0f172a);font-size:1.125rem;line-height:1;cursor:pointer}
@keyframes u2rPing{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--bk-b,#7950f0) 55%,transparent)}100%{box-shadow:0 0 0 18px transparent}}
.u2r-hero.u2r-ping{animation:u2rPing .9s ease-out 1}
@media (prefers-reduced-motion:reduce){.u2r-hero.u2r-ping{animation:none}}
