:root {
  --bg: #f1f3ee;
  --card: #fbfcfa;
  --text: #1f2a24;
  --muted: #67756a;
  --line: #dde6dc;
  --primary: #486a56;
  --primary-2: #eef4ef;
  --accent: #e9e6dd;
  --danger: #b75050;
  --shadow: 0 10px 28px rgba(24, 35, 26, 0.08);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }
.app-shell {
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 42px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.brand-kicker, .section-kicker, .card-kicker, .tiny-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.08; }
h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.12; }
h3 { font-size: 20px; line-height: 1.2; }
.subtitle, .soft-text, .card-text, .hero-text {
  color: var(--muted);
  line-height: 1.6;
}
.card, .hero-card, .time-card, .notice-card, .panel-card, .compact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card { padding: 22px; margin-bottom: 16px; }
.topnav {
  position: sticky;
  top: 10px;
  z-index: 50;
  margin-bottom: 18px;
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.nav-brand {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-link {
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
}
.nav-link.active {
  background: var(--primary);
  color: #fff;
}
.nav-link:hover { background: var(--primary-2); color: var(--text); }
.header-actions, .button-row, .badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn, .btn-ghost, .btn-soft, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn { background: var(--primary); color: #fff; }
.btn-soft { background: var(--primary-2); color: var(--primary); border-color: #d3e0d4; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-danger { background: #fff1f1; color: var(--danger); border-color: #efc9c9; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}
.summary-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--primary-2);
  color: var(--text);
  border: 1px solid #d8e5d9;
  font-size: 14px;
}
.pill strong { font-size: 15px; }
.hero-side {
  padding: 18px;
  border-radius: 18px;
  background: var(--accent);
  border: 1px solid #ebe2cf;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}
.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 16px;
}
.section-stack { display: grid; gap: 14px; }
.time-list { display: grid; gap: 14px; }
.time-card { padding: 18px; }
.time-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.time-meta { color: var(--muted); font-size: 14px; }
.items-list { display: grid; gap: 10px; }
.item-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fcfdfb;
}
.item-row.done { background: #f1f6f1; }
.item-row.done .item-name { text-decoration: line-through; color: var(--muted); }
.checkbox-wrap {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 2px;
}
.item-checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.custom-checkbox {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  background: #fff;
  border: 2px solid #bdcdbf;
}
.item-checkbox:checked + .custom-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}
.item-checkbox:checked + .custom-checkbox::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.item-content { display: grid; gap: 3px; }
.item-name { font-weight: 600; }
.item-note { color: var(--muted); font-size: 14px; }
.notice-card, .panel-card, .compact-card { padding: 18px; }
.share-note-card {
  margin-bottom: 16px;
}
.share-note-card p {
  color: var(--muted);
  line-height: 1.55;
}
.share-note-card strong {
  color: var(--text);
}
.list-clean {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text);
}
.simple-list {
  display: grid;
  gap: 10px;
}
.simple-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.simple-row:last-child { border-bottom: 0; }
.tag {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--primary-2);
  color: var(--primary);
  font-size: 13px;
}
.two-col, .cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.link-card, .supp-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.link-url {
  margin-top: 10px;
  color: var(--primary);
  word-break: break-word;
  font-size: 14px;
}
.admin-grid { display: grid; gap: 16px; }
.admin-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.field-label { display: block; margin-bottom: 8px; font-weight: 600; }
textarea, input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fcfdfb;
  color: var(--text);
}
textarea { min-height: 210px; resize: vertical; }
.status { margin-top: 10px; color: var(--muted); }
.footer-note { margin-top: 16px; color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }
@media (max-width: 860px) {
  .hero-grid, .layout-grid, .two-col, .cards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app-shell { width: min(100%, calc(100% - 20px)); }
  .topbar { flex-direction: column; }
  .topnav-inner { align-items: center; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
  }
  .topnav.open .nav-links { display: flex; }
  .nav-link { width: 100%; }
  .summary-inline { gap: 8px; }
  .simple-row { flex-direction: column; }
}


