.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.postbox-home .journal-hero{min-height:175px}
.postbox-home .journal-hero>div:first-child{max-width:62%}
.postbox-home .journal-hero .hero-capture{position:absolute;z-index:2;right:8%;top:50%;transform:translateY(-50%)}
.postbox-home .journal-hero p{margin-bottom:0}
[data-surface=trip] body{
 background:radial-gradient(circle at 2px 2px,#907c6055 .55px,transparent .9px) 0 0/15px 15px,
 linear-gradient(#fffaf0a8,#fffaf0a8),url('/assets/ivory-paper.webp') center top/570px auto repeat;
}
[data-surface=trip] .workspace{margin:0}
[data-surface=trip] .sidebar{
 position:sticky;inset:auto;top:0;z-index:3;width:100%;height:auto;padding:12px max(18px,calc((100vw - 850px)/2)) 0;
 display:block;background:#f9f5ebf5;border:0;border-bottom:1px solid #ded4c1;
 box-shadow:0 2px 5px #5a49331b;
}
[data-surface=trip] .sidebar .side-label,[data-surface=trip] .sidebar .side-bottom{display:none}
[data-surface=trip] #nav{
 display:flex;position:relative;gap:4px;margin:0;overflow-x:auto;scrollbar-width:none;
}
[data-surface=trip] #nav::-webkit-scrollbar,.day-tickets::-webkit-scrollbar{display:none}
[data-surface=trip] #nav .nav-link{
 flex:0 0 auto;display:flex;align-items:center;justify-content:center;height:40px;
 min-width:80px;padding:0 13px;color:var(--ink);background:#f0e8d9;
 box-shadow:inset 0 1px 1px #ffffffab;border:1px solid #d5c9b4;border-bottom:0;border-radius:11px 11px 0 0;
 white-space:nowrap;font-size:13px;font-weight:750;
}
[data-surface=trip] #nav .nav-link svg{display:none}
[data-surface=trip] #nav .nav-link span{display:inline}
[data-surface=trip] #nav .nav-link[aria-current=page]{background:var(--sheet);border-color:var(--sheet);color:#fffdf4;box-shadow:none}
[data-surface=trip] .topbar{
 width:min(100%,890px);margin:auto;background:none;border:0;padding:14px 20px 0;height:auto;gap:9px;
}
[data-surface=trip] .topbar .top-actions,[data-surface=trip] #crumb{display:none}
[data-surface=trip] .project-switch{
 background:#f4ecdc;border:1px solid #efe4d1;box-shadow:1px 3px 4px #4639263a;
 padding:8px 10px;border-radius:4px;
}
[data-surface=trip] .project-switch [data-icon=folder]{display:none}
[data-surface=trip] #back-to-journal{width:39px;height:39px}
#trip-header-action{flex:none}
#trip-header-action .primary{border-radius:23px;background:var(--sheet);box-shadow:0 3px 4px #493e3536}
[data-surface=trip] main{width:min(100%,890px);padding:15px 20px 30px}
.day-tickets{
 display:flex;gap:9px;overflow:auto;scrollbar-width:none;margin-bottom:20px;padding:2px 1px 5px;
}
.day-ticket{
 flex:0 0 max(17%,62px);min-height:59px;display:grid;place-content:center;gap:0;text-align:center;
 background:#efe4d0;color:var(--ink);border:1px solid #e4d6bd;
 box-shadow:0 2px 3px #6d583d23;border-radius:8px;
 outline:1px dashed #a8977c86;outline-offset:-5px;padding:6px;
}
.day-ticket b{font-size:20px;line-height:1.18}
.day-ticket span{font-size:13px}
.day-ticket[aria-pressed=true]{background:var(--sheet);border-color:var(--sheet);color:#fffdf4;outline-color:#fff9}
.day-ticket:focus-visible{outline:2px solid var(--accent-ink);outline-offset:2px}
.route-board{
 position:relative;background:#f4ebdb;padding:7px;box-shadow:1px 5px 7px #61523b41;
 transform:rotate(-.25deg);border-radius:4px;margin-bottom:16px;
}
.route-canvas{
 position:relative;overflow:hidden;height:clamp(178px,47vw,320px);border-radius:5px;
 background:#f9f5e9;
}
.route-canvas>svg{width:100%;height:100%;position:absolute;inset:0}
.route-canvas polyline{fill:none;stroke:var(--sheet);stroke-width:2.5px;stroke-dasharray:1 5;stroke-linecap:round;vector-effect:non-scaling-stroke}
.route-marker{
 position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-28px);
 display:grid;justify-items:center;text-align:center;min-width:0;max-width:30%;
}
.route-marker span{
 position:relative;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;
 color:white;font-weight:900;background:var(--sheet);z-index:0;
}
.route-marker span::after{
 content:"";position:absolute;bottom:-5px;width:11px;height:11px;
 background:var(--sheet);transform:rotate(45deg);z-index:-1;
}
.route-marker b{background:#fcf9ef9e;border-radius:5px;padding:1px 4px;margin-top:7px;font-size:11px;line-height:1.2}
.route-expand{
 position:absolute;right:12px;top:12px;width:33px;height:33px;display:grid;place-items:center;
 border-radius:6px;background:#fffdf5;box-shadow:0 2px 4px #51473946;color:var(--ink);
}
.route-expand svg{width:16px;height:16px}
.route-caption{position:absolute;right:9px;bottom:8px;font-size:10px;color:var(--muted);background:#fffaf0e8;padding:2px 5px;border-radius:3px}
.route-tape{position:absolute;left:-6px;top:3px;width:85px;height:18px;background:#dfd5b89e;transform:rotate(-16deg);pointer-events:none}
.timeline-head h2{font-size:22px;font-weight:900;margin-bottom:9px}
.trip-timeline{list-style:none;margin:0;padding:0}
.timeline-stop{position:relative;display:grid;grid-template-columns:29px minmax(0,1fr);gap:9px;padding-bottom:10px}
.timeline-stop:not(:last-child)::before{content:"";position:absolute;left:14px;top:30px;bottom:-9px;border-left:2px dotted var(--sheet)}
.stop-number{position:relative;display:grid;place-items:center;margin-top:8px;width:29px;height:29px;border-radius:50%;background:var(--sheet);color:white;font-weight:850}
.stop-card{
 width:100%;display:grid;grid-template-columns:42px 42px minmax(0,1fr) auto;gap:7px;align-items:center;text-align:left;
 min-height:67px;padding:8px;border:1px solid #eadfcd;border-radius:10px;background:#faf4e7;
 box-shadow:0 3px 5px #55443035;
}
.stop-card:hover{background:#fffbf2;border-color:var(--accent)}
.stop-time{font-size:13px;font-weight:800;align-self:start;padding-top:3px;white-space:nowrap}
.stop-thumb,.stop-thumb img,.stop-placeholder{width:42px;height:42px;border-radius:7px}
.stop-thumb img{display:block;object-fit:cover}
.stop-placeholder{display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-ink)}
.stop-info{min-width:0}
.stop-title{display:flex;align-items:center;gap:5px;flex-wrap:wrap;line-height:1.25}
.stop-title b{overflow-wrap:anywhere}
.stop-info small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.stop-kind{white-space:nowrap;background:#dce8d8;color:#395742;padding:2px 6px;border-radius:14px;font-size:10px}
.stop-kind.food{background:#f2dcca;color:#74462d}
.stop-card>svg{width:13px;color:var(--muted)}
.stop-transit{
 display:flex;align-items:center;gap:5px;width:max-content;max-width:100%;margin:8px auto 0;padding:4px 8px;
 border-radius:18px;background:#eee6d7;color:var(--ink);font-size:11px;
}
.stop-transit svg{width:14px;height:14px}
.itinerary .j-empty{display:flex;align-items:center;justify-content:space-between;gap:8px}
@media(max-width:540px){
 .postbox-home .journal-hero{min-height:127px;padding:13px 15px}
 .postbox-home .journal-hero h1{font-size:clamp(22px,6.4vw,30px)}
 .postbox-home .journal-hero .hero-capture{right:7%}
 .postbox-home .journal-hero .hero-capture .primary{padding:8px;gap:3px;font-size:12px;min-height:35px}
 [data-surface=trip] .sidebar{padding:10px 12px 0}
 [data-surface=trip] #nav .nav-link{min-width:0;padding:0 10px;font-size:12px;height:37px}
 [data-surface=trip] .topbar{padding:12px 14px 0}
 [data-surface=trip] main{padding:14px 14px 27px}
 .day-tickets{margin-bottom:16px}
}
@media(max-width:350px){
 .postbox-home .journal-hero .hero-capture{right:4%}
 .stop-card{grid-template-columns:35px 34px minmax(0,1fr) 9px;gap:5px}
 .stop-thumb,.stop-thumb img,.stop-placeholder{width:34px;height:36px}
}

/* Denim and linen tokens shared by the journal and notebook. */
:root[data-journal-design=blue][data-surface]{
 --bg:#F5F6F7;--white:#FAF9F6;--ink:#26323C;--muted:#5C6B77;--line:#DEDAD2;
 --sheet:#4F687D;--accent:#4F687D;--accent-ink:#405B70;--accent-soft:#E4EBF0;--paper:#EFECE6;
}
:root[data-journal-design][data-surface]{
 --paper-shadow:0 4px 12px #26323c14;
 --tag-place:#DCE8E2;--tag-place-ink:#3B5E4D;
 --tag-food:#F3E2D8;--tag-food-ink:#8A4F36;
 --tag-shopping:#E8E2F2;--tag-shopping-ink:#5A497A;
}
[data-journal-design=blue][data-surface] body{
 background:radial-gradient(circle at 2px 2px,#8b989752 .55px,transparent .9px) 0 0/15px 15px,
 linear-gradient(#f5f6f7c2,#f5f6f7c2),url('/assets/ivory-paper.webp') center top/570px auto repeat;
}
[data-journal-design=blue] .postbox-home .journal-hero::before{
 background-image:linear-gradient(#4F687D,#4F687D),url('/assets/postmarked-paper.webp');
}
[data-surface=journal] .journal-header-inner{
 justify-content:space-between;gap:5px;padding-top:calc(12px + env(safe-area-inset-top));
}
.journal-wordmark{display:flex;align-items:center;gap:6px;color:var(--ink);white-space:nowrap}
.journal-wordmark>span{display:grid;place-items:center;width:33px;height:33px;border:1px solid var(--muted);border-radius:50%;color:var(--ink)}
.journal-wordmark>span svg{width:20px;height:20px;stroke-width:1.35}
.journal-wordmark b{font:850 clamp(17px,5vw,23px)/1 "Noto Serif CJK TC",serif}
.journal-wordmark small{font:600 12px Georgia,serif;color:var(--muted);align-self:end;margin-bottom:3px}
[data-journal-design=blue] .journal-header-actions .j-icon{background:#EFECE6;border-color:#e6e1d9;color:#26323C}
[data-surface=journal] main{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
[data-surface=trip] .sidebar{padding-top:calc(10px + env(safe-area-inset-top))}
[data-surface=trip] main{padding-bottom:calc(28px + env(safe-area-inset-bottom))}
[data-journal-design=blue][data-surface=trip] .sidebar{background:#F5F6F7f5}
[data-journal-design=blue][data-surface=trip] #nav .nav-link:not([aria-current=page]){background:#EFECE6}
[data-journal-design=blue] .day-ticket:not([aria-pressed=true]),[data-journal-design=blue][data-surface=trip] .project-switch{background:#EFECE6}
[data-journal-design=blue] #journal-nav{
 background:linear-gradient(#efece6d8,#efece6eb),#EFECE6 url('/assets/ivory-paper.webp') center/400px auto;
 box-shadow:0 5px 14px #26323c2b;border-color:#e9e4dd;
}
#journal-nav a[aria-current=page],#journal-nav .dock-journal[aria-current=page]{
 background:var(--sheet);color:#fff;aspect-ratio:1;border-radius:50%;width:47px;height:47px;
}
.j-shortcuts button{
 padding:5px 7px;border-radius:8px 8px 0 0;background:transparent;color:var(--muted);
}
.j-shortcuts button[aria-pressed=true]{background:var(--white);box-shadow:0 -2px 4px #26323c16;color:var(--ink)}
[data-journal-design=blue] .postbox-home .postcard,
[data-journal-design=blue] .postbox-home .recent-note{background:var(--white);box-shadow:var(--paper-shadow);border-color:var(--line)}
[data-journal-design=blue] .design-shortcuts a::before{background-color:#EFECE6}
[data-journal-design=blue] .design-shortcuts a:nth-child(2)::before{background-color:#EFECE6}
.route-canvas{background:#faf7ef;transition:height .24s ease}
.route-streets{opacity:.87}
.route-marker.selected span{outline:3px solid #fff;box-shadow:0 0 0 5px var(--sheet)}
.route-suggestion{
 position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);
 display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#fffdf2;
 color:var(--sheet);border:1px solid var(--sheet);
}
.route-suggestion svg{width:16px;height:16px}
.route-collapsed .route-canvas{height:64px}
.route-collapsed .route-marker b,.route-collapsed .route-suggestion,.route-collapsed .route-caption{display:none}
#dialog.route-dialog{width:min(95vw,920px);max-width:none}
.route-dialog .route-canvas{height:min(62dvh,540px)}
.route-dialog .route-board>.secondary{position:absolute;top:12px;right:12px}
.route-dialog .route-caption{font-size:11px}
.timeline-stop{scroll-margin-top:64px}
.stop-card{
 display:flex;gap:4px;justify-content:space-between;background:var(--white);box-shadow:var(--paper-shadow);
 border-color:var(--line);border-radius:12px;
}
.stop-edit{
 flex:1;min-width:0;text-align:left;display:grid;grid-template-columns:40px 42px minmax(0,1fr);gap:6px;align-items:center;padding:0;
}
.stop-actions{display:flex;align-items:center;gap:2px}
.stop-grip,.stop-delete{min-width:24px;height:34px;display:grid;place-items:center;padding:0;color:var(--muted);border-radius:6px}
.stop-grip{font-size:18px;cursor:grab;touch-action:none}
.stop-grip:active{cursor:grabbing}
.stop-delete svg{width:14px;height:14px}
.stop-actions button:hover{background:var(--accent-soft)}
.stop-highlight .stop-card{outline:2px solid var(--sheet);outline-offset:1px;background:var(--accent-soft)}
.stop-kind{background:var(--tag-place);color:var(--tag-place-ink)}
.stop-kind.food{background:var(--tag-food);color:var(--tag-food-ink)}
.stop-kind.shopping{background:var(--tag-shopping);color:var(--tag-shopping-ink)}
.import-stops{margin-top:15px}
.import-stops h3{font-size:15px}
.trip-postcard{
 position:relative;isolation:isolate;display:flex;align-items:flex-end;min-height:310px;
 padding:22px;border:9px solid #faf7ef;border-radius:13px;background:var(--sheet);
 box-shadow:var(--paper-shadow);color:#fff;
}
.trip-postcard.overview-kyoto{background:linear-gradient(0deg,#182732f0,#1c2a3577 40%,transparent 78%),url('/assets/hero.webp') center 56%/cover}
.trip-postcard-caption h1{font:800 clamp(27px,5vw,47px)/1.22 "Noto Serif CJK TC",serif;margin-bottom:4px}
.trip-postcard-caption p{color:#fffdf6}
.overview-tape,.trip-overview .spot::before{
 content:"";position:absolute;z-index:2;background:#e3d9bcaa;pointer-events:none;
}
.overview-tape{width:98px;height:25px;left:-12px;top:-3px;transform:rotate(-13deg)}
.trip-postcard .overview-edit{position:absolute;top:11px;right:11px;background:#faf7efde;color:#26323C;border-radius:22px;backdrop-filter:blur(8px)}
.trip-overview-meta{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.trip-overview-meta>span{display:flex;align-items:center;gap:5px;font-size:12px}
.trip-overview-meta svg{width:15px}
.trip-overview .spot-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.trip-overview .spot{overflow:visible;padding:7px 7px 0;background:var(--white);border-radius:12px;box-shadow:var(--paper-shadow)}
.trip-overview .spot::before{width:48px;height:13px;top:0;left:10px;transform:rotate(-10deg)}
.trip-overview .spot-image{border-radius:6px;height:clamp(90px,25vw,180px)}
.trip-overview .spot-body{padding:7px 24px 10px 3px}
[data-surface=trip] .spot-label{background:var(--tag-place);color:var(--tag-place-ink)}
[data-surface=trip] .spot-label.food{background:var(--tag-food);color:var(--tag-food-ink)}
[data-surface=trip] .spot .heart[aria-pressed=true] svg{fill:#c87887;stroke:#88465a}
[data-surface=trip] .spot .heart[aria-pressed=false] svg{fill:none}
[data-surface=trip] .spot>.icon-button{position:absolute;right:5px;bottom:5px;min-height:24px;width:24px;padding:3px;border:0}
[data-surface=trip] .spot>.icon-button svg{width:12px}
.spot-voters{display:block;margin:0 28px 7px 3px;padding:0;color:var(--accent-ink);font-size:11px;text-decoration:underline}
.booking-pages>.page-title:not(:first-child){margin-top:24px}
@media(max-width:540px){
 .journal-header-actions{gap:4px}
 [data-surface=journal] .journal-header-actions .j-icon{width:34px;height:34px}
 .journal-wordmark{gap:4px}
 .journal-wordmark>span{width:30px;height:30px}
 .journal-wordmark small{font-size:10px}
 .trip-postcard{min-height:231px;padding:14px;border-width:7px}
 .trip-postcard-caption p{font-size:12px}
}
@media(max-width:350px){
 .journal-wordmark small{display:none}
 .stop-edit{grid-template-columns:32px 31px minmax(0,1fr);gap:4px}
 .stop-actions button{min-width:19px}
}
@media(prefers-reduced-motion:reduce){.route-canvas{transition:none}}
.itinerary .route-board{position:sticky;top:calc(58px + env(safe-area-inset-top));z-index:2}
.itinerary .route-board.route-collapsed{margin-bottom:12px}
.timeline-stop{scroll-margin-top:calc(154px + env(safe-area-inset-top))}
.stop-transit:hover{background:var(--accent-soft)}
#dialog.route-dialog{
 width:100dvw;max-width:none;height:100dvh;max-height:none;margin:0;border:0;border-radius:0;
 padding:calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}
.fare-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) auto;gap:9px;align-items:end;margin-bottom:13px}
.fare-check{display:inline-flex;align-items:center;gap:4px;min-height:37px;font-size:13px}
.fare-check input{accent-color:var(--accent);width:16px;height:16px}
.fare-card{background:var(--white);border:1px solid var(--line);border-radius:12px;padding:13px;margin-top:9px;box-shadow:var(--paper-shadow)}
.fare-card-head{display:flex;justify-content:space-between;align-items:start;gap:8px}
.fare-card h3{overflow-wrap:anywhere;font-size:16px}
.fare-card small,.fare-card dt{color:var(--muted);font-size:11px}
.fare-amount{text-align:right;flex:none}
.fare-amount b{display:block;font-size:21px;color:var(--accent-ink)}
.fare-card dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:7px;margin:8px 0}
.fare-card dd{margin:0;font-size:13px;overflow-wrap:anywhere}
.fare-card .row-actions{flex-wrap:wrap}
.fare-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:10px;margin-bottom:12px}
.fare-table{width:100%;min-width:340px;border-collapse:collapse;font-size:13px;text-align:left}
.fare-table caption{text-align:left;padding:8px 10px;font-weight:800;background:var(--accent-soft)}
.fare-table th,.fare-table td{padding:6px 9px;border:1px solid var(--line);vertical-align:top}
.fare-table th{background:var(--white)}
.fare-note{margin:3px 0 8px}
@media(max-width:540px){
 .fare-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
 .fare-controls .fare-check{grid-column:1/-1;min-height:28px}
 .fare-card .row-actions>.secondary{padding:6px 8px}
}
.stay-filters{grid-template-columns:minmax(0,1.5fr) auto auto}
.stay-chosen{display:inline-block;margin-right:6px;padding:2px 7px;color:var(--tag-place-ink);background:var(--tag-place);border-radius:10px;font-size:11px}
@media(max-width:540px){
 .stay-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .stay-filters .field{grid-column:1/-1}
 .stay-filters .fare-check{grid-column:auto}
}
.overview-stay{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;margin-top:14px;padding:11px 13px;background:var(--white);border:1px solid var(--line);border-radius:12px;box-shadow:var(--paper-shadow)}
.overview-stay>svg{color:var(--accent)}
.overview-stay small,.overview-stay b{display:block}
.overview-stay small{font-size:11px;color:var(--muted)}
/* 景點卡：加到行程與核對地點 */
.spot-plan{display:flex;flex-wrap:wrap;gap:6px;margin:2px 30px 9px 3px}
.spot-plan .secondary{min-height:34px;padding:5px 10px;font-size:12px;gap:5px;border-radius:999px}
.spot-plan svg{width:14px;height:14px}
.spot-address{font-size:11px;line-height:1.45;color:var(--muted);margin-top:2px;overflow-wrap:anywhere}
/* 天氣列的載入、失敗、離線狀態維持單行 */
.weather-line{display:flex;align-items:center;gap:8px;min-height:24px;font-size:14px;color:var(--muted)}
.weather-line>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.weather-line svg{width:18px;height:18px;flex:none}
.weather-retry{flex:none;min-height:32px;padding:4px 12px;border-radius:999px;border:1px solid var(--line);background:var(--white);color:var(--accent-ink);font-size:13px;font-weight:700}

