/* SoloPad owner + public UI. One visual language everywhere — the reader's:
   warm cream ground, serif body, monospace micro-labels, terracotta accent,
   a fixed minimal top bar instead of a masthead. Fonts are self-hosted
   (latin subsets) — no third-party requests. */

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/source-serif-4.woff2) format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/source-serif-4-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-400.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/plex-mono-500.woff2) format('woff2');
}

:root {
  --bg: #FAF9F5;
  --ink: #2B2620;
  --soft: #6B6257;
  --faint: #A29A8C;
  --hairline: rgba(43, 38, 32, 0.10);
  --accent: #C15F3C;
  --accent-hover: #9A4A2E;
  --on-accent: #FAF9F5;
  --tint-0-bg: #F0E0D6; --tint-0-ink: #A0522D;
  --tint-1-bg: #E3E8DA; --tint-1-ink: #5C7247;
  --tint-2-bg: #EAE4D2; --tint-2-ink: #8A7530;
  --tint-3-bg: #EFDEE2; --tint-3-ink: #96566B;
  --tint-4-bg: #DCE6E8; --tint-4-ink: #4A7480;
  --serif: 'Source Serif 4', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F1D1A;
    --ink: #EDE9E1;
    --soft: #B5AEA2;
    --faint: #847C6F;
    --hairline: rgba(237, 233, 225, 0.12);
    --accent-hover: #D07A56;
    --on-accent: #1F1D1A;
    --tint-0-bg: #3A2F28; --tint-0-ink: #C15F3C;
    --tint-1-bg: #2E332B; --tint-1-ink: #9DB08A;
    --tint-2-bg: #33302A; --tint-2-ink: #B0A277;
    --tint-3-bg: #382E31; --tint-3-ink: #B08A98;
    --tint-4-bg: #2C3234; --tint-4-ink: #8AA6B0;
  }
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0 auto;
  max-width: 640px;
  padding: 96px 32px 120px 32px; /* top clears the fixed .reader-top bar */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  transition: background 0.4s ease, color 0.4s ease;
}

