/* Tokens from v3 src/chrome.css (HIG system colors, 44pt target, 28px panel radius, liquid glass).
 * v4 adds the dark palette. */
:root {
  --font: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  --target: 44px;
  --radius-control: 12px;
  --radius-panel: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 240ms;

  --bg: #ffffff;
  --ink: #1c1c1e;
  --ink-2: #6e6e73;
  --accent: #1c1c1e;
  --on-accent: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --hover: rgba(28, 28, 30, 0.06);
  --glass: rgba(255, 255, 255, 0.75);
  /* The corner buttons over the menu (profile, page view): clearer, the menu shows through (turg 10/19). */
  --glass-corner: rgba(255, 255, 255, 0.35);
  --glass-border: rgba(28, 28, 30, 0.1);
  --sheen: rgba(255, 255, 255, 0.52);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  /* Things to press stand up a little: a raised surface (chips) and a soft shadow (chips, sample cards). */
  --raised: #ffffff;
  --lift: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 1px rgba(0, 0, 0, 0.04);
  --blur: blur(14px) saturate(1.5);
  /* The pie baking (mascot .bake): dough, golden, golden brown. The same in both themes (it is food). */
  --dough: #f3dcaa;
  --golden: #e8ad55;
  --baked: #c27a30;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --ink: #f2f2f7;
    --ink-2: #98989d;
    --accent: #f2f2f7;
    --on-accent: #1c1c1e;
    --fill: rgba(118, 118, 128, 0.24);
    --hover: rgba(242, 242, 247, 0.08);
    --glass: rgba(44, 44, 46, 0.72);
    --glass-corner: rgba(44, 44, 46, 0.35);
    --glass-border: rgba(255, 255, 255, 0.12);
    --sheen: rgba(255, 255, 255, 0.14);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    --raised: rgba(255, 255, 255, 0.14);
    --lift: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.5);
  }
}
@media (prefers-reduced-motion: reduce) {
  :root { --duration: 0ms; }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden;
  /* Korean: break lines between words, never inside one. Long URLs may still break anywhere. */
  word-break: keep-all; overflow-wrap: anywhere;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Liquid glass surface (v3 .liquid-glass recipe: sheen, thin edge, red/cyan fringe). */
.glass, .talk::before, .picker::before {
  background: var(--glass);
  background-image: linear-gradient(135deg, var(--sheen), transparent 38%, transparent);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.glass {
  border: 1px solid var(--glass-border);
  box-shadow: inset 1px 0 rgba(255, 86, 116, 0.18), inset -1px 0 rgba(54, 226, 255, 0.16), inset 0 1px 0 var(--sheen), var(--shadow);
}
/* iOS 26 Safari reads the background and backdrop-filter of a fixed box at the bottom edge (80 % or more
   wide) and paints the bottom safe area with them, so the band went solid while the talk was open (v3
   BottomSheet, 9/17). The talk box itself stays clear; its glass is on ::before, which Safari does not read. */
.talk.glass, .picker.glass { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.talk::before, .picker::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; }

/* Mascot: center, a little below the middle. Moves to the top while the talk is open. */
.mascot {
  position: fixed; left: 50%; top: 58%; width: 108px; height: 108px; padding: 0; border: 0; background: transparent; color: var(--ink);
  border-radius: 50%; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
  transition: top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mascot svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* A thin rim in the page color all around the pie, mouth too: on a menu paper near the pie's own color the pie
   was hard to see (turg 10/9). Four hard shadows, no blur. */
.mascot svg { filter: drop-shadow(1.5px 0 0 var(--bg)) drop-shadow(-1.5px 0 0 var(--bg)) drop-shadow(0 1.5px 0 var(--bg)) drop-shadow(0 -1.5px 0 var(--bg)); }
/* While talking the mascot sits on the top edge of the talk panel, in the middle (--talk-top from app.ts). */
.talking .mascot { top: calc(var(--talk-top, 50vh) - 30px); transform: translate(-50%, -50%) scale(0.5); }

/* Moods (app.ts sets data-mood): idle, move, thinking, working, speaking. Each loops while it lasts.
 * Cartoon timing: hold still, then a fast move that squashes, stretches, overshoots and snaps back.
 * The whole body moves as the svg element, from its bottom middle: a CSS transform on a <g> inside the
 * svg is placed wrong in Safari (WebKit), which pushed the body left and cut it off at the edge. */
.mascot svg { transform-origin: 50% 96.875%; }
.mascot .mouth { transform-box: view-box; transform-origin: 32px 32px; }
.mascot .eye { transform-box: fill-box; transform-origin: center; }
.mascot[data-mood="idle"] svg { animation: idle-hop 4.2s infinite; }
.mascot[data-mood="idle"] .eye { animation: glance 5.6s infinite; }
.mascot[data-mood="move"] svg { animation: travel 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.mascot[data-mood="thinking"] svg { animation: ponder 2.4s infinite; }
.mascot[data-mood="thinking"] .eye { transform: translate(2px, -3px); }
.mascot[data-mood="thinking"] .mouth { transform: scaleY(0.35); }
.mascot[data-mood="working"] svg { animation: munch 0.5s infinite; }
.mascot[data-mood="working"] .mouth { animation: chomp 0.5s infinite; }
.mascot[data-mood="speaking"] svg { animation: talk 0.36s infinite; }
.mascot[data-mood="speaking"] .mouth { animation: chomp 0.36s infinite; }

/* Hold, crouch (squash), spring up (stretch), land with overshoot, settle. Moves are in % of the mascot
 * (it has more than one size), as the old 64-unit drawing moved: 14 units = 21.9%. */
@keyframes idle-hop {
  0%, 62% { transform: none; animation-timing-function: ease-in; }
  68% { transform: scale(1.1, 0.86); animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1); }
  76% { transform: translateY(-21.9%) scale(0.92, 1.12); animation-timing-function: ease-in; }
  84% { transform: scale(1.12, 0.84); animation-timing-function: cubic-bezier(0.3, 1.6, 0.5, 1); }
  90% { transform: scale(0.97, 1.04); }
  95%, 100% { transform: none; }
}
/* Eyes hold, dart to one side past the mark, snap back a little, hold; then the other side. */
@keyframes glance {
  0%, 30% { transform: none; }
  34% { transform: translate(-3.4px, -1px); }
  37%, 60% { transform: translate(-2.4px, -1px); }
  64% { transform: translate(3.4px, -2px); }
  67%, 88% { transform: translate(2.4px, -2px); }
  92%, 100% { transform: none; }
}
/* Between places: stretch on the way, squash on arrival, overshoot, settle. */
@keyframes travel {
  0% { transform: scale(0.9, 1.12); }
  55% { transform: scale(1.14, 0.86); }
  75% { transform: scale(0.96, 1.05); }
  100% { transform: none; }
}
/* Tilt and hold, then snap to the other side with a small overshoot. */
@keyframes ponder {
  0%, 38% { transform: rotate(-7deg); }
  46% { transform: rotate(10deg); }
  50%, 88% { transform: rotate(7deg); }
  96% { transform: rotate(-10deg); }
  100% { transform: rotate(-7deg); }
}
/* Busy eating: each bite squashes the body and springs back. */
@keyframes munch {
  0%, 100% { transform: none; }
  30% { transform: scale(1.1, 0.88); }
  55% { transform: translateY(-4.7%) scale(0.95, 1.07); }
}
@keyframes talk {
  0%, 100% { transform: none; }
  40% { transform: translateY(-3.1%) scale(0.98, 1.04); }
  70% { transform: scale(1.03, 0.97); }
}
@keyframes chomp { 0%, 100% { transform: none; } 45% { transform: scaleY(0.12); } }

/* Thinking: a thought bubble. Thinking long (after 4 s) or working: the pie bakes golden and smokes, and a
 * job bakes over its estimated time (--bake-time, --bake-delay from app.ts). The bubble and the smoke are
 * HTML, not svg, so their transforms are placed right in Safari too. Sizes are in % of the mascot. */
.mascot .bake { opacity: 0; }
.mascot .thought, .mascot .smoke { position: absolute; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.mascot .thought { right: 70%; bottom: 72%; width: 74%; height: 54%; transform-origin: 100% 100%; }
.thought > i, .thought .cloud { position: absolute; border: 2px solid var(--ink); background: var(--bg); border-radius: 999px; }
.thought > i { aspect-ratio: 1; }
.thought > i:nth-child(1) { right: 0; bottom: 0; width: 12%; }
.thought > i:nth-child(2) { right: 14%; bottom: 20%; width: 18%; }
.thought .cloud { left: 0; top: 0; width: 84%; height: 60%; display: flex; align-items: center; justify-content: center; gap: 8%; }
.thought .cloud i { width: 12%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); animation: dot 1.2s infinite both; }
.thought .cloud i:nth-child(2) { animation-delay: 0.2s; }
.thought .cloud i:nth-child(3) { animation-delay: 0.4s; }
.mascot .smoke { left: 50%; top: 2%; width: 30%; aspect-ratio: 1; }
.smoke i { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--ink-2); opacity: 0; }
.smoke i:nth-child(2) { --d: 0.8s; --x: 40%; }
.smoke i:nth-child(3) { --d: 1.6s; --x: -45%; }
.mascot[data-mood="thinking"] .thought { opacity: 1; animation: bubble-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.mascot[data-mood="thinking"] .bake { animation: bake-some 24s 4s linear both; }
.mascot[data-mood="thinking"] .smoke { --start: 4s; }
.mascot[data-mood="working"] .bake { animation: bake-full var(--bake-time, 60s) var(--bake-delay, 0s) linear both; }
.mascot:is([data-mood="thinking"], [data-mood="working"]) .smoke { opacity: 1; }
.mascot:is([data-mood="thinking"], [data-mood="working"]) .smoke i { animation: puff 2.4s calc(var(--start, 0s) + var(--d, 0s)) infinite both; }
@keyframes bubble-in { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: none; } }
@keyframes dot { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
/* Golden as it bakes: the dough color covers the pie first, then turns golden; a job ends golden brown. */
@keyframes bake-some { 0% { opacity: 0; fill: var(--dough); } 25% { opacity: 1; fill: var(--dough); } 100% { opacity: 1; fill: var(--golden); } }
@keyframes bake-full { 0% { opacity: 0; fill: var(--dough); } 12% { opacity: 1; fill: var(--dough); } 55% { fill: var(--golden); } 100% { opacity: 1; fill: var(--baked); } }
@keyframes puff {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
  20% { opacity: 0.5; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x, 0%)), -280%) scale(1.6); }
}
@media (prefers-reduced-motion: reduce) {
  .mascot svg, .mascot .eye, .mascot .mouth, .mascot .thought, .thought .cloud i { animation: none !important; }
  .mascot .smoke { display: none; }
}

