/* The book: pages, spiral, tabs, grids, writing. Builds on base.css tokens. */

@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
/* "Hand": Indie Flower (OFL) - upright, rounded, thin felt-tip print, loopy descenders, like hers */
@font-face { font-family: "Hand"; src: url("../fonts/hand-indie-flower.woff2") format("woff2"); font-display: swap; size-adjust: 104%; }

:root {
  --page: #fbf6ec;            /* cream paper of the 2027 book */
  --print-strong: #4c4742;    /* the date-range heading */
  --rule-strong: #b8b0a4;     /* grid row rules */
  --tab: #f2ece2;
  --tab-text: #8f887f;
  --today-wash: rgb(184 150 62 / .07);
  --lamp: rgb(255 255 255 / .6);
  --spine: #2b241d;
  --ribbon-a: #9c7a2e;
  --ribbon-b: #e3c879;
  --ink-shadow: rgb(28 22 14 / .16);
  --scrim: rgb(40 32 24 / .28);
  --font-book: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --fs: 15px;
  --pw: 600px;
  --ph: 780px;
  --gap: 40px;
  --gl: 1.6em;
  --lp: 1.78em;               /* list line pitch */
  --lane-h: 1.5em;
  --labcol: minmax(0, 1fr);
  --corner: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-appearance="light"]) {
    --page: #24211d;
    --print-strong: #e6dfd3;
    --rule-strong: #4f4a43;
    --tab: #2d2a26;
    --tab-text: #a39a8e;
    --today-wash: rgb(212 178 90 / .05);
    --lamp: rgb(255 190 110 / .085);
    --spine: #0a0908;
    --ribbon-a: #8a6a26;
    --ribbon-b: #d9bd6c;
    --ink-shadow: rgb(0 0 0 / .5);
    --scrim: rgb(0 0 0 / .5);
  }
}
:root[data-appearance="dark"] {
  --page: #24211d;
  --print-strong: #e6dfd3;
  --rule-strong: #4f4a43;
  --tab: #2d2a26;
  --tab-text: #a39a8e;
  --today-wash: rgb(212 178 90 / .05);
  --lamp: rgb(255 190 110 / .085);
  --spine: #0a0908;
  --ribbon-a: #8a6a26;
  --ribbon-b: #d9bd6c;
  --ink-shadow: rgb(0 0 0 / .5);
  --scrim: rgb(0 0 0 / .5);
}

html, body { overflow: hidden; }
body { background: var(--desk); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------------- the desk ---------------- */
#desk {
  position: fixed; inset: 0;
  background: radial-gradient(120% 80% at 50% 38%, var(--lamp), transparent 62%), var(--desk);
}
#stage {
  position: absolute;
  font-size: var(--fs);
  perspective: 2600px;
  width: calc(var(--pw) * 2 + var(--gap));
  height: var(--ph);
  left: 50%;
  top: calc(var(--sat, 0px) + 16px + (100vh - var(--sat, 0px) - 16px - max(64px, var(--sab, 0px) + 50px) - var(--ph)) / 2);
  transform: translateX(-50%);
}
:root[data-wide="0"] #stage {
  width: var(--pw);
  left: calc(var(--sal, 0px) + 6px);
  top: calc(var(--sat, 0px) + 10px);
  transform: none;
}
.sheet { position: absolute; inset: 0; transform-style: preserve-3d; }
.spread { display: flex; }
.single { display: block; }
.single > .page { width: 100%; height: 100%; }

/* ---------------- a page ---------------- */
.page {
  position: relative;
  width: var(--pw); height: var(--ph);
  background: var(--page);
  color: var(--print);
  display: flex; flex-direction: column;
  overflow: hidden;
  padding: 1.5em 1.6em 1.3em;
}
.page.verso {
  border-radius: var(--corner) 2px 2px var(--corner);
  box-shadow: -1px 1px 0 var(--paper-edge), -2px 2px 0 var(--rule-soft), -3px 3px 0 var(--paper-edge),
    0 2px 3px rgb(var(--shadow) / .08), -10px 18px 36px rgb(var(--shadow) / .14);
  padding-right: 1.05em;
}
.page.recto {
  border-radius: 2px var(--corner) var(--corner) 2px;
  box-shadow: 1px 1px 0 var(--paper-edge), 2px 2px 0 var(--rule-soft), 3px 3px 0 var(--paper-edge),
    0 2px 3px rgb(var(--shadow) / .08), 10px 18px 36px rgb(var(--shadow) / .14);
  padding-left: 1.05em;
}
/* the gutter darkens a touch, as a real page curves into the spiral */
.spread > .page.verso::after, .spread > .page.recto::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2.2em; pointer-events: none;
}
.spread > .page.verso::after { right: 0; background: linear-gradient(to left, rgb(var(--shadow) / .07), transparent); }
.spread > .page.recto::after { left: 0; background: linear-gradient(to right, rgb(var(--shadow) / .07), transparent); }
:root[data-wide="0"] .page { border-radius: 4px var(--corner) var(--corner) 4px; padding: 1.2em 1.05em 1em 1.1em; box-shadow: 1px 1px 0 var(--paper-edge), 2px 2px 0 var(--rule-soft), 0 10px 26px rgb(var(--shadow) / .14); }
.blank-verso { background: var(--page); }
.page.today-page { overflow-y: auto; scrollbar-width: none; }
.page.today-page::-webkit-scrollbar { display: none; }

.caps.page-title { margin: 0; font-weight: 500; font-size: 1.5em; color: var(--print); letter-spacing: .1em; text-align: center; }
[data-doodle] { display: inline-block; vertical-align: middle; }
.label { font-size: .82em; }