::selection { background: rgba(193, 95, 60, 0.18); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.muted { color: var(--faint); }
.error { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.04em; }
img.emoji { height: 1.2em; width: auto; vertical-align: -0.2em; }

/* ---- Marks: section titles and day markers, in the reader's dot-mark voice ---- */

.pagemark, .daymark {
  margin: 0;
  padding: 64px 0 0 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.pagemark::before, .daymark::before { content: '· '; }
.pagemark::after, .daymark::after { content: ' ·'; }
.feed .daymark { padding-top: 48px; }
.section-hint { margin: 16px 0 0 0; font-size: 15px; color: var(--soft); font-style: italic; }

/* ---- Compose shared bits (reader composer, thread reply) ---- */

.compose-main { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.compose-foot { display: flex; align-items: center; justify-content: space-between; }
.counter { font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ---- Buttons ---- */

.btn {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover { background: var(--accent); color: var(--on-accent); }
.btn.small { padding: 6px 16px; }
.textbtn {
  border: none; background: none; padding: 0; cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--faint); transition: color 0.15s ease;
}
.textbtn:hover { color: var(--accent); }

/* ---- Avatars ---- */

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-40 { width: 40px; height: 40px; font-size: 15px; }
.avatar-34 { width: 34px; height: 34px; font-size: 13px; }
.avatar-64 { width: 64px; height: 64px; font-size: 24px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.tint-own { background: var(--accent); color: var(--on-accent); }
.tint-0 { background: var(--tint-0-bg); color: var(--tint-0-ink); }
.tint-1 { background: var(--tint-1-bg); color: var(--tint-1-ink); }
.tint-2 { background: var(--tint-2-bg); color: var(--tint-2-ink); }
.tint-3 { background: var(--tint-3-bg); color: var(--tint-3-ink); }
.tint-4 { background: var(--tint-4-bg); color: var(--tint-4-ink); }

/* ---- Identity block (shared by slides, post rows, people rows) ---- */

.slide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.slide-follow { margin-left: auto; flex-shrink: 0; }
.slide-id { display: flex; flex-direction: column; gap: 3px; font-family: var(--mono); font-size: 12px; min-width: 0; }
.slide-name, .slide-name a { color: var(--accent); }
.slide-name a:hover { color: var(--accent-hover); }
.slide-ago { color: var(--faint); }
.slide-handle { color: var(--faint); overflow-wrap: anywhere; }
.slide-handle a { color: inherit; }
.slide-handle a:hover { color: var(--accent); }

/* ---- Post body (shared by slides and post rows) ---- */

.slide-text {
  font-size: 20px; line-height: 1.55; letter-spacing: -0.005em;
  text-wrap: pretty; overflow-wrap: break-word;
}
.slide-text > :first-child { margin-top: 0; }
.slide-text > :last-child { margin-bottom: 0; }
.slide-text p { margin: 0 0 14px; }
.slide-text blockquote {
  margin: 20px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--accent);
  font-size: 16px;
  line-height: 1.6;
  color: var(--soft);
  font-style: italic;
  max-width: 50ch;
}
.slide-boost { margin: 0 0 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--faint); }

.slide-cw > summary {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); cursor: pointer; margin-bottom: 14px;
}

/* ---- Media (shared) ---- */

.post-media img { max-width: 100%; display: block; }
.post-media video { max-width: 100%; display: block; }
.post-media.is-processing { position: relative; opacity: 0.7; }
.post-media.is-processing figcaption { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 4px; }
.placeholder {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.slide-media { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
.slide-media.is-multi { grid-template-columns: 1fr 1fr; }
.slide-media .post-media { margin: 0; border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden; }
.slide-media .post-media img, .slide-media .post-media video { width: 100%; max-height: 44vh; object-fit: contain; background: rgba(43, 38, 32, 0.04); }
.slide-media.is-multi .post-media { aspect-ratio: 4 / 3; }
.slide-media.is-multi .post-media img, .slide-media.is-multi .post-media video { height: 100%; object-fit: cover; }
/* A pair keeps natural proportions — a portrait extends down; only 3–4 crop to the uniform grid. */
.slide-media.is-pair { align-items: start; }
.slide-media.is-pair .post-media { aspect-ratio: auto; }
.slide-media.is-pair .post-media img, .slide-media.is-pair .post-media video { height: auto; object-fit: contain; }

/* ---- Preview cards (shared) ---- */

.slide-card {
  margin-top: 18px; display: grid; grid-template-columns: 1fr;
  border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden;
  color: inherit; background: rgba(43, 38, 32, 0.02);
}
.slide-card:hover { color: inherit; }
.slide-card.has-image { grid-template-columns: 130px 1fr; }
.slide-card img { width: 130px; height: 100%; min-height: 96px; object-fit: cover; }
.slide-card-text { padding: 13px 18px; display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; }
.slide-card-host { font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; color: var(--faint); text-transform: uppercase; }
.slide-card-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.slide-card-desc { font-size: 13px; line-height: 1.45; color: var(--soft); }

/* ---- Post rows (profile, note, thread, interaction lists) ---- */

.post { padding: 48px 0; border-bottom: 1px solid var(--hairline); }
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12px;
}
.post-actions a { color: var(--faint); letter-spacing: 0.04em; transition: color 0.15s ease; }
.post-actions a:hover { color: var(--accent); }
.post-actions form { margin: 0; }
.post-counts { display: flex; gap: 18px; color: var(--faint); letter-spacing: 0.04em; }
.post-counts span:empty { display: none; }

/* Focal post in a thread */
.focal { border-left: 2px solid var(--accent); }
.focal .post { padding-left: 20px; border-bottom: none; }
.counters-note { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }
.focal .counters-note { display: block; padding: 0 0 14px 20px; }
.focal .counters-note:empty, .focal .counters-note span:empty { display: none; }
.new-replies-pill {
  display: block;
  margin: 20px auto 0;
  padding: 6px 16px;
  width: fit-content;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
  transition: color 0.15s ease;
}
.new-replies-pill:hover { color: var(--accent); }
.thread .reader-compose-box { margin: 40px 0; }

/* ---- Feed footer ---- */

.feed-foot {
  padding-top: 64px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- People rows (following, requests) + notifications ---- */

.person { display: flex; align-items: center; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--hairline); }
.person .slide-id { flex: 1; }
.person form { margin: 0; }

.notif { padding: 28px 0; border-bottom: 1px solid var(--hairline); }
.notif .slide-head { margin-bottom: 0; }
.notif-verb { color: var(--soft); }
.unread-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  vertical-align: 2px;
  margin-right: 4px;
}
.notif-body { margin: 14px 0 0 52px; font-size: 16px; line-height: 1.55; color: var(--soft); max-width: 54ch; }
.notif-body > :first-child { margin-top: 0; }
.notif-body > :last-child { margin-bottom: 0; }

/* ---- Remote profile head ---- */

.profile-head { display: flex; gap: 20px; align-items: flex-start; padding-top: 40px; }
.profile-main { flex: 1; min-width: 0; }
.profile-name { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.profile-bio { margin: 14px 0 0 0; font-size: 16px; line-height: 1.6; color: var(--soft); max-width: 54ch; }
.profile-bio > :first-child { margin-top: 0; }
.profile-bio > :last-child { margin-bottom: 0; }
.profile-links { display: flex; align-items: center; gap: 24px; margin-top: 20px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }
.profile-links .state { color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.feed-more { padding-top: 32px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }

/* ---- Forms ---- */

.form { padding-top: 40px; max-width: 380px; }
.form label {
  display: block;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  margin-top: 8px;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink);
}
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-bottom-color: var(--accent); }
.form .btn, .followform .btn { margin-top: 32px; }
.followform { display: flex; align-items: flex-end; gap: 20px; padding-top: 40px; }
.followform input { flex: 1; margin: 0; }
.followform .btn { margin: 0; flex-shrink: 0; }

/* ---- Meta/mono line under things ---- */

.meta { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }
.meta a { color: inherit; }
.meta a:hover { color: var(--accent); }

/* ---- Composer media tray ---- */

.btn-plain {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--mono); font-size: 12px; color: var(--soft); letter-spacing: 0.04em;
}
.btn-plain:hover:not(:disabled) { color: var(--accent); }
.btn-plain:disabled { color: var(--faint); cursor: default; }

.media-tray { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.media-tile {
  position: relative; width: 140px; display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--hairline); border-radius: 6px; padding: 4px;
}
.media-tile .media-preview { width: 100%; height: 90px; object-fit: cover; display: block; background: var(--hairline); }
.media-tile.is-error .media-preview { opacity: 0.4; }
.media-note { font-family: var(--mono); font-size: 11px; color: var(--accent); margin: 0; }
.media-badge { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.media-progress {
  position: absolute; left: 4px; top: 4px; height: 3px; width: 0;
  max-width: calc(100% - 8px); background: var(--accent); transition: width 0.2s;
}
.media-remove {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; line-height: 18px;
  border: none; cursor: pointer; background: var(--ink); color: var(--bg); font-size: 14px;
}
.media-desc {
  font-family: var(--mono); font-size: 11px; color: var(--ink);
  background: none; border: 1px solid var(--hairline); padding: 3px 4px; resize: vertical;
}

/* ---- Settings + profile header ---- */

.profile-header { width: 100%; max-height: 220px; object-fit: cover; display: block; margin-top: 24px; border-radius: 6px; }
.settings-header { max-width: 100%; max-height: 140px; object-fit: cover; display: block; border-radius: 6px; }
.settings-form { display: flex; flex-direction: column; gap: 28px; padding-top: 40px; }
.settings-form label {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--mono); font-weight: 500; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.settings-form label .meta { text-transform: none; letter-spacing: 0.04em; font-weight: 400; }
.settings-form label.check {
  display: block; font-family: var(--serif); font-weight: 400; font-size: 16px;
  letter-spacing: 0; text-transform: none; color: var(--ink);
}
.settings-form label.check input { margin: 0 6px 0 0; vertical-align: -1px; }
.settings-form input[type="file"] { font-family: var(--mono); font-size: 12px; color: var(--soft); }
.settings-form textarea {
  font-family: var(--serif); font-size: 17px; line-height: 1.55; color: var(--ink);
  background: transparent; border: 1px solid var(--hairline); border-radius: 6px;
  padding: 10px 12px; resize: vertical;
}
.settings-form textarea:focus { outline: none; border-color: var(--accent); }
.settings-form select {
  width: fit-content; font-family: var(--mono); font-size: 13px; color: var(--ink);
  background: transparent; border: 1px solid var(--hairline); border-radius: 6px;
  padding: 8px 10px;
}
.settings-field { display: flex; flex-direction: column; gap: 8px; }
.settings-field-label {
  font-family: var(--mono); font-weight: 500; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint);
}
.settings-field-label .meta { text-transform: none; letter-spacing: 0.04em; font-weight: 400; }
.settings-field-row { display: flex; align-items: center; gap: 16px; }
.settings-field-controls { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.flash-fade { animation: flash-fade 0.6s ease 4s forwards; }
@keyframes flash-fade { to { opacity: 0; visibility: hidden; } }

/* ---- Top bar: fixed chrome shared by the reader and every column page ---- */

.reader-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px 6vw;
  background: linear-gradient(var(--bg) 55%, transparent);
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  pointer-events: none;
}
.reader-top > * { pointer-events: auto; }
.reader-host { font-size: 13px; color: var(--faint); }
.reader-host:hover { color: var(--accent); }
.reader-top-right { display: flex; align-items: center; gap: 20px; justify-self: end; }

.reader-top summary { list-style: none; cursor: pointer; user-select: none; }
.reader-top summary::-webkit-details-marker { display: none; }

.reader-period { position: relative; justify-self: center; }
.reader-period > summary { color: var(--accent); white-space: nowrap; }
.reader-period > summary:hover { color: var(--accent-hover); }
.reader-period nav {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--hairline); border-radius: 6px;
  box-shadow: 0 6px 24px rgba(43, 38, 32, 0.12);
  padding: 6px 0; min-width: 150px;
}
.reader-period nav a { padding: 7px 16px; color: var(--ink); white-space: nowrap; }
.reader-period nav a:hover { background: rgba(193, 95, 60, 0.07); color: var(--ink); }
.reader-period nav a.is-current { color: var(--accent); }
.reader-period-rule { display: block; height: 1px; margin: 6px 0; background: var(--hairline); }
/* Fully-read days recede — state shown by tone, not text */
.reader-period nav a.is-read, .end-chips a.is-read { color: var(--faint); opacity: 0.55; }

