/* Choresy Design Tokens */
:root {
  --brand: #19323C;
  --primary: #2E86AB;
  --secondary: #A23B72;
  --accent: #F18F01;
  --success: #386641;
  --danger: #BC4742;
  --warning: #F2E863;
  --bg: #F4EFE7;
  --surface: #FFFFFF;
  --cal-bg: #E8F4FB;
  --text: #1A1A2E;
  --text-secondary: #6B7280;
  --border: #D1D5DB;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-pill: 9999px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* --app-h is set to window.innerHeight by an inline script in <head>.
     On iOS PWA, 100dvh excludes the bottom safe-area inset at cold open
     even with viewport-fit=cover; innerHeight returns the full screen height. */
  height: var(--app-h, 100dvh);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-font-smoothing: antialiased;
  /* Flex column makes #bottom-tabs a natural static sibling of .app-shell,
     eliminating the iOS PWA cold-open gap that afflicts position:sticky/fixed. */
  height: var(--app-h, 100dvh);
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:active { transform: scale(0.97); }

input, select, textarea {
  font-family: inherit;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 10px 14px;
  width: 100%;
  background: var(--surface);
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.15);
}

/* App Shell */
.app-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  /* flex: 1 1 0 + min-height: 0 lets the shell fill the remaining viewport height
     (body height minus tab bar) and scroll its own content internally.
     No min-height calc needed; the tab bar sits below as a plain flex sibling. */
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

[hidden] {
  display: none !important;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
}

.app-version {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 4px;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  position: relative;
}

.icon-button:hover { background: var(--bg); }

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Bottom Tabs */
#bottom-tabs {
  /* Static flex item — no position:sticky/fixed means no WebKit layout-vs-visual-
     viewport reconciliation bug on iOS PWA cold open.  The flex body (height:100dvh)
     guarantees the tabs land exactly at the screen bottom at first paint. */
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  height: calc(64px + var(--safe-bottom) + 6px);
  padding-bottom: calc(var(--safe-bottom) + 6px);
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
  flex-shrink: 0;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--text-secondary);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.tab-item.active { color: var(--primary); }

.tab-item svg { opacity: 0.7; }

.tab-item.active svg { opacity: 1; }

/* Main Content */
#app {
  flex: 1;
  padding: 16px;
  padding-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
  min-height: 44px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: #247A9E; }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.btn-block { width: 100%; }

.btn-google {
  background: white;
  color: #3c4043;
  border: 1px solid #dadce0;
  gap: 10px;
  justify-content: center;
}

.btn-google:hover {
  background: #f8f9fa;
}

.btn-google svg {
  flex-shrink: 0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  min-height: 36px;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* Notification preference toggles */
.notif-pref-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.notif-pref-row:last-child {
  border-bottom: none;
}

.notif-pref-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.notif-pref-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.notif-pref-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notif-pref-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  margin-left: 12px;
}

.notif-pref-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  border-radius: 26px;
  transition: background-color 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--surface);
  border-radius: 50%;
  transition: transform 0.2s;
}

.notif-pref-toggle input:checked + .toggle-slider {
  background-color: var(--primary);
}

.notif-pref-toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
}

/* Auth Card */
.auth-card {
  max-width: 400px;
  margin: 40px auto;
  padding: 32px 24px;
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--brand);
}

/* Google Button */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 16px;
  min-height: 44px;
}

.google-btn:hover { background: var(--bg); }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: calc(86px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  z-index: 350;
  pointer-events: none;
}

.toast {
  background: var(--text);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
  pointer-events: auto;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-card);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* Today View */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}

.today-date {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  flex: 1;
}

