:root {
  --accent: #E4007C;          /* rosa mexicano */
  --accent-soft: #FCE4F1;
  --bg: #F6F4F1;
  --card: #FFFFFF;
  --text: #1C1B1F;
  --muted: #6B6670;
  --line: #E7E2DD;
  --shadow: 0 6px 24px rgba(30, 20, 30, .12);
  --tabbar-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --hour: 64px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #FF3EA5;
    --accent-soft: #3A1A2C;
    --bg: #121114;
    --card: #1D1B20;
    --text: #F1EEF2;
    --muted: #A49FA8;
    --line: #2E2B31;
    --shadow: 0 6px 24px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  overflow: hidden; overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }

#app { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; background: var(--bg); overflow: hidden; }
@media (min-width: 560px) { #app { box-shadow: 0 0 0 1px var(--line), var(--shadow); } }

.view { position: absolute; inset: 0 0 calc(var(--tabbar-h) + var(--safe-b)) 0; display: none; flex-direction: column; }
.view.active { display: flex; }

/* ───── Tab bar ───── */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b); display: flex; background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 900;
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 600; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.active { color: var(--accent); }

/* ───── Calendar header ───── */
.cal-header { padding: calc(var(--safe-t) + 10px) 16px 0; background: var(--bg); z-index: 5; }
.title-row { display: flex; align-items: center; gap: 10px; }
.title-row h1 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.title-row h1 span { color: var(--accent); }
.title-row .sub { font-size: 12px; color: var(--muted); }
.title-row .spacer { flex: 1; }
.pill-btn { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.pill-btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); }
.icon-btn svg { width: 20px; height: 20px; }

.day-tabs { display: flex; gap: 6px; padding: 12px 0 10px; }
.day-tab { flex: 1; padding: 6px 0 7px; border-radius: 14px; text-align: center; background: var(--card); border: 1px solid var(--line); transition: background .15s, color .15s; }
.day-tab .dow { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.day-tab .num { font-size: 19px; font-weight: 700; line-height: 1.1; }
.day-tab .wx { font-size: 10px; color: var(--muted); height: 12px; }
.day-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.day-tab.active .dow, .day-tab.active .wx { color: rgba(255, 255, 255, .85); }
.day-tab.today::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin: 2px auto 0; }

