/* Papermint player cards: the pages X runs inside a tweet (twitter:player).
   One 640x480 stage, scaled to whatever frame X gives it. In a tall frame
   (X on phones opens the page in a panel that covers the bottom 30%), the
   stage switches to a 420x640 portrait layout whose last 30% holds nothing
   that matters. Plain colours only: paper, ink and the app's own pigment. */

:root {
  --paper: #faf8f2;
  --paper-deep: #f2eee3;
  --ink: #1c2420;
  --ink-soft: #4a544e;
  --ink-faint: #8a938d;
  --line: rgba(28, 36, 32, 0.12);
  --deep: #2a8a66;
  --fill: #3db48a;
  --wash: #e3f4ec;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 640px;
  height: 480px;
  transform-origin: 50% 50%;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 16px;
  padding: 30px 22px 26px 30px;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.stage.ready { opacity: 1; }

/* ---------- The left column: who, what, price, the one button ---------- */

.copy { display: flex; flex-direction: column; min-width: 0; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.brand b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.brand small { display: block; font-size: 11.5px; color: var(--ink-faint); margin-top: 1px; }

.headline {
  font-family: var(--serif);
  font-variation-settings: "opsz" 96, "SOFT" 30;
  font-weight: 600;
  font-size: 33px;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-top: 26px;
}
.headline em { font-style: normal; color: var(--deep); display: block; }

.sub { font-size: 14px; line-height: 1.45; color: var(--ink-soft); margin-top: 12px; }

.price { margin-top: auto; font-size: 12.5px; color: var(--ink-soft); }
.price b { color: var(--ink); font-weight: 600; }

.cta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14.5px;
  font-weight: 600;
  align-self: flex-start;
  white-space: nowrap;
  transition: transform 0.25s var(--spring), background 0.2s;
}
.cta:hover { transform: translateY(-2px); background: var(--deep); }
.cta:active { transform: scale(0.97); }
.cta svg { width: 15px; height: 15px; }
.cta.soon { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }

.site { margin-top: 10px; font-size: 11.5px; color: var(--ink-faint); }
.site:hover { color: var(--deep); }

/* Entrance: the copy rises in, one line after another. */
.copy > * { opacity: 0; transform: translateY(10px); }
.ready .copy > * { animation: rise 0.7s var(--ease) forwards; }
.ready .copy > :nth-child(2) { animation-delay: 0.08s; }
.ready .copy > :nth-child(3) { animation-delay: 0.16s; }
.ready .copy > :nth-child(4) { animation-delay: 0.24s; }
.ready .copy > :nth-child(5) { animation-delay: 0.3s; }
.ready .copy > :nth-child(6) { animation-delay: 0.36s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- The right side: a 320x320 scene on the app's wash ---------- */

.panel {
  position: relative;
  border-radius: 26px;
  background: var(--wash);
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96);
}
.ready .panel { animation: pop 0.8s var(--spring) 0.15s forwards; }
@keyframes pop { to { opacity: 1; transform: none; } }

.scene {
  position: relative;
  width: 320px;
  height: 320px;
  flex: none;
  transform: scale(var(--scene-scale, 0.96));
}

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--deep);
  opacity: 0.75;
}

/* ---------- Portrait: X's phone panel ---------- */

