/* Caffeine Crew web replica. Morning Garden visual system. */

@font-face { font-family: 'Cormorant'; src: url('../fonts/CormorantGaramond-Medium.woff2') format('woff2'); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('../fonts/CormorantGaramond-Italic.woff2') format('woff2'); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../fonts/Jost-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../fonts/Jost-Medium.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('../fonts/Cinzel-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('../fonts/Cinzel-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Pinyon'; src: url('../fonts/PinyonScript-Regular.woff2') format('woff2'); font-display: swap; }

:root {
  --cream: #FBF5EE; --blush: #EFD8D1; --dusty-rose: #C88A86; --dusty-rose-deep: #B3746F; --azalea-pink: #E7A6AC;
  --sage: #7F8C60; --sage-deep: #647052; --cocoa: #5C3B34; --ink: #4A332E; --accent-deep: #8E5652;
  --accent: #B3746F;
  --surface: #FBF5EE; --surface-raised: #FFFAF4; --text: #4A332E; --text-2: rgba(92, 59, 52, 0.78);
  --hairline: #EFD8D1; --tag-accent: #985C58; --tag-packed: #647052; --paper-edge: rgba(92, 59, 52, 0.14);
  --paper-shadow: rgba(92, 59, 52, 0.08); --track: rgba(239, 216, 209, 0.55); --cb-ring: #A87470;
  --avatar-fill: #EFD8D1; --avatar-ink: #5C3B34; --success: #647052; --pending-dot: #C88A86;
  --glass: rgba(255, 250, 244, 0.88); --glass-edge: rgba(92, 59, 52, 0.08); --tab-sel: rgba(92, 59, 52, 0.07);
  --scrim: rgba(60, 45, 40, 0.28); --map-bg: #F3EEE2; --map-park: #CFE3B2; --map-minor: #FFFFFF; --map-major: #FFF3C9; --map-case: #DCD3C3; --map-water: #A9CFE6; --map-label: #6F6258;
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --system: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --r-control: 12px; --r-card: 18px; --r-sheet: 24px;
  --ease-in: cubic-bezier(0.5, 1, 0.89, 1);
  --pad-x: 32px;
  color-scheme: light;
}
.dark {
  --surface: #231A17; --surface-raised: #33251F; --text: #FBF5EE; --text-2: rgba(239, 216, 209, 0.72);
  --hairline: #4A3A33; --tag-accent: #DDA6A2; --tag-packed: #9CB07A; --paper-edge: rgba(251, 245, 238, 0.10);
  --paper-shadow: rgba(0, 0, 0, 0.30); --track: rgba(251, 245, 238, 0.10); --cb-ring: #C88A86;
  --avatar-fill: rgba(179, 116, 111, 0.35); --avatar-ink: #FBF5EE;
  --glass: rgba(51, 37, 31, 0.88); --glass-edge: rgba(251, 245, 238, 0.10); --tab-sel: rgba(251, 245, 238, 0.09);
  --scrim: rgba(0, 0, 0, 0.5); --map-bg: #2E2622; --map-park: #3A4430; --map-minor: #43372F; --map-major: #6A5A3E; --map-case: #251D19; --map-water: #33505F; --map-label: #C9B8AA;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--surface); color: var(--text); font: 400 16px/1.4 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1:focus, h2:focus { outline: none; }
p { margin: 0; }
.ic { width: 20px; height: 20px; flex: none; display: block; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface-raised); padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ---------- shell ---------- */
.app { position: fixed; inset: 0; display: flex; }
.sidebar { display: none; }
.main { position: relative; flex: 1; min-width: 0; height: 100%; overflow: hidden; }
.petals { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; z-index: 1; padding: 108px var(--pad-x) 120px; scroll-padding-top: 100px; -webkit-overflow-scrolling: touch; outline: none; }
.screen { max-width: 1320px; margin: 0 auto; }

.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; height: 92px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 16px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.tb-left { grid-column: 1; justify-self: start; display: flex; }
.tabpill { grid-column: 2; }
.tb-right { grid-column: 3; justify-self: end; display: flex; }
.tb-center { display: none; }
.glass-btn, .glass-group, .tabpill { background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: 0 8px 24px var(--paper-shadow); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.glass-btn { min-width: 52px; height: 52px; border-radius: 26px; display: grid; place-items: center; color: var(--text); }
.glass-btn.round .ic { width: 24px; height: 24px; }
.glass-group { display: flex; align-items: center; gap: 2px; border-radius: 28px; padding: 4px 6px; min-height: 52px; }
.glass-group .icon-btn { color: var(--accent); }
.glass-group .btn-ghost { color: var(--accent); }
.profile-btn { width: 64px; }
.profile-disc { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--cream); font: 500 12px var(--sans); letter-spacing: .02em; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(231, 166, 172, .55); }

.tabpill { display: flex; align-items: center; gap: 4px; border-radius: 34px; padding: 6px; height: 64px; font-family: var(--system); }
.pill-sidebar { width: 52px; height: 48px; display: grid; place-items: center; color: var(--text); border-radius: 24px; }
.pill-sidebar .ic { width: 24px; height: 24px; }
.tabpill-tabs { display: flex; gap: 2px; }
.tab.pill { position: relative; height: 50px; padding: 0 18px; border-radius: 26px; font: 500 17px var(--system); color: var(--text); white-space: nowrap; transition: background .22s ease-out, color .22s ease-out; }
.tab.pill.sel { background: var(--tab-sel); color: var(--accent); }
.tab .badge { position: absolute; top: 2px; right: 2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #FF3B30; color: #fff; font: 600 12px/20px var(--system); text-align: center; }
.tab.pill .badge { top: 0; right: 0; }

/* sidebar (sidebarAdaptable, regular width) */
.app.with-sidebar .sidebar { display: flex; flex-direction: column; width: 264px; flex: none; background: var(--surface-raised); border-right: 1px solid var(--hairline); padding: 18px 14px; position: relative; overflow: hidden; z-index: 6; }
.app.with-sidebar .tabpill { display: none; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding-left: 6px; }
.sb-word { font: 400 15px var(--serif); font-family: 'Cinzel', var(--serif); letter-spacing: .9px; color: var(--text); }
.sidebar-tabs { display: flex; flex-direction: column; gap: 4px; }
.tab.side { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 14px; font: 500 16px var(--sans); color: var(--text); text-align: left; }
.tab.side .ic { color: var(--accent); width: 22px; height: 22px; }
.tab.side.sel { background: var(--tab-sel); color: var(--accent); }
.tab.side .badge { position: static; margin-left: auto; }
.sidebar-sprig { position: absolute; bottom: -24px; right: -40px; width: 220px; opacity: .55; pointer-events: none; transform-origin: 57% 95%; animation: sway 9.6s ease-in-out infinite; }
.dark .sidebar-sprig { opacity: .35; }
@keyframes sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1.8deg); } }

.bottom-dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.bottom-dock > * { pointer-events: auto; }
.sync-accessory { width: min(560px, 100%); min-height: 52px; border-radius: 26px; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: 0 8px 24px var(--paper-shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font: 400 15px var(--system); color: var(--text); text-align: left; }
.sync-text { flex: 1; }
.sync-chev { width: 16px; height: 16px; opacity: .7; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--azalea-pink); flex: none; }
.sync-dot.breathing { background: var(--accent); animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; transform: scale(.8); } }
.tabbar { display: none; }

