/* Hábitos Native Glass, web rendition. Generated from the design system (project/tokens.json and
   project/components/bundle.css); the shell at the end places it by width and fold (project/layouts.md).
   Do not add sizes, colours or controls here: change the design system and regenerate. */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-11: 44px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --radius-xl: 36px;
  --radius-capsule: 999px;
  --size-hit: 44px;
  --size-control: 50px;
  --size-control-small: 34px;
  --size-row: 52px;
  --size-emoji-tile: 29px;
  --size-check: 26px;
  --size-ring: 84px;
  --size-chart: 140px;
  --glass-blur: 14px;
  --glass-saturate: 180%;
  --layout-wide: 700px;
  --layout-sidebar: 1024px;
  --layout-sidebar-width: 250px;
  --layout-list: 380px;
  --layout-readable: 720px;
  --layout-sheet: 540px;
  --layout-fold-gutter: 20px;
  --layout-edge-tabs: 72px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", sans-serif;
  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  color-scheme: light;
  --tint: #2459d3;
  --tint-text: #2459d3;
  --tint-soft: #e5ebfa;
  --on-tint: #ffffff;
  --on-tint-soft: #2459d3;
  --bg-grouped: #f2f2f7;
  --bg-grouped-secondary: #ffffff;
  --label: #000000;
  --label-secondary: rgba(60, 60, 67, 0.78);
  --label-tertiary: rgba(60, 60, 67, 0.3);
  --fill: rgba(120, 120, 128, 0.2);
  --fill-secondary: rgba(120, 120, 128, 0.16);
  --fill-tertiary: rgba(118, 118, 128, 0.12);
  --separator: rgba(60, 60, 67, 0.29);
  --separator-opaque: #c6c6c8;
  --glass-fill: rgba(255, 255, 255, 0.62);
  --dimming: rgba(0, 0, 0, 0.2);
  --focus-ring: #2459d3;
  --system-red: #ff383c;
  --system-orange: #ff8d28;
  --system-green: #34c759;
  --system-indigo: #6155f5;
  --system-gray: #8e8e93;
  --system-red-text: #d70015;
  --system-green-text: #1d7a36;
  --system-orange-text: #b34a00;
  --shadow-glass: 0 8px 28px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-glass-rim: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  --shadow-sheet: 0 -2px 24px rgba(0, 0, 0, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="reduce-transparency"]) {
    color-scheme: dark;
      --tint: #2459d3;
    --tint-text: #8db2ff;
    --tint-soft: #1b2644;
    --on-tint: #ffffff;
    --on-tint-soft: #8db2ff;
    --bg-grouped: #000000;
    --bg-grouped-secondary: #1c1c1e;
    --label: #ffffff;
    --label-secondary: rgba(235, 235, 245, 0.7);
    --label-tertiary: rgba(235, 235, 245, 0.3);
    --fill: rgba(120, 120, 128, 0.36);
    --fill-secondary: rgba(120, 120, 128, 0.32);
    --fill-tertiary: rgba(118, 118, 128, 0.24);
    --separator: rgba(84, 84, 88, 0.65);
    --separator-opaque: #38383a;
    --glass-fill: rgba(36, 36, 40, 0.56);
    --dimming: rgba(0, 0, 0, 0.48);
    --focus-ring: #8db2ff;
    --system-red: #ff4245;
    --system-orange: #ff9230;
    --system-green: #30d158;
    --system-indigo: #6d7cff;
    --system-gray: #8e8e93;
    --system-red-text: #ff6961;
    --system-green-text: #30d158;
    --system-orange-text: #ff9230;
    --shadow-glass: 0 8px 28px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-glass-rim: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
    --shadow-sheet: 0 -2px 24px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --tint: #2459d3;
  --tint-text: #8db2ff;
  --tint-soft: #1b2644;
  --on-tint: #ffffff;
  --on-tint-soft: #8db2ff;
  --bg-grouped: #000000;
  --bg-grouped-secondary: #1c1c1e;
  --label: #ffffff;
  --label-secondary: rgba(235, 235, 245, 0.7);
  --label-tertiary: rgba(235, 235, 245, 0.3);
  --fill: rgba(120, 120, 128, 0.36);
  --fill-secondary: rgba(120, 120, 128, 0.32);
  --fill-tertiary: rgba(118, 118, 128, 0.24);
  --separator: rgba(84, 84, 88, 0.65);
  --separator-opaque: #38383a;
  --glass-fill: rgba(36, 36, 40, 0.56);
  --dimming: rgba(0, 0, 0, 0.48);
  --focus-ring: #8db2ff;
  --system-red: #ff4245;
  --system-orange: #ff9230;
  --system-green: #30d158;
  --system-indigo: #6d7cff;
  --system-gray: #8e8e93;
  --system-red-text: #ff6961;
  --system-green-text: #30d158;
  --system-orange-text: #ff9230;
  --shadow-glass: 0 8px 28px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-glass-rim: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  --shadow-sheet: 0 -2px 24px rgba(0, 0, 0, 0.6);
}
@media (prefers-reduced-transparency: reduce) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: light;
      --tint: #2459d3;
    --tint-text: #2459d3;
    --tint-soft: #e5ebfa;
    --on-tint: #ffffff;
    --on-tint-soft: #2459d3;
    --bg-grouped: #ebebf0;
    --bg-grouped-secondary: #ffffff;
    --label: #000000;
    --label-secondary: rgba(60, 60, 67, 0.78);
    --label-tertiary: rgba(60, 60, 67, 0.6);
    --fill: rgba(120, 120, 128, 0.32);
    --fill-secondary: rgba(120, 120, 128, 0.26);
    --fill-tertiary: rgba(118, 118, 128, 0.2);
    --separator: rgba(60, 60, 67, 0.45);
    --separator-opaque: #a8a8ad;
    --glass-fill: #f8f8fb;
    --dimming: rgba(0, 0, 0, 0.4);
    --focus-ring: #2459d3;
    --system-red: #d70015;
    --system-orange: #c93400;
    --system-green: #248a3d;
    --system-indigo: #3634a3;
    --system-gray: #6c6c70;
    --system-red-text: #d70015;
    --system-green-text: #1d7a36;
    --system-orange-text: #b34a00;
    --shadow-glass: 0 1px 2px rgba(0, 0, 0, 0.12);
    --shadow-glass-rim: inset 0 0 0 1px rgba(60, 60, 67, 0.5);
    --shadow-sheet: 0 -1px 0 rgba(60, 60, 67, 0.5);
  }
}
:root[data-theme="reduce-transparency"] {
  color-scheme: light;
  --tint: #2459d3;
  --tint-text: #2459d3;
  --tint-soft: #e5ebfa;
  --on-tint: #ffffff;
  --on-tint-soft: #2459d3;
  --bg-grouped: #ebebf0;
  --bg-grouped-secondary: #ffffff;
  --label: #000000;
  --label-secondary: rgba(60, 60, 67, 0.78);
  --label-tertiary: rgba(60, 60, 67, 0.6);
  --fill: rgba(120, 120, 128, 0.32);
  --fill-secondary: rgba(120, 120, 128, 0.26);
  --fill-tertiary: rgba(118, 118, 128, 0.2);
  --separator: rgba(60, 60, 67, 0.45);
  --separator-opaque: #a8a8ad;
  --glass-fill: #f8f8fb;
  --dimming: rgba(0, 0, 0, 0.4);
  --focus-ring: #2459d3;
  --system-red: #d70015;
  --system-orange: #c93400;
  --system-green: #248a3d;
  --system-indigo: #3634a3;
  --system-gray: #6c6c70;
  --system-red-text: #d70015;
  --system-green-text: #1d7a36;
  --system-orange-text: #b34a00;
  --shadow-glass: 0 1px 2px rgba(0, 0, 0, 0.12);
  --shadow-glass-rim: inset 0 0 0 1px rgba(60, 60, 67, 0.5);
  --shadow-sheet: 0 -1px 0 rgba(60, 60, 67, 0.5);
}
@media (prefers-color-scheme: dark) and (prefers-reduced-transparency: reduce) {
  :root:not([data-theme="light"]):not([data-theme="dark"]):not([data-theme="reduce-transparency"]) {
    color-scheme: dark;
      --tint: #2459d3;
    --tint-text: #8db2ff;
    --tint-soft: #1b2644;
    --on-tint: #ffffff;
    --on-tint-soft: #8db2ff;
    --bg-grouped: #000000;
    --bg-grouped-secondary: #1c1c1e;
    --label: #ffffff;
    --label-secondary: rgba(235, 235, 245, 0.7);
    --label-tertiary: rgba(235, 235, 245, 0.3);
    --fill: rgba(120, 120, 128, 0.36);
    --fill-secondary: rgba(120, 120, 128, 0.32);
    --fill-tertiary: rgba(118, 118, 128, 0.24);
    --separator: rgba(84, 84, 88, 0.65);
    --separator-opaque: #38383a;
    --glass-fill: #242428;
    --dimming: rgba(0, 0, 0, 0.48);
    --focus-ring: #8db2ff;
    --system-red: #ff4245;
    --system-orange: #ff9230;
    --system-green: #30d158;
    --system-indigo: #6d7cff;
    --system-gray: #8e8e93;
    --system-red-text: #ff6961;
    --system-green-text: #30d158;
    --system-orange-text: #ff9230;
    --shadow-glass: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-glass-rim: inset 0 0 0 1px #48484d;
    --shadow-sheet: 0 -1px 0 #48484d;
  }
}
:root[data-theme="reduce-transparency-dark"] {
  color-scheme: dark;
  --tint: #2459d3;
  --tint-text: #8db2ff;
  --tint-soft: #1b2644;
  --on-tint: #ffffff;
  --on-tint-soft: #8db2ff;
  --bg-grouped: #000000;
  --bg-grouped-secondary: #1c1c1e;
  --label: #ffffff;
  --label-secondary: rgba(235, 235, 245, 0.7);
  --label-tertiary: rgba(235, 235, 245, 0.3);
  --fill: rgba(120, 120, 128, 0.36);
  --fill-secondary: rgba(120, 120, 128, 0.32);
  --fill-tertiary: rgba(118, 118, 128, 0.24);
  --separator: rgba(84, 84, 88, 0.65);
  --separator-opaque: #38383a;
  --glass-fill: #242428;
  --dimming: rgba(0, 0, 0, 0.48);
  --focus-ring: #8db2ff;
  --system-red: #ff4245;
  --system-orange: #ff9230;
  --system-green: #30d158;
  --system-indigo: #6d7cff;
  --system-gray: #8e8e93;
  --system-red-text: #ff6961;
  --system-green-text: #30d158;
  --system-orange-text: #ff9230;
  --shadow-glass: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-glass-rim: inset 0 0 0 1px #48484d;
  --shadow-sheet: 0 -1px 0 #48484d;
}

