:root {
    --ofm-paper:#f7f5f0;
    background:var(--ofm-paper);
    color-scheme:light;
}
html,body { margin:0; min-height:100%; }
.ofm-shell {
    --paper:#f7f5f0; --surface:#fffefa; --ink:#262d2b; --muted:#58645c; --terra:#984d32;
    --line:#ddded5; --wash:#f3e7dd; --wash-line:#e4cfc0; --moss:#516754; --moss-bg:#e9eee4;
    --nav-background:rgb(255 254 250 / 96%); --serif:Georgia,"Times New Roman",serif;
    --sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    box-sizing:border-box; min-height:100vh; min-height:100dvh; color:var(--ink); background:var(--paper);
    font:400 15px/1.45 var(--sans); text-rendering:optimizeLegibility; -webkit-tap-highlight-color:transparent;
}
.ofm-shell *, .ofm-shell *::before, .ofm-shell *::after { box-sizing:border-box; }
.ofm-shell [hidden] { display:none !important; }
.ofm-shell button,.ofm-shell select { font:inherit; }
.ofm-shell button { color:inherit; cursor:pointer; }
.ofm-shell button:focus-visible,.ofm-shell a:focus-visible,.ofm-shell select:focus-visible {
    outline:3px solid var(--terra); outline-offset:3px;
}
.ofm-shell a { color:var(--terra); }
.edition-icon { flex:none; display:block; }
.ofm-masthead { padding:env(safe-area-inset-top) max(20px,env(safe-area-inset-right)) 0 max(20px,env(safe-area-inset-left)); }
.ofm-header-inner {
    max-width:1104px; min-height:68px; margin:0 auto; display:flex; align-items:center;
    justify-content:space-between; border-bottom:1px solid var(--line); gap:12px;
}
.ofm-home { display:inline-flex; align-items:center; gap:9px; border:0; padding:0 6px 0 0; min-height:44px; background:none; }
.ofm-emblem {
    height:31px; width:31px; border-radius:9px 9px 13px 13px; background:var(--terra); color:var(--surface);
    font:700 29px/31px Georgia,serif; text-align:center;
}
.ofm-word { font:700 25px/1 var(--serif); letter-spacing:-1.6px; }
.ofm-word span { font-weight:400; }
.ofm-actions { display:flex; align-items:center; gap:3px; }
.ofm-actions button { min-width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; background:none; border:0; }
.ofm-actions .ofm-lang { gap:5px; font-size:11px; font-weight:650; letter-spacing:.04em; }
.ofm-actions .ofm-bell { width:44px; color:var(--ink); }
.ofm-main { width:100%; max-width:1144px; margin:0 auto; padding:16px max(16px,env(safe-area-inset-right)) calc(98px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
.ofm-main:focus { outline:none; }
.ofm-home-grid { display:grid; gap:15px; }
.ofm-hero { position:relative; isolation:isolate; overflow:hidden; min-height:193px; border-radius:18px; color:white; background:#494d40; }
.ofm-hero-img,.ofm-hero-shade { position:absolute; inset:0; height:100%; width:100%; display:block; }
.ofm-hero-img { object-fit:cover; object-position:50% 50%; z-index:-2; }
.ofm-hero-shade { background:linear-gradient(90deg,rgba(17,26,22,.58),transparent 82%),linear-gradient(0deg,rgba(18,23,19,.58),transparent 78%); z-index:-1; }
.ofm-loc { position:absolute; display:inline-flex; align-items:center; gap:3px; right:14px; top:14px; color:#fff; font-size:11px; font-weight:550; border:1px solid rgb(255 255 255 / 55%); border-radius:25px; padding:3px 8px; background:rgb(27 37 32 / 59%); }
.ofm-hero-type { position:absolute; left:22px; bottom:21px; right:14px; }
.ofm-date { font-size:13px; font-weight:540; }
.ofm-date::first-letter { text-transform:uppercase; }
.ofm-hero h1 { margin:4px 0 0; font:400 clamp(44px,9vw,67px)/.99 var(--serif); letter-spacing:-.05em; }
.ofm-feature { width:100%; display:flex; align-items:center; gap:12px; border:1px solid var(--wash-line); border-radius:14px; text-align:start; background:var(--wash); padding:12px 14px; }
.ofm-feature-copy { display:grid; gap:3px; flex:1; min-width:0; }
.ofm-kicker { color:var(--terra); font:700 10px/1.35 var(--sans); letter-spacing:.1em; text-transform:uppercase; display:block; }
.ofm-feature-copy strong,.ofm-story-item strong { font:580 15px/1.3 var(--sans); letter-spacing:-.016em; }
.ofm-feature-icon { display:grid; place-items:center; flex:none; color:var(--terra); width:36px; height:36px; border-radius:50%; }
.ofm-feature-arrow { display:grid; place-items:center; flex:none; width:25px; height:25px; color:var(--terra); }
.ofm-family { margin-top:1px; min-width:0; }
.ofm-title-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.ofm-title-row h2,.ofm-section h1 { font:400 clamp(28px,6.1vw,39px)/1.07 var(--serif); letter-spacing:-.045em; margin:0; }
.ofm-inline,.ofm-back,.ofm-source { display:inline-flex; align-items:center; gap:5px; border:0; background:none; font-size:12px; font-weight:620; text-decoration:none; min-height:44px; }
.ofm-inline,.ofm-back { padding:0 1px; color:var(--terra)!important; }
.ofm-edition { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:12px; margin:1px 0 12px; }
.ofm-records { background:var(--surface); border:1px solid var(--line); border-radius:15px; padding:0 13px; overflow:hidden; }
.ofm-row { display:flex; gap:11px; align-items:center; min-height:63px; padding:8px 0; }
.ofm-row + .ofm-row { border-top:1px solid var(--line); }
.ofm-badge { height:36px; width:36px; border-radius:11px; color:var(--moss); background:var(--moss-bg); display:grid; place-items:center; flex:none; }
.ofm-badge.kind-birthday { color:var(--terra); background:var(--wash); }
.ofm-badge.kind-ordination { color:#526079; background:#e9eef5; }
.ofm-badge.kind-remembrance { color:#70634e; background:#f0ece1; }
.ofm-person { flex:1; min-width:0; display:grid; gap:3px; }
.ofm-person strong { font:590 14px/1.25 var(--sans); overflow-wrap:anywhere; }
.ofm-person small { font-size:12px; color:var(--muted); line-height:1.28; }
.ofm-middot { color:var(--muted); }
.ofm-year { flex:none; color:var(--muted); font-variant-numeric:tabular-nums; font-size:12px; }
.ofm-family .ofm-source { margin-left:3px; min-height:38px; font-weight:440; }
.ofm-world-link { display:flex; align-items:center; text-align:start; gap:13px; width:100%; padding:11px 16px; background:var(--moss-bg); border:1px solid var(--line); border-radius:14px; }
.ofm-world-link>span:nth-child(2) { flex:1; display:grid; gap:2px; }
.ofm-world-link strong { font:500 19px/1.2 var(--serif); }
.ofm-world-link small { color:var(--muted); font-size:12px; }
.ofm-globe { display:grid; place-items:center; width:37px; height:37px; color:var(--moss); }
.ofm-world-link>.edition-icon { color:var(--moss); }
.ofm-nav { position:fixed; z-index:1000; bottom:0; inset-inline:0; border-top:1px solid var(--line); background:var(--nav-background); padding:3px max(12px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px,env(safe-area-inset-left)); }
.ofm-nav-inner { display:flex; align-items:stretch; justify-content:center; gap:4px; max-width:530px; margin:0 auto; }
.ofm-nav button { flex:1; display:grid; place-content:center; justify-items:center; gap:2px; min-height:58px; font:500 11px/1.2 var(--sans); color:var(--muted); border:0; background:none; padding:4px 2px; }
.ofm-nav button span { display:grid; place-items:center; min-width:48px; height:27px; border-radius:12px; }
.ofm-nav button.active { color:var(--terra); font-weight:680; }
.ofm-nav button.active span { background:var(--wash); }
.ofm-narrow { max-width:720px; margin-inline:auto; }
.ofm-section { padding-top:7px; }
.ofm-section h1 { margin:6px 0 14px; }
.ofm-section .ofm-edition { margin-top:-1px; }
.ofm-back { margin-bottom:6px; }
.ofm-chips { display:flex; gap:6px; flex-wrap:wrap; padding:1px 0 13px; }
.ofm-chips button { min-height:44px; border:1px solid var(--line); background:var(--surface); padding:4px 12px; border-radius:22px; font-size:13px; }
.ofm-chips button.selected { background:var(--ink); color:var(--surface); border-color:var(--ink); }
.ofm-story-list { display:grid; gap:8px; }
.ofm-story-item { display:flex; align-items:center; text-align:start; gap:12px; padding:13px; border:1px solid var(--line); border-radius:13px; background:var(--surface); width:100%; min-height:72px; }
.ofm-story-item img { width:57px; height:57px; border-radius:8px; object-fit:cover; }
.ofm-story-item>span:not(.ofm-feature-icon) { flex:1; display:grid; gap:5px; }
.ofm-story-item>.edition-icon { margin-left:auto; }
.ofm-test { display:flex; align-items:flex-start; gap:12px; background:var(--moss-bg); border:1px solid var(--line); border-radius:14px; padding:17px; margin-top:20px; }
.ofm-test-icon { color:var(--moss); margin-top:3px; }
.ofm-test h2 { font:500 23px/1.16 var(--serif); letter-spacing:-.02em; margin:0; }
.ofm-test p { margin:6px 0 13px; font-size:14px; color:var(--muted); }
.ofm-primary { border:0; min-height:44px; display:inline-flex; align-items:center; gap:10px; padding:9px 14px; border-radius:9px; color:var(--surface)!important; background:var(--ink); font-size:13px!important; font-weight:640!important; }
.ofm-primary:disabled { opacity:.62; }
.ofm-test p.ofm-feedback { margin:8px 0 0; font-size:13px; }
.ofm-article h1 { font-size:clamp(35px,8vw,52px); margin:7px 0 16px; }
.ofm-article-image { display:block; width:100%; max-height:330px; object-fit:cover; border-radius:15px; }
.ofm-article-body { font:400 18px/1.57 var(--serif); }
.ofm-empty { color:var(--muted); }
.ofm-settings,.ofm-useful { display:grid; gap:14px; border-radius:14px; border:1px solid var(--line); padding:15px; background:var(--surface); }
.ofm-field { display:grid; gap:5px; font-size:13px; }
.ofm-field select { width:100%; padding:9px; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:8px; min-height:44px; font-size:16px; }
.ofm-useful { margin-top:15px; gap:0; padding-block:0; }
.ofm-useful a { display:flex; align-items:center; gap:10px; color:var(--ink); text-decoration:none; min-height:51px; }
.ofm-useful a + a { border-top:1px solid var(--line); }
.ofm-useful a span { flex:1; }
.ofm-credits { color:var(--muted); font-size:12px; line-height:1.65; }
.ofm-map-view { position:relative; z-index:0; }
.ofm-toast { position:fixed; z-index:1200; max-width:450px; inset: max(8px,env(safe-area-inset-top)) 12px auto; margin:0 auto; display:flex; border:1px solid var(--line); border-radius:16px; box-shadow:0 7px 28px rgb(22 29 24 / 21%); background:var(--surface); }
.ofm-toast button { border:0; background:none; }
.ofm-toast-main { display:flex; align-items:center; text-align:start; gap:10px; padding:12px; flex:1; min-width:0; }
.ofm-toast-main>span:nth-child(2) { display:grid; gap:3px; }
.ofm-toast-main small,.ofm-toast-main>span>span { font-size:11px; color:var(--muted); }
.ofm-toast-main strong { font-size:14px; line-height:1.3; }
.ofm-toast-icon { color:var(--terra); }
.ofm-toast-close { align-self:flex-start; flex:none; width:44px; height:44px; display:grid; place-items:center; }
.ofm-shell[data-theme=dark] {
    --paper:#202623; --surface:#2b322e; --ink:#f4f1e7; --muted:#bcc7ba; --terra:#ebb38e;
    --line:#465149; --wash:#49382e; --wash-line:#675043; --moss:#b7c8aa; --moss-bg:#334236; --nav-background:#2b322ef5; color-scheme:dark;
}
@media (prefers-color-scheme:dark) {
    .ofm-shell[data-theme=auto] {
        --paper:#202623; --surface:#2b322e; --ink:#f4f1e7; --muted:#bcc7ba; --terra:#ebb38e;
        --line:#465149; --wash:#49382e; --wash-line:#675043; --moss:#b7c8aa; --moss-bg:#334236; --nav-background:#2b322ef5; color-scheme:dark;
    }
}
@media (min-width:720px) {
    .ofm-header-inner { min-height:80px; }
    .ofm-main { padding:28px 20px 105px; }
    .ofm-home-grid { grid-template-columns:minmax(0,1.18fr) minmax(0,1fr); grid-template-areas:"hero family" "notice family" "world family"; gap:14px 26px; align-items:start; }
    .ofm-hero { grid-area:hero; min-height:265px; }
    .ofm-hero-type { left:26px; bottom:25px; }
    .ofm-family { grid-area:family; }
    .ofm-feature { grid-area:notice; }
    .ofm-world-link { grid-area:world; }
    .ofm-family .ofm-records { padding-inline:17px; }
    .ofm-row { min-height:71px; }
    .ofm-nav-inner { max-width:500px; }
}
@media (min-width:1024px) { .ofm-hero { min-height:320px; } .ofm-home-grid { gap:16px 38px; } .ofm-hero-type { left:32px; bottom:31px; } }
@media (max-width:370px) { .ofm-main { padding-inline:12px; } .ofm-masthead { padding-inline:14px; } .ofm-hero { min-height:168px; } }
@media (max-width:719px) and (max-height:610px) {
    .ofm-header-inner { min-height:48px; }
    .ofm-main { padding-top:10px; padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
    .ofm-home-grid { gap:8px; }
    .ofm-hero { min-height:103px; border-radius:13px; }
    .ofm-hero-type { left:16px; bottom:11px; }
    .ofm-hero h1 { font-size:37px; margin-top:1px; }
    .ofm-hero .ofm-date { font-size:12px; }
    .ofm-loc { top:9px; right:10px; }
    .ofm-feature { padding-block:8px; gap:7px; }
    .ofm-feature-copy strong { font-size:14px; }
    .ofm-title-row h2 { font-size:27px; }
    .ofm-edition { margin-bottom:7px; }
    .ofm-row { min-height:54px; }
    .ofm-nav button { min-height:48px; }
}
@media (prefers-reduced-motion:no-preference) { .ofm-shell button { transition:background-color .15s, color .15s; } }
.ofm-shell a.ofm-editorial-link { color:inherit; text-decoration:none; }
.ofm-editorial-link:focus-visible { outline:3px solid var(--terra); outline-offset:3px; }
.ofm-reader-help { margin-top:10px; font-size:.92rem; color:var(--ink); }
.ofm-reader-help summary { padding:12px 0; cursor:pointer; }
.ofm-reader-help p { line-height:1.55; margin:0 0 16px; }
@media (hover:hover) { .ofm-inline:hover,.ofm-source:hover,.ofm-back:hover,.ofm-useful a:hover span { text-decoration:underline; text-underline-offset:3px; } .ofm-feature:hover, .ofm-story-item:hover, .ofm-world-link:hover { border-color:var(--terra); } }