.portrait .stage {
  width: 420px;
  height: 640px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 300px 1fr;
  gap: 14px;
  padding: 22px 20px 0;
}
.portrait .copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 12px; }
.portrait .brand { grid-column: 1 / -1; }
.portrait .headline { grid-column: 1 / -1; font-size: 30px; margin-top: 16px; }
.portrait .headline em { display: inline; }
.portrait .sub { grid-column: 1 / -1; font-size: 13.5px; margin-top: 8px; }
.portrait .price { grid-column: 1; margin-top: 14px; align-self: center; }
.portrait .cta { grid-column: 2; grid-row: 4 / span 2; margin-top: 14px; height: 42px; align-self: center; }
.portrait .site { display: none; }
.portrait .panel { --scene-scale: 0.88; }
.portrait .foot {
  display: block;
  padding-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-faint);
}
.foot { display: none; }

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  transition: transform 0.2s var(--spring), border-color 0.2s, background 0.2s;
}
.chip:hover { border-color: var(--deep); }
.chip:active { transform: scale(0.94); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.sheet {
  position: absolute;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
}

/* =====================================================================
   Studio: the seven apps on a slow ring around the one in the middle.
   ===================================================================== */

.ring { position: absolute; inset: 0; }
.ring-track {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1.5px dashed rgba(42, 138, 102, 0.28);
}
.ring-spin { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.ring:hover .ring-spin, .ring:hover .ring-spin .ring-icon { animation-play-state: paused; }
.ring-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px;
  transform: rotate(var(--a)) translateY(-132px) rotate(calc(-1 * var(--a)));
}
.ring-icon button {
  width: 52px;
  height: 52px;
  display: block;
  border-radius: 13px;
  animation: spin 60s linear infinite reverse;
}
.ring-icon img {
  width: 100%;
  height: 100%;
  border-radius: 13px;
  display: block;
  transition: transform 0.35s var(--spring);
}
.ring-icon button:hover img { transform: scale(1.12); }
.ring-icon.on img { transform: scale(1.18); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--ac); }
@keyframes spin { to { transform: rotate(360deg); } }

.ring-centre {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 168px;
  height: 168px;
  margin: -84px;
  border-radius: 50%;
  background: var(--bg, #fff);
  transition: background 0.6s var(--ease);
  display: grid;
  place-items: center;
  text-align: center;
}
.ring-centre a { display: grid; justify-items: center; padding: 0 16px; }
.ring-centre img { width: 46px; height: 46px; border-radius: 11px; }
.ring-centre b { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.02em; margin-top: 7px; color: var(--ac); }
.ring-centre span { font-size: 11.5px; line-height: 1.3; color: var(--ink-soft); margin-top: 3px; }
.ring-centre small { font-size: 10.5px; font-weight: 600; margin-top: 6px; color: var(--ac); }
.ring-centre .swap { animation: swap 0.55s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px) scale(0.96); } }

/* =====================================================================
   Whittle: speak, and the words land on the page.
   ===================================================================== */

.wh-card { inset: 18px 14px 74px; padding: 18px 18px 0; overflow: hidden; }
.wh-status { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; color: var(--deep); height: 16px; }
.wh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fill); animation: blink 1.1s ease-in-out infinite; }
.wh-status.done .wh-dot { animation: none; background: var(--ink-faint); }
@keyframes blink { 50% { opacity: 0.25; } }
.wh-time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-faint); font-weight: 500; }

.wh-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 12px;
  min-height: 0;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.6s var(--ease), opacity 0.5s, margin 0.6s;
}
.wh-title.show { max-height: 48px; opacity: 1; }
.wh-tags { display: flex; gap: 6px; margin-top: 8px; height: 0; overflow: visible; }
.wh-tags.show { height: 22px; }
.wh-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--deep);
  opacity: 0;
  transform: scale(0.6);
}
.wh-tags.show .wh-tag { animation: pop 0.5s var(--spring) forwards; }
.wh-tags.show .wh-tag:nth-child(2) { animation-delay: 0.1s; }
.wh-tags.show .wh-tag:nth-child(3) { animation-delay: 0.2s; }

.wh-text { font-size: 14.5px; line-height: 1.55; margin-top: 12px; color: var(--ink); }
.wh-text span { display: inline-block; opacity: 0; filter: blur(4px); transform: translateY(5px); animation: word 0.45s var(--ease) forwards; margin-right: 0.27em; }
.wh-text span.dim { color: var(--ink-faint); }
@keyframes word { to { opacity: 1; filter: none; transform: none; } }

.wh-wave { position: absolute; left: 18px; right: 18px; bottom: 16px; height: 34px; display: flex; align-items: center; gap: 3px; transition: opacity 0.4s; }
.wh-wave i { flex: 1; height: 4px; border-radius: 3px; background: var(--fill); transition: height 0.12s ease-out; }
.wh-status.done ~ .wh-wave { opacity: 0; }