.ng, .ng * { box-sizing: border-box; }
.ng { font-family: var(--font-sans); color: var(--label); -webkit-font-smoothing: antialiased; font-size: 17px; line-height: 22px; letter-spacing: -0.43px; font-variant-numeric: tabular-nums; }
.ng-lang-zh { letter-spacing: 0; }
.ng button, .ng input, .ng textarea { font: inherit; color: inherit; letter-spacing: inherit; }
.ng button { appearance: none; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
.ng :focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Dynamic Type styles */
.ng-large-title { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.4px; }
.ng-title2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.26px; }
.ng-title3 { font-size: 20px; line-height: 25px; font-weight: 600; letter-spacing: -0.45px; }
.ng-headline { font-size: 17px; line-height: 22px; font-weight: 600; }
.ng-subhead { font-size: 15px; line-height: 20px; letter-spacing: -0.23px; }
.ng-footnote { font-size: 13px; line-height: 18px; letter-spacing: -0.08px; }
.ng-caption { font-size: 12px; line-height: 16px; letter-spacing: 0; }
.ng-secondary { color: var(--label-secondary); }
.ng-tint { color: var(--tint-text); }
.ng-red { color: var(--system-red-text); }
.ng-green { color: var(--system-green-text); }
.ng-orange { color: var(--system-orange-text); }
.ng-reading { font-family: var(--font-serif); font-size: 20px; line-height: 30px; letter-spacing: 0; }

