/* ============================================================
   Abstract Writer — public reading views (Library + Reader).
   Loaded after style.css on those pages only; evolves the same
   warm-paper palette and adds Spectral (self-hosted — the CSP
   forbids third-party origins) for display type.
   ============================================================ */

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/spectral-400.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/spectral-400i.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/spectral-500.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/spectral-600.woff2") format("woff2");
}

:root {
  /* ---- derived tones (brand palette lives in style.css) ---- */
  --accent-tint: #f1ecfa;         /* hover / active fills */
  --accent-tint-2: #e7defa;       /* stronger tint chips */
  --paper-2: #f4f2ec;             /* recessed surfaces */
  --shadow-sm: 0 1px 2px rgba(38,34,28,.06), 0 1px 1px rgba(38,34,28,.04);
  --shadow-md: 0 4px 14px rgba(38,34,28,.08), 0 2px 4px rgba(38,34,28,.05);
  --shadow-lg: 0 14px 40px rgba(38,34,28,.16), 0 4px 12px rgba(38,34,28,.08);
  --shadow-cover: 0 10px 30px rgba(38,34,28,.28);

  /* ---- type ---- */
  --font-display: "Spectral", Georgia, "Times New Roman", serif;
  --font-body: Georgia, "Times New Roman", serif;
  --font-ui: "Spectral", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* ---- spacing / shape ---- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --maxw: 68rem;
  --measure: 40rem;     /* prose reading measure */
}

html { -webkit-text-size-adjust: 100%; }

body {
  line-height: 1.6;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* reading pages manage their own width via .wrap / .reader-shell */
main { max-width: none; margin: 0; padding: 0; }

a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

img { max-width: 100%; }

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .01em;
  color: var(--accent-dark);
  text-decoration: none;
}
.brand-logo { height: 1.7em; width: 1.7em; border-radius: 7px; box-shadow: var(--shadow-sm); }
.topbar .brand:hover { color: var(--accent); }

.topbar nav.topnav { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.topnav a {
  font-family: var(--font-ui);
  font-size: .92rem;
  color: var(--fg);
  text-decoration: none;
  margin-left: 0;
  padding: .35rem .7rem;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.topnav a:hover { background: var(--accent-tint); color: var(--accent-dark); }
.topnav a.active { background: var(--accent-tint-2); color: var(--accent-dark); }

/* ============================================================
   Layout containers
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem) 4rem; }

.page-head { margin: 0 0 1.5rem; }
.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0;
}
.page-sub { color: var(--muted); font-size: 1rem; margin: .4rem 0 0; }
.eyebrow {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .5rem;
}

/* ============================================================
   UI atoms
   ============================================================ */
.btn {
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 500;
  padding: .6rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.secondary { background: transparent; color: var(--accent-dark); border: 1px solid var(--accent); box-shadow: none; }
.btn.secondary:hover { background: var(--accent-tint); color: var(--accent-dark); transform: none; box-shadow: none; }

.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .12rem .6rem;
  font-size: .78rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  background: var(--card);
  transition: border-color .15s, color .15s, background .15s;
}
a.chip:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-tint); }

.rating {
  display: inline-flex;
  align-items: baseline;
  gap: .18rem;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--accent-dark);
}
.rating .r-num { font-size: 1rem; }
.rating .r-max { font-size: .72rem; color: var(--muted); font-weight: 500; }
.rating .r-star { color: var(--accent); font-size: .8rem; transform: translateY(-1px); }

/* ============================================================
   Book cover (image or generated typographic fallback)
   ============================================================ */
.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--shadow-cover);
  display: block;
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; border: none; border-radius: 0; }

