/* The Garden Bed on the web: the app's look (lib/ui/theme/abide_theme.dart,
   the Garden of Eden theme): Plus Jakarta Sans, warm paper surfaces, the
   green from the theme's seed, round cards and pill buttons. */

:root {
  --surface: #f7f5f0; --card: #ffffff; --sc: #f1eee7; --sch: #eae6de; --schh: #e2ded5;
  --ink: #1b211e; --soft: #5b635e; --line: #e0dcd2;
  --primary: #2a6b37; --on-primary: #ffffff; --pc: #b4f1b4; --on-pc: #002109;
  --sec-c: #d3e8d0; --on-sec-c: #0f1f10; --error: #ba1a1a; --error-c: #ffdad6;
  --talk: #6b4fa0; --call: #b4532a; --nations: #2f7d8c; --beds: #3f7a4e; --cardc: #7a6a3a; --gold: #b8963a;
  --scrim: rgba(12, 16, 14, .42); --shadow: 0 8px 28px rgba(20, 30, 22, .10);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --read: "Literata", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #101312; --card: #171b19; --sc: #1d2220; --sch: #242a27; --schh: #2c3330;
    --ink: #edefea; --soft: #a9b2ac; --line: #2f3633;
    --primary: #90d795; --on-primary: #00390f; --pc: #10521f; --on-pc: #b4f1b4;
    --sec-c: #394b38; --on-sec-c: #d3e8d0; --error: #ffb4ab; --error-c: #5c1a14;
    --scrim: rgba(0, 0, 0, .55); --shadow: 0 8px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--surface); }
body { color: var(--ink); font: 15px/1.45 var(--font); letter-spacing: .1px; overflow: hidden; }
@media (min-width: 640px) { body { background: var(--sc); } }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--primary); }
.hidden { display: none !important; }

/* ---- the stage: one phone-wide column, pages stacked inside it ---- */
#stage { position: relative; max-width: 600px; height: 100vh; height: 100dvh; margin: 0 auto; overflow: hidden;
         background: var(--surface); }
@media (min-width: 640px) { #stage { box-shadow: 0 0 0 1px var(--line), 0 10px 60px rgba(0,0,0,.08); } }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface);
          will-change: transform; }
.screen.under, .screen.leaving { pointer-events: none; }
.screen .shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
          padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.scroll.flush { padding-left: 0; padding-right: 0; }

/* ---- the top bar ---- */
.bar { display: flex; align-items: center; gap: 4px; min-height: 60px; padding: calc(6px + env(safe-area-inset-top)) 8px 6px;
       background: var(--surface); flex: none; }
.bar h1 { flex: 1; min-width: 0; margin: 0 0 0 4px; font-size: 21px; font-weight: 800; letter-spacing: -.1px;
          white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar h1 small { display: block; font-size: 13px; font-weight: 700; color: var(--primary); letter-spacing: 0; }
.bar .logo { max-height: 34px; max-width: 180px; display: block; }
.iconbtn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ink);
           display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.iconbtn:hover { background: var(--sc); }
.iconbtn:active { background: var(--sch); }
.iconbtn .ic { width: 24px; height: 24px; }
.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; vertical-align: -0.25em; }
.ic.big { display: block; width: 52px; height: 52px; margin: 4px auto 6px; color: var(--primary); }
.dot { display: inline-block; border-radius: 50%; }

/* ---- type ---- */
h2.label { font-size: 13px; letter-spacing: .6px; text-transform: uppercase; color: var(--primary); font-weight: 800;
           margin: 22px 2px 8px; display: flex; align-items: center; gap: 8px; }