/* ---------------- spiral ---------------- */
.spiral {
  position: relative; z-index: 3;
  width: var(--gap); flex: none; height: 100%;
  margin: 0;
}
.spiral::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 10%; right: 10%;
  background: linear-gradient(to right, transparent, var(--spine) 30%, var(--spine) 70%, transparent);
  opacity: .9;
}
.spiral::after {
  content: ""; position: absolute; top: 1.4%; bottom: 1.4%; left: -12px; right: -12px;
  background-repeat: repeat-y; background-position: center top;
  background-size: 100% calc(var(--ph) / 17.5);
  filter: drop-shadow(0 2px 1.5px rgb(0 0 0 / .28));
}
.spiral-bronze::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23c9a77a'/%3E%3Cstop offset='.35' stop-color='%236b5236'/%3E%3Cstop offset='.7' stop-color='%23a07e52'/%3E%3Cstop offset='1' stop-color='%23402f1e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='4' y='19' width='6' height='8' rx='1.6' fill='%23221a12' opacity='.78'/%3E%3Crect x='90' y='19' width='6' height='8' rx='1.6' fill='%23221a12' opacity='.78'/%3E%3Cpath d='M8 23 C8 11 30 8 50 8 S92 11 92 23' fill='none' stroke='url(%23g)' stroke-width='3.2' vector-effect='non-scaling-stroke' stroke-linecap='round'/%3E%3Cpath d='M8 27 C8 15 30 12 50 12 S92 15 92 27' fill='none' stroke='url(%23g)' stroke-width='3.2' vector-effect='non-scaling-stroke' stroke-linecap='round'/%3E%3C/svg%3E");
}
.spiral-gold::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fbefb9'/%3E%3Cstop offset='.35' stop-color='%23b8902f'/%3E%3Cstop offset='.7' stop-color='%23e8cd77'/%3E%3Cstop offset='1' stop-color='%23866418'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='4' y='19' width='6' height='8' rx='1.6' fill='%23453a2c' opacity='.55'/%3E%3Crect x='90' y='19' width='6' height='8' rx='1.6' fill='%23453a2c' opacity='.55'/%3E%3Cpath d='M8 23 C8 11 30 8 50 8 S92 11 92 23' fill='none' stroke='url(%23g)' stroke-width='3.2' vector-effect='non-scaling-stroke' stroke-linecap='round'/%3E%3Cpath d='M8 27 C8 15 30 12 50 12 S92 15 92 27' fill='none' stroke='url(%23g)' stroke-width='3.2' vector-effect='non-scaling-stroke' stroke-linecap='round'/%3E%3C/svg%3E");
}
:root[data-appearance="dark"] .spiral::after { filter: brightness(.82) drop-shadow(0 2px 1.5px rgb(0 0 0 / .5)); }
@media (prefers-color-scheme: dark) { :root:not([data-appearance="light"]) .spiral::after { filter: brightness(.82) drop-shadow(0 2px 1.5px rgb(0 0 0 / .5)); } }

/* ---------------- page turn ---------------- */
.leaf {
  position: absolute; top: 0; height: var(--ph); width: calc(var(--pw) + var(--gap) / 2);
  transform-style: preserve-3d; z-index: 6; pointer-events: none;
}
.leaf-next { left: calc(var(--pw) + var(--gap) / 2); transform-origin: left center; }
.leaf-prev { left: 0; transform-origin: right center; }
.leaf .face { position: absolute; top: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf-next .face { left: calc(var(--gap) / 2); }
.leaf-prev .face { left: 0; }
.leaf .back { transform: rotateY(180deg); }
.ghost { position: absolute; top: 0; z-index: 5; pointer-events: none; }
.ghost-l { left: 0; }
.ghost-r { left: calc(var(--pw) + var(--gap)); }
.leaf-shade { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 90% at 50% 50%, rgb(var(--shadow) / .14), transparent 70%); }

/* ---------------- cover + title ---------------- */
.linen {
  background-color: var(--cover);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgb(255 255 255 / .045) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgb(0 0 0 / .035) 0 1px, transparent 1px 3px),
    linear-gradient(160deg, rgb(255 255 255 / .08), transparent 45%, rgb(0 0 0 / .06));
}
.sheet-cover { perspective: 2600px; }
.cover {
  position: absolute; top: 0; height: var(--ph); width: var(--pw);
  left: calc((var(--pw) + var(--gap)) / 2);
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 1px 0 var(--cover-deep), 2px 3px 0 var(--paper-edge), 0 18px 40px rgb(var(--shadow) / .22);
  cursor: pointer; transform-origin: left center; transform-style: preserve-3d;
  outline: none;
}
:root[data-wide="0"] .cover { left: 14px; width: calc(var(--pw) - 14px); }
.cover-face { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto 1fr auto; justify-items: center; padding: 0 1.5em 2.4em; backface-visibility: hidden; }
.cover-year {
  grid-row: 2; font-family: var(--font-serif); font-weight: 500;
  font-size: calc(var(--pw) * .118); letter-spacing: .02em; line-height: 1.1; font-variant-numeric: lining-nums;
  transform: translateY(-40%);
}
.cover-foot { grid-row: 4; font-family: var(--font-serif); font-weight: 600; font-size: .62em; letter-spacing: .32em; padding-left: .32em; }
.foil {
  background: var(--foil); background-size: 220% 100%; background-position: 30% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 9s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 85% 0; } }
.spiral-edge { position: absolute; top: 0; bottom: 0; width: var(--gap); left: calc(var(--gap) * -1 + 4px); }
.spiral-edge::before { display: none; }
:root[data-wide="0"] .spiral-edge { --gap: 26px; left: -20px; }
.cover.opening { pointer-events: none; }

.lock { grid-row: 3; align-self: start; margin-top: 2.2em; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .3em; width: min(16em, 80%); }
.lock-in {
  flex: 1; min-width: 0; height: 44px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--gold) 70%, transparent);
  background: transparent; text-align: center; letter-spacing: .2em; color: var(--print-strong); font-family: var(--font-serif); font-size: 1.1em; outline: none;
}
.lock-in::placeholder { color: color-mix(in srgb, var(--print-strong) 55%, transparent); font-style: italic; letter-spacing: .06em; }
.lock-go { width: 44px; height: 44px; font-size: 1.6em; color: var(--gold); }
.lock-msg { flex-basis: 100%; text-align: center; margin: .5em 0 0; min-height: 1.4em; font-style: italic; color: var(--print-strong); font-size: .9em; }
.lock.busy { opacity: .6; }