.hero-card-simple { padding: 26px 22px; }
.routine-topbar { margin-bottom: 18px; }
.time-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.item-main { display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; }
.inline-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.tool-btn:hover { background: var(--primary-2); }
.tool-danger { color: var(--danger); border-color: #efc9c9; background: #fff7f7; }
.block-tools { justify-content: flex-end; }
.item-tools { margin-left: auto; }

@media (max-width: 820px) {
  .routine-topbar { align-items: stretch; }
  .routine-topbar .button-row { width: 100%; }
  .time-head { flex-direction: column; align-items: stretch; }
  .time-head-right { align-items: flex-start; }
  .item-row { flex-direction: column; }
  .item-tools { margin-left: 0; }
}

.save-note{margin:6px 0 14px;color:var(--muted);font-size:14px;}
.hidden-file{display:none;}
.file-btn{cursor:pointer;}

.link-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
@media (max-width: 720px) { .link-card-top { flex-direction:column; } }

.hero-card-inline {
  padding: 22px 24px;
  background: var(--accent);
  border-color: #ddd8cc;
}
.hero-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.summary-inline-right {
  margin-top: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.time-head-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 760px) {
  .hero-inline-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .summary-inline-right {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}


.actions-menu-wrap { position: relative; }
.actions-menu-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  box-shadow: var(--shadow);
}
.actions-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  z-index: 100;
}
.actions-dropdown.open { display: block; }
.actions-summary {
  padding: 10px 12px 12px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.actions-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  display: block;
}
.actions-item:hover { background: var(--primary-2); }
.actions-item-danger { color: var(--danger); }
.hero-card-inline, .time-card, .link-card, .supp-card, .admin-card, .topnav-inner { background: #fff; }
@media (max-width: 720px) {
  .actions-dropdown { right: 0; width: min(220px, calc(100vw - 32px)); }
}


/* UX polish */
.item-row,
.tool-btn,
.actions-menu-btn,
.actions-item,
.btn,
.btn-soft,
.btn-ghost,
.btn-danger,
.nav-link {
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.item-row:hover {
  transform: translateY(-1px);
  background: #f6f8f4;
}

.item-row.done {
  background: #e8efe6;
}

.item-row.is-popping {
  animation: itemPop 180ms ease-out;
}

@keyframes itemPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(0.995); }
}

.custom-checkbox {
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.item-checkbox:hover + .custom-checkbox {
  box-shadow: 0 0 0 4px rgba(72, 106, 86, 0.08);
}

.item-checkbox:checked + .custom-checkbox {
  transform: scale(1.08);
}

.tool-btn:hover,
.actions-item:hover,
.btn:hover,
.btn-soft:hover,
.btn-ghost:hover,
.btn-danger:hover,
.actions-menu-btn:hover {
  transform: translateY(-1px);
}

.tool-btn:active,
.actions-item:active,
.btn:active,
.btn-soft:active,
.btn-ghost:active,
.btn-danger:active,
.actions-menu-btn:active {
  transform: scale(0.97);
}

.actions-dropdown {
  transform-origin: top right;
}

.actions-dropdown.open {
  animation: dropdownFadeIn 150ms ease;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


/* Mobile cleanup */
@media (max-width: 720px) {
  .routine-topbar {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .routine-topbar .brand-kicker {
    margin-bottom: 6px;
  }

  .routine-topbar h1 {
    font-size: 32px;
  }

  .actions-menu-wrap {
    margin-top: 6px;
    margin-left: 8px;
    flex: 0 0 auto;
  }

  .actions-menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 26px;
  }

  .hero-card-inline {
    padding: 18px 16px;
  }

  .hero-inline-row {
    align-items: flex-start;
  }

  .summary-inline-right,
  .time-meta {
    display: none;
  }

  .time-card {
    padding: 16px;
  }

  .time-head {
    margin-bottom: 10px;
  }

  .items-list {
    gap: 8px;
  }

  .item-row {
    padding: 12px 14px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
}


/* icon buttons */
.nav-toggle,
.actions-menu-btn {
  position: relative;
  align-items: center;
  justify-content: center;
}
.actions-menu-btn {
  display: inline-flex;
}
.nav-toggle {
  display: none;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle {
  gap: 4px;
  flex-direction: column;
}
.topnav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.topnav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.topnav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.actions-menu-btn span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text);
  display: block;
}
.actions-menu-btn { gap: 5px; }
.actions-menu-btn span + span { margin-left: 0; }

.drag-handle {
  min-width: 38px;
  font-size: 18px;
  letter-spacing: -2px;
  cursor: grab;
  touch-action: none;
}
.drag-handle:active { cursor: grabbing; }
.item-row.dragging {
  opacity: 0.55;
}
.item-row.drag-target-before {
  box-shadow: inset 0 3px 0 var(--primary);
}
.item-row.drag-target-after {
  box-shadow: inset 0 -3px 0 var(--primary);
}
.drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 18px 40px rgba(24,35,26,0.18);
}

@media (max-width: 720px) {
  .topnav {
    top: 8px;
    margin-bottom: 14px;
  }
  .topnav-inner {
    position: relative;
    padding: 14px 16px;
    min-height: 78px;
  }
  .nav-brand {
    font-size: 15px;
    font-weight: 700;
    max-width: calc(100% - 72px);
  }
  .nav-toggle {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    margin-left: auto;
    background: #fff;
    box-shadow: 0 6px 18px rgba(24,35,26,0.06);
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(240px, calc(100vw - 24px));
    padding: 10px;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: none;
    gap: 6px;
  }
  .topnav.open .nav-links {
    display: flex;
    animation: dropdownFadeIn 150ms ease;
  }
  .nav-link {
    padding: 14px 16px;
    border-radius: 14px;
  }
  .routine-topbar {
    position: relative;
    min-height: 72px;
    align-items: flex-start;
  }
  .actions-menu-wrap {
    position: absolute;
    right: 0;
    top: 8px;
    margin: 0;
  }
  .actions-menu-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 0;
    box-shadow: 0 6px 18px rgba(24,35,26,0.06);
  }
  .hero-card-inline {
    padding: 16px 18px;
    border-radius: 20px;
  }
  .hero-inline-row {
    align-items: flex-start;
    min-height: auto;
  }
  .routine-topbar h1 {
    font-size: 30px;
    max-width: calc(100% - 72px);
  }
  .time-card {
    border-radius: 20px;
  }
}

