
  :root {
    --bg: #e9e1cd;
    --bg-raised: #fbf8f1;
    --bg-raised-2: #f2ebd9;
    --accent: #8a5426;
    --accent-hover: #6e4119;
    --accent-dim: #b98f55;
    --text: #211d16;
    --text-dim: #5c5546;
    --text-faint: #8c8471;
    --rule: #d9cfb4;
    --danger: #9c3f2a;
    --serif: 'Spectral', Georgia, serif;
    --sans: 'Work Sans', -apple-system, sans-serif;
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
  }

  a { color: inherit; }

  .wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 80px;
  }

  /* ---- Top nav ---- */

  nav.topnav {
    border-bottom: 1px solid var(--rule);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .topnav-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }

  .site-name {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
  }

  .site-name em { font-style: italic; color: var(--accent); }

  .site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .brand-mark {
    display: block;
    flex-shrink: 0;
  }

  .brand-mark.nav-mark {
    width: 34px;
    height: 34px;
  }

  .nav-links {
    display: flex;
    gap: 22px;
    font-size: 0.88rem;
  }

  .nav-links button {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--sans);
    font-size: 0.88rem;
    cursor: pointer;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
  }

  .nav-links button.active {
    color: var(--text);
    border-bottom-color: var(--accent);
  }

  .nav-links button:hover { color: var(--text); }

  /* ---- Shared page bits ---- */

  .page { display: none; padding-top: 44px; }
  .page.active { display: block; }
  #page-home.active { padding-top: 0; }

  .hero-photo {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: 480px;
    overflow: hidden;
    margin-bottom: 34px;
  }

  .hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .hero-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,9,6,0.78) 0%, rgba(10,9,6,0.32) 55%, rgba(10,9,6,0.08) 100%);
    display: flex;
    align-items: flex-end;
    padding: 0 20px 26px;
  }

  .hero-photo-overlay .inner {
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-photo-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(1.7rem, 5vw, 2.5rem);
    line-height: 1.15;
    color: #f6f1e3;
    margin: 0;
    text-shadow: 0 2px 14px rgba(0,0,0,0.4);
  }

  @media (max-width: 560px) {
    .hero-photo { height: 320px; }
  }

  h1.page-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2rem, 5.5vw, 2.7rem);
    margin: 0 0 14px;
    line-height: 1.15;
  }

  p.lede {
    font-size: 1.02rem;
    color: var(--text-dim);
    max-width: 56ch;
    line-height: 1.6;
    margin: 0 0 30px;
  }

  section.block { margin-bottom: 46px; }

  section.block h2 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 14px;
  }

  /* ---- Home ---- */

  .progress-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 40px;
  }

  .progress-track {
    flex: 1;
    height: 6px;
    background: var(--bg-raised-2);
    border-radius: 3px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    background: var(--accent);
  }

  .sprockets {
    display: flex;
    gap: 10px;
    padding: 0 6px;
  }

  .sprockets span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-faint);
    flex-shrink: 0;
  }

  .frame-strip {
    margin: 6px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .frame-row {
    display: flex;
    gap: 4px;
    padding: 6px 0;
    width: max-content;
  }

  .frame {
    flex: 0 0 128px;
    height: 168px;
    border-radius: 1px;
    position: relative;
    display: flex;
    align-items: flex-end;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
  }

  .frame-label {
    width: 100%;
    padding: 8px 9px 7px;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  }

  .frame-label .film {
    display: block;
    color: #f4f1ea;
    font-family: var(--serif);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.25;
  }

  .frame-label .grade {
    display: block;
    color: rgba(244,241,234,0.72);
    font-size: 0.66rem;
    margin-top: 2px;
  }

  .palette-note {
    font-size: 0.76rem;
    color: var(--text-faint);
    margin: 10px 0 0;
  }

  .stat-row {
    display: flex;
    gap: 36px;
    margin-bottom: 44px;
    flex-wrap: wrap;
  }

  .stat {
    font-family: var(--serif);
  }

  .stat .num {
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--accent);
    display: block;
    line-height: 1;
  }

  .stat .label {
    font-family: var(--sans);
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-top: 6px;
  }

  .latest-preview {
    border: 1px solid var(--rule);
    border-top: 3px dashed var(--accent-dim);
    border-radius: 2px;
    padding: 22px 24px;
    background: var(--bg-raised);
  }

  .latest-preview .tag {
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-bottom: 8px;
  }

  .latest-preview h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    margin: 0 0 10px;
  }

  .latest-preview p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 14px;
  }

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

  button.btn-primary {
    font-family: var(--sans);
    background: var(--accent);
    color: var(--bg-raised);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 11px 20px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
  }

  button.btn-primary:hover { background: var(--accent-hover); }

  button.btn-ghost {
    font-family: var(--sans);
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--rule);
    font-size: 0.8rem;
    padding: 7px 14px;
    border-radius: 3px;
    cursor: pointer;
  }

  button.btn-ghost:hover { border-color: var(--text-faint); color: var(--text); }

  button.btn-text {
    font-family: var(--sans);
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 0.78rem;
    padding: 4px 2px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }

  button.btn-text.danger { color: var(--danger); }

  /* ---- About ---- */

  .about-body {
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
    max-width: 62ch;
  }

  .about-body p { margin: 0 0 18px; }

  .method-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
  }

  .method-list li {
    border-left: 2px solid var(--accent-dim);
    padding-left: 14px;
    font-size: 0.92rem;
    color: var(--text-dim);
    line-height: 1.55;
  }

  .method-list strong { color: var(--text); font-weight: 500; }

  .book-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--text-dim);
  }

  .book-list strong { color: var(--text); font-weight: 500; }

  /* ---- Blog: actions + entries ---- */

  .actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .readonly-note {
    font-size: 0.82rem;
    color: var(--text-faint);
    font-style: italic;
  }

  .entry {
    background: var(--bg-raised);
    border: 1px solid var(--rule);
    border-top: 3px dashed var(--accent-dim);
    border-radius: 2px;
    padding: 22px 24px 20px;
    margin-bottom: 18px;
  }

  .entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .entry-stars { color: var(--accent); letter-spacing: 2px; font-size: 0.85rem; }

  .entry-title {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 4px;
  }

  .entry-tags { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 14px; }

  .entry-body {
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    white-space: pre-wrap;
    max-width: 62ch;
  }

  .entry-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    font-size: 0.85rem;
    color: var(--text-dim);
  }

  .entry-notes strong { color: var(--text-faint); font-weight: 500; }

  .entry-controls { margin-top: 14px; display: flex; gap: 16px; }

  .empty-state {
    border: 1px dashed var(--rule);
    border-radius: 2px;
    padding: 40px 24px;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.9rem;
    margin-bottom: 18px;
  }

  /* ---- Form ---- */

  .form-panel {
    background: var(--bg-raised);
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 24px;
    margin-bottom: 30px;
  }

  .form-panel h3 {
    font-family: var(--serif);
    font-size: 1.15rem;
    margin: 0 0 18px;
    font-weight: 600;
  }

  .field-row { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }

  .field { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 6px; }

  .field label { font-size: 0.75rem; color: var(--text-dim); }

  .field input, .field textarea {
    background: var(--bg-raised);
    border: 1px solid var(--rule);
    border-radius: 3px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.9rem;
    padding: 9px 10px;
  }

  .field textarea { font-family: var(--serif); font-size: 0.98rem; line-height: 1.5; resize: vertical; }

  .field input:focus, .field textarea:focus {
    outline: 2px solid var(--accent-dim);
    outline-offset: 1px;
  }

  .star-picker { display: flex; gap: 4px; font-size: 1.3rem; color: var(--text-faint); }
  .star-picker span { cursor: pointer; }
  .star-picker span.on { color: var(--accent); }

  .form-buttons { display: flex; gap: 10px; margin-top: 6px; }

  /* ---- 50-film checklist ---- */

  .film-list { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--rule); }

  .film-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 0.88rem;
  }

  .film-row .mark { width: 16px; color: var(--accent); font-size: 0.8rem; flex-shrink: 0; }
  .film-row .name { color: var(--text); }
  .film-row.done .name { color: var(--text-dim); }
  .film-row .focus {
    color: var(--text-faint);
    font-size: 0.8rem;
    margin-left: auto;
    text-align: right;
    padding-left: 12px;
  }

  footer {
    margin-top: 60px;
    font-size: 0.78rem;
    color: var(--text-faint);
    text-align: center;
  }

  .toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-raised-2);
    border: 1px solid var(--rule);
    color: var(--text);
    padding: 11px 18px;
    border-radius: 4px;
    font-size: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 50;
  }

  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  @media (max-width: 480px) {
    .entry-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
    .film-row { flex-wrap: wrap; }
    .film-row .focus { margin-left: 20px; padding-left: 0; text-align: left; }
    .stat-row { gap: 24px; }
  }