/* Progress Bar */
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Chore Grid */
.chore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chore-card {
  position: relative;
  min-height: 80px;
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  overflow: hidden;
  /* Prevent iOS text-selection loupe and copy/define callout on long press */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.chore-card:active { transform: scale(0.97); }

.chore-card--pressing {
  transform: scale(0.93);
  opacity: 0.75;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.chore-card.chore-done {
  opacity: 0.5;
}

.chore-icon {
  font-size: 2rem;
  line-height: 1;
}

.chore-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.chore-category {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-secondary);
}

.chore-note {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.check-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

/* Member List */
.member-list,
.invite-list,
.stat-list {
  list-style: none;
}

.invite-item,
.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.invite-item:last-child,
.stat-item:last-child { border-bottom: none; }

.hist-table { display: none; } /* replaced by hist-group/hist-row */

.hist-chunk {
  margin-bottom: 16px;
}

.hist-chunk-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0 12px 8px;
}

.hist-group {
  margin-bottom: 4px;
}

.hist-date-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 10px 12px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hist-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--chore-color, var(--border));
  margin: 0 0 1px;
  background: var(--surface);
  width: 100%;
  border-top: none;
  border-right: none;
  border-bottom: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.hist-row:active {
  opacity: 0.7;
}

.hist-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.hist-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.hist-name {
  font-size: 14px;
  font-weight: 500;
}

.hist-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.hist-filter-fab {
  position: fixed;
  bottom: calc(70px + var(--safe-bottom, 0px) + 16px);
  right: 16px;
  z-index: 40;
}

.hist-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background 0.15s, transform 0.15s;
}

.hist-filter-btn:hover,
.hist-filter-btn--open {
  background: var(--primary-hover, color-mix(in srgb, var(--primary) 85%, #000));
  transform: scale(1.05);
}

.hist-filter-chips {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  max-width: calc(100vw - 40px);
  width: max-content;
  max-height: 240px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  transform: translateY(8px);
}

.hist-filter-chips--open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hist-filter-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  opacity: 0.55;
}

.hist-filter-chip:active {
  opacity: 0.7;
}

.hist-filter-chip.active {
  opacity: 1;
  border-color: var(--chore-color, var(--primary));
  background: color-mix(in srgb, var(--chore-color, var(--primary)) 12%, var(--bg));
  color: var(--text-primary);
  font-weight: 600;
}

.hist-filter-all {
  opacity: 1;
  font-weight: 600;
}

.hist-filter-all.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.hist-filter-chip-icon {
  font-size: 14px;
  line-height: 1;
}

.hist-filter-chip-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 16px 0 32px;
}

.load-more-btn {
  min-width: 120px;
}

.avatar-circle-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.role-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-secondary);
  margin-left: auto;
}

.verify-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}
.verify-badge--ok {
  color: var(--success);
  background: rgba(56, 102, 65, 0.1);
}
.verify-badge--no {
  color: var(--danger);
  background: rgba(188, 71, 66, 0.1);
}

.role-select {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--input-bg, var(--bg));
  color: var(--text-primary);
}

.role-select--wide {
  width: 100%;
}

.member-row {
  border-bottom: 1px solid var(--border);
}

.member-row:last-child {
  border-bottom: none;
}

.member-row-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
}

.member-row-summary::-webkit-details-marker {
  display: none;
}

.member-name {
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-chevron {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

details[open] .member-chevron {
  transform: rotate(180deg);
}

.member-row-details {
  padding: 0 0 12px 28px;
}

.member-role-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Schedule tab — upcoming list */
.schedule-view { padding-bottom: 16px; }
.schedule-view h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; padding: 0 0; }

.sch-list { padding: 0; }

.sch-day-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 10px 12px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-left: 3px solid var(--chore-color, var(--border));
  margin: 0 0 1px;
  background: var(--surface);
}

.sch-row--done { opacity: 0.5; text-decoration: line-through; }

.sch-row-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.sch-row-main:active { opacity: 0.7; }

.sch-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.sch-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.sch-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sch-name { font-size: 14px; font-weight: 500; }

.sch-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.sch-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.sch-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sch-log-btn {
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.sch-edit-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
}

.sch-edit-btn:active { opacity: 0.5; }

