/* The app's lettering, served from the app itself (no visit to Google Fonts). Fredoka and Figtree: SIL Open Font License (fonts/LICENSE-*.txt). */
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/fredoka-500.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/fredoka-600.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/fredoka-700.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/figtree-500.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/figtree-700.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/figtree-800.woff2") format("woff2"); }
:root {
  --bg: #e8e9ef; --bg2: #d9dbe4; --ink: #16163a; --paper: #ffffff; --cream: #fff6e0; --muted: #5a5c84;
  /* Soft pastels for the picture buttons (toned down after the owner's feedback that they were too bright). */
  --sun: #fbe39a; --tomato: #f7aca3; --mint: #a9e2cb; --bubble: #f5bcd6; --grape: #cdbef5; --orange: #f8ca9e; --aqua: #b0e1f2;
  --good: #d6f8ea; --good-line: #2fb57f; --warn: #fff1c2; --warn-line: #e0a800; --bad: #ffe0dd; --bad-line: #e0453a;
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
html.big { font-size: 118%; }
body { color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.45; min-height: 100vh;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  background:
    radial-gradient(circle at 12% 8%, rgba(139,227,255,0.45) 0 60px, transparent 61px),
    radial-gradient(circle at 92% 22%, rgba(255,224,122,0.6) 0 46px, transparent 47px),
    radial-gradient(circle at 6% 58%, rgba(255,163,205,0.5) 0 36px, transparent 37px),
    radial-gradient(circle at 96% 78%, rgba(126,230,191,0.5) 0 54px, transparent 55px),
    radial-gradient(rgba(22,22,58,0.08) 1.5px, transparent 1.6px) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed; }
button, input, a { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 4px solid #3b7bff; outline-offset: 3px; }
[hidden] { display: none !important; }

.app { max-width: 480px; margin: 0 auto; padding-inline: 16px; padding-block: 14px 40px; display: grid; gap: 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.where { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.9rem; background: var(--paper); border: 2.5px solid var(--ink); padding: 5px 12px 5px 8px; border-radius: 999px; min-width: 0; }
#where-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.where-change { flex: none; font-size: 0.75rem; font-weight: 800; color: var(--muted); border-left: 2px solid #c9cbe0; padding-left: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #aab; flex: none; }
.dot.on { background: var(--good-line); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47,181,127,0.7); } 100% { box-shadow: 0 0 0 10px rgba(47,181,127,0); } }
.fam-btn { width: 46px; height: 46px; border-radius: 16px; border: 3px solid var(--ink); background: var(--sun); display: grid; place-items: center; box-shadow: 0 4px 0 var(--ink); flex: none; }
.fam-btn svg { width: 24px; height: 24px; stroke: var(--ink); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.hero { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: end; }
.buddy { width: 96px; height: 110px; animation: bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
.buddy .eye { animation: blink 4.5s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.buddy .arm { animation: wave 2.4s ease-in-out infinite; transform-origin: 8px 8px; transform-box: fill-box; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-18deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-12deg); } }
.bubble { position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; padding: 12px 14px; box-shadow: 0 5px 0 var(--ink); display: grid; gap: 8px; margin-bottom: 18px; }
.bubble::before { content: ""; position: absolute; left: -15px; bottom: 16px; width: 22px; height: 22px; background: var(--paper); border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg) skew(10deg, 10deg); border-radius: 0 0 0 6px; }
.bubble .hi { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.05; margin: 0; }
.bubble .say { margin: 0; font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.bubble .intro-btn { justify-self: start; min-height: 36px; padding: 4px 12px; font-size: 0.85rem; background: var(--sun); box-shadow: 0 3px 0 var(--ink); }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.acts button { border: 2.5px solid var(--ink); border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 0.85rem; background: var(--c, var(--sun)); min-height: 36px; box-shadow: 0 3px 0 var(--ink); }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #cfd2dc; border-radius: 20px; padding: 5px; }
.modes button { border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 15px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.modes button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.modes button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 4px 0 var(--ink); border: 3px solid var(--ink); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 4px; }
.tile { aspect-ratio: 1 / 1.05; border: 3.5px solid var(--ink); border-radius: 28px; background: var(--c); color: var(--ink); text-align: left; padding: 10px 12px 12px;
  display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; box-shadow: 0 7px 0 var(--ink);
  transition: transform 140ms cubic-bezier(.3,1.6,.5,1), box-shadow 140ms; transform: rotate(var(--tilt, 0deg)); }
.tile::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; right: -40px; top: -40px; background: rgba(255,255,255,0.3); }
.tile:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.tile .art { width: 72%; max-width: 110px; aspect-ratio: 1; position: relative; z-index: 1; align-self: center; filter: drop-shadow(0 3px 0 rgba(22,22,58,0.25)); }
.tile .art svg, .band .art svg { width: 100%; height: 100%; display: block; }
.tile .label { position: relative; z-index: 1; display: grid; }
.tile .name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.tile .meta { font-size: 0.78rem; font-weight: 800; opacity: 0.75; }
.tile .near { position: absolute; top: 9px; right: 9px; z-index: 2; font-size: 0.75rem; font-weight: 800; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 2px 8px; }
.grid.drive .tile { aspect-ratio: 1 / 1.15; }
.grid.drive .tile .name { font-size: 1.7rem; }
.grid.drive .tile .art { width: 80%; max-width: 140px; }
.note { margin: 0; text-align: center; font-weight: 700; font-size: 0.88rem; }
.foot { display: grid; gap: 10px; color: var(--muted); font-size: 0.8rem; text-align: center; }
.foot .btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pill { border: 2.5px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 6px 14px; font-weight: 800; min-height: 40px; }

.scrim { position: fixed; inset: 0; background: rgba(16,16,50,0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet { background: var(--cream); width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; border-radius: 30px 30px 0 0; border: 3.5px solid var(--ink); border-bottom: 0;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; align-content: start; animation: up 260ms cubic-bezier(.2,1.3,.5,1); }
@keyframes up { from { transform: translateY(60px); } to { transform: none; } }
.band { background: var(--c, var(--sun)); border-bottom: 3.5px solid var(--ink); padding: 14px 16px 16px; display: grid; grid-template-columns: 64px minmax(0, 1fr) 44px; gap: 12px; align-items: center; position: sticky; top: 0; z-index: 2; }
.band.noart { grid-template-columns: minmax(0, 1fr) 44px; }
.band .art { width: 64px; height: 64px; }
.band h2 { font-family: var(--display); font-weight: 700; font-size: 1.55rem; margin: 0; line-height: 1; }
.band p { margin: 4px 0 0; font-size: 0.82rem; font-weight: 800; opacity: 0.8; }
.close { border: 3px solid var(--ink); background: var(--paper); border-radius: 14px; width: 44px; height: 44px; font-size: 1.4rem; font-weight: 800; line-height: 1; box-shadow: 0 3px 0 var(--ink); }
.inner { padding-inline: 16px; display: grid; gap: 14px; }
.fit { font-size: 0.88rem; font-weight: 700; background: var(--paper); border: 2.5px dashed var(--ink); border-radius: 16px; padding: 10px 12px; margin: 0; }
.sorts { display: flex; gap: 6px; flex-wrap: wrap; }
.sorts button { border: 2.5px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 0.85rem; min-height: 38px; }
.sorts button[aria-pressed="true"] { background: var(--ink); color: var(--sun); }
.sorts button.locked { opacity: 0.55; }
.sorts span { align-self: center; font-size: 0.8rem; font-weight: 800; color: var(--muted); margin-right: 2px; }

.place { background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; padding: 14px; display: grid; gap: 10px; box-shadow: 0 5px 0 var(--ink); }
.place-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.place h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 0; line-height: 1.1; min-width: 0; overflow-wrap: anywhere; }
.place .addr { margin: 2px 0 0; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.mins { flex: none; text-align: center; background: var(--c); border: 2.5px solid var(--ink); border-radius: 14px; padding: 4px 8px; min-width: 60px; }
.mins b { display: block; font-family: var(--display); font-size: 1.25rem; line-height: 1; }
.mins small { font-weight: 800; font-size: 0.7rem; }
.pick { justify-self: start; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; background: var(--ink); color: var(--sun); border-radius: 999px; padding: 2px 10px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 0.75rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #eef0ff; border: 2px solid transparent; }
.badge.good { background: var(--good); border-color: var(--good-line); }
.badge.warn { background: var(--warn); border-color: var(--warn-line); }
.badge.bad { background: var(--bad); border-color: var(--bad-line); }
.badge.star { background: #fff4c8; border-color: #e6b800; }
.hyg { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 800; border-radius: 12px; padding: 3px 4px 3px 9px; border: 2px solid var(--line); background: var(--fill); }
.hyg b { font-family: var(--display); font-size: 1rem; background: var(--line); color: #fff; border-radius: 8px; padding: 0 7px; }
.go { display: flex; gap: 8px; }
.go a, .go button { flex: 1; min-height: 46px; border-radius: 14px; border: 3px solid var(--ink); font-weight: 800; background: var(--paper); box-shadow: 0 3px 0 var(--ink); display: grid; place-items: center; text-decoration: none; }
.go a { flex: 2; background: var(--ink); color: var(--sun); }
.fresh { display: flex; gap: 10px; align-items: center; background: var(--warn); border: 2.5px solid var(--warn-line); border-radius: 16px; padding: 10px 12px; }
.fresh p { margin: 0; font-size: 0.85rem; font-weight: 700; flex: 1; min-width: 0; }
.fresh .pill { flex: none; }
.credit { font-size: 0.75rem; color: var(--muted); margin: 0; text-align: center; }

.looking { display: grid; justify-items: center; gap: 8px; padding: 24px 0; text-align: center; font-weight: 800; }
.looking svg { width: 72px; height: 82px; animation: hop 0.7s ease-in-out infinite alternate; }
@keyframes hop { from { transform: translateY(0); } to { transform: translateY(-12px); } }

.fields { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field > span { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.field small { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices button { border: 2.5px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 6px 14px; font-weight: 700; min-height: 42px; box-shadow: 0 3px 0 var(--ink); }
.choices button[aria-pressed="true"] { background: var(--sun); font-weight: 800; }
.inline { display: flex; gap: 8px; }
input[type=text], input[type=password] { padding: 10px 14px; border-radius: 14px; border: 3px solid var(--ink); background: var(--paper); font-weight: 700; min-height: 46px; width: 100%; min-width: 0; }
.solid { min-height: 46px; border-radius: 14px; border: 3px solid var(--ink); background: var(--mint); font-weight: 800; padding: 0 14px; box-shadow: 0 3px 0 var(--ink); flex: none; }
.done { min-height: 52px; border-radius: 16px; border: 3px solid var(--ink); background: var(--mint); font-family: var(--display); font-weight: 700; font-size: 1.15rem; box-shadow: 0 4px 0 var(--ink); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) 2rem; gap: 10px; align-items: center; font-size: 0.85rem; font-weight: 700; }
.track { height: 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.fill { height: 100%; background: var(--c); }
textarea { width: 100%; font-size: 0.85rem; padding: 10px; border-radius: 14px; border: 2.5px solid var(--ink); background: var(--paper); }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--sun); padding: 12px 18px; border-radius: 16px; font-weight: 800; z-index: 20; max-width: calc(100% - 32px); text-align: center; }
@media (prefers-reduced-motion: reduce) { .buddy, .buddy .eye, .buddy .arm, .dot.on, .sheet, .looking svg { animation: none; } .tile { transition: none; } }

.offline { position: sticky; top: 0; z-index: 30; background: var(--ink); color: var(--sun); text-align: center; font-weight: 800; font-size: 0.9rem; padding: 8px 16px; }
.install { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 10px 12px; box-shadow: 0 4px 0 var(--ink); }
.install p { margin: 0; flex: 1; min-width: 0; font-weight: 700; font-size: 0.9rem; }
.install .pill { background: var(--mint); flex: none; }
.install-x { border: 0; background: none; font-size: 1.5rem; font-weight: 800; width: 40px; height: 40px; flex: none; }
.readout { justify-self: start; background: var(--sun); }
.steps { margin: 0; padding-left: 1.6em; display: grid; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.35rem; }
html.big .tile .name { font-size: 1.15rem; }
html.big .grid.drive .tile .name { font-size: 1.5rem; }
html.big .modes button { font-size: 0.92rem; gap: 6px; padding: 8px 6px; }
html.big .modes button svg { width: 18px; height: 18px; }

/* Family features */
.fstrip { display: grid; gap: 8px; }
.fcard { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 8px 10px 8px 14px; box-shadow: 0 4px 0 var(--ink); }
.fcard p { margin: 0; flex: 1 1 160px; min-width: 0; font-weight: 800; font-size: 0.92rem; }
.fcard .pill { flex: none; min-height: 40px; }
.fcard.live { background: var(--tomato); }
.fcard.ask { background: var(--bubble); }
.fcard.trip { background: var(--aqua); }
.fcard.note { background: var(--grape); }
.fcard.grab { background: var(--sun); cursor: pointer; }
.pill.small { min-height: 36px; padding: 4px 12px; font-size: 0.85rem; }
.pill.danger { border-color: var(--bad-line); color: #9c1d14; background: var(--paper); }
.danger-zone { border-top: 2.5px dashed var(--ink); padding-top: 14px; }
.bigcode { margin: 0; font-family: var(--display); font-weight: 700; font-size: 2.2rem; letter-spacing: 0.18em; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 6px 14px; text-align: center; }
.member { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 12px; display: grid; gap: 8px; }
.member-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.member small { color: var(--muted); font-weight: 600; }
.tags { font-size: 0.8rem; font-weight: 800; color: var(--muted); }
.acts2 { display: flex; gap: 6px; flex-wrap: wrap; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 2.5px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 8px 14px; font-weight: 800; min-height: 44px; box-shadow: 0 3px 0 var(--ink); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
/* Warnings that need reading: no personal or medical details; before children's sharing is switched on. */
.notice { background: var(--warn); border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 12px; }
.notice b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.05rem; margin-bottom: 2px; }
.notice p { margin: 0; font-weight: 600; font-size: 0.92rem; }
.notice-list { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
/* Small pop-ups (a quick tip, or a confirmation) over the screen. */
.popup-back { position: fixed; inset: 0; z-index: 30; background: rgba(16,16,50,0.45); display: grid; place-items: center; padding: 16px; }
.popup { width: 100%; max-width: 360px; background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); padding: 16px 16px 14px; display: grid; gap: 8px; }
.popup h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.1; }
.popup p { margin: 0; font-weight: 600; font-size: 0.98rem; }
.popup-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.popup-btns .done { width: auto; padding: 10px 18px; }
.done:disabled, .solid:disabled, .pill:disabled { opacity: 0.45; box-shadow: none; transform: none; cursor: not-allowed; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; margin: 4px 0; }
.agree input { width: 26px; height: 26px; flex: 0 0 auto; accent-color: var(--ink); margin: 2px 0 0; }
.record { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: 0.88rem; font-weight: 600; }
.record b { font-weight: 800; }
.chip.editing { background: var(--bad, #ffe1de); }
.chip.plain { background: transparent; box-shadow: none; border-style: dashed; }
.solid.say { background: var(--bubble); }
.grab-row { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 12px; flex-wrap: wrap; }
.grab-row.claimed { background: #fff4c8; }
.grab-text { flex: 1 1 140px; min-width: 0; display: grid; }
.grab-text b { font-family: var(--display); font-weight: 600; font-size: 1.2rem; overflow-wrap: anywhere; }
.grab-row small { color: var(--muted); font-weight: 700; font-size: 0.8rem; }
.grab-btns { display: flex; gap: 6px; }
.pill.got { background: var(--mint); }
.pill.x { width: 40px; padding: 0; }
.done-row { opacity: 0.6; }
.done-row b { text-decoration: line-through; }
.done.alt { background: var(--aqua); }
.done.stop { background: var(--tomato); }
.live-note { margin: 0; }
.mapbox { height: 320px; max-width: 100%; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--paper); display: grid; place-items: center; font-weight: 700; }
.pin { display: inline-block; transform: translate(-50%, -100%); background: var(--sun); border: 2.5px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-family: var(--body); font-weight: 800; font-size: 13px; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); }
.grabnote { flex-wrap: wrap; }

/* Events */
.filters { background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 4px 0 var(--ink); overflow: hidden; }
.filters-head { width: 100%; border: 0; background: var(--grape); text-align: left; padding: 10px 14px; display: grid; gap: 2px; min-height: 52px; }
.filters-head b { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.filters-head b::after { content: " ▾"; }
.filters-head[aria-expanded="true"] b::after { content: " ▴"; }
.filters-sum { font-size: 0.82rem; font-weight: 800; }
.filters-body { display: grid; gap: 12px; padding: 12px 14px 14px; border-top: 3px solid var(--ink); }
.frow { display: grid; gap: 6px; }
.flabel { font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.datepick { padding: 8px 12px; border-radius: 14px; border: 3px solid var(--ink); background: var(--paper); font-weight: 700; min-height: 44px; max-width: 220px; }
.filters-body > .pill { justify-self: start; }
.evlist { display: grid; gap: 14px; }
.event .evimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; border: 2.5px solid var(--ink); display: block; background: #eef0ff; }
.evwhen { margin: 0 0 2px; font-weight: 800; font-size: 0.82rem; color: #5b3fc4; }
.event .go a { flex: 1 1 0; text-align: center; padding: 4px 8px; line-height: 1.15; }
.go a.alt { background: var(--paper); color: var(--ink); }
.links { display: flex; gap: 6px; flex-wrap: wrap; }
.links a { text-decoration: none; display: inline-flex; align-items: center; background: #f1ecff; }
.websearch .links a { background: var(--paper); }
.foot a { color: inherit; font-weight: 800; }

/* Welcome and location */
.solid.alt { background: var(--aqua); }
.wstatus { margin: 0; font-weight: 800; color: #1d7a55; }
.readout.on { background: var(--tomato); }
.sorts.travel button[aria-pressed="true"] { background: var(--aqua); color: var(--ink); }
/* Distance and theme chips: a little smaller, so each row fits on one line on a phone. */
.sorts.distance, .sorts.themes { gap: 5px; }
.sorts.distance button, .sorts.themes button { padding: 3px 9px; min-height: 34px; }
.sorts.distance span { min-width: 4.6em; }
.sorts.themes button[aria-pressed="true"] { background: var(--sun); color: var(--ink); }
.sorts.themes .more { border-style: dashed; }

/* ---------- Compact layout: the home screen fits on one phone screen ---------- */
.app { gap: 12px; padding-block: 10px 32px; }
.fam-btn { width: 42px; height: 42px; border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
.where { padding: 4px 12px 4px 8px; min-height: 40px; }

.hero { grid-template-columns: 58px minmax(0, 1fr); gap: 8px; }
.buddy { width: 58px; height: 66px; }
.bubble { display: block; padding: 8px 12px 10px; border-radius: 18px; box-shadow: 0 4px 0 var(--ink); margin-bottom: 8px; }
.bubble::before { left: -12px; bottom: 12px; width: 16px; height: 16px; }
.bubble .hi { display: inline; font-size: 1.05rem; margin-right: 4px; }
.bubble .say { display: inline; font-size: 0.88rem; }
.bubble .intro-btn { display: block; margin-top: 6px; }
.bubble .acts { margin-top: 6px; }
.acts button { min-height: 32px; padding: 3px 10px; font-size: 0.8rem; }

.modes { padding: 4px; border-radius: 16px; }
.modes button { min-height: 40px; padding: 6px; font-size: 0.98rem; border-radius: 12px; }
.modes button[aria-pressed="true"] { box-shadow: 0 3px 0 var(--ink); }

.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 0; }
.tile { aspect-ratio: 1 / 1.14; border-width: 3px; border-radius: 20px; padding: 6px 4px 8px; align-items: center; text-align: center; box-shadow: 0 5px 0 var(--ink); }
.tile::after { width: 60px; height: 60px; right: -22px; top: -22px; }
.tile .art { width: 72%; max-width: 64px; }
.tile .label { justify-items: center; }
.tile .name { font-size: 0.86rem; line-height: 1.05; }
.tile .meta { display: none; }
.tile .near { top: 3px; right: 3px; font-size: 0.62rem; padding: 1px 5px; }
.tile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
/* On the road: giant buttons for passengers. */
.grid.drive { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid.drive .tile { aspect-ratio: 1 / 1.05; border-radius: 26px; padding: 10px 12px 12px; align-items: stretch; text-align: left; box-shadow: 0 7px 0 var(--ink); }
.grid.drive .tile .label { justify-items: start; }
.grid.drive .tile .meta { display: block; }
.grid.drive .tile .near { top: 9px; right: 9px; font-size: 0.75rem; padding: 2px 8px; }
/* Bigger text: three to a row. */
html.big .grid:not(.drive) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html.big .tile .name { font-size: 0.95rem; }

.fstrip { gap: 6px; }
.fcard { flex-wrap: nowrap; gap: 6px; padding: 4px 5px 4px 12px; border-radius: 16px; box-shadow: 0 3px 0 var(--ink); border-width: 2.5px; }
.fcard p { flex: 1 1 0; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard .pill { min-height: 34px; padding: 2px 12px; font-size: 0.85rem; }

/* Screens that slide up */
.sheet { gap: 12px; }
.band { grid-template-columns: 48px minmax(0, 1fr) 40px; padding: 10px 14px 12px; gap: 10px; }
.band.noart { grid-template-columns: minmax(0, 1fr) 40px; }
.band .art { width: 48px; height: 48px; }
.band h2 { font-size: 1.35rem; }
.close { width: 40px; height: 40px; border-radius: 12px; font-size: 1.25rem; }
.inner { gap: 12px; }
.sorts button { min-height: 34px; padding: 3px 11px; font-size: 0.82rem; }
.place { padding: 12px; gap: 8px; border-radius: 18px; box-shadow: 0 4px 0 var(--ink); }
.place h3 { font-size: 1.1rem; }
.badges { gap: 4px; }
.badge { padding: 2px 8px; font-size: 0.72rem; }
.go { gap: 6px; }
.go a, .go button { min-height: 40px; border-radius: 12px; border-width: 2.5px; }
.fields { gap: 12px; }
.choices { gap: 6px; }
.choices button { min-height: 38px; padding: 4px 12px; }
.done { min-height: 48px; }

/* Event cards: small picture beside the details; web searches behind one button. */
.event .place-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.event .evimg { width: 64px; height: 64px; aspect-ratio: auto; border-radius: 12px; }
.event .place-row.noimg { grid-template-columns: minmax(0, 1fr) auto; }
.event h3 { font-size: 1.02rem; }
.event .go a { font-size: 0.92rem; }
.go .searchbtn { flex: 0 0 46px; padding: 0; }
.searchbtn svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 2.6; stroke-linecap: round; }
.searchbtn[aria-expanded="true"] { background: #f1ecff; }

/* Tabs inside the Family screen */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: #e6dcc0; border-radius: 14px; padding: 4px; }
.tabs button { border: 0; background: transparent; border-radius: 10px; min-height: 38px; font-weight: 800; font-size: 0.88rem; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 2px 0 var(--ink); border: 2px solid var(--ink); }

/* Welcome */
.solid { min-height: 42px; }
input[type=text] { min-height: 42px; padding: 8px 12px; }
.app, .fstrip { grid-template-columns: minmax(0, 1fr); }
.bubble { margin-bottom: 4px; }
.modes button { white-space: nowrap; font-size: 0.92rem; gap: 6px; }
.tile { padding-inline: 2px; }
.tile .name { font-size: clamp(0.7rem, 3.1vw, 0.86rem); letter-spacing: -0.01em; }
.grablist { display: grid; gap: 8px; }
.quick { gap: 6px; }
.chip { min-height: 38px; padding: 5px 11px; font-size: 0.9rem; box-shadow: 0 2px 0 var(--ink); }
.grab-row { padding: 8px 10px; gap: 8px; }
.grab-text b { font-size: 1.05rem; }
/* Home layout chosen by fitGrid() in app.js from the screen size. */
.grid:not(.drive) { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.grid:not(.drive) .tile { aspect-ratio: 1 / var(--tile-ratio, 1.14); }
html.big .grid:not(.drive) { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.tile .art { aspect-ratio: auto; flex: 1 1 0; min-height: 0; width: 100%; max-width: none; margin-bottom: 2px; }
.grid:not(.drive) .tile .art { max-height: 64px; }
/* Narrow phones: mode buttons without icons so nothing runs off the edge. */
.modes button { min-width: 0; }
@media (max-width: 359px) { .modes button svg { display: none; } .modes button { font-size: 0.85rem; } }
html.big .modes button { white-space: normal; line-height: 1.1; }
/* Short screens (set by fitGrid when it helps everything fit): no speech bubble, slimmer bars. */
html.tight .hero { display: none; }
html.tight .app { gap: 8px; }
html.tight .fcard { padding-block: 2px; }
html.tight .fcard .pill { min-height: 30px; }
html.tight .modes button { min-height: 34px; padding-block: 3px; }

/* Help */
.help-btn { flex: none; min-height: 42px; padding: 0 14px; border-radius: 14px; border: 3px solid var(--ink); background: var(--tomato); font-family: var(--display); font-weight: 700; font-size: 1rem; box-shadow: 0 3px 0 var(--ink); }
.top { gap: 8px; }
.top .where { flex: 1 1 auto; }
.helpcalls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.helpcall { display: grid; gap: 6px; align-content: start; }
.helpcall small { font-weight: 700; font-size: 0.8rem; color: var(--muted); }
a.call { display: grid; place-items: center; min-height: 54px; border-radius: 16px; border: 3px solid var(--ink); background: var(--paper); font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-decoration: none; box-shadow: 0 4px 0 var(--ink); }
a.call999 { background: #e0453a; color: #fff; }
.inline.wrap { flex-wrap: wrap; }
.inline.wrap > * { flex: 0 0 auto; }
.inline .pill { display: inline-flex; align-items: center; text-decoration: none; }
.lostscrim { align-items: stretch; }
.lostcard { background: var(--sun); width: 100%; max-width: 480px; overflow-y: auto; padding: calc(24px + env(safe-area-inset-top, 0px)) 22px calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; align-content: center; text-align: center; border-left: 4px solid var(--ink); border-right: 4px solid var(--ink); }
.lostcard p { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.2; }
.lostcard .lost-big { font-size: 3rem; font-weight: 700; }
.lostcard .lost-mid { font-size: 1.8rem; }
.lostcard .lost-phone { font-size: 2.2rem; font-weight: 700; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.lostcard .lost-small { font-size: 1.1rem; }
.lostcard .pill { justify-self: center; }

/* Edit buttons */
.editlist { display: grid; gap: 6px; }
.editrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 14px; padding: 4px 6px; }
.editrow b { font-family: var(--display); font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.editrow.off { background: #eceef4; }
.editrow.off b, .editrow.off .editart { opacity: 0.45; }
.editart { width: 40px; height: 40px; border-radius: 10px; background: var(--c); border: 2px solid var(--ink); padding: 3px; }
.editart svg { width: 100%; height: 100%; display: block; }
.editrow .pill.small { min-height: 36px; width: 36px; padding: 0; font-size: 1rem; }
.editrow .pill.small:disabled { opacity: 0.3; }
.switch { min-width: 52px; min-height: 36px; border-radius: 999px; border: 2.5px solid var(--ink); font-weight: 800; background: #d7d9e3; color: var(--muted); }
.switch[aria-pressed="true"] { background: var(--mint); color: var(--ink); }
.tile.spare { background: #eef0f6; border-style: dashed; box-shadow: none; }
.tile.spare::after { display: none; }
.tile.spare .name { color: var(--muted); }

/* Weather-aware Buddy */
.wx { display: inline-block; font-size: 0.72rem; font-weight: 800; background: var(--aqua); border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; margin-right: 4px; vertical-align: 2px; }
.tile.suggest { box-shadow: 0 5px 0 var(--ink), 0 0 0 4px var(--paper), 0 0 0 7px var(--ink); }
@keyframes nudge { 0%, 100% { transform: rotate(var(--tilt, 0deg)); } 50% { transform: rotate(var(--tilt, 0deg)) translateY(-4px); } }
.tile.suggest { animation: nudge 1.4s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { .tile.suggest { animation: none; } }

/* Sharing */
.sharebox { gap: 6px; }
.sharebox .pill.small { background: var(--sun); }
.evmore { display: grid; gap: 6px; }
.evmore > small { font-weight: 800; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.go .morebtn { flex: 0 0 auto; padding: 0 12px; }
.place .go button { flex: 1 1 0; }
.fcard.plan { background: var(--grape); }
/* Card buttons wrap onto a second line on narrow phones instead of running off the edge. */
.go { flex-wrap: wrap; }
.go > a, .go > button { flex: 1 1 auto; }
.go > a:first-child { flex-grow: 2; }
.go .morebtn { flex: 0 0 auto; }

/* Grab List: how it works */
.howto { margin: 0; padding: 0; list-style: none; counter-reset: how; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.howto li { counter-increment: how; background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 6px 8px; display: grid; gap: 1px; align-content: start; }
.howto li b { font-family: var(--display); font-weight: 600; font-size: 0.95rem; }
.howto li b::before { content: counter(how) ". "; }
.howto li span { font-size: 0.72rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
.grablist > .pill.danger { justify-self: start; }
/* Bigger pictures and words on the home buttons (3 a row). */
.grid:not(.drive) .tile { padding: 8px 6px 10px; border-radius: 22px; }
.grid:not(.drive) .tile .art { max-height: 92px; }
.grid:not(.drive) .tile .name { font-size: clamp(0.9rem, 4.2vw, 1.12rem); letter-spacing: 0; }
html.big .grid:not(.drive) .tile .name { font-size: clamp(0.95rem, 4.6vw, 1.25rem); }
.grid:not(.drive) .tile .near { font-size: 0.7rem; padding: 1px 6px; top: 5px; right: 5px; }

/* Searching: Buddy with a magnifying glass, ripples, and placeholder cards */
.looking { padding: 10px 0 4px; gap: 4px; }
.looking svg.lk { width: 120px; height: 124px; animation: none; overflow: visible; }
.lk-msg { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.lk-ping { fill: none; stroke: var(--ink); stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; animation: lkping 1.8s ease-out infinite; }
.lk-ping.p2 { animation-delay: 0.9s; }
@keyframes lkping { 0% { transform: scale(0.35); opacity: 0.55; } 100% { transform: scale(1.5); opacity: 0; } }
.lk-bob { animation: lkbob 1.8s ease-in-out infinite; }
@keyframes lkbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.lk-glass { transform-box: view-box; transform-origin: 90px 76px; animation: lksweep 1.8s ease-in-out infinite alternate; }
@keyframes lksweep { from { transform: rotate(-16deg); } to { transform: rotate(18deg); } }
.lk-eyes { animation: lklook 1.8s ease-in-out infinite alternate; }
@keyframes lklook { from { transform: translateX(-2px); } to { transform: translateX(3px); } }
.skels { display: grid; gap: 10px; }
.skel { position: relative; height: 84px; border-radius: 18px; border: 2.5px solid #ddd5bd; background: linear-gradient(90deg, #f6efdc 0%, #fffaf0 40%, #f6efdc 80%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
.skel::before { content: ""; position: absolute; left: 14px; top: 16px; width: 55%; height: 14px; border-radius: 7px; background: #e9e0c6; box-shadow: 0 24px 0 -2px #efe7d0; }
.skel::after { content: ""; position: absolute; right: 14px; top: 14px; width: 56px; height: 44px; border-radius: 12px; background: #e9e0c6; }
.skel:nth-child(2) { opacity: 0.7; } .skel:nth-child(3) { opacity: 0.45; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .lk-ping, .lk-bob, .lk-glass, .lk-eyes, .skel { animation: none; } .lk-ping { opacity: 0.25; } }
.grid:not(.drive) .tile .name { font-size: clamp(0.88rem, 4vw, 1.08rem); }
.badge.timelink { text-decoration: none; color: var(--ink); }
.badge.timelink::after { content: " ›"; }

/* ---------- Computers and tablets (wide screens) ----------
   Phones keep the layout above. On a wide screen, Buddy, the family cards and the mode switch sit in a column
   at the side, the picture buttons fill the rest (4 or more a row, chosen by fitGrid() so they all fit), and
   screens open as a window in the middle, with results side by side in two columns. */
.side { display: contents; }
@media (min-width: 900px) {
  .app { max-width: 1160px; grid-template-columns: 290px minmax(0, 1fr); column-gap: 40px; row-gap: 18px; padding-inline: 32px; padding-block: 24px 48px; align-items: start; }
  .top { grid-column: 1 / -1; }
  .where { max-width: 460px; }
  .top .help-btn { margin-left: auto; }
  .side { display: grid; gap: 16px; align-content: start; grid-column: 1; grid-row: 2 / span 3; position: sticky; top: 24px; }
  .grid, .note, .foot { grid-column: 2; }
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; }
  .buddy { width: 96px; height: 110px; }
  .bubble { justify-self: stretch; padding: 14px 16px; border-radius: 22px; box-shadow: 0 5px 0 var(--ink); margin-bottom: 0; }
  .bubble::before { left: calc(50% - 9px); top: -11px; bottom: auto; transform: rotate(135deg) skew(10deg, 10deg); }
  .bubble .hi { display: block; font-size: 1.45rem; margin: 0 0 6px; }
  .bubble .say { display: block; font-size: 1rem; margin-top: 6px; }
  .fcard p { white-space: normal; }
  .grid:not(.drive) { gap: 18px; }
  .grid:not(.drive) .tile { border-width: 3.5px; border-radius: 24px; padding: 12px 10px 14px; box-shadow: 0 6px 0 var(--ink); }
  .grid:not(.drive) .tile .art { max-height: 118px; }
  .grid:not(.drive) .tile .name, html.big .grid:not(.drive) .tile .name { font-size: 1.25rem; }
  .grid:not(.drive) .tile .meta { display: block; margin-top: 3px; }
  .grid:not(.drive) .tile .near { font-size: 0.8rem; padding: 2px 8px; top: 8px; right: 8px; }
  .grid.drive { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot { padding-top: 8px; }

  .scrim { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; max-height: calc(100vh - 48px); border-radius: 30px; border-bottom: 3.5px solid var(--ink); box-shadow: 0 8px 0 var(--ink); padding-bottom: 24px; }
  .sheet.wide { max-width: 1000px; }
  .sheet.wide .inner { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; padding-inline: 24px; column-gap: 16px; }
  .sheet.wide .inner > :not(.place) { grid-column: 1 / -1; }
  .sheet.wide .skels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* With a mouse: show what can be clicked. */
@media (hover: hover) and (pointer: fine) {
  button, a, .tile { cursor: pointer; }
  .tile:hover { transform: rotate(var(--tilt, 0deg)) translateY(-3px); box-shadow: 0 9px 0 var(--ink); }
  .tile:hover:active { transform: rotate(var(--tilt, 0deg)) translateY(4px); box-shadow: 0 1px 0 var(--ink); }
  .pill:hover, .sorts button:hover, .chip:hover, .close:hover { filter: brightness(0.96); }
}
