/* Prayer Flint
   Layout: a lapis masthead holds the name, session line and tabs; below it the session is a rota of
   equal-size watch cards (one prayer at a time on a recessed tray), with the whole-team prayers and
   anything that needs a watch set above them. Scripture is always gold; the team's own words are ink. */
:root {
  --bg: #F3F4F7; --surface: #FFFFFF; --raised: #FAFBFD; --sunk: #EEF0F5;
  --ink: #121829; --ink-2: #2A3147; --muted: #5E667D; --line: #E3E6EE; --line-strong: #CCD2DF;
  --accent: #26408F; --accent-2: #3553B5; --accent-ink: #FFFFFF; --accent-soft: #E9EDF9;
  --gold: #9C6C0C; --gold-2: #C9963A; --gold-soft: #F7EFDD;
  --danger: #B3261E; --danger-soft: #FBE8E6;
  --c1: #2E7D6B; --c2: #A0472E; --c3: #6A4BB0; --c4: #B07A12; --c5: #2F6FB0; --c6: #A03A78;
  --mast: linear-gradient(135deg, #10172F 0%, #1A2758 55%, #26408F 100%);
  --mast-ink: #F5F0E4; --mast-muted: rgba(245, 240, 228, .72); --mast-line: rgba(245, 240, 228, .16); --mast-fill: rgba(255, 255, 255, .07);
  --shadow-sm: 0 1px 2px rgba(18, 24, 41, .05);
  --shadow: 0 1px 2px rgba(18, 24, 41, .04), 0 10px 28px -12px rgba(18, 24, 41, .16);
  --shadow-lg: 0 24px 60px -20px rgba(10, 16, 40, .35);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235E667D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --chev-mast: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23F5F0E4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --f-display: "Newsreader", Georgia, "Times New Roman", serif;
  --f-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --r: 16px; --r-md: 12px; --r-sm: 9px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0A0E1A; --surface: #121929; --raised: #161E31; --sunk: #0D1322;
  --ink: #ECEFF6; --ink-2: #C9CFDD; --muted: #8E97AD; --line: #212A40; --line-strong: #2E3954;
  --accent: #A6B8F5; --accent-2: #C3D0F9; --accent-ink: #0A0E1A; --accent-soft: #1B2546;
  --gold: #E3BB66; --gold-2: #F0D08F; --gold-soft: #2A2316;
  --danger: #F2867E; --danger-soft: #3A1E1E;
  --c1: #5CC3A8; --c2: #E58C70; --c3: #AE95F0; --c4: #E6BA5A; --c5: #79AEEA; --c6: #E583BD;
  --mast: linear-gradient(135deg, #0B1026 0%, #142050 55%, #1E3374 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238E97AD' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0A0E1A; --surface: #121929; --raised: #161E31; --sunk: #0D1322;
  --ink: #ECEFF6; --ink-2: #C9CFDD; --muted: #8E97AD; --line: #212A40; --line-strong: #2E3954;
  --accent: #A6B8F5; --accent-2: #C3D0F9; --accent-ink: #0A0E1A; --accent-soft: #1B2546;
  --gold: #E3BB66; --gold-2: #F0D08F; --gold-soft: #2A2316;
  --danger: #F2867E; --danger-soft: #3A1E1E;
  --c1: #5CC3A8; --c2: #E58C70; --c3: #AE95F0; --c4: #E6BA5A; --c5: #79AEEA; --c6: #E583BD;
  --mast: linear-gradient(135deg, #0B1026 0%, #142050 55%, #1E3374 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238E97AD' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark }

/* ---------- base ---------- */
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f-ui); -webkit-font-smoothing: antialiased }
[hidden] { display: none !important }
img { max-width: 100% }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
h1, h2, h3 { text-wrap: balance }
.app { max-width: 1400px; margin: 0 auto; padding-inline: 16px; padding-block: 16px 72px; display: grid; gap: 20px }
.label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums }

/* ---------- controls ---------- */
select, input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], textarea {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 8px 12px; min-width: 0;
  transition: border-color .15s, box-shadow .15s }
select:hover, input:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)) }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent) }
textarea { width: 100%; resize: vertical; min-height: 84px; line-height: 1.5 }
select { -webkit-appearance: none; appearance: none; background-image: var(--chev); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 12px; padding-right: 40px }

.btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 8px 14px; font-weight: 600; font-size: .87rem; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm); transition: border-color .15s, background .15s, transform .1s }
.btn:hover { border-color: var(--accent) }
.btn:active { transform: translateY(1px) }
.btn.primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent) }
.btn.primary:hover { filter: brightness(1.06) }
.btn.gold { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 30%, transparent); color: var(--gold); box-shadow: none }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); box-shadow: none }
.btn.ghost:hover { color: var(--ink); background: var(--sunk) }
.btn.danger { color: var(--danger) }
.btn.sm { padding: 4px 10px; font-size: .76rem; border-radius: 7px }
.btn[data-armed] { background: var(--danger-soft); color: var(--danger); border-color: var(--danger) }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none }
.iconbtn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; color: var(--muted); flex: none }
.iconbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent) }
.iconbtn:disabled { opacity: .4 }

/* ---------- masthead ---------- */
.mast { background: var(--mast); color: var(--mast-ink); border-radius: calc(var(--r) + 4px); box-shadow: var(--shadow-lg); padding: 22px 24px 14px;
  display: grid; gap: 18px; position: relative; overflow: hidden }
.mast::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 220px at 88% -40%, rgba(227, 187, 102, .22), transparent 70%), radial-gradient(500px 200px at 0% 120%, rgba(166, 184, 245, .14), transparent 70%) }
.mast > * { position: relative; z-index: 1 }
.mastTop { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 28px }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0 }
.emblem { width: 46px; height: 46px; flex: none; color: var(--mast-ink); padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid var(--mast-line) }
.emblem .core { fill: #E3BB66 }
.eyebrow { margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #E3BB66 }
.brand h1 { font: 600 clamp(1.7rem, 3vw, 2.25rem)/1.05 var(--f-display); margin: 2px 0 0; letter-spacing: -.015em }
.brand p#sessionLine { margin: 6px 0 0; color: var(--mast-muted); font-size: .88rem; font-variant-numeric: tabular-nums }
.as { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .84rem; color: var(--mast-muted) }
.as label { white-space: nowrap }
.mast select { background-color: var(--mast-fill); background-image: var(--chev-mast); border-color: var(--mast-line); color: var(--mast-ink) }
.mast select option { color: #121829; background: #fff }
.mast select:hover { border-color: rgba(245, 240, 228, .4) }
.mast .btn { background: var(--mast-fill); border-color: var(--mast-line); color: var(--mast-ink); box-shadow: none }
.mast .btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(245, 240, 228, .35); color: var(--mast-ink) }
.mast .btn.ghost { background: none; border-color: transparent; color: var(--mast-muted) }
.mast .btn.ghost:hover { color: var(--mast-ink); background: rgba(255, 255, 255, .08) }
#themeBtn { gap: 6px; white-space: nowrap }
#themeBtn .ti { font-size: 1rem; line-height: 1 }
#installBtn { white-space: nowrap }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin-inline: -4px; border-top: 1px solid var(--mast-line); padding-top: 12px }
.tabs::-webkit-scrollbar { display: none }
.tabs button { background: none; border: 0; padding: 8px 16px; border-radius: 999px; color: var(--mast-muted); font-weight: 600; font-size: .9rem; white-space: nowrap; transition: background .15s, color .15s }
.tabs button:hover { color: var(--mast-ink); background: rgba(255, 255, 255, .07) }
.tabs button[aria-selected=true] { background: var(--mast-ink); color: #121829; box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .5) }
.tabs .n { font: 500 .72rem var(--f-mono); opacity: .75; margin-left: 4px }
.tabs .newn:not(:empty) { opacity: 1; color: #fff; background: #C2412F; border-radius: 999px; padding: 1px 7px; font: 700 .66rem var(--f-ui); letter-spacing: .03em }

.banner { background: var(--accent-soft); color: var(--ink); border-radius: var(--r-md); padding: 12px 16px; font-size: .9rem }
.banner.offline { background: var(--gold-soft) }

/* ---------- session ---------- */
.bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm) }
.field { display: grid; gap: 6px }
.field input[type=number] { width: 88px }
.bar .spacer { flex: 1 }
.barActions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }

.news { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; box-shadow: var(--shadow-sm) }
.news > .label { color: #C2412F; display: inline-flex; align-items: center; gap: 8px }
.news > .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #C2412F; box-shadow: 0 0 0 4px color-mix(in srgb, #C2412F 18%, transparent) }
.newsList { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 }
.alertAsk { font-size: .86rem; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap }
.newpill { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font: 700 .6rem/1.6 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle }

.unassigned { display: grid; gap: 10px }
.ua-list { display: flex; flex-wrap: wrap; gap: 8px }
.ua { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 6px 6px 6px 14px; max-width: 100%; min-width: 0 }
.ua button.link { background: none; border: 0; padding: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px }
.ua button.link:hover { color: var(--accent) }
.ua select { padding: 5px 30px 5px 10px; font-size: .8rem; background-position: right 10px center }
.uanote { font-size: .74rem; color: var(--muted); white-space: nowrap }

.whole { background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line)); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden }
.whole > header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 18px;
  background: linear-gradient(90deg, var(--gold-soft), color-mix(in srgb, var(--gold-soft) 40%, var(--surface))); border-bottom: 1px solid color-mix(in srgb, var(--gold) 20%, var(--line)) }