.inside { border-radius: var(--corner) 2px 2px var(--corner); background-color: var(--cover-deep); filter: saturate(.9); box-shadow: inset -6px 0 14px rgb(0 0 0 / .12), 0 12px 30px rgb(var(--shadow) / .14); }
.page.title { align-items: center; justify-content: center; text-align: center; padding: 2em; background: var(--paper); }
.title-words { display: flex; flex-direction: column; font-family: var(--font-foil); font-weight: 500; font-size: calc(var(--pw) * .078); line-height: 1.04; letter-spacing: -.005em; margin-top: -4%; }
.title-year { display: flex; align-items: center; gap: .6em; margin-top: 2.6em; color: var(--print-soft); }
.yr { width: 44px; height: 44px; font-size: 1.3em; color: var(--print-soft); border-radius: 50%; }
.yr:hover, .yr:focus-visible { color: var(--gold); }
.yr-now { font-size: 1.05em; letter-spacing: .2em; color: var(--print); }
.title-owner { margin: .6em 0 0; font-style: italic; font-size: .78em; letter-spacing: .08em; color: var(--print-soft); }
.gear { position: absolute; top: .5em; right: 2.6em; width: 44px; height: 44px; display: grid; place-items: center; color: var(--print-soft); border-radius: 50%; }
.gear svg { width: 20px; height: 20px; }
.gear:hover, .gear:focus-visible { color: var(--gold); }

/* ---------------- tabs ---------------- */
#tabs { position: absolute; top: 0; left: 0; width: 100%; height: var(--ph); pointer-events: none; z-index: 1; --tabh: calc(var(--ph) / 14.6); }
.tab {
  pointer-events: auto; position: absolute; top: calc(var(--tabh) * var(--i) + var(--ph) * .015);
  left: 100%; width: 30px; height: calc(var(--tabh) - 3px);
  display: flex; align-items: center; justify-content: center;
  background: var(--tab); color: var(--tab-text);
  border-radius: 0 10px 10px 0;
  box-shadow: 1px 1px 0 var(--rule-soft), 2px 3px 6px rgb(var(--shadow) / .10);
  font-family: var(--font-serif); font-style: italic; font-size: .88em; letter-spacing: .02em;
  transition: width .2s var(--ease), background-color .2s;
}
.tab span { writing-mode: vertical-rl; line-height: 1; }
.tab.left { left: auto; right: 100%; border-radius: 10px 0 0 10px; box-shadow: -1px 1px 0 var(--rule-soft), -2px 3px 6px rgb(var(--shadow) / .10); }
.tab.left span { transform: rotate(180deg); }
.tab.on { background: var(--page); color: var(--print-strong); width: 34px; }
.tab:hover, .tab:focus-visible { color: var(--print-strong); outline: none; }
.tab.t-today span::after { content: ""; display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); margin: .35em auto 0; }
:root[data-wide="0"] #tabs { left: 100%; width: calc(100vw - var(--pw) - var(--sal, 0px) - 6px); overflow-y: auto; overflow-x: hidden; pointer-events: auto; scrollbar-width: none; --tabh: max(44px, calc(var(--ph) / 14.2)); }
:root[data-wide="0"] #tabs::-webkit-scrollbar { display: none; }
:root[data-wide="0"] .tab { left: 0; width: 100%; background: transparent; box-shadow: none; justify-content: flex-start; }
:root[data-wide="0"] .tab span { display: flex; align-items: center; justify-content: center; width: 8px; height: 100%; overflow: hidden; color: transparent; background: var(--tab); border-radius: 0 6px 6px 0; box-shadow: 1px 1px 0 var(--rule-soft), 2px 2px 5px rgb(var(--shadow) / .10); font-size: .8em; transition: width .22s var(--ease), color .15s; }
:root[data-wide="0"] .tab.on span { width: 11px; background: var(--page); }
/* the slim edge: one tap pulls the tabs out, full size, over the page edge */
:root[data-wide="0"] #tabs.open { left: calc(100% - 30px); width: 76px; z-index: 8; filter: drop-shadow(-6px 4px 12px rgb(var(--shadow) / .18)); }
:root[data-wide="0"] #tabs.open .tab span { width: 46px; color: var(--tab-text); border-radius: 0 10px 10px 0; }
:root[data-wide="0"] #tabs.open .tab.on span { width: 52px; color: var(--print-strong); }

/* ---------------- shelf: ribbon, sync mark, page corners ---------------- */
#ribbon { position: absolute; z-index: 2; width: 44px; height: 64px; top: 100%; left: calc(var(--pw) + var(--gap) + 2.4em); display: flex; justify-content: center; }
#ribbon span {
  display: block; width: 15px; height: 46px; margin-top: -6px;
  background: linear-gradient(90deg, var(--ribbon-a), var(--ribbon-b) 45%, var(--ribbon-a));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  box-shadow: 0 2px 4px rgb(0 0 0 / .2);
  transition: transform .25s var(--ease);
  transform-origin: top center;
}
#ribbon:hover span, #ribbon:focus-visible span { transform: scaleY(1.12); }
#ribbon:focus-visible { outline: none; }
:root[data-wide="0"] #ribbon { left: 1.2em; }
:root[data-view="cover"] #ribbon, :root[data-view="lock"] #ribbon, :root[data-view="title"] #ribbon { display: none; }
#shelf { position: fixed; left: calc(var(--sal, 0px) + 16px); bottom: calc(var(--sab, 0px) + 18px); pointer-events: none; }
#sync { font-family: var(--font-serif); font-style: italic; font-size: .82rem; color: var(--print-soft); opacity: .85; transition: opacity .3s; }
#sync[data-state="synced"] { opacity: .55; }
:root[data-wide="0"] #shelf { left: calc(var(--sal, 0px) + 76px); bottom: calc(var(--sab, 0px) + 26px); }
:root[data-view="cover"] #sync:not([data-state="offline"]) { opacity: 0; }

.corner { position: absolute; top: 0; z-index: 7; width: 44px; height: 44px; }
.corner::before { content: ""; position: absolute; top: 0; width: 16px; height: 16px; background: linear-gradient(225deg, var(--desk) 50%, var(--paper-edge) 50%, var(--page)); box-shadow: -1px 1px 2px rgb(var(--shadow) / .14); transition: width .2s var(--ease), height .2s var(--ease); }
.corner-prev { left: 0; }
.corner-prev::before { left: 0; border-bottom-right-radius: 3px; background: linear-gradient(135deg, var(--desk) 50%, var(--paper-edge) 50%, var(--page)); box-shadow: 1px 1px 2px rgb(var(--shadow) / .14); }
.corner-next { right: 0; }
.corner-next::before { right: 0; border-bottom-left-radius: 3px; }
.corner:hover::before, .corner:focus-visible::before { width: 24px; height: 24px; }
:root[data-view="cover"] .corner, :root[data-view="lock"] .corner, :root[data-wide="0"] .corner { display: none; }