/* generated cover for stories without art */
.cover-gen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem 1rem;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.25);
  background: linear-gradient(150deg, var(--c1, #5f4494), var(--c2, #7c5cbf));
}
.cover-gen::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.18), transparent 60%);
  pointer-events: none;
}
.cover-gen .cg-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.15;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.cover-gen .cg-mark { font-family: var(--font-ui); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.cover-gen .cg-rule { width: 2rem; height: 2px; background: rgba(255,255,255,.7); margin: .5rem 0; }

/* ============================================================
   Library grid
   ============================================================ */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin: 0 0 1.75rem;
  padding: .55rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.search {
  flex: 1 1 14rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 .5rem 0 .9rem;
}
.search svg { flex: none; color: var(--muted); }
.search input {
  flex: 1;
  border: none;
  background: none;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  padding: .5rem 0;
}
.search input:focus { outline: none; }
.search input::placeholder { color: var(--muted); }
.controls select {
  font-family: var(--font-ui);
  font-size: .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .5rem 1rem;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}
.controls select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.view-toggles { display: flex; gap: .2rem; padding-right: .3rem; }
.view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.view-toggle:hover { background: #f1ecfa; color: var(--accent-dark); }
.view-toggle[aria-pressed="true"] { background: #f1ecfa; color: var(--accent-dark); }

.result-note { font-family: var(--font-ui); font-size: .85rem; color: var(--muted); margin: 0 0 1rem; }

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: clamp(1.1rem, 3vw, 2rem) clamp(.9rem, 2.5vw, 1.6rem);
}
.story-grid .empty { grid-column: 1 / -1; }
.story {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.story:hover { color: inherit; }
.story .cover { transition: transform .18s ease, box-shadow .18s ease; }
.story:hover .cover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.story .cover .rating-badge {
  position: absolute;
  top: .5rem; right: .5rem;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: .1rem .5rem;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-dark);
  box-shadow: var(--shadow-sm);
}
.story-body { padding: .7rem .1rem 0; display: flex; flex-direction: column; gap: .22rem; }
.story-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.2;
  margin: 0;
  letter-spacing: .005em;
}
.story:hover .story-title { color: var(--accent-dark); }
.story-world { font-family: var(--font-ui); font-size: .8rem; color: var(--muted); }
.story-synopsis {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: .82rem;
  line-height: 1.4;
  color: var(--muted);
  margin-top: .25rem;
}
.story-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--muted);
  margin-top: .2rem;
}
.story-meta .dot, .hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .6; }
.story-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }

/* ============================================================
   About
   ============================================================ */
.about-body { max-width: 42rem; }
.about-body h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 1.6rem 0 .5rem;
}
.about-body p { line-height: 1.65; margin: 0 0 .8rem; }
.about-features { padding-left: 1.2rem; margin: 0 0 .8rem; }
.about-features li { line-height: 1.65; margin-bottom: .45rem; }
.about-quote {
  border-left: 3px solid var(--accent);
  margin: .8rem 0 1rem;
  padding: .2rem 0 .2rem 1rem;
  font-style: italic;
  color: var(--fg);
}
.about-quote p { margin: 0; }

/* ============================================================
   Worlds
   ============================================================ */
.world-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: clamp(1rem, 3vw, 1.8rem);
}
.world-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.world-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); color: inherit; }
.wc-covers {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 1.4rem 1rem .9rem;
  background: var(--paper-2);
  border-bottom: 1px solid var(--border);
}
.wc-cover {
  position: relative;
  width: 4.4rem;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: var(--shadow-md);
}
.wc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; border: none; border-radius: 0; }
.wc-cover + .wc-cover { margin-left: -1.1rem; }
.wc-cover:first-child:not(:only-child) { transform: rotate(-5deg) translateY(4px); }
.wc-cover:nth-child(2) { z-index: 1; }
.wc-cover:nth-child(3) { transform: rotate(5deg) translateY(4px); }
.world-card:hover .wc-cover:first-child:not(:only-child) { transform: rotate(-7deg) translateY(3px); }
.world-card:hover .wc-cover:nth-child(3) { transform: rotate(7deg) translateY(3px); }
.wc-cover-gen { background: linear-gradient(150deg, var(--c1, #5f4494), var(--c2, #7c5cbf)); }
.wc-cover-gen::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.18), transparent 60%);
}
.wc-body { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.2rem 1.2rem; }
.wc-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: -.005em;
}
.world-card:hover .wc-name { color: var(--accent-dark); }
.wc-meta { font-family: var(--font-ui); font-size: .8rem; color: var(--muted); }
.wc-excerpt {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: .2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* public world page */
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 2.5rem 0 .6rem;
}
.world-prose {
  max-width: var(--measure);
  margin-bottom: 1rem;
}
/* world.md opens with "# <name>" — the page header already shows it */
.world-prose h1:first-child { display: none; }
.world-prose p { text-indent: 0; }

/* ============================================================
   Reader — progress + shell
   ============================================================ */
.progress-track {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 60;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width .1s linear;
}

.reader-shell {
  display: grid;
  grid-template-columns: minmax(0, var(--measure));
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2rem) 5rem;
}
@media (min-width: 62rem) {
  .reader-shell { grid-template-columns: 15rem minmax(0, var(--measure)); justify-content: center; }
}

/* ---- story hero ---- */
.story-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  align-items: start;
  padding-bottom: 2rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 34rem) {
  .story-hero { grid-template-columns: 10rem 1fr; gap: 1.8rem; }
}
.story-hero .cover { width: 100%; }
@media (min-width: 34rem) { .story-hero .cover { width: 10rem; } }
.hero-body { min-width: 0; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: .1rem 0 .5rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .8rem;
  font-family: var(--font-ui);
  font-size: .88rem;
  color: var(--muted);
  margin: .4rem 0 .9rem;
}
.hero-synopsis {
  font-size: .95rem;
  line-height: 1.55;
  max-width: 38rem;
  margin: 0 0 .9rem;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.backlink {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-ui); font-size: .85rem; color: var(--muted);
  text-decoration: none; margin-bottom: .3rem;
}
.backlink:hover { color: var(--accent-dark); }