/* SF Symbols (bundle.js draws them) */
.ng-sf { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; align-items: center; justify-content: center; }
.ng-sf svg { width: 100%; height: 100%; display: block; }
.ng-sf--green { color: var(--system-green); }
.ng-sf--red { color: var(--system-red); }
.ng-sf--orange { color: var(--system-orange); }
.ng-sf--tint { color: var(--tint-text); }
.ng-sf--tertiary { color: var(--label-tertiary); }

/* Glass */
.ng-glass { background: var(--glass-fill); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); box-shadow: var(--shadow-glass-rim), var(--shadow-glass); border-radius: var(--radius-capsule); }
[data-theme^="reduce-transparency"] .ng-glass { background: var(--bg-grouped-secondary); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* GlassButton */
.ng-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--size-hit); padding: 0 20px; border-radius: var(--radius-capsule); font-weight: 600; white-space: nowrap; }
.ng .ng-btn--filled { background: var(--tint); color: var(--on-tint); min-height: var(--size-control); }
.ng .ng-btn--tinted { background: var(--tint-soft); color: var(--on-tint-soft); }
.ng .ng-btn--gray { background: var(--fill-secondary); color: var(--label); }
.ng .ng-btn--plain { color: var(--tint-text); padding: 0 8px; font-weight: 400; }
.ng .ng-btn--destructive { color: var(--system-red-text); }
.ng-btn--block { display: flex; width: 100%; }
.ng-btn--sm { min-height: var(--size-control-small); padding: 0 14px; font-size: 15px; }
.ng-btn[disabled] { opacity: .4; cursor: default; }
/* GlassIconButton and toolbar groups */
.ng-bargroup { display: inline-flex; align-items: center; height: var(--size-hit); min-width: var(--size-hit); padding: 0 4px; }
.ng .ng-barbtn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: var(--size-hit); min-width: 36px; padding: 0 8px; color: var(--label); font-size: 17px; }
.ng .ng-barbtn .ng-sf { font-size: 19px; }
.ng .ng-barbtn--text { color: var(--tint-text); padding: 0 12px; }
.ng .ng-barbtn--done { font-weight: 600; color: var(--tint-text); padding: 0 12px; }
.ng .ng-bargroup--prominent { background: var(--tint); }
.ng .ng-bargroup--prominent .ng-barbtn { color: var(--on-tint); }

