:root {
  --ink: #162b49;
  --blue: #2458db;
  --muted: #596b82;
  --line: #dce4ee;
  --bs-primary: #2458db;
  --bs-body-color: #162b49;
  --bs-body-font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
}
[x-cloak] { display: none !important; }
body { background: #f6f9fc; }
body:has(dialog[open]) { overflow: hidden; }
button, a, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: 3px solid #557ce2 !important; outline-offset: 4px; }
h1:focus, h2:focus { outline: none; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.container { max-width: 1040px; margin-inline: auto; }
main.container { width: calc(100% - 48px); max-width: 1000px; margin-block: 28px 48px; padding: 8px 28px 24px; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 40px #162b490a, 0 2px 8px #162b4905; }
@media (max-width: 767px) {
  main.container { width: calc(100% - 20px); margin-block: 12px 24px; padding: 4px 14px 16px; border-radius: 14px; }
}
.site-header { background: white; border-bottom: 1px solid var(--line); padding: 8px 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); text-decoration: none; font-size: 1.1rem; font-weight: 750; letter-spacing: -.4px; }
.brand > span { color: var(--ink); }
.brand-dot { color: var(--blue); }
.account-controls { min-width: 0; }
.account-button { border: 0; border-radius: 5px; background: transparent; color: var(--blue); padding: 6px 8px; font-size: .78rem; font-weight: 600; }
.account-button:disabled { opacity: .55; }
.account-menu { position: relative; font-size: .8rem; }
.account-menu summary { max-width: 160px; padding: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.account-menu > button { position: absolute; top: 100%; right: 0; z-index: 5; background: white; border: 1px solid var(--line); white-space: nowrap; }
.workspace-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.workspace-select { max-width: 230px; padding: 6px 30px 6px 10px; font-size: .8rem; }
.share-invitation { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 12px; background: #e5edff; border-radius: 8px; }
.share-invitation p { font-size: .85rem; margin: 0; }
.share-permissions { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.share-permissions legend { float: none; width: 100%; margin-bottom: 0; }
.share-permissions label, .share-all { font-size: .85rem; }
.share-all { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.share-trip-list { max-height: 240px; overflow-y: auto; display: grid; gap: 10px; padding: 12px; margin-top: 10px; border: 1px solid var(--line); border-radius: 6px; }
.share-trip-list label { display: flex; align-items: start; gap: 10px; font-size: .85rem; }
.share-trip-list input { flex-shrink: 0; }
.shared-people { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.shared-people h3 { font-size: .95rem; }
.shared-person { padding: 10px 0; font-size: .8rem; overflow-wrap: anywhere; }
.shared-person p { color: var(--muted); font-size: .75rem; margin: 4px 0; }
.item-title:disabled, .schedule-cue:disabled, .editable-date:disabled, .activity:disabled { color: inherit; cursor: default; text-decoration: none; }
.sign-in-panel { max-width: 420px; margin: 48px auto; padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.sign-in-panel h1 { font-size: 1.4rem; letter-spacing: -.4px; margin-bottom: 12px; }
.sign-in-panel p { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.page-intro { padding: 20px 0 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -1.4px; font-weight: 700; line-height: 1.15; }
.page-intro h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.4px; }
.btn { border-radius: 8px; padding: 10px 17px; font-weight: 600; white-space: nowrap; }
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-disabled-bg: var(--blue); --bs-btn-disabled-border-color: var(--blue); --bs-btn-hover-bg: #1948bd; --bs-btn-hover-border-color: #1948bd; }
.btn-outline-primary { --bs-btn-color: var(--blue); --bs-btn-border-color: #bacbf2; --bs-btn-hover-bg: var(--blue); --bs-btn-hover-border-color: var(--blue); }
.btn-sm { padding: 7px 12px; font-size: .82rem; }
.planning-skeleton { padding: 12px 0 24px; }
.planning-skeleton-month { width: 112px; height: 14px; margin: 0 0 16px; border-radius: 4px; background: var(--line); }
.planning-skeleton-grid { display: grid; gap: 12px; }
.planning-skeleton-row { display: grid; grid-template-columns: 1.15fr 1fr .8fr; align-items: center; gap: 24px; min-height: 104px; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.planning-skeleton-row span { width: 70%; height: 12px; border-radius: 4px; background: #e9eef6; }
.planning-skeleton-row span:first-child { height: 16px; background: var(--line); }
.planning-skeleton-cards .planning-skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.planning-skeleton-cards .planning-skeleton-row { grid-template-columns: 1fr; gap: 18px; min-height: 156px; }
@media (max-width: 767px) {
  .planning-skeleton-cards .planning-skeleton-grid { grid-template-columns: 1fr; }
  .planning-skeleton-row { gap: 16px; }
}
.dashboard-toolbar { padding: 0 0 16px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-button { border: 0; background: transparent; border-radius: 7px; color: var(--muted); padding: 8px 15px; font-weight: 600; }
.filter-button.active { color: var(--blue); background: #e5edff; }
.search-input { width: 235px; font-size: .9rem; }
.dashboard-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.view-switch { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 3px; gap: 2px; background: #e9eef6; border-radius: 8px; }
.view-switch button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: .85rem; font-weight: 600; }
.view-switch button.active { background: white; color: var(--blue); box-shadow: 0 1px 3px #162b4914; }
.form-control, .form-select { border-color: #ccd7e5; border-radius: 7px; padding: 10px 12px; }
.form-label { font-weight: 600; font-size: .9rem; }
.trip-collection { display: grid; gap: 12px; }
.trip-entry { min-width: 0; }
.trip-card { display: block; padding: 0; width: 100%; background: white; text-align: left; color: inherit; border: 1px solid var(--line); border-radius: 9px; height: 100%; transition: border-color .15s; }
.trip-card-body { padding: 18px 20px; display: grid; gap: 18px; align-items: center; }
.trip-open { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; text-decoration: none; }
.trip-open:hover { color: var(--blue); text-decoration: underline; }
.trip-date-button { border: 0; background: transparent; padding: 0; text-align: left; width: fit-content; max-width: 100%; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.trip-date-button:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.trip-card h2 { font-size: 1rem; letter-spacing: -.2px; font-weight: 650; margin: 0; }
.open-mark { color: var(--blue); font-size: 1.3rem; }
.trip-dates { font-size: .85rem; color: var(--muted); margin: 0; }
.trip-list-heading, .view-list .trip-card-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(150px, .8fr) 20px; }
.trip-list-heading { display: grid; gap: 18px; padding: 0 21px 10px; color: var(--muted); font-size: .76rem; }
.trip-progress { min-width: 0; }
.trip-progress .progress-label { margin: 0; }
.trip-progress .progress { margin-top: 7px; height: 4px; }
.trip-progress .progress-label strong { font-weight: 500; }
.view-list .preparation-label { display: none; }
.view-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.view-cards .trip-card-body { grid-template-columns: minmax(0, 1fr) 20px; gap: 10px 12px; padding: 20px; }
.view-cards .trip-card h2 { font-size: 1.15rem; grid-column: 1; grid-row: 1; }
.view-cards .open-mark { grid-column: 2; grid-row: 1; }
.view-cards .trip-dates { grid-column: 1 / -1; }
.view-cards .trip-progress { grid-column: 1 / -1; margin-top: 14px; }
.progress-label { font-size: .8rem; display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--muted); }
.progress-label strong { color: var(--ink); }
.progress { height: 6px; background: #e9eef6; border-radius: 3px; }
.progress-bar { background: var(--blue); }
.back-button { margin: 0; color: var(--muted); padding: 7px 0; font-size: .85rem; }
.detail-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 16px 0 22px; }
.detail-intro h1 { margin: 0; font-size: 1.4rem; letter-spacing: -.5px; }
.editable-date { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--muted); background: transparent; border: 0; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; font-size: .85rem; text-align: left; }
.editable-date:hover { color: var(--blue); }
.trip-menu { margin-left: auto; position: relative; }
.trip-menu summary { list-style: none; padding: 4px 12px; font-weight: 700; font-size: 1.3rem; border-radius: 6px; cursor: pointer; }
.trip-menu summary::-webkit-details-marker { display: none; }
.trip-menu[open] summary { background: #e5edff; }
.trip-menu-actions { position: absolute; right: 0; top: 100%; width: 155px; display: grid; padding: 5px; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 18px #162b4914; z-index: 5; }
.trip-menu-actions button { border: 0; background: transparent; text-align: left; padding: 9px; font-size: .85rem; border-radius: 4px; }
.trip-menu-actions button:hover { background: #f0f4fa; }
.trip-notes-preview { display: flex; align-items: center; gap: 10px; flex-basis: 100%; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f0f4fa; font-size: .8rem; color: var(--muted); }
.trip-notes-preview p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.trip-notes-label { font-weight: 600; }
.trip-notes-preview .text-action, .trip-notes-label { flex-shrink: 0; }
.trip-notes-dialog .dialog-heading { margin-bottom: 16px; }
.trip-notes-content { max-height: 60dvh; overflow-y: auto; overscroll-behavior: contain; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.65; }
.inline-date-editor { flex-basis: 100%; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 14px; max-width: 650px; }
.date-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.date-fields input { min-width: 0; }
.inline-date-editor .form-label { font-size: .8rem; margin-bottom: 4px; }
.inline-date-editor .form-control { font-size: .85rem; padding: 7px 9px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-heading h2 { font-size: 1.15rem; font-weight: 700; margin: 0; letter-spacing: -.25px; }
.logistics-panel { background: white; border: 1px solid var(--line); padding: 16px; border-radius: 10px; }
.section-fold-toggle { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.fold-chevron { display: inline-block; flex-shrink: 0; color: var(--muted); transform: rotate(90deg); font-size: 1.2rem; line-height: 1; }
.fold-chevron.is-collapsed { transform: none; }
.logistics-panel:has(.section-fold-toggle[aria-expanded="false"]) .section-heading { margin-bottom: 0; }
.agenda-section-heading { flex-wrap: wrap; }
.agenda-heading-actions { display: flex; align-items: center; gap: 12px; font-size: .78rem; }
.travel-cue { margin: 0 0 18px; padding: 12px 15px; border: 1px solid #cbd9f5; border-radius: 9px; background: #edf3ff; }
.travel-cue-heading { display: flex; align-items: center; gap: 12px; color: var(--blue); font-size: .85rem; }
.travel-cue-heading time { font-variant-numeric: tabular-nums; }
.travel-cue-heading .text-action { margin-left: auto; font-size: .78rem; }
.travel-next { display: flex; align-items: baseline; gap: 8px; width: 100%; margin-top: 7px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; font-size: .85rem; }
.travel-next > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.travel-next-label { flex-shrink: 0; color: var(--muted); font-size: .72rem; }
.travel-no-next { margin: 7px 0 0; font-size: .8rem; color: var(--muted); }
.day-heading h3 { width: 100%; min-width: 0; }
.day-fold-toggle { display: block; width: 100%; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.day-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.day-date-label, .day-plan-count { color: var(--muted); font-size: .78rem; font-weight: 400; }
.day-plan-count { margin-left: auto; }
.day-plan-preview { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.today-badge { padding: 2px 6px; border-radius: 4px; color: var(--blue); background: #e5edff; font-size: .65rem; font-weight: 600; }
.timeline-day-today > .day-marker { color: white; background: var(--blue); }
.timeline-day.timeline-day-collapsed { padding-bottom: 18px; }
.agenda-now-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; color: var(--blue); font-size: .72rem; font-weight: 600; }
.agenda-now-line::after { content: ''; flex: 1; height: 1px; background: #aac0ef; }
.activity.activity-up-next { border-color: #799ae9; }
.preparations-heading { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: baseline; }
.preparations-heading .small { font-size: .73rem; }
.quick-add { margin-bottom: 12px; }
.category-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.category-strip button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: white; font-size: .78rem; }
.category-strip button.active { color: var(--blue); border-color: var(--blue); background: #edf2ff; }
.quick-input-row { display: flex; align-items: center; gap: 8px; }
.quick-input-row input { min-width: 0; padding: 8px 10px; font-size: .88rem; }
.quick-secondary { display: flex; justify-content: space-between; margin-top: 5px; }
.text-action { display: inline-block; padding: 5px 0; border: 0; color: var(--blue); background: transparent; font-size: .78rem; text-align: left; }
.text-action:hover { text-decoration: underline; }
.empty-reservations { margin: 0; font-size: .85rem; color: var(--muted); }
.reservation { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.reservation:last-child { padding-bottom: 0; }
.reservation .form-check-input { flex-shrink: 0; margin-top: 5px; width: 19px; height: 19px; cursor: pointer; }
.reservation-content { flex: 1; min-width: 0; }
.reservation-main { display: flex; align-items: start; gap: 10px; }
.item-title { flex: 1; min-width: 0; font-size: .9rem; font-weight: 650; color: var(--ink); background: transparent; border: 0; padding: 2px 0; text-align: left; overflow-wrap: anywhere; }
.item-title:hover { color: var(--blue); text-decoration: underline; }
.edit-cue { color: var(--muted); font-size: .7rem; margin-left: 6px; }
.details-toggle { flex-shrink: 0; padding-top: 3px; }
.reservation-details { padding: 6px 0 2px; }
.edit-details { display: block; }
.item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: .7rem; margin: 3px 0 0; }
.agenda-link { font-size: .72rem; padding: 3px 2px; }
.schedule-cue { display: inline-flex; align-items: center; gap: 4px; padding: 3px 2px; background: transparent; border: 0; color: var(--blue); font-size: .72rem; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.schedule-cue:hover { text-decoration-style: solid; }
.itinerary-date-prompt { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.status-badge { padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.status-pending { background: #fff1d5; color: #795100; }
.status-confirmed { background: #e1f3e9; color: #246044; }
.status-cancelled { background: #f1f1f1; color: #5b5b5b; }
.item-notes { font-size: .83rem; color: var(--muted); white-space: pre-wrap; margin: 5px 0; }
.is-cancelled .item-title { text-decoration: line-through; }
.timeline { padding-left: 19px; }
.timeline-day { border-left: 2px solid var(--line); position: relative; padding: 0 0 32px 30px; }
.timeline-day:last-child { border-color: transparent; }
.day-marker { position: absolute; left: -18px; top: -2px; width: 34px; height: 34px; background: #e5edff; color: var(--blue); border: 4px solid #f6f9fc; border-radius: 50%; text-align: center; font-size: .8rem; font-weight: 700; line-height: 26px; }
.day-heading { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 14px; }
.day-heading h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.day-heading > span { font-size: .8rem; color: var(--muted); }
.activity { background: white; border: 1px solid var(--line); border-radius: 8px; display: flex; width: 100%; text-align: left; gap: 14px; align-items: start; padding: 15px; margin-bottom: 9px; color: var(--ink); }
.activity:hover { border-color: #799ae9; }
.activity-time { border: 0; background: transparent; text-align: left; font-size: .78rem; color: var(--blue); width: 55px; flex-shrink: 0; padding: 2px 0 0; text-decoration: underline dotted; text-underline-offset: 4px; }
.activity-time:disabled { color: var(--muted); text-decoration: none; }
.activity-content { flex: 1; min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.activity-content strong { font-size: .9rem; font-weight: 600; }
.activity-title-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.activity-kind { font-size: .65rem; line-height: 1.5; color: var(--muted); background: #edf1f6; border-radius: 4px; padding: 1px 6px; }
.activity-kind.linked-reservation { color: var(--blue); background: #e5edff; }
.agenda-entry { border-radius: 8px; scroll-margin: 20px; }
.agenda-entry:focus { outline: 2px solid var(--blue); outline-offset: 3px; }
.agenda-entry[draggable="true"] { cursor: grab; }
.agenda-entry[draggable="true"] .activity { cursor: inherit; }
.activity-dragging { opacity: .45; }
.timeline-day.activity-drop-target { background: #eaf1ff; border-radius: 8px; outline: 2px dashed #799ae9; outline-offset: 4px; }
.activity-drag-handle { flex-shrink: 0; border: 0; background: transparent; padding: 4px; margin: -4px 0 -4px -4px; color: var(--muted); font-size: 1.1rem; line-height: 1.2; cursor: grab; user-select: none; touch-action: none; }
.activity-drag-handle:hover, .activity-drag-handle:focus-visible { color: var(--blue); background: #edf3ff; border-radius: 4px; }
.activity-pointer-drag, .activity-pointer-drag * { cursor: grabbing !important; user-select: none !important; }
.activity-drag-preview { position: fixed; top: 0; left: 0; z-index: 1000; pointer-events: none; max-width: min(280px, 75vw); padding: 10px 14px; border: 1px solid #799ae9; border-radius: 8px; background: white; color: var(--ink); font-size: .85rem; box-shadow: 0 6px 20px #162b4926; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.inline-field { position: relative; display: inline-flex; flex-wrap: wrap; align-items: center; min-width: 0; max-width: 100%; }
.inline-title { flex: 1; }
.inline-field-input { width: 100%; min-width: 0; padding: 4px 6px; font: inherit; }
.inline-time-input { width: 65px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.inline-field-error { flex-basis: 100%; font-size: .75rem; color: #a22835; }
.agenda-inline-time { flex: 0 0 65px; }
.activity-title-button { border: 0; padding: 0; text-align: left; background: transparent; color: inherit; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.activity-title-button:hover { text-decoration: underline dotted; text-underline-offset: 4px; }
.activity-more { border: 0; padding: 0 2px; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.activity-actions { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.activity-delete { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-top: -4px; padding: 4px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.activity-delete:hover, .activity-delete:focus-visible { color: #a22835; background: #fff0f1; }
.activity-delete:disabled { opacity: .5; cursor: default; }
.trip-delete { justify-self: center; margin: 0; }
.view-cards .trip-delete { grid-column: 2; grid-row: 1; }
@media (max-width: 767px) {
  .view-list .trip-delete { grid-column: 2; grid-row: 1 / 4; }
}
.activity-delete-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: .8rem; }
.agenda-reservation-status { display: flex; align-items: center; gap: 6px; font-size: .75rem; }
.agenda-reservation-status .form-check-input { margin-top: 0; }
.activity-note-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inline-save-status { min-height: 1.2em; margin: -12px 0 10px; color: var(--muted); font-size: .72rem; }
.quick-activity { margin: 8px 0 16px; }
.agenda-unscheduled-hint { color: var(--muted); font-size: .8rem; margin-bottom: 0; }
.activity-content .small { white-space: pre-wrap; }
.add-day { color: var(--blue); border: 0; background: transparent; padding: 9px 0; font-size: .82rem; text-align: left; }
.editor-dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 40px); border: 1px solid var(--line); border-radius: 16px; padding: 28px; color: var(--ink); overscroll-behavior: contain; }
.editor-dialog::backdrop { background: #142b4966; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 25px; }
.dialog-heading h2 { font-size: 1.4rem; letter-spacing: -.5px; font-weight: 700; margin: 0; }
.dialog-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 9px; }
.optional { color: var(--muted); font-weight: 400; font-size: .8rem; }
.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed #bccde1; border-radius: 12px; }
.empty-state h2 { font-size: 1.45rem; }
.empty-state p { color: var(--muted); }
.skip-link { position: absolute; top: -100px; left: 10px; background: white; padding: 10px; z-index: 10; }
.skip-link:focus { top: 10px; }
@media (min-width: 768px) and (max-width: 991px) {
  .view-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .search-input { width: 100%; }
  .dashboard-toolbar > div:last-child { width: 100%; }
  .dashboard-search { flex: 1 1 200px; }
  .trip-list-heading { display: none !important; }
  .view-list .trip-card-body { grid-template-columns: minmax(0, 1fr) 20px; gap: 5px 12px; padding: 14px 16px; }
  .view-list .trip-card h2 { grid-column: 1; grid-row: 1; }
  .view-list .trip-dates { grid-column: 1; grid-row: 2; font-size: .8rem; }
  .view-list .trip-progress { grid-column: 1; grid-row: 3; margin-top: 5px; }
  .view-list .open-mark { grid-column: 2; grid-row: 1 / 4; }
  .view-list .trip-progress .progress { max-width: 170px; }
  .view-cards { grid-template-columns: minmax(0, 1fr); }
  .detail-intro { gap: 6px 12px; margin-bottom: 16px; }
  .detail-intro h1 { font-size: 1.15rem; flex: 1; }
  .editable-date { order: 2; flex-basis: 100%; }
  .inline-date-editor, .trip-notes-preview { order: 3; }
  .date-fields { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .detail-layout { --bs-gutter-x: 1.5rem; }
  .logistics-panel { padding: 14px; }
  .section-heading { gap: 10px; }
  .section-heading h2 { font-size: 1.04rem; }
  .editor-dialog { padding: 21px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

.dashboard-date-editor { margin: 0 16px 16px; max-width: none; cursor: default; }
.month-picker-legend { float: none; width: auto; font-size: inherit; }
.month-picker-fields { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; }
.month-picker-fields > div { min-width: 0; }
.month-picker-fields .form-select { min-width: 0; }
.scroll-picker .form-select { width: 100%; text-align: left; text-transform: capitalize; font-variant-numeric: tabular-nums; }
.inline-date-trigger { text-align: left; min-width: 130px; }
.scroll-options { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; min-width: 110px; width: max-content; max-width: min(260px, calc(100vw - 56px)); max-height: 196px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 5px 18px #162b4926; scroll-behavior: auto; }
.scroll-options button { display: block; width: 100%; min-height: 34px; padding: 7px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; white-space: nowrap; font-size: .85rem; font-variant-numeric: tabular-nums; }
.scroll-options button:hover, .scroll-options button.is-highlighted { background: #edf3ff; color: var(--blue); }
.scroll-options button[aria-selected="true"] { font-weight: 700; color: var(--blue); }
.month-options { width: calc((100% - 8px) * .565); min-width: 0; }
.month-options button { text-transform: capitalize; }
.month-options.year-options { left: auto; right: 0; width: calc((100% - 8px) * .435); }
.dashboard-trip-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trip-month-cue { min-width: 0; margin: 0; padding: 0; border: 0; }
.compact-month-fields { grid-template-columns: max-content max-content; gap: 5px; align-items: center; }
.compact-month-fields .scroll-picker .form-select { padding: 2px 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: .85rem; line-height: 1.5; text-decoration: underline dotted; text-underline-offset: 4px; box-shadow: none; }
.compact-month-fields .scroll-picker .form-select:hover { color: var(--blue); }
.trip-month-cue:disabled .form-select { text-decoration: none; }
.compact-month-fields .month-options { width: 140px; min-width: 140px; }
.compact-month-fields .year-options { width: 100px; min-width: 100px; }
.month-picker-error { display: block; max-width: 32ch; color: #a22835; font-size: .75rem; }
.date-range-action { width: auto; padding: 2px 4px; color: var(--muted); text-decoration: none; }
.trip-date-button { display: inline-flex; align-items: center; gap: 6px; }
.date-range-picker { display: inline-flex; position: relative; min-width: 0; max-width: 100%; }
.range-trigger { color: var(--muted); font-size: .85rem; }
.range-calendar { position: absolute; top: calc(100% + 4px); left: 0; z-index: 45; width: 292px; max-width: calc(100vw - 32px); padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); box-shadow: 0 6px 22px #162b4926; }
.range-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.range-heading .trip-month-cue { margin-right: auto; }
.range-nav, .range-close { border: 0; border-radius: 5px; background: transparent; color: var(--muted); padding: 0 6px; font-size: 1.3rem; line-height: 1.5; }
.range-nav:hover, .range-close:hover { background: #edf3ff; color: var(--blue); }
.range-instruction { margin: 10px 0; color: var(--muted); font-size: .78rem; }
.range-weekdays, .range-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; gap: 2px; }
.range-weekdays { color: var(--muted); font-size: .7rem; margin-bottom: 4px; }
.range-days button { border: 0; border-radius: 5px; min-height: 32px; padding: 4px 0; background: transparent; color: var(--ink); font-size: .8rem; font-variant-numeric: tabular-nums; }
.range-days button.range-outside { color: #8d98a8; }
.range-days button:hover, .range-days button.range-between { background: #edf3ff; color: var(--blue); }
.range-days button.range-selected { background: var(--blue); color: white; }
.range-days button.range-today { box-shadow: inset 0 0 0 1px currentColor; font-weight: 700; }
.range-error { margin: 8px 0 0; color: #a22835; font-size: .75rem; white-space: normal; }
.range-clear { margin-top: 10px; font-size: .75rem; }
.trip-draft-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0; padding: 0; border: 0; }
.trip-draft-dates > legend { float: none; margin-bottom: 4px; }
.draft-date-range { display: block; flex: 1 1 100%; }
.draft-date-range .range-calendar { position: relative; top: auto; left: auto; width: 100%; max-width: none; margin-top: 10px; box-shadow: none; }
.draft-date-range .range-days button { min-height: 36px; }
.add-trip-note { display: inline-block; margin: 0 0 20px; font-size: .85rem; }
@media (max-width: 767px) {
  .detail-intro .trip-month-cue { order: 2; }
  .detail-date-range { order: 2; }
  .detail-intro .date-range-action { order: 2; flex-basis: auto; }
}
.view-cards .dashboard-date-editor .date-fields { grid-template-columns: minmax(0, 1fr); }
.timeline-group-heading { display: flex; align-items: center; gap: 10px; color: #68778d; font-size: .9rem; font-weight: 600; }
.timeline-group-heading time::first-letter { text-transform: uppercase; }
.timeline-node { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #e8effc; }
.trip-group-undated .timeline-group-heading { color: #8993a3; }
.trip-group-undated .timeline-node { background: transparent; border: 1px solid #8993a3; box-shadow: none; }
.vertical-timeline .dashboard-trip-group { position: relative; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; margin-bottom: 0; padding-bottom: 24px; }
.vertical-timeline .dashboard-trip-group::before { content: ''; position: absolute; left: 5px; top: 27px; bottom: -27px; border-left: 2px solid #d9e3f2; }
.vertical-timeline .dashboard-trip-group:last-child { padding-bottom: 0; }
.vertical-timeline .dashboard-trip-group:last-child::before { bottom: 18px; }
.vertical-timeline .timeline-group-heading { position: relative; align-self: start; align-items: flex-start; gap: 12px; margin: 19px 0 0 !important; padding: 0 !important; border: 0 !important; line-height: 1.5; }
.vertical-timeline .timeline-node { position: relative; margin-top: 6px; z-index: 1; }
.vertical-timeline .trip-group-undated::before { border-left-style: dashed; }
.vertical-timeline .view-list .trip-card-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(120px, .8fr) 20px; }
@media (min-width: 768px) and (max-width: 991px) {
  .vertical-timeline .dashboard-trip-group { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 767px) {
  .vertical-timeline .dashboard-trip-group { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-left: 24px; }
  .vertical-timeline .timeline-group-heading { margin-top: 0 !important; }
  .vertical-timeline .timeline-node { position: absolute; left: -23px; }
  .vertical-timeline .dashboard-trip-group::before { top: 10px; bottom: -10px; }
  .vertical-timeline .dashboard-trip-group:last-child::before { bottom: 18px; }
  .vertical-timeline .trip-entry, .vertical-timeline .date-collection > .date-card { position: relative; }
  .vertical-timeline .trip-entry::before, .vertical-timeline .date-collection > .date-card::before { content: ''; position: absolute; top: 29px; left: -18px; width: 18px; border-top: 1px solid #d9e3f2; pointer-events: none; }
  .vertical-timeline .trip-entry::after, .vertical-timeline .date-collection > .date-card::after { content: ''; position: absolute; top: 26px; left: -21px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); pointer-events: none; }
  .vertical-timeline .trip-group-undated .trip-entry::after, .vertical-timeline .trip-group-undated .date-card::after { background: #f6f9fc; border: 1px solid #8993a3; }
}
@media (max-width: 767px) {
  .vertical-timeline .view-list .trip-card-body { grid-template-columns: minmax(0, 1fr) 20px; padding: 10px 12px; gap: 4px 8px; }
}

/* Both planning modules share the same compact layout and controls. */
.module-switch { margin-left: auto; flex-shrink: 0; }
.module-switch button { padding: 6px 12px; }
html[data-module="dates"] { --blue: #7053ad; --bs-primary: #7053ad; }
html[data-module="dates"] .btn-primary { --bs-btn-hover-bg: #5e4395; --bs-btn-hover-border-color: #5e4395; }
.date-collection .date-place { color: var(--muted); font-size: .85rem; }
.date-place > button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.date-collection.view-cards .date-place { grid-column: 1; }
.date-collection.view-cards .trip-delete { grid-column: 2; grid-row: 1; }
.date-collection.view-cards .trip-dates { grid-column: 1 / -1; grid-row: 2; }
.date-collection .trip-dates { gap: 8px 12px; }
.date-title { font: inherit; color: inherit; text-align: left; }
.date-location { font-size: .9rem; margin: -6px 0 18px; }
.date-panel { padding: 18px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.date-panel h2 { font-size: 1.05rem; margin: 0 0 14px; }
.date-step { display: flex; align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.date-step > .form-check-input { flex-shrink: 0; margin-top: 4px; }
.date-step-title { flex: 1; }
.date-step-title > button { text-align: left; }
.date-step-title.is-complete > button { text-decoration: line-through; color: var(--muted); }
.date-quick-add { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.date-quick-add input { min-width: 0; font-size: .85rem; }
.date-notes-field { display: flex; width: 100%; }
.date-notes-field > button { max-height: 55dvh; overflow-y: auto; white-space: pre-wrap; text-align: left; }
.inline-notes-input { min-height: 160px; max-height: 55dvh; resize: vertical; }
@media (max-width: 767px) {
  .site-header > .container { flex-wrap: wrap; gap: 6px 10px !important; }
  .module-switch { order: 3; margin: 0; }
  .account-controls { margin-left: auto; }
  .date-collection.view-list .trip-dates { grid-column: 1; grid-row: 2; }
  .date-collection.view-list .date-place { grid-column: 1; grid-row: 3; }
  .date-collection.view-list .trip-delete { grid-column: 2; grid-row: 1; }
  .date-panel { padding: 14px; }
}
@media (max-width: 575px) {
  .site-header > .container { flex-wrap: nowrap; }
  .brand > span { display: none; }
  .module-switch { order: 0; margin-left: 0; }
  .account-controls { margin-left: 0; }
  .account-menu summary { max-width: 85px; }
}
.activity-delete-notice > span { min-width: 0; overflow-wrap: anywhere; }
.activity-delete-notice > button { flex-shrink: 0; }

.dashboard-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dashboard-title { flex: 1; min-width: 0; }
.editable-plan-name { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: var(--line); text-underline-offset: 4px; }
.dashboard-open { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex-shrink: 0; min-height: 40px; padding: 8px 5px; color: var(--blue); font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: 5px; }
.dashboard-open:hover { background: #e9eef6; text-decoration: underline; }

button.dashboard-open { border: 0; background: transparent; font-family: inherit; }
button.dashboard-open:hover { background: #e9eef6; }
.view-cards { align-items: start; }

.quick-add-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 24px; }
.quick-add-plan .form-control { flex: 1; width: auto; min-width: 0; font-size: .9rem; }
.quick-add-plan p { flex-basis: 100%; }

.detail-schedule { display: contents; }
@media (max-width: 1199px) and (orientation: portrait) {
  .detail-intro { gap: 6px 8px; margin: 12px 0; }
  .detail-layout { --bs-gutter-x: 1.5rem; }
  .detail-intro h1 { flex: 1; min-width: 0; font-size: clamp(1rem, 2.4vw, 1.2rem); line-height: 1.25; letter-spacing: -.2px; overflow-wrap: anywhere; }
  .detail-intro h1 .inline-field { width: 100%; }
  .detail-intro .date-title { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .detail-intro .back-button { flex-shrink: 0; font-size: .8rem; padding: 5px 0; }
  .detail-intro .trip-menu { flex-shrink: 0; }
  .detail-intro .trip-menu summary { padding: 4px 8px; font-size: 1.1rem; }
  .detail-schedule { display: flex; flex: 0 0 100%; flex-wrap: wrap; align-items: center; gap: 6px 12px; order: 2; min-width: 0; font-size: .8rem; }
  .detail-schedule .trip-date-button, .detail-schedule .text-action { font-size: inherit; }
}

/* Time cues keep past plans readable and mark the present on the timeline. */
.trip-card.plan-past { background: #f0f3f7; border-color: #dce3ec; }
.plan-past .dashboard-title { color: var(--muted); }
.plan-past:hover .dashboard-title, .plan-past:focus-within .dashboard-title { color: var(--ink); }
.trip-card.plan-current { border-inline-start: 3px solid var(--blue); }
.vertical-timeline .date-card.plan-current { background: color-mix(in srgb, var(--blue) 7%, white); }
.plan-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px; border-radius: 4px; color: var(--muted); background: #e5eaf1; font-size: .7rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.plan-status-current { color: var(--blue); background: #e9eef6; }
.plan-status-current::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.trip-group-past .timeline-node { background: #98a5b6; box-shadow: none; }
.vertical-timeline .trip-entry:has(> .plan-past)::after { background: #98a5b6; }
.timeline-jump { font-size: .8rem; white-space: nowrap; }
.vertical-timeline { --timeline-gutter: 180px; }
.timeline-now { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--blue); font-size: .78rem; line-height: 20px; scroll-margin-block: 96px; }
.timeline-now strong { font-weight: 700; }
.timeline-now time { white-space: nowrap; }
.timeline-now-dot { flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px #e9eef6; z-index: 1; }
.timeline-now-line { flex: 1; border-top: 1px solid currentColor; opacity: .35; }
.timeline-now-wide { grid-column: 1 / -1; }
.trip-entry > .timeline-now { margin: 0 0 12px calc(-1 * var(--timeline-gutter)); }
.view-list .trip-entry > .trip-card { height: auto; }
@media (max-width: 1199px) and (orientation: portrait) {
  .vertical-timeline { --timeline-gutter: 128px; }
}
@media (max-width: 767px) {
  .dashboard-controls .timeline-jump { order: 1; margin-left: auto; }
  .vertical-timeline { --timeline-gutter: 24px; }
  .timeline-now-wide { margin-left: -24px; }
  .vertical-timeline .trip-entry-now::before { top: 61px; }
  .vertical-timeline .trip-entry-now::after { top: 58px; }
}

.date-timeline-setting { display: flex; align-items: center; gap: 10px; min-width: 0; }
.date-timeline-setting { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.date-timeline-setting select { width: auto; min-width: 7rem; flex-shrink: 0; padding-right: 2.25rem; }

.planning-options-menu { margin-left: 0; }
.planning-options-menu > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #bacbf2; border-radius: 8px; color: var(--blue); background: white; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.planning-options-menu > summary:hover, .planning-options-menu[open] > summary { background: #e5edff; }
.planning-options-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: grid; gap: 16px; width: min(19rem, calc(100vw - 40px)); padding: 16px; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 18px #162b4914; }
.planning-options-view, .planning-options-panel .date-timeline-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .8rem; }
.planning-options-share { border: 0; border-top: 1px solid var(--line); padding: 12px 0 0; color: var(--blue); background: transparent; font-size: .85rem; text-align: left; }
.planning-options-share:hover { text-decoration: underline; }

.reservations-panel { margin: 1.5rem 0 2rem; border-block: 1px solid var(--bs-border-color, #ddd); padding: 1rem 0; }
.reservations-panel h2 { font-size: 1.1rem; margin: 0; }
.reservation-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .65rem 0; }
.reservation-title { flex: 1; min-width: 0; text-align: left; overflow-wrap: anywhere; }
.reservation-title small { display: block; }
.reservation-status { font-size: .75rem; border-radius: 1rem; padding: .2rem .6rem; background: #eee6d0; }
.reservation-confirmed { background: #dbede2; color: #235a3b; }
.reservation-cancelled { background: #eee; color: #666; }
.reservation-files { display: flex; flex-wrap: wrap; gap: .7rem; width: 100%; font-size: .85rem; overflow-wrap: anywhere; }
.reservation-fields { display: grid; gap: .75rem; }
.reservation-fields label { display: block; min-width: 0; font-size: .9rem; }
.reservation-field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
.reservation-viewer { width: min(96vw, 960px); max-width: 96vw; }
.reservation-document { overflow: auto; max-height: 72dvh; background: white; touch-action: pan-x pan-y pinch-zoom; }
.reservation-document canvas, .reservation-document img { display: block; width: 100%; height: auto; }
.reservation-editor { max-height: 92dvh; overflow-y: auto; }

.reservation-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; width: 100%; font-size: .875rem; }
.reservation-summary .reservation-title { flex: 1 1 8rem; font-weight: 500; }
.reservation-kind-icon { flex: none; color: var(--bs-secondary-color, #687378); }
.reservation-summary .reservation-status { font-size: .75rem; background: none; padding: 0; color: #85713b; }
.reservation-summary .reservation-confirmed { color: #326246; }
.reservation-summary .reservation-cancelled { color: #737373; text-decoration: line-through; }
.activity-reservations { margin-top: .5rem; display: grid; gap: .45rem; }
.activity-location-link { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 1.85rem; min-height: 1.85rem; border-radius: .3rem; color: var(--bs-secondary-color, #687378); }
.activity-location-link:hover, .activity-location-link:focus-visible { background: #e9eef2; color: var(--bs-primary, #1265bd); }
.reservation-document-action { display: inline-flex; align-items: center; gap: .3rem; min-height: 2rem; white-space: nowrap; }
.reservation-file-row { display: flex; align-items: start; gap: .5rem; margin: .65rem 0; }
.reservation-file-open { display: inline-flex; align-items: center; gap: .5rem; overflow-wrap: anywhere; text-align: left; flex: 1; min-width: 0; }
.reservation-file-options { max-width: 75%; }
.reservation-file-options > summary { padding: 0 .5rem; cursor: pointer; list-style: none; }
.reservation-file-options[open] { flex: 1; }
.reservation-address label { margin-top: .5rem; }
.date-activity { padding-bottom: .7rem; }
.date-activity > .activity-reservations { margin-left: 1.5rem; }
.date-activity-details { font-size: .8rem; color: var(--bs-secondary-color, #687378); margin: .3rem 0 0 1.5rem; }
.date-activity-details summary { cursor: pointer; width: fit-content; }
.activity-location-editor { display: grid; gap: .6rem; padding: .6rem 0; }
.reservations-panel .section-heading { flex-wrap: wrap; gap: .5rem; }
@media (max-width: 480px) { .reservation-summary { gap: .2rem .5rem; } .reservation-document-action { min-height: 2.5rem; } .reservation-file-options[open] { max-width: 100%; } }

/* The itinerary is a reading surface; editing lives in the activity dialog. */
.itinerary-row { flex: 1; min-width: 0; width: 100%; }
.itinerary-activity { display: flex; align-items: center; gap: .75rem; min-height: 60px; width: 100%; }
.itinerary-kind { flex: none; color: #737b83; }
.itinerary-open { flex: 1; min-width: 0; padding: .5rem 0; min-height: 44px; border: 0; background: transparent; color: var(--ink); text-align: left; border-radius: 4px; }
.itinerary-headline { display: flex; align-items: baseline; gap: .35rem; font-size: .9rem; line-height: 1.45; }
.itinerary-headline time { white-space: nowrap; font-size: .78rem; font-weight: 400; }
.itinerary-headline strong { font-weight: 600; overflow-wrap: anywhere; }
.itinerary-separator { color: var(--muted); }
.itinerary-cue { display: flex; align-items: center; gap: .4rem; margin-top: .22rem; font-size: .78rem; line-height: 1.35; color: #737b83; }
.itinerary-cue svg { flex: none; color: #8b8f91; }
.itinerary-cue .is-confirmed { color: #27814b; }
.itinerary-context-actions { display: flex; align-items: center; flex: none; gap: .05rem; }
.itinerary-context-actions .activity-location-link { width: 2.25rem; min-height: 2.75rem; background: transparent; border: 0; color: #727980; padding: 0; }
.itinerary-context-actions .activity-location-link:hover { color: var(--blue); background: #f5f7fa; }
.agenda-entry > .activity { position: relative; margin: 0; padding: 0; gap: 0; border: 0; border-radius: 0; border-bottom: 1px solid #edf0f3; }
.agenda-entry:last-of-type > .activity { border-bottom: 0; }
.agenda-entry > .activity.activity-up-next { background: #f6f9fd; border-radius: 6px; box-shadow: none; }
.agenda-entry > .activity > .activity-drag-handle { position: absolute; left: -1.4rem; top: 1.1rem; padding: .2rem; opacity: 0; }
.agenda-entry:hover .activity-drag-handle, .agenda-entry:focus-within .activity-drag-handle { opacity: 1; }
.timeline-day { padding-bottom: 20px; }
.date-panel .itinerary-row + .itinerary-row { border-top: 1px solid #edf0f3; }
.date-panel { padding: 16px 18px; }
.activity-editor { width: min(94vw, 640px); }
.activity-editor-fields { display: grid; gap: .9rem; }
.activity-editor-fields label { display: grid; gap: .3rem; font-size: .875rem; }
.activity-editor-reservations { margin-top: 1.2rem; }
.activity-editor-reservations h3 { font-size: .95rem; margin: 0; }
.activity-editor-reservations .reservation-row { padding: .5rem 0; }
.activity-editor-reservations .dialog-heading h2 { font-size: 1rem; }
.reservations-panel { margin: 1.4rem 0 0; padding: .8rem 0 0; border-bottom: 0; color: var(--muted); }
.reservation-management > summary { font-size: .9rem; cursor: pointer; width: fit-content; }
.reservation-management-body { padding-top: .75rem; }
.reservation-management-body .section-heading { justify-content: flex-end; margin-bottom: .4rem; }
.completed-tasks-toggle { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .75rem; margin: .6rem 0; }
@media (max-width: 600px) {
  .itinerary-activity { gap: .6rem; min-height: 60px; }
  .itinerary-headline { flex-wrap: wrap; gap: .2rem .3rem; font-size: .9rem; }
  .itinerary-headline strong { flex: 1; min-width: 4rem; }
  .itinerary-cue { font-size: .78rem; }
  .itinerary-kind { width: 18px; }
  .itinerary-context-actions .activity-location-link { width: 2rem; }
  .date-panel { padding: 14px; }
  .timeline-day { padding-left: 18px; }
  .agenda-entry > .activity > .activity-drag-handle { left: -1.1rem; }
}
@media (hover: none) { .agenda-entry > .activity > .activity-drag-handle { opacity: .35; } }
.compact-plan-heading { align-items: center; margin-bottom: .35rem; }
.compact-plan-heading h2 { margin: 0; }
.compact-add-activity { color: var(--muted); font-size: .8rem; padding: .35rem 0 .35rem .5rem; }

.quick-activity-composer { margin-top: .8rem; padding-top: .65rem; }
.quick-activity-inputs { display: flex; gap: .5rem; align-items: center; }
.quick-activity-inputs > input:first-child { flex: 1; min-width: 0; }
.quick-activity-inputs .btn { flex: none; font-size: .85rem; }
.quick-activity-inputs .quick-activity-time { flex: 0 0 6.5rem; min-width: 0; }
.quick-activity-options { display: flex; align-items: center; gap: .9rem; margin-top: .55rem; color: var(--muted); }
.quick-category-control, .quick-time-control { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem 0; font-size: .78rem; color: var(--muted); border: 0; background: transparent; }
.quick-activity-date { margin-left: auto; font-size: .75rem; }
.activity-category-pills { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .6rem; }
.activity-category-pill { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #e0e4e8; border-radius: 2rem; background: white; color: #6c737b; font-size: .8rem; padding: .4rem .7rem; min-height: 2.2rem; }
.activity-category-pill.is-selected { color: white; background: #28313b; border-color: #28313b; }
.activity-category-pill:hover:not(.is-selected) { background: #f6f8fa; }
.itinerary-context-actions { margin-left: auto; }
@media (max-width: 400px) { .quick-activity-inputs { flex-wrap: wrap; } .quick-activity-inputs .quick-activity-time { flex-basis: 5.6rem; } .quick-activity-inputs .btn { padding-inline: .65rem; } }

/* One complete plan: a non-modal desktop panel and an inline mobile detail. */
.trip-card[data-plan-card] { height: auto; cursor: pointer; }
.trip-card[data-plan-card]:hover { border-color: #9ab2e6; }
.trip-card[data-plan-card].is-selected { border-color: var(--blue); background: #f3f7ff; box-shadow: 0 0 0 1px var(--blue); }
.trip-card[data-plan-card] .trip-card-body { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 14px 16px; }
.trip-card[data-plan-card] .dashboard-name,
.trip-card[data-plan-card] .dashboard-trip-dates { grid-column: 1; grid-row: auto; }
.plan-card-open { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; overflow-wrap: anywhere; }
.plan-card-chevron { flex-shrink: 0; color: var(--muted); font-size: .85rem; }
.plan-card-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; font-size: .85rem; color: var(--muted); }
.plan-card-place { min-width: 0; overflow-wrap: anywhere; }
.plan-pending { border-radius: 5px; padding: 2px 7px; background: #fff0cc; color: #805214; font-size: .8rem; white-space: nowrap; }
.plan-detail { min-width: 0; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.plan-detail-close { margin-left: auto; order: 1; align-self: flex-start; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 1.4rem; line-height: 1; }
.plan-detail-close:hover { background: #edf3fc; }
.plan-detail .detail-intro { margin: 0 0 18px; gap: 10px; }
.plan-detail .detail-intro h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.3rem; line-height: 1.35; }
.plan-detail-title { color: var(--ink); font: inherit; text-align: left; }
.plan-detail .detail-schedule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; flex-basis: 100%; order: 2; }
.plan-detail .trip-notes-preview { display: block; order: 3; width: 100%; }
.plan-detail .trip-notes-label { display: block; margin-bottom: 4px; }
.plan-notes-field { display: block; width: 100%; }
.plan-notes-field > button { display: block; max-width: 100%; white-space: pre-wrap; text-align: left; color: var(--ink); font-size: .9rem; }
.plan-detail .row > [class*="col-"] { flex: 0 0 100%; width: 100%; min-width: 0; }
.plan-detail .row > .order-1 { order: 1 !important; }
.plan-detail .row > .order-2 { order: 2 !important; }
.plan-detail .section-heading { flex-wrap: wrap; }
.plan-detail .quick-activity-inputs { flex-wrap: wrap; }
.plan-detail .trip-menu { order: 0; }
@media (min-width: 768px) {
  main.master-detail-open { width: calc(100% - min(56vw, 720px) - 48px); margin-left: 16px; margin-right: calc(min(56vw, 720px) + 32px); padding-inline: 20px; }
  .plan-detail { position: fixed; z-index: 30; top: 68px; right: 16px; bottom: 16px; width: min(56vw, 720px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 12px 40px #162b491a; padding: 24px; }
  .master-detail-open .trip-collection { grid-template-columns: minmax(0, 1fr); }
  .master-detail-open .vertical-timeline { --timeline-gutter: 28px; }
  .master-detail-open .vertical-timeline .dashboard-trip-group { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-left: 24px; }
  .master-detail-open .vertical-timeline .timeline-group-heading { margin-top: 0 !important; }
  .master-detail-open .vertical-timeline .timeline-node { position: absolute; left: -23px; }
  .master-detail-open .dashboard-toolbar { align-items: stretch !important; }
  .master-detail-open .dashboard-controls, .master-detail-open .dashboard-search, .master-detail-open .search-input { min-width: 0; max-width: 100%; }
  .master-detail-open .page-intro { flex-wrap: wrap; }
}
@media (max-width: 767px) {
  .trip-entry:has(.plan-detail-slot > .plan-detail) { grid-column: 1 / -1; }
  .plan-detail { margin-top: 10px; padding: 16px 12px; scroll-margin-block: 16px; }
  .plan-detail .detail-intro h2 { font-size: 1.15rem; }
  .plan-detail .timeline-day { margin-left: 20px; padding-left: 18px; }
  .plan-detail .agenda-heading-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .plan-detail { animation: plan-detail-reveal 180ms ease-out; }
  @keyframes plan-detail-reveal { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}

/* Compact reading layout; the existing live detail and editors stay mounted. */
.plan-detail { padding: 16px; }
.plan-detail .detail-intro { gap: 4px 10px; margin-bottom: 10px; }
.plan-detail .detail-intro h2 { font-size: 1.2rem; }
.plan-detail .detail-schedule { gap: 2px 10px; }
.plan-detail .date-location { margin: 0; min-width: 0; }
.plan-detail .date-location > .inline-field > button { white-space: normal; overflow-wrap: anywhere; }
.plan-detail .row { --bs-gutter-x: 0; --bs-gutter-y: 0; margin: 0; gap: 14px; }
.plan-detail .date-panel, .plan-detail .logistics-panel { padding: 0; border: 0; border-radius: 0; }
.plan-detail .section-heading { gap: 6px; margin-bottom: 6px; }
.plan-detail .section-heading h2, .plan-detail .date-panel > h2 { font-size: 1rem; margin-bottom: 0; }
.plan-detail .timeline-day, .plan-detail .timeline-day.timeline-day-collapsed { padding-bottom: 10px; padding-left: 20px; }
.plan-detail .day-heading { margin-bottom: 2px; }
.plan-detail .day-fold-toggle { padding-block: 4px; }
.plan-detail .day-plan-count { font-size: .75rem; }
.plan-detail .itinerary-activity { min-height: 44px; gap: 8px; }
.plan-detail .itinerary-open { padding-block: 5px; }
.plan-detail .itinerary-headline { font-size: .875rem; line-height: 1.35; }
.plan-detail .itinerary-cue { margin-top: 1px; }
.plan-detail .reservation, .plan-detail .date-step { padding-block: 7px; }
.plan-detail .item-meta { margin-top: 1px; }
.plan-detail .travel-cue { padding: 8px 10px; margin-bottom: 10px; }
.plan-detail .inline-save-status { margin: 0 0 6px; min-height: 0; }
.plan-detail .reservations-panel { margin-top: 12px; }
.plan-detail .completed-tasks-toggle { margin-block: 4px 7px; }
.quick-activity-composer, .quick-preparation-composer, .date-quick-add { margin-top: 8px; padding-top: 0; }
.quick-activity-composer > .form-control, .quick-preparation-composer > .form-control, .date-quick-add > .form-control { min-height: 40px; font-size: .875rem; }
.capture-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.capture-controls > .form-control, .capture-controls > .form-select { width: auto; flex: 1 1 110px; min-width: 0; max-width: 100%; min-height: 40px; font-size: .875rem; }
.capture-controls > input[type="time"] { flex-basis: 100px; }
.capture-controls > .btn { min-height: 40px; }
.plan-detail-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.plan-detail-tabs [role="tab"] { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; flex-wrap: nowrap; white-space: nowrap; gap: 3px; min-width: 0; min-height: 44px; padding: 6px 1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: .875rem; }
.plan-detail-tabs [aria-selected="true"] { color: var(--blue); font-weight: 650; border-bottom-color: var(--blue); }
.plan-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; min-height: 18px; border-radius: 5px; background: #fff0cc; color: #805214; font-size: .75rem; padding-inline: 3px; }
.plan-notes { display: inline-flex; }
.plan-notes-trigger { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.plan-notes-trigger:hover, .plan-notes-trigger[aria-expanded="true"] { background: #edf3fc; color: var(--blue); }
.plan-notes-trigger.has-notes { color: var(--blue); }
.plan-notes-dialog { position: fixed; width: min(400px, calc(100vw - 32px)); max-height: min(520px, calc(100dvh - 32px)); overflow-y: auto; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; box-shadow: 0 8px 32px #162b4926; }
.plan-notes-dialog .dialog-heading { gap: 12px; margin-bottom: 8px; }
.plan-notes-dialog h3 { font-size: 1rem; margin: 0; }
.plan-notes-dialog .plan-notes-field > button { width: 100%; min-height: 44px; max-height: none; overflow-wrap: anywhere; }
.plan-notes-dialog .inline-notes-input { width: 100%; min-height: 180px; }
.plan-notes-dialog:modal { inset: 0; margin: auto; max-height: min(520px, 75dvh); }
.plan-notes-dialog::backdrop { background: #162b4940; }
body:has(.plan-notes-dialog[open]:not(:modal)):not(:has(dialog:modal)) { overflow: auto; }
@media (min-width: 1101px) {
  .plan-detail .detail-layout, .plan-detail .date-detail-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .plan-detail .row > [class*="col-"] { width: 100%; padding: 0; }
}
@media (max-width: 767px) {
  .plan-detail { padding: 10px 12px 14px; }
  .trip-card.is-selected .dashboard-trip-dates, .trip-card.is-selected .plan-card-meta, .trip-card.is-selected .plan-card-chevron { display: none; }
  .plan-detail .detail-intro h2 { flex: 0 1 auto; margin-right: auto; }
  .plan-detail .detail-intro h2 .inline-field > button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; font-size: 0; }
  .plan-detail .detail-intro h2 .inline-field > button::after { content: '✎'; font-size: 22px; }
  .plan-detail .detail-intro h2 .inline-field-input { min-width: 140px; max-width: 100%; font-size: 1rem; }
  .plan-detail .detail-schedule { font-size: .875rem; }
  .plan-detail .plan-notes-trigger, .plan-detail .detail-intro .activity-delete { min-width: 44px; min-height: 44px; }
  .plan-detail .plan-detail-close { flex-basis: 44px; width: 44px; height: 44px; }
  .plan-detail .detail-intro h2 .inline-field > button, .plan-detail .detail-schedule button { min-height: 44px; }
  .plan-detail .date-detail-columns > .plan-section > .date-panel > h2 { display: none; }
  .plan-detail [role="tabpanel"] .section-heading h2:not(:has(button)) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .plan-detail [role="tabpanel"] .section-heading { margin-bottom: 4px; }
  .plan-detail .logistics-panel > .section-heading { display: none; }
  .plan-detail .reservations-panel { margin-top: 0; }
  .plan-detail .reservation-management[open] > summary { display: none; }
  .plan-detail .row { gap: 0; }
  .plan-detail .timeline-day { margin-left: 16px; }
  .capture-controls > .form-control, .capture-controls > .form-select, .capture-controls > .btn { min-height: 44px; }
}
@media (max-width: 767px) {
  .plan-detail-slot:has(> .plan-detail) { margin-left: -24px; }
}

/* V2 reference: retain the live Alpine detail, with the prototype's proportions. */
:root { --planner-edge: max(26px, calc((100vw - 1500px) / 2 + 26px)); --planner-master: clamp(270px, 34vw, 440px); --planner-gap: 22px; --planner-detail: calc(min(100vw, 1500px) - 52px - var(--planner-master) - var(--planner-gap)); --planner-panel-height: calc(100dvh - 110px); }
.site-header > .container { max-width: 1500px; padding-inline: 26px; }
main.planning-workspace { padding: 22px; border-radius: 16px; }
.planning-workspace .page-intro { padding: 4px 0 16px; gap: 8px; }
.planning-workspace .page-intro h1 { font-size: 1.45rem; }
.planning-workspace .page-intro > .d-flex { flex-wrap: nowrap !important; gap: 4px !important; }
.planning-workspace .page-intro .btn { padding: 8px 12px; font-size: .875rem; }
.planning-workspace .planning-options-menu > summary { border: 0; padding: 5px; min-width: 32px; justify-content: center; background: transparent; }
.planning-workspace .planning-options-menu > summary > span:first-child { display: none; }
.planning-workspace .dashboard-toolbar { gap: 12px !important; margin-bottom: 16px; }
.planning-workspace .dashboard-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; }
.planning-workspace .dashboard-search, .planning-workspace .search-input { width: 100%; min-width: 0; max-width: 100%; }
.planning-workspace .vertical-timeline { --timeline-gutter: 24px; }
.planning-workspace .vertical-timeline .dashboard-trip-group { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-left: 24px; }
.planning-workspace .vertical-timeline .timeline-group-heading { margin-top: 0 !important; }
.planning-workspace .vertical-timeline .timeline-node { position: absolute; left: -23px; }
.planning-workspace .filter-group { gap: 2px; }
.planning-workspace .filter-button { padding: 7px 9px; font-size: .875rem; }
.plan-detail { overflow: hidden; padding: 0; border-radius: 16px; }
.plan-detail > [x-data="tripDetails"] { display: contents; }
.plan-detail-record { display: flex; flex-direction: column; min-height: 0; }
.plan-detail .detail-intro { flex-shrink: 0; padding: 19px 23px 13px; margin: 0; border-bottom: 1px solid var(--line); gap: 3px 8px; }
.plan-detail .detail-intro h2 { order: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -.35px; }
.plan-detail .plan-notes { order: 1; }
.plan-detail .trip-menu, .plan-detail .detail-intro > .activity-delete { order: 2; margin-left: 0; }
.plan-detail .plan-detail-close { order: 3; margin-left: 0; border-color: transparent; }
.plan-detail .detail-schedule { order: 4; gap: 3px 10px; font-size: .8rem; }
.plan-detail-summary { order: 5; flex-basis: 100%; color: var(--muted); margin: 4px 0 0; font-size: .75rem; }
.plan-detail-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 23px 24px; }
.plan-detail .detail-layout, .plan-detail .date-detail-columns { gap: 22px; }
.plan-detail .plan-detail-side > .plan-reservations { margin-top: 14px; }
.quick-activity-composer, .quick-preparation-composer, .date-quick-add { padding: 8px; margin-top: 14px; border: 1px solid #d8e2f0; border-radius: 10px; background: white; transition: border-color .15s, box-shadow .15s; }
.quick-activity-composer.is-active, .quick-preparation-composer.is-active, .date-quick-add.is-active { border-color: #89a6ee; box-shadow: 0 0 0 3px #2458db0c; }
.quick-activity-composer > .form-control, .quick-preparation-composer > .form-control, .date-quick-add > .form-control { border: 0; border-radius: 0; background: transparent; min-height: 30px; padding: 5px 4px; font-size: .875rem; box-shadow: none; }
.quick-activity-composer > .form-control:focus, .quick-preparation-composer > .form-control:focus, .date-quick-add > .form-control:focus { outline: 0 !important; }
.quick-activity-composer:focus-within, .quick-preparation-composer:focus-within, .date-quick-add:focus-within { border-color: #89a6ee; box-shadow: 0 0 0 3px #2458db0c; }
.capture-controls { display: block; margin-top: 10px; border-top: 1px solid #e9edf4; padding-top: 10px; }
.capture-controls .activity-category-pills { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 11px; padding-top: 0; }
.composer-fields { display: flex; align-items: end; flex-wrap: wrap; gap: 7px; }
.capture-field { display: grid; gap: 4px; flex: 1 1 100px; min-width: 0; max-width: 100%; }
.capture-field > span { color: var(--muted); font-size: .75rem; font-weight: 600; }
.capture-field > input { height: 36px; min-height: 36px; padding: 6px 8px; font-size: .8rem; min-width: 0; max-width: 100%; }
.composer-fields > .btn { height: 36px; min-height: 36px; padding: 6px 12px; margin-left: auto; font-size: .8rem; }
.capture-controls > .text-action { margin-top: 4px; }
.plan-notes-dialog { width: min(520px, calc(100vw - 30px)); padding: 22px; }
.plan-notes-footer { display: flex; justify-content: end; gap: 10px; margin-top: 14px; }
.plan-detail .plan-detail-tabs { flex-shrink: 0; margin: 0 23px; background: white; }
@media (min-width: 768px) {
  main.planning-workspace.master-detail-open { width: var(--planner-master); max-width: var(--planner-master); margin: 27px 0 48px var(--planner-edge); padding: 22px; }
  .plan-detail { position: fixed; top: 81px; right: var(--planner-edge); width: var(--planner-detail); bottom: auto; max-height: var(--planner-panel-height); }
  .plan-detail { display: flex; flex-direction: column; }
  .plan-detail-record { max-height: var(--planner-panel-height); }
}
@media (min-width: 1101px) {
  .plan-detail .detail-layout, .plan-detail .date-detail-columns { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
  .plan-detail .row > [class*="col-"] { padding: 0; }
}
@media (min-width: 768px) and (max-width: 1100px) {
  :root { --planner-edge: 18px; --planner-gap: 14px; --planner-master: max(270px, 36vw); --planner-detail: calc(100vw - 36px - var(--planner-master) - var(--planner-gap)); }
  main.planning-workspace, main.planning-workspace.master-detail-open { padding: 17px; margin-top: 18px; }
  .plan-detail { top: 72px; }
  .plan-detail .detail-intro { padding: 15px 16px 12px; }
  .plan-detail-body { padding: 16px 16px 20px; }
}
@media (max-width: 767px) {
  .site-header > .container { padding-inline: 16px; }
  main.planning-workspace { width: calc(100% - 24px); margin: 12px; padding: 14px 12px; border-radius: 13px; }
  .planning-workspace .page-intro h1 { font-size: 1.25rem; }
  .planning-workspace .page-intro .btn { min-height: 40px; }
  .planning-workspace .trip-card.is-selected .dashboard-trip-dates { display: flex; }
  .planning-workspace .trip-card.is-selected .plan-card-meta { display: flex; }
  .planning-workspace .trip-card.is-selected { border-radius: 10px 10px 0 0; border-bottom: 0; box-shadow: none; }
  .plan-detail-slot:has(> .plan-detail) { margin-left: 0; }
  .plan-detail { margin-top: 0; border: 1px solid #7e9df1; border-top: 0; border-radius: 0 0 10px 10px; }
  .plan-detail-record { max-height: none; }
  .plan-detail .detail-intro { padding: 10px 12px 11px; border-top: 1px solid #e9edf5; border-bottom: 0; }
  .plan-detail-body { overflow: visible; padding: 13px 12px 15px; }
  .plan-detail .timeline-day { margin-left: 8px; padding-left: 14px; }
  .plan-detail .plan-detail-tabs { margin-inline: 12px; }
  .plan-detail .detail-layout, .plan-detail .date-detail-columns { display: flex; gap: 0; }
  .capture-controls .activity-category-pill { min-height: 40px; }
  .capture-field > input, .composer-fields > .btn { height: 44px; min-height: 44px; }
  .plan-detail .itinerary-context-actions .activity-location-link { width: 32px; }
}

.plan-detail-edit { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.plan-detail-edit:hover, .plan-detail-edit[aria-expanded="true"] { color: var(--blue); background: #e5edff; }
@media (max-width: 767px) {
  .planning-workspace .trip-card.is-selected .trip-card-body { padding-bottom: 8px; }
  .planning-workspace .trip-card.is-selected .plan-pending { display: none; }
  .planning-workspace .trip-card.is-selected .plan-card-meta:has(> .plan-pending:only-child) { display: none; }
  .plan-detail .detail-intro { justify-content: flex-end; gap: 2px; padding: 3px 8px; border-top: 0; background: #f4f7ff; }
  .plan-detail .plan-detail-summary { display: none; }
  .plan-detail-edit { order: 0; }
  .plan-detail .detail-intro.mobile-properties-open h2 { flex: 1 0 100%; order: 4; margin: 0; padding: 4px 4px 0; }
  .plan-detail .detail-intro.mobile-properties-open h2 .inline-field > button { display: block; width: auto; min-height: 40px; font-size: 1rem; text-align: left; }
  .plan-detail .detail-intro.mobile-properties-open h2 .inline-field > button::after { display: none; }
  .plan-detail .detail-intro.mobile-properties-open .detail-schedule { order: 5; padding-inline: 4px; }
}

/* Mobile card: inline name, small contextual actions and a separate disclosure. */
.plan-card-inline-title { flex: 1; min-width: 0; }
.plan-card-name { font: inherit; font-weight: 650; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
button.plan-card-name { border: 0; background: transparent; padding: 0; }
button.plan-card-name:hover { text-decoration: underline dotted; text-underline-offset: 4px; }
.plan-card-actions { display: inline-flex; gap: 1px; flex-shrink: 0; align-self: flex-start; }
.plan-card-action { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 40px; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.plan-card-action:hover, .plan-card-properties[aria-expanded="true"] { background: #e5edff; color: var(--blue); }
.plan-card-date-editor { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; max-width: 100%; }
@media (max-width: 767px) {
  .plan-detail .detail-intro { display: none !important; }
  .trip-card .dashboard-name { align-items: flex-start; gap: 4px; }
  .trip-card .plan-card-inline-title { padding-top: 8px; }
  .plan-card-inline-title .inline-field-input { min-width: 0; width: 100%; font-size: 1rem; }
  .plan-card-inline-title .inline-field-error { font-size: .75rem; }
  .plan-card-place-editor { flex: 1 0 100%; }
  .plan-detail-close { display: none; }
  .plan-detail { animation: none; }
}
