/* TTA Assistant: a phone-first design.
   Colours are tokens below, with a dark set. Motion is off when the phone asks for less. */

:root {
  --bg: #f4f5fa;
  --bg-2: #eceef6;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --ink: #141a2b;
  --muted: #5d6579;
  --line: #e2e5ef;
  --brand: #3b3fd8;
  --brand-ink: #ffffff;
  --brand-soft: #e8e9ff;
  --now: #d93a2b;
  --now-soft: #fde9e6;
  --today: #b26b00;
  --today-soft: #fff1d9;
  --upcoming: #2463c2;
  --upcoming-soft: #e3eefc;
  --ok: #138a52;
  --ok-soft: #dcf5e8;
  --bubble-out: #e3f2e8;
  --shadow: 0 1px 2px rgb(20 26 43 / 6%), 0 6px 20px rgb(20 26 43 / 6%);
  --shadow-lift: 0 2px 4px rgb(20 26 43 / 8%), 0 14px 34px rgb(20 26 43 / 12%);
  --hero-1: #4338ca;
  --hero-2: #7c3aed;
  --hero-3: #0ea5b7;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e16;
    --bg-2: #121624;
    --surface: #161b29;
    --surface-2: #1c2233;
    --ink: #edf0f7;
    --muted: #9aa3b8;
    --line: #262d40;
    --brand: #8b8ffb;
    --brand-ink: #0b0e16;
    --brand-soft: #23264a;
    --now: #ff8a7a;
    --now-soft: #3a1d1a;
    --today: #f5c058;
    --today-soft: #33280f;
    --upcoming: #86b6f5;
    --upcoming-soft: #172a45;
    --ok: #6fdba3;
    --ok-soft: #143326;
    --bubble-out: #1c3426;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / 35%), 0 16px 40px rgb(0 0 0 / 40%);
    --hero-1: #3730a3;
    --hero-2: #6d28d9;
    --hero-3: #0e7490;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 110% -10%, var(--brand-soft), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Nirmala UI", "Noto Sans Bengali", sans-serif;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 28px;
  outline: none;
}

h1 { font-size: 1.6rem; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 1.05rem; margin: 0; letter-spacing: -.01em; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 26px 2px 10px; }
p { margin: 0 0 8px; }
a { color: inherit; }
.muted { color: var(--muted); font-size: .9rem; }
.center { text-align: center; }
.hint { font-size: .8rem; opacity: .8; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Buttons and fields ---------- */

button, select, input, textarea { font: inherit; color: inherit; }

button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s, border-color .2s, box-shadow .2s;
}
button:hover { border-color: var(--muted); }
button:active { transform: scale(.96); }
button.primary {
  background: var(--brand);
  border-color: transparent;
  color: var(--brand-ink);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent);
}
button.ghost { background: transparent; }
button.wide { width: 100%; }
button:disabled { opacity: .55; cursor: not-allowed; }
.with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.with-icon .icon { width: 1.15em; height: 1.15em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }

textarea, input, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}
textarea { min-height: 110px; resize: vertical; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 650; margin-bottom: 6px; }
.field .help { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.button-row button { flex: 1 1 auto; }
.error { color: var(--now); font-size: .92rem; }
.error:empty { display: none; }

/* ---------- Banner and toast ---------- */

#banner:empty { display: none; }
.notice {
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  font-size: .82rem;
  text-align: center;
  background: var(--today-soft);
  color: var(--today);
  font-weight: 650;
}
.notice + .notice { padding-top: 8px; }
.notice.bad { background: var(--now-soft); color: var(--now); }
#banner:not(:empty) + main { padding-top: 14px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  color: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(12px);
  transform: translate(-50%, 24px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s var(--spring), opacity .2s;
  z-index: 30;
}
#toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; pointer-events: auto; }
#toast span { flex: 1; font-size: .92rem; }
#toast .icon { color: var(--ok); }
#toast button { background: transparent; color: inherit; border-color: transparent; font-weight: 750; box-shadow: none; }

/* ---------- Bottom bar ---------- */

#nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 2px;
  padding: 6px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  z-index: 20;
}
#nav a {
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
  transition: color .2s, background-color .25s var(--ease);
}
#nav a .nav-icon { position: relative; display: grid; place-items: center; transition: transform .3s var(--spring); }
#nav a .icon { width: 22px; height: 22px; }
#nav a.active { color: var(--brand); background: var(--brand-soft); }
#nav a.active .nav-icon { transform: translateY(-1px) scale(1.08); }
#nav a:active .nav-icon { transform: scale(.88); }
#nav .nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.badge {
  position: absolute;
  top: -5px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--now);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  animation: pop .4s var(--spring);
}
body.logged-out #nav { display: none; }