/* ───── Day scroller (swipe) ───── */
.day-scroller { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.day-scroller::-webkit-scrollbar { display: none; }
.day-pane { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow-y: auto; overscroll-behavior-y: contain; padding-bottom: 40px; }
.day-head { padding: 4px 16px 10px; }
.day-head h2 { margin: 0; font-size: 17px; }
.day-head .theme { color: var(--muted); font-size: 13px; }
.variant-bar { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.variant-bar button { white-space: nowrap; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; }
.variant-bar button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.variant-note { font-size: 12px; color: var(--muted); padding-top: 6px; }

/* time grid */
.grid { position: relative; margin: 0 12px 0 0; }
.hour { position: relative; height: var(--hour); border-top: 1px solid var(--line); margin-left: 52px; }
.hour-label { position: absolute; left: -52px; top: -8px; width: 44px; text-align: right; font-size: 11px; color: var(--muted); }
.events { position: absolute; top: 0; left: 56px; right: 0; bottom: 0; }
.ev {
  position: absolute; border-radius: 10px; padding: 5px 8px; overflow: hidden; color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15); border-left: 4px solid rgba(0, 0, 0, .18); text-align: left;
  display: flex; flex-direction: column; gap: 1px; transition: transform .1s;
}
.ev:active { transform: scale(.98); }
.ev .t { font-weight: 700; font-size: 13px; line-height: 1.2; }
.ev .m { font-size: 11px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.short .t { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.done { opacity: .5; }
.ev.done .t { text-decoration: line-through; }
.ev .badge { position: absolute; top: 4px; right: 6px; font-size: 10px; font-weight: 700; background: rgba(255, 255, 255, .25); padding: 1px 6px; border-radius: 999px; }
.now-line { position: absolute; left: 50px; right: 0; height: 2px; background: #EA4335; z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #EA4335; }

/* kinds */
.k-food { background: #E4572E; } .k-drinks { background: #3949AB; } .k-sight { background: #1E88E5; }
.k-shop { background: #8D6E63; } .k-travel { background: #546E7A; } .k-hotel { background: #26A69A; }
.k-event { background: #C2185B; }

/* list mode */
.agenda { padding: 0 16px; }
.ag-item { display: flex; gap: 12px; padding: 12px; background: var(--card); border-radius: 14px; margin-bottom: 8px; border: 1px solid var(--line); text-align: left; width: 100%; }
.ag-item .bar { width: 5px; border-radius: 3px; flex: none; }
.ag-item .time { width: 64px; flex: none; font-size: 12px; color: var(--muted); font-weight: 600; }
.ag-item .tt { font-weight: 650; }
.ag-item.done .tt { text-decoration: line-through; opacity: .6; }

/* status pills */
.st { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.st-Booked { background: #E6F4EA; color: #137333; border-color: #CEEAD6; }
.st-Fixed { background: #E8F0FE; color: #1967D2; border-color: #D2E3FC; }
.st-Tentative, .st-Decision { background: #FEF7E0; color: #B06000; border-color: #FEEFC3; }
.st-Recommended { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .st-Booked { background: #0F2E1A; color: #81C995; border-color: #1E4A2C; }
  .st-Fixed { background: #0E2240; color: #8AB4F8; border-color: #1A3560; }
  .st-Tentative, .st-Decision { background: #3A2A05; color: #FDD663; border-color: #50400F; }
}

/* ───── Map ───── */
#map { position: absolute; inset: 0; z-index: 1; background: #e8e4dc; }
@media (prefers-color-scheme: dark) { #map { background: #222; } }
.map-top { position: absolute; top: calc(var(--safe-t) + 10px); left: 10px; right: 10px; z-index: 500; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.search-row { display: flex; gap: 8px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 0 12px; height: 44px; box-shadow: var(--shadow); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; min-width: 0; }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search .clear { color: var(--muted); font-size: 18px; padding: 4px; display: none; }
.search.has-text .clear { display: block; }
.filter-btn { position: relative; width: 44px; height: 44px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; }
.filter-btn svg { width: 20px; height: 20px; }
.filter-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: none; }
.filter-btn.active .dot { display: block; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; padding: 7px 12px; border-radius: 999px; background: var(--card); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: 13px; font-weight: 600; border: 1.5px solid transparent; }
.chip.on { border-color: var(--c, var(--accent)); color: var(--c, var(--accent)); }
.chip.off { opacity: .55; }

.map-fabs { position: absolute; right: 10px; z-index: 500; display: flex; flex-direction: column; gap: 10px; transition: bottom .25s; }
.fab { width: 46px; height: 46px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; }
.fab svg { width: 22px; height: 22px; }
.fab.on { color: #1A73E8; }

.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.pin span { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.pin.big { width: 38px; height: 38px; }
.pin.big span { font-size: 19px; }
.pin.dim { opacity: .45; }
.pin.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.pin.fav::after { content: "★"; position: absolute; transform: rotate(45deg); top: -9px; right: -9px; font-size: 13px; color: #F9AB00; text-shadow: 0 0 2px #fff; }
.pin.trip { box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgba(0, 0, 0, .35); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1A73E8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26, 115, 232, .2); }
.drop-pin { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.leaflet-control-attribution { font-size: 9px !important; }
.tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
.leaflet-container .leaflet-control-attribution { margin-bottom: 132px; border-radius: 0 6px 0 0; }

/* bottom sheet (area list) */
.area-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 600; background: var(--card);
  border-radius: 18px 18px 0 0; box-shadow: 0 -4px 24px rgba(0, 0, 0, .18); display: flex; flex-direction: column;
  height: 88%; transform: translateY(calc(100% - 132px)); transition: transform .28s cubic-bezier(.2, .8, .2, 1); touch-action: none;
}
.area-sheet.dragging { transition: none; }
.sheet-handle { padding: 8px 16px 8px; cursor: grab; }
.sheet-handle::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 8px; }
.sheet-title { display: flex; align-items: baseline; gap: 8px; }
.sheet-title b { font-size: 17px; }
.sheet-title .ref { font-size: 12px; color: var(--muted); flex: 1; }
.sheet-title .link { font-size: 13px; font-weight: 600; color: var(--accent); }
.area-list { overflow-y: auto; flex: 1; padding: 0 12px 20px; touch-action: pan-y; overscroll-behavior: contain; }
.pl-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.pl-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.pl-main { flex: 1; min-width: 0; }
.pl-name { font-weight: 650; display: flex; gap: 6px; align-items: center; }
.pl-name .star { color: #F9AB00; }
.pl-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.pl-dist { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; text-align: right; }
.pl-dist small { display: block; font-weight: 500; color: var(--muted); }
.pri { display: inline-block; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .3px; }
.pri-must { background: var(--accent); color: #fff; }
.pri-high { background: var(--accent-soft); color: var(--accent); }
.pri-story { background: #EDE7F6; color: #5E35B1; }
.pri-special { background: #FFF3E0; color: #E65100; }
.pri-medium, .pri-low, .pri-base { background: var(--bg); color: var(--muted); }
@media (prefers-color-scheme: dark) { .pri-story { background: #2A2240; color: #B39DDB; } .pri-special { background: #3A2410; color: #FFB74D; } }
.empty { text-align: center; color: var(--muted); padding: 30px 20px; font-size: 14px; }

/* ───── Modal sheet ───── */
.modal { position: absolute; inset: 0; z-index: 1000; display: none; }
.modal.open { display: block; }
.modal .backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .38); opacity: 0; transition: opacity .2s; }
.modal.show .backdrop { opacity: 1; }
.modal .panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%; background: var(--card); border-radius: 20px 20px 0 0;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
}
.modal.show .panel { transform: translateY(0); }
.panel .grab { padding: 8px 0 4px; touch-action: none; }
.panel .grab::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.panel .body { overflow-y: auto; padding: 4px 18px 24px; overscroll-behavior: contain; }
.panel .topbar { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 36px; }
.panel .topbar .back { font-weight: 600; color: var(--accent); padding: 6px; display: none; }
.panel .topbar .back.show { display: block; }
.panel .topbar .x { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 16px; color: var(--muted); }

.d-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.d-title { font-size: 22px; font-weight: 750; letter-spacing: -.3px; margin: 4px 0 6px; line-height: 1.2; }
.d-time { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.d-addr { color: var(--muted); font-size: 14px; }
.warn { background: #FEF7E0; color: #8A5300; padding: 8px 10px; border-radius: 10px; font-size: 13px; margin: 10px 0; }
@media (prefers-color-scheme: dark) { .warn { background: #3A2A05; color: #FDD663; } }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.actions a, .actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--bg); font-size: 12px; font-weight: 600; color: var(--text); text-decoration: none; }
.actions svg { width: 22px; height: 22px; color: var(--accent); }
.actions .on svg { fill: #F9AB00; color: #F9AB00; }
.sec { margin-top: 18px; }
.sec h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.notes { margin: 0; padding-left: 18px; }
.notes li { margin-bottom: 4px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); margin-bottom: 6px; width: 100%; text-align: left; }
.opt .e { font-size: 18px; }
.opt .n { flex: 1; font-weight: 600; font-size: 14px; }
.opt .d { font-size: 12px; color: var(--muted); }
.opt .chev { color: var(--muted); }
textarea.mynote { width: 100%; min-height: 70px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 10px; resize: vertical; font-size: 16px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--bg); margin-top: 8px; font-weight: 600; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch.on { background: #34A853; }
.switch.on::after { left: 21px; }

/* filter sheet */
.f-group { margin-bottom: 18px; }
.f-group h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; justify-content: space-between; }
.f-group h4 button { color: var(--accent); font-size: 12px; text-transform: none; letter-spacing: 0; }
.f-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.f-grid button { padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; background: var(--card); }
.f-grid button.on { border-color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--card)); }

/* ───── Tools ───── */
.tools { overflow-y: auto; padding: calc(var(--safe-t) + 14px) 16px 30px; }
.tools h1 { margin: 0 0 12px; font-size: 26px; letter-spacing: -.5px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; }
.card h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card .muted { color: var(--muted); font-size: 13px; }
.hero { background: linear-gradient(135deg, #E4007C, #FF7A3D); color: #fff; border: 0; }
.hero .big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.hero .muted { color: rgba(255, 255, 255, .85); }
.row { display: flex; gap: 10px; align-items: center; }
.field { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); font-size: 18px; font-weight: 600; width: 100%; }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 8px 0; border-radius: 9px; font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); color: var(--accent); }
.result { font-size: 22px; font-weight: 750; margin-top: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.check:last-child { border-bottom: 0; }
.box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 13px; color: #fff; }
.check.on .box { background: #34A853; border-color: #34A853; }
.check.on span { text-decoration: line-through; color: var(--muted); }
.wx-row { display: flex; gap: 8px; overflow-x: auto; }
.wx-day { flex: 1; min-width: 58px; text-align: center; background: var(--bg); border-radius: 12px; padding: 8px 4px; font-size: 12px; }
.wx-day .i { font-size: 22px; }
.wx-day b { display: block; font-size: 13px; }
.driver { position: absolute; inset: 0; z-index: 1200; background: #000; color: #fff; display: none; flex-direction: column; justify-content: center; padding: 30px; text-align: center; }
.driver.open { display: flex; }
.driver .l1 { font-size: 20px; opacity: .8; }
.driver .l2 { font-size: 44px; font-weight: 800; line-height: 1.1; margin: 16px 0; }
.driver .l3 { font-size: 26px; }
.driver .hint { position: absolute; bottom: 30px; left: 0; right: 0; opacity: .5; font-size: 13px; }

/* Netlify free-plan badge: reserve a strip under the tab bar so it never covers controls */
#app.has-badge .tabbar { bottom: var(--badge-h); height: var(--tabbar-h); padding-bottom: 0; }
#app.has-badge .view { bottom: calc(var(--tabbar-h) + var(--badge-h)); }
#app.has-badge::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--badge-h); background: var(--card); z-index: 899; }
#app.has-badge .panel { padding-bottom: var(--badge-h); }
#app.has-badge .leaflet-control-attribution { margin-bottom: 132px; }

.toast { position: absolute; left: 50%; top: calc(var(--safe-t) + 112px); transform: translateX(-50%); background: rgba(28, 27, 31, .92); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 1300; opacity: 0; transition: opacity .25s; pointer-events: none; max-width: 86%; text-align: center; }
.toast.show { opacity: 1; }

/* ───── Family views (Huynhs / Jacobs / Both) ───── */
.fam-seg { display: flex; gap: 3px; margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.fam-seg button { flex: 1; padding: 7px 0; border-radius: 9px; font-size: 14px; font-weight: 650; color: var(--muted); }
.fam-seg button.on { background: var(--text); color: var(--bg); }
.fp { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 800;
  color: #fff; border: 1.5px solid #fff; margin-right: 4px; vertical-align: 1px; flex: none; }
.fp-huynh { background: #E4007C; }
.fp-jacobs { background: #0B8F7E; }
.fam-legend { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding-top: 6px; }
.fam-legend .fp { margin-left: 6px; }
.fam-legend .fp:first-child { margin-left: 0; }
.fam-st-huynh { background: #FCE4F1; color: #B0005F; border-color: transparent; }
.fam-st-jacobs { background: #DDF3EF; color: #07695C; border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .fam-st-huynh { background: #3A1A2C; color: #FF7CC0; }
  .fam-st-jacobs { background: #0E2E29; color: #6FD8C7; }
}
#app.view-both .ev.fam-huynh { border-left-color: #E4007C; border-left-width: 5px; }
#app.view-both .ev.fam-jacobs { border-left-color: #0B8F7E; border-left-width: 5px; }
[data-driver] small { font-weight: 500; color: var(--muted); }