/* ---------------- writing: shared ---------------- */
.write {
  display: block; width: 100%; border: 0; outline: none; background: transparent; resize: none;
  padding: 0; margin: 0; color: var(--pen, var(--pen-black)); caret-color: var(--pen, var(--print));
  font-family: var(--font-hand); font-size: 1.08em; -webkit-appearance: none; appearance: none; border-radius: 0;
}
:root[data-handwriting="off"] .write { font-family: var(--font-serif); font-weight: 600; }
.write::placeholder { color: var(--print-soft); opacity: .45; font-family: var(--font-serif); font-style: italic; font-size: .82em; }
textarea.ruled, .ruled {
  line-height: var(--lp);
  background-image: linear-gradient(to bottom, transparent calc(var(--lp) - 1px), var(--rule) calc(var(--lp) - 1px));
  background-size: 100% var(--lp); background-attachment: local;
}
.box { margin: 0; min-height: 0; display: flex; flex-direction: column; }
fieldset.box { border: 1px solid var(--rule); padding: .2em .7em .5em; border-radius: 1px; }
fieldset.box legend { margin: 0 auto; padding: 0 .55em; font-style: italic; color: var(--print-soft); font-size: .8em; }
.box textarea { flex: 1; min-height: 3em; line-height: 1.45; }
.box.fill { flex: 1; }
.box.fill textarea { height: 100%; }

.ent { font-size: 1.06em; transform: rotate(var(--tilt, 0deg)); transform-origin: left center; cursor: pointer; overflow-wrap: normal; word-break: normal; hyphens: manual; outline: none; }
.ent-t { font-size: .8em; opacity: .72; white-space: nowrap; }
.ent:focus-visible { text-decoration: underline dotted; }
.ent[data-virtual] { cursor: default; }

/* checklists */
.checklist { min-width: 0; }
.list-label { margin: 0; text-align: center; font-weight: 400; color: var(--print-soft); font-style: italic; font-size: .8em; border-bottom: 1px solid var(--rule); line-height: 1.6; }
ul.check { list-style: none; margin: 0; padding: 0; }
ul.check li { display: flex; align-items: flex-end; gap: .45em; height: var(--lp); border-bottom: 1px solid var(--rule); position: relative; }
ul.check li .write { flex: 1; min-width: 0; height: 100%; line-height: calc(var(--lp) * 1.05); padding-top: .1em; transform: rotate(var(--tilt, 0deg)); transform-origin: left; text-overflow: ellipsis; }
.cb { position: relative; flex: none; width: 1.55em; height: 100%; display: grid; place-items: center; margin-left: -.35em; }
.cb::before { content: ""; width: .62em; height: .62em; border: 1px solid var(--print-soft); border-radius: 1px; transform: translateY(-.32em); }
.cb .tick { position: absolute; left: .12em; bottom: .38em; width: 1.25em; height: 1.2em; overflow: visible; pointer-events: none; }
.tick path { fill: none; stroke: var(--pen, var(--pen-black)); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
ul.check li { --pen: var(--pen-black); }
ul.check li.done .tick path { stroke-dashoffset: 0; }
ul.check li.just .tick path { animation: tick .42s var(--ease) both; }
@keyframes tick { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
ul.check li:has(.write[data-pen="blue"]) { --pen: var(--pen-blue); }
ul.check li:has(.write[data-pen="orange"]) { --pen: var(--pen-orange); }
ul.check li:has(.write[data-pen="purple"]) { --pen: var(--pen-purple); }
ul.check li:has(.write[data-pen="turquoise"]) { --pen: var(--pen-turquoise); }
ul.check li:has(.write[data-pen="pink"]) { --pen: var(--pen-pink); }
ul.check li:has(.write[data-pen="green"]) { --pen: var(--pen-green); }
ul.check li:has(.write[data-pen="lime"]) { --pen: var(--pen-lime); }
ul.check li:has(.write[data-pen="red"]) { --pen: var(--pen-red); }

/* ink being written (the assistant, or a fresh entry) */
.inking { animation: inkin 1.1s cubic-bezier(.4,.1,.3,1) var(--ink-delay, 0ms) both; }
@keyframes inkin { from { clip-path: inset(-30% 100% -30% -2%); } to { clip-path: inset(-30% -2% -30% -2%); } }

/* ---------------- the week grid ---------------- */
.page.grid { padding-top: 1.25em; padding-bottom: 1.4em; }
.gh { flex: none; height: 5.2em; display: flex; align-items: flex-end; justify-content: space-between; gap: 1em; border-bottom: 1px solid var(--rule-strong); padding-bottom: .45em; }
.gh-main { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.range { margin: 0; font-family: var(--font-book); font-weight: 400; font-size: 2.05em; line-height: 1.05; color: var(--print-strong); letter-spacing: -.01em; white-space: nowrap; }
.box.weekline { margin-top: .2em; }
.weekline .write { font-size: 1.12em; height: 1.5em; line-height: 1.5em; color: var(--pen); }
.minical.sans { flex: none; font-family: var(--font-sans); color: var(--print); font-size: .5em; letter-spacing: .04em; }
.minical .mc-head { display: flex; justify-content: space-between; letter-spacing: .1em; margin-bottom: .2em; }
.minical .mc-grid { display: grid; grid-template-columns: repeat(7, 2.05em); text-align: right; row-gap: .05em; }
.minical .mc-h { color: var(--print-soft); }
.minical .mc-today { color: var(--gold); font-weight: 500; }
.gh-r { justify-content: flex-start; gap: 2em; }
.quote { flex: 1; min-width: 0; margin: 0 0 .35em; text-align: center; font-family: var(--font-book); color: var(--print); font-size: .66em; line-height: 1.5; }
.quote p { margin: 0; }
.quote cite { display: block; font-style: normal; margin-top: .3em; }

.gw { flex: 1 1 0; min-height: 0; display: grid; overflow: hidden; align-content: start; }
.gl-head { border-bottom: 1px solid var(--rule-strong); display: flex; align-items: baseline; justify-content: center; gap: .9em; padding: .55em .3em .3em; font-family: var(--font-sans); font-size: .6em; letter-spacing: .16em; color: var(--print); white-space: nowrap; min-width: 0; overflow: hidden; }
.gl-head.wk { justify-content: flex-start; padding-left: 0; font-size: .48em; letter-spacing: .14em; align-items: flex-end; }
.gl-head .dnum { font-weight: 300; font-size: 1.95em; letter-spacing: 0; line-height: 1; }
.gl-head .n { display: inline-grid; place-items: center; min-width: 1.45em; height: 1.45em; border-radius: 50%; }
.gl-head.today .n { box-shadow: 0 0 0 1px var(--gold); color: var(--print-strong); }
.gl-head.today .dname { color: var(--print-strong); }

.rl { border-bottom: 1px solid var(--rule-strong); border-right: 1px solid var(--rule-strong); position: relative; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding-right: .6em; }
.rl-caps { font-family: var(--font-sans); font-size: .48em; letter-spacing: .14em; color: var(--print); line-height: calc(var(--gl) / .48 * .55); }
.rl-me .rl-caps { line-height: calc(var(--gl) * 1.1); }
.rl-printed { justify-content: flex-start; }
.rl-printed .rl-caps { line-height: calc(var(--gl) * 1.1); }
.rl-hand { margin: auto 0; font-size: 1.32em; line-height: 1.1; padding-left: .05em; overflow-wrap: anywhere; }
.rl.last, .cell.last { border-bottom-color: var(--print-soft); }

.cell {
  position: relative; min-width: 0; min-height: 0; overflow: hidden;
  border-bottom: 1px solid var(--rule-strong); border-right: 1px solid var(--rule-strong);
  padding: 0 .5em;
  background-image: linear-gradient(to bottom, transparent calc(var(--gl) - 1px), var(--rule) calc(var(--gl) - 1px));
  background-size: calc(100% - 1em) var(--gl); background-position: .5em 0; background-repeat: repeat-y;
  cursor: text;
}
.gw .cell.col-last { border-right: 0; }
.cell.today { background-color: var(--today-wash); }
.cell .ent { line-height: var(--gl); font-size: min(1.08em, calc(var(--gl) * .74)); white-space: normal; }
.cell.overflow { overflow-y: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--gl) * .7), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - var(--gl) * .7), transparent); }
.cell.overflow::-webkit-scrollbar { display: none; }
.cell:focus-visible { outline: 1px dashed var(--gold); outline-offset: -2px; }
.rl-me .checklist.compact { margin-top: 0; }
.checklist.compact .list-label { display: none; }
.checklist.compact ul.check li { height: var(--gl); border-bottom-color: var(--rule); }
.checklist.compact ul.check li .write { font-size: min(1em, calc(var(--gl) * .7)); line-height: var(--gl); }
.checklist.compact .cb { width: 1.3em; }