.role-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--accent-deep); color: var(--cream); font: 500 12.5px var(--sans); letter-spacing: .04em; box-shadow: 0 6px 18px rgba(92, 59, 52, .25); white-space: nowrap; }
.rc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--azalea-pink); }
@media (min-width: 700px) {
  .sync-accessory { width: min(520px, calc(100% - 380px)); }
  .tb-center { display: block; position: fixed; left: auto; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); top: auto; z-index: 7; }
  .app.with-sidebar .tb-center { right: 16px; }
}

/* ---------- phone (compact width) ---------- */
@media (max-width: 699px) {
  :root { --pad-x: 18px; }
  .view { padding: 84px var(--pad-x) 176px; }
  .topbar { height: 76px; grid-template-columns: auto 1fr auto; padding: 0 12px; }
  .tabpill { display: none; }
  .tb-center { grid-column: 2; display: flex; justify-content: center; position: static; }
  .about-sprig { right: -110px; opacity: .25; }
  .role-chip { height: 34px; font-size: 12px; padding: 0 12px; }
  .glass-btn { height: 48px; min-width: 48px; }
  .profile-btn { width: 56px; }
  .glass-group { min-height: 48px; }
  .sync-accessory { min-height: 48px; font-size: 15px; }
  .tabbar { display: flex; width: 100%; justify-content: space-around; background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 34px; padding: 5px; box-shadow: 0 10px 28px var(--paper-shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .tab.bar { position: relative; flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 28px; font: 500 11px var(--system); color: var(--text); }
  .tab.bar .ic { width: 24px; height: 24px; }
  .tab.bar.sel { background: var(--tab-sel); color: var(--accent); }
  .tab.bar .badge { top: 2px; right: calc(50% - 26px); }
}

/* ---------- type + primitives ---------- */
.eyebrow { font: 500 11px/1.3 var(--sans); letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-2); }
.eyebrow.accent { color: var(--accent); }
.eyebrow.tag-accent, .tag-accent { color: var(--tag-accent); }
.eyebrow.sage { color: var(--sage-deep); }
.dark .eyebrow.sage { color: var(--tag-packed); }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.sage-text { color: var(--tag-packed); }
.selectable { user-select: text; }
.rule { width: 44px; height: 2px; background: var(--sage); opacity: .5; border-radius: 1px; margin-top: 8px; }
.page-title { font: 500 40px/1.05 var(--serif); letter-spacing: -.2px; margin-top: 4px; }
.page-title.small { font-size: 34px; margin-bottom: 18px; }
.crumb { font: italic 500 18px var(--serif); color: var(--tag-accent); margin-bottom: 6px; }

.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sh-text { min-width: 0; }
.sh-title { font: 500 26px/1.15 var(--serif); margin-top: 6px; }
.section-header.big .sh-title { font-size: 34px; }
.sh-acc { flex: none; display: flex; gap: 8px; align-items: center; }

.paper { background: var(--surface-raised); border: 1px solid var(--paper-edge); border-radius: var(--r-card); box-shadow: 0 10px 24px var(--paper-shadow); padding: 20px; }
button.paper { display: block; width: 100%; text-align: left; transition: transform .16s ease-out, opacity .16s; }
button.paper:active { transform: scale(.985); opacity: .92; }
.block { margin-top: 36px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid currentColor; border-radius: 4px; padding: 2px 8px; font: 500 11px/1.4 var(--sans); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.upper { font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; padding: 3px 9px; }
.chip { border-color: color-mix(in srgb, currentColor 45%, transparent); }
.tone-assignee, .tone-pending, .tone-rose { color: var(--tag-accent); }
.tone-packed, .tone-packed-plain, .tone-sage { color: var(--tag-packed); }
.tone-shared, .tone-category, .tone-neutral, .tone-cocoa { color: var(--text-2); }
.chip-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip-ic { width: 11px; height: 11px; }
.row-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.qty-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--surface); font: 500 11px var(--sans); color: var(--text-2); white-space: nowrap; }
.dark .qty-pill { background: rgba(251, 245, 238, .06); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--r-control); font: 500 15px/1.1 var(--sans); letter-spacing: .02em; text-decoration: none; transition: transform .12s ease-out, opacity .12s, background .2s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(.98); opacity: .85; }
.btn:disabled { opacity: .45; }
.btn-primary { background: var(--accent); color: var(--cream); box-shadow: 0 6px 14px rgba(92, 59, 52, .22); }
.btn-secondary { background: var(--surface-raised); color: var(--accent); border: 1.5px solid var(--accent); }
.btn-ghost { color: var(--accent); padding: 10px 12px; }
.btn-destructive { color: var(--cocoa); border: 1px solid rgba(92, 59, 52, .5); }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; color: var(--text-2); }
.icon-btn .ic { width: 24px; height: 24px; }
.icon-btn:hover { background: var(--tab-sel); }
.row-menu { color: var(--accent); flex: none; }
.row-menu .ic { width: 26px; height: 26px; stroke-width: 1.5; }

