/* abbygoldsmith.com — written fresh for WordSpring. The look follows the old
   site's intent (Abby's painted header and logo, a cream frame around dark
   cards, the Torth cast along the bottom) without any of its markup or CSS. */

:root {
  --bg: #0e0d12;
  --panel: #18161e;
  --frame: #fffab8;
  --text: #ebe6d2;
  --muted: #a9a3b5;
  --heading: #fffab8;
  --link: #74c9f4;
  --link-hover: #b3e3fb;
  --rose: #ee93bf;
  --quote: #2c2640;
  --rule: #3a3546;
  --display: 'Marcellus', Georgia, serif;
  --body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--body);
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--heading); line-height: 1.25; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- header -------------------------------------------------------------
   Measured off the old site: the name lettering about 1000px wide, the
   Books · Blog · Bio lettering 80px tall and right-aligned to the frame's
   edge, its bottom 15px into the frame, which itself rides 50px up into the
   painting. */

:root { --page: min(1200px, 86vw); --nav-h: 80px; }

.site-header {
  position: relative;
  padding: 14px 0 35px;
  text-align: center;
  background:
    linear-gradient(rgba(17, 17, 17, 0.5), rgba(17, 17, 17, 0.5)),
    url('/assets/images/header-painting-1920.jpg') center / cover no-repeat;
}

.logo { display: inline-block; }
.logo img { display: block; width: min(1000px, 72vw); padding: 10px; }

.main-nav {
  position: relative;
  z-index: 3;
  width: var(--page);
  margin: -50px auto 0;
}

.main-nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav li { display: flex; align-items: center; }

/* The star bullet between words: the old site's own graphic. Mostly
   transparent glow, so it overlaps the words' padding rather than adding
   gap; the star sits at 71% of its width, hence the lopsided margins that
   put it midway between the words. */
.main-nav li + li::before {
  content: '';
  width: calc(var(--nav-h) * 1.28);
  height: calc(var(--nav-h) * 0.625);
  margin: 0 calc(var(--nav-h) * -0.2) 0 calc(var(--nav-h) * -0.74);
  background: url('/assets/images/nav-bullet.webp') center / contain no-repeat;
  pointer-events: none;
}

.main-nav a { display: block; padding: 0 calc(var(--nav-h) * 0.25); text-decoration: none; }
.main-nav img { display: block; height: var(--nav-h); width: auto; }
.main-nav .nav-on,
.main-nav a:hover .nav-off,
.main-nav .active .nav-off { display: none; }
.main-nav a:hover .nav-on,
.main-nav .active .nav-on { display: block; }