/* ---------------- week lists ---------------- */
.page.lists, .page.etcpage, .page.goals, .page.mnotes, .page.notes-index, .page.note-page { padding-top: 2.2em; }
.lists-head, .p-head, .etc-head { flex: none; text-align: center; margin-bottom: 1.4em; position: relative; }
.lists-sub, .etc-range { margin-top: .3em; color: var(--print-soft); font-style: italic; }
.etc-range { position: absolute; left: 0; top: .5em; }
.lists-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5em; flex: 1; min-height: 0; }
.lcol { display: flex; flex-direction: column; gap: 1.25em; min-height: 0; }
.lcol .dontforget { flex: 1; min-height: 6em; }
.page.lists > .etc { margin-top: 1.2em; height: 7em; flex: none; }
.etcpage .box.fill { flex: 1; }
.etcpage .box.fill textarea, .mnotes .box.fill textarea { line-height: var(--lp); }
.colophon { flex: none; margin-top: .8em; border-top: 1px dotted var(--rule-strong); height: 0; display: flex; justify-content: center; }
.colophon span { width: 1.25em; height: 1.25em; margin-top: -.62em; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--page); }

/* ---------------- month opener ---------------- */
.mnotes .box.fill textarea { background-image: linear-gradient(to bottom, transparent calc(var(--lp) - 1px), var(--rule) calc(var(--lp) - 1px)); background-size: 100% var(--lp); background-attachment: local; }
.page.goals { --lp: 1.6em; }
.goal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6em; flex: 1; min-height: 0; }
.gcol { display: flex; flex-direction: column; gap: 1.2em; min-height: 0; }
.gcol .box { flex: 1; min-height: 5em; }
.goals > .etc { margin-top: 1.2em; flex: none; height: 7.5em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- month spread ---------------- */
.page.month { padding-top: 1.6em; }
.m-head { flex: none; height: 5.4em; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.m-name { margin: 0; font-size: 1.6em; font-weight: 500; letter-spacing: .1em; color: var(--print); }
.m-year { display: flex; align-items: center; gap: .9em; font-size: .68em; letter-spacing: .2em; color: var(--print); margin-top: .35em; }
.m-year::before, .m-year::after { content: ""; width: 9em; border-top: 1px solid var(--rule-strong); }
.m-quote { margin: 0; font-style: italic; color: var(--print); font-size: .84em; text-align: center; }
.m-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, .95fr); gap: .9em; }
.m-grid { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.m-dayhead { display: grid; text-align: center; font-size: .56em; padding-bottom: .9em; color: var(--print); }
.m-dayhead span { letter-spacing: .14em; }
.m-rows { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); }
.m-row { position: relative; display: grid; border-bottom: 1px solid var(--rule-strong); min-height: 0; }
.m-row:last-child { border-bottom: 0; }
.m-cell { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--rule-strong); padding: .3em .4em calc(var(--lanes, 0) * var(--lane-h) + .4em); cursor: text; overflow: hidden; }
.m-cell.last-col { border-right: 0; }
.m-cell.out { cursor: default; }
.m-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .3em; min-height: 1.4em; }
.m-num { font-size: .8em; color: var(--print); min-width: 32px; min-height: 32px; margin: -.5em 0 0 -.55em; padding: .5em .55em; text-align: left; display: flex; align-items: flex-start; }
.m-num .n { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; margin: -.35em 0 0 -.35em; border-radius: 50%; }
.m-cell.today .m-num .n { box-shadow: 0 0 0 1px var(--gold); color: var(--print-strong); }
.m-hol { font-style: italic; font-size: .6em; color: var(--print-soft); text-align: right; line-height: 1.25; padding-top: .15em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.m-ents { flex: 1; min-height: 0; overflow: hidden; padding-top: .1em; }
.m-ents .ent { font-size: 1.02em; line-height: 1.12; margin-bottom: .18em; padding-left: .15em; }
.m-ents .ent.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-more { display: block; margin: -.05em 0 0 .2em; padding: 0; font-family: var(--font-serif); font-style: italic; font-size: .74em; line-height: 1.3; color: var(--print-soft); }
.m-more.in-top { position: relative; z-index: 2; margin: .05em 0 0 auto; padding: 0 .1em .1em .4em; min-height: 24px; align-self: flex-start; background: var(--page); border-radius: 0 0 0 8px; }
.m-more:hover, .m-more:focus-visible { color: var(--print-strong); outline: none; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .2em; }
.rng { position: absolute; z-index: 1; bottom: calc(.5em + var(--lane) * var(--lane-h)); height: var(--lane-h); border-bottom: 1.6px solid var(--pen); cursor: pointer; display: flex; align-items: flex-end; justify-content: center; transform: rotate(var(--tilt, 0deg)); outline: none; }
.rng.tl::before, .rng.tr::after { content: ""; position: absolute; bottom: -5.5px; width: 1.6px; height: 10px; background: var(--pen); border-radius: 1px; }
.rng.tl::before { left: -1px; }
.rng.tr::after { right: -1px; }
.rng-t { font-size: 1.02em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 .3em .1em; }
.m-notes { min-height: 0; display: flex; flex-direction: column; padding-top: .1em; }
.m-notes-t { margin: 0 0 .5em; text-align: center; font-size: .66em; letter-spacing: .16em; font-weight: 500; color: var(--print); }
.gridnotes { flex: 1; min-height: 6em; margin-bottom: 1em; }
.gridnotes textarea { height: 100%; line-height: var(--lp); background-image: linear-gradient(to bottom, transparent calc(var(--lp) - 1px), var(--rule) calc(var(--lp) - 1px)); background-size: 100% var(--lp); background-attachment: local; font-size: 1em; }
.minical.serif { font-family: var(--font-serif); font-size: .5em; color: var(--print-soft); margin: 0 auto 1.6em; }
.minical.serif .mc-head { justify-content: center; font-size: 1.55em; font-style: italic; color: var(--print); }
.minical.serif .mc-grid { grid-template-columns: repeat(7, 2.2em); text-align: center; }

/* ---------------- take note ---------------- */
.n-intro { text-align: center; margin: -.6em 0 .8em; color: var(--print-soft); font-style: italic; }
.n-list { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow-y: auto; }
.n-list li { border-bottom: 1px solid var(--rule); min-height: calc(var(--lp) * 1.15); display: flex; align-items: flex-end; }
.n-item { width: 100%; text-align: left; font-size: 1.12em; padding: .25em .2em .1em; min-height: 44px; display: flex; align-items: flex-end; }
.n-item.on { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .25em; text-decoration-thickness: 1px; }
.n-add { padding: .5em .2em; min-height: 44px; color: var(--print-soft); }
.n-add:hover { color: var(--gold); }
.n-title { font-size: 1.4em; height: 1.6em; border-bottom: 1px solid var(--rule); margin-bottom: .3em; }
.n-body { flex: 1; min-height: 0; font-size: 1.08em; }
.n-foot { flex: none; display: flex; justify-content: flex-end; padding-top: .4em; }
.n-del { color: var(--print-soft); min-height: 36px; }
.n-del:hover { color: var(--pen-red); }
.note-page .blank { flex: 1; }

/* ---------------- composer, pen bar, sheets, toast ---------------- */
#overlay { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
#overlay > * { pointer-events: auto; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
.c-scrim { position: fixed; inset: 0; background: transparent; }
.composer {
  position: fixed; top: 0; left: 0; width: min(372px, calc(100vw - 20px)); padding: .9em 1em .8em;
  background: var(--page); color: var(--print); border-radius: 14px; font-size: 16px;
  box-shadow: 0 1px 0 var(--rule-soft), 0 18px 44px rgb(var(--shadow) / .24), 0 2px 6px rgb(var(--shadow) / .1);
  opacity: 0; transition: opacity .16s var(--ease); z-index: 2;
}
.composer.in { opacity: 1; }
.c-when { color: var(--print-soft); font-style: italic; margin-bottom: .1em; }
.c-text { width: 100%; border: 0; border-bottom: 1px solid var(--rule); background: transparent; outline: none; font-size: 1.5em; padding: .15em 0 .1em; color: var(--pen); }
:root[data-handwriting="off"] .c-text { font-family: var(--font-serif); font-weight: 600; }
.c-text::placeholder { color: var(--print-soft); opacity: .55; }
.c-penrow { display: flex; flex-direction: column; gap: .1em; margin: .55em 0 .2em; }
.c-pens, .penbar { display: flex; justify-content: space-between; }
.dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; }
.dot::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--pen); box-shadow: inset 0 -2px 3px rgb(0 0 0 / .18); transition: transform .15s var(--ease); }
.dot.on::after { content: ""; position: absolute; width: 29px; height: 29px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--pen); }
.dot:hover::before { transform: scale(1.1); }
.c-penname { min-height: 1.2em; color: var(--print-soft); font-style: italic; padding-left: .3em; }
.c-opts { display: flex; flex-wrap: wrap; gap: .4em .9em; align-items: center; margin-top: .25em; }
.c-opt { display: flex; align-items: center; gap: .35em; }
.c-opt input, .c-opt select { font-family: var(--font-ui); font-size: 14px; color: var(--print); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: .3em .1em; min-height: 36px; border-radius: 0; }
.c-opt input:focus, .c-opt select:focus { outline: none; border-bottom-color: var(--gold); }
/* time + "through": a ruled blank on the paper, her hand once filled */
.c-field { position: relative; display: inline-flex; align-items: center; }
.c-opt .c-field input {
  -webkit-appearance: none; appearance: none; width: 7.4em; min-width: 0;
  font-family: var(--font-hand); font-size: 17px; color: var(--print-strong);
  border-bottom: 1px dotted var(--rule-strong); padding: .2em .1em .05em; line-height: 1.3; cursor: pointer;
}
.c-opt .c-field input[type="date"] { width: 8.6em; }
:root[data-handwriting="off"] .c-opt .c-field input { font-family: var(--font-serif); font-weight: 600; font-size: 15px; }
.c-field input::-webkit-datetime-edit { padding: 0; }
.c-field input::-webkit-datetime-edit-fields-wrapper { padding: 0; }
.c-opt select.c-row { font-family: var(--font-serif); font-size: 16px; color: var(--print-strong); border-bottom-style: dotted; border-bottom-color: var(--rule-strong); }
.c-field input::-webkit-calendar-picker-indicator { opacity: .4; margin-left: .2em; cursor: pointer; }
.c-field input:hover::-webkit-calendar-picker-indicator { opacity: .6; }
:root[data-appearance="dark"] .c-field input::-webkit-calendar-picker-indicator { filter: invert(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-appearance="light"]) .c-field input::-webkit-calendar-picker-indicator { filter: invert(.9); } }
.c-field input.empty:not(:focus) { color: transparent; }
.c-field input.empty:not(:focus)::-webkit-datetime-edit { color: transparent; }
.c-ph { position: absolute; left: .15em; bottom: .3em; pointer-events: none; font-family: var(--font-serif); font-style: italic; font-size: 14px; color: var(--print-soft); opacity: .75; white-space: nowrap; }
.c-field:has(input:not(.empty)) .c-ph, .c-field:focus-within .c-ph { display: none; }
.c-actions { display: flex; align-items: center; gap: .5em; margin-top: .7em; }
.c-actions .grow { flex: 1; }
.c-del { color: var(--print-soft); font-style: italic; min-height: 40px; padding: 0 .3em; }
.c-del:hover { color: var(--pen-red); }
.c-done { min-height: 40px; padding: 0 1.1em; border-radius: 20px; background: var(--print-strong); color: var(--page); font-family: var(--font-serif); font-weight: 600; letter-spacing: .04em; }