/* ---------- Headers ---------- */

.home-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 6px 2px 16px; }
.eyebrow { font-size: .8rem; font-weight: 650; color: var(--muted); margin-bottom: 3px; }
.sync-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: .75rem;
  font-weight: 650;
  color: var(--muted);
}
.sync-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.sync-pill.ok .dot { animation: breathe 2.4s ease-in-out infinite; }
.sync-pill.bad .dot { background: var(--now); }
.sync-pill.off .dot { background: var(--today); }

.screen-title { display: flex; align-items: center; gap: 14px; margin: 6px 2px 18px; }
.screen-title .muted { margin: 3px 0 0; }
.title-icon, .item-title .card-icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--hero-2) 35%, transparent);
}
.title-icon .icon { width: 24px; height: 24px; }
.item-title { display: flex; align-items: center; gap: 14px; margin: 4px 2px 16px; }
.item-title .card-icon { box-shadow: none; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 8px -6px;
  padding: 8px 12px 8px 6px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--brand);
  font-weight: 650;
}
.back:active { background: var(--brand-soft); }

/* ---------- Do next ---------- */

.next-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 18px;
  margin-bottom: 14px;
  border-radius: 24px;
  color: #fff;
  background: var(--hero-1);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--hero-2) 30%, transparent);
}
.aurora {
  position: absolute;
  inset: -40%;
  z-index: -1;
  background:
    radial-gradient(40% 40% at 20% 30%, var(--hero-2), transparent 70%),
    radial-gradient(35% 35% at 80% 20%, var(--hero-3), transparent 70%),
    radial-gradient(45% 45% at 60% 80%, #db2777, transparent 70%),
    linear-gradient(135deg, var(--hero-1), var(--hero-2));
  animation: drift 16s ease-in-out infinite alternate;
  opacity: .95;
}
.next-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(255 255 255 / 4%), rgb(0 0 0 / 18%));
}
.next-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 16%);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.next-label .icon { animation: twinkle 3s ease-in-out infinite; }
.next-first { display: flex; align-items: center; gap: 14px; margin: 14px 0 12px; text-decoration: none; }
.next-icon {
  flex: none;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgb(255 255 255 / 18%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 25%);
  animation: float 4s ease-in-out infinite;
}
.next-icon .icon { width: 28px; height: 28px; }
.next-title { font-size: 1.35rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.next-action { font-size: .98rem; opacity: .92; margin-top: 2px; }
.why { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; }
.why li {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(0 0 0 / 18%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%);
  font-size: .78rem;
  font-weight: 600;
}
.next-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.next-buttons button { flex: 1 1 auto; border-color: rgb(255 255 255 / 30%); color: #fff; background: rgb(255 255 255 / 10%); box-shadow: none; }
.next-buttons button.primary { background: #fff; color: var(--hero-1); border-color: #fff; flex-grow: 2; }
.next-rest { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid rgb(255 255 255 / 18%); }
.next-rest a { display: flex; align-items: center; gap: 10px; padding: 8px 2px; text-decoration: none; border-radius: 12px; }
.next-rest a:active { background: rgb(255 255 255 / 10%); }
.rank {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 20%);
  font-size: .75rem;
  font-weight: 800;
}
.rest-icon { flex: none; opacity: .9; display: grid; }
.rest-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rest-text strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rest-text span { font-size: .8rem; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-rest .chevron { opacity: .7; }
.next-more { margin: 8px 2px 0; font-size: .8rem; opacity: .85; }
.next-clear { display: flex; align-items: center; gap: 14px; }
.next-clear h2 { font-size: 1.3rem; }
.next-clear p { margin: 2px 0 0; opacity: .9; font-size: .92rem; }
.clear-mark { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / 18%); }
.clear-mark .icon { width: 32px; height: 32px; stroke-dasharray: 80; animation: draw 1s var(--ease) both .2s; }

/* ---------- Lane tiles and strips ---------- */

.lane-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.lane-index a {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease);
}
.lane-index a:active { transform: scale(.96); }
.tile-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 8px; }
.lane-index strong { font-size: 1.7rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.lane-index span:last-child { font-size: .8rem; color: var(--muted); font-weight: 600; margin-top: 3px; }
.lane-index .now .tile-icon { background: var(--now-soft); color: var(--now); }
.lane-index .today .tile-icon { background: var(--today-soft); color: var(--today); }
.lane-index .upcoming .tile-icon { background: var(--upcoming-soft); color: var(--upcoming); }
.lane-index .now strong { color: var(--now); }

.strip, .cover-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--upcoming-soft);
  color: var(--upcoming);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.strip span { flex: 1; }
