/* Mary's Book: THE LOOK (DESIGN.md 5, 7.7).  Written November 29, 2026.  "A Cloth-Bound Book on a Mountain Porch at
   Sunset": cream paper, a deep plum binding, rose and lavender sky, pine green, and candlelight amber for one thing,
   the main action on each page.  Nothing anywhere under 18 px (0.9rem at Big); body 20 px; targets 56 px.
   Every size is in rem, so Text Size (Big 20, Bigger 23, Biggest 26) scales everything.
   A theme replaces five tokens only (--accent, --accent-ink, --sky-top, --sky-bottom, --glow); paper and ink never change.
   Contrast (worked out with the WCAG formula in DESIGN.md 5 and 7.7, and checked by tests/contrast.mjs): ink on paper
   14.8:1, ink-2 9.6:1, plum 10.9:1, pine 8.9:1, lav-ink 6.8:1, ink on amber 7.4:1.  Rose, lavender and amber are never
   text on paper. */
:root {
  --paper: #FAF4EC; --card: #FFFDF8; --ink: #2A1B2E; --ink-2: #4A3A4D; --plum: #4A2C4F; --pine: #2F4A3A; --lav-ink: #5B4A93;
  --rose: #E8A0A8; --lavender: #8E7CC3; --amber: #E0A458; --glow: #F3C98B; --gold: #C9A227; --glass: #24152A;
  --accent: #E0A458; --accent-ink: #2A1B2E; --sky-top: #8E7CC3; --sky-bottom: #E8A0A8;
  --line: #E4D6CC; --shadow: 0 2px 0 rgba(74,44,79,.12), 0 8px 24px rgba(74,44,79,.10);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", "Segoe Script", cursive;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --gutter: 16px; --paper-tex: none;
}
html { font-size: 20px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html[data-text="bigger"] { font-size: 23px; }
html[data-text="biggest"] { font-size: 26px; }
@media (min-width: 700px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper) var(--paper-tex); background-size: 512px; color: var(--ink); font: 400 1rem/1.5 var(--sans); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); color: var(--plum); line-height: 1.2; margin: 0 0 .5rem; font-weight: 600; }
h2 { font-size: 1.4rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .75rem; }
a { color: var(--plum); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }
.mb-sr, .mb-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mb-quiet { color: var(--ink-2); }
.mb-noscript { padding: 2rem; font-size: 1.2rem; }
.mbi { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.mbi.tiny { width: .95em; height: .95em; }

/* ---------- the page column ---------- */
.mb-main { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter) 4rem; outline: none; }
.mb-main.turn { animation: turn .28s ease-out; }
@keyframes turn { from { opacity: 0; } to { opacity: 1; } }
.mb-main.turn .ch-banner { animation: rise .28s ease-out; }
@keyframes rise { from { transform: translateY(12px); } to { transform: none; } }
.page-title { font-size: 2rem; margin: 1.25rem 0 1rem; }
@media (max-width: 699px) { .page-title { font-size: 1.7rem; } }
.crumb { margin: 1rem 0 .5rem; }
.sec-h { margin: 1.5rem 0 .75rem; }

/* ---------- buttons (56 px; the main action 64 px, amber with ink letters) ---------- */
.mb-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 56px; padding: .45rem 1.1rem; border-radius: 14px;
  border: 2px solid var(--plum); background: var(--card); color: var(--plum); font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; text-align: center; }