/* ---- multi-page additions ---- */
html { scroll-behavior: smooth; }
.site-brand { text-decoration: none; color: var(--text); }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.page-body { padding-top: 44px; }
a.btn-primary {
  display: inline-block;
  font-family: var(--sans);
  background: var(--accent);
  color: var(--bg-raised);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: 3px;
  text-decoration: none;
}
a.btn-primary:hover { background: var(--accent-hover); }
a.btn-ghost {
  display: inline-block;
  font-family: var(--sans);
  color: var(--text-dim);
  border: 1px solid var(--rule);
  font-size: 0.8rem;
  padding: 7px 14px;
  border-radius: 3px;
  text-decoration: none;
}
a.btn-ghost:hover { border-color: var(--text-faint); color: var(--text); }
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { color: var(--accent); }
.entry-body.excerpt { white-space: normal; color: var(--text-dim); font-size: 0.95rem; }
.read-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.crumb { font-size: 0.82rem; margin: 0 0 26px; }
.crumb a { color: var(--text-dim); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.review-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.review-meta .stars { color: var(--accent); letter-spacing: 2px; }
.review-tags { font-size: 0.82rem; color: var(--text-dim); margin: 0 0 26px; }
.review-body p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 62ch;
  margin: 0 0 18px;
}
.review-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}
.review-nav a { color: var(--accent); text-underline-offset: 3px; }
.film-row .name a { color: var(--text-dim); text-underline-offset: 3px; }
.film-row .name a:hover { color: var(--accent); }
.film-row .name a { text-decoration: underline; }
.brand-mark.nav-mark { object-fit: contain; }
.inline-link, .method-list a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.review-context { font-size: 0.82rem; color: var(--text-faint); margin: 34px 0 0; }
.review-context a { color: var(--accent); text-underline-offset: 3px; }
.home-buttons { margin: 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
