:root {
  color-scheme: light;
  --bg: #f1f5fb; --card: #fff; --ink: #0f172a; --muted: #52607a; --line: #dbe3ef;
  --pri: #4338ca; --pri2: #0ea5e9; --ok: #15803d; --no: #b91c1c; --warn: #b45309; --orange: #ea580c;
  --r: 18px; --sh: 0 2px 10px rgba(15, 23, 42, .07);
  --fs: 17px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
html[data-font="l"] { --fs: 19px; }
html[data-font="xl"] { --fs: 21.5px; }
* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Rubik", "Assistant", -apple-system, "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; }
body.noscroll { overflow: hidden; }
a { color: var(--pri); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; right: -999px; top: 0; background: #000; color: #fff; padding: 8px; z-index: 99; }
.skip:focus { right: 8px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; }
.hint { color: var(--muted); font-size: .85rem; margin: .5rem 0; }
.lead { font-size: 1.05rem; }

/* ---------- app bar + tabs ---------- */
.appbar { position: sticky; top: 0; z-index: 20; padding: calc(var(--safe-t) + 10px) 16px 10px; background: linear-gradient(120deg, #3730a3, #6d28d9 55%, #0ea5e9); color: #fff; box-shadow: 0 2px 12px rgba(55, 48, 163, .35); }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
main { padding: 14px 14px calc(96px + var(--safe-b)); max-width: 760px; margin: 0 auto; outline: none; }
.tabbar { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 9px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; position: relative; min-height: 58px; }
.tabbar a span { font-size: 1.35rem; line-height: 1; filter: grayscale(.6); }
.tabbar a[aria-current="page"] { color: var(--pri); }
.tabbar a[aria-current="page"] span { filter: none; transform: scale(1.12); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; inset-inline: 22%; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--pri), var(--pri2)); }
.badge { position: absolute; top: 4px; inset-inline-start: calc(50% + 6px); background: #dc2626; color: #fff; border-radius: 99px; font-style: normal; font-size: .68rem; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; font-weight: 700; }
.card .badge { position: static; }

/* ---------- headings ---------- */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.pagehead h1 { font-size: 1.5rem; }
.count { background: #e0e7ff; color: var(--pri); font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.sec { font-size: 1rem; margin: 20px 4px 8px; color: #334155; }
.sec small { color: var(--muted); font-weight: 400; }
.back { display: inline-block; margin: 0 0 10px; text-decoration: none; font-weight: 600; padding: 6px 0; }

/* ---------- hero + SOS ---------- */
.hero { border-radius: 22px; padding: 18px 18px 20px; color: #fff; background: linear-gradient(135deg, var(--tc, #4338ca), #312e81 70%); box-shadow: var(--sh); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .1); left: -50px; top: -70px; }
.hero .hi { font-size: 1.45rem; font-weight: 800; }
.hero .sub { opacity: .92; margin-top: 2px; }
.sos { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; width: 100%; margin: 14px 0 4px; padding: 18px 20px; border: 0; border-radius: 24px; cursor: pointer; text-align: start; color: #fff; background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 8px 22px rgba(220, 38, 38, .38), inset 0 -4px 0 rgba(0, 0, 0, .15); min-height: 96px; }
.sos:active { transform: scale(.98); }
.sos-i { grid-row: span 2; font-size: 2.6rem; }
.sos-t { font-size: 1.7rem; font-weight: 800; }
.sos-s { font-size: .85rem; opacity: .95; }

/* ---------- banners ---------- */
.banner { display: block; width: 100%; text-align: start; border: 0; border-radius: 16px; padding: 13px 15px; margin: 10px 0; font-size: .95rem; text-decoration: none; cursor: pointer; }
.banner b { display: block; }
.banner span { display: block; font-size: .85rem; opacity: .95; }
.banner.warn { background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; }
.banner.info { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }
.banner.ok { background: #dcfce7; color: #14532d; }
.banner.danger { background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff; }
.banner.orange { background: linear-gradient(135deg, #f97316, #c2410c); color: #fff; }
.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .55); } 50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); } }

/* ---------- cards / lists ---------- */
.list { display: grid; gap: 10px; }
.card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r); padding: 13px 14px; box-shadow: var(--sh); text-decoration: none; color: inherit; border: 1px solid transparent; }
a.card:active, .mrow.link:active { background: #eef2ff; }
.card > div { flex: 1; min-width: 0; }
.card b { display: block; }
.card small { color: var(--muted); display: block; font-size: .82rem; }
.card.closed { opacity: .72; }
.card.todo { border-color: #fecaca; background: linear-gradient(90deg, #fff, #fff7f7); }
.go { color: #94a3b8; font-size: 1.5rem; transform: scaleX(-1); }
.ic { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: color-mix(in srgb, var(--c) 14%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty .ei { font-size: 2.6rem; }

/* events */
.card.ev { align-items: stretch; border-inline-start: 6px solid var(--k); }
.card > .evdate { flex: none; }
.evdate { width: 52px; flex: none; text-align: center; border-radius: 14px; background: color-mix(in srgb, var(--k) 12%, #fff); padding: 6px 0; display: flex; flex-direction: column; justify-content: center; }
.evdate b { font-size: 1.45rem; color: var(--k); line-height: 1.1; }
.evdate small { color: var(--k); font-weight: 600; }
.evbody .ttl { font-size: 1.05rem; margin: 3px 0 1px; }
.evt { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kind { font-size: .78rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); padding: 2px 9px; border-radius: 99px; }
.kind.light { color: #fff; background: rgba(255, 255, 255, .22); }
.chip { display: inline-block; font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c, #64748b) 14%, #fff); color: color-mix(in srgb, var(--c, #334155) 85%, #000); border: 1px solid color-mix(in srgb, var(--c, #64748b) 30%, transparent); }
.chip.all { --c: #7c3aed; }
.chip.live { --c: #16a34a; }
.chip.free { --c: #16a34a; border-style: dashed; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #f1f5f9; color: #334155; }
.pill.ok { background: #dcfce7; color: #166534; }
.pill.no { background: #fee2e2; color: #991b1b; }
.pill.warn { background: #ffedd5; color: #9a3412; }
.pill.me { background: var(--pri); color: #fff; }
.pill.me.no { background: #dc2626; }
.pill.me.yes { background: #16a34a; }

.evhead { border-radius: 22px; padding: 18px; color: #fff; background: linear-gradient(135deg, var(--k), color-mix(in srgb, var(--k) 55%, #0f172a)); box-shadow: var(--sh); margin-bottom: 12px; }
.evhead h1 { font-size: 1.45rem; margin: 8px 0 6px; }
.evhead p { margin: 4px 0; }
.evhead .chip { background: rgba(255, 255, 255, .92); }
.evhead small { opacity: .85; }
.notes { white-space: pre-wrap; background: rgba(255, 255, 255, .16); padding: 8px 10px; border-radius: 12px; }
.box { background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--sh); margin: 12px 0; }
.box h2 { font-size: 1.08rem; margin-bottom: 10px; }
.box h3 { font-size: 1rem; margin: 12px 0 8px; }
.reason { color: #7f1d1d; background: #fef2f2; border-radius: 10px; padding: 6px 10px; margin: 8px 0 0; font-size: .9rem; display: block; }
.mlist small.reason { margin-top: 3px; }
.statbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: #e2e8f0; margin: 4px 0; }
.statbar .ok { background: #22c55e; } .statbar .no { background: #ef4444; } .statbar .warn { background: #f97316; } .statbar .pe { background: #cbd5e1; }
.bigstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.bigstats div { background: #f1f5f9; border-radius: 14px; padding: 10px 4px; font-size: .85rem; }
.bigstats b { display: block; font-size: 1.8rem; }
.bigstats .ok { background: #dcfce7; color: #166534; } .bigstats .no { background: #fee2e2; color: #991b1b; } .bigstats .warn { background: #ffedd5; color: #9a3412; }
.teamsum { flex-direction: column; align-items: stretch; border-inline-start: 6px solid var(--c); }
details summary { cursor: pointer; font-weight: 700; padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.mlist { list-style: none; margin: 0; padding: 0; }
.mrow { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border-bottom: 1px solid #eef2f7; text-decoration: none; color: inherit; }
.mrow:last-child { border-bottom: 0; }
.mrow > div { flex: 1; min-width: 0; }
.mrow b { display: block; }
.mrow small { color: var(--muted); display: block; font-size: .82rem; }
.mcards { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 2px 12px; gap: 0; }
.nopush { opacity: .55; font-size: .9rem; }
.av { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .95rem; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); }
.av.sm { width: 32px; height: 32px; font-size: .78rem; }
.av.lg { width: 84px; height: 84px; font-size: 1.8rem; border: 4px solid #fff; box-shadow: var(--sh); }

/* rsvp */
.rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp.three { grid-template-columns: 1fr 1fr 1fr; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 11px 16px; min-height: 48px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); text-align: center; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #4f46e5, #4338ca); color: #fff; border: 0; box-shadow: 0 4px 12px rgba(67, 56, 202, .3); }
.btn.danger { background: #fff; color: #b91c1c; border-color: #fecaca; }
.box .btn.danger, .w.danger { background: #fff5f5; }
.btn.danger.big, .sheet .btn.danger.w.big { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; border: 0; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 40px; padding: 7px 13px; font-size: .9rem; }
.btn.xs { min-height: 36px; padding: 5px 11px; font-size: .82rem; border-radius: 11px; }
.btn.big { min-height: 60px; font-size: 1.08rem; border-radius: 18px; }
.btn.w { width: 100%; margin: 8px 0; }
.btn.yes { border: 2px solid #86efac; color: #166534; background: #f0fdf4; }
.btn.no { border: 2px solid #fca5a5; color: #991b1b; background: #fef2f2; }
.btn.warnb { border: 2px solid #fdba74; color: #9a3412; background: #fff7ed; }
.btn.yes.on { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn.no.on { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn.warnb.on { background: #ea580c; color: #fff; border-color: #ea580c; }
.btn.on { box-shadow: 0 0 0 3px rgba(79, 70, 229, .25); }
.btn.call { background: #16a34a; color: #fff; border: 0; }
.btn.waze { background: #33ccff; color: #062a3a; border: 0; }
.btn.gmaps { background: #fff; border: 2px solid #4285f4; color: #1a56c7; }
.btngrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 8px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.col { display: grid; gap: 10px; }
.navrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.navrow .btn { min-height: 44px; padding: 8px; font-size: .92rem; }
.navrow.big .btn { min-height: 56px; font-size: 1.02rem; }
.linkbtn { background: none; border: 0; color: var(--pri); text-decoration: underline; padding: 2px; cursor: pointer; font-weight: 600; }
.round { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font-size: 1.2rem; flex: none; }
.round.sm { width: 38px; height: 38px; font-size: 1rem; }
.round.call { background: #dcfce7; }
.round.wa { background: #d1fae5; }

/* tiles */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.tile { border: 0; border-radius: 18px; padding: 12px 4px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, #fff), #fff); box-shadow: var(--sh), inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); font-weight: 700; color: color-mix(in srgb, var(--c) 75%, #000); font-size: .85rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 84px; justify-content: center; }
.tile span { font-size: 1.7rem; }
@media (max-width: 360px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }

/* seg controls */
.seg { display: flex; background: #e2e8f0; border-radius: 14px; padding: 4px; gap: 4px; margin: 0 0 12px; }
.seg button, .seg label { flex: 1; border: 0; background: transparent; border-radius: 11px; padding: 9px; font-weight: 700; color: #475569; cursor: pointer; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button[aria-selected="true"], .seg label:has(input:checked) { background: #fff; color: var(--pri); box-shadow: var(--sh); }
.seg3 { display: grid; gap: 8px; }
.seg3 button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px; font-weight: 700; text-align: start; min-height: 50px; cursor: pointer; }
.seg3 button.on { border-color: var(--pri); background: #eef2ff; color: var(--pri); }
.teamtabs { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; margin-bottom: 8px; }
.teamtabs button { flex: none; border: 2px solid color-mix(in srgb, var(--c) 40%, #fff); color: var(--c); background: #fff; border-radius: 99px; padding: 8px 16px; font-weight: 700; min-height: 44px; cursor: pointer; }
.teamtabs button[aria-selected="true"] { background: var(--c); color: #fff; }

/* rides */
.car { border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; }
.carh { display: flex; align-items: center; gap: 8px; }
.carh b { flex: 1; }
.pas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* profile */
.profile { text-align: center; border-radius: 22px; padding: 20px 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 20%, #fff), #fff 70%); box-shadow: var(--sh); }
.profile h1 { font-size: 1.4rem; margin-top: 8px; }
.profile .av { margin: 0 auto; }
.actions { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.act { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--ink); font-size: .78rem; font-weight: 600; }
.act span { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.35rem; box-shadow: var(--sh); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.veh { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.veh li { display: flex; align-items: center; gap: 10px; background: #f8fafc; border-radius: 12px; padding: 8px 10px; }
.veh small { color: var(--muted); }
.jump { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef2f7; }
.jump:last-child { border: 0; }
.jn { width: 32px; height: 32px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #f97316, #c2410c); color: #fff; font-weight: 800; display: grid; place-items: center; }
.jb { flex: 1; }
.jb small { display: block; color: var(--muted); }

/* alert / callout screens */
.alerthead { text-align: center; color: #fff; border-radius: 22px; padding: 18px; background: linear-gradient(135deg, #dc2626, #7f1d1d); margin-bottom: 12px; }
.alerthead.closed { background: linear-gradient(135deg, #16a34a, #14532d); }
.alerthead.orange { background: linear-gradient(135deg, #f97316, #9a3412); }
.alerthead.orange.closed { filter: grayscale(.5); }
.alerthead > .big, .emergbody > .big { font-size: 3rem; }
.alerthead h1 { font-size: 1.4rem; }
.mapbox { height: 220px; border-radius: 18px; overflow: hidden; box-shadow: var(--sh); background: #e2e8f0; margin: 10px 0; }
.mapbox.tall { height: 300px; }
.pickmap { height: 46vh; min-height: 260px; border-radius: 16px; overflow: hidden; background: #e2e8f0; margin: 8px 0; }
.leaflet-container { font-family: inherit; }

/* sheets */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.sheet-wrap.open { opacity: 1; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; overflow: auto; border-radius: 24px 24px 0 0; padding: 0 16px calc(20px + var(--safe-b)); transform: translateY(40px); transition: transform .2s; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.full .sheet { max-height: 100vh; max-height: 100dvh; height: 100%; border-radius: 0; padding-top: var(--safe-t); }
.sh-head { position: sticky; top: 0; z-index: 2; background: var(--bg); display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; }
.sh-head h2 { font-size: 1.2rem; }
.x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #e2e8f0; font-size: 1.1rem; cursor: pointer; }
.emerg .sheet { background: #111827; color: #fff; }
.emerg .sh-head { background: #111827; }
.emerg .x { background: #374151; color: #fff; }
.emergbody { text-align: center; border-radius: 24px; padding: 22px 14px; }
.emergbody.red { background: linear-gradient(160deg, #dc2626, #7f1d1d); }
.emergbody.orange { background: linear-gradient(160deg, #f97316, #9a3412); }
.emergbody h1 { font-size: 1.9rem; margin: 6px 0; }
.emergbody .btn.white { background: #fff; color: #b91c1c; border: 0; }
.emergbody .btn.ghostw { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .7); }
.emergbody .rsvp { margin: 14px 0; }

/* forms */
.fld { display: block; margin: 10px 0; font-weight: 600; font-size: .92rem; }
.fld input, .fld select, .fld textarea, .srch input, #pws, #psearch, #bks, .crow input, .vrow input, .vrow select { display: block; width: 100%; margin-top: 5px; padding: 12px; border: 1.5px solid #cbd5e1; border-radius: 13px; background: #fff; min-height: 48px; font-weight: 400; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--pri); outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, .2); }
.fld.inline { display: flex; align-items: center; gap: 8px; }
.fld.inline input { width: 90px; margin: 0; }
fieldset { border: 1.5px solid var(--line); border-radius: 16px; padding: 8px 12px 10px; margin: 12px 0; background: #fff; }
legend { font-weight: 700; padding: 0 6px; }
.cb { display: flex; align-items: center; gap: 8px; padding: 8px 0; min-height: 44px; cursor: pointer; font-weight: 600; }
.cb input { width: 22px; height: 22px; accent-color: var(--pri); }
.cb.tall { margin-top: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .cb { border: 1.5px solid color-mix(in srgb, var(--c, #64748b) 40%, #fff); border-radius: 99px; padding: 6px 12px; min-height: 42px; }
.chips .cb:has(input:checked) { background: color-mix(in srgb, var(--c, #4f46e5) 14%, #fff); border-color: var(--c, #4f46e5); }
.locpick { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; padding: 6px 0; }
.locpick span { flex: 1; min-width: 120px; font-weight: 400; color: #334155; }
.vrow { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 6px; margin: 6px 0; }
.vrow input, .vrow select, .crow input { margin: 0; padding: 9px; }
.crow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 6px 0; }
.srch { display: flex; gap: 8px; }
.srch input { margin: 0; }
.results { display: grid; gap: 4px; }
.res { text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; }
.pickppl summary { font-weight: 700; }
.pplist { max-height: 40vh; overflow: auto; }
.pplist .row small { color: var(--muted); margin-inline-start: auto; }
.filebtn { cursor: pointer; }
.tablewrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .85rem; background: #fff; }
.tbl th, .tbl td { padding: 7px; border-bottom: 1px solid var(--line); text-align: start; }
.tbl tr.bad { background: #fee2e2; }
.steps li { margin: 8px 0; }
.pwbig { font-size: 2.4rem; font-weight: 800; text-align: center; background: #fff; border-radius: 16px; padding: 14px; margin: 10px 0; letter-spacing: .2em; }
.pwrow { align-items: flex-start; }
.pwval { font-size: 1.2rem; font-weight: 800; color: var(--pri); margin-top: 4px; }
.msg { display: block; }
.msg summary { display: flex; align-items: center; gap: 12px; list-style: none; padding: 0; }
.msg summary::-webkit-details-marker { display: none; }
.msg summary > div { flex: 1; min-width: 0; }
.msg.unread { border-color: #a5b4fc; background: #eef2ff; }
.msg.unread b::after { content: " ●"; color: #4f46e5; }
.msg.urgent { border-color: #fca5a5; }
.msgbody { white-space: normal; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.book { border-inline-start: 5px solid var(--c); }

/* login */
#login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: linear-gradient(150deg, #3730a3, #6d28d9 50%, #0ea5e9); }
.authcard { width: 100%; max-width: 420px; background: #fff; border-radius: 26px; padding: 24px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.authcard h1 { text-align: center; font-size: 1.6rem; }
.authcard .lead { text-align: center; color: var(--muted); }
.logo { font-size: 3rem; text-align: center; }

/* toast */
#toast { position: fixed; bottom: calc(80px + var(--safe-b)); inset-inline: 16px; margin: 0 auto; max-width: 480px; background: #0f172a; color: #fff; padding: 13px 16px; border-radius: 14px; text-align: center; font-weight: 600; z-index: 90; opacity: 0; transform: translateY(20px); transition: .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: none; }
#toast.err { background: #b91c1c; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 700px) { .list { grid-template-columns: 1fr 1fr; } .mcards { grid-template-columns: 1fr; } }

.monthnav { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 16px; padding: 6px; box-shadow: var(--sh); margin-bottom: 10px; }
.monthnav b { font-size: 1.1rem; }
.monthnav .btn { font-size: 1.5rem; min-width: 52px; }
.card.shift { border-inline-start: 5px solid var(--c); }
.card.mineshift { background: linear-gradient(90deg, #fff, #eff6ff); }
.tabbar a { font-size: .68rem; }
.dayload { background: #fff; border: 1.5px dashed #93c5fd; border-radius: 14px; padding: 10px 12px; margin: 8px 0; font-size: .9rem; }
.dayload ul { margin: 6px 0 0; padding-inline-start: 18px; }
.dayload small { color: var(--muted); }
.card.bdtoday { background: linear-gradient(90deg, #fff7ed, #fdf2f8); border-color: #f9a8d4; }
.crewlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.crewlist .cb { font-weight: 500; min-height: 40px; padding: 4px 0; }
.crewlist small { color: var(--muted, #64748b); font-weight: 400; }
/* callout options: forces & tasks */
.planname { background: rgba(255,255,255,.18); border-radius: 12px; padding: 8px 10px; margin: 6px 0; }
.planforce { border: 2px solid color-mix(in srgb, var(--c) 45%, transparent); border-radius: 16px; padding: 8px 10px; margin: 8px 0; background: color-mix(in srgb, var(--c) 7%, #fff); color: #1e1b4b; text-align: right; }
.planforce.mine { border-width: 3px; box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 30%, transparent); }
.planforce h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 2px 0 6px; }
.planforce .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: none; }
.planforce .chip { background: var(--c); color: #fff; border-radius: 999px; padding: 1px 10px; font-size: .8rem; }
.planrow { display: flex; flex-direction: column; gap: 2px; padding: 7px 0; border-top: 1px dashed #cbd5e1; }
.planrow:first-of-type { border-top: 0; }
.planrow small { color: #475569; }
.planmine { max-height: 34vh; overflow: auto; margin: 6px 0; }
.planmap img { width: 100%; border-radius: 12px; display: block; }
.planprev { background: #f8fafc; border-radius: 12px; padding: 6px 10px; margin-bottom: 8px; }
.planprev summary { font-weight: 700; cursor: pointer; padding: 4px 0; }
.jgrp { font-weight: 700; color: #4338ca; font-size: .9rem; margin: 10px 0 2px; padding-top: 6px; border-top: 1px dashed #c7d2fe; }
.jgrp:first-child { border-top: 0; margin-top: 0; }
/* unit emblem: header, login, and a faint watermark behind the whole app */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brandlogo { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
img.logo { display: block; width: 128px; height: 128px; margin: 0 auto 6px; border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url("/emblem.png") center 55% / min(88vw, 520px) no-repeat; opacity: .13; }
.box.done { border: 2px solid #22c55e; background: #f0fdf4; }
.box.pay .paid { font-weight: 700; color: #15803d; margin: 0 0 6px; }
.box.pay .btn.w + .btn.w { margin-top: 8px; }
details.paybox > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.planrow .sqhead { display: block; font-style: normal; font-weight: 700; font-size: .82rem; color: var(--c, #16a34a); }
.btn.emergbtn { margin: 10px 0 4px; border: 2px solid #fecaca; color: #b91c1c; background: #fff5f5; font-weight: 800; min-height: 52px; }
.emerglist .mrow { gap: 8px; }
.phgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 10px; }
.phthumb { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: #e2e8f0; cursor: pointer; }
.phthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phfull img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #0f172a; display: block; }
.box.photos .btn.primary { margin-bottom: 6px; }
#gdred { word-break: break-all; flex: 1; min-width: 0; direction: ltr; text-align: left; }
/* weak signal / offline bar (owner 2026-12-05) */
#netbar { position: sticky; top: calc(var(--safe-t) + 56px); z-index: 19; background: #fef3c7; color: #78350f; border-bottom: 1px solid #f59e0b; padding: 8px 14px; font-size: .9rem; font-weight: 600; }
#netbar .linkbtn { color: #92400e; }
#sosfb { margin-top: 14px; }
/* upcoming Israeli holidays strip (events page) */
.holi { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; background: #eef2ff; color: #3730a3; border-radius: 12px; padding: 8px 12px; margin: 8px 0 12px; font-size: .9rem; }
/* settlements (team picker / shifts) */
.sitegrp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; }
.sitehead { width: 100%; font-size: .9rem; color: #334155; }
.sitesub { margin: 6px 4px 4px; font-size: .95rem; color: #475569; }
/* help & support */
.qhelp { display: inline-grid; place-items: center; width: 24px; height: 24px; min-height: 24px; padding: 0; margin-inline: 6px; border-radius: 50%; border: 1.5px solid #6366f1; background: #eef2ff; color: #4338ca; font-weight: 800; font-size: 14px; line-height: 1; cursor: pointer; vertical-align: middle; flex: none; }
.qhelp.static { display: inline-grid; cursor: default; }
.qhelp::after { content: ""; position: absolute; inset: -10px; } .qhelp { position: relative; }
.pagehead h1 .qhelp { width: 26px; height: 26px; font-size: 15px; }
.helpfoot { margin-top: 14px; border-top: 1px solid #e2e8f0; padding-top: 10px; display: grid; gap: 8px; }
.fixlist { margin: 0 0 14px; padding-inline-start: 20px; display: grid; gap: 10px; }
.fixlist small { display: block; color: #475569; margin-top: 2px; }
#toast.tap { pointer-events: auto; cursor: pointer; text-decoration: underline; }
.chat { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.bub { max-width: 85%; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px #0001; }
.bub small { display: block; margin-top: 4px; color: #64748b; font-size: .78rem; }
.bub.me { align-self: flex-start; background: #e0e7ff; }
.bub.them { align-self: flex-end; }
button.card { width: 100%; font: inherit; text-align: start; cursor: pointer; }

/* in-app booklet reader */
.guidebar { position: sticky; top: calc(var(--safe-t) + 56px); z-index: 15; display: flex; gap: 8px; align-items: center; background: var(--bg, #eef0f8); padding: 6px 0; }
.guidebar .back { margin: 0; flex: 1; font-weight: 700; }
.guidet { font-size: 1.15rem; margin: 4px 0; }
.guide { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.guide img { display: block; width: 100%; height: auto; margin: 0 0 10px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.15); background: #fff; }
.guide.zoom img { width: 200%; max-width: none; }

/* install videos */
.inst video { width: 100%; max-width: 250px; display: block; margin: 0 auto 10px; border-radius: 14px; background: #000; }
.inst ol { padding-inline-start: 22px; margin: 6px 0; }

.warnc { color: #b45309; }
.pwf { flex-wrap: wrap; }
.pwf label { flex: 1 1 45%; }
#pwt { width: 100%; padding: 10px; font: inherit; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; margin: 4px 0 8px; }

/* 👁 show/hide password */
.pwwrap { position: relative; display: block; }
.pwwrap input { padding-inline-end: 48px !important; }
.pweye { position: absolute; inset-inline-end: 4px; bottom: 0; height: 48px; width: 44px; border: 0; background: none; font-size: 1.25rem; cursor: pointer; padding: 0; }

/* install nudge bar (owner 2026-12-06) */
#instbar { position: fixed; inset-inline: 8px; bottom: calc(8px + var(--safe-b)); z-index: 40; max-width: 520px; margin: 0 auto; background: #312e81; color: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .35); font-size: .92rem; }
body:has(#app:not([hidden])) #instbar { bottom: calc(66px + var(--safe-b)); }
#instbar .instrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
#instbar .instrow .btn.primary { flex: 1; background: #fff; color: #312e81; }
#instbar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
#instbar .instarrow { text-align: center; font-size: 1.6rem; animation: instb 1s infinite; }
@keyframes instb { 50% { transform: translateY(6px); } }

/* owner 2026-12-06 (Samsung Internet): vh counts the space under the browser bars, so a tall sheet started above the
   visible screen and its title was cut. dvh = the visible height; the wrapper also stays inside the visible area. */
@supports (height: 100dvh) { .sheet-wrap { height: 100dvh; top: auto; bottom: 0; } }

/* phone book filters (owner 2026-12-06) */
#bks { margin-bottom: 8px; }
.bkf select { width: 100%; padding: 10px; font: inherit; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; margin-bottom: 8px; }
.bkf .seg { flex-wrap: wrap; }
.book .star { font-size: .95em; }