.mb-btn:hover { background: #F6ECF2; }
.mb-btn:disabled { opacity: .55; cursor: default; }
.mb-btn.main { min-height: 64px; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 1.05rem; padding: .5rem 1.4rem; box-shadow: var(--shadow); }
.mb-btn.main:hover { filter: brightness(1.05); }
.mb-btn.small { min-height: 48px; padding: .3rem .8rem; font-size: .9rem; }
.mb-btn.quiet { border-color: var(--line); color: var(--ink-2); font-weight: 400; }
.mb-btn.chip { min-height: 52px; border-radius: 999px; border-color: var(--line); color: var(--ink); font-weight: 600; }
.mb-btn.chip.on { background: var(--plum); border-color: var(--plum); color: #FFFDF8; }
.mb-btn.paper { background: rgba(255,253,248,.94); border-color: rgba(74,44,79,.35); color: var(--plum); min-height: 52px; }
.mb-btn.icon { width: 56px; padding: 0; }
.mb-btn.switch[aria-checked="true"] { background: var(--pine); border-color: var(--pine); color: #FFFDF8; }
.mb-btn.file { position: relative; overflow: hidden; }
.mb-btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 1rem; }
.mb-link { background: none; border: 0; padding: .4rem 0; min-height: 48px; color: var(--plum); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.mb-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: .5rem 0; }
.mb-row.tight { gap: 10px; align-items: flex-end; }
.mb-row.acts { margin: 1rem 0; }
.mb-row.wrap { flex-wrap: wrap; }

/* ---------- forms: a label above every box, nothing smaller than the floor ---------- */
.mb-form { display: flex; flex-direction: column; gap: .8rem; }
.mb-field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; flex: 1 1 12rem; }
.mb-field > span { font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.mb-field.sm { flex: 0 1 11rem; } .mb-field.xs { flex: 0 1 7rem; } .mb-field.grow { flex: 1 1 14rem; }
.mb-field.title input { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--plum); }
.mb-field.bare input { border-color: transparent; background: transparent; font-weight: 600; font-size: 1.05rem; padding-left: .3rem; }
.mb-field.bare input:hover, .mb-field.bare input:focus { border-color: var(--line); background: var(--card); }
.mb-field input, .mb-field select, .mb-field textarea { width: 100%; min-height: 56px; padding: .55rem .8rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.mb-field textarea { min-height: 6rem; resize: vertical; line-height: 1.5; }
.mb-field input:focus, .mb-field select:focus, .mb-field textarea:focus { border-color: var(--plum); outline: none; box-shadow: 0 0 0 3px rgba(74,44,79,.18); }
.mb-check { display: inline-flex; align-items: center; gap: .6rem; min-height: 56px; cursor: pointer; font-weight: 600; }
.mb-check input { width: 28px; height: 28px; accent-color: var(--plum); flex: none; }
.mb-check.big { font-size: 1.15rem; padding: .3rem .8rem; border: 2px solid var(--line); border-radius: 14px; background: var(--card); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; color: var(--ink-2); font-size: .9rem; margin-bottom: .3rem; }
.mb-add { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: .75rem 0; }
.mb-add.big { margin: 1rem 0; }

/* ---------- cards, the paper look (16 px corners, soft shadows, a thin rose rule under each title) ---------- */
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 1rem 1.1rem; margin: 0 0 1rem; border: 0; color: inherit; text-align: left; }
.card h2 { padding-bottom: .4rem; border-bottom: 2px solid var(--rose); margin-bottom: .75rem; font-size: 1.3rem; }
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards .card { margin: 0; }

/* ---------- every chapter opens the same way: the banner, the paper label, one row of views, one amber action ---------- */
.ch-top { position: relative; margin: 0 calc(-1 * var(--gutter)) 1.5rem; }
@media (min-width: 1164px) { .ch-top { margin: 1rem 0 1.5rem; } .ch-banner { border-radius: 18px; } }
.ch-banner { position: relative; aspect-ratio: 3 / 1; overflow: hidden; background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); }
.ch-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 699px) { .ch-banner { aspect-ratio: 2 / 1; } .ch-banner img { object-position: 70% 50%; } }
.ch-ridges { position: absolute; inset: auto 0 0 0; width: 100%; height: 70%; }
.ch-ridges .r1 { fill: var(--plum); opacity: .45; } .ch-ridges .r2 { fill: var(--pine); opacity: .7; }
.ch-label { position: absolute; left: var(--gutter); bottom: -1.1rem; margin: 0; background: var(--card); color: var(--plum); font-size: 2.4rem; padding: .35rem 1.1rem .45rem;
  border-radius: 8px 8px 8px 2px; box-shadow: var(--shadow); transform: rotate(-1.2deg); max-width: calc(100% - 2 * var(--gutter)); }
@media (max-width: 699px) { .ch-label { font-size: 1.8rem; } }
.ch-sub { margin-top: 1.5rem; }
.ch-views { display: flex; gap: 10px; flex-wrap: wrap; margin: 2rem 0 .5rem; }
.ch-views.circles { gap: 8px; }

