:root {
  --bg: #f5eee3; --card: #fcf8f1; --ink: #3a302a; --muted: #85786c; --line: #e8dccb;
  --accent: #e7735b; --accent-ink: #fff; --soft: #efe5d6; --danger: #b4423a; --ok: #4f8a4b; --dark: #3b2f28; --teal: #4fa59a;
  --p1: #f6c2a8; --p2: #b9d4f0; --both: #f3c0d3; --other: #dcd7ea;
  --maint: #cce4c4; --bill: #f2da9c; --trip: #cbd2f3; --date: #f1b9c9; --holiday: #fde0cc;
  --serif: "Times New Roman", Times, "Liberation Serif", "Noto Serif", Georgia, serif;
  --radius: 16px; --tap: 52px; --rail: 84px; --bar: 74px;
  --shadow: 0 1px 2px rgba(70,50,30,.05), 0 3px 10px rgba(70,50,30,.05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif, "Apple Color Emoji", "Noto Color Emoji";
  background: var(--bg); color: var(--ink);
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: contain;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.hidden { display: none !important; }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login .card { width: min(420px, 100%); padding: 32px 28px; text-align: center; }
.login .logo { font-size: 3rem; }
.login h1 { font-size: 1.6rem; margin: 8px 0 4px; }
.login form { display: grid; gap: 14px; margin-top: 18px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--rail) 1fr; grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; }
.rail {
  background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 8px 10px max(8px, env(safe-area-inset-left)); gap: 4px; overflow-y: auto;
}
.navbtn {
  border: 0; background: transparent; border-radius: 14px; min-height: 72px; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.navbtn .ico { font-size: 1.6rem; line-height: 1; }
.navbtn.active { background: var(--soft); color: var(--accent); }
.rail .spacer { flex: 1; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px 22px; padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line); background: rgba(251,247,242,.92); backdrop-filter: blur(8px);
}
.clock { display: flex; flex-direction: column; }
.clock .time { font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; }
.clock .date { color: var(--muted); font-size: .95rem; }
.weather { margin-left: auto; display: flex; align-items: center; gap: 10px; text-align: right; }
.weather .wicon { font-size: 2rem; }
.weather .temp { font-size: 1.5rem; font-weight: 700; }
.weather .wdesc { font-size: .85rem; color: var(--muted); }
.sync { font-size: .8rem; color: var(--muted); min-width: 64px; text-align: right; }
.content { flex: 1; overflow-y: auto; padding: 20px 22px 40px; -webkit-overflow-scrolling: touch; }
.bottombar { display: none; }

@media (max-width: 759px) {
  .app { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .clock .time { font-size: 1.35rem; }
  .weather .wicon { font-size: 1.6rem; }
  .weather .temp { font-size: 1.25rem; }
  .sync { display: none; }
  .content { padding: 14px 14px calc(var(--bar) + 30px + env(safe-area-inset-bottom)); }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: #fff; border-top: 1px solid var(--line); padding: 4px 4px max(4px, env(safe-area-inset-bottom));
  }
  .bottombar .navbtn { min-height: 62px; font-size: .78rem; }
}

/* ---------- common bits ---------- */
.section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { margin-right: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 > .card + .card { margin-top: 0; }
@media (max-width: 899px) { .grid2 { grid-template-columns: 1fr; } }
.btn {
  min-height: var(--tap); padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff;
  font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: .95rem; }
.btn:disabled { opacity: .5; }
.btn:active { transform: scale(.98); }
.iconbtn { min-width: 48px; min-height: 48px; border-radius: 12px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=url], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border: 1px solid #ddd0c3; border-radius: 12px; background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(200,100,59,.35); outline-offset: 1px; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--soft); color: var(--ink); }
.pill.red { background: #fbe3df; color: #9b2f25; }
.pill.amber { background: #fbefd6; color: #85620f; }
.pill.green { background: #e2f1e2; color: #2f6a36; }
.pill.blue { background: #e1ecf8; color: #2b5f9e; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); }
.note { background: #fff8e8; border: 1px solid #f1e0b5; color: #6d5413; border-radius: 12px; padding: 10px 14px; font-size: .95rem; }
.ai-label { display: inline-block; font-size: .8rem; font-weight: 700; color: #6a4fa0; background: #efe9fa; border-radius: 8px; padding: 3px 8px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 14px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; min-height: 46px; padding: 0 16px; border-radius: 11px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* list rows */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); min-height: 60px; }
.item:last-child { border-bottom: 0; }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 600; overflow-wrap: anywhere; }
.item .sub { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.item.done .title { text-decoration: line-through; color: var(--muted); }
.check {
  width: 40px; height: 40px; border-radius: 12px; border: 2px solid #cdbfb1; background: #fff; flex: none; cursor: pointer;
  display: grid; place-items: center; font-size: 1.2rem; color: #fff;
}
.check.on { background: var(--ok); border-color: var(--ok); }

/* ---------- calendar ---------- */
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 1.3rem; font-weight: 700; min-width: 170px; text-align: center; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.month .dow { padding: 8px; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; background: #fdfaf6; border-bottom: 1px solid var(--line); text-align: center; }
.day { min-height: max(84px, calc((100dvh - 290px) / 6)); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; cursor: pointer; overflow: hidden; }
.day:nth-child(7n) { border-right: 0; }
.day.other { background: #fcf9f5; color: #b5aa9f; }
.day .num { font-weight: 700; font-size: .95rem; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.day.today .num { background: var(--accent); color: #fff; }
.chipev { display: block; font-size: .78rem; line-height: 1.25; padding: 2px 6px; border-radius: 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; font-weight: 600; }
.more { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 2px; font-size: .9rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.agenda-day { margin-top: 14px; }
.agenda-day h3 { font-size: 1rem; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; }
.agenda-day h3.today { color: var(--accent); }
.ev { display: flex; gap: 12px; align-items: stretch; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; cursor: pointer; min-height: 56px; }
.ev .bar { width: 6px; border-radius: 4px; flex: none; }
.ev .when { width: 92px; flex: none; color: var(--muted); font-size: .9rem; padding-top: 2px; }
.ev .what { flex: 1; min-width: 0; }
.ev .what .t { font-weight: 600; overflow-wrap: anywhere; }
.ev .what .s { color: var(--muted); font-size: .88rem; }
@media (max-width: 759px) {
  .day { min-height: 64px; padding: 3px; }
  .day .num { width: 26px; height: 26px; font-size: .85rem; }
  .chipev { font-size: 0; height: 7px; padding: 0; border-radius: 4px; margin-top: 3px; }
  .month .dow { padding: 6px 2px; font-size: .7rem; }
  .cal-title { min-width: 0; font-size: 1.1rem; }
}

/* ---------- groceries ---------- */
.quickadd { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.quickadd select { width: auto; }
@media (max-width: 759px) { .quickadd { grid-template-columns: 1fr auto; } .quickadd select { grid-column: 1 / -1; grid-row: 2; width: 100%; } }
.cat-head { font-size: .85rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 4px 2px; }

/* ---------- us / privacy ---------- */
.privacy-wrap { position: relative; }
.privacy-wrap.blurred > .privacy-content { filter: blur(18px); pointer-events: none; user-select: none; }
.privacy-cover {
  position: absolute; inset: 0; display: none; align-items: flex-start; justify-content: center; padding-top: 120px; z-index: 5;
}
.privacy-wrap.blurred > .privacy-cover { display: flex; }
.privacy-cover .card { text-align: center; max-width: 360px; }
.mood-scale { display: flex; gap: 6px; flex-wrap: wrap; }
.mood-scale button { font-size: 1.8rem; width: 56px; height: 56px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.mood-scale button.on { border-color: var(--accent); background: var(--soft); }
.qcard { background: linear-gradient(135deg, #fff4ea, #fde8ef); border: 1px solid #f3d6d6; border-radius: 20px; padding: 26px 22px; text-align: center; min-height: 150px; display: grid; place-items: center; }
.qcard .q { font-size: 1.35rem; font-weight: 700; line-height: 1.35; }
.qcard .cat { margin-bottom: 8px; }
.rating { display: inline-flex; gap: 4px; }
.rating button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.rating button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.spark .b { width: 22px; border-radius: 6px 6px 2px 2px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--soft); }
.big-stat { font-size: 2.2rem; font-weight: 800; line-height: 1; }

/* ---------- travel ---------- */
.trip-card { cursor: pointer; }
.countdown { font-size: 1.8rem; font-weight: 800; color: var(--trip); }
.sugg { border: 1px dashed #c9b6ea; background: #fbf9ff; }
.progress { height: 12px; background: var(--soft); border-radius: 8px; overflow: hidden; }
.progress > div { height: 100%; background: var(--ok); }
.progress.over > div { background: var(--danger); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(40,28,18,.35); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 22px; width: min(560px, 100%); max-height: calc(100% - 20px); overflow-y: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal h2 { margin-bottom: 14px; }
.modal form { display: grid; gap: 14px; }
.modal .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 6px; }
.modal .actions .left { margin-right: auto; }
@media (max-width: 759px) {
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92%; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
}
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.switch input { width: 54px; height: 32px; accent-color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: #2e2a26; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 60; font-weight: 600; max-width: 90%; }
.more-menu { display: grid; gap: 10px; }
.more-menu .btn { justify-content: flex-start; min-height: 64px; font-size: 1.1rem; }

/* header fit on narrow phones */
.clock .date, .weather .wdesc { white-space: nowrap; }
@media (max-width: 759px) {
  .clock .date { font-size: .85rem; }
  .weather .wdesc { font-size: .75rem; }
  .weather .wdesc .loc { display: none; }
}

@media (max-width: 759px) {
  .cal-head .seg { order: 3; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .cal-head .cal-nav { order: 4; width: 100%; }
  .cal-head .cal-nav .cal-title { flex: 1; text-align: center; }
  .cal-head > .btn.primary { order: 2; min-height: 44px; padding: 0 16px; }
}

@media (max-width: 759px) {
  .section-head > .seg:not(.cal-head .seg) { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .section-head > .seg button { white-space: nowrap; padding: 0 13px; }
}
@media (max-width: 759px) {
  .item.stack-sm { flex-wrap: wrap; row-gap: 8px; }
  .item.stack-sm > .body { flex: 1 1 calc(100% - 60px); }
  .item.stack-sm > .body + * { margin-left: auto; }
}
@media (max-width: 759px) {
  .trip-card .countdown { font-size: 1.15rem; white-space: nowrap; }
  .trip-card > .body { flex: 1 1 auto; }
}


/* =====================================================================
   Cream / floral theme (inspired by the r/GrokBot "Home Calendar/Dashboard")
   ===================================================================== */
body { background: var(--bg); }
.app, .login, .sleep {
  background-color: #f4ece0;
  background-image: url(/art/floral.svg), repeating-linear-gradient(180deg, rgba(120,90,60,.035) 0 1px, transparent 1px 44px), linear-gradient(180deg, #f8f2e8, #f1e7d8);
  background-repeat: no-repeat, repeat, no-repeat;
  background-position: right -70px bottom -90px, 0 0, 0 0;
  background-size: auto 86%, auto, cover;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
.serif { font-family: var(--serif); }
.card { background: rgba(252,248,241,.94); border-color: var(--line); }
.btn { background: #fffdf9; border-color: var(--line); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.seg { background: rgba(239,229,214,.85); }
.seg button.on { background: var(--dark); color: #fff; box-shadow: none; }
.chip.on { background: var(--dark); border-color: var(--dark); }
.day.today .num { background: #e5484d; }
.chipev, .wg-ev, .slot { color: var(--ink); }
.countdown { color: #4a5fae; }
.check.on { background: var(--ok); border-color: var(--ok); }
.ico { width: 22px; height: 22px; flex: none; }
.ico.xs { width: 14px; height: 14px; }
.ico.sm { width: 18px; height: 18px; }
.ico.md { width: 26px; height: 26px; }

/* login */
.login .card { background: rgba(252,248,241,.96); }
.login .logo { font-size: 2.4rem; font-family: var(--serif); }

/* rail */
.rail { background: rgba(243,234,221,.92); border-right: 1px solid var(--line); padding-left: max(6px, env(safe-area-inset-left)); padding-right: 6px; gap: 2px; }
.rail .monogram { font-family: var(--serif); font-size: 1.45rem; text-align: center; color: var(--ink); padding: 6px 0 10px; border-bottom: 1px solid var(--line); margin: 0 8px 6px; }
.navbtn { min-height: 62px; border-radius: 12px; font-size: .74rem; font-weight: 500; color: #6e6258; gap: 4px; }
.navbtn .ico { width: 22px; height: 22px; }
.navbtn.active { background: #fffdf9; color: var(--ink); box-shadow: var(--shadow); font-weight: 700; }
.navbtn .lbl { line-height: 1.1; text-align: center; }

/* header */
.topbar { background: transparent; border-bottom: 0; backdrop-filter: none; padding: 12px 18px 6px; padding-top: max(12px, env(safe-area-inset-top)); gap: 12px; }
.brand { display: flex; align-items: baseline; gap: 16px; min-width: 0; flex: 1; flex-wrap: nowrap; }
.hh-title { font-family: var(--serif); font-size: 2rem; font-weight: 400; white-space: nowrap; }
.topbar .time { font-size: 1.55rem; color: #6c6158; letter-spacing: .02em; white-space: nowrap; }
.weather { margin-left: 0; display: inline-flex; align-items: center; gap: 6px; align-self: center; white-space: nowrap; }
.weather .wlabel { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6c6158; }
.weather .temp { font-size: 1rem; font-weight: 500; }
.weather .wdesc { font-size: .85rem; color: var(--muted); }
.season { font-size: 1.3rem; align-self: center; }
.sync { min-width: 0; }
.roundbtn { position: relative; width: 50px; height: 50px; border-radius: 14px; border: 1px solid var(--line); background: #fffdf9; display: grid; place-items: center; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); flex: none; }
.roundbtn.active { background: var(--dark); color: #fff; }
.roundbtn .dot-badge { display: none; position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; border: 2px solid #fffdf9; }
.roundbtn.bell.has .dot-badge { display: block; }
.quickadd-btn { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 1.1rem; min-height: 50px; padding: 0 20px; border-radius: 14px; box-shadow: 0 2px 8px rgba(231,115,91,.3); }
.content { padding: 8px 18px 24px; }

/* quick add modal */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qa-btn { min-height: 64px; justify-content: flex-start; font-size: 1rem; }

/* ---------- Home dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.dcard { background: rgba(252,248,241,.94); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.dcard .eyebrow, .eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6c6158; }
.serif-title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; }
.serif-title.placeholder { color: var(--muted); font-style: italic; }
.small2 { font-size: .86rem; color: #5f544b; line-height: 1.35; overflow-wrap: anywhere; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.accent-left { border-left: 4px solid var(--teal); }
.d-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reminder { display: flex; align-items: center; gap: 10px; }
.reminder .grow, .grow { flex: 1; min-width: 0; }
.done-btn { min-height: 44px; padding: 0 18px; border-radius: 12px; background: #fffdf9; box-shadow: var(--shadow); }
.weekend { cursor: pointer; }
.d-mid { flex: 1; display: grid; grid-template-columns: 1fr 1.05fr .95fr; gap: 12px; min-height: 0; }
.daycard { display: flex; flex-direction: column; gap: 10px; }
.dc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.dc-weekday { font-family: var(--serif); font-size: 2.4rem; line-height: 1; }
.dc-date { font-family: var(--serif); font-size: 1.35rem; color: #5a4f46; margin-top: 2px; }
.dc-season { font-size: 1.7rem; }
.dc-wx { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill.dark { background: #efe2c9; color: #3a302a; font-weight: 700; }
.pill.outline { background: transparent; border: 1px solid #d7c8b4; font-weight: 500; }
.pill.outline.hot { border-color: var(--accent); color: #a8462f; }
.dc-quote { border-top: 1px solid var(--line); padding-top: 10px; font-family: var(--serif); font-size: 1rem; color: #4a4038; line-height: 1.4; }
.dc-quote .qa { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.sticky { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px dashed #d8c9b4; border-radius: 10px; background: transparent; color: #5f544b; cursor: pointer; font-size: .92rem; max-width: 100%; text-align: left; }
.sticky .ico { color: #d9a92a; }
.sticky.has { background: #fdf0b8; border: 0; box-shadow: 2px 3px 8px rgba(120,90,20,.15); transform: rotate(-1deg); font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", var(--serif); font-size: 1.02rem; color: #4a3f1a; white-space: pre-wrap; width: 100%; }
.dc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.linkbtn { border: 0; background: transparent; color: #6c6158; font-size: .9rem; cursor: pointer; padding: 6px 2px; min-height: 36px; }
.todaycol { display: flex; flex-direction: column; overflow-y: auto; }
.slot { display: flex; gap: 12px; align-items: center; border-radius: 10px; padding: 9px 12px; margin-bottom: 7px; cursor: pointer; min-height: 44px; }
.slot-time { width: 58px; flex: none; font-size: .86rem; color: #4e443c; }
.slot-title { font-weight: 700; overflow-wrap: anywhere; }
.tint-p1 { background: var(--p1); } .tint-p2 { background: var(--p2); } .tint-both { background: var(--both); } .tint-other { background: var(--other); }
.tint-maint { background: var(--maint); } .tint-bill { background: var(--bill); } .tint-trip { background: var(--trip); } .tint-date { background: var(--date); } .tint-holiday { background: var(--holiday); }
.soft-empty { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.05rem; padding: 10px 2px; }
.soft-empty .linkbtn { font-style: normal; font-family: inherit; color: var(--accent); padding-left: 0; }
.d-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.trow { padding: 6px 0; cursor: pointer; border-bottom: 1px solid rgba(232,220,203,.7); }
.trow:last-child { border-bottom: 0; }
.dinner { cursor: pointer; }
.wxstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 8px; }
.wxday { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 12px; font-size: .95rem; }
.wxday.now { background: #efe2c9; }
.wxday .wxd { font-weight: 700; }
.wxday .rain { font-size: .78rem; color: #6c6158; }
.wxday .rain.wet { color: #5b8fd6; }
.wxstrip .soft-empty { grid-column: 1 / -1; text-align: center; }

@media (min-width: 900px) and (min-height: 700px) {
  .content[data-tab="home"] { overflow-y: auto; }
  .dash { height: 100%; }
}
@media (max-width: 1050px) { .hh-title { font-size: 1.7rem; } .topbar .time { font-size: 1.3rem; } }
@media (min-width: 760px) and (max-width: 899px) {
  .d-mid { grid-template-columns: 1fr 1fr; }
  .d-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .season, .sync { display: none; }
  .quickadd-btn .lbl { display: none; }
  .quickadd-btn { padding: 0 14px; }
}

/* ---------- calendar extras ---------- */
.people-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 14px; min-height: 48px; }
.person-chip.p1 { background: var(--p1); } .person-chip.p2 { background: var(--p2); } .person-chip.both { background: var(--both); }
.person-chip .avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.7); font-family: var(--serif); font-size: 1.15rem; }
.person-chip .pname { font-weight: 700; }
.person-chip .psub { font-size: .8rem; color: #5a4f46; }
.cal-head .iconbtn { border: 1px solid var(--line); background: #fffdf9; border-radius: 14px; }
.cal-title { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; }
.month { background: rgba(252,248,241,.95); }
.month .dow { background: rgba(243,234,221,.8); }
.day.other { background: rgba(245,238,227,.7); }
.ev { background: rgba(252,248,241,.96); }
.weekgrid { padding: 0; overflow: hidden; }
.wg-head { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.wg-dayhead { padding: 8px 6px; border-left: 1px solid var(--line); cursor: pointer; min-width: 0; }
.wg-dname { display: flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.wg-num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 13px; }
.wg-dayhead.today .wg-num { background: #e5484d; color: #fff; padding: 0 6px; }
.wg-wx { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: .78rem; font-weight: 400; color: var(--muted); }
.wg-body { max-height: calc(100dvh - 330px); min-height: 300px; overflow-y: auto; }
.wg-grid { display: grid; grid-template-columns: 56px repeat(7, 1fr); }
.wg-hour { font-size: .7rem; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-6px); }
.wg-col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(180deg, var(--line) 0 1px, transparent 1px 44px); cursor: pointer; }
.wg-col.today { background-color: rgba(255,250,240,.6); }
.wg-ev { position: absolute; border-radius: 8px; padding: 3px 6px; overflow: hidden; font-size: .8rem; line-height: 1.2; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.wg-ev .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.wg-ev .s { font-size: .72rem; color: #4e443c; }
.wg-now { position: absolute; left: -4px; right: 0; height: 2px; background: #e5484d; pointer-events: none; }
.wg-now::before { content: ''; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }

/* ---------- sleep screen ---------- */
.sleep { position: fixed; inset: 0; z-index: 90; cursor: pointer; background-size: auto 96%, auto, cover; background-position: right -40px center, 0 0, 0 0; display: flex; align-items: center; }
.sleep-inner { padding: 0 6vw; max-width: 640px; display: flex; flex-direction: column; gap: 14px; }
.sleep-time { font-size: clamp(5rem, 15vw, 9rem); line-height: 1; font-weight: 300; letter-spacing: -.02em; }
.sleep-time .ampm { font-size: .3em; margin-left: 6px; }
.sleep-date { font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.sleep-wx { display: flex; align-items: center; gap: 6px; font-size: 1.35rem; }
.sleep-next { background: var(--both); border-radius: 12px; padding: 12px 16px; font-size: 1.25rem; }
.sleep-quote { font-family: var(--serif); font-size: 1.05rem; color: #4a4038; }
.sleep-quote .qa { font-size: .9rem; color: var(--muted); }
.sleep-hint { color: var(--muted); font-size: .95rem; }

/* ---------- phone ---------- */
@media (max-width: 759px) {
  .app { background-size: auto 60%, auto, cover; background-position: right -80px bottom 40px, 0 0, 0 0; }
  .topbar { padding: 10px 12px 4px; padding-top: max(10px, env(safe-area-inset-top)); gap: 8px; }
  .brand { flex-direction: column; align-items: flex-start; gap: 0; }
  .hh-title { font-size: 1.35rem; }
  .brand .time { display: none; }
  .weather { gap: 4px; }
  .weather .wlabel { display: none; }
  .weather .temp { font-size: .9rem; }
  .season, .sync { display: none; }
  .roundbtn { width: 44px; height: 44px; border-radius: 12px; }
  .quickadd-btn { min-height: 44px; padding: 0 12px; }
  .quickadd-btn .lbl { display: none; }
  .content { padding-top: 6px; }
  .bottombar { background: rgba(250,245,237,.97); }
  .bottombar .navbtn .ico { width: 24px; height: 24px; }
  .bottombar .navbtn { font-size: .74rem; }
  .d-top, .d-mid { grid-template-columns: 1fr; }
  .d-mid { display: flex; flex-direction: column; }
  .daycard { order: 1; } .todaycol { order: 2; } .d-right { order: 3; }
  .dc-weekday { font-size: 2rem; }
  .wxstrip { grid-template-columns: repeat(7, 64px); overflow-x: auto; scrollbar-width: none; }
  .people-row .person-chip { flex: 1 1 40%; }
  .more-menu .btn .ico { width: 24px; height: 24px; }
}

/* thin warm accent line under the header, like the reference */
.content::before { content: ''; display: block; height: 3px; margin: 0 4px 10px; border-radius: 3px; background: linear-gradient(90deg, #f0a35e, #e7735b 60%, rgba(231,115,91,0)); }
