/* Group stacks (Elliott, 2026-10-21): a group's stack of cards, full screen
   (the Groups tab's list is in groups.css). Built to the "Group stacks"
   mockup (version 7), then "Chillin stack first" (v2, 2026-10-25): the stack
   first, Chat a button up top. Uses the app's bloom colors and gr-sheet sheets. */

/* The stack, full screen. */
.st-page { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--bloom-canvas, #f4f3ee); color: var(--bloom-ink); font-family: "Nunito", ui-rounded, system-ui, sans-serif; overflow: hidden; }
/* One column that fits the screen and doesn't scroll, so the bar stays at the bottom: the stack
   or the chat takes what's left between the title and the bar. */
.st-page[open] { display: flex; flex-direction: column; gap: 14px; padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box; animation: st-in .3s cubic-bezier(.2, .9, .3, 1); }
.st-page > :not(dialog) { flex: none; width: 100%; max-width: 440px; margin-inline: auto; box-sizing: border-box; }
.st-page::backdrop { background: var(--bloom-canvas, #f4f3ee); }
@keyframes st-in { from { opacity: 0; transform: translateY(18px); } }
.st-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.st-back, .st-more { padding: 6px 0; border: 0; background: none; color: var(--bloom-muted); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.st-more { padding: 6px 4px; letter-spacing: 1px; }
.st-topright { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-live { display: inline-flex; align-items: center; gap: 6px; max-width: 200px; padding: 7px 12px; border: 0; border-radius: 999px; background: #fff; color: #c2361b; font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 10px #0000000d; cursor: pointer; }
.st-live::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--bloom-live); }
.st-live[hidden], .st-ring-group[hidden], .st-switch[hidden] { display: none; }
/* Chat, up top (2026-10-25), with what's new in it; on the chat it reads Stack, dark, to go back. */
.st-switch { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: #fff; color: var(--bloom-ink); font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 10px #0000000d; cursor: pointer; }
.st-switch.on { background: var(--bloom-ink); color: #fff; }
.st-switch-icon.chat::before { content: "💬"; font-size: 12px; }
.st-switch-icon.stack { width: 9px; height: 11px; margin: 2px 3px 0 0; border: 2px solid currentColor; border-radius: 3px; box-shadow: 3px -3px 0 -1px #fff, 3px -3px 0 1px currentColor; }
.st-switch-n { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--bloom-live); color: #fff; font-size: 11px; line-height: 18px; text-align: center; box-sizing: border-box; }
/* Ring the group for a hangout (2026-10-23): the couch's yellow, so it reads as the way in. */
.st-ring-group { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 0; border-radius: 999px; background: var(--bloom-surface); color: var(--bloom-ink); font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.st-ring-group::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--bloom-live); }
.st-ghead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.st-ghead h2 { margin: 0; outline: none; font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1.05; overflow-wrap: anywhere; }
/* Where you are in the stack, quietly between it and the bar. */
.st-count { margin: -10px 0 -6px; text-align: center; color: var(--bloom-muted); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-page > .st-view { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; overflow: hidden auto; }
.st-view > * { flex: none; }
.st-loading, .st-empty { margin: 40px 0; text-align: center; color: var(--bloom-muted); font-weight: 700; }
.st-fresh { align-self: center; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--bloom-ink); color: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }

/* Faces. */
.st-face { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background-color: var(--circle-tint); background-size: cover; background-position: center; color: transparent; font-size: 0; }

/* Cards. */
/* It takes the room between the title and the bar, and on a tall phone sits at the bottom of
   it, by your thumb (Elliott, 2026-10-25). Its own layer, so however many cards it holds, an
   opened card (z-index 160) stays above them. */
.st-view > .st-deck { position: relative; z-index: 0; isolation: isolate; flex: 1 1 0; height: auto; min-height: 220px; max-height: 620px; margin: auto 0 18px; }
.st-card { position: absolute; inset: 0; display: flex; flex-direction: column; border-radius: 28px; background: #fff; box-shadow: 0 14px 34px #00000017; overflow: hidden;
  transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.2, .9, .3, 1.15), opacity .35s; outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.st-card.dragging { transition: none; }
html.keys .st-card:focus-visible { box-shadow: 0 0 0 3px var(--bloom-ink), 0 14px 34px #00000017; }
.st-card[data-depth="1"] { transform: translateY(14px) scale(.955) rotate(-2.5deg); }
.st-card[data-depth="2"] { transform: translateY(26px) scale(.915) rotate(2deg); }
.st-card[data-depth="3"] { transform: translateY(36px) scale(.88) rotate(-1deg); opacity: .9; }
.st-card[data-depth="hidden"] { transform: translateY(40px) scale(.86); opacity: 0; }
.st-card[data-depth="gone"] { display: none; }
/* The cards underneath keep their buttons to themselves: the black Hang out button peeked out under
   the card on top as a dark sliver (Elliott, 2026-10-27). They show as a card comes to the top. */
.st-card > .st-foot { transition: opacity .25s; }
.st-card[data-depth]:not([data-depth="0"]) > .st-foot { opacity: 0; }
.st-card.fly { transform: translate(115%, -40px) rotate(22deg) !important; opacity: 0; }
.st-card.fly-left { transform: translate(-115%, -40px) rotate(-22deg) !important; opacity: 0; }
/* Going round (Elliott, 2026-10-25): the top card can be flicked up and out, so it takes vertical
   drags. A long one's words scroll themselves until they're read to the end (stacks.js drag),
   while its name and buttons still flick it. */
.st-round .st-card[data-depth="0"]:not(.st-below), .st-round .st-card[data-depth="0"]:not(.st-below) .st-body,
.st-round .st-card[data-depth="0"].st-below > .st-who, .st-round .st-card[data-depth="0"].st-below > .st-foot { touch-action: none; }
.st-card.toss { transform: translate(0, -130%) rotate(-6deg) !important; opacity: 0; }
/* A long card fades out at the bottom with "more ↓" until it's read to the end (Elliott, 2026-10-25). */
.st-card.st-below .st-body { -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), #0000); mask-image: linear-gradient(#000 calc(100% - 56px), #0000); }
.st-card.st-below .st-foot { position: relative; }
.st-card.st-below .st-foot::before { content: "more ↓"; position: absolute; left: 50%; top: 2px; transform: translate(-50%, -100%); padding: 3px 10px; border-radius: 999px; background: var(--bloom-surface); color: var(--bloom-ink); font-size: 12px; font-weight: 800; white-space: nowrap; pointer-events: none; }
/* Hold a card (2026-10-25): Save this week, or throw it out. */
.st-opt { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 8px; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--bloom-surface); color: var(--bloom-ink); font: inherit; text-align: left; cursor: pointer; }
.st-opt-icon { flex: none; font-size: 22px; }
.st-opt-words { display: grid; gap: 1px; min-width: 0; }
.st-opt-words b { font-size: 16px; font-weight: 800; }
.st-opt-words small { color: var(--bloom-muted); font-size: 13px; font-weight: 700; }
/* The first time (2026-10-25): a little card shows the moves. */
.st-tip { width: min(320px, calc(100% - 48px)); max-width: none; margin: auto; padding: 20px; border: 0; border-radius: 26px; background: #fff; color: var(--bloom-ink); font-family: inherit; text-align: center; box-shadow: 0 20px 50px #0000002e; box-sizing: border-box; }
.st-tip[open] { display: grid; gap: 14px; }
.st-tip::backdrop { background: #151615b8; }
.st-tip h2 { margin: 0; font-size: 19px; font-weight: 800; }
.st-tip-stage { position: relative; height: 140px; border-radius: 18px; background: var(--bloom-surface); overflow: hidden; }
.st-tip-card { position: absolute; left: 50%; top: 18px; width: 84px; height: 104px; margin-left: -42px; border-radius: 14px; background: #fff; box-shadow: 0 4px 12px #0000001a; }
.st-tip-card::before { content: ""; position: absolute; left: 12px; right: 12px; top: 14px; height: 9px; border-radius: 5px; background: var(--bloom-surface); box-shadow: 0 17px 0 var(--bloom-surface), 0 34px 0 var(--bloom-surface); }
.st-tip-card.back { transform: translateY(7px) scale(.92); opacity: .6; }
.st-tip-finger { position: absolute; left: 50%; top: 84px; width: 28px; height: 28px; margin-left: -16px; border: 2px solid var(--bloom-live); border-radius: 50%; background: #ff5a3655; }
.st-tip-lines { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; color: var(--bloom-muted); font-size: 14px; font-weight: 700; }
.st-tip-lines b { color: var(--bloom-ink); font-weight: 800; }
.st-tip-done { justify-self: center; min-height: 44px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--bloom-ink); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .st-tip-card.front { animation: st-tip-deal 6s ease-in-out infinite; }
  .st-tip-finger { animation: st-tip-finger 6s ease-in-out infinite; }
}
@keyframes st-tip-deal {
  0%, 8% { transform: none; opacity: 1; } 22% { transform: translateX(120%) rotate(16deg); opacity: 0; } 23%, 30% { transform: none; opacity: 0; } 34%, 42% { transform: none; opacity: 1; }
  56% { transform: translateY(-140%) rotate(-5deg); opacity: 0; } 57%, 64% { transform: none; opacity: 0; } 68%, 100% { transform: none; opacity: 1; }
}
@keyframes st-tip-finger {
  0%, 8% { transform: none; opacity: 1; } 22% { transform: translateX(70px); opacity: 1; } 26%, 34% { transform: none; opacity: 0; } 36% { opacity: 1; }
  42% { transform: none; } 56% { transform: translateY(-70px); opacity: 1; } 60%, 68% { transform: none; opacity: 0; } 70% { opacity: 1; transform: scale(1); }
  82% { transform: scale(1.35); } 90%, 100% { transform: scale(1); opacity: 1; }
}
.st-week-preview { display: block; width: 100%; max-height: 40dvh; margin: 0 0 14px; object-fit: contain; object-position: top; border-radius: 14px; background: #fbf6ea; }
.st-week-preview:not([src]) { min-height: 120px; }
.st-who { display: flex; align-items: center; gap: 12px; margin: 18px 16px 0; }
.st-face-button { flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.st-who .st-face { width: 52px; height: 52px; }
.st-who-words { display: grid; min-width: 0; }
.st-who-words b { font-size: 18px; font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mood, .st-replied { font-size: 13px; font-weight: 700; color: var(--bloom-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-when { margin-left: auto; align-self: flex-start; padding-top: 4px; font-size: 13px; font-weight: 700; color: var(--bloom-muted); white-space: nowrap; }
.st-body { position: relative; flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 0; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; touch-action: pan-y; }
/* The post is the poster's chat bubble (Elliott, 2026-10-23): others on the left, yours on the right. */
.st-bubble { flex: none; display: flex; flex-direction: column; gap: 6px; align-self: flex-start; max-width: 92%; padding: 10px 14px; border-radius: 22px 22px 22px 6px; background: var(--bloom-surface); box-sizing: border-box; }
.st-bubble.mine { align-self: flex-end; border-radius: 22px 22px 6px 22px; background: var(--bloom-ink); }
.st-bubble.media { width: 100%; padding: 4px; }
.st-bubble.media .st-text { padding: 4px 8px 2px; }
.st-text { margin: 0; color: var(--bloom-ink); font-size: 18px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; white-space: pre-line; flex: none; }
.st-bubble.mine .st-text { color: #fff; }
.st-link { position: relative; flex: none; display: block; border: 1px solid var(--bloom-line); border-radius: 18px; overflow: hidden; background: #fff; color: var(--bloom-ink); text-decoration: none; }
.st-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 1.91; max-height: 190px; width: 100%; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, #fff), color-mix(in srgb, var(--c) 70%, #fff)); }
.st-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-thumb.yt { background: linear-gradient(135deg, #2b1055, #7597de); }
.st-site-mark { font-size: 48px; font-weight: 800; color: #ffffffd9; }
.st-play { position: relative; width: 58px; height: 40px; border-radius: 12px; background: #ff0033; display: grid; place-items: center; box-shadow: 0 6px 18px #0004; }
.st-play::before { content: ""; border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.st-link-words { display: grid; gap: 1px; padding: 9px 12px 10px; }
.st-link-words small { font-size: 12px; font-weight: 800; color: var(--bloom-muted); letter-spacing: .02em; }
.st-link-words b { font-size: 15px; font-weight: 800; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-stickers { position: absolute; right: 10px; top: 10px; z-index: 2; display: flex; flex-direction: row-reverse; align-items: center; pointer-events: none; }
/* Stickers on a post without a link sit in a row under it, clear of the replies' bubbles. */
.st-body > .st-stickers { position: static; flex: none; align-self: flex-end; min-height: 42px; padding-right: 8px; }
.st-sticker { display: grid; place-items: center; width: 42px; height: 42px; margin-left: -8px; border-radius: 50%; background: #fff; font-size: 22px; box-shadow: 0 4px 12px #0000001f; transform: rotate(var(--r, -8deg)); }
.st-sticker.word { width: auto; height: auto; padding: 5px 10px; border-radius: 10px; font-size: 13px; font-weight: 800; background: var(--sc, #ffe14d); color: #111; }
.st-sticker.landing { animation: st-land .8s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes st-land { from { transform: translateY(-90px) scale(1.8) rotate(20deg); opacity: 0; } }
/* A photo post (2026-10-23): the picture at its own shape, no taller than the card allows. */
/* It stays short enough on a small phone to leave room for the replies; then the card scrolls. */
.st-photo { position: relative; flex: none; display: block; width: 100%; min-height: 110px; max-height: min(300px, 36dvh); padding: 0; border: 0; border-radius: 17px; overflow: hidden; background: var(--bloom-surface); cursor: zoom-in; }
.st-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A held photo offers Save (stacks.js holdToSave), not iOS's own menu or a text selection. */
.st-photo, .st-reply-photo, .st-viewer img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.st-photo img, .st-reply-photo img, .st-viewer img { transition: transform .15s ease, filter .15s ease; }
.st-held img, .st-viewer img.st-held { transform: scale(.97); filter: brightness(.92); }
.st-photo.faded { display: grid; place-items: center; min-height: 80px; color: var(--bloom-muted); font: inherit; font-size: 14px; font-weight: 700; }
/* Replies read like a chat (Elliott, 2026-10-23: "as simple as a chat"): others on the left, yours on the right. */
.st-chat { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.st-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 88%; }
.st-msg.mine { justify-self: end; }
.st-msg > .st-face { flex: none; width: 24px; height: 24px; font-size: 9px; }
.st-said { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.st-msg.mine .st-said { justify-items: end; }
.st-msg-name { padding-left: 12px; font-size: 11px; font-weight: 700; color: var(--bloom-muted); }
.st-line { display: block; max-width: 100%; padding: 7px 12px; border: 0; border-radius: 18px; background: var(--bloom-surface); color: var(--bloom-ink); font: inherit; font-size: 15px; font-weight: 500; line-height: 1.3; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.st-msg.mine .st-line, .st-msg.mine .st-reply { background: var(--bloom-ink); color: #fff; }
.st-voice { display: flex; align-items: center; }
.st-msg.mine .st-voice { flex-direction: row-reverse; }
.st-inline-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
/* A photo in a reply, at its own shape, small enough to leave the chat readable. */
.st-reply-photo { display: block; width: 220px; max-width: 100%; max-height: 260px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--bloom-surface); cursor: zoom-in; }
.st-reply-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-reply-photo.faded { display: grid; place-items: center; min-height: 60px; color: var(--bloom-muted); font: inherit; font-size: 13px; font-weight: 700; }
.st-send { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--bloom-ink); cursor: pointer; }
.st-send::before { content: ""; display: block; width: 14px; height: 14px; margin: auto; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 12V2M2.5 6.5 7 2l4.5 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 12V2M2.5 6.5 7 2l4.5 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.st-send:disabled { background: var(--bloom-surface-border); cursor: default; }
.st-send[hidden], .st-mic[hidden] { display: none; }
/* Hold the microphone to talk (it stands in for Send until something's typed). */
.st-mic { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.st-mic::before { content: ""; display: block; width: 18px; height: 18px; margin: auto; background: var(--bloom-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Crect x='6' y='1.5' width='6' height='10' rx='3' fill='%23000'/%3E%3Cpath d='M3.5 8.5a5.5 5.5 0 0 0 11 0M9 14v2.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Crect x='6' y='1.5' width='6' height='10' rx='3' fill='%23000'/%3E%3Cpath d='M3.5 8.5a5.5 5.5 0 0 0 11 0M9 14v2.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.st-reply { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 999px; background: var(--bloom-surface); color: var(--bloom-ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.st-reply-x { width: 32px; height: 32px; margin-left: -6px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--bloom-muted); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.st-unsent { position: fixed; left: 50%; bottom: max(96px, calc(env(safe-area-inset-bottom) + 84px)); z-index: 301; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 40px); padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--bloom-ink); color: #fff; font-size: 14px; font-weight: 700; }
.st-unsent button { padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: #fff; font: inherit; cursor: pointer; }
.st-unsent .st-unsent-retry { background: #fff; color: var(--bloom-ink); }
.st-wave { width: 34px; height: 14px; background: repeating-linear-gradient(90deg, currentColor 0 2px, #0000 2px 5px); -webkit-mask: radial-gradient(ellipse at 50% 50%, #000 40%, #0000 75%); mask: radial-gradient(ellipse at 50% 50%, #000 40%, #0000 75%); opacity: .7; }
.st-reply.playing { background: var(--bloom-ink); color: #fff; }
.st-msg.mine .st-reply.playing { background: #3a3d3c; }
.st-reply.playing .st-wave { animation: st-wave .6s linear infinite; }
@keyframes st-wave { to { background-position: 10px 0; } }
.st-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 16px; }
.st-mini { display: flex; gap: 6px; }
.st-reply-to { flex: none; align-self: flex-start; margin: -4px 0 0; padding: 6px 2px; border: 0; background: none; color: var(--bloom-muted); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.st-mini button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 13px; background: var(--bloom-surface); color: var(--bloom-ink); font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.st-hang { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--bloom-ink); color: #fff; font: inherit; font-size: 14px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.st-hang::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--bloom-live); }
/* On the narrowest phones the button keeps inside its card: it shrinks and its words take two lines. */
@media (max-width: 359px) { .st-hang { min-width: 0; padding: 6px 12px; white-space: normal; line-height: 1.15; text-align: left; } }
.st-picker { position: absolute; left: 12px; right: 12px; bottom: 72px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 10px; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px #0000002e; animation: st-pop .3s cubic-bezier(.2, 1.4, .4, 1) both; }
.st-pick { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border: 2px solid transparent; border-radius: 14px; background: var(--bloom-surface); font: inherit; font-size: 22px; cursor: pointer; }
.st-pick.word { padding: 0 10px; background: var(--sc); color: #111; font-size: 12px; font-weight: 800; }
.st-pick[aria-pressed="true"] { border-color: var(--bloom-ink); }
@keyframes st-pop { from { transform: scale(.6); opacity: 0; } }
.st-dots[hidden] { display: none; }
.st-dots { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }
.st-dots i { width: 6px; height: 6px; border-radius: 50%; background: #d7d4cc; transition: background .2s, width .2s; }
.st-dots i.on { width: 16px; border-radius: 3px; background: var(--bloom-ink); }
/* The message bar: 📷 (or ＋ New on the stack), type, send. */
.st-bar { position: relative; z-index: 150; display: grid; gap: 8px; min-width: 0; }
/* On the stack, who it goes to (2026-10-25): "Replying to Maya · “her words”", with the other way beside it. */
.st-to { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 4px; color: var(--bloom-muted); font-size: 13px; font-weight: 800; white-space: nowrap; }
.st-to[hidden], .st-to-swap[hidden], .st-new-post[hidden], .st-bar-photo[hidden] { display: none; }
.st-to-words { display: flex; min-width: 0; }
.st-to-q { min-width: 0; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; color: var(--bloom-ink); }
.st-to-swap { flex: none; margin-left: auto; padding: 4px 10px; border: 0; border-radius: 999px; background: #fff; color: var(--bloom-ink); font: inherit; font-size: 12px; font-weight: 800; box-shadow: 0 1px 4px #00000012; cursor: pointer; }
.st-new-post { flex: none; height: 38px; padding: 0 12px; border: 0; border-radius: 19px; background: var(--bloom-surface); color: var(--bloom-ink); font: inherit; font-size: 14px; font-weight: 800; white-space: nowrap; cursor: pointer; }
/* On the stack it sits under the cards; in the chat, at the bottom of the page. */
.st-bar-row { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 6px; border-radius: 26px; background: #fff; box-shadow: 0 6px 18px #00000014; }
.st-bar-input { flex: 1; width: 100%; min-width: 0; height: 40px; padding: 0 4px; border: 0; background: none; color: var(--bloom-ink); font: inherit; font-size: 16px; outline: none; }
.st-bar-input:focus-visible { outline: none; }
.st-bar-input::placeholder { color: var(--bloom-muted); }
.st-bar .st-send, .st-bar .st-mic { width: 38px; height: 38px; }
.st-bar-photo { flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--bloom-surface); cursor: pointer; }
.st-bar-photo::before { content: ""; display: block; width: 18px; height: 18px; margin: auto; background: var(--bloom-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Crect x='1.5' y='4' width='15' height='11' rx='3' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Ccircle cx='9' cy='9.5' r='2.8' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M6 4l1.2-2h3.6L12 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Crect x='1.5' y='4' width='15' height='11' rx='3' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Ccircle cx='9' cy='9.5' r='2.8' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M6 4l1.2-2h3.6L12 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.st-bar-photo:disabled { opacity: .5; }
/* An opened card: full screen, its own chat, with the bar replying to it at the bottom. */
.st-page > .st-open { position: fixed; inset: 0; z-index: 160; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; width: auto; max-width: none; margin: 0;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--bloom-canvas, #f4f3ee); animation: st-open .18s ease-out; }
.st-open > * { width: 100%; max-width: 440px; margin-inline: auto; box-sizing: border-box; }
.st-open > .st-back { text-align: left; }
/* Swipe it away either way, as on the stack; the chat inside still scrolls up and down. */
.st-card.st-opened { position: relative; inset: auto; min-height: 0; transform: none; }
/* With the keyboard up it fits what's left above it, so the bar sits on the keyboard. */
.keyboard-up .st-page > .st-open { bottom: auto; top: var(--keyboard-view-top, 0px); height: var(--keyboard-view-height, 100dvh); padding-top: 10px; padding-bottom: 8px; }
/* Chrome and Edge on iPhone float their autofill bar (AUTOFILL_BAR in app.js, 76px) over the page just
   above the keyboard, so there the bar stops above that strip. Safari's own ⌃ ⌄ ✓ is part of the keyboard. */
.autofill-bar.keyboard-up .st-page > .st-open { padding-bottom: calc(8px + 76px); }
/* Typing, the chat gets the room: the card's buttons wait until the keyboard goes. */
.keyboard-up .st-opened .st-foot { display: none; }
@keyframes st-open { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .st-page > .st-open { animation: none; } }
.st-bar .st-attached img { max-height: 120px; box-shadow: 0 6px 18px #00000014; }
.st-rec { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; align-content: center; gap: 14px; max-width: none !important; background: #111111d9; color: #fff; text-align: center; opacity: 0; pointer-events: none; transition: opacity .15s; }
.st-rec.on { opacity: 1; }
/* It breathes only while it shows: hidden, a ring that kept breathing repainted the screen every frame (2026-10-26). */
.st-ring { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; background: var(--bloom-live); font-size: 42px; }
.st-rec.on .st-ring { animation: st-breathe 1.2s ease-in-out infinite; }
@keyframes st-breathe { 50% { box-shadow: 0 0 0 18px #ff5a3633; } }
.st-rec b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-rec span:last-child { font-size: 15px; font-weight: 700; opacity: .8; }
.st-toast { position: fixed; left: 50%; bottom: max(96px, calc(env(safe-area-inset-bottom) + 84px)); z-index: 300; width: max-content; max-width: calc(100% - 40px) !important; padding: 10px 16px; border-radius: 14px; background: var(--bloom-ink); color: #fff; font-size: 14px; font-weight: 800; text-align: center; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; }
.st-toast.on { animation: st-toast 2.4s ease both; }
.st-toast.act { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.st-toast.act.on { animation-duration: 4.5s; }
.st-toast-act { padding: 4px 2px; border: 0; background: none; color: #ffc9b8; font: inherit; font-weight: 900; cursor: pointer; }
@keyframes st-toast { 10%, 80% { opacity: 1; transform: translate(-50%, 0); } }

/* Chat (Elliott, 2026-10-24): the week's posts oldest first, each with its replies, in one list
   that scrolls above the bar. */
.st-on-chat .st-view { overflow: hidden; }
.st-thread { flex: 1 1 auto !important; display: flex; flex-direction: column; gap: 18px; min-height: 0; margin: 0 -16px; padding: 4px 16px 20px; overflow: hidden auto; overscroll-behavior: contain; }
/* The first post sits at the bottom when there are only a few, as in a chat. */
.st-thread > :first-child { margin-top: auto; }
/* A post in the chat (Elliott, 2026-10-24 mockup, replies look A): a friend's on the left with
   their face and name, yours on the right with none; quiet day labels between the days. */
.st-saved { flex: none; align-self: center; margin: 0; font-size: 12px; font-weight: 800; color: var(--bloom-muted); }
.st-day { flex: none; align-self: center; margin: 6px 0 -6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bloom-muted); }
.st-cm { position: relative; flex: none; display: grid; justify-items: start; gap: 4px; min-width: 0; outline: none; user-select: text; -webkit-user-select: text; cursor: pointer; }
.st-cm.mine { justify-items: end; }
.st-cm:focus-visible { outline: 2px solid var(--bloom-line); outline-offset: 4px; border-radius: 12px; }
.st-cm-name { max-width: 100%; padding-left: 38px; font-size: 12px; font-weight: 700; color: var(--bloom-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cm.mine .st-cm-name { padding: 0 4px 0 0; }
.st-cm-row { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; min-width: 0; }
.st-cm-row .st-face { width: 30px; height: 30px; }
.st-cm .st-bubble { max-width: 100%; padding: 8px 13px; border-radius: 20px 20px 20px 6px; }
.st-cm .st-bubble:not(.mine) { background: #fff; box-shadow: 0 1px 2px #0000000a; }
.st-cm .st-bubble.mine { border-radius: 20px 20px 6px 20px; }
.st-cm .st-bubble.media { width: min(260px, 100%); padding: 4px; }
.st-cm .st-text { font-size: 16px; font-weight: 600; }
.st-cm .st-photo { max-height: 260px; }
.st-cm > .st-stickers { position: static; min-height: 0; margin: -10px 4px 0; pointer-events: none; }
.st-cm > .st-stickers .st-sticker { width: 30px; height: 30px; font-size: 16px; }
.st-cm > .st-stickers .st-sticker.word { width: auto; height: auto; padding: 3px 8px; font-size: 11px; }
/* Its replies hang off it on a thin line, smaller and softer, each with a small face. */
.st-cm-thread { display: grid; justify-items: start; gap: 6px; margin: 2px 0 0 14px; padding: 4px 0 2px 16px; border-left: 2px solid var(--bloom-line); max-width: calc(88% - 14px); min-width: 0; }
.st-cm.mine .st-cm-thread { justify-items: end; margin: 2px 14px 0 0; padding: 4px 16px 2px 0; border-left: 0; border-right: 2px solid var(--bloom-line); }
.st-cm-replies { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.st-cm-replies .st-msg { justify-self: start; align-items: center; max-width: 100%; }
.st-cm.mine .st-cm-replies .st-msg { justify-self: end; flex-direction: row-reverse; }
.st-cm.mine .st-cm-replies .st-said { justify-items: end; }
.st-cm-replies .st-msg > .st-face { width: 20px; height: 20px; font-size: 8px; }
.st-cm-replies .st-line { padding: 5px 11px; border-radius: 15px; background: #fff; font-size: 14px; box-shadow: 0 1px 2px #0000000a; }
.st-cm-replies .st-msg.mine .st-line { background: var(--bloom-ink); }
.st-cm-replies .st-reply { padding: 6px 11px; font-size: 12px; background: #fff; }
.st-cm-replies .st-msg.mine .st-reply { background: var(--bloom-ink); color: #fff; }
.st-cm-replies .st-reply-photo { width: 160px; max-height: 200px; border-radius: 14px; }
.st-cm-reply { padding: 2px 0; border: 0; background: none; color: var(--bloom-muted); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
/* A voice note in a friend's chat: a voice bubble the size of a message, theirs with an amber dot until heard. */
.st-cm-note { cursor: default; }
.st-cm-note .st-note { padding: 10px 15px; font-size: 14px; background: #fff; box-shadow: 0 1px 2px #0000000a; }
.st-cm-note.mine .st-note { background: var(--bloom-ink); color: #fff; }
.st-cm-note .st-note.playing { background: var(--bloom-ink); color: #fff; }
.st-cm-note.mine .st-note.playing { background: #3a3d3c; }
.st-note.fresh::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e57a00; }
/* With the keyboard up the page fits what's left above it, so the bar sits on the keyboard, and
   the chat or the card on top gets the room: the count and dots wait until the keyboard goes. */
.keyboard-up .st-page[open] { inset: var(--keyboard-view-top, 0px) 0 auto 0; height: var(--keyboard-view-height, 100dvh); padding-top: 10px; padding-bottom: 8px; gap: 10px; }
.keyboard-up .st-page .st-count, .keyboard-up .st-page .st-dots { display: none; }
.keyboard-up .st-page .st-ghead h2 { font-size: 20px; }
.keyboard-up .st-page .st-view > .st-deck { min-height: 0; margin-bottom: 8px; }
/* Typing on the stack, the card on top keeps its words and leaves its buttons until the keyboard goes. */
.keyboard-up .st-page .st-view .st-foot { display: none; }
.autofill-bar.keyboard-up .st-page[open] { padding-bottom: calc(8px + 76px); }

/* All caught up, and someone's week. */
.st-done { display: grid; gap: 16px; padding-top: 24px; text-align: center; animation: st-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.st-done h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.st-done p { margin: 0; color: var(--bloom-muted); font-weight: 700; }
.st-people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 10px; margin-top: 10px; }
.st-pstack { display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--bloom-ink); font: inherit; cursor: pointer; }
.st-pile { position: relative; display: block; width: 82px; height: 92px; }
.st-pile i { position: absolute; inset: 0; border-radius: 20px; background: var(--c); box-shadow: 0 6px 16px #00000014; }
.st-pile i:nth-child(1) { transform: rotate(-7deg) translate(-4px, 4px); opacity: .5; }
.st-pile i:nth-child(2) { transform: rotate(5deg) translate(3px, 2px); opacity: .75; }
.st-pile .st-face { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border: 3px solid #fff; box-sizing: content-box; }
.st-pstack b { font-size: 15px; font-weight: 800; }
.st-pstack small { margin-top: -8px; font-size: 12px; font-weight: 700; color: var(--bloom-muted); }
.st-again { justify-self: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 14px; background: #fff; color: var(--bloom-ink); font: inherit; font-weight: 800; box-shadow: 0 2px 10px #0000000d; cursor: pointer; }
.st-again.st-primary { background: var(--bloom-ink); color: #fff; }

/* Posting. */
.st-compose { text-align: left; }
.st-form { display: grid; gap: 8px; }
.st-attached[hidden] { display: none; }
.st-attached { position: relative; justify-self: start; }
.st-attached img { display: block; max-width: 100%; max-height: 160px; border-radius: 14px; }
.st-attached-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #1a1d1ccc; color: #fff; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.st-reply-input { height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--bloom-surface); color: var(--bloom-ink); font: inherit; font-size: 17px; }
.st-reply-input:focus-visible { outline: none; }
.st-quote { margin: -4px 0 4px; padding-left: 10px; border-left: 3px solid var(--bloom-line); color: var(--bloom-muted); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.st-sheet-note { margin: -4px 0 6px; color: var(--bloom-muted); font-size: 14px; font-weight: 700; }
/* A photo, full screen. */
.st-viewer { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #111; }
.st-viewer[open] { display: grid; place-items: center; }
/* Swiped, the photo follows the finger and the page shows through behind it (stacks.js). */
.st-viewer { touch-action: pinch-zoom; }
.st-viewer.st-zoomed { touch-action: auto; }
.st-viewer::backdrop { background: transparent; }
.st-viewer img { max-width: 100%; max-height: 100dvh; object-fit: contain; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.st-viewer-more { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 16px; padding: 8px 14px; border: 0; border-radius: 999px; background: #ffffffe6; color: #1a1d1c; font: inherit; font-size: 15px; font-weight: 800; letter-spacing: 1px; cursor: pointer; }
.st-viewer-done { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 16px; padding: 8px 14px; border: 0; border-radius: 999px; background: #ffffffe6; color: #1a1d1c; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }

/* Like a chat app (Elliott, 2026-10-26: "make the chats feel premium like iMessage or Telegram"). */
/* Home sits under a group's page: nothing on it moves or paints while the page covers it. */
html.stack-up #home, html.stack-up .topbar, html.stack-up #profile-initial.person-circle { visibility: hidden !important; }
/* Until a swipe back pulls the page aside (Elliott, 2026-10-27): then Home shows under it, as on iPhone. An opened
   post pulled aside shows the page under it. */
html.stack-up.stack-pulling #home, html.stack-up.stack-pulling .topbar, html.stack-up.stack-pulling #profile-initial.person-circle { visibility: visible !important; }
.st-page.st-pulling::backdrop { background: transparent; }
.st-page.st-pulling, .st-page > .st-open.st-pulling { box-shadow: -10px 0 30px #0000001f; }
/* Something new slides up from its own side, theirs from the left and yours from the right. */
.st-cm.st-arrive, .st-msg.st-arrive { transform-origin: 0 100%; animation: st-arrive .34s cubic-bezier(.2, .9, .3, 1) both; }
.st-cm.mine.st-arrive, .st-msg.mine.st-arrive { transform-origin: 100% 100%; }
@keyframes st-arrive { from { opacity: 0; transform: translateY(16px) scale(.94); } }
/* Yours on its way shows at once; only if it takes a while does it fade back a little until it's up. Nothing is added
   around it, so it doesn't move when the real one takes its place. */
.st-cm.st-pending .st-bubble, .st-msg.st-pending .st-said { animation: st-slow .3s 1.2s both; }
@keyframes st-slow { to { opacity: .55; } }
/* One that didn't send stays dimmed where it was, saying so, with Try again and Remove under it. */
.st-cm.st-failed .st-bubble, .st-msg.st-failed .st-said { animation: none; opacity: .55; }
/* "Sent" under your newest message once it's up (Elliott chose "Sent", 2026-10-27). */
.st-sent { font-size: 11px; line-height: 14px; font-weight: 700; color: var(--bloom-muted); }
/* Under a message in the chat it sits in the gap below, taking no room, so nothing moves when it
   comes or goes (the chat keeps room for it at the bottom). */
.st-cm > .st-sent { position: absolute; top: 100%; right: 6px; margin: 1px 0 0; white-space: nowrap; }
/* Under a reply it does the same, and the last reply of yours keeps room for it, sending or sent. */
.st-msg { position: relative; }
.st-msg > .st-sent { position: absolute; top: 100%; right: 0; margin: 1px 0 0; white-space: nowrap; }
.st-cm-replies .st-msg > .st-sent { right: auto; left: 26px; }
.st-cm.mine .st-cm-replies .st-msg > .st-sent { left: auto; right: 26px; }
.st-chat > .st-msg.mine:last-child, .st-cm-replies > .st-msg.mine:last-child { margin-bottom: 16px; }
.st-not-sent { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin: 0 2px; color: var(--bloom-muted); font-size: 14px; font-weight: 700; }
.st-not-sent button { padding: 6px 0; border: 0; background: none; color: var(--bloom-ink); font: inherit; cursor: pointer; }
.st-msg.st-failed { flex-wrap: wrap; justify-content: flex-end; }
.st-msg.st-failed .st-not-sent { flex-basis: 100%; }
/* Under a post in the chat, one that didn't send stays on its side, as the replies around it do. */
.st-cm-replies .st-msg.st-failed, .st-cm-replies .st-not-sent { justify-content: flex-start; }
.st-cm.mine .st-cm-replies .st-not-sent { justify-content: flex-end; }
/* Sends to a chat that's gone, kept on the phone to copy, save or remove (review of PR #277). */
.st-stranded-list { display: grid; gap: 12px; max-height: 50dvh; overflow-y: auto; margin: 0 0 12px; }
.st-stranded-item { padding: 10px 12px; border-radius: 16px; background: #fbf6ea; text-align: left; }
.st-stranded-photo { display: block; max-width: 100%; max-height: 28dvh; margin: 0 0 6px; border-radius: 12px; object-fit: contain; }
.st-stranded-line { margin: 0 0 4px; color: var(--bloom-ink); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
/* A press shows under the finger: buttons give a little, words dim, rows shade. No rings. */
.st-send, .st-mic, .st-bar-photo, .st-switch, .st-live, .st-ring-group, .st-hang, .st-mini button, .st-again, .st-attached-x,
.st-back, .st-more, .st-reply-to, .st-cm-reply, .st-to-swap, .st-new-post, .st-not-sent button { transition: transform .14s cubic-bezier(.2, .9, .3, 1), opacity .14s; }
.st-send:active:not(:disabled), .st-mic:active, .st-bar-photo:active, .st-switch:active, .st-live:active, .st-ring-group:active,
.st-hang:active, .st-mini button:active, .st-again:active, .st-attached-x:active { transform: scale(.9); transition-duration: .06s; }
.st-back:active, .st-more:active, .st-reply-to:active, .st-cm-reply:active, .st-to-swap:active, .st-new-post:active, .st-not-sent button:active { opacity: .45; transition-duration: .06s; }
/* Tapping between the stack and the chat fades one into the other (a swipe slides, stacks.js). */
.st-view.st-swap { animation: st-swap .22s cubic-bezier(.2, .9, .3, 1); }
@keyframes st-swap { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  .st-card, .st-dots i { transition: none; }
  .st-ring, .st-rec.on .st-ring, .st-sticker.landing, .st-done, .st-page[open], .st-picker, .st-reply.playing .st-wave, .st-cm.st-arrive, .st-msg.st-arrive, .st-view.st-swap { animation: none; }
}
