:root {
  color-scheme: light;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-optical-sizing: auto;
  --ink: #1e252e;
  --secondary: #596571;
  --blue: #087af5;
  --glass: rgba(251, 253, 255, .81);
  --hairline: rgba(46, 65, 83, .09);
  --shadow: 0 14px 48px rgba(39, 60, 70, .12), 0 2px 7px rgba(39, 60, 70, .04), inset 0 1px 0 rgba(255, 255, 255, .98);
}
* { box-sizing: border-box; }
body { margin: 0; background: #edf1ed; color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a, input, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid #056ad5; outline-offset: 4px; }
button:active:not(:disabled) { transform: scale(.96); }
[hidden] { display: none !important; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon, .brand-symbol svg { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.glass { background: var(--glass); border: 1px solid rgba(255, 255, 255, .88); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(30px) saturate(1.55); backdrop-filter: blur(30px) saturate(1.55); }
.wordmark { display: inline-flex; gap: .45rem; align-items: center; text-decoration: none; font-size: 1.8rem; font-weight: 720; letter-spacing: -.075em; line-height: 1; }
.brand-symbol { width: 2rem; height: 2rem; display: grid; place-items: center; color: #fff; background: var(--blue); border-radius: .7rem; box-shadow: inset 0 1px 0 #ffffff66, 0 3px 8px #087af51a; }
.brand-symbol svg { width: 1.2rem; height: 1.2rem; }
.button { display: flex; justify-content: center; align-items: center; min-height: 3rem; width: 100%; padding: .75rem 1.1rem; border: 0; border-radius: 1rem; font-size: .9375rem; font-weight: 600; }
.button-primary { color: white; background: var(--blue); box-shadow: inset 0 1px 0 #ffffff33, 0 4px 10px #087af520; }
.button-primary:disabled { color: #798590; background: #dfe6eb; box-shadow: none; }
.app-header { position: absolute; z-index: 10; top: max(1.25rem, env(safe-area-inset-top)); left: 1.5rem; right: 1.5rem; display: flex; align-items: center; gap: 1rem; pointer-events: none; }
.app-header > * { pointer-events: auto; }
.app-header .wordmark { padding: .65rem .95rem .65rem .65rem; border-radius: 1.25rem; }
.view-switch { display: flex; gap: .25rem; padding: .3rem; border-radius: 2rem; position: absolute; left: 50%; transform: translateX(-50%); }
.view-switch button { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: 1.5rem; background: transparent; padding: .65rem 1.1rem; font-size: .875rem; font-weight: 600; color: var(--secondary); min-height: 2.75rem; }
.view-switch button[aria-pressed=true] { color: var(--ink); background: #fff; box-shadow: 0 2px 8px #253b4510, inset 0 0 0 1px #00000004; }
.header-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.mode-badge { font-size: .75rem; color: #475d70; border-radius: 2rem; padding: .5rem .8rem; }
.plan-link { display: inline-flex; gap: .55rem; align-items: center; border-radius: 1.5rem; padding: .75rem 1rem; min-height: 3rem; font-size: .875rem; font-weight: 600; }
.plan-link > #header-count { display: grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; background: #e6effa; color: #0861c0; border-radius: 50%; font-size: .75rem; }
.logout { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; color: var(--secondary); }
.app-layout { height: 100dvh; position: relative; isolation: isolate; }
.discovery { position: absolute; z-index: 4; left: 1.5rem; top: 6.5rem; bottom: 3rem; width: 25rem; border-radius: 1.85rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b8c2c7 transparent; }
.discovery-heading { padding: 1.55rem 1.55rem 0; }
.discovery-location { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.demo-note { font-size: .75rem; color: #526572; text-align: right; }
.city-label { display: inline-flex; align-items: center; gap: .35rem; color: #516272; font-size: .8125rem; font-weight: 550; }
.city-label .icon { width: .95rem; height: .95rem; }
.discovery h1 { font-size: 1.9rem; font-weight: 670; line-height: 1.14; letter-spacing: -.055em; margin: .9rem 0 .65rem; }
.discovery-heading p { margin: 0; color: var(--secondary); font-size: .875rem; }
.discovery-body { padding: 1.25rem 1.3rem 1.5rem; }
.search-box { display: flex; align-items: center; gap: .55rem; padding: .25rem .3rem .25rem .8rem; min-height: 3.1rem; background: #ffffffcf; border: 1px solid #e5eaee; border-radius: 1.05rem; color: #798592; box-shadow: 0 1px 3px #253b4503; }
.search-box:focus-within { outline: 3px solid #087af52a; border-color: #91c6fa; }
.search-box input { min-width: 0; width: 100%; background: none; border: 0; outline: none; font-size: 1rem; color: var(--ink); padding: .45rem 0; letter-spacing: -.025em; }
.search-box input::placeholder { color: #7d8996; font-size: .875rem; }
.search-box button { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; flex-shrink: 0; border: 0; border-radius: .8rem; color: var(--blue); background: #edf4fd; }
.search-box > .icon { width: 1.1rem; height: 1.1rem; }
.categories { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding: .25rem 0 .5rem; margin: .85rem 0 1.25rem; }
.categories::-webkit-scrollbar { display: none; }
.categories button { display: flex; align-items: center; justify-content: center; gap: .3rem; white-space: nowrap; min-height: 2.75rem; padding: .55rem .7rem; background: #e5ebefb3; color: #53616d; border: 0; border-radius: 2rem; font-size: .875rem; font-weight: 550; }
.categories .icon { width: 1rem; height: 1rem; }
.categories .selected { color: white; background: #263b4f; }
.results-heading { display: flex; align-items: baseline; gap: .6rem; justify-content: space-between; }
.results-heading h2 { font-size: 1.125rem; font-weight: 650; letter-spacing: -.035em; margin: 0; }
.results-heading > span { font-size: .8125rem; color: var(--secondary); white-space: nowrap; }
#status { min-height: 1.3rem; margin: .5rem 0 1rem; color: var(--secondary); font-size: .875rem; line-height: 1.5; }
.place-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .85rem; }
.place { min-width: 0; border-radius: 1rem; }
.place-visual { position: relative; aspect-ratio: 1.18; border-radius: 1rem; overflow: hidden; background: #dfe7e7; isolation: isolate; }
.place-visual:after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, #0a1c294a); pointer-events: none; z-index: -1; }
.place-visual img { display: block; width: 100%; height: 100%; object-fit: cover; position: relative; z-index: -2; }
.category-art { width: 100%; height: 100%; display: grid; place-items: center; background: #d8e7ef; color: #436b86; }
.category-art .icon { width: 2.5rem; height: 2.5rem; stroke-width: 1.2; }
.park .category-art { color: #4f725a; background: #dae9da; }
.food .category-art { color: #997159; background: #efe3da; }
.art .category-art { color: #746793; background: #e5e0ef; }
.place-category { position: absolute; bottom: .65rem; left: .65rem; right: .65rem; color: #fff; font-size: .75rem; font-weight: 550; line-height: 1.25; text-shadow: 0 1px 4px #0007; }
.add-place { display: grid; place-items: center; position: absolute; top: .5rem; right: .5rem; width: 2.75rem; height: 2.75rem; color: #294358; background: #fffffff2; border: 1px solid #ffffffd9; box-shadow: 0 2px 8px #00000013; border-radius: 50%; font-size: 1.5rem; font-weight: 350; line-height: 1; }
.add-place:disabled { color: white; background: var(--blue); border-color: #ffffff66; font-size: 1rem; }
.place.is-selected .place-visual { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #087af57a; }
.place-content { padding: .65rem .1rem 0; }
.place h3 { font-size: .9375rem; font-weight: 620; letter-spacing: -.025em; line-height: 1.3; margin: 0 0 .3rem; overflow-wrap: anywhere; }
.place-address, .place-hours { font-size: .8125rem; line-height: 1.45; color: var(--secondary); margin: 0; overflow-wrap: anywhere; }
.place-hours { margin-top: .25rem; }
.place-details { display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin-top: .3rem; font-size: .8125rem; overflow-wrap: anywhere; }
.place-details a { color: #0866cb; }
.empty-state { grid-column: 1/-1; padding: 1rem 0; font-size: .9375rem; color: var(--secondary); }
.attribution { font-size: .75rem; color: #53616d; line-height: 1.55; overflow-wrap: anywhere; }
.attribution:empty { display: none; }
.attribution p { margin: .65rem 0 0; }
.attribution a { margin-left: .35rem; }
.discovery-footer { font-size: .8125rem; line-height: 1.5; color: #61707e; border-top: 1px solid var(--hairline); padding-top: 1rem; margin: 1.25rem 0 0; }
.map-section { position: absolute; inset: 0; z-index: 1; isolation: isolate; overflow: hidden; background: #edf0eb; }
.map-canvas { position: absolute; inset: 0; z-index: 0; }
.map-canvas > svg { display: block; width: 100%; height: 100%; }
.map-canvas > iframe { display:block; width:100%; height:100%; border:0; }
.map-toolbar { position: absolute; z-index: 3; right: 1.5rem; top: 6.5rem; display: flex; align-items: center; gap: .6rem; }
.map-label { font-size: .75rem; color: #526572; border-radius: 1rem; padding: .6rem .85rem; }
.map-open { font-size: .75rem; color: #36546c; border-radius: 1rem; padding: .6rem .85rem; white-space: nowrap; }
.place-open { font-weight: 550; }
.route-open { display: block; margin-top: .7rem; font-size: .8125rem; color: #225f9d; }
.fit-map { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; color: #36546c; }
.map-footnote { position: absolute; z-index: 1; bottom: .8rem; left: 50%; transform: translateX(-50%); font-size: .75rem; color: #526773; background: #ffffffce; padding: .2rem .65rem; border-radius: .6rem; white-space: nowrap; }
.route-card { position: absolute; z-index: 3; right: 1.5rem; bottom: 3rem; width: 21rem; max-height: calc(100% - 13rem); padding: 1.3rem; border-radius: 1.75rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.route-ticket-head { display: flex; align-items: center; gap: .7rem; }
.route-emblem, .login-emblem { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 1rem; background: #e3effc; color: #0870d9; flex-shrink: 0; }
.eyebrow { font-size: .75rem; font-weight: 550; color: #63727f; letter-spacing: .015em; }
.route-ticket-head h2 { font-size: 1.25rem; font-weight: 650; line-height: 1.2; letter-spacing: -.04em; margin: .1rem 0 0; }
#stops-count { font-size: .8125rem; color: var(--secondary); margin-left: auto; white-space: nowrap; }
#stops { list-style: none; padding: 0; margin: .95rem 0; }
#stops:empty { display: none; }
#stops li { display: flex; align-items: center; gap: .55rem; padding: .35rem 0; font-size: .875rem; }
#stops .number { display: grid; place-items: center; flex-shrink: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e2ebf6; color: #225f9d; font-size: .75rem; font-weight: 600; }
#stops .name { flex: 1; line-height: 1.3; overflow-wrap: anywhere; }
#stops button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; flex-shrink: 0; border: 0; border-radius: 50%; background: #e6ecf1c9; color: #486076; font-size: 1.2rem; }
#stops button:disabled { color: #a9b4bf; background: #edf1f4; }
#stops button .icon { width: 1rem; height: 1rem; }
.route-message { font-size: .875rem; line-height: 1.5; color: var(--secondary); margin: 1rem 0; }
.route-message strong { font-size: 1.65rem; font-weight: 650; letter-spacing: -.05em; line-height: 1.2; color: var(--ink); }
.route-message p { font-size: .8125rem; margin: .3rem 0 0; }
.route-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0; font-size: .875rem; }
.mode-label { width: 100%; position: relative; }
.mode-label:after { content: ''; position: absolute; width: .4rem; height: .4rem; right: 1rem; top: 1rem; transform: rotate(45deg); border-right: 1.5px solid #526a7c; border-bottom: 1.5px solid #526a7c; pointer-events: none; }
.mode-label select { width: 100%; min-height: 2.8rem; padding: .7rem 2rem .7rem .9rem; background: #e7edf2b8; border: 0; appearance: none; border-radius: .9rem; font-size: .875rem; }
#tolls-option { display: flex; align-items: center; gap: .4rem; min-height: 2.75rem; }
#tolls-option input { accent-color: var(--blue); width: 1rem; height: 1rem; }
.map-error { position: absolute; top: 10rem; left: 50%; right: 1.5rem; z-index: 5; border-radius: 1rem; padding: 1rem; color: #8e442f; font-size: .875rem; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 1.5rem; transform: translateX(-50%); max-width: calc(100% - 2rem); padding: .9rem 1.2rem; border-radius: 1.2rem; font-size: .9375rem; font-weight: 500; text-align: center; background: #f7fbfff0; }
.toast.error { color: #a43128; background: #fff4f1f5; }
.pin-button { cursor: pointer; }
.pin-button:focus-visible { outline: none; }
.pin-button:focus-visible .pin-paper { stroke: #056ad5; stroke-width: 4px; }
.login-screen { position: relative; min-height: 100dvh; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; background: #1c3438; isolation: isolate; }
.login-scene { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #0d242566, #142e2d0a 65%), linear-gradient(0deg, #112d3e70, transparent 65%), url('/static/images/park.jpg') center/cover; }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; padding: 2.5rem clamp(2rem, 6vw, 6rem); color: white; }
.login-intro .wordmark { align-self: flex-start; font-size: 2.2rem; }
.login-intro .brand-symbol { background: #ffffff2b; box-shadow: inset 0 1px 0 #ffffff55; }
.login-intro .eyebrow { color: #e7f2ed; font-size: .9375rem; }
.login-intro h1 { font-size: clamp(2.8rem, 4.8vw, 5.7rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 620; margin: 1rem 0 1.3rem; }
.login-intro p { font-size: 1.125rem; line-height: 1.55; color: #e4efeb; }
.login-location { display: inline-flex; align-items: center; gap: .45rem; font-size: .875rem; color: #e7eeea; }
.login-form { width: min(25rem, 88%); padding: 2.25rem; margin: 4rem auto; border-radius: 2rem; background: #f9fcfbe8; }
.login-emblem { width: 3.4rem; height: 3.4rem; border-radius: 1.1rem; }
.login-emblem .icon { width: 1.6rem; height: 1.6rem; }
.login-form h2 { font-size: 2rem; line-height: 1.1; font-weight: 650; letter-spacing: -.05em; margin: 1.3rem 0 .75rem; }
.login-form > p { color: var(--secondary); font-size: 1rem; line-height: 1.5; }
.login-form label { display: block; margin: 1.8rem 0 .55rem; color: #455663; font-size: .875rem; font-weight: 550; }
.login-form input { display: block; width: 100%; padding: .85rem 1rem; background: #fff; border: 1px solid #d8e0e4; border-radius: .9rem; font-size: 1rem; margin-bottom: .9rem; }
.login-form .error { min-height: 1.3rem; color: #a43128; font-size: .8125rem; overflow-wrap: anywhere; margin: .8rem 0; }
.login-small { display: block; font-size: .8125rem; color: #6a7c87; text-align: center; margin-top: 1rem; }
@media (min-width: 1600px) {
  .discovery { width: 27rem; }
  .discovery-heading { padding: 1.9rem 1.8rem 0; }
  .discovery-body { padding: 1.35rem 1.6rem 1.7rem; }
  .discovery h1 { font-size: 2.2rem; }
  .route-card { width: 23rem; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .discovery { width: 22rem; left: 1.1rem; }
  .discovery-heading { padding: 1.3rem 1.2rem 0; }
  .discovery h1 { font-size: 1.8rem; }
  .discovery-body { padding: 1.1rem; }
  .route-card { width: 19rem; right: 1.1rem; padding: 1.1rem; }
  .view-switch { left: 45%; }
  .mode-badge { display: none; }
  .app-header { left: 1.1rem; right: 1.1rem; }
  .map-toolbar { right: 1.1rem; }
}
@media (max-width: 760px) {
  .app-layout { height: 100dvh; }
  .app-header { top: max(.85rem, env(safe-area-inset-top)); left: 1rem; right: 1rem; }
  .app-header .wordmark { padding: .55rem .8rem .55rem .55rem; font-size: 1.65rem; }
  .brand-symbol { width: 1.9rem; height: 1.9rem; }
  .header-actions { gap: .5rem; }
  .mode-badge, .plan-label { display: none; }
  .plan-link { min-height: 2.9rem; padding: .7rem .8rem; font-size: .8125rem; gap: .4rem; }
  .plan-link > .icon { display: block; }
  .view-switch { position: fixed; top: auto; bottom: max(1.2rem, env(safe-area-inset-bottom)); left: 50%; gap: .25rem; padding: .35rem; z-index: 12; }
  .view-switch button { padding: .7rem 1.4rem; min-height: 2.9rem; font-size: .9375rem; }
  .discovery { top: 5.3rem; bottom: 6.5rem; left: .8rem; right: .8rem; width: auto; border-radius: 1.75rem; }
  .discovery-heading { padding: 1.35rem 1.25rem 0; }
  .discovery h1 { font-size: 2rem; margin-top: .8rem; }
  .discovery-body { padding: 1.15rem 1.1rem 1.5rem; }
  .discovery-heading p { font-size: .875rem; }
  .categories { margin-bottom: 1.1rem; }
  .categories button { padding: .55rem .75rem; }
  .place-visual { aspect-ratio: 1.13; }
  .place-grid { gap: 1.15rem .8rem; }
  .route-card { right: .8rem; left: .8rem; bottom: 6.5rem; width: auto; max-height: 43%; padding: 1.2rem; border-radius: 1.7rem; }
  .route-ticket-head h2 { font-size: 1.2rem; }
  .route-message { margin: .85rem 0; }
  .route-controls { margin: .75rem 0; }
  .map-toolbar { top: 5.5rem; left: 1rem; right: 1rem; justify-content: space-between; }
  .map-label { display: none; }
  .map-open { font-size: .7rem; padding: .55rem .7rem; }
  .map-footnote { display: none; }
  #workspace[data-mode=live] #map { bottom: 6rem; }
  .map-error { top: 9.5rem; left: 1rem; right: 1rem; }
  .toast { bottom: 6rem; width: max-content; }
  .login-screen { display: flex; flex-direction: column; justify-content: center; align-items: stretch; padding: 1.8rem 1rem 2rem; min-height: 100dvh; }
  .login-intro { padding: 0 1.1rem; gap: 2.2rem; align-self: auto; }
  .login-intro .wordmark { font-size: 1.9rem; }
  .login-intro h1 { font-size: 2.9rem; margin: .65rem 0 .9rem; }
  .login-intro .eyebrow, .login-location, .login-intro p { display: none; }
  .login-form { width: 100%; max-width: 27rem; margin: 1.8rem auto 0; padding: 1.65rem; border-radius: 1.8rem; }
  .login-form h2 { font-size: 1.75rem; margin-top: 1.1rem; }
  .login-emblem { display: none; }
}
@media (max-width: 360px) {
  .app-header { left: .75rem; right: .75rem; }
  .app-header .wordmark { font-size: 1.5rem; }
  .plan-link { font-size: .75rem; gap: .3rem; padding: .6rem; }
  .discovery h1 { font-size: 1.8rem; }
  .discovery-heading { padding-left: 1.1rem; padding-right: 1.1rem; }
  .discovery-body { padding-left: .9rem; padding-right: .9rem; }
  .place-grid { gap: 1rem .65rem; }
  .results-heading h2 { font-size: 1rem; }
}
@media (hover: hover) {
  .button-primary:hover:not(:disabled) { background: #006de1; }
  .add-place:hover:not(:disabled) { color: var(--blue); background: #fff; }
  .categories button:hover:not(.selected) { background: #d9e3ea; }
  .fit-map:hover, .map-open:hover, .plan-link:hover, .logout:hover { background: #ffffffed; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: transform 140ms ease-out, background-color 160ms ease-out, box-shadow 160ms ease-out; }
  .place-visual img { transition: transform 350ms cubic-bezier(.2, .7, .2, 1); }
  .place:hover .place-visual img { transform: scale(1.035); }
  .toast { animation: materialize 220ms cubic-bezier(.2, .8, .2, 1); }
  @keyframes materialize { from { opacity: 0; translate: 0 5px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: #f8fafc; }
  .login-form { background: #f8fafc; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .glass { background: #f8fafc; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .login-form { background: #f8fafc; }
}
@media (prefers-contrast: more) {
  :root { --secondary: #344653; }
  .glass { border-color: #748792; }
  .eyebrow, .map-label, .map-footnote, .city-label, .attribution, .discovery-footer { color: #344653; }
  .search-box { border-color: #748792; }
}

.button-secondary { background: #e8eef3; color: #355166; box-shadow: none; }
.button-secondary:disabled { color: #8b99a4; background: #e9eef1; }
.text-button { min-height: 2.75rem; padding: .4rem .2rem; border: 0; background: none; color: #0866cb; font-weight: 550; font-size: .875rem; }
.muted { font-size: .875rem; line-height: 1.5; color: var(--secondary); }
#route-to-plan { margin-top: .7rem; min-height: 2.75rem; font-size: .875rem; }
.planner-panel { position: absolute; z-index: 5; inset: 6.5rem 1.5rem 3rem; max-width: 67rem; margin: 0 auto; border-radius: 1.85rem; padding: 1.7rem 2rem 2rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.planner-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.65rem; }
.planner-heading h1 { font-size: clamp(1.65rem,2.7vw,2.25rem); font-weight: 650; letter-spacing: -.05em; line-height: 1.1; margin: .45rem 0 .65rem; }
.planner-heading p { font-size: .9375rem; margin: 0; color: var(--secondary); max-width: 36rem; }
.planner-mode { white-space: nowrap; padding: .4rem .7rem; border-radius: 1rem; font-size: .75rem; color: #516a80; background: #e7eef5; }
.ideas-layout { display: grid; grid-template-columns: minmax(16rem,.85fr) minmax(0,1.35fr); gap: 2rem; align-items: start; }
.ideas-layout.editing { display: block; }
.ideas-layout.editing > .ideas-form { display: none; }
.ideas-form > label, .plan-editor > label:not(.sr-only) { display: block; margin: 1rem 0 .45rem; font-size: .875rem; font-weight: 550; color: #435b6d; }
.ideas-form > label:first-child { margin-top: 0; }
.planner-panel input:not([type=checkbox]), .planner-panel textarea, .planner-panel select { display: block; width: 100%; min-width: 0; border: 1px solid #dce4ea; border-radius: .85rem; padding: .7rem .8rem; background: #ffffffd9; color: var(--ink); font-size: 1rem; line-height: 1.45; }
.planner-panel textarea { resize: vertical; }
.planner-panel select { min-height: 2.9rem; }
.field-pair, .editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
.field-pair > label, .editor-fields > label { display: grid; gap: .4rem; font-size: .875rem; font-weight: 550; color: #435b6d; }
.editor-fields { grid-template-columns: 1.5fr 1fr 1fr; margin: 1.3rem 0; }
.check-label { display: inline-flex!important; align-items: center; gap: .5rem; min-height: 2.75rem; font-size: .875rem; font-weight: 500!important; margin: .3rem 0!important; }
.check-label input { width: 1rem; height: 1rem; accent-color: var(--blue); }
.idea-presets { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.idea-presets button { border: 0; background: #e5edf4; color: #3e5f79; border-radius: 2rem; padding: .55rem .7rem; min-height: 2.75rem; font-size: .8125rem; }
.ideas-form > .button { margin-top: 1rem; }
.ideas-welcome { overflow: hidden; border-radius: 1.3rem; background: #fff; }
.ideas-welcome img { display: block; width: 100%; height: 14rem; object-fit: cover; }
.ideas-welcome > div { padding: 1.45rem; }
.ideas-welcome h2 { font-size: 1.6rem; letter-spacing: -.04em; font-weight: 620; margin: 0 0 .7rem; }
.ideas-welcome p { font-size: 1rem; color: var(--secondary); margin: 0 0 1.3rem; }
.ideas-welcome span { font-size: .8125rem; color: #52728c; }
.idea-card { background: #fffffff2; border: 1px solid #fff; border-radius: 1.2rem; padding: 1.2rem; margin-bottom: 1rem; box-shadow: 0 3px 12px #22394e05; }
.idea-card h2 { font-size: 1.2rem; letter-spacing: -.03em; font-weight: 620; line-height: 1.3; margin: .6rem 0; }
.idea-card > p { color: var(--secondary); font-size: .875rem; line-height: 1.5; }
.idea-meta { display: flex; flex-wrap: wrap; gap: .5rem .8rem; font-size: .8125rem; color: #486780; margin: .8rem 0; }
.idea-photos { display: flex; gap: .4rem; }
.idea-photos img { display: block; width: 3.3rem; height: 3.3rem; object-fit: cover; border-radius: .8rem; }
.editor-top, .editor-inline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.planner-panel .plan-title-input { font-size: 1.8rem; font-weight: 650; letter-spacing: -.04em; border-color: transparent; background: #ffffff90; margin: .5rem 0 .75rem; padding-left: .2rem; }
.plan-summary { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; padding: 1rem 1.2rem; border-radius: 1rem; background: #e4eef7; color: #31546d; margin-bottom: 1rem; }
.plan-summary strong { display: block; font-size: 1.25rem; font-weight: 620; letter-spacing: -.04em; }
.plan-summary span { font-size: .8125rem; }
.activity-row { position: relative; padding: 1.15rem; border: 1px solid #e2e9ef; border-radius: 1.1rem; background: #ffffffed; margin: .8rem 0; }
.activity-heading { display: flex; gap: .85rem; align-items: center; margin-bottom: 1rem; }
.activity-heading img { width: 3.7rem; height: 3.7rem; object-fit: cover; border-radius: .85rem; }
.activity-heading > div { flex: 1; min-width: 0; }
.activity-heading h3 { font-size: 1rem; letter-spacing: -.025em; line-height: 1.3; margin: .3rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.activity-clock { font-size: .8125rem; font-weight: 550; color: #0870d9; }
.activity-controls { display: flex; gap: .25rem; }
.activity-controls button { width: 2.75rem; height: 2.75rem; background: #eef3f7; color: #486780; border: 0; border-radius: 50%; font-size: 1.1rem; }
.activity-controls button:disabled { opacity: .35; }
.activity-inputs { display: grid; grid-template-columns: 1.4fr 1fr .65fr .65fr; gap: .65rem; }
.activity-inputs > label { display: grid; gap: .35rem; font-size: .8125rem; color: #516b7f; }
.activity-note { display: grid; gap: .35rem; font-size: .8125rem; color: #516b7f; margin-top: .75rem; }
.activity-note textarea { min-height: 3rem; }
.activity-place-picker { margin-top: .7rem; }
.plan-warnings { font-size: .8125rem; line-height: 1.55; color: #627383; padding: .5rem 0; }
.plan-warnings p { margin: .4rem 0; }
.editor-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: .7rem; margin-top: 1rem; }
.history-header-actions { display: flex; gap: .6rem; flex-shrink: 0; }
.history-header-actions .button { width: auto; font-size: .875rem; white-space: nowrap; }
.history-filters { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin-bottom: .8rem; }
.history-search { flex: 1; min-width: 12rem; }
.history-filters > label:not(.history-search) { width: auto; }
.history-filters > .button { width: auto; }
.history-filters input, .history-filters select { min-height: 2.9rem; }
.history-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.history-card { position: relative; background: #fffffff0; padding: 1.25rem; border-radius: 1.3rem; border: 1px solid #fff; }
.history-card h2 { font-size: 1.2rem; letter-spacing: -.035em; font-weight: 620; margin: .9rem 2rem .5rem 0; line-height: 1.3; overflow-wrap: anywhere; }
.history-card > p { color: var(--secondary); font-size: .875rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.history-favorite { position: absolute; top: .85rem; right: .85rem; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; color: #7990a2; background: #edf3f8; font-size: 1.25rem; }
.history-favorite[aria-pressed=true] { color: #b06e00; background: #fff1cf; }
.history-card-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1rem; }
.history-card-actions > .button { flex: 1; }
.history-card details { min-width: 5rem; }
.history-card summary { padding: .7rem .8rem; cursor: pointer; color: #426581; border-radius: .8rem; background: #e9f0f6; font-size: .875rem; list-style-position: inside; }
.history-card details[open] { flex: 1; }
.history-card details button { display: block; width: 100%; border: 0; background: #eef3f7; border-radius: .5rem; min-height: 2.75rem; margin-top: .35rem; font-size: .875rem; color: #365b77; }
.history-card details .destructive { color: #b33a34; }
.history-badges { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .75rem; }
.history-badges span { background: #edf3f8; color: #4f6a7f; border-radius: .5rem; padding: .2rem .5rem; }
.history-pagination { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: 1.5rem; }
.history-pagination .button { width: auto; font-size: .875rem; }
@media(min-width:761px) and (max-width:1300px) { .mode-badge { display: none; } }
@media(min-width:761px) and (max-width:1100px) {
  .view-switch { position: fixed; left: 50%; top: auto; bottom: 1.2rem; }
  .view-switch button { padding: .65rem .85rem; }
  .discovery, .route-card, .planner-panel { bottom: 6rem; }
  .planner-panel { padding: 1.5rem; }
  .ideas-layout { gap: 1.25rem; }
  .map-footnote { display: none; }
}
@media(max-width:760px) {
  .view-switch { width: max-content; max-width: calc(100% - 1.4rem); }
  .view-switch button { gap: .35rem; padding: .65rem .65rem; font-size: .875rem; }
  .view-switch .icon { width: 1.1rem; height: 1.1rem; }
  .planner-panel { inset: 5.3rem .8rem 6.5rem; padding: 1.3rem 1.1rem; border-radius: 1.7rem; }
  .planner-heading { display: block; margin-bottom: 1.3rem; }
  .planner-heading h1 { font-size: 1.8rem; }
  .planner-heading p { font-size: .875rem; }
  .planner-mode { display: inline-block; margin-top: .8rem; white-space: normal; }
  .ideas-layout { display: flex; flex-direction: column; gap: 1.3rem; }
  .ideas-form, .ideas-content { width: 100%; }
  .ideas-welcome img { height: 10rem; }
  .editor-fields { grid-template-columns: 1fr 1fr; }
  .editor-fields > label:first-child { grid-column: 1/-1; }
  .planner-panel .plan-title-input { font-size: 1.6rem; }
  .activity-row { padding: .85rem; }
  .activity-heading { flex-wrap: wrap; gap: .6rem; }
  .activity-controls { margin-left: auto; }
  .activity-inputs { grid-template-columns: 1fr 1fr; }
  .editor-actions { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .editor-actions > button:first-child { grid-column: 1/-1; }
  .history-header-actions { margin-top: 1rem; flex-wrap: wrap; }
  .history-grid { grid-template-columns: 1fr; }
  .history-filters { gap: .6rem; }
  .history-filters > .history-search { flex: 1 0 100%; }
  .history-filters > .button { flex: 1; }
  .history-pagination { flex-wrap: wrap; justify-content: center; }
  .history-pagination > span { order: -1; width: 100%; text-align: center; }
}
@media(max-width:360px) { .view-switch .icon { display: none; } .view-switch button { padding: .65rem .7rem; } }
@media(prefers-contrast:more) { .planner-mode, .muted, .plan-warnings, .activity-inputs > label { color: #344653; } }

.location-actions { display: grid; gap: .45rem; margin-bottom: .6rem; }
.location-actions .button { min-height: 44px; font-size: .78rem; white-space: normal; }
#search-more { width: 100%; margin: .8rem 0; min-height: 44px; }
