/* Design A, "Sherbet Log" (data/prototypes/v1-page-a.html, signed off 2026-09-21). Its colour tokens are in
   tokens.css, which every page that uses this file links first. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
/* Sideways swipes are the tabs' (swipe.js); the browser keeps vertical scrolling and zoom. */
html { touch-action: pan-y pinch-zoom; }
/* No will-change on main: as its own layer for good, the whole log (20,000 px and more) was one giant tiled layer,
   and iOS dropped its tiles while a switch rebuilt and scrolled it (blank or half-drawn frames). */
body {
  margin: 0; background: var(--bg); color: var(--ink); overflow-anchor: none;
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.wrap { max-width: 680px; margin: 0 auto; padding-inline: 16px; padding-block: 68px 48px; }

.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.count { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); min-height: 1.5em; }
/* On a phone the count takes its own row, so the links below it never jump when it fills in. */
@media (max-width: 520px) { .count { flex-basis: 100%; } }

#log { display: flex; flex-direction: column; gap: 10px; }
.entry { position: relative; border-radius: 14px; padding: 2px 16px 16px; background: var(--pc, transparent); }
/* Each box's pastel, and its strong colour for the selected lift mark and the chart (v15.md). */
.entry { --pk: var(--accent); --pkd: var(--accent-dk); }
.p0 { --pc: var(--p0); --pk: var(--k0); --pkd: var(--k0d); } .p1 { --pc: var(--p1); --pk: var(--k1); --pkd: var(--k1d); }
.p2 { --pc: var(--p2); --pk: var(--k2); --pkd: var(--k2d); } .p3 { --pc: var(--p3); --pk: var(--k3); --pkd: var(--k3d); }
.p4 { --pc: var(--p4); --pk: var(--k4); --pkd: var(--k4d); } .p5 { --pc: var(--p5); --pk: var(--k5); --pkd: var(--k5d); }
.p6 { --pc: var(--p6); --pk: var(--k6); --pkd: var(--k6d); }
.entry.draft:focus-within { box-shadow: inset 0 0 0 1.5px var(--faint); }
.composer { background: transparent; border: 1.5px dashed var(--line); padding-bottom: 22px; }
.composer:focus-within { border-style: solid; border-color: var(--faint); }
/* A workout is already dated today: just a quiet way to start another. */
.composer.another { padding-bottom: 8px; }
.composer.another .date { cursor: text; }

.meta { display: flex; align-items: center; gap: 8px; min-height: 44px; flex-wrap: wrap; }
.date {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--label);
  font-variant-numeric: tabular-nums; background: none; border: 0; padding: 0 8px; margin: 0 -8px;
  min-height: 44px; text-align: left; cursor: pointer;
}
.composer .date, .logged .date { cursor: default; }
.composer .date { color: var(--muted); }
.date-input {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 1px solid var(--accent);
  border-radius: 6px; padding: 6px 8px; min-height: 36px; width: 8.5em; outline: none;
}
.cue { font-size: 12px; font-weight: 600; color: var(--cue-ink); }
.cue::before { content: "\00b7"; margin-right: 8px; color: var(--faint); }

/* Auto-growing textarea: a hidden mirror sizes the grid cell. */
.grow { display: grid; position: relative; }
.grow > .mirror, .grow > textarea, .text {
  grid-area: 1 / 1; font: inherit; letter-spacing: inherit; line-height: inherit; margin: 0; border: 0; padding: 0;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; tab-size: 4;
}
.mirror { visibility: hidden; pointer-events: none; }
textarea {
  display: block; width: 100%; resize: none; overflow: hidden; background: transparent; color: inherit; outline: none;
  -webkit-appearance: none; appearance: none; border-radius: 0; caret-color: var(--accent);
}
textarea::placeholder { color: var(--faint); opacity: 1; }
.emptied textarea::placeholder { color: var(--label); }
.logged { cursor: pointer; }
.from-claude .text { color: var(--grey-ink); }
/* A long imported workout, folded to its first 8 lines (app.js foldLong), fading into the button that opens it. */
.text.folded {
  max-height: 8lh; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2lh), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 2lh), transparent);
}
.more {
  display: block; margin: 4px 0 0; padding: 6px 0; min-height: 32px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--accent); background: none; border: 0; cursor: pointer;
}