/* NavigationBar */
.ng-navbar { padding: 6px 16px 0; flex: none; }
.ng-navbar__bar { display: flex; align-items: center; gap: 8px; min-height: var(--size-hit); }
.ng-navbar__side { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; }
.ng-navbar__side--end { justify-content: flex-end; }
.ng-navbar__inline { font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.ng-navbar__large { padding: 4px 4px 8px; }
.ng-navbar__sub { color: var(--label-secondary); font-size: 15px; line-height: 20px; }

/* TabBar */
.ng-tabbar { display: flex; align-items: stretch; padding: 4px; gap: 0; }
.ng .ng-tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 54px; padding: 4px 2px; border-radius: var(--radius-capsule); color: var(--label); font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: 0; }
.ng-tab .ng-sf { font-size: 23px; }
.ng-tab span { max-width: 100%; white-space: nowrap; }
.ng .ng-tab[aria-selected="true"] { color: var(--tint-text); background: var(--fill-tertiary); }
.ng-tabbar--top { display: inline-flex; }
.ng .ng-tabbar--top .ng-tab { flex: none; flex-direction: row; min-height: 36px; padding: 0 16px; font-size: 15px; line-height: 20px; }
.ng-tabbar--top .ng-tab .ng-sf { display: none; }
.ng-tabbar--edge { flex-direction: column; width: 60px; }
.ng-tabbar--edge .ng-tab { flex: none; min-height: 56px; }
.ng-tabbar--edge .ng-tab span { font-size: 9px; }

/* Sidebar */
.ng-sidebar { width: var(--layout-sidebar-width); flex: none; padding: 12px; display: flex; flex-direction: column; gap: 2px; border-right: 0.5px solid var(--separator); }
.ng-sidebar__title { font-size: 22px; line-height: 28px; font-weight: 700; padding: 8px 12px 12px; display: flex; align-items: center; gap: 10px; }
.ng-sidebar__title img { width: 28px; height: 28px; border-radius: 7px; display: block; }
.ng .ng-sidebar__row { display: flex; align-items: center; gap: 12px; min-height: var(--size-hit); padding: 0 12px; border-radius: var(--radius-sm); width: 100%; }
.ng-sidebar__row .ng-sf { font-size: 20px; color: var(--tint-text); }
.ng .ng-sidebar__row[aria-selected="true"] { background: var(--fill); }
.ng-sidebar__foot { margin-top: auto; padding: 8px 12px; }

/* SearchField */
.ng-search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--fill-tertiary); color: var(--label-secondary); }
.ng .ng-search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--label); }
.ng-search input::placeholder, .ng-field input::placeholder, .ng-row__input::placeholder { color: var(--label-secondary); }

