/* Deacon Lane (deacon.html). Built on the --brand-* tokens in brand.css so each church's colours and fonts apply.
   Mobile first: a bottom tab bar on phones, a side nav from 900px. */
:root {
  --dl-bg: #F3F6F7;
  --danger: #B42318; --danger-tint: #FDECEA;
  --ok: #1E7B4A; --ok-tint: #E6F4EC;
  --warn: #9A5B00; --warn-tint: #FFF4D6;
  --tabbar-h: 64px;
}
body.dl { background: var(--dl-bg); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { left: 8px; }
#main { outline: none; flex: 1; min-width: 0; padding-bottom: 40px; }
[hidden] { display: none !important; }
.small { font-size: .85rem; }
.req { font-weight: 400; color: var(--brand-muted); font-size: .85rem; }
.wrap-any { overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
code { font-size: .85em; background: var(--brand-surface-2); padding: 2px 6px; border-radius: 4px; word-break: break-all; }

/* ---------- header ---------- */
.site-header .brand img { height: 34px; max-width: 180px; object-fit: contain; object-position: left center; }
.site-header .brand .name { max-width: 40vw; }
.site-header .brand .sub { display: inline; }
.hdr-tools { margin-left: auto; display: flex; gap: 4px; align-items: center; flex: none; }
.hdr-link { color: inherit; background: none; border: 0; font: 500 .9rem/1 var(--font-body); padding: 10px 12px; min-height: 48px; border-radius: var(--radius);
  display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; white-space: nowrap; }
.hdr-link:hover { background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; }
@media (max-width: 720px) {
  .site-header .bar { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .site-header .brand .sub { display: inline; padding-left: 10px; font-size: .95rem; }
  .site-header .brand img { height: 28px; max-width: 120px; }
  .site-header .brand .name { max-width: 34vw; font-size: .95rem; }
  .site-header .brand { max-width: none; flex: 0 1 auto; }
  .has-nav .hdr-tools a.hdr-link { display: none; }   /* Switch church lives on Me */
  .hdr-link { font-size: .85rem; padding: 8px; }
}

/* ---------- layout + nav ---------- */
.dl-shell { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; display: flex; gap: 28px; padding: 0 var(--gutter); }
.page { padding-top: clamp(18px, 4vw, 32px); }
.page.narrow { max-width: 780px; }
.page h1 { font-size: clamp(1.75rem, 5vw, 2.3rem); margin-bottom: .35em; overflow-wrap: anywhere; }
.page h1:focus { outline: none; }
h1.display { font-weight: 300; }
.lede { color: var(--brand-muted); font-size: 1.02rem; margin: 0 0 18px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.backlink { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; text-decoration: none; margin-left: -4px; }
.backlink svg { width: 20px; height: 20px; }

.sidenav { display: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr);
  background: #fff; border-top: 1px solid var(--brand-line); box-shadow: 0 -4px 16px rgba(0,0,0,.06); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tabbar-h);
  color: var(--brand-muted); text-decoration: none; font: 600 .72rem/1.1 var(--font-body); background: none; border: 0; cursor: pointer; padding: 6px 2px; min-width: 0; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"], .tabbar button.on, .tabbar button[aria-expanded="true"] { color: var(--brand-primary-deep); }
.tabbar a[aria-current="page"] svg { stroke-width: 2.4; }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; }
.more-sheet { position: fixed; right: 10px; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 61; padding: 6px; display: grid; min-width: 210px; box-shadow: var(--shadow-2); }
.more-sheet a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: var(--radius); color: var(--brand-ink); text-decoration: none; font-weight: 600; }
.more-sheet a:hover, .more-sheet a[aria-current="page"] { background: var(--brand-primary-tint); color: var(--brand-primary-deep); }
.more-sheet svg { width: 22px; height: 22px; }
body.has-nav .dl-foot { padding-bottom: calc(24px + var(--tabbar-h) + env(safe-area-inset-bottom)); }

@media (min-width: 900px) {
  body.has-nav .dl-foot { padding-bottom: 24px; }
  .tabbar, .more-sheet { display: none !important; }
  .sidenav:not([hidden]) { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 74px; align-self: flex-start; width: 200px; flex: none; padding-top: 28px; }
  .sidenav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--radius); color: var(--brand-ink);
    text-decoration: none; font-weight: 600; }
  .sidenav a:hover { background: #fff; color: var(--brand-primary-deep); }
  .sidenav a[aria-current="page"] { background: var(--brand-primary-tint); color: var(--brand-primary-deep); }
  .sidenav svg { width: 22px; height: 22px; flex: none; }
}

/* ---------- buttons, forms, bits ---------- */
.btn-block { width: 100%; }
.btn-danger { --b-bg: var(--danger); --b-fg: #fff; }
.btn.danger-txt { --b-fg: var(--danger); }
.btn.danger-txt:hover { --b-bg: var(--danger-tint); }
.linklike { background: none; border: 0; color: var(--brand-primary-deep); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 4px; }
.linklike.small { font-size: .85rem; min-height: 36px; }
.linklike.danger-txt { color: var(--danger); }
.filebtn { cursor: pointer; }
.filebtn:focus-within { outline: 3px solid var(--brand-primary-bright); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.row.end { justify-content: flex-end; }
.inline { display: flex; gap: 8px; }
.inline select { flex: 1; min-width: 0; }
.inline .btn { flex: none; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--brand-primary-tint); border-top-color: var(--brand-primary); animation: spin .8s linear infinite; display: inline-block; flex: none; }
.btn .spinner { border-color: rgba(255,255,255,.35); border-top-color: currentColor; width: 18px; height: 18px; }
.btn-tint .spinner, .btn-ghost .spinner { border-color: var(--brand-primary-tint); border-top-color: var(--brand-primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; gap: 12px; padding: 28px 0; color: var(--brand-muted); }
.notice { padding: 14px 16px; border-radius: var(--radius-lg); margin: 12px 0; background: var(--brand-primary-tint); color: var(--brand-ink); }
.notice.ok { background: var(--ok-tint); }
.notice.err { background: var(--danger-tint); color: #5c1510; }
.notice.warn { background: var(--warn-tint); color: #4a3200; }
.notice-msg { margin: 0 0 6px; }
.notice-msg:last-child { margin: 0; }
.ok-line { color: var(--ok); font-weight: 600; }
.overdue { color: var(--danger); font-weight: 600; }
.empty { padding: 28px 20px; text-align: center; color: var(--brand-muted); }
.empty p { margin: 0 0 8px; }
.empty p:last-child { margin: 0; }
.empty-sm { color: var(--brand-muted); padding: 10px 0; list-style: none; }
.mt { margin-top: 1.2em; }

.card.pad { padding: clamp(16px, 3vw, 26px); margin-bottom: 16px; }
.card.pad-sm { padding: 16px; }
.card h2 { font-size: 1.3rem; }
.card h3 { font-size: 1.1rem; margin-bottom: .25em; }
.grid2, .grid3 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }
fieldset.group, fieldset.picks-in { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset legend { font-weight: 700; color: var(--brand-ink); font-size: 1rem; padding: 0; margin-bottom: 8px; }
.field .hint { margin-top: -2px; }
.hint { font-size: .87rem; color: var(--brand-muted); }
.after { margin: 14px 0 0; text-align: center; }
.check, .radio { display: flex; gap: 12px; align-items: flex-start; min-height: 48px; padding: 10px 12px; border: 1px solid var(--brand-line); border-radius: var(--radius-lg); background: #fff; cursor: pointer; margin-bottom: 8px; }
.check input, .radio input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--brand-primary); }
.check > span, .radio > span { display: grid; gap: 2px; }
.check strong, .radio strong { color: var(--brand-ink); font-weight: 600; }
.radio:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-primary-tint); }
.radio:has(input:focus-visible), .check:has(input:focus-visible) { outline: 3px solid var(--brand-primary-bright); outline-offset: 2px; }
.picks-in { display: flex; flex-wrap: wrap; gap: 8px; }
.picks-in legend { width: 100%; }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--brand-line); background: #fff; font-weight: 600; color: var(--brand-ink); }
.pick input:checked + span { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-on-primary); }
.pick input:focus-visible + span { outline: 3px solid var(--brand-primary-bright); outline-offset: 2px; }