.strip.warm { background: var(--today-soft); color: var(--today); }
.strip .chevron { opacity: .6; }

.latest {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 550;
}
.latest small { display: block; color: var(--muted); font-weight: 600; margin-bottom: 2px; font-size: .78rem; }
.latest-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }

/* ---------- Lanes and cards ---------- */

.lane { margin: 22px 0 8px; scroll-margin-top: 12px; }
.lane-title { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; }
.lane-icon { display: grid; }
.lane-title.now { color: var(--now); }
.lane-title.today { color: var(--today); }
.lane-title.upcoming { color: var(--upcoming); }
.lane-title h2 { color: var(--ink); }
.count {
  min-width: 24px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
  text-align: center;
}
.empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.empty .icon { color: var(--ok); }

.card {
  --dx: 0px;
  position: relative;
  margin-bottom: 12px;
  border-radius: var(--radius);
  touch-action: pan-y;
  transition: opacity .28s var(--ease), transform .28s var(--ease), margin .28s var(--ease), max-height .28s var(--ease);
  max-height: 900px;
}
.card-inner {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: translateX(var(--dx));
  transition: transform .35s var(--spring), box-shadow .2s;
}
.card.swiping .card-inner { transition: none; box-shadow: var(--shadow-lift); }
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  z-index: 1;
  transform: translateX(var(--dx));
  transition: transform .35s var(--spring);
}
.card.swiping::before { transition: none; }
.card.now::before { background: var(--now); }
.card.today::before { background: var(--today); }
.card.upcoming::before { background: var(--upcoming); }
.swipe-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 22px;
  border-radius: var(--radius);
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 750;
  opacity: 0;
  transition: opacity .2s, background-color .2s, color .2s;
}
.swipe-hint .icon { width: 26px; height: 26px; transition: transform .3s var(--spring); }
.card.swiping .swipe-hint { opacity: 1; }
.card.armed .swipe-hint { background: var(--ok); color: #fff; }
.card.armed .swipe-hint .icon { transform: scale(1.2); }
.card.leaving { opacity: 0; transform: translateX(40px) scale(.97); max-height: 0; margin-bottom: 0; overflow: hidden; }
.card.leaving .swipe-hint { opacity: 1; background: var(--ok); color: #fff; }

.card-body { display: flex; gap: 12px; padding: 14px 14px 10px 16px; text-decoration: none; overflow-wrap: anywhere; }
.card-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; }
.card-icon.now { background: var(--now-soft); color: var(--now); }
.card-icon.today { background: var(--today-soft); color: var(--today); }
.card-icon.upcoming { background: var(--upcoming-soft); color: var(--upcoming); }
.card-text { flex: 1; min-width: 0; }
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card-name { font-weight: 700; }
.card-time { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.card-time .icon { width: 13px; height: 13px; }
.card-reason { font-size: .88rem; font-weight: 600; margin-top: 2px; color: var(--muted); }
.card-summary { font-size: .92rem; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.card-name.unread::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--now); vertical-align: middle; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
}
.tag .icon { width: 12px; height: 12px; }
.tag.level { background: var(--now-soft); color: var(--now); }
.tag.cover { background: var(--upcoming-soft); color: var(--upcoming); }

.actions { display: flex; gap: 6px; padding: 0 10px 10px; }
.actions button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 6px 4px;
  font-size: .8rem;
  border-color: transparent;
  background: var(--surface-2);
  border-radius: 12px;
  white-space: nowrap;
}
.actions button.done { background: var(--ok-soft); color: var(--ok); }
.actions .with-icon { gap: 5px; }
.snooze-options { display: flex; gap: 6px; padding: 0 10px 12px; animation: rise .25s var(--ease); }
.snooze-options button { flex: 1 1 0; font-size: .82rem; padding: 8px 4px; }

