:root {
  /* Phone default: high-contrast */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface2: #f0f0f0;
  --border: #222222;
  --border-w: 2px;
  --text: #111111;
  --muted: #333333;
  --accent: #0055cc;
  --accent-soft: #e8f0ff;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --danger: #b42318;
  --danger-soft: #fde8e6;
  --ok: #0e7a3c;
  --ok-soft: #e3f6ea;
  --ph: #5b4cdb;
  --ph-soft: #eceaff;
  --nav-h: 64px;
  --tap: 48px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --radius: 14px;
  --shadow: none;
  --tracking: -0.01em;
  --lh: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  font-size: 17px;
  line-height: var(--lh);
  letter-spacing: var(--tracking);
}
a { color: var(--accent); text-decoration: none; }
button, input, select, a.btn {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 250, 250, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-w) solid var(--border);
  padding: 14px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.topbar .meta {
  font-size: 0.78rem;
  color: var(--muted);
}
.logout {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 8px 10px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}

.page {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.badge.zero {
  background: var(--surface2);
  color: var(--muted);
}

.strip {
  display: block;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: inherit;
  min-height: var(--tap);
  box-shadow: var(--shadow);
}
.strip:active { background: var(--surface2); }
.strip .label { font-weight: 650; color: var(--text); }
.strip .hint { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }
.strip .chev { color: var(--muted); font-size: 1.2rem; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.pill.live { background: var(--ok-soft); color: var(--ok); }
.pill.placeholder { background: var(--ph-soft); color: var(--ph); }
.pill.outlook { background: var(--accent-soft); color: var(--accent); }
.pill.hubspot { background: #ffe8e0; color: #c2410c; }
.pill.maxx { background: var(--warn-soft); color: var(--warn); }
.pill.re { background: var(--ok-soft); color: var(--ok); }
.pill.me { background: var(--surface2); color: var(--muted); }
.pill.onme { background: var(--accent-soft); color: var(--accent); }
.pill.waiting { background: var(--warn-soft); color: var(--warn); }
.pill.remind { background: var(--ph-soft); color: var(--ph); }
.pill.work { background: var(--accent-soft); color: var(--accent); }
.pill.personal { background: #f3e8ff; color: #7c3aed; }
.pill.sports { background: #ecfdf3; color: #067647; }
.pill.family { background: #fff7ed; color: #c2410c; }
.pill.cal { background: var(--surface2); color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
.pill.focus { background: var(--surface2); color: var(--muted); }
.pill.conflict { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }

.item-card { display: flex; flex-direction: column; gap: 4px; }
.item-card .title {
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.item-card .oneline {
  color: var(--muted);
  font-size: 0.9rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.count-pill {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text);
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border-w) solid var(--border);
}
.group-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 8px 2px 2px;
}

.fu-section { display: flex; flex-direction: column; gap: 10px; }
.fu-group { display: flex; flex-direction: column; gap: 8px; }
.fu-card .fu-head { margin-bottom: 2px; }
.fu-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.fu-actions form { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 10px 14px;
  border-radius: 12px;
  border: var(--border-w) solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  font-size: 0.95rem;
  width: 100%;
  cursor: pointer;
}
.btn:active { background: var(--surface2); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:active { opacity: 0.92; }
.btn-done {
  background: var(--ok-soft);
  border-color: #b7e0c6;
  color: var(--ok);
}
.btn-snooze {
  background: var(--surface2);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-link {
  width: auto;
  min-height: var(--tap);
  padding: 10px 4px;
  border: none;
  background: transparent;
  color: var(--accent);
  justify-content: flex-start;
  font-weight: 650;
}
.btn-passkey {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 10px;
}

.fu-form { display: flex; flex-direction: column; gap: 8px; }
.fu-form .form-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}
.fu-form label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.fu-form .opt { font-weight: 400; color: #8a8a8a; }
.fu-form input,
.fu-form select {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: 12px;
  border: var(--border-w) solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
.fu-form input:focus,
.fu-form select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.empty-inline {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 8px 2px;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: var(--border-w) solid var(--border);
  padding-bottom: var(--safe-b);
  display: flex;
  justify-content: center;
}
.bottom-nav .inner {
  max-width: 480px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: var(--nav-h);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  min-height: var(--nav-h);
  position: relative;
}
.nav-item .ico { font-size: 1.25rem; line-height: 1; color: inherit; }
.nav-item.active { color: var(--accent); }
.nav-item .dot {
  position: absolute;
  top: 8px;
  right: calc(50% - 18px);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: 18px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}
.login-card h1 { font-size: 1.6rem; margin-bottom: 4px; color: var(--text); }
.login-card p { color: var(--muted); margin-bottom: 20px; font-size: 0.95rem; }
.login-card label,
.login-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.login-card input[type="password"],
.login-form input[type="password"] {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  border-radius: 12px;
  border: var(--border-w) solid var(--border);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 14px;
  font-size: 1.05rem;
}
.login-card form > button,
.login-form button[type="submit"] {
  width: 100%;
  min-height: var(--tap);
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
}
.login-card form > button:active,
.login-form button[type="submit"]:active { opacity: 0.9; }
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 16px;
  color: var(--muted);
  font-size: 0.8rem;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.45;
}
.passkey-msg {
  font-size: 0.88rem;
  margin: 8px 0 4px;
  color: var(--muted);
}
.passkey-msg.error {
  color: var(--danger);
  background: var(--danger-soft);
  padding: 8px 10px;
  border-radius: 8px;
}
.passkey-msg.ok-msg {
  color: var(--ok);
  background: var(--ok-soft);
  padding: 8px 10px;
  border-radius: 8px;
}
.error {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  border: 1px solid #f0b4ae;
}

.title-link { color: inherit; font-weight: 650; }
.title-link:hover { color: var(--accent); text-decoration: underline; }

.home-top { display: flex; flex-direction: column; gap: 14px; }
.home-strips { display: flex; flex-direction: column; gap: 14px; }
.module-strips { display: flex; flex-direction: column; gap: 14px; }
.needs-desktop { display: flex; flex-direction: column; gap: 14px; }
.needs-cards { display: flex; flex-direction: column; gap: 10px; }
.module-grid { display: flex; flex-direction: column; gap: 14px; }

/* Schedule */
.sched-section { display: flex; flex-direction: column; gap: 10px; }
.sched-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: -4px;
}
.sched-days { display: flex; flex-direction: column; gap: 12px; }
.sched-day { display: flex; flex-direction: column; gap: 8px; }
.sched-time {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.sched-card.is-conflict {
  border-color: var(--danger);
  background: linear-gradient(0deg, var(--danger-soft), var(--surface));
}
.sched-card.is-focus {
  opacity: 0.88;
}
.sched-conflict-banner {
  background: var(--danger-soft);
  color: var(--danger);
  border: var(--border-w) solid #f0b4ae;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
}
.sched-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.src-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid transparent;
}
.src-chip.ok { border-color: #b7e0c6; color: var(--ok); background: var(--ok-soft); }
.src-chip.bad { border-color: #f0b4ae; color: var(--danger); background: var(--danger-soft); }

/* Passkey enroll */
.passkey-enroll {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.passkey-enroll-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.passkey-enroll-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.passkey-enroll-copy {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}
.passkey-enroll-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Tablet / desktop: premium product dashboard */
@media (min-width: 768px) {
  :root {
    --bg: #f3f1ed;
    --surface: #fffcf9;
    --surface2: #ebe7e1;
    --border: #e0dbd3;
    --border-w: 1px;
    --text: #1a1714;
    --muted: #6f6860;
    --accent: #3a5678;
    --accent-soft: #e8eef5;
    --warn: #8a6a1f;
    --warn-soft: #faf3e0;
    --danger: #a63d35;
    --danger-soft: #fceceb;
    --ok: #1f6b45;
    --ok-soft: #e6f4ec;
    --ph: #5a4db8;
    --ph-soft: #eeeafc;
    --shadow: 0 1px 2px rgba(26, 23, 20, 0.04), 0 8px 28px rgba(26, 23, 20, 0.05);
    --shadow-hover: 0 2px 6px rgba(26, 23, 20, 0.05), 0 14px 36px rgba(26, 23, 20, 0.07);
    --radius: 18px;
    --tracking: -0.014em;
    --lh: 1.45;
    --nav-h: 72px;
    --fs-display: 1.65rem;
    --fs-title: 1.125rem;
    --fs-body: 0.975rem;
    --fs-meta: 0.75rem;
  }

  html, body {
    font-size: 16px;
    letter-spacing: var(--tracking);
    background:
      radial-gradient(1200px 500px at 12% -10%, rgba(58, 86, 120, 0.06), transparent 55%),
      radial-gradient(900px 420px at 90% 0%, rgba(90, 77, 184, 0.04), transparent 50%),
      var(--bg);
  }

  .app {
    max-width: 1120px;
    padding-bottom: calc(var(--nav-h) + var(--safe-b) + 28px);
  }

  .page {
    padding: 28px 28px 36px;
    gap: 22px;
  }

  .topbar {
    background: rgba(243, 241, 237, 0.82);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    padding: 20px 28px 16px;
    border-bottom: 1px solid rgba(224, 219, 211, 0.85);
  }
  .topbar h1 {
    font-size: var(--fs-display);
    font-weight: 650;
    letter-spacing: -0.032em;
    line-height: 1.15;
  }
  .topbar .meta {
    font-size: var(--fs-meta);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 550;
    color: var(--muted);
    margin-top: 4px;
  }
  .logout {
    font-size: 0.8rem;
    font-weight: 550;
    letter-spacing: 0.02em;
    color: var(--muted);
    padding: 8px 14px;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .logout:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
  }

  .card, .strip {
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--surface);
  }
  .strip {
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  }
  .strip:hover {
    box-shadow: var(--shadow-hover);
    border-color: #d5cfc5;
    transform: translateY(-1px);
  }
  .strip:active {
    background: var(--surface);
    transform: none;
  }
  .strip .label {
    font-size: 1.02rem;
    font-weight: 650;
    letter-spacing: -0.02em;
  }
  .strip .hint {
    font-size: var(--fs-meta);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 550;
    margin-top: 6px;
    color: var(--muted);
  }
  .strip .chev {
    font-size: 1.35rem;
    opacity: 0.45;
    font-weight: 300;
  }

  .badge {
    min-width: 30px;
    height: 30px;
    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 2px rgba(166, 61, 53, 0.2);
  }
  .badge.zero {
    box-shadow: none;
    background: var(--surface2);
    color: var(--muted);
  }

  .section-head {
    margin-top: 2px;
    margin-bottom: 2px;
  }
  .section-title {
    font-size: var(--fs-title);
    font-weight: 650;
    letter-spacing: -0.022em;
    line-height: 1.25;
  }
  .count-pill {
    min-width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
    box-shadow: 0 1px 2px rgba(26, 23, 20, 0.03);
  }
  .group-label {
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 14px 2px 6px;
  }

  .item-card { gap: 6px; }
  .item-card .title {
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.3;
  }
  .item-card .oneline {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--muted);
  }

  .pills { gap: 6px; margin-bottom: 4px; }
  .pill {
    font-size: 0.64rem;
    font-weight: 650;
    letter-spacing: 0.055em;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
  }
  .pill.cal {
    letter-spacing: 0.01em;
    font-weight: 550;
    text-transform: none;
    background: var(--surface2);
  }
  .pill.conflict {
    border-color: #efc4bf;
    font-weight: 700;
  }

  .home-top { gap: 26px; }
  .home-strips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .home-fu {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .needs-desktop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
  }
  .needs-cards { gap: 12px; }
  .module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .module-strips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .fu-section { gap: 12px; }
  .fu-group { gap: 10px; }
  .fu-actions {
    gap: 10px;
    margin-top: 12px;
  }

  .btn {
    min-height: 44px;
    border-radius: 12px;
    border-width: 1px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .btn:hover {
    box-shadow: 0 1px 3px rgba(26, 23, 20, 0.06);
  }
  .btn-primary {
    box-shadow: 0 1px 3px rgba(58, 86, 120, 0.25);
  }
  .btn-primary:hover { filter: brightness(1.04); }
  .btn-ghost { background: transparent; }
  .btn-link {
    font-size: 0.9rem;
    letter-spacing: -0.01em;
  }

  .fu-form {
    gap: 10px;
    padding: 20px 22px;
  }
  .fu-form .form-title {
    font-size: var(--fs-title);
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
  }
  .fu-form label {
    font-size: var(--fs-meta);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
  }
  .fu-form input,
  .fu-form select {
    min-height: 44px;
    border-radius: 12px;
    border-width: 1px;
    background: #faf8f5;
    font-size: 0.95rem;
  }
  .fu-form input:focus,
  .fu-form select:focus {
    outline: 2px solid rgba(58, 86, 120, 0.35);
    outline-offset: 1px;
    background: var(--surface);
  }

  .empty {
    padding: 36px 16px;
    font-size: 0.95rem;
  }
  .empty-inline {
    font-size: 0.88rem;
    padding: 10px 4px;
  }

  /* Refined dock-style nav (same links, less mobile-tab feel) */
  .bottom-nav {
    border-top: none;
    background: transparent;
    padding: 0 24px calc(14px + var(--safe-b));
    pointer-events: none;
  }
  .bottom-nav .inner {
    pointer-events: auto;
    max-width: 560px;
    width: 100%;
    height: auto;
    min-height: 58px;
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 6px;
    background: rgba(255, 252, 249, 0.92);
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(26, 23, 20, 0.1), 0 2px 8px rgba(26, 23, 20, 0.04);
  }
  .nav-item {
    flex: 1;
    min-height: 52px;
    border-radius: 14px;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: var(--muted);
    transition: background 0.15s ease, color 0.15s ease;
  }
  .nav-item .ico {
    font-size: 1.1rem;
    opacity: 0.85;
  }
  .nav-item .nav-label { line-height: 1.2; }
  .nav-item:hover {
    background: rgba(26, 23, 20, 0.03);
    color: var(--text);
  }
  .nav-item.active {
    color: var(--accent);
    background: var(--accent-soft);
  }
  .nav-item.active .ico { opacity: 1; }
  .nav-item .dot {
    top: 6px;
    right: calc(50% - 16px);
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 2px var(--surface);
  }

  /* Schedule agenda */
  .sched-section { gap: 14px; }
  .sched-sub {
    font-size: var(--fs-meta);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 550;
    margin-top: -2px;
  }
  .sched-days {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: start;
  }
  .sched-day { gap: 10px; }
  .sched-day .group-label {
    margin-top: 0;
    margin-bottom: 2px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .sched-time {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted);
  }
  .sched-card.is-conflict {
    border-color: #efc4bf;
    background: linear-gradient(180deg, #fdf3f2 0%, var(--surface) 70%);
    box-shadow: 0 1px 2px rgba(166, 61, 53, 0.06), 0 8px 24px rgba(166, 61, 53, 0.05);
  }
  .sched-conflict-banner {
    border-width: 1px;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .src-chip {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border: 1px solid transparent;
  }

  .passkey-enroll {
    border-color: rgba(58, 86, 120, 0.28);
    background: linear-gradient(135deg, var(--accent-soft), var(--surface));
    box-shadow: var(--shadow);
  }
  .passkey-enroll-body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .passkey-enroll-title {
    font-size: var(--fs-title);
    letter-spacing: -0.02em;
  }
  .passkey-enroll-copy { font-size: 0.875rem; }
  .passkey-enroll-actions { min-width: 250px; }

  /* Login polish */
  .login-wrap {
    padding: 40px 24px;
    background:
      radial-gradient(700px 380px at 20% 10%, rgba(58, 86, 120, 0.08), transparent 60%),
      radial-gradient(600px 300px at 85% 80%, rgba(90, 77, 184, 0.05), transparent 55%),
      var(--bg);
  }
  .login-card {
    max-width: 420px;
    padding: 40px 36px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(26, 23, 20, 0.04), 0 24px 56px rgba(26, 23, 20, 0.07);
  }
  .login-eyebrow {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 5px 10px;
    border-radius: 999px;
    margin-bottom: 16px;
  }
  .login-card h1 {
    font-size: 1.85rem;
    font-weight: 650;
    letter-spacing: -0.035em;
    margin-bottom: 6px;
    line-height: 1.15;
  }
  .login-card > p,
  .login-lede {
    color: var(--muted);
    margin-bottom: 24px;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
  }
  .login-card input[type="password"],
  .login-form input[type="password"] {
    border-width: 1px;
    border-radius: 12px;
    background: #faf8f5;
    font-size: 1rem;
    margin-bottom: 16px;
  }
  .login-card form > button,
  .login-form button[type="submit"] {
    border-radius: 12px;
    font-weight: 650;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 3px rgba(58, 86, 120, 0.28);
  }
  .login-divider {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 550;
  }
  .login-divider::before,
  .login-divider::after {
    opacity: 0.35;
    background: var(--border);
  }
  .btn-passkey { border-radius: 12px; letter-spacing: -0.01em; }
  .error { border-radius: 12px; border-width: 1px; }
}

@media (min-width: 1024px) {
  :root {
    --fs-display: 1.8rem;
    --fs-title: 1.15rem;
  }

  .app {
    max-width: 1200px;
    padding-bottom: calc(var(--nav-h) + var(--safe-b) + 36px);
  }
  .page {
    padding: 32px 40px 44px;
    gap: 28px;
  }
  .topbar {
    padding: 22px 40px 18px;
  }
  .topbar h1 {
    font-size: var(--fs-display);
  }
  .home-top { gap: 32px; }
  .home-strips { gap: 20px; }
  .home-fu { width: 100%; }
  .needs-desktop {
    grid-template-columns: 1.12fr 0.88fr;
    gap: 32px;
  }
  .module-grid { gap: 20px; }
  .module-strips { gap: 18px; }
  .sched-section { gap: 16px; }
  .sched-days { gap: 22px; }
  .card, .strip {
    padding: 20px 22px;
  }
  .bottom-nav {
    padding: 0 40px calc(18px + var(--safe-b));
  }
  .bottom-nav .inner {
    max-width: 600px;
  }
  .login-card {
    max-width: 440px;
    padding: 48px 42px;
  }
}

/* —— Module tab quick-info + subtle add-todo —— */
.mod-section { display: flex; flex-direction: column; gap: 10px; }
.mod-cards { display: flex; flex-direction: column; gap: 10px; }
.mod-card .title { font-size: 1.02rem; }
.mod-linkout {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 0.95rem;
}
.mod-notes {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mod-notes .meta { font-size: 0.78rem; color: var(--muted); }

.mod-add {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 6px 12px;
  background: transparent;
}
.mod-add-summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 2px;
  user-select: none;
}
.mod-add-summary::-webkit-details-marker { display: none; }
.mod-add[open] .mod-add-summary { color: var(--text); margin-bottom: 6px; }
.mod-add-form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 6px;
}
.mod-add-form input[type="text"] {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: var(--border-w) solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}
.mod-add-form input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.btn-compact {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.9rem;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 900px) {
  .mod-add { max-width: 480px; }
  .mod-section { gap: 12px; }
}

.fu-actions-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.btn-remove {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
  font-weight: 600;
}
.btn-remove:active { background: var(--surface2); }
.chief-card .chief-resume { margin-top: 10px; }
.chief-card .chief-open {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
}
.btn-compact {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 0.92rem;
}

@media (min-width: 900px) {
  .fu-actions-3 { gap: 8px; }
  .btn-remove {
    font-size: 0.85rem;
    min-height: 40px;
    color: var(--muted);
  }
  .btn-remove:hover {
    border-color: var(--border);
    background: var(--surface2);
  }
  .chief-card .chief-open {
    font-size: 0.9rem;
  }
}