/* switches (settings) */
.switch-row { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; padding: 8px 0; min-height: 48px; margin-bottom: 8px; }
.switch-text { display: grid; gap: 2px; }
.switch-text strong { color: var(--brand-ink); font-weight: 600; }
.switch { position: relative; flex: none; width: 58px; height: 32px; margin-top: 2px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #C3CCD0; transition: background .2s var(--ease); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--brand-primary); }
.switch input:checked + .track::after { transform: translateX(26px); }
.switch input:focus-visible + .track { outline: 3px solid var(--brand-primary-bright); outline-offset: 2px; }

/* segmented filters */
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.seg a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--brand-line); background: #fff;
  color: var(--brand-ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.seg a[aria-current="true"] { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-on-primary); }
.seg.big a { min-height: 48px; font-size: 1rem; }
.field.search { margin-bottom: 12px; }
.count { margin: 0 0 8px; }

/* ---------- chips, badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.head-chips { margin: -4px 0 14px; }
.chip { line-height: 1.3; }
.chip svg { width: 15px; height: 15px; }
.chip.quiet { background: var(--brand-surface-2); color: var(--brand-ink); }
.chip.priv { background: #EEF0F2; color: #3C4449; }
.chip.st-new { background: #E8F1FF; color: #1F4E9C; }
.chip.st-in_progress { background: var(--warn-tint); color: #6B4400; }
.chip.st-met { background: var(--ok-tint); color: #145233; }
.chip.st-closed { background: var(--brand-surface-2); color: var(--brand-muted); }
.badge { display: inline-block; font-size: .82rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge.due { background: var(--warn-tint); color: #6B4400; }
.badge.ok { background: var(--ok-tint); color: #145233; }

/* ---------- lists and cards ---------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plain { list-style: none; margin: 0; padding: 0; }
.fam { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 14px 16px; }
.fam.is-due { border-left: 5px solid #E0A100; }
.fam-main { min-width: 0; flex: 1; }
.fam h3, .need h3, .job h3 { margin: 0 0 4px; font-size: 1.1rem; overflow-wrap: anywhere; }
.fam h3 a, .need h3 a { color: var(--brand-ink); text-decoration: none; }
.fam h3 a:hover, .need h3 a:hover { color: var(--brand-primary-deep); text-decoration: underline; }
.fam p { margin: 0 0 6px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; overflow-wrap: anywhere; }
.fam p svg { width: 16px; height: 16px; flex: none; align-self: center; color: var(--brand-muted); }
.qa-row { display: flex; gap: 6px; flex: none; flex-wrap: wrap; }
.qa { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 48px; min-height: 48px; border-radius: var(--radius);
  background: var(--brand-primary-tint); color: var(--brand-primary-deep); text-decoration: none; font-weight: 600; }
.qa:hover { background: var(--brand-primary); color: var(--brand-on-primary); }
.qa svg { width: 22px; height: 22px; }
.qa-row.big .qa { padding: 0 16px; }
@media (max-width: 520px) { .fam { flex-direction: column; } .fam .qa-row { align-self: stretch; } .fam .qa { flex: 1; } }
.need { display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; }
.need.urgent { border-left: 5px solid var(--danger); }
.need .cat { font-size: 1.6rem; line-height: 1; flex: none; width: 36px; text-align: center; padding-top: 2px; }
.need-main { min-width: 0; flex: 1; }
.need p { margin: 0 0 8px; overflow-wrap: anywhere; }
.row-card { padding: 12px 16px; }
.row-card p { margin: 4px 0 0; }
.clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.job-link { display: flex; gap: 14px; align-items: center; padding: 16px; text-decoration: none; color: var(--brand-ink); margin-top: 20px; }
.job-link svg { width: 30px; height: 30px; color: var(--brand-primary); flex: none; }
.job-link > span { display: grid; }
.job-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: flex-start; }
.job p { margin: 0 0 8px; overflow-wrap: anywhere; }

/* home */
.welcome { background: #fff; border-left: 5px solid var(--brand-primary); border-radius: var(--radius-lg); padding: 14px 18px; color: var(--brand-ink); white-space: pre-wrap; }
section + section, .welcome + section { margin-top: 26px; }
h2.sec { font-size: 1.25rem; margin: 0 0 10px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sec-head a:not(.btn) { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.sec-head h2 { margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { display: grid; gap: 2px; padding: 14px 16px; background: #fff; border: 1px solid var(--brand-line); border-radius: var(--radius-xl); text-decoration: none; color: var(--brand-ink); box-shadow: var(--shadow-1); min-height: 88px; }
.stat .n { font: 300 2rem/1 var(--font-display); color: var(--brand-primary-deep); }
.stat .l { font-size: .88rem; font-weight: 600; line-height: 1.25; }
.stat.hot { border-color: #E0A100; background: #FFFBEF; }
.stat.hot .n { font-weight: 700; color: #8A5300; }
.stat:hover { border-color: var(--brand-primary); }

/* family / need detail */
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.cols { display: grid; gap: 0 20px; }
.col-main, .col-side { min-width: 0; }
/* phones: details and deacons come first, then the log */
@media (max-width: 1099px) {
  .cols { display: flex; flex-direction: column; }
  .col-main, .col-side { display: contents; }
  .o-details { order: 1; } .o-deac { order: 2; } .o-log { order: 3; } .o-needs { order: 4; } .o-care { order: 5; } .o-thread { order: 6; } .o-danger { order: 7; }
}
@media (min-width: 1100px) { .cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }
.facts { margin: 0; display: grid; gap: 4px 16px; }
.facts dt { font-weight: 700; color: var(--brand-ink); font-size: .9rem; margin-top: 8px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts + p, .facts + .notice { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--brand-line); }
@media (min-width: 640px) { .facts:not(.legend) { grid-template-columns: max-content 1fr; } .facts:not(.legend) dt { margin-top: 0; } }
.legend dt { margin-top: 12px; }
.maplink { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; }
.maplink svg { width: 18px; height: 18px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { border-left: 3px solid var(--brand-primary-tint); padding: 4px 0 14px 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 10px; width: 11px; height: 11px; border-radius: 50%; background: var(--brand-primary); }
.timeline p { margin: 4px 0 0; }
.tl-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--brand-ink); }
.stack-btns { display: grid; gap: 8px; margin-bottom: 8px; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.slot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--brand-line); border-radius: var(--radius-lg); }
.slot.full { background: var(--brand-surface-2); }
.slot-main { min-width: 0; flex: 1 1 200px; }
.slot-act { flex: none; }
.people { list-style: none; margin: 6px 0 0; padding: 0; font-size: .9rem; }
.people li { overflow-wrap: anywhere; }

/* repeatable rows (members, slots) */
.mrow, .srow { display: grid; gap: 0 10px; padding: 12px; border: 1px solid var(--brand-line); border-radius: var(--radius-lg); margin-bottom: 10px; background: var(--brand-surface-2); }
.mrow .field, .srow .field { margin-bottom: 8px; }
@media (min-width: 640px) {
  .mrow { grid-template-columns: 2fr 1.3fr 1fr auto; align-items: end; }
  .srow { grid-template-columns: 2fr 1.4fr .8fr auto; align-items: end; }
  .mrow .btn, .srow .btn { margin-bottom: 8px; }
}
details.quick, details.paste { margin-top: 14px; }
details summary { cursor: pointer; font-weight: 600; color: var(--brand-primary-deep); min-height: 44px; display: flex; align-items: center; }

/* threads */
.thread { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; max-height: 420px; overflow-y: auto; }
.thread.tall { max-height: min(60vh, 640px); }
.msg { background: var(--brand-surface-2); border-radius: 14px 14px 14px 4px; padding: 10px 14px; max-width: 88%; }
.msg.mine { background: var(--brand-primary-tint); justify-self: end; border-radius: 14px 14px 4px 14px; }
.msg p { margin: 2px 0 0; }
.msg-head { font-size: .85rem; color: var(--brand-muted); }
.msg-head strong { color: var(--brand-ink); }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 52px; flex: 1; min-width: 0; }

/* team */
.person { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 14px 16px; }
.person-main { flex: 1 1 180px; min-width: 0; }
.manage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.manage select { flex: 1 1 160px; width: auto; min-width: 0; }
.req-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--brand-line); }
.req-row:first-child { border-top: 0; }
.req-row > div:first-child { min-width: 0; flex: 1 1 220px; }
.req-row p { margin: 4px 0; }
@media (min-width: 900px) { .manage { width: auto; } }

/* church picker */
.pick-church { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; min-height: 64px; font: inherit; text-align: left; cursor: pointer; color: var(--brand-ink); }
.pick-church:hover, .pick-church[aria-current="true"] { border-color: var(--brand-primary); }

/* auth */
.auth { max-width: 480px; margin: clamp(18px, 6vw, 48px) auto; }
.auth h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
.auth h1.display { font-weight: 300; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--brand-surface-2); border-radius: var(--radius-lg); margin-bottom: 18px; }
.tabs button { min-height: 44px; border: 0; background: none; border-radius: var(--radius); font: 600 .95rem var(--font-body); color: var(--brand-muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--brand-primary-deep); box-shadow: var(--shadow-1); }
.mfa-steps { padding-left: 20px; }
.mfa-steps li { margin-bottom: 12px; }
.mfa-qr { background: #fff; padding: 10px; display: inline-block; border-radius: var(--radius); border: 1px solid var(--brand-line); margin: 8px 0; }
.mfa-qr img { width: 200px; height: 200px; }
.code-in { font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 8px; overflow-wrap: anywhere; }

/* import */
.maps { display: grid; gap: 8px; }
.maprow { display: grid; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--brand-line); }
.maprow:first-child { border-top: 0; }
.maprow label { overflow-wrap: anywhere; }
@media (min-width: 640px) { .maprow { grid-template-columns: 1fr 240px; align-items: center; } }
.tablewrap { overflow-x: auto; margin: 10px 0; border: 1px solid var(--brand-line); border-radius: var(--radius-lg); max-width: 100%; }
.prev { border-collapse: collapse; font-size: .85rem; width: 100%; min-width: 640px; }
.prev th, .prev td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--brand-line); vertical-align: top; }
.prev th { background: var(--brand-surface-2); color: var(--brand-ink); }
.prev .skip-row td { color: var(--brand-muted); }

/* toasts + modal */
.toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(560px, calc(100vw - 24px)); pointer-events: none; }
body.has-nav .toasts { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body.has-nav .toasts { bottom: 18px; } }
.toast { display: flex; gap: 12px; align-items: center; padding: 14px 18px; background: #1F2A2E; color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-2); opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: auto; }
.toast.in { opacity: 1; transform: none; }
.toast .ti { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; background: var(--ok); }
.toast.err .ti { background: var(--danger); }
.toast.info .ti { background: var(--brand-primary); }
.modal-back { position: fixed; inset: 0; z-index: 150; background: rgba(10,20,24,.55); display: grid; place-items: center; padding: 16px; }
.modal { width: min(520px, 100%); padding: 24px; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal h2 { font-size: 1.35rem; }

/* footer */
.dl-foot { margin-top: 32px; padding: 24px var(--gutter); font-size: .92rem; }
.dl-foot .inner { gap: 8px 24px; }