/* ---- table of contents ---- */
.toc { grid-column: 1 / -1; }
@media (min-width: 62rem) {
  .toc {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 4.5rem;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }
}
.toc-label {
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .6rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: ch; }
.toc li { counter-increment: ch; }
.toc a {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  padding: .4rem .5rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: .88rem;
  line-height: 1.3;
  border-left: 2px solid transparent;
}
.toc a::before {
  content: counter(ch, decimal-leading-zero);
  font-size: .72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.toc a:hover { background: var(--accent-tint); }
.toc a.current { background: var(--accent-tint); color: var(--accent-dark); border-left-color: var(--accent); font-weight: 600; }
.toc a.current::before { color: var(--accent); }

/* mobile TOC as disclosure */
.toc-mobile {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.toc-mobile summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 1rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: .95rem;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile[open] summary { border-bottom: 1px solid var(--border); }
.toc-mobile .toc { padding: .5rem .5rem .8rem; }
@media (min-width: 62rem) { .toc-mobile { display: none; } }
.toc-desktop { display: none; }
@media (min-width: 62rem) { .toc-desktop { display: block; } }

/* ============================================================
   Prose
   ============================================================ */
.reading { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 62rem) { .reading { grid-column: 2; grid-row: 2; } }

.chapter { margin: 0 0 3.5rem; scroll-margin-top: 4.5rem; }
.chapter-num {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin: 0 0 .3rem;
}
.chapter .chapter-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: 1.15;
  text-align: center;
  letter-spacing: -.01em;
  margin: 0 0 1.6rem;
}
.chapter .chapter-title::after {
  content: "";
  display: block;
  width: 2.4rem; height: 2px;
  background: var(--accent);
  opacity: .5;
  margin: .9rem auto 0;
}
.reading .prose { max-width: none; }
/* chapter markdown opens with its own "# Chapter N" heading; the
   chapter header above already renders it */
.reading .prose h1 { display: none; }
.prose p { margin: 0 0 1.15rem; text-indent: 1.4em; text-wrap: pretty; }
.prose p:first-of-type { text-indent: 0; }
.reading .prose p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.1em;
  line-height: .82;
  float: left;
  padding: .05em .12em 0 0;
  color: var(--accent-dark);
  font-weight: 600;
}
.prose em { font-style: italic; }
.prose blockquote {
  margin: 1.4rem 0;
  padding: .2rem 0 .2rem 1.3rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
  font-style: italic;
  text-indent: 0;
}
.prose blockquote p { text-indent: 0; }
.prose hr {
  border: none;
  text-align: center;
  margin: 2rem 0;
}
.prose hr::before {
  content: "\00a7";
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: .5em;
}

.chapter-end {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--border);
  font-family: var(--font-ui);
  font-size: .85rem;
}
.chapter-end .end-note { color: var(--muted); }

/* ============================================================
   Reviews
   ============================================================ */
.reviews { grid-column: 1 / -1; margin-top: 1rem; padding-top: 2rem; border-top: 1px solid var(--border); }
@media (min-width: 62rem) { .reviews { grid-column: 2; } }
.reviews h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 1.2rem;
}
.review-summary { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.5rem; }
.review-big { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: var(--accent-dark); line-height: 1; }
.review-source { font-family: var(--font-ui); font-size: .82rem; color: var(--muted); }
.review-empty { color: var(--muted); font-style: italic; }
.review {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.review-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; margin: 0 0 .3rem; font-family: var(--font-ui); font-size: .9rem; }
.review-name { font-weight: 600; }
.review-date { color: var(--muted); font-size: .8rem; }
.review-body { margin: 0; white-space: pre-line; }
.review-hidden { opacity: 0.5; }

.review-form {
  margin-top: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.review-form h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 1rem; font-size: 1.15rem; }
.review-form .field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.review-form .field label { font-family: var(--font-ui); font-weight: 600; font-size: .88rem; }
.review-form .field small { font-weight: 400; color: var(--muted); }
.review-form .field input, .review-form .field textarea {
  font: inherit;
  font-size: 1rem;
  padding: .55rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
}

/* stars input */
.star-input { display: inline-flex; gap: .1rem; direction: rtl; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; padding: 0; border: none; }
.star-input label { font-size: 1.5rem; color: var(--border); cursor: pointer; line-height: 1; flex-direction: row; }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
.site-foot {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1rem, 4vw, 2rem);
  text-align: center;
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--muted);
}
.site-foot a { color: var(--muted); }

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