/* Wolf Pack — one light world: snow, pine, glacier, heather. No black. */
:root {
  --ground: #E4E8E2;
  --paper: #F4F6F2;
  --card: #FCFDFB;
  --ink: #2F3B46;
  --ink-2: #5D6972;
  --muted: #8D979D;
  --line: #DCE1DA;
  --line-2: #CBD2C9;
  --pink: #A7789A;
  --pink-soft: #F0E6EE;
  --blue: #5A82A3;
  --blue-soft: #E3EBF2;
  --us: #5B7C62;
  --us-soft: #E2EAE1;
  --done: #A8B0AA;
  --danger: #9A4B5E;
  --tabbar-h: calc(64px + env(safe-area-inset-bottom));
  --display: "Unbounded", "Avenir Next", system-ui, sans-serif;
  --body: "Onest", "Avenir Next", -apple-system, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; width: 100%; margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, label:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tab-num { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.app { position: relative; height: 100%; max-width: 520px; margin: 0 auto; background: var(--paper); display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 560px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

.top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 20px 10px; }
.wordmark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: .2em; white-space: nowrap; }
.pair { display: flex; }
.pair i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; color: #fff; border: 2px solid var(--paper); }
.pair i + i { margin-left: -8px; }

.screen { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 20px calc(var(--tabbar-h) + 40px); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.screen::-webkit-scrollbar { display: none; }
.screen.flush { padding: 0; overflow: hidden; position: relative; }
.boot { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }

.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); padding: 8px 14px calc(env(safe-area-inset-bottom) + 6px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(244,246,242,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); z-index: 500;
}
.tabbar button { display: grid; justify-items: center; align-content: start; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 500; }
.tabbar svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-current="true"] { color: var(--ink); }

.fab { position: absolute; right: 20px; bottom: calc(var(--tabbar-h) + 16px); z-index: 501; width: 56px; height: 56px; border-radius: 50%; background: var(--us); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(91,124,98,.7); transition: transform .15s; }
.fab:active { transform: scale(.94); }
.fab svg { width: 24px; height: 24px; stroke: #fff; stroke-width: 2; stroke-linecap: round; }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; align-content: center; gap: 28px; padding: calc(env(safe-area-inset-top) + 32px) 8px 40px; }
.login-brand { display: grid; justify-items: center; gap: 12px; text-align: center; }
.login-brand h1 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: .18em; }
.login-brand p { margin: 0; color: var(--ink-2); }
.login-form { display: grid; gap: 14px; }
.login-note { margin: 0; text-align: center; font-size: 13px; color: var(--muted); text-wrap: pretty; }
.form-error { margin: 0; min-height: 18px; font-size: 13.5px; color: var(--danger); }
.message { min-height: 70vh; display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; color: var(--ink-2); padding: 0 12px; }
.message h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 20px; color: var(--ink); }
.message p { margin: 0; max-width: 34ch; }