.penbar { position: fixed; top: 0; left: 0; z-index: 3; padding: 2px 6px; gap: 0; background: var(--page); border-radius: 22px; box-shadow: 0 6px 20px rgb(var(--shadow) / .2), 0 0 0 1px var(--rule-soft); opacity: 0; pointer-events: none; transition: opacity .15s; }
.penbar.in { opacity: 1; pointer-events: auto; }
.penbar .dot { width: 32px; height: 32px; }
.penbar .dot::before { width: 16px; height: 16px; }
.penbar .dot.on::after { width: 24px; height: 24px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--sab, 0px) + 22px); transform: translate(-50%, 12px); max-width: min(460px, calc(100vw - 170px)); display: flex; align-items: center; gap: .9em; padding: .55em .6em .55em 1.1em; border-radius: 22px; background: var(--print-strong); color: var(--page); font-family: var(--font-ui); font-size: 14px; box-shadow: 0 8px 26px rgb(var(--shadow) / .25); opacity: 0; transition: opacity .2s, transform .25s var(--ease); z-index: 4; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast-act { color: var(--ribbon-b); font-weight: 600; padding: .3em .6em; min-height: 36px; }
:root[data-wide="0"] .toast { left: calc(var(--sal, 0px) + 12px); transform: translateY(12px); max-width: calc(100vw - 100px - var(--sal, 0px)); }
:root[data-wide="0"] .toast.in { transform: none; }