.avatar { --s: 30px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--avatar-fill); color: var(--avatar-ink); display: inline-grid; place-items: center; font: 500 calc(var(--s) * .35) var(--sans); flex: none; letter-spacing: 0; }
.avatar.big { --s: 58px; width: 58px; height: 58px; font: 500 24px var(--serif); border: 1.5px solid var(--dusty-rose); }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface-raised); }
.avatar-stack .avatar + .avatar { margin-left: -6px; }
.avatar.more { background: var(--dusty-rose); color: var(--cream); }

.gbar { position: relative; width: 100%; border-radius: 99px; background: var(--track); overflow: hidden; }
.gbar-fill { position: absolute; inset: 0; background: var(--sage); border-radius: 99px; transform-origin: left center; transition: transform .42s cubic-bezier(0.215, 0.61, 0.355, 1); }

.checkbox { width: 44px; height: 44px; display: grid; place-items: center; flex: none; margin: -9px; }
.cb-circle { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--cb-ring); display: grid; place-items: center; transition: background .22s ease-out, border-color .22s; }
.checkbox.on .cb-circle { background: var(--success); border-color: var(--success); }
.cb-tick { width: 26px; height: 26px; }
.cb-tick path { fill: none; stroke: var(--cream); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.checkbox.on .cb-tick path { stroke-dashoffset: 0; }
.checkbox.pop.on .cb-tick path { animation: tick .22s .06s ease-out both; }
.checkbox.pop .cb-circle { animation: pop .34s cubic-bezier(.34, 1.56, .64, 1); }
.checkbox:disabled { opacity: .35; }
@keyframes tick { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(.72); } to { transform: scale(1); } }