@media (min-width: 721px) {
  .nav-toggle {
    display: none !important;
  }
}


/* Supplements list page */
.supplements-topbar { align-items: flex-end; }
.supplements-page-stack { gap: 18px; }
.supplements-card-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:14px; }
.supplements-list-card { overflow:hidden; }
.supp-table-shell { border:1px solid var(--line); border-radius:18px; overflow:hidden; background:#fff; }
.supp-table-head, .supp-table-row { display:grid; grid-template-columns:minmax(260px,2.1fr) .9fr .8fr .8fr 1fr; gap:14px; align-items:center; }
.supp-table-head { padding:14px 18px; background:#f8faf7; border-bottom:1px solid var(--line); text-transform:uppercase; letter-spacing:.08em; font-size:12px; color:var(--muted); font-weight:700; }
.supp-table-row { padding:16px 18px; border-bottom:1px solid var(--line); }
.supp-table-row:last-child { border-bottom:0; }
.supp-name { font-weight:600; font-size:15px; }
.supp-subline { margin-top:5px; font-size:13px; color:#6f8f67; line-height:1.45; }
.supp-col-actions, .supp-col-link, .supp-col-order, .supp-col-status { display:flex; align-items:center; }
.supp-col-name { min-width: 0; text-align: left; justify-self: stretch; }
.supp-table-head > div { text-align: left; }
.supp-table-head > div:not(:first-child) { text-align: center; }
.supp-col-link { gap: 8px; justify-content: center; }
.supp-col-status, .supp-col-order { justify-content: center; }
.supp-tools-end { justify-content:flex-end; }
.inline-tools-tight { gap:6px; }
.btn-small { min-height:34px; padding:7px 12px; border-radius:12px; }
.order-index, .muted-inline { color:var(--muted); font-size:14px; }
.status-daily { background:var(--primary-2); color:var(--primary); }
.status-optional { background:#f7efe2; color:#8b6a2a; }
.status-paused { background:#f6e9e9; color:#9b4e4e; }
.supplements-stats-card { margin-top:2px; }
@media (max-width: 960px) {
  .supp-table-head, .supp-table-row { grid-template-columns:minmax(0,1.8fr) .9fr .9fr .9fr; }
  .supp-col-actions { grid-column:1 / -1; justify-content:flex-start; padding-top:8px; }
  .supp-table-head > :last-child { display:none; }
}
@media (max-width: 720px) {
  .supplements-topbar { align-items:stretch; }
  .supplements-topbar .header-actions { width:100%; }
  .supplements-topbar .header-actions > * { flex:1 1 160px; }
  .supp-table-head { display:none; }
  .supp-table-row { grid-template-columns:1fr; gap:10px; padding:16px; }
  .supp-col-status, .supp-col-order, .supp-col-link, .supp-col-actions { justify-content:flex-start; }
  .supp-col-order::before, .supp-col-link::before, .supp-col-status::before { margin-right:8px; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
  .supp-col-order::before { content:'Order'; }
  .supp-col-link::before { content:'Link'; }
  .supp-col-status::before { content:'Status'; }
}


.modal-backdrop.hidden{display:none;}
.modal-backdrop{position:fixed;inset:0;background:rgba(26,33,28,.24);display:flex;align-items:center;justify-content:center;padding:20px;z-index:1000;}
.modal-card{background:#fbfcfa;border:1px solid var(--line);border-radius:24px;box-shadow:0 20px 50px rgba(31,41,35,.12);width:min(860px,100%);padding:20px;}
.supplement-modal-card{max-width:820px;}
.modal-topline{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;}
.supp-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.field-group{display:flex;flex-direction:column;gap:8px;}
.field-group>span{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);}
.field-group input,.field-group select,.field-group textarea{border:1px solid var(--line);background:#fff;border-radius:18px;padding:14px 16px;font:inherit;color:var(--ink);outline:none;}
.field-group textarea{resize:vertical;min-height:110px;}
.field-span-2{grid-column:1 / -1;}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px;}
.btn-danger-outline{background:#fff;color:#c64d4d;border:1px solid #e9c2c2;border-radius:14px;padding:10px 14px;font:inherit;cursor:pointer;}
.supp-col-actions{justify-content:flex-end;}
.icon-pencil{min-width:46px;height:40px;border-radius:12px;padding:0;font-size:18px;}
@media (max-width:720px){
  .supp-form-grid{grid-template-columns:1fr;}
  .field-span-2{grid-column:auto;}
  .modal-card{padding:16px;border-radius:20px;max-height:90vh;overflow:auto;}
}


.field-inline-action { display:flex; gap:10px; align-items:center; }
.field-inline-action input { flex:1; min-width:0; }
@media (max-width: 700px) { .field-inline-action { flex-direction:column; align-items:stretch; } }


.mini-muted{margin:4px 0 0;color:var(--muted);font-size:13px;}
.header-actions-compact{justify-content:flex-end;align-items:center;}
.supp-col-pick{display:flex;align-items:center;justify-content:center;}
.supp-select{width:18px;height:18px;accent-color:#6f8f67;cursor:pointer;}
.supp-table-row > div:first-child{justify-self:stretch;}
@media (max-width: 760px){
  .header-actions-compact{width:100%;justify-content:stretch;}
  .header-actions-compact > *{flex:1 1 180px;}
}


/* April 2026 polish */
.hero-card-inline {
  background: linear-gradient(135deg, #edf6ef 0%, #f7f1e7 100%);
  border-color: #d8e2d6;
  box-shadow: 0 14px 30px rgba(31, 42, 36, 0.08);
}
.hero-card-inline #todayLabel {
  font-size: clamp(26px, 4vw, 42px);
}
.topnav {
  z-index: 120;
}
.topnav-inner {
  min-height: 72px;
}
.nav-toggle {
  border-color: #cfdbd1;
  box-shadow: 0 8px 20px rgba(24,35,26,0.08);
}
@media (max-width: 720px) {
  .topnav {
    top: max(8px, env(safe-area-inset-top));
  }
  .topnav-inner {
    padding-right: 72px;
  }
  .nav-toggle {
    display: inline-flex !important;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
  }
  .nav-brand {
    padding-right: 8px;
  }
}

.supp-table-head, .supp-table-row {
  grid-template-columns: minmax(260px,2.2fr) .9fr 1.15fr .9fr;
}
.supp-table-row {
  cursor: pointer;
}
.supp-table-body > .supp-table-row:nth-child(odd) {
  background: #ffffff;
}
.supp-table-body > .supp-table-row:nth-child(even) {
  background: #edf4eb;
}
.supp-table-body > .supp-table-row:hover {
  background: #e4eee1;
}
.supp-table-row.is-selected {
  background: #dce9d7;
}
.supp-table-row.is-selected .supp-name {
  color: var(--primary);
}

.supp-col-order {
  gap: 10px;
  flex-wrap: wrap;
}
.supp-order-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
.supp-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.supp-select-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid #b7c8ba;
  background: #fff;
  position: relative;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.supp-select:checked + .supp-select-box {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}
.supp-select:checked + .supp-select-box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.supp-order-tools {
  display: inline-flex;
}
@media (max-width: 960px) {
  .supp-table-head, .supp-table-row {
    grid-template-columns: minmax(0,1.7fr) .9fr 1.1fr .9fr;
  }
}
@media (max-width: 720px) {
  .supp-table-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .supp-col-order,
  .supp-col-link,
  .supp-col-status {
    justify-content: flex-start;
  }
  .supp-col-name {
    justify-self: stretch;
  }
  .supp-col-order::before,
  .supp-col-link::before,
  .supp-col-status::before {
    margin-right: 8px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
  }
  .supp-col-status::before { content: 'Status'; }
  .supp-col-order::before { content: 'Order'; }
  .supp-col-link::before { content: 'Link'; }
}


/* April 2026 sizing tweak */
.routine-topbar h1 {
  font-size: 32px;
  line-height: 1.08;
}
.hero-card-inline #todayLabel {
  font-size: 32px;
  line-height: 1.08;
}
@media (max-width: 720px) {
  .routine-topbar h1 {
    font-size: 32px;
  }
  .hero-card-inline #todayLabel {
    font-size: 32px;
  }
}



/* Final April 22 refinements */
.hero-card-inline{
  background:#f3efe5 !important;
}
.hero-card-inline #todayLabel{
  font-size:32px !important;
  line-height:1.08;
}
.routine-topbar h1{
  font-size:32px !important;
  line-height:1.08;
}

/* time colors */
.time-block-label,
.time-card .card-kicker,
.schedule-time,
.time-slot,
.time-block-time,
.time-label{
  color:#6f8f67 !important;
}

/* supplements compact actions */
.supplements-topbar .header-actions{
  display:none !important;
}
.supplements-list-card{
  overflow:visible;
}
.supplements-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.supplements-card-head .mini-muted{
  margin-top:6px;
}
.supp-actions-wrap{
  position:relative;
  flex:0 0 auto;
}
.supp-actions-btn{
  width:48px;
  height:48px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(24,35,26,0.06);
  font-size:28px;
  line-height:1;
}
.supp-actions-dropdown{
  position:absolute;
  right:0;
  top:56px;
  min-width:240px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 18px 40px rgba(24,35,26,0.12);
  padding:10px;
  display:none;
  z-index:50;
}
.supp-actions-dropdown.open{
  display:block;
}
.supp-actions-menu-item{
  width:100%;
  text-align:left;
  border:0;
  background:#fff;
  color:var(--text);
  border-radius:12px;
  padding:12px 14px;
  cursor:pointer;
}
.supp-actions-menu-item:hover{
  background:var(--primary-2);
}
.supp-compact-list{
  display:flex;
  flex-direction:column;
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  background:#fff;
}
.supp-compact-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto auto;
  gap:12px;
  align-items:center;
  padding:14px 16px;
  border-top:1px solid var(--line);
  cursor:pointer;
}
.supp-compact-row:first-child{
  border-top:0;
}
.supp-compact-row.is-selected{
  background:#f1f7f1;
}
.supp-main{
  min-width:0;
}
.supp-main-top{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.supp-name{
  font-weight:700;
  font-size:16px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.supp-time-inline{
  font-size:14px;
  color:#6f8f67;
  white-space:nowrap;
}
.supp-order-label{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
}
.supp-col-order{
  display:flex;
  align-items:center;
  gap:10px;
}
.supp-col-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.supp-status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:var(--primary-2);
  color:var(--primary);
  font-size:14px;
}
.supp-link-btn,
.supp-icon-btn{
  min-width:46px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.supp-link-btn{
  padding:0 14px;
}
.supp-col-order .supp-select{
  width:22px;
  height:22px;
}
.supp-hidden-desktop{
  display:none;
}
@media (max-width: 760px){
  .supplements-page-stack{
    gap:14px;
  }
  .supplements-card-head{
    align-items:center;
  }
  .supp-actions-dropdown{
    right:0;
    left:auto;
    min-width:220px;
  }
  .supp-compact-list{
    border-radius:18px;
  }
  .supp-compact-row{
    grid-template-columns:minmax(0,1fr) auto auto auto;
    gap:10px;
    padding:12px 14px;
  }
  .supp-status-pill{
    display:none;
  }
  .supp-order-label{
    display:inline-block;
  }
  .supp-name{
    font-size:15px;
  }
  .supp-time-inline{
    font-size:13px;
  }
  .supp-link-btn{
    padding:0 12px;
    min-width:44px;
    height:38px;
  }
  .supp-icon-btn{
    min-width:38px;
    width:38px;
    height:38px;
  }
}


/* Fix compact supplements rendering */
#supplementsStatsCard{display:none !important;}
.supplements-card-head{margin-bottom:12px;}
#supplementsTableMount{margin-top:0;}


/* Menu separators */
.supp-actions-sep{
  height:1px;
  background:var(--line);
  margin:8px 6px;
}



/* Links page */
.links-page-stack{
  gap:18px;
}
.links-list-card{
  padding:18px;
}
.links-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.links-library{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.links-group{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
}
.links-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:#f8faf7;
}
.links-group-head h3{
  font-size:18px;
}
.links-group-list{
  display:flex;
  flex-direction:column;
}
.link-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  border-top:1px solid var(--line);
}
.link-row:first-child{
  border-top:0;
}
.link-main{
  min-width:0;
}
.link-title-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.link-title{
  font-weight:700;
  font-size:16px;
  line-height:1.2;
}
.link-url{
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.link-notes{
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
}
.link-row-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.link-open-btn{
  min-width:72px;
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.links-empty-card{
  padding:24px;
  background:#fff;
  border:1px dashed var(--line);
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.link-modal-card{
  max-width:860px;
}

@media (max-width:760px){
  .links-list-card{
    padding:14px;
  }
  .link-row{
    grid-template-columns:1fr;
    align-items:flex-start;
  }
  .link-row-actions{
    width:100%;
  }
  .link-open-btn{
    min-width:66px;
  }
  .links-empty-card{
    flex-direction:column;
    align-items:flex-start;
  }
}


/* Links + mobile alignment fixes */
.links-list-card{
  min-height: 220px;
}
#linksTableMount{
  min-height: 80px;
}
.links-empty-card{
  margin-top: 6px;
}
.links-empty-card .mini-muted{
  margin-top: 6px;
}
@media (max-width: 760px){
  .header-actions,
  .link-row-actions,
  .modal-actions{
    justify-content: flex-start !important;
    align-items: flex-start;
  }

  .link-row-actions{
    width: 100%;
  }

  .actions-menu-wrap{
    align-self: flex-start;
  }

  .check-row{
    cursor: pointer;
  }

  .check-row > *{
    pointer-events: none;
  }

  .check-row input[type="checkbox"],
  .check-row button,
  .check-row a,
  .check-row label{
    pointer-events: auto;
  }
}


/* Perfect Links page refresh */
.links-page-stack{
  gap:18px;
}
.links-list-card{
  padding:18px;
  min-height:240px;
}
.links-hero-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.links-head-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.links-groups-wrap{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.links-group{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.links-group-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding:0 2px;
}
.links-group-head h2{
  font-size:20px;
  line-height:1.1;
}
.links-cards-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}
.link-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:14px;
  box-shadow:0 6px 18px rgba(24,35,26,0.04);
}
.link-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.link-card-title{
  font-size:18px;
  line-height:1.2;
  margin:0;
}
.link-category-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:var(--primary-2);
  color:var(--primary);
  font-size:13px;
  white-space:nowrap;
}
.link-card-url{
  color:var(--muted);
  font-size:14px;
  line-height:1.4;
  word-break:break-all;
}
.link-card-notes{
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
  margin:0;
}
.link-card-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.link-open-btn{
  min-width:82px;
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.links-empty-state{
  min-height:220px;
  border:1px dashed var(--line);
  border-radius:22px;
  background:#f9fbf8;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:10px;
  padding:24px;
}
.links-empty-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  color:var(--primary);
}
.link-modal-card{
  max-width:860px;
}

@media (max-width: 860px){
  .links-cards-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:760px){
  .links-list-card{
    padding:14px;
  }
  .links-hero-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .links-head-actions,
  .header-actions,
  .link-card-actions,
  .modal-actions{
    justify-content:flex-start !important;
    align-items:flex-start;
  }
  .links-head-actions{
    width:100%;
  }
  .links-head-actions > *{
    width:auto;
  }
  .link-card{
    padding:14px;
  }
  .link-card-top{
    flex-direction:column;
  }
}


/* Links page stable fix */
.links-page-stack{
  gap:18px;
}
.links-list-card{
  padding:18px;
  min-height:240px;
}
.links-hero-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.links-groups-wrap{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.links-group{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.links-group-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding:0 2px;
}
.links-group-head h2{
  font-size:20px;
  line-height:1.1;
}
.links-cards-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}
.link-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:14px;
  box-shadow:0 6px 18px rgba(24,35,26,0.04);
}
.link-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.link-card-title{
  font-size:18px;
  line-height:1.2;
  margin:0;
}
.link-category-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:var(--primary-2);
  color:var(--primary);
  font-size:13px;
  white-space:nowrap;
}
.link-card-url{
  color:var(--muted);
  font-size:14px;
  line-height:1.4;
  word-break:break-all;
}
.link-card-notes{
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
  margin:0;
}
.link-card-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.link-open-btn{
  min-width:82px;
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.links-empty-state{
  min-height:220px;
  border:1px dashed var(--line);
  border-radius:22px;
  background:#f9fbf8;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:10px;
  padding:24px;
}
.links-empty-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  color:var(--primary);
}
.link-modal-card{
  max-width:860px;
}
@media (max-width: 860px){
  .links-cards-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width:760px){
  .links-list-card{
    padding:14px;
  }
  .links-hero-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .header-actions,
  .link-card-actions,
  .modal-actions{
    justify-content:flex-start !important;
    align-items:flex-start;
  }
  .link-card{
    padding:14px;
  }
  .link-card-top{
    flex-direction:column;
  }
}


/* links page stability patch */
.compact-link-card{
  padding: 18px 20px;
}
.compact-link-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.compact-link-text{
  min-width:0;
  flex:1 1 auto;
}
.compact-link-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.compact-link-card .link-card-title{
  margin:0 0 4px;
}
.compact-link-card .link-card-url,
.compact-link-card .link-card-notes{
  margin:0;
}
.links-group-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
@media (max-width: 720px){
  .compact-link-main{
    align-items:flex-start;
    flex-direction:column;
  }
  .compact-link-right{
    width:100%;
    justify-content:flex-start;
  }
}


.time-head h3{
  color:#6f8f67;
}

.link-row-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.mini-move-btn{
  width:42px;
  min-width:42px;
  height:42px;
  padding:0;
  font-size:18px;
  line-height:1;
}

@media (max-width: 700px){
  .link-row-actions{
    justify-content:flex-start;
  }
}


.link-title-link{
  color:#2f5ea8;
  text-decoration:none;
}

.link-title-link:hover{
  text-decoration:underline;
}

/* Mobile app redesign */
.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;
}

body {
  background: #efefeb;
}

.app-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  padding: 14px 8px 112px;
}

.topnav {
  position: sticky;
  top: 0;
  margin: 0 0 12px;
  padding-top: 0;
  z-index: 90;
}

.topnav-inner {
  height: 50px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: rgba(250, 250, 247, 0.92);
  box-shadow: none;
}

.nav-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
}

