:root {
  --ink: #2b2b2b;
  --ink-2: #6e6e6e;
  --ink-3: #ababab;
  --line: #e7e7e3;
  --paper: #ffffff;
  --desk: #f3f2ee;

  --hl-yellow: #fff6c9;
  --hl-peach:  #ffe9d9;
  --hl-pink:   #ffe3ea;
  --hl-lilac:  #ebe5fb;
  --hl-blue:   #dfeafb;
  --hl-sky:    #e0f2f7;
  --hl-mint:   #e0f5ec;
  --hl-green:  #e7f3d9;
  --hl-grey:   #ededea;
  --hl-none:   transparent;

  --font: "IBM Plex Sans", "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hl-yellow { --c: var(--hl-yellow); --pc: #f3dc6a; }
.hl-peach  { --c: var(--hl-peach);  --pc: #f6b98f; }
.hl-pink   { --c: var(--hl-pink);   --pc: #f3a5bb; }
.hl-lilac  { --c: var(--hl-lilac);  --pc: #b9a6ea; }
.hl-blue   { --c: var(--hl-blue);   --pc: #93b7ec; }
.hl-sky    { --c: var(--hl-sky);    --pc: #8ccfe0; }
.hl-mint   { --c: var(--hl-mint);   --pc: #8fd6b6; }
.hl-green  { --c: var(--hl-green);  --pc: #b2d98a; }
.hl-grey   { --c: var(--hl-grey);   --pc: #b9b8b3; }
.hl-none   { --c: var(--hl-none);   --pc: #ffffff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--desk);
  -webkit-font-smoothing: antialiased;
}
body.dragging, body.dragging * { user-select: none; cursor: grabbing !important; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
select {
  font: inherit; color: var(--ink); background: none; border: 0; outline: none;
  border-bottom: 1px solid var(--line); padding: 2px 0; cursor: pointer;
}
select:hover { border-color: var(--ink-3); }
[contenteditable] { outline: none; }
[contenteditable]:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-3);
  pointer-events: none;
}

/* ---------- toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 30px;
  padding: 14px 40px;
  font-size: 12px; color: var(--ink-2);
  background: rgba(243, 242, 238, .86);
  backdrop-filter: blur(6px);
}
.group { display: flex; align-items: center; gap: 8px; }
.toolbar button { padding: 4px 8px; border-radius: 4px; }
.toolbar button:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.range { font-family: var(--mono); color: var(--ink); margin-left: 6px; letter-spacing: .02em; }
.hours { margin-left: 10px; }
.hours .dash { color: var(--ink-3); }
.spacer { flex: 1; }

.hint { font-size: 11px; color: var(--ink-3); margin-right: 8px; }
.sw {
  width: 17px; height: 17px; border-radius: 50%; padding: 0;
  background: var(--c);
  border: 1px solid rgba(0, 0, 0, .07);
}
.sw.hl-none { background: #fff; border: 1px dashed var(--ink-3); }
.sw:hover { transform: scale(1.12); }
.sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink-2); }

/* ---------- desk + book ---------- */
.scene { position: relative; padding: 20px 40px 260px; }

.book {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  width: min(1080px, 100%);
  /* sits a little left of centre so there is desk space for stationery on the right */
  margin: 0 auto 0 max(0px, calc(50% - 700px));
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 24px 50px -12px rgba(0, 0, 0, .16);
}
.book::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; background: rgba(0, 0, 0, .08);
}
.page {
  padding: 28px 30px 30px;
  min-height: 840px;
  display: flex; flex-direction: column; gap: 18px;
}
.page[data-side="left"]  { box-shadow: inset -26px 0 30px -30px rgba(0, 0, 0, .24); }
.page[data-side="right"] { box-shadow: inset  26px 0 30px -30px rgba(0, 0, 0, .24); }

.page-head {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
}
.day-num { font-size: 34px; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.page-head.today .day-num { background: linear-gradient(transparent 62%, var(--hl-yellow) 62%); }
.dow { font-size: 11px; letter-spacing: .18em; color: var(--ink-2); }
.month { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.page-title { margin-left: auto; min-width: 120px; text-align: right; font-size: 13px; }

.page-body { display: grid; grid-template-columns: 1fr 200px; gap: 22px; flex: 1; }

/* ---------- timeline ---------- */
.timeline { padding-left: 40px; padding-top: 8px; }
.grid { position: relative; border-left: 1px solid var(--line); touch-action: none; }
.hour { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.hour.half { border-top: 1px dotted #ececea; }
.hour-label {
  position: absolute; left: -40px; top: -7px; width: 34px; text-align: right;
  font: 10px/14px var(--mono); color: var(--ink-3);
}
.gap {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  font: 10px var(--mono); color: var(--ink-3); letter-spacing: .04em;
  background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(0, 0, 0, .035) 6px 7px);
  cursor: pointer;
}
.gap:hover { color: var(--ink-2); }
.blocks { position: absolute; inset: 0; }
.past-shade {
  position: absolute; left: -40px; right: 0; top: 0;
  background: rgba(243, 242, 238, .55);
  backdrop-filter: grayscale(1); -webkit-backdrop-filter: grayscale(1);
  pointer-events: none; z-index: 2;
}
.now {
  position: absolute; left: -6px; right: 0; height: 0;
  border-top: 1.5px solid #e0716f; z-index: 3; pointer-events: none;
}
.now::before {
  content: ''; position: absolute; left: -1px; top: -4px;
  width: 7px; height: 7px; border-radius: 50%; background: #e0716f;
}

.block {
  position: absolute;
  border-radius: 7px;
  padding: 4px 34px 4px 9px;
  background: var(--c);
  cursor: grab;
  font-size: 12px; line-height: 1.3;
  overflow: hidden;
  touch-action: none;
}
.block.hl-none { background: #fff; border: 1px dashed var(--ink-3); }
.block.ghost { opacity: .6; pointer-events: none; }
.block-time { font: 10px var(--mono); color: rgba(0, 0, 0, .38); margin-bottom: 1px; }
.block.compact { padding-top: 1px; padding-bottom: 1px; }
.block.compact .block-time { display: none; }
.block-title { white-space: pre-wrap; word-break: break-word; min-height: 1.3em; }
.block .del, .block .swatch-btn { position: absolute; top: 3px; opacity: 0; transition: opacity .12s; }
.block .del { right: 4px; }
.block .swatch-btn { right: 21px; top: 4px; }
.block:hover .del, .block:hover .swatch-btn { opacity: .75; }
.block-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }

.del {
  width: 14px; height: 14px; border-radius: 3px;
  font-size: 13px; line-height: 1; color: var(--ink-2);
  display: inline-grid; place-items: center;
}
.del:hover { background: rgba(0, 0, 0, .08); color: var(--ink); }
.swatch-btn {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .15);
  background: conic-gradient(var(--hl-yellow), var(--hl-pink), var(--hl-lilac), var(--hl-blue), var(--hl-mint), var(--hl-green), var(--hl-peach), var(--hl-yellow));
}

/* ---------- side column ---------- */
.side { display: flex; flex-direction: column; gap: 22px; border-left: 1px solid var(--line); padding-left: 18px; min-width: 0; }
.side h3 {
  margin: 0 0 8px; font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
}
.side h3 span { background: linear-gradient(transparent 50%, var(--hl-green) 50%); padding: 0 2px; }

.todos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.todo { display: flex; align-items: flex-start; gap: 8px; }
.check {
  width: 12px; height: 12px; margin-top: 4px; flex: none;
  border: 1px solid var(--ink-2); border-radius: 2px;
  font: 11px/10px var(--mono); color: var(--ink);
}
.todo-text {
  flex: 1; min-width: 0; padding: 1px 3px;
  background: linear-gradient(transparent 12%, var(--c) 12%, var(--c) 88%, transparent 88%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  word-break: break-word;
}
.todo.done .todo-text { color: var(--ink-3); text-decoration: line-through; }
.todo .del, .todo .swatch-btn { opacity: 0; margin-top: 3px; flex: none; }
.carried { margin: 2px -4px 0 -12px; font-size: 11px; color: var(--ink-3); flex: none; }
.todo:hover .del, .todo:hover .swatch-btn { opacity: .75; }
.add { align-self: flex-start; font-size: 11px; color: var(--ink-3); margin-top: 6px; padding: 2px 4px; border-radius: 3px; }
.add:hover { color: var(--ink); background: rgba(0, 0, 0, .04); }

.notes { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.done-text { min-height: 60px; }
.notes-text { flex: 1; min-height: 200px; }
.notes-text, .done-text {
  font-size: 12.5px; line-height: 20px;
  white-space: pre-wrap; word-break: break-word;
  background-image: repeating-linear-gradient(transparent 0 19px, var(--line) 19px 20px);
  background-attachment: local;
}


.minical { margin-top: auto; font-size: 10px; color: var(--ink-2); }
.mc-title { font-family: var(--mono); margin-bottom: 4px; letter-spacing: .06em; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.mc-h { color: var(--ink-3); }
.mc-d { padding: 2px 0; border-radius: 3px; font-family: var(--mono); }
.mc-d:hover { background: rgba(0, 0, 0, .05); }
.mc-d.on { background: var(--hl-yellow); }
.mc-d.today { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- habits ---------- */
.habits { margin-top: -6px; }
.habits-head { display: flex; align-items: baseline; gap: 12px; }
.habits-toggle { display: flex; align-items: baseline; gap: 6px; }
.habits-toggle h3 {
  margin: 0; font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
}
.habits-toggle h3 span { background: linear-gradient(transparent 50%, var(--hl-green) 50%); padding: 0 2px; }
.caret { font-size: 10px; color: var(--ink-3); }
.habits-summary { font-size: 11px; color: var(--ink-2); font-family: var(--mono); }
.habit-grid { display: grid; grid-template-columns: 1fr repeat(var(--cols), 22px) 18px; gap: 2px 4px; margin-top: 8px; align-items: center; }
.hday { text-align: center; font: 10px var(--mono); color: var(--ink-3); }
.hday.today { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.hrow { display: contents; }
.hname { font-size: 12px; padding: 1px 2px; min-width: 0; }
.hcell {
  width: 14px; height: 14px; margin: 0 auto;
  border: 1px solid var(--line); border-radius: 2px;
  font: 11px/12px var(--mono); color: var(--ink);
}
.hcell:hover { border-color: var(--ink-3); }
.hcell.on { border-color: var(--ink-2); }
.hcell.today { background: var(--hl-yellow); }
.hrow .del { opacity: 0; }
.hrow:hover .del { opacity: .7; }
.habits .add { margin-top: 4px; }

/* ---------- stationery on the desk ---------- */
.stationery { position: absolute; inset: 0; pointer-events: none; }
.sticky {
  position: absolute;
  width: 180px; min-height: 180px;
  padding: 22px 14px 14px;
  background: var(--c);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05), 0 12px 22px -8px rgba(0, 0, 0, .22);
  transform: rotate(var(--rot, -2deg));
  pointer-events: auto; cursor: grab;
  font-size: 13px; line-height: 1.5;
  touch-action: none;
}
.sticky.hl-none { background: #fff; }
.sticky::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 20px;
  background: rgba(0, 0, 0, .035);
}
.sticky-text { min-height: 130px; white-space: pre-wrap; word-break: break-word; }
.sticky .del, .sticky .swatch-btn { position: absolute; top: 4px; opacity: 0; }
.sticky .del { right: 6px; }
.sticky .swatch-btn { right: 26px; }
.sticky:hover .del, .sticky:hover .swatch-btn { opacity: .85; }

/* pen tray */
.tray {
  position: absolute; width: 224px; padding: 10px 12px 10px 10px;
  background: #e6e4df; border-radius: 10px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .10), 0 1px 1px rgba(0, 0, 0, .05), 0 10px 20px -8px rgba(0, 0, 0, .18);
  transform: rotate(var(--rot, 1deg));
  pointer-events: auto; cursor: grab; touch-action: none;
}
.pens { display: flex; flex-direction: column; gap: 4px; }
.pen, .eraser { display: flex; height: 8px; padding: 0; transition: transform .15s; }
.pen:hover, .eraser:hover { transform: translateX(6px); }
.pen.on, .eraser.on { transform: translateX(14px); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18)); }
.pen .cap  { width: 34px; background: var(--pc); border-radius: 4px 1px 1px 4px; }
.pen .body { flex: 1; background: #fff; border-top: 1px solid rgba(0, 0, 0, .05); border-bottom: 1px solid rgba(0, 0, 0, .10); }
.pen .tip  { width: 16px; background: var(--pc); border-radius: 1px 4px 4px 1px; }
.eraser {
  width: 46px; height: 9px; margin-top: 2px; border-radius: 2px;
  background: linear-gradient(#fff, #f1efea); border: 1px solid rgba(0, 0, 0, .12);
}

/* weekly index card */
.card {
  position: absolute; width: 224px; padding: 8px 10px 10px;
  background: #fffefb; border-radius: 3px;
  background-image: repeating-linear-gradient(transparent 0 17px, #e4ecf2 17px 18px);
  background-position: 0 30px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05), 0 10px 20px -8px rgba(0, 0, 0, .18);
  transform: rotate(var(--rot, -1deg));
  pointer-events: auto; cursor: grab; touch-action: none;
  font-size: 11px; line-height: 18px;
}
.card-title { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-2); border-bottom: 1px solid #f0b8bb; padding-bottom: 3px; margin-bottom: 4px; }
.card-row { display: flex; gap: 8px; width: 100%; height: 18px; text-align: left; padding: 0 2px; border-radius: 2px; overflow: hidden; }
.card-row:hover { background: rgba(0, 0, 0, .04); }
.card-row.on .card-day { background: var(--hl-yellow); }
.card-row.today .card-day { text-decoration: underline; text-underline-offset: 2px; }
.card-day { font-family: var(--mono); font-size: 10px; color: var(--ink-2); width: 30px; flex: none; }
.card-sum { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }

/* ---------- colour popover ---------- */
.popover {
  position: fixed; z-index: 20; display: none; gap: 6px;
  padding: 6px 8px; background: #fff; border-radius: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .14);
}
.popover.open { display: flex; }

/* Paper dividers stay beside the book as its ruling changes. */
.shelf { min-height: 100vh; padding: 80px max(28px, calc((100vw - 980px) / 2)) 90px; background: radial-gradient(ellipse at 50% 35%, #faf9f5, #efeee8 75%); }
.shelf-eyebrow { font: 10px var(--mono); letter-spacing: .16em; color: #838077; }
.shelf-heading h1 { margin: 18px 0 8px; font-weight: 300; font-size: clamp(28px, 4vw, 43px); letter-spacing: -.025em; }
.shelf-heading p { color: #8b887f; font-size: 13px; margin: 0; }
.book-stack { margin: 80px auto 0; width: 92%; padding-bottom: 25px; }
.stack-volume { position: relative; display: flex; align-items: center; gap: 24px; width: 100%; min-height: 125px; padding: 25px 35px 29px; text-align: left; border-radius: 12px 5px 6px 12px; color: #f8f5e9; box-shadow: inset 7px 0 8px -5px #ffffff60, inset 15px 0 0 -13px #0004, inset 0 1px #ffffff50, 0 9px 0 -3px #d2cbb8, 0 13px 0 -4px #f7f1e2, 0 18px 0 -6px #d0c6b1, 0 26px 25px -12px #312e2940; background-image: repeating-linear-gradient(0deg, #ffffff06 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, #00000005 0 1px, transparent 1px 3px); transition: transform .22s ease, box-shadow .22s ease; }
.stack-volume::before, .stack-volume::after { content: ''; position: absolute; left: 24px; right: 16px; height: 1px; background: #ffffff22; }
.stack-volume::before { top: 12px; }
.stack-volume::after { bottom: 15px; }
.volume-planner { background-color: #707a65; transform: rotate(-2deg); z-index: 3; }
.volume-ideas { background-color: #b87965; transform: translate(17px, 10px) rotate(.8deg); z-index: 2; }
.volume-reading { background-color: #637886; transform: translate(-9px, 19px) rotate(-.7deg); z-index: 1; }
.stack-volume:hover, .stack-volume:focus-visible { transform: translate(20px, -5px) rotate(0); z-index: 4; }
.volume-number { font: 10px var(--mono); opacity: .65; border-right: 1px solid #ffffff3b; padding: 15px 22px 15px 0; }
.volume-label { display: flex; flex-direction: column; gap: 7px; }
.volume-label strong { font-size: clamp(19px, 2.3vw, 29px); font-weight: 300; letter-spacing: .015em; }
.volume-label small { font-size: 10px; letter-spacing: .11em; opacity: .72; }
.volume-detail { margin-left: auto; font: 10px var(--mono); opacity: .72; }
.volume-open { opacity: .5; font-size: 18px; }
.shelf-footnote { text-align: center; margin: 65px 0 0; color: #98948a; font-size: 11px; letter-spacing: .03em; }
.tracker-book { display: block; width: min(1180px, 100%); }
.tracker-book::before { display: none; }
.tracker-sheet { min-height: 740px; padding: 35px 40px 45px; background: linear-gradient(90deg, #eeede84d, transparent 22px); border-left: 5px solid #b87965; }
.tracker-sheet.reading-sheet { border-color: #637886; }
.tracker-tabs { display: flex; gap: 20px; margin-bottom: 32px; }
.tracker-tabs button { color: var(--ink-3); padding-bottom: 6px; font-size: 12px; }
.tracker-tabs button[aria-pressed="true"] { color: var(--ink); border-bottom: 1px solid var(--ink); }
.tracker-sheet .sheet-heading h1 { font-size: 34px; margin-top: 8px; }
.tracker-controls { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 22px; }
.tracker-add { padding: 6px 0; color: #7e695a; font-size: 12px; }
.archive-toggle { color: var(--ink-3); font-size: 11px; }
.ledger-head, .ledger-row { display: grid; grid-template-columns: minmax(160px, 1.4fr) 118px 130px minmax(160px, 1.6fr) 22px; gap: 20px; }
.ledger-head { padding: 10px 0; border-top: 1px solid #b6b2a7; border-bottom: 1px solid #b6b2a7; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.ledger-row { min-height: 104px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.entry-title { font-size: 15px; min-height: 22px; overflow-wrap: anywhere; }
.entry-detail { font-size: 11px; color: var(--ink-2); min-height: 18px; margin-top: 5px; overflow-wrap: anywhere; }
.entry-status { width: 100%; font-size: 11px; margin-top: 2px; }
.entry-date { width: 100%; font: 10px var(--mono); color: var(--ink-2); border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 4px 0; }
.entry-notes { font-size: 12px; white-space: pre-wrap; line-height: 20px; min-height: 60px; background: repeating-linear-gradient(transparent 0 19px, #eeeee8 19px 20px); overflow-wrap: anywhere; }
.archive-entry { color: var(--ink-3); padding-top: 3px; }
.tracker-empty { padding: 54px 0 250px; background: repeating-linear-gradient(transparent 0 39px, #eeeee8 39px 40px); }
.tracker-empty > span { font-size: 22px; font-weight: 300; color: #9a9588; }
.tracker-empty p { font-size: 12px; color: #aaa69b; max-width: 360px; }
@media (prefers-reduced-motion: reduce) { .stack-volume { transition: none; } }
@media (max-width: 700px) {
  .shelf { padding-top: 45px; }
  .book-stack { width: 94%; margin-top: 55px; }
  .stack-volume { gap: 13px; padding-left: 22px; padding-right: 20px; }
  .volume-number { padding-right: 12px; }
  .volume-detail, .volume-open { display: none; }
  .tracker-sheet { padding: 25px 22px; }
  .ledger-head { display: none; }
  .ledger-row { grid-template-columns: 1fr 1fr 22px; gap: 14px; }
  .entry-identity { grid-column: 1 / 3; }
  .entry-status { grid-column: 1; grid-row: 2; }
  .entry-date { grid-column: 2; grid-row: 2; }
  .entry-notes { grid-column: 1 / 3; }
  .archive-entry { grid-column: 3; grid-row: 1; }
}
.book-tabs { display: flex; gap: 3px; margin: 0 0 0 max(0px, calc(50% - 620px)); padding-left: 26px; }
.book-tabs button { padding: 9px 23px 8px; border: 1px solid #deded7; border-bottom: 0; border-radius: 5px 5px 0 0; background: #e9e8e1; color: var(--ink-2); font-size: 11px; letter-spacing: .08em; }
.book-tabs button[aria-pressed="true"] { background: var(--paper); color: var(--ink); position: relative; z-index: 1; border-color: transparent; }
button:focus-visible, [contenteditable]:focus-visible { outline: 1px solid #89877f; outline-offset: 3px; }
.week-book, .month-book { display: block; width: min(1320px, 100%); }
.wide-sheet { padding: 28px 28px 30px; }
.sheet-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 17px; }
.sheet-heading h1 { margin: 0; font-size: 24px; font-weight: 300; letter-spacing: .04em; }
.sheet-heading > span { color: var(--ink-3); font-size: 11px; }
.wide-sheet h3 { margin: 0 0 8px; font-size: 10px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.week-book::before { left: calc(28px + (100% - 56px) * 3 / 7); top: 80px; bottom: 30px; pointer-events: none; }
.week-columns { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.week-day { min-width: 0; display: flex; flex-direction: column; padding: 0 12px; border-left: 1px solid var(--line); }
.week-day:first-child { border-left: 0; padding-left: 0; }
.week-day:last-child { padding-right: 0; }
.week-day-head { min-height: 82px; padding-bottom: 10px; }
.date-heading { display: flex; align-items: baseline; gap: 7px; text-align: left; }
.date-heading > span { font-size: 9px; letter-spacing: .1em; color: var(--ink-2); }
.date-heading strong { font-size: 27px; font-weight: 300; }
.date-heading.today strong { background: linear-gradient(transparent 62%, var(--hl-yellow) 62%); }
.date-heading:hover strong { color: var(--ink-2); }
.week-title { min-height: 20px; font-size: 11px; padding-top: 5px; overflow-wrap: anywhere; }
.week-day .timeline { padding-left: 29px; }
.week-day .hour-label { left: -30px; width: 25px; font-size: 8px; }
.week-day .block { font-size: 10px; padding: 2px 4px; border-radius: 3px; }
.week-day .block-time { display: none; }
.week-day .block:hover { z-index: 3; min-height: 34px; padding-right: 4px; }
.week-day .block:hover .block-title { padding-top: 14px; }
.week-day .gap { font-size: 7px; letter-spacing: 0; overflow: hidden; }
.week-todos { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); min-height: 108px; }
.week-day .todo { position: relative; gap: 4px; font-size: 11px; }
.week-day .todo .swatch-btn, .week-day .todo .del { position: absolute; top: 0; background-color: var(--paper); }
.week-day .todo .del { right: 0; }
.week-day .todo .swatch-btn { right: 17px; }
.week-day .todo:hover .todo-text, .week-day .todo:focus-within .todo-text { padding-right: 30px; }
.week-day .todo:focus-within .del, .week-day .todo:focus-within .swatch-btn { opacity: .75; }
.week-notes { margin-top: 10px; }
.week-notes .notes-text { min-height: 220px; font-size: 12px; }
.month-book::before { left: calc(28px + (100% - 56px) / 2); top: 80px; bottom: 30px; pointer-events: none; }
.month-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 1fr); min-height: 710px; }
.month-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: 29px repeat(var(--weeks), minmax(0, 1fr)); border-top: 1px solid #c9c9c1; border-left: 1px solid #c9c9c1; }
.month-weekday { text-align: center; font-size: 10px; letter-spacing: .08em; padding: 7px 0; border-right: 1px solid #c9c9c1; border-bottom: 1px solid #c9c9c1; }
.month-cell { min-width: 0; min-height: 115px; border-right: 1px solid #c9c9c1; border-bottom: 1px solid #c9c9c1; background-image: linear-gradient(#eeeee84d 1px, transparent 1px), linear-gradient(90deg, #eeeee84d 1px, transparent 1px); background-size: 12px 12px; }
.month-cell .date-heading { width: 100%; padding: 1px 6px; height: 24px; }
.month-cell .date-heading > span { display: none; }
.month-cell .date-heading strong { font-size: 12px; font-weight: 400; }
.month-cell.weekend .date-heading, .month-weekday.weekend { background: #f3efeb; }
.month-cell.outside { color: var(--ink-3); background-color: #fafaf8; }
.month-entries { max-height: 110px; overflow-y: auto; padding: 2px 4px 6px; scrollbar-width: thin; }
.month-focus { font-size: 11px; font-weight: 500; margin-bottom: 3px; overflow-wrap: anywhere; }
.month-block, .month-todo, .month-day-note { display: block; width: 100%; text-align: left; font-size: 10px; line-height: 1.4; padding: 2px 3px; margin-bottom: 2px; border-radius: 2px; background: var(--c, transparent); overflow-wrap: anywhere; }
.month-block span { font: 8px var(--mono); color: var(--ink-2); display: block; }
.month-todo.done { color: var(--ink-3); text-decoration: line-through; }
.month-day-note { white-space: pre-wrap; color: var(--ink-2); }
.month-notes { padding-left: 16px; min-width: 0; }
.month-notes h3 { height: 29px; padding-top: 7px; margin: 0; }
.month-notes .notes-text { min-height: 0; font-size: 11px; }
.toolbar { flex-wrap: wrap; gap: 14px 24px; }

@media (max-width: 1100px) {
  .scene { padding-left: 20px; padding-right: 20px; }
  .wide-sheet { padding-left: 18px; padding-right: 18px; }
  .week-day { padding-left: 7px; padding-right: 7px; }
}

@media (max-width: 900px) {
  .book { grid-template-columns: 1fr; }
  .book::before { display: none; }
  .page { min-height: 0; box-shadow: none; }
  .toolbar { flex-wrap: wrap; gap: 14px; }
  .week-book, .month-book { min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
  .week-sheet { min-width: 1260px; }
  .month-sheet { min-width: 1120px; }
  .book-tabs { margin-left: 0; }
}

.mobile-sheet-hint { display: none; }
.open-journal { display: block; margin-top: 9px; font-size: 11px; color: #637886; min-height: 32px; }
.journal-nav { grid-column: 1 / -1; display: flex; gap: 20px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--desk); }
.journal-nav button { min-height: 36px; font-size: 12px; color: var(--ink-2); }
.journal-nav button:first-child { margin-right: auto; }
.journal-nav button:disabled { opacity: .3; cursor: default; }
.journal-book::before { top: 60px; pointer-events: none; }
.journal-book .page { min-width: 0; gap: 25px; min-height: 840px; }
.journal-title-row { display: flex; align-items: start; gap: 12px; }
.journal-writing { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 150px; line-height: 24px; background: repeating-linear-gradient(transparent 0 23px, var(--line) 23px 24px); }
.journal-writing.journal-title { flex: 1; font-size: 28px; line-height: 1.2; font-weight: 300; min-height: 36px; background: none; }
.journal-writing.journal-author { font-size: 14px; min-height: 28px; background: none; color: var(--ink-2); }
.journal-like { min-width: 40px; min-height: 40px; font-size: 25px; color: #a5716b; }
.journal-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; margin: 12px 0; color: var(--ink-2); font-size: 10px; }
.journal-meta label { display: flex; flex-direction: column; gap: 4px; }
.journal-meta input { min-width: 0; width: 126px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink-2); font: 11px var(--mono); padding: 4px 0; }
.journal-verdicts, .journal-verdicts > div { display: flex; align-items: center; gap: 6px; }
.journal-verdicts { gap: 16px; font-size: 11px; }
.journal-verdicts button { padding: 5px 3px; color: var(--ink-3); }
.journal-verdicts button[aria-pressed="true"] { color: var(--ink); background: linear-gradient(transparent 55%, var(--hl-yellow) 55%); }
.journal-section h3 { font-size: 10px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; color: var(--ink-2); }
.first-impressions .journal-writing { min-height: 72px; }
.final-thoughts .journal-writing { min-height: 168px; }
.long-notes { flex: 1; display: flex; flex-direction: column; }
.long-notes .journal-writing { flex: 1; min-height: 480px; }
@media (max-width: 600px) {
  .journal-book .page { min-height: 0; }
  .journal-nav { padding: 8px 12px; gap: 12px; }
  .journal-nav button { font-size: 11px; }
  .journal-writing, .journal-meta select, .journal-meta input { font-size: 16px; }
  .journal-meta input { width: 138px; }
  .journal-verdicts { gap: 8px; font-size: 10px; }
  .journal-verdicts > div { gap: 3px; }
  .journal-verdicts button { min-height: 40px; min-width: 25px; }
}
@media (max-width: 900px) {
  .mobile-sheet-hint { display: block; margin: 0; padding: 10px 6px; color: var(--ink-2); font-size: 12px; }
}
@media (max-width: 600px) {
  .toolbar { position: relative; padding: 8px 12px; gap: 4px 12px; }
  .toolbar > .group { flex-wrap: wrap; }
  .toolbar .range { flex-basis: 100%; margin-left: 8px; font-size: 12px; }
  .toolbar button { min-height: 40px; min-width: 40px; }
  .toolbar .palette { gap: 6px; }
  .toolbar .sw { min-width: 26px; min-height: 26px; width: 26px; height: 26px; padding: 0; }
  .toolbar .spacer { display: none; }
  .toolbar .hours { margin-left: 0; }
  select, input, [contenteditable] { font-size: 16px; }
  .toolbar select { min-height: 40px; }
  .scene { padding: 12px 10px 240px; }
  .book { margin-left: 0; }
  .book-tabs { padding-left: 8px; }
  .book-tabs button { min-height: 44px; padding: 10px 22px; font-size: 13px; }
  .page { padding: 22px 18px; gap: 22px; }
  .page + .page { border-top: 1px solid var(--line); }
  .page-head { flex-wrap: wrap; }
  .page-title { min-width: 0; flex-basis: 100%; text-align: left; }
  .page-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .side { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
  .notes-text, .week-notes .notes-text, .month-notes .notes-text { font-size: 16px; line-height: 24px; background-image: repeating-linear-gradient(transparent 0 23px, var(--line) 23px 24px); }
  .minical { max-width: 340px; }
  .mc-d { min-height: 36px; }
  .todo { gap: 8px; }
  .check { width: 24px; height: 24px; font-size: 18px; }
  .todo-text { font-size: 16px; min-height: 32px; }
  .add { min-height: 40px; font-size: 14px; }
  .todo .del, .todo .swatch-btn, .sticky .del, .sticky .swatch-btn { opacity: .75; width: 24px; height: 24px; }
  .sticky .swatch-btn { right: 38px; }
  .sticky { padding-top: 34px; }
  .week-day { padding-left: 12px; padding-right: 12px; }
  .week-day .todo { font-size: 16px; }
  .week-day .todo .swatch-btn, .week-day .todo .del { position: static; }
  .week-day .todo .todo-text { padding-right: 0; }
  .week-title { font-size: 16px; }
  .date-heading { min-height: 40px; }
  .month-cell .date-heading { height: 40px; }
  .month-block, .month-todo, .month-day-note { min-height: 32px; font-size: 12px; }
  .shelf { padding: 38px 20px 60px; overflow-x: clip; }
  .book-stack { width: calc(100% - 20px); margin-top: 44px; }
  .volume-label { min-width: 0; }
  .volume-label strong { font-size: 20px; }
  .volume-label small { font-size: 10px; letter-spacing: .03em; }
  .stack-volume { min-height: 125px; }
  .stack-volume:hover, .stack-volume:focus-visible { transform: translateY(-3px); }
  .volume-ideas { transform: translate(7px, 10px) rotate(.8deg); }
  .volume-reading { transform: translate(-5px, 19px) rotate(-.7deg); }
  .tracker-sheet { padding: 22px 18px; }
  .tracker-sheet .sheet-heading { flex-wrap: wrap; gap: 8px; }
  .tracker-sheet .sheet-heading h1 { font-size: 28px; }
  .ledger-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px; gap: 10px; }
  .entry-status, .entry-date, .entry-title, .entry-detail, .entry-notes { min-width: 0; font-size: 16px; }
  .entry-status, .entry-date { min-height: 44px; }
  .entry-notes { line-height: 24px; background-size: auto 24px; }
  .tracker-tabs button, .tracker-add, .archive-toggle, .archive-entry { min-height: 44px; }
  .tracker-tabs { margin-bottom: 20px; }
  .tracker-empty { padding-bottom: 120px; }
}
@media (pointer: coarse) {
  .grid, .block, .sticky { touch-action: pan-x pan-y; }
  .block-resize { display: none; }
  .block .del, .block .swatch-btn { opacity: .75; }
}

/* The paper owns the viewport; controls occupy a narrow bottom rail. */
body { display: flex; flex-direction: column; }
.shelf { order: 0; height: 100dvh; min-height: 0; padding: 5vh 7vw; display: grid; place-items: center; overflow: hidden; }
.book-stack { width: min(780px, 88vw); margin: 0; padding: 0 0 25px; }
.stack-volume { min-height: 0; height: clamp(54px, 10dvh, 80px); padding: 0 32px; }
.stack-volume .volume-label strong { font-size: clamp(17px, 2vw, 24px); }
.scene { order: 1; padding: 12px 20px 68px; }
.toolbar { order: 2; position: fixed; bottom: 0; top: auto; left: 0; right: 0; min-height: 48px; padding: 4px 16px; gap: 6px 12px; z-index: 30; }
.toolbar > .group { display: none; }
.toolbar > .group:first-of-type { display: flex; }
.toolbar .hint { display: none; }
.toolbar .spacer { display: none; }
.tools-open .toolbar > .group { display: flex; }
.tools-open .toolbar { box-shadow: 0 -8px 25px #0001; }
.toolbar button { min-height: 36px; min-width: 36px; }
.toolbar .range { font-size: 11px; }
#toggleTools { font-size: 24px; }
body[data-surface="tracker"] #toggleTools { display: none; }
.book { margin: 0 auto; width: min(1180px, 100%); }
.book-tabs { margin: 0 auto; max-width: 1180px; padding-left: 12px; }
.book-tabs button { min-height: 30px; padding: 6px 18px; }
.book .page { min-height: 0; padding: 20px; gap: 12px; }
.day-book, .week-book, .month-book { height: calc(100dvh - 120px); }
.day-book .page { min-width: 0; overflow: auto; }
.page-body { grid-template-columns: minmax(0, 1fr) minmax(140px, .8fr); gap: 16px; min-height: 0; }
.page-head { flex-wrap: nowrap; }
.page-title { min-width: 0; }
.day-num { font-size: 27px; }
.notes-text { min-height: 90px; }
.week-sheet, .month-sheet { min-width: 0; height: 100%; padding: 16px 20px; display: flex; flex-direction: column; }
.sheet-heading { padding-bottom: 10px; }
.sheet-heading h1 { font-size: 20px; }
.week-columns { min-height: 0; flex: 1; }
.week-day { min-height: 0; overflow-y: auto; }
.week-day-head { min-height: 60px; }
.week-todos { min-height: 64px; margin-top: 10px; }
.week-notes .notes-text { min-height: 100px; }
.month-body { min-height: 0; flex: 1; }
.month-calendar { min-height: 0; }
.month-cell { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.month-entries { min-height: 0; max-height: none; overflow: auto; }
.month-notes { overflow: auto; }
.stationery { display: none; }
.tools-open .stationery { display: block; }
.tracker-sheet { min-height: calc(100dvh - 90px); }
.journal-book { min-height: calc(100dvh - 90px); }
.journal-book .page { min-height: 0; }
.journal-writing { min-height: 100px; }
.first-impressions .journal-writing { min-height: 60px; }
.final-thoughts .journal-writing { min-height: 120px; }
.long-notes .journal-writing { min-height: 300px; }
.paper-segments { display: flex; gap: 3px; flex-shrink: 0; }
.paper-segments button { flex: 1; min-height: 34px; font-size: 11px; color: var(--ink-2); }
.paper-segments button[aria-pressed="true"] { background: var(--hl-grey); color: var(--ink); }
.section-segments { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
@media (min-width: 701px) and (max-width: 900px) {
  .day-book, .journal-book { display: grid; grid-template-columns: 1fr 1fr; }
  .page-body { grid-template-columns: 1fr; overflow: auto; }
}

/* Page/spread is independent of the calendar period. */
body { --paper-width: 1180px; --rail-width: clamp(100px, 20vw, 232px); }
body[data-paper="page"] { --paper-width: 680px; }
/* A little unruled paper below the month grid, without another writing section. */
@media (min-width: 701px) {
  .month-sheet { padding-bottom: 40px; }
}
.book-navigation { display: flex; align-items: center; justify-content: space-between; width: min(var(--paper-width), 100%); margin: 0 auto; gap: 6px; min-height: 32px; }
.book-navigation .book-tabs { margin: 0; padding-left: 0; }
.paper-controls { display: flex; gap: 2px; align-items: center; flex-shrink: 0; }
.paper-controls button { font-size: 11px; min-height: 30px; padding: 3px 7px; color: var(--ink-2); }
.paper-controls button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -1px var(--ink-2); }
#toggleMargin { margin-left: 6px; }
.book { width: min(var(--paper-width), 100%); }
body[data-paper="page"] .book::before { display: none; }
body[data-paper="page"] .day-book { display: block; }
body[data-paper="page"] .day-book .page { height: 100%; box-shadow: none; }
body[data-paper="page"] .journal-book { display: flex; flex-direction: column; }
body[data-paper="page"] .journal-book[data-part="0"] .journal-right,
body[data-paper="page"] .journal-book[data-part="1"] .journal-left { display: none; }
body[data-paper="page"] .journal-book .page { box-shadow: none; }
body[data-paper="page"] .month-body { display: block; }
body[data-paper="page"] .month-calendar { height: 100%; }
body[data-paper="page"] .month-notes { height: 100%; padding-left: 0; }
body[data-paper="page"] .month-book[data-part="0"] .month-notes,
body[data-paper="page"] .month-book[data-part="1"] .month-calendar { display: none; }
.scene .stationery { display: none; overflow: clip; }
.margin-open .scene { padding-right: calc(20px + var(--rail-width)); padding-left: 28px; }
.margin-open .scene .stationery { display: block; }
.margin-open .stationery > [data-docked="true"] { width: min(224px, calc(var(--rail-width) - 24px)); }
.margin-open .stationery .sticky[data-docked="true"] { width: min(180px, calc(var(--rail-width) - 24px)); }
.stationery > [data-docked="false"] { z-index: 4; }
.week-sheet .week-columns { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-left: 34px; overflow: visible; }
.week-sheet .week-day { display: grid; grid-template-rows: 62px auto 60px minmax(0, 1fr); min-width: 0; padding: 0; border-left: 1px solid var(--line); overflow: visible; }
.week-sheet .week-day:first-child { border-left: 0; }
.week-sheet .week-day-head { height: 62px; min-height: 0; display: block; padding: 0 3px 4px; overflow: hidden; }
.week-sheet .date-heading { display: flex; gap: 4px; align-items: baseline; min-height: 30px; }
.week-sheet .date-heading > span { font-size: 9px; letter-spacing: .02em; }
.week-sheet .date-heading strong { font-size: 22px; }
.week-sheet .week-title { font-size: 10px; min-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-top: 0; }
.week-sheet .timeline { padding: 4px 0 14px; margin: 0; display: block; }
.week-sheet .grid { border-left: 0; }
.week-sheet .hour-label { left: -35px; width: 29px; white-space: nowrap; font-size: 9px; }
.week-sheet .week-todos { display: block; margin: 0; padding: 5px 3px; min-height: 0; overflow: auto; }
.week-sheet .week-notes { display: flex; margin: 0; padding: 5px 3px 0; min-height: 0; overflow: auto; }
.week-sheet .week-notes .notes-text { min-height: 0; font-size: 11px; line-height: 20px; background-image: repeating-linear-gradient(transparent 0 19px, var(--line) 19px 20px); }
.week-sheet h3 { font-size: 8px; margin: 0 0 3px; letter-spacing: .05em; }
.week-sheet .todo { font-size: 10px; gap: 3px; }
.week-sheet .todo-text { font-size: 10px; min-height: 15px; padding: 0; }
.week-sheet .check { width: 11px; height: 11px; font-size: 10px; margin-top: 2px; }
.week-sheet .todo .del, .week-sheet .todo .swatch-btn { display: none; }
.week-sheet .add { min-height: 18px; font-size: 9px; margin-top: 0; }
.week-sheet .block { border-radius: 3px; padding: 1px 2px; font-size: 10px; }
.week-sheet .block-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 !important; }
.week-sheet .block:hover { min-height: 0; padding: 1px 2px; }
.week-sheet .block .del, .week-sheet .block .swatch-btn { display: none; }
.block-editor { border: 1px solid var(--line); border-radius: 6px; padding: 24px; width: min(380px, calc(100vw - 32px)); color: var(--ink); box-shadow: 0 12px 40px #0003; }
.block-editor::backdrop { background: #3334; }
.block-editor form { display: grid; gap: 16px; }
.block-editor h3 { margin: 0; font-size: 12px; color: var(--ink-2); font-weight: 400; }
.block-editor input { width: 100%; font: 16px var(--font); border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; }
.block-editor select { font-size: 16px; min-height: 38px; }
.block-editor-times, .block-editor-actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.block-editor-actions button { min-height: 38px; padding: 4px 8px; }
.block-editor [role="alert"] { margin: 0; color: #9a554d; font-size: 12px; }
@media (max-width: 700px) {
  .book-navigation { gap: 0; }
  .book-navigation .book-tabs button { min-height: 30px; padding: 5px 8px; font-size: 11px; }
  .paper-controls button { font-size: 10px; padding: 3px 5px; }
  #toggleMargin, #addSticky, .margin-open .scene .stationery { display: none; }
  .margin-open .scene { padding-right: 8px; padding-left: 8px; }
  .week-sheet { padding: 10px 5px 12px; }
  .week-sheet .week-columns { padding-left: 29px; }
  .week-sheet .week-day { grid-template-rows: 48px auto 50px minmax(0, 1fr); }
  .week-sheet .week-day-head { height: 48px; padding-left: 2px; padding-right: 1px; }
  .week-sheet .date-heading { flex-direction: column; gap: 0; align-items: flex-start; line-height: 1.1; min-height: 30px; }
  .week-sheet .date-heading strong { font-size: 17px; }
  .week-sheet .date-heading > span { font-size: 8px; }
  .week-sheet .hour-label { left: -29px; width: 25px; font-size: 8px; }
  .week-sheet .week-title { font-size: 8px; }
  .week-sheet .week-notes .notes-text { font-size: 10px; }
  body[data-paper="spread"] .day-book { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr); }
  body[data-paper="spread"] .day-book .page[data-side="right"] { display: flex; }
  body[data-paper="spread"] .day-book .page { padding: 8px; }
  body[data-paper="spread"] .day-book .page-head { flex-wrap: wrap; }
  body[data-paper="spread"] .day-book .page-title { flex-basis: 100%; }
}
@media (max-width: 700px) {
  .scene { padding: 8px 8px 58px; }
  .toolbar { padding: 3px 8px; flex-wrap: nowrap; gap: 3px; }
  .toolbar > .group:first-of-type { flex: 1; gap: 1px; flex-wrap: nowrap; justify-content: space-between; }
  .toolbar .range { flex-basis: auto; margin: 0; font-size: 9px; }
  .toolbar button { min-width: 30px; }
  .tools-open .toolbar { flex-wrap: wrap; }
  .tools-open .toolbar > .group:first-of-type { flex-basis: 70%; }
  .day-book, .week-book, .month-book { height: calc(100dvh - 100px); min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
  .day-book .page[data-side="right"] { display: none; }
  .day-book .page[data-side="left"] { flex: 1; min-height: 0; padding: 14px; }
  .page-head { gap: 8px; flex-wrap: nowrap; }
  .page-title { flex-basis: auto; font-size: 14px; }
  .page-body { display: block; min-height: 0; }
  .side { padding-top: 0; border: 0; gap: 12px; }
  .day-book[data-part="0"] .side, .day-book[data-part="1"] .timeline { display: none; }
  .week-sheet, .month-sheet { min-width: 0; flex: 1; min-height: 0; }
  .month-sheet { padding: 12px; }
  .month-body { display: block; }
  .month-calendar { height: 100%; }
  .month-notes { height: 100%; padding: 0; }
  .month-book[data-part="0"] .month-notes, .month-book[data-part="1"] .month-calendar { display: none; }
  .month-weekday { font-size: 8px; letter-spacing: 0; }
  .month-cell .date-heading { min-height: 27px; height: 27px; padding: 2px 4px; }
  .month-block, .month-todo, .month-day-note { font-size: 9px; min-height: 24px; padding: 1px; }
  .month-block span { font-size: 7px; }
  .journal-book { display: flex; flex-direction: column; min-height: calc(100dvh - 72px); }
  .journal-nav { order: 3; padding: 4px 8px; }
  .journal-book[data-part="0"] .journal-right, .journal-book[data-part="1"] .journal-left { display: none; }
  .journal-book .page { padding: 14px; }
  .journal-meta { gap: 6px 10px; margin: 6px 0; }
  .journal-meta input { width: 123px; font-size: 13px; }
  .journal-meta select { font-size: 13px; }
  .journal-writing.journal-title { font-size: 24px; }
  .journal-section h3 { margin-bottom: 4px; }
  .journal-section .journal-writing { min-height: 96px; }
  .first-impressions .journal-writing { min-height: 48px; }
  .journal-verdicts button { min-height: 30px; }
  .tracker-sheet { padding: 14px; min-height: calc(100dvh - 76px); }
  .tracker-tabs { margin-bottom: 10px; }
  .tracker-empty { padding-bottom: 40px; }
}
