/* Themes: each one is a hue for the neutrals plus a light and a dark accent. */
:root, :root[data-accent="indigo"] { --h: 235; --s: 45%; --accent-l: #3B4BFF; --accent-d: #7C89FF; }
:root[data-accent="forest"] { --h: 155; --s: 30%; --accent-l: #0B7A55; --accent-d: #3DD69C; }
:root[data-accent="berry"]  { --h: 330; --s: 40%; --accent-l: #B5175A; --accent-d: #FF7AB0; }
:root[data-accent="ocean"]  { --h: 200; --s: 45%; --accent-l: #0369A1; --accent-d: #4CC3F5; }
:root[data-accent="slate"]  { --h: 220; --s: 8%;  --accent-l: #2B2F3A; --accent-d: #D5D9E2; }

:root {
  --bg: hsl(var(--h) var(--s) 96%);
  --surface: #FFFFFF;
  --surface-2: hsl(var(--h) calc(var(--s) * .9) 93%);
  --ink: hsl(var(--h) var(--s) 14%);
  --ink-2: hsl(var(--h) 14% 38%);
  --line: hsl(var(--h) calc(var(--s) * .8) 87%);
  --primary: var(--accent-l);
  --on-primary: #FFFFFF;
  --streak: #E85D0C;
  --ok: #0B8A60;
  --pending: #9A6410;
  --danger: #D62B4B;
  --g1: #FF6A1A;
  --g2: #FF2D87;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(23 22 58 / .06), 0 8px 24px -12px rgb(23 22 58 / .18);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
/* Dark tokens apply for "dark", and for "system" when the OS is dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: hsl(var(--h) calc(var(--s) * .8) 9%);
    --surface: hsl(var(--h) calc(var(--s) * .7) 14%);
    --surface-2: hsl(var(--h) calc(var(--s) * .7) 19%);
    --ink: hsl(var(--h) 60% 96%);
    --ink-2: hsl(var(--h) 18% 72%);
    --line: hsl(var(--h) calc(var(--s) * .6) 27%);
    --primary: var(--accent-d);
    --on-primary: hsl(var(--h) var(--s) 9%);
    --streak: #FF8A47;
    --ok: #3DD69C;
    --pending: #F2B84B;
    --danger: #FF6B86;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: hsl(var(--h) calc(var(--s) * .8) 9%);
  --surface: hsl(var(--h) calc(var(--s) * .7) 14%);
  --surface-2: hsl(var(--h) calc(var(--s) * .7) 19%);
  --ink: hsl(var(--h) 60% 96%);
  --ink-2: hsl(var(--h) 18% 72%);
  --line: hsl(var(--h) calc(var(--s) * .6) 27%);
  --primary: var(--accent-d);
  --on-primary: hsl(var(--h) var(--s) 9%);
  --streak: #FF8A47;
  --ok: #3DD69C;
  --pending: #F2B84B;
  --danger: #FF6B86;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
  color-scheme: dark;
}

.theme-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.theme-pick button {
  display: grid; justify-items: center; gap: 6px; padding: 8px 4px; min-height: 44px;
  border-radius: 12px; border: 2px solid transparent; background: var(--surface-2); font: 600 .78rem var(--body);
}
.theme-pick button[aria-pressed="true"] { border-color: var(--ink); }
.theme-pick i { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); box-shadow: 0 0 0 1px var(--line); }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--body);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 1080px; margin: 0 auto; padding: 20px 16px 48px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand h1 { font: 800 clamp(1.6rem, 4vw, 2.2rem)/1 var(--display); letter-spacing: -.02em; margin: 0; }
.brand .today { font: 500 .8rem var(--mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600;
  transition: transform .12s ease, background-color .2s ease, border-color .2s ease;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.icon-btn { width: 44px; padding: 0; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.role { display: flex; align-items: center; gap: 8px; }
.role .eyebrow { white-space: nowrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; color: var(--ink-2); transition: background-color .15s, color .15s; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(23 22 58 / .15); }
body.as-partner { --role-accent: var(--ok); }
.role-banner { display: none; margin: -8px 0 16px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); font-size: .9rem; }
body.as-partner .role-banner { display: block; }
body.as-partner #newGoalBtn { display: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 18px 0; }
.card-head h2 { font: 700 1.15rem/1.2 var(--display); margin: 0; }
.eyebrow { font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }

/* ---------- calendar ---------- */
.cal { padding: 18px; }
.cal-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-nav h2 { font: 800 clamp(1.4rem, 3.5vw, 1.9rem)/1 var(--display); margin: 0; text-align: center; letter-spacing: -.01em; }
.cal-nav .prev { justify-self: start; }
.cal-nav .next { justify-self: end; }
.cal-nav .btn { color: var(--ink-2); }
.cal-nav .btn:hover { color: var(--ink); }
.dow, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dow span { text-align: center; font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); padding-bottom: 6px; }
.day {
  position: relative; height: clamp(52px, 8vw, 84px);
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  padding: 8px; border-radius: 12px; border: 1px solid transparent;
  background: var(--surface-2); text-align: left;
  transition: border-color .15s ease, transform .12s ease, background-color .2s ease;
}
.day:hover { border-color: var(--ink-2); }
.day:active { transform: scale(.97); }
.day .num { font: 700 .95rem/1 var(--mono); }
.day.out { background: transparent; border-color: var(--line); }
.day.out .num { color: var(--ink-2); opacity: .7; }
.day.today { border: 2px solid var(--primary); }
.day.today .num { color: var(--primary); }
.day.alldone { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.day.selected { border-color: var(--ink); }
.dots { display: flex; flex-wrap: wrap; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c); }
.dot.done { background: var(--c); }
.dot.pending { background: repeating-linear-gradient(45deg, var(--c) 0 2px, transparent 2px 4px); }
.dot.missed { opacity: .35; }
.dot.future { opacity: .55; border-style: dotted; }
.day .stk {
  position: absolute; top: 50%; left: 50%; width: clamp(26px, 3.6vw, 42px); height: clamp(26px, 3.6vw, 42px);
  transform: translate(-50%, -50%) rotate(var(--rot, 8deg));
  filter: drop-shadow(0 2px 2px rgb(23 22 58 / .25));
  pointer-events: none;
}
.day .stk-more { position: absolute; top: 6px; right: 6px; font: 700 .65rem var(--mono); color: var(--ink-2); }
.hint { margin: 12px 0 0; text-align: center; color: var(--ink-2); font-size: .9rem; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 8px; font-size: .8rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { --c: var(--ink-2); }

/* ---------- lower panels ---------- */
/* Sections are reordered with CSS order; two panels next to each other share a row on wide screens. */
.sections { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 760px) {
  .sections { grid-template-columns: 1fr 1fr; }
  .sections > .wide { grid-column: 1 / -1; }
}
.order-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.order-list li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-top: 1px solid var(--line); }
.order-list li:first-child { border-top: 0; }
.order-list .pos { font: 700 .75rem var(--mono); color: var(--ink-2); width: 2ch; }
.order-list .nm { flex: 1; font-weight: 600; }
.order-list .btn { width: 40px; min-height: 40px; padding: 0; }
.panel-body { padding: 14px 18px 18px; }
.note { font-size: .82rem; color: var(--ink-2); margin: 4px 0 12px; }

.req { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.req .swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.req .what { font-weight: 600; }
.req .when { grid-column: 2; font: 500 .78rem var(--mono); color: var(--ink-2); }
.req .actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 6px; }
.empty { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-2); font-size: .9rem; text-align: center; }

.feed { list-style: none; margin: 14px 0 0; padding: 0; }
.feed li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.feed li:first-child { border-top: 0; }
.feed .ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); }
.feed .ico.ok { color: var(--ok); }
.feed .ico svg.stk { width: 28px; height: 28px; filter: drop-shadow(0 1px 1px rgb(23 22 58 / .25)); }
.feed time { margin-left: auto; font: 500 .72rem var(--mono); color: var(--ink-2); white-space: nowrap; }

/* ---------- segmented progress bar (signature) ---------- */
.goal-prog { padding: 12px 0; border-top: 1px solid var(--line); }
.goal-prog:first-of-type { border-top: 0; padding-top: 4px; }
.gp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gp-name { font-weight: 700; background: none; border: 0; padding: 0; text-align: left; text-decoration: underline transparent; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.gp-name:hover { text-decoration-color: currentColor; }
.streak { display: inline-flex; align-items: center; gap: 3px; font: 700 .78rem var(--mono); color: var(--streak); }
.streak svg.i { width: 15px; height: 15px; }
.gp-range { margin-left: auto; font: 500 .72rem var(--mono); color: var(--ink-2); }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar {
  position: relative; flex: 1; height: 22px; padding: 3px; border-radius: 7px;
  background: var(--surface-2); box-shadow: inset 0 1px 3px rgb(23 22 58 / .12);
}
.bar-track, .bar-fill {
  position: absolute; inset: 3px; border-radius: 3px;
  --seg: calc(100% / var(--n));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 3px), transparent calc(var(--seg) - 3px) var(--seg));
          mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 3px), transparent calc(var(--seg) - 3px) var(--seg));
}
.bar-track { background: color-mix(in srgb, var(--ink) 11%, transparent); }
.bar-fill {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  clip-path: inset(0 calc(100% - var(--pct)) 0 0);
  transition: clip-path .7s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.bar-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .55), transparent) no-repeat;
  background-size: 30% 100%;
  animation: shine 2.6s ease-in-out infinite;
}
@keyframes shine { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.pct { font: 700 1rem var(--mono); min-width: 4.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.gp-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .82rem; color: var(--ink-2); }
.reward { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
.reward svg.i { width: 18px; height: 18px; color: var(--ink-2); }
.reward.unlocked { background: color-mix(in srgb, var(--g1) 14%, var(--surface)); }
.reward.unlocked svg.i { color: var(--streak); }
.reward .cost { font: 500 .78rem var(--mono); color: var(--ink-2); }
.reward .btn { margin-left: auto; }

/* ---------- dialogs ---------- */
dialog {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px -20px rgb(0 0 0 / .45);
}
dialog::backdrop { background: rgb(15 16 36 / .45); }
dialog[open] { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@media (max-width: 599px) {
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; border-bottom: 0; }
  dialog[open] { animation: sheet .25s cubic-bezier(.2, .9, .3, 1); }
  @keyframes sheet { from { transform: translateY(40px); opacity: .4; } }
}
.dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 18px 18px 6px; }
.dlg-head h2 { font: 800 1.35rem/1.15 var(--display); margin: 2px 0 0; }
.dlg-body { padding: 6px 18px 12px; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px 18px; border-top: 1px solid var(--line); }
.dlg-foot .spacer { flex: 1; }

.check {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px; margin: 0 -12px; border-radius: 12px; cursor: pointer;
  transition: background-color .15s ease;
}
.check:hover { background: var(--surface-2); }
.check input { appearance: none; margin: 0; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--c); display: grid; place-items: center; cursor: pointer; transition: background-color .15s ease, transform .12s ease; }
.check input:checked { background: var(--c); }
.check input:checked::after { content: ""; width: 12px; height: 7px; border: 3px solid #fff; border-top: 0; border-right: 0; transform: translateY(-2px) rotate(-45deg); }
.check input:active { transform: scale(.9); }
.check input:disabled { cursor: not-allowed; opacity: .5; }
.check .name { font-weight: 600; }
.check .status { display: block; font-size: .8rem; color: var(--ink-2); }
.status.pending { color: var(--pending); }
.status.approved { color: var(--ok); }
.day-stickers { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.day-stickers .label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.day-stickers .label span { font-weight: 400; color: var(--ink-2); font-size: .82rem; }
.placed { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; font-size: .82rem; color: var(--ink-2); }
.placed span { display: inline-flex; align-items: center; gap: 6px; }
.placed svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgb(23 22 58 / .25)); }
.check .approve { grid-column: 3; }