/* ---------- Panels and rows ---------- */

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.panel.feature { background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); }
.panel-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.panel-label .icon { width: 15px; height: 15px; }
.panel .button-row { margin-top: 10px; }
.panel details { margin-top: 10px; }
details summary { cursor: pointer; min-height: 44px; padding: 11px 0; font-weight: 650; color: var(--brand); }
.panel form button { margin-top: 8px; }
form > button.primary[type="submit"] { width: 100%; margin-top: 4px; }
.snooze-row { margin-top: 8px; }

.brief-headline { font-size: 1.15rem; font-weight: 700; margin: 12px 0 16px; letter-spacing: -.01em; }
.brief-warning { border-radius: var(--radius-sm); margin-bottom: 12px; }
.brief-section { margin-bottom: 22px; }
.brief-list { padding-top: 4px; padding-bottom: 4px; }
.brief-entry { display: block; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; overflow-wrap: anywhere; }
.brief-entry:first-child { border-top: 0; }
.brief-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform .2s var(--ease);
}
.brief-row:active { transform: scale(.98); }
.row-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--brand-soft); color: var(--brand); }
.row-icon.morning { background: var(--today-soft); color: var(--today); }
.row-icon.evening { background: var(--upcoming-soft); color: var(--upcoming); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.brief-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.brief-pick {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  min-height: 112px;
  border-radius: var(--radius);
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease);
}
.brief-pick:active { transform: scale(.97); }
.brief-pick .icon { width: 28px; height: 28px; margin-bottom: auto; }
.brief-pick span { font-size: .8rem; opacity: .9; }
.brief-pick.morning { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.brief-pick.morning .icon { animation: spin-slow 18s linear infinite; }
.brief-pick.evening { background: linear-gradient(135deg, #312e81, #7c3aed); }

.note-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 8px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-row button { flex: none; font-size: .85rem; }
.cover-limit { margin-top: 14px; }
.handover-text { min-height: 240px; margin-top: 8px; }

/* ---------- Delegate ---------- */

.ladder { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ladder li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: .8rem;
  font-weight: 600;
}
.ladder .icon { color: var(--brand); }
.delegation-head { display: flex; gap: 12px; align-items: flex-start; }
.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hero-3), var(--hero-1));
  color: #fff;
  font-weight: 800;
}
.delegation.missed .avatar { background: linear-gradient(135deg, #f97316, var(--now)); }
.delegation.done .avatar, .delegation.taken_back .avatar { background: var(--bg-2); color: var(--muted); }
.delegation-title { font-weight: 700; overflow-wrap: anywhere; }
.delegation-title a { text-decoration: none; }
.delegation-who { font-size: .88rem; color: var(--muted); font-weight: 550; margin-top: 2px; }
.delegation-note { font-size: .9rem; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.staff-message { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.staff-message textarea { min-height: 0; margin-bottom: 8px; resize: none; background: var(--surface-2); }

/* ---------- Team and person picker ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.person-picker { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.person-picker legend { font-weight: 650; margin-bottom: 8px; padding: 0; }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.person-chip { position: relative; display: block; min-width: 0; cursor: pointer; }
.person-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: border-color .2s, background-color .2s, transform .2s var(--spring);
}
.chip-body .avatar { width: 34px; height: 34px; font-size: .9rem; }
.avatar.add { background: var(--bg-2); color: var(--brand); font-size: 1.2rem; }
.chip-text { min-width: 0; display: flex; flex-direction: column; }
.chip-text strong { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-text span { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-chip input:checked + .chip-body { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.02); }
.person-chip input:focus-visible + .chip-body { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }
.new-person { display: grid; gap: 8px; margin-top: 10px; animation: rise .25s var(--ease); }

.person-text { min-width: 0; }
.person-text .tag { margin-left: 8px; vertical-align: middle; }
.person-stats { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.person-stats.warn { color: var(--now); font-weight: 600; }
.hidden-person { opacity: .7; }
.add-person > summary { display: flex; align-items: center; min-height: 28px; }
.add-person form { margin-top: 12px; }

/* ---------- Ask (chat), memory and reply status ---------- */

.chat-thread { margin-bottom: 12px; }
.chat-thread .bubble { max-width: 90%; }
.chat-form {
  position: sticky;
  bottom: calc(86px + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.chat-form textarea { flex: 1; min-height: 44px; max-height: 140px; border-radius: 16px; resize: none; }
.chat-form button { flex: none; width: 44px; height: 44px; padding: 0; }
.starters { display: grid; gap: 8px; margin-bottom: 14px; }
.starters button { text-align: left; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); border-color: transparent; }
.bubble.thinking { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.bubble.thinking span:not(.sr-only) { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1.1s ease-in-out infinite; }
.bubble.thinking span:nth-child(2) { animation-delay: .15s; }
.bubble.thinking span:nth-child(3) { animation-delay: .3s; }
.steps { margin: 8px 0 10px; padding-left: 20px; }
.steps li { margin-bottom: 4px; }
.reply-status { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--upcoming-soft); }
.reply-status.ok { background: var(--ok-soft); }
.reply-status.warn { background: var(--today-soft); }
.reply-status button { margin-top: 8px; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---------- Item detail ---------- */

.thread { display: flex; flex-direction: column; gap: 8px; }
.bubble {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 18px 18px 18px 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  align-self: flex-start;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.bubble.out { align-self: flex-end; background: var(--bubble-out); border-radius: 18px 18px 6px 18px; }
.bubble time { display: block; font-size: .72rem; color: var(--muted); margin-top: 3px; }
.nudge-row { padding: 9px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.nudge-row:first-of-type { border-top: 0; }

/* ---------- Sign in ---------- */

.login-hero { text-align: center; margin: 9vh 0 22px; }
.login-hero h1 { margin-top: 18px; }
.login-hero .muted { margin-top: 6px; }
.logo-mark {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 84px;
  height: 84px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 28px;
  color: #fff;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--hero-2) 40%, transparent);
  animation: float 5s ease-in-out infinite;
}
.logo-mark .icon { width: 40px; height: 40px; }
.login-panel { padding: 20px; }

/* ---------- Loading ---------- */

.skeleton-screen { padding-top: 8px; }
.skeleton {
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--surface) 50%, var(--bg-2) 100%);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
}
.skeleton.line { height: 16px; width: 70%; border-radius: 8px; }
.skeleton.line.short { width: 40%; height: 12px; }
.skeleton.hero { height: 190px; border-radius: 24px; }
.skeleton.tiles { height: 92px; }
.skeleton.card { height: 120px; }

.demo-panel .button-row button { font-size: .85rem; }

/* ---------- Motion ---------- */

.entering > * { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.entering .card { animation: rise .5s var(--ease) both; animation-delay: calc(240ms + var(--i, 0) * 45ms); }
.entering .next-card { animation: rise-scale .6s var(--ease) both; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise-scale { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(6%, -4%) rotate(20deg) scale(1.08); }
  100% { transform: translate(-6%, 5%) rotate(-12deg) scale(1.02); }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.18) rotate(12deg); opacity: .8; } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes draw { from { stroke-dashoffset: 80; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes spin-slow { to { transform: rotate(360deg); } }

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

@media (min-width: 700px) {
  main { padding-top: 28px; }
  .next-title { font-size: 1.55rem; }
}

/* ---------- Tasks, history, search, activity, AI note ---------- */

.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.quick-row button { background: var(--surface); border-color: transparent; box-shadow: var(--shadow); border-radius: var(--radius-sm); }
.ai-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: .86rem; color: var(--brand); font-weight: 550; }
.ai-note .icon { width: 15px; height: 15px; margin-top: 2px; }
.history-row { display: flex; align-items: center; gap: 10px; }
.history-row .row-text { text-decoration: none; }
.history-row button { flex: none; font-size: .85rem; }
.activity-row { display: flex; flex-direction: column; gap: 1px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; font-size: .92rem; overflow-wrap: anywhere; }
.activity-row:first-child { border-top: 0; }

/* ---------- Lock screen ---------- */

.lock-hero { text-align: center; margin: 7vh 0 18px; }
.lock-hero h1 { margin-top: 14px; }
.lock-hero .muted { margin-top: 6px; }
.logo-mark.small { width: 64px; height: 64px; border-radius: 22px; }
.logo-mark.small .icon { width: 30px; height: 30px; }
.pin-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pin-dots { display: flex; gap: 14px; min-height: 18px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); transition: background-color .15s, transform .15s var(--spring); }
.pin-dots span.on { background: var(--brand); border-color: var(--brand); transform: scale(1.1); }
.pin-dots.shake { animation: shake .4s; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; justify-content: center; }
.pin-key {
  width: 76px; height: 76px; border-radius: 50%; padding: 0;
  font-size: 1.6rem; font-weight: 600; background: var(--surface); box-shadow: var(--shadow); border-color: transparent;
  display: grid; place-items: center;
}
.pin-key.ghost, .pin-key.ok { background: transparent; box-shadow: none; font-size: 1rem; }
.pin-key .icon { width: 28px; height: 28px; }
.pin-pad > span { width: 76px; }
.lock-actions { display: grid; gap: 10px; max-width: 360px; margin: 0 auto; }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }

/* ---------- Alarm ---------- */

.alarm-overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--now) 22%, rgb(0 0 0 / 70%)); backdrop-filter: blur(6px);
  animation: rise .25s var(--ease);
}
.alarm-card { width: min(420px, 100%); padding: 26px 20px 20px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-lift); text-align: center; }
.alarm-card h2 { font-size: 1.4rem; margin: 14px 0 6px; }
.alarm-card p { font-size: 1.02rem; }
.alarm-bell { width: 84px; height: 84px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--now-soft); color: var(--now); animation: ringing 1.1s ease-in-out infinite; }
.alarm-bell .icon { width: 42px; height: 42px; }
.alarm-actions { display: grid; gap: 10px; margin-top: 18px; }
@keyframes ringing { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } 50% { transform: rotate(0); } }