/* ---------- Shared bits ---------- */
.h-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.h-row > :first-child { min-width: 0; }
.h-title { font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.h-title small { display: block; font-family: var(--body); font-size: 13px; color: var(--muted); letter-spacing: 0; font-weight: 400; margin-top: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); flex: none; }
.icon-btn svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.seg { display: inline-flex; background: var(--line); border-radius: 999px; padding: 3px; }
.seg button { white-space: nowrap; padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(47,59,70,.12); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px 12px; padding: 0 20px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 500; color: var(--ink-2); background: transparent; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.d-pink { background: var(--pink); } .d-blue { background: var(--blue); } .d-us { background: var(--us); }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--us-soft); color: var(--us); text-decoration: none; }
.btn.solid { background: var(--us); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty { color: var(--muted); margin: 6px 0 18px; text-wrap: pretty; }

/* Tags */
.tagrow { gap: 6px; margin-bottom: 16px; }
.tchip { flex: none; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.tchip[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: #3F6788; }
.tsep { flex: none; width: 1px; background: var(--line-2); margin: 5px 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }

/* ---------- Calendar ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 -20px 14px; padding: 6px 20px 8px; position: sticky; top: 0; z-index: 20; background: var(--paper); }
.strip-month { grid-column: 1 / -1; display: none; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 2px 2px; }
.week.stuck .strip-month { display: block; }
.week.stuck { box-shadow: 0 1px 0 var(--line); }
.week-sep { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.week-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wd { display: grid; justify-items: center; gap: 4px; padding: 8px 0 9px; border-radius: 16px; }
.wd .n { font-size: 11px; color: var(--muted); }
.wd .d { font-size: 17px; font-weight: 600; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.wd.today .d { background: var(--ink); color: var(--paper); }
.wd[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 0 var(--line); }
.wd .dots { display: flex; gap: 3px; height: 6px; }
.wd .dots .dot { width: 5px; height: 5px; }
.moon { display: block; }
.moon circle { fill: none; stroke: var(--line-2); stroke-width: 1; }
.moon path { fill: var(--muted); stroke: none; }

.howwas { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--pink-soft); margin-bottom: 12px; text-align: left; }
.howwas .cam { width: 38px; height: 38px; border-radius: 50%; background: var(--card); display: grid; place-items: center; flex: none; }
.howwas .cam svg { width: 18px; height: 18px; stroke: #83567A; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.howwas b { font-weight: 600; display: block; }
.howwas small { color: var(--ink-2); font-size: 12.5px; }

.day { margin-bottom: 18px; scroll-margin-top: 10px; }
.day-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.day-h strong { color: var(--ink); font-weight: 600; font-size: 14px; }
.day-h .tag-today { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 500; }
.day.sel .day-h strong { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.ev-list { background: var(--card); border-radius: 18px; border: 1px solid var(--line); overflow: hidden; }
.ev { display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; }
.ev + .ev { border-top: 1px solid var(--line); }
.ev .t { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ev .t small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.ev .t.allday { font-size: 12px; font-weight: 600; color: var(--us); line-height: 1.2; }
.ends { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.ends label { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ends .input { max-width: 150px; }
.ev .ti { font-weight: 500; }
.ev .meta { font-size: 12.5px; color: var(--muted); margin-top: 1px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.ev .who { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.ev.done .ti { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.w-pink { background: var(--pink-soft); color: #83567A; } .w-blue { background: var(--blue-soft); color: #3F6788; } .w-us { background: var(--us-soft); color: #486650; }
.empty-day { font-size: 13px; color: var(--muted); padding: 2px 0 0; }

.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 18px; }
.month .hd { font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 6px; }
.mc { aspect-ratio: 1 / 1.15; border-radius: 12px; display: grid; align-content: start; justify-items: center; gap: 5px; padding-top: 7px; font-size: 14px; font-weight: 500; }
.mc.out { color: var(--line-2); }
.mc.today span:first-child { background: var(--ink); color: var(--paper); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; margin-top: -3px; }
.mc .dots { display: flex; gap: 3px; }
.mc .dots .dot { width: 5px; height: 5px; }

/* ---------- Ideas ---------- */
.ideas { display: grid; gap: 10px; }
.idea { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; display: grid; gap: 8px; cursor: pointer; }
.idea h3 { margin: 0; font-size: 16.5px; font-weight: 600; line-height: 1.25; text-wrap: balance; }
.idea p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.idea .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.idea .by { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.place-line { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.memories { margin-top: 26px; }
.mem { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px; align-items: start; cursor: pointer; }
.mem + .mem { border-top: 1px solid var(--line); }
.mem .ti { font-weight: 600; }
.mem .meta { font-size: 12.5px; color: var(--muted); }
.mem p { margin: 4px 0 6px; font-size: 13.5px; color: var(--ink-2); }
.ph { width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-sm { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Map ---------- */
.map-wrap { position: absolute; left: 0; right: 0; top: 0; bottom: var(--tabbar-h); }
#map { position: absolute; inset: 0; background: #EEF0EC; }
.map-missing { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); margin: 0; }
.map-top { position: absolute; top: 8px; left: 0; right: 0; padding: 0 16px; z-index: 450; }
.map-top .chips { margin: 0 -16px; padding: 0 16px; }
.map-top .chip { background: rgba(252,253,251,.92); backdrop-filter: blur(6px); }
.map-top .chip[aria-pressed="true"] { background: var(--ink); }
.map-add { position: absolute; right: 16px; top: 54px; z-index: 450; }
.map-add .btn { background: rgba(252,253,251,.95); color: #3F6788; border: 1px solid var(--line); box-shadow: 0 6px 16px -8px rgba(47,59,70,.35); }
.map-card { position: absolute; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px); z-index: 460; background: var(--card); border-radius: 22px; padding: 16px; display: grid; gap: 8px; box-shadow: 0 16px 40px -18px rgba(47,59,70,.45); border: 1px solid var(--line); }
.map-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.map-card h3 { margin: 0; font-size: 17px; font-weight: 600; }
.map-card .memo { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.map-card .memo .ph { width: 56px; height: 56px; border-radius: 12px; }
.map-legend { position: absolute; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 28px); z-index: 450; display: flex; justify-content: center; gap: 14px; font-size: 11.5px; color: var(--ink-2); background: rgba(252,253,251,.9); padding: 7px 12px; border-radius: 999px; width: max-content; margin: 0 auto; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-pill { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-idea { border: 1px solid var(--line-2); color: var(--ink-2); }
.st-planned { background: var(--us); color: #fff; }
.st-done { background: var(--line); color: var(--ink-2); }
.leaflet-container { font-family: var(--body); }
.leaflet-tile-pane { filter: grayscale(.55) saturate(.8) brightness(1.04) contrast(.92); }
.leaflet-control-attribution { font-size: 9.5px !important; background: rgba(252,253,251,.75) !important; }
.pin-wrap { background: none; border: 0; }
.pin { display: grid; place-items: center; width: 20px; height: 20px; margin: 5px; border-radius: 50%; box-shadow: 0 2px 6px rgba(47,59,70,.35); transition: transform .15s; }
.c-pink { --pc: var(--pink); } .c-blue { --pc: var(--blue); } .c-us { --pc: var(--us); }
.pin-idea { background: #FCFDFB; border: 4px solid var(--pc); }
.pin-planned { background: var(--pc); border: 3px solid #FCFDFB; }
.pin-done { background: var(--done); border: 3px solid #FCFDFB; }
.pin-done svg { width: 10px; height: 10px; stroke: #fff; stroke-width: 3; fill: none; }
.pin.sel { transform: scale(1.35); box-shadow: 0 0 0 6px rgba(47,59,70,.12), 0 2px 6px rgba(47,59,70,.35); }

/* ---------- Trips ---------- */
.trip { display: grid; gap: 12px; text-align: left; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 18px; margin-bottom: 12px; }
.trip .ridge { height: 56px; width: calc(100% + 8px); margin: -4px -4px 0; }
.trip .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.trip h3 { font-family: var(--display); font-weight: 500; font-size: 19px; margin: 4px 0 0; line-height: 1.15; text-wrap: balance; }
.trip .when { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.type-pill { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--us); }
.countdown { text-align: right; flex: none; }
.countdown b { display: block; font-family: var(--display); font-weight: 500; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 12px; color: var(--muted); }
.trip .stats { display: flex; flex-wrap: wrap; column-gap: 16px; font-size: 12.5px; color: var(--muted); }
.sec { margin-top: 22px; }
.sec h4 { margin: 0 0 10px; }
.dayplan { margin-bottom: 14px; }
.dayplan h5 { margin: 0 0 8px; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.dayplan h5 span { color: var(--muted); font-weight: 400; font-size: 13px; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; min-height: 48px; }
.li + .li { border-top: 1px solid var(--line); }
.li .tm { width: 44px; flex: none; color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.li .grow { flex: 1; min-width: 0; }
.li.add { color: var(--muted); font-size: 14px; }
.li input.inline { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); border: 0; background: transparent; padding: 0; }
.li input.inline:focus { outline: none; }
.del { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.del svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; }
.box svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.4; fill: none; opacity: 0; }
.check[aria-checked="true"] .box { background: var(--us); border-color: var(--us); }
.check[aria-checked="true"] .box svg { opacity: 1; }
.check[aria-checked="true"] .lt { color: var(--muted); text-decoration: line-through; }
.check { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; color: var(--ink-2); font-size: 14px; white-space: pre-wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-2); margin: 6px 0 10px; }
.back svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.nodates { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 18px; border: 1.5px dashed var(--line-2); color: var(--ink-2); font-size: 14px; }

/* ---------- Google Maps links ---------- */
.gm { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: #3F6788; text-decoration: none; white-space: nowrap; }
.gm svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.gm.add { color: var(--muted); font-weight: 500; }
.gm.mark { color: #83567A; }
.gm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.link-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.paste { padding: 0 16px; border-radius: 14px; background: var(--blue-soft); color: #3F6788; font-weight: 600; font-size: 14px; }
.link-hint { font-size: 12.5px; color: var(--us); min-height: 17px; }
.link-hint.warn { color: var(--muted); }
.quick-link { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 18px; border: 1.5px dashed var(--line-2); color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; }
.quick-link .ic { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); display: grid; place-items: center; flex: none; }
.quick-link .ic svg { width: 16px; height: 16px; stroke: #3F6788; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quick-link small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 1px; }

/* ---------- Sheet ---------- */
.scrim { position: absolute; inset: 0; background: rgba(47,59,70,.28); z-index: 900; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 901; background: var(--paper); border-radius: 28px 28px 0 0; padding: 10px 20px calc(env(safe-area-inset-bottom) + 24px); transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); display: grid; gap: 14px; max-height: 92%; overflow-y: auto; }
.open .scrim { opacity: 1; pointer-events: auto; }
.open .sheet { transform: none; }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); justify-self: center; }
.sheet .hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet .hd h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; -webkit-appearance: none; appearance: none; min-height: 48px; }
.input:disabled { color: var(--line-2); }
textarea.input { min-height: 84px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two.wide { grid-template-columns: 1.4fr 1fr; }
.who-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.who-seg button { padding: 11px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; }
.who-seg button[aria-pressed="true"][data-c="pink"] { background: var(--pink-soft); border-color: var(--pink); }
.who-seg button[aria-pressed="true"][data-c="blue"] { background: var(--blue-soft); border-color: var(--blue); }
.who-seg button[aria-pressed="true"][data-c="us"] { background: var(--us-soft); border-color: var(--us); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.toggle input { width: 18px; height: 18px; accent-color: var(--us); }
.sheet .chips { margin-bottom: 0; }
.sheet .tagrow { margin-bottom: 0; }
.photo-pick { display: grid; place-items: center; align-content: center; gap: 6px; height: 180px; border-radius: 18px; border: 1.5px dashed var(--line-2); color: var(--muted); background: var(--card); overflow: hidden; cursor: pointer; font-size: 14px; text-align: center; }
.photo-pick img { width: 100%; height: 180px; object-fit: cover; display: block; }
.cam-lg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.save { width: 100%; padding: 15px; border-radius: 16px; background: var(--us); color: #fff; font-weight: 600; font-size: 16px; }
.danger { width: 100%; padding: 13px; border-radius: 16px; border: 1px solid #E3CDD3; color: var(--danger); font-weight: 600; font-size: 15px; }
.sheet .sub { margin: 0; font-size: 13px; color: var(--muted); }
.account-members { display: flex; gap: 14px; flex-wrap: wrap; }
.account-members span { display: inline-flex; align-items: center; gap: 6px; }

.toast { position: absolute; left: 50%; bottom: calc(var(--tabbar-h) + 24px); z-index: 1000; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Swipe between weeks and months */
.week, .month { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
@keyframes slideFromRight { from { transform: translateX(44px); opacity: .25; } to { transform: none; opacity: 1; } }
@keyframes slideFromLeft { from { transform: translateX(-44px); opacity: .25; } to { transform: none; opacity: 1; } }
.slide-next { animation: slideFromRight .24s ease-out; }
.slide-prev { animation: slideFromLeft .24s ease-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .slide-next, .slide-prev { animation: none; }
}