/* Stats View */
.streak-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.streak-num {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.streak-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.stat-bar-label {
  width: 80px;
  text-align: right;
  color: var(--text);
  flex-shrink: 0;
}

.stat-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.stat-bar-count {
  width: 24px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ─── Stats Page ──────────────────────────────────────────────────── */

.stats-page {
  padding-bottom: 16px;
}

.overview-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.overview-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.overview-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.overview-card-value--small {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-card-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Baby Care */
.baby-care-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.baby-care-header h3 {
  margin: 0;
}

.period-toggle {
  display: flex;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.period-toggle-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.period-toggle-btn:not(:last-child) {
  border-right: 1px solid var(--border);
}

.period-toggle-btn:hover {
  background: var(--hover);
}

.period-toggle--active {
  background: var(--primary) !important;
  color: #fff !important;
}

.baby-care-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .baby-care-columns {
    grid-template-columns: 1fr;
  }
}

.baby-care-column {
  background: var(--bg);
  border-radius: var(--radius-card);
  padding: 12px;
  border: 1px solid var(--border);
}

.baby-col-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.baby-member-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.baby-member-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.baby-member-name {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.baby-member-bar-track {
  flex: 1 1 auto;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  min-width: 20px;
}

.baby-member-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.baby-member-count {
  font-weight: 600;
  color: var(--text);
  min-width: 20px;
  text-align: right;
  font-size: 0.75rem;
}

.baby-chart {
  width: 100%;
  overflow-x: auto;
}

.baby-svg-chart {
  width: 100%;
  max-height: 200px;
}

.baby-svg-chart [data-action="chart-tap"] {
  cursor: pointer;
}

.baby-svg-chart .chart-bar-val {
  display: none;
}

.baby-svg-chart .chart-bar-val--visible {
  display: inline;
}

/* Heatmap */
.heatmap-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.heatmap-inner {
  display: flex;
  gap: 3px;
}

.heatmap-day-labels {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 4px;
}

.heatmap-day-label {
  width: 28px;
  height: 12px;
  font-size: 9px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  line-height: 1;
}

.heatmap-weeks {
  display: flex;
  gap: 3px;
}

.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.heatmap-legend-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* Stats date range */
.stats-date-range {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Busy Hours */
.busy-hours-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.busy-hours-date-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.busy-hours-date-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.busy-hours-filter {
  flex: 1;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  min-height: 32px;
}

.busy-hours-chart {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.busy-hour-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.busy-hour-label {
  width: 28px;
  text-align: right;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.busy-hour-track {
  flex: 1;
  height: 12px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.busy-hour-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  min-width: 2px;
}

.busy-hour-count {
  width: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
}

/* Chore Stats */
.chore-stat-card {
  border-bottom: 1px solid var(--border);
}

.chore-stat-card:last-child {
  border-bottom: none;
}

.chore-stat-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
}

.chore-stat-summary::-webkit-details-marker {
  display: none;
}

.chore-stat-chevron {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

details[open] .chore-stat-chevron {
  transform: rotate(180deg);
}

.chore-stat-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.chore-stat-name {
  flex: 1;
  font-weight: 500;
}

.chore-stat-counts {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.chore-stat-week {
  color: var(--primary);
  font-weight: 600;
}

.chore-stat-month {
  color: var(--text-secondary);
}

.chore-stat-details {
  padding: 0 0 12px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chore-stat-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chore-stat-detail-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ind-tag {
  display: inline-block;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  margin: 2px 4px 2px 0;
  border: 1px solid var(--border);
}

/* Volume mini chart */
.vol-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 44px;
}

.vol-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  height: 100%;
}

.vol-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  min-height: 1px;
}

/* Top Chores */
.top-chore-list {
  display: flex;
  flex-direction: column;
}

.top-chore-header-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 0 4px;
  margin-bottom: 4px;
}

.top-chore-header-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 40px;
  text-align: center;
}

.top-chore-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.top-chore-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.top-chore-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.top-chore-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-chore-bar-track {
  flex: 2;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}

.top-chore-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  min-width: 2px;
}

.top-chore-counts {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.top-chore-count {
  font-size: 13px;
  font-weight: 600;
  width: 40px;
  text-align: center;
}

.top-chore-count--day {
  color: var(--text-primary);
}

.top-chore-count--week {
  color: var(--text-secondary);
}

.top-chore-count--month {
  color: var(--accent);
}

.top-chore-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.top-chore-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
}

.top-chore-pill--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ─── Calendar: shared nav ─────────────────────────────────────────────────── */

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.cal-date {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  flex: 1;
}

/* ─── View tabs (Day / Week) ───────────────────────────────────────────────── */

.view-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.view-tab {
  flex: 1;
  padding: 6px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  transition: background 0.15s, color 0.15s;
  min-height: 36px;
}

.view-tab--active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow);
}

/* ─── Progress label ───────────────────────────────────────────────────────── */

.progress-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin: 6px 0 12px;
}

