/* Command center: styles for the newer weekend components only.
   The palette, backgrounds, glass surfaces and floating pill navigation come from the
   original styles in index.html. Do not redefine :root colours, html/body, .app-shell,
   .page or .bottom-nav here: doing so caused the design regression fixed in this file. */
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: rgb(49, 130, 169) solid 3px; outline-offset: 4px; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
button, .primary-action, .sheet-option { min-height: 44px; }
h1 { font-size: 2rem; line-height: 1.13; letter-spacing: -0.045em; font-weight: 750; }
h2 { font-size: 1.16rem; line-height: 1.3; letter-spacing: -0.025em; }
.gutter { padding-inline: var(--gutter); }
.top-safe, .app-header { padding-top: var(--app-top-safe); }
.app-header { align-items: flex-start; gap: 16px; }
.header-copy { flex: 1 1 0%; min-width: 0px; }
.eyebrow { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.13em; font-weight: 750; line-height: 1.5; }
#homeGreeting { margin-top: 10px; max-width: 350px; }
.profile-button { background: var(--navy); color: white; border: 3px solid white; box-shadow: 0 0 0 1px var(--line); width: 48px; height: 48px; }
.home-context-pill { display: block; background: none; border: 0px; padding: 0px; box-shadow: none; font-size: 0.76rem; color: var(--muted); margin-top: 18px; line-height: 1.6; }
.home-context-pill > span { margin-right: 6px; white-space: normal; }
.race-line { padding: 12px 0px; margin: 14px 0px 0px; border-color: var(--line); font-size: 0.78rem; flex-wrap: wrap; }
.race-line strong { color: var(--red); font-size: 0.8rem; }
.race-line span { font-size: 0.8rem; }
.connection-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0px; font-size: 0.72rem; line-height: 1.5; color: var(--muted); }
.connection-notice strong { display: block; font-weight: 600; color: rgb(40, 104, 76); }
.connection-notice span { display: block; }
.connection-notice button { background: transparent; border: 0px; color: var(--navy); font-size: 0.74rem; font-weight: 650; padding: 8px; flex: 0 0 auto; }
.connection-notice.offline strong { color: rgb(154, 93, 22); }
.section { margin-top: 28px; }
.next-section { margin-top: 10px; }
.section-head { align-items: center; gap: 12px; margin-bottom: 12px; }
.section-head .link { font-size: 0.76rem; min-height: 44px; font-weight: 650; flex-shrink: 0; }
.next-block { display: grid; grid-template-columns: minmax(0px, 1fr) 24px; gap: 12px; width: 100%; padding: 24px; border: 0px; border-radius: 22px; background: var(--navy); color: white; text-align: left; box-shadow: rgba(9, 39, 73, 0.086) 0px 12px 28px; min-width: 0px; }
.next-time { grid-column: 1 / -1; color: rgb(182, 216, 227); font-size: 0.78rem; font-weight: 650; }
.next-time br { display: none; }
.next-time br::after { content: " "; }
.next-copy { min-width: 0px; }
.next-copy strong { color: white; font-size: 1.45rem; line-height: 1.22; font-weight: 650; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.next-copy p { color: rgb(208, 220, 230); font-size: 0.8rem; line-height: 1.5; margin-top: 12px; }
.next-block .chevron { color: rgb(182, 216, 227); align-self: start; font-size: 1.5rem; }
.next-footnote { font-size: 0.68rem; line-height: 1.5; color: var(--muted); margin-top: 10px; }
.weekend-grid { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 10px; }
.weekend-day { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; text-align: left; padding: 16px; background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgb(219, 228, 235); border-radius: 16px; color: var(--navy); min-width: 0px; }
.weekend-day > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; font-size: 0.67rem; letter-spacing: 0.07em; color: var(--muted); }
.weekend-day b { font-size: 1.1rem; color: var(--navy); letter-spacing: -0.02em; }
.weekend-day strong { font-size: 0.86rem; line-height: 1.25; }
.weekend-day small { width: 100%; font-size: 0.7rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.weekend-day.race-day b { color: var(--red); }
.weather-section { border-block: 1px solid var(--line); padding: 20px 0px; }
.weather-section .section-head { margin: 0px; }
.weather-tabs { margin: 4px 0px 12px; gap: 6px; flex-wrap: wrap; overflow: visible; }
.weather-tabs button { min-width: 44px; min-height: 44px; height: auto; padding: 8px 12px; background: transparent; border: 1px solid var(--line); font-size: 0.75rem; }
.weather-tabs button.on { background: var(--navy); color: white; border-color: var(--navy); }
.weather-inline { background: none; border: 0px; border-radius: 0px; box-shadow: none; padding: 4px 0px; margin: 0px; align-items: flex-start; }
.weather-main { min-width: 0px; align-items: flex-start; }
.weather-main > div:last-child { min-width: 0px; }
.weather-main strong { font-size: 1rem; line-height: 1.35; }
.weather-main .meta { font-size: 0.76rem; margin-top: 5px; line-height: 1.6; }
.weather-inline .forecast-date { font-size: 0.74rem; margin-bottom: 5px; }
.data-freshness { font-size: 0.68rem; color: var(--muted); margin-top: 10px; line-height: 1.6; }
#weatherHighLow { display: none; }
.status-list { border-top: 0px; }
.status-row { grid-template-columns: 38px minmax(0px, 1fr) auto; gap: 12px; padding: 12px 0px; min-height: 76px; }
.status-row strong { font-size: 0.88rem; }
.status-row p { font-size: 0.73rem; line-height: 1.4; }
.status-value { font-size: 0.7rem; background: transparent; border: 0px; padding: 0px; color: var(--navy); max-width: 92px; white-space: normal; }
.person-avatar { width: 36px; height: 36px; box-shadow: none; font-size: 0.68rem; }
.home-stay { display: flex; gap: 14px; padding: 15px 0px; border-bottom: 1px solid var(--line); }
.stay-monogram { height: 44px; width: 44px; border-radius: 12px; display: grid; place-items: center; background: rgb(227, 233, 239); color: var(--navy); font: italic 1.5rem Georgia, serif; flex: 0 0 auto; }
.home-stay strong { font-size: 0.86rem; }
.home-stay p, .home-stay span { font-size: 0.75rem; line-height: 1.6; color: var(--muted); }
.home-stay span { display: block; }
.weekend-signoff { margin: 36px 0px 14px; color: var(--muted); font: italic 1rem / 1.6 Georgia, serif; text-align: center; }
.weekend-signoff span { display: block; color: var(--red); letter-spacing: 0.4em; font: 1.25rem / 2 system-ui; }
.plan-header { position: relative; background: var(--canvas); backdrop-filter: none; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.plan-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-title-row > div { flex: 1 1 0%; min-width: 160px; }
.plan-account-label { font-size: 0.76rem; margin-top: 8px; }
.smart-btn { background: white; box-shadow: none; border: 1px solid var(--line); border-radius: 12px; min-height: 44px; padding: 10px 12px; font-size: 0.73rem; width: auto; max-width: 100%; gap: 7px; white-space: normal; }
.smart-btn .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.plan-day-switch { height: auto; padding: 4px; margin-top: 20px; background: rgb(230, 236, 241); border: 0px; box-shadow: none; gap: 2px; }
.plan-day-switch button { min-height: 44px; height: auto; font-size: 0.82rem; padding: 8px 3px; }
.plan-day-switch button.on { background: white; color: var(--navy); box-shadow: rgba(9, 39, 73, 0.03) 0px 2px 4px; }
.plan-summary { padding: 22px 0px 16px; gap: 12px; align-items: start; min-width: 0px; }
.plan-summary h2 { font-size: 1.3rem; }
.plan-summary > span { font-size: 0.74rem; max-width: 130px; line-height: 1.5; }
.plan-summary-note { font-size: 0.76rem; line-height: 1.5; margin-top: 5px; }
.day-origin { background: transparent; border-top: 0px; border-right: 0px; border-left: 0px; border-image: none; border-bottom: 1px solid var(--line); border-radius: 0px; padding: 10px 0px 16px; margin: 0px 0px 12px; box-shadow: none; gap: 12px; }
.day-origin-mark { background: rgb(228, 234, 240); color: var(--navy); border-radius: 12px; width: 44px; height: 44px; flex: 0 0 auto; }
.day-origin span { font-size: 0.64rem; }
.day-origin strong { font-size: 0.88rem; }
.day-origin small { font-size: 0.74rem; line-height: 1.5; }
.day-reminders { display: grid; gap: 8px; margin-bottom: 14px; }
.stay-reminder { margin: 0px; padding: 14px; background: rgb(228, 234, 240); border: 0px; border-radius: 12px; min-width: 0px; }
.stay-reminder strong { font-size: 0.82rem; }
.stay-reminder p { font-size: 0.76rem; line-height: 1.5; }
.timeline { padding: 0px; margin: 0px; }
.plan-item { margin-bottom: 16px; }
.event-swipe { border-radius: 16px; border: 1px solid rgb(218, 227, 234); overflow: hidden; margin: 0px; box-shadow: none; }
.event { display: grid; grid-template-columns: 64px minmax(0px, 1fr); gap: 12px; padding: 16px 14px; border: 0px; margin: 0px; align-items: start; }
.event-time { padding: 3px 0px 0px; font-size: 0.78rem; line-height: 1.5; text-align: left; white-space: normal; color: var(--navy); }
.event-time span { display: block; font-size: 0.6rem; color: var(--muted); font-weight: 500; }
.event-content { min-width: 0px; }
.event-open { width: 100%; border: 0px; background: transparent; text-align: left; padding: 0px; display: block; color: var(--ink); border-radius: 6px; }
.event-title { font-size: 0.98rem; line-height: 1.32; letter-spacing: -0.015em; font-weight: 700; display: block; overflow-wrap: anywhere; }
.event-description { font-size: 0.77rem; color: var(--muted); line-height: 1.5; display: block; margin-top: 6px; }
.event-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0px 0px; }
.event-tag, .reference-tag, .lock-tag { font-size: 0.61rem; line-height: 1.4; white-space: normal; letter-spacing: 0.015em; padding: 4px 7px; border-radius: 6px; background: rgb(235, 240, 244); color: var(--muted); border: 0px; }
.event-tag { color: rgb(139, 69, 71); background: rgb(248, 238, 235); }
.event-more { margin-top: 6px; }
.event-more summary { min-height: 44px; display: flex; justify-content: space-between; align-items: center; font-size: 0.74rem; color: var(--muted); list-style: none; }
.event-more summary span { font-size: 1.2rem; }
.event-more summary::-webkit-details-marker { display: none; }
.event-actions { display: flex; gap: 7px; flex-wrap: wrap; padding: 5px 0px 8px; }
.event-icon-btn, .plan-drag-handle { height: 44px; width: 44px; min-height: 44px; border-radius: 10px; background: rgb(235, 240, 244); border: 0px; box-shadow: none; flex: 0 0 auto; }
.event-text-btn { min-height: 44px; border: 0px; border-radius: 10px; background: rgb(235, 240, 244); color: var(--navy); font-size: 0.74rem; padding: 8px 12px; }
.event-text-btn.danger { background: rgb(251, 239, 236); color: rgb(163, 50, 60); }
.travel-leg { margin: 8px 0px 14px; padding: 12px 14px; background: transparent; border: 1px dashed rgb(190, 205, 219); border-radius: 12px; box-shadow: none; min-width: 0px; }
.travel-leg summary { list-style: none; min-height: 44px; cursor: pointer; }
.travel-leg summary::-webkit-details-marker { display: none; }
.travel-leg-top { margin: 0px; display: flex; align-items: start; justify-content: space-between; gap: 12px; font-size: 0.74rem; line-height: 1.5; }
.travel-leg-top span { min-width: 0px; flex: 1 1 0%; }
.travel-leg-top b { max-width: 50%; font-size: 0.74rem; color: var(--navy); line-height: 1.5; white-space: normal; }
.leave-by-row { margin: 7px 0px 0px; font-size: 0.74rem; line-height: 1.5; color: var(--muted); font-weight: 550; }
.leave-by-row.tight { color: rgb(163, 59, 49); }
.leave-by-row.ok { color: rgb(40, 104, 76); }
.mode-picker { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 5px; }
.mode-picker button { height: auto; min-height: 44px; white-space: normal; font-size: 0.73rem; padding: 8px 4px; border-radius: 8px; box-shadow: none; }
.origin-leg { margin: 0px 0px 20px; }
.origin-leg .travel-leg-top { margin-left: 0px; }
.map-page { background: rgb(230, 239, 239); overflow: hidden; padding-bottom: 0px; }
.map-ui-top { padding-top: var(--app-top-safe); }
.map-title-row h1 { font-size: 1.8rem; }
.day-switch { min-height: 52px; height: auto; background: rgba(255, 255, 255, 0.95); padding: 4px; box-shadow: rgba(9, 39, 73, 0.05) 0px 4px 15px; }
.day-switch button { min-height: 44px; font-size: 0.78rem; }
.map-search { min-height: 48px; height: auto; padding: 12px 14px; }
.map-search span { font-size: 0.8rem; white-space: normal; }
.map-category-row { padding-top: 10px; }
.category-chip { min-height: 44px; height: auto; font-size: 0.75rem; padding: 9px 12px; }
.map-locate { top: auto; bottom: calc(108px + env(safe-area-inset-bottom)); width: 48px; height: 48px; right: 22px; }
.race-layer-status { top: auto; bottom: calc(112px + env(safe-area-inset-bottom)); left: 22px; right: 82px; flex-wrap: wrap; }
.race-layer-status span { font-size: 0.68rem; white-space: normal; }
.backdrop { background: rgba(7, 23, 43, 0.396); backdrop-filter: blur(4px); padding-top: max(18px,env(safe-area-inset-top)); align-items: flex-end; }
.sheet { width: 100%; max-width: 540px; border-radius: 24px 24px 0px 0px; border: 0px; box-shadow: rgba(7, 23, 43, 0.125) 0px -10px 40px; padding: 10px 22px calc(28px + env(safe-area-inset-bottom)); max-height: calc(100dvh - max(18px,env(safe-area-inset-top))); overflow: hidden auto; min-width: 0px; }
.sheet-head { position: sticky; top: -10px; background: white; padding: 14px 0px; z-index: 6; align-items: flex-start; }
.sheet-head > div { min-width: 0px; }
.sheet-head h2 { font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
.sheet-subtitle { font-size: 0.8rem; line-height: 1.5; }
.close-btn { height: 44px; width: 44px; min-width: 44px; min-height: 44px; border: 0px; box-shadow: none; background: rgb(235, 240, 244); flex: 0 0 auto; }
.sheet label { font-size: 0.82rem; line-height: 1.5; }
.sheet input, .sheet select, .sheet textarea { font-size: 1rem; min-height: 48px; max-width: 100%; min-width: 0px; }
.sheet p, .sheet-option p { line-height: 1.5; }
.primary-action { border: 0px; border-radius: 12px; min-height: 48px; height: auto; padding: 13px 18px; white-space: normal; background: var(--navy); color: white; font-size: 0.87rem; box-shadow: none; }
.place-preview-actions, .place-preview-manage { display: flex; flex-wrap: wrap; gap: 8px; }
.place-preview-actions > * { flex: 1 1 0%; min-width: 90px; }
.place-preview-manage button { min-height: 44px; font-size: 0.78rem; white-space: normal; }
.place-preview-context p, .place-hours p, .place-review p { font-size: 0.8rem; }
.preview-info-card strong { font-size: 0.84rem; }
.place-google-summary span { font-size: 0.76rem; }
.place-preview-meta { font-size: 0.82rem; line-height: 1.5; }
.google-result-actions button { min-height: 44px; height: auto; font-size: 0.75rem; }
.google-result-meta { font-size: 0.76rem; }
.google-result-title strong { font-size: 0.93rem; }
.place-preview-gallery { scroll-snap-type: x mandatory; }
.place-preview-photo { scroll-snap-align: start; }
.track-page h1 { font-size: 2rem; }
.follow-chip { min-height: 44px; height: auto; font-size: 0.8rem; }
.runner-card-head { gap: 12px; flex-wrap: wrap; }
.official { font-size: 0.6rem; }
.runner-stats { flex-wrap: wrap; gap: 15px; }
.stat strong { font-size: 1rem; }
.stat small { font-size: 0.72rem; }
.track-toggle button { min-height: 44px; }
.context-block p { font-size: 0.82rem; line-height: 1.5; }
.settings-row { min-width: 0px; }
.settings-row p { font-size: 0.78rem; line-height: 1.5; }
.race-hero { padding-bottom: 20px; }
.race-truth { padding: 15px; background: rgb(230, 236, 241); border-radius: 14px; color: rgb(43, 77, 63); font-size: 0.8rem; line-height: 1.55; margin-bottom: 20px; }
.race-truth p { margin-top: 5px; }
.race-next { padding: 24px; border-radius: 20px; background: var(--navy); color: white; margin-bottom: 15px; }
.race-next h2 { color: white; font-size: 1.55rem; margin-top: 8px; }
.race-next .eyebrow { color: rgb(187, 215, 223); }
.race-next p { font-size: 0.85rem; color: rgb(216, 227, 236); line-height: 1.5; margin-top: 10px; }
.race-next .primary-action { background: white; color: var(--navy); width: 100%; margin-top: 20px; }
.race-actions { gap: 10px; flex-wrap: wrap; }
.race-actions button { min-height: 48px; white-space: normal; font-size: 0.83rem; }
.reunite { margin: 24px 0px; line-height: 1.6; }
.empty-state { padding: 20px 0px; font-size: 0.84rem; color: var(--muted); line-height: 1.6; }
.empty-state h2 { margin-bottom: 10px; }
.empty-state button { margin-top: 18px; }
.spectator-plan { background: transparent; border: 0px; padding: 0px; margin-bottom: 24px; }
.spectator-plan-head { flex-wrap: wrap; }
.spectator-plan-head p { max-width: none; font-size: 0.8rem; }
.spectator-stop { padding: 16px 12px; background: rgba(255, 255, 255, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 14px; gap: 10px; }
.spectator-stop-copy { min-width: 0px; }
.spectator-stop-copy p, .spectator-stop-copy small { font-size: 0.78rem; line-height: 1.5; }
.spectator-stop-top { flex-wrap: wrap; }
.spectator-stop-top strong { font-size: 0.9rem; }
.spectator-stop-top span { font-size: 0.72rem; }
.spectator-stop-actions button { min-height: 44px; height: auto; font-size: 0.72rem; }
.spectator-route, .spectator-flex-window { margin-left: 0px; font-size: 0.78rem; flex-wrap: wrap; }
.spectator-route b { font-size: 0.78rem; }
.spectator-flex-window strong, .spectator-flex-window span { font-size: 0.75rem; line-height: 1.5; }
.spectator-flex-window button { min-height: 44px; height: auto; font-size: 0.73rem; }
.tiny-btn { min-height: 44px; font-size: 0.76rem; }
.auth-gate { background: var(--canvas); }
.auth-panel, .auth-card { box-shadow: var(--shadow-float); }
.sync-badge { top: 8px; right: 12px; font-size: 0.7rem; border: 1px solid var(--line); box-shadow: none; }
.toast { font-size: 0.85rem; line-height: 1.4; max-width: calc(100% - 32px); white-space: normal; }
@media (max-width: 360px) {
  .event { grid-template-columns: 54px minmax(0px, 1fr); gap: 10px; padding: 14px 12px; }
  .next-block { padding: 20px; }
  .weekend-day { padding: 13px; }
  .status-row { grid-template-columns: 34px minmax(0px, 1fr); gap: 10px; }
  .status-row > .status-value { grid-column: 2; justify-self: start; max-width: none; }
  .plan-summary { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: auto ease 0s 1 normal none running none !important; transition: none !important; scroll-behavior: auto !important; }
}
.event::after { display: none !important; }

/* Keep sheet headers on the glass surface instead of an opaque white box. */
.sheet-head { margin-inline: -22px; padding-inline: 22px; background: rgba(248, 251, 255, 0.97); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.place-preview-top { background: transparent; }
/* Photo gallery respects the page gutter when it snaps. */
.place-preview-gallery { scroll-padding-inline: var(--gutter); }
/* Race day card uses the brand red tint rather than green. */
.weekend-day.race-day { background: rgba(227, 24, 55, 0.05); border-color: rgba(227, 24, 55, 0.2); }
/* Swipe-to-delete: the red Delete action stays hidden until a plan item is swiped open. */
.swipe-delete { opacity: 0; }
.event-swipe.open .swipe-delete { opacity: 1; }
/* Design pass: one cool palette tinted with Chicago-flag blue (the greenish and beige greys are gone),
   sentence-case labels instead of tracked capitals, and solid travel blocks instead of dashed ones. */
.app-shell .eyebrow, .follow-label, .editor-field label, .place-preview-badge, .evlib-day { text-transform: none; letter-spacing: 0; }
.app-shell .eyebrow { font-size: 0.82rem; font-weight: 650; }
.evlib-day { font-size: 1rem; font-weight: 780; color: var(--navy); margin: 20px 0 10px; }
.travel-leg { border-style: solid; background: rgba(179, 221, 242, 0.16); }
/* Event editor and sheets: solid enough to read over a busy page, and one full-width primary action. */
.sheet { background: rgba(248, 251, 255, 0.96); }
.editor-actions { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 8px; margin-top: 18px; }
.editor-actions .save { width: 100%; min-height: 50px; }
.editor-actions .delete { width: 100%; min-height: 44px; background: transparent; border: 0px; box-shadow: none; color: var(--red); font-weight: 700; }
/* Calmer surfaces: flat page background (no colour glow), two tiers of pill buttons (solid navy, soft tint),
   and lighter card outlines without drop shadows. */
.app-shell .page { background: transparent !important; }
.smart-btn { border: 0px; box-shadow: none; background: rgba(1, 33, 105, 0.07); }
.google-result-actions .quick-save, .evlib-link { border: 0px; background: rgba(1, 33, 105, 0.07); }
.evlib-link.quiet { background: transparent; }
.evlib-card, .weekend-day, .spectator-stop { border-color: rgba(1, 33, 105, 0.08); box-shadow: none; }
/* Plan as a timeline: time on the left, a dot on a thin rail, the event on the right. Travel between
   events is one slim line that opens to change walk / transit / car. */
#planTimeline .plan-item { position: relative; margin: 0px; }
#planTimeline .plan-item::before { content: ""; position: absolute; left: 77px; top: 0px; bottom: 0px; width: 2px; border-radius: 2px; background: rgba(1, 33, 105, 0.14); }
#planTimeline .plan-item:first-child::before { top: 24px; }
#planTimeline .plan-item:last-child::before { bottom: auto; height: 24px; }
#planTimeline .plan-item:only-child::before { display: none; }
#planTimeline .event-swipe { border: 0px; border-radius: 0px; background: transparent; box-shadow: none; margin: 0px; }
#planTimeline .event-swipe-content { background: transparent; border: 0px; border-radius: 0px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
#planTimeline .event { position: relative; grid-template-columns: 64px minmax(0px, 1fr); column-gap: 30px; padding: 14px 0px; background: transparent; }
#planTimeline .event::before { content: ""; position: absolute; left: 72px; top: 19px; width: 12px; height: 12px; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 4px rgb(241, 245, 250); }
#planTimeline .event-reference .event::before { background: rgb(241, 245, 250); border: 2px solid rgba(1, 33, 105, 0.4); width: 8px; height: 8px; }
#planTimeline .event-time { text-align: right; }
#planTimeline .travel-leg { position: relative; margin: 0px; padding: 0px 0px 12px 94px; border: 0px; border-radius: 0px; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
#planTimeline .travel-leg summary { display: grid; grid-template-columns: minmax(0px, 1fr) auto; gap: 2px 10px; align-items: start; font-size: 0.8rem; line-height: 1.4; color: var(--muted); cursor: pointer; list-style: none; }
#planTimeline .travel-leg-top { display: contents; }
#planTimeline .travel-leg-top span { display: none; }
#planTimeline .travel-leg-top b { font-weight: 600; color: var(--muted); }
#planTimeline .travel-leg summary:has(.leave-by-row:not(:empty)) .travel-leg-top b { display: none; }
#planTimeline .travel-leg .leave-by-row { border: 0px; padding: 0px; margin: 0px; background: transparent; font-size: 0.8rem; font-weight: 600; }
#planTimeline .travel-leg summary::after { content: "Change"; color: var(--navy); font-weight: 650; }
#planTimeline .travel-leg[open] summary::after { content: "Done"; }
#planTimeline .travel-leg .mode-picker { margin-top: 8px; }
.plan-add-day { width: 100%; min-height: 48px; margin: 14px 0px 4px; border: 0px; border-radius: 16px; background: rgba(1, 33, 105, 0.07); color: var(--navy); font-weight: 700; font-size: 0.92rem; }
/* Home: the answer first. Up next sits right under the greeting; status and extras move down. */
#page-home .home-intro { display: flex; flex-direction: column; }
#page-home .home-intro > * { order: 5; }
#page-home .app-header { order: 0; }
#page-home .home-context-pill { display: none; }
#page-home .race-line { order: 1; border: 0px; padding: 0px; margin-top: 8px; }
#page-home .next-section { order: 2; margin-top: 18px; }
#page-home .home-intro > .section:nth-child(6) { order: 3; }
#page-home .weather-section { order: 5; }
#page-home .stay-section { order: 6; }
#page-home #connectionNotice { order: 7; margin-top: 22px; padding: 10px 0px; border-width: 1px 0px 0px; font-size: 0.8rem; }
#page-home .weekend-signoff { order: 8; }
#page-home #homeGreeting { font-size: 1.75rem; }
.weekend-day small { display: block; line-height: 1.35; }
.weekend-day small i { font-style: normal; opacity: 0.7; white-space: nowrap; }
/* Plan rows: a fixed time is the normal case, so only the exceptions get a tag. */
#planTimeline .lock-tag { display: none; }
/* Share chips in the event editor. */
.share-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.share-chips button { min-height: 40px; padding: 0px 14px; border-radius: 999px; border: 0px; background: rgba(1, 33, 105, 0.07); color: var(--navy); font-weight: 700; font-size: 0.84rem; }
.share-chips button.on { background: var(--navy); color: white; }
/* Plan rows: the Manage line becomes a single "more" button beside the title. */
#planTimeline .event-content { position: relative; }
#planTimeline .event-open { padding-right: 40px; }
#planTimeline .event-more { margin: 0px; }
#planTimeline .event-more > summary { position: absolute; top: -8px; right: -8px; width: 44px; height: 44px; min-height: 0px; padding: 0px; display: flex; align-items: center; justify-content: center; font-size: 0px; border: 0px; background: transparent; }
#planTimeline .event-more > summary span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(1, 33, 105, 0.07); color: var(--navy); font-size: 1rem; line-height: 1; }
#planTimeline .event-more[open] > summary span { background: var(--navy); color: white; }
#planTimeline .event-more[open] .event-actions { margin-top: 10px; }
/* Event editor on iPhone: Safari gives time fields a built-in minimum width, which pushed Time over Type.
   Let both columns shrink, and make the two fields the same height. */
.editor-grid { grid-template-columns: minmax(0px, 1fr) minmax(0px, 1fr); }
.editor-field { min-width: 0px; }
.editor-field input, .editor-field select, .editor-field textarea { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0px; }
.editor-field input, .editor-field select { height: 50px; }
.editor-field input[type="time"] { -webkit-appearance: none; appearance: none; display: block; }
.editor-field input[type="time"]::-webkit-date-and-time-value { text-align: left; }
/* Less empty space above the header: sit just below the iPhone camera area instead of well under it. */
.app-shell { --app-top-safe: max(24px, calc(env(safe-area-inset-top) + 10px)); }
/* Event details sheet: when it is and who runs it, above the venue details. */
.place-preview-event { margin: 12px 22px 0px; padding: 12px 14px; border-radius: 14px; background: rgba(179, 221, 242, 0.24); }
.place-preview-event[hidden] { display: none; }
.place-preview-event strong { display: block; font-size: 0.98rem; line-height: 1.3; color: var(--navy); }
.place-preview-event span { display: block; font-size: 0.84rem; color: var(--muted); margin-top: 3px; }
.place-preview-event a { display: inline-flex; align-items: center; min-height: 40px; margin-top: 10px; padding: 0px 16px; border-radius: 999px; background: var(--navy); color: white; font-weight: 750; font-size: 0.86rem; text-decoration: none; }
/* First screen: who are you. A full page with one row per person instead of a small card. */
.auth-gate:has(#viewerStage:not(.hidden)) { align-items: flex-start; }
.auth-card:has(#viewerStage:not(.hidden)) { width: min(100%, 430px); margin: 0px auto; padding: max(48px, calc(env(safe-area-inset-top) + 28px)) 22px 28px; background: transparent; border: 0px; border-radius: 0px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.viewer-stage::before { content: "\2736  \2736  \2736  \2736"; display: block; color: var(--red); font-size: 1.5rem; letter-spacing: 0.1em; margin-bottom: 18px; }
.viewer-stage .auth-mark { font-size: 0.86rem; font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--muted); }
.viewer-stage .auth-mark .live-dot { display: none; }
.viewer-stage h1 { font-size: 2.3rem; line-height: 1.05; letter-spacing: -0.045em; margin: 6px 0px 8px; color: var(--navy); }
.viewer-stage #authCopy { font-size: 1rem; line-height: 1.45; color: var(--muted); margin-bottom: 26px; }
.claim-grid { display: grid; grid-template-columns: minmax(0px, 1fr); gap: 10px; }
.claim-card { display: grid; grid-template-columns: 48px minmax(0px, 1fr) 20px; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; width: 100%; min-height: 76px; padding: 14px 16px; border-radius: 20px; border: 1px solid rgba(1, 33, 105, 0.08); background: rgba(255, 255, 255, 0.78); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: none; }
.claim-card::before { content: ""; grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: white; font-weight: 800; font-size: 1rem; }
.claim-card[data-viewer="ethan"]::before { content: "E"; }
.claim-card[data-viewer="jaay"]::before { content: "J"; background: var(--red); }
.claim-card[data-viewer="parents"]::before { content: "EP"; background: rgb(91, 108, 139); }
.claim-card[data-viewer="maya"]::before { content: "M"; background: rgb(91, 108, 139); }
.claim-card::after { content: "\203A"; grid-column: 3; grid-row: 1 / span 2; font-size: 1.6rem; color: var(--muted); text-align: right; }
.claim-card strong { grid-column: 2; align-self: end; font-size: 1.08rem; line-height: 1.2; color: var(--ink); }
.claim-card span { grid-column: 2; align-self: start; font-size: 0.86rem; color: var(--muted); margin-top: 2px; }
.claim-card:active { transform: scale(0.985); background: white; }
.viewer-stage .auth-msg { margin-top: 18px; text-align: center; font-size: 0.8rem; color: var(--muted); }
/* Loading: one calm line, no placeholder avatar. */
.loading-person { display: none; }
/* Home sign-off is just the four stars now. */
.weekend-signoff { text-align: center; }
/* Race-day legs between cheer stops: choose walk, transit or drive. */
.spectator-route { flex-wrap: wrap; row-gap: 8px; }
.spec-modes { order: 3; flex: 0 0 100%; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(1, 33, 105, 0.07); }
.spec-modes button { flex: 1 1 0px; min-height: 32px; padding: 0px 8px; border: 0px; border-radius: 999px; background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.spec-modes button.on { background: white; color: var(--navy); box-shadow: rgba(1, 33, 105, 0.14) 0px 1px 3px; }
/* Runner stat values stay on one line (a goal like 4:20–4:30 used to wrap). */
.runner-stats .stat strong { font-size: 0.9rem; white-space: nowrap; }
/* Follow switches: tracking and travel side by side, four even buttons, no empty space on the right. */
.follow-groups { display: grid; grid-template-columns: minmax(0px, 1fr) minmax(0px, 1fr); gap: 14px; align-items: start; }
.follow-groups .follow-label { margin-bottom: 8px; }
.follow-groups .follow-chips { display: grid; grid-template-columns: minmax(0px, 1fr) minmax(0px, 1fr); gap: 6px; }
.follow-groups .follow-chip { width: 100%; min-height: 40px; padding: 0px 8px; justify-content: center; border-radius: 12px; border: 1px solid transparent; background: rgba(1, 33, 105, 0.06); color: var(--muted); font-size: 0.86rem; box-shadow: none; }
.follow-groups .follow-chip.on { background: var(--navy); color: white; }
/* Text fields show focus as a soft ring on the field itself, not a hard box around the text inside it. */
body input:focus-visible, body textarea:focus-visible, body select:focus-visible { outline: none; border-color: rgba(49, 130, 169, 0.75); box-shadow: rgba(49, 130, 169, 0.2) 0px 0px 0px 3px; }
#addBackdrop .search-field { box-shadow: none; }
.search-field input:focus-visible { border: 0px; box-shadow: none; }
#addBackdrop .search-field:focus-within { border-color: rgba(49, 130, 169, 0.75); box-shadow: rgba(49, 130, 169, 0.2) 0px 0px 0px 3px; }
/* The row under the search bar was drawing the browser default button border as a dark line. */
button.sheet-option { border-top: 0px; border-left: 0px; border-right: 0px; }
.google-search-results:empty { display: none; }
/* Map: the short list shown when a grouped pin holds several things at one spot. */
.pin-chooser { display: grid; gap: 6px; min-width: 190px; padding: 2px 2px 4px; }
.pin-chooser button { min-height: 42px; padding: 0px 12px; border: 0px; border-radius: 12px; background: rgb(238, 242, 250); color: var(--navy); font-size: 0.875rem; font-weight: 600; text-align: left; }