/* SegmentedControl */
.ng-seg { display: flex; padding: 2px; border-radius: var(--radius-sm); background: var(--fill-tertiary); min-height: var(--size-control-small); }
.ng .ng-seg button { flex: 1 1 0; min-width: 0; border-radius: 8px; font-size: 13px; line-height: 18px; font-weight: 500; padding: 4px 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ng .ng-seg button[aria-pressed="true"] { background: var(--bg-grouped-secondary); box-shadow: 0 1px 3px rgba(0,0,0,.14); font-weight: 600; }
[data-theme$="dark"] .ng .ng-seg button[aria-pressed="true"] { background: var(--fill); }

/* Toggle */
.ng .ng-toggle { flex: none; width: 51px; height: 31px; border-radius: var(--radius-capsule); background: var(--fill); position: relative; transition: background .2s; }
.ng-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.ng .ng-toggle[aria-checked="true"] { background: var(--system-green); }
.ng-toggle[aria-checked="true"]::after { transform: translateX(20px); }

/* Stepper */
.ng-stepper { flex: none; display: inline-flex; height: var(--size-control-small); border-radius: var(--radius-capsule); background: var(--fill-tertiary); }
.ng .ng-stepper button { width: 46px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.ng .ng-stepper button + button { box-shadow: -0.5px 0 0 var(--separator); }
.ng .ng-stepper button[disabled] { opacity: .35; }

/* Menu */
.ng-menu { min-width: 220px; max-width: 280px; border-radius: 14px; padding: 4px 0; display: inline-block; }
.ng .ng-menu__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: var(--size-hit); padding: 0 16px; }
.ng .ng-menu__item + .ng-menu__item { box-shadow: 0 -0.5px 0 var(--separator); }
.ng .ng-menu__item--destructive { color: var(--system-red-text); }
.ng-menu__sep { height: 8px; background: var(--fill-tertiary); }
.ng-menu-value { display: inline-flex; align-items: center; gap: 4px; color: var(--label-secondary); white-space: nowrap; }
.ng-menu-value .ng-sf { font-size: 13px; }

/* TextField, DateField */
.ng-field { display: flex; flex-direction: column; gap: 6px; }
.ng .ng-field input { height: var(--size-hit); padding: 0 12px; border-radius: var(--radius-sm); border: 0; background: var(--fill-tertiary); outline-offset: 0; }
.ng .ng-row__input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; padding: 0; height: 28px; }
.ng .ng-date { display: inline-flex; align-items: center; height: var(--size-control-small); padding: 0 11px; border-radius: 8px; background: var(--fill-tertiary); white-space: nowrap; }
.ng-cal { width: 320px; max-width: 100%; padding: 12px 14px 14px; border-radius: var(--radius-lg); }
.ng-cal__head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px 6px; }
.ng-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; justify-items: center; }
.ng-cal__wd { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--label-secondary); padding-bottom: 4px; }
.ng .ng-cal__day { width: 40px; height: 40px; border-radius: 50%; font-size: 20px; text-align: center; }
.ng .ng-cal__day--today { color: var(--tint-text); }
.ng .ng-cal__day[aria-pressed="true"] { background: var(--tint); color: var(--on-tint); font-weight: 600; }
.ng-cal__day[disabled], .ng-cal .ng-barbtn[disabled] { opacity: .4; cursor: default; }
/* ProgressView (linear) */
.ng-progress { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; margin: 8px 0 4px; }
.ng-progress i { display: block; height: 100%; border-radius: 2px; background: var(--tint-text); }

/* FormSection, GroupedList, rows */
.ng-grouped { display: flex; flex-direction: column; gap: 22px; padding: 4px 16px 24px; }
.ng-section { display: flex; flex-direction: column; min-width: 0; }
.ng-section__header { padding: 0 16px 7px; font-size: 13px; line-height: 18px; letter-spacing: -0.08px; color: var(--label-secondary); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ng-section__header--prominent { font-size: 20px; line-height: 25px; font-weight: 600; letter-spacing: -0.45px; color: var(--label); padding-bottom: 9px; }
.ng .ng-section__header button.ng-tint { color: var(--tint-text); }
.ng .ng-section__toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; color: var(--label-secondary); }
.ng-section__toggle .ng-sf { font-size: 12px; }
.ng-section__footer { padding: 7px 16px 0; font-size: 13px; line-height: 18px; letter-spacing: -0.08px; color: var(--label-secondary); }
.ng-list { background: var(--bg-grouped-secondary); border-radius: var(--radius-lg); overflow: hidden; }
.ng-row { display: flex; align-items: center; gap: 12px; min-height: var(--size-row); padding: 8px 16px; position: relative; width: 100%; }
.ng-row + .ng-row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 0.5px; background: var(--separator); }
.ng-row--lead + .ng-row--lead::before { left: 54px; }
.ng-row__lead { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--size-check); min-height: var(--size-check); }
.ng-row__body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ng .ng-row__body--button { align-items: stretch; }
.ng-row__title { overflow-wrap: anywhere; }
.ng-row__sub { font-size: 13px; line-height: 18px; letter-spacing: -0.08px; color: var(--label-secondary); overflow-wrap: anywhere; }
.ng-row__value { flex: none; color: var(--label-secondary); max-width: 55%; text-align: right; }
.ng-row__acc { flex: none; display: inline-flex; color: var(--label-tertiary); font-size: 14px; }
.ng-row__below { flex: 1 0 100%; }
.ng-row--wrap { flex-wrap: wrap; }
.ng-row--action .ng-row__title { color: var(--tint-text); }
.ng-row--destructive .ng-row__title { color: var(--system-red-text); }
.ng-row--center { justify-content: center; text-align: center; }
.ng-row--selected { background: var(--fill); }
.ng-row--selected.ng-row--done .ng-row__title, .ng-row--selected .ng-row__sub, .ng-row--selected .ng-row__value, .ng-row--selected .ng-secondary { color: var(--label); }
.ng-row--done .ng-row__title { color: var(--label-secondary); }
.ng-row__edit { flex: none; display: inline-flex; font-size: 22px; }

