/* =========================================================================
   Yoke — Nevill's Chapel Missionary Baptist Church
   Vanilla CSS. System fonts only (works offline / behind a private tunnel).

   Design notes
   ------------
   The name "Yoke" comes from Matthew 11:30 — "my yoke is easy". A yoke joins
   two oxen so a load is carried together; this is a two-person shared task
   app, so the whole interface leans on that idea of paired, shared work.
   Royal blue is the primary/action colour (calm, trustworthy); the brand red
   is reserved strictly for priority + overdue + alerts so it always means
   "this needs you". Generous spacing, soft rounded cards, large legible type
   for a pastor reading on a phone.
   ========================================================================= */

:root {
  /* Brand palette */
  --red:        #E62631;
  --blue:       #3E7FE3;
  --blue-deep:  #2F66BE;
  --white:      #FFFFFF;
  --soft-blue:  #7FB0E6;
  --peach:      #E89B96;
  --ink:        #1F2733;
  --muted:      #6B7480;
  --surface:    #F5F7FA;

  /* Semantic tokens (light) */
  --bg:           var(--surface);
  --bg-elevated:  var(--white);
  --text:         var(--ink);
  --text-muted:   var(--muted);
  --text-invert:  var(--white);
  --line:         #E2E7EE;
  --line-strong:  #CDD5E0;
  --accent:       var(--blue);
  --accent-press: var(--blue-deep);
  --alert:        var(--red);
  --field-bg:     var(--white);

  /* Tints used for chips / pills / soft fills */
  --blue-tint:    #EAF1FC;
  --red-tint:     #FCEAEB;
  --green:        #2E9E6B;
  --green-tint:   #E7F4EE;
  --amber:        #C98A00;
  --amber-tint:   #FAF1DC;

  /* Spacing scale (4 / 8 / 12 / 16 / 24 / 32 / 48) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px;

  /* Radii */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(31, 39, 51, .06), 0 1px 3px rgba(31, 39, 51, .05);
  --shadow-md: 0 4px 14px rgba(31, 39, 51, .08), 0 2px 6px rgba(31, 39, 51, .05);
  --shadow-lg: 0 14px 40px rgba(31, 39, 51, .18);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;

  /* Safe-area aware layout metrics */
  --nav-h: 64px;
  --header-h: 56px;
  --sidebar-w: 248px;
  --content-max: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #11151C;
    --bg-elevated:  #1A2029;
    --text:         #EDF1F6;
    --text-muted:   #97A1AE;
    --line:         #29313D;
    --line-strong:  #38424F;
    --accent:       #5B95EA;
    --accent-press: #7FB0E6;
    --field-bg:     #232B36;
    --blue-tint:    #1C2A40;
    --red-tint:     #3A2226;
    --green:        #4FB985;
    --green-tint:   #1B2E27;
    --amber:        #E0A93B;
    --amber-tint:   #322A18;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 4px 14px rgba(0,0,0,.45);
    --shadow-lg: 0 14px 40px rgba(0,0,0,.6);
  }
}

/* ----------------------------------------------------------------- reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
h1, h2, h3, p { margin: 0; }

/* Shared eyebrow label — the small uppercase section markers. */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================= app frame */
.app-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--s3);
  height: var(--header-h);
  padding: 0 var(--s4);
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-header__brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 800;
  letter-spacing: -.01em;
  font-size: 18px;
  color: var(--text);
}
.app-header__brand img { width: 28px; height: 28px; border-radius: 7px; }
.app-header__title { line-height: 1; }
.app-header__sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-muted);
}
.app-header__spacer { flex: 1; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--r-md);
}
.icon-btn:hover { background: var(--blue-tint); color: var(--accent); }
.icon-btn svg { width: 24px; height: 24px; }

/* main scroll area */
.view {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--s5) var(--s4) var(--s6);
}

/* ====================================================== bottom nav (mobile) */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  padding-top: 6px;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--accent);
}
.tab__badge {
  position: absolute;
  top: 4px;
  left: calc(50% + 6px);
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--alert);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg-elevated);
}