.whole > header .label { color: var(--gold) }
.whole .wlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px; padding: 8px }

.awayrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.awayrow .chip { padding: 3px 4px 3px 12px; color: var(--muted) }

.watches { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: stretch }
.watch { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; overflow: hidden; transition: box-shadow .2s, transform .2s }
.watch:hover { box-shadow: 0 1px 2px rgba(18, 24, 41, .05), 0 16px 36px -14px rgba(18, 24, 41, .22) }
.watch.me { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow) }
.watch > header { padding: 16px 16px 12px; display: grid; gap: 3px }
.wtop { display: flex; justify-content: space-between; align-items: center; gap: 8px }
.wtop .label { color: var(--gold) }
.wtime { font: 500 .74rem var(--f-mono); color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; white-space: nowrap }
.whead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px }
.whead h3 { min-width: 0; font: 600 1.35rem/1.15 var(--f-display); margin: 0; letter-spacing: -.01em }
.whead .btn.sm { flex: none; opacity: .75 }
.whead .btn.sm:hover { opacity: 1 }
.you { font: 700 .6rem/1.7 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; background: var(--gold-soft); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); border-radius: 999px; padding: 0 7px; vertical-align: 3px; margin-left: 8px }
.wload { font-size: .8rem; color: var(--muted) }
.wsecs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px }

/* the tray: one prayer at a time, same height on every card */
.assigned { margin: 0 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; grid-template-rows: auto 1fr; height: 228px; min-height: 0; overflow: hidden }
.ahead { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 8px 6px 14px; border-bottom: 1px solid var(--line) }
.pager { display: inline-flex; align-items: center; gap: 2px }
.pg { width: 28px; height: 28px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 50%; color: var(--ink); font-size: 1.05rem; line-height: 1; padding: 0 0 2px; cursor: pointer; box-shadow: var(--shadow-sm) }
.pg:hover { border-color: var(--accent); color: var(--accent) }
.pgpos { font: 500 .72rem var(--f-mono); color: var(--muted); min-width: 54px; text-align: center; font-variant-numeric: tabular-nums }
.slides { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; counter-reset: pt; min-height: 0 }
.slides::-webkit-scrollbar { display: none }
.slide { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; overflow: hidden }
.slide .pt { height: 100%; align-content: start; padding: 12px 10px 12px 12px; border-radius: 0 }
.slide .pt:hover { background: color-mix(in srgb, var(--surface) 55%, transparent) }
.slide .pt .txt { -webkit-line-clamp: 4 }
.watch .wempty { margin: 0 12px; min-height: 228px; display: grid; place-content: center; text-align: center; padding: 16px; color: var(--muted); font-size: .86rem;
  border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--raised) }
.wadd { display: grid; gap: 8px; padding: 12px; margin-top: auto }
.wadd select { width: 100%; font-size: .84rem; padding-block: 9px; padding-left: 14px; background-color: var(--raised) }