/* Leading circle (habit, task, challenge check) and emoji tile */
.ng .hb-check { width: var(--size-hit); height: var(--size-hit); margin: -9px; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; color: var(--label-tertiary); }
.ng .hb-check[aria-checked="true"] { color: var(--tint-text); }
.hb-emoji { width: var(--size-emoji-tile); height: var(--size-emoji-tile); border-radius: 7px; background: var(--fill-tertiary); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none; letter-spacing: 0; }
.hb-emoji--lg { width: 60px; height: 60px; border-radius: 14px; font-size: 34px; }
.ng-symtile { width: var(--size-emoji-tile); height: var(--size-emoji-tile); border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 17px; flex: none; }

/* Callout, StatusBadge, ContentUnavailable */
.ng-callout { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--bg-grouped-secondary); }
.ng-callout > .ng-sf { font-size: 20px; margin-top: 1px; }
.ng-callout__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ng-callout__text { font-size: 15px; line-height: 20px; letter-spacing: -0.23px; color: var(--label-secondary); }
.ng-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; line-height: 18px; letter-spacing: -0.08px; color: var(--label-secondary); }
.ng-unavailable { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 32px 24px; min-height: 260px; }
.ng-unavailable--fill { flex: 1; }
.ng-unavailable > .ng-sf { font-size: 48px; color: var(--label-secondary); margin-bottom: 6px; }
.ng-unavailable__text { color: var(--label-secondary); font-size: 15px; line-height: 20px; max-width: 300px; }
.ng-unavailable__actions { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 12px; }
.ng-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill); border-top-color: var(--label-secondary); animation: ng-spin 1s linear infinite; margin-bottom: 6px; }
@keyframes ng-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ng-spinner { animation: none; } }

/* Sheet, ChoiceDialog, StickyFooter */
.ng-scrim { position: absolute; inset: 0; background: var(--dimming); }
.ng-sheet { background: var(--bg-grouped); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-sheet); display: flex; flex-direction: column; overflow: hidden; }
.ng-sheet--form { border-radius: var(--radius-xl); }
.ng-sheet__grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--label-tertiary); margin: 6px auto 0; flex: none; }
.ng-sheet__body { flex: 1; min-height: 0; overflow: hidden; }
.ng-choice { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.ng-choice__group { border-radius: 14px; overflow: hidden; }
.ng-choice__head { padding: 14px 16px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.ng-choice__title { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--label-secondary); }
.ng-choice__msg { font-size: 13px; line-height: 18px; color: var(--label-secondary); }
.ng .ng-choice__btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; font-size: 20px; color: var(--tint-text); box-shadow: 0 -0.5px 0 var(--separator); }
.ng .ng-choice__btn--destructive { color: var(--system-red-text); }
.ng .ng-choice__btn--cancel { font-weight: 600; box-shadow: none; }
.ng-choice--alert { width: 300px; }
.ng-choice--alert .ng-choice__title { font-size: 17px; line-height: 22px; color: var(--label); }
.ng-choice--alert .ng-choice__btn { min-height: 44px; font-size: 17px; }
.ng-sticky { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: none; }
.ng-sticky > * { max-width: 560px; width: 100%; align-self: center; }

/* AccountSection */
.ng-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--fill); color: var(--label-secondary); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.ng .ng-avatar--user { background: var(--tint); color: var(--on-tint); font-size: 17px; font-weight: 600; }