/* Comments (v3.md): bubbles on a workout, dividers for dates, threads in a panel. */
/* The bottom row of a box: a meal's ranges on the left, comment bubbles on the right (v5.md). */
.foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 32px; }
.estimate { font-size: 13px; font-style: italic; font-weight: 400; color: var(--muted); min-width: 0; }
.fade-in { animation: fade-in .2s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.bubbles {
  display: flex; align-items: center; gap: 6px; margin: -6px -6px -6px auto; padding: 6px; min-height: 44px;
  background: none; border: 0; font: inherit; cursor: pointer; flex: none;
}
.entry .bubbles { width: max-content; }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-left: -8px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  flex: none; font-size: 10px; font-weight: 700; letter-spacing: -.02em; box-shadow: 0 0 0 2px var(--pc, var(--bg));
}
.avatar.claude { background: #d97757; }
.avatar.claude svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.avatar.me { background: var(--ink); color: var(--bg); }
.avatar.app { background: var(--muted); color: #fff; }
.bubble-count { font-size: 13px; font-weight: 600; color: var(--label); }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: #d97757; flex: none; }

.summary-toggle {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0; background: none; border: 0;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--label); cursor: pointer;
}
.summary-toggle::before, .summary-toggle::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.summary-hint { font-weight: 600; color: var(--muted); }

.thread-open, .thread-open body { overflow: hidden; }
.thread {
  position: fixed; left: 0; right: 0; top: var(--vv-top, 0px); bottom: var(--kb, 0px); z-index: 30;
  display: flex; flex-direction: column; background: var(--bg);
  transform: translateX(100%); transition: transform .22s ease-out;
}
.thread.open { transform: none; }
.thread-head {
  display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 0 12px 0 4px; border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.thread-back { font: inherit; font-size: 30px; line-height: 1; color: var(--ink); background: none; border: 0; min-width: 44px; min-height: 44px; cursor: pointer; }
.thread-title { font-size: 15px; font-weight: 700; }
.thread-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 24px; max-width: 680px; width: 100%; margin: 0 auto; }
.thread-quote {
  margin: 0 0 20px; padding: 2px 0 2px 12px; border-left: 3px solid var(--line); color: var(--cue-ink);
  font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.5em; overflow: hidden;
}
.thread-list { display: flex; flex-direction: column; gap: 18px; }
.thread-empty { color: var(--muted); font-size: 14px; margin: 0; }
.comment { cursor: pointer; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-head .avatar { box-shadow: none; }
.comment-by { font-size: 13px; font-weight: 700; color: var(--ink); flex: 1; }
.comment-text { font-size: 15px; line-height: 1.45; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 34px; }
.comment-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.comment-del {
  display: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--warn); background: none; border: 0;
  padding: 10px 0 10px 12px; margin: -10px 0; cursor: pointer;
}
.comment.armed .comment-del { display: inline; }
.thread-compose {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); max-width: 680px; width: 100%; margin: 0 auto;
}
.thread-compose textarea {
  flex: 1; font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink); background: var(--pill); border: 0;
  border-radius: 18px; padding: 8px 14px; resize: none; outline: none; min-height: 38px; max-height: 160px;
}
.thread-compose button {
  font: inherit; font-size: 15px; font-weight: 700; color: var(--accent); background: none; border: 0;
  min-height: 38px; padding: 0 6px; cursor: pointer;
}
.thread-compose button:disabled { color: var(--faint); cursor: default; }
/* Opened from a /#w45 link. */
.entry.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 3px transparent; } }
/* Found from a lift's history: the outline in the box's strong colour, on and off on the 520 ms pixel beat (5 beats),
   and that lift's pill filled. With reduced motion the outline just stays on until app.js takes it off. */
.entry.found { box-shadow: 0 0 0 3px var(--pk); animation: found 1.04s steps(1, end) 2.5; }
@keyframes found { 50% { box-shadow: 0 0 0 3px transparent; } }
.text .lift.found { --f: var(--pk); --e: var(--pkd); color: var(--on-accent); }

.note { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 10px; font-size: 14px; color: var(--warn); }
.note-btn, .menu button, .toast-btn {
  font: inherit; font-weight: 700; background: none; border: 0; min-height: 44px; min-width: 44px; padding: 0 12px; cursor: pointer;
}
.note-btn { color: var(--warn); text-decoration: underline; text-underline-offset: 3px; margin-left: -12px; }

.menu {
  position: absolute; z-index: 20; right: 10px; top: 40px; display: flex; flex-direction: column; min-width: 140px;
  background: var(--menu-bg); border-radius: 12px; box-shadow: 0 6px 24px var(--shadow), 0 0 0 1px var(--line); padding: 4px;
}
.menu button { color: var(--ink); text-align: left; border-radius: 8px; font-weight: 600; }
.menu .danger { color: var(--warn); }

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

/* Fixed bits stay clear of the iOS keyboard: --vv-top and --kb come from visualViewport (app.js). */
/*
 * Switching notes is a page load that paints at once from the phone's cache, so it's a clean cut, no animation.
 * (A cross-document crossfade was tried and removed: it drew both notes on top of each other for ~150 ms.)
 * Until the script has painted the log, the page shows nothing, so the browser keeps the previous page on
 * screen instead of flashing an empty shell. If the script never gets there, it shows anyway after 1.5 s.
 */