.nav-logo {
  width: 34px;
  height: 34px;
  border: 1px solid #dde8dd;
  border-radius: 14px;
  background: #fff;
  color: #2f7952;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.nav-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-toggle {
  display: inline-flex !important;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(31, 42, 36, 0.08);
}

.nav-links {
  position: absolute;
  right: 8px;
  top: 48px;
  width: 190px;
  display: none;
  flex-direction: column;
  align-items: stretch;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(31, 42, 36, 0.16);
}

.topnav.open .nav-links {
  display: flex;
}

.nav-link {
  width: 100%;
  padding: 13px 14px;
  border-radius: 13px;
}

.bottomnav {
  position: fixed;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  width: min(386px, calc(100% - 16px));
  height: 66px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  border: 1px solid #e1e5dd;
  border-radius: 25px;
  background: rgba(255, 255, 252, 0.96);
  box-shadow: 0 14px 34px rgba(31, 42, 36, 0.15);
  backdrop-filter: blur(12px);
}

.bottom-link {
  min-width: 0;
  border-radius: 19px;
  color: #6f776f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
}

.bottom-link.active {
  background: #e8f0eb;
  color: #2f7952;
}

.bottom-icon {
  font-size: 20px;
  line-height: 1;
}

.routine-topbar {
  display: none;
}