.scrim { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; opacity: 0; transition: opacity .22s; }
.scrim.in { opacity: 1; }
.sheet.paper { position: relative; inset: auto; transform-style: flat; }
section.sheet { width: min(560px, calc(100vw - 24px)); max-height: min(86vh, 860px); overflow-y: auto; background: var(--page); color: var(--print); border-radius: 16px; padding: 1.1em 1.4em 1.4em; font-size: 16px; transform: translateY(14px); transition: transform .25s var(--ease); }
.scrim.in section.sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6em; }
.sheet-head h2 { margin: 0; font-size: 1.05em; color: var(--print-strong); }
.sheet-x { width: 44px; height: 44px; font-size: 1.6em; color: var(--print-soft); margin-right: -.5em; }
@media (max-width: 599px) {
  .scrim { place-items: end center; }
  section.sheet { width: 100%; border-radius: 18px 18px 0 0; padding-bottom: calc(1.4em + var(--sab, 0px)); max-height: 88vh; }
}
.settings { display: flex; flex-direction: column; gap: .2em; }
.set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5em 1em; padding: .6em 0; border-bottom: 1px solid var(--rule-soft); }
.set-l { display: flex; flex-direction: column; color: var(--print-strong); }
.set-l small { color: var(--print-soft); font-style: italic; font-size: .82em; }
.biay .set-l { display: block; line-height: 2.2; }
.num-in { width: 3.6em; text-align: center; border: 0; border-bottom: 1px solid var(--rule-strong); background: transparent; font-family: var(--font-hand); font-size: 1.2em; color: var(--pen-blue); padding: .1em; min-height: 36px; }
.seg { display: flex; border: 1px solid var(--rule); border-radius: 20px; overflow: hidden; flex: none; }
.seg button { padding: .35em .75em; min-height: 36px; font-size: .88em; color: var(--print); white-space: nowrap; }
.settings, .settings * { min-width: 0; }
.row-ed { flex-wrap: nowrap; }
.seg button.on { background: var(--print-strong); color: var(--page); }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--rule); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--page); box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--gold); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.set-h { margin: 1.3em 0 .3em; font-size: .78em; color: var(--print-soft); }
.set-note { margin: 0 0 .4em; font-style: italic; color: var(--print-soft); font-size: .9em; }
.pen-names { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .2em 1em; }
.pen-name, .row-ed { display: flex; align-items: center; gap: .5em; min-height: 40px; }
.pen-name input, .row-ed input, .row-ed select { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--rule-soft); background: transparent; padding: .35em .1em; min-height: 36px; color: var(--print-strong); }
.row-ed input { font-family: var(--font-hand); font-size: 1.1em; }
.row-ed select { flex: 0 1 9em; font-size: .9em; color: var(--print); }
.row-ed input { flex: 1 1 5.5em; min-width: 5.5em; }
@media (max-width: 599px) { .row-ed select { flex-basis: 7em; } .row-ed .mini { width: 32px; } }
/* while a sheet or the composer is open, the corner pen and the falling
   leaves step back so nothing sits on top of what she is doing */