/* forms */
.field { margin-bottom: 14px; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .help { font-size: .8rem; color: var(--ink-2); margin-top: 4px; }
.field .err { font-size: .82rem; color: var(--danger); margin-top: 4px; }
.input { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.input:focus-visible { border-color: var(--primary); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-grid; place-items: center; min-width: 44px; min-height: 40px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); font: 700 .78rem var(--mono); text-transform: uppercase; cursor: pointer; transition: background-color .15s, color .15s; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.swatches { display: flex; gap: 8px; }
.swatches label { position: relative; }
.swatches input { position: absolute; opacity: 0; }
.swatches span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.swatches input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 3px; }
.toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin-bottom: 10px; }
.toggle input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.toggle small { display: block; color: var(--ink-2); font-size: .8rem; }

.grad-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grad-presets button { min-height: 44px; border-radius: 10px; border: 2px solid transparent; background: linear-gradient(90deg, var(--a), var(--b)); color: #fff; font: 700 .72rem var(--mono); text-transform: uppercase; text-shadow: 0 1px 2px rgb(0 0 0 / .4); }
.grad-presets button[aria-pressed="true"] { border-color: var(--ink); }
.colors { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.colors input[type="color"] { width: 44px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.preview { margin-top: 14px; }

.sticker-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sticker-pick button { aspect-ratio: 1; min-height: 44px; border-radius: 12px; border: 2px solid transparent; background: var(--surface-2); display: grid; place-items: center; transition: transform .15s cubic-bezier(.3, 1.5, .5, 1), border-color .15s; }
.sticker-pick button:hover { transform: rotate(-6deg) scale(1.06); }
.sticker-pick button[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); }
.sticker-pick svg { width: 70%; height: 70%; filter: drop-shadow(0 2px 2px rgb(23 22 58 / .25)); }
.tracked-opts { margin: 0 0 6px 30px; padding-left: 12px; border-left: 2px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--surface); font-weight: 600; font-size: .9rem; transition: opacity .2s, transform .2s; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
  .cal { padding: 12px; }
  .dow, .grid { gap: 4px; }
  .day { padding: 5px; border-radius: 9px; height: auto; min-height: 48px; aspect-ratio: 1 / 1.05; }
  .day .num { font-size: .8rem; }
  .dot { width: 7px; height: 7px; border-width: 1.5px; }
  .day .stk { width: 26px; height: 26px; top: 54%; }
  .day .stk-more { display: none; }
  .role .eyebrow, .brand .today { display: none; }
  .seg button { padding: 0 10px; }
  .cal-nav .btn .lbl { display: none; }
  .top .btn .lbl { display: none; }
  .top .btn { width: 44px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- signed-out, loading ---------- */
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.signin-card { width: min(400px, 100%); padding: 32px 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.signin-card h1 { font: 800 2rem/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 8px; }
.signin-card p { color: var(--ink-2); margin: 0 0 20px; }
.signin-card .err { color: var(--danger); }
.signin-card .btn { text-decoration: none; }
.loading { text-align: center; color: var(--ink-2); padding: 40vh 16px 0; margin: 0; }
.app { padding-top: max(20px, env(safe-area-inset-top)); padding-bottom: max(48px, env(safe-area-inset-bottom)); }
.offline { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--pending) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pending) 40%, transparent); font-size: .9rem; }
button[aria-busy="true"] { cursor: progress; opacity: .7; }

/* ---------- notification settings ---------- */
fieldset.notify { border: 0; padding: 0 0 14px; margin: 0 0 16px; border-bottom: 1px solid var(--line); }
fieldset.notify legend { padding: 0; margin-bottom: 4px; font-weight: 600; font-size: .9rem; }
.notify .help { font-size: .82rem; color: var(--ink-2); margin: 0 0 10px; }
.notify #pushBtn { margin-bottom: 12px; }
.notify-kinds .toggle { margin-bottom: 8px; }
.notify-kinds .help:last-child { margin: 4px 0 0; }
.push-nudge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-size: .85rem; color: var(--ink-2); }
