/* Only the DW Mídias palette is reused;
this remains a personal product. */
:root {
  color-scheme: light;
  --brand-blue: #0d9fd9;
  --ink: #181c22;
  --accent: #0879a8;
  --accent-soft: #edf5fb;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --muted: #5f6b7a;
  --line: #dfe5ed;
  --control: #eef1f5;
  --control-border: #acb8c6;
  --button-text: #061923;
  --button-hover: #2bb2e6;
  --inverse: #121923;
  --inverse-text: #f1f5fb;
  --inverse-muted: #b5c2d2;
  --inverse-ring: #173849;
  --inverse-line: #384754;
  --nav-glass: #fffffff5;
  --shadow-soft: #0c0d0f08;
  --shadow: #0c0d0f26;
  --overlay: #080b12a6;
  --display: "Avenir Next", "Trebuchet MS", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 18px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf1f7;
  --accent: #45bcec;
  --accent-soft: #151e27;
  --bg: #0c0d0f;
  --surface: #141619;
  --muted: #a0abba;
  --line: #2a3039;
  --control: #1c2026;
  --control-border: #515f70;
  --inverse: #151b23;
  --inverse-text: #edf1f7;
  --inverse-muted: #a0abba;
  --inverse-ring: #193546;
  --inverse-line: #313c49;
  --nav-glass: #141619f5;
  --shadow-soft: #00000012;
  --shadow: #0000004d;
  --overlay: #000000b3;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--body);
  font-size:14px;
  line-height:1.5;
}
button,input,select {
  font:inherit;
}
button,a,input,select {
  -webkit-tap-highlight-color:transparent;
}
button {
  cursor:pointer;
}
button:disabled {
  cursor:default;
  opacity:.48;
}
button,a {
  -webkit-touch-callout:none;
}
a {
  color:inherit;
  text-decoration:none;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid var(--accent);
  outline-offset:4px;
}
svg {
  display:block;
  width:22px;
  height:22px;
  flex-shrink:0;
}
button {
  color:inherit;
}
h1,h2,h3,p {
  margin:0;
}
h1,h2,h3 {
  font-family:var(--display);
  letter-spacing:-.04em;
}
h1 {
  font-size:38px;
  font-weight:650;
  line-height:1.15;
}
h2 {
  font-size:21px;
  font-weight:650;
  line-height:1.25;
}
h3 {
  font-size:16px;
  font-weight:650;
  line-height:1.4;
}
small {
  font-size:12px;
}
.muted {
  color:var(--muted);
}
.eyebrow {
  font-size:10px;
  font-weight:700;
  letter-spacing:.13em;
  color:var(--muted);
}
.skip-link {
  position:fixed;
  z-index:30;
  top:-100px;
  left:20px;
  background:var(--inverse);
  color:var(--inverse-text);
  padding:12px 18px;
}
.skip-link:focus {
  top:12px;
}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:218px;
  background:var(--surface);
  border-right:1px solid var(--line);
  padding:36px 22px 24px;
  z-index:10;
  display:flex;
  flex-direction:column;
}
.brand {
  display:flex;
  gap:12px;
  align-items:center;
  font-family:var(--display);
  font-size:22px;
  line-height:1.06;
  font-weight:700;
  letter-spacing:-.05em;
}
.brand-mark {
  width:44px;
  height:48px;
  background:var(--inverse);
  color:var(--brand-blue);
  border-radius:15px;
  display:grid;
  place-items:center;
}
.brand-mark svg {
  width:31px;
  height:31px;
}
.brand-sub {
  display:block;
  font-size:19px;
  font-weight:450;
}
.sidebar-caption {
  font-size:10px;
  color:var(--muted);
  letter-spacing:.14em;
  margin:48px 14px 14px;
}
.nav-item {
  display:flex;
  align-items:center;
  gap:13px;
  min-height:50px;
  border-radius:13px;
  padding:12px 15px;
  color:var(--muted);
  margin-bottom:6px;
  transition:background .15s;
}
.nav-item svg {
  width:20px;
  height:20px;
}
.nav-item:hover {
  background:var(--bg);
}
.nav-item.active {
  color:var(--ink);
  background:var(--accent-soft);
  font-weight:650;
}
.nav-item.active:after {
  content:"";
  width:5px;
  height:5px;
  background:var(--accent);
  border-radius:50%;
  margin-left:auto;
}
.sidebar-bottom {
  margin-top:auto;
  padding:32px 14px 0;
  color:var(--muted);
  font-size:13px;
}
.sidebar-bottom strong {
  font-weight:550;
  color:var(--ink);
}
.small-sun {
  font-size:28px;
  color:var(--accent);
  margin-bottom:10px;
}
.version-label {
  display:block;
  font-size:10px;
  margin-top:25px;
  letter-spacing:.06em;
}
.workspace {
  margin-left:218px;
  max-width:1700px;
}
.topbar {
  height:80px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 44px;
  border-bottom:1px solid var(--line);
}
.demo-badge {
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  letter-spacing:.01em;
  color:var(--muted);
}
.demo-badge>span {
  width:6px;
  height:6px;
  background:var(--accent);
  border-radius:50%;
}
.local-tag {
  font-size:11px;
  color:var(--muted);
}
.mobile-brand {
  display:none;
}
main {
  max-width:1240px;
  margin:auto;
  padding:39px 44px 20px;
  outline:none;
}
.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:27px;
}
.heading-copy .eyebrow {
  display:block;
  margin-bottom:12px;
}
.heading-copy p {
  color:var(--muted);
  margin-top:10px;
  font-size:14px;
}
.date-stamp {
  display:flex;
  align-items:center;
  gap:12px;
  border-left:1px solid var(--line);
  padding-left:22px;
  flex-shrink:0;
}
.date-number {
  font-size:40px;
  font-family:var(--display);
  font-weight:500;
  line-height:1;
}
.date-stamp p {
  font-size:11px;
  line-height:1.7;
  color:var(--muted);
}
.day-strip {
  border-radius:var(--radius);
  background:var(--inverse);
  color:var(--inverse-text);
  padding:23px 27px;
  margin-bottom:26px;
}
.strip-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin-bottom:22px;
}
.strip-heading h2 {
  font-size:17px;
  font-weight:500;
  letter-spacing:-.02em;
}
.strip-heading span {
  color:var(--inverse-muted);
  font-size:11px;
}
.day-phases {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:22px;
}
.day-phase {
  position:relative;
  padding-left:23px;
}
.day-phase:before {
  content:"";
  position:absolute;
  left:0;
  top:7px;
  width:7px;
  height:7px;
  background:var(--brand-blue);
  border-radius:50%;
  box-shadow:0 0 0 4px var(--inverse-ring);
}
.day-phase:not(:last-child):after {
  content:"";
  position:absolute;
  left:75px;
  right:8px;
  top:10px;
  height:1px;
  background:var(--inverse-line);
}
.phase-label {
  font-size:11px;
  color:var(--inverse-muted);
  background:var(--inverse);
  position:relative;
  z-index:1;
  display:inline-block;
  padding-right:12px;
}
.phase-entry {
  display:block;
  margin-top:10px;
  font-family:var(--display);
  font-size:15px;
  font-weight:500;
  letter-spacing:-.015em;
}
.phase-time {
  font-size:11px;
  color:var(--inverse-muted);
  margin-top:4px;
  display:block;
}
.today-grid {
  display:grid;
  grid-template-columns:1.16fr 1fr;
  gap:24px;
}
.column {
  display:grid;
  gap:24px;
  align-content:start;
  min-width:0;
}
.card {
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
  background:var(--surface);
  min-width:0;
}
.card-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}
.card-header .title-line {
  display:flex;
  align-items:center;
  gap:10px;
}
.card-header .title-line>svg {
  color:var(--accent);
  width:20px;
  height:20px;
}
.card-header p {
  font-size:12px;
  color:var(--muted);
  margin-top:5px;
}
.text-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:44px;
  font-size:12px;
  font-weight:550;
  color:var(--accent);
  border:0;
  background:none;
  padding:5px 0;
  white-space:nowrap;
}
.text-link svg {
  width:16px;
  height:16px;
}
.count-label {
  font-size:12px;
  font-weight:600;
  color:var(--accent);
  white-space:nowrap;
}
.progress-track {
  height:5px;
  width:100%;
  background:var(--line);
  border-radius:10px;
  overflow:hidden;
  margin-top:13px;
}
.progress-fill {
  height:100%;
  background:var(--brand-blue);
  border-radius:10px;
  transition:width .2s;
}
.progress-summary {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12px;
  margin-bottom:9px;
  color:var(--muted);
}
.progress-block {
  padding-bottom:20px;
  border-bottom:1px solid var(--line);
  margin-bottom:8px;
}
.check-row {
  display:flex;
  align-items:center;
  gap:13px;
  min-height:64px;
  width:100%;
  background:none;
  border:0;
  border-bottom:1px solid var(--line);
  padding:12px 0;
  text-align:left;
}
.check-row:last-child {
  border-bottom:0;
}
.check-circle {
  display:flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border:1.5px solid var(--control-border);
  border-radius:8px;
  flex-shrink:0;
  background:var(--surface);
}
.check-circle svg {
  width:16px;
  height:16px;
  opacity:0;
}
.is-done .check-circle {
  background:var(--brand-blue);
  border-color:var(--brand-blue);
  color:var(--button-text);
}
.is-done .check-circle svg {
  opacity:1;
}
.row-copy {
  flex:1;
  min-width:0;
}
.row-title {
  display:block;
  font-size:13px;
  font-weight:550;
  overflow-wrap:anywhere;
}
.row-meta {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-top:3px;
}
.is-done .row-title {
  text-decoration:line-through;
  color:var(--muted);
}
.is-done .habit-title {
  text-decoration:none;
}
.row-tag {
  max-width:35%;
  overflow-wrap:anywhere;
  font-size:10px;
  padding:4px 8px;
  background:var(--bg);
  border-radius:6px;
  color:var(--muted);
  flex-shrink:0;
}
.soft-blue {
  background:var(--accent-soft);
  border-color:var(--line);
}
.soft-neutral {
  background:var(--surface);
  border-color:var(--line);
}
.soft-accent {
  background:var(--accent-soft);
  border-color:var(--line);
}
.routine-header {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}
.module-icon {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border:1px solid var(--line);
  border-radius:13px;
}
.routine-header .eyebrow {
  color:var(--accent);
  font-size:9px;
  margin-bottom:3px;
  display:block;
}
.routine-title {
  font-size:18px;
}
.routine-detail {
  font-size:12px;
  color:var(--muted);
}
.routine-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:20px;
}
.time-label {
  font-size:12px;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:6px;
}
.time-label svg {
  height:15px;
  width:15px;
}
.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  border:1px solid transparent;
  border-radius:12px;
  padding:11px 17px;
  font-size:12px;
  font-weight:600;
  transition:background .15s;
}
.button svg {
  width:16px;
  height:16px;
}
.primary {
  color:var(--button-text);
  background:var(--brand-blue);
}
.primary:hover:not(:disabled) {
  background:var(--button-hover);
}
.secondary {
  background:var(--surface);
  border-color:var(--line);
}
.secondary:hover {
  background:var(--bg);
}
.subtle {
  background:var(--control);
  border-color:var(--line);
}
.agenda-list {
  list-style:none;
  margin:0;
  padding:0;
}
.agenda-list li {
  display:flex;
  align-items:flex-start;
  gap:15px;
  position:relative;
  padding:2px 0 22px;
}
.agenda-list li:last-child {
  padding-bottom:0;
}
.agenda-list li:not(:last-child):before {
  content:"";
  width:1px;
  position:absolute;
  left:48px;
  top:14px;
  bottom:-1px;
  background:var(--line);
}
.agenda-list time {
  font-size:11px;
  color:var(--muted);
  padding-top:2px;
  min-width:34px;
}
.agenda-dot {
  height:7px;
  width:7px;
  border-radius:50%;
  background:var(--brand-blue);
  margin-top:6px;
  flex-shrink:0;
}
.agenda-list li:nth-child(2) .agenda-dot {
  background:var(--brand-blue);
}
.agenda-list li:nth-child(3) .agenda-dot {
  background:var(--brand-blue);
}
.agenda-event strong {
  font-size:13px;
  font-weight:550;
  display:block;
}
.agenda-event span {
  font-size:11px;
  color:var(--muted);
  display:block;
  margin-top:3px;
}
.inline-note {
  font-size:11px;
  line-height:1.6;
  color:var(--muted);
  padding-top:16px;
  margin-top:18px;
  border-top:1px solid var(--line);
}
.app-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  max-width:1240px;
  margin:auto;
  padding:10px 44px 24px;
  font-size:10px;
  color:var(--muted);
}
.app-footer p {
  max-width:520px;
}
.reset-button {
  min-height:44px;
  padding:6px 0;
  background:none;
  border:0;
  font-size:10px;
  color:var(--muted);
  text-decoration:underline;
  white-space:nowrap;
}
.single-layout {
  max-width:860px;
}
.toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:20px;
}
.segmented {
  display:flex;
  gap:4px;
  padding:5px;
  background:var(--control);
  border-radius:14px;
  max-width:100%;
}
.segment {
  border:0;
  background:none;
  color:var(--muted);
  font-size:12px;
  min-height:44px;
  padding:9px 16px;
  border-radius:10px;
  white-space:nowrap;
}
.segment.active {
  background:var(--surface);
  color:var(--ink);
  box-shadow:0 2px 5px var(--shadow-soft);
  font-weight:600;
}
.wide-card {
  padding:28px;
}
.section-intro {
  font-size:13px;
  color:var(--muted);
  margin:8px 0 20px;
}
.entry-form {
  border-top:1px solid var(--line);
  margin-top:20px;
  padding-top:20px;
}
.field-label {
  display:block;
  margin-bottom:8px;
  font-size:12px;
  font-weight:550;
}
.input-row {
  display:flex;
  gap:10px;
  align-items:stretch;
}
.input-row input {
  min-width:0;
  flex:1;
}
input,select {
  min-height:46px;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--control-border);
  border-radius:11px;
  padding:11px 13px;
  font-size:13px;
  width:100%;
}
input::placeholder {
  color:var(--muted);
}
.form-subline {
  display:flex;
  gap:12px;
  margin-top:13px;
}
.form-subline>div {
  flex:1;
  min-width:0;
}
.form-subline .quantity-field {
  flex:.7;
}
.form-helper {
  margin-top:10px;
  font-size:11px;
  color:var(--muted);
}
.empty-state {
  padding:28px 10px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}
