  :root {
    --bg: #f5f3ee;
    --bg-tint: #eeebe3;
    --ink: #1a1a1a;
    --ink-soft: #4a4744;
    --ink-mute: #8a857e;
    --line: #c9c3b7;
    --line-strong: #1a1a1a;
    --accent: #d97757;
    --accent-soft: #e9b5a0;
    --card: #fbf9f4;
    --serif: "Source Serif 4", "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  }
  * { box-sizing: border-box; }
  html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    -webkit-font-smoothing: antialiased;
  }
  body { display: flex; flex-direction: column; }
  body.view-timeline,
  body.view-stack,
  body.view-story,
  body.view-folders,
  body.view-about,
  body.view-contact,
  body.view-privacy { overflow-x: hidden; overflow-y: auto; min-height: 100vh; }

  /* Dotted "canvas" background for the four layout views (Timeline, Classic,
     Story, Folders). About / Contact / Privacy stay on the plain cream bg. */
  body.view-timeline,
  body.view-stack,
  body.view-story,
  body.view-folders {
    background-image: radial-gradient(circle, rgba(201, 195, 183, .45) 1px, transparent 1.2px);
    background-size: 26px 26px;
    background-position: 13px 13px;
    background-attachment: fixed;
  }
  html.snap-y {
    scroll-snap-type: y mandatory;
    scroll-padding-bottom: 200px;
  }
  #view-timeline.active > .intro-hero {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  #view-timeline.active > .stage {
    scroll-snap-align: end;
    scroll-snap-stop: always;
  }
  .view { display: none; }
  .view.active { display: block; }
  #view-timeline.active { display: flex; flex-direction: column; min-height: 100vh; }
  body:not(.view-timeline) .hint { display: none; }

  /* ── top bar ──────────────────────────────── */
  .topbar {
    position: fixed; inset: 0 0 auto 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    padding: 26px 40px 0 40px;
    gap: 40px;
    z-index: 20;
    pointer-events: none;
  }
  .topbar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    pointer-events: auto;
  }
  .topbar-right-row {
    display: flex;
    align-items: center;
    gap: 22px;
  }
  .topbar-meta {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    white-space: nowrap;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: color .2s;
  }
  .topbar-meta:hover { color: var(--ink); }
  .topbar-meta.on { color: var(--ink); font-weight: 600; }
  .topbar-avail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    white-space: nowrap;
  }
  .topbar-avail .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent);
    animation: pulse 2.4s ease-out infinite;
  }
  .topbar-nav {
    display: inline-flex;
    gap: 2px;
    align-items: center;
  }
  .topbar-nav button {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    background: transparent;
    border: 0;
    padding: 6px 10px;
    color: var(--ink-mute);
    cursor: pointer;
    transition: color .2s;
  }
  .topbar-nav button:hover { color: var(--ink); }
  .topbar-nav button.on { color: var(--ink); font-weight: 600; }
  /* Desktop-only Changelog link, hidden on the mobile topbar collapse. */
  @media (max-width: 1100px) {
    .topbar-changelog-btn { display: none; }
  }
  .topbar > * { pointer-events: auto; }
  .brand {
    display: flex; flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 4px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    white-space: nowrap;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
  }
  .brand-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }
  .brand-logo {
    width: 25px; height: 23px;
    flex-shrink: 0;
    display: block;
  }
  .brand-logo path {
    fill: #1a1a1a;
    stroke: none;
  }
  .brand .name { transition: color .2s; }
  .brand:hover .name { color: var(--accent); }
  .brand .name {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 20px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
    margin-bottom: 2px;
  }
  .brand .sep { color: var(--ink-mute); margin: 0 6px; }

  .meta {
    text-align: right;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    display: flex; flex-direction: column; gap: 6px;
    align-items: flex-end;
    white-space: nowrap;
  }
  .meta .avail { display: inline-flex; align-items: center; gap: 8px; }
  .meta .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent);
    animation: pulse 2.4s ease-out infinite;
  }
  @keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(217,119,87,.6); }
    70%  { box-shadow: 0 0 0 10px rgba(217,119,87,0); }
    100% { box-shadow: 0 0 0 0 rgba(217,119,87,0); }
  }

