/* Small, readable groups for quick checks on the move. */
[data-view="home"] .datebar {position:static}
.guide-section {border-bottom:1px solid var(--rule); margin:0}
.guide-section>summary,.task-row summary,.weather-retry {cursor:pointer;color:var(--accent,var(--slate))}
.guide-section>summary {font-weight:550;list-style-position:inside;padding:10px 0;min-height:44px}
.guide-section>div {margin:0 0 8px}
#dialogbody p {margin:4px 0 9px}
#dialogbody h1,#dialogbody h2,#dialogbody h3 {margin:10px 0 4px;line-height:1.4}
#dialogbody h1 {font-size:1.18rem}
#dialogbody ul,#dialogbody ol {margin:5px 0 10px;padding-inline-start:1.3rem}
#dialogbody li {margin:3px 0}
#dialogbody table:not(.train) {margin:8px 0}
#dialogbody figure {margin:5px 0}
#dialogbody figcaption {color:var(--secondary);font-size:.85rem;line-height:1.45;margin:3px 0 6px}
#dialogbody aside {padding:8px 11px;background:#f6f4f1;border-radius:8px}
#dialogbody .guide-section>div>ul:has(.task-row) {list-style:none;padding:0;margin:0}
.task-row {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:6px;border-top:1px solid var(--rule)}
.task-row>label {display:flex;align-items:center;min-height:43px;gap:9px;color:var(--ink);font-size:.94rem;line-height:1.4;cursor:pointer}
.task-row input {flex:none;margin:0;padding:0;width:17px;height:17px;min-height:0;accent-color:var(--slate)}
.task-row label:has(:checked) span {color:var(--secondary);text-decoration:line-through}
.task-row details {display:contents}
.task-row details>summary {grid-column:2;grid-row:1;min-height:42px;display:flex;align-items:center;margin:0;padding:5px;font-size:.82rem}
.task-row details>summary::after {content:'';width:6px;height:6px;border:solid currentColor;border-width:0 1px 1px 0;transform:rotate(45deg);margin:-2px 2px 0 6px}
.task-row details[open]>summary::after {transform:rotate(225deg)}
.task-row details>p {grid-column:1/-1;color:var(--secondary);padding:0 0 4px 26px;font-size:.875rem}
.trip-guide > details {margin:0;border-bottom:1px solid var(--rule)}
.trip-guide > details > summary,.shopping-store > summary {
  display:flex;align-items:center;gap:.65rem;min-height:44px;padding:9px 2px;
  list-style:none;cursor:pointer;color:var(--accent);font-weight:500;line-height:1.45;
}
.trip-guide summary::-webkit-details-marker {display:none}
.trip-guide > details > summary::after,.shopping-store > summary::after {
  content:'';width:.43rem;height:.43rem;margin:0 4px 0 auto;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:rotate(-45deg);flex:none;
}
.trip-guide details[open] > summary::after {transform:rotate(45deg)}
.shopping-day > summary time {font-variant-numeric:tabular-nums;min-width:3.25rem}
.shopping-day > summary span {color:var(--ink)}
.shopping-store {margin:0 0 0 .55rem;padding-left:.7rem;border-left:2px solid var(--rule)}
.shopping-store > summary {font-size:1rem;color:var(--ink)}
#dialogbody .shopping-shortcuts {font-size:.94rem;margin:0 0 .4rem}
.shopping-shortcuts a {display:inline-flex;align-items:center;min-height:44px}
#dialogbody .refund-guide > h2 {margin:1rem 0 .15rem;font-size:1.05rem}
.refund-guide > details[open] {padding-bottom:.4rem}
.shoe-photos {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-items:center}
.shoe-photos img {width:100%;aspect-ratio:4/3;object-fit:contain;background:#f3f2ef}
.weather {margin:8px 0 2px;padding:8px 12px;background:#eef3f6;border-radius:9px;color:var(--slate)}
.weather-label,.weather-line,.budget-line,.chart-heading,.ledger-row {display:flex;align-items:center;justify-content:space-between;gap:8px}
.weather-label b {font-size:.88rem}.weather-label a,.weather-values small {font-size:.72rem;color:#536978}
.weather-values {font-size:.875rem;margin-top:2px}
.weather-line {justify-content:flex-start;gap:7px}.weather-line b {min-width:2.2em}.weather-line strong {margin-left:auto}
.weather-values small {display:block;text-align:right}
.weather-retry {padding:7px 0}
.itinerary-modes {display:flex;gap:3px;width:fit-content;border-radius:8px;background:#f0f1f1;padding:2px;margin:9px 0 3px}
.itinerary-modes button {min-height:36px;padding:4px 12px;font-size:.86rem;border-radius:6px;color:var(--secondary)}
.itinerary-modes [aria-pressed="true"] {background:var(--surface);color:var(--slate);box-shadow:0 1px 3px #263c4e20;font-weight:600}
.cost-card {background:#f7f2ed;border:1px solid #e9e0d7;border-radius:12px;padding:13px 16px;color:var(--walnut)}
.cost-card>p {margin:0;font-size:.88rem}.cost-card>strong {font-size:clamp(1.6rem,7vw,2.15rem);font-weight:600;display:block;line-height:1.35;font-variant-numeric:tabular-nums}
.cost-card>small,.ledger-row small,.ledger-hint,.ledger-local {font-size:.8rem;color:var(--secondary);line-height:1.48}
.cost-pair {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px;padding-top:8px;border-top:1px solid #dfd5cc}
.cost-pair>div {font-size:.81rem}.cost-pair b {display:block;font-size:1rem}
.budget-line,.ledger-row {padding:8px 0;border-bottom:1px solid var(--rule);font-size:.88rem}
.budget-line b,.ledger-row b,.chart-heading h2 {font-weight:550}
.budget-line b {flex:none}.ledger-row>div:first-child {min-width:0}
.chart-heading {margin-top:14px}.chart-heading h2 {margin:0}
.chart-heading select {width:auto;min-height:38px;margin:0;font-size:.9rem;padding:4px 8px;color:var(--walnut)}
[data-view="expenses"] .bars {margin:8px 0 14px}
[data-view="expenses"] .barrow {margin:7px 0}
[data-view="expenses"] .hero {padding:5px 0 0}
[data-view="expenses"] .subtabs {margin:4px 0 12px}
[data-view="expenses"] .pill {margin-top:12px}
.ledger-row b,.ledger-row small {display:block}
.ledger-row>div:first-child>b {color:var(--accent);font-size:.92rem}
.ledger-action {text-align:right;flex-shrink:0}
.ledger-action button,.ledger-remove {color:var(--slate);min-height:36px;padding:4px 0;font-size:.82rem}
.ledger-local {margin:14px 0 0}.ledger-hint {margin:8px 0}
#expenseform>.formgrid {margin-top:9px}
#expenseform .full.primary {margin-top:16px}
#expenseform input,#expenseform select {max-width:100%}
#detail:focus {outline:none}
@media (max-width:600px) {
  #detail[open] {position:fixed;inset:0;margin:0;width:100%;height:100dvh;max-height:100dvh;border-radius:0;padding:env(safe-area-inset-top,0px) 0 0;background:var(--surface)}
  #detail::backdrop {background:var(--surface);backdrop-filter:none}
  #detail[open] .dialoghead {padding:0 var(--gutter);min-height:45px;font-size:1rem}
  #dialogbody {padding-top:8px;line-height:1.5;flex:1}
  #dialogbody p,#dialogbody li {font-size:.925rem}
  #dialogbody .task-row details>p {font-size:.855rem}
  #dialogbody .guide-section>summary {padding:9px 0}
  .stop {padding:7px 0;grid-template-columns:4.15rem minmax(0,1fr);column-gap:8px}
  .stop-content p {font-size:.875rem;line-height:1.45}
  .stop .place-detail {min-height:40px;margin:-8px 0;padding:8px 4px 8px 0}
  .stop h3,.stop-time time {font-size:.97rem}
  .day-tools button {font-size:.88rem;min-height:42px}
  .hotel {padding:7px 0}.flight {padding:8px 0}.flighthead {margin-bottom:2px}
  .weather-values small+div {margin-top:3px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

.budget-links {display:grid;gap:5px;margin-block:8px}.budget-links a {text-decoration:underline;font-size:.88rem}

html,nav,.datebar,dialog,.dialoghead {background-color:var(--surface)}
nav,.datebar {backdrop-filter:none}
a,nav a.active,.listrow button,.pill,.related-place {color:var(--blue)}
nav a,.subtabs button,.muted,small,label,.footer,.note,.hero p,.empty {color:var(--secondary)}
.primary {background:var(--slate);color:#fff}
input::placeholder {color:#586165;opacity:1}
#expenseform label {min-inline-size:0;color:var(--secondary);font-size:.875rem}
#expenseform input,#expenseform select {
  box-sizing:border-box;display:block;min-inline-size:0;inline-size:100%;max-inline-size:100%;
  height:2.8rem;min-height:44px;margin:4px 0 0;padding:0 10px;
  border:1px solid #aeb8b8;border-radius:8px;background-color:var(--sheet);color:var(--ink);
  font-family:inherit;font-size:max(1rem,16px);line-height:normal;
}
#expenseform input[type=date] {-webkit-appearance:none;appearance:none;text-align:start}
#expenseform input[type=date]::-webkit-date-and-time-value {margin:0;text-align:start}
#expenseform select,#chart-scope {
  -webkit-appearance:none;appearance:none;padding-inline-end:28px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%233b4a50' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 5 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 9px center;background-size:14px;
}
#expenseform :is(input,select):focus-visible {outline:2px solid var(--blue);outline-offset:1px}
#expenseform .formgrid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
@media (max-width:600px) {
  /* Keep scrollable content inside the space between the two navigation bars. */
  html,body {overflow:hidden}
  body {height:100vh;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
  body::before {content:none}
  body>header,body>main {width:100%;margin:0}
  body>header {background:var(--surface)}
  body>main {
    min-height:0;overflow-y:auto;overscroll-behavior:contain;
    padding-bottom:16px;scroll-padding-block:46px 12px;
  }
  body>nav {position:static;background:var(--surface);border-top-color:var(--rule);padding-bottom:max(3px,env(safe-area-inset-bottom))}
  .datebar {top:0;scroll-margin-top:0}
}
@media (max-width:330px) {
  #expenseform .formgrid {grid-template-columns:minmax(0,1fr)}
}

@media (max-width: 600px) {
  #dialogbody .shopping-guide figure img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 36vw, 9rem);
    max-height: 8rem;
    object-fit: contain;
  }
}

/* Today's itinerary uses the same grey-blue accent as travel times and platforms. */
.schedule-dates {display:flex;align-items:stretch;position:sticky;top:0;z-index:3;background:var(--surface);border-bottom:1px solid var(--rule)}
.schedule-dates .datebar {position:static;flex:1;min-width:0;border-bottom:0}
.return-now {align-self:center;min-height:44px;padding:0 6px;color:var(--blue);font-size:.875rem;font-weight:600;white-space:nowrap}
.return-now[hidden],.stops [hidden] {display:none}
.time-pin:empty {display:none}
.stop-line:has(.time-pin:not(:empty)) {
  display:grid;grid-template-columns:minmax(0,1fr) max(4em,calc(2em + 31px)) 9px;
  align-items:center;gap:6px;width:100%;
}
.stop-name {min-width:0;overflow-wrap:anywhere}
.time-pin {display:inline-flex;align-items:center;gap:4px;white-space:nowrap;
  color:var(--secondary);font-size:.8125rem;font-weight:400;line-height:1.4;letter-spacing:0}
.stop[aria-current=time] .time-pin {color:#41647c;font-weight:500}
.stop[aria-current=time] .time-pin::after {
  content:"";width:27px;aspect-ratio:95/73;background:url("/mueka-timeline.webp") center/contain no-repeat;
}
.time-gap {padding-block:9px;font-size:.875rem;color:var(--secondary);list-style:none}
.stops [aria-current=time] {scroll-margin-block-start:3.2rem}
.rail-leg[aria-current=time] {outline:2px solid #557889;outline-offset:-2px}
.rail-leg[aria-current=time]::before,.rail-transfer[aria-current=time]::before {display:block;padding:4px 10px;color:#fff;background:#446277;font-size:.8125rem;font-weight:600}
.rail-leg[aria-current=time]::before {content:'現在 · 乘車'}
.rail-transfer[aria-current=time]::before {content:'現在'}
.rail-transfer {margin:7px 0;padding:4px 0 4px 9px;border-inline-start:2px solid #93a9b3;font-size:.875rem;color:var(--secondary)}
.rail-transfer strong,.rail-transfer span {display:block}
.rail-transfer[aria-current=time] {background:var(--sheet);border-color:var(--blue)}
.walking-stop:not([aria-current=time]) .stop-content h3,.walking-stop:not([aria-current=time]) .place-detail {color:var(--secondary);font-size:.9375rem}
.home-now {margin:6px 0 12px;padding:11px 13px;background:#e6eef2;border-inline-start:3px solid #41657c;border-radius:5px}
.live-heading {display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.live-heading b,.live-heading small,.home-now p {font-size:.875rem}
.home-now h2 {color:var(--ink);margin:4px 0;font-size:1.18rem}
.home-now p {margin:3px 0}
.home-now a,.preflight-link a {display:inline-flex;align-items:center;min-height:44px;color:var(--blue);font-weight:550}
.preflight-link a {font-size:.9375rem}.preflight-link {text-align:right}
.expense-options,.expense-switch {margin-top:8px;color:var(--secondary);border-block-end:1px solid var(--rule)}
.expense-options summary,.expense-switch summary {cursor:pointer;min-height:44px;padding:9px 0;font-size:.875rem}
.expense-options summary strong {color:var(--ink)}
.expense-options summary span {display:block;margin-left:1em;font-variant-numeric:tabular-nums}
.expense-options .formgrid,.expense-switch label {padding-bottom:10px}
.place-expense {display:block;margin-top:12px;padding:6px 14px;min-height:44px;background:#eee6df;color:#604933;border-radius:7px;font-weight:550}

.weather-retry{min-height:44px}.weather-label a{display:inline-flex;align-items:center;min-height:32px}.weather-line{flex-wrap:wrap}.time-gap[hidden]{display:none}
