/* uiv2 E：彈性日期熱力圖。所有 class 都是 u2f- 開頭，不改寫既有樣式。 */
.u2f-sen{display:block;height:1px;margin:0;padding:0}
.u2f{
  /* 色階：由便宜到較貴，深色／淺色兩套 */
  --h1:#3ddc97;--h1t:#03210f;--h2:#27805c;--h2t:#ffffff;--h3:#1d4d44;--h3t:#eaf0fd;--h4:#172b48;--h4t:#eaf0fd;--h5:#141f3b;--h5t:#aab7d4;
  /* 底部固定訂票條（約 60px 高、離底 68px）：區塊下方留空間，錨點跳轉時也不被蓋住 */
  margin:16px 0 28px;padding:14px 12px 12px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg,18px);box-shadow:var(--shadow);min-width:0;max-width:100%;
  scroll-margin-top:76px;scroll-margin-bottom:160px;
}
html[data-theme="light"] .u2f{--h1:#0f7a5a;--h1t:#ffffff;--h2:#5cb596;--h2t:#052a1a;--h3:#a9dcc8;--h3t:#0f172a;--h4:#dcefe8;--h4t:#0f172a;--h5:#f1f5f9;--h5t:#475569}
@media (prefers-color-scheme:light){html:not([data-theme="dark"]):not([data-theme="hunter"]) .u2f{--h1:#0f7a5a;--h1t:#ffffff;--h2:#5cb596;--h2t:#052a1a;--h3:#a9dcc8;--h3t:#0f172a;--h4:#dcefe8;--h4t:#0f172a;--h5:#f1f5f9;--h5t:#475569}}
.u2f[hidden]{display:none}
.u2f-t{margin:0 0 6px;font-size:17px;line-height:1.35;font-weight:800;color:var(--text)}
/* 結果頁（A）已經有「改日期，哪天比較省」標題時，這裡的標題只留給讀螢幕的人，同一件事不講兩次 */
.u2r-h + .u2f-sen + .u2f .u2f-t{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.u2f-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* 最上面的重點條：最便宜那格＋價差一句；被底部訂票條擋掉下面的格子時，這一條仍然看得到 */
.u2f-best{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;padding:10px 12px;border-radius:14px;border:1px solid var(--save);background:color-mix(in srgb,var(--save) 10%,transparent);font-size:14px;line-height:1.4;color:var(--text)}
.u2f-best:empty{display:none}
.u2f-bt-l{display:flex;flex-direction:column;gap:2px;min-width:0}
.u2f-bt-k{font-size:14px;font-weight:700;color:var(--text)}
.u2f-bt-k b{font-family:var(--num);font-weight:800}
.u2f-bt-r{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;color:var(--text-2)}
.u2f-bt-p{font-family:var(--num);font-size:24px;line-height:1.15;font-weight:800;color:var(--save);font-variant-numeric:tabular-nums}
.u2f-bt-s{font-size:13px;font-weight:700;color:var(--save)}
.u2f-bt-a{flex:0 0 auto;display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border-radius:var(--pill,999px);border:1px solid var(--save);color:var(--save);font-weight:700;font-size:14px;text-decoration:none;white-space:nowrap}

/* 左邊「幾晚」欄獨立在捲動區外，不再蓋住第一欄日期；每列高度 50（格子 44 ＋ 上下各 3），表頭 40 */
.u2f-wrap{display:flex;align-items:flex-start;min-width:0;max-width:100%}
.u2f-lab{flex:0 0 44px;width:44px;box-sizing:border-box;border-right:1px solid var(--line)}
.u2f-lab:empty{display:none}
.u2f-lh{height:40px}
.u2f-lr{height:50px;box-sizing:border-box;display:flex;align-items:center;padding-right:4px;font-size:13px;font-weight:700;color:var(--text-2);white-space:nowrap}
.u2f-lr.sel{color:var(--brand)}
.u2f-sc{flex:1 1 auto;min-width:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;max-width:100%;margin:0;padding:0 0 6px;scrollbar-width:thin;scroll-snap-type:x proximity}
.u2f-sc:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:8px}
.u2f-tb{border-collapse:collapse;border-spacing:0;table-layout:fixed;margin:0}
.u2f-tb th,.u2f-tb td{padding:0;text-align:center;font-weight:400;box-sizing:border-box;width:56px}
.u2f-tb td{height:auto;padding:3px;line-height:0;vertical-align:top}
.u2f-tb th.gap,.u2f-tb td.gap{border-left:2px solid var(--line)}
.u2f-tb thead th{height:40px;font-size:12px;line-height:1.2;color:var(--text-2);vertical-align:bottom;padding-bottom:3px;scroll-snap-align:start}
.u2f-tb thead th small{display:block;font-size:11px;color:var(--text-3)}
.u2f-tb thead th.sel{color:var(--brand);font-weight:800}
.u2f-tb thead th.sel small{color:var(--brand)}
.u2f-c{position:relative;display:flex;margin:0;align-items:center;justify-content:center;width:50px;height:44px;border-radius:9px;font-family:var(--num);font-size:15px;font-weight:700;text-decoration:none;box-sizing:border-box;font-variant-numeric:tabular-nums;-webkit-tap-highlight-color:transparent}
.u2f-c.l1{background:var(--h1);color:var(--h1t)}
.u2f-c.l2{background:var(--h2);color:var(--h2t)}
.u2f-c.l3{background:var(--h3);color:var(--h3t)}
.u2f-c.l4{background:var(--h4);color:var(--h4t)}
.u2f-c.l5{background:var(--h5);color:var(--h5t)}
.u2f-c.none{background:transparent;color:var(--text-3);font-weight:400;opacity:.5}
a.u2f-c:hover{filter:brightness(1.08)}
a.u2f-c:active{transform:scale(.95)}
a.u2f-c:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.u2f-c.sel{outline:3px solid var(--brand);outline-offset:-1px;z-index:1}
.u2f-c .u2f-mk{color:inherit;position:absolute;top:1px;left:4px;font-size:9px;line-height:1;font-weight:700;opacity:.95}
.u2f-c .u2f-ck{color:inherit;position:absolute;top:1px;right:4px;font-size:10px;line-height:1;font-weight:800}
.u2f-key{display:flex;flex-wrap:wrap;gap:4px 14px;list-style:none;margin:8px 0 0;padding:0;font-size:12px;color:var(--text-2)}
.u2f-key li{display:inline-flex;align-items:center;gap:5px}
.u2f-sw{display:inline-block;width:14px;height:14px;border-radius:4px;border:1px solid var(--line-2)}
.u2f-sw.l1{background:var(--h1)}.u2f-sw.l3{background:var(--h3)}.u2f-sw.l5{background:var(--h5)}
.u2f-sw.sel{background:transparent;border:2px solid var(--brand)}
.u2f-key .u2f-mk{font-size:11px;color:var(--save)}
.u2f-note{margin:6px 0 0;font-size:12px;line-height:1.5;color:var(--text-3)}
@media (prefers-reduced-motion:reduce){a.u2f-c:active{transform:none}}

.u2f-empty{display:none;margin:0;font-size:14px;line-height:1.6;color:var(--text-2)}
.u2f-empty a{display:inline-block;margin-left:6px;padding:2px 10px;border-radius:var(--pill,999px);border:1px solid var(--brand);color:var(--brand);font-weight:700;text-decoration:none;white-space:nowrap}
.u2f.is-empty .u2f-empty{display:block}
.u2f.is-empty .u2f-best,.u2f.is-empty .u2f-wrap,.u2f.is-empty .u2f-key,.u2f.is-empty .u2f-note{display:none}
.u2f-c.cal{background-image:repeating-linear-gradient(90deg,currentColor 0 3px,transparent 3px 6px);background-repeat:no-repeat;background-size:100% 2px;background-position:0 calc(100% - 4px)}