.wh-mic {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  border-radius: 50%;
  background: var(--fill);
  display: grid;
  place-items: center;
  transition: transform 0.3s var(--spring), border-radius 0.3s var(--ease);
}
.wh-mic:hover { transform: scale(1.06); }
.wh-mic:active { transform: scale(0.92); }
.wh-mic svg { width: 22px; height: 22px; color: #fff; }
.wh-mic::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px solid var(--fill);
  opacity: 0;
}
.wh-mic.live::before { animation: ripple 1.6s ease-out infinite; }
@keyframes ripple { from { opacity: 0.6; transform: scale(0.9); } to { opacity: 0; transform: scale(1.35); } }

/* =====================================================================
   Keepers: a stack of photos you swipe.
   ===================================================================== */

.kp-deck { position: absolute; left: 30px; top: 22px; width: 260px; height: 200px; }
.kp-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #ddd center / cover no-repeat;
  border: 5px solid #fff;
  touch-action: none;
  cursor: grab;
  transition: transform 0.45s var(--spring), opacity 0.3s;
  will-change: transform;
}
.kp-card.dragging { transition: none; cursor: grabbing; }
.kp-card.gone { transition: transform 0.55s var(--ease), opacity 0.55s; opacity: 0; }
.kp-stamp {
  position: absolute;
  top: 14px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 2.5px solid;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
}
.kp-stamp.keep { left: 14px; color: var(--deep); transform: rotate(-12deg); }
.kp-stamp.del { right: 14px; color: #c2410c; transform: rotate(12deg); }

.kp-actions { position: absolute; left: 0; right: 0; top: 240px; display: flex; justify-content: center; gap: 22px; }
.kp-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--spring);
}
.kp-btn:hover { transform: scale(1.08); }
.kp-btn:active { transform: scale(0.9); }
.kp-btn svg { width: 22px; height: 22px; }
.kp-btn.del svg { color: #c2410c; }
.kp-btn.keep svg { color: var(--deep); }
.kp-tally { position: absolute; left: 0; right: 0; top: 300px; text-align: center; font-size: 11.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.kp-tally b { color: var(--deep); }
.kp-done {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--deep);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.4s, transform 0.5s var(--spring);
  pointer-events: none;
}
.kp-done.show { opacity: 1; transform: none; }
.kp-done small { display: block; font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--ink-soft); margin-top: 4px; }

/* =====================================================================
   Sketchy: type an idea, watch it drawn, tap to colour it in.
   ===================================================================== */

.sk-prompt {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 6px;
  height: 40px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 6px 0 16px;
  font-size: 13px;
}
.sk-prompt input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; background: transparent; color: var(--ink); }
.sk-prompt button {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: transform 0.2s var(--spring);
}
.sk-prompt button:active { transform: scale(0.94); }

.sk-page {
  position: absolute;
  left: 50%;
  top: 58px;
  width: 192px;
  height: 256px;
  margin-left: -96px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transform: rotate(-1.5deg);
}
.sk-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sk-line { -webkit-mask: linear-gradient(#000 0 0) top / 100% var(--draw, 0%) no-repeat; mask: linear-gradient(#000 0 0) top / 100% var(--draw, 0%) no-repeat; }
.sk-colour { clip-path: circle(var(--fillr, 0%) at var(--fx, 50%) var(--fy, 50%)); }
.sk-pencil {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--draw, 0%);
  height: 2px;
  background: var(--fill);
  opacity: 0;
}
.sk-page.drawing .sk-pencil { opacity: 1; }
.sk-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-size: 11px;
  color: var(--deep);
  height: 14px;
}

/* =====================================================================
   Lumen: a folder of photos; search what is in them, pick the keepers.
   ===================================================================== */

