/* Grace Toti member area. Same palette and type as the public site; app-like layout for phones. */
@font-face { font-family: 'Young Serif'; src: url(fonts/young-serif.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(fonts/figtree.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
  --ground: #ffffff; --bg: #f4f1ec; --stone: #eeebe6; --ink: #1f2b25; --muted: #5f6a64; --line: #e3dbcf; --blue: #2f5470; --blue-soft: #e2eaf1;
  --green: #2e4d3d; --green-soft: #e3ece6; --tile: #a8492a; --tile-dark: #8d3c21; --tile-soft: #f6e6df;
  --warn: #7a5000; --warn-soft: #fbf0d9; --error: #b3261e; --error-soft: #fbe9e7;
  --green-bg: #2e4d3d; --tile-bg: #a8492a; --tile-bg-hover: #8d3c21; --top-bg: rgba(244,241,236,.95);
  --field-line: #cfc6b8; --hairline: #efe9df; --faint: #a39a8c; --tint: #f8f6f2; --warn-tint: #fffaf0; --bad-soft: #f3c9c4; --bad-ink: #6e1510;
  --serif: 'Young Serif', Georgia, serif; --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar: 64px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); }
a { color: var(--tile); }
:focus-visible { outline: 3px solid var(--tile); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Signed-in shell */
.app { max-width: 600px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tabbar) + 28px + env(safe-area-inset-bottom, 0px)); }
.top { position: sticky; top: 0; z-index: 5; background: var(--top-bg); display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: env(safe-area-inset-top, 0px) 16px 0; }
.wordmark { font: 400 20px var(--serif); color: var(--ink); text-decoration: none; }
.wordmark small { font: 600 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-left: 6px; }
.site-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.screen { padding: 4px 16px 16px; display: grid; gap: 14px; }
.h1 { font: 400 28px/1.15 var(--serif); }
.sub { color: var(--muted); margin: 2px 0 0; font-size: 15px; }
.card { background: var(--ground); border-radius: 16px; padding: 16px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.note { font-size: 13px; color: var(--muted); margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0;
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--tile-bg); color: #fff; }
.btn-primary:hover { background: var(--tile-bg-hover); }
.btn-green { background: var(--green-bg); color: #fff; }
.btn-soft { background: var(--stone); color: var(--ink); }
.btn-danger { background: var(--error-soft); color: var(--error); }
.btn-block { width: 100%; }
.btn-small { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions > * { flex: 1; }
.linkish { background: none; border: 0; color: var(--tile); font-weight: 600; padding: 12px 0; cursor: pointer; text-align: left; width: 100%;
  text-decoration: none; display: block; border-top: 1px solid var(--line); }
.linkish:first-of-type { border-top: 0; }
form.inline { display: inline; margin: 0; }

/* Messages */
.flash { border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 15px; }
.flash.ok { background: var(--green-soft); color: var(--green); }
.flash.error { background: var(--error-soft); color: var(--error); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash ul { margin: 0; padding-left: 18px; }

/* Forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-weight: 600; font-size: 14px; }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; border: 1.5px solid var(--field-line); border-radius: 12px; padding: 10px 14px;
  background: var(--ground); font-size: 16px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--tile); box-shadow: 0 0 0 3px rgba(168,73,42,.18); }
.field .hint { font-size: 13px; color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green); flex: none; }
.check small { display: block; color: var(--muted); }
.pw { position: relative; }
.pw input { padding-right: 70px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--tile); font-weight: 600; padding: 8px; cursor: pointer; }

/* Toggles */
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.toggle:first-of-type { border-top: 0; }
.toggle label small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; }
.switch span { position: absolute; inset: 0; background: var(--field-line); border-radius: 999px; transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--green-bg); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--tile); outline-offset: 2px; }

/* Home */
.next { background: var(--green-bg); color: #fff; }
.next .label { color: #b9d0c3; }
.next .date { font: 400 30px/1.1 var(--serif); margin: 4px 0 6px; }
.next .what { font-size: 18px; font-weight: 700; }
.next .with { color: #cfe0d6; font-size: 14px; margin: 4px 0 0; }
a.next { display: block; text-decoration: none; }
.next .what { margin: 6px 0 0; }
.next .more { margin-top: 12px; font-weight: 700; color: #fff; }
.next .what-s { font-weight: 400; font-size: 15px; color: #cfe0d6; }
.badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--tile-bg); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }

/* Directory */
.search { position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 4; background: var(--bg); padding: 4px 0 8px; }
.search input { width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px 0 42px; background: var(--ground) no-repeat 14px 50% / 18px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6a64' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); font-size: 16px; }
.count { font-size: 13px; color: var(--muted); margin: 0; }
.households { display: grid; gap: 10px; }
.household { background: var(--ground); border-radius: 16px; overflow: hidden; }
.household summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.household summary::-webkit-details-marker { display: none; }
.household .nm { font-weight: 700; display: block; }
.household .who { color: var(--muted); font-size: 14px; }
.chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
.household[open] .chev { transform: rotate(90deg); }
/* Directory: a big rounded-square picture per family; opening a family shows its whole family photo instead */
.face.big { width: 96px; height: 96px; border-radius: 14px; font-size: 26px; }
.face.big img { object-position: 50% 35%; }
.household summary:has(.face.big) { padding: 10px 12px; gap: 14px; }
.household[open] .face.big.fam { display: none; }
.fam-full { display: block; width: 100%; height: auto; border-radius: 12px; margin: 10px 0 4px; }
.face { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; font-size: 16px; overflow: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face.small { width: 36px; height: 36px; font-size: 13px; }
.people { border-top: 1px solid var(--line); padding: 4px 14px 12px; }
.person { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: start; }
.person:last-child { border-bottom: 0; }
.person .pn { font-weight: 600; }
.person .tag { font-weight: 400; color: var(--muted); font-size: 14px; }
.contact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; grid-column: 2; }
.contact a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--stone); color: var(--ink);
  text-decoration: none; font-size: 14px; font-weight: 600; }
.contact .ico { width: 18px; height: 18px; }
.detail { grid-column: 2; font-size: 14px; color: var(--muted); margin-top: 6px; word-break: break-word; }

/* Me */
.photo-row { display: flex; align-items: center; gap: 16px; }
.photo-row .face { width: 76px; height: 76px; font-size: 26px; }
.upload { display: grid; gap: 8px; }

/* Admin */
.req { display: grid; gap: 10px; }
.req + .req { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.req .nm { font-weight: 700; }
.req .meta { font-size: 14px; color: var(--muted); word-break: break-word; }
.match { font-size: 14px; background: var(--green-soft); color: var(--green); border-radius: 10px; padding: 8px 12px; }
.match.warn { background: var(--warn-soft); color: var(--warn); }
.pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.off { background: var(--stone); color: var(--muted); }
.pill.admin { background: var(--tile-soft); color: var(--tile); }
.pill.priv { display: inline-flex; align-items: center; gap: 4px; background: var(--tile-soft); color: var(--tile); text-transform: none; letter-spacing: 0; vertical-align: 2px; }
.pill.priv svg { width: 10px; height: 10px; }
.acct { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.acct:first-child { border-top: 0; padding-top: 0; }
.acct-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.acct-head b { word-break: break-word; }
.acct .meta { font-size: 13px; color: var(--muted); word-break: break-word; }
.log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.log li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.log li:first-child { border-top: 0; }
.log time { color: var(--muted); white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.preview { border-collapse: collapse; font-size: 13px; width: 100%; }
.preview th, .preview td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.preview th { color: var(--muted); font-weight: 600; }

/* Tab bar */
.tabbar { position: fixed; inset: auto 0 0; z-index: 10; background: var(--ground); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar .in { max-width: 600px; margin: 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tabbar a { height: var(--tabbar); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; position: relative; }
.tabbar a[aria-current="page"] { color: var(--tile); }
.tabbar .badge { position: absolute; top: 8px; left: calc(50% + 6px); font-size: 10px; padding: 0 5px; min-width: 16px; }

/* Signed-out pages */
.plain { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--stone); }
.plain .box { width: 100%; max-width: 420px; display: grid; gap: 16px; }
.brand { text-align: center; font: 400 34px var(--serif); color: var(--ink); text-decoration: none; display: block; }
.brand small { display: block; font: 600 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.plain .card { padding: 20px; }
.plain h1 { font: 400 26px/1.2 var(--serif); margin-bottom: 8px; }
.center { text-align: center; }

@media (min-width: 700px) {
  .screen { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Initials avatar colours (inline styles are blocked by the security policy) */
.c0 { background: #2e4d3d; } .c1 { background: #a8492a; } .c2 { background: #3d6b7d; } .c3 { background: #6b5b8d; }
.c4 { background: #8d5b3e; } .c5 { background: #6d7a3a; } .c6 { background: #7d3d5a; } .c7 { background: #3d5a7d; }
/* Birthdays and anniversaries */
.person .when { font-size: 14px; color: var(--muted); margin-top: 2px; }
.anniv { font-size: 14px; color: var(--green); font-weight: 600; padding: 10px 0 2px; }
.date-pair { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.field label.choice { font-weight: 400; font-size: 15px; }
.field label.choice > span { font-weight: 600; }
.field label.choice small { font-weight: 400; font-size: 13.5px; }
/* Home: celebrations and new members */
.celebrate { background: var(--tile-soft); }
.celebrate .label { color: var(--tile); }
.celebrations, .newbies { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.celebrations li, .newbies a { display: flex; align-items: center; gap: 12px; }
.celebrations b, .newbies b { display: block; line-height: 1.25; }
.celebrations .what { font-size: 14px; color: var(--muted); }
.faces { display: flex; flex: none; }
.faces .face { border: 2px solid var(--ground); }
.faces .face + .face { margin-left: -12px; }
.celebrate .faces .face { border-color: var(--tile-soft); }
.celebrate .note { margin-top: 12px; }
.newbies a { color: var(--ink); text-decoration: none; padding: 4px 0; }
.newbies a:hover b { color: var(--tile); }
.welcome .sub { margin: -2px 0 12px; }
.pick { padding: 10px 0; border-top: 1px solid var(--line); }
.pick:first-child { border-top: 0; }
.link-select { min-height: 38px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 0 10px; background: var(--ground); font-size: 14px; flex: 2 !important; min-width: 0; }
/* Admin: manage directory */
.mlist { list-style: none; margin: 0; padding: 0; }
.mlist li { border-top: 1px solid var(--line); }
.mlist li:first-child { border-top: 0; }
.mlist a { display: block; padding: 11px 0; color: var(--ink); text-decoration: none; }
.mlist a b { display: block; }
.mlist a:hover b { color: var(--tile); }
.mlist .meta { display: block; font-size: 13px; color: var(--muted); }
.mlist li.ordered { display: flex; align-items: center; gap: 8px; }
.mlist li.ordered > a { flex: 1; min-width: 0; }
.order { display: flex; gap: 6px; }
.arrow { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); color: var(--ink); font-size: 18px; cursor: pointer; }
.arrow:hover:not(:disabled) { border-color: var(--tile); color: var(--tile); }
.arrow:disabled { opacity: .3; cursor: default; }
.back { font-weight: 600; font-size: 14px; text-decoration: none; }
.edit-link { font-size: 13px; font-weight: 600; margin-left: 6px; }
.celebrate .later { margin: 16px 0 6px; padding-top: 12px; border-top: 1px solid rgba(168,73,42,.2); }
.later-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.later-list b { color: var(--ink); font-weight: 600; }
.relink summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--tile); padding: 4px 0; }
.relink .row-actions { margin-top: 8px; }

/* Serving */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top-gap { margin-top: 12px; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.meta { display: block; font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; background: var(--stone); border-radius: 12px; padding: 3px; justify-self: start; flex-wrap: wrap; }
.seg a { padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; }
.seg a[aria-current="page"] { background: var(--ground); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dates { list-style: none; margin: 0; padding: 0; display: grid; }
.dates li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.dates li:first-child { border-top: 0; padding-top: 0; }
.cal { flex: none; width: 52px; border-radius: 10px; background: var(--green-soft); color: var(--green); text-align: center; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; padding: 4px 0 6px; line-height: 1.1; }
.cal b { display: block; font: 400 22px/1.1 var(--serif); letter-spacing: 0; }
.away-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; }
.add-away summary, .team summary { cursor: pointer; font-weight: 700; color: var(--tile); padding: 6px 0; }
.add-away { margin-top: 8px; }
.date-pair.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.date-pair .field { min-width: 0; }
.field input[type="date"] { min-width: 0; -webkit-appearance: none; appearance: none; }
.filter-row select { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--ground); font-size: 16px; }
.day-card { display: grid; gap: 4px; }
.day-h { font: 400 20px/1.2 var(--serif); }
.sched-l { margin: 10px 0 2px; color: var(--green); }
.duty-list { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 4px 12px; margin: 0; font-size: 15px; }
.duty-list dt { color: var(--muted); }
.duty-list dd { margin: 0; }
mark { background: var(--tile-soft); color: var(--tile-dark); font-weight: 700; border-radius: 4px; padding: 0 3px; }

/* Schedules (coordinators) */
.app.wide { max-width: 1240px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sched { display: grid; gap: 10px; align-content: start; }
.sched h2 { font: 400 21px var(--serif); }
.sched .meta b { color: var(--ink); font-weight: 600; }
.status { display: flex; flex-wrap: wrap; gap: 6px; }
.pill.gap { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--error-soft); color: var(--error); }
.next-up { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.next-up b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.narrow { max-width: 560px; width: 100%; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .spacer { flex: 1; }
.small-check { font-size: 14px; font-weight: 600; align-items: center; }
.small-check input { width: 18px; height: 18px; margin: 0; }
.saved { font-size: 13px; color: var(--green); font-weight: 600; }
.sheet-wrap { overflow: auto; background: var(--ground); border-radius: 16px; max-height: calc(100vh - 120px); }
table.sheet { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.sheet th, .sheet td { border-bottom: 1px solid var(--hairline); border-right: 1px solid var(--hairline); vertical-align: top; text-align: left; }
.sheet thead th { position: sticky; top: 0; background: var(--ground); z-index: 2; padding: 12px 10px 10px; font-weight: 700; border-bottom: 1px solid var(--line); min-width: 140px; }
.sheet thead th small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.sheet .date { position: sticky; left: 0; background: var(--ground); z-index: 1; width: 120px; min-width: 120px; }
.sheet thead th.date { z-index: 3; }
.sheet td.date { padding: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.sheet td.date:hover { color: var(--tile); }
.sheet td.date small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.sheet td.slot { padding: 6px; min-width: 140px; cursor: pointer; }
.sheet td.slot:hover { background: var(--tint); }
.sheet td.slot.has-bad { background: var(--error-soft); }
.sheet td.slot.has-warn { background: var(--warn-tint); }
.sheet td.note { padding: 8px 10px; color: var(--muted); font-size: 13px; min-width: 140px; }
.sheet tr.off td.slot { background: repeating-linear-gradient(135deg, var(--stone), var(--stone) 6px, var(--tint) 6px, var(--tint) 12px); cursor: default; }
.sheet tr.past td { opacity: .6; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--stone); border-radius: 8px; padding: 3px 8px; font-size: 13px; font-weight: 600; line-height: 1.35; }
.chip.bad { background: var(--bad-soft); color: var(--bad-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.suggested { background: var(--ground); outline: 1.5px dashed var(--tile); color: var(--tile-dark); }
.chip.label-chip { background: var(--green-soft); color: var(--green); }
.add { display: inline-flex; align-items: center; border: 1.5px dashed var(--field-line); color: var(--muted); border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw-bad { background: var(--bad-soft); } .sw-warn { background: var(--warn-soft); }
.sw-sugg { outline: 1.5px dashed var(--tile); background: var(--ground); } .sw-empty { border: 1.5px dashed var(--field-line); background: var(--ground); }
.day-cards { display: none; gap: 12px; }
.dcard { background: var(--ground); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.dcard.past { opacity: .65; }
.dcard h3 { font: 400 18px var(--serif); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.drow { display: grid; grid-template-columns: 100px 1fr; gap: 8px; font-size: 14px; align-items: start; text-align: left; background: none; border: 0;
  border-top: 1px solid var(--hairline); padding: 9px 0; cursor: pointer; width: 100%; }
.drow b { color: var(--muted); font-weight: 600; }
.dcard .linkish { padding: 8px 0 0; font-size: 14px; }
@media (max-width: 759px) { .sheet-wrap { display: none; } .day-cards { display: grid; } }

/* Picker */
body.locked { overflow: hidden; }
.scrim { position: fixed; inset: 0; background: rgba(31,43,37,.35); z-index: 20; }
.picker { position: fixed; z-index: 21; background: var(--ground); display: grid; grid-template-rows: auto 1fr auto; box-shadow: -8px 0 40px rgba(0,0,0,.18);
  right: 0; top: 0; bottom: 0; width: min(420px, 100%); }
.picker header { padding: 16px 18px 8px; display: grid; gap: 2px; }
.picker header h2 { font: 400 22px var(--serif); }
.pk-body { overflow-y: auto; min-height: 0; }
.pk-pad { padding: 4px 18px; }
.pk-chosen { list-style: none; margin: 0; padding: 0 18px 8px; display: grid; gap: 6px; }
.pk-chosen li { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.pk-chosen li > span { flex: 1; min-width: 0; }
.pk-search { padding: 4px 18px 8px; position: sticky; top: 0; background: var(--ground); }
.pk-search input { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 11px; padding: 0 12px; font-size: 16px; }
.pk-list { padding: 0 10px 12px; }
.pk-list .group { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 6px; }
.pk-person { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 9px 8px; cursor: pointer; }
.pk-person:hover { background: var(--bg); }
.pk-person[aria-pressed="true"] { background: var(--green-soft); }
.pk-person .tick { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--field-line); display: grid; place-items: center; font-size: 14px; color: #fff; }
.pk-person[aria-pressed="true"] .tick { background: var(--green-bg); border-color: var(--green-bg); }
.pk-label .tick { color: var(--tile); font-weight: 700; }
.pk-person .nm { font-weight: 600; display: block; }
.meta.bad { color: var(--error); font-weight: 600; }
.meta.warn { color: var(--warn); font-weight: 600; }
.meta.sugg { color: var(--tile); font-weight: 600; }
.picker footer { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.picker footer .need { font-size: 13px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 600; z-index: 30; max-width: calc(100% - 32px); }

/* Set up */
.setup { display: grid; gap: 14px; }
.stack { display: grid; gap: 14px; align-content: start; }
.duty-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.duty-table th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px; border-bottom: 1px solid var(--line); }
.duty-table td { padding: 6px; border-bottom: 1px solid var(--hairline); }
.duty-table input { min-height: 40px; border: 1.5px solid var(--field-line); border-radius: 9px; padding: 0 8px; background: var(--ground); width: 100%; min-width: 110px; font-size: 15px; }
.duty-table input.num { width: 70px; min-width: 70px; }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip-list .chip { padding: 4px 4px 4px 10px; font-size: 14px; }
.chip .x { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 6px; font-size: 13px; }
.chip .x:hover { background: var(--error-soft); color: var(--error); }
.pair { display: flex; gap: 8px; }
.pair select { flex: 1; min-width: 0; min-height: 40px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 0 10px; background: var(--ground); font-size: 15px; }
.team { border-top: 1px solid var(--line); padding: 4px 0; }
.team[open] { padding-bottom: 12px; }
.team[open] .chip-list { margin: 6px 0 10px; }
.team summary .meta { display: inline; margin-left: 6px; font-weight: 500; }
/* Two-week overview */
.overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.ov-day { display: grid; gap: 2px; }
.ov-day .duty-list { font-size: 14px; }
.gap-dash { color: var(--faint); }
.overview-link { font-size: 14px; font-weight: 600; text-decoration: none; justify-self: start; }
@media print {
  body { background: #fff; font-size: 12px; }
  .top, .tabbar, .no-print, .flash { display: none !important; }
  .app, .app.wide { max-width: none; padding: 0; }
  .screen { padding: 0; gap: 8px; }
  .overview { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card { padding: 8px 0; border-radius: 0; break-inside: avoid; }
  mark { background: none; color: inherit; font-weight: 700; }
}

.off-week { font-size: 12.5px; color: var(--faint); }
.pk-needed { display: grid; gap: 6px; padding: 2px 18px 12px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.pk-needed .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn { min-height: 36px; padding: 0 12px; border: 1.5px solid var(--field-line); border-radius: 999px; background: var(--ground); color: var(--ink); font-size: 14px; cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: var(--green-bg); border-color: var(--green-bg); color: #fff; font-weight: 600; }

/* Groups */
.grp-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.chip.suggested.bad { outline-color: var(--error); color: var(--error); }
.chip.suggested.warn { outline-color: var(--warn); color: var(--warn); }
.pk-group .nm .pill { margin-left: 6px; vertical-align: 1px; }
.groups { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; display: grid; gap: 10px; }
.groups .label { margin: 0; }
.group-box { background: var(--bg); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.group-head { display: flex; gap: 6px; align-items: center; }
.group-head .grow { flex: 1; min-width: 0; }
.group-name, .group-box .pair input { flex: 1; min-width: 0; min-height: 38px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 0 10px; background: var(--ground); font-size: 15px; }
.group-name { font-weight: 700; }

/* Passage and sermon title */
.slot-in { display: grid; gap: 4px; min-width: 0; }
.sermon { font-size: 12.5px; line-height: 1.35; color: var(--green); font-weight: 600; }
.sheet .sermon { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.sermon.empty { color: var(--faint); font-weight: 500; }
.sermon-line { color: var(--green); font-weight: 600; }
.pk-details { display: grid; gap: 10px; padding: 0 18px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.pk-details .field input { min-height: 44px; }
.pk-details .btn { justify-self: start; }
.duty-table select { min-height: 40px; border: 1.5px solid var(--field-line); border-radius: 9px; padding: 0 8px; background: var(--ground); font-size: 15px; }
.linkish.danger { color: var(--error); border-top: 0; padding: 10px 0 0; font-size: 14px; }
@media (min-width: 900px) { .setup { grid-template-columns: 1.1fr 1fr; align-items: start; } }
/* Reminders per schedule */
.per-schedule { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.sched-pref { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 10px; align-items: center; font-size: 15px; }
.remind-rows { display: grid; gap: 0; margin-bottom: 14px; }
.remind-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.remind-row:first-child { border-top: 0; }
.remind-row b { flex: 1 1 100%; }
.remind-row label { display: grid; grid-template-columns: 72px auto; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.remind-row select { min-height: 40px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 0 8px; background: var(--ground); font-size: 15px; color: var(--ink); }
.duty-rem { padding: 10px 0; border-top: 1px solid var(--line); }
.duty-rem:first-of-type { border-top: 0; padding-top: 2px; }
.duty-rem summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.duty-rem summary::-webkit-details-marker { display: none; }
.duty-rem-h { flex: 1; min-width: 0; font-size: 15px; line-height: 1.35; }
.duty-rem-h .muted { color: var(--muted); font-size: 13px; }
.duty-rem-now { display: block; font-size: 13px; color: var(--muted); }
.duty-rem-change { color: var(--tile); font-weight: 600; font-size: 14px; }
.duty-rem[open] .duty-rem-change { visibility: hidden; }
.duty-rem .sched-pref { grid-template-columns: 84px minmax(0, 1fr); margin-top: 8px; }
.sched-pref select { min-height: 42px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 0 10px; background: var(--ground); font-size: 15px; width: 100%; }
/* Link for a date (e.g. lesson material) */
.mat-link { display: inline-block; font-size: 14px; font-weight: 700; text-decoration: none; margin: 4px 0; }
.mat-link:hover { text-decoration: underline; }
.sheet td.note .mat-link { display: block; font-size: 13px; }
.sheet td.linkcol { padding: 8px 10px; cursor: pointer; white-space: nowrap; min-width: 130px; font-size: 13px; }
.sheet td.linkcol:hover { background: var(--tint); }
.link-set { color: var(--green); font-weight: 700; }
.link-none { color: var(--faint); }
.sheet td.linkcol .mat-link { display: inline; font-size: 12.5px; margin-left: 4px; }
/* My dates: schedules not yet fully planned */
.label-note { font-weight: 600; letter-spacing: .04em; text-transform: none; }
/* My dates: one entry per date, with "Can't make it?" under it */
.day-duties { flex: 1; min-width: 0; display: grid; gap: 8px; }
/* My dates: duty filter, "Next up" and the details a tap away (min-width: 0 keeps the scrolling chip row inside the page) */
#my-dates { min-width: 0; }
.duty-chips { display: flex; gap: 6px; min-width: 0; margin: 2px -16px 14px; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
.duty-chips::-webkit-scrollbar { display: none; }
.duty-chips .seg-btn { flex: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine), (min-width: 700px) { .duty-chips { flex-wrap: wrap; overflow: visible; } }
.next-tag { display: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tile); }
.my-dates li.up-next .next-tag { display: block; }
.my-dates li.up-next { background: var(--bg); border-radius: 14px; padding: 12px; margin: 0 -12px 6px; border-top: 0; }
.my-dates li.up-next + li { border-top: 0; }
.date-more > summary { cursor: pointer; color: var(--tile); font-weight: 600; font-size: 13px; list-style: none; }
.date-more > summary::-webkit-details-marker { display: none; }
.date-more > summary::after { content: ' ›'; }
.date-more[open] > summary { display: none; }
.date-more-body { display: grid; gap: 8px; }
/* Schedule editor: duties from other schedules, read only */
.sheet th.ref, .sheet td.ref { background: var(--tint); color: var(--muted); }
.sheet td.ref { font-size: 13px; vertical-align: top; }
.ref-name { display: block; color: var(--ink); font-weight: 600; }
.ref-info { display: block; font-size: 12.5px; color: var(--muted); }
.ref-when { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); }
.ref-card .ref-when { display: inline; margin-right: 4px; }
.meta-inline { font-weight: 400; color: var(--muted); }
.cal-duties { display: grid; gap: 6px; margin: 4px 0 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-duties .btn { justify-self: start; margin-top: 4px; }
.pill-panel { align-self: start; max-width: 100%; }
.pill-panel > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--green);
  background: var(--green-soft); border-radius: 999px; padding: 6px 12px; max-width: 100%; }
.pill-panel > summary::-webkit-details-marker { display: none; }
.pill-panel .pill-sum { color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-panel .chev { width: 14px; height: 14px; flex: none; transition: transform .15s; }
.pill-panel[open] .chev { transform: rotate(90deg); }
.pill-panel .pill-body { background: var(--ground); border-radius: 16px; padding: 14px 16px; margin-top: 8px; }
.cal-add { display: grid; gap: 8px; }
.cal-add .btn { flex-direction: column; gap: 0; padding: 8px 18px; }
.cal-add .btn small { display: block; font-size: 12px; font-weight: 500; opacity: .85; }
.cal-add .cal-other { justify-self: start; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }
.copy-row .btn { flex: none; }
.cal-help > summary { cursor: pointer; color: var(--tile); font-weight: 600; font-size: 14px; }
.cal-help ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.busy-cell { min-width: 190px; }
.busy-times { display: flex; align-items: center; gap: 4px; }
.duty-table .busy-times input { min-width: 0; width: 88px; padding: 0 4px; }
.busy-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.service-times > summary { cursor: pointer; }
.compat-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.compat-add select { width: 100%; }
.bday-scope { display: grid; gap: 8px; margin: 4px 0 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bday-scope small { display: block; color: var(--muted); font-size: 13px; }
.bday-scope .btn { justify-self: start; }
.svc-head { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tile); margin-top: 2px; }
.svc-head.pm { color: var(--green); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.svc-band { font-size: 12.5px; margin: 10px 0 0; }
.svc-band.pm { margin-top: 14px; padding-top: 12px; }
.self-details > summary { cursor: pointer; color: var(--tile); font-weight: 600; font-size: 13px; list-style: none; display: inline-block; margin-top: 2px; }
.self-details > summary::-webkit-details-marker { display: none; }
.self-details[open] > summary { display: none; }
.self-details .form { display: grid; gap: 8px; margin-top: 6px; }
.self-details .btn { justify-self: start; }
.check.self-edit { margin-top: 4px; font-size: 12.5px; white-space: nowrap; }
.ref-card { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--tint); font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.ref-card p { margin: 0; }
.ref-card .ref-label { font-weight: 700; color: var(--muted); }
.ref-card .ref-name, .ref-card .ref-info { display: inline; }
.ref-card .ref-name + .ref-name::before { content: ', '; }
.ref-card .ref-info::before { content: ' · '; }
.along-group { border-top: 1px solid var(--line); padding: 8px 0; }
.along-group summary { cursor: pointer; font-weight: 600; }
.along-group[open] summary { margin-bottom: 6px; }
.along-group .check { display: flex; margin: 4px 0; }
.more-dates span:not([hidden]) ~ span:not([hidden])::before { content: ', '; }
.no-svc-tag { display: block; font-size: 13px; font-weight: 600; color: var(--warn); }
.my-dates li.no-svc .duty-line b { color: var(--muted); text-decoration: line-through; }
.duty-line b { display: block; }
.cant summary { cursor: pointer; color: var(--tile); font-weight: 600; font-size: 14px; padding: 2px 0; }
.cant-row { display: grid; gap: 6px; padding: 6px 0 2px; justify-items: start; }
.cant-wa { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-wa { background: #25D366; color: #fff; }
.cant-mail { font-size: 14px; }
/* Find a swap */
.swap-list { list-style: none; margin: 8px 0 0; padding: 0; }
.swap-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.swap-row:first-child { border-top: 0; }
.swap-row form { flex: none; }
.swap-row .asked { color: var(--green); font-weight: 600; }
.swap-row .busy { color: var(--warn); }
#swap-search { margin-top: 4px; }
.card .search { position: static; background: none; padding: 4px 0 0; }
.swap-waiting { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; margin: 4px 0 0; }
.linkish-inline { background: none; border: 0; padding: 0; color: var(--tile); font-weight: 600; font-size: 13px; cursor: pointer; }
.swap-page .row-actions { margin-top: 8px; }
/* Orders of service */
.pill.ok { background: var(--green-soft); color: var(--green); }
.order-day { display: grid; gap: 4px; }
.order-svc { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.order-svc:first-of-type { border-top: 0; }
.order-svc .pill { margin-left: 6px; }
.order-actions { display: flex; gap: 6px; }
.order-list, .order-view { list-style: none; margin: 0; padding: 0; }
.order-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.order-item:first-child { border-top: 0; }
.order-item .num, .order-view .num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.order-item .what { flex: 1; min-width: 0; display: grid; gap: 2px; }
.order-item.is-hidden { opacity: .55; }
.order-item.is-empty .num { background: var(--warn-soft); color: var(--warn); }
.item-tools { flex: none; display: flex; gap: 2px; }
.item-tools button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--ground); border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--ink); }
.item-tools button:disabled { opacity: .3; cursor: default; }
.key-form { display: inline-flex; gap: 6px; align-items: center; margin-top: 2px; }
.key-form select, .song-row .key-form select { min-height: 34px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--ground); font-size: 14px; }
.other-form { display: flex; gap: 6px; flex: 1; }
.other-form input { flex: 1; min-width: 0; width: 0; min-height: 38px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--ground); font-size: 15px; }
.order-add { display: grid; gap: 8px; }
.order-view li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.order-view li:first-child { border-top: 0; }
.song-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 6px; background: var(--stone); color: var(--muted); vertical-align: 2px; }
.key-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--stone); color: var(--ink); margin-right: 6px; }
.song-list .swap-row form { display: flex; align-items: center; gap: 4px; }
.song-row { align-items: flex-start; }
.song-edit { flex: 1; min-width: 0; }
.song-edit summary { cursor: pointer; list-style: none; display: grid; gap: 2px; }
.song-edit summary::-webkit-details-marker { display: none; }
.add-song summary { cursor: pointer; font-weight: 700; color: var(--tile); }
.saved-flash { border-color: var(--green-bg) !important; }
.order-link { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 600; }
.head-actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* Serving preferences (Set up) */
.pref { border-top: 1px solid var(--line); padding: 10px 0; }
.pref summary { cursor: pointer; display: grid; gap: 2px; }
.duty-table td.center { text-align: center; }
.fill-hint { flex-basis: 100%; font-size: 12px; color: var(--faint); line-height: 1.4; }
.removed-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.danger-text { color: var(--error); }
.svc-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px; background: var(--green-soft); color: var(--green); vertical-align: 2px; }
.special-day { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tile); margin: 0; }
@media print {
  .order-view li { padding: 4px 0; }
  .order-view .num { background: none; border: 1px solid #999; }
}
/* Full schedule: schedule and time span side by side; printing is for larger screens */
.full-tools { display: flex; gap: 8px; align-items: center; }
.full-tools select { flex: 1 1 0; min-width: 0; }
@media (max-width: 699px) { .print-btn { display: none; } }
.fill-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fill-weeks { min-height: 34px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--ground); font-size: 14px; }
/* Printing the schedule editor: just the grid, every row, without the buttons */
@media print {
  .sheet-wrap { display: block !important; overflow: visible; max-height: none; border-radius: 0; background: none; }
  .day-cards, .toolbar, .pager, .legend, .picker, .scrim, .toast, .sheet-wrap + .note, #sheet-wrap ~ .note { display: none !important; }
  .sheet { font-size: 10px; }
  .sheet .add, .sheet .sermon.empty, .sheet .link-none { display: none; }
  .sheet .chip { border: 0; background: none; padding: 0; }
  .sheet th, .sheet td { padding: 3px 4px; }
  /* A full outer border (cells only draw right and bottom lines), nothing pinned in place (that clipped the top and
     left edges), the column headings repeated on every page, and rows never split across two pages */
  table.sheet { border-top: 1px solid #ccc; border-left: 1px solid #ccc; }
  .sheet th, .sheet td { border-color: #ccc; }
  .sheet thead th, .sheet .date { position: static; min-width: 0; }
  .sheet td.slot, .sheet td.note, .sheet td.linkcol { min-width: 0; }
  .sheet thead { display: table-header-group; }
  .sheet tr { break-inside: avoid; page-break-inside: avoid; }
  .sheet .sermon { white-space: normal; max-width: none; }
}
/* Tucked-away extras */
.sched-timing summary, .log-more summary { cursor: pointer; color: var(--tile); font-weight: 600; font-size: 14px; padding: 6px 0; }
.saved-note { margin-left: 6px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--green); }
/* Prayer requests */
.prayer-card { display: flex; align-items: center; gap: 12px; background: var(--green-soft); color: var(--green); text-decoration: none; padding: 14px 16px; }
.prayer-card b { display: block; font: 400 19px/1.2 var(--serif); color: var(--green); }
.prayer-card small { display: block; font-size: 14px; color: var(--ink); margin-top: 2px; }
.prayer-card .chev { font-size: 24px; margin-left: auto; }
.prayer-card:hover b { text-decoration: underline; }
.prayer-list .note { margin-top: -4px; }
.prayer-item { padding: 14px 0; border-top: 1px solid var(--line); }
.prayer-item:first-of-type { margin-top: 10px; }
.prayer-item .pi-tags { margin-bottom: 5px; }
.prayer-item h2 { font: 400 17.5px/1.3 var(--serif); color: var(--green); margin: 0 0 4px; }
.prayer-item p { margin: 0; }
.prayer-item .pi-body { font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prayer-item .pi-body.open { display: block; }
.prayer-item .pi-foot { display: flex; gap: 10px; align-items: baseline; margin-top: 6px; }
.prayer-item .pi-more { border: 0; background: none; padding: 0; font: 600 13px var(--sans); color: var(--tile); cursor: pointer; }
.prayer-item .meta { font-size: 12.5px; color: var(--muted); }
.prayer-item > .item-edit > summary { font-size: 13px; padding: 4px 0 0; }
.prayer-item > .item-edit[open] > .form { margin-top: 8px; }
.ptag { display: inline-block; font: 600 11px/1 var(--sans); letter-spacing: .02em; padding: 3px 7px; border-radius: 999px; margin-right: 6px; vertical-align: 2px; }
.ptag.praise { background: var(--green-soft); color: var(--green); }
.ptag.request { background: var(--warn-soft); color: var(--warn); }
.ptag-pick { display: flex; gap: 18px; }
.show-older { margin-top: 10px; }
.item-edit.dropped { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.item-edit > summary { cursor: pointer; color: var(--tile); font-weight: 600; font-size: 13px; padding: 4px 0; list-style: none; }
.item-edit > summary::-webkit-details-marker { display: none; }
.item-edit .form { display: grid; gap: 8px; margin-top: 6px; }
.item-edit .row-btns { display: flex; gap: 8px; }
.item-add { border-top: 1px solid var(--line); padding-top: 10px; }
.item-add .note { margin-top: 8px; }
.link-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 14px 16px; }
.link-card b { display: block; font-weight: 700; }
.link-card small { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.link-card .chev { font-size: 24px; margin-left: auto; color: var(--tile); }
.link-card:hover b { color: var(--tile); }
.verse { margin: 0; font: 400 18px/1.4 var(--serif); color: var(--green); background: none; padding: 4px 4px 0; }
.verse cite { display: block; font: 600 13px var(--sans); color: var(--muted); font-style: normal; margin-top: 6px; }
.more-opts { font-size: 14px; font-weight: 600; text-decoration: none; }
/* Schedules split by service: one row per service under each date */
.sheet td.svc { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; white-space: nowrap; background: var(--tint); }
.sheet th.svc-h { min-width: 0; width: 1px; }
.sheet.by-service tr.first-svc td { border-top: 2px solid var(--line); }
.sheet.by-service tbody tr:first-child td { border-top: 0; }
.sheet td.slot.na { color: var(--field-line); text-align: center; vertical-align: middle; cursor: default; background: var(--tint); }
.dcard .svc-label { margin: 10px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
/* Full schedule: range + Print, and a clean two-column printout */
.range-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.full-days { display: grid; gap: 14px; }
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  .print-title { font: 400 18px var(--serif); margin: 0 0 8px; }
  .full-days { display: block; column-count: 2; column-gap: 20px; }
  .full-days .day-card { break-inside: avoid; margin: 0 0 10px; padding: 0 0 8px; border-bottom: 1px solid #ccc; }
  .full-days .day-h { font-size: 15px; }
  .full-days .duty-list { font-size: 11px; }
  /* Passages, sermon titles, notes and links: the same size as the names, not the larger on-screen size */
  .full-days .meta, .full-days .mat-link { font-size: 10px; }
  .full-days .sched-l { font-size: 10px; }
  .mat-link::after { content: ''; }
}
/* Lesson title and passage in the Lesson material column */
.sheet td.linkcol { white-space: normal; min-width: 190px; max-width: 260px; }
.sheet td.linkcol .mat-link.lesson { display: inline; margin: 0; font-size: 13px; line-height: 1.35; }
.lesson-passage { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
/* A booking at a service that isn't happening (e.g. no evening service) */
.chip.cancelled { text-decoration: line-through; background: var(--warn-soft); color: var(--warn); }
.off-week.warn-off { color: var(--warn); font-weight: 600; }
/* Admin › Bulletin */
.bulletin-list .bl-date { display: inline-block; min-width: 88px; color: var(--muted); }
.bulletin-text { width: 100%; font: 13px/1.5 ui-monospace, Consolas, monospace; border: 1.5px solid var(--field-line); border-radius: 12px; padding: 10px 12px; background: var(--ground); resize: vertical; }
.log li { flex-wrap: wrap; }
.log li > span:first-child { flex: 1 1 100%; }
.log .log-by { font-size: 13px; color: var(--muted); margin-right: auto; }

/* Short names in the editor's table on busy schedules: "Stephen M" on screen; full names on phones (day cards) and when printed */
.nm-full { display: none; }
.day-cards .nm-short { display: none; }
.day-cards .nm-full { display: inline; }
/* Printing follows the schedule's own name format (Set up › Names in the schedule table) */

/* Schedules page: New schedule and Archived tucked away */
.more-sched > summary { cursor: pointer; color: var(--tile); font-weight: 600; font-size: 14px; }
.more-sched .away-row form { display: inline-flex; gap: 6px; flex-wrap: wrap; }
/* Admin › Accounts: sort */
.acct-sort { margin: 0 0 10px; }

/* Why a suggestion was made, when it keeps a family together: small and quiet, gone once confirmed */
.why-fam { display: block; font-size: 11px; line-height: 1.25; color: var(--faint); white-space: nowrap; }
@media print { .why-fam { display: none; } }

/* Coming back to a team or group after a change: clear of the sticky header */
.team, .group-box { scroll-margin-top: 72px; }

/* Home: "See all my dates" on its own line on phones */
@media (max-width: 599px) { .next .more .more-sep { display: none; } .next .more .see-all { display: block; margin-top: 4px; } }
/* Home: celebration names open the family in the directory */
.cel-name { color: inherit; text-decoration: none; }
.cel-name:hover b, .cel-name:focus b { color: var(--tile); text-decoration: underline; }
.household { scroll-margin-top: 130px; }

/* Bible studies */
.map { position: relative; height: 260px; border-radius: 16px; overflow: hidden; background: var(--stone); touch-action: none; user-select: none; }
.map.small { height: 190px; }
.map-layer { position: absolute; inset: 0; }
.map-tile { position: absolute; width: 256px; height: 256px; max-width: none; }
.map-pin { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--tile-bg); color: #fff; font: 700 12px var(--sans); text-decoration: none; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); z-index: 2; }
.map-pin.dot { width: 22px; height: 22px; }
.map-zooms { position: absolute; top: 8px; left: 8px; display: grid; z-index: 3; box-shadow: 0 1px 4px rgba(0,0,0,.2); border-radius: 8px; overflow: hidden; }
.map-zoom { width: 32px; height: 32px; border: 0; background: var(--ground); font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink); }
.map-zoom + .map-zoom { border-top: 1px solid var(--line); }
.map-credit { position: absolute; right: 0; bottom: 0; z-index: 3; background: rgba(255,255,255,.85); font-size: 11px; padding: 1px 6px; color: var(--muted); }
.studies { display: grid; gap: 10px; }
.study-row { display: flex; align-items: center; gap: 12px; background: var(--ground); border-radius: 16px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.study-ph { width: 80px; height: 60px; border-radius: 12px; flex: none; overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 22px; }
.study-ph img { width: 100%; height: 100%; object-fit: cover; }
.study-ph.big { width: 120px; height: 90px; }
.study-txt { min-width: 0; }
.study-txt b { display: block; font-size: 16px; line-height: 1.3; }
.study-txt small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; margin-top: 2px; }
.study-row .chev { margin-left: auto; color: var(--muted); font-size: 22px; }
.pin-n { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--tile-bg); color: #fff; font-size: 11px; margin-right: 6px; vertical-align: 2px; }
.study-hero { display: block; width: 100%; height: auto; border-radius: 16px; }
.study-facts { display: grid; gap: 12px; }
.study-facts > div { display: flex; gap: 10px; align-items: flex-start; }
.study-facts .ico { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--green); }
.study-facts b { display: block; }
.study-facts small { display: block; font-size: 14px; margin-top: 2px; }
.study-leaders { display: grid; gap: 12px; }
.study-leader { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; }
.study-leader .contact { grid-column: 2; }
.study-who { margin: 0; line-height: 1.5; }

/* Bible studies: "I'd like to join" opens the leaders' links */
.join-card > summary { list-style: none; cursor: pointer; }
.join-card > summary::-webkit-details-marker { display: none; }
.join-card[open] > summary { opacity: .85; }
.join-links { display: grid; gap: 8px; margin-top: 8px; }
.join-links .btn { justify-content: center; gap: 8px; }
/* Me: a short menu; each row opens its own page */
.me-profile { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.me-profile .face { width: 56px; height: 56px; font-size: 19px; }
.me-profile b { display: block; font: 400 21px/1.2 var(--serif); }
.me-profile .go { display: block; color: var(--tile); font-weight: 600; font-size: 14px; }
.me-profile small { display: block; color: var(--muted); font-size: 13.5px; }
.me-profile .txt, .me-row .txt { flex: 1; min-width: 0; }
.me-profile .chev, .me-row .chev { color: var(--faint); font-size: 24px; line-height: 1; }
.me-label { margin: 6px 4px -6px; }
.me-menu { padding: 0; }
.me-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; text-decoration: none; color: var(--ink); }
.me-row + .me-row { border-top: 1px solid var(--hairline); }
.me-row b { display: block; font-weight: 600; }
.me-row small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.me-row:hover b, .me-profile:hover b { color: var(--tile); }
.me-row .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.me-row .ic .ico { width: 19px; height: 19px; }
.me-row .ic.blue { background: var(--blue-soft); color: var(--blue); } .me-row .ic.warn { background: var(--warn-soft); color: var(--warn); }
.me-row .ic.tile { background: var(--tile-soft); color: var(--tile); } .me-row .ic.green { background: var(--green-soft); color: var(--green); }
.me-row .ic.grey { background: var(--stone); color: var(--muted); }
.me-h { font: 400 22px/1.2 var(--serif); margin: 10px 0 0; }
.study-when { display: block; font-weight: 700; color: var(--green); font-size: 14.5px; margin-top: 2px; }
.study-when small { display: inline; font-weight: 500; color: var(--muted); margin: 0; }

/* Set up: a team's first choice for a duty */
.chip .star { border: 0; background: none; cursor: pointer; color: var(--faint); padding: 0 2px 0 0; font-size: 15px; line-height: 1; }
.chip.first-choice { background: var(--warn-soft); }
.chip.first-choice .star { color: var(--warn); }
/* Directory: church members are marked (nothing is shown for others) */
.member-tag { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }


/* Directory: Families | Bible studies */
.seg.seg-full { display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; gap: 0; }
.seg.seg-full a { text-align: center; }

/* Calendar: the month grid (a band across a longer event's days, a green dot for my serving), then the month's list */
.month-cal { display: grid; gap: 10px; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; }
.cal-month { font: 400 22px/1.2 var(--serif); }
.cal-step { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--tile); font-size: 22px; text-decoration: none; }
.cal-step.off { color: var(--line); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; text-align: center; }
.cal-grid .dow { font-size: 11px; font-weight: 700; color: var(--faint); padding-bottom: 2px; }
.cal-grid .d { position: relative; height: 40px; display: grid; place-items: center; font-size: 15px; color: var(--ink); text-decoration: none; }
.cal-grid .d > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; position: relative; z-index: 1; }
.cal-grid .d.past { color: var(--faint); }
.cal-grid .d.today > span { box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; }
.cal-grid a.d { font-weight: 700; }
.cal-grid .d.ev > span, .cal-grid .d.band > span { background: var(--tile-soft); color: var(--tile); }
.cal-grid .d.past.ev > span, .cal-grid .d.past.band > span, .cal-grid .d.past.band::before { opacity: .55; }
.cal-grid .d.band::before { content: ''; position: absolute; top: 2px; bottom: 2px; left: 0; right: 0; background: var(--tile-soft); }
.cal-grid .d.band.start::before { left: 50%; }
.cal-grid .d.band.end::before { right: 50%; }
.cal-grid .d.band.row-start:not(.start)::before { left: 2px; border-radius: 18px 0 0 18px; }
.cal-grid .d.band.row-end:not(.end)::before { right: 2px; border-radius: 0 18px 18px 0; }
.cal-grid .d.sv::after { content: ''; position: absolute; bottom: 1px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--green); z-index: 2; }
.cal-grid .d.sel > span { outline: 2px solid var(--tile); outline-offset: -2px; }
.cal-key { display: flex; gap: 16px; justify-content: center; margin: 0; font-size: 12.5px; color: var(--muted); }
.cal-key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.cal-key .k-ev { background: var(--tile-soft); box-shadow: inset 0 0 0 1.5px var(--tile); }
.cal-key .k-sv { background: var(--green); }
.cal-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 16px; }
.cal-switch .sw { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; flex: none; }
.cal-switch .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.cal-switch[aria-checked="true"] .sw { background: var(--green-bg); }
.cal-switch[aria-checked="true"] .sw::after { left: 21px; }
.cal-list { padding: 2px 0; }
.cal-item { display: block; padding: 10px 14px; scroll-margin-top: 70px; }
.cal-item + .cal-item { border-top: 1px solid var(--stone); }
.cal-item summary { list-style: none; cursor: pointer; }
.cal-item summary::-webkit-details-marker { display: none; }
.cal-item summary, .cal-item.serve { display: flex; gap: 12px; align-items: flex-start; }
.cal-item:target, .cal-item.hl { background: var(--tint); }
.cal-date { width: 50px; flex: none; text-align: center; border-radius: 10px; padding: 4px 0 5px; background: var(--tile-soft); color: var(--tile); }
.cal-date b { display: block; font-size: 19px; line-height: 1.1; white-space: nowrap; }
.cal-date.span b { font-size: 16px; padding-top: 2px; }
.cal-date small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.cal-item .txt { flex: 1; min-width: 0; padding-top: 1px; }
.cal-item .txt b { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.cal-item .txt small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.cal-item.serve .cal-date { background: var(--green-soft); color: var(--green); }
.cal-item.serve .txt b { font-weight: 500; }
.cal-item.serve .txt small + b { margin-top: 4px; }
.cal-item .tag { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green); margin-bottom: 2px; }
.cal-note { margin: 6px 0 0 62px; font-size: 14px; }
.cal-empty { text-align: center; }
.cal-foot { display: grid; gap: 6px; justify-items: center; }
.ev-admin { list-style: none; margin: 0; padding: 0; }
.ev-admin li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ev-admin li:first-child { border-top: 0; padding-top: 0; }
.ev-admin small { display: block; color: var(--muted); font-size: 13px; }
.ev-admin a { font-weight: 600; font-size: 14px; text-decoration: none; }
.ev-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-hint { margin-top: -6px; }

/* ---- Dark theme: follows the phone's setting ("Auto"), or Light / Dark chosen under Me. Screens only: printing stays light. ---- */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --ground: #1d2420; --bg: #131815; --stone: #252d29; --ink: #ece6dc; --muted: #a2aaa5; --line: #323b36; --blue: #9cc0dd; --blue-soft: #1c2630;
  --green: #a8cbb6; --green-soft: #1c2c24; --tile: #e88a64; --tile-dark: #f19e7c; --tile-soft: #2b201b;
  --warn: #e9c46a; --warn-soft: #2e2716; --error: #f28b82; --error-soft: #331c1a;
  --green-bg: #2f5544; --tile-bg: #b9532e; --tile-bg-hover: #c9603a; --top-bg: rgba(19,24,21,.94);
  --field-line: #46514b; --hairline: #2a322e; --faint: #7d8781; --tint: #212924; --warn-tint: #2a2618; --bad-soft: #4a2320; --bad-ink: #ffb4ab;
  color-scheme: dark;
  }
:root:not([data-theme="light"]) .next { background: #233d30; }
:root:not([data-theme="light"]) .next .label { color: #9fc2ad; }
:root:not([data-theme="light"]) .celebrate .later { border-top-color: rgba(232,138,100,.22); }
:root:not([data-theme="light"]) .card { box-shadow: 0 0 0 1px rgba(255,255,255,.03); }
:root:not([data-theme="light"]) .face { filter: saturate(.9) brightness(.95); }
:root:not([data-theme="light"]) .scrim { background: rgba(0,0,0,.55); }
:root:not([data-theme="light"]) .map img { filter: brightness(.85); }
}
@media screen {
  :root[data-theme="dark"] {
  --ground: #1d2420; --bg: #131815; --stone: #252d29; --ink: #ece6dc; --muted: #a2aaa5; --line: #323b36; --blue: #9cc0dd; --blue-soft: #1c2630;
  --green: #a8cbb6; --green-soft: #1c2c24; --tile: #e88a64; --tile-dark: #f19e7c; --tile-soft: #2b201b;
  --warn: #e9c46a; --warn-soft: #2e2716; --error: #f28b82; --error-soft: #331c1a;
  --green-bg: #2f5544; --tile-bg: #b9532e; --tile-bg-hover: #c9603a; --top-bg: rgba(19,24,21,.94);
  --field-line: #46514b; --hairline: #2a322e; --faint: #7d8781; --tint: #212924; --warn-tint: #2a2618; --bad-soft: #4a2320; --bad-ink: #ffb4ab;
  color-scheme: dark;
  }
:root[data-theme="dark"] .next { background: #233d30; }
:root[data-theme="dark"] .next .label { color: #9fc2ad; }
:root[data-theme="dark"] .celebrate .later { border-top-color: rgba(232,138,100,.22); }
:root[data-theme="dark"] .card { box-shadow: 0 0 0 1px rgba(255,255,255,.03); }
:root[data-theme="dark"] .face { filter: saturate(.9) brightness(.95); }
:root[data-theme="dark"] .scrim { background: rgba(0,0,0,.55); }
:root[data-theme="dark"] .map img { filter: brightness(.85); }
}
.theme-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.theme-pick label { flex: 1; min-width: 90px; }
.theme-pick input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick span { display: block; text-align: center; padding: 10px 12px; border: 1.5px solid var(--field-line); border-radius: 12px; font-weight: 600; cursor: pointer; }
.theme-pick input:checked + span { border-color: var(--tile); color: var(--tile); background: var(--tile-soft); }
.theme-pick input:focus-visible + span { outline: 3px solid var(--tile); outline-offset: 2px; }

/* Directory: attendees and non-members outside member families (admins and coordinators) */
.outside-dir { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.outside-dir > summary { display: flex; align-items: center; gap: 10px; justify-content: space-between; list-style: none; cursor: pointer; padding: 6px 2px 12px; }
.outside-dir > summary::-webkit-details-marker { display: none; }
.outside-dir > summary .sub { display: block; margin: 2px 0 0; font-size: 13.5px; }
.outside-dir[open] > summary .chev { transform: rotate(90deg); }
.outside-dir .household { background: var(--tint); }

/* Non-member and no-account tags (team chips, schedule editor) */
.who-tag { font: 700 10.5px/1 var(--sans); letter-spacing: .02em; padding: 3px 6px; border-radius: 999px; white-space: nowrap; }
.who-tag.nonmem { background: var(--warn-soft); color: var(--warn); }
.who-tag.noacc { background: var(--ground); color: var(--muted); border: 1px solid var(--line); }
.who-key { display: grid; gap: 4px; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.who-key span { display: flex; gap: 6px; align-items: baseline; }
.mk-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; }
.mk-dot.noacc { background: var(--ground); border: 1.5px solid var(--muted); }
.chip .mk-dot { margin-right: 1px; }
.new-person { margin-top: 8px; }
.new-person > summary { display: inline-block; color: var(--tile); font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; padding: 4px 0; }
.new-person > summary::-webkit-details-marker { display: none; }
.new-person form { margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--tint); }
@media print { .mk-dot { display: none; } }
.no-reminders { font-weight: 400; font-size: 14px; margin: 0; }

/* Roster health: a dashboard (admins: all schedules; coordinators: just theirs) */
.rh-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; justify-content: space-between; }
.rh-kick { font: 700 12.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rh-head .h1 { font-size: 40px; margin: 2px 0 0; }
.rh-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rh-mine { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rh-mine > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; padding: 4px 10px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); }
.rh-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.rh-tile { background: var(--ground); border-radius: 18px; padding: 18px 20px; }
.rh-tile b { display: block; font: 400 36px/1 var(--serif); margin-bottom: 8px; }
.rh-tile strong { display: block; font-size: 16px; }
.rh-tile span { font-size: 14px; color: var(--muted); }
.rh-tile.bad b { color: var(--error); } .rh-tile.warn b { color: var(--warn); } .rh-tile.ok b { color: var(--green); }
.rh-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.rh-main > div, .rh-side { display: grid; gap: 18px; }
.rh-card { padding: 20px 22px; border-radius: 20px; }
.rh-card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rh-card-h h2 { font: 400 25px/1.2 var(--serif); margin: 0; }
.rh-card-h .meta { color: var(--muted); font-size: 15px; }
table.rh-g { border-collapse: separate; border-spacing: 7px; table-layout: fixed; margin: -7px; width: calc(100% + 14px); }
.rh-g col.role { width: 200px; }
.rh-g th { font: 700 12.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 14px 2px; }
.rh-g td.r { padding: 0 14px; vertical-align: top; }
.rh-g td.r b { display: block; font-size: 15.5px; line-height: 1.3; }
.rh-g td.r small { color: var(--muted); font-size: 13px; }
.rh-g tr.sec td { font: 700 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 14px 0; }
.rh-g tr.sec td .pill { text-transform: none; letter-spacing: 0; margin-left: 4px; }
.rh-c { border-radius: 12px; vertical-align: top; font-size: 13.5px; position: relative; padding: 0; }
.rh-c > details > summary, .rh-c > span { display: block; padding: 9px 13px; list-style: none; cursor: pointer; border-radius: 12px; }
.rh-c > details > summary::-webkit-details-marker { display: none; }
.rh-c b { display: block; font-size: 15.5px; line-height: 1.3; }
.rh-c .p { display: block; color: var(--muted); }
.rh-c .x { display: block; font-weight: 700; font-size: 12.5px; }
.rh-c.ok { background: var(--green-soft); } .rh-c.ok b, .rh-c.ok .rh-chip { color: var(--green); }
.rh-c.bad { background: var(--error-soft); } .rh-c.bad b, .rh-c.bad .x, .rh-c.bad .rh-chip { color: var(--error); }
.rh-c.warn { background: var(--warn-soft); } .rh-c.warn b, .rh-c.warn .x, .rh-c.warn .rh-chip { color: var(--warn); }
.rh-c.off { background: var(--stone); color: var(--muted); }
.rh-c.off > span { cursor: default; }
.rh-c .rh-chip { font-weight: 700; font-size: 14.5px; }
.rh-c.ok .rh-chip { font-weight: 600; }
.rh-pop { position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); width: 280px; background: var(--ground); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 14px; color: var(--ink); }
.rh-pop ul { margin: 0 0 8px; padding-left: 18px; }
.rh-pop a { color: var(--tile); font-weight: 700; text-decoration: none; }
.rh-hint { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; }
.rh-side h2 { font: 400 25px/1.2 var(--serif); margin: 0 0 14px; }
.rh-att { display: grid; gap: 12px; }
.rh-att-i { border-radius: 14px; padding: 13px 15px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14.5px; }
.rh-att-i.bad { background: var(--error-soft); } .rh-att-i.warn { background: var(--warn-soft); } .rh-att-i.info { background: var(--tint); border: 1px solid var(--line); }
.rh-att-i .ico-t { font-size: 16px; line-height: 1.35; font-weight: 700; }
.rh-att-i.bad .ico-t { color: var(--error); } .rh-att-i.warn .ico-t { color: var(--warn); } .rh-att-i.info .ico-t { color: var(--muted); }
.rh-att-i b { display: block; font-size: 15.5px; }
.rh-att-i span { color: var(--muted); }
.rh-att-i a { display: inline-block; margin-top: 3px; color: var(--tile); font-weight: 700; }
.rh-att-i details summary { cursor: pointer; list-style: none; }
.rh-att-i details summary::-webkit-details-marker { display: none; }
.rh-att-i ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.rh-att-i li span a { margin: 0; font-weight: 600; }
.rh-rules { background: var(--green-soft); border-radius: 20px; padding: 18px 22px; font-size: 14.5px; color: var(--green); }
.rh-rules p { margin: 0; }
.rh-rules .k { font: 700 12.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.rh-weekpick { display: none; }
@media (max-width: 860px) {
  .rh-head .h1 { font-size: 32px; }
  .rh-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rh-tile { padding: 12px 14px; border-radius: 14px; }
  .rh-tile b { font-size: 26px; margin-bottom: 4px; }
  .rh-tile strong { font-size: 14.5px; line-height: 1.25; }
  .rh-tile span { font-size: 13px; }
  .rh-main { grid-template-columns: 1fr; }
  .rh-side { order: -1; }
  .rh-card { padding: 16px; border-radius: 16px; }
  .rh-weekpick { display: flex; position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 8px 0; gap: 6px; overflow-x: auto; }
  .rh-weekpick button { flex: 1 0 auto; border: 1.5px solid var(--line); background: var(--ground); border-radius: 999px; padding: 7px 12px; font: 700 14px var(--sans); color: var(--muted); cursor: pointer; }
  .rh-weekpick button[aria-pressed="true"] { background: var(--green-bg); border-color: var(--green-bg); color: #fff; }
  .rh-weekpick i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 6px; vertical-align: 1px; }
  .rh-weekpick .bad i { background: var(--error); } .rh-weekpick .warn i { background: #d9a400; } .rh-weekpick .ok i { background: #6fa784; }
  .rh-weekpick [aria-pressed="true"] i { box-shadow: 0 0 0 2px #fff; }
  table.rh-g { border-spacing: 0 6px; margin: -6px 0; width: 100%; table-layout: auto; }
  .rh-g colgroup, .rh-g thead { display: none; }
  .rh-g td.r { width: 44%; padding: 8px 10px 8px 0; }
  .rh-g td.r b { font-size: 14.5px; }
  .rh-g tr.sec td { padding: 8px 0 0; }
  .rh-g [data-w]:not(.on) { display: none; }
  .rh-pop { left: auto; right: 0; width: 250px; }
}
/* Home: your next dates, then shortcut tiles */
.shortcuts { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.sc { display: grid; justify-items: center; align-content: start; gap: 7px; padding: 13px 6px 11px; border-radius: 14px; background: var(--ground);
  box-shadow: 0 1px 2px rgba(0,0,0,.05); text-align: center; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--ink); text-decoration: none; }
.sc .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.sc:hover { box-shadow: 0 0 0 2px var(--line); }
.sc-pray .ic { background: var(--green-soft); color: var(--green); } .sc-away .ic { background: var(--tile-soft); color: var(--tile); }
.sc-order .ic { background: var(--blue-soft); color: var(--blue); }
.admin-link { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.admin-link:hover { box-shadow: 0 0 0 2px var(--line); }
.admin-link .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--stone); color: var(--muted); }
.admin-link b { display: block; font-size: 15px; }
.admin-link small { display: block; font-size: 13px; color: var(--muted); }
.my-next { display: grid; }
.nd { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; align-items: start; }
.my-next .label + .nd { border-top: 0; padding-top: 4px; }
.cal-chip { display: grid; text-align: center; border-radius: 12px; overflow: hidden; background: var(--tint); border: 1px solid var(--line); }
.cal-chip .m { background: var(--stone); color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.9; }
.cal-chip .d { font-family: var(--serif); font-size: 23px; line-height: 1.15; padding-top: 2px; }
.cal-chip .w { font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1.5; padding-bottom: 3px; }
.nd.first .cal-chip .m { background: var(--tile); color: #fff; }
.nd.first .cal-chip { border-color: var(--tile-soft); }
.nd-body { display: grid; gap: 1px; min-width: 0; }
.nd-body .soon { font-size: 12px; font-weight: 700; color: var(--green); }
.nd-duties { font-size: 15.5px; line-height: 1.35; }
.nd-body small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-bottom: 3px; }
.nd-all { display: block; text-align: center; padding-top: 11px; border-top: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--tile); text-decoration: none; }
button.sc { border: 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sc.not-ready { color: var(--muted); }
.sc.not-ready .ic { position: relative; opacity: .75; }
.sc-tag { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 6px; border-radius: 999px; background: var(--stone); color: var(--muted); border: 1.5px solid var(--bg); }
.sc-note { margin: -4px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--ground); font-size: 14px; color: var(--muted); }

/* Membership application form (the secret link, and elders typing in a paper form) */
.plain .box.wide { max-width: 760px; }
.ma-form { gap: 16px; }
.ma-h { font: 700 13px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--tile); margin: 18px 0 0; }
.ma-note { margin: -8px 0 0; font-size: 13.5px; color: var(--muted); }
.ma-g2, .ma-g3 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ma-g3 { grid-template-columns: 2fr 1fr 1fr; }
.field textarea.ma-long { min-height: 240px; line-height: 1.55; }     /* room for 10–20 sentences, and it grows as they type */
.field textarea.ma-mid { min-height: 120px; line-height: 1.55; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.yn-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.yn-opts label { display: inline-flex; gap: 7px; align-items: center; border: 1.5px solid var(--field-line); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 15px; cursor: pointer; background: var(--ground); }
.yn-opts label:has(input:checked) { border-color: var(--green-bg); background: var(--green-soft); }
.yn-opts input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--green); }
.ma-kids { display: grid; gap: 8px; }
.ma-kid { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.ma-kid input { width: 100%; min-height: 44px; border: 1.5px solid var(--field-line); border-radius: 12px; padding: 8px 12px; font: inherit; background: var(--ground); color: var(--ink); }
.ma-decl { background: var(--tint); border-radius: 12px; padding: 12px; font-weight: 600; }
.ma-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.opt-l { font-weight: 400; color: var(--muted); }
.covenant { border: 1.5px solid var(--line); border-radius: 12px; background: var(--tint); }
.covenant > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; color: var(--tile); }
.cov-body { padding: 0 18px 16px; font-size: 15px; }
.cov-body h3 { font: 400 20px/1.3 var(--serif); margin: 4px 0 10px; }
.cov-intro { font-style: italic; margin: 0 0 6px; }
.cov-body h4 { font-size: 16px; margin: 18px 0 4px; }
.cov-body h4 span { color: var(--tile); }
.cov-body ul { list-style: none; padding: 0; margin: 0 0 10px 22px; }
.cov-body blockquote { margin: 8px 0 0 22px; color: var(--muted); }
.cov-body cite { font-style: normal; font-weight: 600; font-size: 13px; white-space: nowrap; }
@media (max-width: 600px) { .ma-g2, .ma-g3 { grid-template-columns: 1fr; } }

/* Membership applications (elders) */
.ms-page { display: grid; gap: 16px; }
.ms-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.ms-layout.has-sel { grid-template-columns: minmax(0, 1fr) 420px; }
.ms-list { display: grid; gap: 14px; min-width: 0; }
.ms-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.ms-head .sub { margin: 0; }
.ms-head-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ms-n { color: var(--faint); margin-left: 2px; }
.ms-add { position: relative; }
.ms-add > summary { list-style: none; cursor: pointer; }
.ms-add > summary::-webkit-details-marker { display: none; }
.ms-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 320px; background: var(--ground); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.15); padding: 6px; }
.ms-menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.ms-menu a:hover { background: var(--tint); }
.ms-menu small { display: block; color: var(--muted); font-size: 13px; }
.ms-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ms-col { background: var(--stone); border-radius: 18px; padding: 12px; display: grid; gap: 10px; }
.ms-col-h { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 6px 0; }
.ms-col-h b { font-size: 15px; } .ms-col-h span { color: var(--muted); font-size: 13px; }
.ms-col-h small { display: block; color: var(--muted); font-size: 12.5px; }
.ms-none { padding: 0 6px; margin: 0; }
.ms-card { display: grid; gap: 2px; background: var(--ground); border-radius: 14px; padding: 12px 34px 12px 13px; color: inherit; text-decoration: none; position: relative; }
.ms-card::after { content: '›'; position: absolute; right: 13px; top: 10px; font-size: 20px; color: var(--faint); }
.ms-card:hover, .ms-card.sel { box-shadow: 0 0 0 2px var(--green); }
.ms-card b { font-size: 15.5px; }
.ms-card .meta { font-size: 13px; }
.ms-src { font: 700 11px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.ms-flagn { color: var(--tile); font-weight: 700; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ms-st { font-weight: 600; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--stone); color: var(--muted); }
.ms-st.done { background: var(--green-soft); color: var(--green); } .ms-st.now { background: var(--warn-soft); color: var(--warn); } .ms-st.na { background: var(--tint); color: var(--faint); }
.ms-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ms-table th { text-align: left; font: 700 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 10px; }
.ms-table td { padding: 10px; border-top: 1px solid var(--line); }
.ms-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; display: grid; gap: 10px; align-content: start; }
.ms-back { display: none; }
.ms-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.ms-top .label { margin: 0; }
.ms-name { font: 400 24px/1.2 var(--serif); margin: 0; }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.ms-read { justify-content: center; }
.ms-scan { display: flex; gap: 12px; align-items: center; background: var(--blue-soft); color: var(--blue); border-radius: 12px; padding: 11px 13px; font-size: 14.5px; }
.ms-scan > span { font-size: 22px; }
.ms-scan a { color: var(--blue); font-weight: 700; }
.ms-flag { background: var(--tile-soft); color: var(--tile); border-radius: 10px; padding: 7px 11px; font-size: 14px; font-weight: 600; }
.ms-dir { margin: 0; }
.ms-done { margin: 0; font-weight: 600; }
.ms-steps { list-style: none; margin: 0; padding: 0; }
.ms-steps > li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.ms-steps > li:first-child { border-top: 0; }
.ms-h { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.ms-h b { display: block; } .ms-h small { display: block; color: var(--muted); font-size: 13px; }
.ms-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font: 700 13px var(--sans); color: #fff; margin-top: 1px; }
.done > .ms-h .ms-dot { background: var(--green-bg); border-color: var(--green-bg); }
.na > .ms-h .ms-dot { background: var(--stone); border-color: var(--stone); color: var(--muted); }
.now > .ms-h .ms-dot { border-color: #d9a400; }
.ms-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 36px; }
.ms-opt { border: 1.5px solid var(--line); background: var(--ground); border-radius: 999px; padding: 5px 12px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; }
.ms-opt[aria-pressed="true"] { background: var(--green-bg); border-color: var(--green-bg); color: #fff; }
.ms-inl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: 36px; font-size: 14px; }
.ms-inl label { display: flex; gap: 6px; align-items: center; flex: 1 1 180px; }
.ms-inl input:not([type="checkbox"]) { flex: 1; min-width: 0; min-height: 38px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 6px 10px; font: inherit; background: var(--ground); color: var(--ink); }
.ms-inl .check { flex: 1 1 100%; font-size: 14px; }
.ms-notes { border-top: 1px solid var(--line); padding-top: 12px; }
.ms-notes .label { margin-bottom: 4px; }
.ms-note { font-size: 14.5px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ms-note .meta { font-size: 12.5px; }
.ms-addnote { display: grid; gap: 8px; margin-top: 8px; justify-items: start; }
.ms-addnote textarea { width: 100%; border: 1.5px solid var(--field-line); border-radius: 12px; padding: 9px 12px; font: inherit; background: var(--ground); color: var(--ink); resize: vertical; }
.ms-acts { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.ms-welcome { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ms-welcome label { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; }
.ms-welcome input { min-height: 40px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 6px 10px; font: inherit; background: var(--ground); color: var(--ink); }
.ms-stop summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.ms-stop form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ms-stop input { flex: 1 1 200px; min-height: 40px; border: 1.5px solid var(--field-line); border-radius: 10px; padding: 6px 10px; font: inherit; background: var(--ground); color: var(--ink); }
.ms-scanform { max-width: 640px; }
@media (max-width: 1050px) {
  .ms-layout, .ms-layout.has-sel { grid-template-columns: 1fr; }
  .ms-page.has-sel .ms-intro { display: none; }
  .ms-board { grid-template-columns: 1fr 1fr; }
  .ms-panel { position: static; max-height: none; }
  /* On a phone or tablet the chosen application has the screen to itself, with a way back */
  .ms-layout:not(.has-sel) .ms-panel { display: none; }
  .ms-layout.has-sel .ms-list { display: none; }
  .ms-back { display: inline-block; }
}
@media (max-width: 640px) { .ms-board { grid-template-columns: 1fr; } }

/* Reading an application: the long answers at a comfortable width, the steps alongside */
.mr-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.mr-doc { padding: 28px 36px; }
.mr-doc .h1 { margin: 2px 0 0; }
.mr-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 22px; margin: 14px 0 6px; font-size: 14.5px; }
.mr-facts span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mr-q { font: 400 19px/1.35 var(--serif); margin: 26px 0 8px; max-width: 70ch; }
.mr-a { font-size: 17px; line-height: 1.7; max-width: 68ch; white-space: pre-line; margin: 0; overflow-wrap: anywhere; }
.mr-sub { font-size: 15px; color: var(--muted); padding: 0 0 8px; }
.mr-yn { display: grid; }
.mr-yn > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.mr-yn b { white-space: nowrap; } .mr-yn b.flag { color: var(--tile); }
.mr-end { margin-top: 20px; }
.mr-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; display: grid; gap: 10px; align-content: start; }
@media (max-width: 1050px) {
  .mr-layout { grid-template-columns: 1fr; }
  .mr-side { position: static; max-height: none; }
  .mr-doc { padding: 20px 18px; }
}
@media (max-width: 640px) { .mr-a { font-size: 16px; } }
.ms-link { margin-top: 10px; max-width: 460px; font-size: 13.5px; color: var(--muted); }
.ms-link label { display: block; margin-bottom: 4px; }
.ms-link input { flex: 1; min-width: 0; min-height: 38px; border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 10px; font: inherit; color: var(--ink); background: var(--tint); }
.ms-head > div:first-child { flex: 1 1 360px; }

/* Viewing as someone (admins): a strip on every page, with Stop */
.view-as-bar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center;
  padding: 8px 16px; background: #f2c14e; color: #2b2100; font-size: 15px; text-align: center; }
.view-as-bar form { margin: 0; }
.view-as-bar .btn { min-height: 34px; background: #2b2100; color: #fff; }
.view-as-start { display: grid; gap: 2px; justify-items: start; margin: 4px 0 14px; }