.nav-text {
  display: block;
  line-height: var(--nav-h);
  font-family: var(--display);
  font-size: calc(var(--nav-h) * 0.5);
  color: var(--frame);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.main-nav a:hover .nav-text,
.main-nav .active .nav-text { color: #c9c3ff; }

/* --- the frame: cream border around the content and sidebar ------------ */

.frame {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: var(--page);
  margin: -50px auto 0;
  padding: 20px;
  background: var(--frame);
  border-radius: 30px;
}

.frame.has-sidebar { grid-template-columns: minmax(0, 1fr) 340px; }

.content { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  background: var(--panel);
  border-radius: 18px;
  padding: 26px 30px;
}

.page-title { margin: 0 0 0.8rem; font-size: 2.1rem; }

.section-title {
  margin: 2rem 0 0.6rem;
  font-size: 1.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
}

/* --- prose (region interiors) ---------------------------------------- */

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose li > ul { margin: 0.35em 0 0; }
.prose strong, .prose b { color: #fff; }

.prose blockquote {
  margin: 0 0 1.2em;
  padding: 16px 22px;
  background: var(--quote);
  border-left: 3px solid var(--rose);
  border-radius: 6px;
  color: #d8d2e6;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose::after { content: ''; display: block; clear: both; }

.fine-print { margin-top: 2rem; font-size: 0.88rem; color: var(--muted); }
.patreon-mark { margin: 0.5rem 0 0; }
.patreon-mark img { display: block; width: min(320px, 80%); height: auto; }
.small { font-size: 0.9rem; }

/* Platform shortcodes: [[img:…]], [[youtube:…]] */
figure.ws-img { margin: 0 0 1.2em; }
a.ws-zoom { display: block; cursor: zoom-in; }
figure.ws-img img { display: block; border-radius: 4px; }
figure.ws-img figcaption { margin-top: 0.4rem; font-size: 0.85rem; font-style: italic; color: var(--muted); text-align: center; }
figure.ws-img-left { float: left; max-width: 42%; margin: 0.3rem 1.4rem 1rem 0; }
figure.ws-img-right { float: right; max-width: 42%; margin: 0.3rem 0 1rem 1.4rem; }
figure.ws-img-full img { width: 100%; }
.ws-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.2em; }
.ws-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
details.ws-expand { margin: 0 0 1em; border: 1px solid var(--rule); border-radius: 8px; }
details.ws-expand > summary { cursor: pointer; padding: 8px 14px; color: var(--heading); }
details.ws-expand > .ws-expand-body { padding: 0 14px 4px; }

/* --- home: the Torth pitch beside its cover --------------------------- */

/* The cover floats left and the pitch wraps around and under it, as on the
   old home page. */
.series { display: flow-root; }
.series-cover { float: left; width: min(300px, 40%); margin: 0 26px 14px 0; }
.series-cover figure.ws-img { margin: 0; }
.series .prose blockquote { display: flow-root; } /* beside the cover, not under it */

.series-title { margin: 0 0 0.8rem; font-size: 2.4rem; letter-spacing: 0.08em; }

/* --- book page ------------------------------------------------------- */

/* /majority/, measured off the old page: the cover in 30% of the width,
   beside a centred pitch in plain Lato; cream outline buttons evenly
   spaced; the reviews small-caps on purple; then a cream rule and the
   other five books in a row, order links above each cover and an italic
   caption under it. */
.majority { padding-top: 30px; }

.book-hero {
  display: grid;
  grid-template-columns: 30% minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}
.book-cover figure.ws-img { margin: 0; }
.book-pitch { text-align: center; }

.book-tagline,
.order-title {
  margin: 0 0 1.3rem;
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.4;
  color: #eaeaea;
}
.order-title { margin-top: 1.8rem; }
.order-title strong { color: #fff; }

.buy-buttons p {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 14px;
  margin: 0 0 2rem;
}
.buy-buttons a {
  display: inline-block;
  padding: 10px 24px;
  border: 2.5px solid var(--frame);
  border-radius: 27px;
  color: var(--frame);
  font-size: 1.05rem;
  text-decoration: none;
}
.buy-buttons a:hover { background: var(--frame); color: #1a1720; }

.majority .reviews blockquote {
  margin: 0;
  padding: 20px 24px;
  border: 0;
  border-radius: 0;
  background: var(--quote);
  color: var(--frame);
  text-align: left;
  font-variant: small-caps;
  font-size: 0.95rem;
  line-height: 1.6;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 2.4rem;
  padding-top: 14px;
  border-top: 2px solid var(--frame);
  text-align: center;
}
.series-book p { margin: 0 0 0.6rem; }
.series-book p:first-child { color: var(--heading); font-size: 1.1rem; line-height: 1.4; }
.series-book p:first-child a { color: #1abc9c; text-decoration: none; }
.series-book p:first-child a:hover { text-decoration: underline; }
.series-book figure.ws-img { margin: 0 0 0.4rem; }
.series-book em { font-size: 1.25rem; line-height: 1.3; color: #fff; }

@media (max-width: 900px) {
  .series-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; }
}

/* --- press kit photos ------------------------------------------------ */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- blog ------------------------------------------------------------ */

.post-list { display: flex; flex-direction: column; gap: 12px; }

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  color: var(--text);
  text-decoration: none;
  padding: 20px 26px;
  transition: background 0.15s;
}
.post-card:hover { background: #211e29; color: var(--text); }
.post-card:has(.post-card-image) { grid-template-columns: 140px minmax(0, 1fr); column-gap: 20px; }
.post-card-image { grid-row: span 3; width: 140px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.post-card-title { font-family: var(--display); font-size: 1.35rem; line-height: 1.3; color: var(--heading); }
.post-card-date { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.post-card-excerpt { font-size: 0.95rem; color: #cfc9db; }

.post-head h1 { margin: 0 0 0.3rem; font-size: 2rem; }
.post-date { margin: 0 0 1.4rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.post-image { display: block; width: 100%; margin: 0 0 1.4rem; border-radius: 6px; }

.comments h2 { margin: 0 0 0.2rem; font-size: 1.5rem; }
.comments-note { margin: 0 0 1.2rem; font-size: 0.85rem; color: var(--muted); }
.comment-list, .comment-replies { list-style: none; margin: 0; padding: 0; }
.comment-list > .comment { padding: 16px 0; border-top: 1px solid var(--rule); }
.comment-replies { margin: 12px 0 0 22px; padding-left: 16px; border-left: 2px solid var(--quote); }
.comment-replies > .comment + .comment { margin-top: 12px; }
.comment-meta { margin: 0 0 0.35rem; font-size: 0.85rem; color: var(--muted); }
.comment-meta strong { color: var(--heading); font-weight: 400; font-family: var(--display); font-size: 1.05rem; }
.comment-body { font-size: 0.95rem; }
.comment-body p { margin: 0 0 0.6em; }
.comment-body p:last-child { margin-bottom: 0; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 26px;
  font-size: 0.95rem;
}
.post-nav a { text-decoration: none; }
.post-nav span { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.post-nav .older { grid-column: 1; }
.post-nav .all { grid-column: 2; }
.post-nav .newer { grid-column: 3; text-align: right; }

/* --- serials: a book's listing and its chapters ---------------------- */

.serial-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.serial-hero:not(:has(.serial-cover)) { grid-template-columns: minmax(0, 1fr); }
.serial-cover { display: block; width: 100%; height: auto; border-radius: 6px; }
.serial-series {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.serial-series a { text-decoration: none; }
.serial-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin: 1.2rem 0 0; }
.serial-note { margin: 0 0 1rem; color: var(--muted); font-size: 0.92rem; }

.button {
  display: inline-block;
  padding: 7px 22px;
  border: 0;
  border-radius: 6px;
  background: var(--frame);
  color: #1a1720;
  font: 700 1rem var(--body);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #fff; color: #1a1720; }

.toc { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.toc-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  text-decoration: none;
}
.toc-item:hover { background: #211e29; color: var(--heading); }
.toc-item.locked .toc-title { color: #cfc9db; }
.toc-lock { flex: none; font-size: 0.8rem; color: var(--rose); white-space: nowrap; }

/* --- reading: the chapter pages ----------------------------------------
   The old site's reading layout, measured off it: no cream frame; the
   header ends in a cream line; one 647px column rises 30px into the
   header, its rounded top edged in cream; the book's name centred above a
   centred title, the white moon button at the right; the text set like a
   book (Merriweather, indented paragraphs, no gaps between them). */

.reading .site-header { border-bottom: 2px solid var(--frame); }
.reading .frame {
  display: block;
  width: min(647px, 100vw);
  margin-top: -30px;
  padding: 0;
  background: none;
  border-radius: 0;
}
.reading .content { gap: 0; }

.chapter {
  padding: 22px 20px 28px;
  background: var(--bg);
  border-top: 2px solid var(--frame);
  border-radius: 15px 15px 0 0;
}
.chapter-head { position: relative; margin-bottom: 1.8rem; padding: 0 44px; text-align: center; }
.chapter-book { margin: 0 0 1.4rem; font-size: 1.15rem; color: var(--heading); }
.chapter-book a { color: var(--heading); text-decoration: none; }
.chapter-book a:hover { text-decoration: underline; }
.chapter-title { margin: 0; font-family: var(--body); font-weight: 400; font-size: 2.2rem; color: #eee; hyphens: none; }
.reading-mode {
  position: absolute;
  top: -8px;
  right: -7px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fdfdfd;
  cursor: pointer;
}
.reading-mode img { display: block; width: 100%; height: 100%; }

.chapter-text {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 16px;
  line-height: 1.9;
  color: #eee;
}
.chapter-text p { margin: 0; text-indent: 1.74em; }
.chapter-text .chapter-part { margin: 0.6em 0; text-indent: 0; text-align: center; font-weight: 700; letter-spacing: 0.06em; }
.chapter-text .scene-break {
  width: min(304px, 60%);
  height: 4px;
  margin: 38px auto;
  overflow: hidden;
  text-indent: 0;
  font-size: 0;
  background: #eee;
}
.chapter-text blockquote {
  margin: 1em 0;
  padding: 14px 22px;
  border: 0;
  border-radius: 0;
  background: var(--quote);
  text-align: center;
  font-variant: small-caps;
  line-height: 1.5;
}
.chapter-text blockquote p { text-indent: 0; }
.chapter-text blockquote + p { text-align: right; text-indent: 0; }
.chapter-copyright { margin: 2.4rem 0 0; font-size: 0.8rem; color: var(--muted); text-align: center; }

.chapter-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  padding: 0 20px 70px; /* clear of the Torth cast, which stands in front */
  background: var(--bg);
  font-size: 0.95rem;
}

.chapter-lock {
  margin: 0.5rem 0 0;
  padding: 26px 28px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--quote);
  text-align: center;
}
.chapter-lock p { margin: 0 0 0.8rem; }
.chapter-lock p:last-child { margin-bottom: 0; }
.lock-title { font-family: var(--display); font-size: 1.4rem; color: var(--heading); }
.chapter-lock[data-state="busy"] .button { opacity: 0.6; cursor: progress; }

/* The light page (the old "flipwhite"): the whole page goes white below the
   header, the text near-black. */
.light-page body,
.light-page .chapter,
.light-page .chapter-nav { background: #fdfdfd; }
.light-page .chapter-text,
.light-page .chapter .chapter-title,
.light-page .chapter .chapter-book a,
.light-page .chapter .lock-title { color: #111; }
.light-page .chapter a,
.light-page .chapter-nav a { color: #1c6e98; }
.light-page .chapter .prose strong,
.light-page .chapter .prose b { color: #000; }
.light-page .chapter-text blockquote { background: #ebe5d6; color: #3a3540; }
.light-page .chapter-text .scene-break { background: #111; }
.light-page .chapter .chapter-lock { background: #ebe5d6; border-color: #d8d0bd; color: #26222b; }
.light-page .chapter .chapter-copyright,
.light-page .chapter-nav span { color: #6d6875; }
.light-page .credit { color: #6d6875; }

/* --- sidebar --------------------------------------------------------- */

.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar .card { padding: 20px 22px; }
.sidebar h2 { margin: 0 0 0.8rem; font-size: 1.9rem; text-align: center; }

/* The newsletter box, Kessa peeking round its left edge. The form is
   MailerLite's own; its id-scoped styles pad it as if it stood alone, hence
   the !important. */
.signup { position: relative; padding: 16px 18px 16px 40px !important; }
.signup h2 { text-align: left; font-size: 1.25rem; }
/* High enough that her feet clear the email field; she leans over the
   card's left edge and pokes above its top. */
.kessa { position: absolute; left: -26px; top: -22px; width: 64px; }
.signup .ml-form-embedContainer { margin: 0 !important; }
.signup .ml-form-embedContainer .ml-form-embedWrapper { background: transparent !important; max-width: none !important; width: 100% !important; }
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody,
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-successBody { padding: 0 !important; }
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedContent,
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-successBody .ml-form-successContent { margin: 0 0 10px !important; }
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedContent p,
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedContent p span,
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-successContent p {
  font-family: var(--body) !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
}
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-formContent { padding-bottom: 8px !important; margin-bottom: 0 !important; }
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedPermissions .ml-form-embedPermissionsContent { margin: 0 !important; }
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedPermissions p,
.signup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedPermissions p span {
  font-family: var(--body) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}
.signup .button {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 6px;
  background: var(--frame);
  color: #1a1720;
  font-weight: 700;
  text-decoration: none;
}
.signup-link { margin: 0 0 0.6rem; }

.feature figure.ws-img { max-width: 160px; margin: 0 auto 1em; }
.feature { text-align: center; font-size: 0.95rem; }

.bibliography-link { margin: 0; text-align: center; font-family: var(--display); font-size: 1.4rem; }
.bibliography-link a { color: #fff; text-decoration: none; }
.bibliography-link a:hover { color: var(--frame); }

/* Short fiction and articles: one work per list item, cover on the left,
   the lines beside it separated by the old site's short cream rules. A
   plain list until the layout's script makes it a carousel (.is-carousel),
   and a plain list again while it is being edited. */
.works { position: relative; }
.works .prose ul { list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.works .prose li { display: flow-root; margin: 0; padding: 0.8em 0; border-top: 1px solid var(--rule); }
.works .prose li:first-child { border-top: 0; padding-top: 0; }
.works .prose li > p { margin: 0; color: #fff; }
.works .prose li > p:empty { display: none; }
.works .prose li > p:not(:empty) ~ p:not(:empty)::before {
  content: '';
  display: block;
  width: 150px;
  max-width: 100%;
  height: 2px;
  margin: 0.5em 0;
  background: linear-gradient(to right, var(--frame), #fff, var(--frame));
}
/* Always underlined: next to plain lines of text, it's the only sign which
   line goes somewhere. */
.works .prose li a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.55); }
.works .prose li a:hover { color: var(--frame); text-decoration-color: currentColor; }
.works .prose li a.cover-link { cursor: pointer; }
.works .prose em { color: var(--rose); font-style: normal; }
.works figure.ws-img { float: left; max-width: min(200px, 55%); margin: 0 12px 6px 0; }

.is-carousel .prose:not(.ws-editable) > ul {
  display: flex;
  gap: 40px; /* no sliver of the next work at the edge */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.is-carousel .prose:not(.ws-editable) > ul::-webkit-scrollbar { display: none; }
.is-carousel .prose:not(.ws-editable) > ul > li { flex: 0 0 100%; scroll-snap-align: start; padding: 0; border: 0; }

.carousel-btn {
  position: absolute;
  top: 40%;
  z-index: 4;
  width: 34px;
  height: 56px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.carousel-btn.prev { left: -26px; }
.carousel-btn.next { right: -26px; }
.carousel-btn svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(3px 3px 4px rgba(0, 0, 0, 0.9)); }
.carousel-btn polyline { fill: none; stroke: #16aaf4; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.carousel-btn:hover polyline { stroke: #5cc8ff; }
.works:has(.ws-editable) .carousel-btn { display: none; }

/* --- footer ---------------------------------------------------------- */

/* The cast spans the window and stands in front of the frame's bottom
   edge, 50px up, as on the old site. */
.site-footer { position: relative; z-index: 3; margin-top: -50px; text-align: center; pointer-events: none; }
.site-footer a, .site-footer [data-edit] { pointer-events: auto; }
.cast { display: block; width: 100%; height: auto; }
.credit {
  width: var(--page);
  margin: 0 auto;
  padding: 18px 16px 28px;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.credit a { color: var(--muted); }

/* --- small screens --------------------------------------------------- */

@media (max-width: 900px) {
  .frame.has-sidebar { grid-template-columns: minmax(0, 1fr); }
  .kessa { top: -6px; } /* the card above is close when the sidebar stacks */
  .carousel-btn.prev { left: -14px; }
  .carousel-btn.next { right: -14px; }
}

/* The old site halved the nav lettering on small screens. */
@media (max-width: 700px) {
  :root { --page: 96vw; --nav-h: 40px; }
  .logo img { width: 90vw; }
  .main-nav { margin-top: -18px; }
  /* At half size the words would sit on the frame's edge; keep them
     clear of it. */
  .site-header { padding-bottom: 50px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .frame { padding: 8px; border-radius: 20px; gap: 8px; }
  .content, .sidebar { gap: 8px; }
  .card { padding: 20px 18px; border-radius: 14px; }
  .book-hero, .serial-hero { grid-template-columns: minmax(0, 1fr); }
  .series-cover { float: none; width: auto; margin: 0 auto 1rem; }
  .serial-cover { max-width: 200px; margin: 0 auto; }
  .chapter { padding: 18px 14px 24px; }
  .reading-mode { top: -10px; right: 1px; border-radius: 12px; }
  .chapter-title { font-size: 1.8rem; }
  .series-cover, .book-cover { max-width: 240px; margin: 0 auto; }
  figure.ws-img-left, figure.ws-img-right { float: none; max-width: 100%; margin: 0 0 1em; }
  .post-card:has(.post-card-image) { grid-template-columns: 90px minmax(0, 1fr); }
  .post-card-image { width: 90px; }
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav .all { grid-column: 1 / -1; grid-row: 2; text-align: center; }
}