html:not(.ready) body { visibility: hidden; animation: reveal 0s 1.5s forwards; }
@keyframes reveal { to { visibility: visible; } }
/* Workouts | Meals | Goals (v4.md, v25.md): across from the Saved pill; all three switch in place (app.js). */
.notes {
  position: fixed; z-index: 30; left: 12px; top: calc(env(safe-area-inset-top, 0px) + var(--vv-top, 0px) + 6px);
  display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--pill);
}
.notes a {
  display: flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.notes a[aria-current="page"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
/* Settings (v23.md): your initials at the top right, across from the tabs. */
.me-link {
  position: fixed; z-index: 30; right: 6px; top: calc(env(safe-area-inset-top, 0px) + var(--vv-top, 0px) + 3px);
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.me-link .avatar { width: 30px; height: 30px; font-size: 11px; box-shadow: none; }
.me-link .avatar:empty { background: var(--pill); }
/* Saved, just left of your initials and quieter than the tabs: no pill, small, a faint dot. */
.status {
  position: fixed; z-index: 30; right: 54px; top: calc(env(safe-area-inset-top, 0px) + var(--vv-top, 0px) + 16px);
  display: flex; align-items: center; gap: 5px; pointer-events: none; font-size: 11px; font-weight: 500; color: var(--muted);
}
.status .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.status[data-state=saving] .dot { background: var(--faint); }
.status[data-state=offline] .dot, .status[data-state=signedout] .dot, .status[data-state=error] .dot { background: var(--warn); }
.status[data-state=offline], .status[data-state=signedout], .status[data-state=error] { color: var(--warn); }
/* On a phone the long states ("Offline · kept on this phone") don't fit beside the tabs, so they drop to a row of their
   own; Signed out is the banner's job there (it sits in that row). */
@media (max-width: 460px) {
  .status:is([data-state=offline], [data-state=error]) { top: calc(env(safe-area-inset-top, 0px) + var(--vv-top, 0px) + 50px); right: 12px; }
  .status[data-state=signedout] { display: none; }
  .status[data-state=view] { top: calc(env(safe-area-inset-top, 0px) + var(--vv-top, 0px) + 50px); right: 12px; }
}
/* Mission control's read-only view of someone's log (view.js): whose it is, where Saved would be. */
.status[data-state=view] { color: var(--warn); }
.status[data-state=view] .dot { background: var(--warn); }

.banner {
  position: fixed; z-index: 35; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + var(--vv-top, 0px) + 48px);
  max-width: 656px; margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px;
  background: var(--toast-bg); color: var(--toast-ink); border-radius: 14px; padding: 4px 6px 4px 16px; font-size: 14px; font-weight: 600;
}
.banner span { padding-block: 10px; }
.banner a {
  color: var(--toast-ink); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* The toast (v14.md: it used to be a pill that wrapped into a blob): a card the width of the column, like the
   banner, the message on the left and the action a filled button on the right. The message may wrap; the button
   never does. */
.toast {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + var(--kb, 0px) + 12px);
  max-width: 656px; margin: 0 auto; transform: translateY(8px); opacity: 0; transition: opacity .2s, transform .2s;
  display: flex; align-items: center; gap: 12px; background: var(--toast-bg); color: var(--toast-ink);
  padding: 4px 4px 4px 16px; min-height: 48px; border-radius: 14px; box-shadow: 0 8px 24px var(--shadow);
  font-size: 14px; font-weight: 600; line-height: 1.3;
}
.toast.show { opacity: 1; transform: none; }
.toast-msg { flex: 1; min-width: 0; padding-block: 8px; overflow-wrap: anywhere; }
.toast-btn {
  flex: none; min-height: 40px; padding: 0 14px; border-radius: 10px; color: var(--toast-ink);
  background: var(--toast-btn); text-decoration: none;
}
.toast-btn:hover { background: var(--toast-btn-hover); }
.toast-btn:focus-visible, .banner a:focus-visible { outline-color: var(--toast-ink); }

/* A meal's sticker or Scoop's reaction to a workout (pixel art, assets/), standing on the date line's empty right
   end like a tiny figurine. Pixel art is only ever drawn at whole multiples (16px art at 32px, the 32px mascots at
   32 or 64px), never smoothed. */
.px { display: block; image-rendering: pixelated; }
.stand {
  position: absolute; top: 4px; right: 16px; width: 32px; height: 36px;
  --rim: transparent; --floor: rgba(43, 47, 54, .14);
}
.stand .px {
  width: 32px; height: 32px;
  filter: drop-shadow(2px 0 0 var(--rim)) drop-shadow(-2px 0 0 var(--rim)) drop-shadow(0 2px 0 var(--rim)) drop-shadow(0 -2px 0 var(--rim));
}
.stand::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 2px; background: var(--floor); }
.stand .f1 { position: absolute; top: 0; left: 0; opacity: 0; }
/* Tapping either plays a little trick (app.js tapStand); the tap area reaches 44px. */
.stand { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.stand::before { content: ""; position: absolute; inset: -6px; }
/* A meal's sticker sits centred on the date line, with no floor (the drawings fill their 16px tiles unevenly, so some
   would float above it). */
.sticker { top: 8px; right: 14px; height: 32px; }
.sticker::after { display: none; }
.spark { position: absolute; left: 14px; top: 14px; width: 4px; height: 4px; pointer-events: none; }
/* What Scoop says when he's tapped (app.js speak): a pixel dialogue box like an old handheld RPG's, beside him on
   the date line, its words typed out letter by letter. The frame is 2px with its corners notched off, so it reads as
   pixel art. Pixelify Sans: SIL Open Font License (fonts/pixelify-sans-OFL.txt). */
@font-face { font-family: "Pixelify Sans"; src: url(/pixelify-sans.woff2) format("woff2"); font-display: swap; }
.say {
  position: absolute; top: 6px; right: 58px; z-index: 2; pointer-events: none; white-space: nowrap;
  font: 400 14px/18px "Pixelify Sans", ui-monospace, monospace; padding: 7px 10px;
  --say-bg: #f8f8f8; --say-ink: #2b2f36; --say-frame: #1b1c1f; --say-line: #a9c4e4;
  background: var(--say-bg); color: var(--say-ink);
  box-shadow: inset 0 0 0 2px var(--say-bg), inset 0 0 0 4px var(--say-line),
    0 -2px 0 0 var(--say-frame), 0 2px 0 0 var(--say-frame), -2px 0 0 0 var(--say-frame), 2px 0 0 0 var(--say-frame);
}
/* The rest of the line holds the box at its full width while the words type out. */
.say-rest { visibility: hidden; }
@media (prefers-color-scheme: dark) { .say { --say-bg: #22252b; --say-ink: #e6e8ec; --say-frame: #e6e8ec; --say-line: #4a5d78; } }
/* On dark boxes the art's black outline disappears: a light rim keeps its shape. */
@media (prefers-color-scheme: dark) { .stand { --rim: rgba(255, 255, 255, .6); --floor: rgba(0, 0, 0, .45); } }

/* The mascot in the empty composer (app.js deliver): Sunny with a sticker, or Scoop; clipped to the composer. */
.sunny-pit { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.sunny { position: absolute; right: 18px; bottom: 0; width: 64px; height: 64px; transform: translateY(64px); }
.sunny .px { position: absolute; inset: 0; width: 64px; height: 64px; }
.sunny .f1 { opacity: 0; }
/* The two frames take turns: the first hides while the second shows (they're transparent, so both would draw). */
.waving .f0 { animation: unwave 1040ms steps(1, end) 2; }
.waving .f1 { animation: wave 1040ms steps(1, end) 2; }
@keyframes unwave { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes wave { 0% { opacity: 0; } 50% { opacity: 1; } }
.toss { position: fixed; left: 0; top: 0; width: 32px; height: 32px; z-index: 30; pointer-events: none; }

/* Lift history (v15.md). A lift's name gets a pixel pill: a flat fill with stepped 2px corners and a darker 2px lip,
   drawn as backgrounds so the text stays the system font. --f and --e are its fill and lip. */
.lift, .px-box {
  --f: var(--px-fill); --e: var(--px-edge);
  background:
    linear-gradient(var(--e), var(--e)) 4px 100% / calc(100% - 8px) 2px no-repeat,
    linear-gradient(var(--f), var(--f)) 4px 0 / calc(100% - 8px) calc(100% - 2px) no-repeat,
    linear-gradient(var(--f), var(--f)) 2px 2px / 2px calc(100% - 4px) no-repeat,
    linear-gradient(var(--f), var(--f)) right 2px top 2px / 2px calc(100% - 4px) no-repeat,
    linear-gradient(var(--f), var(--f)) 0 4px / 2px calc(100% - 8px) no-repeat,
    linear-gradient(var(--f), var(--f)) right 0 top 4px / 2px calc(100% - 8px) no-repeat;
}
/* A lift's pill is tinted with its box's strong colour (each pastel's own), so it reads on every pastel; the lip is
   that colour's darker shade. The strip's chips (.px-box, on the menu's white) keep the neutral grey. */
.lift { --f: color-mix(in srgb, var(--pk) var(--lift-fill), transparent); --e: color-mix(in srgb, var(--pkd) var(--lift-edge), transparent); }
/* On a logged box: 4px wider than the name, and a 44px tap area that doesn't change the line height. */
.text .lift {
  position: relative; cursor: pointer; padding: 1px 4px; margin: 0 -2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.text .lift::before { content: ""; position: absolute; inset: -12px -3px; }
.text .lift:hover { --f: color-mix(in srgb, var(--pk) var(--lift-fill-hover), transparent); }
.text .lift[aria-expanded="true"] { --f: var(--pk); --e: var(--pkd); color: var(--on-accent); }
/* In a draft the pill sits in the mirror under the textarea, so it can't add width: its padding is cancelled by a
   negative margin, and the textarea's own text shows over it. */
.mirror .lift { visibility: visible; color: transparent; padding: 1px 2px; margin: 0 -2px; }
.mirror .lift.pr { --f: var(--pr-wash); --e: var(--pr-edge); }
/* A draft's pill whose strip is open: filled like a logged one. Its text is drawn over the textarea's while that isn't
   focused (the same glyphs in the same place), so it's light on the strong colour; typing closes the strip. */
.mirror .lift.on, .mirror .lift.found { --f: var(--pk); --e: var(--pkd); }
.grow:not(:focus-within) > .mirror .lift:is(.on, .found) { position: relative; z-index: 1; color: var(--on-accent); }
/* A pill deleted whole (Backspace after it): filled for a moment where it was, then gone. */
.grow > .lift.gone { position: absolute; pointer-events: none; --f: var(--pk); --e: var(--pkd); }
/* While typing, the textarea's dark text stays on top, so the open pill only tints deeper. */
.grow:focus-within > .mirror .lift.on { --f: color-mix(in srgb, var(--pk) var(--lift-fill-hover), transparent); }
/* The sparkle when a lift is recognised: a 2px pixel and its cross (box-shadow, in currentColor), two frames. */
.spk { position: absolute; width: 2px; height: 2px; pointer-events: none; opacity: 0; transform: scale(2); background: var(--spark-core); color: var(--spark); }
.spk.gold { transform: scale(3); background: var(--spark-seed); color: var(--spark-core); }
/* A new best top set: a tiny pixel badge, gold with stepped corners and a 2px lip. */
.prchip {
  display: inline-block; height: 16px; padding: 0 5px 2px; font-size: 10px; font-weight: 800; line-height: 14px; letter-spacing: .04em;
  color: var(--pr-ink); white-space: nowrap; pointer-events: none; vertical-align: 2px; margin-left: 6px;
  clip-path: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px);
  background: linear-gradient(var(--pr-lip), var(--pr-lip)) 0 100% / 100% 2px no-repeat, var(--pr-fill);
}
.grow .prchip { position: absolute; z-index: 1; margin: 0; }

/* The strip: the lift's history, opened under its sets line. A pixel frame, with the box's strong colour inside. */
:root {
  --clip4: polygon(calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0);
}
.strip {
  display: block; white-space: normal; margin: 8px -14px 10px; padding: 2px 2px 4px; cursor: default; font-size: 15px; line-height: 1.4;
  background: linear-gradient(var(--px-lip), var(--px-lip)) 0 100% / 100% 4px no-repeat, var(--px-frame); clip-path: var(--clip4);
}
.strip-in { background: var(--menu-bg); clip-path: var(--clip4); padding: 10px 10px 6px; color: var(--ink); }
.lhead { display: flex; align-items: flex-start; gap: 8px; }
.lname { flex: 1; min-width: 0; }
.lname b { display: block; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.facts { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.sclose { width: 44px; height: 44px; margin: -10px -8px -8px 0; border: 0; background: none; color: var(--muted); cursor: pointer; flex: none; display: grid; place-items: center; }
.sclose svg { width: 14px; height: 14px; fill: currentColor; shape-rendering: crispEdges; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 4px; margin: 8px 0 12px; }
.tile { background: var(--tile); clip-path: var(--clip4); padding: 6px 8px 7px; min-width: 0; }
.tile .tl { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.tile .tv { font-size: 18px; font-weight: 650; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tile .tv small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.tile .ts { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctitle { font-size: 12px; font-weight: 700; margin: 0 0 2px; }
.ctitle span { font-weight: 500; color: var(--muted); }
.chart { position: relative; margin: 0 -2px; }
.chart svg { display: block; overflow: visible; shape-rendering: crispEdges; font-family: inherit; }
.chart .st, .chart .rp { fill: var(--pk); }
.chart .gl { fill: var(--line); }
.chart .wash { fill: var(--pk); opacity: .14; }
.chart .ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .lb { fill: var(--ink); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cols { position: absolute; inset: 0; }
.cols button { position: absolute; top: 0; bottom: 0; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; }
.cols button:focus-visible { outline-offset: -2px; }
.day { margin: 8px 0 2px; padding: 8px 10px; background: var(--tile); clip-path: var(--clip4); font-size: 14px; }
.day .dh { font-size: 12px; font-weight: 700; color: var(--muted); }
.day .dh b { color: var(--ink); }
.day .sets { font-size: 15px; overflow-wrap: anywhere; }
.day .sets b { font-weight: 700; }
.day .sets .bad { color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
.day .dn { font-size: 12px; color: var(--muted); margin-top: 2px; }
/* The last sessions: the date as a tear-off, then the sets line as written with the top set in bold. */
.rows { list-style: none; margin: 10px 0 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; min-height: 52px; padding: 9px 2px;
  color: var(--cue-ink); text-decoration: none; background: repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 4px) top / 100% 2px no-repeat;
}
a.row:hover { background-color: var(--tile); }
.row.cur { background-color: var(--pill); }
.row .d { display: flex; flex-direction: column; align-items: center; font-size: 19px; line-height: 1; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; padding-top: 2px; }
.row .d small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.row .s { min-width: 0; font-size: 15px; line-height: 1.35; padding-top: 1px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.row .s b { color: var(--ink); font-weight: 700; }
.row .as { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.strip-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--accent);
}
.more { width: 100%; padding: 0 4px; background: repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 4px) top / 100% 2px no-repeat; }
/* Also logged as: the spellings counted as this lift, each with how it joined; tap one to fix it. */
.assoc { margin-top: 10px; font-size: 13px; color: var(--muted); }
.assoc .al { font-weight: 700; color: var(--label); }
.chips { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0 -2px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; border: 0; background: none; cursor: pointer; font: inherit; color: var(--ink); max-width: 100%; }
.chip .cv { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 9px 6px; font-size: 14px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; text-align: left; }
.chip .p { font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); white-space: nowrap; }
.chip.near .cv { --f: var(--warn-soft); }
.chip.near .p { color: var(--warn); }
.chip[aria-expanded="true"] .cv { --f: var(--pk); --e: var(--pkd); color: var(--on-accent); }
.chip[aria-expanded="true"] .p { color: var(--on-accent); }
.fix { margin: 2px 0 0; padding: 10px 10px 6px; font-size: 14px; color: var(--cue-ink); --f: var(--pill); --e: var(--line); }
.fix b { color: var(--ink); }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin: 2px -6px 0; }
.acts .split { color: var(--warn); }
.acts .quiet { color: var(--muted); font-weight: 600; }
.sameas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.sameas select {
  font: inherit; font-size: 16px; min-height: 44px; max-width: 100%; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 8px; padding: 0 8px;
}

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

/* Today's draft (v16.md): the box's editor while its "interactive" switch is on (draft.js). Every colour is the
   box's ink mixed into its pastel, so it holds on all seven, light and dark. */
.entry.drafting { --ink2: color-mix(in srgb, var(--ink) 62%, var(--pc)); --ink3: color-mix(in srgb, var(--ink) 34%, var(--pc)); --ink4: color-mix(in srgb, var(--ink) 12%, var(--pc)); }
.entry.draft:not(.drafting) { --ink2: color-mix(in srgb, var(--ink) 62%, var(--pc)); --ink3: color-mix(in srgb, var(--ink) 34%, var(--pc)); }
/* The switch beside the date: a pill in the box's strong colour with a knob, filled when on. */
.dsw { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 7px 0 4px; border-radius: 999px; border: 1.5px solid var(--pk); background: none; color: var(--pk); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.dsw::before { content: ""; position: absolute; inset: -10px -4px; }
.dsw .knob { width: 18px; height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--pk) 25%, transparent); position: relative; }
.dsw .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--pk); transition: transform .2s ease; }
.dsw[aria-checked="true"] { background: var(--pk); color: var(--on-accent); }
.dsw[aria-checked="true"] .knob { background: color-mix(in srgb, var(--on-accent) 35%, transparent); }
.dsw[aria-checked="true"] .knob::after { transform: translateX(6px); background: var(--on-accent); }
/* Asking for a suggestion (v17.md): the knob slides back and forth until the answer. */
.dsw[aria-busy="true"] .knob::after { animation: dswbusy .7s ease-in-out infinite alternate; }
@keyframes dswbusy { from { transform: translateX(0); } to { transform: translateX(6px); } }
/* A suggestion's other titles under the title line: "or  shoulders and abs  back and biceps". */
.dor { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; margin: 2px 0 -6px -4px; }
.dor .k { font-size: 12px; font-weight: 700; color: var(--ink3); padding-left: 4px; }
.dor .dtx { min-height: 36px; color: var(--pk); }
.drafting .cue.gold { color: var(--spark); font-weight: 800; letter-spacing: .04em; }
/* Scoop stands at the date row's right end (.stand); the switch keeps clear of him. */
.drafting .meta { padding-right: 36px; }
.dright { display: flex; align-items: center; margin-left: -4px; }
.dtx { background: none; border: 0; min-height: 44px; min-width: 40px; padding: 0 4px; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--label); cursor: pointer; }
.dtx[disabled] { color: var(--ink4); cursor: default; }

/* The body: the title line, then each lift's pill, its sets line in the user's format, the current set unfurled. */
.dft { white-space: normal; }
.dtitle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; white-space: pre-wrap; }
.dtitle .cue { font-weight: 600; }
.dft .lb { margin-top: 1.5em; position: relative; }
.dft .lift { font: inherit; border: 0; cursor: pointer; color: inherit; padding: 1px 4px; margin: 0 -2px; text-align: left; }
.dft .lift[aria-expanded="true"] { --f: var(--pk); --e: var(--pkd); color: var(--on-accent); }
.dsets { font-variant-numeric: tabular-nums; line-height: 1.5; }
.dsets .sl { color: var(--ink3); }
.tok { background: none; border: 0; padding: 10px 2px; margin: -10px -2px; cursor: pointer; white-space: nowrap; font: inherit; line-height: 1.5; color: var(--ink3); text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--ink3); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.tok.done { color: var(--ink); text-decoration-color: transparent; }
.tok.changed { text-decoration-style: wavy; text-decoration-thickness: 1px; }
.tok.now { color: var(--ink2); text-decoration-style: solid; text-decoration-color: var(--ink2); }
.tok.sel { text-decoration-style: solid; text-decoration-color: var(--ink); }
.tok.wipe { background: linear-gradient(90deg, var(--ink) 50%, var(--ink3) 50%) 100% 0 / 200% 100% no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.dft .keep { white-space: nowrap; }
.dft .fact { font-size: 13px; line-height: 1.45; color: var(--ink2); margin-top: 6px; }
.dft .fact.pr { color: var(--ink); }
.dhist { font-size: 13px; line-height: 1.45; color: var(--ink2); margin: 6px 0 8px; }
.dhist .hr { display: flex; gap: 8px; align-items: baseline; }
.dhist .hd { font-weight: 700; color: var(--ink3); min-width: 3.6em; }
.dhist .hl { color: var(--ink); overflow-wrap: anywhere; }
.dhist .ht { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pk); }
/* The current set, unfurled under the plan: big light numerals and the check. */
.stage { display: flex; align-items: center; gap: 12px; margin-top: 6px; min-height: 60px; transform-origin: top left; }
.cur { flex: 1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; padding: 6px 0; text-align: left; cursor: pointer; min-width: 0; color: inherit; -webkit-tap-highlight-color: transparent; }
.cur .big { font-size: 34px; font-weight: 300; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cur .x { font-size: 20px; font-weight: 300; color: var(--ink3); }
.cur .u { font-size: 13px; color: var(--ink2); }
.cur .sn { flex-basis: 100%; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); margin-top: 6px; }
.cur .big.changed { text-decoration: underline; text-decoration-style: wavy; text-decoration-color: var(--ink3); text-decoration-thickness: 1px; text-underline-offset: 6px; }
/* The check: a heavy ring in full ink with "done" under it, so it reads as the thing to press (a bare 2px ring read as
   decoration; the owner's pick of the 2026-11-08 prototypes). */
.chk { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 56px; padding: 2px 6px 0; margin-right: -6px; background: none; border: 0; cursor: pointer; border-radius: 12px; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.chk svg { width: 46px; height: 46px; display: block; overflow: visible; }
.chk .ring { fill: color-mix(in srgb, var(--ink) 5%, transparent); stroke: var(--ink); stroke-width: 3; }
.chk .tick { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; }
.chk .cl { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; pointer-events: none; }
.chk:active .ring { fill: color-mix(in srgb, var(--ink) 14%, transparent); }
.chk.on .tick { stroke-dashoffset: 0; }
.chk.gold .ring { fill: none; stroke: var(--spark); }
.chk.gold .tick { stroke: var(--spark); }

/* The order is the workout as done (draft-lib.js): a hairline where the lifts not started yet begin, and the lift that
   moves up on its first check riding over the ones sliding down under it. */
.dtodo { display: flex; align-items: center; gap: 10px; margin: 1.7em 0 -.55em; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.dtodo::after { content: ""; flex: 1; height: 1px; background: var(--ink4); }
.dft .lb.lifting { z-index: 3; border-radius: 10px; background: var(--pc); box-shadow: 0 0 0 10px var(--pc), 0 16px 30px -12px rgba(43, 47, 54, .3); transition: box-shadow .22s ease; }
.dft .lb.lifting.settle { box-shadow: 0 0 0 10px var(--pc), 0 0 0 0 transparent; }
@media (prefers-color-scheme: dark) { .dft .lb.lifting { box-shadow: 0 0 0 10px var(--pc), 0 16px 30px -12px rgba(0, 0, 0, .65); } }

/* Scoop's first-run hello (draft.js): under the ring, Scoop at 64px rising out of the line, his dialogue box (.say's
   frame and font) beside him with a stepped tail. The row is the tap target; it folds away when he goes. */
.dhello { display: flex; justify-content: flex-end; align-items: flex-end; gap: 6px; margin: 2px -9px 0 0; padding-top: 4px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dhello .pit, .dpeek { --rim: transparent; --floor: rgba(43, 47, 54, .14); }
.dhello .pit { position: relative; width: 64px; height: 70px; overflow: hidden; flex: none; }
.dhello .fig { position: absolute; left: 0; bottom: 4px; width: 64px; height: 64px; transform: translateY(70px); }
.dhello .px, .dpeek .px { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated;
  filter: drop-shadow(2px 0 0 var(--rim)) drop-shadow(-2px 0 0 var(--rim)) drop-shadow(0 2px 0 var(--rim)) drop-shadow(0 -2px 0 var(--rim)); }
.dhello .f1, .dpeek .f1 { opacity: 0; }
.dhello .pit::after, .dpeek::after { content: ""; position: absolute; bottom: 2px; height: 2px; background: var(--floor); opacity: 0; }
.dhello .pit::after { left: 10px; right: 10px; }
.dhello .pit.up::after, .dpeek.up::after { opacity: 1; }
.dhello .fig.loop .f0 { animation: unwave 1040ms steps(1, end) infinite; }
.dhello .fig.loop .f1 { animation: wave 1040ms steps(1, end) infinite; }
.dsay {
  --say-bg: #f8f8f8; --say-ink: #2b2f36; --say-frame: #1b1c1f; --say-line: #a9c4e4;
  position: relative; flex: 0 1 220px; margin: 0 12px 26px 4px; text-align: left;
  font: 400 14px/18px "Pixelify Sans", ui-monospace, monospace; padding: 8px 11px 9px;
  background: var(--say-bg); color: var(--say-ink);
  box-shadow: inset 0 0 0 2px var(--say-bg), inset 0 0 0 4px var(--say-line),
    0 -2px 0 0 var(--say-frame), 0 2px 0 0 var(--say-frame), -2px 0 0 0 var(--say-frame), 2px 0 0 0 var(--say-frame);
}
.dsay::before { content: ""; position: absolute; right: -10px; bottom: 10px; width: 8px; height: 12px; background: var(--say-frame);
  clip-path: polygon(0 0, 4px 0, 4px 2px, 6px 2px, 6px 4px, 8px 4px, 8px 8px, 6px 8px, 6px 10px, 4px 10px, 4px 12px, 0 12px); }
.dsay::after { content: ""; position: absolute; right: -6px; bottom: 12px; width: 6px; height: 8px; background: var(--say-bg);
  clip-path: polygon(0 0, 2px 0, 2px 2px, 4px 2px, 4px 6px, 2px 6px, 2px 8px, 0 8px); }
.dsay .ty { visibility: hidden; }
.dsay b { font-weight: 400; color: var(--pkd); }
/* Now and then on a done set: a 32px figurine at the right end of the lift's name line, as Scoop stands on a logged
   workout (.stand). At Finish, Scoop and Sunny's high five at the box's foot, side by side. */
.dpeek { position: absolute; right: 0; top: -14px; width: 32px; height: 38px; overflow: hidden; pointer-events: none; z-index: 2; }
.dpeek::after { left: 6px; right: 6px; }
.dpeek .fig { position: absolute; left: 0; bottom: 4px; width: 32px; height: 32px; transform: translateY(36px); }
.dpeek.five { top: auto; bottom: 12px; right: 14px; width: 64px; }
.dpeek.five .fig { width: 64px; display: flex; }
.dpeek.five .pair { position: relative; width: 32px; height: 32px; }
.dsheen { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 3; }
.dsheen i { position: absolute; top: 0; bottom: 0; left: 0; width: 55%;
  background: linear-gradient(105deg, transparent 0%, color-mix(in srgb, var(--spark) 6%, transparent) 30%, color-mix(in srgb, var(--spark) 16%, transparent) 50%, color-mix(in srgb, var(--spark) 6%, transparent) 70%, transparent 100%); }
@media (prefers-color-scheme: dark) {
  .dsay { --say-bg: #22252b; --say-ink: #e6e8ec; --say-frame: #e6e8ec; --say-line: #4a5d78; }
  .dsay b { color: var(--pk); }
  .dhello .pit, .dpeek { --rim: rgba(255, 255, 255, .6); --floor: rgba(0, 0, 0, .45); }
}
/* The rest timer: a hairline that drains under the sets line, the time big and light beside it. Past zero the line
   turns the box's strong colour and the time counts up. It never sits in the way of the next check. */
.drest { display: flex; align-items: center; gap: 14px; min-height: 52px; margin: 2px 0 -4px; }
.drest .rbar, .dstick .rbar { flex: 1; height: 3px; border-radius: 2px; background: var(--ink4); overflow: hidden; position: relative; }
.rbar i { display: block; height: 100%; border-radius: 2px; background: var(--ink); transform-origin: left center; transition: transform .9s linear; }
.rbar .sweep { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 20%, var(--spark) 50%, transparent 80%); pointer-events: none; }
.rlab { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); width: 3.2em; text-align: right; }
.rnum { font-size: 30px; font-weight: 300; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 3.3ch; text-align: right; color: var(--ink); }
.rlen { background: none; border: 0; min-height: 44px; min-width: 44px; padding: 0 8px; margin-right: -8px; font: inherit; font-size: 12px; font-weight: 700; color: var(--label); cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--ink3); text-underline-offset: 4px; }
.over .rbar i { background: var(--pk); transform: none !important; }
.over .rnum, .over .rlab { color: var(--pk); }
/* The same timer, pinned under the page's top bar while its own row is scrolled away. It takes its box's colours. */
.dstick { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + var(--vv-top, 0px) + 52px); z-index: 29; background: var(--pc); box-shadow: 0 1px 0 var(--ink4); transition: transform .2s ease, opacity .2s ease; }
.dstick.off { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.dstick .in { max-width: 680px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 12px; min-height: 44px; }
.dstick .rnum { font-size: 22px; min-width: 3.4ch; }
.dstick .rlab { width: auto; }
/* Changing a set: reps and weight as big light numerals with a − and + either side. */
.ded { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--ink4); }
.edg { display: flex; align-items: center; }
.edg .k { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); width: 34px; }
.edg .n { font-size: 30px; font-weight: 300; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 3.4ch; text-align: center; }
.edb { width: 44px; height: 44px; background: none; border: 0; font: inherit; font-size: 22px; font-weight: 300; color: var(--ink2); cursor: pointer; }
.edf { flex-basis: 100%; display: flex; justify-content: flex-end; gap: 4px; margin-right: -4px; }
/* The footer: how far along, and Finish. */
.dfoot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.dfoot .prog { flex: 1; text-align: right; }
.dfoot .prog { font-size: 12px; font-weight: 700; color: var(--ink3); }
.fin { background: none; border: 0; min-height: 44px; padding: 0 10px; margin-right: -10px; font: inherit; font-size: 15px; font-weight: 700; color: var(--pk); cursor: pointer; }
.fin[disabled] { color: var(--ink4); cursor: default; }

/* A suggestion arriving (v17.md, sweep.js): the asking pill over the first line, with the pixel spoon stirring; then
   the writing head travelling down the editor, each row written in above it with a shimmer through the box inks,
   what was there waiting dimmed below; then the head flies into the switch. */
.dask { position: relative; min-height: 28px; }
.dft { position: relative; }
.dft.sweeping { pointer-events: none; padding-bottom: 34px; }
.dhead { position: absolute; left: 0; top: 0; z-index: 3; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; pointer-events: none; transition: top .24s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 5px 16px rgba(0, 0, 0, .14), 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.dstir { position: relative; width: 16px; height: 16px; flex: none; }
.dstir .px { position: absolute; inset: 0; width: 16px; height: 16px; image-rendering: pixelated; }
.dstir .f1 { transform: scaleX(-1); opacity: 0; }
.dstir.on .f0 { animation: dunstir 640ms steps(1, end) infinite; }
.dstir.on .f1 { animation: dstir 640ms steps(1, end) infinite; }
@keyframes dunstir { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes dstir { 0% { opacity: 0; } 50% { opacity: 1; } }
/* Under the head: the box's lines as they were (the typed text, the placeholder, or the session being swapped out). */
.dbelow { pointer-events: none; }
.dask > .dbelow > :first-child { opacity: .3; }
.dbelow > * { transition: opacity .2s ease; }
.dbelow > .under { opacity: .3; }
.dln { white-space: pre-wrap; overflow-wrap: anywhere; }
.dln.gap { margin-top: 1.5em; }
.dln.ph { color: var(--faint); }
/* The freshest row's text runs through the box inks and settles to its own colour (--c). */
.dsh { --c: var(--ink); }
.tok.dsh { --c: var(--ink3); } .tok.done.dsh { --c: var(--ink); } .sl.dsh, .dor .k.dsh { --c: var(--ink3); } .dtx.dsh { --c: var(--pk); } .cue.dsh { --c: var(--cue-ink); } .fact.dsh { --c: var(--ink2); }
.dfresh { background: linear-gradient(90deg, var(--c) 0 32%, var(--k0) 40%, var(--k2) 47%, var(--k4) 54%, var(--k1) 61%, var(--c) 68% 100%) 100% 0 / 320% 100% no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent !important; }

/* An empty log (v19.md, decision 10): the thread is the way in, the composer under it the other way. The QR stays
   black on white in dark mode: cameras read it best that way. */
.start-card { background: var(--p3); border-radius: 14px; padding: 18px 16px 16px; margin: 4px 0 14px; }
.start-card h2 { font-size: 20px; line-height: 1.3; margin: 0 0 6px; }
.start-card p { margin: 0 0 12px; }
.start-card-btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 12px; font-weight: 600;
  background: var(--accent); color: var(--on-accent); text-decoration: none; margin-bottom: 12px;
}
.start-card-qr { display: block; width: 160px; height: 160px; border-radius: 10px; background: #ffffff; margin: 0 0 12px; }
.start-card .start-card-or { margin: 0; font-size: 15px; color: var(--muted); }