.petal-mark { flex: none; display: block; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 24px; }
.es-mark { opacity: .85; margin-bottom: 4px; }
.es-script { font: 34px/1.2 'Pinyon', var(--serif); color: var(--accent); }
.es-sub { font: 500 19px/1.35 var(--serif); color: var(--text-2); max-width: 36ch; }
.empty-state .btn { margin-top: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-tile, button.stat-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.stat-tile.tappable:hover { border-color: var(--dusty-rose); }
.stat-num { font: 500 30px/1 var(--serif); font-variant-numeric: lining-nums; }
.stat-num.big { font-size: 40px; }
.stat-num.accent { color: var(--accent); }

.link-rows { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.link-row { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 12px 18px; border: 1px solid var(--paper-edge); border-radius: 14px; background: var(--surface-raised); text-align: left; transition: transform .12s; }
.link-row:active { transform: scale(.99); }
.lr-ic { width: 30px; height: 30px; color: var(--accent); }
.lr-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lr-title { font: 400 19px var(--sans); }
.lr-sub { font-size: 14px; color: var(--text-2); }
.lr-chev { width: 18px; height: 18px; color: var(--text-2); }

/* ---------- events ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.ph-actions { display: flex; align-items: center; gap: 20px; }
.page-header.phone { align-items: center; }
.phone-toggle { margin-bottom: 24px; }
.phone-toggle .segmented { width: 100%; }
.phone-toggle .seg { flex: 1; }

.segmented { display: inline-flex; padding: 4px; background: var(--surface-raised); border: 1px solid var(--paper-edge); border-radius: 14px; gap: 2px; box-shadow: 0 6px 16px var(--paper-shadow); }
.seg { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 22px; border-radius: 10px; font: 500 15px var(--sans); color: var(--text); transition: background .25s var(--ease-in), color .2s; }
.seg .ic { width: 18px; height: 18px; color: var(--text-2); }
.seg[aria-checked="true"] { background: color-mix(in srgb, var(--dusty-rose) 24%, transparent); }
.segmented.caps .seg { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; padding: 0 16px; flex: 1; }
.segmented.caps { display: flex; }

.ev-section { margin-bottom: 34px; }
.ev-sec-title { display: flex; gap: 12px; margin-bottom: 16px; color: var(--text-2); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px 32px; }
.event-card { padding: 24px 28px 26px; display: flex !important; flex-direction: column; gap: 0; }
.ec-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ec-top .eyebrow { font-size: 12px; letter-spacing: 2px; }
.phase-badge { font: 500 10px var(--sans); letter-spacing: 1.6px; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.ph-upcoming { color: var(--tag-accent); background: rgba(200, 138, 134, .12); }
.ph-now { color: var(--cream); background: var(--accent-deep); }
.ph-past { color: var(--tag-packed); background: rgba(127, 140, 96, .16); }
.ec-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 500 27px/1.15 var(--serif); margin: 16px 0 10px; }
.ec-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; color: var(--text-2); }
.ec-loc { display: inline-flex; align-items: center; gap: 8px; }
.ec-loc .ic { width: 18px; height: 18px; }
.ec-bottom { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 16px; min-height: 30px; }
.ec-packed { font: 500 14px var(--sans); color: var(--text-2); }

.cal-layout { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 32px; align-items: start; }
.calendar { padding: 20px 22px 24px; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cal-title { font: 500 26px var(--serif); }
.cal-nav { width: 44px; height: 44px; border-radius: 50%; background: rgba(200, 138, 134, .14); display: grid; place-items: center; color: var(--accent); }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week span { text-align: center; font: 500 11px var(--sans); text-transform: uppercase; color: var(--text-2); padding-bottom: 8px; }
.cal-cell { min-height: 52px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 8px 2px 4px; gap: 4px; font: 400 16px var(--sans); position: relative; min-width: 0; }
.cal-cell.has { background: rgba(200, 138, 134, .14); }
.cal-cell.today .cal-num { color: var(--tag-accent); }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--dusty-rose); }
.cal-cell.sel { background: var(--accent); color: var(--cream); }
.cal-chip { max-width: 100%; font: 500 9px/1.2 var(--sans); color: var(--cream); background: var(--accent-deep); border-radius: 4px; padding: 2px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-cell.sel .cal-chip { background: var(--cream); color: var(--accent-deep); }
.pips { display: flex; gap: 3px; }
.pip { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.cal-cell.sel .pip { background: var(--cream); }
.day-col > .eyebrow { margin-bottom: 16px; }

/* ---------- detail ---------- */
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 10px; }
.dh-text { min-width: 0; }
.detail-title { font: 500 38px/1.12 var(--serif); margin: 8px 0 10px; overflow-wrap: anywhere; }
.date-line { font: italic 500 19px/1.35 var(--serif); color: var(--tag-accent); }
.notes-line { font: italic 500 18px/1.4 var(--serif); margin-top: 14px; }
.square-btn { --card-stripe: #5C3B34; display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px 24px; border-radius: 14px; background: #5C3B34; color: var(--cream); font: 500 16px var(--sans); box-shadow: 0 8px 18px rgba(92, 59, 52, .3); white-space: nowrap; transition: transform .12s; }
.square-btn:active { transform: scale(.98); }
.square-btn .ic { width: 24px; height: 24px; color: var(--cream); }
.dark .square-btn { background: #6B463E; --card-stripe: #6B463E; }
.detail-head.phone .square-btn { margin-top: 18px; }
.detail-body.wide { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; }
.db-side .block:first-child { margin-top: 36px; }
.paper.flush { padding: 0; overflow: hidden; }
.loc-foot { padding: 18px 24px 22px; border-top: 1px solid var(--hairline); }
.loc-addr { display: flex; align-items: center; gap: 10px; color: var(--text-2); margin-bottom: 14px; font-size: 16px; }
.loc-addr .ic { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.card-title { font: 500 22px var(--serif); margin-bottom: 6px; }
.pack-card .muted, .pack-card .sage-text { margin-top: 12px; font-size: 15px; }
.crew-card { padding: 16px 18px; }
.stack-btn { display: inline-flex; padding: 4px; border-radius: 20px; margin-bottom: 8px; }
.crew-rows { border-top: 1px solid var(--hairline); }
.crew-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 4px; border-bottom: 1px solid var(--hairline); text-align: left; }
.crew-row:last-child { border-bottom: 0; }
.cr-name { flex: 1; font-size: 17px; min-width: 0; }
.cr-chips { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* map */
.map { position: relative; overflow: hidden; background: var(--map-bg); border-radius: var(--r-card); user-select: none; }
.paper.flush .map { border-radius: 0; }
.map.tappable { cursor: crosshair; border-radius: 18px; border: 1px solid var(--paper-edge); }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-park { fill: var(--map-park); }
.m-water { fill: none; stroke: var(--map-water); stroke-width: 6; }
.m-minor { stroke: var(--map-minor); stroke-width: 3; }
.m-major-case { stroke: var(--map-case); stroke-width: 11; }
.m-major { stroke: var(--map-major); stroke-width: 8; }
.m-road-label { font: 600 9px var(--system); fill: var(--map-label); letter-spacing: .6px; }
.m-district { font: 600 11px var(--system); fill: var(--map-label); letter-spacing: 1px; opacity: .8; }
.map-pins { position: absolute; inset: 0; pointer-events: none; }
.map-pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
.pin-bubble { width: 38px; height: 38px; border-radius: 50%; background: var(--dusty-rose-deep); color: var(--cream); display: grid; place-items: center; border: 2.5px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.pin-bubble .ic { width: 20px; height: 20px; stroke-width: 1.4; }
.pin-label { margin-top: 4px; font: 600 12px var(--system); color: #3b2c26; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; white-space: nowrap; transform: translateY(100%); position: absolute; top: 40px; }
.dark .pin-label { color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.map-badge { position: absolute; left: 12px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--system); color: var(--map-label); opacity: .8; }
.map-badge .ic { width: 14px; height: 14px; }

/* packing */
.list-screen .section-header { margin-bottom: 16px; }
.whole-bar { margin: 0 12px 20px; }
.pack-sections { display: flex; flex-direction: column; gap: 22px; }
.pack-section { padding: 22px 28px 8px; }
.ps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ps-title { font: 500 21px var(--serif); }
.rows { list-style: none; margin: 16px 0 0; padding: 0; }
.rows > li { border-top: 1px solid var(--hairline); }
.item-row { display: flex; align-items: center; gap: 18px; min-height: 76px; padding: 12px 0; }
.item-row > .checkbox { margin: -9px -4px -9px -9px; }
.ir-main { flex: 1; min-width: 0; }
.ir-name { font: 400 17px/1.3 var(--sans); overflow-wrap: anywhere; }
.item-row.packed .ir-name { color: var(--tag-packed); }
.packed-by { font: 500 13px var(--sans); color: var(--text-2); letter-spacing: .01em; }
.ir-main > .packed-by { display: block; margin-top: 6px; }

/* sheets, forms */
.overlay { position: fixed; inset: 0; z-index: 50; }
.scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .22s ease-out; }
.scrim.clear { background: transparent; animation: none; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100% - 48px)); max-height: min(88dvh, 920px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-sheet); box-shadow: 0 30px 80px rgba(40, 25, 20, .35); animation: sheet-in .34s var(--ease-in); overflow: hidden; }
.sheet.wide { width: min(780px, calc(100% - 48px)); }
@keyframes sheet-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 30px)); } }
.overlay.leaving .sheet { opacity: 0; transform: translate(-50%, calc(-50% + 24px)); transition: opacity .2s, transform .2s; }
.overlay.leaving .scrim { opacity: 0; transition: opacity .2s; }
.sheet-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; min-height: 60px; padding: 8px 12px; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.nav-l { justify-self: start; display: flex; align-items: center; gap: 4px; }
.nav-r { justify-self: end; }
.sheet-title { font: 600 17px var(--system); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.nav-btn { min-height: 44px; padding: 0 14px; border-radius: 22px; font: 400 17px var(--system); color: var(--accent); }
.nav-btn.strong { font-weight: 600; }
.nav-btn:disabled { color: var(--text-2); opacity: .5; }
.nav-back { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); border-radius: 22px; }
.sheet-body { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 22px 24px 32px; }
.sheet-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
@media (max-width: 699px) {
  .sheet, .sheet.wide { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: calc(100dvh - 10px); height: calc(100dvh - 10px); border-radius: var(--r-sheet) var(--r-sheet) 0 0; animation: sheet-up .36s var(--ease-in); }
  @keyframes sheet-up { from { transform: translateY(40%); opacity: 0; } }
  .overlay.leaving .sheet { transform: translateY(30%); }
  .sheet-body { padding: 18px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
}
.form { display: flex; flex-direction: column; gap: 16px; }
.form-card { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.form-card > .eyebrow { margin-bottom: -2px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font: 500 13px var(--sans); color: var(--text-2); }
.input { width: 100%; min-height: 46px; padding: 12px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-control); font: 400 16px var(--sans); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--dusty-rose); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input::placeholder { color: var(--text-2); opacity: .75; }
textarea.input { resize: vertical; line-height: 1.4; }
.paste-area { min-height: 180px; font-size: 15px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input[type="datetime-local"].input { min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hint { font-size: 13px; color: var(--text-2); }
.footnote { font-size: 13px; color: var(--text-2); padding: 0 6px; line-height: 1.45; }
.refusal { color: var(--dusty-rose-deep); }
.refusal.accent { color: var(--tag-accent); }
.caption { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.hairline { height: 1px; background: var(--hairline); margin: 4px 0; }
.suggest-wrap { position: relative; }
.suggest { margin-top: 6px; background: var(--surface-raised); border: 1px solid var(--paper-edge); border-radius: 14px; box-shadow: 0 12px 28px var(--paper-shadow); overflow: hidden; }
.sg-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; text-align: left; border-bottom: 1px solid var(--hairline); }
.sg-row:last-child { border-bottom: 0; }
.sg-row:hover, .sg-row:focus-visible { background: var(--tab-sel); }
.sg-ic { width: 26px; height: 26px; color: var(--dusty-rose-deep); }
.sg-text { display: flex; flex-direction: column; min-width: 0; }
.sg-title { font-size: 15px; }
.sg-sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-host .map { height: 200px; }

.stepper { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.stepper-label { flex: 1; font-size: 16px; }
.stepper-val { font: 500 16px var(--sans); min-width: 2ch; text-align: right; }
.step-pair { display: inline-flex; border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; background: var(--surface); }
.step-btn { width: 48px; height: 40px; display: grid; place-items: center; color: var(--accent); }
.step-btn + .step-btn { border-left: 1px solid var(--hairline); }
.step-btn:disabled { color: var(--text-2); opacity: .4; }
.step-btn .ic { width: 18px; height: 18px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.switch-label { font-size: 16px; cursor: pointer; }
.switch { width: 56px; height: 32px; border-radius: 16px; background: var(--track); position: relative; flex: none; transition: background .22s; border: 1px solid var(--paper-edge); }
.dark .switch { background: rgba(251, 245, 238, .16); }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .26s cubic-bezier(.34, 1.4, .64, 1); }
.switch[aria-checked="true"] { background: var(--success); }
.switch[aria-checked="true"] .knob { transform: translateX(24px); }

.pick-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--hairline); }
.pick-row:last-child { border-bottom: 0; }
.pr-name { font-size: 16px; }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pr-main .row-chips { margin-top: 4px; }
.pick-row > .pr-name { flex: 1; }
.pr-role { font-size: 13px; color: var(--text-2); }
.mini-check { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--cb-ring); display: grid; place-items: center; flex: none; color: transparent; }
.mini-check .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.mini-check.on { background: var(--success); border-color: var(--success); color: var(--cream); }
.big-check { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--dusty-rose); flex: none; display: grid; place-items: center; }
.big-check.on { background: var(--success); border-color: var(--success); color: var(--cream); }
.big-check .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.list-card { padding: 4px 16px; }
.sheet-list { display: flex; flex-direction: column; }
.sheet-section { margin-top: 8px; }
.sheet-section > .eyebrow { margin: 0 6px 10px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box > .ic { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--text-2); pointer-events: none; }
.search-input { padding-left: 44px; min-height: 52px; background: var(--surface-raised); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--text-2); }
.chip-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; min-height: 44px; padding: 0 20px; border-radius: 22px; background: var(--surface-raised); border: 1px solid var(--hairline); font: 500 12px var(--sans); letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-2); }
.filter-chip.square { border-radius: 6px; min-height: 40px; font-size: 11px; padding: 0 14px; }
.filter-chip.sel { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.preview-list { list-style: none; margin: 0; padding: 0; }
.pv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.pv-row:first-child { border-top: 0; }
.pv-main { display: flex; flex-direction: column; min-width: 0; }
.pv-name { overflow-wrap: anywhere; }
.pv-cat { font-size: 12px; color: var(--text-2); }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-chip { min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--accent); color: var(--accent); font: 500 11px var(--sans); letter-spacing: 1.3px; text-transform: uppercase; }
.quick-chip.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.radio-list { display: flex; flex-direction: column; }
.radio-row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 4px; text-align: left; border-bottom: 1px solid var(--hairline); }
.radio-row:last-child { border-bottom: 0; }
.radio-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--cb-ring); flex: none; display: grid; place-items: center; }
.radio-dot.on::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.rr-text { display: flex; flex-direction: column; }
.rr-title { font-size: 16px; }
.rr-sub { font-size: 13px; color: var(--text-2); }