.mobile-today-card {
  margin: 0 2px 8px;
  padding: 24px 22px;
  border-radius: 7px;
  background: #fffefa;
  box-shadow: 0 8px 24px rgba(31, 42, 36, 0.08);
}

.mobile-today-card .hero-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.mobile-today-card .card-kicker {
  margin-bottom: 8px;
  color: #2f7952;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 700;
}

.mobile-today-card h2 {
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
}

.today-date {
  margin-top: 10px;
  color: #6f776f;
  line-height: 1.3;
}

.progress-ring {
  --progress: 0;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 48%, transparent 49%),
    conic-gradient(#39794f calc(var(--progress) * 1%), #e7eee8 0);
  display: grid;
  place-items: center;
}

.progress-ring-inner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fffefa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6f776f;
  font-size: 13px;
  line-height: 1.05;
}

.progress-ring-inner strong {
  color: #39794f;
  font-size: 21px;
  line-height: 1;
}

.share-note-card {
  display: none;
}

.section-stack,
.time-list {
  gap: 12px;
}

.time-card,
.compact-card {
  padding: 18px 16px;
  border-radius: 21px;
  border-color: #dfe7de;
  box-shadow: 0 12px 28px rgba(31, 42, 36, 0.08);
}

.time-head {
  margin-bottom: 16px;
}