/* ============================================================ desktop ≥768 */
@media (min-width: 768px) {
  .app-shell {
    grid-template-rows: 1fr;
    grid-template-columns: var(--sidebar-w) 1fr;
    padding-bottom: 0;
  }
  .app-header { display: none; }
  .tabbar {
    position: sticky;
    top: 0;
    height: 100vh;
    grid-template-columns: none;
    grid-auto-rows: max-content;
    align-content: start;
    gap: var(--s1);
    padding: var(--s5) var(--s3);
    border-top: none;
    border-right: 1px solid var(--line);
    backdrop-filter: none;
    background: var(--bg-elevated);
  }
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s2) var(--s3) var(--s5);
  }
  .sidebar-brand img { width: 38px; height: 38px; border-radius: 9px; }
  .sidebar-brand b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
  .sidebar-brand span { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); }
  .tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--s3);
    height: 48px;
    padding: 0 var(--s3);
    font-size: 15px;
    border-radius: var(--r-md);
  }
  .tab[aria-current="page"] { background: var(--blue-tint); }
  .tab[aria-current="page"]::before { display: none; }
  .tab__badge { position: static; margin-left: auto; box-shadow: none; }
  .sidebar-foot { margin-top: auto; padding: var(--s3); }
  .view { padding: var(--s7) var(--s6) var(--s7); }
}
/* hide desktop-only sidebar pieces on mobile */
.sidebar-brand, .sidebar-foot { display: none; }
@media (min-width: 768px) { .sidebar-brand { display: flex; } .sidebar-foot { display: block; } }

/* ============================================================= typography */
.screen-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.greeting { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.greeting em { font-style: normal; color: var(--accent); }
.lede { color: var(--text-muted); font-size: 15px; margin-top: var(--s1); }

.section { margin-top: var(--s6); }
.section:first-of-type { margin-top: var(--s5); }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s3);
}
.section__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ================================================================== cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.stack { display: flex; flex-direction: column; gap: var(--s3); }

/* Task card */
.task {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .05s ease, border-color .15s ease;
}
.task:hover { box-shadow: var(--shadow-md); }
.task:active { transform: scale(.997); }
.task.is-high { border-left: 4px solid var(--alert); padding-left: calc(var(--s4) - 3px); }
.task.is-done { opacity: .62; }
.task.is-done .task__title { text-decoration: line-through; text-decoration-color: var(--line-strong); }

/* round one-tap complete checkbox */
.check {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  flex: none;
  width: 28px; height: 28px;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  display: inline-grid;
  place-items: center;
  transition: background .12s ease, border-color .12s ease;
}
.check::after {
  content: "";
  width: 14px; height: 8px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform .12s ease;
}
.check:checked { background: var(--green); border-color: var(--green); }
.check:checked::after { transform: rotate(-45deg) translateY(-1px) scale(1); }
.check:hover { border-color: var(--green); }

.task__main { min-width: 0; }
.task__title {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
  word-break: break-word;
}
.task__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  margin-top: var(--s2);
  font-size: 13px;
  color: var(--text-muted);
}
.task__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.task__aside { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2); }

/* due date */
.due { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.due svg { width: 14px; height: 14px; }
.due.is-overdue { color: var(--alert); }

/* priority flag */
.flag { display: inline-flex; align-items: center; gap: 4px; color: var(--alert); font-weight: 700; }
.flag svg { width: 14px; height: 14px; }

/* status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--todo { color: var(--text-muted); background: var(--line); }
.pill--in_progress { color: var(--amber); background: var(--amber-tint); }
.pill--done { color: var(--green); background: var(--green-tint); }

/* avatars */
.avatar {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  object-fit: cover;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.avatar--them { background: var(--peach); color: #5a2b27; }
.avatar--shared { background: var(--soft-blue); color: #fff; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }

/* assignee mini label */
.who { display: inline-flex; align-items: center; gap: 6px; }
.who .avatar { width: 22px; height: 22px; font-size: 10px; }

/* ============================================================ filter chips */
.chips {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  padding-bottom: var(--s2);
  margin: 0 calc(-1 * var(--s4)) var(--s4);
  padding-left: var(--s4);
  padding-right: var(--s4);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  transition: all .12s ease;
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
@media (min-width: 768px) { .chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } }

/* ================================================================ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s5);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-elevated);
  border-color: var(--line-strong);
  transition: transform .05s ease, background .12s ease, box-shadow .12s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn--primary { background: var(--accent); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-press); }
.btn--danger { background: transparent; color: var(--alert); border-color: color-mix(in srgb, var(--alert) 35%, transparent); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: 17px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Google sign-in button uses brand-neutral white per Google guidelines */
.btn--google {
  background: var(--white);
  color: #1f1f1f;
  border-color: #DADCE0;
  box-shadow: var(--shadow-sm);
}
.btn--google svg { width: 20px; height: 20px; }

/* Floating action button (Tasks) */
.fab {
  position: fixed;
  right: max(var(--s5), env(safe-area-inset-right));
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--s4));
  z-index: 25;
  width: 60px; height: 60px;
  border-radius: 20px;
  border: none;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-lg);
  display: inline-grid;
  place-items: center;
}
.fab svg { width: 30px; height: 30px; }
.fab:hover { background: var(--accent-press); }
@media (min-width: 768px) { .fab { right: var(--s7); bottom: var(--s7); } }

/* ============================================================ empty states */
.empty {
  text-align: center;
  padding: var(--s6) var(--s4);
  color: var(--text-muted);
}
.empty img { width: 84px; height: 84px; opacity: .9; margin-bottom: var(--s3); }
.empty h3 { font-size: 18px; color: var(--text); font-weight: 750; }
.empty p { margin-top: var(--s2); font-size: 14px; max-width: 34ch; margin-inline: auto; }

/* ========================================================= recent activity */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3);
  align-items: start;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
}
.feed-item:last-child { border-bottom: none; }
.feed-item__body { font-size: 15px; line-height: 1.4; }
.feed-item__body b { font-weight: 750; }
.feed-item__verb { color: var(--text-muted); }
.feed-item__time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.feed-item__icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue-tint);
  color: var(--accent);
}
.feed-item__icon svg { width: 18px; height: 18px; }
.feed-item__icon.is-alert { background: var(--red-tint); color: var(--alert); }
.feed-item__icon.is-done  { background: var(--green-tint); color: var(--green); }