/* a prayer line, used on watches, the whole-team card and the tray */
.points { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; counter-reset: pt }
.ptrow { display: grid; grid-template-columns: 1fr auto; align-items: start }
.pt { width: 100%; text-align: left; background: none; border: 0; border-radius: var(--r-sm); padding: 10px; display: grid; grid-template-columns: 22px 1fr; gap: 3px 8px; counter-increment: pt; transition: background .15s }
.pt:hover { background: var(--sunk) }
.pt::before { content: counter(pt, decimal-leading-zero); grid-row: span 3; font: 500 .7rem var(--f-mono); color: var(--muted); padding-top: 4px }
.pt .subj { font-weight: 650; font-size: .96rem; display: flex; align-items: center; gap: 7px; min-width: 0 }
.pt .txt { font-size: .86rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.txt.pp { color: var(--ink-2) }
.txt.pp b { display: inline-block; margin-right: 6px; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); vertical-align: 1px }
.txt.nopp { font-style: italic }
.ref { font: italic 400 .92rem var(--f-display); color: var(--gold) }
.pt .ph { font: 400 .74rem var(--f-ui); color: var(--muted); font-style: normal }
.rm, .chip .x { border: 0; background: none; color: var(--muted); border-radius: 50%; line-height: 1; cursor: pointer }
.rm { width: 28px; height: 28px; margin: 8px 6px 0 0; font-size: 1.1rem }
.rm:hover, .chip .x:hover { background: var(--danger-soft); color: var(--danger) }
@media (hover: hover) { .ptrow .rm { opacity: 0; transition: opacity .15s } .ptrow:hover .rm, .ptrow .rm:focus-visible { opacity: 1 } }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted) }
.c1 { --cat: var(--c1) } .c2 { --cat: var(--c2) } .c3 { --cat: var(--c3) } .c4 { --cat: var(--c4) } .c5 { --cat: var(--c5) } .c6 { --cat: var(--c6) }
.dot[class*=" c"] { background: var(--cat); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat) 16%, transparent) }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--surface); white-space: nowrap; transition: border-color .15s, background .15s }
button.chip:hover { border-color: var(--accent) }
.chip[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.chip.sm { font-size: .72rem; padding: 2px 4px 2px 9px; gap: 5px; background: var(--raised) }
.chip.sm .mono { color: var(--muted); font-size: .68rem }
.chip .x { width: 20px; height: 20px; font-size: .95rem; padding: 0 }
.pill { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px }
.pill.active { background: var(--accent-soft); color: var(--accent) }
.pill.answered { background: var(--gold-soft); color: var(--gold) }

/* ---------- inventory ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }
.toolbar input[type=search] { flex: 1 1 240px; padding-block: 10px }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); padding: 3px; gap: 2px }
.seg button { border: 0; background: none; padding: 6px 14px; font-size: .84rem; font-weight: 600; color: var(--muted); border-radius: 999px }
.seg button[aria-pressed=true] { background: var(--accent-soft); color: var(--accent) }
.chips { display: flex; gap: 6px; flex-wrap: wrap }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm) }
.group > h3 { margin: 0; padding: 12px 18px; display: flex; align-items: center; gap: 10px; font: 600 1.12rem var(--f-display); background: var(--raised); border-bottom: 1px solid var(--line) }
.group > h3 .mono { font-size: .72rem; color: var(--muted); font-weight: 500; margin-left: auto }
.row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(0, 2fr) minmax(120px, 1fr) 140px; gap: 16px; align-items: start; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 12px 18px; transition: background .15s }
.group .row:first-of-type { border-top: 0 }
.row:hover { background: var(--sunk) }
.row > * { min-width: 0 }
.row .subj { font-weight: 650 }
.row .kind { display: block; font-size: .72rem; color: var(--muted); font-weight: 500; margin-top: 2px }
.row .txt { font-size: .9rem; color: var(--ink-2) }
.row .who { font-size: .8rem; color: var(--muted); text-align: right }
.row .who b { color: var(--ink); font-weight: 600 }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr auto; gap: 6px 12px }
  .row .txt, .row .ref { grid-column: 1 / -1 }
  .row .who { grid-row: 1; grid-column: 2 }
}

/* ---------- answered ---------- */
.praise { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; text-align: left; display: grid; gap: 8px; min-width: 0; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .2s }
.pcard:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); box-shadow: var(--shadow) }
.pcard h3 { margin: 0; font: 600 1.25rem var(--f-display) }
.pcard .note { background: var(--gold-soft); border-radius: var(--r-sm); padding: 10px 12px; font: italic 400 1rem/1.45 var(--f-display) }
.pcard .meta { font-size: .78rem; color: var(--muted) }

/* ---------- team & categories ---------- */
.setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; min-width: 0; box-shadow: var(--shadow-sm) }
.panel h2 { margin: 0; font: 600 1.45rem var(--f-display) }
.panel p.help { margin: 0; color: var(--muted); font-size: .88rem }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px }
.list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.list li input { flex: 1 1 140px }
.list .idx { font: 500 .74rem var(--f-mono); color: var(--muted); width: 58px; flex: none }
.addrow { display: flex; gap: 8px }
.addrow input { flex: 1 }