.habit-page-grid {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}
.habit-tile {
  padding:23px;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:20px;
  text-align:left;
  display:flex;
  align-items:flex-start;
  gap:13px;
  min-height:133px;
  width:100%;
}
.habit-tile .row-title {
  font-size:16px;
}
.habit-tile .row-meta {
  font-size:12px;
  margin-top:8px;
}
.habit-tile .check-circle {
  margin-left:auto;
}
.habit-tile.is-done {
  background:var(--accent-soft);
  border-color:transparent;
}
.habit-tile .row-title {
  text-decoration:none;
  color:var(--ink);
}
.habit-symbol {
  color:var(--accent);
  margin-bottom:11px;
}
.habit-detail {
  display:flex;
  align-items:flex-start;
  gap:12px;
}
.habit-bottom {
  margin-top:24px;
  padding:22px 26px;
}
.habit-bottom h2 {
  font-size:16px;
}
.health-tabs {
  margin-bottom:24px;
  display:inline-flex;
}
.health-layout {
  display:grid;
  grid-template-columns:1.35fr 1fr;
  gap:24px;
  align-items:start;
}
.workout-banner {
  padding:26px;
  margin-bottom:22px;
}
.workout-banner h2 {
  font-size:26px;
  margin:10px 0;
}
.workout-banner>p {
  font-size:13px;
  color:var(--muted);
}
.workout-facts {
  display:flex;
  flex-wrap:wrap;
  gap:20px;
  margin:20px 0 23px;
  font-size:12px;
  color:var(--muted);
}
.workout-facts strong {
  display:block;
  font-size:15px;
  color:var(--ink);
  font-weight:550;
  margin-bottom:3px;
}
.exercise {
  padding:19px 0;
  border-bottom:1px solid var(--line);
}
.exercise:last-child {
  border-bottom:0;
  padding-bottom:0;
}
.exercise:first-child {
  padding-top:0;
}
.exercise-header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.exercise-label {
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.exercise-number {
  font-size:11px;
  color:var(--muted);
  padding-top:2px;
}
.exercise h3 {
  font-size:15px;
}
.exercise p {
  font-size:11px;
  color:var(--muted);
  margin-top:3px;
}
.set-buttons {
  display:flex;
  gap:9px;
  margin-top:15px;
  padding-left:25px;
}
.set-button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:44px;
  min-width:65px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:11px;
  font-size:12px;
}
.set-button svg {
  width:14px;
  height:14px;
  opacity:.35;
}
.set-button.is-done {
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
}
.set-button.is-done svg {
  opacity:1;
}
.rest-card h2 {
  font-size:18px;
}
.rest-card p {
  font-size:12px;
  color:var(--muted);
  margin-top:10px;
}
.rest-clock {
  font-family:var(--display);
  font-size:54px;
  letter-spacing:-.055em;
  font-variant-numeric:tabular-nums;
  margin:24px 0 17px;
  line-height:1;
}
.rest-card .button {
  width:100%;
}
.rest-card .secondary {
  margin-top:9px;
}
.disclaimer {
  font-size:11px;
  color:var(--muted);
  line-height:1.7;
  padding:0 4px;
}
.workout-complete {
  margin-top:20px;
  width:100%;
}
.complete-message {
  margin-top:20px;
  padding:16px;
  border-radius:12px;
  background:var(--accent-soft);
  font-size:13px;
  display:flex;
  align-items:center;
  gap:10px;
}
.meal-card {
  margin-bottom:14px;
  display:flex;
  align-items:center;
  gap:15px;
  padding:23px;
}
.meal-card .meal-time {
  font-size:12px;
  color:var(--muted);
  min-width:35px;
}
.meal-card .row-title {
  font-size:15px;
}
.meal-card .check-row {
  border:0;
  min-height:44px;
  padding:0;
}
.meal-card.is-done {
  background:var(--accent-soft);
}
.meal-card.is-done .row-title {
  text-decoration:none;
  color:var(--ink);
}
.grocery-group+.grocery-group {
  margin-top:22px;
}
.grocery-group h3 {
  font-size:11px;
  color:var(--muted);
  font-family:var(--body);
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin:8px 0;
}
.grocery-group .row-tag {
  background:transparent;
  font-size:11px;
  padding-right:0;
}
.toast {
  position:fixed;
  bottom:25px;
  left:calc(50% + 109px);
  transform:translate(-50%,20px);
  background:var(--inverse);
  color:var(--inverse-text);
  padding:13px 19px;
  border-radius:13px;
  box-shadow:0 6px 25px var(--shadow);
  font-size:12px;
  z-index:30;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s,transform .18s;
  max-width:calc(100vw - 35px);
  width:max-content;
}
.toast.visible {
  opacity:1;
  transform:translate(-50%,0);
}
dialog {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:24px;
  padding:28px;
  color:var(--ink);
  width:420px;
  max-width:calc(100% - 32px);
  box-shadow:0 20px 80px var(--shadow);
}
dialog::backdrop {
  background:var(--overlay);
  backdrop-filter:blur(3px);
}
dialog h2 {
  margin:10px 0 12px;
}
dialog p {
  font-size:13px;
  color:var(--muted);
  line-height:1.6;
}
.dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:24px;
}
.noscript {
  margin:30px;
}
.status-chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:var(--control);
  padding:5px 9px;
  border-radius:7px;
  font-size:11px;
}
.status-chip svg {
  width:13px;
  height:13px;
}
@media(min-width:1500px) {
  .workspace {
    margin-right:auto;
  }
  .today-grid {
    grid-template-columns:1.25fr 1fr;
  }
  main {
    padding-top:45px;
  }
  .day-strip {
    padding:28px 30px;
  }
  .card {
    padding:28px;
  }
}
@media(max-width:1100px) {
  .sidebar {
    width:190px;
    padding:30px 17px;
  }
  .workspace {
    margin-left:190px;
  }
  .topbar {
    padding:0 28px;
  }
  main {
    padding:30px 28px 20px;
  }
  .app-footer {
    padding-left:28px;
    padding-right:28px;
  }
  .today-grid,.health-layout {
    gap:18px;
  }
  .card {
    padding:21px;
  }
  .column {
    gap:18px;
  }
  .day-strip {
    padding:23px;
  }
  .day-phases {
    gap:16px;
  }
  .day-phase {
    padding-left:18px;
  }
  .phase-entry {
    font-size:13px;
  }
  .date-stamp {
    display:none;
  }
  .toast {
    left:calc(50% + 95px);
  }
  .health-layout {
    grid-template-columns:1.2fr 1fr;
  }
}
@media(max-width:850px) and (min-width:701px) {
  .sidebar {
    width:165px;
    padding-left:13px;
    padding-right:13px;
  }
  .workspace {
    margin-left:165px;
  }
  .brand {
    font-size:19px;
    gap:8px;
  }
  .brand-sub {
    font-size:16px;
  }
  .brand-mark {
    width:36px;
    height:43px;
  }
  .nav-item {
    gap:10px;
    padding:12px;
  }
  .today-grid,.health-layout {
    grid-template-columns:1fr;
  }
  .day-phase:not(:last-child):after {
    left:65px;
  }
  .card {
    padding:24px;
  }
  .toast {
    left:calc(50% + 82px);
  }
}
@media(max-width:700px) {
  body {
    font-size:14px;
  }
  .sidebar {
    position:fixed;
    top:auto;
    bottom:0;
    left:0;
    right:0;
    width:auto;
    height:auto;
    padding:6px 7px calc(6px + env(safe-area-inset-bottom));
    border-right:0;
    border-top:1px solid var(--line);
    background:var(--nav-glass);
    backdrop-filter:blur(16px);
    z-index:20;
  }
  .sidebar>.brand,.sidebar-caption,.sidebar-bottom {
    display:none;
  }
  #navigation {
    display:flex;
    justify-content:space-around;
  }
  .nav-item {
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    padding:7px 3px;
    margin:0;
    min-height:53px;
    border-radius:12px;
    font-size:10px;
    max-width:85px;
  }
  .nav-item svg {
    width:21px;
    height:21px;
  }
  .nav-item.active:after {
    display:none;
  }
  .workspace {
    margin-left:0;
  }
  .topbar {
    height:69px;
    padding:0 21px;
    gap:12px;
  }
  .mobile-brand {
    display:block;
    white-space:nowrap;
    font-family:var(--display);
    font-weight:700;
    font-size:17px;
    letter-spacing:-.04em;
  }
  .mobile-brand span {
    font-weight:450;
  }
  .local-tag {
    display:none;
  }
  .demo-badge {
    font-size:9px;
    gap:5px;
  }
  .demo-badge>span {
    width:5px;
    height:5px;
  }
  main {
    padding:28px 20px 20px;
  }
  .page-heading {
    margin-bottom:23px;
  }
  .heading-copy .eyebrow {
    font-size:9px;
    margin-bottom:10px;
    letter-spacing:.1em;
  }
  h1 {
    font-size:32px;
  }
  .heading-copy p {
    font-size:12px;
    margin-top:9px;
    max-width:300px;
  }
  h2 {
    font-size:20px;
  }
  .day-strip {
    padding:21px;
    border-radius:20px;
    margin-bottom:20px;
  }
  .strip-heading {
    margin-bottom:22px;
    gap:10px;
  }
  .strip-heading h2 {
    font-size:15px;
  }
  .strip-heading span {
    font-size:9px;
  }
  .day-phases {
    gap:12px;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .day-phase {
    padding-left:0;
    padding-top:20px;
  }
  .day-phase:before {
    top:2px;
    width:6px;
    height:6px;
    box-shadow:0 0 0 3px var(--inverse-ring);
  }
  .day-phase:not(:last-child):after {
    left:16px;
    right:0;
    top:5px;
  }
  .phase-label {
    font-size:10px;
    padding-right:0;
  }
  .phase-entry {
    font-size:11px;
    line-height:1.5;
    margin-top:6px;
    max-width:85px;
  }
  .phase-time {
    font-size:10px;
    margin-top:5px;
  }
  .today-grid {
    grid-template-columns:1fr;
    gap:18px;
  }
  .column {
    gap:18px;
  }
  .card {
    padding:22px;
    border-radius:20px;
  }
  .card-header {
    margin-bottom:16px;
  }
  .check-row {
    min-height:63px;
  }
  .row-title {
    font-size:13px;
  }
  .row-meta {
    font-size:11px;
  }
  .row-tag {
    font-size:9px;
  }
  .routine-footer {
    margin-top:17px;
  }
  .app-footer {
    display:block;
    padding:0 22px calc(100px + env(safe-area-inset-bottom));
    font-size:10px;
    line-height:1.65;
  }
  .app-footer p {
    max-width:330px;
  }
  .reset-button {
    min-height:44px;
  }
  .toast {
    left:50%;
    bottom:calc(81px + env(safe-area-inset-bottom));
    max-width:calc(100vw - 36px);
    white-space:normal;
    text-align:center;
  }
  .toolbar {
    gap:10px;
  }
  .segmented {
    gap:2px;
    padding:4px;
  }
  .segment {
    padding:9px 12px;
    font-size:11px;
  }
  .toolbar>.count-label {
    font-size:11px;
  }
  .wide-card {
    padding:22px;
  }
  .input-row {
    gap:8px;
  }
  .input-row .button {
    padding-left:13px;
    padding-right:13px;
  }
  .input-row .button svg {
    display:none;
  }
  .habit-page-grid {
    gap:12px;
  }
  .habit-tile {
    padding:18px;
    gap:8px;
    position:relative;
    min-height:164px;
  }
  .habit-tile .row-title {
    font-size:15px;
  }
  .habit-tile .row-meta {
    font-size:10px;
  }
  .habit-tile .check-circle {
    position:absolute;
    top:18px;
    right:15px;
    width:22px;
    height:22px;
  }
  .habit-symbol {
    margin-bottom:18px;
  }
  .habit-tile .row-copy {
    padding-right:0;
  }
  .habit-bottom {
    padding:21px;
  }
  .health-layout {
    grid-template-columns:1fr;
    gap:18px;
  }
  .health-tabs {
    margin-bottom:20px;
  }
  .workout-banner {
    padding:23px;
    margin-bottom:18px;
  }
  .workout-banner h2 {
    font-size:25px;
  }
  .workout-facts {
    gap:23px;
    font-size:11px;
  }
  .exercise h3 {
    font-size:14px;
  }
  .rest-card {
    display:grid;
    grid-template-columns:1fr 1fr;
    column-gap:20px;
  }
  .rest-card h2 {
    grid-column:1/-1;
  }
  .rest-card p {
    grid-column:1/-1;
  }
  .rest-clock {
    grid-column:1;
    margin:18px 0 0;
    font-size:48px;
  }
  .rest-actions {
    grid-column:2;
    margin-top:19px;
    align-self:center;
  }
  .rest-card .button {
    font-size:11px;
    padding:10px;
  }
  .meal-card {
    padding:20px 18px;
  }
  .meal-card .meal-time {
    font-size:11px;
    min-width:32px;
  }
  .meal-card .row-title {
    font-size:14px;
  }
  .meal-card .check-row {
    gap:10px;
  }
  .meal-card .row-meta {
    font-size:10px;
  }
  .form-subline {
    gap:10px;
  }
  .dialog-actions {
    gap:8px;
  }
  .dialog-actions .button {
    font-size:11px;
    padding:10px 12px;
  }
}
@media(max-width:359px) {
  main {
    padding-left:15px;
    padding-right:15px;
  }
  .topbar {
    padding:0 15px;
  }
  .mobile-brand {
    font-size:15px;
  }
  .demo-badge {
    font-size:8px;
  }
  .day-strip {
    padding:18px;
  }
  .card {
    padding:19px;
  }
  .toolbar {
    align-items:flex-start;
    flex-direction:column;
  }
  .segment {
    padding:9px 12px;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}
.home-toolbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:0 0 18px;
}
.home-toolbar .button {
  font-size:11px;
}
.home-organizer {
  margin-bottom:22px;
}
.home-organizer h2 {
  font-size:19px;
}
.home-organizer .section-intro {
  margin-bottom:13px;
}
.organizer-list {
  list-style:none;
  margin:0;
  padding:0;
}
.organizer-list li {
  display:flex;
  align-items:center;
  gap:14px;
  min-height:57px;
  border-top:1px solid var(--line);
}
.organizer-number {
  width:13px;
  font-size:11px;
  color:var(--muted);
}
.organizer-name {
  display:flex;
  align-items:center;
  gap:11px;
  font-size:13px;
  flex:1;
}
.organizer-name svg {
  width:18px;
  height:18px;
  color:var(--accent);
}
.organizer-controls {
  display:flex;
  gap:5px;
}
.icon-button {
  display:grid;
  place-items:center;
  background:var(--bg);
  border:1px solid var(--line);
  width:44px;
  height:44px;
  border-radius:11px;
}
.icon-button svg {
  width:17px;
  height:17px;
}
.icon-button:hover:not(:disabled) {
  background:var(--accent-soft);
}
.home-block {
  align-self:start;
}
.home-habits {
  grid-row:span 2;
}
@media(max-width:850px) {
  .home-habits {
    grid-row:auto;
  }
}
@media(max-width:700px) {
  input,select {
    font-size:16px;
  }
  .home-toolbar {
    margin-bottom:17px;
  }
  .home-toolbar .eyebrow {
    font-size:9px;
  }
  .home-toolbar .button {
    padding:10px 12px;
    font-size:11px;
  }
  .home-toolbar .button svg {
    width:15px;
    height:15px;
  }
  .organizer-list li {
    gap:10px;
  }
  .home-organizer {
    padding:21px;
  }
  .organizer-name {
    font-size:12px;
    gap:8px;
  }
  .organizer-name svg {
    width:17px;
    height:17px;
  }
}
.row-tag {
  max-width:40%;
  overflow-wrap:anywhere;
  white-space:normal;
  text-align:right;
}
/* Theme choices remain available on every screen and mobile viewport. */
.theme-switch {
  display:flex;
  align-items:center;
  gap:3px;
  padding:3px;
  border:1px solid var(--line);
  background:var(--control);
  border-radius:13px;
  flex-shrink:0;
}
.theme-switch button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:44px;
  padding:8px 13px;
  background:transparent;
  border:0;
  border-radius:9px;
  color:var(--muted);
  font-size:12px;
  font-weight:550;
}
.theme-switch svg {
  width:16px;
  height:16px;
}
.theme-switch button[aria-pressed="true"] {
  color:var(--accent);
  background:var(--surface);
}
.theme-switch button:hover {
  color:var(--ink);
}
.day-strip {
  border:1px solid var(--inverse-line);
}
.brand-mark {
  border:1px solid var(--line);
}
.soft-blue .module-icon,.soft-neutral .module-icon,.soft-accent .module-icon {
  color:var(--accent);
}
.routine-problem {
  border:1px solid var(--accent);
  margin-bottom:24px;
}
.routine-problem h2 {
  margin-top:8px;
}
.routine-problem p,.routine-repair-error {
  margin-top:12px;
  line-height:1.6;
  overflow-wrap:anywhere;
}
.routine-repair-actions {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
}
.routine-repair-actions .button,#routine-repair-dialog .button {
  white-space:normal;
  text-align:center;
}
.routine-repair-error {
  padding:12px;
  border:1px solid var(--accent);
  border-radius:10px;
}
#routine-repair-dialog .dialog-actions {
  flex-wrap:wrap;
}
@media(max-width:700px) {
  .topbar {
    height:auto;
    min-height:90px;
    display:grid;
    grid-template-columns:1fr auto;
    gap:7px 12px;
    padding:13px 20px 12px;
  }
  .mobile-brand {
    grid-column:1;
    grid-row:1;
  }
  .theme-switch {
    grid-column:2;
    grid-row:1;
  }
  .theme-switch button {
    padding:8px 10px;
    font-size:11px;
    gap:5px;
  }
  .theme-switch svg {
    width:15px;
    height:15px;
  }
  .demo-badge {
    grid-column:1/-1;
    grid-row:2;
    font-size:10px;
  }
}
@media(max-width:359px) {
  .topbar {
    padding-left:15px;
    padding-right:15px;
    column-gap:8px;
  }
  .theme-switch button {
    padding:8px;
  }
  .mobile-brand {
    font-size:15px;
  }
}
