/* Personal workspace. Existing controls and theme preferences keep their contracts. */
:root {
  --ink:#242b27; --soft:#59655d; --faint:#68716b; --gold:#b69a5a; --gold-deep:#89703c;
  --wash:#f1efe5; --wash-line:#e2dfd1; --line:#e4e6dd; --bg:#faf9f5; --surface:#fffefa;
  --ghost:#edf1ea; --input-border:#d6dbd0; --accent:#2d3931; --nav-bg:#f2f1eb;
  --action-ink:#43614c; --action-line:#bacbb9; --side:#f2f1eb;
  --selected-bg:#29352d; --selected-ink:#fffefa;
}
[data-theme="dark"] {
  --ink:#e7ebe4; --soft:#bbc4b9; --faint:#98a495; --gold:#cbb078; --gold-deep:#cbb078;
  --wash:#22271e; --wash-line:#363d30; --line:#30392e; --bg:#141a15; --surface:#1b231c;
  --ghost:#263126; --input-border:#43503e; --accent:#40583e; --nav-bg:#1b221a;
  --action-ink:#b4cba7; --action-line:#657b5e; --side:#1b221a;
  --selected-bg:#d2ddca; --selected-ink:#1b231c;
}
:root { --side-width:214px; }
:root.sidebar-collapsed { --side-width:76px; }
#app { max-width:none; padding-left:var(--side-width); }
#app .appbar { position:fixed; inset:0 auto 0 0; width:var(--side-width); display:flex; flex-direction:column; background:var(--side); border-right:1px solid var(--line); backdrop-filter:none; z-index:15; padding:30px 20px 20px; }
#app header.top { padding:0 10px 43px; border:0; flex:none; }
#app .brand { gap:10px; min-height:44px; color:inherit; border-radius:4px; }
#app .brand img { width:32px; height:32px; }
#app .wordmark { font-size:33px; font-weight:400; line-height:1; }
#app nav.tabs { padding:0; display:grid; gap:6px; border:0; }
#app nav.tabs a { min-height:48px; justify-content:flex-start; gap:13px; padding:10px 14px; border:0; border-radius:10px; font-size:14px; font-weight:500; }
#app nav.tabs a svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none; }
#app nav.tabs a:hover { background:var(--ghost); }
#app nav.tabs a.active { color:var(--selected-ink); background:var(--selected-bg); }
#app nav.tabs a.active svg { color:var(--gold); }
#app .shell-account { display:grid; gap:8px; padding:24px 12px; margin-top:24px; border-top:1px solid var(--line); font-size:13px; }
#app .shell-account > span { font-weight:600; }
#app .shell-account a { font-size:12px; color:var(--soft); }
#app .app-utility-menu { margin-top:auto; }
#app .app-utility-menu > summary { padding:10px 8px; color:var(--soft); font-size:12px; cursor:pointer; }
#app .app-utility-menu > summary svg { fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
#app .top-actions { display:grid; justify-content:stretch; gap:2px; margin-left:0; width:100%; }
#app .utility-link { display:flex; align-items:center; gap:13px; min-height:44px; padding:8px 14px; border-radius:9px; color:var(--soft); font-size:13px; }
#app .utility-link:hover, #app .utility-link.active { background:var(--ghost); color:var(--ink); }
#app .utility-link svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none; }
#app .utility-buttons { display:flex; align-items:center; gap:4px; padding-top:8px; }
#app .utility-buttons button { font-size:11px; min-height:var(--button-height); padding:8px; flex:none; border-radius:8px; }
#app > main { width:100%; max-width:1200px; align-self:center; padding:66px 48px 42px; }
#app .pane { min-width:0; }
#app #verify-banner > span { min-width:0; overflow-wrap:anywhere; }
#app .pane:not(#tab-today):not(#tab-organisation) { max-width:780px; margin:0 auto; }
#app .pane-title { font-size:38px; font-weight:400; letter-spacing:-.025em; line-height:1.2; margin-bottom:28px; }
#app button, #app a.ghost { border-radius:6px; }
#app button:hover { transform:none; }
#app .panel { box-shadow:none; background:var(--surface); border-radius:14px; }
#app .section-nav { background:transparent; border:0; padding:0 0 12px; border-radius:0; border-bottom:1px solid var(--line); }
#app .section-nav a { font-size:13px; color:var(--soft); }
#app .section-nav a[aria-current="page"] { background:var(--ghost); color:var(--action-ink); }
#app .eyebrow { font-family:Inter,system-ui,sans-serif; font-size:11px; font-weight:600; letter-spacing:.09em; text-transform:uppercase; color:var(--faint); line-height:1.5; margin:0 0 10px; }
#app .daily-grid { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:60px; }
#app .daily-main { min-width:0; }
#app .daily-header { padding:0 0 25px; }
#app .daily-header h1 { font-size:44px; font-weight:400; line-height:1.15; letter-spacing:-.025em; margin:6px 0 14px; }
#app .daily-header h1 a { color:inherit; text-decoration:underline; text-decoration-color:var(--wash-line); text-decoration-thickness:1px; text-underline-offset:5px; }
#app .daily-header h1 a:hover { color:var(--gold-deep); text-decoration-color:currentColor; }
#app .daily-subtitle, #app .daily-date { color:var(--soft); font-size:13px; line-height:1.6; margin-top:8px; }
#app .calendar-link { display:inline-flex; align-items:center; min-height:44px; margin-top:6px; font-size:12px; color:var(--soft); }
#app .daily-section { border-top:1px solid var(--line); padding:20px 0 22px; }
#app .daily-section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
#app .daily-section-head h2 { font-weight:400; font-size:23px; letter-spacing:-.015em; }
#app .daily-section-head h2.eyebrow { font-size:11px; font-weight:600; letter-spacing:.09em; margin:0; }
#app .daily-section-head a { display:inline-flex; align-items:center; min-height:44px; flex:none; font-size:12px; font-weight:600; color:var(--action-ink); }
#app .daily-muted { color:var(--faint); font-size:12px; line-height:1.7; }
#app .daily-saints h3 { font-family:Inter,system-ui,sans-serif; color:var(--action-ink); font-size:12px; font-weight:500; margin:22px 0 12px; }
#app .saints-names { display:flex; flex-wrap:wrap; gap:7px 15px; list-style:none; color:var(--soft); font-size:12px; line-height:1.65; }
#app .daily-saints details { margin-top:15px; }
#app .daily-saints summary { display:flex; align-items:center; min-height:44px; font-size:11px; color:var(--faint); cursor:pointer; }
#app #today-novena h3 { font-size:27px; font-weight:400; line-height:1.35; letter-spacing:-.02em; margin-bottom:8px; }
#app #today-novena a { display:inline-flex; min-height:44px; align-items:center; color:var(--action-ink); font-size:13px; font-weight:600; }
#app .today-novena-item + .today-novena-item { margin-top:22px; padding-top:22px; border-top:1px solid var(--line); }
#app .novena-switcher { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 14px; }
#app .novena-switch { min-height:44px; padding:0 14px; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--soft); font-size:12px; cursor:pointer; }
#app .novena-switch[aria-pressed="true"] { border-color:var(--action-line); color:var(--action-ink); font-weight:600; }
#app .novena-intentions { list-style:none; margin:0 0 12px; padding:0; color:var(--soft); font-size:13px; line-height:1.6; }
#app .novena-progress { display:flex; flex-wrap:wrap; gap:8px; margin:21px 0 12px; }
#app .novena-progress-day { display:block; width:22px; height:4px; border-radius:3px; background:var(--line); }
#app .novena-progress-day[data-prayed="true"] { background:var(--action-ink); }
#app .novena-progress-day[data-current="true"]:not([data-prayed="true"]) { background:var(--gold-deep); }
#app .daily-action { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px 0; border-bottom:1px solid var(--line); }
#app .daily-action > div { min-width:0; }
#app .daily-action a { font-size:14px; font-weight:500; color:var(--ink); overflow-wrap:anywhere; }
#app .daily-action p { margin-top:5px; }
#app .daily-action > a { display:flex; align-items:center; min-height:44px; color:var(--action-ink); flex:none; font-size:12px; }
#app .daily-action button { flex:none; font-size:12px; }
#app .daily-intentions { list-style:none; }
#app .daily-intentions li { padding:12px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; white-space:pre-line; }
#app #today-tasks > p, #app #today-reminders > p { padding:12px 0; }
#app .daily-capture { border:1px solid var(--input-border); border-radius:14px; padding:16px; background:var(--surface); }
#app .daily-capture > label { margin:0 0 10px; color:var(--ink); font-size:13px; }
#app .daily-capture textarea { border:0; box-shadow:none; padding:0; background:transparent; resize:vertical; }
#app .capture-controls { display:flex; justify-content:space-between; flex-wrap:wrap; align-items:center; gap:8px; margin-top:12px; }
#app .capture-controls fieldset { display:flex; flex-wrap:wrap; gap:3px; border:0; min-width:0; }
#app .capture-controls label { display:flex; align-items:center; gap:5px; margin:0; padding:8px 7px; min-height:44px; font-size:12px; color:var(--soft); border-radius:8px; cursor:pointer; }
#app .capture-controls label:has(:checked) { background:var(--ghost); color:var(--action-ink); }
#app .capture-controls input { width:12px; accent-color:var(--action-ink); padding:0; box-shadow:none; }
#app .capture-controls button { font-size:12px; min-height:var(--button-height); padding:8px 12px; }
#app #today-capture-status:not(:empty) { margin-top:10px; }
#app .daily-aside { padding-top:12px; min-width:0; }
#app .daily-aside section { border-bottom:1px solid var(--line); padding:20px 0 24px; }
#app .daily-aside section:first-child { padding-top:0; }
#app .daily-aside h2 { font-size:20px; font-weight:400; margin-bottom:14px; }
#app .daily-aside p { font-size:12px; color:var(--soft); line-height:1.75; }
#app .daily-aside a { display:flex; align-items:center; min-height:44px; font-size:12px; color:var(--action-ink); margin-top:8px; }
#app .prayer-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:28px; }
#app .prayer-heading .pane-title { margin-bottom:0; }
#app .prayer-heading .prayer-link { flex:none; }
#app .prayer-nav { margin-bottom:28px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
#app .prayer-nav::-webkit-scrollbar { display:none; }
#app .prayer-nav a { flex:0 0 auto; white-space:nowrap; }
#app .pane .prayer-nav a:focus-visible { outline-offset:-2px; }
#app .prayer-section { padding:0 0 22px; margin-bottom:22px; border-bottom:1px solid var(--line); min-width:0; }
#app .prayer-section h3 { font-size:26px; font-weight:400; margin-bottom:15px; }
#app .prayer-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
#app .prayer-section-head h3 { margin-bottom:0; }
#app .prayer-link { display:inline-flex; align-items:center; min-height:44px; font-size:12px; color:var(--action-ink); }
#app .novena-current { padding:24px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
#app .novena-current h3 { font-size:30px; line-height:1.2; overflow-wrap:anywhere; margin-bottom:8px; }
#app .novena-state { color:var(--soft); font-size:12px; line-height:1.6; margin-bottom:8px; }
#app .novena-state:empty { display:none; }
#app #novena-status { font-size:13px; line-height:1.6; }
#app .novena-current .actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
#app .novena-current button { min-height:var(--button-height); }
#app #novena-open-prayer { background:var(--ink); border-color:var(--ink); color:var(--bg); }
#app .novena-settings { margin-top:16px; border-top:1px solid var(--line); padding-top:8px; }
#app .novena-settings > summary { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; color:var(--soft); font-size:12px; }
#app .novena-settings[open] > summary .chev, #app .novena-all-days[open] > summary .chev { transform:rotate(90deg); }
#app #prayer-suggestions { border-bottom:0; padding-bottom:0; }
#app .novena-recommendations { display:grid; border-top:1px solid var(--line); }
#app .novena-recommendation { display:grid; grid-template-columns:minmax(0,1fr); column-gap:24px; align-items:center; border-bottom:1px solid var(--line); min-width:0; }
#app .novena-recommendation.has-actions { grid-template-columns:minmax(0,1fr) auto; }
#app .novena-recommendation-title { display:block; font-family:Newsreader,Georgia,serif; font-weight:400; font-size:21px; line-height:1.3; overflow-wrap:anywhere; }
#app .novena-recommendation-description { display:block; color:var(--faint); font-size:12px; line-height:1.6; margin:7px 0; }
#app .novena-recommendation-open { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-width:0; min-height:44px; border:0; border-radius:0; padding:18px 0; background:transparent; color:var(--ink); text-align:left; }
#app .novena-recommendation-copy { min-width:0; }
#app .novena-recommendation-open .chev { flex:none; color:var(--soft); }
#app .novena-recommendation-open:hover { background:var(--ghost); }
#app .novena-recommendation-open:focus-visible { outline:2px solid var(--gold-deep); outline-offset:2px; }
#app .novena-recommendation-actions { grid-column:2; grid-row:1; display:flex; flex-wrap:wrap; gap:8px; padding:18px 0; }
#app .novena-recommendation-actions button { min-height:44px; }
#app .prayer-list { list-style:none; margin:0; padding:0; border-top:1px solid var(--line); }
#app .common-prayer { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-height:48px; padding:12px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; color:var(--ink); text-align:left; }
#app .common-prayer > span:first-child { min-width:0; overflow-wrap:anywhere; }
#app .common-prayer:hover { background:var(--ghost); }
#app .prayer-choice { display:flex; align-items:center; justify-content:space-between; gap:16px; background:var(--surface); color:var(--ink); text-align:left; width:100%; border:1px solid var(--line); border-radius:12px; padding:20px; }
#app .prayer-choice strong { display:block; font-size:14px; font-weight:500; }
#app .prayer-choice small { display:block; font-size:12px; line-height:1.6; color:var(--faint); margin-top:5px; }
#app .prayer-choice:hover { background:var(--ghost); }
#app .prayer-choice > span:first-child { min-width:0; }
#app #prayer-choices { border-bottom:0; margin-bottom:0; padding-bottom:0; }
#app .prayer-description { color:var(--soft); font-size:13px; line-height:1.7; margin-bottom:20px; }
#app .novena-library label { display:block; font-size:13px; color:var(--soft); }
#app .novena-library select { width:100%; margin-top:8px; min-height:44px; }
#app .novena-library .actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
#app .novena-library button { min-height:var(--button-height); }
#app .readings-context { color:var(--soft); font-size:13px; line-height:1.6; }
#app .reading-feast { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; }
#app .readings-context .feast-name { font-size:20px; line-height:1.4; overflow-wrap:anywhere; }
#app .readings-context .feast-rank { font-size:12px; font-style:normal; }
#app .readings-context .also-feasts { margin-top:4px; }
#app .readings-context .also-feasts > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:44px; list-style:none; font-size:12px; color:var(--soft); }
#app .readings-context .also-feasts > summary::-webkit-details-marker { display:none; }
#app .readings-context .also-feasts[open] .chev { transform:rotate(90deg); }
#app .readings-context .also-feasts-list { display:grid; gap:6px; list-style:none; padding:0; margin:4px 0 16px; }
#app .readings-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:20px; }
#app .readings-choices .prayer-choice { min-height:116px; align-items:flex-start; }
#app .readings-choices .prayer-choice strong { font-family:Newsreader,Georgia,serif; font-size:24px; font-weight:400; line-height:1.25; }
#app .readings-choices .prayer-choice small { margin-top:8px; }
#app .readings-choices .prayer-choice > span:last-child { align-self:center; }
#app #prayer-readings .readings-card { margin-top:24px; border-radius:14px; background:var(--surface); }
#app #prayer-readings .readings-card > summary { min-height:64px; padding:20px 24px; font-size:22px; line-height:1.3; }
#app #prayer-readings .readings-card > summary > span:first-child { min-width:0; overflow-wrap:anywhere; }
#app #prayer-readings .readings-body { max-width:760px; margin-inline:auto; padding:0 24px 28px; overflow-wrap:anywhere; }
#app #prayer-readings .readings-note { font-size:12px; line-height:1.6; margin-bottom:24px; }
#app #prayer-readings .reading + .reading { margin-top:28px; padding-top:24px; border-top:1px solid var(--line); }
#app #prayer-readings .reading-ref { font-size:16px; color:var(--action-ink); margin-bottom:12px; }
#app #prayer-readings .reading-text { font-size:22px; line-height:1.75; }
#app #prayer-readings .readings-card button { min-height:var(--button-height); margin-top:14px; }
#app .intention-entry { margin-top:20px; }
#app .novena-overview { margin:16px 0; }
#app .novena-overview:empty { margin:0; }
#app .novena-all-days { margin-top:18px; }
#app .novena-all-days > summary { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; font-size:13px; color:var(--soft); }
.prayer-reader { width:min(650px,calc(100vw - 32px)); max-height:calc(100svh - 40px); overflow:auto; overflow-wrap:anywhere; padding:28px; margin:auto; border:1px solid var(--line); border-radius:18px; background:var(--surface); color:var(--ink); }
.prayer-reader::backdrop { background:rgba(25,32,26,.42); }
.prayer-reader h2 { font-family:Newsreader,Georgia,serif; font-size:30px; font-weight:400; line-height:1.25; margin-bottom:12px; }
.prayer-reader-heading { align-items:flex-start; justify-content:space-between; gap:16px; }
.prayer-reader-heading button { flex:none; }
.prayer-reader-source { font-size:12px; color:var(--soft); line-height:1.65; margin-bottom:20px; }
.prayer-reader-text { font-family:Newsreader,Georgia,serif; white-space:pre-wrap; overflow-wrap:anywhere; font-size:22px; line-height:1.7; margin:22px 0; }
.prayer-reader-stages { display:flex; flex-wrap:wrap; gap:6px; margin-top:20px; }
.prayer-reader-stages button { font-size:12px; min-height:var(--button-height); border-radius:8px; padding:8px 12px; }
.prayer-reader-stages button[aria-pressed="true"] { background:var(--ghost); color:var(--action-ink); border-color:var(--action-ink); }
.prayer-reader .actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:22px; }
.prayer-reader button { min-height:var(--button-height); border-radius:6px; }
.prayer-reader summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-size:12px; }
.prayer-reader details p { white-space:pre-wrap; font-size:12px; line-height:1.7; color:var(--soft); }
.prayer-reader a { font-size:12px; display:inline-flex; min-height:44px; align-items:center; }
#app .chat-tools { margin-bottom:18px; }
/* The transcript scrolls with the page; its composer stays at the viewport foot. */
#app:has(#tab-chat:not(.hidden)) > main { padding-bottom:0; }
#app #messages { padding-bottom:0; }
#app #tab-chat { animation:none; padding-bottom:calc(var(--composer-height,120px) + var(--chat-viewport-inset,0px)); }
#app .composer-dock { position:fixed; left:var(--composer-left,50%); width:var(--composer-width,calc(100% - 44px)); bottom:var(--chat-viewport-inset,0px); z-index:12; padding-top:12px; --composer-space:max(44px,calc((100dvh - var(--consent-height,0px) - var(--chat-viewport-inset,0px)) / 2 - 12px - .4rem - env(safe-area-inset-bottom))); }
#app .composer-scroll { max-height:var(--composer-space); overflow-y:auto; overscroll-behavior:contain; }
/* Gianna's text is left-aligned, so the jump control sits right of it. */
#app #jump-latest { position:absolute; left:auto; right:0; transform:none; bottom:calc(100% + 8px); }
#app #suggestions { padding:8px 0; margin-bottom:4px; max-height:min(240px,25dvh); overflow-y:auto; }
#app #suggestions button { min-height:var(--button-height); }
#app #suggestions-toggle { color:var(--soft); font-size:18px; }
#app #messages .bub.g { background:transparent; border:0; padding-inline:0; font-size:15px; line-height:1.75; }
/* Without a bubble, a narrowed column only wastes the line. */
#app #messages .bubwrap.g { max-width:100%; }
#app #messages .bub.me { background:var(--wash); color:var(--ink); border-radius:14px 14px 4px 14px; }
#app .composer { border:1px solid var(--input-border); border-radius:14px; background:var(--surface); padding:10px; }
#app #chat-input { border:0; box-shadow:none; background:transparent; }
#app .chat-notices { display:flex; align-items:center; gap:8px; margin-top:8px; text-align:left; }
#app .composer-tools { display:flex; align-items:center; flex:none; }
#app .composer-tools > button { width:44px; min-width:44px; height:44px; padding:0; border:0; border-radius:8px; }
#app .composer-tools > button:hover { background:var(--ghost); }
#app #ai-disclaimer { flex:1; min-width:0; overflow-wrap:anywhere; }
#app .activity-history { margin:12px 0 18px; max-width:100%; font-size:12px; color:var(--faint); }
#app .activity-history summary { min-height:44px; display:flex; align-items:center; cursor:pointer; }
#app .activity-history ol { border-left:1px solid var(--line); padding:5px 0 5px 20px; margin:0; list-style:none; line-height:2; }
#app .activity-history li[data-phase="failed"] { color:var(--danger); }
#app .pane a:focus-visible, #app .pane button:focus-visible, #app .appbar :is(a,button,summary):focus-visible { outline:2px solid var(--gold-deep); outline-offset:3px; }
@media(min-width:901px) { #app .app-utility-menu > summary { display:none; } }
/* Collapsed rail: icons only. Labels stay in the accessibility tree. */
@media(min-width:901px) {
  .sidebar-collapsed body:not(.campaign-session) #app .appbar { padding:30px 14px 20px; }
  .sidebar-collapsed body:not(.campaign-session) #app header.top { padding:0 0 43px; }
  .sidebar-collapsed body:not(.campaign-session) #app .brand { justify-content:center; width:100%; }
  .sidebar-collapsed body:not(.campaign-session) #app .brand-copy,
  .sidebar-collapsed body:not(.campaign-session) #app .shell-account { display:none; }
  .sidebar-collapsed body:not(.campaign-session) #app :is(nav.tabs a, .utility-link) { justify-content:center; padding-inline:0; }
  .sidebar-collapsed body:not(.campaign-session) #app :is(nav.tabs a, .utility-link) span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .sidebar-collapsed body:not(.campaign-session) #app nav.tabs { margin-bottom:24px; }
  .sidebar-collapsed body:not(.campaign-session) #app .utility-buttons { flex-direction:column; }
}
@media(max-width:1120px) and (min-width:901px) {
  #app > main { padding:48px 32px 36px; }
  #app .daily-grid { grid-template-columns:minmax(0,1fr); }
  #app .daily-aside { display:none; }
}
@media(max-width:900px) {
  :root { --navigation-inset:var(--navigation-height,65px); }
  :root.chat-keyboard-open { --navigation-inset:0px; }
  #app { max-width:780px; padding-left:0; padding-bottom:calc(var(--navigation-inset) + 8px); margin:auto; }
  #app .appbar { position:sticky; inset:auto; top:0; width:100%; display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; padding:env(safe-area-inset-top) 0 0; border:0; border-bottom:1px solid var(--line); background:var(--bg); }
  #app header.top { flex:1 1 auto; min-width:0; min-height:66px; padding:16px 22px; }
  #app .brand img { width:26px; height:26px; }
  #app .wordmark { font-size:29px; }
  #app .shell-account, #sidebar-toggle { display:none!important; }
  #app .app-utility-menu { position:relative; top:auto; right:auto; flex:none; margin:0 14px 0 auto; }
  #app .app-utility-menu > summary { display:flex; align-items:center; justify-content:center; width:44px; min-height:44px; padding:8px; font-size:11px; list-style:none; border-radius:8px; }
  #app .app-utility-menu > summary::-webkit-details-marker { display:none; }
  #app .app-utility-menu[open] .top-actions { position:absolute; top:100%; right:0; width:196px; max-width:calc(100vw - 28px); max-height:calc(100dvh - var(--appbar-height,66px) - var(--navigation-height,65px) - 16px); overflow-y:auto; justify-content:stretch; padding:6px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 30px var(--shadow); }
  #app .app-utility-menu .utility-link { padding:4px 10px; }
  #app nav.tabs { position:fixed; inset:auto 0 var(--chat-viewport-inset,0px); display:flex; justify-content:space-around; padding:7px 10px calc(7px + env(safe-area-inset-bottom)); background:var(--bg); border-top:1px solid var(--line); z-index:18; gap:0; }
  .chat-keyboard-open #app nav.tabs { visibility:hidden; }
  #app nav.tabs a { flex:1; flex-direction:column; justify-content:center; gap:3px; min-height:48px; padding:4px 6px; border-radius:8px; font-size:10px; }
  #app nav.tabs a svg { width:19px; height:19px; }
  #app nav.tabs a.active { background:transparent; color:var(--ink); font-weight:600; }
  #app nav.tabs a.active svg { color:var(--gold-deep); }
  #app > main { padding:30px 22px 24px; }
  #app .pane-title { font-size:34px; margin-bottom:23px; }
  #app .prayer-heading { margin-bottom:23px; }
  #app .prayer-heading .pane-title { margin-bottom:0; }
  #app .daily-grid { grid-template-columns:minmax(0,1fr); gap:0; }
  #app .daily-aside { display:none; }
  #app .daily-header h1 { font-size:36px; }
  #app .daily-section { padding:18px 0 20px; }
  #app .daily-section-head h2 { font-size:22px; }
  #app #today-novena h3 { font-size:25px; }
  #app .novena-current { padding:20px; }
  #app .novena-current h3 { font-size:27px; }
  #app .novena-recommendation.has-actions { grid-template-columns:minmax(0,1fr); }
  #app .novena-recommendation-actions { grid-column:1; grid-row:auto; padding:0 0 18px; }
  #app .readings-choices { grid-template-columns:minmax(0,1fr); }
  #app #prayer-readings .readings-card > summary { padding-inline:20px; }
  #app #prayer-readings .readings-body { padding-inline:20px; }
  #app .composer-dock { bottom:calc(var(--navigation-inset) + var(--chat-viewport-inset,0px)); --composer-space:max(44px,calc((100dvh - var(--appbar-height,66px) - var(--navigation-inset) - var(--consent-height,0px) - var(--chat-viewport-inset,0px)) / 2 - 12px - .4rem - env(safe-area-inset-bottom))); }
  .chat-keyboard-open #app .composer-dock { padding-top:8px; padding-bottom:4px; }
  .chat-keyboard-open #app .chat-notices { margin-top:4px; }
  #app .composer { flex-wrap:wrap; gap:4px; padding:7px; }
  #app .composer > button { width:44px; min-width:44px; height:44px; }
  #app #chat-input { flex:1 1 80px; font-size:16px; }
  #app .section-nav a { padding-inline:9px; font-size:12px; }
  .prayer-reader { padding:22px; }
  .prayer-reader-text { font-size:21px; }
  .management-notice { bottom:calc(var(--navigation-height,65px) + 16px); }
  body.campaign-session #app { padding-bottom:0; }
  body.campaign-session #app .composer-dock { bottom:var(--chat-viewport-inset,0px); }
}
body.campaign-session #app { padding-left:0; max-width:780px; }
body.campaign-session #app .appbar { position:sticky; inset:auto; top:0; width:100%; display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; padding:0; border-right:0; border-bottom:1px solid var(--line); }
body.campaign-session #app header.top { flex:1 1 auto; min-width:0; padding:14px 22px; border-bottom:0; }
body.campaign-session #app .shell-account, body.campaign-session #sidebar-toggle { display:none!important; }
body.campaign-session #app .app-utility-menu { position:relative; top:auto; right:auto; flex:none; margin:0 14px 0 auto; }
body.campaign-session #app .app-utility-menu > summary { display:flex; min-height:44px; align-items:center; }
body.campaign-session #app .top-actions { background:var(--surface); padding:8px; border:1px solid var(--line); border-radius:12px; }
body.campaign-session #app .composer-dock { --composer-space:max(44px,calc((100dvh - var(--appbar-height,66px) - var(--consent-height,0px) - var(--chat-viewport-inset,0px)) / 2 - 12px - .4rem - env(safe-area-inset-bottom))); }
@media(prefers-reduced-motion:reduce) { #app .pane { animation:none; } }
/* Keep consent reachable without covering navigation or the message box. */
body:has(#app:not(.hidden)):has(#consent-banner) #app .composer-dock { bottom:calc(var(--consent-height,0px) + var(--chat-viewport-inset,0px)); }
body:has(#app:not(.hidden)) #consent-banner { bottom:var(--chat-viewport-inset,0px)!important; }
.chat-keyboard-open #consent-banner { padding-bottom:.7rem!important; }
@media(min-width:901px) {
  #app .appbar { overflow-y:auto; }
  body:has(#app:not(.hidden)):not(.campaign-session) #consent-banner { left:var(--side-width)!important; }
  body:has(#app:not(.hidden)):has(#consent-banner) #app { padding-bottom:var(--consent-height,0px); }
}
@media(max-width:900px) {
  body:has(#app:not(.hidden)):not(.campaign-session) #consent-banner { bottom:calc(var(--navigation-inset) + var(--chat-viewport-inset,0px))!important; }
  body:has(#app:not(.hidden)):has(#consent-banner):not(.campaign-session) #app { padding-bottom:calc(var(--navigation-inset) + 8px + var(--consent-height,0px)); }
  body:has(#app:not(.hidden)):has(#consent-banner):not(.campaign-session) #app .composer-dock { bottom:calc(var(--navigation-inset) + var(--consent-height,0px) + var(--chat-viewport-inset,0px)); }
  body.campaign-session:has(#consent-banner) #app { padding-bottom:var(--consent-height,0px); }
}

/* Compact actions retain a full touch target and a visible keyboard focus. */
#app .icon-action, .prayer-reader .icon-action { display:inline-flex; align-items:center; justify-content:center; flex:none; width:44px; height:44px; min-width:44px; min-height:44px; padding:10px; box-sizing:border-box; vertical-align:middle; color:var(--action-ink); text-decoration:none; border-radius:10px; }
#app .icon-action .action-icon, .prayer-reader .icon-action .action-icon { width:20px; height:20px; flex:none; pointer-events:none; }
#app .icon-action:hover, .prayer-reader .icon-action:hover { background:var(--ghost); }
#app .icon-action:focus-visible, .prayer-reader .icon-action:focus-visible { outline:2px solid var(--action-ink); outline-offset:2px; }
#app .icon-action.danger { color:var(--danger, #a94442); }
#app .more-popup .icon-action { color:var(--action-ink); }
#app .icon-action.gold { color:#242b27; }
#app .icon-action[aria-pressed="true"] { background:var(--ghost); color:var(--gold-deep); }
#app .offline-notice { margin:0; padding:.55rem 1rem; background:var(--side); border-bottom:1px solid var(--line); color:var(--soft); font-size:12px; text-align:center; }
#app .calendar-controls { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin:6px 0 10px; }
#app .calendar-modes, #app .calendar-steps { display:flex; gap:6px; }
#app .calendar-modes button[aria-pressed="true"] { border-color:var(--action-line); color:var(--action-ink); font-weight:600; }
#app .calendar-week { list-style:none; margin:0; padding:0; }
#app .calendar-week li + li { border-top:1px solid var(--line); }
#app .calendar-week-day { display:grid; grid-template-columns:4.6rem minmax(0,1fr) auto; align-items:center; gap:10px; width:100%; min-height:48px; padding:8px 4px; background:none; border:0; color:var(--ink); text-align:left; font:inherit; cursor:pointer; }
#app .calendar-week-day[aria-pressed="true"] { background:var(--side); }
#app .calendar-week-day[aria-current="date"] .calendar-date { color:var(--action-ink); font-weight:600; }
#app .calendar-date { color:var(--soft); font-size:12px; }
#app .calendar-celebration { display:flex; align-items:center; gap:8px; min-width:0; font-size:14px; overflow-wrap:anywhere; }
#app .calendar-rank { color:var(--faint); font-size:11px; }
#app .calendar-colour { display:inline-block; flex:none; width:10px; height:10px; border-radius:50%; border:1px solid var(--line); background:transparent; vertical-align:middle; }
#app .calendar-colour[data-colour="white"] { background:#fbfaf5; }
#app .calendar-colour[data-colour="gold"] { background:#d6b45a; }
#app .calendar-colour[data-colour="red"] { background:#b23a32; }
#app .calendar-colour[data-colour="green"] { background:#4f7a45; }
#app .calendar-colour[data-colour="violet"] { background:#6b4a8a; }
#app .calendar-colour[data-colour="rose"] { background:#d68aa1; }
#app .calendar-colour[data-colour="black"] { background:#1c1c1c; }
#app .calendar-month { width:100%; table-layout:fixed; border-collapse:collapse; }
#app .calendar-month th { padding:4px 0; color:var(--faint); font-size:11px; font-weight:500; text-align:center; }
#app .calendar-month td { padding:2px; vertical-align:top; }
#app .calendar-month-day { display:flex; flex-direction:column; align-items:center; gap:3px; width:100%; min-height:52px; padding:5px 2px; border:1px solid transparent; border-radius:8px; background:none; color:var(--ink); font:inherit; cursor:pointer; }
#app .calendar-month-day[data-outside="true"] { color:var(--faint); }
#app .calendar-month-day[aria-pressed="true"] { border-color:var(--action-line); }
#app .calendar-month-day[aria-current="date"] .calendar-number { color:var(--action-ink); font-weight:700; }
#app .calendar-number { font-size:13px; }
#app .calendar-month-name { display:none; width:100%; font-size:10px; line-height:1.25; color:var(--soft); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (min-width:700px) { #app .calendar-month-name { display:block; } #app .calendar-month-day { min-height:72px; } }
#app .calendar-day-details { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
#app .calendar-day-details h4 { display:flex; align-items:center; gap:8px; font-size:20px; font-weight:400; margin:4px 0; }
#app .missal-controls { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin:6px 0 10px; }
#app .missal-languages, #app .missal-steps { display:flex; flex-wrap:wrap; gap:6px; }
#app .today-steps { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; }
#app .missal-languages button[aria-pressed="true"] { border-color:var(--action-line); color:var(--action-ink); font-weight:600; }
#app .missal-title { font-size:24px; font-weight:400; margin:8px 0 2px; }
#app .missal-subtitle { color:var(--soft); font-style:italic; margin:0 0 10px; }
#app .missal-contents { display:flex; flex-wrap:wrap; gap:4px 14px; margin:12px 0 18px; font-size:12px; }
#app .missal-contents a { display:inline-flex; align-items:center; min-height:32px; color:var(--action-ink); }
#app .missal-part { padding:16px 0; border-top:1px solid var(--line); scroll-margin-top:72px; }
#app .missal-part-title { font-family:Newsreader,Georgia,serif; font-size:19px; font-weight:400; margin:0 0 8px; }
#app .missal-columns { display:grid; gap:14px; }
#app .missal-columns[data-language="both"] { grid-template-columns:minmax(0,1fr); }
@media (max-width:759px) { #app .missal-columns[data-language="both"] .missal-text + .missal-text { border-top:1px dashed var(--line); padding-top:12px; } }
@media (min-width:760px) { #app .missal-columns[data-language="both"] { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; } }
#app .missal-text p { margin:0 0 .55em; font-family:Newsreader,Georgia,serif; font-size:16px; line-height:1.55; color:var(--ink); }
#app .missal-text[lang="la"] p { color:var(--ink); }
#app .missal-text p.missal-rubric { font-family:Inter,system-ui,sans-serif; font-size:12px; line-height:1.5; color:#a23b2a; font-style:italic; }
#app .missal-text p.missal-citation { font-family:Inter,system-ui,sans-serif; font-size:11px; color:var(--faint); letter-spacing:.02em; }
#app .missal-mark { color:#a23b2a; font-weight:600; }
#app .missal-source { margin-top:18px; color:var(--faint); font-size:11px; }
