/* Household Chores — visual design per the approved mock
   (ts-spaces/household-chores-app-design): warm cream paper, ink text,
   burnt-orange accent, deep-green "done" accent, Fraunces display type +
   Plus Jakarta Sans UI type (self-hosted, see fonts.css). */
:root {
  --bg: #f6efe6;
  --paper: #fffaf2;
  --card: #ffffff;
  --ink: #1e1a16;
  --muted: #7a6e61;
  --line: #ece2d3;
  --accent: #e05d2f;
  --accent-dark: #c24e24;
  --accent2: #1a7a64;
  --chip: #f2e8d8;
  --brand: var(--accent);
  --green: var(--accent2);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

.screen { max-width: 560px; margin: 0 auto; padding: 16px 16px 118px; }

/* sign-in */
.signin-card { text-align: center; padding-top: 7vh; }
.logo {
  width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 16px;
  background: var(--accent); color: #fff; font-size: 32px; line-height: 60px; font-weight: 700;
}
.signin-card h1 { font-family: Fraunces, serif; margin: 6px 0 0; font-size: 32px; line-height: 1; }
.sub { color: var(--muted); margin: 8px 0 4px; font-size: 14px; }
.people-row { display: flex; justify-content: center; gap: 10px; margin: 20px 0 22px; flex-wrap: wrap; }
.person-card { text-align: center; width: 72px; }
.person-card .pname { display: block; font-size: 11px; font-weight: 700; margin-top: 6px; }
.person-card .pcap { display: block; font-size: 10px; color: var(--muted); }
#signin-form { display: grid; gap: 10px; text-align: left; }
#signin-form label {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 800; color: var(--muted);
}
#signin-form input, .sheet input, .sheet select, .sheet textarea {
  width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); font-size: 15px; color: var(--ink);
}
.primary {
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  padding: 14px 18px; font-weight: 800; font-size: 15px;
}
.primary:active { background: var(--accent-dark); }
.hint { font-size: 13px; color: var(--muted); line-height: 1.55; }
.msg { min-height: 20px; color: var(--accent2); font-size: 14px; }
.msg.error { color: #c92a2a; }

/* avatars */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; color: #fff; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; letter-spacing: .3px;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }

/* app header (mock .apphead) */
.apphead { padding: 2px 0 12px; border-bottom: 1px solid var(--line); }
.apphead-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.iconapp {
  width: 42px; height: 42px; border-radius: 12px; background: var(--accent);
  display: grid; place-items: center; font-size: 22px; color: #fff; position: relative; flex: none;
}
.iconapp b {
  position: absolute; top: -6px; right: -6px; background: #e02424; color: #fff;
  font-size: 11px; min-width: 20px; height: 20px; border-radius: 999px;
  display: grid; place-items: center; border: 2px solid var(--bg); padding: 0 4px;
}
.top-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--ink);
}
.nudge-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 9px 11px; cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 700;
  display: inline-flex; gap: 6px; align-items: center;
}
.admin-mini {
  font-size: 10px; font-weight: 800; background: var(--ink); color: #fff;
  border-radius: 999px; padding: 2px 6px;
}
.me-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.admin-tag {
  background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 6px;
  font-size: 10px; font-weight: 800; letter-spacing: .02em;
}

/* Boys at Dad's switch row (mock .switchrow / .switch) */
.switchrow {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 12px; background: var(--chip); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
}
.switch-sub { font-size: 12px; color: var(--muted); line-height: 1.45; }
.switch-sub b { color: var(--ink); }
.switch {
  width: 52px; height: 30px; border-radius: 999px; background: #a89a83; border: none;
  cursor: pointer; position: relative; flex-shrink: 0; padding: 0;
}
.switch i {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; transition: left .25s; display: block;
}
.switch.on { background: var(--accent2); }
.switch.on i { left: 25px; }
.switch[disabled] { cursor: default; opacity: .75; }

.banner {
  margin-top: 12px; background: var(--accent2); color: #fff;
  border-radius: 14px; padding: 11px 13px; font-size: 13px; font-weight: 700; line-height: 1.45;
}

/* person filter chips — mock .chip: small initial-dot + name, wrapping row
   (all seven fit on a phone screen; no horizontal scrolling). */
.filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 2px 4px; }
.filter-btn {
  border: 1px solid var(--line); background: var(--card); padding: 8px 11px;
  border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center; color: var(--ink);
}
.filter-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter-btn .dot {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 9px; font-weight: 800; flex: none;
}

/* bottom tab bar (mock .tabbar) */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex; padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted);
  cursor: pointer; background: none; border: none; padding: 6px 2px;
}
.tab span { display: block; font-size: 20px; margin-bottom: 2px; }
.tab.active { color: var(--accent); }