.lu-search {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 4px;
  height: 36px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
}
.lu-search svg { width: 15px; height: 15px; color: var(--ink-faint); flex: none; }
.lu-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; background: transparent; color: var(--ink); }
.lu-search small { font-size: 11px; color: var(--deep); font-weight: 600; white-space: nowrap; }

.lu-grid { position: absolute; left: 10px; right: 10px; top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.lu-ph {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  overflow: hidden;
  background: #ccc center / cover no-repeat;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--spring), filter 0.45s;
}
.lu-ph.out { opacity: 0.18; transform: scale(0.9); filter: grayscale(1); }
.lu-ph.hit { animation: hit 0.6s var(--spring); }
@keyframes hit { 40% { transform: scale(1.06); } }
.lu-ph::after { content: ""; position: absolute; inset: 0; border-radius: 8px; border: 3px solid var(--fill); opacity: 0; transition: opacity 0.25s; }
.lu-ph.pick::after { opacity: 1; }
.lu-flag {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--fill);
  display: grid;
  place-items: center;
  transform: scale(0);
  transition: transform 0.35s var(--spring);
}
.lu-flag svg { width: 11px; height: 11px; color: #fff; }
.lu-ph.pick .lu-flag { transform: scale(1); }
.lu-stars { position: absolute; left: 6px; bottom: 4px; font-size: 10px; letter-spacing: 1px; color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.3s; }
.lu-ph.pick .lu-stars { opacity: 1; }
.lu-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: transform 0.7s var(--ease), opacity 0.3s;
  opacity: 0;
  z-index: 3;
}
.lu-bar { position: absolute; left: 10px; right: 10px; top: 286px; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-soft); }
.lu-bar b { color: var(--deep); }

/* =====================================================================
   PennyBook: entries land, the month adds up.
   ===================================================================== */

.pb-top { position: absolute; left: 14px; right: 14px; top: 4px; height: 96px; display: flex; align-items: center; gap: 16px; padding: 0 16px; }
.pb-ring { width: 72px; height: 72px; flex: none; transform: rotate(-90deg); }
.pb-ring circle { fill: none; stroke-width: 11; transition: stroke-dasharray 0.8s var(--ease), stroke-dashoffset 0.8s var(--ease); }
.pb-sum small { font-size: 11px; color: var(--ink-faint); display: block; }
.pb-sum b { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.pb-sum span { font-size: 11px; color: var(--deep); font-weight: 600; }

.pb-list { position: absolute; left: 14px; right: 14px; top: 112px; height: 146px; overflow: hidden; padding: 4px 14px; }
.pb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  animation: drop 0.55s var(--spring);
}
.pb-row:last-child { border-bottom: 0; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(0.97); } }
.pb-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.pb-row em { font-style: normal; flex: 1; }
.pb-row em small { display: block; font-size: 10.5px; color: var(--ink-faint); }
.pb-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pb-row b.in { color: #2f8a57; }
.pb-chips { position: absolute; left: 0; right: 0; top: 272px; display: flex; justify-content: center; gap: 7px; }

/* =====================================================================
   Porter: localhost:5173 becomes a real name.
   ===================================================================== */

.po-win { inset: 6px 8px auto; height: 150px; overflow: hidden; }
.po-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.po-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-deep); }
.po-url {
  margin-left: 10px;
  flex: 1;
  height: 22px;
  border-radius: 7px;
  background: var(--paper);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--ink-faint);
  overflow: hidden;
  white-space: nowrap;
}
.po-url svg { width: 11px; height: 11px; color: #2f8a57; flex: none; display: none; }
.po-url.named { color: var(--ink); }
.po-url.named svg { display: block; }
.po-site { padding: 16px; display: grid; gap: 8px; }
.po-site b { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; transition: opacity 0.3s; }
.po-site i { height: 8px; border-radius: 4px; background: var(--paper-deep); }
.po-site i:nth-of-type(2) { width: 70%; }
.po-site i:nth-of-type(3) { width: 45%; }

.po-list { position: absolute; left: 8px; right: 8px; top: 166px; display: grid; gap: 6px; }
.po-row {
  height: 32px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11.5px;
  animation: drop 0.55s var(--spring);
}
.po-row .live { width: 7px; height: 7px; border-radius: 50%; background: #2f8a57; flex: none; }
.po-row b { font-weight: 600; color: var(--deep); }
.po-row span:last-child { margin-left: auto; color: var(--ink-faint); }
.po-add { display: flex; gap: 6px; }
.po-add label {
  flex: 1;
  height: 32px;
  border-radius: 10px;
  border: 1.5px dashed rgba(143, 90, 11, 0.4);
  display: flex;
  align-items: center;
  padding: 0 11px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--ink-faint);
}
.po-add input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); text-align: right; }
.po-add button { height: 32px; padding: 0 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }

