:root {
  --ink: #171a19;
  --muted: #646d6a;
  --paper: #fff;
  --warm: #f4f3ed;
  --soft: #eef3f1;
  --line: #dce2df;
  --teal: #117f82;
  --teal-dark: #0b6265;
  --teal-soft: #dcefed;
  --red: #a54638;
  --red-soft: #f5e9e5;
  --shadow: 0 16px 42px rgba(20, 39, 34, .10);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sans: Manrope, Inter, Geist, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #e4e7e4; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--warm); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
button, summary { cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
img { max-width: 100%; display: block; }

.app-shell { width: min(100%, 560px); min-height: 100dvh; margin: 0 auto; padding-bottom: calc(68px + var(--safe-bottom)); background: var(--warm); box-shadow: 0 0 0 1px rgba(24,30,28,.05), 0 0 60px rgba(30,45,40,.09); }
.app-header { position: sticky; top: 0; z-index: 40; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid rgba(220,226,223,.85); background: rgba(244,243,237,.92); backdrop-filter: blur(16px) saturate(120%); }
.wordmark { padding: 8px 0; border: 0; background: transparent; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.header-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.header-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(17,127,130,.11); }

.view { display: none; min-height: calc(100dvh - 132px); animation: fade .22s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } }

.eyebrow, .card-kicker { margin: 0; color: var(--teal-dark); font-size: 9px; font-weight: 850; letter-spacing: .17em; }
.content-stack { display: grid; gap: 14px; padding: 18px; }

/* Home */
.home-hero { position: relative; min-height: 390px; overflow: hidden; color: #fff; background: #7f3528; }
.home-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.home-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,20,18,.04) 12%, rgba(18,22,20,.18) 45%, rgba(24,24,20,.82) 100%); }
.home-hero-copy { position: absolute; inset: auto 22px 27px; z-index: 1; }
.home-hero .eyebrow { color: #c9e7e4; }
.home-hero h1 { margin: 12px 0 14px; font-size: clamp(48px, 13vw, 68px); font-weight: 700; line-height: .96; letter-spacing: -.055em; }
.hero-lead { max-width: 390px; margin: 0; color: rgba(255,255,255,.84); font-size: 15px; line-height: 1.5; }
.home-stack { position: relative; z-index: 2; margin-top: -18px; }

.resume-card, .home-days, .route-snapshot, .experience-card, .time-guard-card, .day-ending, .participation-card, .rule-card, .masterkit-card { border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: 0 8px 26px rgba(28,43,38,.05); }
.resume-card { padding: 21px; }
.resume-card h2, .time-guard-card h2, .participation-card h2, .masterkit-card h2 { margin: 8px 0; font-size: 22px; line-height: 1.16; letter-spacing: -.035em; }
.resume-card p:not(.card-kicker), .time-guard-card > small, .participation-card > p:not(.card-kicker), .masterkit-card > p:not(.card-kicker) { color: var(--muted); font-size: 12px; line-height: 1.58; }
.primary-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 10px; padding: 0 16px; border: 0; border-radius: 9px; color: #fff; background: var(--teal); font-size: 11px; font-weight: 750; text-decoration: none; }
.primary-button:hover { background: var(--teal-dark); }
.wide-button { width: 100%; }

.before-entry { width: 100%; display: grid; grid-template-columns: 36px 1fr auto; gap: 11px; align-items: center; padding: 15px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.before-entry > span:last-child { color: var(--teal); font-size: 24px; }
.before-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--teal-dark); background: var(--teal-soft); font-weight: 800; }
.before-entry strong, .before-entry small { display: block; }
.before-entry strong { font-size: 13px; }
.before-entry small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.home-days { overflow: hidden; }
.home-days .day-card { width: 100%; display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 15px 16px; text-align: left; border: 0; border-top: 1px solid var(--line); background: #f5fbfa; }
.home-days .day-card:first-child { border-top: 0; }
.home-days .day-card > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #a8b9b5; border-radius: 50%; color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.home-days strong, .home-days small { display: block; }
.home-days strong { font-size: 13px; }
.home-days small { margin-top: 4px; color: var(--muted); font-size: 9px; }

/* Before */
.page-heading, .day-intro { padding: 34px 20px 25px; border-bottom: 1px solid var(--line); background: var(--paper); }
.page-heading h1, .day-copy h1 { margin: 12px 0 13px; font-size: clamp(38px, 11vw, 58px); font-weight: 700; line-height: 1; letter-spacing: -.055em; }
.page-heading > p:last-child, .day-copy > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.checklist { display: grid; gap: 9px; }
.checklist label { display: grid; grid-template-columns: 24px 1fr; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.checklist input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--teal); }
.checklist strong, .checklist small { display: block; }
.checklist strong { font-size: 12px; }
.checklist small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.rule-card, .masterkit-card { padding: 17px; }
.rule-card summary { list-style: none; }
.rule-card summary::-webkit-details-marker { display: none; }
.rule-card summary span, .rule-card summary small { display: block; }
.rule-card summary span { font-size: 15px; font-weight: 700; }
.rule-card summary small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.rule-card p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.verification-tag { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; color: var(--teal-dark); background: var(--teal-soft); font-size: 8px; font-weight: 750; }
.masterkit-card { background: #eff6f4; }
.masterkit-card a { color: var(--teal-dark); font-size: 11px; font-weight: 750; }

/* Day */
.day-topbar { position: sticky; top: 54px; z-index: 32; display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line); background: rgba(244,243,237,.95); backdrop-filter: blur(14px); }
.day-tabs { display: flex; gap: 5px; }
.day-tabs button { min-height: 33px; padding: 0 12px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 750; }
.day-tabs .is-active { color: var(--teal-dark); border-color: #9bbdb9; background: #fff; }
.day-tabs .is-disabled { opacity: .38; cursor: default; }
.trip-launch { border: 0; border-radius: 8px; color: #fff; background: var(--teal-dark); font-size: 10px; font-weight: 750; }
.trip-launch.small { min-height: 34px; padding: 0 13px; }
.trip-launch.wide-button { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; }
.day-intro { padding-top: 31px; }
.day-copy h1 { font-size: clamp(41px, 11.6vw, 61px); }

.day-photo-route { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.day-photo-route button { min-width: 0; padding: 0; overflow: hidden; text-align: left; border: 0; border-radius: 10px; background: transparent; }
.day-photo-route img { width: 100%; aspect-ratio: 1 / 1.14; object-fit: cover; border-radius: 10px; }
.day-photo-route button:nth-child(1) img { object-position: 52% 38%; }
.day-photo-route button:nth-child(2) img { object-position: 50% 32%; }
.day-photo-route button:nth-child(3) img { object-position: 48% 45%; }
.day-photo-route span { position: relative; display: block; padding: 9px 2px 0 30px; min-height: 52px; }
.day-photo-route b { position: absolute; left: 0; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-size: 10px; }
.day-photo-route strong, .day-photo-route small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-photo-route strong { font-size: 10px; }
.day-photo-route small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.vibe-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.vibe-row span { padding: 7px 10px; border-radius: 999px; color: var(--teal-dark); background: var(--teal-soft); font-size: 9px; font-weight: 650; }

.route-snapshot { overflow: hidden; }
.route-snapshot > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.route-snapshot h2 { margin: 7px 0 0; font-size: 21px; letter-spacing: -.035em; }
.route-map-layout { display: grid; }
.route-order { padding: 17px; }
.route-order > p { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.route-order ol { margin: 0; padding: 0; list-style: none; }
.route-order li > button { width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 8px 0; text-align: left; border: 0; background: transparent; }
.route-order li > button b { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #9fb9b5; border-radius: 50%; color: var(--teal-dark); background: #fff; font-size: 10px; }
.route-order li > button b.is-done { color: #fff; border-color: var(--teal); background: var(--teal); }
.route-order li strong, .route-order li small { display: block; }
.route-order li strong { font-size: 13px; }
.route-order li small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.route-leg { position: relative; margin: 2px 0 2px 16px; padding: 7px 0 10px 27px; border-left: 1px dashed #9fb9b5; }
.route-leg span, .route-leg strong, .route-leg a { display: block; }
.route-leg span { color: var(--muted); font-size: 8px; }
.route-leg strong { margin-top: 3px; font-size: 9px; }
.route-leg a { margin-top: 5px; color: var(--teal-dark); font-size: 8px; font-weight: 750; }
.full-route-button { width: 100%; margin-top: 14px; }
.map-note { display: block; margin-top: 9px; color: var(--muted); font-size: 8px; line-height: 1.45; }

.real-map { position: relative; min-height: 420px; overflow: hidden; border-top: 1px solid var(--line); background: #e6ece9; }
.osm-tile-map { position: absolute; inset: 0; overflow: hidden; background: #e6ece9; filter: saturate(.76) contrast(.95) brightness(1.03); pointer-events: none; }
.osm-tile-layer { position: absolute; display: grid; }
.osm-tile-layer img { width: 100%; height: 100%; display: block; object-fit: fill; }
.map-route-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-route-overlay path { fill: none; stroke: var(--teal); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 2.5 2.2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 0 #fff); }
.map-pin { position: absolute; display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; transform: translate(-50%, -50%); }
.map-pin b { width: 31px; height: 31px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; background: var(--teal); box-shadow: 0 3px 10px rgba(20,70,65,.25); font-size: 10px; }
.map-pin span { max-width: 90px; padding: 5px 7px; border-radius: 6px; background: rgba(255,255,255,.94); box-shadow: 0 3px 10px rgba(20,40,36,.12); font-size: 8px; font-weight: 750; white-space: nowrap; }
.map-pin-left-label { flex-direction: row-reverse; }
.pin-1 { left: 70%; top: 86%; }
.pin-2 { left: 70%; top: 52%; }
.pin-3 { left: 51%; top: 11%; }
.map-attribution { position: absolute; right: 7px; bottom: 7px; padding: 4px 6px; border-radius: 4px; color: #52605c; background: rgba(255,255,255,.9); font-size: 7px; }

.experience-card { padding: 18px; }
.experience-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.experience-card h2 { margin: 7px 0 0; font-size: 22px; line-height: 1.12; letter-spacing: -.035em; }
.experience-lead { margin: 12px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.experience-flow { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.experience-flow li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 10px; min-height: 56px; padding: 0 0 12px; }
.experience-flow li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 29px; bottom: 0; border-left: 1px dashed #9fb9b5; }
.experience-flow b { position: relative; z-index: 1; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #9fb9b5; border-radius: 50%; color: var(--teal-dark); background: #fff; font-size: 9px; }
.experience-flow strong, .experience-flow small { display: block; }
.experience-flow strong { padding-top: 2px; font-size: 12px; }
.experience-flow small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.experience-flow .is-optional b { border-color: var(--teal); background: var(--teal-soft); }
.experience-flow .is-optional strong { color: var(--teal-dark); }
.pending-note { margin: 0; padding: 11px 12px; border: 1px dashed #b7c8c4; border-radius: 9px; color: var(--muted); background: #f7faf9; font-size: 9px; line-height: 1.5; }

.time-guard-card { padding: 18px; }
.time-guard-grid { display: grid; gap: 8px; margin: 14px 0 11px; }
.time-guard-grid div { padding: 12px; border-radius: 9px; background: var(--red-soft); }
.time-guard-grid b, .time-guard-grid span { display: block; }
.time-guard-grid b { color: var(--red); font-size: 9px; }
.time-guard-grid span { margin-top: 4px; color: #574d49; font-size: 10px; line-height: 1.45; }
.time-guard-card > small { display: block; }

.day-ending { display: grid; grid-template-columns: 82px 1fr; gap: 13px; align-items: center; padding: 14px; }
.day-ending > img { width: 82px; height: 82px; object-fit: cover; border-radius: 10px; }
.day-ending h2 { margin: 5px 0 4px; font-size: 16px; }
.day-ending p:not(.card-kicker) { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.day-ending blockquote { grid-column: 1 / -1; margin: 2px 0 0; padding: 13px; border-radius: 9px; color: #3d4744; background: var(--soft); font: italic 14px/1.45 var(--serif); }
.day-ending cite { display: block; margin-top: 4px; text-align: right; color: var(--muted); font: 10px var(--sans); }

.backup-card { border: 1px solid #ddcfc7; border-radius: 12px; background: #fffaf7; }
.backup-card summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; list-style: none; }
.backup-card summary::-webkit-details-marker { display: none; }
.backup-card summary small, .backup-card summary span { display: block; }
.backup-card summary small { margin-bottom: 5px; color: var(--red); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.backup-card summary span { font-size: 13px; font-weight: 700; }
.backup-card summary b { color: var(--red); font-size: 20px; }
.backup-card[open] summary b { transform: rotate(45deg); }
.backup-card > div { padding: 0 16px 16px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.backup-card > div p { margin: 0 0 10px; }
.backup-card a, .trip-backup a { color: var(--teal-dark); font-weight: 750; }
.participation-card { padding: 18px; }
.participation-card button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid #aebdb9; border-radius: 9px; background: #fff; font-size: 10px; font-weight: 700; }
.task-check { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #9aada8; border-radius: 50%; color: transparent; }
.participation-card button.is-done { border-color: var(--teal); background: #f1faf8; }
.participation-card button.is-done .task-check { color: #fff; border-color: var(--teal); background: var(--teal); }

/* Bottom nav */
.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 50; width: min(100%, 560px); display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px 8px calc(5px + var(--safe-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); transform: translateX(-50%); }
.bottom-nav button { min-height: 43px; display: grid; place-items: center; gap: 1px; border: 0; border-radius: 8px; color: #78817e; background: transparent; font-size: 8px; font-weight: 700; }
.bottom-nav button span { font-size: 11px; }
.bottom-nav button.is-active { color: var(--teal-dark); background: var(--teal-soft); }

/* Place card */
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(21,28,26,.35); backdrop-filter: blur(2px); }
.place-sheet { position: fixed; left: 50%; bottom: 0; z-index: 110; width: min(100%, 560px); max-height: 90dvh; overflow: auto; padding: 10px 18px calc(20px + var(--safe-bottom)); border-radius: 20px 20px 0 0; background: #fff; box-shadow: 0 -20px 60px rgba(17,30,27,.2); transform: translate(-50%, 105%); transition: transform .27s ease; }
.place-sheet.is-open { transform: translate(-50%, 0); }
.sheet-handle { width: 40px; height: 4px; margin: 0 auto 16px; border-radius: 999px; background: #d5d9d7; }
.place-sheet > header { display: flex; justify-content: space-between; gap: 16px; }
.place-sheet h2 { margin: 6px 0 3px; font-size: 30px; line-height: 1; letter-spacing: -.045em; }
.place-sheet header p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 21px; }
.place-status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 15px 0; color: var(--muted); font-size: 9px; }
.place-intro { margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.arrival-block { padding: 15px; border-radius: 12px; background: var(--soft); }
.arrival-block .card-kicker { margin-bottom: 10px; }
.arrival-grid { display: grid; gap: 8px; }
.arrival-row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; font-size: 10px; line-height: 1.45; }
.arrival-row b { color: var(--ink); }
.arrival-row span { color: var(--muted); }
.execution-detail { border-bottom: 1px solid var(--line); }
.execution-detail summary { padding: 14px 2px; color: var(--ink); font-size: 11px; font-weight: 750; }
.execution-detail p { margin: 0; padding: 0 2px 14px; color: var(--muted); font-size: 10px; line-height: 1.58; }
.sheet-actions { position: sticky; bottom: calc(-20px - var(--safe-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px -18px calc(-20px - var(--safe-bottom)); padding: 12px 18px calc(16px + var(--safe-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.secondary-button { min-height: 44px; display: grid; place-items: center; padding: 8px; border: 1px solid #aeb9b5; border-radius: 8px; background: #fff; color: var(--ink); font-size: 9px; font-weight: 750; text-decoration: none; }
.inline-place-button { width: 100%; margin: 0 0 10px; }
.alternate-card { border-color: #b9d2ce; background: #f6fbfa; }
.route-leg-start { margin-top: 0; padding-top: 1px; }
.sheet-actions .primary-button { grid-column: 1 / -1; width: 100%; margin: 0; }

/* Trip mode */
.trip-overlay { position: fixed; inset: 0; z-index: 90; display: grid; grid-template-rows: auto 1fr auto; width: min(100%, 560px); margin: 0 auto; background: var(--warm); transform: translateY(105%); transition: transform .28s ease; }
.trip-overlay.is-open { transform: translateY(0); }
.trip-header { position: relative; padding: calc(17px + env(safe-area-inset-top, 0px)) 18px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.trip-header h2 { margin: 6px 44px 12px 0; font-size: 29px; line-height: 1; letter-spacing: -.045em; }
.trip-header .icon-button { position: absolute; right: 17px; top: calc(16px + env(safe-area-inset-top, 0px)); }
.trip-progress { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; }
.trip-progress i { height: 5px; border-radius: 999px; background: linear-gradient(90deg, var(--teal) var(--progress, 0%), #e1e5e3 var(--progress, 0%)); }
.trip-progress span { color: var(--muted); font-size: 9px; }
.trip-scroll { overflow: auto; padding: 15px 14px 28px; }
.trip-lead { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.trip-backup { margin-bottom: 12px; border: 1px solid #ddcfc7; border-radius: 10px; background: #fff8f4; }
.trip-backup summary { display: flex; align-items: center; justify-content: space-between; padding: 13px; list-style: none; }
.trip-backup summary::-webkit-details-marker { display: none; }
.trip-backup summary span { font-size: 12px; font-weight: 700; }
.trip-backup summary b { color: var(--red); font-size: 9px; }
.trip-backup p, .trip-backup a { margin: 0 13px 11px; font-size: 10px; line-height: 1.5; }
.trip-backup a { display: inline-block; }
.trip-stops { display: grid; gap: 9px; }
.trip-stop { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.trip-stop-number { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #a6b8b4; border-radius: 50%; color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.trip-stop.is-done { border-color: #96c9c3; background: #f2faf8; }
.trip-stop.is-done .trip-stop-number { color: #fff; border-color: var(--teal); background: var(--teal); }
.trip-stop h3 { margin: 1px 0 3px; font-size: 17px; letter-spacing: -.025em; }
.trip-stop-name { margin: 0 0 7px; color: var(--muted); font-size: 9px; }
.trip-stop-tip { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.trip-stop-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1.45fr 1fr 38px; gap: 6px; margin-top: 5px; }
.trip-stop-actions button, .trip-stop-actions a { min-height: 40px; display: grid; place-items: center; padding: 8px; border: 1px solid #b7c0bd; border-radius: 8px; background: #fff; color: var(--ink); font-size: 8px; font-weight: 750; text-align: center; text-decoration: none; }
.trip-stop-actions a { color: #fff; border-color: var(--teal); background: var(--teal); }
.trip-stop-actions .arrival-details { border-color: transparent; color: var(--teal-dark); background: transparent; text-decoration: underline; text-underline-offset: 2px; }
.trip-stop-actions .visited-toggle { min-height: 38px; padding: 0; color: var(--teal-dark); border-color: #bad1cd; border-radius: 50%; background: var(--teal-soft); font-size: 14px; }
.trip-stop.is-done .trip-stop-actions .visited-toggle { color: #fff; border-color: var(--teal); background: var(--teal); }
.trip-note { margin-top: 13px; padding: 16px; border-radius: 12px; color: #fff; background: #285754; }
.trip-note .card-kicker { color: #b8ded9; }
.trip-note p:last-child { margin: 7px 0 0; font: 15px/1.5 var(--serif); }
.trip-dock { display: grid; grid-template-columns: .8fr 1.2fr; gap: 7px; padding: 7px 10px calc(7px + var(--safe-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); }
.trip-dock button, .trip-dock a { min-height: 42px; display: grid; place-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 8px; font-weight: 750; text-align: center; text-decoration: none; }
.trip-dock a { color: #fff; border-color: var(--teal-dark); background: var(--teal-dark); }

.toast { position: fixed; left: 50%; bottom: calc(70px + var(--safe-bottom)); z-index: 120; max-width: calc(100% - 40px); padding: 10px 14px; border-radius: 999px; color: #fff; background: rgba(11,98,101,.96); font-size: 9px; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
body.has-overlay { overflow: hidden; }

@media (min-width: 700px) {
  .route-map-layout { grid-template-columns: 43% 57%; }
  .real-map { min-height: 510px; border-top: 0; border-left: 1px solid var(--line); }
}

@media (min-width: 561px) {
  body { padding: 18px 0; }
  .app-shell { min-height: calc(100dvh - 36px); border-radius: 18px; overflow: hidden; }
  .bottom-nav { bottom: 18px; border-radius: 0 0 18px 18px; }
  .trip-overlay { top: 18px; bottom: 18px; border-radius: 18px; overflow: hidden; box-shadow: 0 0 70px rgba(20,35,31,.22); }
}

@media (max-width: 370px) {
  .day-photo-route { gap: 5px; }
  .day-photo-route span { padding-left: 26px; }
  .day-photo-route b { width: 21px; height: 21px; }
  .day-photo-route strong { font-size: 9px; }
  .route-snapshot > header { display: block; }
  .route-snapshot > header .verification-tag { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