h2.label .grow { flex: 1; }
.title { font-size: 22px; font-weight: 800; letter-spacing: -.2px; margin: 4px 0 6px; line-height: 1.25; }
.soft { color: var(--soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.read { font-family: var(--read); font-size: 17px; line-height: 1.6; }
.empty { display: flex; gap: 12px; align-items: center; color: var(--soft); padding: 14px 4px; }
.empty .ic { width: 24px; height: 24px; }

/* ---- cards and rows ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin: 0 0 12px; }
.card.tinted { border: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row b { font-weight: 800; }
.tap { cursor: pointer; }
.tap:active { opacity: .75; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
       border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 16px;
       font-weight: 800; letter-spacing: -.1px; cursor: pointer; text-decoration: none;
       box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 40%, transparent); }
.btn.block { display: flex; width: 100%; }
.btn.tonal { background: var(--sec-c); color: var(--on-sec-c); box-shadow: none; }
.btn.outline { background: transparent; color: var(--primary); box-shadow: none;
               border: 1.4px solid color-mix(in srgb, var(--primary) 55%, transparent); min-height: 48px; font-size: 15px; font-weight: 700; }
.btn.text { background: transparent; color: var(--primary); box-shadow: none; min-height: 44px; padding: 0 12px; font-size: 15px; font-weight: 700; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn.danger { color: var(--error); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn:not(:disabled):active { transform: scale(.98); }

/* ---- chips (the app's slim pill row, choices) ---- */
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px; margin: 0 -16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 34px; padding: 0 12px; border-radius: 10px;
        border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 700;
        cursor: pointer; white-space: nowrap; }
.chip .ic { color: var(--primary); width: 18px; height: 18px; }
.chip.loud { background: var(--sec-c); color: var(--on-sec-c); border-color: transparent; }
.chip.loud .ic { color: var(--on-sec-c); }
.chip.on { background: var(--sec-c); color: var(--on-sec-c); border-color: transparent; }
.chip.on::before { content: "✓"; font-weight: 800; }

/* ---- fields ---- */
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--soft); margin: 0 0 5px 4px; }
.input { width: 100%; border: 0; border-radius: 16px; background: var(--sc); padding: 13px 14px; font-size: 16px;
         outline: none; resize: vertical; }
.input:focus { box-shadow: 0 0 0 2px var(--primary) inset; }
.input.big { font-size: 22px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 2px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; margin: 0; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: relative; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--schh); border: 2px solid var(--soft); transition: .2s; }
.switch i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 6px; top: 6px; border-radius: 50%;
                   background: var(--soft); transition: .2s; }
.switch input:checked + i { background: var(--primary); border-color: var(--primary); }
.switch input:checked + i::after { left: 24px; top: 2px; width: 24px; height: 24px; background: var(--on-primary); }

/* ---- the Fellowship page ---- */
.news { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        padding: 2px 16px 6px; margin: 0 -16px; }
.news::-webkit-scrollbar { display: none; }
.news .item { flex: none; width: 78%; max-width: 380px; scroll-snap-align: center; background: var(--card);
              border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px; cursor: pointer; }
.news .item:only-child { width: 100%; max-width: none; }
.news .kind { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; font-weight: 800; color: var(--primary); }
.news .item h3 { margin: 2px 0 2px; font-size: 16px; font-weight: 800; line-height: 1.3; }
.news .meta { font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news .going { display: inline-flex; gap: 4px; align-items: center; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--primary); }

.people { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 16px 4px; margin: 0 -16px; }
.people::-webkit-scrollbar { display: none; }
.person { flex: none; width: 70px; text-align: center; cursor: pointer; border: 0; background: none; padding: 0; }
.person .name { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.person .word { font-size: 11px; color: var(--primary); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; flex: none; position: relative; }
.avatar .ic { width: 55%; height: 55%; }
.avatar.ring::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--gold); }
.avatar.you { background: var(--pc); color: var(--on-pc); font-size: 11px; }

.checkin { display: flex; align-items: center; gap: 12px; background: var(--sch); border-radius: 18px; padding: 9px 14px 9px 10px;
           cursor: pointer; margin-top: 6px; border: 0; width: 100%; text-align: left; }
