/* Plexiri: paper, ink, and nine small worlds. */

:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d7;
  --ink: #1d1a16;
  --ink-2: #463f37;
  --muted: #6b6357;
  --rule: #d9d0c1;
  --accent: #b4532a;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --hand: "Noteworthy", "Bradley Hand", "Segoe Print", "Chalkboard SE", cursive;
  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right));
  --radius: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.top { padding-top: env(safe-area-inset-top); }
.top__in { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand__mark { width: 30px; height: 30px; color: var(--ink); flex: none; }
.brand__word { font: 600 1.4rem/1 var(--serif); letter-spacing: -.01em; }
.top__nav { display: flex; gap: 4px; }
.top__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: .95rem; font-weight: 500; color: var(--ink-2); text-decoration: none; border-radius: 99px;
}
.top__nav a:active { background: var(--paper-2); }

/* ---------- Hero ---------- */
.hero { padding-top: 20px; padding-bottom: 40px; }
.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.hero h1 {
  margin-top: 14px;
  font: 600 clamp(2.45rem, 10.4vw, 5.6rem)/1.0 var(--serif);
  letter-spacing: -.025em;
  max-width: 12ch;
  text-wrap: balance;
}
.lede {
  margin-top: 18px; max-width: 36em;
  font-size: 1.06rem; line-height: 1.55; color: var(--ink-2);
  text-wrap: pretty;
}

.shelf { margin-top: 30px; position: relative; }
/* the old icon shelf; home.css sets the columns for the toys */
.shelf__row { display: grid; grid-template-columns: repeat(5, 1fr); row-gap: 20px; }
.shelf__ledge { display: none; }
.shelf__app {
  --s: min(60px, calc((100vw - 40px) / 5 - 14px));
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 13px;
  text-decoration: none; padding-top: 4px; min-height: 44px;
}
.shelf__app img {
  width: var(--s); height: var(--s); border-radius: 23%;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 8px 12px -8px rgba(60,40,20,.55);
  transform-origin: 50% 100%;
}
/* the ledge each icon sits on: cells touch, so the lines join into a shelf */
.shelf__app::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(var(--s) + 6px); height: 4px;
  background: linear-gradient(#cdbfa8, #bba98e);
  box-shadow: 0 5px 8px -4px rgba(80,60,30,.35);
}
.shelf__row li:nth-child(5n+1) .shelf__app::after { border-radius: 3px 0 0 3px; left: 2px; }
.shelf__row li:nth-child(5n) .shelf__app::after { border-radius: 0 3px 3px 0; right: 2px; }
.shelf__app span {
  font-size: .74rem; font-weight: 500; line-height: 1.2; color: var(--ink-2); text-align: center; max-width: 9ch;
}
.shelf__app:active img { transform: translateY(-4px) scale(1.04); transition: transform .12s; }