.talk {
  /* 8px above the safe area, as v3's bottom sheet. Centered by left/right and auto margins, never a transform:
     with translateX(-50%) iOS 26 Safari still painted the band below the talk solid (turg's iPhone, /probe 10/8:
     no transform, 76% wide or 40px up each cleared it; no shadow or a clear input row did not). */
  position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin-inline: auto; height: var(--talk-h, min(72dvh, calc(100dvh - 112px))); max-height: calc(100dvh - 112px);
  border-radius: var(--radius-panel);
  display: flex; flex-direction: column; overflow: hidden;
  animation: rise var(--duration) var(--ease) backwards;
}
@keyframes rise { from { opacity: 0; margin-bottom: -12px; } }

/* Words fade out at the panel's top and bottom edges (a mask, so the glass behind stays clear: a blur layer
 * inside the glass panel can only blur the panel's own white, which showed as a white band). */
.log {
  -webkit-mask-image: linear-gradient(transparent, #000 24px, #000 calc(100% - var(--compose, 60px) - 24px), transparent calc(100% - var(--compose, 60px) + 8px));
  mask-image: linear-gradient(transparent, #000 24px, #000 calc(100% - var(--compose, 60px) - 24px), transparent calc(100% - var(--compose, 60px) + 8px));
}

.log { list-style: none; margin: 0; padding: 32px 20px calc(var(--compose, 60px) + 16px); flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.log p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.log .owner { align-self: flex-end; max-width: 80%; padding: 8px 14px; border-radius: 20px; background: var(--accent); color: var(--on-accent); }
.log .guide { align-self: flex-start; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
/* Dense chips (32px, v3 --ui-btn-dense): many fit; the tap area grows 6px each way. */
.chip {
  position: relative; min-height: 32px; padding: 0 12px; font-size: 14px; border: 1px solid var(--glass-border); border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.chip::after { content: ""; position: absolute; inset: -6px -2px; }
/* An icon before the label: the guide's star (app.ts starred) or a hint's icon (app.ts HINT_ICONS). */
.chip svg { width: 14px; height: 14px; flex: none; }
/* The guide's recommendation. */
.chip.star { border-color: rgba(255, 170, 0, 0.75); }
.chip.star svg { color: #f2a516; }
/* A chip that deletes for good (a menu, the account). */
.chip.danger { color: #c0392b; border-color: rgba(192, 57, 43, 0.55); }
/* Leaving is there but quiet. */
.item.leave { color: var(--ink-2); font-size: 13px; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-radius: var(--radius-control); background: var(--fill); overflow: hidden; }
.row { width: 100%; min-height: var(--target); padding: 10px 14px; border: 0; background: transparent; text-align: left; display: flex; flex-direction: column; }
.rows li + li .row { border-top: 1px solid var(--glass-border); }
.row span { color: var(--ink-2); font-size: 14px; }

.dots { display: inline-block; width: 28px; height: 8px; background: radial-gradient(circle, var(--ink-2) 3px, transparent 3.5px) 0 0 / 10px 8px repeat-x; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* The input floats over the bottom of the talk: no line; the words fade out behind it (.log mask). It grows
 * with its lines (Shift+Enter) up to five; --compose is its height, set by fitText. */
.compose { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: flex-end; gap: 8px; padding: 8px; }

.compose textarea { flex: 1; min-width: 0; min-height: var(--target); max-height: calc(5 * 22px + 22px); padding: 11px 16px; border: 0; border-radius: 22px; background: var(--fill); outline-offset: 0; line-height: 22px; resize: none; display: block; }
.send { width: var(--target); height: var(--target); flex: none; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.send svg { width: 20px; height: 20px; }

/* Gallery: one row of cards, sideways scroll. A sample card shows an A4 page shot. */
.gallery {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 2px 20px 6px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
/* With a mouse there is no swipe: a thin scroll bar shows that more cards are to the side. */
@media (pointer: fine) { .gallery { scrollbar-width: thin; } .gallery::-webkit-scrollbar { display: block; height: 6px; } .gallery::-webkit-scrollbar-thumb { background: var(--fill); border-radius: 3px; } }
.card {
  flex: none; width: 132px; padding: 0; border: 0; background: transparent; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 6px; text-align: left;
}
.card img {
  width: 132px; aspect-ratio: 1 / 1.414; border-radius: var(--radius-control); border: 1px solid var(--glass-border);
  object-fit: cover; object-position: top; background: var(--fill); display: block;
}
.card .name { font-size: 13px; color: var(--ink-2); padding: 0 2px; }
.card:not(:disabled):hover img { border-color: var(--ink-2); }
.card.star img { border-color: rgba(255, 170, 0, 0.75); }
.card.star .name { display: inline-flex; align-items: center; gap: 4px; }
.card.star .name svg { width: 13px; height: 13px; flex: none; color: #f2a516; }

/* Sign-in buttons, one under the other and as wide as the wider one: Apple's is never smaller than Google's
   (Apple HIG). Google brand: white surface, G logo, plain label. Apple: black with a white logo, white in dark. */
.sign-in { align-self: flex-start; display: inline-grid; gap: 8px; }
.sign-in a {
  min-height: var(--target); padding: 0 16px 0 12px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid; text-decoration: none; font-weight: 500;
}
.sign-in svg { width: 18px; height: 18px; flex: none; }
.google { background: #ffffff; color: #1f1f1f; border-color: #747775; }
.apple { background: #000000; color: #ffffff; border-color: #000000; }
@media (prefers-color-scheme: dark) {
  .google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
  .apple { background: #ffffff; color: #000000; border-color: #ffffff; }
}

.note:not(.mp-root *) { color: var(--ink-2); }

/* Attached files in an owner bubble. */
.files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.files img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-control); display: block; }
.files .pdf { padding: 6px 10px; border-radius: var(--radius-control); background: var(--fill); color: var(--ink); font-size: 14px; }
.log .owner:has(.files) { background: transparent; padding: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.log .owner:has(.files) p { padding: 8px 14px; border-radius: 20px; background: var(--accent); color: var(--on-accent); }

.attach { width: var(--target); height: var(--target); flex: none; border: 0; border-radius: 50%; background: var(--fill); display: grid; place-items: center; }
.attach svg { width: 20px; height: 20px; }

/* Profile: top left, signed in only: energy (bolt + %), tight. */
.profile {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; z-index: 3;
  height: 36px; padding: 0 9px 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 1px;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.profile svg { width: 16px; height: 16px; flex: none; }
/* The page view button (owners): top right, across from the profile. */
.view {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 3;
  width: 36px; height: 36px; padding: 0; border-radius: 50%; display: grid; place-items: center;
}
.view svg { width: 20px; height: 20px; }
.profile, .view { background-color: var(--glass-corner); }

/* Profile menu: the v3 context menu (28px panel, 44pt rows, inner radius = 28 - 6). */
#menu {
  position: fixed; top: calc(max(12px, env(safe-area-inset-top)) + 44px); left: 12px; z-index: 3;
  width: min(300px, calc(100% - 24px)); max-height: calc(100dvh - 80px); overflow-y: auto;
  padding: 6px; border-radius: var(--radius-panel); display: flex; flex-direction: column;
  animation: pop var(--duration) var(--ease) backwards; transform-origin: top left;
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
#menu .section { display: flex; flex-direction: column; padding: 4px 0; }
#menu .section + .section { border-top: 1px solid var(--glass-border); }
#menu .label { padding: 6px 14px 2px; font-size: 12px; color: var(--ink-2); }
#menu .item { min-height: var(--target); padding: 0 14px; border-radius: 22px; display: flex; align-items: center; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#menu .item:hover { background: var(--hover); }
#menu .who { padding: 4px 0 10px; }
#menu .who strong, #menu .who > span:not(.label) { padding: 0 14px; overflow-wrap: anywhere; }
#menu .who > span:not(.label) { color: var(--ink-2); font-size: 14px; }
#menu .energy-row { padding: 8px 14px 10px; gap: 6px; }
#menu .energy-row .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
#menu .energy-row .meta { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
#menu .bolt { display: inline-flex; align-items: center; gap: 2px; }
#menu .bolt svg { width: 14px; height: 14px; }
#menu .bar { display: block; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
#menu .bar .fill { display: block; height: 100%; border-radius: 3px; background: #3b82f6; }
#menu .refill { align-self: flex-start; margin-top: 4px; }
/* The refill's choices (subscription, packs), or the line that payments come soon. */
#menu .energy-row .note { margin-top: 4px; color: var(--ink-2); font-size: 13px; }
#menu .choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#menu .empty { padding: 8px 14px; color: var(--ink-2); font-size: 14px; }
#menu .sign-in { margin: 6px 8px; }
#menu .dots { margin: 12px 14px; }

/* Make button and its note. */
.make { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.primary { min-height: var(--target); padding: 0 20px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.make .note { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; }
.make .note svg { width: 13px; height: 13px; }

/* Things to press (turg 10/9: the draw button did not look like a button) stand up a little from the talk
   (--raised, --lift), change a little under the pointer, and go down when pressed. The primary button has
   a light top and a dark lower edge: without them it looked like the owner's own words (the same pill and
   color). Used ones (an earlier turn's, disabled) lie flat and faded, so the live ones stand out. */
.chip, .primary, .card img { transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s; }
.chip, .card img { box-shadow: var(--lift); }
.chip { background: var(--raised); }
.primary { background-image: linear-gradient(rgba(255, 255, 255, 0.14), transparent 60%); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.18); }
.chip:not(:disabled):hover { background-color: color-mix(in srgb, var(--raised) 94%, var(--ink)); }
.primary:not(:disabled):hover { background-color: color-mix(in srgb, var(--accent) 86%, var(--bg)); }
:is(.chip, .primary):not(:disabled):active, .card:not(:disabled):active img { transform: translateY(1px); box-shadow: none; }
:is(.chip, .primary):disabled, .card:disabled img { box-shadow: none; }
.chip:disabled { background: transparent; }
.primary:disabled { background: var(--fill); color: var(--ink-2); }

/* Progress card while a menu is made: one fixed size, centered in the talk, content stacked in the middle. The
   height holds the samples too (at 300 px, with them added later, the content ran out of the card). */
.log .guide.center { align-self: center; }
.making {
  width: min(320px, calc(100vw - 72px)); height: 470px; padding: 20px 24px 16px; border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
}
.making > div { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
/* Stopping the job (app.ts stopJob): quiet, under the rest. */
.making .stop { color: var(--ink-2); }
/* The design samples going by while a menu is made (app.ts sampleStrip). */
/* A grid, not the card's centered column (.making > div): there the row took the width of all its samples, and
   the whole talk scrolled sideways. */
.making > .wait-samples { width: 100%; display: grid; gap: 6px; }
.wait-samples p { margin: 0; color: var(--ink-2); font-size: 13px; text-align: center; }
.wait-row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 6px; }
.wait-row::-webkit-scrollbar { display: none; }
.wait-row figure { flex: none; width: 96px; margin: 0; scroll-snap-align: start; display: grid; gap: 4px; }
.wait-row img { width: 96px; aspect-ratio: 1 / 1.414; object-fit: cover; object-position: top; border-radius: 4px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.wait-row figcaption { font-size: 11px; color: var(--ink-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.making .time { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.making .tip {
  margin: 8px 0 0; height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  color: var(--ink-2); font-size: 13px; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; animation: fade 6s infinite;
}
@keyframes fade { 0%, 100% { opacity: 0.35; } 8%, 92% { opacity: 1; } }
.spinner { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--fill); border-top-color: var(--ink); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .making .tip { animation: none; } }

/* A made menu. */
.result { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 20px; color: var(--ink); text-decoration: none; max-width: 420px; }
.result span { color: var(--ink-2); font-size: 14px; }

/* Menu page: the menu fills the screen; the mascot waits at the bottom right. */
/* The page itself scrolls down the menu: only then does Safari fold its bars and show the menu under them
   (see-through safe areas; v3 learned this on 9/10). */
html:has(> body.menu-page), body.menu-page { height: auto; }
/* No bounce past the menu's ends: a browser paints that space with one flat color, never the paper (turg 10/19). */
html:has(> body.menu-page) { overscroll-behavior: none; }
body.menu-page { overflow: visible; }
/* The menu's box (render.ts menuParts) in this page, as v3 (turg 10/11: no frame). Under the menu room for the mascot
   in its corner (56px and a gap: it covered the last prices). Taps on it point at parts (app.ts tapMenu): no
   selection, no callout. */
.sheet { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; }
/* The menu's paper fills the screen and goes on under the mascot's room: a clear bottom border is painted with the
   paper (its background), grain and edges and all (turg 10/19: the room was a flat band under the menu). */
.sheet > .mp-root > .mp-menu:not(.paged) { min-height: 100dvh; border-bottom: 96px solid transparent; background-origin: border-box; }
/* The page view: the menu's box over the whole screen, its pages side by side (render.ts BOX_CSS, v3's page view). */
.paged .sheet { position: fixed; inset: 0; padding: 0; }
/* Printed alone (app.ts: the menu's QR code). */
.print-alone { display: none; }
.qr-print { padding-top: 20mm; text-align: center; font: 16px/1.4 system-ui, sans-serif; color: #000; }
.qr-print svg { display: block; width: 110mm; height: 110mm; margin: 0 auto 8mm; }
.qr-print h1 { font-size: 22pt; margin: 0 0 4mm; }
.qr-print p { margin: 0; font-size: 12pt; }
@media print {
  html, body { height: auto !important; overflow: visible !important; background: none !important; }
  body.menu-page:not(.printing) > :not(#sheet), body.printing > :not(.print-alone) { display: none !important; }
  body.printing .print-alone { display: block; }
  .sheet, .paged .sheet { position: static; padding: 0; }
}
/* Menu page: the mascot waits at the bottom right. Placed by left/top in every state, so going between the
   corner, the talk and the welcome animates. */
.menu-page .mascot { left: calc(100% - 44px); top: calc(100% - 44px - env(safe-area-inset-bottom)); width: 56px; height: 56px; transform: translate(-50%, -50%); }
.menu-page.talking .mascot { left: 50%; top: calc(var(--talk-top, 50vh) - 30px); transform: translate(-50%, -50%) scale(0.96); }
/* First visit of a new menu (app.ts welcome): the mascot greets in the middle with a speech bubble over it,
   fireworks and confetti all around (.party), then goes to its corner. */
.menu-page.welcome .mascot { left: 50%; top: 58%; transform: translate(-50%, -50%) scale(1.93); }
.welcome .nudge { display: none; }
.welcome-card {
  position: fixed; z-index: 3; left: 50%; top: calc(58% - 74px); transform: translate(-50%, -100%); width: min(320px, calc(100% - 32px));
  padding: 16px; border-radius: 22px; display: grid; gap: 12px; text-align: center;
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; transform-origin: 50% 100%;
}
.welcome-card p { margin: 0; }
/* The bubble's tail, pointing down at the mascot. */
.welcome-card::after {
  content: ""; position: absolute; left: 50%; bottom: -9px; width: 16px; height: 16px; margin-left: -8px; transform: rotate(45deg);
  background: var(--glass); border: solid var(--glass-border); border-width: 0 1px 1px 0; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.party { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

/* The mascot speaks first: a bubble next to it, until the talk opens. */
.nudge {
  position: fixed; z-index: 2; max-width: min(280px, calc(100% - 32px)); padding: 10px 14px; border-radius: 18px;
  left: 50%; top: calc(58% - 96px); transform: translate(-50%, -100%); text-align: left; font-size: 15px;
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.menu-page .nudge { left: auto; top: auto; right: 24px; bottom: calc(100px + env(safe-area-inset-bottom)); transform: none; }
.talking .nudge { display: none; }
@keyframes pop-in { from { opacity: 0; scale: 0.6; } }
button.item { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; }

/* A menu's QR code in the talk: dark modules on a light card, whatever the theme (scanners need contrast). */
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr-card .qr { width: 200px; height: 200px; padding: 10px; border-radius: 16px; background: #fff; color: #111; }
.qr-card .qr svg { width: 100%; height: 100%; display: block; }

/* Grip on the talk panel's top edge: drag to any height between the minimum and the maximum. */
.grip { position: absolute; top: 0; left: 64px; right: 64px; height: 24px; z-index: 1; cursor: ns-resize; touch-action: none; }
.grip::after { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--fill); }

/* Gallery: text-only options are chips above the sample cards. */
.gallery-wrap { display: flex; flex-direction: column; gap: 10px; }

/* The wait game in the progress card. */
.game { display: block; width: 100%; height: 96px; color: var(--ink); touch-action: manipulation; cursor: pointer; }

/* The game card in the talk: tap anywhere on it to jump. */
.game-card { align-self: center; padding: 12px 14px; border-radius: 20px; width: min(320px, 100%); cursor: pointer; touch-action: manipulation; }
.log .guide:has(.game-card) { align-self: stretch; }

/* Folded talk (after "find …"): the input and the last words only, so the menu shows above. */
.talk { transition: height 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
/* Home: the talk opens at its whole height (turg 10/19). */
body:not(.menu-page) .talk { height: var(--talk-h, calc(100dvh - 112px)); }
/* A phone's keyboard is up (app.ts fitKeyboard): the talk fills the visible height above it, under the status
   bar, and the mascot steps aside. */
.keyboard .talk { height: calc(var(--vv-h, 100dvh) - 16px - env(safe-area-inset-top, 0px)); max-height: none; }
.keyboard .mascot { opacity: 0; pointer-events: none; }
.talk.resizing { transition: none; }
.talk.mini { height: 148px; }
.talk.mini .grip { display: none; }

/* The pointer: tapped items as chips above the input. */
.targets { position: absolute; left: 0; right: 0; bottom: 60px; z-index: 1; display: flex; gap: 6px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.targets::-webkit-scrollbar { display: none; }
.chip.target { flex: none; min-height: 32px; padding: 0 12px; font-size: 14px; background: var(--glass); border-color: rgba(255, 170, 0, 0.8); }
.chip.target .x { color: var(--ink-2); }
.chip.held { gap: 6px; padding-left: 4px; }
.chip.held img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.talk.pointing .log { padding-bottom: 116px; }
.pointed { align-self: flex-end; font-size: 12px; color: var(--ink-2); }

/* Marks around the parts pointed at (app.ts drawMarks): boxes on the page over the menu frame. */
.marks { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.mark { position: absolute; margin: -4px 0 0 -4px; padding: 4px; box-sizing: content-box; border: 2px solid rgba(255, 170, 0, 0.95); border-radius: 6px; transform: translate(-2px, -2px); }
/* Selection mode (several parts, app.ts holdMenu): the marks get a soft fill, and a bar at the top says so,
   with the count and a way out. Parts next to each other share one mark (drawMarks). */
.selecting .mark { background: rgba(255, 170, 0, 0.12); }
.selectbar {
  position: fixed; z-index: 3; top: max(12px, env(safe-area-inset-top)); left: 0; right: 0; margin-inline: auto;
  width: fit-content; max-width: calc(100% - 170px); display: flex; gap: 8px; align-items: center; padding: 4px 4px 4px 14px;
  border-radius: 999px; font-size: 14px; white-space: nowrap; animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.selectbar strong { font-variant-numeric: tabular-nums; color: #c47a00; }
.selectbar button { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--ink); color: var(--bg); font-size: 13px; }

/* The pointer slice (app.ts placeSlice): the mascot's missing slice in the mascot's color, its point on the
   part (--x, --y on the page). It travels to a new part with an overshoot (move), pokes while it waits
   (idle), and presses on a tap (click). */
.slice {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; pointer-events: none;
  /* A faint rim and crust line in the paper color, so it reads as a slice cut from the mascot. */
  color: var(--ink); --slice-rim: color-mix(in srgb, var(--bg) 45%, transparent); filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
  transform: translate(calc(var(--x, 0px) - 2.6px), calc(var(--y, 0px) - 2.6px));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.slice.still { transition: none; }
/* Quick edits (app.ts): beside the slice, edit, add and delete for the last part pointed at (owners). On the
   page like the slice, so it scrolls with the menu. */
.quick {
  position: absolute; left: 0; top: 0; display: flex; gap: 2px; padding: 3px; border-radius: 999px;
  transform: translate(var(--qx, 0px), var(--qy, 0px)); transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.quick.still { transition: none; }
.quick button { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); display: grid; place-items: center; }
.quick button:hover { background: var(--hover); }
.quick svg { width: 19px; height: 19px; }
/* A text edited where it stands: over the part's words in its own type, as wide as the words, on the paper's
   color, with a thin outline close around it. */
.inplace {
  position: absolute; z-index: 2; display: inline-block; min-width: 1ch; margin: 0; padding: 0 2px; border-radius: 3px;
  white-space: pre-wrap; overflow-wrap: anywhere; outline: 1.5px solid rgba(255, 170, 0, 0.95); outline-offset: 2px; cursor: text;
}
.inplace:empty::before { content: attr(data-placeholder); opacity: 0.45; }
/* What a quick edit did, with undo. Narrow and 40px up, without a transform: a wide box at the bottom edge
   makes Safari paint the safe area solid (see .talk). */
.toast {
  position: fixed; z-index: 3; left: 0; right: 0; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); margin-inline: auto;
  width: fit-content; max-width: calc(100% - 32px); display: flex; gap: 10px; align-items: center; padding: 6px 6px 6px 16px; border-radius: 999px;
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.toast:not(:has(button)) { padding-right: 16px; min-height: 44px; }

.slice svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 7.5% 7.5%; animation: slice-idle 1.6s ease-in-out infinite; }
.slice.moving svg { animation: slice-move 0.5s ease-out; }
.slice.click svg { animation: slice-click 0.34s ease-out; }
/* Pull back from the point, then poke the part again. */
@keyframes slice-idle { 0%, 100% { transform: none; } 50% { transform: translate(3px, 3px); } }
@keyframes slice-move { 0% { transform: scale(0.88, 1.12); } 60% { transform: scale(1.08, 0.93); } 100% { transform: none; } }
@keyframes slice-click { 0% { transform: none; } 40% { transform: translate(-2px, -2px) scale(0.82); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .slice { transition: none; } .slice svg { animation: none !important; } }

/* History: each version a small page. The cards start stacked on the newest, then fan out sideways
   (one after another), and overlap so many fit; the tapped one rises and its changes show below. */
.history { display: flex; flex-direction: column; gap: 8px; }
.log .guide:has(.history) { align-self: stretch; }
.deck { display: flex; overflow-x: auto; margin: 0 -20px; padding: 14px 20px 6px; scrollbar-width: none; }
.deck::-webkit-scrollbar { display: none; }
.snap {
  --step: 60px;
  flex: none; position: relative; width: 96px; margin-left: calc(var(--step) - 96px); padding: 0; border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
  opacity: 0; transform: translateX(calc((var(--n) - 1 - var(--i)) * var(--step))) rotate(calc((var(--n) - 1 - var(--i)) * -3deg));
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i) * 45ms), opacity 0.25s ease calc(var(--i) * 45ms);
}
.snap:first-child { margin-left: 0; }
.deck.open .snap { opacity: 1; transform: none; }
.deck.open .snap.on { z-index: 1; transform: translateY(-8px); }
.snap .page { display: block; width: 96px; height: 136px; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28); }
.snap .thumb { display: block; width: 384px; height: 544px; overflow: hidden; transform: scale(0.25); transform-origin: 0 0; pointer-events: none; }
.snap.on .page { outline: 2px solid rgba(255, 170, 0, 0.95); outline-offset: 2px; }
.snap .when { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.changes { margin: 0; padding: 0 0 0 1.1em; font-size: 14px; line-height: 1.55; }

/* Home (turg 10/19): the name, its e the pie, whose speech bubble is the one box (app.ts startMake); the legal
   links under it. Menus lie scattered around on the paper (#scatter). The mascot is the pie in the name meanwhile. */
:root { --home-paper: #f6f1e9; --home-card: #fffdf9; }
@media (prefers-color-scheme: dark) { :root { --home-paper: #1b1916; --home-card: #2a2724; } }
body.starting { background: var(--home-paper); }
.starting .mascot, .starting .nudge { display: none; }
.home {
  position: fixed; z-index: 1; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(640px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: center;
}
.wordmark { margin: 0 0 30px; font: 600 clamp(60px, 15vw, 104px)/1 Fraunces, Georgia, serif; letter-spacing: -0.04em; color: var(--ink); white-space: nowrap; }
.logo-pie { display: inline-block; width: 0.56em; height: 0.56em; margin: 0 0 0 0.03em; padding: 0; border: 0; background: none; color: var(--ink); vertical-align: -0.02em; }
.logo-pie svg { display: block; width: 100%; height: 100%; }
.start {
  position: relative; width: 100%; padding: 14px; border-radius: 26px; background: var(--home-card); border: 1px solid var(--glass-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 22px 60px -14px rgba(60, 40, 20, 0.28); display: grid; gap: 4px;
}
/* The tail, under the pie (--tail-x from renderStart). */
.start::before {
  content: ""; position: absolute; top: -12px; left: var(--tail-x, 80%); width: 24px; height: 24px; margin-left: -12px; transform: rotate(45deg);
  background: var(--home-card); border: solid var(--glass-border); border-width: 1px 0 0 1px; border-radius: 5px 0 0 0;
}
.start textarea { width: 100%; min-height: calc(2 * 26px + 12px); max-height: 40vh; padding: 6px 8px; border: 0; background: transparent; font-size: 18px; line-height: 26px; resize: none; outline: none; display: block; }
/* The ask, typing (app.ts typeAsk): the pie's words, in the ink, a little faint. */
.start textarea::placeholder { color: var(--ink); opacity: 0.5; font-weight: 600; letter-spacing: -0.01em; }
.start-held { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; }
.start-login { display: grid; gap: 8px; padding: 0 8px 6px; }
.start-login p { margin: 0; font-size: 14px; }
.start-row { display: flex; align-items: center; gap: 8px; }
.start-row .attach { margin-right: auto; }
.start-skip { min-height: 40px; padding: 0 14px; border: 1px solid var(--glass-border); border-radius: 999px; background: transparent; color: var(--ink-2); }
.start-send { min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.legal { margin-top: 18px; display: flex; gap: 14px; font-size: 13px; }
.legal a { color: var(--ink-2); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
/* The menus on the table: the same size, any way round (app.ts scatter). Flat paper (turg 10/19: no bending): a
   slight curl shows only as light on the face, darker toward the edges and a corner, and as the shadow. The light
   is from the top of the screen (--sx, --sy: down the screen in the menu's turned frame). Each falls flat from a
   height: big and high, its shadow far, wide and faint; the shadow comes in and darkens as it nears the table, and it
   lands still and square. */
#scatter { position: fixed; inset: 0; overflow: hidden; pointer-events: none; transition: opacity var(--duration) var(--ease); }
.talking #scatter, body:not(.starting) #scatter { opacity: 0; }
#scatter .sheet {
  position: absolute; aspect-ratio: 794 / 1123; border-radius: 4px; background: #fff top / cover no-repeat;
  box-shadow:
    calc(var(--sx) * 1px) calc(var(--sy) * 1px) 2px rgba(0, 0, 0, 0.1),
    calc(var(--sx) * 7px) calc(var(--sy) * 9px) 18px -6px rgba(60, 40, 20, 0.32);
  transform: translate(-50%, -50%) rotate(var(--turn));
  animation: land 2.2s var(--delay) backwards;
}
#scatter .sheet::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(60, 40, 20, 0.07)),
    linear-gradient(calc(180deg - var(--turn)), rgba(255, 255, 255, 0.14), transparent 35%, transparent 75%, rgba(60, 40, 20, 0.06));
}
#scatter .sheet.still { animation: none; }
@keyframes land {
  0% {
    opacity: 0; animation-timing-function: cubic-bezier(0.45, 0, 0.8, 0.5);
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) rotate(var(--from)) scale(1.8);
    box-shadow: calc(var(--sx) * 50px) calc(var(--sy) * 80px) 70px -10px rgba(60, 40, 20, 0.1), 0 0 0 transparent;
  }
  15% { opacity: 1; }
  88% {
    animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1);
    transform: translate(-50%, -50%) rotate(var(--turn)) scale(1);
    box-shadow: calc(var(--sx) * 1px) calc(var(--sy) * 1px) 2px rgba(0, 0, 0, 0.14), calc(var(--sx) * 4px) calc(var(--sy) * 5px) 10px -4px rgba(60, 40, 20, 0.4);
  }
  94% { transform: translate(-50%, -50%) rotate(var(--turn)) scale(0.993); }
}
@media (prefers-reduced-motion: reduce) { #scatter .sheet { animation: none; } }

/* A new menu's designs to pick (app.ts offerDrafts): a small sheet at the bottom, the menu in the design tapped
   above it (untouchable meanwhile). Each design a phone's width made small (the card sets its scale). A fixed box at
   the bottom edge, as the talk: its glass on ::before, centered by margins, no transform (iOS 26 Safari, .talk). */
.picker {
  position: fixed; z-index: 3; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); max-width: 460px; margin-inline: auto;
  padding: 12px 14px 14px; border-radius: var(--radius-panel); display: grid; gap: 10px; animation: fade-in 0.4s ease backwards;
}
@keyframes fade-in { from { opacity: 0; } }
.picker > p { margin: 0; font-weight: 600; text-align: center; }
.pick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pick-card { padding: 0; border: 0; background: transparent; display: grid; gap: 4px; justify-items: center; }
.pick-card .page { display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; background: var(--fill); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }
.pick-card .thumb { display: block; width: 384px; transform-origin: 0 0; pointer-events: none; }
.pick-card.on .page { outline: 2.5px solid rgba(255, 170, 0, 0.95); outline-offset: 2px; }
.pick-buttons { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.pick-again { min-height: var(--target); padding: 0 18px; border: 1px solid var(--glass-border); border-radius: 999px; background: transparent; color: var(--ink-2); }
.pick-take { min-height: var(--target); border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.picker.busy { opacity: 0.6; pointer-events: none; }
.picking .nudge, .picking .mascot { display: none; }
.picking #sheet { pointer-events: none; }

/* Inside an app's own browser, in the sign-in's place (googleButton). */
.in-app .note { margin: 0 0 8px; }

/* A moved v3 menu in its owner's page (http.ts): the guests' page fills the window, the app floats on top. */
.v3look-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