/* dialogs + menus */
.dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 40px)); background: var(--surface-raised); border-radius: 22px; padding: 22px 20px 16px; box-shadow: 0 30px 70px rgba(40, 25, 20, .35); text-align: center; animation: dlg-in .26s var(--ease-in); }
@keyframes dlg-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.94); } }
.overlay.leaving .dialog { opacity: 0; transition: opacity .18s; }
.dlg-title { font: 600 17px/1.3 var(--system); }
.dlg-msg { margin-top: 8px; font: 400 14px/1.45 var(--system); color: var(--text-2); white-space: pre-line; }
.dlg-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font: 500 15px var(--sans); color: var(--accent); min-height: 44px; }
.dlg-link .ic { width: 16px; height: 16px; }
.code-box { margin-top: 14px; font: 600 20px ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 1px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--dusty-rose); }
.dlg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.dlg-btns:has(> :only-child) { grid-template-columns: 1fr; }
.dlg-btns.stack { grid-template-columns: 1fr; }
.dlg-btn { min-height: 46px; border-radius: 14px; font: 500 16px var(--system); background: var(--tab-sel); color: var(--text); }
.dlg-btn.destructive { color: #D1372C; }
.dark .dlg-btn.destructive { color: #FF6B5F; }
.dlg-btn.default { color: var(--accent); font-weight: 600; }
.dlg-btn.cancel:only-child { color: var(--accent); font-weight: 600; }
.menu { position: fixed; min-width: 230px; max-width: min(320px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; background: var(--glass); border: 1px solid var(--glass-edge); border-radius: 16px; padding: 6px; box-shadow: 0 18px 50px rgba(40, 25, 20, .28); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); animation: menu-in .18s var(--ease-in); z-index: 2; }
@keyframes menu-in { from { opacity: 0; transform: scale(.96); } }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px 0 6px; border-radius: 10px; text-align: left; font: 400 16px var(--system); color: var(--text); }
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: var(--tab-sel); outline: none; }
.menu-item:disabled { opacity: .45; }
.menu-item.destructive { color: #D1372C; }
.dark .menu-item.destructive { color: #FF6B5F; }
.menu-item.back { color: var(--accent); gap: 6px; padding-left: 8px; }
.mi-check { width: 20px; display: grid; place-items: center; flex: none; color: var(--accent); }
.mi-check .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.mi-label { flex: 1; }
.mi-ic { width: 18px; height: 18px; color: currentColor; opacity: .85; }
.menu-div { height: 1px; background: var(--hairline); margin: 4px 8px; }
.menu-head { font: 500 11px var(--sans); letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-2); padding: 8px 12px 4px; }

.burst-petal { position: fixed; z-index: 60; width: 12px; height: 18px; pointer-events: none; clip-path: path('M6 18C3.12 16.92 0 11.52 0 6.84C0 2.16 2.4 0 6 0C9.6 0 12 2.16 12 6.84C12 11.52 8.88 16.92 6 18Z'); }
.burst-petal.a { background: var(--azalea-pink); }
.burst-petal.b { background: var(--dusty-rose); }

/* ---------- repository ---------- */
.repo-search { max-width: 560px; margin-bottom: 18px; }
.repo-screen .chip-row { margin-bottom: 26px; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px 32px; align-items: start; }
.shelf { padding: 22px 26px 12px; }
.shelf-title { font: 500 26px var(--serif); padding-bottom: 14px; }
.shelf .rows { margin-top: 0; }
.repo-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--hairline); }
.repo-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0; text-align: left; }
.repo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.repo-name { font-size: 17px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.repo-notes { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.repo-default { flex: none; text-align: right; }
.shelf-title.muted { color: var(--text-2); }

/* ---------- people ---------- */
.people-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.person-cell { position: relative; }
.person-card { padding: 22px 24px; }
.person-card.inactive { opacity: .6; }
.pc-top { display: flex; gap: 16px; align-items: flex-start; }
.pc-text { display: flex; flex-direction: column; min-width: 0; padding-right: 30px; }
.pc-name { font: 500 22px/1.2 var(--serif); }
.pc-email { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.person-card .row-chips { margin-top: 14px; }
.row-menu.corner { position: absolute; top: 12px; right: 10px; }
.person-head { margin-bottom: 24px; }
.email-line { display: flex; align-items: center; gap: 8px; color: var(--text-2); overflow-wrap: anywhere; }
.email-line .ic { width: 18px; height: 18px; }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pe-card { display: flex !important; flex-direction: column; gap: 10px; padding: 20px 22px; }
.pe-title { font: 500 22px/1.2 var(--serif); }
.pe-date { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.pe-date .ic { width: 16px; height: 16px; }
.loose-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.loose-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.lc-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }

/* ---------- activity ---------- */
.activity-screen { max-width: 860px; }
.summary-band { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; margin-bottom: 22px; flex-wrap: wrap; }
.sb-count { display: flex; flex-direction: column; gap: 8px; }
.pill-seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 16px; background: var(--surface-raised); border: 1px solid var(--paper-edge); box-shadow: 0 6px 16px var(--paper-shadow); margin-bottom: 28px; }
.pill-opt { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 12px; font: 500 16px var(--sans); color: var(--text-2); }
.pill-opt.sel { background: var(--accent); color: var(--cream); }
.count-badge { min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; background: var(--accent-deep); color: var(--cream); font: 500 12px/22px var(--sans); text-align: center; }
.pill-opt.sel .count-badge { background: var(--cream); color: var(--accent-deep); }
.day-group { margin-bottom: 26px; }
.day-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.new-count { font: 500 13px var(--sans); color: var(--accent); }
.notice-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.notice-row { display: flex !important; align-items: flex-start; gap: 16px; padding: 18px 22px; text-align: left; width: 100%; }
.notice-row.read { opacity: .88; }
.kind-glyph { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(200, 138, 134, .16); color: var(--tag-accent); }
.kind-glyph .ic { width: 18px; height: 18px; }
.kind-glyph.tone-sage { background: rgba(127, 140, 96, .16); color: var(--tag-packed); }
.kind-glyph.tone-cocoa { background: rgba(92, 59, 52, .1); color: var(--text-2); }
.dark .kind-glyph.tone-cocoa { background: rgba(251, 245, 238, .08); }
.nr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nr-text { font-size: 17px; line-height: 1.35; }
.nr-note { font: italic 500 18px var(--serif); color: var(--text-2); margin-top: 6px; }
.nr-time { font: 500 13px var(--sans); color: var(--text-2); }
.nr-side { display: flex; align-items: center; gap: 12px; padding-top: 2px; }
.nr-chev { width: 18px; height: 18px; color: var(--text-2); }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pending-dot); }

