.app-ui-main--plan { min-height: 0; }
.plan-page { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); height: calc(100vh - var(--app-header-height)); background: var(--app-surface); }
.plan-panel { z-index: 2; display: flex; grid-row: 1; grid-column: 1; flex-direction: column; gap: 1.1rem; overflow-y: auto; padding: 1.25rem; border-right: 1px solid var(--app-border); background: rgb(255 255 255 / 96%); box-shadow: 8px 0 28px rgb(3 20 38 / 8%); }
.plan-heading { order: 1; }
.plan-eyebrow { margin: 0 0 .25rem; color: var(--app-blue); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.plan-panel h1 { margin: 0; font-size: 1.55rem; }
.plan-intro { margin: .45rem 0 0; color: var(--app-muted); line-height: 1.5; }
.plan-priority { display: grid; order: 2; gap: .5rem; margin: 0; padding: 0; border: 0; }
.plan-priority legend { margin-bottom: .45rem; font-weight: 800; }
.plan-priority > div { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--app-border); border-radius: .6rem; }
.plan-priority label { position: relative; min-width: 0; }
.plan-priority input { position: absolute; opacity: 0; pointer-events: none; }
.plan-priority span { display: grid; min-height: 42px; place-items: center; padding: .45rem .25rem; color: var(--app-muted); background: #fff; font-size: .78rem; font-weight: 800; text-align: center; cursor: pointer; }
.plan-priority label + label span { border-left: 1px solid var(--app-border); }
.plan-priority input:checked + span { color: #fff; background: var(--app-blue); }
.plan-priority input:focus-visible + span { outline: 3px solid rgb(37 99 235 / 35%); outline-offset: -3px; }
.plan-priority small, .plan-attribution { color: var(--app-muted); font-size: .78rem; line-height: 1.45; }
.plan-save-sheet { display: flex; order: 2; flex-direction: column; overflow: hidden; border: 1px solid var(--app-border); border-radius: var(--app-radius); background: #fff; box-shadow: var(--app-shadow-sm); }
.plan-save-sheet__peek { display: none; }
.plan-save-sheet__content { display: grid; gap: .9rem; padding: 1rem; }
.plan-save-sheet__peek-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #fff; background: var(--app-orange); }
.plan-save-sheet__peek-icon .app-icon { width: 18px; height: 18px; }
.plan-save-sheet__section { overflow: hidden; border: 1px solid var(--app-border); border-radius: .75rem; background: #fff; }
.plan-save-sheet__section > summary { display: flex; min-height: 46px; align-items: center; justify-content: space-between; padding: .65rem .75rem; color: var(--app-navy-950); background: var(--app-surface-soft); cursor: pointer; list-style: none; }
.plan-save-sheet__section > summary::-webkit-details-marker { display: none; }
.plan-save-sheet__section > summary > span { display: flex; align-items: center; gap: .55rem; }
.plan-save-sheet__section > summary .app-icon { width: 19px; height: 19px; color: var(--app-orange); }
.plan-save-sheet__section > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--app-muted); border-bottom: 2px solid var(--app-muted); transform: rotate(45deg); transition: transform .16s ease; }
.plan-save-sheet__section[open] > summary::after { transform: rotate(225deg); }
.plan-save-sheet__section-content { display: grid; gap: .75rem; padding: .8rem; }
.plan-save-sheet__section-content > p { margin: 0; color: var(--app-muted); font-size: .75rem; line-height: 1.4; }
.plan-editor { display: grid; gap: .45rem; }
.plan-editor label { font-size: .8rem; font-weight: 800; }
.plan-editor input { width: 100%; min-height: 46px; padding: .65rem .75rem; border: 1px solid var(--app-border); border-radius: .65rem; background: #fff; font: inherit; }
.plan-editor input:focus { border-color: var(--app-orange); outline: 3px solid rgb(255 104 29 / 14%); }
.plan-save, .plan-save-sheet__secondary-actions button { min-height: 42px; padding: .55rem .8rem; border: 1px solid var(--app-border); border-radius: .65rem; background: #fff; font: inherit; font-weight: 800; }
.plan-save { min-height: 48px; border-color: var(--app-orange); color: #fff; background: linear-gradient(105deg, #ff4f0b, var(--app-orange)); box-shadow: 0 7px 18px rgb(255 104 29 / 20%); }
.plan-save:disabled { opacity: .45; }
.plan-mutation-status { min-height: 1.2em; margin: 0; color: var(--app-muted); font-size: .76rem; }
.plan-save-sheet__secondary-actions { display: grid; gap: .5rem; }
.plan-save-sheet__secondary-actions button:first-child { color: var(--app-blue); }
.plan-saved-plans { border-top: 1px solid var(--app-border); }
.plan-saved-plans > summary { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: .65rem .1rem 0; font-size: .8rem; font-weight: 850; cursor: pointer; }
.plan-saved-plans > summary span { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 999px; color: var(--app-muted); background: var(--app-surface-soft); font-size: .68rem; }
.plan-saved-plans__content { display: grid; gap: .55rem; padding: .55rem 0 0; }
.plan-saved-empty { margin: 0; color: var(--app-muted); font-size: .78rem; }
.plan-saved-list { display: grid; max-height: 13rem; gap: .35rem; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.plan-saved-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; border-radius: .5rem; }
.plan-saved-list li.is-active { background: var(--app-surface-soft); outline: 1px solid var(--app-blue); }
.plan-saved-list a { display: grid; gap: .15rem; padding: .55rem .6rem; color: var(--app-navy-950); text-decoration: none; }
.plan-saved-list strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.plan-saved-list time { color: var(--app-muted); font-size: .7rem; }
.plan-saved-list__delete { min-width: 58px; padding: .4rem .55rem; border: 0; border-left: 1px solid var(--app-border); border-radius: 0 .5rem .5rem 0; color: #a32121; background: transparent; font: inherit; font-size: .7rem; font-weight: 800; }
.plan-saved-list__delete:hover { background: #fff1f1; }
.plan-viewer-card { display: grid; order: 2; gap: .2rem; padding: .85rem; border: 1px solid var(--app-border); border-radius: .75rem; background: #fff; }
.plan-viewer-card strong { overflow: hidden; color: var(--app-navy-950); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.plan-viewer-card small { color: var(--app-muted); line-height: 1.4; }
.plan-read-only-badge { width: max-content; padding: .2rem .5rem; border-radius: 999px; color: #075985; background: #e0f2fe; font-size: .68rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.plan-page--read-only .plan-map .maplibregl-canvas { cursor: grab; }
.plan-sharing-options { display: grid; gap: .45rem; margin: 0; padding: 0; border: 0; }
.plan-sharing-options legend { margin-bottom: .5rem; font-size: .8rem; font-weight: 850; }
.plan-sharing-options label { display: grid; min-height: 62px; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: .65rem; padding: .65rem .75rem; border: 1px solid var(--app-border); border-radius: .7rem; cursor: pointer; }
.plan-sharing-options label:has(input:checked) { border-color: var(--app-orange); background: #fff7f2; box-shadow: 0 0 0 1px var(--app-orange); }
.plan-sharing-options label:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.plan-sharing-options input { width: 18px; height: 18px; margin: 0; accent-color: var(--app-orange); }
.plan-sharing-options label > span:last-child { display: grid; gap: .12rem; }
.plan-sharing-option__icon { display: grid; width: 28px; height: 28px; place-items: center; color: var(--app-navy-900); }
.plan-sharing-option__icon .app-icon { width: 23px; height: 23px; }
.plan-sharing-options strong { font-size: .82rem; }
.plan-sharing-options small { color: var(--app-muted); font-size: .7rem; line-height: 1.35; }
.plan-sharing-group { display: grid; gap: .35rem; font-size: .76rem; font-weight: 800; }
.plan-sharing-group[hidden], .plan-sharing-link[hidden] { display: none; }
.plan-sharing-group select, .plan-sharing-link input { width: 100%; min-width: 0; min-height: 40px; padding: .5rem .6rem; border: 1px solid var(--app-border); border-radius: .55rem; background: #fff; font: inherit; }
.plan-sharing-link { display: grid; gap: .35rem; }
.plan-sharing-link > label { font-size: .76rem; font-weight: 800; }
.plan-sharing-link > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.plan-sharing-link button { min-height: 40px; padding: .5rem .75rem; border: 1px solid var(--app-orange); border-radius: .55rem; color: #b84000; background: #fff; font: inherit; font-weight: 800; }
.plan-sharing-link button:disabled { color: var(--app-muted); border-color: var(--app-border); opacity: .6; }
.plan-bottom-controls, .plan-mode-row, .plan-action-bar { display: contents; }
.plan-priority-mobile { display: none; }
.plan-status-mobile { display: none; }
.plan-actions { display: grid; order: 3; grid-template-columns: 1fr 1fr; gap: .5rem; }
.plan-actions button { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: .4rem; padding: .55rem .7rem; border: 1px solid var(--app-border); border-radius: .55rem; color: var(--app-navy-900); background: #fff; font: inherit; font-weight: 700; }
.plan-actions button:last-child { grid-column: 1 / -1; }
.plan-actions button:disabled { opacity: .45; }
.plan-action-icon { display: none; }
.plan-export-trigger { display: flex; order: 6; min-height: 42px; align-items: center; justify-content: center; gap: .45rem; border: 0; border-radius: .6rem; color: #fff; background: var(--app-blue); font: inherit; font-weight: 800; }
.plan-export-trigger > span { display: none; }
.plan-export-trigger:disabled { opacity: .45; }
.plan-map-tools { display: contents; }
.plan-fit-route { display: none; }
.plan-thermal-toggle { display: flex; order: 4; align-items: center; gap: .55rem; font-weight: 700; }
.plan-thermal-icon { display: none; }
.plan-metrics { display: grid; order: 5; grid-template-columns: 1fr 1fr; gap: .55rem; }
.plan-metrics-toggle { display: grid; order: 2; align-content: center; padding: .7rem; border: 1px solid var(--app-border); border-radius: .6rem; background: var(--app-surface); font: inherit; text-align: left; cursor: default; }
.plan-metrics-toggle > span:first-child { display: grid; }
.plan-metrics-toggle small { color: var(--app-muted); font-size: .72rem; }
.plan-metrics-toggle strong { margin-top: .15rem; color: var(--app-navy-950); font-size: 1.08rem; }
.plan-metrics-chevron { display: none; }
.plan-summary { display: contents; margin: 0; }
.plan-summary > div:nth-child(1) { order: 1; }
.plan-summary > div:nth-child(2) { order: 3; }
.plan-summary > div:nth-child(3) { order: 4; }
.plan-summary div { padding: .7rem; border: 1px solid var(--app-border); border-radius: .6rem; background: var(--app-surface); }
.plan-summary dt { color: var(--app-muted); font-size: .72rem; }
.plan-summary dd { margin: .15rem 0 0; color: var(--app-navy-950); font-size: 1.08rem; font-weight: 800; }
.plan-status { order: 7; margin: 0; padding: .7rem; border-radius: .55rem; color: var(--app-navy-900); background: var(--app-surface-soft); font-size: .86rem; }
.plan-attribution { order: 8; margin: auto 0 0; }
.plan-map-stage { grid-row: 1; grid-column: 2; }
.plan-map-stage, .plan-map { min-width: 0; height: 100%; }
.plan-map .maplibregl-canvas { cursor: crosshair; }
.plan-export-dialog { width: min(92vw, 460px); padding: 0; border: 0; border-radius: .85rem; color: var(--app-navy-950); box-shadow: 0 24px 70px rgb(3 20 38 / 28%); }
.plan-export-dialog::backdrop { background: rgb(3 20 38 / 55%); }
.plan-export-dialog form { display: grid; gap: 1rem; padding: 1.2rem; }
.plan-export-dialog header, .plan-export-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.plan-export-dialog h2 { margin: 0; }
.plan-export-dialog header > button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--app-surface); font-size: 1.5rem; }
.plan-export-dialog fieldset { display: grid; gap: .5rem; margin: 0; padding: 0; border: 0; }
.plan-export-dialog legend, .plan-export-field > span { margin-bottom: .45rem; font-weight: 800; }
.plan-export-dialog fieldset label { display: flex; align-items: flex-start; gap: .65rem; padding: .75rem; border: 1px solid var(--app-border); border-radius: .6rem; }
.plan-export-dialog fieldset label:has(input:checked) { border-color: var(--app-blue); background: var(--app-surface-soft); }
.plan-export-dialog fieldset span { display: grid; gap: .15rem; }
.plan-export-dialog fieldset small { color: var(--app-muted); }
.plan-export-field { display: grid; }
.plan-export-field select, .plan-export-field input { min-height: 42px; padding: .55rem .65rem; border: 1px solid var(--app-border); border-radius: .55rem; background: #fff; font: inherit; }
.plan-export-status { min-height: 1.2em; margin: 0; color: var(--app-muted); font-size: .84rem; }
.plan-export-dialog footer { justify-content: flex-end; }
.plan-export-dialog footer button { min-height: 40px; padding: .55rem .9rem; border: 1px solid var(--app-border); border-radius: .55rem; background: #fff; font: inherit; font-weight: 800; }
.plan-export-dialog footer button:last-child { border-color: var(--app-blue); color: #fff; background: var(--app-blue); }
.plan-auth-dialog { width: min(94vw, 570px); max-height: min(880px, calc(100svh - 2rem)); padding: 0; overflow: hidden; border: 0; border-radius: 1.35rem; color: var(--app-navy-950); background: transparent; box-shadow: 0 30px 90px rgb(3 20 38 / 44%); }
.plan-auth-dialog::backdrop { background: rgb(3 16 29 / 70%); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.plan-auth-card { position: relative; max-height: min(880px, calc(100svh - 2rem)); overflow-y: auto; border: 1px solid rgb(255 255 255 / 75%); border-radius: inherit; background: linear-gradient(160deg, rgb(255 255 255 / 99%), rgb(248 252 255 / 98%)); }
.plan-auth-close { position: absolute; z-index: 2; top: 1rem; right: 1rem; display: grid; width: 2.45rem; height: 2.45rem; padding: 0; border: 0; border-radius: 999px; place-items: center; color: var(--app-muted); background: rgb(243 247 251 / 88%); font-size: 1.8rem; font-weight: 300; line-height: 1; cursor: pointer; }
.plan-auth-close:hover { color: var(--app-navy-950); background: #e9f0f7; }
.plan-auth-panel { padding: 1.65rem 2.5rem 2.25rem; }
.plan-auth-panel[hidden] { display: none; }
.plan-auth-choice { display: grid; gap: 1.2rem; }
.plan-auth-hero { display: grid; width: min(100%, 360px); min-height: 96px; place-items: center; margin: .1rem auto -.2rem; padding: .75rem 1rem; border-radius: 1rem;  }
.plan-auth-hero .app-brand { justify-content: center; color: var(--app-navy-950); }
.plan-auth-hero .app-brand img { width: 64px; height: 64px; }
.plan-auth-hero .app-brand__wordmark { display: grid; font-size: 1.35rem; line-height: .82; text-align: left; }
.plan-auth-heading { text-align: center; }
.plan-auth-heading .plan-eyebrow { margin-bottom: .45rem; }
.plan-auth-heading h2 { margin: 0; font-size: clamp(1.65rem, 5vw, 2.05rem); letter-spacing: -.035em; line-height: 1.1; }
.plan-auth-heading p:last-child { max-width: 28rem; margin: .65rem auto 0; color: var(--app-muted); font-size: .96rem; line-height: 1.5; }
.plan-auth-choice-actions { display: grid; gap: .65rem; }
.plan-auth-primary, .plan-auth-secondary { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: .55rem; padding: .7rem 1rem; border-radius: .72rem; font: inherit; font-size: 1rem; font-weight: 850; cursor: pointer; }
.plan-auth-primary { border: 0; color: #fff; background: linear-gradient(105deg, #ff4f0b, var(--app-orange)); box-shadow: 0 9px 20px rgb(255 104 29 / 22%); }
.plan-auth-primary:hover { background: linear-gradient(105deg, #e94300, #f65b0e); }
.plan-auth-secondary { border: 1.5px solid #08add7; color: #058fb8; background: #fff; }
.plan-auth-secondary:hover { background: #effbfe; }
.plan-auth-secondary .app-icon { width: 1.3rem; height: 1.3rem; }
.plan-auth-features { display: grid; gap: .85rem; margin: .2rem 0 0; padding: 1.15rem 0 0; border-top: 1px solid var(--app-border); list-style: none; }
.plan-auth-features li { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: .85rem; }
.plan-auth-features li > span:last-child { display: grid; gap: .12rem; }
.plan-auth-features strong { font-size: .9rem; }
.plan-auth-features small { color: var(--app-muted); font-size: .78rem; line-height: 1.35; }
.plan-auth-feature-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; }
.plan-auth-feature-icon .app-icon { width: 1.45rem; height: 1.45rem; }
.plan-auth-feature-icon--blue { color: var(--app-blue); background: #e9f3ff; }
.plan-auth-feature-icon--orange { color: var(--app-orange); background: #fff1e9; }
.plan-auth-feature-icon--cyan { color: #0399bd; background: #e5f9fc; }
.plan-auth-form-panel { display: grid; min-height: 570px; align-content: start; gap: 1.65rem; padding-top: 4.4rem; }
.plan-auth-back { position: absolute; top: 1.25rem; left: 1.4rem; display: inline-flex; min-height: 38px; align-items: center; gap: .35rem; padding: .4rem .65rem; border: 0; border-radius: .55rem; color: var(--app-muted); background: transparent; font-weight: 750; cursor: pointer; }
.plan-auth-back:hover { color: var(--app-blue); background: var(--app-surface-soft); }
.plan-auth-form-panel form { display: grid; gap: 1rem; }
.plan-auth-form-panel label { display: grid; gap: .42rem; color: var(--app-navy-900); font-size: .84rem; font-weight: 800; }
.plan-auth-form-panel input { width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1px solid var(--app-border); border-radius: .65rem; color: var(--app-ink); background: #fff; font: inherit; font-weight: 500; }
.plan-auth-form-panel input:focus { border-color: var(--app-blue); outline: 3px solid rgb(8 105 247 / 12%); }
.plan-auth-optional { color: var(--app-muted); font-size: .7rem; font-weight: 600; }
.plan-auth-status { min-height: 1.35em; margin: -.2rem 0 0; color: #a32121; font-size: .8rem; line-height: 1.35; }
.plan-auth-switch { margin: -.55rem 0 0; color: var(--app-muted); font-size: .82rem; text-align: center; }
.plan-auth-switch button { padding: 0; border: 0; color: var(--app-blue); background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
@media (max-width: 760px) {
  .app-ui-body--plan { --app-mobile-header-height: 54px; --app-mobile-nav-height: 56px; }
  .app-ui-body--plan .app-header { height: var(--app-mobile-header-height); padding: 0 13px; }
  .app-ui-body--plan .app-brand img { width: 38px; height: 38px; }
  .app-ui-body--plan .app-upload-trigger { min-height: 34px; padding: 7px 11px; font-size: .72rem; }
  .app-ui-body--plan .initials-avatar--header { width: 32px; height: 32px; font-size: .72rem; }
  .app-ui-body--plan .app-account__trigger { min-width: 42px; min-height: 38px; }
  .app-ui-body--plan .mobile-navigation { height: calc(var(--app-mobile-nav-height) + env(safe-area-inset-bottom)); padding: 5px 2px max(5px, env(safe-area-inset-bottom)); }
  .app-ui-body--plan .mobile-navigation__item { gap: 1px; font-size: 9px; }
  .app-ui-body--plan .mobile-navigation__item .app-icon { width: 20px; height: 20px; font-size: 1rem; }
  .app-ui-main--plan { overflow: hidden; }
  .app-ui-body--guest .app-ui-main--plan { min-height: calc(100svh - var(--app-mobile-header-height)); padding-bottom: 0; }
  .plan-page { position: relative; display: block; height: calc(100svh - var(--app-mobile-header-height) - var(--app-mobile-nav-height)); overflow: hidden; }
  .app-ui-body--guest .plan-page { height: calc(100svh - var(--app-mobile-header-height)); }
  .plan-map-stage { position: absolute; inset: 0; }
  .plan-panel { position: absolute; z-index: 5; inset: 0; display: block; overflow: visible; padding: 0; border: 0; background: none; box-shadow: none; pointer-events: none; }
  .plan-heading, .plan-priority, .plan-attribution { display: none; }
  .plan-panel button, .plan-panel select, .plan-panel label, .plan-status-mobile { pointer-events: auto; }
  .plan-map .maplibregl-ctrl-top-right { top: 11px; right: auto; left: 11px; }
  .plan-map .maplibregl-ctrl-bottom-right { right: 6px; bottom: 122px; }
  .plan-map .maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 0; border: 1px solid var(--app-border); border-radius: 12px; box-shadow: 0 5px 18px rgb(7 24 43 / 16%); }
  .plan-map .maplibregl-ctrl-group button { width: 40px; height: 40px; }
  .plan-map .maplibregl-ctrl-zoom-out, .plan-map .maplibregl-ctrl-compass { display: none; }
  .plan-save-sheet { position: fixed; z-index: 35; right: 0; bottom: calc(var(--app-mobile-nav-height) + env(safe-area-inset-bottom)); left: 0; display: flex; height: min(61svh, 520px); overflow: hidden; border: 0; border-radius: 1.5rem 1.5rem 0 0; background: rgb(255 255 255 / 98%); box-shadow: 0 -8px 30px rgb(15 35 60 / 18%); transition: height .24s ease; pointer-events: auto; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .plan-save-sheet.is-collapsed { height: 78px; }
  .plan-save-sheet.is-expanded { height: calc(100svh - var(--app-mobile-header-height) - var(--app-mobile-nav-height) - env(safe-area-inset-bottom)); }
  .plan-save-sheet__handle { flex: 0 0 auto; background: rgb(255 255 255 / 96%); }
  .plan-save-sheet__peek { display: none; min-height: 54px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .7rem; padding: 0 1rem .55rem; }
  .plan-save-sheet__peek > span:last-child { display: grid; min-width: 0; gap: .05rem; }
  .plan-save-sheet__peek strong, .plan-save-sheet__peek small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .plan-save-sheet__peek strong { color: var(--app-navy-950); font-size: .9rem; }
  .plan-save-sheet__peek small { color: var(--app-muted); font-size: .68rem; }
  .plan-save-sheet.is-collapsed .plan-save-sheet__peek { display: grid; }
  .plan-save-sheet.is-collapsed .plan-save-sheet__content { display: none; }
  .plan-save-sheet.is-partial .plan-save-sheet__secondary-actions, .plan-save-sheet.is-partial .plan-saved-plans { display: none; }
  .plan-save-sheet__content { display: grid; height: calc(100% - var(--app-bottom-sheet-handle-height)); grid-auto-rows: max-content; align-content: start; gap: .8rem; overflow-x: hidden; overflow-y: scroll; padding: .25rem 1rem max(1rem, env(safe-area-inset-bottom)); pointer-events: auto; touch-action: pan-y; overscroll-behavior-x: none; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
  .plan-save-sheet__content > * { min-height: max-content; }
  .plan-save-sheet__section > summary { min-height: 44px; padding: .55rem .65rem; }
  .plan-save-sheet__section-content { gap: .65rem; padding: .65rem; }
  .plan-editor input { min-height: 44px; }
  .plan-sharing-options { gap: .4rem; }
  .plan-sharing-options label { min-height: 58px; padding: .55rem .65rem; }
  .plan-sharing-options small { font-size: .67rem; }
  .plan-save { min-height: 48px; font-size: .92rem; }
  .plan-save-sheet__secondary-actions { min-height: 42px; }
  .plan-saved-plans { padding-bottom: .25rem; }
  .plan-saved-list { max-height: 9rem; }
  .plan-viewer-card { position: absolute; z-index: 7; right: 11px; bottom: 86px; left: 11px; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .2rem .65rem; padding: .7rem .8rem; border-radius: 14px; box-shadow: 0 7px 24px rgb(7 24 43 / 18%); pointer-events: auto; }
  .plan-viewer-card .plan-read-only-badge { grid-row: 1 / span 2; }
  .plan-viewer-card small { font-size: .7rem; }
  .plan-page--read-only .plan-bottom-controls { bottom: 14px; }
  .plan-page--read-only .plan-mode-row, .plan-page--read-only .plan-actions { display: none; }
  .plan-page--read-only .plan-action-bar { justify-content: flex-end; }
  .plan-map-tools { position: absolute; top: 58px; left: 11px; display: grid; gap: 7px; }
  .plan-fit-route, .plan-thermal-toggle { display: grid; width: 40px; height: 40px; place-items: center; margin: 0; padding: 0; border: 1px solid var(--app-border); border-radius: 12px; color: var(--app-navy-900); background: rgb(255 255 255 / 96%); box-shadow: 0 5px 18px rgb(7 24 43 / 16%); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
  .plan-fit-route { font: inherit; }
  .plan-fit-route:disabled { opacity: .45; }
  .plan-fit-route .app-icon, .plan-thermal-icon .app-icon { width: 19px; height: 19px; }
  .plan-thermal-toggle { position: relative; cursor: pointer; }
  .plan-thermal-toggle input { position: absolute; opacity: 0; pointer-events: none; }
  .plan-thermal-icon { display: grid; place-items: center; }
  .plan-thermal-toggle:has(input:checked) { border-color: var(--app-blue); color: #fff; background: var(--app-blue); }
  .plan-thermal-toggle:has(input:focus-visible), .plan-fit-route:focus-visible { outline: 3px solid rgb(37 99 235 / 38%); outline-offset: 2px; }
  .plan-thermal-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .plan-metrics { position: absolute; top: 11px; right: 11px; display: block; width: 158px; overflow: hidden; border: 1px solid var(--app-border); border-radius: 13px; background: rgb(255 255 255 / 96%); box-shadow: 0 5px 18px rgb(7 24 43 / 16%); transition: width .16s ease; -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
  .plan-metrics:has(.plan-metrics-toggle[aria-expanded="true"]) { width: min(206px, calc(100% - 62px)); }
  .plan-metrics-toggle { display: grid; width: 100%; min-height: 48px; grid-template-columns: 1fr auto; align-items: center; gap: 7px; padding: 7px 9px 7px 11px; border: 0; border-radius: 0; background: none; cursor: pointer; }
  .plan-metrics-toggle small { font-size: 10px; }
  .plan-metrics-toggle strong { margin-top: 1px; font-size: 1rem; font-weight: 500; }
  .plan-metrics-chevron { display: block; width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid currentcolor; border-bottom: 1.5px solid currentcolor; transform: rotate(45deg); transition: transform .16s ease; }
  .plan-metrics-toggle[aria-expanded="true"] .plan-metrics-chevron { transform: rotate(225deg); }
  .plan-metrics-toggle[aria-expanded="false"] + .plan-summary { display: none; }
  .plan-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 2px 8px 9px; border-top: 1px solid var(--app-border); background: transparent; }
  .plan-summary div { min-width: 0; padding: 7px 5px; border: 0; border-radius: 0; background: transparent; }
  .plan-summary dt { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .plan-summary dd { overflow: hidden; margin-top: 1px; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
  .plan-bottom-controls { position: absolute; z-index: 4; right: 11px; bottom: 90px; left: 11px; display: grid; gap: 8px; pointer-events: none; }
  .plan-panel:has(.plan-save-sheet:not(.is-collapsed)) .plan-bottom-controls { visibility: hidden; }
  .plan-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .plan-priority-mobile { display: flex; width: auto; min-height: 40px; align-items: center; gap: 5px; padding: 5px 7px 5px 10px; border: 1px solid var(--app-border); border-radius: 12px; color: var(--app-navy-950); background: rgb(255 255 255 / 96%); box-shadow: 0 5px 18px rgb(7 24 43 / 16%); pointer-events: auto; -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
  .plan-priority-icon { display: grid; place-items: center; }
  .plan-priority-icon .app-icon { width: 17px; height: 17px; }
  .plan-priority-mobile select { width: auto; min-width: 0; min-height: 28px; padding: 2px 22px 2px 4px; border: 0; color: var(--app-navy-950); background: transparent; font: inherit; font-size: 12px; }
  .plan-status-mobile { display: block; max-width: 170px; overflow: hidden; margin: 0; padding: 7px 9px; border: 1px solid var(--app-border); border-radius: 10px; color: var(--app-muted); background: rgb(255 255 255 / 96%); box-shadow: 0 5px 18px rgb(7 24 43 / 16%); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; pointer-events: auto; -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
  .plan-action-bar { display: flex; align-items: stretch; justify-content: space-between; gap: 8px; pointer-events: auto; }
  .plan-actions { display: flex; gap: 3px; padding: 5px; border: 1px solid var(--app-border); border-radius: 16px; background: rgb(255 255 255 / 96%); box-shadow: 0 5px 18px rgb(7 24 43 / 16%); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
  .plan-actions button, .plan-actions button:last-child { display: flex; grid-column: auto; width: 50px; min-height: 43px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 3px 4px; border: 0; border-radius: 11px; color: var(--app-navy-900); background: var(--app-surface-soft); font-size: 9px; font-weight: 750; line-height: 1; }
  .plan-action-icon { display: grid; place-items: center; }
  .plan-action-icon .app-icon { width: 19px; height: 19px; }
  .plan-export-trigger { width: auto; min-width: 106px; min-height: 55px; padding: 0 15px; border-radius: 16px; font-size: .8rem; box-shadow: 0 5px 18px rgb(7 24 43 / 18%); }
  .plan-export-trigger > span { display: grid; place-items: center; }
  .plan-export-trigger .app-icon { width: 17px; height: 17px; }
  .plan-status { display: none; }
  .plan-export-dialog { position: fixed; inset: auto 11px calc(var(--app-mobile-nav-height) + 76px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100svh - var(--app-mobile-header-height) - var(--app-mobile-nav-height) - 88px); margin: 0; overflow-y: auto; border-radius: 15px; }
  .plan-export-dialog form { gap: .55rem; padding: .75rem; }
  .plan-export-dialog h2 { font-size: 1.15rem; }
  .plan-export-dialog .plan-eyebrow { display: none; }
  .plan-export-dialog header > button { width: 34px; height: 34px; }
  .plan-export-dialog fieldset { grid-template-columns: 1fr 1fr; gap: .4rem; }
  .plan-export-dialog fieldset legend { grid-column: 1 / -1; margin-bottom: .15rem; }
  .plan-export-dialog fieldset label { min-width: 0; padding: .5rem; font-size: .75rem; }
  .plan-export-dialog fieldset small { font-size: .66rem; }
  .plan-export-field { grid-template-columns: 7rem minmax(0, 1fr); align-items: center; gap: .5rem; font-size: .78rem; }
  .plan-export-field > span { margin: 0; }
  .plan-export-field select, .plan-export-field input { min-width: 0; min-height: 38px; }
  .plan-export-status { min-height: 0; }
  .plan-auth-dialog { width: min(94vw, 520px); max-height: calc(100svh - 1rem); border-radius: 1.1rem; }
  .plan-auth-card { max-height: calc(100svh - 1rem); }
  .plan-auth-panel { padding: 1.2rem 1.35rem 1.5rem; }
  .plan-auth-choice { gap: .8rem; }
  .plan-auth-hero { width: 100%; min-height: 72px; margin-bottom: -.25rem; padding: .55rem 1rem; }
  .app-ui-body--plan .plan-auth-hero .app-brand img { width: 52px; height: 52px; }
  .plan-auth-hero .app-brand__wordmark { display: grid; font-size: 1.08rem; }
  .plan-auth-heading h2 { font-size: 1.55rem; }
  .plan-auth-heading p:last-child { margin-top: .4rem; font-size: .82rem; }
  .plan-auth-primary, .plan-auth-secondary { min-height: 46px; font-size: .88rem; }
  .plan-auth-features { gap: .6rem; padding-top: .8rem; }
  .plan-auth-features li { grid-template-columns: 38px minmax(0, 1fr); gap: .65rem; }
  .plan-auth-feature-icon { width: 38px; height: 38px; }
  .plan-auth-features strong { font-size: .78rem; }
  .plan-auth-features small { font-size: .68rem; }
  .plan-auth-form-panel { min-height: min(560px, calc(100svh - 1rem)); gap: 1.25rem; padding-top: 4rem; }
}

@media (max-width: 350px) {
  .plan-status-mobile { display: none; }
  .plan-metrics:has(.plan-metrics-toggle[aria-expanded="true"]) { width: min(194px, calc(100% - 62px)); }
  .plan-export-trigger { min-width: 90px; padding-inline: 10px; }
}