/* ─── Day View ─────────────────────────────────────────────────────────────── */

.day-view {
  display: flex;
  flex-direction: column;
}

.day-hour-grid-wrapper {
  overflow-y: auto;
  max-height: 60vh;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  background: var(--cal-bg);
}

.day-hour-grid {
  display: flex;
  flex-direction: column;
}

.day-hour-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  min-height: 48px;
  border-bottom: 1px solid var(--border);
}

/* Anytime row: shown at the top of the day-hour-grid when there are logs
   with no slotHour (e.g. logged from the home tab). Same grid layout as
   .day-hour-row with a subtle background to distinguish it. */
.day-anytime-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  min-height: 48px;
  border-bottom: 2px solid var(--border);
  background: rgba(0,0,0,0.03);
}

/* "Anytime" label — italic to visually distinguish from hour labels */
.hour-label--anytime {
  font-style: italic;
  font-size: 0.72rem;
  color: var(--text-secondary, #888);
}

/* Anytime row in the week view */
.week-anytime-row {
  background: rgba(0,0,0,0.03);
  border-bottom: 2px solid var(--border);
}

.day-hour-cell {
  padding: 4px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  cursor: pointer;
  min-height: 48px;
  /* Div cells (not <button>) need these explicitly for iOS */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.day-hour-cell.drop-target {
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
  background: rgba(46,134,171,0.06);
}

/* New done-state class used by calendar.js (mirrors legacy chore-done) */
.chore-card.chore-card--done {
  opacity: 0.5;
}

/* Compact "chip" variant used inside hour-row cells in the day view.
   Cards wrap horizontally so multiple can share a row without overlapping. */
.chore-card.chore-card--compact {
  flex-direction: row;
  min-height: 36px;
  border-radius: 18px;
  padding: 5px 10px;
  text-align: left;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 200px;
}

.chore-card.chore-card--compact .chore-icon {
  font-size: 15px;
}

.chore-card.chore-card--compact .chore-name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.chore-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.chore-assignee {
  font-size: 14px;
}

/* Drag states */
.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

/* ─── Week View ────────────────────────────────────────────────────────────── */

.week-view {
  display: flex;
  flex-direction: column;
}

.week-grid-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.week-grid {
  min-width: 520px;
  background: var(--cal-bg);
}

.week-header-row {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--cal-bg);
  z-index: 10;
}

.hour-label-spacer {
  border-right: 1px solid var(--border);
}

.week-col-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  padding: 6px 4px;
  border-right: 1px solid var(--border);
}

.week-body {
  display: flex;
  flex-direction: column;
}

.hour-row {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
  min-height: 48px;
  border-bottom: 1px solid var(--border);
}

.hour-label {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 6px 4px 0 6px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  background: none;
  border-top: none;
  border-bottom: none;
  border-left: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  line-height: inherit;
  display: block;
  width: auto;
}

