/* Household Board — Option C (dark, glanceable tiles) */
:root {
  --bg: #0E131F; --tile: #182033; --line: #253049; --line2: #1E273B;
  --text: #EEF2F8; --muted: #A3AEC4; --faint: #8691A8;
  --amber: #F5B83D; --amber-ink: #1A1406; --cyan: #7DD3FF; --green: #4ADE80; --red: #FCA5A5;
  --warn-bg: #2A2312; --warn-line: #5C4716;
  --r: 18px;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; }
body { min-height: 100vh; min-height: 100dvh; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #B5E6FF; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 14px) 14px calc(env(safe-area-inset-bottom) + 110px); }
.app.no-nav { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.topbar { display: none; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(14,19,31,0.96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line2);
  padding: 8px 12px calc(env(safe-area-inset-bottom) + 10px); }
.bottomnav .inner { max-width: 480px; margin: 0 auto; display: flex; justify-content: space-around; align-items: center; }
.navbtn { width: 56px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 14px; }
.navbtn.on { color: var(--amber); }
.fab { width: 68px; height: 68px; margin-top: -30px; border-radius: 34px; background: var(--amber); color: var(--amber-ink);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(245,184,61,.35); border: none; }
.fab:hover { color: var(--amber-ink); }

/* ---------- headers ---------- */
.pagehead { display: flex; flex-direction: column; gap: 4px; padding: 8px 4px 14px; }
.pagehead .row { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; }
.title { font-family: var(--head); font-size: 30px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.1; }
.sub { font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .4px; color: var(--muted); text-transform: uppercase; }
.homehead { display: flex; justify-content: space-between; align-items: flex-end; padding: 6px 4px 12px; }
.homehead .date { font-family: var(--head); font-size: 34px; font-weight: 700; letter-spacing: -1px; line-height: 1.05; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; background: var(--tile); border: 1px solid var(--line); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; position: relative; }
.iconbtn:hover { color: var(--text); }
.dotbadge { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 5px; background: var(--amber); }

/* ---------- tiles ---------- */
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tile.amber { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.tile.amber .eyebrow { color: var(--amber-ink); }
.tile .big { font-family: var(--head); font-size: 20px; font-weight: 700; line-height: 1.15; }
.tile .small { font-size: 12px; color: var(--muted); }
.tile.amber .small { color: var(--amber-ink); }
.tilehead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tilehead a { font-size: 12px; font-weight: 600; }
a.tile { color: inherit; }
a.tile:hover { color: inherit; border-color: #34405c; }
a.tile.amber:hover { border-color: var(--amber); }

.who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.who div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who b { font-size: 14px; font-weight: 600; }
.who span.l { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 9px; height: 9px; border-radius: 5px; flex-shrink: 0; background: var(--cyan); }
.dot.home { background: var(--green); } .dot.late { background: var(--amber); } .dot.away { background: #F97316; }

.nextrow { display: flex; gap: 12px; align-items: baseline; color: var(--text); }
.nextrow:hover { color: var(--text); }
.nextrow .t { font-family: var(--head); font-size: 16px; font-weight: 700; width: 48px; flex-shrink: 0; color: var(--muted); }
.nextrow .t.now { color: var(--amber); }
.nextrow .n { font-size: 14px; font-weight: 600; }
.nextrow .w { font-size: 12px; color: var(--muted); }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day { height: 58px; border-radius: 12px; background: var(--bg); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.day:hover { color: var(--text); outline: 1px solid var(--line); }
.day .d { font-size: 10px; font-weight: 600; color: var(--muted); }
.day .n { font-family: var(--head); font-size: 16px; font-weight: 700; }
.day .dots { display: flex; gap: 3px; height: 5px; }
.day .dots i { width: 5px; height: 5px; border-radius: 3px; background: var(--cyan); }
.day .dots i.a { background: var(--amber); }
.day.today { background: var(--amber); color: var(--amber-ink); }
.day.today .d { color: var(--amber-ink); }
.day.today .dots i { background: var(--amber-ink); }
.day.past { opacity: .55; }
.highlights { font-size: 12px; color: var(--muted); padding: 0 2px; }
.highlights b { color: var(--amber); font-weight: 600; }

.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.area { position: relative; height: 74px; border-radius: 16px; background: var(--tile); border: 1px solid var(--line); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; text-align: center; padding: 0 4px; }
.area:hover { color: var(--text); border-color: #34405c; }
.area svg { color: var(--cyan); }
.badge { position: absolute; top: 8px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--amber); color: var(--amber-ink);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.count { display: flex; align-items: baseline; gap: 4px; font-family: var(--head); font-size: 32px; font-weight: 700; line-height: 1; }
.count small { font-family: var(--body); font-size: 14px; color: var(--muted); font-weight: 500; }

/* ---------- lists ---------- */
.list { background: var(--tile); border: 1px solid var(--line); border-radius: var(--r); padding: 2px 14px; }
.li { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); color: var(--text); padding: 6px 0; }
.li:last-child { border-bottom: none; }
a.li:hover { color: var(--text); }
.li .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li .main b { font-size: 15px; font-weight: 600; }
.li .main span { font-size: 12px; color: var(--muted); }
.li .side { font-size: 13px; color: var(--muted); text-align: right; flex-shrink: 0; }
.li .time { font-family: var(--head); font-size: 15px; font-weight: 700; width: 56px; flex-shrink: 0; white-space: nowrap; }
.li.done .main b { text-decoration: line-through; color: var(--faint); }
.li.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 6px 10px; margin: 6px -4px; }
.li.warn .side { color: var(--amber); font-weight: 600; }
.chip { padding: 3px 9px; border-radius: 8px; background: var(--line); font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.chip.amber { background: var(--amber); color: var(--amber-ink); }
.avatar { width: 40px; height: 40px; border-radius: 20px; color: var(--bg); font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.daygroup { margin: 14px 4px 6px; }
.widegrid { display: flex; flex-direction: column; gap: 14px; }
.empty { color: var(--muted); font-size: 14px; padding: 14px 2px; }
.section-gap { height: 6px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl, fieldset > legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; }
fieldset { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.input, select.input, textarea.input { width: 100%; min-width: 0; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--tile);
  color: var(--text); padding: 0 14px; font-size: 16px; -webkit-appearance: none; appearance: none; }
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
input[type=date].input, input[type=time].input { display: flex; align-items: center; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--tile); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.pill[aria-pressed=true] { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.days7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.days7 .pill { padding: 0; height: 44px; border-radius: 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { height: 40px; border: none; border-radius: 9px; background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--amber); color: var(--amber-ink); }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 50px; background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; cursor: pointer; }
.toggle .main { flex: 1; display: flex; flex-direction: column; }
.toggle .main b { font-size: 15px; font-weight: 600; }
.toggle .main span { font-size: 12px; color: var(--muted); }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--amber); flex-shrink: 0; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 20px; border: 3px solid transparent; cursor: pointer; }
.swatch[aria-pressed=true] { border-color: var(--text); }
.subhead { font-family: var(--head); font-size: 17px; font-weight: 700; margin-top: 6px; }
.help { font-size: 12px; color: var(--muted); }
.err { background: #3A1A1D; border: 1px solid #6B2A30; color: var(--red); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.ok { background: #13291D; border: 1px solid #23573A; color: #A7F3C5; border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.warnbox { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; }
.warnbox b { color: var(--amber); font-size: 14px; }
.warnbox p { font-size: 13px; margin-top: 2px; }

.btn { height: 54px; border-radius: 16px; border: none; background: var(--amber); color: var(--amber-ink); font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; cursor: pointer; padding: 0 16px; }
.btn:hover { color: var(--amber-ink); filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); height: 50px; font-weight: 600; font-size: 15px; }
.btn.ghost:hover { color: var(--text); border-color: #34405c; }
.btn.dashed { background: transparent; color: var(--text); border: 1px dashed #5C6782; height: 50px; font-weight: 600; font-size: 15px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #6B2A30; height: 50px; font-weight: 600; font-size: 15px; }
.btn.small { height: 40px; width: auto; border-radius: 10px; font-size: 14px; }
.btn[disabled] { opacity: .6; }
.btnrow { display: flex; gap: 10px; }
.btnrow > * { flex: 1; }
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.linkbtn { background: none; border: none; color: var(--cyan); font-weight: 600; font-size: 14px; min-height: 44px; cursor: pointer; padding: 0 4px; }
.linkbtn.red { color: var(--red); }
.addrow { display: flex; gap: 8px; }
.addrow .input { flex: 1; }
.addrow .btn { width: 48px; height: 48px; border-radius: 14px; padding: 0; flex-shrink: 0; }
.progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.progress i { height: 4px; border-radius: 2px; background: var(--line); }
.progress i.on { background: var(--amber); }
.choice { min-height: 62px; border-radius: 16px; background: var(--tile); border: 1px solid var(--line); color: var(--text); display: flex; align-items: center; gap: 14px; padding: 8px 14px; }
.choice:hover { color: var(--text); border-color: var(--amber); }
.choice .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--cyan); }
.choice b { display: block; font-size: 15px; font-weight: 600; }
.choice span span { display: block; font-size: 12px; color: var(--muted); }
.summary .li .main span:first-child { font-size: 14px; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: none; }
.kv span { font-size: 14px; color: var(--muted); }
.kv b { font-size: 15px; font-weight: 600; text-align: right; }
.flight { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.flight .r { font-family: var(--head); font-size: 17px; font-weight: 700; margin-top: 2px; }

.login { max-width: 420px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 80px) 22px 40px; display: flex; flex-direction: column; gap: 14px; min-height: 100dvh; }
.logo { width: 64px; height: 64px; border-radius: 18px; background: var(--amber); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 14px; }
.logo i { border-radius: 4px; background: var(--amber-ink); }
.logo i:last-child { opacity: .4; }
.pwwrap { position: relative; }
.pwwrap .input { padding-right: 70px; }
.pwwrap button { position: absolute; right: 4px; top: 2px; height: 44px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 100px); z-index: 50; background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.4); max-width: 90vw; }
.loading { color: var(--muted); padding: 40px 4px; text-align: center; }

/* ---------- laptop / large screens ---------- */
@media (min-width: 960px) {
  body { font-size: 15px; }
  .app { max-width: 1240px; padding: 24px 32px 40px; }
  .bottomnav { display: none; }
  .topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
  .topbar .brand { display: flex; align-items: center; gap: 12px; font-family: var(--head); font-weight: 700; font-size: 20px; color: var(--text); }
  .topbar .logo { width: 36px; height: 36px; border-radius: 10px; padding: 8px; gap: 3px; }
  .topbar nav { display: flex; gap: 8px; flex-wrap: wrap; }
  .topbar nav a { height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--text); font-weight: 500; font-size: 14px; display: flex; align-items: center; }
  .topbar nav a.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
  .topbar nav a.add { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); font-weight: 700; }
  .narrow { max-width: 560px; width: 100%; margin: 0 auto; }
  .homegrid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
  .homegrid .col { display: flex; flex-direction: column; gap: 14px; }
  .homehead .date { font-size: 44px; }
  .tile { padding: 18px 20px; border-radius: 22px; }
  .tile .big { font-size: 26px; }
  .day { height: 72px; }
  .day .n { font-size: 20px; }
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area { height: 86px; font-size: 14px; }
  .widegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .toast { bottom: 30px; }
}
[hidden]{display:none !important}
@media (min-width: 960px) { .homegrid .who { grid-template-columns: 1fr; } .homegrid .who span.l { white-space: normal; } }