/* ---------- settings ---------- */
.settings { max-width: 780px; margin: 0 auto; }
.brand-strip { display: flex; align-items: center; gap: 18px; margin: 6px 0 8px; }
.wordmark { font: 600 26px 'Cinzel', var(--serif); letter-spacing: .5px; margin-top: 4px; }
.wordmark.big { font-size: 30px; }
.sync-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.sync-head { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.demo-line { font-size: 14px; color: var(--text); }
.sync-card .hairline { align-self: stretch; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.two-col > .block, .one-col > .block { min-width: 0; }
.profile-card { display: flex; flex-direction: column; gap: 16px; }
.pf-row { display: flex; align-items: center; gap: 18px; }
.pf-text { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.pf-name { font: 500 24px var(--serif); }
.pf-text .muted { overflow-wrap: anywhere; }
.appearance-card { display: flex; flex-direction: column; gap: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 56px; padding: 4px; border-radius: 12px; }
.sw-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.swatch.sel .sw-dot { box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px currentColor; }
.swatch .sw-dot .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.sw-label { font: 500 12px var(--sans); color: var(--text-2); }
.data-card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.share-files { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.file-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--hairline); background: var(--surface); color: var(--accent); font: 500 14px var(--sans); text-align: left; overflow-wrap: anywhere; }
.preview-card { display: flex; flex-direction: column; gap: 12px; }
.cap-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; }
.cap { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.cap .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.cap.ok { color: var(--text); }
.cap.ok .ic { color: var(--success); }
.dark .cap.ok .ic { color: var(--tag-packed); }
.signin-list { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.signin-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 2px; border-bottom: 1px solid var(--hairline); text-align: left; }
.signin-row:disabled { opacity: .45; }
.si-check { width: 22px; color: var(--success); }
.si-check .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.about-card { display: flex; flex-direction: column; gap: 16px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 0; }
.info dd { margin: 4px 0 0; font-size: 15px; }
.about-screen { position: relative; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-top: 20px; }
.about-sprig { position: absolute; top: -20px; right: -170px; width: 170px; opacity: .4; pointer-events: none; transform-origin: 57% 95%; animation: sway 9.6s ease-in-out infinite; }
.script { font: 32px 'Pinyon', var(--serif); color: var(--accent); }
.about-p { font: 500 19px/1.45 var(--serif); color: var(--text-2); }
.about-rows { align-self: stretch; text-align: left; padding: 6px 20px; margin-top: 12px; }
.about-rows dl { margin: 0; }
.about-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.about-row:last-child { border-bottom: 0; }
.about-row dt { color: var(--text-2); }
.about-row dd { margin: 0; text-align: right; }
.settings-sheet .sheet-body { background: var(--surface); }

/* ---------- demo chrome ---------- */
.demo-note { position: fixed; z-index: 40; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 16px; border-radius: 22px; background: var(--ink); color: var(--cream); font: 500 13px var(--sans); box-shadow: 0 10px 26px rgba(40, 25, 20, .3); max-width: calc(100% - 24px); animation: note-in .4s .9s var(--ease-in) both; }
.dark .demo-note { background: var(--cream); color: var(--ink); }
.demo-note button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 18px; flex: none; }
.demo-note .ic { width: 16px; height: 16px; }
@keyframes note-in { from { opacity: 0; transform: translate(-50%, -12px); } }
@media (min-width: 700px) { .demo-note { top: auto; bottom: 84px; } }
@media (max-width: 699px) { .demo-note { top: auto; bottom: 150px; } }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 20px; background: var(--ink); color: var(--cream); font: 500 14px var(--sans); transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- launch moment ---------- */
.launch { position: fixed; inset: 0; z-index: 90; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; transition: opacity .35s ease-out; pointer-events: none; }
.launch.out { opacity: 0; }
.lm-mark g { transform-box: fill-box; transform-origin: center; animation: lm-petal .5s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes lm-petal { from { opacity: 0; scale: .2; } }
.lm-eyebrow { animation: rise .45s .2s var(--ease-in) both; }
.lm-word { font: 600 34px 'Cinzel', var(--serif); letter-spacing: .5px; }
.lm-letter { display: inline-block; animation: rise .4s var(--ease-in) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- responsive ---------- */
@media (max-width: 899px) {
  .detail-body.wide { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
}
@media (max-width: 860px) and (min-width: 700px) {
  .cal-layout { grid-template-columns: 1fr; }
}
@media (max-width: 699px) {
  .page-title { font-size: 40px; }
  .detail-title { font-size: 34px; }
  .card-grid, .people-grid, .shelf-grid { grid-template-columns: 1fr; gap: 18px; }
  .cal-layout { grid-template-columns: 1fr; gap: 24px; }
  .calendar { padding: 16px 12px 18px; }
  .cal-cell { min-height: 46px; padding-top: 6px; }
  .event-card { padding: 22px 22px 24px; }
  .ec-title { font-size: 26px; }
  .section-header.big .sh-title { font-size: 32px; }
  .pack-section { padding: 18px 16px 6px; }
  .item-row { gap: 14px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-grid.three { grid-template-columns: 1fr 1fr 1fr; }
  .stat-grid.three .stat-tile { padding: 14px 12px; }
  .stat-grid.three .eyebrow { letter-spacing: 1px; font-size: 10px; }
  .two-col { grid-template-columns: 1fr; }
  .summary-band { padding: 20px; }
  .notice-row { padding: 16px; gap: 12px; }
  .nr-text { font-size: 16px; }
  .detail-body.phone .block:first-child { margin-top: 30px; }
  .ph-actions .btn-primary { padding: 12px 20px; }
  .section-header { flex-wrap: wrap; }
  .repo-default { font-size: 10px; letter-spacing: 1.2px; }
  .crew-row { gap: 10px; }
  .cr-name { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .sidebar-sprig, .about-sprig { animation: none; }
}