.reader-bell { position: relative; color: var(--accent); display: flex; }
.reader-bell:hover { color: var(--accent-hover); }
.reader-bell .dot { position: absolute; top: -3px; right: -4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.reader-nav > summary { color: var(--accent); display: flex; align-items: center; }
.reader-nav > summary:hover { color: var(--accent-hover); }
.reader-nav .icon-close { display: none; font-size: 22px; line-height: 14px; }
.reader-nav[open] .icon-burger { display: none; }
.reader-nav[open] .icon-close { display: block; }

.reader-overlay {
  position: fixed; inset: 0; z-index: -1; /* under the top bar, over the page */
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 6vw;
}
body:has(.reader-nav[open]) .reader-period,
body:has(.reader-nav[open]) .reader-bell,
body:has(.reader-nav[open]) .reader-host,
body:has(.reader-nav[open]) .reader-hint { visibility: hidden; }
.reader-overlay-nav {
  position: absolute; top: 20px; left: 6vw; right: 6vw;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 30px;
  font-family: var(--mono); font-size: 14px;
  padding-right: 48px; /* clear of the × in the top bar */
}
.reader-overlay-nav a:first-child { color: var(--accent); }
.reader-overlay-nav a { color: var(--faint); }
.reader-overlay-nav a:hover { color: var(--accent); }
.reader-overlay-nav .count { color: var(--accent); }
.reader-overlay-nav form { margin: 0; }
.reader-overlay-nav button {
  border: none; background: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--faint);
}
.reader-overlay-nav button:hover { color: var(--accent); }