/* ---------- Today's three, picking, habits ---------- */

.three-card .panel-label .icon { color: var(--brand); }
.three-list { list-style: none; margin: 4px 0 8px; padding: 0; }
.three-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.three-list li:first-child { border-top: 0; }
.three-list li a { flex: 1; min-width: 0; text-decoration: none; font-weight: 650; overflow-wrap: anywhere; }
.three-list li.done a { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.tick { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; color: var(--brand); box-shadow: none; }
.tick .icon { width: 26px; height: 26px; }
.three-list li.done .tick { color: var(--ok); }
.ok-note { color: var(--ok); font-weight: 650; margin: 6px 0 0; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; }
.pick-row:first-child { border-top: 0; }
.pick-row .row-text { flex: 1; min-width: 0; text-decoration: none; overflow-wrap: anywhere; }
.pick-row button { flex: none; font-size: .85rem; min-height: 40px; }
.pick-row .rank { background: var(--brand-soft); color: var(--brand); }
.row-icon.ok { background: var(--ok-soft); color: var(--ok); }
.row-icon.now { background: var(--now-soft); color: var(--now); }
.row-icon.today { background: var(--today-soft); color: var(--today); }
.habit-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.habit-row:first-child { border-top: 0; }
.habit-tick { flex: none; width: 48px; height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.habit-tick.on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.habit-tick .icon { width: 26px; height: 26px; }
.week-dots { display: flex; gap: 5px; margin-top: 5px; }
.week-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-2); }
.week-dots span.on { background: var(--ok); }
.streak { flex: none; display: inline-flex; align-items: center; gap: 2px; font-weight: 800; color: var(--today); }
.streak .icon { width: 18px; height: 18px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.inline-form > button, form.inline-form > button.primary[type="submit"] { flex: 0 0 auto; width: auto; margin-top: 0; }
.inline-form.wrap { flex-wrap: wrap; margin: 8px 0; }
.inline-form.wrap input { flex: 1 1 140px; }
.steps-list { padding-left: 22px; margin: 0; }
.steps-list > li { margin-bottom: 18px; }
.steps-list > li > strong { display: block; margin-bottom: 8px; }

/* ---------- Review, matrix, chips ---------- */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat { padding: 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat strong { font-size: 1.6rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.panel.tip ul { margin: 6px 0 0; padding-left: 20px; }
.panel.tip li { margin-bottom: 4px; }
.matrix-map { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.matrix-cell { display: flex; flex-direction: column; padding: 12px; min-height: 96px; border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.matrix-cell strong { font-size: 1.6rem; line-height: 1; }
.matrix-cell span { font-weight: 700; margin-top: 6px; }
.matrix-cell small { font-size: .74rem; opacity: .85; }
.matrix-cell.do { background: var(--now-soft); color: var(--now); }
.matrix-cell.schedule { background: var(--upcoming-soft); color: var(--upcoming); }
.matrix-cell.delegate { background: var(--today-soft); color: var(--today); }
.matrix-cell.drop { background: var(--bg-2); color: var(--muted); }
.matrix-section { scroll-margin-top: 12px; margin-bottom: 10px; }
.matrix-section.do .lane-icon { color: var(--now); }
.matrix-section.schedule .lane-icon { color: var(--upcoming); }
.matrix-section.delegate .lane-icon { color: var(--today); }
.matrix-section.drop .lane-icon { color: var(--muted); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; cursor: pointer; }
.chip.on, .chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.chip input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--brand); }
.chip .icon { width: 18px; height: 18px; }
.linkish { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--brand); font-weight: 650; box-shadow: none; }
.button-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.check-line { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.check-line input { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Focus ---------- */

.focus-face { position: relative; width: min(270px, 78vw); aspect-ratio: 1; margin: 6px auto 10px; }
.focus-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.focus-ring circle { fill: none; stroke-width: 8; }
.focus-ring .track { stroke: var(--bg-2); }
.focus-ring .bar { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.focus-ring.break .bar, .focus-ring.long_break .bar { stroke: var(--ok); }
.focus-face.idle .bar { stroke: var(--line); }
.focus-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 30px; }
.focus-kind { font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.focus-clock { font-size: 3.2rem; line-height: 1.1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.focus-label { font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.frog-note { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--today-soft); color: var(--today); font-weight: 650; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .75rem; color: var(--muted); }
.bar-box { width: 100%; height: 70px; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 60%; min-height: 3px; height: var(--h); border-radius: 6px 6px 2px 2px; background: var(--brand); }
.focus-strip { background: var(--brand-soft); color: var(--brand); }
.focus-strip strong { font-variant-numeric: tabular-nums; }

/* ---------- Connections, setup, menus, + button ---------- */

.connection-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.connection-head .row-text { gap: 6px; align-items: flex-start; }
.connection .sync-pill { align-self: flex-start; }
.steps-panel summary { color: var(--brand); }
.steps-panel .steps li { margin-bottom: 8px; }
code.copyable { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); font-size: .82rem; overflow-wrap: anywhere; user-select: all; }
.setup-list { list-style: none; margin: 4px 0; padding: 0; }
.setup-list li { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.setup-list li .icon { color: var(--brand); }
.setup-list li.done { color: var(--muted); text-decoration: line-through; }
.setup-list li.done .icon { color: var(--ok); }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.menu-tile { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); text-decoration: none; font-weight: 650; font-size: .9rem; }
.menu-tile .row-icon { width: 34px; height: 34px; border-radius: 11px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-link { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.fab {
  position: fixed; right: max(16px, calc(50vw - 304px)); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 15;
  width: 58px; height: 58px; padding: 0; border-radius: 20px; border: 0;
  display: grid; place-items: center; background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 45%, transparent);
}
.fab .icon { width: 28px; height: 28px; stroke-width: 2.5; }
main:has(.fab) { padding-bottom: 96px; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgb(0 0 0 / 40%); animation: rise .2s var(--ease); }
.sheet { width: min(560px, 100%); padding: 10px 14px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--surface); box-shadow: var(--shadow-lift); }
.sheet-handle { width: 42px; height: 5px; margin: 2px auto 10px; border-radius: 3px; background: var(--line); }
.sheet-option { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 6px; min-height: 62px; border: 0; border-radius: var(--radius-sm); background: transparent; text-align: left; box-shadow: none; }
.sheet-option:active { background: var(--bg-2); }
.sheet-option .row-text { display: flex; flex-direction: column; }

.home-header { display: block; }
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.home-top .eyebrow { margin: 0; }
.lock-help { margin-top: 28px; }
