/* 三份旅程攻略與首頁共用的樣式（以新加坡版為基準） */
:root{--navy:#0b2235;--blue:#128da1;--bg:#f3f7f8;--text:#1e3040;--muted:#637586;--line:#e4eaee}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.65 system-ui,-apple-system,"Noto Sans TC","Microsoft JhengHei",sans-serif}
a{color:#087c96;text-decoration:none}
a:hover{text-decoration:underline}
section{scroll-margin-top:64px}

/* 頂部提醒 */
.offline-note{margin:12px auto;padding:13px 16px;max-width:1100px;background:#fff3d6;color:#744700;border-radius:12px;font-size:14px;line-height:1.6}

/* 頁首 */
header{background:linear-gradient(120deg,#092238,#135c70 75%,#168c89);color:#fff;padding:45px max(20px,calc((100vw - 1120px)/2)) 46px}
header h1{font-size:clamp(29px,4vw,48px);line-height:1.22;margin:9px 0 13px}
header p{color:#cde1e7;max-width:850px;margin:0}
.tag{display:inline-block;padding:4px 11px;border:1px solid #ffffff66;border-radius:100px;font-size:12px;letter-spacing:.05em}

/* 版面與卡片 */
.wrap{max-width:1120px;margin:auto;padding:22px 18px 70px}
.facts{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:-45px;position:relative}
.fact,.panel,.day{background:#fff;border:1px solid var(--line);box-shadow:0 8px 25px #123b5010;border-radius:16px}
.fact{padding:19px}
.fact .v{font-size:21px;font-weight:800;color:#123f52}
.label{font-size:12px;color:var(--muted)}
.panel{margin-top:18px;padding:22px}
.panel h2{font-size:20px;margin:0 0 12px}
.panel h3{font-size:16px;margin:4px 0 8px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.note{font-size:13px;color:var(--muted)}
.notice{background:#fff4dc;padding:14px 17px;border-left:4px solid #d88d16;border-radius:8px}
.notice.good{background:#e8f6f2;border-left-color:#139277}
.notice.info{background:#e8f3f8;border-left-color:#128da1}

/* 頁內導覽（可左右滑） */
.nav{display:flex;overflow-x:auto;gap:9px;padding:12px 0;position:sticky;top:0;z-index:5;background:#f3f7f8ee;backdrop-filter:blur(10px);scrollbar-width:none}
.nav::-webkit-scrollbar{display:none}
.nav a{white-space:nowrap;padding:8px 15px;background:#fff;border:1px solid #dbe6ea;border-radius:100px;color:#17475b;font-weight:700;transition:background .15s,color .15s}
.nav a:hover{background:#daf0ee;text-decoration:none}
.nav a.active{background:#112f43;border-color:#112f43;color:#fff}

/* 每日行程卡 */
.day{overflow:hidden;margin:20px 0}
.dayhead{background:#112f43;color:#fff;padding:22px 24px;display:flex;justify-content:space-between;gap:12px}
.dayhead h2{font-size:23px;margin:2px 0}
.dayhead p{margin:0;color:#b4d4e0}
.eyebrow{font-size:12px;letter-spacing:.12em;color:#7fe1dc}
.num{font-size:48px;opacity:.16;font-weight:900}
.day-notes{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px 20px 20px}
.day-notes .notice{margin:0}

/* 時間表 */
table{border-collapse:collapse;width:100%}
th{text-align:left;font-size:12px;background:#eaf3f5;color:#486677;letter-spacing:.04em}
td,th{padding:13px 15px;vertical-align:top;border-bottom:1px solid #e7eef1}
td small{display:block;color:#647b8c;margin-top:4px;line-height:1.5}
.when{font-weight:750;white-space:nowrap;color:#176c7e}
td:last-child{min-width:210px}
.cost{display:block;color:#263f4f;font-size:13px;margin-bottom:3px}
.pill{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:100px;background:#e8f6f2;color:#139277;font-size:11px;font-weight:700;vertical-align:middle}

/* 地圖小按鈕（表格與卡片內） */
td a,.maplink{display:inline-block;margin-top:5px;padding:3px 11px;border-radius:100px;background:#e3f2f4;color:#0b6f83;font-size:12px;font-weight:700;transition:background .15s}
td a:hover,.maplink:hover{background:#cce8ec;text-decoration:none}

/* 景點照片 */
.visual-note{padding:9px 20px;background:#edf5f8;color:#567081;font-size:12px}
.photo-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px 20px 20px;background:#f5fafb}
.panel .photo-strip{padding:0;background:none;margin-bottom:12px}
.photo-tile{margin:0;background:#fff;border:1px solid #dfe9ed;border-radius:13px;overflow:hidden;box-shadow:0 5px 16px #0a354010}
.photo-tile img{display:block;width:100%;height:190px;object-fit:cover;background:linear-gradient(135deg,#d8e9ed,#eff6f7)}
.photo-tile figcaption{padding:10px 12px 13px}
.photo-tile b{display:block;font-size:14px}
.photo-tile .desc{display:block;font-size:12px;color:#637586}
.photo-tile figcaption a{font-size:11px;color:#087c96}

/* 路線卡片（取代無法縮放的路線圖） */
.route{display:flex;align-items:stretch;gap:8px;flex-wrap:wrap;margin:4px 0 14px}
.stop{flex:1 1 150px;background:#f1f8f8;border:1px solid #d7e9ec;border-radius:12px;padding:12px 14px}
.stop b{display:block;color:#123f52;font-size:16px;line-height:1.4}
.stop small{display:block;color:var(--muted);font-size:12px;line-height:1.5}
.stop.hl{background:#112f43;border-color:#112f43}
.stop.hl b{color:#fff}
.stop.hl small{color:#b4d4e0}
.arr{align-self:center;color:#128da1;font-weight:900;font-size:18px}

/* 數字小卡、預算 */
.budget,.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.stats{margin:14px 0}
.budget div,.stats div{background:#f1f8f8;border-radius:9px;padding:13px}
.budget strong,.stats strong{display:block;font-size:21px;color:#0d6172}
.range-row label{display:block;font-weight:700}
.range-row input{width:100%;accent-color:#0c7185}
.total{font-size:20px}

/* 美食 */
.foodgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.food{border:1px solid var(--line);border-radius:13px;padding:15px;background:#fbfdfd}
.food .emoji{font-size:24px}
.food h3{font-size:16px;margin:6px 0}
.food p{margin:0;font-size:14px;color:var(--muted)}

/* 行前清單 */
ul{padding-left:20px}
.checkgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.checkgrid label{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fbfdfd;cursor:pointer}
.checkgrid input{accent-color:#138b93;margin-right:7px}
.sources{font-size:13px;overflow-wrap:anywhere}

/* 按鈕 */
.buttons{display:flex;gap:9px;flex-wrap:wrap;margin:15px 0 0}
.btn{display:inline-flex;align-items:center;gap:6px;border:0;cursor:pointer;padding:11px 18px;background:#0c7185;color:#fff;border-radius:11px;font:inherit;font-weight:700;box-shadow:0 4px 12px #0c718530;transition:background .15s,transform .1s}
.btn:hover{background:#0a5f70;text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn.light{background:#e8f0f2;color:#195169;box-shadow:none}
.btn.light:hover{background:#d8e7eb}

/* 底部旅程切換列 */
.trip-switcher{position:fixed;left:50%;bottom:calc(12px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:50;display:grid;grid-template-columns:repeat(4,auto);gap:4px;padding:5px;background:#0b2235f0;border-radius:100px;box-shadow:0 10px 30px #0b223545;backdrop-filter:blur(10px)}
.trip-switcher a{padding:9px 15px;border-radius:100px;color:#cde1e7;font-size:14px;font-weight:700;white-space:nowrap;text-align:center;transition:background .15s,color .15s}
.trip-switcher a:hover{background:#ffffff1f;color:#fff;text-decoration:none}
.trip-switcher a[aria-current="page"]{background:#7fe1dc;color:#0b2235}
body.has-switcher{padding-bottom:80px}

/* 首頁 */
.trips{display:grid;gap:14px;margin-top:-45px;position:relative}
.trip-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding:20px 22px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 25px #123b5010;color:inherit;transition:transform .15s,box-shadow .15s}
.trip-card:hover{transform:translateY(-2px);box-shadow:0 14px 32px #123b501c;text-decoration:none}
.trip-card .step{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;background:#112f43;color:#7fe1dc;font-weight:900;font-size:18px}
.trip-card h2{margin:0;font-size:20px;color:#123f52}
.trip-card .dates{font-weight:750;color:#176c7e;font-size:14px}
.trip-card p{margin:2px 0 0;color:var(--muted);font-size:14px}
/* 首頁最上面的「看位置」卡片：深色底，和三段行程區隔 */
.trip-card.live{background:linear-gradient(120deg,#112f43,#135c70);border-color:#112f43}
.trip-card.live h2{color:#fff}
.trip-card.live p{color:#b4d4e0}
.trip-card.live .step{background:#7fe1dc;color:#0b2235;font-size:22px}
.trip-card.live .btn{background:#7fe1dc;color:#0b2235;box-shadow:none}

@media(max-width:750px){
  .offline-note{margin:10px}
  header{padding:30px 18px 75px}
  .facts{grid-template-columns:repeat(2,1fr)}
  .checkgrid,.grid2,.day-notes,.foodgrid{grid-template-columns:1fr}
  .panel{padding:17px}
  .dayhead{padding:17px}
  .dayhead h2{font-size:21px}
  .table-wrap{overflow-x:auto}
  table{min-width:690px}
  td,th{padding:11px}
  .photo-strip{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding:13px;gap:10px}
  .panel .photo-strip{padding:0 0 4px}
  .photo-tile{flex:0 0 76vw;max-width:330px;scroll-snap-align:start}
  .photo-tile img{height:182px}
  .visual-note{padding:9px 13px}
  .day-notes{padding:13px}
  .route{flex-direction:column;gap:4px}
  .stop{flex:none}
  .arr{transform:rotate(90deg);line-height:1}
  .trip-card{grid-template-columns:auto 1fr;gap:14px;padding:16px}
  .trip-card .go{grid-column:1/-1}
}
@media(max-width:440px){
  .trip-switcher{left:10px;right:10px;transform:none;grid-template-columns:repeat(4,1fr)}
  .trip-switcher a{padding:9px 4px;font-size:13px}
}
@media print{
  header{color:#000;background:#fff}
  .nav,.buttons,.trip-switcher,.offline-note{display:none}
  .day,.panel,.fact{box-shadow:none;break-inside:avoid}
  .dayhead{background:#e9f2f4;color:#111}
  .dayhead p{color:#555}
  .photo-strip{display:grid;grid-template-columns:repeat(3,1fr)}
  .photo-tile img{height:105px}
}