/* =====================================================================
   Sheaf: compress, merge, sign.
   ===================================================================== */

.sh-desk { position: absolute; left: 0; right: 0; top: 6px; height: 226px; }
.sh-doc {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 132px;
  height: 172px;
  margin-left: -66px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px 14px;
  display: grid;
  align-content: start;
  gap: 7px;
  transition: transform 0.7s var(--spring), opacity 0.4s;
}
.sh-doc i { height: 6px; border-radius: 3px; background: var(--paper-deep); }
.sh-doc i:first-child { height: 10px; width: 60%; background: var(--fill); opacity: 0.8; margin-bottom: 4px; }
.sh-doc i:nth-child(4) { width: 80%; }
.sh-doc i:nth-child(7) { width: 55%; }
.sh-doc.b { --x: -84px; --r: -8deg; }
.sh-doc.c { --x: 84px; --r: 8deg; }
.sh-doc.b, .sh-doc.c { transform: translateX(0) rotate(0) scale(0.96); opacity: 0; }
.merge-apart .sh-doc.a { transform: scale(0.82); }
.merge-apart .sh-doc.b, .merge-apart .sh-doc.c { opacity: 1; transform: translateX(var(--x)) rotate(var(--r)) scale(0.82); }
.squeeze .sh-doc.a { animation: squeeze 0.9s var(--spring); }
@keyframes squeeze { 40% { transform: scale(0.8, 0.74); } }
.sh-sign { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 34px; }
.sh-sign path { fill: none; stroke: var(--deep); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; }
.signed .sh-sign path { transition: stroke-dashoffset 1.4s var(--ease); stroke-dashoffset: 0; }
.sh-meter { position: absolute; left: 50%; top: 194px; transform: translateX(-50%); font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; height: 18px; }
.sh-meter b { color: var(--deep); }
.sh-tools { position: absolute; left: 0; right: 0; top: 248px; display: flex; justify-content: center; gap: 7px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.portrait .hint { display: none; }

/* ---------- Almanac: a night window of app circles that swell with load ---------- */

.al-win { position: absolute; inset: 8px; border-radius: 16px; background: #141917; color: #ecf1ed; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #0f1412; }
.al-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 12.5px; border-bottom: 1px solid #2a322f; }
.al-top b { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-dot { width: 8px; height: 8px; background: #a6f0a6; flex: none; }
.al-cpu { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; color: #8f9b96; }
.al-cpu b { color: #ffdcc4; font-weight: 500; }
.al-field { position: relative; flex: 1; display: flex; flex-direction: column; padding: 6px 14px; }
.al-row { display: grid; grid-template-columns: 92px 1fr 46px; align-items: center; gap: 10px; padding: 0; height: 30px; border: 0; border-bottom: 1px solid #2a322f; background: none; color: #ecf1ed; font: 500 12px/1 "Instrument Sans", system-ui, sans-serif; text-align: left; cursor: pointer; }
.al-row:last-child { border-bottom: 0; }
.al-row.on { background: #232a27; }
.al-row:focus-visible { outline: 2px solid #a6f0a6; outline-offset: -2px; }
.al-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-split { display: flex; height: 10px; border: 1px solid #0f1412; background: #232a27; transition: width 0.8s var(--ease); }
.al-split i { display: block; height: 100%; transition: width 0.8s var(--ease); }
.al-num { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; text-align: right; color: #ecf1ed; }
.al-limit { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid #2a322f; font-size: 11px; color: #8f9b96; }
.al-limit b { font-family: "Geist Mono", ui-monospace, monospace; color: #ecf1ed; font-weight: 500; }
.al-bar { height: 7px; border: 1px solid #36403c; background: #232a27; }
.al-bar i { display: block; height: 100%; width: 38%; background: #ffdcc4; transition: width 0.9s var(--ease); }

/* ---------- Roost ---------- */

.ro-mac { position: absolute; left: 0; right: 0; top: 34px; display: flex; flex-direction: column; align-items: center; }
.ro-bezel { width: 304px; height: 196px; padding: 8px; border-radius: 16px; background: #1c140e; }
.ro-screen { position: relative; width: 288px; height: 180px; border-radius: 6px; background: #f5f0e8; overflow: hidden; transition: background 0.5s var(--ease); }
.ro-mac.undocked .ro-screen { background: #efe6d8; }
.ro-notch { position: absolute; left: 50%; top: 0; width: 40px; height: 8px; margin-left: -20px; border-radius: 0 0 5px 5px; background: #1c140e; z-index: 50; }
.ro-base { position: relative; width: 328px; height: 11px; border-radius: 0 0 10px 10px; border: 1.5px solid #1c140e; border-top: 0; background: #f2a65a; }
.ro-base i { position: absolute; left: 50%; top: 0; width: 50px; height: 4px; margin-left: -25px; border-radius: 0 0 4px 4px; background: #1c140e; }
.ro-win { position: absolute; display: flex; flex-direction: column; padding: 0; border: 1.5px solid #1c140e; border-radius: 6px; background: var(--c); overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: #1c140e; transition: left 0.75s var(--ease), top 0.75s var(--ease), width 0.75s var(--ease), height 0.75s var(--ease); }
.ro-mac.still .ro-win, .ro-mac.still .ro-screen { transition: none; }
.ro-win:focus-visible { outline: 2px solid #8a4a12; outline-offset: 1px; }
.ro-win:hover .ro-bar { background: #fff; }
.ro-bar { display: flex; align-items: center; gap: 2px; flex: none; height: 15px; padding: 0 5px; background: #fffdf9; border-bottom: 1.5px solid #1c140e; }
.ro-bar i { width: 5px; height: 5px; border-radius: 50%; border: 1.2px solid #1c140e; flex: none; }
.ro-bar b { margin-left: 3px; font-size: 8px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-lines { display: flex; flex-direction: column; gap: 5px; padding: 8px 7px; }
.ro-lines i { display: block; height: 4px; border-radius: 3px; background: rgba(28, 20, 14, 0.18); }
.ro-lines i:nth-child(1) { width: 82%; }
.ro-lines i:nth-child(2) { width: 60%; }
.ro-lines i:nth-child(3) { width: 72%; }
.ro-status { position: absolute; left: 0; right: 0; top: 262px; text-align: center; font-size: 12px; color: #1c140e; }
.ro-status b { font-weight: 600; color: #8a4a12; }
.ro-status u { text-decoration: none; font-weight: 600; color: #8a4a12; border-bottom: 1.5px solid #f2a65a; }
.ro-status kbd { font-family: "Geist Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 500; padding: 1px 5px; margin-left: 2px; border-radius: 4px; background: #fffdf9; border: 1px solid #f2a65a; }

/* Winnow: free space, the strata bar, and four rows that go to the Trash and come back */
.wn { width: 300px; display: flex; flex-direction: column; gap: 10px; }
.wn-free { margin: 0; font: 600 13px/1 "Instrument Sans", sans-serif; color: var(--deep); }
.wn-free b { font: 600 26px/1 "Fraunces", serif; color: #14171b; margin-right: 4px; }
.wn-bar { display: flex; height: 22px; border: 1.5px solid #0b0d10; background: repeating-linear-gradient(135deg, #fff 0 5px, #e8e2da 5px 6px); overflow: hidden; }
.wn-bar i { display: block; height: 100%; border-right: 1px solid #0b0d10; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wn-list { display: flex; flex-direction: column; border: 1px solid rgba(20, 23, 27, 0.18); background: #fff; }
.wn-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-top: 1px solid rgba(20, 23, 27, 0.1); background: none; font: 500 13px "Instrument Sans", sans-serif; color: #14171b; cursor: pointer; text-align: left; transition: opacity 0.4s, background 0.2s; }
.wn-row:first-child { border-top: 0; }
.wn-row:hover { background: var(--wash); }
.wn-row em { margin-left: auto; font: 500 11.5px "Geist Mono", monospace; font-style: normal; }
.wn-tick { width: 12px; height: 12px; border: 1.3px solid #0b0d10; background: var(--fill); box-shadow: inset 0 0 0 3px var(--fill), inset 0 0 0 6px #0b0d10; }
.wn-row.gone { opacity: 0.35; }
.wn-row.gone b { text-decoration: line-through; }
.wn-row.gone .wn-tick { background: #fff; box-shadow: none; }

/* Wren: a note, the text cursor, and the paper card under it */
.wr { position: relative; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.wr-note { min-height: 112px; padding: 10px 14px 14px; border: 1.5px solid #2b1d14; border-radius: 12px; background: #fffaf1; }
.wr-dots { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.wr-dots i { width: 8px; height: 8px; border: 1.3px solid #2b1d14; border-radius: 50%; }
.wr-dots b { margin-left: 6px; font: 600 11px "Instrument Sans", sans-serif; color: #5c4a3c; }
.wr-text { margin: 0; font: 600 15px/1.4 "Fraunces", serif; color: #2b1d14; }
.wr-caret { display: inline-block; width: 2px; height: 17px; margin-left: 2px; vertical-align: -3px; background: #2b1d14; animation: wr-blink 1s steps(1) infinite; }
@keyframes wr-blink { 50% { opacity: 0; } }
.wr-card { position: relative; margin: -2px 6px 0; padding: 12px 14px; border: 1.5px solid #e4d8c6; border-radius: 14px; background: #fff8ec; opacity: 0; transform: translateY(-6px); transition: opacity 0.2s, transform 0.2s; }
.wr-card::before { content: ""; position: absolute; top: -7px; left: 26px; width: 12px; height: 12px; border-left: 1.5px solid #e4d8c6; border-top: 1.5px solid #e4d8c6; background: #fff8ec; transform: rotate(45deg); }
.wr-card.on { opacity: 1; transform: none; }
.wr-words { min-height: 21px; margin: 0 0 8px; font: 600 15px/1.35 "Fraunces", serif; color: #2b1d14; }
.wr-state { display: flex; align-items: center; gap: 8px; margin: 0; font: 500 12px "Instrument Sans", sans-serif; color: #5c4a3c; }
.wr-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--fill); box-shadow: 0 0 0 3px #f7e6ad; }
.wr-card.done .wr-dot { background: #f7e6ad; box-shadow: inset 0 0 0 3px #f7e6ad, inset 0 0 0 6px var(--deep); }
.wr-fn { align-self: flex-start; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; }
.wr-fn b { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 40px; border: 1.5px solid #2b1d14; border-bottom-width: 4px; border-radius: 9px; background: var(--fill); font: 600 15px "Instrument Sans", sans-serif; color: #2b1d14; transition: transform 0.08s, border-bottom-width 0.08s; }
.wr-fn.down b { transform: translateY(2px); border-bottom-width: 1.5px; }
.wr-fn small { font: 500 12px "Geist Mono", monospace; color: var(--deep); }

/* Unfurl: the day fills itself in (steps, sleep, daylight), then your lines */
.uf-day { left: 14px; right: 14px; top: 4px; height: 104px; padding: 14px 16px; }
.uf-head { display: flex; align-items: baseline; gap: 10px; }
.uf-head small { font: 500 10.5px "Geist Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--deep); }
.uf-head b { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; color: #2b1d14; }
.uf-mood { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #2b1d14; background: #fff; transition: background 0.5s; }
.uf-mood.on { background: var(--fill); }
.uf-facts { display: flex; gap: 6px; margin-top: 12px; }
.uf-facts span { display: inline-flex; gap: 4px; align-items: baseline; padding: 5px 9px; border-radius: 999px; background: var(--wash); font-size: 11px; color: var(--deep); white-space: nowrap; }
.uf-facts b { font-weight: 600; font-variant-numeric: tabular-nums; color: #2b1d14; }
.uf-list { left: 14px; right: 14px; top: 120px; height: 140px; overflow: hidden; padding: 4px 14px; }
.uf-row { display: flex; align-items: center; gap: 10px; height: 33px; border-bottom: 1px solid var(--line); font-size: 13px; color: #2b1d14; animation: drop 0.55s var(--spring); }
.uf-row:last-child { border-bottom: 0; }
.uf-row em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uf-row i { font-style: normal; font-weight: 600; color: var(--deep); }
.uf-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; border: 1.5px solid #2b1d14; }
.uf-highlight .uf-dot { background: var(--fill); border-color: var(--fill); }
.uf-idea .uf-dot { border-radius: 3px; border-color: var(--deep); }
.uf-number .uf-dot { border-radius: 2px; width: 12px; height: 4px; border: 0; background: #2b1d14; }

/* Tacet: the copy finder, a key hushed and dotted out, and the corner card counting down */
.tc-list { left: 14px; right: 14px; top: 4px; height: 196px; padding: 10px 14px; overflow: hidden; }
.tc-find { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font: 600 17px var(--serif); color: rgba(30, 23, 41, 0.42); }
.tc-find small { margin-left: auto; font: 500 11px "Geist Mono", monospace; color: var(--deep); }
.tc-caret { width: 2px; height: 18px; background: var(--fill); animation: wr-blink 1s steps(1) infinite; }
.tc-row { display: flex; align-items: center; gap: 10px; height: 46px; border-bottom: 1px solid var(--line); animation: drop 0.55s var(--spring); }
.tc-row:last-child { border-bottom: 0; }
.tc-ico { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--wash); }
.tc-key .tc-ico { background: var(--fill); }
.tc-ico svg { width: 13px; height: 15px; fill: #fbf4e9; }
.tc-ico .tc-lines { width: 13px; height: 10px; fill: none; stroke: var(--deep); stroke-width: 1.8; stroke-linecap: round; }
.tc-what { display: grid; min-width: 0; }
.tc-what b { font-size: 13px; font-weight: 600; color: #221a2b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-what small { font-size: 11px; color: #594f63; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-what code { font: 500 10.5px "Geist Mono", monospace; }
.tc-row em { margin-left: auto; flex: none; padding: 3px 8px; border-radius: 999px; background: var(--wash); font: 600 10.5px "Instrument Sans", sans-serif; font-style: normal; color: var(--deep); }
.tc-card { position: absolute; left: 34px; right: 34px; top: 176px; padding: 11px 13px 12px; border: 1px solid #e5dccf; border-radius: 14px; background: #fbf7f1; opacity: 0; transform: translateY(10px); transition: opacity 0.25s, transform 0.35s var(--spring); }
.tc-card.on { opacity: 1; transform: none; }
.tc-card-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.tc-card-title b { font: 600 14px var(--serif); color: #221a2b; }
.tc-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--fill); }
.tc-mark svg { width: 11px; height: 13px; fill: #fbf4e9; }
.tc-card-text { margin: 6px 0 8px; font-size: 11.5px; color: #594f63; }
.tc-bar { display: block; height: 5px; border-radius: 5px; background: var(--wash); overflow: hidden; }
.tc-bar i { display: block; width: 100%; height: 100%; border-radius: 5px; background: var(--fill); }
.tc-chips { position: absolute; left: 0; right: 0; top: 272px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
