/* IG-pass: one hero per screen, gestures, one type scale, physical motion, empty states. */
:root{--fs-1:11px;--fs-2:13px;--fs-3:15px;--fs-4:20px;--ease:cubic-bezier(.2,.8,.2,1);--spring:cubic-bezier(.34,1.4,.64,1)}
/* --- type scale: four sizes, one grey --- */
body{font-size:var(--fs-3)}
.quiet-note,small,.eyebrow,.jb-node-meta,.jb-transport-text span,.tile-sub,.inbox-text small,.jb-pill,.jb-legend,.jb-count,.preview-note,.jb-chooser-note,.state-pill,.journey-flow-status{font-size:var(--fs-1)!important}
button,input,select,.tile-title,.jb-transport-text strong,.inbox-text strong,.jb-node-title strong,.card-head strong,.jb-route-meta,.help-numbers .number small{font-size:var(--fs-2)}
.jb-node-title strong,.jb-transport-text strong,.inbox-text strong,.tile-title,.next-card p,.safety-card p,.safety-card li,.place-body p{font-size:var(--fs-3)!important}
h1,.world-title h1,.live-weather strong,.tile-value{letter-spacing:-.02em}
h2,.next-card h1,.empty-discovery h3,.world-profile-heading h2,.jb-route>summary strong{font-size:var(--fs-4)!important;line-height:1.25}
h3,.card-head strong,.preference-card h3,.world-memory h3,.help-open-spaces>strong{font-size:var(--fs-3)!important;font-weight:600}
.quiet-note,.tile-sub,.jb-node-meta,.inbox-text small,.jb-transport-text span,.eyebrow,.preview-note{color:#6b7f8c!important}
/* --- icons: one weight --- */
.ui-icon{stroke-width:1.75!important}.navigation .ui-icon{width:22px;height:22px}.sys-badge .ui-icon{stroke-width:1.9!important}
/* --- physical motion --- */
button,.tile-face,.inbox-row button,.explore-tile{transition:transform .18s var(--ease),background .2s,color .2s,box-shadow .25s var(--ease)}
button:active:not(:disabled),.inbox-row button:active{transform:scale(.97)}
.planning .sheet{transition:max-height .38s var(--spring),transform .38s var(--spring),bottom .25s var(--ease)}
.planning .sheet.collapsed-sheet{transition-timing-function:var(--ease)}
main>*{animation:page-in .3s var(--ease) both}
@keyframes page-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
dialog[open]{animation:dialog-in .28s var(--spring)}@keyframes dialog-in{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
.jb-list>li{animation:page-in .32s var(--ease) both}
/* --- JOURNEY first screen (phones): peek shows the route row only --- */
@media(max-width:999px){
.planning .sheet:not(.expanded-sheet):not(.collapsed-sheet){max-height:none!important;height:auto!important;overflow:hidden}
.planning .sheet:not(.expanded-sheet):not(.collapsed-sheet) .jb-bar,.planning .sheet:not(.expanded-sheet):not(.collapsed-sheet) #legs,.planning .sheet:not(.expanded-sheet):not(.collapsed-sheet) .journey-tools,.planning .sheet:not(.expanded-sheet):not(.collapsed-sheet) .jb-note{display:none!important}
.planning .sheet:not(.expanded-sheet):not(.collapsed-sheet) .jb-route:not([open])>summary{padding-bottom:14px}
.planning .sheet:not(.expanded-sheet):not(.collapsed-sheet) .jb-route:not([open])>summary::after{content:'上滑看每一段 ↑';display:block;margin-top:8px;font-size:var(--fs-1);color:#6b7f8c;letter-spacing:.04em}
.jb-route>summary{cursor:pointer}
}
/* --- swipe rows --- */
.jb-transport{position:relative;overflow:hidden;touch-action:pan-y;border-radius:14px}
.jb-transport-main{position:relative;z-index:1;background:inherit;transition:transform .28s var(--spring)}
.jb-transport.swiping .jb-transport-main{transition:none}
.jb-transport::before,.jb-transport::after{position:absolute;top:0;bottom:0;display:flex;align-items:center;font-size:var(--fs-2);font-weight:600;color:#fff;opacity:0;transition:opacity .15s;z-index:0;padding:0 14px;border-radius:14px}
.jb-transport::before{content:'✕ 移除這段交通';left:0;right:0;justify-content:flex-start;background:#e5352b}
.jb-transport::after{content:'更換運具 ⇄';left:0;right:0;justify-content:flex-end;background:#1684ce}
.jb-transport[data-swipe="right"]::before{opacity:1}.jb-transport[data-swipe="left"]::after{opacity:1}
.jb-transport-tools{opacity:.75}
/* --- long-press drag --- */
.jb-drag-ghost{position:fixed;left:0;top:0;z-index:120;pointer-events:none;list-style:none;margin:0;opacity:.94;background:#fff;border-radius:16px;box-shadow:0 18px 40px #1b304644;transform-origin:center;scale:1.03}
.jb-node-user.dragging{opacity:.35}.jb-node-user.drop-target{outline:2px dashed #1684ce;outline-offset:3px}
/* --- empty state --- */
.journey-search-empty{padding-top:18px}.empty-hero{height:64px;margin:0 0 8px;display:grid;place-items:center}.empty-hero svg{width:140px;height:64px}
.journey-search-empty h1{font-size:var(--fs-4)!important}.journey-search-empty>p{margin:4px 0 12px}
.journey-search-empty .mode-preview{display:none}
@media(prefers-reduced-motion:reduce){main>*,.jb-list>li,dialog[open]{animation:none}button:active:not(:disabled){transform:none}}
@media(max-width:999px){.planning .sheet.expanded-sheet{max-height:calc(100% - var(--header) - var(--summary-height,104px) - 28px)!important}}
@media(min-width:768px){.planning .sheet,.planning .sheet.expanded-sheet{top:calc(var(--header) + 12px)!important;max-height:none!important}}