.time-head .tiny-label,
.time-meta {
  display: none;
}

.time-head h3,
.compact-card h3 {
  font-size: 21px;
  color: #6f8f67;
  letter-spacing: 0;
}

.items-list {
  gap: 10px;
}

.item-row {
  min-height: 50px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #fffefa;
  border-color: #d7e1d6;
  box-shadow: none;
}

.item-main {
  width: 100%;
}

.item-content {
  min-width: 0;
}

.item-name {
  font-size: 16px;
  font-weight: 700;
  color: #1f2a24;
}

.item-note {
  color: #6f776f;
}

.checkbox-wrap {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.custom-checkbox {
  border-radius: 7px;
  border-color: #b8cbbb;
}

.item-row.done {
  background: #e6eee5;
  border-color: #d3dfd1;
}

.item-row.done .item-name {
  color: #5b6b60;
  text-decoration: none;
}

.item-row.done .item-note {
  text-decoration: none;
}

.item-checkbox:checked + .custom-checkbox {
  background: #4f7960;
  border-color: #4f7960;
}

.topbar:not(.routine-topbar) {
  padding: 2px 8px 0;
}

.topbar:not(.routine-topbar) h1 {
  font-size: 30px;
}

.panel-card,
.hero-card,
.notice-card {
  border-radius: 20px;
}

@media (min-width: 431px) {
  body {
    display: flex;
    justify-content: center;
  }
}

/* Pro compact mobile pass */
:root {
  --bg: #f4f5f1;
  --text: #202822;
  --muted: #687369;
  --line: #dde6dd;
  --primary: #397353;
  --primary-2: #edf4ef;
  --shadow: 0 6px 18px rgba(31, 42, 36, 0.06);
  --radius: 16px;
}

body {
  font-size: 13px;
  line-height: 1.35;
  background: var(--bg);
}

.app-shell {
  width: min(390px, 100%);
  padding: 10px 7px 58px;
}

.topnav {
  margin-bottom: 8px;
}

.topnav-inner {
  height: 42px;
  min-height: 42px;
  padding: 0 3px;
  background: transparent;
}

.nav-logo-link {
  gap: 8px;
}

.nav-logo {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(31, 42, 36, 0.04);
}

.nav-brand {
  font-size: 13px;
  font-weight: 700;
}

.nav-toggle {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  border-color: #dbe6dd;
  background: rgba(255, 255, 252, 0.92);
  box-shadow: 0 5px 14px rgba(31, 42, 36, 0.08);
}

.nav-toggle span {
  width: 14px;
}

.nav-links {
  top: 40px;
  right: 2px;
  width: 164px;
  padding: 6px;
  border-radius: 14px;
}

.nav-link {
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 13px;
}

.nav-logout {
  text-align: left;
  border: 0;
  background: #fff3f0;
  color: #a04a3d;
  cursor: pointer;
}

.mobile-today-card {
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 16px;
  min-height: 84px;
  background: #fffdf6;
}

.mobile-today-card .hero-inline-row {
  gap: 12px;
}

.mobile-today-card .card-kicker {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 650;
}

.mobile-today-card h2 {
  font-size: 24px;
  font-weight: 720;
}

.today-date {
  margin-top: 3px;
  font-size: 13px !important;
  font-size: 13px;
  line-height: 1.2;
}

.progress-ring {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
}

.progress-ring-inner {
  width: 38px;
  height: 38px;
  font-size: 10px;
}

.progress-ring-inner strong {
  font-size: 15px;
  font-weight: 700;
}

.section-stack,
.time-list {
  gap: 8px;
}

.time-card,
.compact-card,
.panel-card,
.hero-card,
.notice-card {
  border-radius: 15px;
  box-shadow: 0 5px 16px rgba(31, 42, 36, 0.055);
}

.time-card,
.compact-card {
  padding: 10px;
}

.time-head {
  margin-bottom: 8px;
}

.time-head h3,
.compact-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #6d8b67;
}