/* ---------- Hábitos content: drawn flat, system colours plus the tint ---------- */
.hb-ring { position: relative; width: var(--size-ring); height: var(--size-ring); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.hb-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hb-ring__track { fill: none; stroke: var(--fill); }
.hb-ring__value { fill: none; stroke: var(--tint-text); stroke-linecap: round; }
.hb-ring--over .hb-ring__value { stroke: var(--system-red); }
.hb-ring__label { position: relative; font-size: 20px; line-height: 25px; font-weight: 700; }
.hb-ring--small { width: var(--size-check); height: var(--size-check); }
.hb-summary { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.hb-summary__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.hb-bars { display: flex; align-items: flex-end; gap: 8px; height: var(--size-chart); padding: 16px 16px 10px; }
.hb-bars__col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.hb-bars__track { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; border-radius: var(--radius-xs); background: var(--fill-tertiary); overflow: hidden; }
.hb-bar { width: 100%; background: var(--tint-text); border-radius: var(--radius-xs); min-height: 2px; }
.hb-bar--over { background: var(--system-red); }
.hb-bars__col--future .hb-bar { display: none; }
.hb-bars__name { font-size: 11px; line-height: 13px; letter-spacing: 0; color: var(--label-secondary); }
.hb-bars__col--today .hb-bars__name { color: var(--tint-text); font-weight: 600; }
.hb-bars__val { font-size: 11px; line-height: 13px; letter-spacing: 0; color: var(--label-secondary); min-height: 13px; }

.hb-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.hb-photos img, .hb-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); display: block; background: var(--fill-tertiary); }
.hb-photo { display: flex; align-items: center; justify-content: center; color: var(--label-secondary); font-size: 28px; }
.hb-members { display: flex; flex-direction: column; }
.hb-dots { display: inline-flex; gap: 3px; }
.hb-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--fill); }
.hb-dots i.on { background: var(--tint-text); }

.hb-widget { background: var(--bg-grouped-secondary); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; box-shadow: 0 0 0 0.5px var(--separator); }
.hb-widget--small { width: 170px; height: 170px; justify-content: space-between; }
.hb-widget--medium { width: 364px; height: 170px; flex-direction: row; gap: 16px; align-items: center; }
.hb-widget--large { width: 364px; height: 382px; }
.hb-widget--circular { width: 76px; height: 76px; border-radius: 50%; padding: 0; align-items: center; justify-content: center; }
.hb-widget--rectangular { width: 172px; height: 76px; border-radius: 16px; padding: 10px 12px; justify-content: center; gap: 2px; }
.hb-widget__rows { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hb-widget__row { display: flex; align-items: center; gap: 8px; min-height: 34px; font-size: 15px; line-height: 20px; }
.hb-widget__row + .hb-widget__row { box-shadow: 0 -0.5px 0 var(--separator); }
.hb-widget__row .ng-sf { font-size: 22px; color: var(--label-tertiary); }
.hb-widget__row .ng-sf.on { color: var(--tint-text); }
.hb-widget__row span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="reduce-transparency"]) .ng .ng-seg button[aria-pressed="true"] { background: var(--fill); } }

/* ---------- The app shell (layouts.md): width alone decides the columns ---------- */
html { -webkit-text-size-adjust: 100%; min-height: 100%; }
body { margin: 0; background: var(--bg-grouped); color: var(--label); overflow-x: clip; }
.ui-app { min-height: 100vh; min-height: 100dvh; min-height: 100svh; background: var(--bg-grouped); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); }
.ui-loading { min-height: 100vh; min-height: 100dvh; display: flex; }