/* ---------- an empty page: one sleeping cat and one kind sentence ---------- */
.mb-empty { text-align: center; padding: 1.5rem 1rem 2rem; color: var(--ink-2); }
.mb-empty .cat { width: 160px; height: auto; display: block; margin: 0 auto .75rem; }
.mb-empty svg.cat { fill: #E6D9E8; stroke: var(--plum); stroke-width: 2; stroke-linecap: round; }
.mb-empty p { font-family: var(--serif); font-size: 1.15rem; font-style: italic; }

/* ---------- faces: a photo, a paw print, or initials, in a round frame ---------- */
.mb-face { width: 64px; height: 64px; border-radius: 50%; background: #F1E6EC; color: var(--plum); display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; border: 2px solid #E9D8E1; }
.mb-face img { width: 100%; height: 100%; object-fit: cover; }
.mb-face .ini { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; }
.mb-face .mbi { width: 55%; height: 55%; }
.mb-face.cat { background: #F6EEDD; }
.mb-face.sm { width: 48px; height: 48px; } .mb-face.lg { width: 88px; height: 88px; } .mb-face.xl { width: 128px; height: 128px; }
.mb-face.xl .ini { font-size: 2.4rem; }

/* ---------- the sheet ---------- */
.mb-scrim { position: fixed; inset: 0; background: rgba(42,27,46,.45); z-index: 900; }
.mb-sheet { position: fixed; z-index: 901; background: var(--paper); color: var(--ink); left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(44rem, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100vh - 2rem); overflow: auto; overscroll-behavior: contain; border-radius: 20px; box-shadow: 0 24px 60px rgba(42,27,46,.35); }
.mb-sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem .5rem 1.25rem; background: var(--paper); border-bottom: 2px solid var(--rose); }
.mb-sheet-head h2 { margin: 0; font-size: 1.5rem; }
.mb-sheet-body { padding: 1rem 1.25rem 1.5rem; }
.mb-close { display: inline-flex; align-items: center; gap: .3rem; min-height: 56px; padding: 0 .9rem; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--plum); font-weight: 600; cursor: pointer; }
@media (max-width: 699px) {
  .mb-sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .mb-sheet-body { padding: 1rem var(--gutter) 2rem; }
}
.contents-sheet { width: min(60rem, calc(100vw - 2 * var(--gutter))); }
.contents-foot { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 2px solid var(--line); }
.contents-foot .ch-card.set { flex: 1 1 14rem; max-width: 22rem; }
.ts { display: flex; flex-direction: column; gap: .3rem; }
.ts-l { font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.mb-seg { display: inline-flex; border: 2px solid var(--plum); border-radius: 14px; overflow: hidden; }
.mb-seg button { min-height: 56px; min-width: 5rem; padding: 0 .9rem; border: 0; background: var(--card); color: var(--plum); font-weight: 600; cursor: pointer; }
.mb-seg button + button { border-left: 2px solid var(--plum); }
.mb-seg button[aria-pressed="true"] { background: var(--plum); color: #FFFDF8; }

/* ---------- Removed.  Undo ---------- */
.mb-undo { position: fixed; z-index: 950; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; background: var(--plum); color: #FFFDF8;
  border-radius: 16px; padding: .5rem .6rem .5rem 1.2rem; box-shadow: 0 10px 30px rgba(42,27,46,.35); max-width: calc(100vw - 2 * var(--gutter)); }
.mb-undo .mb-btn { background: var(--glow); color: var(--ink); border-color: var(--glow); }

/* ---------- the "?" (DESIGN.md 6.6): a small lavender-ink mark in a 26 px circle, inside a 44 px tap area ---------- */
.tip-q { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -8px 0 -8px 2px; padding: 0; border: 0; background: none; cursor: pointer; vertical-align: middle; }
.tip-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--lav-ink); color: var(--lav-ink); font: 700 .9rem/22px var(--sans); text-align: center; background: var(--card); }
html[data-tips="off"] .tip-q { display: none; }
.tip-card { position: fixed; z-index: 980; width: min(22rem, calc(100vw - 16px)); background: var(--card); color: var(--ink); border: 2px solid var(--lav-ink); border-radius: 14px; padding: .9rem 1rem; box-shadow: var(--shadow); }
.tip-title { font-weight: 700; color: var(--plum); margin-bottom: .3rem; }
.tip-text { margin: 0 0 .6rem; }
.tip-ok { min-height: 48px; padding: 0 1rem; border-radius: 12px; border: 2px solid var(--plum); background: var(--card); color: var(--plum); font-weight: 600; cursor: pointer; }

/* ---------- first-time cards ---------- */
.mb-first { position: absolute; z-index: 960; width: min(22rem, calc(100vw - 24px)); background: var(--card); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: 0 14px 40px rgba(42,27,46,.3); border: 2px solid var(--accent); }
.mb-first h2 { font-size: 1.25rem; }

/* ---------- the porch (DESIGN.md 8.2): min(60vh, 640px), the painting or its sky, words on a paper plate ---------- */
.porch { position: relative; margin: 0 calc(-1 * var(--gutter)); min-height: min(60vh, 640px); display: flex; align-items: flex-start; overflow: hidden; isolation: isolate; }
@media (min-width: 1164px) { .porch { margin: 1rem 0 0; border-radius: 22px; } }
.porch-sky { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 72%, #F7D3B0 100%); }
html[data-theme="christmas"] .porch-sky { background: linear-gradient(180deg, var(--sky-top) 0%, #3A4F66 45%, var(--sky-bottom) 100%); }
.porch-ridges { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; }
.porch-ridges .r1 { fill: #6B5A8E; opacity: .55; } .porch-ridges .r2 { fill: var(--plum); opacity: .75; } .porch-ridges .r3 { fill: var(--pine); }
html[data-theme="christmas"] .porch-ridges .r1 { fill: #F2EEF6; opacity: .85; } html[data-theme="christmas"] .porch-ridges .r2 { fill: #DCE4EE; opacity: .95; } html[data-theme="christmas"] .porch-ridges .r3 { fill: var(--pine); }
.porch-rail { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(90deg, #3B2433 0 10px, transparent 10px 46px), linear-gradient(#3B2433, #3B2433) top / 100% 6px no-repeat; opacity: .85; }
.porch-art, .porch-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.porch-video { opacity: 0; transition: opacity 1.2s ease; } .porch-video.on { opacity: 1; }
.porch-drift { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.porch-drift i { position: absolute; top: -20px; border-radius: 50%; background: rgba(255,255,255,.85); animation: fall linear infinite; }
.porch-drift[data-drift="leaves"] i { background: #C8743A; border-radius: 0 60% 0 60%; opacity: .8; }
.porch-drift[data-drift="petals"] i { background: #F5C6D0; border-radius: 60% 0 60% 0; }
@keyframes fall { from { transform: translate3d(0, -20px, 0) rotate(0); } to { transform: translate3d(40px, min(64vh, 680px), 0) rotate(240deg); } }
.porch-words { position: relative; width: 100%; padding: 1.25rem var(--gutter) 5rem; }
.plate { max-width: 34rem; background: rgba(255,253,248,.94); color: var(--ink); border-radius: 18px; padding: 1rem 1.25rem 1rem; box-shadow: 0 10px 30px rgba(42,27,46,.18); }
.greet { margin: 0 0 .5rem; }
.greet .t { display: block; font: italic 500 2rem/1.15 var(--serif); color: var(--plum); }
.greet .l { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--ink-2); margin-top: .3rem; }
@media (min-width: 700px) { .greet .t { font-size: 2.4rem; } }
.cd-above { margin: .2rem 0; color: var(--ink-2); font-weight: 600; }
.cd-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cd { margin: .2rem 0; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.cd b { font: 700 3rem/1 var(--serif); color: var(--plum); font-variant-numeric: tabular-nums; }
@media (min-width: 700px) { .cd b { font-size: 4rem; } }
.cd span { font: 600 1.15rem/1.2 var(--serif); color: var(--plum); }
.cd.feast { font: 600 1.5rem/1.2 var(--serif); color: var(--plum); }
.cd-own { margin: .2rem 0; font-weight: 600; color: var(--ink-2); }
.cd-own b { font-family: var(--serif); color: var(--plum); font-size: 1.3rem; }
.porch-btns { display: flex; gap: 10px; margin-top: .6rem; }

/* The Christmas Countdown Tree (7.5): a CSS tree until B1 is painted. */
.tree { position: relative; width: 150px; height: 130px; flex: none; }
.tree-shape { position: absolute; left: 50%; top: 6%; transform: translateX(-50%); width: 120px; height: 104px; background: linear-gradient(#2F6B4A, #1F3B2D); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tree-shape::after { content: ""; }
.tree-star { position: absolute; left: 50%; top: -2%; width: 16px; height: 16px; margin-left: -8px; background: var(--gold); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.orn { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: #B9A8C9; box-shadow: inset -2px -2px 0 rgba(0,0,0,.15); }
.orn::before { content: ""; position: absolute; inset: -13px; }   /* a 44 px tap area around a small ornament */
.orn.c0 { background: #A3202E; } .orn.c1 { background: #6B4F8E; } .orn.c2 { background: #2F6A4F; } .orn.c3 { background: var(--gold); } .orn.c4 { background: #F4F0EA; } .orn.c5 { background: #C0392B; } .orn.c6 { background: #8A5A3B; } .orn.c7 { background: #D98E4A; }
.orn.later { opacity: .35; cursor: default; }
.orn.past:not(.opened) { opacity: .7; }
.orn.today { box-shadow: 0 0 0 3px #FFF3C4, 0 0 16px 6px rgba(243,201,139,.9); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 3px #FFF3C4, 0 0 22px 10px rgba(243,201,139,.6); } }
.tree.lit .orn { opacity: 1; box-shadow: 0 0 10px 3px rgba(243,201,139,.8); }
.orn-promise { width: 44px; height: 64px; border: 0; background: none; cursor: pointer; position: relative; }
.orn-promise::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 22px; background: var(--gold); }
.orn-promise .ball { position: absolute; left: 50%; top: 22px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F1C27D, #A3202E 70%); box-shadow: 0 0 14px 4px rgba(243,201,139,.8); }
.orn-card .orn-text { font: italic 500 1.4rem/1.45 var(--serif); color: var(--plum); }
.orn-card .orn-ref { font-weight: 600; color: var(--ink-2); }

/* Home's cards: the same order everywhere; three across on a desktop, two on an iPad, one on a phone. */
.home-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 1.25rem; }
@media (min-width: 700px) { .home-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .home-grid { grid-template-columns: repeat(3, 1fr); } .home-grid .today { grid-row: span 2; } }
.home-grid .card { margin: 0; }
.today .date { font: 600 1.3rem/1.3 var(--serif); color: var(--plum); }
.fast { display: flex; gap: .5rem; align-items: center; color: var(--pine); font-weight: 600; }
.day-list { list-style: none; margin: 0 0 .5rem; padding: 0; }
.day-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.day-list li:last-child { border-bottom: 0; }
.day-list li > .mbi { margin-top: .2rem; color: var(--plum); }
.day-list .lay-church > .mbi, .day-list .lay-church .mbi { color: var(--pine); }
.day-list .lay-holidays .mbi { color: var(--lav-ink); }
.cats { display: flex; flex-wrap: wrap; gap: 12px; }
.cat-btn { display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 96px; padding: .4rem; border: 0; background: none; cursor: pointer; border-radius: 14px; color: var(--ink); }
.cat-btn:hover { background: #F6EEDD; }
.cat-btn .nm { font-weight: 700; } .cat-btn .add { color: var(--ink-2); font-size: .9rem; }
.cat-says { margin-top: .6rem; font-family: var(--hand); font-size: 1.5rem; line-height: 1.2; color: var(--plum); }
.cat-says b { font-family: var(--sans); font-size: 1rem; }
.kind-line { font: italic 500 1.2rem/1.5 var(--serif); color: var(--plum); }
.home-contents { margin-top: 2rem; }
.home-contents > h2 { font-size: 1.8rem; }

/* ---------- Contents: four shelves; four across on a desktop, three on an iPad, two on a phone ---------- */
.shelf { margin-bottom: 1.25rem; }
.shelf h3 { font-size: 1.2rem; color: var(--ink-2); margin: 0 0 .5rem; }
.shelf-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .shelf-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .shelf-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ch-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-height: 8rem; padding: .9rem; border: 0; border-radius: 16px; background: var(--card);
  box-shadow: var(--shadow); color: var(--ink); text-align: left; cursor: pointer; }
.ch-card:hover { box-shadow: 0 2px 0 rgba(74,44,79,.14), 0 12px 30px rgba(74,44,79,.16); }
.ch-card .k1 { width: 56px; height: 56px; border-radius: 50%; background: #F1E6EC; color: var(--plum); display: flex; align-items: center; justify-content: center; object-fit: cover; }
.ch-card .k1 .mbi { width: 30px; height: 30px; }
.ch-card .nm { font: 600 1.15rem/1.2 var(--serif); color: var(--plum); }
.ch-card .ln { color: var(--ink-2); font-size: .9rem; line-height: 1.35; }
.ch-card .ribbon { position: absolute; top: .6rem; right: -.2rem; background: var(--plum); color: #FFFDF8; font-size: .9rem; padding: .1rem .6rem; border-radius: 4px 0 0 4px; }
@media (max-width: 420px) { .ch-card .ln { display: none; } .ch-card { min-height: 7rem; } }
html[data-text="biggest"] .shelf-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); }

/* ---------- People ---------- */
.rolodex { display: block; }
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: .5rem 0 1rem; }
.az-l { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; border-radius: 10px; background: var(--card); box-shadow: var(--shadow); font: 600 1.1rem var(--serif); color: var(--plum); text-decoration: none; }
@media (min-width: 1024px) {
  .rolodex { display: grid; grid-template-columns: 1fr 64px; gap: 16px; }
  .az { order: 2; flex-direction: column; flex-wrap: nowrap; position: sticky; top: 84px; align-self: start; margin: 0; }
}
.az-h { font-size: 1.5rem; margin: 1rem 0 .5rem; scroll-margin-top: 110px; }
.p-card { display: flex; gap: .9rem; align-items: center; width: 100%; cursor: pointer; background-image: linear-gradient(var(--rose), var(--rose)); background-size: 100% 3px; background-repeat: no-repeat; background-position: 0 .55rem; }
.p-card .p-words { display: flex; flex-direction: column; min-width: 0; }
.p-card .nm { font: 600 1.2rem/1.25 var(--serif); color: var(--plum); overflow-wrap: anywhere; }
.p-card .rel { color: var(--ink-2); }
.p-card .next { color: var(--pine); font-weight: 600; }
.p-card.remembered { opacity: .9; background-image: none; }
.person { max-width: 52rem; }
.person-head { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; margin: .5rem 0 1rem; }
.ph-words { flex: 1 1 18rem; min-width: 0; }
.memory { font: italic 600 1.2rem var(--serif); color: var(--plum); display: flex; gap: .5rem; align-items: center; }
.p-sec { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.p-sec h2 { font-size: 1.25rem; padding-bottom: .35rem; border-bottom: 2px solid var(--rose); }
.p-sec.quietsec { background: transparent; box-shadow: none; padding: .5rem 0; }
.mb-date { margin-bottom: .6rem; }
.mb-date .lbl { font-weight: 700; color: var(--plum); }
.reach-row { padding-bottom: .4rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.ideas { list-style: none; padding: 0; margin: 0 0 .5rem; }
.ideas li { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.ideas li > span:first-child { flex: 1 1 10rem; font-family: var(--hand); font-size: 1.5rem; color: var(--plum); line-height: 1.2; }
.done { color: var(--pine); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.drop { border: 2px dashed transparent; border-radius: 14px; padding: .4rem; }
.drop.lit { border-color: var(--plum); background: #F6ECF2; }
.drop-words { display: none; font-weight: 700; color: var(--plum); text-align: center; }
.drop.lit .drop-words { display: block; }
.p-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: .6rem; }
.ph { margin: 0; background: var(--paper); border-radius: 12px; overflow: hidden; }
.ph img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ph figcaption { display: flex; flex-wrap: wrap; gap: 6px; padding: .4rem; }
.ph.cover { outline: 3px solid var(--accent); }

/* ---------- Calendar ---------- */
.layers { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: .25rem 0 1rem; }
.layer .mbi { margin-right: .25rem; }
.cal.wide { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 20px; align-items: start; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: .5rem; }
.cal-head h2 { margin: 0; font-size: 1.7rem; text-align: center; }
.cal-today { text-align: center; margin: 0 0 .4rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-weight: 700; color: var(--ink-2); font-size: .9rem; padding: .2rem 0; overflow: hidden; }
.cal-day { position: relative; min-height: 56px; padding: .25rem; border: 0; border-radius: 10px; background: var(--card); box-shadow: 0 1px 0 rgba(74,44,79,.12); color: var(--ink); text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal.wide .cal-day { min-height: 7.2rem; }
.cal-day .n { font-weight: 700; font-size: 1rem; }
.cal-day.out { background: transparent; box-shadow: none; color: var(--ink-2); }
.cal-day.today { box-shadow: inset 0 0 0 3px var(--accent); }
.cal-day.sel { background: #F3E6EE; box-shadow: inset 0 0 0 3px var(--plum); }
.cal-day.fast::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(45deg, #A9C4B2 0 6px, #CFE0D4 6px 12px); }
.cal-day .t { display: flex; gap: .25rem; align-items: center; font-size: .9rem; line-height: 1.2; white-space: nowrap; overflow: hidden; }
.cal-day .t span { overflow: hidden; text-overflow: ellipsis; }
.cal-day .t .mbi { width: 1em; height: 1em; }
.cal-day .more { font-size: .9rem; color: var(--ink-2); font-weight: 600; }
.cal-day .marks { display: flex; flex-wrap: wrap; gap: 1px; }
.cal-day .marks i { display: inline-flex; color: var(--plum); } .cal-day .marks .mbi { width: .95rem; height: .95rem; }
.cal-day .marks i.lay-church { color: var(--pine); } .cal-day .marks i.lay-holidays { color: var(--lav-ink); }
.cal-day .marks .plus { font-style: normal; font-weight: 700; font-size: .9rem; line-height: 1; }
.t.lay-church { color: var(--pine); } .t.lay-holidays { color: var(--lav-ink); } .t.lay-people { color: var(--plum); }
.fast-key { margin-top: .6rem; display: flex; flex-direction: column; gap: .2rem; color: var(--ink-2); }
.fast-key .band { display: inline-block; width: 2rem; height: 10px; margin-right: .5rem; border-radius: 3px; background: repeating-linear-gradient(45deg, #A9C4B2 0 6px, #CFE0D4 6px 12px); }
.day-panel { margin-top: 1rem; }
.cal.wide .day-panel { margin-top: 3.4rem; position: sticky; top: 84px; }
.row-btn { display: flex; gap: .6rem; align-items: flex-start; width: 100%; min-height: 48px; padding: .2rem 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.row-btn.plain { cursor: default; }
.row-btn .mbi { margin-top: .2rem; color: var(--plum); }
.row-btn .w { display: flex; flex-direction: column; }
.row-btn .tt { font-weight: 600; } .row-btn .lk, .row-btn .when { color: var(--ink-2); font-size: .9rem; }
.row-btn .when { font-weight: 700; color: var(--plum); }
.coming-list .wk h2 { font-size: 1.2rem; }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 8px; }
.mb-btn.kind { justify-content: flex-start; border-color: var(--line); color: var(--ink); font-weight: 600; }
.mb-btn.kind.on { background: var(--plum); border-color: var(--plum); color: #FFFDF8; }
.renewal-note { background: #F1F5F0; border-left: 4px solid var(--pine); padding: .5rem .8rem; border-radius: 8px; color: var(--pine); font-weight: 600; }
.understood { min-height: 1.5em; color: var(--pine); font-weight: 600; margin: -.4rem 0 0; }

/* ---------- Christmas Lists ---------- */
.quiet-line { font: 600 1.15rem var(--serif); color: var(--plum); margin-top: 2rem; }
.gift-people { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .gift-people { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gift-people { grid-template-columns: repeat(3, 1fr); } }
.g-row { display: flex; align-items: center; gap: .8rem; width: 100%; margin: 0; cursor: pointer; }
.g-words { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.g-words .nm { font: 600 1.15rem var(--serif); color: var(--plum); } .g-words .ct { color: var(--ink-2); font-size: .9rem; }
.steps-mini { display: flex; flex-wrap: wrap; gap: 2px; max-width: 7rem; justify-content: flex-end; }
.steps-mini i, .key i { font-style: normal; color: var(--plum); font-size: 1rem; }
.key { display: flex; flex-wrap: wrap; gap: 1rem; }
.mb-btn.peek { border-color: #A3202E; color: #8A1A26; }
.mb-btn.peek.on { background: #A3202E; color: #FFFFFF; }
.gl-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.gl-head h1 { flex: 1 1 12rem; margin: 0; font-size: 2rem; }
.gl-head .yr { color: var(--ink-2); font-size: 1.2rem; font-weight: 400; }
.ideas-year ul { list-style: none; padding: 0; margin: 0; }
.ideas-year li { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: .3rem 0; }
.ideas-year li span { font-family: var(--hand); font-size: 1.5rem; color: var(--plum); }
.gifts { list-style: none; padding: 0; margin: 0; }
.gift { display: flex; gap: .6rem; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: .7rem .8rem; margin-bottom: 10px; position: relative; }
.gift.dragging { z-index: 5; box-shadow: 0 14px 40px rgba(42,27,46,.3); opacity: .95; }
.gift .grip { display: flex; align-items: center; justify-content: center; width: 40px; min-height: 56px; color: var(--ink-2); cursor: grab; touch-action: none; flex: none; }
.g-main { flex: 1; min-width: 0; }
.g-meta { margin: .2rem 0 .4rem; }
.gift.s-given .g-idea { text-decoration: line-through; text-decoration-color: var(--rose); text-decoration-thickness: 2px; }
.ribbon-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: .3rem 0; }
.step { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .6rem; border-radius: 999px; background: #F2ECEF; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.step.done { background: #E9DCE6; color: var(--plum); }
.step.now { background: var(--plum); color: #FFFDF8; }
.step i { font-style: normal; }
.arr { color: var(--ink-2); font-size: .9rem; }
.g-acts { margin: .3rem 0 0; }
.gift.peeked { align-items: center; flex-wrap: wrap; }
.gift.peeked .present { color: #A3202E; } .gift.peeked .present .mbi { width: 2.2rem; height: 2.2rem; }
.gift.peeked .g-idea { font: italic 600 1.15rem var(--serif); color: var(--plum); flex: 1; }
.pick-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1rem; }
.mb-btn.pick { justify-content: flex-start; border-color: var(--line); color: var(--ink); }

/* ---------- Music Room ---------- */
.now-card .k { color: var(--ink-2); font-weight: 700; margin: 0; }
.now-card h2 { font-size: 1.8rem; border: 0; padding: 0; margin: .2rem 0; }
.now-card .by { font-weight: 600; color: var(--ink-2); }
.now-card .cr { color: var(--ink-2); font-size: .9rem; }
.set summary { display: flex; align-items: center; gap: .6rem; cursor: pointer; list-style: none; min-height: 56px; }
.set summary::-webkit-details-marker { display: none; }
.set summary h2 { margin: 0; border: 0; padding: 0; flex: 1; }
.set summary .ct { color: var(--ink-2); font-weight: 700; }
.songs { list-style: none; margin: .4rem 0 0; padding: 0; }
.songs li { display: flex; align-items: center; gap: .4rem; border-top: 1px solid var(--line); }
.songs .song { flex: 1; display: flex; align-items: center; gap: .5rem; min-height: 56px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font-weight: 600; padding: 0 .3rem; }
.songs .song.plain { cursor: default; font-weight: 400; }
.songs li.on .song { color: var(--plum); }
.heart { width: 56px; height: 56px; border: 0; background: none; cursor: pointer; color: var(--ink-2); }
.heart.is-fav { color: #A3202E; } .heart.is-fav .mbi { fill: #A3202E; }
.credits { list-style: none; padding: 0; margin: 0; }
.credits li { display: flex; flex-direction: column; padding: .6rem 0; border-top: 1px solid var(--line); }
.credits li span { color: var(--ink-2); }

/* ---------- Settings ---------- */
.set-group h3 { margin-top: 1rem; }
.set-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .lbl { font-weight: 700; min-width: 8rem; }
.set-row .val { flex: 1 1 12rem; color: var(--ink-2); }
.removed { list-style: none; padding: 0; margin: 0 0 .5rem; }
.removed li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.plain-list { padding-left: 1.2rem; }
.made { font-family: var(--script); font-size: 2rem; color: var(--plum); line-height: 1.2; }
.hood-say { font-weight: 600; color: var(--pine); }
.radio-songs .rs-card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 1rem; margin-bottom: 1rem; }
.radio-songs .rs-lab { display: block; font-weight: 600; color: var(--ink-2); margin-top: .5rem; font-size: .9rem; }
.radio-songs .rs-in { width: 100%; min-height: 56px; padding: .5rem .8rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card); }
.radio-songs .rs-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.radio-songs .rs-add { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .6rem; }
.radio-songs .rs-list { list-style: none; padding: 0; }
.radio-songs .rs-song { padding: .5rem 0; border-top: 1px solid var(--line); }
.radio-songs .row { display: flex; flex-wrap: wrap; gap: 8px; margin: .4rem 0; }
.radio-songs .problem { color: #8A1A26; font-weight: 600; } .radio-songs .good { color: var(--pine); font-weight: 600; }
.radio-songs .hint, .radio-songs .rs-meta, .radio-songs .rs-store { color: var(--ink-2); }
.radio-songs .rs-plain { font-weight: 600; color: var(--plum); }

/* ---------- the welcome (8.1) ---------- */
.mb-welcome { position: fixed; inset: 0; z-index: 990; background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); display: flex; align-items: center; justify-content: center; padding: var(--gutter); overflow: auto; }
.w-card { width: min(46rem, 100%); background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(42,27,46,.35); display: grid; grid-template-columns: 1fr; }
@media (min-width: 820px) { .w-card { grid-template-columns: 1fr 1.2fr; } }
.w-art { position: relative; min-height: 180px; background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); }
.w-art img, .w-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.w-sky { position: absolute; inset: 0; background: radial-gradient(circle at 70% 75%, #F7D3B0 0, transparent 40%), linear-gradient(transparent 60%, var(--pine) 60%); opacity: .9; }
.w-words { padding: 1.5rem; }
.w-words h1 { font-size: 2rem; }
.w-cats { display: flex; flex-wrap: wrap; gap: 10px; margin: .5rem 0 1rem; }

/* ---------- sign in ---------- */
.mb-signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--gutter); background: linear-gradient(180deg, #8E7CC3, #E8A0A8 75%, #F7D3B0); }
.si-card { width: min(30rem, 100%); background: var(--card); border-radius: 22px; padding: 1.5rem; box-shadow: 0 24px 60px rgba(42,27,46,.3); }
.si-logo { margin: 0 0 1rem; }
.si-logo .mary { font: 2.4rem/1 var(--script); color: var(--plum); }
.si-logo .book { font: 600 1.6rem/1 var(--serif); color: var(--plum); }
.si-card h1 { font-size: 1.9rem; }
.si-say { font-weight: 600; color: var(--plum); min-height: 1.5em; }
.si-key { width: 100%; text-decoration: none; margin-top: .5rem; }   /* SEA Key's one press (boot.js keyCard) */
.si-phone { background: #F6ECF2; border-radius: 10px; padding: .5rem .8rem; font-weight: 600; }

/* Someone's Peeking!: every gift name and price is gone from the page, not just hidden by style. */
html.peeking .g-price, html.peeking .g-where { display: none; }

/* The theme's 1.2 second fade (7.2). */
html.theme-fade .mb-main { transition: opacity .5s ease; opacity: .25; }

/* Reduce Motion, or Moving Pictures: Off: nothing moves. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .porch-drift { display: none; }
}

/* A desktop with a wide screen: a touch more room between cards. */
@media (min-width: 1024px) { .card { padding: 1.1rem 1.3rem; } }
/* In a column of fields, a field is as tall as it needs, no more. */
.mb-form > .mb-field, .mb-form > label.mb-field { flex: 0 0 auto; }
.mb-date .mb-field.xs { flex: 0 1 10rem; }
/* A day's titles start at its left edge and are cut at the right with "…", never in the middle. */
.cal-day { align-items: stretch; justify-content: flex-start; }
.cal-day .t { justify-content: flex-start; min-width: 0; }
.cal-day .t span { min-width: 0; flex: 1 1 auto; text-align: left; }

/* ---------- the theme picker (7.3): a row of little paintings with their names ---------- */
.th-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 12px; margin: .5rem 0 1rem; }
.th-card { display: flex; flex-direction: column; gap: .4rem; padding: .5rem; border: 3px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); cursor: pointer; text-align: left; min-height: 56px; }
.th-card.on { border-color: var(--plum); box-shadow: 0 0 0 2px var(--plum); }
.th-card .th-sky { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; }
.th-sky.seasons { background: linear-gradient(90deg, #8E7CC3, #E8A0A8 35%, #1F3B2D 65%, #BFD7EA); }
.th-card .nm { font: 600 1.05rem/1.25 var(--serif); color: var(--plum); }
.th-how h3 { margin-top: .5rem; }
@media (max-width: 699px) { .mb-sheet.contents-sheet { width: 100%; } }
.radio-songs select { min-height: 56px; padding: .4rem .8rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card); }
