/* ================================================================ the shell (js/shell.js): menu, search, settings
   Joseph, 3 Dec 2026: design "A+E 1", in the site's own look (black cappa, small capitals, red for rubrics). */
button { color: inherit; font: inherit; }               /* no browser-blue buttons (iOS) */
.srch-btn { height: 34px; border: 1px solid var(--cappa-line); border-radius: 17px; background: none; color: var(--cappa-muted);
  display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; font-family: var(--caps); letter-spacing: .08em; font-size: 14px; cursor: pointer; }
.srch-btn:hover { color: var(--cappa-ink); border-color: var(--cappa-ink); }
.srch-btn kbd { font: 11px/1 var(--serif, serif); border: 1px solid var(--cappa-line); border-radius: 4px; padding: 2px 4px; letter-spacing: 0; }
.srch { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.4); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 14px 0; }
.srch[hidden] { display: none; }
.srch-box { width: min(640px, 100%); max-height: 76vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.srch-in { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.srch-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 19px var(--serif, serif); padding: 16px 18px; }
.srch-x { width: 48px; height: 48px; border: 0; background: none; font-size: 26px; color: var(--muted); cursor: pointer; }
.srch-res { overflow-y: auto; padding: 6px 0 10px; }
.srch-k { font-family: var(--caps); letter-spacing: .14em; font-size: 12px; color: var(--rubric); padding: 12px 18px 4px; }
.srch-r { display: block; padding: 9px 18px; text-decoration: none; color: var(--ink); line-height: 1.3; }
.srch-r b { font-weight: 600; display: block; font-size: 17px; }
.srch-r span { display: block; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-r.on, .srch-r:hover { background: color-mix(in srgb, var(--rubric) 8%, transparent); }
.srch-none { padding: 14px 18px; color: var(--muted); margin: 0; }
body.srch-open { overflow: hidden; }

/* the Library's own menu */
.lib-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.lib-nav a { font-family: var(--caps); letter-spacing: .08em; font-size: 14px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 5px 12px; }
.lib-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Settings: "I am" */
.sh-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sh-roles button { border: 1px solid var(--cappa-line); background: none; color: var(--cappa-ink); border-radius: 8px; padding: 10px 6px; font-family: var(--caps); letter-spacing: .06em; font-size: 15px; cursor: pointer; }
.sh-roles button[aria-checked="true"] { background: var(--rubric); border-color: var(--rubric); color: #fff; }
.sheet .seg { flex-wrap: wrap; }
/* the "This Mass" chip by the day */
.tm-chip { margin-left: auto; border: 1px solid var(--line); background: none; color: var(--ink); border-radius: 16px; padding: 5px 12px; font-family: var(--caps); letter-spacing: .08em; font-size: 14px; cursor: pointer; }
.tm-chip:hover { border-color: var(--ink); }
body.shell #massbar #segForm, body.shell #massbar #segLang { display: none; }

/* translations on a phone: Latin, then its English under it, quieter (Joseph: "make sure the translations look good on iPhones") */
@media (max-width: 600px) {
  .m-tr, .reading .r-cols > .en-text, .oratio .r-cols > .en-text, .o-lp .o-en, .o-pair .o-en, .preface .pf-text .en-text {
    border-left: 0 !important; padding-left: 0 !important; margin: 3px 0 12px !important; font-size: 15px !important; line-height: 1.45; font-style: normal; color: var(--muted); }
  .o-lp, .o-pair { margin-bottom: 4px; }
}

/* ---- the menu: a side rail on a computer */
@media (min-width: 1000px) {
  body.shell { padding-left: 196px; }
  body.shell .top { position: fixed; top: 0; left: 0; bottom: 0; width: 196px; overflow-y: auto; }
  body.shell .top-in { flex-direction: column; align-items: stretch; gap: 14px; padding: 20px 14px; max-width: none; min-height: 100%; box-sizing: border-box; }
  body.shell .brand { padding: 0 6px 6px; }
  body.shell .nav { flex-direction: column; gap: 2px; }
  body.shell .nav a { padding: 9px 12px; border-bottom: 0; border-radius: 8px; }
  body.shell .nav a[aria-current="page"] { background: var(--rubric); color: #fff; }
  body.shell .top-tools { margin: auto 0 0; flex-direction: column; align-items: stretch; gap: 8px; order: 0; }
  body.shell .top-tools > * { justify-content: center; }
  body.shell .top-in > .top-tools { order: 2; }
  body.shell .srch-btn { justify-content: flex-start; }
  body.shell .srch-btn kbd { margin-left: auto; }
  /* the basic rubrics stay in the text; the full rubric, when opened, goes in a column beside it (Joseph, 3 Dec 2026) */
  body.shell .content > .inner { max-width: 1060px; }
  body.shell #mass { padding-right: 290px; }
  body.shell #mass details.rx[open] > .rx-full { float: right; clear: right; width: 262px; margin: 0 -290px 12px 0; font-size: 14px; line-height: 1.45; }
}
/* ---- a tab bar on a phone */
@media (max-width: 999px) {
  body.shell { padding-bottom: 64px; }
  body.shell .top .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--cappa); border-top: 1px solid var(--cappa-line);
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding-bottom: env(safe-area-inset-bottom); font-size: 13px; letter-spacing: .04em; }
  body.shell .top .nav a { text-align: center; padding: 14px 0 16px; border: 0; }
  body.shell .top .nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 3px 0 var(--rubric); }
  body.shell .srch-btn .srch-l, body.shell .srch-btn kbd { display: none; }
  body.shell .srch-btn { width: 34px; padding: 0; justify-content: center; }
}
@media print { .srch, .srch-btn, .tm-chip, .rub-chip, .lib-nav { display: none !important; } body.shell { padding: 0 !important; } .part .o-rub { display: block !important; } }
.daybar .pm-day { margin-left: 6px; }
.daybar .pm-day .pm-btn { padding: 5px 12px; }
body.shell #massbar:not(:has(> *:not([hidden]):not(#segForm):not(#segLang))) { display: none; }
/* the switches inside the dark sheets */
.sheet .seg { background: none; border: 1px solid var(--cappa-line); }
.sheet .seg button { background: none; color: var(--cappa-muted); border-color: var(--cappa-line); }
.sheet .seg button[aria-checked="true"] { background: var(--rubric); color: #fff; }
/* Study: every rubric open (Settings) */
.srch-in input::-webkit-search-cancel-button { display: none; }
body.shell #sheet #segForm button[data-v=""] { display: none; }
/* old row (unused) */
.tm-bar { display: flex; gap: 8px; align-items: center; margin: -4px 0 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tm-bar::-webkit-scrollbar { display: none; }
.tm-bar .tm-chip { margin-left: 0; white-space: nowrap; flex: none; }
.tm-bar .pmenu { margin-left: auto; flex: none; position: static; }
.tm-bar .pm-btn { white-space: nowrap; }
@media (max-width: 600px) { .tm-bar .tm-chip, .tm-bar .pm-btn { font-size: 13px; padding: 5px 10px; } }

/* the day bar: the date and the "This Mass" chip on one line */
body.shell .daybar { flex-wrap: nowrap; }
body.shell .daybar .tm-chip { margin-left: auto; flex: none; }
.sheet .pmenu { position: relative; }
.sheet .pm-btn { width: 100%; justify-content: center; }
/* the iPhone: the date, the title and the parts only (Joseph, 3 Dec 2026) */
@media (max-width: 600px) {
  body.shell .daybar { font-size: 14px; gap: 6px; margin-bottom: 8px; }
  body.shell .daybar .day-meta, body.shell .day-alts { display: none; }
  body.shell #mhead .rubric-line, body.shell .caps-head#chants { display: none; }
  body.shell.en-tap #mhead .en { display: none; }
  body.shell #mhead h1, body.shell #mhead .mass-title { margin-bottom: 4px; }
  body.shell .daybar .tm-chip { font-size: 13px; padding: 5px 10px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.shell .jump { position: sticky; top: 54px; z-index: 30; background: var(--paper); margin: 0 -16px; padding: 0 16px; }
}
/* the iPhone, tidied (Joseph, 3 Dec 2026: "a bit cluttered still and a bit sloppy") */
@media (max-width: 600px) {
  body.shell .top-in { min-height: 50px; gap: 10px; padding: 0 12px; }
  body.shell .brand .t1 { font-size: 17px; }
  body.shell .top-tools { gap: 6px; }
  body.shell .top-tools > button, body.shell .srch-btn { width: 36px; height: 36px; padding: 0; justify-content: center; border-color: transparent; }
  body.shell .content { padding: 12px 18px 90px; }
  body.shell .daybar { display: grid; grid-template-columns: 32px auto 32px 1fr; align-items: center; justify-items: start; gap: 8px; margin: 0 0 14px; }
  body.shell .daybar .day-step { width: 32px; height: 32px; font-size: 15px; }
  body.shell #dayDate { font-size: 15px; letter-spacing: .06em; white-space: nowrap; }
  body.shell .daybar .tm-chip { justify-self: end; font-size: 12px; letter-spacing: .06em; padding: 6px 11px; border-color: var(--line); max-width: 44vw; }
  body.shell .mass-head h1 { font-size: 27px; line-height: 1.12; }
  body.shell .mass-head { margin-bottom: 6px; }
  body.shell .jump { top: 50px; margin: 0 -18px 6px; padding: 4px 14px; border-bottom: 1px solid var(--line); }
  body.shell .jump a { font-size: 12.5px; padding: 6px 9px; }
  body.shell .jump a.on { background: none; color: var(--rubric); box-shadow: inset 0 -2px 0 var(--rubric); border-radius: 0; }
  body.shell .part { padding-top: 14px; }
  body.shell .part > h2, body.shell .part .p-h { margin-bottom: 6px; }
}
@media (max-width: 600px) {
  body.shell .daybar { grid-template-columns: 32px max-content 32px minmax(0, 1fr); }
  body.shell #dayDate { min-width: 0; width: auto; text-align: left; justify-self: start; }
  body.shell .daybar .tm-chip { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; justify-self: end; }
}
@media (max-width: 600px) {
  body.shell .daybar { display: flex; flex-wrap: nowrap; }
  body.shell #dayDate { flex: 0 1 auto; padding: 0; margin: 0; display: inline-block; }
  body.shell .daybar .tm-chip { margin-left: auto; flex: 0 1 auto; }
}
/* ================================================================ Settings and This Mass as lists of rows (light, like the page) */
body.shell .sheet { background: var(--paper); color: var(--ink); padding: 0 0 30px; width: min(420px, 100vw); }
body.shell .sheet .sheet-head { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); padding: 0 18px; margin: 0; }
body.shell .sheet .sheet-x { color: var(--muted); }
body.shell .sheet .grp { padding: 16px 18px 4px; }
body.shell .sheet .grp > h3 { margin: 0 0 8px; font-family: var(--caps); font-weight: 500; letter-spacing: .14em; font-size: 13px; color: var(--rubric); }
body.shell .sheet .row { display: block; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 8px; background: var(--paper); }
body.shell .sheet details.row > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 14px; cursor: pointer; }
body.shell .sheet details.row > summary::-webkit-details-marker { display: none; }
body.shell .sheet details.row > summary::after { content: "›"; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s; }
body.shell .sheet details.row[open] > summary::after { transform: rotate(90deg); }
body.shell .sheet .rl { font-size: 17px; flex: none; }
body.shell .sheet .rv { flex: 1; min-width: 0; text-align: right; color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.shell .sheet .rb { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
body.shell .sheet .row-flat { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
body.shell .sheet .row-flat > .rl { font-size: 17px; }
body.shell .sheet .row-sw { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; padding: 12px 14px; cursor: pointer; align-items: center; }
body.shell .sheet .row-sw .rl { grid-column: 1; }
body.shell .sheet .row-sw small { grid-column: 1; color: var(--muted); font-size: 13px; }
body.shell .sheet .row-sw input { grid-column: 2; grid-row: 1 / 3; width: 22px; height: 22px; accent-color: var(--rubric); }
body.shell .sheet .sh-hint { color: var(--muted); font-size: 14px; line-height: 1.4; margin: 0; }
body.shell .sheet .field label, body.shell .sheet label { color: var(--ink); }
body.shell .sheet select, body.shell .sheet input[type=date], body.shell .sheet .sh-sel, body.shell .sheet .sh-date { background: var(--paper); color: var(--ink); color-scheme: light; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 16px; width: 100%; box-sizing: border-box; }
body.shell .sheet .seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: none; flex-wrap: nowrap; }
body.shell .sheet .seg button { flex: 1; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink); padding: 10px 4px; font-family: var(--caps); letter-spacing: .06em; font-size: 14px; border-radius: 0; }
body.shell .sheet .seg button:first-child { border-left: 0; }
body.shell .sheet .seg button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
body.shell .sheet #segCal { border: 0; gap: 8px; }
body.shell .sheet #segCal button { border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
body.shell .sheet #segCal button[aria-checked="true"] { background: var(--rubric); border-color: var(--rubric); color: #fff; }
body.shell .sheet .sh-roles { grid-template-columns: 1fr; gap: 6px; }
body.shell .sheet .sh-roles button { border: 1px solid var(--line); color: var(--ink); text-align: left; padding: 11px 13px; display: flex; flex-direction: column; gap: 2px; font-family: inherit; letter-spacing: 0; }
body.shell .sheet .sh-roles button b { font-family: var(--caps); letter-spacing: .08em; font-weight: 500; font-size: 15px; }
body.shell .sheet .sh-roles button small { color: var(--muted); font-size: 13px; }
body.shell .sheet .sh-roles button[aria-checked="true"] { border-color: var(--rubric); box-shadow: inset 4px 0 0 var(--rubric); }
body.shell .sheet .sh-cal, body.shell .sheet .cal-day { color: var(--ink); }
body.shell .sheet .sh-btn { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
body.shell .sheet .rubopts { display: flex; flex-direction: column; gap: 10px; }
body.shell .sheet .rubopts .ro { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
body.shell .sheet .sh-link { color: var(--rubric); text-decoration: none; font-size: 16px; }
body.shell .sheet .pm-btn { border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--ink); padding: 10px; width: 100%; }
body.shell .sheet .row-adv { border-style: dashed; }
body.shell .sheet .side-foot { padding: 10px 18px; color: var(--muted); font-size: 13px; }
body.shell .sheet .day-alts summary { color: var(--ink); }
[data-theme=dark] body.shell .sheet select { color-scheme: dark; }
body.shell .sheet .pmenu { width: 100%; }
body.shell .sheet .pm-btn { display: none; }
body.shell .sheet .pm-list, body.shell .sheet .pm-list[hidden] { display: flex; flex-direction: column; position: static; box-shadow: none; border: 0; background: none; padding: 0; gap: 0; min-width: 0; }
body.shell .sheet .pm-list button { text-align: left; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); padding: 12px 2px; font-size: 16px; font-family: inherit; letter-spacing: 0; }
body.shell .sheet .pm-list button:first-child { border-top: 0; padding-top: 2px; }
body.shell .sheet .pm-list button::after { content: " \203A"; color: var(--muted); }
body.shell .sheet .sh-link { padding-top: 10px; border-top: 1px solid var(--line); }
body.shell .sheet .kyp-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
body.shell .sheet .field > label { font-family: var(--caps); letter-spacing: .1em; font-size: 13px; color: var(--muted); }

/* ===== other pages (restyle helper) */
/* Holy Week, the Office and the Library in the Mass page's design "A+E 1" (Joseph, 3 Dec 2026: "cluttered", "sloppy",
   "nothing is intuitive"). js/pages.js moves each page's own controls: a day bar like the Mass page's, the options in
   Settings as rows, the parts of the page in one row under the title. Only the variables of style.css, so night mode follows. */

/* ---- Holy Week: the day bar (‹ Palm Sunday 29 Mar ›, the seven days under the name, the rite in the chip) */
body.shell .hw-daybar { flex-wrap: nowrap; }
.hw-dlab { background: none; border: 0; border-bottom: 1px dotted var(--muted); border-radius: 0; padding: 0 0 1px; margin: 0; font: inherit; letter-spacing: inherit;
  color: var(--ink); display: inline-flex; align-items: baseline; gap: 8px; cursor: pointer; white-space: nowrap; min-width: 0; }
.hw-dlab:hover, .hw-dlab[aria-expanded="true"] { border-bottom-color: var(--ink); }
.hw-dlab .hw-dd { color: var(--muted); }
.hw-daybar .day-step:disabled { opacity: .3; cursor: default; }
.hw-pop { position: absolute; top: 42px; left: 0; z-index: 50; width: 320px; max-width: calc(100vw - 36px); box-sizing: border-box; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; letter-spacing: 0; font-family: var(--serif, serif); }
.hw-pop[hidden] { display: none; }
body.shell .hw-pop .hw-days { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0; border: 0; padding: 0; margin: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
body.shell .hw-pop .hw-days button { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; text-align: left; width: 100%;
  padding: 9px 12px; margin: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
body.shell .hw-pop .hw-days button small { grid-column: 1; grid-row: 1; font-family: var(--caps); letter-spacing: .08em; font-size: 16px; color: inherit; }
body.shell .hw-pop .hw-days button span { display: block; grid-column: 1; grid-row: 2; font-style: italic; font-size: 14px; color: var(--muted); }
body.shell .hw-pop .hw-days button::after { content: attr(data-date); grid-column: 2; grid-row: 1 / 3; color: var(--muted); font-size: 14px; }
body.shell .hw-pop .hw-days button:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
body.shell .hw-pop .hw-days button.on { background: color-mix(in srgb, var(--rubric) 9%, transparent); box-shadow: none; }
body.shell .hw-pop .hw-days button.on small { color: var(--rubric); }
body.shell .hw-pop .hw-days button:focus:not(:focus-visible) { outline: none; }
/* the rite, in Settings: a switch like the others there */
body.shell .sheet .hw-rite { display: flex; width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: none; }
body.shell .sheet .hw-rite button { flex: 1; border: 0; background: none; color: var(--ink); padding: 10px 6px; line-height: 1.25; cursor: pointer; }
body.shell .sheet .hw-rite button + button { border-left: 1px solid var(--line); }
body.shell .sheet .hw-rite button[hidden] { display: none; }
body.shell .sheet .hw-rite button span { font-family: var(--caps); letter-spacing: .06em; font-size: 15px; }
body.shell .sheet .hw-rite button small { font-size: 12.5px; color: var(--muted); font-style: italic; }
body.shell .sheet .hw-rite button.on { background: var(--ink); color: var(--paper); }
body.shell .sheet .hw-rite button.on small { color: inherit; opacity: .8; }
/* only the traditional rite offered (the 1959 reform not shown): it reads as a line of text, not a lone button */
body.shell .sheet .hw-rite:has(button[hidden]) { border: 0; border-radius: 0; }
body.shell .sheet .hw-rite:has(button[hidden]) button:not([hidden]) { background: none; color: var(--ink); text-align: left; padding: 0; cursor: default; display: flex; align-items: baseline; gap: 8px; }
body.shell .sheet .hw-rite:has(button[hidden]) button small { opacity: 1; color: var(--muted); }
body.shell .sheet .row-flat > select { width: 100%; }
body.shell.pg-hw .sheet .sheet-head span, body.shell.pg-office .sheet .sheet-head span { font-family: var(--caps); letter-spacing: .1em; }

/* ---- the Office: the title as on the Mass page, the Hours as its parts row */
body.pg-office .day-t { margin: 0 0 6px; }
body.pg-office .day-t .day-title { font-size: 40px; font-weight: 500; line-height: 1.08; margin: 0; }
body.pg-office .day-t .day-sub { margin: 4px 0 0; font-size: 17px; }
body.pg-office .day-t .day-sub:empty { display: none; }
body.pg-office .hours { position: sticky; top: var(--toph, 54px); z-index: 30; background: var(--paper); margin: 10px 0 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
body.pg-office .hours .sbtn { min-height: 0; }
body.pg-office .o-head { margin: 4px 0 0; }
body.pg-office .o-head h1 { font-size: 24px; letter-spacing: .1em; line-height: 1.2; }
body.pg-office .o-sub { margin: 0 0 16px; font-size: 16px; }
body.pg-office .o-head + .o-sec > .o-h:first-child { border-top: 0; margin-top: 18px; padding-top: 0; }
@media (min-width: 1000px) { body.pg-office .hours { top: 0; } }

/* ---- the Library: one row for its pages, the notes as light boxes, the contents folding */
.lib-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.lib-nav::-webkit-scrollbar { display: none; }
.lib-nav a { flex: none; border: 0; border-radius: 0; padding: 9px 10px; color: var(--muted); white-space: nowrap; font-size: 14px; }
.lib-nav a:hover { color: var(--rubric); }
.lib-nav a[aria-current="page"] { background: none; color: var(--rubric); border: 0; box-shadow: inset 0 -2px 0 var(--rubric); }
body.pg-lib .prose .rb-src, body.pg-lib .prose .pr-src { font-style: normal; font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 46rem; margin: 0 0 16px; }
body.pg-lib .prose .ai-note, body.pg-lib .prose .about-note { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; max-width: 46rem; box-sizing: border-box; }
body.pg-lib .prose .ai-note { font-size: 14.5px; line-height: 1.45; color: var(--muted); }
body.pg-lib .prose .about-note p { margin: 0 0 8px; } body.pg-lib .prose .about-note p:last-child { margin: 0; }
body.pg-lib .prose .about-note b { font-weight: 600; }
body.pg-lib .prose .dedication { border: 0; padding: 0; margin: 0 0 22px; color: var(--muted); max-width: 46rem; }
.lib-toc { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 28px; }
.lib-toc > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; cursor: pointer; font-size: 17px; }
.lib-toc > summary::-webkit-details-marker { display: none; }
.lib-toc > summary::after { content: "›"; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .15s; }
.lib-toc[open] > summary::after { transform: rotate(90deg); }
.lib-toc > ol.rb-toc, .lib-toc > ol.pr-toc { margin: 0; padding: 12px 14px 8px; border-top: 1px solid var(--line); }

/* ---- the iPhone: the date, the title and the parts only (as on the Mass page) */
@media (max-width: 600px) {
  body.shell .hw-dlab { font-size: 15px; letter-spacing: .06em; gap: 6px; }
  body.shell .hw-dlab .hw-dd { font-size: 13px; }
  body.shell .hw-daybar .tm-chip { margin-left: auto; }
  body.pg-office .day-t .day-title, body.pg-lib .prose h1 { font-size: 27px; line-height: 1.12; }
  body.pg-office .day-t .day-sub { display: none; }
  body.pg-office .hours { top: 50px; margin: 6px -18px 10px; padding: 4px 14px; -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  body.pg-office .hours .sbtn { font-size: 12.5px; padding: 6px 9px; }
  body.pg-office .hours .sbtn.on { background: none; color: var(--rubric); box-shadow: inset 0 -2px 0 var(--rubric); border-radius: 0; }
  body.pg-office .o-head h1 { font-size: 21px; }
  body.pg-office .o-sub { font-size: 15px; margin-bottom: 12px; }
  .lib-nav { margin: -4px -18px 16px; padding: 0 8px; -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  .lib-nav a { font-size: 13px; padding: 9px 9px; }
  body.pg-lib .prose h1 { margin-bottom: 10px; }
  body.pg-lib .prose .rb-src, body.pg-lib .prose .pr-src { font-size: 15.5px; }
  body.pg-lib .prose .ai-note { font-size: 14px; }
  .lib-toc { margin-bottom: 22px; }
}
@media print { .hw-daybar, .hw-pop, .pg-chip, .lib-toc { display: none !important; } }
/* ===== one Settings panel (3 Dec 2026, 10:40) */
body.shell .sheet .sh-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.shell .sheet .sh-roles button { min-height: 64px; }
body.shell .sheet .sh-roles button small { line-height: 1.25; }
body.shell .sheet .grp > .seg { margin-bottom: 4px; }
body.shell .sheet .grp > .sh-hint { margin-top: 6px; }
body.shell .sheet .rl-sub { font-family: var(--caps); letter-spacing: .1em; font-size: 13px; color: var(--muted); }
body.shell .sheet #calHint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
body.shell .sheet .row-sw { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; padding: 12px 0; }
body.shell .sheet .sh-roles button[aria-checked="true"] { background: var(--rubric); border-color: var(--rubric); color: #fff; box-shadow: none; }
body.shell .sheet .sh-roles button[aria-checked="true"] small { color: rgba(255,255,255,.88); }
body.shell .sheet #segCal button { background: var(--paper); color: var(--ink); }
body.shell .sheet #segCal button small, body.shell .sheet #segCal button span { color: inherit; opacity: .8; }
body.shell .sheet #segCal button[aria-checked="true"] { background: var(--rubric); border-color: var(--rubric); color: #fff; }
body.shell .sheet .tm-body label:has(#chkEdit) { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 12px 0 0; }
/* the first visit: "Who are you at this Mass?" */
.role-ask { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0 18px; background: var(--paper); }
.role-ask h2 { font-family: var(--caps); font-weight: 500; letter-spacing: .08em; font-size: 18px; color: var(--rubric); margin: 0 0 4px; }
.role-ask .sh-hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.role-ask .sh-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-ask .sh-roles button { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); text-align: left; padding: 11px 12px; display: flex; flex-direction: column; gap: 3px; min-height: 64px; cursor: pointer; }
.role-ask .sh-roles button b { font-family: var(--caps); letter-spacing: .08em; font-weight: 500; font-size: 15px; }
.role-ask .sh-roles button small { color: var(--muted); font-size: 13px; line-height: 1.25; }
.role-ask .sh-roles button:hover { border-color: var(--rubric); }
.role-ask .role-skip { margin-top: 10px; background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 4px 0; cursor: pointer; font-size: 14px; }
@media (min-width: 1000px) { .role-ask .sh-roles { grid-template-columns: repeat(4, 1fr); } }
.role-ask .sh-roles button { font-family: var(--serif); letter-spacing: 0; }
.role-ask .sh-roles button small { font-family: var(--serif); letter-spacing: 0; font-variant: normal; text-transform: none; font-size: 14px; }
/* the Holy Week rite and the Office's Breviary: two buttons, like the Calendar */
body.shell .sheet .seg-cal { border: 0; gap: 8px; display: flex; }
body.shell .sheet .seg-cal button { border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; align-items: center; background: var(--paper); color: var(--ink); }
body.shell .sheet .seg-cal button:first-child { border-left: 1px solid var(--line); }
body.shell .sheet .seg-cal button b { font-weight: 500; font-size: 17px; letter-spacing: .06em; }
body.shell .sheet .seg-cal button small { font-family: var(--serif); letter-spacing: 0; font-size: 13px; opacity: .8; }
body.shell .sheet .seg-cal button[aria-checked="true"] { background: var(--rubric); border-color: var(--rubric); color: #fff; }

/* =====================================================================================================================
   Design v2 (3 Dec 2026, Joseph: "clarity, simplicity, but able to have a bunch of options")
   1. One way into the options on every page: the chip by the date (phone) / Settings in the rail (computer).
      No moon, no second gear: Night lives in Settings.
   2. The head of a page is: date bar, title, English title, the parts row. Nothing else on a phone.
   3. One colour for "chosen": ink. Red is only for headings, rubrics and where you are.
   ===================================================================================================================== */
body.shell #themeBtn, body.shell .theme-btn { display: none !important; }
@media (max-width: 999px) {
  body.shell:has(.tm-chip) .top .gear { display: none !important; }      /* the chip opens Settings on a phone */
  body.shell .top-in { min-height: 46px; }
  body.shell .brand { font-size: 17px; }
}
/* the title: Latin, then the English in quiet italics (also when the page is in Latin only) */
body.shell .mass-head h1 { margin-bottom: 0; }
body.shell .mass-head .en, body.shell.en-tap #mhead .en { display: block !important; color: var(--muted); font-style: italic; font-size: 16px; margin: 2px 0 0; }
/* no empty bars between the title and the text */
body.shell #massbar:empty, body.shell #massbar:not(:has(> :not([hidden]):not(#segForm):not(#segLang):not(.pmenu))) { display: none !important; }
body.shell .caps-head#chants { display: none !important; }
body.shell #mhead .o-hint { font-size: 14px; margin: 6px 0 0; }
/* the parts row on a computer too: a quiet sticky row under the title */
@media (min-width: 1000px) {
  body.shell .jump { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); margin: 10px 0 8px; padding: 6px 0; }
  body.shell .jump a { font-size: 13px; padding: 6px 10px; border-radius: 0; }
  body.shell .jump a.on { background: none; color: var(--rubric); box-shadow: inset 0 -2px 0 var(--rubric); }
  body.shell #mhead .rubric-line { margin: 6px 0 0; font-size: 14px; }
}
/* chosen = ink, everywhere (Settings, role cards, calendar, rite, breviary, booklet builder) */
body.shell .sheet .sh-roles button[aria-checked="true"], .role-ask .sh-roles button[aria-checked="true"],
body.shell .sheet #segCal button[aria-checked="true"], body.shell .sheet .seg-cal button[aria-checked="true"],
.bld-seg button[aria-checked="true"] { background: var(--ink) !important; border-color: var(--ink) !important; color: var(--paper) !important; }
body.shell .sheet .sh-roles button[aria-checked="true"] small, body.shell .sheet .seg-cal button[aria-checked="true"] small,
body.shell .sheet #segCal button[aria-checked="true"] small { color: var(--paper) !important; opacity: .8; }
/* the Settings panel: calmer headings, more air between groups, the panel title says what it is for */
body.shell .sheet .grp { padding-top: 18px; }
body.shell .sheet .grp > h3 { color: var(--ink); opacity: .7; font-size: 12.5px; letter-spacing: .16em; }
body.shell .sheet .sh-hint { font-size: 13.5px; }
body.shell .sheet #calHint { display: none; }   /* Design v2: the calendar buttons say enough */
body.shell .o-more:empty { display: none; }   /* an empty "more prayers" box (no extra prayers today) */
/* Design v2: the Office's Hours row looks like the Mass's parts row on every screen; the text keeps a readable width */
body.pg-office .hours .sbtn { background: none !important; border: 0 !important; border-radius: 0 !important; font-family: var(--caps); letter-spacing: .06em; font-size: 13px; color: var(--muted); padding: 6px 10px; }
body.pg-office .hours .sbtn.on { color: var(--rubric) !important; box-shadow: inset 0 -2px 0 var(--rubric); }
@media (min-width: 1000px) { body.pg-office #office { max-width: 780px; } }
/* Settings as one sentence (3 Dec 2026, 13:43) */
body.shell .sheet .grp-sent { padding: 22px 18px 6px; }
body.shell .sheet .sentence { font-family: var(--serif); font-size: 23px; line-height: 1.75; margin: 0 0 10px; color: var(--ink); }
body.shell .sheet .sent-sel { -webkit-appearance: none; appearance: none; width: auto; display: inline; font: inherit; font-size: 23px !important;
  color: var(--rubric); background: none !important; border: 0 !important; border-bottom: 1.5px dashed var(--rubric) !important; border-radius: 0 !important;
  padding: 0 2px 1px !important; margin: 0; cursor: pointer; line-height: 1.3; }
body.shell .sheet .sent-sel:focus { outline: 2px solid var(--rubric); outline-offset: 2px; }
body.shell .sheet .grp-sent .sh-hint { font-size: 14.5px; }
.sent-meas { position: absolute; left: -9999px; top: 0; white-space: nowrap; font-family: var(--serif); font-size: 23px; visibility: hidden; }
