/* Habit Streak — native-feel phone shell on Aquila toss-v2 tokens.
   One app layout at every width: full-bleed on phones, the same 390×844
   app inside a device frame on tablets and desktops. */

@font-face {
  font-family: "Inter";
  src: url("./inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --nav-h: 44px;
  --tab-h: 50px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), 12px);
  --gutter: 16px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
}

body {
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  background: var(--aq-bg);
  color: var(--aq-fg);
  min-height: 100dvh;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* Dark mode: accent becomes a light tint, so text on it must be dark. */
body { --on-accent: var(--aq-white); }
body.aq-dark { --on-accent: #0F1720; }
/* AA text contrast: Aquila subtle/muted greys and #2272EB fall under 4.5:1 for 13–17px text on white/page in light mode. */
body:not(.aq-dark) { --aq-fg-subtle: var(--aq-grey-600); --aq-fg-muted: var(--aq-grey-700); --aq-accent: var(--aq-blue-700); --aq-accent-strong: #1554BF; }
body { --accent-text: var(--aq-accent-strong); --danger-text: color-mix(in srgb, var(--aq-error) 78%, #000); }
body.aq-dark { --accent-text: var(--aq-accent); --danger-text: var(--aq-error); }

button { border: 0; background: none; color: inherit; font: inherit; }
.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--aq-accent); outline-offset: 2px; border-radius: 10px; }

/* ── Stage & device ─────────────────────────────────────────── */
.stage { height: 100dvh; }
.device { position: relative; height: 100%; overflow: hidden; background: var(--aq-bg); }
.statusbar { display: none; }
.stage-caption { display: none; }

@media (min-width: 600px) and (min-height: 700px) {
  body { background: radial-gradient(120% 80% at 50% 0%, var(--aq-surface) 0%, var(--aq-grey-100) 60%); }
  .stage { display: grid; place-content: center; justify-items: center; gap: 12px; padding: 12px; }
  .device {
    width: 412px; height: min(866px, calc(100dvh - 48px));
    border-radius: 54px;
    border: 11px solid #0D1117;
    box-shadow: 0 0 0 1px var(--aq-grey-300), 0 30px 60px -20px rgba(15, 23, 32, .35), 0 18px 36px -18px rgba(15, 23, 32, .25);
    --safe-top: 47px; --safe-bottom: 26px;
  }
  .statusbar {
    display: flex; position: absolute; z-index: 40; inset: 0 0 auto; height: 47px;
    align-items: center; justify-content: space-between; padding: 6px 28px 0 34px;
    font-size: 16px; font-weight: 600; letter-spacing: -.01em; pointer-events: none;
  }
  .statusbar svg { fill: currentColor; }
  .sb-icons { display: flex; gap: 6px; align-items: center; }
  .device::after { content: ""; position: absolute; z-index: 90; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--aq-fg); opacity: .85; pointer-events: none; }
  .stage-caption { display: block; font-size: 13px; color: var(--aq-fg-muted); }
  .stage-caption a { color: var(--aq-fg-secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
}

/* ── App & screens ─────────────────────────────────────────── */
.app { position: absolute; inset: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen[hidden] { display: none; }
.scroll {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + var(--nav-h)) var(--gutter) calc(var(--tab-h) + var(--safe-bottom) + 32px);
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }
.screen:has(.toolbar) .scroll { padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 96px); }

.navbar {
  position: absolute; z-index: 20; inset: 0 0 auto;
  height: calc(var(--safe-top) + var(--nav-h)); padding: var(--safe-top) 8px 0;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s, box-shadow .2s;
}
.navbar-title { font-size: 17px; font-weight: 600; letter-spacing: -.02em; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.navbar-trailing { position: absolute; right: 8px; bottom: 0; height: var(--nav-h); display: flex; align-items: center; gap: 2px; }
.screen.scrolled .navbar {
  background: var(--aq-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 .5px 0 var(--aq-border-strong);
}
.screen.scrolled .navbar-title { opacity: 1; transform: none; }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px;
  color: var(--accent-text); transition: background-color .15s, transform .15s;
}
.icon-btn:active { background: var(--aq-accent-subtle); transform: scale(.94); }
.icon-btn .i { width: 24px; height: 24px; }

.large-title { padding: 4px 4px 16px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--aq-fg-muted); }
.large-title h1 { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -.025em; margin-top: 2px; }

/* ── Cards, groups, lists ─────────────────────────────────── */
.card { background: var(--aq-surface); border-radius: var(--aq-radius-card); box-shadow: var(--aq-shadow-sm); }
.group-label { font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--aq-fg-muted); padding: 24px 16px 8px; }
.group-foot { font-size: 13px; line-height: 18px; color: var(--aq-fg-muted); padding: 8px 16px 0; }
.group { list-style: none; background: var(--aq-surface); border-radius: var(--aq-radius-card); box-shadow: var(--aq-shadow-sm); overflow: hidden; }

/* Summary */
.summary { padding: 16px; }
.summary-top { display: flex; align-items: center; gap: 16px; }
.ring-wrap { position: relative; width: 64px; height: 64px; flex: none; }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ring { width: 64px; height: 64px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring-track { stroke: var(--aq-accent-subtle); }
.ring-fill { stroke: var(--aq-accent); stroke-linecap: round; stroke-dasharray: 169.65; stroke-dashoffset: 169.65; transition: stroke-dashoffset .6s var(--ease-out); }
.summary.perfect .ring { animation: pop .5s var(--ease-out); }
.summary-count { font-size: 20px; line-height: 25px; font-weight: 700; letter-spacing: -.02em; }
.summary-note { font-size: 15px; line-height: 20px; color: var(--aq-fg-secondary); margin-top: 2px; }

.week { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 16px; padding-top: 16px; border-top: .5px solid var(--aq-border); }
.week li { display: grid; justify-items: center; gap: 6px; }
.week .wd { font-size: 12px; font-weight: 600; color: var(--aq-fg-subtle); }
.week .dn {
  width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center;
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--aq-fg-secondary);
}
.week .partial .dn { background: color-mix(in srgb, var(--aq-accent) 22%, transparent); color: var(--aq-accent-strong); }
body.aq-dark .week .partial .dn { background: color-mix(in srgb, var(--aq-accent) 38%, transparent); color: var(--aq-fg); }
.week .perfect .dn { background: var(--aq-accent); color: var(--on-accent); }
.week .today .dn { box-shadow: inset 0 0 0 2px var(--aq-accent); }
.week .today .wd { color: var(--accent-text); }
.week .future .dn { color: var(--aq-fg-placeholder); }

/* Habit rows */
.list > li { position: relative; }
.list > li + li::before { content: ""; position: absolute; top: 0; right: 0; left: 72px; height: .5px; background: var(--aq-border); }
.row { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 0 8px 0 16px; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; align-self: stretch; padding: 12px 0; border-radius: 12px; }
.row-main:active { opacity: .6; }
.row-text { min-width: 0; }
.row-title { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: flex; align-items: center; gap: 4px; font-size: 15px; line-height: 20px; color: var(--aq-fg-muted); margin-top: 2px; }
.row-sub .i { width: 15px; height: 15px; stroke-width: 2; }
.row-sub.hot { color: var(--aq-fg-secondary); }
.row-sub.hot .i { color: #E8590C; }

.chip-icon { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; }
.chip-icon .i { width: 22px; height: 22px; stroke-width: 1.9; }
.tint-1 { background: var(--aq-cat-1-light); color: var(--aq-cat-1-dark); }
.tint-2 { background: var(--aq-cat-2-light); color: var(--aq-cat-2-dark); }
.tint-3 { background: var(--aq-cat-3-light); color: var(--aq-cat-3-dark); }
.tint-4 { background: var(--aq-cat-4-light); color: var(--aq-cat-4-dark); }
.tint-5 { background: var(--aq-cat-5-light); color: var(--aq-cat-5-dark); }

.check { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 24px; }
.check-dot {
  width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px var(--aq-border-strong); color: transparent;
  transition: background-color .2s, box-shadow .2s, transform .2s var(--ease-out);
}
.check-dot .i { width: 18px; height: 18px; stroke-width: 3; }
.check:active .check-dot { transform: scale(.86); }
.check[aria-pressed="true"] .check-dot { background: var(--aq-accent); box-shadow: none; color: var(--on-accent); }
.check.bump .check-dot { animation: pop .42s var(--ease-out); }
@keyframes pop { 0% { transform: scale(.8); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* Friends */
.crew-card { margin-bottom: 16px; overflow: hidden; }
.crew { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.crew-card .row-link { box-shadow: inset 0 .5px 0 var(--aq-border); font-size: 16px; font-weight: 500; }
.row-link-lead { display: flex; align-items: center; gap: 10px; }
.row-link-lead .i { width: 20px; height: 20px; }
.crew-avatars { display: flex; }
.crew-avatars .avatar { width: 30px; height: 30px; font-size: 12px; box-shadow: 0 0 0 2px var(--aq-surface); }
.crew-avatars .avatar + .avatar { margin-left: -8px; }
.crew-copy { flex: 1; min-width: 0; }
.crew-name { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.crew-meta { line-height: 18px; font-size: 13px; color: var(--aq-fg-muted); margin-top: 1px; }
.crew-sheet { color: var(--aq-fg-subtle); }

.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }

.mini-week { display: flex; gap: 4px; }
.mini-week i { width: 8px; height: 8px; border-radius: 4px; background: var(--aq-grey-200); }
.mini-week i.on { background: var(--aq-accent); }
.mini-week i.today { box-shadow: inset 0 0 0 1.5px var(--aq-accent); background: transparent; }
.mini-week i.today.on { background: var(--aq-accent); }
.trail { display: grid; justify-items: end; gap: 6px; padding-right: 8px; }
.streak-num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.streak-num small { font-size: 13px; font-weight: 500; color: var(--aq-fg-muted); margin-left: 3px; }
.rank { width: 20px; font-size: 15px; font-weight: 600; color: var(--aq-fg-subtle); text-align: center; font-variant-numeric: tabular-nums; flex: none; }
.you-tag { font-size: 12px; font-weight: 600; color: var(--aq-accent-strong); background: var(--aq-accent-subtle); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.frow { width: 100%; min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; }
.frow:active { background: var(--aq-surface-sunken); }
.frow .row-text { flex: 1; }
#friend-list.ranked > li + li::before { left: 104px; }

/* Segmented control */
.segmented {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--aq-grey-200); border-radius: 10px; padding: 2px; margin-bottom: 16px;
}
.segmented button { position: relative; z-index: 1; height: 32px; font-size: 14px; font-weight: 600; color: var(--aq-fg-secondary); border-radius: 8px; }
.segmented button[aria-selected="true"] { color: var(--aq-fg); }
.seg-thumb {
  position: absolute; z-index: 0; top: 2px; bottom: 2px; left: 2px; border-radius: 8px;
  background: var(--aq-surface-overlay); box-shadow: 0 2px 6px rgba(15, 23, 32, .12), 0 0 0 .5px rgba(15, 23, 32, .04);
  transition: transform .28s var(--ease-out);
}
body.aq-dark .segmented { background: var(--aq-surface-sunken); }
body.aq-dark .seg-thumb { background: var(--aq-surface-strong); }

/* Share */
.card-preview { margin: 16px 0 0; border-radius: 24px; overflow: hidden; box-shadow: var(--aq-shadow-lg); aspect-ratio: 1; background: var(--aq-surface); }
.card-preview img { display: block; width: 100%; height: 100%; }
.chips { -webkit-mask-image: linear-gradient(to right, #000 72%, transparent); mask-image: linear-gradient(to right, #000 72%, transparent); display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none; height: 40px; padding: 0 14px 0 8px; border-radius: 20px; display: flex; align-items: center; gap: 8px;
  background: var(--aq-surface); box-shadow: inset 0 0 0 1px var(--aq-border); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.chips button .chip-icon { width: 28px; height: 28px; border-radius: 14px; }
.chips button .chip-icon .i { width: 16px; height: 16px; }
.chips button[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--aq-accent); color: var(--aq-accent-strong); }
#style-seg { margin-bottom: 0; }

/* Toolbar (sticky primary action above the tab bar) */
.toolbar {
  position: absolute; z-index: 15; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-bottom));
  padding: 12px var(--gutter);
  background: linear-gradient(to top, var(--aq-bg) 70%, color-mix(in srgb, var(--aq-bg) 0%, transparent));
}

/* Buttons */
.btn {
  width: 100%; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 17px; font-weight: 600; letter-spacing: -.01em; transition: transform .15s, background-color .15s, opacity .15s;
}
.btn .i { width: 20px; height: 20px; stroke-width: 2; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--aq-accent); color: var(--on-accent); }
.btn-primary:active { background: var(--aq-accent-strong); }
.btn-primary:disabled { background: var(--aq-grey-200); color: var(--aq-fg-subtle); transform: none; }
.btn-primary.done { background: var(--aq-surface); color: var(--aq-accent-strong); box-shadow: inset 0 0 0 1.5px var(--aq-accent); }
.btn-primary.done .i { stroke-width: 2.6; }
.btn-plain { color: var(--accent-text); }
.btn-plain:active { background: var(--aq-accent-subtle); }
.text-btn { height: 44px; padding: 0 8px; font-size: 17px; color: var(--accent-text); border-radius: 10px; }
.text-btn.strong { font-weight: 600; }

/* Tab bar */
.tabbar {
  position: absolute; z-index: 30; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: color-mix(in srgb, var(--aq-surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -.5px 0 var(--aq-border-strong);
}
.tabbar button { display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--aq-fg-subtle); min-height: 44px; }
.tabbar .i { width: 26px; height: 26px; stroke-width: 1.7; }
.tabbar span { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
.tabbar button[aria-current="page"] { color: var(--accent-text); }
.tabbar button[aria-current="page"] .i { stroke-width: 2.1; }

/* Sheets */
.scrim { position: absolute; inset: 0; z-index: 50; background: rgba(8, 12, 18, .4); opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.sheet {
  position: absolute; z-index: 60; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--safe-top) - 12px);
  overflow-y: auto; background: var(--aq-bg); border-radius: 14px 14px 0 0;
  padding: 0 var(--gutter) calc(var(--safe-bottom) + 16px);
  transform: translateY(100%); transition: transform .42s var(--ease-sheet);
  box-shadow: 0 -10px 40px rgba(8, 12, 18, .18);
}
.sheet.on { transform: none; }
.sheet[hidden] { display: none; }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--aq-grey-300); margin: 6px auto 4px; touch-action: none; cursor: grab; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 12px 0 16px; }
.sheet-head-copy { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.02em; }
.sheet-head p { font-size: 15px; color: var(--aq-fg-muted); }
.close { color: var(--aq-fg-muted); background: var(--aq-grey-200); width: 32px; height: 32px; margin: 6px; }
.close .i { width: 18px; height: 18px; stroke-width: 2.4; }
.sheet-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 4px 0 12px; margin: 0 -8px; }
.sheet-nav h2 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.sheet-nav > :first-child { justify-self: start; }
.sheet-nav > :last-child { justify-self: end; }
.sheet-actions { display: grid; gap: 4px; padding-top: 24px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--aq-surface); border-radius: var(--aq-radius-card); box-shadow: var(--aq-shadow-sm); }
.stats div { padding: 14px 12px; text-align: center; }
.stats div + div { box-shadow: inset .5px 0 0 var(--aq-border); }
.stats dt { font-size: 13px; color: var(--aq-fg-muted); font-weight: 500; }
.stats dd { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }

.cal { background: var(--aq-surface); border-radius: var(--aq-radius-card); box-shadow: var(--aq-shadow-sm); padding: 16px; margin-top: 12px; }
.cal-month { font-size: 17px; font-weight: 600; margin-bottom: 12px; letter-spacing: -.015em; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head span { font-size: 12px; font-weight: 600; color: var(--aq-fg-subtle); text-align: center; }
.cal-grid { list-style: none; margin-top: 8px; }
.cal-grid li { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--aq-fg-muted); background: var(--aq-surface-sunken); }
.cal-grid li { position: relative; }
.cal-grid li { background: transparent; box-shadow: inset 0 0 0 1px var(--aq-border); }
.cal-grid li.on { background: var(--aq-accent); color: var(--on-accent); box-shadow: none; }
.cal-grid li.today { box-shadow: inset 0 0 0 2px var(--aq-accent); color: var(--aq-accent-strong); }
.cal-grid li.today.on { box-shadow: 0 0 0 2px var(--aq-surface), 0 0 0 4px var(--aq-accent); }
.cal-grid li.today.on { background: var(--aq-accent); color: var(--on-accent); }
.cal-grid li small { position: absolute; top: 3px; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .8; }
.cal-grid li.future { background: transparent; box-shadow: none; color: var(--aq-fg-placeholder); }

.field { display: block; background: var(--aq-surface); border-radius: var(--aq-radius-card); box-shadow: var(--aq-shadow-sm); padding: 12px 16px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--aq-fg-muted); }
.field input { width: 100%; height: 36px; border: 0; background: none; font-size: 17px; color: var(--aq-fg); }
.field input::placeholder { color: var(--aq-fg-placeholder); }
.icon-pick { border: 0; background: var(--aq-surface); border-radius: var(--aq-radius-card); box-shadow: var(--aq-shadow-sm); padding: 12px 16px 16px; margin-top: 12px; }
.icon-pick legend { float: left; width: 100%; margin-bottom: 12px; }
.icon-grid { clear: both; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.icon-grid button { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; min-height: 44px; }
.icon-grid button .i { width: 22px; height: 22px; }
.icon-grid button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--aq-bg), 0 0 0 4px var(--aq-accent); }