/* ============================================================ task detail */
.detail-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-weight: 600; margin-bottom: var(--s4); background: none; border: none; padding: 0; }
.detail-back svg { width: 18px; height: 18px; }

.title-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  padding: var(--s2) 0;
  border-bottom: 2px solid transparent;
}
.title-input:focus { outline: none; border-bottom-color: var(--accent); }

.field { margin-top: var(--s5); }
.field > label { display: block; margin-bottom: var(--s2); }
.input, .textarea, .select {
  width: 100%;
  padding: 13px var(--s4);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--field-bg);
  color: var(--text);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--blue-tint); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7480' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 44px; }

/* segmented control (status) */
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--line);
  border-radius: var(--r-md);
}
.segmented button {
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 11px 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}
.segmented button[aria-pressed="true"] {
  background: var(--bg-elevated);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* priority toggle (used in sheet) */
.toggle-row { display: flex; gap: var(--s2); }
.toggle-row button {
  flex: 1;
  min-height: 48px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.toggle-row button svg { width: 18px; height: 18px; }
.toggle-row button[aria-pressed="true"][data-v="normal"] { border-color: var(--accent); color: var(--accent); background: var(--blue-tint); }
.toggle-row button[aria-pressed="true"][data-v="high"] { border-color: var(--alert); color: var(--alert); background: var(--red-tint); }

/* comments */
.comments { margin-top: var(--s3); display: flex; flex-direction: column; gap: var(--s3); }
.comment { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); }
.comment__bubble { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 4px var(--r-md) var(--r-md) var(--r-md); padding: var(--s3) var(--s4); }
.comment__who { font-size: 13px; font-weight: 750; }
.comment__time { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.comment__body { margin-top: 2px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.comment-bar { display: flex; gap: var(--s2); margin-top: var(--s4); position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .comment-bar { bottom: var(--s4); } }
.comment-bar .input { flex: 1; }
.comment-bar .icon-send { flex: none; width: 48px; border-radius: var(--r-md); background: var(--accent); color: #fff; border: none; display: grid; place-items: center; }
.comment-bar .icon-send svg { width: 22px; height: 22px; }

/* overflow menu */
.menu { position: relative; }
.menu__list {
  position: absolute;
  right: 0; top: calc(100% + 6px);
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: var(--s1);
  z-index: 40;
}
.menu__list button {
  display: flex; align-items: center; gap: var(--s3);
  width: 100%;
  padding: 12px var(--s3);
  border: none; background: transparent;
  border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600;
  color: var(--text); text-align: left;
}
.menu__list button:hover { background: var(--bg); }
.menu__list button.danger { color: var(--alert); }
.menu__list button svg { width: 18px; height: 18px; }

/* detail meta grid */
.detail-grid { margin-top: var(--s5); display: grid; gap: var(--s4); }
.detail-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.detail-row .k { color: var(--text-muted); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: var(--s2); }
.detail-row .k svg { width: 18px; height: 18px; }

/* ================================================================ welcome */
.welcome {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--s5);
  padding-top: max(var(--s5), env(safe-area-inset-top));
  padding-bottom: max(var(--s5), env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 80% at 50% -10%, var(--blue-tint), transparent 60%),
    var(--bg);
}
.welcome-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: var(--s7) var(--s5) var(--s6);
}
.welcome-card__logo {
  width: 96px; height: 96px;
  margin: 0 auto var(--s4);
  display: block;
  filter: drop-shadow(0 8px 18px rgba(62,127,227,.22));
}
.welcome-card h1 { font-size: 40px; font-weight: 850; letter-spacing: -.03em; }
.welcome-card .tagline { color: var(--accent); font-weight: 700; margin-top: 2px; }
.welcome-card .church { color: var(--text-muted); font-size: 13px; margin-top: var(--s2); }
.welcome-card .verse { color: var(--text-muted); font-size: 14px; font-style: italic; margin: var(--s5) auto var(--s5); max-width: 30ch; line-height: 1.5; }
.welcome-actions { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
.install-hint { font-size: 13px; color: var(--text-muted); margin-top: var(--s4); line-height: 1.5; }

/* notices on the welcome screen (denied / bootstrap) */
.notice { border-radius: var(--r-md); padding: var(--s4); margin-bottom: var(--s4); text-align: left; font-size: 14px; line-height: 1.5; }
.notice--info { background: var(--blue-tint); color: var(--text); }
.notice--warn { background: var(--red-tint); color: var(--text); border: 1px solid color-mix(in srgb, var(--alert) 25%, transparent); }
.notice b { display: block; margin-bottom: 4px; }
.bootstrap-form { display: flex; gap: var(--s2); margin-top: var(--s3); }
.bootstrap-form .input { flex: 1; }

/* turn-on-alerts prompt banner */
.banner {
  display: flex; align-items: center; gap: var(--s3);
  background: var(--blue-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s5);
}
.banner svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.banner__txt { font-size: 14px; flex: 1; }
.banner__txt b { display: block; }
.banner button { white-space: nowrap; }
.banner .icon-btn { width: 36px; height: 36px; }

/* ================================================================= invite */
.invite-qr {
  width: 220px; height: 220px;
  display: block; margin: var(--s4) auto;
  border-radius: var(--r-md);
  background: #fff;
  padding: var(--s3);
  box-shadow: var(--shadow-sm);
  image-rendering: pixelated;
}
.invite-url {
  display: flex; align-items: center; gap: var(--s2);
  background: var(--field-bg);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 6px 6px 6px var(--s4);
}
.invite-url code { flex: 1; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: var(--s4) 0 0; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3);
  align-items: start;
  padding: var(--s3) 0;
}
.steps li::before {
  content: counter(step);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  display: grid; place-items: center;
  font-size: 14px;
}
.steps b { font-weight: 750; }
.steps p { font-size: 14px; color: var(--text-muted); }

/* ================================================================== files */
.file-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s3) var(--s3) var(--s4);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.file-row__icon {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--blue-tint);
  color: var(--accent);
}
.file-row__icon svg { width: 20px; height: 20px; }
.file-row__main { min-width: 0; }
.file-row__name {
  font-size: 15px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-row__meta { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.file-row__actions { display: flex; gap: 2px; flex: none; }
.file-row__actions .icon-btn { width: 42px; height: 42px; }

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  text-align: left;
  padding: var(--s5) var(--s4);
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.dropzone svg { width: 26px; height: 26px; flex: none; }
.dropzone b { color: var(--text); font-weight: 700; }
.dropzone:hover { border-color: var(--accent); color: var(--accent); }
.dropzone:hover b { color: var(--accent); }
/* highlight the drop target while a file is dragged over the screen */
.files-view.is-dragover .dropzone {
  border-color: var(--accent);
  background: var(--blue-tint);
  color: var(--accent);
}
.files-view.is-dragover .dropzone b { color: var(--accent); }

/* ================================================================== sheet */
.scrim {
  position: fixed; inset: 0;
  z-index: 50;
  background: rgba(15, 22, 33, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade .15s ease;
}
@media (min-width: 768px) { .scrim { align-items: center; } }
.sheet {
  width: 100%;
  max-width: 520px;
  background: var(--bg-elevated);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg);
  padding: var(--s4) var(--s5) calc(var(--s5) + env(safe-area-inset-bottom));
  animation: slideup .22s cubic-bezier(.2,.8,.2,1);
  max-height: 92vh;
  overflow-y: auto;
}
@media (min-width: 768px) { .sheet { border-radius: 24px; animation: pop .18s ease; } }
.sheet__grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto var(--s4); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s4); }
.sheet__head h2 { font-size: 20px; font-weight: 800; }
.sheet__actions { display: flex; gap: var(--s3); margin-top: var(--s5); }
.sheet__actions .btn { flex: 1; }

@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ================================================================= toasts */
#toast-root {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--s4));
  z-index: 80;
  display: flex; flex-direction: column; gap: var(--s2);
  width: max-content; max-width: 90vw;
  pointer-events: none;
}
@media (min-width: 768px) { #toast-root { bottom: var(--s5); } }
.toast {
  background: var(--ink);
  color: #fff;
  padding: 12px var(--s4);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastin .2s ease;
  display: inline-flex; align-items: center; gap: var(--s2);
}
.toast svg { width: 18px; height: 18px; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================ misc helpers */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: var(--s7) auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { display: grid; place-items: center; padding: var(--s7); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.mt4 { margin-top: var(--s4); } .mt5 { margin-top: var(--s5); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
