/* [CUST-PORTAL-01] 驛馬達達乘客頁面。品牌藍 #2854DA（logo 藍），珊瑚橘、晨光黃、薄荷綠當點綴。 */
:root {
  --canvas: #F4F3EF;
  --surface: #FFFFFF;
  --surface-2: #F7F7F4;
  --shell: rgba(13, 21, 48, .035);
  --ring: rgba(13, 21, 48, .07);
  --hair: rgba(13, 21, 48, .08);
  --ink: #0D1530;
  --ink-2: #3A4262;
  --muted: #7B819A;
  --brand: #2854DA;
  --brand-deep: #1830A0;
  --brand-ink: #1F45C4;
  --brand-soft: #E9EEFF;
  --violet: #6C5CFF;
  --coral: #FF6F4F;
  --coral-soft: #FFEDE7;
  --sun: #FFBE3D;
  --sun-soft: #FFF5DD;
  --mint: #12B386;
  --mint-soft: #E2F7EF;
  --danger: #E5484D;
  --danger-soft: #FDECEC;
  --line-green: #06C755;
  --wa-green: #25D366;
  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --shadow: 0 1px 1px rgba(13, 21, 48, .03), 0 12px 32px -12px rgba(13, 21, 48, .14);
  --shadow-lift: 0 30px 60px -24px rgba(24, 48, 160, .45);
  --spring: cubic-bezier(.32, .72, 0, 1);
  --dock-h: 68px;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "PingFang TC", "PingFang SC",
    "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Thai",
    "Microsoft JhengHei", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #080B16;
    --surface: #111629;
    --surface-2: #161C33;
    --shell: rgba(255, 255, 255, .035);
    --ring: rgba(255, 255, 255, .08);
    --hair: rgba(255, 255, 255, .08);
    --ink: #EEF1FB;
    --ink-2: #BEC4DA;
    --muted: #8188A3;
    --brand-ink: #8EA6FF;
    --brand-soft: rgba(40, 84, 218, .18);
    --coral-soft: rgba(255, 111, 79, .14);
    --sun-soft: rgba(255, 190, 61, .13);
    --mint-soft: rgba(18, 179, 134, .15);
    --danger-soft: rgba(229, 72, 77, .15);
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 16px 36px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 34px);
  overflow-x: hidden;
}
a { color: var(--brand-ink); text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }

/* ---------- ambient backdrop (fixed, no scroll repaint) ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; opacity: .55; }
.o1 { width: 520px; height: 520px; top: -260px; right: -180px; background: radial-gradient(closest-side, rgba(40, 84, 218, .28), transparent); }
.o2 { width: 420px; height: 420px; top: 30vh; left: -240px; background: radial-gradient(closest-side, rgba(255, 111, 79, .16), transparent); }
.o3 { width: 380px; height: 380px; bottom: -160px; right: -120px; background: radial-gradient(closest-side, rgba(108, 92, 255, .16), transparent); }

/* ---------- header ---------- */
.top {
  max-width: 680px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 20px 6px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 6px 16px -6px rgba(40, 84, 218, .6); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.brand-text small { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px; border-radius: 999px;
  border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--ring), var(--shadow); cursor: pointer; font-size: 13.5px; font-weight: 600;
  transition: transform .5s var(--spring);
}
.lang-btn:active { transform: scale(.96); }
.lang-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }

main { max-width: 680px; margin: 0 auto; padding: 10px 16px 0; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.rise { animation: rise .8s var(--spring) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brand-ink); background: var(--brand-soft);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px rgba(255, 111, 79, .2); }
.hello { font-size: clamp(28px, 7.6vw, 38px); line-height: 1.12; font-weight: 750; letter-spacing: -.03em; margin: 14px 2px 22px; }
.hello span { color: var(--muted); font-weight: 600; }
h1.page { font-size: 30px; line-height: 1.15; font-weight: 750; letter-spacing: -.03em; margin: 12px 2px 18px; }
.section {
  display: flex; align-items: baseline; justify-content: space-between; margin: 30px 4px 12px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.section a { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* ---------- double-bezel cards ---------- */
.shell { padding: 5px; border-radius: var(--r-xl); background: var(--shell); box-shadow: 0 0 0 1px var(--ring); margin-bottom: 14px; }
.core {
  border-radius: calc(var(--r-xl) - 5px); background: var(--surface); padding: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.core.tight { padding: 6px 18px; }

/* ---------- hero (next trip) ---------- */
.hero .core {
  position: relative; overflow: hidden; color: #fff; padding: 22px 22px 20px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(108, 92, 255, .9), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(255, 111, 79, .45), transparent 60%),
    linear-gradient(150deg, #142A92 0%, #2854DA 55%, #3E5BF0 100%);
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.hero .core::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(60% 40% at 80% 10%, rgba(255, 255, 255, .22), transparent 70%);
}
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: relative; z-index: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650;
  background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px rgba(255, 190, 61, .3); }
.chip.live .dot { background: #4BE3A6; animation: pulse 1.6s var(--spring) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(75, 227, 166, .6); } 100% { box-shadow: 0 0 0 9px rgba(75, 227, 166, 0); } }
.ordno { font-size: 12.5px; opacity: .78; letter-spacing: .04em; }
.countdown { position: relative; z-index: 1; font-size: clamp(26px, 7vw, 34px); font-weight: 750; letter-spacing: -.03em; line-height: 1.1; margin: 18px 0 4px; }
.when { position: relative; z-index: 1; font-size: 15px; opacity: .88; }
.route { position: relative; z-index: 1; list-style: none; margin: 18px 0 0; padding: 0; }
.route li { position: relative; padding: 0 0 14px 26px; }
.route li:last-child { padding-bottom: 0; }
.route li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid currentColor; background: transparent; }
.route li.end::before { background: currentColor; }
.route li:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 20px; bottom: 2px; width: 1.5px; background: currentColor; opacity: .3; }
.route .k { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.route .v { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; word-break: break-word; }
.route .s { display: block; font-size: 13px; opacity: .7; }
.hero .route { color: #fff; }
.light-route { color: var(--ink); }
.light-route li::before { border-color: var(--brand); }
.light-route li.end::before { background: var(--coral); border-color: var(--coral); }
.light-route li.via::before { border-color: var(--sun); }
.light-route li:not(:last-child)::after { background: var(--hair); opacity: 1; }
.light-route .k { color: var(--muted); opacity: 1; }
.light-route .s { color: var(--muted); opacity: 1; }

.glass-row { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.glass {
  flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.glass span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.glass b { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glass-row.quad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.glass b .sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(13, 21, 48, .25); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border-radius: 999px; border: 0; cursor: pointer; font-size: 16px; font-weight: 650; letter-spacing: -.005em; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: transform .45s var(--spring), box-shadow .45s var(--spring), background .3s;
}
.btn:active { transform: scale(.97); }
.btn .ic {
  width: 32px; height: 32px; margin-right: -12px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .18); transition: transform .5s var(--spring);
}
.btn .ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover .ic { transform: translate(2px, -1px) scale(1.06); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(40, 84, 218, .8); }
.btn.coral { background: var(--coral); color: #fff; box-shadow: 0 10px 24px -10px rgba(255, 111, 79, .8); }
.btn.white { background: #fff; color: var(--brand-deep); }
.btn.white .ic { background: var(--brand-soft); }
.btn.glassy { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--ring), var(--shadow); }
.btn.ghost .ic { background: var(--brand-soft); color: var(--brand-ink); }
.btn.line { background: var(--line-green); color: #fff; box-shadow: 0 10px 24px -12px rgba(6, 199, 85, .9); }
.btn.wa { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--ring), var(--shadow); }
.btn.wa .ic { background: rgba(37, 211, 102, .14); color: #11A84A; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .brand-ic { width: 22px; height: 22px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; position: relative; z-index: 1; }
.actions .btn { min-height: 48px; font-size: 15px; padding: 0 16px; }
.actions .wide { grid-column: 1 / -1; }

/* ---------- action banner ---------- */
.banner {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); margin-bottom: 14px; color: var(--ink);
  background: linear-gradient(120deg, var(--coral-soft), var(--sun-soft)); box-shadow: 0 0 0 1px rgba(255, 111, 79, .18);
}
.banner .bi { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--coral); color: #fff; box-shadow: 0 8px 18px -8px rgba(255, 111, 79, .9); }
.banner .bi svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.banner b { display: block; font-size: 15.5px; }
.banner span { font-size: 13.5px; color: var(--ink-2); }
.banner .go { margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); }
.banner .go svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2; }
.banner.blue { background: linear-gradient(120deg, var(--brand-soft), rgba(108, 92, 255, .1)); box-shadow: 0 0 0 1px rgba(40, 84, 218, .16); }
.banner.blue .bi { background: var(--brand); box-shadow: 0 8px 18px -8px rgba(40, 84, 218, .9); }

/* ---------- bento quick actions ----------
 * 三顆都是實心色塊＋右上角箭頭圓：一眼看得出是三個獨立按鈕（10/14 Harry：付款、錢包兩顆原本白底看不出是按鈕）。 */
.bento { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 10px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 108px; padding: 16px;
  border-radius: var(--r-lg); color: #fff; overflow: hidden; -webkit-tap-highlight-color: transparent;
  transition: transform .5s var(--spring), box-shadow .5s var(--spring);
}
.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); pointer-events: none; }
.tile:active { transform: scale(.97); }
.tile .ti { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.tile .ti svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile .go { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); transition: transform .5s var(--spring); }
.tile .go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tile:hover .go { transform: translate(2px, -2px); }
.tile b { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.25; }
.tile small { display: block; margin-top: 3px; font-size: 12.5px; opacity: .85; line-height: 1.35; text-wrap: balance; word-break: keep-all; }
.tile.big { grid-row: span 2; background: linear-gradient(160deg, #0F1A4F, #1D3BB8 70%, #3256E6); box-shadow: var(--shadow-lift); }
.tile.big b { font-size: 19px; }
.tile.big small { font-size: 13px; opacity: .75; }
/* 付款＝行程卡左下角的藍紫色（Harry 10/14 指定）、錢包＝霧藍，跟預約新行程的深藍同一組。 */
.tile.wallet { color: var(--ink); }
.tile.pay { color: #fff; }
.tile.pay { background: linear-gradient(155deg, #6F64C4, #5A55B8 60%, #4F57C2); box-shadow: 0 16px 30px -16px rgba(90, 85, 184, .85); }
.tile.wallet { background: linear-gradient(155deg, #F2F5FB, #DEE5F4); box-shadow: inset 0 0 0 1px rgba(40, 84, 218, .14), 0 14px 28px -18px rgba(24, 48, 160, .4); }
.tile.pay .ti { background: rgba(255, 255, 255, .18); color: #fff; }
.tile.wallet .ti { background: #3F5DC4; color: #fff; box-shadow: 0 8px 16px -8px rgba(40, 70, 190, .8); }
.tile.wallet .go { background: rgba(255, 255, 255, .85); box-shadow: 0 2px 6px -2px rgba(13, 21, 48, .18); }
.tile.pay .go { background: rgba(255, 255, 255, .2); }
.tile.pay .go { color: #fff; }
.tile.wallet .go { color: #3F5DC4; }
.tile.pay small { color: rgba(255, 255, 255, .82); opacity: 1; }
.tile.wallet small { color: #56607E; opacity: 1; }
.tile.wallet::after { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
.tile .count { position: absolute; top: 12px; right: 48px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; background: #fff; color: #5A55B8; font-size: 12px; font-weight: 800; }
@media (prefers-color-scheme: dark) {
  .tile.wallet { background: linear-gradient(155deg, #1B2340, #151B31); box-shadow: inset 0 0 0 1px rgba(142, 166, 255, .2), var(--shadow); }
  .tile.wallet small { color: #A9B3D3; }
  .tile.wallet .go { background: rgba(255, 255, 255, .1); box-shadow: none; }
  .tile.wallet .go { color: #9DB2FF; }
  .tile.wallet::after { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
}
.ti.blue { background: var(--brand-soft); color: var(--brand-ink); }
.ti.coral { background: var(--coral-soft); color: var(--coral); }
.ti.mint { background: var(--mint-soft); color: var(--mint); }
.ti.sun { background: var(--sun-soft); color: #C98A00; }

/* ---------- rows ---------- */
.trip-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 10px; border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--ring), var(--shadow); transition: transform .5s var(--spring);
}
.trip-row:active { transform: scale(.985); }
.date-tile { flex: none; width: 54px; padding: 8px 0; border-radius: 15px; text-align: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); }
.date-tile small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }
.date-tile b { display: block; font-size: 21px; line-height: 1.1; font-weight: 750; letter-spacing: -.02em; }
.date-tile span { display: block; font-size: 11.5px; color: var(--muted); }
.trip-row .mid { flex: 1; min-width: 0; }
.trip-row .mid b { display: block; font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-row .mid span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-row .end { flex: none; text-align: right; }
.trip-row .end b { display: block; font-size: 15px; font-weight: 700; }
.chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; opacity: .7; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.pill.blue { background: var(--brand-soft); color: var(--brand-ink); }
.pill.coral { background: var(--coral-soft); color: var(--coral); }
.pill.mint { background: var(--mint-soft); color: var(--mint); }
.pill.sun { background: var(--sun-soft); color: #B07800; }
.pill.grey { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hair); }
.pill.red { background: var(--danger-soft); color: var(--danger); }

/* ---------- segmented ---------- */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--shell); box-shadow: 0 0 0 1px var(--ring); margin-bottom: 16px; }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; height: 40px; border-radius: 999px; font-weight: 650; font-size: 14.5px; color: var(--muted); cursor: pointer; transition: color .4s var(--spring); }
.seg button[aria-selected="true"] { color: var(--ink); }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); transition: transform .55s var(--spring); }
.seg[data-pos="1"] .thumb { transform: translateX(100%); }

/* ---------- detail ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; margin: 6px 0 10px; padding: 6px 12px 6px 6px; border-radius: 999px; color: var(--ink-2); font-weight: 600; background: var(--surface); box-shadow: 0 0 0 1px var(--ring); }
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 4px 0 2px; }
.step { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.step i { display: block; height: 5px; border-radius: 99px; background: var(--hair); margin-bottom: 7px; transition: background .6s var(--spring); }
.step.done i { background: var(--brand); }
.step.now i { background: linear-gradient(90deg, var(--brand), var(--coral)); }
.step.now { color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.fact { padding: 11px 13px; border-radius: 15px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.fact span { display: block; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); }
.fact b { display: block; font-size: 15px; font-weight: 650; word-break: break-word; }
.fact.wide { grid-column: 1 / -1; }
.fact b.norm { font-weight: 500; font-size: 14px; line-height: 1.5; }

.driver { display: flex; align-items: center; gap: 14px; }
.avatar { flex: none; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 22px; font-weight: 750; color: #fff; background: linear-gradient(140deg, var(--brand), var(--violet)); box-shadow: 0 10px 20px -10px rgba(40, 84, 218, .8); }
.driver b { display: block; font-size: 18px; letter-spacing: -.01em; }
.driver span { display: block; font-size: 14px; color: var(--muted); }
.driver .plate, .plate { display: inline-block; margin-top: 4px; padding: 3px 10px; border-radius: 8px; font-weight: 750; letter-spacing: .08em; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); font-size: 14px; }

.amount { font-size: 34px; font-weight: 780; letter-spacing: -.03em; line-height: 1.1; }
.amount small { font-size: 15px; font-weight: 600; color: var(--muted); margin-right: 4px; letter-spacing: 0; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); }
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--muted); font-size: 14px; flex: none; }
.kv > b { text-align: right; font-weight: 650; word-break: break-word; }
.copy { flex: none; border: 0; cursor: pointer; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--brand-soft); color: var(--brand-ink); transition: transform .4s var(--spring); }
.copy:active { transform: scale(.94); }
.copy.ok { background: var(--mint-soft); color: var(--mint); }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 15px; background: var(--sun-soft); color: var(--ink-2); font-size: 14px; margin-top: 12px; }
.note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: #C98A00; stroke-width: 1.8; }
.note.blue { background: var(--brand-soft); }
.note.blue svg { stroke: var(--brand-ink); }

/* ---------- wallet records ---------- */
.rec { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); color: inherit; }
.rec:last-child { border-bottom: 0; }
.rec .mid { flex: 1; min-width: 0; }
.rec .mid b { display: block; font-weight: 650; }
.rec .mid small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec .end { flex: none; text-align: right; font-weight: 700; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ---------- pay ---------- */
.due-hero { text-align: center; padding: 28px 20px 24px; }
.due-hero .k { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.due-hero .amount { font-size: 46px; margin: 8px 0 4px; background: linear-gradient(120deg, var(--brand-deep), var(--brand) 50%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pick { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--hair); cursor: pointer; }
.pick:last-child { border-bottom: 0; }
.pick input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--hair); background: var(--surface); display: grid; place-items: center; transition: background .3s var(--spring), box-shadow .3s; cursor: pointer; }
.pick input:checked { background: var(--brand); box-shadow: none; }
.pick input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2.4px solid #fff; border-bottom: 2.4px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.pick .mid { flex: 1; min-width: 0; }
.pick .mid b { display: block; font-size: 15px; }
.pick .mid span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick .end { flex: none; font-weight: 700; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.tab {
  display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 18px; border: 0; cursor: pointer; text-align: left;
  background: var(--surface); box-shadow: 0 0 0 1px var(--ring); transition: box-shadow .4s var(--spring), transform .4s var(--spring);
}
.tab:active { transform: scale(.98); }
.tab[aria-selected="true"] { box-shadow: 0 0 0 2px var(--brand), 0 12px 24px -14px rgba(40, 84, 218, .7); }
.tab .ti { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.tab .ti svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tab b { font-size: 15px; }
.upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px; border-radius: 20px; cursor: pointer;
  border: 1.5px dashed var(--hair); background: var(--surface-2); color: var(--muted); text-align: center; font-size: 14px;
}
.upload svg { width: 28px; height: 28px; fill: none; stroke: var(--brand-ink); stroke-width: 1.5; }
.upload input { display: none; }
.preview { width: 100%; max-height: 320px; object-fit: contain; border-radius: 16px; background: var(--surface-2); }
.msg { margin-top: 12px; font-size: 14.5px; text-align: center; }
.msg.ok { color: var(--mint); }
.msg.err { color: var(--danger); }

/* ---------- wallet ---------- */
.wallet-card {
  position: relative; overflow: hidden; border-radius: calc(var(--r-xl) - 5px); padding: 22px; color: #fff; min-height: 196px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(255, 190, 61, .55), transparent 60%),
    radial-gradient(80% 90% at 0% 100%, rgba(108, 92, 255, .85), transparent 60%),
    linear-gradient(135deg, #0E1748, #1F3FC0);
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.wallet-card .wtop { display: flex; justify-content: space-between; align-items: center; }
.wallet-card .chip-ic { width: 40px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #FFE7A6, #D9A93E); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.wallet-card .k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.wallet-card .amount { font-size: 40px; color: #fff; }
.wallet-card .amount small { color: rgba(255, 255, 255, .7); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { padding: 12px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--ring), var(--shadow); }
.stat span { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.stat b { display: block; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }

/* ---------- login ---------- */
.login { padding: 18px 4px 10px; }
.login-mark { width: 92px; height: 92px; border-radius: 50%; margin: 18px auto 22px; box-shadow: 0 24px 44px -18px rgba(40, 84, 218, .75); animation: pop .9s var(--spring) both; }
.login h1 { font-size: clamp(28px, 7.4vw, 36px); line-height: 1.12; font-weight: 780; letter-spacing: -.035em; text-align: center; margin: 10px 0 10px; }
.login p.sub { color: var(--ink-2); text-align: center; margin: 0 auto 26px; max-width: 30em; }
.login .btn { width: 100%; margin-bottom: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 6px 0 16px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); margin: 0 4px 6px; }
.field input {
  width: 100%; height: 54px; padding: 0 18px; border-radius: 18px; border: 0; outline: none; font-size: 17px; letter-spacing: .02em;
  background: var(--surface); box-shadow: 0 0 0 1px var(--ring), var(--shadow); transition: box-shadow .35s var(--spring);
}
.field input:focus { box-shadow: 0 0 0 2px var(--brand), 0 10px 26px -14px rgba(40, 84, 218, .7); }
.field input.code { text-align: center; font-size: 26px; letter-spacing: .5em; font-weight: 700; padding-left: calc(18px + .5em); }
.field small { display: block; margin: 6px 4px 0; font-size: 12.5px; color: var(--muted); }
.linkish { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 0; background: transparent; color: var(--brand-ink); font-weight: 650; cursor: pointer; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.secure svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 34px 20px; }
.empty .ei { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.empty .ei svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.empty b { display: block; font-size: 18px; margin-bottom: 4px; }
.empty p { color: var(--muted); margin: 0 0 18px; font-size: 14.5px; }

/* ---------- dock (floating island) ---------- */
.dock {
  position: fixed; z-index: 20; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(calc(100% - 24px), 460px); height: var(--dock-h); padding: 6px; border-radius: 26px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .78); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 0 0 1px var(--ring), 0 18px 40px -18px rgba(13, 21, 48, .35);
}
@media (prefers-color-scheme: dark) { .dock { background: rgba(17, 22, 41, .78); } }
.dock a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 20px;
  color: var(--muted); font-size: 10.5px; font-weight: 650; letter-spacing: .01em; -webkit-tap-highlight-color: transparent;
  transition: color .4s var(--spring), background .4s var(--spring);
}
.dock a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.dock svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--spring); }
.dock a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.dock a[aria-current="page"] svg { transform: translateY(-1px) scale(1.06); }
.badge { position: absolute; top: 6px; right: calc(50% - 20px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--coral); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 750; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); animation: pop .6s var(--spring) both; }

/* ---------- sheet ---------- */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 520px; background: transparent; color: var(--ink); }
.sheet::backdrop { background: rgba(8, 11, 22, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet[open] .sheet-inner { animation: sheetUp .55s var(--spring) both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-inner { margin: 0 10px calc(10px + env(safe-area-inset-bottom)); padding: 10px 16px 16px; border-radius: 28px; background: var(--surface); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
.sheet-grip { width: 40px; height: 5px; border-radius: 99px; background: var(--hair); margin: 2px auto 12px; }
.sheet h2 { font-size: 17px; text-align: center; margin: 0 0 10px; }
.lang-list { display: grid; gap: 6px; }
.lang-opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 15px 16px; border-radius: 16px; border: 0; cursor: pointer; background: var(--surface-2); font-size: 16px; font-weight: 600; text-align: left; transition: transform .4s var(--spring); }
.lang-opt:active { transform: scale(.98); }
.lang-opt[aria-current="true"] { background: var(--brand-soft); color: var(--brand-ink); }
.lang-opt svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ---------- invoice ---------- */
.inv-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; padding: 6px 11px 6px 9px; border-radius: 999px;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; background: var(--brand-soft); color: var(--brand-ink);
  box-shadow: inset 0 0 0 1px rgba(40, 84, 218, .18); transition: transform .4s var(--spring); white-space: nowrap;
}
.inv-btn:active { transform: scale(.95); }
.inv-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inv-line { margin-top: 6px; }
.has-link { position: relative; }
.has-link .cover { position: absolute; inset: 0; z-index: 1; border-radius: inherit; -webkit-tap-highlight-color: transparent; }
.has-link .inv-btn { position: relative; z-index: 2; }
.trip-row.has-link:has(.cover:active) { transform: scale(.985); }
.inv-sheet .sheet-inner { max-height: calc(100dvh - 24px); overflow: auto; }
.inv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.inv-head h2 { margin: 0; text-align: left; }
.inv-x { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.inv-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.inv-paper { display: grid; place-items: center; min-height: 240px; padding: 10px; border-radius: 18px; background: #EEEDE8; }
.inv-paper img { display: block; width: auto; max-width: 100%; max-height: 62dvh; border-radius: 6px; background: #fff; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .45); }
.inv-meta { display: flex; justify-content: space-between; gap: 10px; margin: 12px 2px 0; font-size: 13.5px; color: var(--muted); }
.inv-meta b { color: var(--ink); font-weight: 700; letter-spacing: .03em; }
.inv-sheet .actions { margin-top: 12px; }
.inv-hint { text-align: center; color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }

/* ---------- misc ---------- */
.splash { display: grid; place-items: center; gap: 18px; padding: 22vh 0; }
.splash-logo { width: 72px; height: 72px; border-radius: 50%; animation: pop .9s var(--spring) both; box-shadow: 0 20px 40px -16px rgba(40, 84, 218, .7); }
.dots { display: flex; gap: 6px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .3; animation: blink 1.2s var(--spring) infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: 1; transform: translateY(-3px); } }
.skeleton { height: 160px; border-radius: var(--r-xl); background: linear-gradient(90deg, var(--shell), var(--hair), var(--shell)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; margin-bottom: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast {
  position: fixed; z-index: 40; left: 50%; bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 26px); transform: translateX(-50%);
  max-width: calc(100% - 40px); padding: 11px 18px; border-radius: 999px; background: rgba(13, 21, 48, .92); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 16px 32px -14px rgba(0, 0, 0, .6); animation: rise .5s var(--spring) both;
}
.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin: 22px 0 4px; }

@media (min-width: 720px) {
  main { padding-top: 18px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .actions { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .dock a span { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* [TRIP-ISSUE-01] 回報問題表單（下拉、多行文字）跟登入框同一個樣子。 */
.issue-input { width: 100%; border: 0; border-radius: var(--r-md); background: var(--surface-2); padding: 14px 16px; font-size: 16px; box-shadow: 0 0 0 1px var(--ring); outline: none; margin: 6px 0 14px; color: var(--ink); }
.issue-input:focus { box-shadow: 0 0 0 2px var(--brand); }
textarea.issue-input { resize: vertical; min-height: 110px; line-height: 1.5; }

/* [WEB-BOOK-02] 線上預約 */
input[type="date"], input[type="time"] { cursor: pointer; }
.pb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pb-field { margin-bottom: 0; }
.pb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pb-h { font-size: 15px; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--hair); }
.pb-sub { font-size: 13px; font-weight: 650; color: var(--ink-2); margin: 4px 4px 6px; }
.pb-hint { font-size: 12.5px; margin: -6px 4px 8px; }
.pb-place { display: flex; align-items: center; gap: 8px; }
.pb-place .issue-input { margin: 4px 0; }
.pb-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.pb-dot.up { background: var(--mint); }
.pb-dot.down { background: var(--coral); }
.pb-x { flex: none; border: 0; background: var(--surface-2); box-shadow: 0 0 0 1px var(--ring); border-radius: 12px; width: 40px; height: 40px; cursor: pointer; color: var(--muted); }
.pb-link { border: 0; background: none; color: var(--brand-ink); font-weight: 650; font-size: 14px; padding: 6px 4px 12px; cursor: pointer; }
.pb-seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pb-chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--ring); font-size: 14px; cursor: pointer; }
.pb-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pb-chip.on { background: var(--brand-soft); color: var(--brand-ink); box-shadow: 0 0 0 2px var(--brand); font-weight: 650; }
.pb-chip:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.pb-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: 0 0 0 1px var(--ring); margin: 4px 0 12px; cursor: pointer; }
.pb-check input { margin-top: 3px; accent-color: var(--brand); width: 18px; height: 18px; }
.pb-check b { display: block; font-size: 14.5px; }
.pb-check small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.pb-sign { padding: 12px; border-radius: var(--r-md); border: 1px dashed var(--hair); margin-bottom: 12px; }
.pb-file { font-size: 14px; }
.pb-prices { display: grid; gap: 8px; margin-top: 12px; }
.pb-price { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: 0 0 0 1px var(--ring); cursor: pointer; }
.pb-price input { position: absolute; opacity: 0; pointer-events: none; }
.pb-price small { grid-column: 1 / -1; }
.pb-price.on { background: var(--surface); box-shadow: 0 0 0 2px var(--brand); }
.pb-price:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.pb-veh { font-size: 15px; }
.pb-amt { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.pb-total { display: flex; justify-content: space-between; align-items: center; }
.pb-ctas { display: grid; gap: 10px; margin-top: 4px; }
.pb-cta { display: grid; gap: 3px; text-align: left; border: 0; border-radius: var(--r-lg); padding: 16px 18px; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--ring), var(--shadow); cursor: pointer; font: inherit; }
.pb-cta b { font-size: 16px; }
.pb-cta small { color: var(--muted); font-size: 13px; }
.pb-cta.primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(40, 84, 218, .8); }
.pb-cta.primary small { color: rgba(255, 255, 255, .82); }
.pb-cta[disabled] { opacity: .5; pointer-events: none; }
.pb-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: baseline; margin: 10px 0; font-size: 14.5px; }
.pb-kv > span { color: var(--muted); font-size: 13px; }
textarea.issue-input { resize: vertical; min-height: 64px; }