body:has(#overlay > .scrim, #overlay > .composer) .cmp-fab { opacity: 0; pointer-events: none; }
body:has(#overlay > .scrim) #fx { opacity: 0; transition: opacity .3s; }
.pen-name .dot, .row-ed .dot { width: 20px; height: 20px; }
.pen-name .dot::before, .row-ed .dot::before { width: 14px; height: 14px; }
.row-btns { display: flex; }
.mini { width: 36px; height: 36px; color: var(--print-soft); border-radius: 50%; }
.mini:disabled { opacity: .3; cursor: default; }
.mini:not(:disabled):hover { color: var(--print-strong); background: var(--rule-soft); }
.row-add { display: flex; justify-content: space-between; padding-top: .4em; }
.link { color: var(--print-strong); font-style: italic; min-height: 40px; }
.link.soft { color: var(--print-soft); font-size: .9em; }
.cal .set-l { flex: 1 1 14em; }
.cal-acts { display: flex; flex-wrap: wrap; gap: .5em; }
.cal-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.05em; border-radius: 22px; border: 1px solid var(--rule-strong); color: var(--print-strong); font-family: var(--font-serif); font-size: .95em; text-decoration: none; white-space: nowrap; }
.cal-btn:hover, .cal-btn:focus-visible { border-color: var(--gold); outline: none; }
.cal-btn.cal-add { background: var(--print-strong); border-color: var(--print-strong); color: var(--page); font-weight: 600; }

/* ---------------- phone ---------------- */
:root[data-wide="0"] .range { font-size: 1.55em; }
:root[data-wide="0"] .gh { height: 4.4em; gap: .5em; }
:root[data-wide="0"] .gh-r { gap: .8em; }
:root[data-wide="0"] .quote { font-size: .58em; align-self: flex-end; }
:root[data-wide="0"] .quote p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
:root[data-wide="0"] { --labcol: 3.7em; --corner: 14px; }
:root[data-wide="0"] .rl-hand { font-size: 1.02em; overflow-wrap: normal; word-break: keep-all; }
:root[data-wide="0"] .gl-head { flex-direction: column; align-items: center; gap: .15em; font-size: .52em; letter-spacing: .1em; }
:root[data-wide="0"] .gl-head .dnum { font-size: 2.1em; }
:root[data-wide="0"] .gl-head.wk { align-items: flex-start; justify-content: flex-end; }
:root[data-wide="0"] .cell { padding: 0 .3em; background-size: calc(100% - .6em) var(--gl); background-position: .3em 0; }
:root[data-wide="0"] .cell .ent { font-size: min(.98em, calc(var(--gl) * .7)); }
:root[data-wide="0"] .m-head { height: 4.2em; }
:root[data-wide="0"] .m-dayhead { font-size: .5em; letter-spacing: 0; }
:root[data-wide="0"] .m-ents .ent { font-size: .95em; }
:root[data-wide="0"] .m-hol { font-size: .55em; }
:root[data-wide="0"] .lists-cols { gap: 1em; }
:root[data-wide="0"] .page.lists, :root[data-wide="0"] .page.goals { overflow-y: auto; }
:root[data-wide="0"] .goal-cols { gap: 1em; }
:root[data-wide="0"] .title-words { font-size: calc(var(--pw) * .1); }

/* phone week: all seven days side by side, about three in view, label column pinned */
.page.flowpage { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.page.flowpage::-webkit-scrollbar { display: none; }
.gh-phone { height: auto; min-height: 0; padding-bottom: .5em; }
.gh-phone .range { font-size: 1.62em; }
.gscroll {
  --labcol: 3.3em;
  flex: none; container-type: inline-size;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  scroll-snap-type: x mandatory; scroll-padding-left: var(--labcol);
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  margin-right: -1.05em;           /* the peek of the next day runs to the paper's edge */
}
.gscroll::-webkit-scrollbar { display: none; }
.gw.flow {
  --gl: 1.5em;
  --dayw: max(84px, calc((100cqw - var(--labcol)) / 3.4));
  width: max-content; overflow: visible; flex: none;
  padding-right: calc(100cqw - var(--labcol) - var(--dayw) * 3);   /* the last stop shows Fri–Sun whole */
}
/* a tablet held upright has room for the whole week at once */
@container (min-width: 600px) {
  .gw.flow { --dayw: max(92px, calc((100cqw - var(--labcol)) / 7 - .2px)); padding-right: 0; }
}
.gw.flow .gl-head.day { scroll-snap-align: start; padding-left: .2em; padding-right: .2em; }
.gw.flow .gl-head.wk, .gw.flow .rl { position: sticky; left: 0; z-index: 2; background: var(--page); }
.gw.flow .rl { padding-right: .35em; }
.gw.flow .rl-caps { line-height: var(--gl); }
.gw.flow .rl-hand { font-size: 1.05em; margin: .35em 0 auto; overflow-wrap: normal; }
.gw.flow .rl.rl-me { justify-content: flex-start; }
.gw.flow .cell { overflow: visible; padding: 0 .3em; background-size: calc(100% - .6em) var(--gl); background-position: .3em 0; }
.gw.flow .cell .ent { font-size: 1.04em; line-height: var(--gl); }
.gw.flow .cell .ent + .ent { margin-top: 0; }
.gw.flow .cell.c-me { padding-bottom: 0; }
.gw.flow .gl-head.today .n { box-shadow: 0 0 0 1px var(--gold); }
.gfoot { flex: none; margin-top: auto !important; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1em 1.2em; padding: 1.3em .2em .4em; margin-top: .9em; border-top: 1px dotted var(--rule-strong); }
.gfoot-cals { display: flex; gap: 1.4em; }
.gfoot .minical.sans { font-size: .56em; }
.gfoot .quote { flex: 1 1 11em; margin: 0; font-size: .74em; text-align: left; }
.gfoot .quote p { font-style: italic; }
.gfoot .quote cite { color: var(--print-soft); font-size: .92em; }

@media (prefers-reduced-motion: reduce) { .foil { animation: none; } }
:root[data-motion="off"] .foil { animation: none; }
