@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
/* Illuminated Life · design system
   Layout: one narrow reading column on vellum, a sticky name bar above, a tab bar below.
   Gold is kept for what is lit, and for the centre. Soft blue is the unlit ground.
   Three glass colours mark the three rings: ruby for the Person, sapphire for the Household,
   emerald for the World. They are a memory aid, never the only signal, and not liturgical colours. */

:root {
  --paper: #FCFCFD;
  --card: #FFFFFF;
  --surface: #F3F7FB;
  --blue: #E6EFF8;
  --line: #ECE6D8;
  --line2: #E2E9F0;
  --gold: #BF9B4F;
  --gold-ink: #86661F;
  --gold-soft: #FBF5E6;
  --gold-pale: #E6D5A8;
  --ink: #1F2D3D;
  --ink2: #40536A;
  --dim: #5F7083;
  --rose: #9A4C5C;
  --on-gold: #1A1408;
  --edge: #7D8A99;
  --focus: #6B4F12;
  --bar: rgba(252, 252, 253, 0.93);
  --shadow: 0 1px 2px rgba(31, 45, 61, 0.04);
  --person: #B2546B; --person-soft: #FBE8ED; --person-line: #EEC3CE;
  --household: #3C78A8; --household-soft: #E1EEF9; --household-line: #B7D3EC;
  --world: #4E8A5C; --world-soft: #E4F2E7; --world-line: #BBDCC3;
  /* Eight fields, eight panes of glass: gold for the centre, then seven pastels. */
  --f0: var(--gold-ink); --f0-soft: var(--gold-soft); --f0-line: var(--gold-pale);
  --f1: #B2546B; --f1-soft: #FBE8ED; --f1-line: #EEC3CE;
  --f2: #C2643C; --f2-soft: #FDEAE0; --f2-line: #F1C7B4;
  --f3: #4E8A5C; --f3-soft: #E4F2E7; --f3-line: #BBDCC3;
  --f4: #3C78A8; --f4-soft: #E1EEF9; --f4-line: #B7D3EC;
  --f5: #2E8A86; --f5-soft: #DFF3F1; --f5-line: #AEDCD8;
  --f6: #6F5BA8; --f6-soft: #ECE7F9; --f6-line: #CBC1EA;
  --f7: #8A5A95; --f7-soft: #F3E7F6; --f7-line: #DBC3E1;
  /* Liturgical colours of the day. They are not the ring colours: brighter, and always drawn as a small bead. */
  --lit-white: #FFFFFF; --lit-red: #C9302C; --lit-green: #5E9C3A; --lit-violet: #6F4BA8; --lit-rose: #E78FB0; --lit-ring: #8A7A55;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101822; --card: #17212E; --surface: #1B2736; --blue: #223247; --line: #2E3A49; --line2: #2A3A4E;
    --gold: #D4B36A; --gold-ink: #E2C583; --gold-soft: #2A2618; --gold-pale: #6E5C30;
    --ink: #EDF1F5; --ink2: #C4CFDA; --dim: #9AA9B8; --rose: #E0A0AC; --on-gold: #1A1408; --edge: #7C8B9C; --focus: #F0D9A0;
    --bar: rgba(16, 24, 34, 0.93); --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --person: #F0A3B5; --person-soft: #33202A; --person-line: #6B3A47;
    --household: #8FC2EC; --household-soft: #1B2A3B; --household-line: #35557A;
    --world: #93D3A3; --world-soft: #182E26; --world-line: #34644F;
    --f1: #F0A3B5; --f1-soft: #33202A; --f1-line: #6B3A47;
    --f2: #F2B08E; --f2-soft: #35251C; --f2-line: #70462F;
    --f3: #93D3A3; --f3-soft: #182E26; --f3-line: #34644F;
    --f4: #8FC2EC; --f4-soft: #1B2A3B; --f4-line: #35557A;
    --f5: #7FD6D0; --f5-soft: #16302F; --f5-line: #2E6360;
    --f6: #BFB0F0; --f6-soft: #241F38; --f6-line: #4B4078;
    --f7: #D9A8E3; --f7-soft: #2F2133; --f7-line: #5F4268;
    --lit-white: #F6F1E4; --lit-red: #EF6A5E; --lit-green: #9CCB6B; --lit-violet: #A98BE0; --lit-rose: #F4B2CB; --lit-ring: #B9A777;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101822; --card: #17212E; --surface: #1B2736; --blue: #223247; --line: #2E3A49; --line2: #2A3A4E;
  --gold: #D4B36A; --gold-ink: #E2C583; --gold-soft: #2A2618; --gold-pale: #6E5C30;
  --ink: #EDF1F5; --ink2: #C4CFDA; --dim: #9AA9B8; --rose: #E0A0AC; --on-gold: #1A1408; --edge: #7C8B9C; --focus: #F0D9A0;
  --bar: rgba(16, 24, 34, 0.93); --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --person: #F0A3B5; --person-soft: #33202A; --person-line: #6B3A47;
  --household: #8FC2EC; --household-soft: #1B2A3B; --household-line: #35557A;
  --world: #93D3A3; --world-soft: #182E26; --world-line: #34644F;
  --f1: #F0A3B5; --f1-soft: #33202A; --f1-line: #6B3A47;
  --f2: #F2B08E; --f2-soft: #35251C; --f2-line: #70462F;
  --f3: #93D3A3; --f3-soft: #182E26; --f3-line: #34644F;
  --f4: #8FC2EC; --f4-soft: #1B2A3B; --f4-line: #35557A;
  --f5: #7FD6D0; --f5-soft: #16302F; --f5-line: #2E6360;
  --f6: #BFB0F0; --f6-soft: #241F38; --f6-line: #4B4078;
  --f7: #D9A8E3; --f7-soft: #2F2133; --f7-line: #5F4268;
  --lit-white: #F6F1E4; --lit-red: #EF6A5E; --lit-green: #9CCB6B; --lit-violet: #A98BE0; --lit-rose: #F4B2CB; --lit-ring: #B9A777;
  color-scheme: dark;
}