.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 32px 24px; display: grid; gap: 12px; justify-items: start }
.empty h2 { margin: 0; font: 600 1.55rem var(--f-display) }
.empty p { margin: 0; color: var(--muted); max-width: 60ch }
.steps { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px }

/* ---------- detail drawer ---------- */
#drawer { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end }
#drawer .scrim { position: absolute; inset: 0; background: rgba(8, 12, 26, .5); backdrop-filter: blur(2px) }
#drawer .sheet { position: relative; width: min(540px, 100%); height: 100%; background: var(--surface); overflow-y: auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 24px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 18px; align-content: start; box-shadow: -24px 0 60px -20px rgba(0, 0, 0, .45) }
.dtop { display: flex; justify-content: space-between; align-items: center; gap: 8px }
.sheet h2 { margin: 0; font: 600 1.9rem/1.12 var(--f-display); letter-spacing: -.01em }
.sheet .kind { color: var(--muted); font-size: .85rem; margin-top: 4px }
.block { display: grid; gap: 8px }
.block p { margin: 0 }
.ppoint { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 10px }
.ppoint .label { color: var(--accent) }
.ppoint textarea { background: var(--surface) }
.pptext { margin: 0; font: 600 1.12rem/1.45 var(--f-ui); white-space: pre-wrap }
.scripture { margin: 0; border-left: 2px solid var(--gold-2); padding: 6px 0 6px 16px; display: grid; gap: 6px }
.scripture .ref { font-size: 1.05rem; font-style: normal; font-weight: 600; letter-spacing: .01em }
.scripture q { font: italic 400 1.08rem/1.55 var(--f-display); quotes: none; white-space: pre-wrap; color: var(--ink-2) }
.phases { margin: 0; padding-left: 22px; display: grid; gap: 8px }
.phases li::marker { font: 500 .78rem var(--f-mono); color: var(--muted) }
.phases .ref { font-size: .9rem }
.actions { display: flex; flex-wrap: wrap; gap: 8px }
.inline { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: grid; gap: 10px }
.compose .seg { justify-self: start }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px }
.notes li { display: grid; gap: 3px; padding-left: 14px; border-left: 2px solid var(--line-strong) }
.notes li.update { border-color: var(--accent) }
.notes li.answered { border-color: var(--gold-2) }
.notes .nh { font-size: .78rem; color: var(--muted) }
.notes .nh b { color: var(--ink) }
.notes .nt { white-space: pre-wrap; font-size: .93rem }
.notes li.prayer .nt { font: italic 400 1.04rem/1.5 var(--f-display) }
.form { display: grid; gap: 14px }
.form .field input, .form .field select { width: 100% }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
@media (max-width: 480px) { .two { grid-template-columns: 1fr } }
.radios { display: flex; gap: 8px }
.radios label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 8px 14px; background: var(--surface); font-weight: 600; font-size: .88rem; cursor: pointer }
.radios label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent) }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: .9rem; font-weight: 500; z-index: 30; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg) }
#toast.err { background: var(--danger); color: #fff }

/* ---------- sign-in ---------- */
#login { position: fixed; inset: 0; z-index: 40; background: var(--mast); display: grid; place-items: center; padding-inline: 16px }
.loginCard { width: min(400px, 100%); background: var(--surface); border-radius: calc(var(--r) + 4px); box-shadow: var(--shadow-lg); padding: 30px 28px; display: grid; gap: 12px }
.loginCard .emblem { color: var(--accent); background: var(--accent-soft); border-color: transparent }
.loginCard h2 { margin: 4px 0 0; font: 600 2rem var(--f-display); letter-spacing: -.01em }
.loginCard p { margin: 0; color: var(--muted) }
.loginCard input { width: 100%; padding-block: 11px }
.loginCard .btn.primary { justify-content: center; padding-block: 11px; margin-top: 4px }
.loginCard .loginErr { color: var(--danger); font-size: .9rem }