/* Today header block (mock #headToday) */
.today-head { margin-bottom: 4px; }
.date { font-family: Fraunces, serif; font-size: 28px; margin: 14px 0 2px; }
.date-sub { color: var(--muted); font-size: 13px; }
.progress { height: 8px; background: var(--chip); border-radius: 999px; overflow: hidden; margin: 14px 0 6px; }
.progress i { display: block; height: 100%; background: var(--accent2); border-radius: 999px; transition: width .4s; }
.progress-text { font-size: 12px; color: var(--muted); line-height: 1.5; }

.view-intro { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 4px 0 0; }
.section-label {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); font-weight: 800; margin: 16px 0 8px;
}

/* chore cards (mock .chore) */
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; }
.day-head strong { font-size: 15px; }
.day-head span { font-size: 12px; color: var(--muted); }
.card {
  display: flex; align-items: flex-start; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  text-align: left; width: 100%;
}
.check {
  width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #d8cbb6; flex: none;
  background: #fff; color: #fff; font-size: 16px; line-height: 1; padding: 0; margin-top: 2px;
  display: grid; place-items: center;
}
.card.done .check { background: var(--accent2); border-color: var(--accent2); }
.card-body { flex: 1; min-width: 0; }
.card-name { font-weight: 800; font-size: 15px; line-height: 1.25; }
.card.done .card-name { text-decoration: line-through; opacity: .6; }
.card-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.person { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; color: var(--ink); }
.pill { font-size: 11px; font-weight: 700; background: var(--chip); padding: 4px 7px; border-radius: 999px; color: var(--ink); }
.pill.priority { background: var(--accent); color: #fff; }
.pill.covering { background: var(--accent2); color: #fff; }
.stamp { font-size: 12px; color: var(--accent2); font-weight: 700; margin-top: 6px; }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 15px; }

/* activity (mock .feeditem + dark intro card) */
.activity-intro { background: var(--ink); color: #fff; border-radius: 16px; padding: 14px; margin-bottom: 6px; }
.activity-intro strong { font-size: 14.5px; }
.activity-intro p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: #ddd; }
.activity-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; align-items: baseline; }
.activity-item .when { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }

/* household */
.member-row {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
}
.member-row .grow { flex: 1; min-width: 0; }
.member-row .email { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.small-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 11px; font-size: 12.5px; font-weight: 700; color: var(--ink);
}
.master-title { font-family: Fraunces, serif; font-size: 20px; margin: 24px 0 10px; }
.master-count { color: var(--muted); font-family: "Plus Jakarta Sans", sans-serif; font-size: 15px; font-weight: 600; }
.master-row {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px;
  cursor: pointer;
}
.master-row .grow { flex: 1; min-width: 0; }
.master-row .meta { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* fab (mock: floats above the tab bar) */
.fab {
  position: fixed; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--accent);
  color: #fff; font-size: 28px; line-height: 1; box-shadow: 0 10px 20px rgba(0, 0, 0, .2); z-index: 5;
}

/* detail sheet */
.overlay {
  position: fixed; inset: 0; background: rgba(30, 26, 22, .45); z-index: 20;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { font-family: Fraunces, serif; margin: 0; font-size: 22px; }
.sheet form { display: grid; gap: 12px; margin-top: 8px; }
.sheet label {
  display: grid; gap: 5px; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 800; color: var(--muted);
}
.sheet label.checkline {
  display: flex; align-items: center; gap: 9px; font-size: 15px;
  letter-spacing: normal; text-transform: none; font-weight: 600; color: var(--ink);
}
.sheet label.checkline input { width: 21px; height: 21px; }
.weekdays { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.weekdays label { display: inline-flex; gap: 3px; font-weight: 500; letter-spacing: normal; text-transform: none; color: var(--ink); }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sheet-actions .primary { padding: 12px 16px; font-size: 14px; }
.danger { background: var(--card); color: #c92a2a; border: 1.5px solid #ffc9c9; border-radius: 999px; padding: 12px 16px; font-weight: 700; }

/* celebration */
.celebrate {
  position: fixed; inset: 0; z-index: 40; background: rgba(20, 14, 8, .88);
  display: flex; align-items: center; justify-content: center;
}
.celebrate canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.celebrate-card {
  position: relative; background: var(--card); border-radius: 22px; padding: 28px 30px;
  text-align: center; max-width: 320px; margin: 16px;
}
.celebrate-card .big { font-size: 52px; }
.celebrate-card h2 { font-family: Fraunces, serif; margin: 8px 0 4px; }
.celebrate-card p { color: var(--muted); line-height: 1.6; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(110px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 11px 18px; font-size: 14.5px; z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: 88vw; text-align: center;
}