/* An element with one of these classes takes its field's colour as --rc. */
.rc-person { --rc: var(--person); --rc-soft: var(--person-soft); --rc-line: var(--person-line); }
.rc-household { --rc: var(--household); --rc-soft: var(--household-soft); --rc-line: var(--household-line); }
.rc-world { --rc: var(--world); --rc-soft: var(--world-soft); --rc-line: var(--world-line); }
.rc-f0 { --rc: var(--f0); --rc-soft: var(--f0-soft); --rc-line: var(--f0-line); }
.rc-f1 { --rc: var(--f1); --rc-soft: var(--f1-soft); --rc-line: var(--f1-line); }
.rc-f2 { --rc: var(--f2); --rc-soft: var(--f2-soft); --rc-line: var(--f2-line); }
.rc-f3 { --rc: var(--f3); --rc-soft: var(--f3-soft); --rc-line: var(--f3-line); }
.rc-f4 { --rc: var(--f4); --rc-soft: var(--f4-soft); --rc-line: var(--f4-line); }
.rc-f5 { --rc: var(--f5); --rc-soft: var(--f5-soft); --rc-line: var(--f5-line); }
.rc-f6 { --rc: var(--f6); --rc-soft: var(--f6-soft); --rc-line: var(--f6-line); }
.rc-f7 { --rc: var(--f7); --rc-soft: var(--f7-soft); --rc-line: var(--f7-line); }
.rose .p.rc-f0 .petal-fill { fill: var(--gold); }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea, select { font-size: max(16px, 1em); } /* below 16px, iOS zooms the page on focus */
button { cursor: pointer; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
main h1:focus { outline: none; }

/* ── frame ── */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 18px; background: var(--bar); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-family: var(--serif); font-style: italic; font-size: 25px; color: var(--gold-ink); letter-spacing: 0.01em; }
.season-chip { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 0; min-width: 0; min-height: 44px; background: none; border: none; padding: 0; text-align: right; color: var(--dim); }
.sc-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 10.5px; line-height: 1.3; }
.sc-text b { font-family: var(--serif); font-weight: 500; font-size: 15px; line-height: 1.12; color: var(--ink2); }
.season-chip .lc { margin-right: 6px; transform: translateY(-1px); }
.sc-text b, .sc-text span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.season-chip:hover .sc-text b { color: var(--gold-ink); }
.body { max-width: 680px; margin: 0 auto; padding-block: 20px 110px; padding-inline: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack > * { min-width: 0; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: var(--bar); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}
.tabbar button {
  flex: 1 1 0; min-width: 0; min-height: 48px; background: none; border: none; color: var(--dim);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px 0; font-size: 11px;
}
.tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar button[aria-current="page"] { color: var(--gold-ink); }

/* ── type ── */
.h1 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.1; margin: 2px 0; letter-spacing: -0.01em; text-wrap: balance; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; margin: 2px 0; text-wrap: balance; }
.h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.25; margin: 0 0 4px; }
.sub { color: var(--dim); font-size: 14.5px; margin: 0; }
.lede { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.4; color: var(--ink2); margin: 0; }
.rub { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; margin: 8px 0 6px; display: block; }
.rub.inl { display: inline; margin: 0 8px 0 0; }
h1.rub, h2.rub { line-height: 1.55; }
.center { text-align: center; }
.mt { margin-top: 14px; }
p { margin: 0 0 10px; }
.prose p { max-width: 62ch; }
.creed { font-family: var(--serif); font-size: 18px; color: var(--dim); text-align: center; margin: 14px 0 0; }
.note { font-size: 13.5px; color: var(--dim); margin: 0; }
.note.below { margin: -4px 0 12px; }
.note.hint { margin: 2px 2px 0; }
.note b { font-weight: 600; color: var(--ink2); }
.moved { color: var(--dim); font-size: 12.5px; }
/* words the user wrote may be long and unbroken */
.rowtext, details.entry, .book, .toast, .dayname, .confirm, .keeplink { overflow-wrap: anywhere; }
.care { font-size: 14px; color: var(--rose); margin: 0 0 12px; }

/* ── surfaces ── */
.pane { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.pad { padding: 16px; }
.pane.quiet { background: var(--surface); border-color: var(--line2); }
.pane.lit { background: var(--gold-soft); border-color: var(--gold-pale); }
.verse { padding: 22px 20px; text-align: center; }
.vtext { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.35; margin: 6px 0 8px; text-wrap: balance; }
.vtext.sm { font-size: 19px; text-align: left; margin: 10px 0 2px; }
.vref { font-size: 13px; color: var(--dim); margin: 0; }

.rosepane { display: flex; gap: 18px; align-items: center; padding: 16px; flex-wrap: wrap; }
.rosepane > div { flex: 1 1 220px; min-width: 0; }
.rosewrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* the legend: three glass colours and the gold centre */
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px 22px; justify-content: center; font-size: 12.5px; line-height: 1.4; color: var(--dim); }
.stack > .legend, .prose > .legend { justify-content: start; }
@media (min-width: 560px) { .stack > .legend, .prose > .legend { grid-template-columns: repeat(2, auto); } }
.legend li { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.legend b { font-weight: 500; color: var(--ink2); }
.sw { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 2px; background: var(--rc); transform: rotate(45deg); }
.sw.centre { background: var(--gold); border-radius: 50%; transform: none; }
.h2 .sw, .h3 .sw { margin: 0 11px 0 2px; vertical-align: 0.12em; }
.rose { flex: 0 0 auto; width: 190px; height: 190px; margin: 0 auto; display: block; }
.rose .ring { fill: none; stroke: var(--line2); stroke-width: 1; }
.rose .arc { fill: none; stroke: var(--rc, var(--gold-pale)); stroke-width: 1.4; stroke-linecap: round; opacity: 0.75; }
.rose .petal-line { fill: var(--rc-soft, var(--blue)); stroke: var(--rc, var(--gold-pale)); stroke-width: 0.8; }
.rose .petal-fill { fill: var(--rc, var(--gold)); transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.rose .num { font-family: var(--serif); font-size: 9.5px; fill: var(--rc, var(--dim)); }
.rose .p[data-focus="1"] .num { fill: var(--gold-ink); font-weight: 600; font-size: 11px; }
.rose .p[data-focus="1"] .petal-line { stroke: var(--gold-ink); stroke-width: 1.6; }
.rose .p { cursor: pointer; }
.rose .p:hover .petal-line { stroke: var(--gold-ink); }
.rose .core { fill: var(--gold); }
.rose .halo { fill: var(--gold); opacity: 0.18; }
.rose .ringname { font-family: var(--sans); font-size: 5.6px; letter-spacing: 0.18em; fill: var(--dim); text-transform: uppercase; }

/* ── rows ── */
.secrow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; }
.row { display: flex; align-items: center; gap: 13px; width: 100%; background: none; border: none; padding: 14px 15px; text-align: left; color: var(--ink); }
.rowtext { flex: 1; min-width: 0; }
.rowtext b { display: block; font-weight: 500; font-size: 15.5px; line-height: 1.3; }
.rowtext span { display: block; color: var(--dim); font-size: 13.5px; line-height: 1.35; }
.link-row:hover { background: var(--surface); }
.badge { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: var(--blue); color: var(--gold-ink); display: grid; place-items: center; transition: background 0.3s; }
.badge.gold { background: var(--gold-soft); }
.badge[class*="rc-"] { background: var(--rc-soft); color: var(--rc); }
.rowtext .fname { display: inline; color: var(--rc); font-weight: 500; }
.fnum, .rowtext .fnum { display: inline; color: var(--rc); font-family: var(--serif); font-weight: 600; font-size: 1.12em; letter-spacing: 0.02em; }
.days { font-family: var(--serif); font-size: 17px; color: var(--gold-ink); white-space: nowrap; }
.tag { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--blue); color: var(--ink2); font-weight: 500; white-space: nowrap; }