.js .shelf__app img { animation: drop .9s var(--spring) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
@keyframes drop {
  0% { transform: translateY(-46px) scale(.9); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.shelf__app.is-hop img { animation: hop .55s var(--ease); }
@keyframes hop {
  0%, 100% { transform: none; }
  35% { transform: translateY(-14px) scale(1.04, .97); }
  70% { transform: translateY(0) scale(1.05, .94); }
}

/* ---------- Apps ---------- */
.apps { padding: 40px 0 72px; border-top: 1px solid var(--rule); }
.apps__head { margin-bottom: 32px; max-width: 40em; }
.apps__head h2 { font: 600 clamp(2rem, 7vw, 3.4rem)/1.05 var(--serif); letter-spacing: -.02em; }
.apps__head p { margin-top: 12px; color: var(--ink-2); font-size: 1.02rem; text-wrap: pretty; }

.apps__grid { display: grid; gap: 64px; }
.app { position: relative; scroll-margin-top: 16px; }
.app:focus { outline: none; }

.stage {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 1 / 1.02;
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 24px 40px -28px rgba(50,35,20,.55);
  user-select: none; -webkit-user-select: none;
}
.stage button { cursor: pointer; }

.hint {
  position: absolute; z-index: 6; top: 14px; left: 14px;
  padding: 7px 11px 7px 26px; border-radius: 99px;
  font: 600 .74rem/1 var(--sans); letter-spacing: .01em;
  background: rgba(255,252,246,.9); color: #2a251f;
  box-shadow: 0 2px 8px -4px rgba(0,0,0,.25);
  transition: opacity .4s, transform .4s var(--ease);
  pointer-events: none;
}
.hint::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: currentColor; opacity: .85;
}
.js .hint::before { animation: beckon 1.8s ease-in-out infinite; }
@keyframes beckon { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(.55); opacity: .4; } }
.hint--dark { background: rgba(8,18,20,.55); color: #f4efe6; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.stage.is-touched .hint { opacity: 0; transform: translateY(-6px); }

.app__meta { padding: 20px 2px 0; }
.app__id { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; column-gap: 12px; }
.app__icon { width: 44px; height: 44px; border-radius: 23%; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.app h3 { font: 600 1.06rem/1.2 var(--sans); letter-spacing: -.005em; }
.app h3 span { display: block; font-weight: 400; font-size: .88rem; color: var(--muted); margin-top: 2px; }
.app__no { font: italic 500 1rem/1 var(--serif); color: var(--muted); font-variant-numeric: oldstyle-nums; }
.app__promise {
  margin-top: 16px;
  font: 600 clamp(1.5rem, 6vw, 1.9rem)/1.12 var(--serif); letter-spacing: -.015em;
  text-wrap: balance;
}
.app__desc { margin-top: 10px; color: var(--ink-2); text-wrap: pretty; max-width: 34em; }
.app__note { margin-top: 8px; font-size: .86rem; color: var(--muted); }
.app__go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 20px; }
.try {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 20px;
  border-radius: 99px; background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform .2s var(--ease), background .2s;
}
.try svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.try:active { transform: scale(.97); }
@media (hover: hover) {
  .try:hover { background: #000; }
  .try:hover svg { transform: translateX(3px); }
}
.badge { display: inline-block; border-radius: 8px; }
.badge img { height: 44px; width: auto; }


/* ---------- 01 Adultishing ---------- */
.st-adult { background: #f2e4cb; color: #3b2a1e; }
.st-adult__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.st-adult__pip {
  position: absolute; left: 50%; bottom: 37%; height: 47%; width: auto;
  transform: translateX(-50%); transform-origin: 50% 100%;
  filter: drop-shadow(0 8px 6px rgba(90,55,20,.22));
}
.st-adult__pip.is-hop { animation: pip-hop .7s var(--ease); }
@keyframes pip-hop {
  0%, 100% { transform: translateX(-50%); }
  30% { transform: translateX(-50%) translateY(-12%) scale(.97, 1.04); }
  60% { transform: translateX(-50%) scale(1.05, .95); }
}
.st-adult__carrots {
  position: absolute; z-index: 5; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px 6px 8px; border-radius: 99px;
  background: #fbf6ec; box-shadow: 0 2px 8px -4px rgba(80,50,20,.35);
  font: 700 .9rem/1 var(--sans); font-variant-numeric: tabular-nums;
}
.st-adult__carrots svg { width: 20px; height: 20px; }
.st-adult__carrots.is-bump { animation: bump .5s var(--spring); }
@keyframes bump { 50% { transform: scale(1.18); } }
.st-adult__fly {
  position: absolute; z-index: 4; left: 0; top: 0; width: 34px; height: 34px; opacity: 0; pointer-events: none;
}
.st-adult__fly.is-flying { animation: fly .75s var(--ease) forwards; }
@keyframes fly {
  0% { opacity: 1; transform: translate(var(--x0), var(--y0)) rotate(-30deg) scale(.7); }
  60% { opacity: 1; transform: translate(calc((var(--x0) + var(--x1)) / 2), calc(var(--y1) - 40px)) rotate(40deg) scale(1.1); }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(90deg) scale(.6); }
}
.st-adult__card {
  position: absolute; z-index: 3; left: 12px; right: 12px; bottom: 12px;
  background: #fbf6ec; border-radius: 18px; padding: 14px 16px 12px;
  box-shadow: 0 10px 24px -14px rgba(80,50,20,.5);
}
.st-adult__title { font: 600 1.22rem/1.15 var(--serif); }
.st-adult__task {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; margin-top: 6px; padding: 4px 0;
  background: none; border: 0; text-align: left; font-size: .98rem; line-height: 1.3; color: #3b2a1e;
}
.st-adult__box {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  border: 2px solid #c4562e; color: #fff; transition: background .2s;
}
.st-adult__box svg { width: 18px; height: 18px; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .35s var(--ease) .05s; }
.st-adult__task[aria-pressed="true"] .st-adult__box { background: #c4562e; }
.st-adult__task[aria-pressed="true"] .st-adult__box svg { stroke-dashoffset: 0; }
.st-adult__task[aria-pressed="true"] .st-adult__text { color: #8c7a68; text-decoration: line-through; text-decoration-color: rgba(196,86,46,.5); }
.st-adult__count { margin-top: 4px; font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #7a6853; }
.st-adult__card.is-swap { animation: swap .45s var(--ease); }
@keyframes swap { 0% { opacity: .2; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }

/* ---------- 02 Gratitude Garden ---------- */
.st-garden {
  background: radial-gradient(110% 75% at 50% 35%, #245650 0%, #143a36 48%, #0b2120 100%);
  color: #f6ecd9;
}
.st-garden__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.st-garden__said {
  position: absolute; z-index: 3; left: 20px; right: 20px; top: 54px;
  font: italic 500 1.2rem/1.3 var(--serif); text-align: center; color: #fbeedb; text-wrap: balance;
  min-height: 1.3em;
}
.st-garden__said.is-say { animation: say 2.6s var(--ease) forwards; }
@keyframes say {
  0% { opacity: 0; transform: translateY(12px); }
  15%, 70% { opacity: 1; transform: none; }
  100% { opacity: .0; transform: translateY(-10px); }
}
.st-garden__said.is-stay { animation: none; opacity: 1; }
.st-garden__said small { display: block; margin-top: 8px; font: 600 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; font-style: normal; opacity: .8; }
.st-garden__plant {
  position: absolute; z-index: 2; left: 50%; bottom: 13%; width: 66%; aspect-ratio: 1;
  transform: translateX(-50%); padding: 0; border: 0; background: none; border-radius: 50%;
}
.st-garden__plant img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 88%; }
.st-garden__plant img.is-grow { animation: grow .6s var(--spring); }
@keyframes grow { 0% { transform: scale(.82); } 100% { transform: none; } }
.st-garden__mound {
  position: absolute; left: 14%; right: 14%; bottom: 4%; height: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(170,230,190,.28), transparent);
}
.st-garden__plant:active img { transform: scale(.97); }
.st-garden__days {
  position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 12px;
  display: flex; align-items: center; gap: 10px; min-height: 36px;
  padding: 4px 12px; border-radius: 99px; background: rgba(8,22,20,.45);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.st-garden__label { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .75; white-space: nowrap; }
.st-garden__row { display: flex; gap: 2px; overflow: hidden; flex: 1; justify-content: flex-end; }
.st-garden__row img { width: 28px; height: 28px; object-fit: contain; animation: grow .6s var(--spring); }
.st-garden__row:empty::after { content: "no flowers yet"; font: italic .82rem var(--serif); opacity: .6; }

/* ---------- 03 Cities ---------- */
.st-cities { background: #a9bfb3; }
.st-cities__clay, .st-cities__paint { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-cities__clay { object-fit: cover; filter: grayscale(1) sepia(.2) brightness(1.2) contrast(.78); }
.st-cities__paint { touch-action: pan-y; cursor: crosshair; }
.st-cities__done {
  position: absolute; z-index: 5; left: 50%; top: 16px; transform: translate(-50%, -8px);
  padding: 10px 18px; border-radius: 99px; background: #fffaf0; color: #2b2620;
  font: 700 .95rem/1 var(--sans); white-space: nowrap; opacity: 0; pointer-events: none;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,.4); transition: opacity .4s, transform .5s var(--spring);
}
.st-cities__done.is-on { opacity: 1; transform: translate(-50%, 0); }
.st-cities__bar {
  position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 99px;
  background: #fffaf0; box-shadow: 0 6px 16px -10px rgba(0,0,0,.45);
}
.st-cities__meter { flex: 1; height: 8px; border-radius: 99px; background: #e6dccb; overflow: hidden; }
.st-cities__meter i { display: block; height: 100%; width: var(--p, 0%); border-radius: 99px; background: #f2b33d; transition: width .3s var(--ease); }
.chip-btn {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 99px;
  background: #2b2620; color: #fffaf0; font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.chip-btn:active { transform: scale(.97); }

/* ---------- 04 Wickling ---------- */
.st-wick {
  background: radial-gradient(85% 70% at 50% 38%, #2b4a52 0%, #18303a 52%, #0d1a20 100%);
  color: #f6ead8;
}
.st-wick__glow {
  position: absolute; left: 50%; top: 4%; width: 70%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(255,196,120,.28), transparent 70%);
  transition: opacity .5s, transform .6s var(--ease); opacity: .7;
}
.st-wick__spirit {
  position: absolute; left: 50%; top: 5%; width: 64%; height: auto;
  transform: translateX(-50%); transform-origin: 50% 80%;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent 97%);
  mask-image: radial-gradient(closest-side, #000 60%, transparent 97%);
  transition: transform .6s var(--ease);
}
.js .st-wick__spirit { animation: breathe 4.5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateX(-50%) scale(1.025, .985); } }
.st-wick.is-listening .st-wick__spirit { animation: none; transform: translateX(-50%) translateY(3%) scale(1.07); }
.st-wick.has-talk .st-wick__spirit, .st-wick.has-talk .st-wick__glow { animation: none; transform: translateX(-50%) translateY(-22%) scale(.64); }
.st-wick.is-listening .st-wick__glow { opacity: 1; transform: translateX(-50%) scale(1.15); }
.st-wick.is-thinking .st-wick__glow { animation: flicker .5s ease-in-out infinite alternate; }
@keyframes flicker { from { opacity: .6; } to { opacity: 1; } }
.st-wick__talk {
  position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 94px;
  display: flex; flex-direction: column; gap: 8px;
}
.st-wick__you, .st-wick__reply { max-width: 86%; border-radius: 18px; padding: 9px 14px; font-size: .92rem; line-height: 1.35; }
.st-wick__you { align-self: flex-end; background: #34535c; color: #f6ead8; border-bottom-right-radius: 6px; }
.st-wick__reply { align-self: flex-start; background: #fbf1e1; color: #1d2a2f; border-bottom-left-radius: 6px; }
.st-wick__you:empty, .st-wick__reply:empty { display: none; }
.st-wick__you.is-in, .st-wick__reply.is-in { animation: swap .45s var(--ease); }
.st-wick__reply.is-dots { display: inline-flex; gap: 5px; padding: 14px 16px; }
.st-wick__reply.is-dots i { width: 7px; height: 7px; border-radius: 50%; background: #6d7d80; animation: dots 1s infinite ease-in-out; }
.st-wick__reply.is-dots i:nth-child(2) { animation-delay: .15s; }
.st-wick__reply.is-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
.st-wick__mic {
  position: absolute; z-index: 4; left: 50%; bottom: 16px; width: 66px; height: 66px; margin-left: -33px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: #f5c98a; color: #1d2a2f; touch-action: none; -webkit-touch-callout: none;
  box-shadow: 0 8px 20px -8px rgba(245,180,100,.6);
  transition: transform .2s var(--ease);
}
.st-wick__mic svg { width: 26px; height: 26px; }
.st-wick__ring { position: absolute; inset: -7px; border-radius: 50%; border: 2px solid rgba(245,201,138,.55); }
.st-wick.is-listening .st-wick__mic { transform: scale(1.1); }
.st-wick.is-listening .st-wick__ring { animation: ring 1.1s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* ---------- 05 The Little Guide ---------- */
.st-guide {
  background-color: #f4f1e8;
  background-image: repeating-linear-gradient(to bottom, transparent 0 33px, rgba(45,43,51,.075) 33px 34px);
  color: #2d2b33;
}
.st-guide__note {
  position: absolute; z-index: 3; left: 18px; right: 18px; top: 50px;
  font: 400 1.32rem/1.25 var(--hand); text-align: center; text-wrap: balance; min-height: 2.5em;
}
.st-guide__note.is-in { animation: swap .5s var(--ease); }
.st-guide__island {
  position: absolute; left: 22%; right: 22%; top: 66%; height: 9%; border-radius: 50%;
  background: radial-gradient(closest-side, #cfdcb4 70%, #b9c99b 100%);
  box-shadow: 0 6px 0 #c3a983, 0 14px 18px -6px rgba(70,50,20,.3);
}
.st-guide__fellow {
  position: absolute; z-index: 2; left: 50%; top: 24%; width: 50%; height: auto;
  transform: translateX(-50%); transform-origin: 50% 85%;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  transition: transform .7s var(--ease);
}
.st-guide__fellow.is-wiggle { animation: wiggle .7s var(--ease); }
.st-guide__fellow.is-happy { animation: happy .8s var(--spring); }
.st-guide__fellow.is-shake { animation: shake .5s var(--ease); }
.st-guide__fellow.is-away { transform: translateX(-82%) scale(.92); }
@keyframes wiggle { 20% { transform: translateX(-50%) rotate(-7deg); } 45% { transform: translateX(-50%) rotate(6deg); } 70% { transform: translateX(-50%) rotate(-3deg); } }
@keyframes happy { 30% { transform: translateX(-50%) translateY(-10%) scale(.96, 1.05); } 60% { transform: translateX(-50%) scale(1.06, .94); } }
@keyframes shake { 20%, 60% { transform: translateX(-54%); } 40%, 80% { transform: translateX(-46%); } }
.st-guide__cup {
  position: absolute; z-index: 3; left: 66%; top: 58%; width: 13%; height: auto;
  opacity: 0; transform: translateY(10px) scale(.8); transition: opacity .4s, transform .5s var(--spring);
}
.st-guide__cup.is-on { opacity: 1; transform: none; }
.st-guide__choices {
  position: absolute; z-index: 4; left: 10px; right: 10px; bottom: 12px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.st-guide__choices button {
  min-height: 44px; padding: 0 12px;
  font: 400 1rem/1 var(--hand); color: #2d2b33;
  background: #fffdf7; border: 1.6px solid #2d2b33;
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  box-shadow: 2px 3px 0 rgba(45,43,51,.14);
  transition: transform .15s var(--ease);
}
.st-guide__choices button:active { transform: translate(1px, 2px); box-shadow: none; }
.st-guide__choices button[aria-pressed="true"] { background: #2d2b33; color: #fffdf7; }

/* ---------- 06 Producer ---------- */
.st-prod {
  display: grid; grid-template-rows: auto 1fr auto; padding: 18px;
  background: radial-gradient(120% 90% at 0% 0%, #5a3d22 0%, #2a1c13 38%, #121014 75%);
  color: #f3efe6;
}
.st-prod__head { display: flex; align-items: center; gap: 12px; }
.st-prod__slate { width: 46px; height: 46px; border-radius: 12px; transform-origin: 20% 80%; }
.st-prod__slate.is-clap { animation: clap .4s var(--ease); }
@keyframes clap { 40% { transform: rotate(-8deg) scale(1.08); } }
.st-prod__kicker { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #f5a524; }
.st-prod__format { font-weight: 600; font-size: .98rem; margin-top: 2px; }
.st-prod__prompter { align-self: center; padding: 8px 2px; }
.st-prod__beat { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #f5a524; }
.st-prod__line { margin-top: 8px; font: 600 clamp(1.35rem, 6.4vw, 1.9rem)/1.18 var(--sans); letter-spacing: -.01em; text-wrap: balance; }
.st-prod__prompter.is-in .st-prod__line, .st-prod__prompter.is-in .st-prod__beat { animation: scrollin .5s var(--ease); }
@keyframes scrollin { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.st-prod__foot { display: flex; align-items: center; gap: 14px; }
.st-prod__beats { flex: 1; display: flex; gap: 5px; }
.st-prod__beats li { position: relative; flex: 1; height: 5px; border-radius: 99px; background: rgba(255,255,255,.16); margin-bottom: 18px; }
.st-prod__beats li::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--f, 0%); background: #f5a524; border-radius: 99px; }
.st-prod__beats li:first-child, .st-prod__beats li:last-child { flex: 1.5; }
.st-prod__beats span { position: absolute; left: 0; top: 11px; font-size: .6rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(243,239,230,.5); }
.st-prod__roll {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px 0 16px;
  border: 0; border-radius: 99px; background: #f5a524; color: #1b1410; font-weight: 700; font-size: 1rem;
}
.st-prod__roll .dot { width: 10px; height: 10px; border-radius: 50%; background: #c8321e; }
.st-prod.is-rolling .st-prod__roll .dot { animation: rec 1s steps(2) infinite; }
@keyframes rec { 50% { opacity: .2; } }
.st-prod__roll:active { transform: scale(.97); }
.st-prod__count {
  position: absolute; inset: 0; z-index: 5; display: none; place-items: center;
  font: 700 7rem/1 var(--sans); color: #f5a524; background: rgba(18,16,20,.72);
}
.st-prod__count.is-on { display: grid; }
.st-prod__count.is-tick { animation: tick .8s var(--ease); }
@keyframes tick { from { transform: scale(1.3); opacity: .2; } to { transform: none; opacity: 1; } }

/* ---------- 07 Storypause ---------- */
.st-story {
  display: flex; flex-direction: column; padding: 22px 18px 18px;
  background: linear-gradient(160deg, #f7b44c 0%, #f0903f 55%, #e8692f 100%);
  color: #2b1608;
}
.st-story__ask { font: 600 1.5rem/1.1 var(--serif); text-align: center; letter-spacing: -.01em; }
.st-story__times { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.st-story__times button {
  min-height: 44px; padding: 0 16px; border-radius: 99px;
  border: 1.5px solid rgba(43,22,8,.55); background: rgba(255,240,220,.18);
  font-weight: 600; font-size: .94rem; color: #2b1608;
}
.st-story__times button[aria-pressed="true"] { background: #2b1608; border-color: #2b1608; color: #fdeedb; }
.st-story__book { flex: 1; display: grid; place-items: center; perspective: 1000px; margin-top: 14px; }
.st-story__page {
  width: min(100%, 320px); padding: 20px 22px 18px;
  background: #fbf4e8; border-radius: 6px 16px 16px 6px;
  box-shadow: inset 8px 0 0 -4px rgba(120,60,20,.12), 0 22px 30px -18px rgba(90,30,0,.7);
  transform-origin: 0 50%;
}
.st-story__page.is-turn { animation: turn .65s var(--ease); }
@keyframes turn { 0% { transform: rotateY(-75deg); opacity: .2; } 100% { transform: none; opacity: 1; } }
.st-story__shelf { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #b4501c; }
.st-story__title { margin-top: 6px; font: 600 1.38rem/1.14 var(--serif); color: #1e1a17; text-wrap: balance; }
.st-story__blurb { margin-top: 8px; font-size: .92rem; line-height: 1.45; color: #51463c; text-wrap: pretty; }
.st-story__mins { margin-top: 12px; font-size: .8rem; font-weight: 700; color: #1e1a17; }

/* ---------- 08 Bible by doing ---------- */
.st-bible {
  padding: 22px 20px;
  background: radial-gradient(90% 70% at 85% 85%, #efe5d0 0%, #f7f1e6 60%);
  color: #2f2c22;
}
.st-bible__read { position: relative; z-index: 2; max-width: 24em; }
.st-bible__read.is-in { animation: swap .5s var(--ease); }
.st-bible__ref { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8f7334; }
.st-bible__title { margin-top: 8px; font: 600 1.6rem/1.1 var(--serif); letter-spacing: -.01em; }
.st-bible__act { margin-top: 8px; max-width: 58%; font: italic 400 1.02rem/1.4 var(--serif); color: #5a5546; text-wrap: pretty; }
.st-bible__tree { position: absolute; z-index: 1; right: 2%; bottom: 62px; width: 58%; height: auto; overflow: visible; }
.st-bible__leaves path { transform-box: fill-box; transform-origin: 0 50%; animation: leaf .6s var(--spring) both; }
@keyframes leaf { from { transform: scale(0); } to { transform: none; } }
.st-bible__foot {
  position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.st-bible__count { font: italic 500 1rem var(--serif); color: #6c6650; }
.st-bible__do {
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 99px;
  background: #56623a; color: #f7f1e6; font-weight: 600; font-size: .98rem;
  box-shadow: 0 6px 14px -8px rgba(60,70,30,.6);
}
.st-bible__do:active { transform: scale(.97); }

/* ---------- 09 Unstuck with Tock ---------- */
.st-tock {
  --tock: 92px;
  --paper-t: #f5efe4; --ivory: #fcf8f1; --tray: #e9e0d1; --rule-t: #d5c9b7;
  --walnut: #1e1916; --umber: #65594d; --clay: #776a5c;
  --persimmon: #da582c; --persimmon-lip: #a23817; --brass: #cf9536; --sage: #497e5e; --sage-hi: #6bb284;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--paper-t); color: var(--walnut);
}
.st-tock__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.st-tock__panel {
  position: absolute; inset: 0; display: flex; flex-direction: column; padding: 14px;
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.st-tock.is-desk .st-tock__desk, .st-tock.is-plan .st-tock__desk,
.st-tock.is-studio .st-tock__studio, .st-tock.is-cleared .st-tock__cleared {
  opacity: 1; visibility: visible; transition: opacity .45s var(--ease), visibility 0s;
}
.st-tock__desk, .st-tock__cleared {
  background: radial-gradient(90% 60% at 50% 0%, rgba(255,255,255,.55), transparent 70%), var(--paper-t);
}
.st-tock__desk { padding-top: 52px; transition-property: opacity, visibility, padding; }
.st-tock.is-plan .st-tock__desk { padding-top: 14px; }
.st-tock__kicker {
  font: 700 .66rem/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--clay);
}
.st-tock__cairns {
  position: absolute; z-index: 6; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 99px;
  background: var(--ivory); box-shadow: inset 0 0 0 1px var(--rule-t), 0 2px 6px -3px rgba(60,40,20,.25);
  font: 700 .86rem/1 var(--mono); transition: opacity .3s;
}
.st-tock__cairns svg { width: 18px; height: 18px; }
.st-tock__cairns.is-bump { animation: bump .5s var(--spring); }
.st-tock.is-plan .st-tock__cairns, .st-tock.is-studio .st-tock__cairns { opacity: 0; }

/* Tock, drawn from the app's CompanionView */
.tock { width: 100%; height: auto; overflow: visible; }
.tock__me { transform-box: view-box; transform-origin: 50px 86px; animation: tock-breathe 2.9s ease-in-out infinite; }
.tock__bows { transform-box: view-box; transform-origin: 50px 21.6px; animation: tock-wind 7.4s ease-in-out infinite; }
.tock__eyes { transform-box: view-box; transform-origin: 50px 55.3px; animation: tock-blink 4.1s linear infinite; }
@keyframes tock-breathe { 0%, 100% { transform: rotate(-1.8deg); } 50% { transform: translateY(-1.6px) rotate(1.8deg); } }
@keyframes tock-wind { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.8); } }
@keyframes tock-spin { 0%, 50%, 100% { transform: scaleX(1); } 25%, 75% { transform: scaleX(.22); } }
@keyframes tock-blink { 0%, 95%, 100% { transform: none; } 97% { transform: scaleY(.12); } }
@keyframes tock-crack { 0%, 100% { transform: rotate(-4.5deg); } 50% { transform: translateY(-4px) rotate(4.5deg); } }
@keyframes tock-hop { 0%, 100% { transform: rotate(-2.4deg); } 50% { transform: translateY(-3px) rotate(2.4deg); } }
@keyframes tock-joy { 0%, 100% { transform: none; } 50% { transform: translateY(-7px) rotate(-3deg) scale(1.03, .97); } }
@keyframes tock-squish { 0%, 100% { transform: none; } 30% { transform: translateY(-6px) scale(1.12, .88); } 65% { transform: scale(.96, 1.04); } }
.st-tock.is-cracking .st-tock__desk .tock__me { animation: tock-crack .24s ease-in-out infinite; }
.st-tock.is-cracking .st-tock__desk .tock__bows { animation: tock-spin 1.2s linear infinite; }
.st-tock__dial .tock__me { animation: tock-hop 1.16s ease-in-out infinite; }
.st-tock__dial .tock__bows { animation: tock-spin 3.4s linear infinite; }
.st-tock__dial.is-still .tock__me, .st-tock__dial.is-still .tock__bows { animation-play-state: paused; }
.st-tock__joy .tock__me { animation: tock-joy .9s ease-in-out infinite; }
.st-tock__joy .tock__bows { animation: tock-spin 1.4s linear infinite; }
.st-tock__me.is-squish .tock, .st-tock__dial.is-squish .tock { animation: tock-squish .5s var(--spring); }

.st-tock__buddy { display: flex; align-items: center; gap: 10px; }
.st-tock__me {
  flex: none; width: var(--tock); padding: 0; border: 0; background: none; border-radius: 50%;
  transition: width .45s var(--ease);
}
.st-tock.is-plan .st-tock__me { width: calc(var(--tock) * .72); }
.st-tock__bubble {
  position: relative; flex: 1; min-width: 0; padding: 10px 12px 11px; border-radius: 16px;
  background: var(--ivory); box-shadow: inset 0 0 0 1px var(--rule-t);
}
.st-tock__bubble::before {
  content: ""; position: absolute; left: -6px; top: 50%; width: 11px; height: 11px; margin-top: -5px;
  background: var(--ivory); border-left: 1px solid var(--rule-t); border-bottom: 1px solid var(--rule-t);
  transform: rotate(45deg);
}
.st-tock.is-cracking .st-tock__label { color: var(--persimmon); }
.st-tock.is-plan .st-tock__label { color: var(--sage); }
.st-tock__say { margin-top: 3px; font: 500 .98rem/1.28 var(--serif); text-wrap: pretty; }
.st-tock.is-plan .st-tock__say { font-weight: 700; font-size: 1.14rem; line-height: 1.15; }
.st-tock__say.is-in { animation: swap .45s var(--ease); }

.st-tock.is-desk .st-tock__buddy { margin: auto 0; }
.st-tock__rescue { margin-top: auto; }
.st-tock__chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.st-tock__chips button {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px; text-align: left;
  border: 0; border-radius: 14px; background: var(--ivory); box-shadow: inset 0 0 0 1px var(--rule-t), 0 2px 0 var(--rule-t);
  font: 600 .84rem/1.15 var(--round); color: var(--walnut);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.st-tock__chips button:active { transform: translateY(2px); box-shadow: inset 0 0 0 1px var(--rule-t); }
.st-tock__chips button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--persimmon); }
.st-tock__chips i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--tray); color: var(--persimmon); }
.st-tock__chips svg { width: 17px; height: 17px; }
.st-tock.is-cracking .st-tock__chips button { pointer-events: none; }
.st-tock.is-cracking .st-tock__chips button:not([aria-pressed="true"]) { opacity: .5; transition: opacity .3s; }

.st-tock__plan { display: none; flex: 1; flex-direction: column; gap: 8px; margin-top: 10px; min-height: 0; }
.st-tock.is-plan .st-tock__rescue { display: none; }
.st-tock.is-plan .st-tock__plan { display: flex; }
.st-tock__pebbles { display: grid; gap: 5px; }
.st-tock__pebbles li {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px;
  padding: 6px 8px 6px 7px; border-radius: 12px; background: var(--ivory); box-shadow: inset 0 0 0 1px var(--rule-t);
  font: 650 .84rem/1.2 var(--round); animation: pebble .5s var(--spring) both;
}
.st-tock__pebbles li:first-child { box-shadow: inset 0 0 0 1.5px rgba(218,88,44,.55); }
.st-tock__pebbles b {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--tray); font: 700 .72rem/1 var(--mono);
}
.st-tock__pebbles li:first-child b { background: var(--persimmon); color: #fff; }
.st-tock__pebbles small { padding: 4px 7px; border-radius: 99px; background: var(--tray); color: var(--umber); font: 700 .66rem/1 var(--mono); white-space: nowrap; }
@keyframes pebble { from { opacity: 0; transform: translateY(-14px) scale(.9) rotate(-2deg); } to { opacity: 1; transform: none; } }

/* the app's keycap: a raised key with a lip that presses down */
.st-tock__key {
  position: relative; min-height: 44px; padding: 0 16px; border: 0; border-radius: 15px;
  background: var(--persimmon); color: #fff; font: 700 .96rem/1.1 var(--round);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 4px 0 var(--persimmon-lip);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.st-tock__key:active { transform: translateY(3px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 1px 0 var(--persimmon-lip); }
.st-tock__start { margin-top: auto; width: 100%; min-height: 46px; }

/* lamp-lit studio */
.st-tock__studio {
  gap: 10px; color: #f7f0e5;
  background: radial-gradient(75% 60% at 24% 30%, rgba(218,88,44,.24), rgba(207,149,54,.1) 48%, transparent 72%), #16120f;
}
.st-tock__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; }
.st-tock__which { font: 700 .68rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--brass); }
.st-tock__which em { font-style: normal; color: var(--sage-hi); margin-left: 4px; }
.st-tock__dots { display: flex; gap: 5px; }
.st-tock__dots li { width: 8px; height: 8px; border-radius: 99px; background: #493c31; transition: width .35s var(--ease), background .35s; }
.st-tock__dots li.is-done { background: var(--sage-hi); }
.st-tock__dots li.is-now { width: 20px; background: var(--persimmon); }
.st-tock__mid { display: flex; align-items: center; gap: 12px; }
.st-tock__dial { position: relative; flex: none; width: min(37%, 150px); aspect-ratio: 1; }
.st-tock__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-tock__dial .tock { position: absolute; left: 22%; top: 6%; width: 56%; }
.st-tock__dial .tock__shadow { fill: #000; opacity: .5; }
.st-tock__arc { transition: stroke-dashoffset .45s linear; }
.st-tock__time {
  position: absolute; left: 0; right: 0; bottom: 19%; text-align: center;
  font: 700 clamp(.95rem, 4.6vw, 1.15rem)/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.st-tock__whisper { flex: 1; font: 500 .86rem/1.38 var(--sans); color: #c0af9c; text-wrap: pretty; }
.st-tock__whisper.is-in, .st-tock__card.is-in { animation: swap .45s var(--ease); }
.st-tock__card {
  flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 14px; min-height: 0;
  border-radius: 18px; background: #241d18; box-shadow: inset 0 0 0 1.2px #493c31, 0 10px 18px -10px rgba(0,0,0,.6);
}
.st-tock__step { font: 600 1.14rem/1.2 var(--serif); text-wrap: balance; }
.st-tock__detail { margin-top: 5px; font-size: .84rem; line-height: 1.35; color: #c0af9c; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.st-tock__acts { display: flex; gap: 8px; }
.st-tock__shrink {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: 13px; background: #312821; color: var(--brass); box-shadow: inset 0 0 0 1px rgba(207,149,54,.35);
  font: 700 .84rem/1.1 var(--round); white-space: nowrap;
}
.st-tock__shrink svg { width: 14px; height: 14px; flex: none; }
.st-tock__shrink:active { transform: translateY(2px); }
.st-tock__done { flex: 1.2; padding: 0 12px; margin-bottom: 4px; white-space: nowrap; }
.st-tock__done.is-final { background: var(--sage); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 4px 0 #30593f; }
.st-tock__done.is-final:active { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 1px 0 #30593f; }
.st-tock__shrink[hidden] { display: none; }

/* mountain cleared */
.st-tock__cleared { align-items: center; justify-content: center; text-align: center; gap: 4px; padding-top: 44px; }
.st-tock__trophy { display: flex; align-items: flex-end; justify-content: center; gap: 10px; height: 38%; margin-bottom: 8px; }
.st-tock__joy { display: block; width: auto; height: 82%; aspect-ratio: 1; }
.st-tock__cairn { height: 100%; width: auto; overflow: visible; }
.st-tock__cairn > g { transform-box: fill-box; transform-origin: 50% 100%; animation: stone .55s var(--spring) both; }
@keyframes stone { from { opacity: 0; transform: translateY(-34px); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
.st-tock__sage { color: var(--sage); }
.st-tock__ctitle { font: 700 1.36rem/1.1 var(--serif); text-wrap: balance; }
.st-tock__cline { max-width: 26em; font-size: .88rem; line-height: 1.35; color: var(--umber); text-wrap: balance; }
.st-tock__shelve { margin-top: 10px; padding: 0 22px; }
@media (max-width: 479px) { .st-tock__long { display: none; } }

/* ---------- 10 Dam It ---------- */
.st-dam {
  --glow: 237 77 56;
  background:
    radial-gradient(70% 55% at 50% 22%, rgb(var(--glow) / .42), transparent 100%),
    radial-gradient(60% 30% at 50% 108%, rgb(var(--glow) / .16), transparent 100%),
    #0e0f12;
  color: #fff;
  transition: background .5s;
}
.st-dam[data-mood="angry"] { --glow: 255 26 26; }
.st-dam__tone {
  position: absolute; z-index: 6; top: 12px; right: 12px; min-height: 36px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.22); border-radius: 99px; background: rgba(255,255,255,.1);
  color: #fff; font: 700 .8rem/1 ui-rounded, var(--sans);
}
.st-dam__glow { position: absolute; left: 50%; top: 47%; width: 46%; height: 6%; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, rgb(var(--glow) / .6), transparent); }
.st-dam__buck { position: absolute; left: 50%; top: 9%; width: auto; height: 41%; translate: -50% 0; transform-origin: 50% 92%; pointer-events: none; }
.st-dam__buck.is-tantrum { animation: dam-tantrum .7s ease-in-out; }
@keyframes dam-tantrum { 15% { transform: translateY(-10px) rotate(-5deg); } 30% { transform: rotate(5deg); } 45% { transform: translateY(-7px) rotate(-4deg); } 60% { transform: rotate(4deg); } }
.st-dam__say {
  position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 74px;
  padding: 12px 16px; border-radius: 18px; background: #fff; color: #111;
  font: 700 .95rem/1.32 ui-rounded, var(--sans); text-wrap: pretty;
}
.st-dam__say::before { content: ""; position: absolute; top: -9px; left: 50%; margin-left: -10px; width: 20px; height: 11px; background: inherit; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.st-dam[data-mood="angry"] .st-dam__say { background: #ffdbd6; }
.st-dam__say.is-in { animation: swap .4s var(--ease); }
.st-dam__buys { position: absolute; z-index: 4; left: 14px; right: 14px; bottom: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-dam__buys button {
  min-height: 46px; padding: 6px 4px; border: 0; border-radius: 14px;
  background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  color: #fff; font: 700 .86rem/1.15 ui-rounded, var(--sans);
}
.st-dam__buys b { display: block; font-weight: 900; color: #ff8f6b; font-variant-numeric: tabular-nums; }
.st-dam__buys button:active { transform: scale(.95); }

/* ---------- 11 Avísame ---------- */
.st-avi {
  --avi-ink: #26223f; --avi-sun: #ffc93c; --avi-safe: #2fc98a; --avi-alert: #ff5a5f;
  background: #f4e9d4; color: var(--avi-ink);
}
.st-avi__map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-avi::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 5px var(--avi-alert), inset 0 0 90px rgba(255, 90, 95, .5);
  opacity: 0; transition: opacity .4s;
}
.st-avi[data-mood="alarmed"]::after { opacity: 1; }
.st-avi__mood { display: none; overflow: visible; }
.st-avi[data-mood="happy"] .st-avi__mood--happy,
.st-avi[data-mood="worried"] .st-avi__mood--worried,
.st-avi[data-mood="alarmed"] .st-avi__mood--alarmed,
.st-avi[data-mood="cheer"] .st-avi__mood--cheer { display: inline; }
.st-avi__luci, .st-avi__glow { transform-box: fill-box; transform-origin: 50% 50%; }
.js .st-avi__glow { animation: avi-glow 2.4s ease-in-out infinite; }
.st-avi.is-walking .st-avi__luci { animation: avi-bob .36s ease-in-out infinite alternate; }
.st-avi[data-mood="worried"] .st-avi__luci { animation: avi-sway 1.4s ease-in-out infinite; }
.st-avi[data-mood="alarmed"] .st-avi__glow { fill: var(--avi-alert); animation-duration: .9s; }
.st-avi__home-glow { transition: opacity .6s; }
.st-avi[data-mood="cheer"] .st-avi__home-glow { opacity: .45; }
@keyframes avi-bob { to { transform: translateY(-5px) rotate(4deg); } }
@keyframes avi-sway { 50% { transform: rotate(-6deg); } }
@keyframes avi-glow { 50% { transform: scale(1.18); opacity: .2; } }
.st-avi__chip {
  position: absolute; z-index: 6; top: 12px; left: 12px; display: flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 4px 13px 4px 5px; border-radius: 99px;
  background: #fffdf8; box-shadow: 0 0 0 2px var(--avi-ink), 0 3px 0 var(--avi-ink);
  font: 800 .8rem/1 ui-rounded, var(--sans); color: var(--avi-ink);
  animation: swap .4s var(--ease);
}
.st-avi__chip[hidden] { display: none; }
.st-avi__chip i {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: #7cc4ff; font: 900 .74rem/1 ui-rounded, var(--sans); font-style: normal;
}
.st-avi__chip[data-tone="alert"] { background: var(--avi-alert); color: #fff; }
.st-avi__chip[data-tone="safe"] { background: var(--avi-safe); }
.st-avi__panel {
  position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px;
  display: grid; gap: 10px; padding: 12px;
  border-radius: 20px; background: #fffdf8; box-shadow: 0 0 0 2px var(--avi-ink), 0 4px 0 var(--avi-ink);
}
.st-avi__say { min-height: 2.64em; font: 700 .9rem/1.32 ui-rounded, var(--sans); text-wrap: pretty; }
.st-avi__say.is-in { animation: swap .4s var(--ease); }
.st-avi__go {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 16px;
  border: 0; border-radius: 14px; background: var(--avi-sun); color: var(--avi-ink);
  box-shadow: inset 0 0 0 2px var(--avi-ink), 0 4px 0 var(--avi-ink);
  font: 800 1rem/1 ui-rounded, var(--sans);
  transition: transform .1s, box-shadow .1s, background .3s;
}
.st-avi__go:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--avi-ink), 0 1px 0 var(--avi-ink); }
.st-avi__go[aria-disabled="true"] { background: #efe4cf; color: #6d6680; cursor: default; }
.st-avi__go[aria-disabled="true"]:active { transform: none; box-shadow: inset 0 0 0 2px var(--avi-ink), 0 4px 0 var(--avi-ink); }
.st-avi[data-mood="worried"] .st-avi__go, .st-avi[data-mood="alarmed"] .st-avi__go { background: var(--avi-safe); }
.st-avi__count {
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px;
  background: var(--avi-ink); color: #fff; font-weight: 900; font-size: .82rem; font-variant-numeric: tabular-nums;
}
.st-avi__count[hidden] { display: none; }

/* ---------- Apps not on the App Store yet: their card says "coming soon" instead of the badge ---------- */
.app[data-release="soon"] [data-when="released"] { display: none !important; }
.app:not([data-release="soon"]) [data-when="soon"] { display: none !important; }
.soon {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--rule);
  font-size: .9rem; font-weight: 600; color: var(--ink-2);
}

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--paper); padding: 64px 0 56px; }
.contact__in { display: grid; gap: 40px; }
.contact h2 { font: 600 clamp(2.2rem, 8.6vw, 3.8rem)/1.02 var(--serif); letter-spacing: -.02em; max-width: 13ch; text-wrap: balance; }
.contact__kicker { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #b9b0a1; margin-bottom: 12px; }
.contact__say > p:not(.contact__mail):not(.contact__kicker) { margin-top: 14px; max-width: 32em; color: #cfc6b7; font-size: 1.05rem; }
.contact__say strong { color: var(--paper); font-weight: 600; }
.contact__mail { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.contact__mail a {
  font: 500 clamp(1.45rem, 6.4vw, 2.2rem)/1.1 var(--serif); color: var(--paper);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: rgba(244,239,230,.45);
  overflow-wrap: anywhere;
}
.copy {
  min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid rgba(244,239,230,.35);
  background: none; color: var(--paper); font-size: .88rem; font-weight: 600; cursor: pointer;
}
.copy:active { background: rgba(244,239,230,.1); }
.contact__more { display: grid; align-content: start; }
.contact__more a {
  display: block; padding: 18px 36px 18px 0; border-top: 1px solid rgba(244,239,230,.18);
  text-decoration: none; position: relative;
}
.contact__more li:last-child a { border-bottom: 1px solid rgba(244,239,230,.18); }
.contact__more a::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: .6;
}
.contact__more strong { display: block; font-weight: 600; font-size: 1.05rem; }
.contact__more span { display: block; margin-top: 3px; color: #b9b0a1; font-size: .93rem; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: #b9b0a1; padding: 8px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot .wrap { border-top: 1px solid rgba(244,239,230,.14); padding-top: 28px; }
.foot__grid { display: grid; gap: 28px; }
.foot__brand { display: flex; gap: 14px; align-items: flex-start; }
.foot__brand .brand__mark { color: #f4efe6; --paper: #1d1a16; }
.foot__brand p { font-size: .92rem; line-height: 1.5; }
.foot__brand strong { color: var(--paper); font-weight: 600; }
.foot__brand a { color: #e6ddcd; }
.foot__apps { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.foot__apps a { display: flex; align-items: center; min-height: 40px; color: #e6ddcd; text-decoration: none; font-size: .93rem; }
.foot__legal { margin-top: 28px; font-size: .76rem; line-height: 1.5; color: #8d8577; }

/* ---------- Wider screens ---------- */
@media (min-width: 600px) {
  .shelf__row { grid-template-columns: repeat(10, 1fr); }
  .shelf__app { --s: min(64px, calc((100vw - 40px) / 10 - 12px)); }
  .shelf__row li:nth-child(5n+1) .shelf__app::after,
  .shelf__row li:nth-child(5n) .shelf__app::after { border-radius: 0; left: 0; right: 0; }
  .shelf__row li:first-child .shelf__app::after { border-radius: 3px 0 0 3px; left: 2px; }
  .shelf__row li:last-child .shelf__app::after { border-radius: 0 3px 3px 0; right: 2px; }
  .foot__apps { grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 28px; }
}

@media (min-width: 860px) {
  .hero { padding-top: 40px; padding-bottom: 64px; }
  .hero__text { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: 56px; align-items: end; }
  .hero__text .eyebrow { grid-column: 1 / -1; }
  .hero h1 { max-width: 12ch; }
  .lede { font-size: 1.16rem; margin-top: 0; padding-bottom: .5rem; }
  .shelf { margin-top: 56px; }
  .shelf__app { --s: min(88px, calc((100vw - 40px) / 10 - 20px)); gap: 16px; }
  .shelf__app span { font-size: .82rem; max-width: 100%; text-wrap: balance; }
  .apps { padding: 72px 0 140px; }
  .apps__head { margin-bottom: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: none; align-items: end; }
  .apps__head p { margin-top: 0; max-width: 30em; }
  .apps__grid { grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 4vw, 56px); row-gap: 112px; padding-bottom: 88px; }
  .apps__grid > .app:nth-child(even) { translate: 0 88px; }
}
/* the wide two-column stage */
@media (min-width: 860px) and (max-width: 1239px) {
  /* an odd last world spans both columns: stage on the left, words beside it
     (three across, from 1240px, a short last row simply stays short) */
  .apps__grid > .app:last-child:nth-child(odd) {
    grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr;
    column-gap: clamp(28px, 4vw, 56px); align-items: center;
    margin-bottom: -88px; /* nothing below it is shifted down, so give back the grid's allowance */
  }
  .apps__grid > .app:last-child:nth-child(odd) .app__meta { padding: 88px 2px 0; }
  .stage { aspect-ratio: 5 / 4.1; }
  .st-adult__pip { height: 50%; }
  .st-garden__plant { width: 52%; }
  .st-wick__spirit { width: 50%; top: 3%; }
  .st-wick__glow { width: 56%; }
  .st-wick__talk { left: 22px; right: 22px; }
  .st-guide__fellow { width: 40%; top: 25%; }
  .st-guide__island { left: 27%; right: 27%; }
  .st-prod { padding: 24px; }
  .st-story { padding: 26px 24px 24px; }
  .st-bible { padding: 28px 26px; }
  .st-bible__tree { width: 52%; right: 4%; bottom: 58px; }
  .st-bible__act { max-width: 20em; }
  .st-tock__panel { padding: 22px; }
  .st-tock__desk { padding-top: 64px; }
  .st-tock { --tock: 104px; }
  .st-tock__step { font-size: 1.42rem; }
  .st-dam__say { left: 28px; right: 28px; font-size: 1.02rem; }
  .st-dam__buck { height: 46%; top: 8%; }
  .st-dam__glow { top: 51%; }
}
@media (min-width: 860px) {
  .contact { padding: 96px 0 72px; }
  .contact__in { grid-template-columns: 1.25fr 1fr; gap: 64px; align-items: end; }
  .foot__grid { grid-template-columns: auto 1fr; gap: 48px; align-items: start; }
  .foot__apps { justify-content: end; }
}

/* wide screens: three across, so a few apps fit on one screen */
@media (min-width: 1240px) {
  .apps .wrap { max-width: 1320px; }
  .apps__head { max-width: calc(1200px - 2 * var(--gutter)); margin: 0 auto 44px; }   /* the heading keeps the page's column; the cards reach wider */
  .apps__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 36px; row-gap: 64px; padding-bottom: 0; }
  .apps__grid > .app:nth-child(even) { translate: none; }
}

@media (min-width: 1280px) {
  .hero h1 { font-size: 6.2rem; }
  .shelf__app { --s: min(100px, calc((100vw - 40px) / 10 - 24px)); }
}

/* very narrow phones */
@media (max-width: 399px) {
  .st-avi__panel { gap: 8px; padding: 10px; }
  .st-avi__say { font-size: .84rem; }
  .st-wick.has-talk .st-wick__spirit, .st-wick.has-talk .st-wick__glow { transform: translateX(-50%) translateY(-36%) scale(.5); }
  .st-guide__note { top: 46px; font-size: 1.18rem; }
  .st-guide__fellow { top: 31%; width: 44%; }
  .st-guide__island { top: 67%; }
  .st-guide__choices { gap: 6px; flex-wrap: nowrap; }
  .st-guide__choices button { padding: 0 9px; font-size: .92rem; }
}
/* 360 to 374px wide: the header needs a little less air to fit */
@media (min-width: 360px) and (max-width: 374px) {
  .top__nav { gap: 0; }
  .top__nav a { padding-inline: 8px; }
  .brand { gap: 8px; }
}
@media (max-width: 359px) {
  .top__nav { gap: 0; }
  .top__nav a { padding-inline: 7px; font-size: .86rem; }
  .brand { gap: 7px; }
  .brand__word { font-size: 1.2rem; }
  .stage { aspect-ratio: 1 / 1.14; }
  .st-tock { --tock: 68px; }
  .st-tock__say { font-size: .9rem; }
  .st-tock__chips button { font-size: .78rem; gap: 6px; padding: 6px; }
  .st-tock__chips i { width: 26px; height: 26px; }
  .st-tock__pebbles li { font-size: .78rem; gap: 7px; }
  .st-tock__step { font-size: 1.02rem; }
  .st-tock__whisper { font-size: .8rem; }
  .st-tock__detail { display: none; }
  .st-tock__wide { display: none; }
  .st-tock.is-plan .st-tock__me { width: 48px; }
  .st-tock__pebbles { gap: 4px; }
  .st-tock__pebbles li { padding: 4px 7px 4px 6px; }
  .st-tock__shrink svg { display: none; }
  .st-tock__shrink, .st-tock__done { padding: 0 8px; font-size: .8rem; }
  .st-adult__task { font-size: .92rem; }
  .st-story { padding: 16px 14px 14px; }
  .st-story__ask { font-size: 1.3rem; }
  .st-story__times { margin-top: 10px; gap: 6px; }
  .st-story__times button { padding: 0 12px; }
  .st-story__book { margin-top: 10px; }
  .st-story__page { padding: 14px 16px; }
  .st-story__title { font-size: 1.2rem; }
  .st-guide__choices button { padding: 0 7px; font-size: .86rem; }
  .shelf__app { --s: min(54px, calc((100vw - 32px) / 5 - 12px)); }
  .st-dam__say { font-size: .82rem; padding: 9px 12px; left: 12px; right: 12px; }
  .st-dam__buck { height: 36%; }
  .st-dam__glow { top: 42%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 404 ---------- */
.lost__main { padding-bottom: 64px; }
.lost__go { margin-top: 28px; }
@media (min-width: 860px) {
  .lost .hero h1 { max-width: 14ch; }
}

.faq { padding: 8px 0 64px; }
.faq h2 { font: 600 clamp(2rem, 7vw, 3.1rem)/1.05 var(--serif); letter-spacing: -.02em; margin: 0 0 8px; }
.faq .faq-intro { margin: 0 0 8px; color: var(--ink-2); }
.faq details { border-top: 1px solid #d9d0c3; }
.faq details:last-of-type { border-bottom: 1px solid #d9d0c3; }
.faq summary { cursor: pointer; min-height: 44px; padding: 14px 2px; font: 600 1.05rem/1.35 var(--serif); }
.faq .faq-a { padding: 0 2px 16px; color: var(--ink-2); }
.faq .faq-a p { margin: 0; }