.week-cell {
  border-right: 1px solid var(--border);
  padding: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  min-height: 48px;
  min-width: 0;
  overflow: hidden;
  /* Div cells (not <button>) need these explicitly for iOS */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.week-cell.drop-target {
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
  background: rgba(46,134,171,0.06);
}

.week-chore-card {
  width: 100%;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  min-height: 36px;
  position: relative;
}

.week-chore-card .chore-name {
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.section-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

/* ─── Chore card wrapper (calendar views only) ─────────────────────────────── */

/* The wrapper is the grid/flex item in hour rows and week cells.
   The .chore-card inside fills its width; the pencil button sits top-right. */
.chore-card-wrap {
  position: relative;
  display: contents; /* let the card itself be the grid/flex item by default */
}

/* In hour rows the wrapper becomes the grid item. */
.day-hour-row .chore-card-wrap,
.week-cell .chore-card-wrap {
  display: block;
  position: relative;
}

/* Hide pencil in week-view cells — cells are ~35–55 px wide, too narrow for
   the 24 px button without overlapping the card and intercepting taps. */
.week-cell .chore-card-edit-btn {
  display: none;
}

.day-hour-row .chore-card-wrap .chore-card {
  width: 100%;
}

.week-cell .chore-card-wrap .week-chore-card {
  width: 100%;
}

/* ─── Pencil (edit-schedule) button ────────────────────────────────────────── */

.chore-card-edit-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none; /* invisible → must not intercept clicks */
  transition: opacity 0.15s;
  z-index: 10;
  padding: 0;
  color: var(--text-secondary);
}

/* Show pencil on hover (pointer devices). */
.chore-card-wrap:hover .chore-card-edit-btn {
  opacity: 1;
  pointer-events: auto;
}

/* Always show on touch devices where hover doesn't exist — only in day-view
   contexts where cells are wide enough. Week-view cells (~55 px) are too
   narrow; the pencil would overlap the card centre and intercept taps. */
@media (hover: none) {
  .day-hour-row .chore-card-edit-btn {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ─── FAB (floating action button) ─────────────────────────────────────────── */

.fab {
  position: fixed;
  bottom: calc(78px + var(--safe-bottom));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  z-index: 150;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.fab:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* ─── Log sheet: indicator chips ────────────────────────────────────────────── */

.sheet-chip-row {
  margin-bottom: 14px;
}

.sheet-chip-row .field-label {
  margin-bottom: 8px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.log-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.log-chip--on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Log sheet: note row ───────────────────────────────────────────────────── */

.sheet-note-row {
  margin-bottom: 14px;
}

.sheet-note-row .field-label {
  display: block;
  margin-bottom: 6px;
}

/* ─── Log sheet: volume row ──────────────────────────────────────────────────── */

.sheet-volume-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-volume-row .field-label {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.volume-select {
  flex: 1;
  min-width: 0;
}

/* ─── Log sheet: member row ──────────────────────────────────────────────────── */

.sheet-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-member-row .field-label {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.member-select {
  flex: 1;
  min-width: 0;
}

/* ─── Bottom Sheet ─────────────────────────────────────────────────────────── */

.sheet-overlay-wrapper {
  position: relative;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  cursor: pointer;
}

.bottom-sheet {
  position: fixed;
  bottom: calc(70px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + var(--safe-bottom));
  z-index: 310;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  max-height: 75dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 16px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
}

.sheet-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 24px 0;
  font-size: 14px;
}

.sheet-time-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-time-row .field-label {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.sheet-time-input {
  max-width: 140px;
}

/* Frequency (repeat) row inside bottom sheets */
.sheet-freq-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.sheet-freq-row .field-label {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 52px;
}

.sheet-freq-row .select-input {
  flex: 1;
  width: auto;
  padding: 8px 12px;
}

/* Weekday pill row shown only for "weekly" frequency */
.sheet-weekday-row {
  margin-bottom: 12px;
}

.sheet-weekday-row .field-label {
  margin-bottom: 8px;
}

/* Interval row shown only for "every_n_days" frequency */
.sheet-interval-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-interval-row .field-label {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.interval-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.interval-input {
  width: 72px;
  text-align: center;
  padding: 8px 12px;
}

.interval-unit {
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
}

/* End-date row shown for recurring schedules */
.sheet-end-date-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-end-date-row .field-label {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.sheet-end-date-row input[type="date"] {
  width: auto;
  min-width: 140px;
}

.sheet-chore-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.sheet-chore-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: var(--bg);
  text-align: left;
  min-height: 56px;
  width: 100%;
  transition: background 0.15s;
  /* Prevent iOS text-selection loupe and copy/define callout on long press */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.sheet-chore-item:hover,
.sheet-chore-item:active {
  background: var(--border);
}

.sheet-chore-item--pressing {
  transform: scale(0.97);
  opacity: 0.7;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

/* Drag-to-reorder: dragging item */
.sheet-chore-item--dragging {
  opacity: 0.4;
  cursor: grabbing;
}

/* Drag-to-reorder: drop-position indicators */
.sheet-chore-item--drag-over-top {
  border-top: 2px solid var(--primary);
}

.sheet-chore-item--drag-over-bottom {
  border-bottom: 2px solid var(--primary);
}

/* Drag handle */
.drag-handle {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: grab;
  flex-shrink: 0;
  padding: 0 2px;
  user-select: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.sheet-hint {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 8px;
}

.sheet-chore-item .chore-icon { font-size: 24px; }
.sheet-chore-item .chore-name { font-weight: 600; font-size: 15px; flex: 1; }
.sheet-chore-item .chore-category {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-full { width: 100%; }

/* ─── Sheet: create-new-chore form ──────────────────────────────────────────── */

.sheet-new-chore-form {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
}

.sheet-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.sheet-new-chore-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sheet-new-chore-input {
  flex: 1;
  min-width: 0;
}

.sheet-new-chore-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 22px;
  font-weight: 400;
  border-radius: var(--radius-btn);
}

.sheet-cancel-btn {
  margin-top: 4px;
}

/* ─── Recurrence Picker ────────────────────────────────────────────────────── */

.recurrence-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.select-input,
.text-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 16px;
  color: var(--text);
}

.day-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.day-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  min-height: 36px;
  transition: background 0.15s, color 0.15s;
}

.day-pill--on {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

@media (min-width: 600px) {
  .period-cards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .week-grid,
  .week-grid-wrapper {
    min-width: 0;
  }
}

/* ─── Dark Theme ────────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #5BBEDD;
    --primary: #4DABCE;
    --secondary: #C866A0;
    --accent: #F4A634;
    --success: #4CAF6E;
    --danger: #E05252;
    --warning: #F2E863;
    --bg: #0E1117;
    --surface: #181C27;
    --cal-bg: #10141C;
    --text: #E6EDF3;
    --text-secondary: #8B949E;
    --border: #2A3042;
    --shadow: 0 1px 3px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.28);
  }

  /* Stronger drop-target highlight on dark backgrounds */
  .day-hour-cell.drop-target,
  .week-cell.drop-target {
    background: rgba(77,171,206,0.18);
  }

  /* Adjust primary hover since it's hardcoded */
  .btn-primary:hover { background: #3A9ABF; }

  /* Skeleton shimmer on dark */
  .skeleton {
    background: linear-gradient(90deg, var(--border) 25%, #1e2335 50%, var(--border) 75%);
    background-size: 200% 100%;
  }

  /* Bottom sheet shadow more visible on dark */
  .bottom-sheet {
    box-shadow: 0 -4px 24px rgba(0,0,0,0.55);
  }
}

.invite-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.invite-link-url {
  font-size: 0.75rem;
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

/* ─── Home Header ──────────────────────────────────────────────────────────── */

.home-header {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.home-header-tabs {
  display: flex;
  background: var(--color-surface, #E8E2D6);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.home-header-tab {
  padding: 6px 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-secondary, #6B7280);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.home-header-tab--active {
  background: #fff;
  color: var(--color-text, #1F2937);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ─── Home Grid View ──────────────────────────────────────────────────────── */

.home-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-jiggle-bar {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 360px) {
  .home-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 480px) {
  .home-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-chore-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 8px 12px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  min-height: 90px;
  cursor: pointer;
  border: none;
  /* Suppress iOS long-press callout and text selection */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  /* Accent stripe on the left using the chore's colour */
  border-left: 4px solid var(--chore-color, var(--primary));
  transition: transform 0.12s, opacity 0.12s;
  position: relative;
  overflow: hidden;
}

.home-chore-card:active {
  transform: scale(0.95);
}

.home-chore-card--pressing {
  transform: scale(0.92);
  opacity: 0.75;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.home-chore-card--dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.home-chore-card--drag-over {
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
  background: rgba(46,134,171,0.07);
}

/* Jiggle (wiggle) animation */
@keyframes jiggle {
  0%   { transform: rotate(-2deg); }
  25%  { transform: rotate(2deg); }
  50%  { transform: rotate(-2deg); }
  75%  { transform: rotate(2deg); }
  100% { transform: rotate(-2deg); }
}

/* Wrapper div that is the grid item in jiggle mode.
   The X badge and card button are siblings inside it — this avoids the
   invalid nested-<button> pattern that caused browsers to eject card content. */
.home-card-wrapper {
  position: relative;
  overflow: visible;
  transition: transform 0.12s, opacity 0.12s;
}

/* Card fills the wrapper */
.home-card-wrapper .home-chore-card {
  width: 100%;
}

/* Jiggle animation lives on the wrapper so badge and card move together */
.home-grid--jiggle .home-card-wrapper {
  animation: jiggle 0.4s ease-in-out infinite;
  cursor: grab;
}

.home-grid--jiggle .home-card-wrapper:active {
  cursor: grabbing;
  transform: scale(1.06);
  animation: none;
}

/* Drag states in jiggle mode are applied to the wrapper */
.home-card-wrapper.home-chore-card--dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.home-card-wrapper.home-chore-card--drag-over {
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
  background: rgba(46,134,171,0.07);
}

.home-chore-card--jiggle {
  /* animation and cursor handled by parent .home-card-wrapper */
  /* overflow: visible no longer needed — X badge is a sibling, not a child */
}

.home-chore-card--jiggle:active {
  /* scale/animation handled by .home-grid--jiggle .home-card-wrapper:active */
}

/* Remove-from-home X badge, shown in jiggle mode (iOS-style) */
.home-card-remove {
  position: absolute;
  top: -9px;
  left: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e53e3e;
  color: #fff;
  border: 2px solid var(--surface);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.home-card-remove:active {
  transform: scale(0.88);
}

.home-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.home-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  word-break: break-word;
  hyphens: auto;
}

.home-card-time {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1;
}

.home-card-time--never {
  color: var(--border);
}

.confirm-remove-msg {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin: 4px 0 16px;
}

@media (prefers-color-scheme: dark) {
  .home-chore-card--drag-over,
  .home-card-wrapper.home-chore-card--drag-over {
    background: rgba(77,171,206,0.14);
  }
}

/* ── Chores tab management ───────────────────────────────────────────────── */

.chores-view {
  padding: 0 0 80px;
  position: relative;
}

.chores-view-header {
  padding: 16px 16px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chores-view-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.chores-view-hint {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 0 16px 8px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chores-view-hint svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.chore-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chore-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: default;
  transition: opacity 0.15s;
}

.chore-row--hidden {
  opacity: 0.45;
}

.chore-row--dragging {
  opacity: 0.4;
}

.chore-row--drag-over-top {
  border-top: 2px solid var(--primary);
}

.chore-row--drag-over-bottom {
  border-bottom: 2px solid var(--primary);
}

.chore-row-drag-handle {
  font-size: 14px;
  color: var(--text-secondary);
  cursor: grab;
  padding: 4px 2px;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  letter-spacing: -2px;
}

.chore-row-drag-handle:active {
  cursor: grabbing;
}

.chore-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.chore-row-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chore-row-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1.4;
}

.chore-row-badge--default {
  background: var(--primary);
  color: white;
  opacity: 0.75;
}

.chore-row-badge--custom {
  background: var(--border);
  color: var(--text-secondary);
}

.chore-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.chore-row-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.chore-row-btn:active,
.chore-row-btn:focus-visible {
  background: var(--border);
  outline: none;
}

.chore-row-eye--off {
  color: var(--border);
}

/* ── Chore edit sheet ─────────────────────────────────────────────────────── */

.chore-edit-sheet {
  padding: 0 0 env(safe-area-inset-bottom, 0);
}

.chore-edit-field {
  padding: 10px 16px 4px;
}

.chore-edit-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.chore-edit-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  margin-left: 6px;
}

.chore-edit-name-input {
  width: 100%;
  box-sizing: border-box;
}

/* Icon row: large preview + text input */
.chore-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.chore-icon-preview {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chore-icon-input {
  width: 80px;
  text-align: center;
  font-size: 1.4rem;
  padding: 6px 8px;
}

/* Quick-pick emoji grid */
.emoji-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 130px;
  overflow-y: auto;
}

.emoji-quick {
  background: var(--border);
  border: none;
  border-radius: 6px;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.emoji-quick:active {
  background: var(--primary-light, rgba(59,130,246,0.2));
}

/* Color swatch grid */
.color-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, border-color 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.color-swatch--selected {
  border-color: var(--text);
  transform: scale(1.2);
}

.color-swatch:active {
  transform: scale(0.9);
}

/* Indicator labels */
.indicator-chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.indicator-label-input {
  flex: 1;
  min-width: 0;
}

.indicator-remove-btn {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.indicator-remove-btn:active {
  background: var(--border);
}

.indicator-default-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.indicator-default-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.indicator-default-toggle .indicator-default-label {
  white-space: nowrap;
  min-width: 0;
}

.btn-add-indicator {
  background: none;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  margin-top: 4px;
  width: 100%;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.btn-add-indicator:active {
  background: var(--border);
}

/* Sheet footer: delete/restore on left, cancel+save on right */
.chore-sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 16px;
  gap: 8px;
}

.chore-sheet-footer-right {
  display: flex;
  gap: 8px;
}

.chore-sheet-restore {
  color: var(--text-secondary);
}

.chore-sheet-delete {
  color: white;
}

/* ── Notification panel (bottom sheet) ─────────────────────────────── */
.notif-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: calc(64px + var(--safe-bottom) + 6px);
  left: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  cursor: pointer;
}

.notif-panel {
  position: fixed;
  bottom: calc(64px + var(--safe-bottom) + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 75dvh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  z-index: 301;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notif-panel-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 12px auto 8px;
  flex-shrink: 0;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
  flex-shrink: 0;
}

.notif-panel-title {
  font-weight: 700;
  font-size: 18px;
}

.notif-mark-all-read {
  font-size: 13px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.notif-mark-all-read:active {
  background: var(--cal-bg);
}

.notif-list {
  list-style: none;
  overflow-y: auto;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: default;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.notif-content:hover {
  opacity: 0.8;
}

.notif-title {
  font-weight: 500;
  font-size: 14px;
}

.notif-body {
  font-size: 13px;
  color: var(--text-secondary);
}

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.notif-close {
  color: var(--text-secondary);
}

/* ── Profile panel (bottom sheet) ──────────────────────────────────── */
.profile-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: calc(64px + var(--safe-bottom) + 6px);
  left: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
  cursor: pointer;
}

.profile-panel {
  position: fixed;
  bottom: calc(64px + var(--safe-bottom) + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  z-index: 301;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.profile-panel-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 12px auto 8px;
  flex-shrink: 0;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px 14px;
}

.profile-avatar-lg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #19323C;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-email {
  font-weight: 600;
  font-size: 15px;
}

.profile-household {
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  padding: 8px 0;
}

.profile-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.profile-action-btn:active {
  background: var(--cal-bg);
}

.profile-action-btn svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.profile-action-signout {
  color: var(--danger);
}

.profile-action-signout svg {
  color: var(--danger);
}

/* ─── Household indicator in top bar ──────────────────────────────────────── */
.hh-indicator {
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}
.hh-indicator:active { opacity: 0.8; }

/* ─── Household initials badges ───────────────────────────────────────────── */
.hh-initials-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.hh-initials-badge-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ─── Household card header (name + badge + edit button) ──────────────────── */
.hh-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}
.hh-card-header h3 { flex: 1; margin: 0; }
.hh-edit-btn { flex-shrink: 0; }

/* ─── Household edit form ─────────────────────────────────────────────────── */
.hh-edit-form {
  background: var(--bg);
  border-radius: var(--radius-card);
  padding: 12px;
  margin-bottom: 12px;
}
.hh-edit-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.hh-initials-input { max-width: 120px; }

/* ─── Form label hint ─────────────────────────────────────────────────────── */
.form-label-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 4px;
}

/* ─── Profile sheet: household switcher ───────────────────────────────────── */
.profile-households {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.profile-households-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 0 16px 4px;
}
.profile-household-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-size: 14px;
}
.profile-household-item:active { background: var(--cal-bg); }
.profile-household-item--active { background: var(--bg); }
.profile-household-name { flex: 1; font-weight: 500; }
.profile-household-role {
  font-size: 12px;
  color: var(--text-secondary);
}
.profile-household-check {
  color: var(--success);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.hh-leave-section {
  border-top: 1px solid var(--border);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

