/* The inherited site shell makes <main> a growing flex item. Use explicit
   page classes instead of :has(), so older and embedded mobile browsers keep
   the planner in normal document flow and cannot leave the footer filling the
   viewport. The wide timeline still scrolls inside its own wrapper. */
body.meeting-planner-page {
    height: auto !important;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto !important;
}
body.meeting-planner-page .meeting-planner-main {
    display: block;
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    overflow: visible;
}
.meeting-planner { color: var(--uhr-ink, #17263b); padding-bottom: 30px; min-width: 0; width: 100%; max-width: 100%; overflow: visible; }
body.meeting-planner-page > .abovefooter,
body.meeting-planner-page > footer {
    position: static !important;
    flex: 0 0 auto;
}
.planner-intro { max-width: 850px; margin: 8px 0 24px; }
.planner-intro h1 { margin-bottom: 12px; }
.planner-intro p, .planner-section-heading p, .suggestions-block > p, .planner-copy p { color: var(--uhr-muted, #627087); line-height: 1.65; }
.planner-panel, .planner-results, .planner-copy, .planner-faq { background: #fff; border: 1px solid var(--uhr-line, #d7e0ea); border-radius: 8px; padding: 22px; margin-bottom: 24px; box-shadow: 0 2px 7px rgba(23,38,59,.07); }
.planner-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.planner-section-heading h2, .suggestions-block h2, .planner-copy h2, .planner-faq h2 { font-size: 1.35rem; margin: 0 0 6px; }
.planner-section-heading p { margin: 0; }
.planner-settings-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.planner-settings-grid > *, .city-selector-row > *, .city-selector-row label { min-width: 0; max-width: 100%; }
.planner-settings-grid label, .city-selector-row label { display: grid; gap: 6px; color: #34465d; font-weight: 600; }
.planner-settings-grid input, .planner-settings-grid select, .city-selector-row select { display: block; width: 100%; min-width: 0; max-width: 100%; }
.city-selectors { display: grid; gap: 10px; }
.city-selector-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 12px; background: var(--uhr-surface-soft, #eef4fa); border: 1px solid var(--uhr-line, #d7e0ea); border-radius: 8px; overflow: hidden; }
.city-selector-row .remove-city { min-width: 42px; height: 38px; }
.planner-actions, .result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.planner-actions { margin-top: 16px; }
.live-city-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; margin: 18px 0; }
.live-city-card { border: 1px solid var(--uhr-line, #d7e0ea); border-left: 4px solid var(--uhr-brand, #2463a9); border-radius: 8px; padding: 12px; background: #fff; }
.live-city-card a { font-weight: 700; text-decoration: none; }
.live-city-card time { display: block; font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.live-city-card small { color: var(--uhr-muted, #627087); }
.dst-warnings { margin: 12px 0; }
.dst-warning { background: #fff7e6; border: 1px solid #e8c982; border-left: 4px solid var(--uhr-accent, #d99a2b); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.timeline-key { display: flex; flex-wrap: wrap; gap: 16px; color: var(--uhr-muted, #627087); font-size: .9rem; margin: 16px 0 10px; }
.timeline-key span { display: inline-flex; align-items: center; gap: 6px; }
.key-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1px solid #cbd5df; }
.key-overlap { background: #ccebd9; border-color: #79bd96; }
.key-work { background: #e5eff9; border-color: #a7c5e3; }
.key-off { background: #f3f5f7; }
.timeline-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--uhr-line, #d7e0ea); border-radius: 8px; background: #fff; }
.meeting-timeline { border-collapse: separate; border-spacing: 0; min-width: 1980px; width: 100%; margin: 0; font-size: .82rem; }
.meeting-timeline th, .meeting-timeline td { border-right: 1px solid #e2e8ef; border-bottom: 1px solid #e2e8ef; padding: 8px 5px; text-align: center; min-width: 74px; }
.meeting-timeline thead th { background: #f2f6fa; position: sticky; top: 0; z-index: 2; color: #40536a; }
.meeting-timeline .city-cell { position: sticky; left: 0; z-index: 3; min-width: 190px; max-width: 190px; text-align: left; background: #fff; padding-left: 12px; }
.meeting-timeline thead .city-cell { background: #eaf1f8; z-index: 4; }
.meeting-timeline .city-cell a { display: block; font-weight: 700; text-decoration: none; }
.meeting-timeline .city-cell small { color: var(--uhr-muted, #627087); }
.meeting-timeline .slot-work { background: #e5eff9; }
.meeting-timeline .slot-overlap { background: #ccebd9; color: #174e2e; font-weight: 700; }
.meeting-timeline .slot-off { background: #f7f8fa; color: #7b8794; }
.suggestions-block { margin-top: 24px; }
.meeting-suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.meeting-suggestion { border: 1px solid var(--uhr-line, #d7e0ea); border-radius: 8px; padding: 14px; background: #f8fafc; }
.meeting-suggestion.best { border-color: #79bd96; background: #eef9f2; }
.meeting-suggestion strong { display: block; margin-bottom: 8px; }
.meeting-suggestion ul { list-style: none; padding: 0; margin: 0; }
.meeting-suggestion li { padding: 3px 0; color: #40536a; }
.planner-copy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.planner-copy-grid article { padding-left: 14px; border-left: 3px solid var(--uhr-brand, #2463a9); }
.planner-copy-grid h3 { font-size: 1.05rem; margin: 0 0 8px; }
.planner-copy-grid p { margin: 0; }
.planner-faq details { border-top: 1px solid var(--uhr-line, #d7e0ea); padding: 13px 0; }
.planner-faq details:first-of-type { margin-top: 14px; }
.planner-faq summary { cursor: pointer; font-weight: 700; }
.planner-faq details p { margin: 10px 0 0; color: var(--uhr-muted, #627087); }
.planner-toast { position: fixed; right: 18px; bottom: 18px; z-index: 1100; background: #17263b; color: #fff; padding: 10px 14px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
@media (max-width: 767px) {
    .planner-panel, .planner-results, .planner-copy, .planner-faq { padding: 16px; }
    .planner-settings-grid { grid-template-columns: 1fr; }
    .planner-section-heading { display: block; }
    .result-actions { margin-top: 12px; }
    .planner-copy-grid { grid-template-columns: 1fr; }
    .meeting-timeline .city-cell { min-width: 145px; max-width: 145px; }
}