.keepwrap .keep { padding-bottom: 6px; }
.keeplink { margin: 0; padding: 0 15px 6px 70px; }
.out { color: var(--gold-ink); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.out::after { content: "↗"; margin-left: 4px; font-size: 0.85em; text-decoration: none; display: inline-block; }
.out.inl { display: inline; min-height: 0; font-size: inherit; }
.rulerow { border-top: 1px solid var(--line); }
.rulerow:first-child { border-top: none; }
.rulerow .row { gap: 10px; padding-right: 6px; }
.rulerow .icobtn + .icobtn { margin-left: -8px; }
.rowtext .withc { color: var(--gold-ink); }
.ruleedit { padding: 2px 15px 14px 70px; }
.confirm { flex: 1 1 100%; background: var(--gold-soft); border: 1px solid var(--gold-pale); border-radius: 12px; padding: 12px 13px; }
.confirm p { margin: 0 0 10px; font-size: 14.5px; }
.comp p { margin: 0 0 8px; }
.complink { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 !important; }
.handoff { font-size: 14.5px; color: var(--ink2); text-align: center; margin: 2px 0; }
.keep .ringc { position: relative; width: 30px; height: 30px; flex: 0 0 30px; }
.ringc svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rt { fill: none; stroke: var(--gold-pale); stroke-width: 1.6; }
.rp { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 94.2; stroke-dashoffset: 94.2; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.tick { stroke: var(--gold-ink); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 0.3s; }
.keep[aria-pressed="true"] .rp { stroke-dashoffset: 0; }
.keep[aria-pressed="true"] .tick { opacity: 1; }
.keep[aria-pressed="true"] .badge:not([class*="rc-"]) { background: var(--gold-soft); }
.keep[aria-pressed="true"] .rowtext b { color: var(--dim); }

/* ── buttons ── */
.pill { position: relative; min-height: 34px; background: none; border: 1px solid var(--edge); border-radius: 999px; padding: 6px 14px; color: var(--ink2); font-size: 12.5px; letter-spacing: 0.04em; white-space: nowrap; }
.pill.gold { border-color: var(--gold); color: var(--gold-ink); background: var(--gold-soft); }
.pill:hover { color: var(--ink); border-color: var(--gold-ink); }
.pill::after { content: ""; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; } /* a 44px tap area around a small pill */
.gold-btn { min-height: 44px; background: var(--gold); color: var(--on-gold); border: none; border-radius: 12px; padding: 10px 18px; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.gold-btn:hover { filter: brightness(1.05); }
.link { background: none; border: none; color: var(--gold-ink); font-size: 14px; padding: 0; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.link.sm, .handoff .link, .note .link { display: inline; min-height: 0; font-size: inherit; }
.link.dim { color: inherit; opacity: 0.85; }
.back { background: none; border: none; color: var(--dim); font-size: 13px; padding: 0; min-height: 44px; margin: -8px 0 -4px; align-self: flex-start; display: flex; align-items: center; gap: 4px; }
.back svg { transform: rotate(180deg); }
.icobtn { background: none; border: none; color: var(--dim); padding: 0; width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; }
.icobtn:hover { color: var(--rose); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.switchrow { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.switch { position: relative; width: 46px; height: 27px; flex: 0 0 46px; }
.switch input { position: absolute; opacity: 0; top: -9px; left: 0; width: 100%; height: 45px; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--blue); border: 1px solid var(--edge); border-radius: 99px; transition: 0.25s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: 0.25s; }
.switch input:checked + span { background: var(--gold); border-color: var(--gold); }
.switch input:checked + span::after { transform: translateX(19px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── diary ── */
.seg { display: flex; gap: 8px; }
.seg button { flex: 1 1 0; min-width: 0; min-height: 44px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-family: var(--serif); font-size: 19px; color: var(--dim); text-align: left; }
.seg button em { display: block; font-family: var(--sans); font-style: normal; font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; margin-top: 1px; }
.seg button[aria-pressed="true"] { color: var(--ink); border-color: var(--gold-pale); background: var(--gold-soft); }
.datebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dayname { font-family: var(--serif); font-size: 20px; font-weight: 500; flex: 1 1 160px; text-align: center; min-width: 0; }
.gline { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gline .in { flex: 1; min-width: 0; }
.gnum { flex: 0 0 26px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--gold-ink); text-align: right; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; min-height: 44px; }
.check input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--gold-ink); }

/* ── fields ── */
.ringhead { margin-top: 14px; }
.field .field-head { padding: 13px 15px; }
.lampwrap { position: relative; width: 42px; height: 42px; flex: 0 0 42px; }
.lamp { position: absolute; inset: -1px; width: 44px; height: 44px; pointer-events: none; }
.lt { fill: none; stroke: var(--line); stroke-width: 2; }
.lp { fill: none; stroke: var(--rc, var(--gold)); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 125.6; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1); }
.field { box-shadow: inset 3px 0 0 var(--rc, transparent), var(--shadow); }
.field.open { border-color: var(--rc-line, var(--gold-pale)); }
.field.open .field-head { box-shadow: inset 3px 0 0 var(--rc, transparent); background: var(--rc-soft, transparent); border-bottom: 1px solid var(--rc-line, var(--line)); margin-bottom: 12px; }
.field.open .field-head .badge { background: var(--card); }
.field.open .field-head .rowtext span:not(.fnum) { color: var(--ink2); } /* --dim is too faint on a tint */
.ringcard { box-shadow: inset 3px 0 0 var(--rc), var(--shadow); }
.field.focus { border-color: var(--gold); }
.field-body { padding: 2px 16px 18px; }
.chev { color: var(--dim); transition: transform 0.25s; flex: 0 0 auto; }
.field.open .chev { transform: rotate(90deg); }
.telos { font-family: var(--serif); font-size: 20px; line-height: 1.4; margin: 0 0 12px; }
.disorder { color: var(--rose); font-size: 14.5px; margin: 0 0 12px; }
.quest { margin: 0 0 14px; padding-left: 18px; font-size: 14.5px; color: var(--ink2); }
.quest li { margin-bottom: 5px; }
.mastery { font-size: 14px; color: var(--ink2); margin: 10px 0 14px; padding: 11px 13px; background: var(--surface); border-radius: 10px; }
.ladder { list-style: none; margin: 0 0 4px; padding: 0; }
.ladder li { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.ladder li:first-child { border-top: none; }
.rn { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; color: var(--dim); font-family: var(--serif); }
.rt2 { flex: 1; min-width: 0; font-size: 14.5px; color: var(--ink2); }
.ladder li.done .rn { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.ladder li.done .rt2 { color: var(--dim); }
.ladder li.now .rn { border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 3px var(--gold-soft); }
.ladder li.now .rt2 { color: var(--ink); font-weight: 500; }
.moves { display: grid; gap: 10px; margin: 6px 0 14px; }
.move { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: var(--card); }
.move .mh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.move .mh b { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.move .mh em { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); font-style: normal; }
.move p { font-size: 14px; color: var(--ink2); margin: 2px 0 8px; }
.quote { font-family: var(--serif); font-style: italic; font-size: 19px; margin: 14px 0 4px; padding-left: 14px; border-left: 2px solid var(--gold-pale); color: var(--ink2); }
.quote cite { display: block; font-style: normal; font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-ink); margin-top: 6px; }

.gilding { position: relative; }
.gilding::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 16px; background: linear-gradient(100deg, transparent 30%, rgba(230, 213, 168, 0.6) 48%, rgba(255, 255, 255, 0.7) 52%, transparent 70%); background-size: 250% 100%; animation: sweep 1.4s cubic-bezier(0.3, 0.7, 0.4, 1) 1; }
@keyframes sweep { from { background-position: 180% 0; } to { background-position: -80% 0; } }

/* ── forms ── */
.fieldset { display: block; margin-bottom: 12px; }
.lab { display: block; font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; font-weight: 500; }
.in { width: 100%; min-height: 46px; background: var(--card); border: 1px solid var(--edge); border-radius: 10px; padding: 10px 13px; font-size: 16px; color: var(--ink); resize: vertical; }
.in::placeholder { color: var(--dim); opacity: 1; font-family: var(--serif); font-style: italic; font-size: 16.5px; }
.in:focus { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }
input[type="file"] { max-width: 100%; min-height: 44px; font-size: 16px; }
textarea.in { min-height: 46px; }
.frow { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 8px; }
.frow > * { flex: 1 1 140px; min-width: 0; }
.frow > .fix { flex: 0 0 auto; }
.tm { max-width: 130px; }
.num { max-width: 110px; }
.dots5 { display: inline-flex; }
.dots5 button { position: relative; width: 36px; height: 44px; border: none; background: none; padding: 0; }
.dots5 button::before { content: ""; position: absolute; left: 5px; top: 9px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold-ink); background: var(--card); }
.dots5 button[aria-pressed="true"]::before { background: var(--gold); }
.reviewrow { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.reviewrow:first-child { border-top: none; }
.reviewrow .nm { flex: 1 1 150px; min-width: 0; }
.reviewrow .nm b { font-weight: 500; }
.reviewrow .nm span { display: block; font-size: 12.5px; color: var(--dim); }

.fline { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.fline:first-child { border-top: none; }
.fline.today { background: var(--gold-soft); border-radius: 8px; padding-inline: 8px; }
.fd { font-family: var(--serif); color: var(--dim); font-size: 16px; white-space: nowrap; }
.laws { margin: 0; padding: 0; list-style: none; counter-reset: law; }
.laws li { padding: 12px 0; border-top: 1px solid var(--line); }
.laws li:first-child { border-top: none; }
.laws b { font-family: var(--serif); font-size: 20px; font-weight: 500; display: block; }
.plain { margin: 0; padding-left: 20px; }
.plain li { margin-bottom: 6px; }
.step { border-top: 1px solid var(--line); padding: 14px 0; }
.step:first-of-type { border-top: none; }
.step .h3 { margin-bottom: 2px; }
.step .n { font-family: var(--serif); color: var(--gold-ink); margin-right: 8px; }
details.entry { border-top: 1px solid var(--line); padding: 0 0 4px; }
details.entry:first-child { border-top: none; }
details.entry summary { cursor: pointer; font-family: var(--serif); font-size: 19px; padding: 8px 0; min-height: 44px; }
details.entry p { font-size: 14.5px; margin: 0 0 6px; color: var(--ink2); }
.bucket { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.bucket:first-child { border-top: none; }
.bucket .amt { font-family: var(--serif); font-size: 19px; color: var(--gold-ink); min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.bucket .pc { width: 72px; padding-inline: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; background: var(--ink); color: var(--paper); padding: 11px 20px; border-radius: 999px; font-size: 14px; max-width: 88vw; text-align: center; box-shadow: 0 8px 26px -10px rgba(0, 0, 0, 0.5); }

.update { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--paper); padding: 0 18px; border-radius: 999px; font-size: 14px; max-width: 92vw; box-shadow: 0 8px 26px -10px rgba(0, 0, 0, 0.5); }
.update .link { color: inherit; }

/* The entry animation plays only when go() moves to another screen. */
.rise > .stack > * { animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes rise { from { opacity: 0.4; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.book { display: none; }
/* ── the Church's year: the calendar ── */
.lc { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--lit-green); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.lc-white { background: var(--lit-white); box-shadow: inset 0 0 0 1.5px var(--lit-ring); }
.lc-red { background: var(--lit-red); }
.lc-green { background: var(--lit-green); }
.lc-violet { background: var(--lit-violet); }
.lc-rose { background: var(--lit-rose); }
/* rank by weight */
.rk-s { font-weight: 700; font-variant-caps: small-caps; letter-spacing: 0.03em; }
.rk-f { font-weight: 700; }
.rk-m, .rk-sun { font-weight: 400; }
.rk-o { font-style: italic; }
.litname { display: flex; align-items: baseline; gap: 10px; }
.litname .lc { width: 11px; height: 11px; transform: translateY(-2px); }
.litname .rk-s { font-weight: 600; }
.dayfeast { flex: 1 1 100%; text-align: center; display: flex; align-items: baseline; justify-content: center; gap: 7px; font-family: var(--sans); font-size: 12.5px; font-weight: 400; color: var(--dim); margin-top: 2px; }
.dayfeast .lc { width: 8px; height: 8px; }
.seg.three button { padding-inline: 10px; font-size: 18px; }
.calpane { padding: 12px 6px 10px; overflow: visible; }
.calnav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 8px 10px; }
.calmonth { font-family: var(--serif); font-weight: 500; font-size: 23px; line-height: 1.2; margin: 0; text-align: center; flex: 1 1 auto; min-width: 0; }
.cal { display: block; }
.calrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calrow > span { display: block; min-width: 0; }
.calhead span { text-align: center; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); padding: 2px 0 6px; }
.calhead span:last-child { color: var(--gold-ink); }
.calday { width: 100%; min-height: 50px; background: none; border: 1px solid transparent; border-radius: 12px; padding: 5px 0 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--ink2); }
.calday b { font-family: var(--serif); font-size: 19px; line-height: 1; font-weight: inherit; min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-variant-numeric: lining-nums; }
.calday.rk-s, .calday.rk-f { color: var(--ink); }
.calday.rk-s { letter-spacing: 0; }
.calday.rk-w { color: var(--dim); }
.calrow > span:last-child .calday { color: var(--ink); }
.calday:hover { background: var(--surface); }
.calday.sel { background: var(--gold-soft); border-color: var(--gold-pale); }
.calday.today b { box-shadow: 0 0 0 1.5px var(--gold); background: var(--gold-soft); color: var(--ink); }
.calfoot { display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; }
.calfoot .in { flex: 1 1 0; min-width: 0; }
.legend-lit { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--dim); padding: 0 4px; }
.legend-lit .lk { display: inline-flex; align-items: center; gap: 6px; }
.legend-lit .lk b { font-weight: 500; color: var(--ink2); }
.legend-lit .wide { flex: 1 1 100%; display: block; color: var(--ink2); }
.dlist { padding: 4px 0; }
.calpane .dlist { padding: 0; }
.drow { width: 100%; min-height: 52px; display: grid; grid-template-columns: 44px 9px minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; background: none; border: none; border-top: 1px solid var(--line); padding: 9px 14px; color: var(--ink); font-size: 15px; line-height: 1.3; }
.drow:first-child { border-top: none; }
.drow:hover { background: var(--surface); }
.drow.today { background: var(--gold-soft); }
.drow .dd { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); line-height: 1.2; }
.drow .dd b { font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--ink); letter-spacing: 0; line-height: 1; font-variant-numeric: lining-nums; }
.drow .dn { min-width: 0; overflow-wrap: anywhere; }
.drow .dopt { display: block; font-size: 13.5px; color: var(--dim); margin-top: 1px; }
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(16, 24, 34, 0.42); animation: fade 0.2s ease both; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-width: 680px; margin: 0 auto; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border: 1px solid var(--gold-pale); border-bottom: none; border-radius: 20px 20px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(16, 24, 34, 0.18); animation: sheetup 0.28s cubic-bezier(0.22, 1, 0.36, 1) both; }
.sheet:focus { outline: none; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; }
.sheet-top .rub { margin: 0; }
.sheet .h2 { margin-top: 4px; }
.calnote { margin-top: 12px; }
.sheet .btnrow { margin: 16px 0 14px; }
.sheet-note { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.35; color: var(--ink2); margin: 8px 0 0; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 14px 0 4px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--dim); }
.facts dd { margin: 1px 0 0; font-family: var(--serif); font-size: 18px; line-height: 1.25; }
.optlist { list-style: none; margin: 0 0 10px; padding: 0; }
.optlist li { display: grid; grid-template-columns: 9px minmax(0, 1fr); column-gap: 10px; align-items: baseline; padding: 5px 0; font-size: 15.5px; }
.optlist .note { grid-column: 2; }
@keyframes fade { from { opacity: 0; } }
@keyframes sheetup { from { transform: translateY(24px); opacity: 0; } }

/* ── the picture of the model: lamp, temple, house, field ── */
.ringsub { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 0.82em; color: var(--dim); }
.picture .church { display: block; width: 100%; max-width: 440px; height: auto; margin: 8px auto 12px; }
.church path, .church circle { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.church .w { stroke: var(--world); }
.church .h { stroke: var(--household); }
.church .p { stroke: var(--person); }
.church .g { stroke: var(--gold-ink); }
.church .thin { stroke-width: 0.9; }
.church .hf { fill: var(--household-soft); stroke: none; }
.church .pf { fill: var(--person-soft); stroke: none; }
.church .halo { fill: var(--gold); stroke: none; opacity: 0.22; }
.church .flame { fill: var(--gold); stroke: var(--gold-ink); stroke-width: 1; }
.church text { font-family: var(--serif); font-style: italic; font-size: 14px; }
.church .tl-g { fill: var(--gold-ink); }
.church .tl-p { fill: var(--person); }
.church .tl-h { fill: var(--household); }
.church .tl-w { fill: var(--world); }
.pictext { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: var(--ink2); max-width: 44ch; margin: 0 auto 14px; }
.picture .legend { margin-bottom: 10px; }
.lede.sm { font-size: 18.5px; }
.ccards { display: grid; gap: 12px; }
@media (min-width: 600px) { .ccards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ccard p { font-size: 15px; margin: 0 0 8px; }
.ccard .vref { margin: 0; }
.caution { font-size: 10.5px !important; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--rose); }
.steward-line { font-family: var(--serif); font-style: italic; font-size: 18.5px; line-height: 1.4; color: var(--ink2); margin: 6px 0; padding-left: 14px; border-left: 2px solid var(--gold-pale); }
.steward .thread { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.steward .steward-line { margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.vtext.center { text-align: center; }

/* ── the Icon Screen ── */
.icoprog { margin: 0; }
.icobar { display: flex; gap: 6px; margin: -6px 0 2px; }
.icobar i { flex: 1 1 0; height: 3px; border-radius: 2px; background: var(--line2); }
.icobar i.now { background: var(--gold-pale); }
.icobar i.done { background: var(--gold); }
.panels { list-style: none; margin: 2px 0 10px; padding: 0; }
.panels li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.panels li:first-child { border-top: none; }
.panels .pn { flex: 0 0 26px; font-family: var(--serif); font-size: 18px; color: var(--gold-ink); text-align: center; }
.panels b { display: block; font-family: var(--serif); font-size: 19.5px; font-weight: 500; line-height: 1.2; }
.panels li > span:last-child > span { font-size: 13.5px; color: var(--dim); }
fieldset.q { margin: 0; min-width: 0; padding: 14px 14px 12px; }
.q legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; display: flex; gap: 10px; align-items: baseline; font-family: var(--serif); font-size: 20px; line-height: 1.3; }
.q .qn { flex: 0 0 auto; min-width: 16px; font-style: italic; font-size: 17px; color: var(--gold-ink); }
.opts { clear: both; display: grid; gap: 6px; }
.opt { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 8px 11px; border: 1px solid var(--line2); border-radius: 10px; background: var(--card); font-size: 15px; line-height: 1.35; color: var(--ink2); cursor: pointer; }
.opt input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--gold-ink); }
.opt:hover { border-color: var(--gold-pale); }
.opt:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); }
.opt:has(input:focus-visible), .scene:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.opt input:focus-visible, .scene input:focus-visible { outline: none; }
.opts.scale { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opts.scale .opt { flex-direction: column; justify-content: center; gap: 5px; padding: 9px 3px 8px; text-align: center; font-size: 12.5px; line-height: 1.2; }
.scenes { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scene { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 12px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); cursor: pointer; }
.scene input { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; margin: 0; accent-color: var(--gold-ink); }
.glyph { display: block; flex: 0 0 auto; color: var(--gold-ink); line-height: 0; }
.scene b { display: block; font-family: var(--serif); font-size: 19.5px; font-weight: 500; line-height: 1.2; }
.scene em { display: block; font-style: normal; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin: 3px 0 5px; }
.scene .sct > span { display: block; font-size: 13.5px; line-height: 1.4; color: var(--ink2); }
.scene:hover { border-color: var(--gold-pale); }
.scene:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.chosen { display: flex; justify-content: center; gap: 16px; }
.lamps7 { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 6px; }
.lamps7 li { flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.lamps7 b { margin-top: 7px; font-weight: 500; font-size: 12px; line-height: 1.2; color: var(--ink); }
.lamps7 li > span:last-child { font-size: 11px; color: var(--dim); }
.lamps7 .badge { background: var(--card); color: var(--gold-ink); }
.lamps7 .l-awake .badge { background: var(--gold-soft); }
.lamps7 .l-dormant .badge { color: var(--edge); }
.lamps7 .lp { stroke: var(--gold); }
.pane-in { margin: 6px 0 14px; padding: 14px 6px; background: var(--surface); border-radius: 12px; }
.petitions { list-style: none; margin: 8px 0 0; padding: 0; }
.petitions li { padding: 10px 0 8px; border-top: 1px solid var(--gold-pale); }
.petitions b { display: block; font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; font-weight: 600; color: var(--gold-ink); }
.pray { display: block; font-family: var(--serif); font-style: italic; font-size: 19.5px; line-height: 1.35; }
.oblige { margin: 0; padding: 11px 13px; background: var(--surface); border-radius: 10px; font-size: 14.5px; color: var(--ink2); }
.oblige b { font-weight: 600; color: var(--ink); }
.gently { font-family: var(--serif); font-style: italic; font-size: 19.5px; line-height: 1.4; color: var(--ink2); text-align: center; margin: 4px 6px; text-wrap: balance; }
.synth .from { color: var(--dim); font-weight: 500; }
.synth .facts { margin-top: 10px; }
.lastwords { text-align: center; font-family: var(--serif); font-style: italic; font-size: 19.5px; line-height: 1.4; color: var(--ink2); padding: 8px 8px 0; text-wrap: balance; }
.lastwords p { margin: 0 0 8px; }
.thennow { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13.5px; line-height: 1.35; }
.thennow th, .thennow td { text-align: left; vertical-align: top; padding: 8px 8px 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.thennow thead th, .thennow thead td { border-top: none; font-family: var(--serif); font-size: 16px; font-weight: 500; }
.thennow tbody th { width: 27%; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; color: var(--dim); }
.thennow .chg { color: var(--gold-ink); font-weight: 500; }
.pill[disabled] { opacity: 0.6; cursor: default; }
.icofoot .gold-btn { margin-left: auto; }
.link.quiet { color: var(--dim); font-size: 13.5px; align-self: flex-start; margin-top: -10px; }
.confirm.mt { margin-top: 12px; }

/* ── the Guide: one question at a time, in a bubble ── */
.gbar { margin: -6px 0 4px; }
main .h1, .gq, .tl-c, .glinks { overflow-wrap: anywhere; }
.gsay, .msg { display: flex; gap: 10px; align-items: flex-start; }
.gface { flex: 0 0 34px; width: 34px; height: 34px; margin-top: 2px; border-radius: 50%; background: var(--gold-soft); border: 1px solid var(--gold-pale); color: var(--gold-ink); display: grid; place-items: center; }
.bubble { flex: 1 1 auto; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; padding: 14px 16px 12px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.bubble p { margin: 0 0 10px; }
.bubble p:last-child { margin-bottom: 2px; }
.gq { font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.18; margin: 0 0 4px; letter-spacing: -0.005em; text-wrap: balance; }
.glead { font-family: var(--serif); font-style: italic; font-size: 18.5px; line-height: 1.35; color: var(--ink2); }
.gq + .glead { margin-top: 6px; }
.link.sm.gwhy { display: inline-flex; min-height: 44px; margin: -6px 0 -12px; color: var(--dim); font-size: 13.5px; }
.gwhytext { margin: 8px 0 2px !important; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink2); }
.ganswer { display: flex; flex-direction: column; gap: 10px; padding-left: 44px; }
.ganswer .fieldset { margin-bottom: 2px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.chiprow.col { flex-direction: column; }
.chip { position: relative; min-height: 46px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--card); border: 1px solid var(--edge); border-radius: 14px; color: var(--ink2); font-size: 15.5px; line-height: 1.3; text-align: left; }
.chip:hover { border-color: var(--gold-ink); }
.chip[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold); }
.chip[aria-pressed="true"]::before { content: ""; flex: 0 0 auto; width: 11px; height: 6px; margin: -3px 2px 0 0; border-left: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: rotate(-45deg); }
.chipgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .chipgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fchip { border-color: var(--rc-line); box-shadow: inset 3px 0 0 var(--rc); padding-inline: 14px 10px; overflow-wrap: anywhere; }
.fchip .fnum { min-width: 1.5em; }
.fchip[aria-pressed="true"] { border-color: var(--rc); background: var(--rc-soft); box-shadow: inset 3px 0 0 var(--rc), inset 0 0 0 1px var(--rc); }
.fchip[aria-pressed="true"]::before { order: 3; margin: -3px 0 0 auto; border-color: var(--rc); }
.chips7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.chips7 .chip { justify-content: center; padding: 10px 0; font-size: 13.5px; border-radius: 12px; }
.chips7 .chip[aria-pressed="true"]::before { display: none; }
.chips7 .chip[aria-pressed="true"] { font-weight: 600; }
.gnote { font-family: var(--serif); font-size: 18.5px; line-height: 1.4; color: var(--ink2); margin: 2px 0; padding-left: 14px; border-left: 2px solid var(--gold-pale); }
.gfoot { margin-top: 4px; }
.gfoot .gold-btn { margin-left: auto; }
.gtimes > * { flex: 1 1 120px; }
.gtimes .tm { max-width: none; }
.gspend { margin: -4px 0 12px; }
.gspend .frow { margin-bottom: 0; }
p.lab { margin-bottom: 8px; }
.gold-btn[disabled] { opacity: 0.5; cursor: default; filter: none; }

/* ── the review: accept, edit or leave out ── */
.rvpane { padding: 0; }
.rvrow { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 6px 10px; align-items: start; padding: 13px 14px; border-top: 1px solid var(--line); }
.rvrow:first-child { border-top: none; }
.pane.lit .rvrow { border-top-color: var(--gold-pale); }
.rvtick { width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--gold-soft); border: 1px solid var(--gold); display: grid; place-items: center; }
.rvtick svg { width: 15px; height: 15px; fill: none; stroke: var(--gold-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rvrow .rowtext .rub.inl { display: inline; }
.rvrow .rowtext .fname, .rvrow .rowtext .fnum { display: inline; }
.rvrow.off .rvtick { background: none; border-color: var(--edge); }
.rvrow.off .rvtick svg { opacity: 0; }
.rvrow.off .rowtext { opacity: 0.6; }
.rvrow.off .rowtext b { text-decoration: line-through; }
.rvbtns { display: flex; gap: 6px; padding-top: 1px; }
.rvedit { grid-column: 1 / -1; padding-top: 6px; }
.rvedit .frow { margin-bottom: 0; }
.rvask { margin: 0 14px 14px; }
.rvnote { padding: 0 14px 12px 48px; }
@media (max-width: 520px) { .rvbtns { grid-column: 2 / -1; padding: 2px 0 4px; } }

/* ── My day: from waking to bedtime ── */
.daylit { display: flex; align-items: baseline; gap: 7px; font-size: 13.5px; color: var(--dim); margin: 2px 0 0; }
.daylit .lc { width: 8px; height: 8px; }
.tlpane { padding: 8px 0; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl-row { display: grid; grid-template-columns: 50px minmax(0, 1fr); column-gap: 14px; padding: 0 12px 0 8px; }
.tl-t { padding-top: 13px; text-align: right; font-family: var(--serif); font-size: 17.5px; line-height: 1.15; font-variant-numeric: lining-nums tabular-nums; color: var(--ink2); }
.tl-c { position: relative; min-width: 0; padding: 5px 0 5px 14px; border-left: 1px solid var(--gold-pale); }
.tl-c::before { content: ""; position: absolute; left: -4px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.tl-mark .tl-t { color: var(--dim); }
.tl-mark .tl-c { padding: 14px 0 12px 14px; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; color: var(--dim); }
.tl-mark .tl-c::before { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--gold-ink); }
.tl-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; background: none; border: none; padding: 5px 0; text-align: left; color: var(--ink); }
.tl-block .tl-c { display: flex; align-items: center; gap: 4px; }
.tl-block .rowtext { background: var(--surface); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 13px; }
.tl-block .tl-c::before { border-radius: 2px; background: var(--edge); }
.tl-work .rowtext { background: var(--household-soft); border-color: var(--household-line); }
.tl-work .rowtext span { color: var(--ink2); }
.tl-work .tl-c::before { background: var(--household); }
.tl-within .tl-c { padding-left: 30px; }
.tl-within .tl-c::after { content: ""; position: absolute; left: 0; top: 21px; width: 22px; border-top: 1px solid var(--gold-pale); }
.tl-within .tl-c::before { left: 20px; }
.tl-gap .tl-c { padding: 15px 0 15px 14px; border-left-style: dashed; font-family: var(--serif); font-style: italic; font-size: 16.5px; color: var(--dim); }
.tl-gap .tl-c b { font-weight: 500; color: var(--ink2); }
.tl-gap .tl-c::before { display: none; }
.tl-first .tl-c { padding-bottom: 10px; }
.tl-first .rub { margin: 8px 0 0; }
.tl-first p { font-family: var(--serif); font-size: 20px; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.tl-link { margin: -6px 0 0; }
.tl-any { padding: 3px 14px; border-top: 1px solid var(--line); }
.tl-any:first-child { border-top: none; }
.dayacts { margin-top: 4px; }

/* ── into my calendar ── */
.callist { margin: 8px 0 6px; font-size: 14.5px; color: var(--ink2); }
details.help { padding: 0 16px; }
details.help summary { cursor: pointer; min-height: 52px; padding: 13px 0; font-family: var(--serif); font-size: 20.5px; line-height: 1.25; }
details.help ol { margin-bottom: 12px; font-size: 14.5px; color: var(--ink2); }
details.help .note { margin: 0 0 14px; }
.glinks { list-style: none; margin: 10px 0 0; padding: 0; }
.glinks li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; padding: 9px 0 1px; border-top: 1px solid var(--line); }
.glinks .rowtext { flex: 1 1 150px; }

/* ── the conversation with Claude (only inside Claude) ── */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg.me { justify-content: flex-end; }
.msg.me .bubble { flex: 0 1 auto; max-width: 86%; background: var(--surface); border-color: var(--line2); border-radius: 18px 4px 18px 18px; }
.msg .bubble p { white-space: pre-wrap; }
.msg .gface { flex-basis: 30px; width: 30px; height: 30px; }
.thinking { color: var(--dim); font-style: italic; }
.chaterr { color: var(--rose); }
.chatbox .fieldset { margin-bottom: 8px; }
.chatbox .btnrow { margin-bottom: 8px; }

/* ── diary photographs ──
   A quiet grid of square pictures. Everything that changes a picture is in the larger view, with words on every button. */
.pgrid { list-style: none; margin: 14px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.ptile { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pthumb { display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: pointer; }
.pthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pthumb:hover { border-color: var(--gold); }
.pthumb:focus-visible { border-radius: 12px; }
.pwait { display: block; height: 100%; }
.pgone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; padding: 6px; font-size: 11.5px; line-height: 1.25; color: var(--dim); text-align: center; }
.pcap { font-family: var(--serif); font-style: italic; font-size: 15.5px; line-height: 1.22; color: var(--ink2); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; padding: 0 2px; }
.pbar { justify-content: space-between; margin-top: 14px; }
.pcount { font-family: var(--serif); font-size: 19px; color: var(--dim); font-variant-numeric: lining-nums; white-space: nowrap; }
.pmsg { margin: 12px 0 0; font-size: 14.5px; color: var(--ink2); overflow-wrap: anywhere; }
.pmsg:empty { display: none; }
.photos > .note { margin-top: 12px; }
.photos .gold-btn { text-align: center; }
.pmark { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; font-family: var(--sans); font-size: 12.5px; color: var(--dim); white-space: nowrap; vertical-align: 0.12em; font-variant-numeric: lining-nums; }
.rowtext .pline { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--gold-ink); }
.link.daydel { align-self: center; margin-top: -4px; }
.note.gap { margin-top: 10px; }
.bkphotos { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; }
.pview { padding-top: 8px; }
.pv-frame { margin: 4px 0 14px; border-radius: 14px; overflow: hidden; background: var(--surface); display: grid; place-items: center; min-height: 150px; }
.pv-frame img { display: block; max-width: 100%; max-height: min(56vh, 560px); width: auto; height: auto; object-fit: contain; }
.pv-frame .note { padding: 20px; }
.pview .fieldset { margin-bottom: 0; }
.pview .btnrow { margin: 16px 0 0; }
.pview .pv-nav { justify-content: space-between; }
.pview .pv-acts { padding-top: 16px; border-top: 1px solid var(--line); }
.pview .pv-rm { margin-left: auto; }
.pview .confirm { margin-top: 16px; }
.pview .confirm .btnrow { margin: 0; }
.pill[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.pill[aria-disabled="true"]:hover { color: var(--ink2); border-color: var(--edge); }

@media print {
  .top, .tabbar, .body, .toast, .update, .sheet, .sheet-back { display: none !important; }
  body { background: #fff; color: #000; }
  .book { display: block; font-family: var(--serif); color: #000; font-size: 12pt; line-height: 1.5; }
  @page { margin: 18mm 16mm; }
  .bp { page-break-after: always; }
  .bp:last-child { page-break-after: auto; }
  .bcover { text-align: center; padding-top: 60mm; }
  .bcover h1 { font-size: 34pt; margin: 6pt 0; font-weight: 400; }
  .book h2 { font-size: 19pt; font-weight: 400; border-bottom: 0.5pt solid #000; padding-bottom: 4pt; margin: 0 0 12pt; }
  .book h3 { font-size: 14pt; font-weight: 400; font-style: italic; margin: 13pt 0 4pt; }
  .book p { margin: 0 0 6pt; white-space: pre-wrap; }
  .ba { page-break-inside: avoid; margin-bottom: 9pt; }
  .bday { margin-bottom: 20pt; }
  .bday h2 { font-size: 16pt; margin-bottom: 6pt; }
  .book .blit { font-size: 10.5pt; font-style: italic; margin: -3pt 0 8pt; }
  .book ol, .book ul { margin: 0 0 6pt; padding-left: 16pt; }
  .book li { margin-bottom: 2pt; }
  /* The day's photographs: two to a row, none taller than about 60mm, the caption beneath. A picture is never cut by a page. */
  .bphotos { margin: -8pt 0 20pt; font-size: 0; }
  .bphoto { display: inline-block; vertical-align: top; width: calc(50% - 3mm); margin: 0 0 5mm; break-inside: avoid; page-break-inside: avoid; text-align: center; }
  .bphoto:nth-child(odd) { margin-right: 6mm; }
  .bphoto img { display: block; max-width: 100%; max-height: 60mm; width: auto; height: auto; margin: 0 auto; border-radius: 1.2mm; }
  .bphoto figcaption { font-size: 9.5pt; font-style: italic; line-height: 1.3; margin-top: 1.6mm; overflow-wrap: anywhere; }
  /* The ring colours on paper: a thin rule and the numeral. Names and numerals carry the meaning in black and white. */
  .book { --person: #B2546B; --household: #3C78A8; --world: #4E8A5C; --f1: #B2546B; --f2: #C2643C; --f3: #4E8A5C; --f4: #3C78A8; --f5: #2E8A86; --f6: #6F5BA8; --f7: #8A5A95; }
  .bring { font-family: var(--sans); font-size: 8.5pt; letter-spacing: 0.16em; text-transform: uppercase; margin: 16pt 0 6pt !important; padding-bottom: 3pt; border-bottom: 1.2pt solid var(--rc); page-break-after: avoid; }
  .bfield { border-left: 1.5pt solid var(--rc); padding-left: 9pt; }
  .bfield h3 { margin-top: 0; }
  .bnum { color: var(--rc); font-style: normal; font-weight: 600; }
  .bicon h1 { font-size: 26pt; font-weight: 400; margin: 4pt 0 6pt; }
  .bicon .bkick { font-family: var(--sans); font-size: 8.5pt; letter-spacing: 0.16em; margin: 0; }
  .bicon h3 { border-top: 0.5pt solid #000; padding-top: 8pt; margin-top: 10pt; }
  .bicon .bend { text-align: center; margin-top: 16pt; }
  .bplan h1 { font-size: 24pt; font-weight: 400; margin: 4pt 0 2pt; }
  .bplan .bkick { font-family: var(--sans); font-size: 8.5pt; letter-spacing: 0.16em; margin: 0; }
  .bplan .bend { text-align: center; margin-top: 16pt; }
  .btl { width: 100%; border-collapse: collapse; margin: 8pt 0 10pt; }
  .btl td { padding: 4.5pt 8pt 4.5pt 0; border-bottom: 0.5pt solid #bbb; vertical-align: top; }
  .btl td:first-child { width: 34mm; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
  .btl .bgap td { color: #555; font-style: italic; }
  .bnote { color: #444; font-style: italic; font-size: 10.5pt; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 350px) {
  .body { padding-inline: 14px; }
  .calpane { padding-inline: 2px; }
  .calday b { font-size: 18px; }
  .seg.three button { font-size: 16.5px; padding-inline: 8px; }
  .seg.three button em { letter-spacing: 0.06em; }
  .facts dd { font-size: 17px; }
  .drow { padding-inline: 10px; gap: 9px; grid-template-columns: 40px 9px minmax(0, 1fr); }
  .top { padding-inline: 14px; }
  .mark { font-size: 22px; }
  .tabbar button { font-size: 10.5px; }
  .h1 { font-size: 32px; }
  .keeplink, .ruleedit { padding-left: 15px; }
  .bucket { grid-template-columns: 1fr auto; }
  .bucket .amt { grid-column: 1 / -1; text-align: left; min-width: 0; }
  .scenes { grid-template-columns: minmax(0, 1fr); }
  .scene { flex-direction: row; gap: 12px; padding-right: 40px; }
  .q legend { font-size: 19px; }
  .opts.scale .opt { font-size: 11.5px; }
  .church text { font-size: 16px; }
  .gq { font-size: 24px; }
  .bubble { padding-inline: 13px; }
  .chip { padding-inline: 13px; }
  .chips7 .chip { font-size: 12.5px; }
  .tl-row { grid-template-columns: 46px minmax(0, 1fr); column-gap: 12px; padding-inline: 6px 10px; }
  .rvrow { padding-inline: 12px; }
}
@media (max-width: 480px) { .ganswer { padding-left: 0; } }