/* Under 700 pt: one column, the tab bar floats at the bottom over the list, the list ends with its inset. */
.ui-one { max-width: var(--layout-readable); margin: 0 auto; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.ui-tabwrap { position: fixed; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; justify-content: center; padding: 0 20px; pointer-events: none; }
.ui-tabwrap .ng-tabbar { pointer-events: auto; width: 100%; max-width: 420px; }

/* From 700 pt: list (380 pt) and detail; from 1024 pt the sidebar. Each pane scrolls on its own. */
.ui-app.ui-wide { display: flex; height: 100vh; height: 100dvh; height: 100svh; overflow: hidden; }
.ui-wide .ng-sidebar { height: 100%; overflow: auto; }
.ui-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ui-toptabs { flex: none; display: flex; justify-content: center; padding: 10px 16px 0; }
.ui-panes { flex: 1; min-height: 0; display: flex; }
.ui-pane { min-width: 0; min-height: 0; height: 100%; overflow: auto; overscroll-behavior: contain; padding-bottom: 24px; }
.ui-pane--list { flex: none; width: var(--layout-list); box-shadow: inset -0.5px 0 0 var(--separator); }
.ui-pane--detail { flex: 1; }
.ui-pane--single { flex: 1; }
.ui-detail, .ui-pane--single > .ui-column { width: 100%; max-width: var(--layout-readable); margin: 0 auto; }

/* An open iPhone Duo held sideways: the list fills the leading half, the 20 pt gutter stays empty,
   the trailing half holds the detail and, on its outer edge, the system tab bar. */
.ui-fold .ui-pane--list { width: var(--fold-a, calc(50% - var(--layout-fold-gutter) / 2)); box-shadow: none; }
.ui-gutter { flex: none; width: var(--fold-gap, var(--layout-fold-gutter)); }
.ui-edge { flex: none; width: var(--layout-edge-tabs); display: flex; align-items: center; justify-content: center; }

/* Sheets: full height on a phone, a centred form sheet from 700 pt, the trailing pane on an open Duo, below the hinge half-open. */
.ui-modal { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; }
.ui-modal > .ng-sheet { position: relative; height: calc(100% - env(safe-area-inset-top, 0px) - 10px); }
.ui-modal .ng-sheet__body { overflow: auto; overscroll-behavior: contain; }
.ui-modal--form { align-items: center; justify-content: center; padding: 24px; }
.ui-modal--form > .ng-sheet { width: 100%; max-width: var(--layout-sheet); height: min(760px, 100%); }
.ui-modal--pane > .ng-sheet { height: 100%; margin-left: calc(var(--fold-a, 50%) + var(--fold-gap, var(--layout-fold-gutter))); margin-right: var(--layout-edge-tabs); border-radius: var(--radius-xl); }
.ui-modal--lower > .ng-sheet { height: calc(50% - var(--layout-fold-gutter) / 2); }

/* Confirmation dialogs: at the bottom on a phone, an alert from 700 pt, never on the fold. */
.ui-dialog { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
.ui-dialog > .ng-choice { position: relative; width: 100%; max-width: 500px; }
.ui-dialog--alert { justify-content: center; }
.ui-dialog--alert > .ng-choice { width: 300px; }
.ui-dialog--pane { padding-left: calc(var(--fold-a, 50%) + var(--fold-gap, var(--layout-fold-gutter)) + 8px); padding-right: calc(var(--layout-edge-tabs) + 8px); }
.ui-dialog--lower { top: 50%; padding-top: var(--layout-fold-gutter); }

/* Menus open from the bar button that asked. */
.ui-menu-layer { position: fixed; inset: 0; z-index: 45; }
.ui-menu-layer > .ng-menu { position: absolute; }

/* Pages: the header that names a habit or a challenge once. */
.ui-header { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 8px 16px 4px; }
.ui-header .ng-title2 { overflow-wrap: anywhere; }

/* The system date picker behind Hoy's calendar button. */
.ui-datebtn { position: relative; display: inline-flex; }
.ui-datebtn input { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; }

/* Edit mode, the inline task field and the drag handle. */
.ng .ui-editmark { display: inline-flex; color: var(--system-red); }
.ng .ui-handle { display: inline-flex; color: var(--label-tertiary); cursor: grab; touch-action: none; }
.ng-row[draggable="true"] { cursor: grab; }
.ui-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ng .ui-filebtn { position: relative; overflow: hidden; }
.ng .ui-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ui-thumb { width: var(--size-emoji-tile); height: var(--size-emoji-tile); border-radius: 7px; object-fit: cover; display: block; }

.update-banner { position: fixed; top: max(16px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 60; padding: 10px 16px; border-radius: var(--radius-capsule); background: var(--glass-fill); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); box-shadow: var(--shadow-glass-rim), var(--shadow-glass); }
@media (prefers-reduced-transparency: reduce) { .update-banner { background: var(--bg-grouped-secondary); -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { .ng *, .ng *::after { transition: none !important; animation: none !important; } }
@media (prefers-contrast: more) { .ng-row + .ng-row::before { background: var(--separator-opaque); } }
.ng button.ng-row, .ng a.ng-row, .ng label.ng-row { padding: 8px 16px; text-align: left; }
.ng-row__sub.ng-red { color: var(--system-red-text); }
.ng-row__sub.ng-orange { color: var(--system-orange-text); }
.ng .ng-sheet:focus, .ng .ng-choice:focus, .ui-menu-layer > div:focus { outline: none; }
.ng a.ng-btn, .ng a.ng-row { text-decoration: none; color: inherit; }
.ng a.ng-btn--filled { color: var(--on-tint); }