/* ---------- offline: most things save to the phone; deleting and team/category changes wait ---------- */
.is-offline [data-act="del"], .is-offline [data-act="delAns"], .is-offline [data-act="trem"], .is-offline [data-act="crem"],
.is-offline [data-act="csugg"], .is-offline [data-act="tup"], .is-offline [data-act="tdown"], .is-offline .addrow { display: none !important }
.is-offline .panel input { pointer-events: none; opacity: .6 }
.waitpill { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--gold-soft); color: var(--gold);
  border: 1px dashed color-mix(in srgb, var(--gold) 45%, transparent); font: 700 .6rem/1.6 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; white-space: nowrap }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .app { padding-block: 10px 64px; gap: 16px }
  .mast { padding: 18px 16px 10px; border-radius: var(--r) }
  .emblem { width: 40px; height: 40px; padding: 7px }
  .bar { padding: 14px }
  .bar .spacer { display: none }
  .barActions { width: 100% }
  .barActions .btn.primary { flex: 1; justify-content: center }
  #drawer .sheet { padding-inline: 18px }
}
@media (prefers-reduced-motion: no-preference) { #drawer .sheet { animation: slide .22s cubic-bezier(.2, .8, .2, 1) } @keyframes slide { from { transform: translateX(28px); opacity: .5 } } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }

/* ---------- answered: celebration ---------- */
.answeredView { display: grid; gap: 18px }
.celebrate { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: stretch;
  background: radial-gradient(520px 240px at 12% 0%, color-mix(in srgb, var(--gold-2) 28%, transparent), transparent 70%), linear-gradient(135deg, var(--gold-soft), var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); border-radius: calc(var(--r) + 4px); padding: 26px 28px; box-shadow: var(--shadow) }
.bignum { display: grid; align-content: center; gap: 2px }
.bignum .num { font: 600 clamp(4rem, 11vw, 6.5rem)/.9 var(--f-display); color: var(--gold); letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums }
.bignum .numlabel { font: 600 1.5rem/1.2 var(--f-display); color: var(--ink) }
.bignum .numsub { font-size: .9rem; color: var(--muted); margin-top: 4px }
.stats { margin: 0; display: grid; gap: 10px; align-content: center }
.stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--line); border-radius: var(--r-md) }
.stats dt { font-size: .84rem; color: var(--muted); font-weight: 600 }
.stats dd { margin: 0; font: 600 1.7rem/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums }
.answeredView .toolbar .spacer { flex: 1 }
.pcard { padding: 0; overflow: hidden; display: flex; flex-direction: column }
.pcardOpen { text-align: left; background: none; border: 0; padding: 18px 18px 12px; display: grid; gap: 8px; width: 100%; flex: 1; align-content: start }
.pcardOpen:hover h3 { color: var(--accent) }
.pcpoint { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
.pcard footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; border-top: 1px solid var(--line); background: var(--raised) }
@media (max-width: 640px) { .celebrate { grid-template-columns: 1fr; padding: 22px 20px } }

/* watch card fit-and-finish */
.wmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px }
.wmeta .btn.sm { margin-right: -6px; opacity: .8 }
.wmeta .btn.sm:hover { opacity: 1 }
.assigned, .watch .wempty { height: 246px; min-height: 246px }
.ahead .label { white-space: nowrap; font-size: .64rem; letter-spacing: .09em }
.pgpos { min-width: 44px }
.slide .pt .txt { -webkit-line-clamp: 3 }
.slide .pt .ref { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }

/* keep wide rows from stretching the page on phones */
.app > *, #main, #main > div, .unassigned, .ua-list, .watches > *, .news, .newsList { min-width: 0 }
.ua { flex-wrap: wrap; row-gap: 6px }
.ua button.link { max-width: 100% }
.ua select { max-width: 100% }
@media (max-width: 640px) { .ua { width: 100% } .ua select { flex: 1 } }
.newsList { flex: 1 1 220px }
.newsList .chip, .awayrow .chip { max-width: 100%; white-space: normal; text-align: left }

/* ---------- watch card: compact "Prayers assigned" box ---------- */
button.assigned { font: inherit; color: inherit; text-align: left; cursor: pointer; width: auto; margin: 0 12px; padding: 14px 16px 12px; height: 246px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .15s, background .15s, box-shadow .15s }
button.assigned:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--sunk)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent) }
button.assigned .ahead { display: flex; justify-content: space-between; align-items: baseline; padding: 0; border: 0 }
.acount { font: 600 2rem/1 var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums }
.alist { display: grid; gap: 7px; align-content: start; min-width: 0 }
.aitem { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: .9rem }
.aname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 }
.amore { font-size: .82rem; color: var(--muted); padding-left: 16px }
.ago { font-size: .8rem; font-weight: 700; color: var(--accent); letter-spacing: .01em }

