/* TAN-58: a compact shared editor surface; Results keeps its existing layout. */
body.compact-designer:not(.results-mode) { overflow: auto; background: #fff; }
body.compact-designer:not(.results-mode) #page-title { color: var(--deep-ocean); font-size: 26px; }
body.compact-designer:not(.results-mode) #main-content { max-width: 1100px; padding-top: 22px; }
body.compact-designer:not(.results-mode) #main-content::before { display: none; }
body.compact-designer:not(.results-mode) #journey-ribbon { display: block; position: static; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
body.compact-designer:not(.results-mode) .intro { margin-bottom: 24px; }
body.compact-designer:not(.results-mode) #journey-ribbon > .journey-ribbon-heading { display: flex; justify-content: flex-end; padding: 0; margin: 14px 0 0; border: 0; }
body.compact-designer:not(.results-mode) #journey-ribbon > .journey-ribbon-heading,
body.compact-designer:not(.results-mode) #journey-ribbon .ribbon-tools { position: static; inset: auto; transform: none; }
body.compact-designer:not(.results-mode) #reference-status.is-loading,
body.compact-designer:not(.results-mode) #reference-status.is-error { display: block; }
body.compact-designer:not(.results-mode) #journey-ribbon > .journey-ribbon-heading > div:first-child,
body.compact-designer:not(.results-mode) .designer-section-heading,
body.compact-designer:not(.results-mode) #selection-groups,
body.compact-designer:not(.results-mode) #preference-strand,
body.compact-designer:not(.results-mode) .designer-preferences-access,
body.compact-designer:not(.results-mode) .designer-stay-choice,
body.compact-designer:not(.results-mode) .intent-groups,
body.compact-designer .sheet-backdrop,
body.compact-designer:not(.results-mode) .cruise-pool-control { display: none !important; }
body.compact-designer:not(.results-mode) .journey-ribbon-body { display: block; }
body.compact-designer:not(.results-mode) #journey-ribbon .journey-gateway { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 12px; padding: 0; border: 0; background: none; box-shadow: none; }
body.compact-designer:not(.results-mode) #journey-ribbon .journey-gateway #show-results { width: auto; order: 2; min-height: 42px; margin: 0; padding: 10px 22px; }
body.compact-designer:not(.results-mode) #journey-ribbon .ribbon-readiness { max-width: 400px; margin: 0; }
body.results-mode :is(#compact-design-controls,#compact-intent-fields,#compact-editor-slot) { display: none; }

#compact-design-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin: 16px 0 20px; font-size: 14px; }
#compact-design-controls .designer-shape-section { display: none !important; }
#compact-design-controls label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#compact-cruise-choices { display: contents; }
#compact-design-controls select { min-height: 34px; padding: 5px 8px; border: 1px solid #cbd9d8; border-radius: 4px; background: #fff; font: inherit; color: var(--deep-ocean); }
#compact-intent-fields { display: grid; grid-template-columns: 1fr 1.25fr 1fr 1fr 1.2fr; border-bottom: 1px solid #cbd9d8; }
#compact-intent-fields button { min-width: 0; min-height: 60px; padding: 8px 12px; text-align: left; background: #f4f7f6; border: 0; border-right: 1px solid #fff; border-bottom: 3px solid transparent; font-size: 13px; color: var(--deep-ocean); }
#compact-intent-fields button[aria-expanded="true"] { background: #edf6f4; border-bottom-color: var(--green); }
#compact-intent-fields button > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
#compact-intent-fields strong { font-weight: 500; display: block; overflow-wrap: anywhere; }

body.compact-designer #compact-editor-slot > section { display: none; position: relative; inset: auto; transform: none; z-index: auto; width: 100%; max-height: none; overflow: visible; padding: 22px 12px 16px; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
body.compact-designer.where-open #compact-editor-slot #where-panel,
body.compact-designer.endpoints-open #compact-editor-slot #endpoints-panel,
body.compact-designer.when-open #compact-editor-slot #when-panel,
body.compact-designer.matters-open :is(#compact-editor-slot, #cruise-lines-modal) #matters-panel,
body.compact-designer.stays-open #compact-editor-slot #stays-panel { display: block; }
#compact-editor-slot > section > h2 { display: block; text-align: center; margin: 0 64px 20px; padding: 0; border: 0; font-size: 17px; font-weight: 500; color: var(--deep-ocean); }
#compact-editor-slot .panel-close { display: block; position: absolute; right: 12px; top: 16px; width: auto; height: auto; padding: 6px 0; }
#compact-editor-slot .sheet-grabber,
#compact-editor-slot .endpoint-composer,
#compact-editor-slot .route-section,
#compact-editor-slot .endpoint-browser-heading > div,
#compact-editor-slot .browser-heading,
#compact-editor-slot #destination-disclosure,
#compact-editor-slot .endpoint-scroll-more { display: none !important; }
#compact-editor-slot .endpoint-explorer,
#compact-editor-slot .geography-browser,
#compact-editor-slot .time-designer,
#compact-editor-slot .region-panel { padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; min-height: 0; }
#compact-editor-slot .endpoint-explorer { display: flex; flex-direction: column; }
#compact-editor-slot .endpoint-browser-heading { display: block; order: 2; margin: 0 auto 20px; width: min(340px,100%); padding: 0; border: 0; }
body.compact-designer #compact-editor-slot #endpoint-pane-search,
#compact-editor-slot .compact-search input { width: 100%; height: 36px; padding: 7px 12px; border: 1px solid #cbd9d8; border-radius: 4px; background: #fff; font-size: 13px; }
#compact-editor-slot .compact-search { display: block; width: min(340px,100%); margin: 0 auto 20px; }
#compact-editor-slot #endpoint-pane-areas,
#compact-editor-slot #zone-rail { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; order: 1; margin: 0 0 20px; padding: 0; border: 0; overflow: visible; max-height: none; }
#compact-editor-slot #endpoint-pane-areas button,
#compact-editor-slot #zone-rail button { position: static; display: block; flex: initial; width: auto; min-width: 0; min-height: 38px; height: auto; padding: 7px 15px; border: 1px solid #cbd9d8; border-radius: 999px; background: #fff; color: var(--deep-ocean); box-shadow: none; transform: none; font-size: 13px; font-weight: 500; }
#compact-editor-slot #endpoint-pane-areas button[aria-pressed="true"],
#compact-editor-slot #zone-rail button[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: #fff; }
#compact-editor-slot #zone-rail button::after { display: none; }
#compact-editor-slot #endpoint-pane-ports { order: 3; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; max-height: none; min-height: 0; overflow: visible; margin: 0; padding: 0; border: 0; background: none; }
#compact-editor-slot .compact-port-section { min-width: 0; }
#compact-editor-slot .compact-port-section:only-child { grid-column: 1 / -1; }
#compact-editor-slot .compact-port-section:only-child .compact-choice-grid,
#compact-editor-slot #region-panel > .compact-choice-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
#compact-editor-slot .compact-port-section h3,
#compact-editor-slot #region-panel > h3 { margin: 0 0 4px; text-align: center; font-size: 14px; font-weight: 500; color: var(--deep-ocean); }
#compact-editor-slot .compact-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
#compact-editor-slot .compact-choice-grid button { display: flex; justify-content: space-between; align-items: center; gap: 7px; min-width: 0; min-height: 34px; padding: 6px 10px; text-align: left; border: 1px solid #d6e2de; border-radius: 4px; background: #fff; color: var(--deep-ocean); font-size: 13px; box-shadow: none; }
#compact-editor-slot .compact-choice-grid button > span:first-child { overflow-wrap: anywhere; }
#compact-editor-slot .compact-choice-grid button[aria-pressed="true"] { border-color: var(--green); background: #deeeea; color: var(--deep-ocean); }
/* Reserve the same checkmark footprint in both selection states. */
#compact-editor-slot .compact-check { flex: 0 0 14px; height: 16px; line-height: 16px; color: var(--green); font-size: 16px; font-weight: 500; }
#compact-editor-slot .compact-text-action,
#compact-editor-slot .section-clear,
body.compact-designer:not(.results-mode) #clear-all { display: inline-block; background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--muted); min-height: 30px; padding: 5px 0; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
#compact-editor-slot .compact-text-action[aria-pressed="true"] { background: none; color: var(--green); }
#compact-editor-slot .compact-text-action:disabled { opacity: .55; text-decoration: none; cursor: default; }
#compact-editor-slot .compact-port-section > .compact-text-action,
#compact-editor-slot #region-panel > .compact-text-action { display: block; margin: 0 auto 12px; }
#compact-editor-slot .compact-choice-grid + .compact-text-action { margin-top: 8px; margin-bottom: 0; }
#endpoint-current-controls { text-align: center; margin-top: 18px; font-size: 12px; color: var(--muted); }
#endpoint-current-controls p { margin: 0 0 6px; }
#compact-editor-slot .compact-utilities { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
#compact-editor-slot .compact-utilities input { accent-color: var(--green); }
#compact-editor-slot .compact-place-lookup { max-width: 480px; margin: 12px auto 0; font-size: 12px; }
#compact-editor-slot .compact-place-lookup summary { color: var(--muted); text-align: center; }
#compact-editor-slot #journey-menu [data-expand-destinations] { display: none; }
#compact-editor-slot #journey-menu { position: static; inset: auto; width: 100%; min-width: 0; margin-top: 10px; border: 0; background: none; box-shadow: none; padding: 0; }

#compact-editor-slot .time-composer,
#compact-editor-slot .availability-shortcuts,
#compact-editor-slot #availability-picker { display: none !important; }
#compact-editor-slot .date-range-question { padding: 0; margin: 0; border: 0; background: none; }
#compact-month-years { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 22px; }
#compact-month-years h3 { margin: 0 0 10px; text-align: center; font-size: 16px; font-weight: 500; }
#compact-month-years > section + section { border-left: 1px solid #d6e2de; padding-left: 22px; }
#compact-month-years .compact-month-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
#compact-month-years button { min-width: 0; min-height: 36px; padding: 6px 0; border: 0; border-radius: 4px; background: #fff; color: var(--deep-ocean); font-size: 13px; }
#compact-month-years button[aria-pressed="true"] { background: #deeeea; }
#compact-month-years button.is-boundary { box-shadow: inset 0 0 0 1px var(--green); }
#compact-month-years button:disabled { color: var(--muted); opacity: .45; }
#compact-month-status { margin: 12px 0 4px; text-align: center; font-size: 12px; color: var(--muted); }
#compact-exact-toggle { display: block; margin: 0 auto; }
#compact-exact-dates { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 10px; }
#compact-exact-dates label { display: grid; gap: 5px; font-size: 12px; }
#compact-exact-dates input { max-width: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid #cbd9d8; border-radius: 4px; }
#compact-editor-slot .journey-span-question { display: block; margin-top: 16px; text-align: center; }
#compact-editor-slot .journey-span-question { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#compact-editor-slot .journey-length-label { text-transform: none; letter-spacing: normal; font-size: 13px; font-weight: 400; }
#compact-editor-slot .journey-length-options { justify-content: center; }
#compact-editor-slot .journey-length-options button { min-height: 34px; }
#compact-editor-slot #compact-exact-toggle { display: block; margin: 0 auto; }
#compact-editor-slot #when-panel .section-heading { margin-bottom: 10px; }
#compact-editor-slot .time-resolution { margin-top: 12px; font-size: 12px; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .sailings-section,
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .connections-section,
#compact-editor-slot #stays-panel .stay-designer,
#compact-editor-slot #stays-panel .stay-timing { padding: 0; margin: 0 0 16px; border: 0; background: none; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .line-browser,
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .line-panel,
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .connection-question { border: 0; border-radius: 0; background: none; box-shadow: none; margin: 0; padding: 0; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .line-browser-heading { display: none; }
#compact-editor-slot #line-category-rail { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0 0 14px; overflow: visible; }
#compact-editor-slot #line-category-rail button { width: auto; min-width: 0; min-height: 36px; height: auto; padding: 7px 14px; border: 1px solid #cbd9d8; border-radius: 999px; background: #fff; box-shadow: none; transform: none; font-size: 13px; }
#compact-editor-slot #line-category-rail button strong { font-size: 13px; font-weight: 500; }
#compact-editor-slot #line-category-rail button small { display: none; }
#compact-editor-slot #line-category-rail button[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
#compact-editor-slot #line-panel .line-panel-head { text-align: center; justify-content: center; margin-bottom: 10px; }
#compact-editor-slot #line-panel .line-panel-head > div:first-child > span { display: none; }
#compact-editor-slot #line-panel .line-panel-tools button { background: none; border: 0; box-shadow: none; padding: 5px 0; text-decoration: underline; }
#compact-editor-slot #line-panel .line-pills { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
#compact-editor-slot #line-panel .line-pill { min-height: 34px; padding: 6px 10px; border: 1px solid #d6e2de; border-radius: 4px; background: #fff; color: var(--deep-ocean); font-size: 13px; box-shadow: none; }
#compact-editor-slot #line-panel .line-pill[aria-pressed="true"] { border-color: var(--green); background: #deeeea; }
#compact-editor-slot #line-panel .line-pill strong { font-size: inherit; font-weight: 500; }
#compact-editor-slot #connection-scale { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin-bottom: 16px; }
#compact-editor-slot #connection-scale button { min-width: 0; min-height: 40px; padding: 7px; border: 1px solid #d6e2de; border-radius: 4px; background: #fff; color: var(--deep-ocean); box-shadow: none; font-size: 13px; }
#compact-editor-slot #connection-scale button[aria-pressed="true"] { border-color: var(--green); background: #deeeea; }
#compact-editor-slot #connection-scale button strong { font-size: inherit; font-weight: 500; }
#compact-editor-slot #connection-scale button small { display: none; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .section-heading { min-height: 0; margin: 0 0 12px; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel legend { margin: 0 0 8px; font-size: 13px; }

@media (max-width: 720px) {
  body.compact-designer:not(.results-mode) #main-content { padding: 20px 16px 40px; }
  #compact-intent-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #compact-intent-fields button:last-child { grid-column: 1 / -1; }
  #compact-design-controls { justify-content: flex-start; }
  #compact-editor-slot #endpoint-pane-ports { grid-template-columns: 1fr; gap: 24px; }
  #compact-editor-slot .compact-port-section:only-child .compact-choice-grid,
  #compact-editor-slot #region-panel > .compact-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #compact-month-years { grid-template-columns: 1fr; gap: 20px; }
  #compact-month-years > section + section { border-left: 0; padding: 0; }
  #compact-editor-slot .stay-composer { grid-template-columns: 1fr; }
  #compact-editor-slot #line-panel .line-pills,
  #compact-editor-slot #connection-scale { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #compact-exact-dates input { font-size: 16px; }
}
@media (pointer: coarse) {
  #compact-editor-slot button, #compact-editor-slot input, #compact-design-controls select { min-height: 44px; }
  #compact-editor-slot input, #compact-design-controls select { font-size: 16px; }
}

/* TAN-60 revision: continuous field bar and anchored palette, matching Results. */
body.compact-designer:not(.results-mode) { background: linear-gradient(135deg, #dcebed, #edf2ef 65%, #f3eee5); background-attachment: fixed; }
body.compact-designer:not(.results-mode) #main-content { max-width: 1500px; width: 100%; padding: 32px 32px 64px; }
body.compact-designer:not(.results-mode) #page-title { font-size: clamp(26px, 2.6vw, 34px); text-shadow: none; }
body.compact-designer:not(.results-mode) #journey-ribbon { padding: 0; border: 1px solid #b8d0ce; border-radius: 3px; background: #fff; box-shadow: 0 8px 24px rgba(20,61,70,.08); }
#compact-intent-fields { grid-template-columns: 1.25fr 1fr 1fr 1fr 1fr; gap: 0; border: 0; }
#compact-intent-fields > button,
#compact-refinements-field > button { min-width: 0; min-height: 84px; padding: 16px 20px; background: #fff; border: 0; border-right: 1px solid #d2dedc; border-bottom: 2px solid transparent; border-radius: 0; color: var(--deep-ocean); text-align: left; font-size: 13px; }
#compact-intent-fields > button > span,
#compact-refinements-field > button > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; color: var(--muted); font-size: 12px; }
#compact-intent-fields strong,
#compact-refinements-field strong { display: block; font-size: 14px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; }
#compact-intent-fields .compact-field-chevron,
#compact-refinements-field .compact-field-chevron { color: var(--green); font-size: 18px; line-height: 1; }
#compact-intent-fields #compact-field-stays { border-right: 0; border-left: 4px double #bacdca; }
#compact-intent-fields > button:hover,
#compact-refinements-field > button:hover { border-bottom-color: #8eaaa6; }
#compact-intent-fields > button[aria-expanded="true"],
#compact-refinements-field > button[aria-expanded="true"] { background: #fff; border-bottom-color: var(--green); box-shadow: none; }
#compact-intent-fields > button[aria-expanded="true"] > span,
#compact-refinements-field > button[aria-expanded="true"] > span { color: var(--green); font-weight: 600; }
#compact-editor-slot { grid-column: 1 / -1; min-width: 0; }
body.compact-designer #compact-editor-slot > section { margin: 0; padding: 24px 28px; border: 0; border-top: 1px solid #bdcfca; border-bottom: 1px solid #bdcfca; border-radius: 0; background: #fff; box-shadow: none; }
#compact-editor-slot > section > h2 { margin-bottom: 20px; font-size: 18px; font-weight: 500; }
#compact-editor-slot .panel-close { right: 24px; top: 16px; padding: 6px 12px; border: 1px solid #c2d1ce; border-radius: 3px; background: #fff; text-decoration: none; color: var(--green); }
#compact-secondary-controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid #bdcfca; padding: 12px 20px; }
#compact-design-controls { flex: 1; margin: 0; padding: 0; justify-content: flex-start; border: 0; background: none; }
#compact-cruise-choices { display: flex; flex-wrap: wrap; gap: 12px 28px; }
#compact-design-controls label { font-size: 12px; gap: 10px; }
#compact-design-controls select { min-height: 34px; padding: 6px 28px 6px 10px; width: 170px; border-radius: 3px; background: #fff; font-size: 13px; }
#compact-refinements-field { flex: 0 0 230px; border-left: 1px solid #d2dedc; }
#compact-refinements-field > button { width: 100%; min-height: 50px; padding: 4px 0 4px 20px; border-right: 0; }
#compact-refinements-field > button > span { margin-bottom: 3px; }
#compact-refinements-field strong { font-size: 12px; }
#compact-editor-slot .compact-port-section,
#compact-editor-slot #region-panel { padding: 0; border: 0; background: none; }
#compact-editor-slot .compact-port-section + .compact-port-section { border-left: 1px solid #d2dedc; padding-left: 28px; }
#compact-editor-slot #endpoint-pane-areas button,
#compact-editor-slot #zone-rail button,
#compact-editor-slot #line-category-rail button,
#compact-editor-slot .compact-choice-grid button,
#compact-editor-slot #line-panel .line-pill,
#compact-editor-slot #connection-scale button { border-radius: 3px; }
#endpoint-current-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; text-align: left; margin: 0 0 20px; padding: 0 0 12px; border-bottom: 1px solid #d2dedc; }
#endpoint-current-controls p { color: var(--deep-ocean); font-size: 13px; line-height: 1.5; margin: 0; }
#endpoint-current-controls .compact-utilities { margin: 0; }
#endpoint-current-controls .compact-nearby-option { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-weight: 600; font-size: 13px; cursor: pointer; }
#endpoint-current-controls .compact-nearby-option input { width: 17px; height: 17px; }
#compact-month-years { gap: 24px; }
#compact-month-years > section { padding: 0; border: 0; background: none; }
#compact-month-years > section + section { border-left: 1px solid #d2dedc; padding-left: 24px; }
#compact-month-years button { background: #fff; border-radius: 3px; }
#compact-editor-slot #compact-month-years button { display: flex; align-items: center; justify-content: center; text-align: center; }
#compact-month-years button[aria-pressed="true"] { background: #deeeea; }
#compact-month-years button.is-boundary { background: #b9dcd5; color: #111; }
#compact-month-status:empty { display: none; }
#compact-editor-slot .journey-span-question { margin-top: 20px; padding: 18px 0 0; border: 0; border-top: 1px solid #bdcfca; border-radius: 0; background: none; }
#compact-editor-slot .journey-length-label { color: var(--deep-ocean); font-size: 14px; font-weight: 600; }
#compact-editor-slot .journey-length-options { margin-top: 12px; gap: 8px; }
#compact-editor-slot .journey-length-options button { border: 1px solid #bdcfca; border-radius: 3px; background: #fff; min-height: 36px; }
#compact-editor-slot .journey-length-options button[aria-pressed="true"] { background: #b9dcd5; color: #111; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .sailings-section,
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .connections-section,
#compact-editor-slot #stays-panel .stay-designer,
#compact-editor-slot #stays-panel .stay-timing { padding: 0; margin: 0; border: 0; background: none; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .sailings-section,
#compact-editor-slot #stays-panel .stay-timing { margin-top: 24px; padding-top: 20px; border-top: 1px solid #bdcfca; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .section-heading h3 { color: var(--deep-ocean); font-size: 15px; font-weight: 600; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .connection-question + .connection-question { padding-top: 12px; border-top: 1px solid #d2dedc; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel legend { color: var(--deep-ocean); font-size: 13px; font-weight: 500; }
:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .line-browser-heading { display: block; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
body.compact-designer:not(.results-mode) #journey-ribbon > .journey-ribbon-heading { padding: 0 20px; margin-top: 8px; }
body.compact-designer:not(.results-mode) #journey-ribbon .ribbon-tools .inventory-status { color: var(--muted); text-shadow: none; }
body.compact-designer:not(.results-mode) #journey-ribbon .ribbon-tools .clear-all { color: var(--green); }
body.compact-designer:not(.results-mode) #journey-ribbon .journey-gateway { padding: 16px 20px; margin: 8px 0 0; border-top: 1px solid #d2dedc; }
body.results-mode #compact-secondary-controls { display: none; }
@media (max-width: 720px) {
  body.compact-designer:not(.results-mode) #main-content { padding: 24px 16px 40px; }
  #compact-intent-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #compact-intent-fields > button { min-height: 80px; padding: 12px; border-bottom: 1px solid #d2dedc; }
  #compact-intent-fields > button:nth-child(even) { border-right: 0; }
  #compact-intent-fields #compact-field-stays { grid-column: 1 / -1; border-left: 0; border-top: 3px double #bacdca; }
  #compact-secondary-controls { flex-wrap: wrap; padding: 12px; gap: 16px; }
  #compact-cruise-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; width: 100%; }
  #compact-design-controls label { display: grid; min-width: 0; gap: 6px; }
  #compact-design-controls select { width: 100%; font-size: 13px; }
  #compact-refinements-field { flex-basis: 100%; border: 0; border-top: 1px solid #d2dedc; padding-top: 10px; }
  #compact-refinements-field > button { padding-left: 0; min-height: 42px; }
  body.compact-designer #compact-editor-slot > section { padding: 20px 12px; }
  #compact-editor-slot .compact-port-section + .compact-port-section { border-left: 0; padding: 16px 0 0; border-top: 1px solid #d2dedc; }
  #compact-month-years > section + section { border-left: 0; border-top: 1px solid #d2dedc; padding: 16px 0 0; }
  #compact-editor-slot .panel-close { right: 12px; }
}
/* Subtle active state and compact optional controls. */
#compact-intent-fields > button { background: #afd6da; }
#compact-intent-fields > button:not([aria-expanded="true"]) > span { color: #365a63; }
#compact-intent-fields > button:hover:not([aria-expanded="true"]) { background: #9aced3; }
#compact-refinements-field > button { background: #f1f5f4; }
#compact-intent-fields > button[aria-expanded="true"],
#compact-refinements-field > button[aria-expanded="true"] { background: #fff; box-shadow: inset 0 0 0 1px #a5bfba; }
#compact-intent-fields > button[aria-expanded="true"] > span { font-weight: 600; }
#compact-secondary-controls { border-top: 2px solid #a9bfba; box-shadow: inset 0 3px 4px -4px rgba(20,61,70,.4); padding: 10px 20px; }
#compact-design-controls { flex: 1; display: block; }
.compact-shape-heading { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
#compact-cruise-choices { gap: 10px 24px; }
#compact-refinements-field > button { background: #fff; }
body.compact-designer:not(.results-mode) #journey-ribbon > .journey-ribbon-heading { min-height: 0; padding: 0 0 8px; margin: 0; }
body.compact-designer:not(.results-mode) #journey-ribbon > .journey-ribbon-heading:has(#clear-all[hidden]):not(:has(#reference-status.is-error,#reference-status.is-loading)) { display: none; }
body.compact-designer:not(.results-mode) #journey-ribbon { position: relative; }
body.compact-designer:not(.results-mode) #journey-ribbon > .journey-ribbon-heading { position: absolute; right: 0; bottom: 100%; }
body.compact-designer:not(.results-mode) #journey-ribbon .journey-gateway { margin-top: 0; padding: 12px 20px; border-top: 2px solid #a9bfba; }
body.compact-designer #compact-editor-slot #endpoint-pane-search { height: 42px; border: 1.5px solid #648f89; border-radius: 3px; padding: 9px 14px; font-size: 14px; box-shadow: 0 2px 4px rgba(20,61,70,.08); }
#compact-editor-slot .endpoint-browser-heading { width: min(440px,100%); }
#compact-editor-slot #compact-return-start { display: block; width: fit-content; margin: -8px auto 16px; padding: 7px 16px; border: 1px solid #a5bfba; border-radius: 3px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--green); }
#compact-editor-slot #compact-return-start[aria-pressed="true"] { background: #edf5f2; border-color: var(--green); }
#compact-month-years button.is-preview { background: #dcece7; box-shadow: inset 0 -2px #84aea2; }
#compact-month-years button.is-preview-end { outline: 1px solid var(--green); outline-offset: -1px; }
#compact-month-years button.is-boundary.is-preview { background: #b9dcd5; color: #111; }
body.compact-designer #compact-editor-slot #stays-panel { padding: 18px 24px; }
#compact-editor-slot #stays-panel > h2 { margin-bottom: 14px; }
#compact-editor-slot #stays-panel .stay-designer,
#compact-editor-slot #stays-panel .stay-timing { max-width: 860px; margin: 0 auto; padding: 0; border: 0; }
#compact-editor-slot #stays-panel .stay-designer > .section-heading { margin: 0 0 8px; min-height: 0; }
#compact-editor-slot #stays-panel .stay-designer > .section-heading h3 { display: none; }
#compact-editor-slot #stays-panel .stay-composer { grid-template-columns: minmax(0, 440px) auto; gap: 24px; align-items: start; }
#compact-editor-slot #stays-panel .stay-place-field { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#compact-editor-slot #stays-panel .stay-place-field > label,
#compact-editor-slot #stays-panel .stay-length-question legend { margin: 0 0 6px; padding: 0; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: normal; text-transform: none; }
#compact-editor-slot #stays-panel .stay-place-input { min-height: 38px; padding: 0 0 0 10px; border: 1px solid #aebfbc; border-radius: 3px; background: #fff; }
#compact-editor-slot #stays-panel .stay-place-input input { text-align: left; height: 36px; font-size: 14px; }
#compact-editor-slot #stays-panel .stay-place-input button { min-height: 36px; border-radius: 0 2px 2px 0; padding: 6px 14px; }
#compact-editor-slot #stays-panel .stay-length-question { padding: 0; margin: 0; border: 0; background: none; }
#compact-editor-slot #stays-panel .stay-day-control { min-height: 38px; gap: 6px; }
#compact-editor-slot #stays-panel .stay-day-control button,
#compact-editor-slot #stays-panel .stay-day-control input { height: 36px; min-height: 36px; border-radius: 3px; }
#compact-editor-slot #stays-panel .stay-timing { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d2dedc; }
#compact-editor-slot #stays-panel .stay-timing > .section-heading { display: inline-flex; margin: 0 16px 0 0; min-height: 0; vertical-align: middle; }
#compact-editor-slot #stays-panel .stay-timing > .section-heading h3 { font-size: 13px; font-weight: 500; }
#compact-editor-slot #stays-panel .stay-mode-choices { display: inline-flex; flex-wrap: wrap; gap: 8px; vertical-align: middle; }
#compact-editor-slot #stays-panel .stay-mode-choices button { min-height: 34px; padding: 7px 12px; border-radius: 3px; }
#compact-editor-slot #stays-panel .stay-mode-choices small { display: none; }
#compact-editor-slot #stays-panel .stay-timing-summary { padding: 0; margin-top: 10px; background: none; border: 0; font-size: 12px; }
#compact-editor-slot #stays-panel .stay-timing-summary strong,
#compact-editor-slot #stays-panel .stay-timing-summary span { display: inline; font-size: 12px; }
#compact-editor-slot #stays-panel .stay-timing-summary span { margin-left: 8px; }
#compact-editor-slot #stays-panel .stay-calendar { max-width: 440px; margin-top: 12px; }
#compact-editor-slot #stays-panel .stay-date-editor { max-width: 600px; padding: 0; border: 0; background: none; }
@media (max-width: 720px) {
  #compact-secondary-controls { padding: 10px 12px; gap: 10px; }
  #compact-design-controls label { font-size: 11px; }
  #compact-cruise-choices { gap: 10px; }
  #compact-editor-slot #stays-panel .stay-composer { grid-template-columns: minmax(0,1fr); gap: 12px; }
  body.compact-designer #compact-editor-slot #stays-panel { padding: 18px 12px; }
  #compact-editor-slot #stays-panel .stay-timing-summary strong,
  #compact-editor-slot #stays-panel .stay-timing-summary span { display: block; margin-left: 0; }
}
@media (min-width: 721px) and (max-width: 1100px) {
  #compact-cruise-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  #compact-design-controls label { display: grid; gap: 5px; min-width: 0; }
  #compact-design-controls select { width: 100%; max-width: 180px; }
}
#compact-editor-slot #stays-panel .stay-designer > .section-heading { display: none; }
#compact-editor-slot #stays-panel .stay-place-field { position: relative; }
#compact-editor-slot #stays-panel #clear-stay { position: absolute; right: 0; top: -7px; font-size: 11px; }
@media (max-width: 720px) {
  #compact-editor-slot #stays-panel .stay-place-input input { font-size: 16px; }
}
/* Category shapes and selected destinations. */
#compact-editor-slot #endpoint-pane-areas button,
#compact-editor-slot #zone-rail button,
#compact-editor-slot #line-category-rail button { border-radius: 999px; }
#compact-editor-slot .compact-selected-destinations { margin-top: 20px; padding-top: 12px; border-top: 1px solid #bdcfca; }
#compact-editor-slot .compact-selected-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--deep-ocean); }
#compact-editor-slot .compact-destination-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
#compact-editor-slot .compact-destination-chips > span:not(.compact-no-destinations) { display: inline-flex; align-items: center; gap: 12px; padding: 4px 4px 4px 10px; border: 1px solid #bdcfca; border-radius: 3px; font-size: 13px; }
#compact-editor-slot .compact-destination-chips button { min-width: 28px; min-height: 28px; padding: 3px 6px; border: 0; background: transparent; color: var(--green); font-size: 18px; }
#compact-editor-slot .compact-no-destinations { color: var(--muted); font-size: 12px; }
#compact-editor-slot #stay-timing-summary:empty { display: none; }
@media (min-width: 1100px) {
  body.compact-designer.stays-open #compact-editor-slot #stays-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 32px; }
  #compact-editor-slot #stays-panel > h2 { grid-column: 1 / -1; }
  #compact-editor-slot #stays-panel .stay-designer,
  #compact-editor-slot #stays-panel .stay-timing { max-width: none; width: 100%; margin: 0; }
  #compact-editor-slot #stays-panel .stay-composer { grid-template-columns: minmax(0,1fr) auto; gap: 20px; }
  #compact-editor-slot #stays-panel .stay-timing { padding: 0 0 0 24px; border-top: 0; border-left: 1px solid #d2dedc; }
  #compact-editor-slot #stays-panel .stay-timing > .section-heading { display: block; margin: 0 0 6px; }
  #compact-editor-slot #stays-panel .stay-timing > .section-heading h3 { font-size: 12px; color: var(--muted); }
  #compact-editor-slot #stays-panel .stay-mode-choices button { min-height: 38px; }
}

body.compact-designer:not(.results-mode) .intro { text-align: center; }

/* Main labels anchor to the top; the caret belongs to the editable value. */
#compact-intent-fields > button { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; }
#compact-intent-fields > button > .compact-field-label { margin: 0; line-height: 18px; text-transform: uppercase; letter-spacing: .04em; }
#compact-intent-fields > button > .compact-field-selection { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0; color: var(--deep-ocean); }
#compact-intent-fields .compact-field-selection strong { flex: 1; min-width: 0; }
#compact-intent-fields .compact-field-selection .compact-field-chevron { flex: 0 0 24px; width: 24px; height: 21px; fill: none; stroke: var(--deep-ocean); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
#compact-intent-fields > button[aria-expanded="true"] .compact-field-selection .compact-field-chevron { transform: rotate(180deg); }

#compact-refinements-field > button > span { text-transform: uppercase; letter-spacing: .04em; }

:is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .connection-time-help { display: block; margin: 4px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* Keep the travel window and journey duration distinct, without enlarging type. */
#compact-intent-fields .compact-date-window,
#compact-intent-fields .compact-journey-maximum { display: block; }
#compact-intent-fields .compact-journey-maximum { margin-top: 5px; }
#compact-intent-fields .compact-field-selection strong,
#compact-editor-slot :is(.compact-choice-grid button, .line-pill, .choice-pills button, #connection-scale button, #zone-rail button, #endpoint-pane-areas button, #line-category-rail button, .stay-mode-choices button, #compact-month-years button):not(:disabled),
#compact-editor-slot :is(.line-pill, .choice-pills button, #connection-scale button, #line-category-rail button):not(:disabled) strong,
#compact-editor-slot .compact-destination-chips > span > span { color: #111; font-weight: 400; }
#compact-editor-slot :is(#zone-rail button, #endpoint-pane-areas button, #line-category-rail button):not(:disabled),
#compact-editor-slot #line-category-rail button:not(:disabled) strong { font-weight: 700; }
#compact-editor-slot :is(.compact-choice-grid button, .line-pill, #endpoint-pane-areas button):disabled { opacity: 1; color: #4c5558; border-style: dashed; background: #f3f5f5; cursor: not-allowed; }
#compact-editor-slot .compact-choice-grid button:not(:disabled) > span:first-child { color: #111; font-weight: 400; }
#compact-editor-slot .compact-choice-grid button:disabled > span:first-child { color: #4c5558; }
body.compact-designer:not(.results-mode) #journey-ribbon .journey-gateway .ribbon-readiness { order: 1; }
body.compact-designer:not(.results-mode) #journey-ribbon .journey-gateway .ribbon-readiness { position: static !important; width: auto; height: auto; margin: 0 !important; padding: 0 !important; overflow: visible; clip: auto; white-space: normal; flex: 1 1 300px !important; max-width: none; color: #263b40; font-size: 13px; line-height: 1.6; }
body.compact-designer:not(.results-mode) #journey-ribbon .ribbon-readiness button { display: inline; width: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: #07545c; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 720px) {
  body.compact-designer:not(.results-mode) #journey-ribbon .journey-gateway .ribbon-readiness { flex-basis: 100% !important; }
}

/* Secondary journey choices remain separate from every attached editor. */
#compact-secondary-controls {
  margin-top: 16px;
  padding: 14px 20px;
  border: 1px solid #b8cbc7;
  border-top: 3px solid #8fa9a3;
  border-radius: 3px;
  background: #edf2f0;
  box-shadow: none;
}
#compact-secondary-controls .compact-shape-heading { color: #365a63; font-weight: 600; }
#compact-refinements-field { border-left-color: #b8cbc7; padding-left: 18px; }
#compact-refinements-field > button {
  padding: 10px 12px;
  border: 1px solid #b8cbc7;
  border-bottom: 2px solid #8fa9a3;
  border-radius: 3px;
  background: #fff;
}
#compact-refinements-field > button:hover { background: #f7faf9; border-color: #648f89; }
#compact-intent-fields #compact-field-stays {
  border-left: 8px solid #fff;
  background: #e8e1f2;
}
#compact-intent-fields #compact-field-stays:hover:not([aria-expanded="true"]) { background: #ddd2ec; }
#compact-intent-fields #compact-field-stays[aria-expanded="true"] { background: #fff; }
#compact-editor-slot .gap-question [data-gap-days]:disabled {
  opacity: 1;
  color: #68716f;
  background: #eef1f0;
  border-color: #d3dad7;
  cursor: not-allowed;
}
#compact-editor-slot .gap-question [data-gap-days]:disabled strong { color: inherit; }
@media (max-width: 720px) {
  #compact-secondary-controls { padding: 14px 12px; }
  #compact-refinements-field { padding-left: 0; border-left: 0; }
  #compact-intent-fields #compact-field-stays { border-left: 0; border-top: 6px solid #fff; }
}

/* Expose compact Shape choices and give Refinements a useful field preview. */
#compact-secondary-controls { gap: 18px; padding: 10px 20px; }
#compact-design-controls { flex: 0 1 360px; min-width: 0; }
#compact-design-controls .compact-shape-heading { margin-bottom: 4px; font-size: 11px; }
#compact-cruise-choices { display: flex; flex-wrap: nowrap; gap: 14px; }
.compact-shape-choice { min-width: 0; }
.compact-shape-choice > span { display: block; margin-bottom: 4px; font-size: 11px; color: #365a63; }
.compact-shape-choice > div { display: flex; gap: 4px; }
#compact-cruise-choices button { min-height: 28px; min-width: 30px; padding: 4px 8px; border: 1px solid #a8c0bb; border-radius: 3px; background: #fff; color: #111; font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
#compact-cruise-choices button:hover { background: #dcebea; border-color: #648f89; }
#compact-cruise-choices button[aria-pressed="true"] { background: #afd6da; border-color: #648f89; box-shadow: inset 0 -2px #648f89; }
#compact-cruise-choices button:focus-visible { outline: 2px solid #07545c; outline-offset: 2px; }
#compact-refinements-field { flex: 1 1 480px; min-width: 0; padding-left: 18px; }
#compact-refinements-field > button { display: flex; flex-direction: column; gap: 4px; min-height: 60px; padding: 6px 12px; background: #afd6da; }
#compact-refinements-field > button:hover:not([aria-expanded="true"]) { background: #9aced3; }
#compact-refinements-field > button[aria-expanded="true"] { background: #fff; }
#compact-refinements-field > button > .compact-field-label { margin: 0; color: #365a63; font-size: 12px; line-height: 16px; }
#compact-refinements-field > button > .compact-field-selection { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0; text-transform: none; letter-spacing: normal; }
#compact-refinements-field .compact-field-selection strong { color: #111; font-size: 12px; font-weight: 400; line-height: 16px; }
#compact-refinements-field .compact-field-chevron { flex: 0 0 24px; width: 24px; height: 21px; fill: none; stroke: var(--deep-ocean); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
#compact-refinements-field > button[aria-expanded="true"] .compact-field-chevron { transform: rotate(180deg); }
@media (max-width: 900px) {
  #compact-secondary-controls { flex-wrap: wrap; gap: 10px; }
  #compact-design-controls { flex-basis: 100%; }
  #compact-refinements-field { flex-basis: 100%; padding: 0; border: 0; }
}
@media (max-width: 720px) {
  #compact-secondary-controls { padding: 10px 12px; }
  #compact-cruise-choices { gap: 10px; flex-wrap: wrap; }
  #compact-cruise-choices button { min-height: 34px; }
}

/* The visualizer now owns its content height. */
#journey-visualizer-placeholder { min-height: 0; pointer-events: none; }
body.results-mode #journey-visualizer-placeholder { display: none; }

/* Equal secondary columns and a lighter blue for cruise-related refinements. */
#compact-secondary-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 0; }
#compact-secondary-controls .compact-shape-heading { font-family: inherit; font-size: 12px; font-weight: 400; line-height: 18px; letter-spacing: .04em; }
#compact-refinements-field { width: 100%; padding-left: 18px; }
#compact-refinements-field > button { background: #dcebf5; border-color: #a7bfce; }
#compact-refinements-field > button:hover:not([aria-expanded="true"]) { background: #cbdfea; border-color: #809dac; }
#compact-cruise-choices button[aria-pressed="true"] { background: #dcebf5; border-color: #809dac; box-shadow: inset 0 -2px #809dac; }
#compact-cruise-choices button:hover { background: #e7f1f7; border-color: #809dac; }
#compact-cruise-choices button[aria-pressed="true"]:hover { background: #cbdfea; }
#compact-refinements-field > button[aria-expanded="true"] { background: #fff; border-bottom-color: var(--green); }
@media (max-width: 900px) {
  #compact-secondary-controls { grid-template-columns: minmax(0,1fr); }
  #compact-refinements-field { padding-left: 0; }
}

/* A short divider distinguishes the two Journey Shape choice groups. */
#compact-cruise-choices { column-gap: 18px; }
#compact-cruise-choices .compact-shape-choice + .compact-shape-choice { position: relative; padding-left: 18px; }
#compact-cruise-choices .compact-shape-choice + .compact-shape-choice::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: #b8cbc7; }
@media (max-width: 720px) {
  #compact-cruise-choices { column-gap: 12px; }
  #compact-cruise-choices .compact-shape-choice + .compact-shape-choice { padding-left: 12px; }
}

/* A quiet required-entry marker; the prompt bar explains what is needed. */
#compact-intent-fields > button > .compact-field-label { gap: 4px; justify-content: flex-start; flex-wrap: wrap; }
#compact-intent-fields .compact-required-badge { flex: 0 0 auto; padding: 0; border: 0; background: none; color: #54747b; font-size: 12px; font-weight: 400; line-height: 18px; text-transform: none; letter-spacing: normal; }

/* Keep shape and connections in the bar, with compact button choices. */
#compact-secondary-controls { display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
#compact-design-controls { flex:0 0 auto; }
#compact-connections-controls { flex:1 1 420px; min-width:0; border-left:1px solid #b8cbc7; padding-left:16px; }
#compact-connections-controls > .compact-shape-heading { display:block; margin-bottom:4px; color:#365a63; font-size:11px; font-weight:400; }
.compact-connection-choices { display:flex; flex-direction:column; gap:7px; }
#compact-transfer-policy { display:flex; gap:4px; }
#compact-transfer-policy button { flex:1; min-width:0; min-height:36px; max-width:125px; }
.compact-gap-row { display:flex; flex-wrap:wrap; align-items:center; gap:5px 10px; }
.compact-gap-row > span { font-size:11px; color:#365a63; }
#compact-connection-days { display:flex; gap:4px; flex-wrap:wrap; }
.compact-connection-choices button { padding:4px 7px; border:1px solid #a8c0bb; border-radius:3px; background:#fff; color:#111; font-family:inherit; font-size:12px; line-height:1.25; cursor:pointer; }
.compact-connection-choices button:hover { background:#e7f1f7; border-color:#809dac; }
.compact-connection-choices button[aria-pressed="true"] { background:#dcebf5; border-color:#809dac; box-shadow:inset 0 -2px #809dac; }
.compact-connection-choices button:disabled { background:#e6ece9; color:#68716f; border-color:#d3dad7; cursor:not-allowed; }
#compact-refinements-field { flex:0 1 210px; min-width:170px; padding-left:16px; }
#compact-refinements-field > button { width:100%; min-height:58px; }
body.compact-designer :is(#compact-editor-slot, #cruise-lines-modal) #matters-panel .connections-section { display:none; }
@media(max-width:1100px) {
  #compact-secondary-controls { gap:14px; }
  #compact-design-controls { flex:1 1 360px; }
  #compact-connections-controls { flex:1 1 420px; }
  #compact-refinements-field { flex:1 1 100%; padding-left:0; border-left:0; }
  #compact-refinements-field > button { min-height:48px; }
}
@media(max-width:720px) {
  #compact-connections-controls { flex-basis:100%; border-left:0; padding-left:0; }
  .compact-connection-choices button { min-height:34px; }
}


/* Cruise lines opens a focused modal instead of another attached bar field. */
#compact-refinements-field { flex:0 1 150px; min-width:135px; padding-left:16px; }
#compact-refinements-field > button { display:inline; width:auto; min-height:28px; margin:0; padding:0; border:0; border-radius:0; background:transparent; color:#07545c; font-family:inherit; font-size:12px; text-decoration:underline; text-underline-offset:3px; box-shadow:none; }
#compact-refinements-field > button:hover:not([aria-expanded="true"]),#compact-refinements-field > button[aria-expanded="true"] { background:transparent; box-shadow:none; }
.compact-lines-summary { display:block; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#526c74; font-size:11px; }
#cruise-lines-modal { width:min(850px,calc(100vw - 48px)); max-height:calc(100dvh - 64px); padding:0; border:1px solid #a7bfce; border-radius:8px; background:#fff; color:#26343c; box-shadow:0 20px 70px #143d4640; }
#cruise-lines-modal::backdrop { background:#143d4666; }
body.compact-designer #cruise-lines-modal #matters-panel { display:block; position:relative; inset:auto; transform:none; width:100%; max-width:none; max-height:none; margin:0; padding:24px 28px; border:0; border-radius:0; box-shadow:none; background:#fff; }
#cruise-lines-modal #matters-title { display:block; margin:0 80px 24px 0; color:#143d46; font-size:20px; }
#cruise-lines-modal #close-matters { display:block; position:absolute; top:18px; right:24px; width:auto; height:auto; padding:6px 12px; border:1px solid #a7bfce; border-radius:3px; background:#fff; color:#07545c; }
#cruise-lines-modal .connections-section,#cruise-lines-modal .sheet-grabber { display:none; }
#cruise-lines-modal #matters-panel .line-browser-heading { display:none; }
@media(max-width:1100px) { #compact-refinements-field { flex:0 1 150px; } }
@media(max-width:720px) { #cruise-lines-modal { width:calc(100vw - 24px); } body.compact-designer #cruise-lines-modal #matters-panel { padding:20px 16px; } }

/* One row of choices: shape, connection policy, then the time allowance. */
#compact-secondary-controls { flex-wrap:nowrap; gap:16px; align-items:flex-end; }
#compact-design-controls { flex:0 0 auto; }
#compact-connections-controls { flex:1 1 360px; }
#compact-connections-controls > .compact-shape-heading { font-size:12px; line-height:18px; }
#compact-transfer-policy button { min-height:28px; }
#compact-time-controls { flex:0 0 170px; border-left:1px solid #b8cbc7; padding-left:16px; }
#compact-time-controls label { display:block; margin-bottom:4px; color:#365a63; font-size:11px; line-height:18px; }
#compact-connection-days { width:100%; min-height:28px; padding:4px 7px; border:1px solid #a8c0bb; border-radius:3px; background:#fff; color:#111; font:inherit; font-size:12px; }
#compact-refinements-field { width:auto; flex:0 1 auto; min-width:0; padding:0; border:0; margin-right:18px; text-align:left; }
#cruise-lines-modal { height:min(680px,calc(100dvh - 64px)); overflow-y:auto; }
@media(max-width:1100px) { #compact-secondary-controls { gap:12px; } #compact-time-controls { flex-basis:145px; padding-left:12px; } #compact-connections-controls { padding-left:12px; } }
@media(max-width:900px) { #compact-secondary-controls { flex-wrap:wrap; } #compact-connections-controls { flex:1 1 360px; } }

/* Two aligned sections, each containing two controls. */
#compact-secondary-controls { align-items:flex-start; }
#compact-connection-group { flex:1 1 auto; min-width:0; padding-left:16px; border-left:1px solid #b8cbc7; }
#compact-secondary-controls .compact-shape-heading { display:block; margin:0 0 4px; font-size:12px; line-height:18px; }
.compact-connection-row { display:flex; gap:18px; align-items:flex-start; }
#compact-connections-controls { flex:1 1 auto; min-width:0; padding:0; border:0; }
.compact-control-label,#compact-time-controls label,#compact-cruise-choices .compact-shape-choice > span { display:block; margin:0 0 4px; font-size:11px; line-height:18px; color:#365a63; }
#compact-time-controls { position:relative; flex:0 0 170px; border:0; padding-left:18px; }
#compact-time-controls::before { content:''; position:absolute; left:0; top:4px; bottom:4px; width:1px; background:#b8cbc7; }
#compact-transfer-policy button,#compact-cruise-choices button,#compact-connection-days { height:30px; min-height:30px; box-sizing:border-box; }
#compact-transfer-policy button { white-space:nowrap; max-width:none; min-width:max-content; }
@media(max-width:1100px) {
  #compact-connection-group { padding-left:12px; }
  .compact-connection-row { gap:12px; }
  #compact-time-controls { flex-basis:130px; padding-left:12px; }
  #compact-transfer-policy button { padding:4px 5px; font-size:11px; }
}
@media(max-width:900px) {
  #compact-connection-group { flex-basis:100%; padding-left:0; border-left:0; }
}
@media(max-width:600px) {
  .compact-connection-row { flex-wrap:wrap; }
  #compact-transfer-policy { flex-wrap:wrap; }
  #compact-transfer-policy button { flex:1 1 auto; }
  #compact-time-controls { padding-left:0; }
  #compact-time-controls::before { display:none; }
}

/* A shared lavender accent links the optional stay to its visualizer node. */
#compact-intent-fields #compact-field-stays[aria-expanded="true"] { background:#f4eff9; border-bottom-color:#8d76aa; }
#compact-intent-fields #compact-field-stays > .compact-field-label { color:#6d5886; }

/* Home handoff keeps the draft hidden until its selections are ready. */
#home-handoff-progress { width:min(100%,1040px); margin:24px auto; padding:0 24px; line-height:1.6; }