.friend-hero { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 16px 0 20px; }
.friend-hero h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; }
.friend-hero p { font-size: 15px; color: var(--aq-fg-muted); }
.week-lg { background: var(--aq-surface); border-radius: var(--aq-radius-card); box-shadow: var(--aq-shadow-sm); padding: 16px 12px; margin-top: 0; border-top: 0; }

.about-copy { font-size: 15px; line-height: 21px; color: var(--aq-fg-secondary); padding: 4px 4px 0; }
.list.compact { margin-top: 24px; }
.list.compact > li + li::before { left: 16px; }
.row-link { width: 100%; min-height: 52px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; font-size: 17px; color: var(--accent-text); text-align: left; }
.row-link .chev { width: 18px; height: 18px; color: currentColor; opacity: .8; }
.row-link.danger { color: var(--danger-text); }
.row-link:active { background: var(--aq-surface-sunken); }

/* Toast */
.toast {
  position: absolute; z-index: 70; left: 16px; right: 16px; bottom: calc(var(--tab-h) + var(--safe-bottom) + 8px);
  transform: translateY(12px); justify-content: space-between; opacity: 0; transition: opacity .2s, transform .3s var(--ease-out);
  display: flex; align-items: center; gap: 12px;
  background: var(--aq-grey-900); color: var(--aq-bg); border-radius: 26px; padding: 0 8px 0 20px; min-height: 52px;
  font-size: 15px; font-weight: 500; box-shadow: var(--aq-shadow-lg); white-space: nowrap;
}
.toast.on { opacity: 1; transform: none; }
.toast[hidden] { display: none; }
.toast:not(:has(#toast-action:not([hidden]))) { padding-right: 20px; }
.toast button { height: 40px; padding: 0 12px; border-radius: 20px; font-weight: 700; color: var(--aq-blue-100); }
body.aq-dark .toast button { color: var(--aq-accent-strong); }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.legend { display: flex; justify-content: center; gap: 16px; margin-top: 14px; font-size: 12px; font-weight: 500; color: var(--aq-fg-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 5px; }
.legend .lg-all { background: var(--aq-accent); }
.legend .lg-some { background: color-mix(in srgb, var(--aq-accent) 22%, transparent); }
body.aq-dark .legend .lg-some { background: color-mix(in srgb, var(--aq-accent) 38%, transparent); }
.legend .lg-today { box-shadow: inset 0 0 0 2px var(--aq-accent); }
.inflow-cta { margin-top: 24px; }
#fs-cheer:disabled { background: var(--aq-accent-subtle); color: var(--aq-accent-strong); }
#fs-cheer:disabled .i { animation: pop .42s var(--ease-out); }
.done-pill { height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; background: color-mix(in srgb, var(--aq-accent) 14%, transparent); color: var(--aq-accent-strong); font-size: 17px; font-weight: 600; }
.done-pill .i { width: 20px; height: 20px; stroke-width: 2.4; }
.done-pill[hidden] { display: none; }
.btn[hidden], .row-link[hidden] { display: none; }
.empty { padding: 24px 20px 20px; display: grid; justify-items: center; text-align: center; gap: 6px; }
.empty[hidden] { display: none; }
.empty .chip-icon { margin-bottom: 8px; }
.empty-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.empty-copy { font-size: 15px; line-height: 20px; color: var(--aq-fg-muted); margin-bottom: 12px; }
.skel { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 0 16px; }
.skel i { display: block; border-radius: 8px; background: var(--aq-surface-sunken); animation: shimmer 1.2s ease-in-out infinite; }
.skel .s-av { width: 44px; height: 44px; border-radius: 22px; }
.skel .s-lines { flex: 1; display: grid; gap: 8px; }
@keyframes shimmer { 50% { opacity: .45; } }
.add-row { min-height: 56px; font-weight: 600; }
.add-row .i { width: 22px; height: 22px; margin: 0 11px 0 11px; }
#habit-list > li:last-child::before { left: 72px; }
.group-foot[hidden] { display: none; }
.large-title { transition: opacity .15s; }
.screen.scrolled .large-title { opacity: 0; }
body.aq-dark .sheet { background: var(--aq-surface-raised); }
body.aq-dark .sheet .card, body.aq-dark .sheet .stats, body.aq-dark .sheet .cal, body.aq-dark .sheet .field, body.aq-dark .sheet .icon-pick, body.aq-dark .sheet .group, body.aq-dark .sheet .week-lg { background: var(--aq-surface-overlay); }
body.aq-dark .scrim { background: rgba(0, 0, 0, .62); }
.pill-btn { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 15px; font-weight: 600; color: var(--aq-accent-strong); background: color-mix(in srgb, var(--aq-accent) 12%, transparent); position: relative; }
.pill-btn::after { content: ""; position: absolute; inset: -6px -2px; }
.trail { width: 84px; flex: none; }
.trail .row-sub { font-size: 13px; line-height: 16px; }
.toolbar[hidden] { display: none; }
.empty { margin-top: 24px; padding: 32px 20px; }
.crew-avatars .avatar.sk { background: var(--aq-surface-sunken); }