/* ---------- prayer panel: slide through a watch ---------- */
.pnav { position: sticky; top: calc(-18px - env(safe-area-inset-top, 0px)); z-index: 2; margin: -18px -24px 0; padding: 14px 24px 10px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: grid; gap: 10px }
.pnavTop { display: flex; justify-content: space-between; align-items: center; gap: 10px }
.pnavTop .label { color: var(--gold); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ptabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding-bottom: 2px; margin-inline: -2px }
.ptabs::-webkit-scrollbar { display: none }
.ptab { flex: none; scroll-snap-align: center; display: inline-flex; align-items: center; gap: 7px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: .8rem; font-weight: 600; color: var(--muted) }
.ptab .mono { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; background: var(--sunk); font-size: .68rem; color: var(--muted) }
.ptab:hover { border-color: var(--accent); color: var(--ink) }
.ptab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.ptab[aria-selected="true"] .mono { background: color-mix(in srgb, var(--accent-ink) 22%, transparent); color: var(--accent-ink) }
@media (max-width: 640px) { .pnav { margin-inline: -18px; padding-inline: 18px } }
@media (prefers-reduced-motion: no-preference) {
  #dHead.from-right { animation: inRight .22s cubic-bezier(.2, .8, .2, 1) }
  #dHead.from-left { animation: inLeft .22s cubic-bezier(.2, .8, .2, 1) }
  @keyframes inRight { from { transform: translateX(26px); opacity: 0 } }
  @keyframes inLeft { from { transform: translateX(-26px); opacity: 0 } }
}

/* ---------- watch card: every prayer one tap away, card size fixed ---------- */
div.assigned { margin: 0 12px; height: 246px; display: grid; grid-template-rows: auto 1fr; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; padding: 0 }
div.assigned .ahead { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 6px 8px 14px; border-bottom: 1px solid var(--line) }
div.assigned .ahead .btn.sm { color: var(--accent); font-weight: 700 }
.alist { list-style: none; margin: 0; padding: 6px; overflow-y: auto; min-height: 0; display: grid; gap: 2px; align-content: start; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent }
.alist li { min-width: 0 }
button.aitem { width: 100%; font: inherit; color: inherit; background: none; border: 0; border-radius: var(--r-sm); padding: 7px 8px; display: flex; align-items: center; gap: 8px;
  text-align: left; cursor: pointer; font-weight: 600; font-size: .88rem; min-width: 0 }
button.aitem:hover { background: var(--surface) }
.anum { font: 500 .68rem var(--f-mono); color: var(--muted); min-width: 18px; text-align: right; font-variant-numeric: tabular-nums }

/* heading sits above the list box, not inside it */
.atitle { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; padding: 0 12px 8px 16px; min-height: 34px }
.atitle .btn.sm { color: var(--accent); font-weight: 700; margin-right: -4px }
div.assigned { height: 212px; grid-template-rows: 1fr }
.watch .wempty { height: 254px; min-height: 254px }

/* ---------- watch card: arrows on their own row, one prayer in the box ---------- */
.apager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 8px }
.apager .pg { width: 34px; height: 34px; font-size: 1.2rem }
.apager .pg:disabled { opacity: .35; cursor: default }
.apager .pgpos { flex: 1; text-align: center; font-size: .78rem }
div.assigned { height: 172px; display: block; padding: 0 }
div.assigned .slides { height: 100% }
div.assigned .slide .pt { padding: 12px 12px 12px 10px }
div.assigned .slide .pt .txt { -webkit-line-clamp: 3 }

/* room between the arrows and the "5 of 10" count */
.pager { gap: 10px }
.pager .pgpos { min-width: 68px; padding-inline: 4px }
.pnav .pager .pg { width: 32px; height: 32px; flex: none }

/* answering from the main writing box */
.compose.answering { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)) }
.compose.answering textarea { border-color: color-mix(in srgb, var(--gold) 45%, var(--line-strong)) }
.kindHelp { margin: 0; font-size: .84rem; color: var(--gold); font-weight: 600 }
#kindSeg button[data-kind="answered"][aria-pressed="true"] { background: var(--gold-soft); color: var(--gold) }
.compose.answering #kindSeg button[data-kind="answered"][aria-pressed="true"] { background: var(--surface) }
