/* DeparturePilot public pages: tributes (and later the burial register). One file, four looks:
   plain light (default), Classic, Jet Age, Departure Board, chosen in Settings → Public pages. Own fonts only (CSP). */
:root, [data-theme="light"] {
  --bg: #FAFAF7; --surface: #FFFFFF; --ink: #1F2421; --muted: #545B56; --rule: #DADDD6;
  --band: #FFFFFF; --band-ink: #1F2421; --accent: #3F6B4E; --accent-ink: #FFFFFF; --soft: #EEF3EF;
  --danger: #A4281C; --serif: Georgia, "Times New Roman", serif; --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
[data-theme="classic"] { --bg: #F2F1EC; --surface: #FFFFFF; --ink: #0B1F3A; --muted: #4A5568; --rule: #D5D3CA; --band: #0B1F3A; --band-ink: #FFFFFF; --accent: #0B1F3A; --accent-ink: #FFFFFF; --soft: #F6F5F0; }
[data-theme="jetage"] { --bg: #FBF7EF; --surface: #FFFFFF; --ink: #3B2416; --muted: #6B5444; --rule: #E6DCCB; --band: #3B2416; --band-ink: #FBF2E2; --accent: #8A4A1E; --accent-ink: #FFFFFF; --soft: #F7F0E3; }
[data-theme="board"] { --bg: #1C1C1C; --surface: #262626; --ink: #E9E5DC; --muted: #B5B0A6; --rule: #3A3A3A; --band: #141414; --band-ink: #F3F1EA; --accent: #E5AE12; --accent-ink: #141414; --soft: #2E2E2E; --danger: #FF8A7A; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
[data-theme="board"] a { color: var(--accent); }
.pt-wrap { max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.pt-band { background: var(--band); color: var(--band-ink); border-bottom: 1px solid var(--rule); }
.pt-band-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.pt-logo { max-height: 40px; max-width: 220px; display: block; }
.pt-business { font: 600 18px/1.2 var(--serif); }
.pt-all { color: var(--band-ink); font-size: 15px; }
.pt-cultural { background: var(--soft); border-bottom: 1px solid var(--rule); font-size: 15px; padding: 10px 0; }
.pt-preview { background: #FFF3C4; color: #4A3A00; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.pt-main { padding-top: 28px; padding-bottom: 48px; }
.pt-hero { display: grid; gap: 20px; align-items: end; margin-bottom: 24px; }
.pt-hero.has-photo { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
@media (max-width: 560px) { .pt-hero.has-photo { grid-template-columns: minmax(0, 1fr); } }
.pt-photo { width: 100%; max-width: 220px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; border: 1px solid var(--rule); background: var(--soft); }
.pt-eyebrow { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { font: 600 clamp(30px, 6vw, 44px)/1.15 var(--serif); margin: 4px 0 6px; text-wrap: balance; overflow-wrap: anywhere; }
.pt-dates { margin: 0; color: var(--muted); font-size: 17px; }
.pt-text { font-size: 18px; }
.pt-text p, .pt-notice p { margin: 0 0 14px; overflow-wrap: anywhere; }
.pt-notice { background: var(--soft); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 0 6px 6px 0; margin: 24px 0; }
.pt-notice h2 { margin-top: 0; }
h2 { font: 600 22px/1.3 var(--serif); margin: 0 0 12px; }
.pt-section { border-top: 1px solid var(--rule); padding-top: 22px; margin-top: 28px; }
.pt-services { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.pt-services li { display: grid; gap: 2px; }
.pt-svc-label { font-weight: 700; }
.pt-svc-when, .pt-svc-venue { color: var(--ink); }
.pt-button { display: inline-block; background: var(--accent); color: var(--accent-ink) !important; border: 1px solid var(--accent); border-radius: 6px; padding: 11px 18px; font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; min-height: 44px; }
.pt-button-quiet { background: transparent; color: var(--accent) !important; }
.pt-button-danger { background: var(--danger); border-color: var(--danger); color: #FFFFFF !important; }
[data-theme="board"] .pt-button-danger { color: #141414 !important; }
.pt-form, .pt-search { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 18px; }
.pt-form label, .pt-search label { display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
.pt-form label span { font-weight: 400; color: var(--muted); }
input, textarea { font: 16px/1.4 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--muted); border-radius: 6px; padding: 10px 12px; width: 100%; }
input[type="radio"], input[type="checkbox"] { width: auto; }
input:focus, textarea:focus, .pt-button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pt-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pt-hint { color: var(--muted); font-size: 15px; margin: 0; }
.pt-reg-intro { margin-bottom: 14px; }
.pt-error { color: var(--danger); font-weight: 700; margin: 0; }
.pt-thanks, .pt-closed { background: var(--soft); border-radius: 8px; padding: 14px 18px; }
.pt-thanks p, .pt-closed p { margin: 0 0 6px; }
.pt-closed span { display: inline-block; margin-right: 14px; font-weight: 600; }
.pt-cond { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.pt-cond li { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 18px; }
.pt-cond p { margin: 0 0 8px; overflow-wrap: anywhere; }
.pt-cond-by { color: var(--muted); font-size: 15px; }
.pt-cond-by b { color: var(--ink); }
.pt-cond time { margin-left: 6px; }
.pt-list-title { font-size: clamp(28px, 5vw, 38px); }
.pt-search { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; margin-bottom: 20px; }
@media (max-width: 560px) { .pt-search { grid-template-columns: minmax(0, 1fr); } }
.pt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pt-list a { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 10px; text-decoration: none; color: var(--ink); }
.pt-list img, .pt-noimg { width: 56px; height: 70px; object-fit: cover; border-radius: 4px; background: var(--soft); flex: 0 0 auto; }
.pt-list b { display: block; font: 600 19px/1.3 var(--serif); overflow-wrap: anywhere; }
.pt-list .pt-dates { font-size: 15px; }
.pt-pages { display: flex; justify-content: space-between; margin-top: 18px; }
.pt-foot { border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; padding: 18px 0 28px; }
/* The family's review page */
.te { display: grid; gap: 14px; }
.te p { margin: 0; }
.te-form { display: grid; gap: 14px; }
.te-group { border: 1px solid var(--rule); border-radius: 8px; padding: 12px 16px 14px; margin: 0; display: grid; gap: 8px; background: var(--surface); }
.te-group legend { font-weight: 700; padding: 0 6px; }
.te-group legend span, .te-field span { font-weight: 400; color: var(--muted); }
.te-field { display: grid; gap: 4px; font-weight: 600; }
.te-choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.te-choice input { margin-top: 5px; flex: 0 0 auto; }
.te-photo { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.te-photo img { width: 160px; max-width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; border: 1px solid var(--rule); }
.te-photo-acts { display: grid; gap: 8px; }
.te-btn { font: 15px/1.2 var(--sans); padding: 9px 14px; border: 1px solid var(--muted); border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; min-height: 40px; }
.te-msg { padding: 12px 16px; border-radius: 8px; background: var(--soft); }
.te-ok { border-left: 4px solid var(--accent); } .te-err { border-left: 4px solid var(--danger); color: var(--danger); font-weight: 600; } .te-warn { border-left: 4px solid var(--danger); } .te-note { border-left: 4px solid var(--muted); }
.te-approve { border-color: var(--accent); }
/* Navigation in the band; the burial register */
.pt-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.pt-reg-search { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 0.7fr) minmax(0, 1.3fr) auto; }
@media (max-width: 760px) { .pt-reg-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pt-reg-search .pt-button { grid-column: 1 / -1; } }
.pt-reg-search select { font: 16px/1.4 var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--muted); border-radius: 6px; padding: 10px 12px; width: 100%; }
.pt-count { color: var(--muted); font-size: 15px; margin: 0 0 10px; }
.pt-reg { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pt-reg li { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 16px; display: grid; gap: 4px; }
.pt-reg-name { font: 600 19px/1.3 var(--serif); overflow-wrap: anywhere; }
.pt-reg-meta { color: var(--muted); font-size: 15px; }
.pt-reg-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; }
/* Inside an embed: no band or footer (the business's own page has them); a little padding only */
body[data-embed="1"] { background: transparent; display: flow-root; }   /* flow-root: margins stay inside, so its height is the whole page */
body[data-embed="1"] .pt-main { padding-top: 8px; padding-bottom: 16px; }