.checkin b { display: block; font-weight: 800; font-size: 14.5px; }
.checkin .line { font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkin .line.mine { color: var(--primary); font-weight: 700; font-size: 14px; }
.checkin .go { color: var(--primary); font-weight: 700; white-space: nowrap; }

.tile { position: relative; display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 12px 14px; border-radius: 20px;
        overflow: hidden; cursor: pointer; margin: 0 0 10px; color: #fff; border: 0; width: 100%; text-align: left;
        background: var(--tile, var(--beds)); box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.tile .art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.tile .art::after { content: ""; position: absolute; inset: 0;
                    background: linear-gradient(90deg, color-mix(in srgb, var(--tile) 80%, black) 0%, color-mix(in srgb, var(--tile) 70%, transparent) 58%, color-mix(in srgb, var(--tile) 25%, transparent) 100%); }
.tile > :not(.art) { position: relative; }
.tile .sym { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; flex: none;
             border: 1.5px solid color-mix(in srgb, var(--tile) 40%, transparent); color: var(--tile); }
.tile .sym .ic { width: 26px; height: 26px; }
.tile h3 { margin: 0; font-size: 17px; font-weight: 800; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.tile p { margin: 1px 0 0; font-size: 13.5px; line-height: 1.3; color: rgba(255,255,255,.92); text-shadow: 0 1px 8px rgba(0,0,0,.55);
          display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .badge { position: absolute; left: 50px; top: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
               background: var(--tile); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center;
               box-shadow: 0 0 0 2px var(--surface); }
.tile > .ic:last-child { width: 22px; height: 22px; }

.cardrow { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-radius: 16px; cursor: pointer;
           background: color-mix(in srgb, var(--cardc) 12%, var(--surface)); border: 0; width: 100%; text-align: left; }
.cardrow > .ic { color: var(--cardc); width: 28px; height: 28px; }
.cardrow b { display: block; font-weight: 800; font-size: 15.5px; }
.cardrow i { color: var(--soft); font-size: 13.5px; }

.task { background: var(--ter-c, #f6ecd2); color: var(--ink); border-radius: 18px; padding: 12px 14px; margin: 4px 0 10px; }
@media (prefers-color-scheme: dark) { .task { background: #3a3324; } }
.banner { background: var(--sec-c); color: var(--on-sec-c); border-radius: 18px; padding: 12px 14px; margin: 0 0 12px; }

/* ---- the welcome (sign-in) page ---- */
.hero { position: relative; height: 210px; margin: 0 -16px 0; background: var(--beds) center/cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, var(--surface) 100%); }
.hero .code { position: absolute; left: 16px; top: calc(14px + env(safe-area-inset-top)); z-index: 1; background: rgba(255,255,255,.88);
              color: #23281f; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 13px; letter-spacing: 1px; }
.welcome h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: -18px 0 4px; position: relative; }
.or { display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- news, discussion ---- */
.picture { width: 100%; border-radius: 18px; display: block; margin: 4px 0 12px; background: var(--sc); }
.facts { display: grid; gap: 8px; margin: 8px 0 14px; }
.facts div { display: flex; gap: 10px; align-items: flex-start; }
.facts .ic { color: var(--primary); width: 20px; height: 20px; margin-top: 1px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--soft); margin-top: 4px; }
.stepper b { color: var(--ink); min-width: 18px; text-align: center; }
.meter { height: 10px; border-radius: 5px; background: var(--sc); overflow: hidden; margin: 8px 0 4px; }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: 5px; }

.sermon { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line);
          border-radius: 20px; padding: 10px; margin: 0 0 10px; }
.sermon .thumb { position: relative; width: 120px; aspect-ratio: 16/9; border-radius: 12px; background: #000 center/cover; flex: none;
                 display: grid; place-items: center; color: #fff; text-decoration: none; }
.sermon .thumb .ic { width: 36px; height: 36px; filter: drop-shadow(0 1px 6px rgba(0,0,0,.6)); }
.sermon b { display: block; font-weight: 800; line-height: 1.3; }
.question { font-family: var(--read); font-size: 17px; line-height: 1.5; padding: 12px 14px; border-radius: 16px;
            background: color-mix(in srgb, var(--talk) 10%, var(--surface)); margin: 0 0 6px; }
.question small { display: block; font-family: var(--font); font-size: 11px; letter-spacing: 1px; font-weight: 800;
                  color: var(--talk); text-transform: uppercase; margin-bottom: 2px; }
.post { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.post .bubble { flex: 1; min-width: 0; background: var(--sch); border-radius: 16px; padding: 8px 12px 10px; }
.post.mine .bubble { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.post.god .bubble { box-shadow: 0 0 0 1.5px var(--gold) inset; }
.post .who { display: flex; gap: 6px; align-items: baseline; font-size: 13px; font-weight: 800; }
.post .who span { margin-left: auto; font-weight: 400; font-size: 11.5px; color: var(--soft); }
.post .lab { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); font-weight: 800; }
.post .gs { font-size: 12px; color: var(--gold); font-weight: 800; }
.post .text { margin-top: 4px; font-size: 16px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { flex: none; display: flex; align-items: flex-end; gap: 2px; background: var(--sc); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.composer textarea { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; outline: none; resize: none; padding: 11px 6px;
                     max-height: 140px; font-size: 16px; line-height: 1.35; }
.composer textarea:placeholder-shown { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer .send { background: var(--primary); color: var(--on-primary); }
.composer .send:disabled { opacity: .4; }
.composer .on { color: var(--gold); }
.composer-note { font-size: 12px; color: var(--gold); font-weight: 800; padding: 4px 16px 0; background: var(--sc); }
.inks { display: flex; flex-wrap: wrap; gap: 10px; }
.inks button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.inks button.on { border-color: var(--primary); }

/* ---- serving, kids ---- */
.ask { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--on-sec-c) 12%, transparent); }
.ask:first-of-type { border-top: 0; }
.pickup { display: flex; align-items: center; gap: 12px; background: var(--pc); color: var(--on-pc); border-radius: 22px; padding: 14px 16px; margin-bottom: 10px; }
.pickup .code { font-size: 34px; font-weight: 900; letter-spacing: 5px; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--sc); font-size: 12.5px; font-weight: 700; }
.tag.red { background: var(--error-c); color: var(--error); }
.missionary { display: flex; gap: 12px; align-items: flex-start; }
.needs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.needs span { background: color-mix(in srgb, var(--nations) 12%, var(--surface)); color: var(--ink); border-radius: 999px; padding: 3px 10px; font-size: 13px; }

/* ---- sheets, the note, loading ---- */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 40; opacity: 0; transition: opacity .25s; }
.scrim.show { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92%; overflow-y: auto; overscroll-behavior: contain;
         background: var(--card); border-radius: 28px 28px 0 0; padding: 8px 20px calc(18px + env(safe-area-inset-bottom));
         transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.sheet.show { transform: none; }
.sheet .handle { width: 36px; height: 4px; border-radius: 2px; background: var(--schh); margin: 6px auto 14px; }
.sheet h2 { font-size: 21px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.1px; }
.sheet.center { left: 24px; right: 24px; bottom: auto; top: 50%; max-width: 420px; margin: 0 auto; border-radius: 28px;
                padding: 26px 22px 18px; text-align: center; opacity: 0; transform: translateY(-50%) scale(.94);
                transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.sheet.center.show { opacity: 1; transform: translateY(-50%); }

/* ---- a visitor's Garden Bed: what waits until they're let in ---- */
.locked { filter: grayscale(1); opacity: .45; }
.locked .ic, .locked .going, .locked .kind, .locked .go { color: var(--soft) !important; }
.tile.locked { box-shadow: none; }
.lock-word { font-size: 19px; font-weight: 800; line-height: 1.4; margin: 6px 0 18px; letter-spacing: -.1px; }
.shovel { font-size: 46px; line-height: 1; display: block; margin-bottom: 6px; }
.ghost { width: 50px; height: 50px; border-radius: 50%; background: var(--schh); display: block; margin: 0 auto; }
.ghost-line { height: 9px; width: 44px; border-radius: 5px; background: var(--schh); margin: 7px auto 0; }
.visiting { display: inline-block; font-style: normal; margin-left: 2px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
            letter-spacing: .4px; text-transform: uppercase; background: color-mix(in srgb, var(--talk) 14%, var(--surface)); color: var(--talk); }
@media (prefers-color-scheme: dark) { .visiting { color: #c9b6ef; } }
.waiting { display: flex; gap: 12px; align-items: flex-start; }
.waiting > .ic { width: 28px; height: 28px; flex: none; margin-top: 2px; }
#note { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px);
        background: #2b322e; color: #fff; padding: 12px 18px; border-radius: 16px; max-width: calc(100% - 32px); z-index: 60;
        opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; font-weight: 600; box-shadow: var(--shadow); }
#note.show { opacity: 1; transform: translate(-50%, 0); }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--sch); border-top-color: var(--primary);
        animation: spin .8s linear infinite; margin: 48px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: var(--sc); border-radius: 16px; min-height: 60px; margin-bottom: 10px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .sheet, .scrim, #note { transition: none; } }
