/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #003087;
  --blue-mid:   #0052CC;
  --gold:       #C8960C;
  --matt:       #1D4ED8;
  --sister:     #7C3AED;
  --bg:         #F0F0EC;
  --surface:    #FFFFFF;
  --border:     #E2E2DA;
  --text:       #111110;
  --muted:      #696965;
  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 1px 3px rgba(0,0,0,0.10);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.12);
  --header-h:   52px;
  font-size: 15px;
}

html, body { height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }

button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
.is-hidden { display: none !important; }

/* ── Wizard ─────────────────────────────────────────────────── */
.wizard-shell {
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 80px;
  background: var(--bg);
}

.wizard-card {
  width: 100%;
  max-width: 680px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.wizard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.wizard-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}


.wizard-body { padding: 28px 24px 12px; min-height: 320px; }

.wizard-body h1 { font-size: 26px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }

.wizard-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }

/* Step 1 – sport grid */
.wizard-sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding: 2px;
}

.wizard-sport-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 8px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  background: var(--surface);
  transition: border-color 0.1s, background 0.1s;
  user-select: none;
}
.wizard-sport-card:hover { border-color: var(--blue-mid); }
.wizard-sport-card.is-on { border-color: var(--blue); background: #EEF3FF; }

.wsc-emoji { font-size: 26px; line-height: 1; }
.wsc-name  { font-size: 12px; font-weight: 500; line-height: 1.25; }
.wsc-count { font-size: 11px; color: var(--muted); }

/* Step 2 – preference options */
.wizard-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.wizard-opt-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.1s, background 0.1s;
  user-select: none;
}
.wizard-opt-card:hover { border-color: var(--blue-mid); }
.wizard-opt-card.is-on { border-color: var(--blue); background: #EEF3FF; }

.woc-icon  { font-size: 30px; }
.woc-title { font-size: 15px; font-weight: 600; }
.woc-desc  { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Step 3 – party sizes */
.wizard-crew { display: flex; flex-direction: column; gap: 12px; }

.wizard-crew-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.wcr-label { font-size: 15px; font-weight: 500; }

.stepper { display: flex; align-items: center; gap: 14px; }

.stepper-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.stepper-btn:hover { background: var(--border); }

.stepper-val { font-size: 20px; font-weight: 600; min-width: 28px; text-align: center; }

/* Wizard nav */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.wizard-back-btn { font-size: 14px; color: var(--muted); padding: 8px 0; }
.wizard-back-btn:disabled { opacity: 0.3; pointer-events: none; }

.wizard-next-btn {
  padding: 11px 22px;
  background: var(--blue);
  color: #FFF;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.1s, opacity 0.1s;
}
.wizard-next-btn:hover { background: var(--blue-mid); }
.wizard-next-btn:disabled { opacity: 0.4; pointer-events: none; }

/* ── Dashboard ──────────────────────────────────────────────── */
.dash-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.dash-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dash-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.dash-brand-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
}

.dash-prefs-btn { font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

.dash-budget { flex: 1; display: flex; align-items: center; justify-content: center; gap: 24px; }

.budget-person { display: flex; align-items: center; gap: 7px; font-size: 13px; }

.budget-name { font-weight: 600; }

.budget-track { width: 72px; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }

.budget-fill { height: 100%; border-radius: 3px; transition: width 0.2s; }
.budget-fill.is-matt   { background: var(--matt); }
.budget-fill.is-sister { background: var(--sister); }
.budget-fill.is-over   { background: #DC2626; }

.budget-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.dash-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.meta-sep { opacity: 0.35; }

/* ── Dashboard body ─────────────────────────────────────────── */
.dash-body { flex: 1; display: flex; overflow: hidden; }

.dash-sessions {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.session-filters {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-search {
  width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg);
  outline: none;
  transition: border-color 0.1s, background 0.1s;
}
.session-search:focus { border-color: var(--blue-mid); background: var(--surface); }

.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.filter-select { padding: 4px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; background: var(--surface); outline: none; }

.filter-check { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }

.session-list { flex: 1; overflow-y: auto; padding: 6px; }

/* Session rows */
.session-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 9px 10px;
  border-radius: var(--radius);
  margin-bottom: 3px;
  background: var(--surface);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.1s, box-shadow 0.1s;
}
.session-row:hover { border-color: var(--border); box-shadow: var(--shadow); }
.session-row.is-shortlisted { background: #F0F5FF; border-color: #C8D9FF; }

.srow-info  { min-width: 0; }
.srow-sport { font-size: 11px; color: var(--muted); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow-title { font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.srow-meta  { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.stag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.stag.is-medal  { background: #FFF3CC; color: #7A5800; font-weight: 600; }
.stag.is-matt   { background: #DBEAFE; color: var(--matt); font-weight: 600; }
.stag.is-sister { background: #EDE9FE; color: var(--sister); font-weight: 600; }
.stag.is-sib-ranked { background: #DBEAFE; color: var(--blue-mid); }
.stag.is-zone  { background: var(--bg); color: var(--muted); }
.stag.is-away  { background: #FEE2E2; color: #991B1B; font-weight: 600; }

.srow-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; padding-top: 2px; }

.acct-btn { padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; transition: background 0.1s; }
.acct-btn.is-matt    { background: #DBEAFE; color: var(--matt); }
.acct-btn.is-matt:hover    { background: #BFDBFE; }
.acct-btn.is-sister  { background: #EDE9FE; color: var(--sister); }
.acct-btn.is-sister:hover  { background: #DDD6FE; }
.acct-btn.is-remove  { background: var(--bg); color: var(--muted); }
.acct-btn.is-remove:hover  { background: #FEE2E2; color: #B91C1C; }

.srow-detail { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); line-height: 1.5; }

.empty-state { padding: 48px 20px; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── Right panel ────────────────────────────────────────────── */
.dash-panel {
  width: 380px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}

.panel-tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 6px; flex-shrink: 0; }

.panel-tab { padding: 11px 12px; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; transition: color 0.1s, border-color 0.1s; white-space: nowrap; }
.panel-tab:hover { color: var(--text); }
.panel-tab.is-active { color: var(--blue); border-bottom-color: var(--blue); }

.panel-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; position: relative; }

/* Map sub-panel */
.map-subpanel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.map-mode-bar { display: flex; gap: 4px; padding: 8px; background: var(--bg); border-bottom: 1px solid var(--border); flex-shrink: 0; }

.mode-button { padding: 5px 11px; border-radius: var(--radius-sm); font-size: 12px; color: var(--muted); transition: background 0.1s, color 0.1s; }
.mode-button.is-active { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: var(--shadow); }

.map-stack { flex: 1; position: relative; overflow: hidden; }
.map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.map-overlay { position: absolute; bottom: 10px; left: 10px; right: 10px; z-index: 10; pointer-events: none; }

.overlay-card { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-md); pointer-events: auto; }
.overlay-card h3   { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.subtle-copy       { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.overlay-metrics   { display: flex; flex-wrap: wrap; gap: 4px; }
.metric-chip       { font-size: 11px; padding: 2px 6px; background: var(--bg); border-radius: 4px; color: var(--muted); }
.hero-tagline      { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.4; }
.eyebrow           { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }

.mapkit-config { position: absolute; inset: 0; background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; z-index: 20; }
.mapkit-config h3 { font-size: 15px; }
.mapkit-config p  { font-size: 13px; color: var(--muted); line-height: 1.5; }
.mini-note        { font-size: 11px; color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.field span { font-weight: 500; }
.field textarea { padding: 7px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; resize: vertical; }

.config-actions { display: flex; gap: 8px; }
.action-button { padding: 7px 14px; background: var(--blue); color: #FFF; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.ghost-button  { padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--muted); }

/* Planner SVG */
.planner-svg   { width: 100%; height: 100%; display: block; }
.planner-water { fill: #E4EFF8; }
.planner-land  { fill: #F5F4EF; stroke: #CCC; stroke-width: 1; }
.planner-route { fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: 0.4; }
.planner-marker circle { transition: r 0.1s; }
.planner-marker text   { font-size: 11px; fill: #444; font-family: inherit; pointer-events: none; }
.planner-marker.is-selected circle { stroke: #FFF; stroke-width: 2; }
.planner-marker.is-muted { opacity: 0.25; }
.zone-label { font-size: 12px; fill: #999; font-family: inherit; font-weight: 500; pointer-events: none; }

/* Panel content */
.panel-content { flex: 1; overflow-y: auto; }

/* ── Shortlist panel ────────────────────────────────────────── */
.shortlist-empty { padding: 40px 20px; text-align: center; font-size: 13px; color: var(--muted); line-height: 1.7; }

.shortlist-group { padding: 0 12px 4px; }

.shortlist-group-header { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.shortlist-group-header.is-matt   { color: var(--matt); }
.shortlist-group-header.is-sister { color: var(--sister); }

.shortlist-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.si-info  { flex: 1; min-width: 0; }
.si-title { font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.si-meta  { font-size: 11px; color: var(--muted); }
.si-remove { font-size: 16px; color: var(--border); flex-shrink: 0; line-height: 1; padding: 1px 3px; transition: color 0.1s; }
.si-remove:hover { color: #B91C1C; }

/* ── Itinerary panel ────────────────────────────────────────── */
.itin-controls { padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg); display: flex; align-items: center; gap: 8px; font-size: 13px; flex-shrink: 0; }
.itin-controls label  { color: var(--muted); font-size: 12px; }
.itin-controls select { padding: 4px 7px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; }

.hotel-card { margin: 10px 14px; padding: 10px 12px; background: #FFF8E6; border-radius: var(--radius); border: 1px solid #F0D080; font-size: 12px; color: var(--muted); line-height: 1.5; }
.hotel-card strong { color: var(--text); }
.hotel-switch-btn { display: inline-block; margin-top: 7px; padding: 4px 11px; background: var(--blue); color: #FFF; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; cursor: pointer; }

.itin-day { border-bottom: 1px solid var(--border); }
.itin-day-header { display: flex; align-items: baseline; gap: 8px; padding: 9px 14px; background: var(--bg); }
.itin-day-label  { font-size: 13px; font-weight: 600; }
.itin-day-count  { font-size: 11px; color: var(--muted); }

.itin-session { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.itin-time   { font-size: 11px; color: var(--muted); padding-top: 2px; }
.itin-info   { min-width: 0; }
.itin-title  { font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.itin-venue  { font-size: 11px; color: var(--muted); }
.itin-actions { display: flex; flex-direction: column; gap: 4px; }
.itin-assign  { font-size: 11px; padding: 3px 5px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.itin-remove  { font-size: 11px; color: var(--muted); text-decoration: underline; text-align: right; }

.conflict-flag { margin: 2px 14px 6px; padding: 5px 9px; background: #FEF3C7; border-left: 3px solid #F59E0B; border-radius: 0 5px 5px 0; font-size: 11px; color: #78350F; }

.notes-area { padding: 12px 14px; border-top: 1px solid var(--border); }
.notes-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }
.notes-textarea { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; resize: vertical; background: var(--bg); outline: none; }
.notes-textarea:focus { border-color: var(--blue-mid); }

/* ── Buy panel ──────────────────────────────────────────────── */
.buy-actions { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.buy-actions button { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; color: var(--muted); transition: background 0.1s; }
.buy-actions button:hover { background: var(--bg); }

.buy-group { padding: 0 14px 8px; }
.buy-group-header { padding: 11px 0 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.buy-group-header.is-matt   { color: var(--matt); }
.buy-group-header.is-sister { color: var(--sister); }

.buy-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.buy-check { flex-shrink: 0; margin-top: 2px; cursor: pointer; accent-color: var(--blue); }
.buy-info  { flex: 1; min-width: 0; }
.buy-title { font-size: 13px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.buy-meta  { font-size: 11px; color: var(--muted); }
.buy-count { font-size: 12px; color: var(--muted); flex-shrink: 0; white-space: nowrap; }

.buy-empty { padding: 16px 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

.buy-copy-btn { display: block; width: 100%; margin-top: 10px; padding: 7px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; color: var(--muted); text-align: center; transition: background 0.1s; }
.buy-copy-btn:hover { background: var(--bg); }

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .wizard-shell, .dash-header, .dash-sessions, .panel-tabs, .map-subpanel { display: none !important; }
  .dash-shell { display: block; height: auto; }
  .dash-body  { display: block; }
  .dash-panel { width: 100%; }
  .panel-body, .panel-content { overflow: visible; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 700px) {
  .dash-body     { flex-direction: column; }
  .dash-sessions { border-right: none; border-bottom: 1px solid var(--border); flex: 0 0 55vh; }
  .dash-panel    { width: 100%; flex: 1; }
  .dash-budget   { gap: 14px; }
  .budget-track  { width: 48px; }
  .wizard-options     { grid-template-columns: 1fr; }
  .wizard-sport-grid  { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ══════════════════════════════════════════════════════════════
   v2 UI — new 4-step flow
   ══════════════════════════════════════════════════════════════ */

/* Card overrides: cap height, make body scrollable */
.wizard-card          { max-height: 96dvh; overflow: hidden; }
.wizard-card.is-wide  { max-width: 920px; }
.wizard-body          { overflow-y: auto; min-height: 0; }

.wizard-save-status { font-size: 11px; color: var(--muted); flex: 1; text-align: center; }

/* ── Step 1: two-column layout ───────────────────────────────── */
.step1-layout {
  display: flex;
  gap: 16px;
  min-height: 440px;
}
.step1-catalog {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
.step1-filters {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.step1-filters .session-search { flex: 1; min-width: 0; }

.zone-multiselect { position: relative; }
.zone-trigger { cursor: pointer; text-align: left; white-space: nowrap; }
.zone-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 20;
  padding: 4px 0;
}
.zone-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.zone-check-item:hover { background: #F5F7FF; }
.zone-check-group { font-weight: 600; }
.zone-check-divider {
  padding: 6px 12px 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.event-catalog-list {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.event-catalog-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.event-catalog-row:last-child { border-bottom: none; }
.event-catalog-row:hover { background: var(--bg); }
.event-catalog-row.is-ranked { background: #EEF3FF; }
.ecr-emoji { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.ecr-body  { flex: 1; min-width: 0; }
.ecr-title { font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecr-meta  { display: flex; align-items: center; gap: 5px; margin-top: 2px; flex-wrap: wrap; }
.ecr-sport { font-size: 11px; color: var(--muted); }
.ecr-toggle {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.ecr-toggle:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
.ecr-toggle.is-added { background: var(--blue); border-color: var(--blue); color: #fff; font-size: 13px; }

/* Sibling events ("Also in session") — collapsed by default */
.ecr-siblings, .alloc-siblings, .itin-siblings { margin-top: 3px; }
.ecr-sib-toggle, .alloc-sib-toggle, .itin-sib-toggle {
  all: unset;
  font-size: 11px; color: var(--blue-mid); cursor: pointer;
  padding: 4px 0; min-height: 32px; display: inline-flex; align-items: center;
}
.ecr-sib-toggle::before, .alloc-sib-toggle::before, .itin-sib-toggle::before {
  content: "▸ "; font-size: 9px;
}
.ecr-siblings.is-open > .ecr-sib-toggle::before,
.alloc-siblings.is-open > .alloc-sib-toggle::before,
.itin-siblings.is-open > .itin-sib-toggle::before {
  content: "▾ ";
}
.ecr-sib-list, .alloc-sib-list, .itin-sib-list {
  display: none;
  margin-top: 2px; padding-left: 10px;
}
.ecr-siblings.is-open > .ecr-sib-list,
.alloc-siblings.is-open > .alloc-sib-list,
.itin-siblings.is-open > .itin-sib-list {
  display: block;
}
.ecr-sib-item.is-sib-item-ranked, .itin-sib-item.is-sib-item-ranked { color: var(--blue-mid); font-weight: 500; }
.ecr-sib-item, .alloc-sib-item, .itin-sib-item {
  font-size: 11px; color: var(--muted); line-height: 1.6;
}
/* Ranked list (right column) */
.step1-ranked {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ranked-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.ranked-count { font-weight: 400; color: var(--muted); }
.ranked-list  { list-style: none; overflow-y: auto; flex: 1; margin: 0; padding: 4px; }
.ranked-empty { padding: 16px; font-size: 12px; color: var(--muted); text-align: center; }

.ranked-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  background: var(--surface);
  cursor: grab;
  user-select: none;
}
.ranked-item.is-dragging { opacity: 0.4; border-style: dashed; cursor: grabbing; }
.rank-handle { color: var(--muted); font-size: 14px; cursor: grab; flex-shrink: 0; }
.rank-num    { font-size: 11px; font-weight: 700; color: var(--muted); min-width: 18px; text-align: center; flex-shrink: 0; }
.rank-body   { flex: 1; min-width: 0; }
.rank-title  { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sport  { font-size: 10px; color: var(--muted); }
.rank-arrows { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.rank-arrow  { font-size: 10px; padding: 1px 3px; border: 1px solid var(--border); border-radius: 3px; color: var(--muted); line-height: 1.2; }
.rank-arrow:hover:not(:disabled) { border-color: var(--blue-mid); color: var(--blue-mid); }
.rank-arrow:disabled { opacity: 0.3; cursor: default; }
.rank-remove { font-size: 16px; color: var(--muted); flex-shrink: 0; padding: 0 2px; }
.rank-remove:hover { color: #DC2626; }

/* ── Step 2: Party members ───────────────────────────────────── */
.party-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.party-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.member-name-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  font-size: 14px;
  outline: none;
  background: var(--bg);
}
.member-name-input:focus { border-color: var(--blue-mid); background: var(--surface); }
.member-cap-label  { font-size: 11px; color: var(--muted); white-space: nowrap; }
.member-remove-btn { font-size: 11px; color: var(--muted); text-decoration: underline; white-space: nowrap; }
.member-remove-btn:hover { color: #DC2626; }
.add-member-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--blue-mid);
  text-align: center;
  transition: background 0.1s, border-color 0.1s;
}
.add-member-btn:hover { background: #EEF3FF; border-color: var(--blue-mid); }

/* ── Step 3: Allocation ──────────────────────────────────────── */
.alloc-budget-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.alloc-budget-chip   { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.alloc-chip-name     { font-size: 12px; font-weight: 600; }
.alloc-chip-track    { width: 56px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.alloc-chip-fill     { height: 100%; background: var(--blue-mid); border-radius: 2px; transition: width 0.2s; }
.alloc-chip-fill.is-over  { background: #DC2626; }
.alloc-chip-count    { font-size: 11px; color: var(--muted); }
.alloc-chip-count.is-over { color: #DC2626; font-weight: 600; }

.alloc-list { display: flex; flex-direction: column; }
.alloc-event-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.alloc-rank-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  min-width: 28px;
  text-align: center;
  padding-top: 2px;
  flex-shrink: 0;
}
.alloc-event-body  { flex: 1; min-width: 0; }
.alloc-event-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.alloc-event-sport { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.alloc-member-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.alloc-toggle {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.alloc-toggle:hover { border-color: var(--blue-mid); }
.alloc-toggle.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Party member badge ────────────────────────────────────────── */
.member-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  min-width: 32px;
}
.member-badge.is-self { color: var(--blue); }
.member-name-input:disabled { opacity: 0.7; cursor: default; }

/* ── Vote summary & group votes ───────────────────────────────── */
.vote-summary-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.vote-count-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #EEF3FF;
  color: var(--blue-mid);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}
.vote-group-others {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.vote-other-chip {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}
.vote-section-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.vote-section-heading:first-child { margin-top: 0; }
.vote-added-by {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-style: italic;
}
/* ── Upvote rows (Step 3) ────────────────────────────────────── */
.vote-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.vote-row:last-child { border-bottom: none; }

.vote-upvote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  min-width: 44px;
}
.vote-upvote-btn:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
.vote-upvote-btn.is-voted {
  border-color: var(--blue);
  background: #EEF3FF;
  color: var(--blue);
}
.vote-arrow { fill: currentColor; }
.vote-count { font-size: 13px; font-weight: 700; line-height: 1; }

.vote-row-body { flex: 1; min-width: 0; }
.vote-row-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.vote-row-sport { font-size: 13px; color: var(--muted); margin-top: 2px; }
.vote-others-line { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Itinerary view: event list with filters ─────────────────── */
.itin-header {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.itin-title-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.itin-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.itin-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}
.itin-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.itin-profile-menu {
  position: relative;
  margin-left: 4px;
}

/* Icon buttons — icon-only, tooltip label on hover */
.itin-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 30px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.itin-icon-btn svg { flex-shrink: 0; }
.itin-icon-label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.itin-icon-btn:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: #EEF3FF;
}
.itin-icon-btn:hover .itin-icon-label {
  opacity: 1;
}
.itin-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.itin-icon-btn:disabled:hover {
  color: var(--muted);
  border-color: var(--border);
  background: transparent;
}
.itin-icon-btn:disabled:hover .itin-icon-label {
  opacity: 0;
}
.itin-icon-btn--primary {
  border-color: var(--gold);
  color: var(--gold);
}
.itin-icon-btn--primary:hover {
  color: #fff;
  border-color: var(--gold);
  background: var(--gold);
}
.itin-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.itin-filter-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
}
.itin-filter-tab {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}
.itin-filter-tab:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
.itin-filter-tab.is-active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.itin-sort-toggle {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.itin-sort-btn {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.itin-sort-btn:hover { color: var(--blue-mid); }
.itin-sort-btn.is-active {
  color: var(--blue);
  border-color: var(--border);
  background: #EEF3FF;
}

.itin-ev-list { display: flex; flex-direction: column; }

.itin-ev-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.itin-ev-row:last-child { border-bottom: none; }
.itin-ev-row:hover { background: #F5F7FF; }
.itin-ev-row.is-focused { background: #EEF3FF; }

.itin-ev-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 32px;
  flex-shrink: 0;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.itin-ev-votes:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
.itin-ev-votes.is-voted { border-color: var(--blue); background: #EEF3FF; color: var(--blue); }
.itin-ev-votes .vote-arrow { fill: currentColor; }
.itin-ev-vote-count { font-size: 13px; font-weight: 700; line-height: 1; }

.itin-ev-body { flex: 1; min-width: 0; }
.itin-ev-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.itin-ev-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.itin-ev-where { font-size: 11px; color: var(--muted); }

/* (old itin button classes removed — replaced by .itin-icon-btn) */

/* ── Calendar Sheet ───────────────────────────────────────── */
.cal-sheet {
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 14px;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: calSheetIn 0.25s ease-out;
}
@keyframes calSheetIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cal-sheet .cal-sheet-handle { display: none; }

.cal-header {
  flex-shrink: 0;
  padding: 16px 16px 0;
}
.cal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.cal-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-stats {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.cal-close-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.15s;
}
.cal-close-btn:hover { background: rgba(0, 0, 0, 0.12); }

/* Week tabs */
.cal-week-tabs {
  display: flex;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.cal-week-tab {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.cal-week-tab:hover { border-color: var(--blue-mid); color: var(--blue-mid); }
.cal-week-tab.is-active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.cal-week-count {
  display: inline-block;
  background: rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 0 5px;
  font-size: 10px;
  margin-left: 2px;
}
.cal-week-tab.is-active .cal-week-count { background: rgba(255,255,255,0.3); }

/* Grid layout */
.cal-grid-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: 44px repeat(7, 1fr);
  min-height: 960px;
  position: relative;
}

/* Time gutter */
.cal-time-gutter {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid var(--border);
}
.cal-time-label {
  position: absolute;
  font-size: 10px;
  color: var(--muted);
  padding: 0 4px;
  transform: translateY(-6px);
  white-space: nowrap;
}

/* Day columns */
.cal-day-col {
  border-left: 1px solid var(--border);
  position: relative;
  min-width: 0;
}
.cal-day-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  text-align: center;
  padding: 6px 2px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.cal-day-name {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cal-day-num {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}
.cal-day-body {
  position: relative;
  height: 960px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 59px,
    var(--border) 59px, var(--border) 60px
  );
}

/* Calendar hint */
.cal-hint {
  padding: 4px 14px 2px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.cal-hint-dashed {
  display: inline-block;
  width: 18px;
  height: 10px;
  border-left: 3px dashed var(--blue);
  background: #DBEAFE;
  border-radius: 2px;
  vertical-align: middle;
}

/* Event blocks */
.cal-event-block {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 5px;
  padding: 3px 4px;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s;
  background: #DBEAFE;
  border-left: 3px solid var(--blue);
  color: var(--text);
  z-index: 1;
}
.cal-event-block:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 5;
}
.cal-event-block.has-alternatives {
  border-left-style: dashed;
}
.cal-event-block.is-conflict {
  background: #FEF3C7;
  border-left-color: #F59E0B;
}
.cal-event-block.is-excluded {
  background: #F3F4F6;
  border-left-color: #D1D5DB;
  opacity: 0.5;
  text-decoration: line-through;
}
.cal-event-block.is-excluded:hover {
  opacity: 0.7;
}
.cal-event-block.is-selected {
  box-shadow: 0 0 0 2px var(--blue);
  z-index: 6;
}
.cal-ev-conflict-badge {
  position: absolute;
  top: 1px;
  right: 3px;
  font-size: 9px;
  line-height: 1;
}
.cal-ev-time {
  display: block;
  font-weight: 600;
  font-size: 10px;
  color: var(--muted);
}
.cal-ev-title {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-ev-venue {
  display: block;
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Alternatives popover */
.cal-alt-popover {
  position: absolute;
  z-index: 30;
  width: 280px;
  max-height: 340px;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  padding: 12px;
  animation: calPopIn 0.15s ease-out;
}
@keyframes calPopIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.cal-alt-header {
  margin-bottom: 10px;
}
.cal-alt-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 2px;
}
.cal-alt-sub {
  font-size: 11px;
  color: var(--muted);
}
.cal-alt-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-alt-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.15s;
}
.cal-alt-option:hover { border-color: var(--blue-mid); }
.cal-alt-option.is-current {
  border-color: var(--blue);
  background: #EEF3FF;
}
.cal-alt-option.is-conflict {
  border-color: #F59E0B;
  background: #FFFBEB;
}
.cal-alt-info {
  flex: 1;
  min-width: 0;
}
.cal-alt-date {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.cal-alt-time {
  font-size: 11px;
  color: var(--text);
}
.cal-alt-venue {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.cal-alt-conflict-warn {
  display: block;
  font-size: 10px;
  color: #B45309;
  margin-top: 2px;
}
.cal-alt-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--blue);
  background: #DBEAFE;
  padding: 2px 8px;
  border-radius: 10px;
}
.cal-alt-swap-btn {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.cal-alt-swap-btn:hover { background: var(--blue-mid); }
.cal-alt-swap-btn.is-warn {
  background: #F59E0B;
  border-color: #F59E0B;
}
.cal-alt-swap-btn.is-warn:hover { background: #D97706; border-color: #D97706; }

/* Conflict resolution popover */
.cal-conflict-popover { width: 300px; }
.cal-conflict-this {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
}
.cal-conflict-this-info { flex: 1; min-width: 0; }
.cal-conflict-sep {
  font-size: 11px;
  font-weight: 600;
  color: #B45309;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.cal-conflict-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-conflict-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #FCD34D;
  background: #FFFBEB;
}
.cal-conflict-entry.is-resolved {
  border-color: var(--border);
  background: var(--bg);
  opacity: 0.6;
}
.cal-conflict-entry-info { flex: 1; min-width: 0; }
.cal-conflict-entry-title {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.cal-conflict-entry-meta {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.cal-conflict-entry-venue {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.cal-conflict-btn {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.cal-conflict-btn--remove {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}
.cal-conflict-btn--remove:hover { background: #FDE68A; }
.cal-conflict-btn--restore {
  background: var(--blue);
  color: #fff;
}
.cal-conflict-btn--restore:hover { background: var(--blue-mid); }
.cal-conflict-resolved-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg);
}
.cal-conflict-info {
  text-align: center;
  padding: 8px 0;
}
.cal-conflict-msg {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

/* Skipped events tray */
.cal-skipped {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 0 16px;
  background: var(--bg);
}
.cal-skipped-toggle {
  width: 100%;
  padding: 10px 0;
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
.cal-skipped-toggle:hover { color: var(--text); }
.cal-skipped-list {
  display: none;
  padding-bottom: 10px;
}
.cal-skipped-list.is-open { display: block; }
.cal-skipped-item {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.cal-skipped-item:last-child { border-bottom: none; }
.cal-skipped-title {
  font-size: 12px;
  font-weight: 500;
}
.cal-skipped-reason {
  font-size: 11px;
  color: var(--muted);
}

/* ── Itinerary picker dropdown ─────────────────────────────── */
.cal-title-picker {
  position: relative;
}
.cal-title-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.cal-title-btn:hover .cal-title { color: var(--blue); }
.cal-title-caret {
  font-size: 10px;
  color: var(--muted);
}
.cal-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 280px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  padding: 6px;
  animation: calPopIn 0.15s ease-out;
}
.cal-picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: background 0.1s;
}
.cal-picker-option:hover { background: var(--bg); }
.cal-picker-option.is-active {
  background: #EEF3FF;
  border-color: var(--blue);
}
.cal-picker-option-body {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.cal-picker-option-body .cal-picker-name,
.cal-picker-option-body .cal-picker-meta {
  display: block;
}
.cal-picker-name {
  font-weight: 600;
  display: block;
}
.cal-picker-meta {
  font-size: 11px;
  color: var(--muted);
  display: block;
}
.cal-picker-delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-picker-delete:hover { background: #FEE2E2; color: #DC2626; }

/* ── Conflict banner & save dialog ────────────────────────── */
.cal-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  margin: 6px 16px 0;
}
.cal-status--warn {
  background: #FEF3C7;
  color: #92400E;
}
.cal-status--ok {
  background: #D1FAE5;
  color: #065F46;
}
.cal-save-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #065F46;
  background: #065F46;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.cal-save-btn:hover { background: #047857; }
.cal-save-dialog {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}
.cal-save-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.cal-save-row {
  display: flex;
  gap: 6px;
}
.cal-save-input {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.cal-save-input:focus { outline: none; border-color: var(--blue); }
.cal-save-confirm {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}
.cal-save-confirm:hover { background: var(--blue-mid); }
.cal-save-cancel {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

/* ── Debug controls (dev only) ─────────────────────────────── */
.cal-debug {
  border-top: 1px dashed #D97706;
  margin-top: 8px;
  padding-top: 6px;
}
.cal-debug-toggle {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: #D97706;
  cursor: pointer;
  padding: 2px 0;
}
.cal-debug-toggle:hover { color: #B45309; }
.cal-debug-panel {
  display: none;
  padding: 8px 0 4px;
}
.cal-debug-panel.is-open { display: flex; flex-direction: column; gap: 6px; }
.cal-debug-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
.cal-debug-row input[type="checkbox"] {
  accent-color: #D97706;
}
.cal-debug-row input[type="number"] {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
}
.cal-debug-hint {
  font-size: 10px;
  color: var(--muted);
}
.cal-debug-regen {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #D97706;
  border-radius: 6px;
  background: #FFFBEB;
  color: #92400E;
  cursor: pointer;
  transition: all 0.15s;
}
.cal-debug-regen:hover {
  background: #FEF3C7;
  border-color: #B45309;
}

/* ── Step 4: Two-column layout with Apple Map ───────────────── */
/* Step 4: full-bleed map */
.wizard-shell.is-fullbleed {
  padding: 0;
  min-height: 100dvh;
  align-items: stretch;
}
.wizard-card.is-step4 {
  max-width: 100vw;
  width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  box-shadow: none;
}
.wizard-card.is-step4 .wizard-top,
.wizard-card.is-step4 .wizard-nav {
  display: none;
}
.wizard-card.is-step4 .wizard-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.itin-layout { position: relative; width: 100%; height: 100%; }

/* Map fills the entire body */
.itin-map-panel { position: absolute; inset: 0; background: #dde8f0; }
.itin-apple-map { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Floating sidebar — Apple Maps style */
.itin-list-panel {
  position: absolute;
  top: 12px; left: 12px; bottom: 48px;
  width: 360px;
  z-index: 10;
  overflow-y: auto;
  padding: 16px 14px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 14px;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.6);
}



/* Itinerary search overlay (within list panel) */
.itin-search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.itin-search-done-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  padding: 6px 0;
}
.itin-search-done-btn:hover { color: var(--blue-mid); }
.itin-search-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.itin-search-filters .session-search { width: 100%; }
.itin-search-filter-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.itin-search-filter-row .filter-select {
  flex: 1;
  min-width: 0;
}
.itin-search-filter-row .zone-multiselect {
  flex: 1;
  min-width: 0;
}
.itin-search-filter-row .zone-trigger {
  width: 100%;
  box-sizing: border-box;
  height: 100%;
}
.itin-search-catalog {
  overflow-y: auto;
  max-height: calc(100% - 150px);
}

/* Hidden on desktop — shown in mobile media query */
.itin-sheet-handle { display: none; }

.itin-map-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--muted); font-size: 14px; text-align: center;
  padding: 2rem; line-height: 1.6;
}

/* ── Auth Screens ────────────────────────────────────────────── */

.auth-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 8px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 28px;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background-color 0.15s, box-shadow 0.15s;
}

.auth-btn-icon { flex-shrink: 0; }

.auth-btn--google {
  background: #fff;
  color: #3c4043;
}
.auth-btn--google:hover {
  background: #f7f8f8;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.auth-btn--apple {
  background: #000;
  color: #fff;
  border-color: #000;
}
.auth-btn--apple:hover {
  background: #1a1a1a;
}

.auth-btn--dev {
  background: var(--bg);
  color: var(--muted);
  font-size: 0.85rem;
  border-style: dashed;
}

.auth-btn--primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  flex-shrink: 0;
}
.auth-btn--primary:hover {
  background: var(--blue-mid);
}

.auth-btn--link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 16px;
}

.auth-legal-links {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}
.auth-legal-links a {
  color: var(--muted);
  text-decoration: none;
}
.auth-legal-links a:hover {
  color: var(--blue-mid);
  text-decoration: underline;
}
.auth-legal-sep {
  margin: 0 6px;
}

/* ── Group Screen ────────────────────────────────────────────── */

.group-section {
  text-align: left;
  margin-bottom: 4px;
}

.group-section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.group-form {
  display: flex;
  gap: 8px;
}

.group-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
}
.group-input:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
}

.group-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.group-divider::before,
.group-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.group-error {
  margin-top: 12px;
  padding: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.85rem;
}

/* ── Group Code Reveal (after creation) ─────────────────────── */

.group-code-reveal {
  margin: 1.2rem 0;
  text-align: center;
}
.group-code-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.group-code-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}
.group-code-value {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}
.group-code-copy {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: var(--blue);
  cursor: pointer;
}
.group-code-copy:hover {
  background: #fff;
}

/* ── Group Badge (wizard header) ─────────────────────────────── */

.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.group-badge-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-badge-code {
  font-family: monospace;
  font-size: 0.72rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text);
}

.group-badge-share {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: var(--blue);
  cursor: pointer;
}
.group-badge-share:hover {
  background: var(--bg);
}

/* ── Profile menu ────────────────────────────────────────────── */
.profile-menu {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 100;
  overflow: hidden;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.profile-dropdown-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-dropdown-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-dropdown-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-email {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.profile-edit-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}

.profile-edit-form {
  display: flex;
  gap: 6px;
}

.profile-name-input {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.profile-name-input:focus {
  border-color: var(--blue);
}

.profile-save-btn {
  padding: 5px 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.profile-save-btn:hover {
  opacity: 0.9;
}

.profile-msg {
  font-size: 0.75rem;
  margin-top: 6px;
}

.profile-msg--ok {
  color: var(--green, #34a853);
}

.profile-msg--err {
  color: var(--red, #ea4335);
}

/* Profile dropdown actions (feedback + support links) */
.profile-dropdown-actions {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
}
.profile-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
}
.profile-action-btn:hover {
  background: var(--bg);
}
.profile-action-btn svg {
  flex-shrink: 0;
  color: var(--muted);
}

.profile-dropdown-legal {
  padding: 8px 16px 0;
  text-align: center;
  font-size: 0.72rem;
  border-top: 1px solid var(--border);
}
.profile-dropdown-legal a {
  color: var(--muted);
  text-decoration: none;
}
.profile-dropdown-legal a:hover {
  color: var(--blue-mid);
  text-decoration: underline;
}
.profile-dropdown-legal-sep {
  margin: 0 4px;
  color: var(--border);
}

.profile-dropdown-footer {
  padding: 10px 16px;
}

.profile-logout-btn {
  width: 100%;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.profile-logout-btn:hover {
  color: var(--red, #ea4335);
  border-color: var(--red, #ea4335);
}

.profile-delete-btn {
  width: 100%;
  padding: 6px;
  margin-top: 8px;
  background: none;
  border: 1px solid var(--red, #ea4335);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--red, #ea4335);
  cursor: pointer;
  transition: all 0.15s;
}

.profile-delete-btn:hover {
  background: var(--red, #ea4335);
  color: #fff;
}

/* ── v2 Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  .wizard-card.is-wide { max-width: 100%; }
  .step1-layout { flex-direction: column; min-height: auto; }
  .step1-ranked { width: 100%; min-height: 200px; }
  .event-catalog-list { max-height: 300px; }
  .itin-filter-tabs { overflow-x: auto; }
  .wizard-shell.is-fullbleed { padding: 0; }

  /* Detent-style bottom sheet */
  .itin-list-panel {
    left: 0; right: 0; bottom: 0; top: auto;
    width: 100%;
    height: 85dvh;
    max-height: none;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.18);
    transform: translateY(calc(85dvh - 180px)); /* peek: show ~180px */
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
    will-change: transform;
    padding-top: 8px;
  }
  .itin-list-panel.detent-half {
    transform: translateY(calc(85dvh - 50dvh));
  }
  .itin-list-panel.detent-full {
    transform: translateY(0);
  }
  .itin-list-panel.is-dragging {
    transition: none;
  }

  /* Drag handle */
  .itin-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 6px 0 10px;
    cursor: grab;
    touch-action: none;
  }
  .itin-sheet-handle::after {
    content: "";
    width: 36px;
    height: 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.18);
  }
  /* Calendar sheet: bottom sheet on mobile */
  .cal-sheet {
    top: auto; left: 0; right: 0; bottom: 0;
    height: 92dvh;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.18);
  }
  .cal-sheet .cal-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 6px 0 4px;
    cursor: grab;
    touch-action: none;
  }
  .cal-sheet .cal-sheet-handle::after {
    content: "";
    width: 36px;
    height: 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.18);
  }
  .cal-grid {
    grid-template-columns: 36px repeat(7, 1fr);
  }
  .cal-alt-popover {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    max-height: 50dvh;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 28px rgba(0,0,0,0.22);
  }

  .auth-card { padding: 28px 20px; }
  .group-form { flex-direction: column; }
}

/* ── "Made with love" footer (step 1 ranked panel) ────────── */
.made-with-love {
  padding: 14px 10px 12px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted);
  cursor: pointer;
  border-top: 1px solid var(--border);
  transition: color 0.15s;
  margin-top: auto;
  user-select: none;
}
.made-with-love:hover { color: var(--blue-mid); }
.made-heart {
  color: #c0392b;
  font-size: 12px;
  display: inline-block;
  animation: heartbeat 2.4s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.2); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  56% { transform: scale(1); }
}

/* ── Itinerary support footer (step 4 list panel) ─────────── */
.itin-support-footer {
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
  user-select: none;
}
.itin-support-footer:hover { color: var(--blue-mid); }
.itin-support-heart {
  color: #c0392b;
  font-size: 11px;
}

/* ── Support Sheet (about + feedback combined) ────────────── */
.support-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.support-sheet {
  background: var(--surface);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -6px 40px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  animation: sheetSlideUp 0.28s ease-out;
}
@keyframes sheetSlideUp {
  from { transform: translateY(100%); opacity: 0.5; }
  to   { transform: translateY(0);    opacity: 1; }
}
.support-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 4px;
}
.support-sheet-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}
.support-tab {
  flex: 1;
  padding: 10px 0 9px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: color 0.12s, border-color 0.12s;
}
.support-tab:hover { color: var(--text); }
.support-tab.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.support-sheet-body {
  padding: 20px 24px 28px;
}
.support-pane { display: none; }
.support-pane.is-active { display: block; }

/* About pane */
.support-about-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
}
.support-about-sig {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 24px;
}
.support-tip-box {
  background: linear-gradient(135deg, #FFFBF0 0%, #FDF6E3 100%);
  border: 1px solid #E8D5A0;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.support-tip-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.support-tip-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--gold);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.support-tip-btn:hover { background: #B5850A; color: #fff; transform: translateY(-1px); }
.support-tip-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 10px;
}

/* Feedback form fields (shared) */
.feedback-field { margin-bottom: 16px; }
.feedback-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 6px;
}
.feedback-required { color: #c0392b; }
.feedback-optional { font-weight: 400; text-transform: none; letter-spacing: 0; font-style: italic; }
.feedback-select, .feedback-input, .feedback-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
.feedback-select:focus, .feedback-input:focus, .feedback-textarea:focus {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(0,82,204,0.12);
}
.feedback-textarea { resize: vertical; min-height: 100px; }
.feedback-charcount {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}
.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.feedback-submit-btn {
  padding: 10px 24px;
  background: var(--blue);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.feedback-submit-btn:hover { background: var(--blue-mid); }
.feedback-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.feedback-status {
  margin-top: 12px;
  font-size: 0.85rem;
  text-align: center;
}
.feedback-status.is-success { color: #27ae60; }
.feedback-status.is-error { color: #c0392b; }

@media (max-width: 700px) {
  .support-sheet { max-width: 100%; }
}