.items-list {
  gap: 6px;
}

.item-row {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  border-color: #d9e4da;
  background: #fffefa;
}

.item-main {
  gap: 9px;
  align-items: center;
}

.checkbox-wrap {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 0;
}

.custom-checkbox {
  border-radius: 6px;
  border-width: 2px;
}

.item-checkbox:checked + .custom-checkbox::after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border-width: 0 2px 2px 0;
}

.item-content {
  gap: 1px;
}

.item-name {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.item-note {
  font-size: 11px;
}

.item-row.done {
  background: #e8f0e8;
}

.item-row.done .item-name {
  color: #53675a;
  text-decoration: none;
}

.bottomnav {
  left: 50%;
  right: auto;
  bottom: 0;
  transform: translateX(-50%);
  width: min(390px, 100%);
  height: 43px;
  padding: 0 10px max(3px, env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid #dfe5de;
  border-radius: 0;
  box-shadow: 0 -4px 14px rgba(31, 42, 36, 0.055);
  background: rgba(255, 255, 252, 0.96);
}

.bottom-link {
  border-radius: 0;
  gap: 1px;
  font-size: 9px;
  color: #687369;
}

.bottom-link.active {
  background: transparent;
  color: #2f7651;
}

.bottom-link.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #2f7651;
}

.bottom-link {
  position: relative;
}

.bottom-icon {
  font-size: 14px;
}

.topbar:not(.routine-topbar) {
  padding: 0 2px;
  margin-bottom: 8px;
}

.topbar:not(.routine-topbar) h1 {
  font-size: 22px;
  font-weight: 720;
}

.topbar .subtitle,
.supplements-topbar .subtitle,
.links-topbar .subtitle {
  display: none;
}

.supplements-list-card,
.links-list-card {
  padding: 10px;
}

.supplements-card-head,
.links-hero-head {
  margin-bottom: 8px;
}

.supplements-card-head h2,
.links-hero-head h2 {
  font-size: 17px;
}

.login-shell {
  width: min(390px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px 14px;
  display: grid;
  place-items: center;
}

.login-card {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffefa;
  box-shadow: var(--shadow);
}

.login-logo {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
}

.login-card h1 {
  font-size: 26px;
  margin-bottom: 6px;
}

.login-copy {
  color: var(--muted);
  margin-bottom: 16px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