.reader-composer { width: 100%; max-width: 640px; }
.reader-compose-box { border: 1px solid var(--hairline); border-radius: 6px; }
.reader-compose-box:focus-within { border-color: rgba(193, 95, 60, 0.6); }
.reader-compose-head { display: flex; gap: 16px; align-items: flex-start; padding: 22px 22px 20px; }
.reader-compose-head .compose-main { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.reader-compose-head textarea {
  width: 100%; min-height: 150px; resize: none; border: none; outline: none;
  background: transparent; font-family: var(--serif); font-size: 20px;
  line-height: 1.55; color: var(--ink); padding: 8px 0 0;
}
.reader-compose-head textarea::placeholder { color: var(--faint); }
.reader-compose-box.is-reply .reader-compose-head textarea { min-height: 70px; font-size: 18px; }

/* ---- Reader: full-screen one-post-per-screen deck ---- */

body.reader { max-width: none; padding: 0; }
/* Each post is its own page; the document scrolls only when a post is
   tall. No scrollbar — posts stand alone, not on a shared surface. */
.reader-root { scrollbar-width: none; }
.reader-root::-webkit-scrollbar { display: none; }

/* Page turns are navigations; the fade is a cross-document view
   transition (browsers without support swap instantly, which is fine). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: 0.1s; }
::view-transition-new(root) { animation-duration: 0.3s; }

/* A committed turn acknowledges the gesture at once: the old slide moves
   out while the next document is still loading (reader.js). */
.reader.is-turning-fwd .slide { animation: turn-out-fwd 0.3s ease forwards; }
.reader.is-turning-back .slide { animation: turn-out-back 0.3s ease forwards; }
@keyframes turn-out-fwd { to { opacity: 0; transform: translateY(-28px); } }
@keyframes turn-out-back { to { opacity: 0; transform: translateY(28px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
  .reader.is-turning-fwd .slide,
  .reader.is-turning-back .slide { animation: none !important; }
}

.slide {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 6vw 70px;
}

.reader-pager {
  display: flex; justify-content: center; gap: 40px;
  padding: 0 6vw 90px;
  font-family: var(--mono); font-size: 12px;
}
.reader-pager a { color: var(--faint); }
.reader-pager a:hover { color: var(--accent); }
.js .reader-pager { display: none; }

.slide-inner { width: 100%; max-width: 640px; }
.slide-day {
  margin: 0 0 26px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.slide-body.is-clamped {
  max-height: 48vh; overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.slide-expand {
  display: inline-block; margin: 10px 0 0; cursor: pointer;
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  border-bottom: 1px solid rgba(193, 95, 60, 0.4);
}

.slide-actions {
  margin-top: 16px; display: flex; align-items: center; gap: 30px;
  font-family: var(--mono); font-size: 14px; color: var(--faint);
}
.slide-count { display: flex; align-items: center; gap: 8px; color: var(--faint); }
.slide-count .glyph { font-size: 18px; }
a.slide-count:hover { color: var(--accent); }
.slide-origin { margin-left: auto; font-size: 12px; letter-spacing: 0.04em; color: var(--faint); }
.slide-origin:hover { color: var(--accent); }

.slide-end { text-align: center; }
.end-mark { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 20px; }
.end-copy { margin: 0; max-width: 520px; font-size: 21px; font-style: italic; line-height: 1.6; color: var(--soft); text-wrap: pretty; }
.end-older { display: inline-block; margin-top: 28px; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.end-chips {
  margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 26px; font-family: var(--mono); font-size: 12px;
}
.end-chips a { color: var(--faint); }
.end-chips a:hover { color: var(--accent); }

.reader-notice {
  position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 15;
  display: flex; align-items: center; gap: 12px; max-width: 90vw;
  padding: 8px 16px; border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--bg); box-shadow: 0 4px 16px rgba(43, 38, 32, 0.08);
  font-family: var(--mono); font-size: 11px; color: var(--soft); white-space: nowrap;
}
.reader-notice span { overflow: hidden; text-overflow: ellipsis; }
.reader-notice-dismiss {
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--faint); font-size: 15px; line-height: 1;
}
.reader-notice-dismiss:hover { color: var(--accent); }
body:has(.reader-nav[open]) .reader-notice { visibility: hidden; }

.reader-hint {
  position: fixed; bottom: 14px; left: 0; right: 0; z-index: 5;
  text-align: center; font-family: var(--mono); font-size: 11px;
  color: var(--faint); opacity: 0.6; pointer-events: none;
}

/* ---- Create: the front door, split into the product's two verbs.
   Paper zone = write, ink zone = read. The zones use the theme's own
   ink/bg variables, so the split inverts itself in dark mode. ---- */

body.create {
  max-width: none; padding: 0;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
.create-top { padding: 20px 6vw; font-family: var(--mono); }

.zone-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--faint);
}

.create-zone { flex: 1.25; display: flex; flex-direction: column; min-height: 54dvh; }
.create-zone-body {
  flex: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 0 6vw 44px;
}

.catchup-zone {
  flex: 1; min-height: 34dvh;
  display: flex; flex-direction: column;
  background: var(--ink); color: var(--bg);
}
.catchup-zone-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 44px 6vw 20px;
}
.catchup-zone .zone-label { color: color-mix(in srgb, var(--bg) 45%, transparent); }
.create-catchup {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.16em;
  text-transform: uppercase; text-align: center;
  background: var(--accent); color: var(--on-accent);
  border-radius: 999px; padding: 18px 58px;
  transition: background 0.2s ease;
}
.create-catchup:hover { background: var(--accent-hover); }

.create-links {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: 12px 28px; padding: 0 6vw 26px;
  font-family: var(--mono); font-size: 11px;
}
.create-links a { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.create-links a:hover { color: var(--accent); }
.create-links form { margin: 0; }
.create-links button {
  border: none; background: none; padding: 0; cursor: pointer;
  font: inherit; color: color-mix(in srgb, var(--bg) 55%, transparent);
}
.create-links button:hover { color: var(--accent); }

/* Image lightbox (app.js): the cached image expands over the page. */
.post-media img { cursor: zoom-in; }
.post-media.is-processing img,
.post-media a:not([data-lightbox]) img { cursor: pointer; }
body.has-lightbox { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 28px; cursor: zoom-out;
  background: rgba(24, 21, 17, 0.94);
}
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 4px; }
.lightbox-caption {
  margin: 0; max-width: 640px; text-align: center;
  font-size: 14px; line-height: 1.4; color: rgba(250, 249, 245, 0.75);
}
.lightbox-origin { font-family: var(--mono); font-size: 12px; color: rgba(250, 249, 245, 0.6); }
.lightbox-origin:hover { color: var(--bg); }
.lightbox-count { margin: 0; font-family: var(--mono); font-size: 12px; color: rgba(250, 249, 245, 0.6); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  border: none; background: none; padding: 18px 20px; cursor: pointer;
  font: 32px/1 var(--mono); color: rgba(250, 249, 245, 0.65);
}
.lightbox-nav:hover { color: var(--bg); }
.lightbox-prev { left: 6px; }
.lightbox-next { right: 6px; }
