/* First run and finding sources: the start screen (/start), creator search and Follow on tap (also in
   the Feed's add sheet and on Sources), the feed being built, the Feed's first-run hint, and the
   once-only moments. Format colours are the same hues the feed cards use. */
:is(.face-badge, .plat, .choose-row .g, .fetch-row, .find-cycle-text, .tint) { --platform-color: #71809a; }
:is(.face-badge, .plat, .choose-row .g, .find-cycle-text, .tint)[data-platform="substack"] { --platform-color: #c97749; }
:is(.face-badge, .plat, .choose-row .g, .find-cycle-text, .tint)[data-platform="youtube"] { --platform-color: #c76662; }
:is(.face-badge, .plat, .choose-row .g, .find-cycle-text, .tint)[data-platform="newsletter"] { --platform-color: #8a78a5; }
:is(.face-badge, .plat, .choose-row .g, .find-cycle-text, .tint)[data-platform="research"] { --platform-color: #4f9481; }
:is(.face-badge, .plat, .choose-row .g, .find-cycle-text, .tint)[data-platform="podcast"] { --platform-color: #a56fb8; }
:is(.face-badge, .plat, .choose-row .g, .find-cycle-text, .tint)[data-platform="community"] { --platform-color: #4f8ea8; }
:is(.face-badge, .plat, .choose-row .g, .find-cycle-text, .tint)[data-platform="blog"] { --platform-color: #5a86ad; }
:is(.face-badge, .plat, .choose-row .g, .tint)[data-platform="instagram"] { --platform-color: #c4527f; }
:is(.face-badge, .plat, .choose-row .g, .find-cycle-text, .tint)[data-platform="x"] { --platform-color: var(--ink); }

/* --- The start screen: one column, search first, the tray over the bottom edge ------------- */
.start { --gutter: 20px; --ease-out: cubic-bezier(.23, 1, .32, 1); max-width: 640px; margin: 0 auto; }
@media (max-width: 360px) { .start { --gutter: 14px; } }
/* The tray is the way out, so the tab bar steps aside while the reader picks. */
body:has(.start) .mobile-nav { display: none; }
.shell:has(> .start) { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.start-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.start-hi { margin: 4px 0 2px; color: var(--ink-2); font-size: var(--text-base); font-weight: 500; }
.start-title { margin: 0; font-size: 31px; font-weight: 800; line-height: 1.08; letter-spacing: -.025em; }
@media (min-width: 720px) { .start-title { font-size: var(--text-4xl); } }
.start-skip { display: inline-flex; align-items: center; min-height: 44px; margin: -6px -4px 0 0; padding: 0 4px; color: var(--muted); font-size: var(--text-md); font-weight: 600; text-decoration: none; }
.start-skip:hover { color: var(--ink); }
.start-skip[hidden] { display: none; }
.start-sub { margin: 8px 0 18px; color: var(--ink-2); font-size: var(--text-base); line-height: 1.45; }
.start-browse[hidden] { display: none; }
.start-foot { margin: 18px 0 0; color: var(--muted); font-size: var(--text-md); text-align: center; }
.start-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.row-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 22px 0 10px; color: var(--muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.row-label small { font-size: var(--text-xs); font-weight: 500; letter-spacing: 0; text-transform: none; }

/* One row of topics; it scrolls sideways on a phone, edge to edge. */
.start-topics { display: flex; gap: 8px; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
.start-topics::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .start-topics { margin: 0; padding: 2px 0 6px; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); } }
.start-topics.centered { flex-wrap: wrap; justify-content: center; margin: 12px 0 0; padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.start-topic { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--text-md); font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .16s var(--ease-out, ease-out), background-color .16s ease, color .16s ease; }
.start-topic:active { transform: scale(.97); }
.start-topic[aria-current="true"], .topic-jump { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.start-topic .icon { width: 15px; height: 15px; }
.topic-jump { margin: 6px 0 4px; }

/* Rows: a face, a name, a line, Follow. */
.rows { margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); list-style: none; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--surface-2); animation: row-in .32s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 8) * 30ms); }
.row:last-child { border-bottom: 0; }
.row-text { display: grid; gap: 1px; min-width: 0; }
.row-name { overflow: hidden; font-size: var(--text-base); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.row-blurb { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: var(--text-sm); line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row > .follow-error { grid-column: 2 / -1; }
/* A name that opens the source itself (Settings: "Link sources to their own page"): the arrow says it leaves ownfeed. */
.visit { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: inherit; text-decoration: none; }
.visit > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.visit .icon { flex: 0 0 auto; width: 13px; height: 13px; color: var(--accent); }
.visit:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.row-name.visit { display: flex; }
.person-visit { display: inline; }
.person-visit .icon { margin-left: 5px; vertical-align: -1px; }
/* A search card's platform chip is a Follow toggle for that one account. */
.plat:has(.plat-toggle) { padding: 0; }
.plat-toggle { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 5px 11px; border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; cursor: pointer; transition: background-color .2s ease; }
.plat-toggle:hover { background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.plat-toggle[aria-pressed="true"] { background: var(--accent-soft); }

/* A face: initials on a tint from the name, and a small badge for the platform. */
.face { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: hsl(var(--hue, 210) 38% 44%); color: #fff; font-size: var(--text-md); font-weight: 750; letter-spacing: -.02em; }
.face img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.face.sm { width: 30px; height: 30px; font-size: var(--text-2xs); }
.face.lg { width: 52px; height: 52px; font-size: var(--text-lg); }
.face-badge { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); color: var(--platform-color); box-shadow: 0 0 0 1.5px var(--surface); }
.face-badge .g { width: 11px; height: 11px; }
.face.lg .face-badge { width: 20px; height: 20px; }
.face.lg .face-badge .g { width: 12px; height: 12px; }

/* Follow and Following share a grid cell, so the pill never changes width when it flips. */
.pill-form { margin: 0; }
.follow-pill, .person-follow { display: inline-grid; place-items: center; border: 0; background: var(--accent); color: var(--surface); font-weight: 650; white-space: nowrap; cursor: pointer; transition: transform .16s var(--ease-out), background-color .2s ease, color .2s ease; }
.follow-pill { min-height: 38px; padding: 0 15px; border-radius: 999px; font-size: 13.5px; }
.follow-pill:active, .person-follow:active, .person-choose:active, .tray-go:active { transform: scale(.97); }
:is(.follow-pill, .person-follow) > span { display: inline-flex; grid-area: 1 / 1; align-items: center; gap: 4px; }
:is(.follow-pill, .person-follow) .fp-on, :is(.follow-pill, .person-follow)[aria-pressed="true"] .fp-off { visibility: hidden; }
:is(.follow-pill, .person-follow)[aria-pressed="true"] .fp-on { visibility: visible; }
:is(.follow-pill, .person-follow)[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
:is(.follow-pill, .person-follow) .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.follow-error { margin: 6px 0 0; color: var(--danger); font-size: 12.5px; line-height: 1.4; }
.follow-error[hidden] { display: none; }

/* --- Search ------------------------------------------------------------------------------ */
.find { min-width: 0; }
.find-box { position: relative; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px 0 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .16s ease, box-shadow .16s ease; }
.find-box:focus-within { border-color: var(--accent); }
.find-box:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.find-box > .icon { color: var(--muted); }
.find-box input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); font-size: 16px; }
.find-box input:focus { outline: none; }
.find-box input::placeholder { color: var(--muted); }
.find-box.has-cycle input::placeholder { color: transparent; }
/* The placeholder's examples: stays while the box is empty, focused or not, like a real placeholder. */
.find-cycle { position: absolute; left: 42px; right: 14px; top: 0; bottom: 0; display: flex; align-items: center; gap: 7px; pointer-events: none; color: var(--muted); font-size: 16px; user-select: none; transition: opacity .15s ease; }
.find-box.has-val .find-cycle { opacity: 0; }
.find-try { flex: none; }
.find-ex { position: relative; flex: 1; min-width: 0; height: 1.5em; overflow: hidden; }
.find-cycle-text { position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); white-space: nowrap; }
.find-cycle-text .g { flex: none; width: 15px; height: 15px; color: var(--platform-color); }
.find-go { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* A light line under the box while a search runs. */
.find-progress { position: relative; height: 2px; margin: 8px 8px 0; overflow: hidden; border-radius: 2px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.find-progress[hidden] { display: none; }
.find-progress::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 2px; background: var(--accent); animation: find-run 1.1s ease-in-out infinite; }
@keyframes find-run { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.find-results:empty { display: none; }
.find-results { margin: 4px 0 0; transition: opacity .15s ease; }
.find-results[aria-busy="true"] { opacity: .6; }
.find-banner { margin: 12px 2px; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.find-banner b { color: var(--ink); }
.find-banner a, .find-note a { color: var(--accent); font-weight: 600; text-decoration: none; }
.find-note { margin: 0 0 12px; padding: 8px 11px; border-radius: 10px; background: var(--accent-soft); color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.find-note.warn { background: color-mix(in srgb, var(--warn) 13%, var(--surface)); }
/* While a typed handle is looked for on Instagram: one quiet line, gone when the answer lands. */
.ig-check { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 4px 2px; color: var(--muted); font-size: var(--text-sm); }
.ig-check[hidden] { display: none; }
.ig-check-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ig-check 1.2s ease-in-out infinite alternate; }
@keyframes ig-check { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ig-check-dot { animation: none; } }
.find-note.bad { margin-top: 12px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
/* Under the box until results show: what can be followed, as icons, and that no sign-in is needed. */
.find-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 12px 2px 0; color: var(--muted); font-size: 13px; }
.find:has(> .find-results:not(:empty)) > .find-help { display: none; }
.find-kinds { display: inline-flex; align-items: center; gap: 10px; }
.find-kinds .g { width: 16px; height: 16px; color: var(--platform-color); }
.find-trust { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 11%, var(--surface)); color: color-mix(in srgb, var(--ok) 70%, var(--ink)); font-size: 12.5px; font-weight: 650; }
.find-trust .icon { width: 14px; height: 14px; }
.find-empty { padding: 26px 10px 6px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; text-align: center; }
.find-empty p { margin: 0; }
.find-empty b { display: block; margin-bottom: 4px; color: var(--ink); font-size: var(--text-lg); }
.find-empty p + p { margin-top: 10px; }
.find-examples span { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.find-choices { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.find-choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.find-choice .icon { width: 16px; height: 16px; color: var(--muted); }

/* A person card: who, where they post, and Follow all or Choose. */
.person { margin: 0 0 12px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); animation: row-in .36s var(--ease-out) both; }
.person-head { display: flex; align-items: center; gap: 12px; }
.person-id { flex: 1; min-width: 0; }
.person-name { margin: 0; font-size: var(--text-lg); font-weight: 700; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.person-bio { display: -webkit-box; margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: var(--text-sm); line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-reach { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
/* Who it is: each account's handle under the name, linked so a reader can check it. */
.person > .person-head { align-items: flex-start; }
.person-handles { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 3px 0 0; padding: 0; list-style: none; font-size: 13px; font-weight: 600; }
.person-handles li { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.person-handles a { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.person-handles a:hover { text-decoration-color: currentColor; }
.person-handles .g { flex: none; width: 13px; height: 13px; color: var(--platform-color); }
/* How well it matched (its title says where the details came from), then the reported audience. */
.person-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.match-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 650; }
.match-badge.close { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); color: color-mix(in srgb, var(--ok) 72%, var(--ink)); }
.match-badge .icon { width: 12px; height: 12px; }
.person-latest { display: -webkit-box; margin: 10px 0 0; overflow: hidden; color: var(--ink-2); font-size: 13px; line-height: 1.4; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.person-latest b { margin-right: 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.match-tip { color: var(--muted); }
/* Cards side by side where there is room; similar names are the same cards, quieter, so the best match leads. */
.person-grid { display: grid; gap: 12px; }
.person-grid > .person { margin: 0; }
@media (min-width: 720px) { .person-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); align-items: start; } }
.person-grid.similar .person { padding: 14px; box-shadow: none; }
.person-grid.similar .face.lg { width: 42px; height: 42px; font-size: var(--text-md); }
.person-grid.similar .person-bio { -webkit-line-clamp: 1; }
.person-grid.similar .person-follow { min-height: 40px; }
.person-grid.similar .person-follow:not([aria-pressed="true"]) { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.person-grid.similar .person-choose { min-height: 40px; }
/* The last resort: one row, a sentence and a button. */
.search-recovery { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 18px 0 0; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; }
.search-recovery button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--accent); font: inherit; font-weight: 650; cursor: pointer; }
.search-recovery button:hover { border-color: var(--accent); }
.person-ready { margin: 3px 0 0; color: var(--ok); font-size: 12.5px; font-weight: 600; }
.person-ready::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; border-radius: 50%; background: currentColor; }
.plats { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; padding: 0; list-style: none; }
.plat { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.plat .g { width: 12px; height: 12px; color: var(--platform-color); }
.plat em { color: var(--muted); font-style: normal; font-weight: 500; }
.plat em:empty { display: none; }
.plat[data-following="true"] em { color: var(--ok); }
.plat.off { border: 1px dashed var(--line); background: none; color: var(--muted); }
.person-titles { margin: 10px 0 12px; padding: 0; border-top: 1px solid var(--surface-2); list-style: none; }
.person-titles li { padding: 8px 0; border-bottom: 1px solid var(--surface-2); font-family: var(--serif); font-size: 14.5px; line-height: 1.4; }
.person-titles a { display: -webkit-box; overflow: hidden; color: var(--ink); text-decoration: none; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.person-titles a:hover { color: var(--accent); }
.person-acts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
/* A card with nothing between its name and its button (an account found on Instagram). */
.person-head + .person-acts { margin-top: 14px; }
.person-form { flex: 1; margin: 0; }
.person-follow { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 14px; font-size: 14.5px; font-weight: 700; }
.person-choose { display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border-radius: 14px; background: var(--surface-2); color: var(--ink); font-size: 14.5px; font-weight: 700; list-style: none; cursor: pointer; transition: transform .16s var(--ease-out); }
.person-choose::-webkit-details-marker { display: none; }
/* Without JS, Choose opens in place under the buttons. */
.choose[open] { flex-basis: 100%; }
.choose[open] > .person-choose { display: none; }

/* Choose: one checkbox per account, in a bottom sheet. */
.choose-sheet { box-sizing: border-box; width: min(100%, 520px); max-width: 100%; max-height: 85dvh; margin: auto auto 0; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); overflow: auto; border: 0; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--pop-shadow); }
.choose-sheet::before { content: ""; display: block; width: 38px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--line); }
.choose-sheet::backdrop { background: var(--scrim); }
.choose-sheet[open] { animation: sheet-up .3s var(--ease-out, cubic-bezier(.23, 1, .32, 1)); }
.choose-sheet[open]::backdrop { animation: fade-in .2s ease; }
@media (min-width: 720px) { .choose-sheet { margin: auto; border-radius: 22px; } }
.choose-form { margin: 12px 0 0; }
.choose-sheet .choose-form { margin: 0; }
.choose-title { margin: 0 0 4px; font-size: var(--text-lg); font-weight: 700; }
.choose-sub { margin: 0 0 8px; color: var(--ink-2); font-size: 13.5px; }
.choose-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--surface-2); font-size: 14.5px; cursor: pointer; }
.choose-row.off { cursor: default; opacity: .55; }
.choose-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choose-box { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 7px; color: transparent; transition: background-color .15s ease, border-color .15s ease; }
.choose-box .icon { width: 14px; height: 14px; stroke-width: 3; }
.choose-input:checked + .choose-box { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.choose-input:focus-visible + .choose-box { outline: 3px solid var(--focus); outline-offset: 2px; }
.choose-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.choose-text span { display: block; color: var(--muted); font-size: 12.5px; }
.choose-row .g { width: 14px; height: 14px; color: var(--platform-color); }
.choose-done { width: 100%; margin-top: 14px; }

/* --- The tray: who's followed so far, and a quiet way out ---------------------------------- */
/* A compact capsule, only as wide as what it says, centred over the bottom edge. */
.tray { position: fixed; z-index: 45; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; width: fit-content; max-width: calc(100% - 24px); margin: 0 auto; padding: 5px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: 0 16px 40px #0004; transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .3s cubic-bezier(.23, 1, .32, 1), visibility 0s; }
.tray[hidden] { display: flex; visibility: hidden; opacity: 0; transform: translateY(16px); pointer-events: none; transition: transform .3s cubic-bezier(.23, 1, .32, 1), opacity .2s ease, visibility 0s linear .3s; }
.tray-faces { display: flex; flex: 0 0 auto; }
.tray-faces:empty { display: none; }
.tray .face { width: 26px; height: 26px; margin-left: -8px; box-shadow: 0 0 0 2px var(--ink); }
.tray .face:first-child { margin-left: 0; }
.tray-who { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; min-height: 40px; padding: 0 6px 0 4px; border-radius: 999px; color: inherit; text-decoration: none; transition: transform .16s cubic-bezier(.23, 1, .32, 1), background-color .2s ease; }
.tray-who:hover { background: color-mix(in srgb, var(--bg) 10%, transparent); }
.tray-who:active { transform: scale(.98); }
.tray-who[aria-busy] { opacity: .7; }
.tray-who:focus-visible { outline-color: var(--accent); }
.tray-count { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
/* A phone keeps the newest face only, so "22 following" is never cut. */
@media (max-width: 360px) { .tray-faces .face:not(:last-child) { display: none; } .tray .face:last-child { margin-left: 0; } }
@media (max-width: 340px) { .tray-faces { display: none; } }
.tray-chev { flex: 0 0 auto; width: 16px; height: 16px; margin-left: -4px; opacity: .7; transform: rotate(180deg); }
.tray-go { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent); border-radius: 999px; color: var(--bg); font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; transition: transform .16s cubic-bezier(.23, 1, .32, 1), background-color .2s ease; }
.tray.is-ready .tray-go { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.tray-go[aria-busy] { opacity: .7; }
.tray-go:focus-visible { outline-color: var(--accent); }

@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes row-next { from { opacity: 0; transform: translateX(28px); } }
@keyframes row-prev { from { opacity: 0; transform: translateX(-28px); } }
.start-rows[data-slide="next"] .row { animation-name: row-next; }
.start-rows[data-slide="prev"] .row { animation-name: row-prev; }

/* The tray's sheet: everyone followed, in the rows the start screen uses. */
.following-sheet .rows { border: 0; border-radius: 0; box-shadow: none; }
.following-sheet .row { padding-inline: 0; }
.following-done { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px -18px calc(-20px - env(safe-area-inset-bottom)); padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--surface-2); background: var(--surface); }
.following-done a { color: var(--accent); font-size: var(--text-md); font-weight: 600; text-decoration: none; }
.following-done .primary { min-width: 112px; }
@keyframes sheet-up { from { opacity: 0; transform: translateY(24px); } }
@keyframes fade-in { from { opacity: 0; } }

/* A peek ends with the way to the source itself. */
.peek-visit { display: inline-flex; align-items: center; gap: 5px; margin: 4px 0 8px; color: var(--accent); font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.peek-visit .icon { width: 14px; height: 14px; }
.peek-visit:hover { text-decoration: underline; }
.src-actions .peek-visit { margin: 0; }

/* --- The feed being built ----------------------------------------------------------- */
.building { display: grid; justify-items: center; gap: 4px; text-align: center; }
.building-overlay { position: fixed; inset: 0; z-index: 90; place-content: center; padding: 24px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: building-in .25s ease-out; }
.building-overlay[hidden] { display: none; }
.building-title { margin: 14px 0 0; font-size: var(--text-xl); letter-spacing: -.02em; }
.building-sub { margin: 0; color: var(--muted); font-size: var(--text-md); }
.building-scene { position: relative; width: 230px; height: 176px; }
.building-faces { position: absolute; z-index: 2; top: 0; left: 50%; display: flex; gap: 6px; transform: translateX(-50%); }
.building-faces .pick-avatar { margin: 0; animation: face-drop 2.8s cubic-bezier(.5, 0, .3, 1) infinite; }
.building-faces .pick-avatar:nth-child(2) { animation-delay: .35s; }
.building-faces .pick-avatar:nth-child(3) { animation-delay: .7s; }
.building-faces .pick-avatar:nth-child(4) { animation-delay: 1.05s; }
.building-faces .pick-avatar:nth-child(5) { animation-delay: 1.4s; }
.building-faces .pick-avatar:nth-child(6) { animation-delay: 1.75s; }
.building-stack { position: absolute; bottom: 0; left: 50%; width: 200px; height: 112px; transform: translateX(-50%); }
.building-stack .ghost-card { position: absolute; inset: auto 0 0; animation: deal 2.8s cubic-bezier(.2, .8, .2, 1) infinite; }
.building-stack .ghost-card:nth-child(1) { transform: translateY(-24px) scale(.9); animation-delay: -1.4s; }
.building-stack .ghost-card:nth-child(2) { transform: translateY(-12px) scale(.95); animation-delay: -.7s; }
@keyframes face-drop {
  0%, 12% { transform: none; opacity: 1; }
  38% { transform: translateY(70px) scale(.45); opacity: 0; }
  39% { transform: translateY(-14px); opacity: 0; }
  56%, 100% { transform: none; opacity: 1; }
}
@keyframes deal {
  0% { transform: translateY(18px) scale(.96); opacity: 0; }
  18%, 80% { transform: none; opacity: 1; }
  100% { transform: translateY(-26px) scale(.88); opacity: 0; }
}
@keyframes building-in { from { opacity: 0; } }

/* Skeleton cards shaped like real ones, with a light sweep instead of a blink. */
.ghost-card { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.ghost-card i { display: block; height: 8px; border-radius: 5px; background: linear-gradient(90deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface-2) 40%, var(--surface)) 50%, var(--surface-2) 70%) 0 0 / 300% 100%; animation: sweep 1.4s linear infinite; }
.ghost-meta, .ghost-acts { display: flex; align-items: center; gap: 7px; }
.ghost-meta i:not(.ghost-dot) { width: 40%; }
.ghost-card .ghost-dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 6px; }
.ghost-card .ghost-line.short { width: 62%; }
.ghost-acts i { width: 14px; height: 14px; border-radius: 50%; }
.card.ghost-card { gap: 12px; padding: 18px; border-radius: 18px; }
.card.ghost-card i { height: 13px; }
.card.ghost-card .ghost-dot { width: 34px; height: 34px; border-radius: 11px; }
.card.ghost-card .ghost-media { height: 132px; border-radius: 14px; }
.card.ghost-card .ghost-acts { gap: 16px; padding-top: 6px; }
.card.ghost-card .ghost-acts i { width: 22px; height: 22px; }
.skeleton-cards .ghost-card:nth-child(2) { opacity: .6; }
@keyframes sweep { to { background-position: -150% 0; } }

.fetching { display: grid; gap: 12px; }
.fetching .building { padding: 4px 0 2px; }
.fetching .building-title { margin-top: 8px; }
.fetching.is-ready { opacity: .5; transform: scale(.99); transition: opacity .5s ease, transform .5s ease; }

/* --- The Feed's first-run hint: one line on the first card, pointing at its heart --------- */
.rate-hint { position: relative; display: inline-flex; align-items: center; gap: 2px; margin: 4px 0 10px; padding: 3px 3px 3px 11px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; line-height: 1.3; transform-origin: 18px 100%; animation: tip-in .3s cubic-bezier(.23, 1, .32, 1) .2s backwards; }
.rate-hint::after { content: ""; position: absolute; left: 16px; bottom: -5px; width: 10px; height: 10px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
.rate-hint .icon { width: 14px; height: 14px; color: var(--like); fill: currentColor; vertical-align: -2px; }
.rate-hint-x { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: inherit; opacity: .7; }
.rate-hint-x:hover { opacity: 1; }
.rate-hint-x .icon { width: 14px; height: 14px; color: inherit; fill: none; }
@keyframes tip-in { from { opacity: 0; transform: scale(.9) translateY(4px); } }
@keyframes chip-in { from { opacity: 0; transform: scale(.7); } }

/* --- Interests (/interests?tour=1) ------------------------------------------------------- */
.tour-done { display: grid; gap: 6px; justify-items: start; margin: 0 0 16px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 12%, var(--surface)), var(--surface) 70%); animation: chip-in .35s cubic-bezier(.2, .8, .2, 1); }
.tour-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: color-mix(in srgb, var(--ok) 75%, var(--ink)); font-size: var(--text-sm); font-weight: 700; }
.tour-kicker .icon { width: 16px; height: 16px; stroke-width: 3; }
.tour-text { margin: 0 0 6px; color: var(--ink-2); font-size: var(--text-md); line-height: 1.5; }
.tour-done .primary { text-decoration: none; }
.taste-panel.is-tour { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 8%, transparent); }
.taste-panel.is-tour .action-row { animation: chip-in .4s cubic-bezier(.2, .8, .2, 1) calc(.3s + var(--i, 0) * 90ms) both; }

@media (prefers-reduced-motion: reduce) {
  .building-faces .pick-avatar, .building-stack .ghost-card, .ghost-card i, .building-overlay, .tour-done,
  .taste-panel.is-tour .action-row, .row, .person, .rate-hint, .choose-sheet[open] { animation: none; }
  .find-progress::after { width: 100%; animation: find-pulse 1.2s ease-in-out infinite alternate; }
  @keyframes find-pulse { from { opacity: .35; } to { opacity: 1; } }
  .tray, .tray[hidden] { transform: none; }
  :is(.follow-pill, .person-follow, .person-choose, .tray-go, .start-topic):active { transform: none; }
}

/* --- Suggestion cards (Sources and the add sheet): one header row, short body --------------- */
.src-card { border-radius: 16px; }
.src-head { align-items: flex-start; gap: 10px; min-height: 0; padding: 14px 14px 6px 16px; background: none; }
.src-head .fmt-badge { width: 34px; height: 34px; border-radius: 10px; background: var(--platform-color); color: #fff; }
.src-name { font-family: var(--ui); font-size: var(--text-base); line-height: 1.3; letter-spacing: -.01em; }
.src-format { color: color-mix(in srgb, var(--platform-color) 75%, var(--ink)); font-weight: 650; }
.src-head .src-x { width: 36px; height: 36px; margin-top: -4px; }
.src-body { padding: 0 16px 8px 60px; }
.src-blurb { margin: 0; font-size: var(--text-sm); }
.src-reason { margin: 4px 0 0; }
.src-card > .peek-slot, .src-preview { margin: 0 16px; padding: 0; }
.src-actions { min-height: 0; margin: auto 16px 0; padding: 6px 0 8px; }
.src-card { background: linear-gradient(165deg, color-mix(in srgb, var(--platform-color) 9%, var(--surface)), var(--surface) 55%); }

/* Once-only moments (ownfeed/onboarding.py): the caught-up Feed's notification offer. */
.moment { box-sizing: border-box; width: min(100%, 420px); margin: 22px auto 0; padding: 16px 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px -18px #1b2a4a40; text-align: left; }
.moment-title { margin: 0; font-weight: 650; letter-spacing: -.01em; }
.moment-text { margin: 4px 0 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.5; }
.moment-actions, .hs-actions, .push-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.push-buttons button[hidden], .hs-actions button[hidden] { display: none; }

/* The Home Screen guide: a sheet with a looping demo of the exact taps. */
.hs-sheet { position: fixed; z-index: 60; inset: auto 0 calc(20px + env(safe-area-inset-bottom)) 0; box-sizing: border-box; width: min(100% - 24px, 420px); max-height: calc(100dvh - 40px); margin: 0 auto; padding: 22px 20px 18px; overflow: auto; border: 0; border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 24px 60px -20px #0f172a66; }
@media (max-width: 719px) { .hs-sheet:not(:modal) { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.hs-sheet::backdrop { background: #0f172a66; }
.hs-sheet[open] { animation: hs-up .45s cubic-bezier(.23, 1, .32, 1); }
.hs-sheet h2 { margin: 0 32px 0 0; font-size: var(--text-lg, 19px); letter-spacing: -.02em; }
.hs-sub { margin: 6px 0 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.5; }
.hs-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.hs-sheet:not([data-platform="android"]) .hs-android-only, .hs-sheet[data-platform="android"] .hs-ios-only { display: none; }
.hs-demo { display: grid; place-items: center; margin: 16px 0 6px; }
.hs-phone { width: 150px; height: 270px; }
.hs-steps { margin: 10px 0 0; padding-left: 22px; font-size: var(--text-sm); line-height: 1.5; }
.hs-steps li { padding: 3px 0; color: var(--muted); }
.hs-steps li span { font-size: .92em; }
.hs-steps li b { color: var(--ink); font-weight: 650; }

.hs-body { fill: #1d1d1f; }
.hs-screen, .hs-panel { fill: #fff; }
.hs-page .hs-mark rect, .hs-ink { fill: #1d1d1f; }
.hs-accent, .hs-page .hs-mark .hs-accent { fill: #0866da; }
.hs-phone text { fill: #1d1d1f; font: 600 7.5px Inter, system-ui, sans-serif; }
.hs-phone .hs-brand { font-size: 11px; font-weight: 750; letter-spacing: -.04em; }
.hs-phone .hs-url-text { fill: #585b65; font-weight: 500; font-size: 7px; }
.hs-phone .hs-title { font-weight: 700; }
.hs-phone .hs-link { fill: #0866da; font-weight: 500; }
.hs-phone .hs-bold { font-weight: 700; }
.hs-phone .hs-small { font-size: 6px; }
.hs-phone .hs-icon-label { fill: #fff; font-size: 6px; }
.hs-card { fill: #f0f1f4; }
.hs-bar { fill: #f7f7f8; }
.hs-url, .hs-btn, .hs-list { fill: #eef0f3; }
.hs-dot { fill: #1d1d1f; }
.hs-glyph-line { fill: none; stroke: #1d1d1f; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.hs-glyph-box { fill: none; stroke: #1d1d1f; stroke-width: 1.2; }
.hs-handle { fill: #d4d6dc; }
.hs-app.a1 { fill: #34c759; } .hs-app.a2 { fill: #0a84ff; } .hs-app.a3 { fill: #ff9f0a; } .hs-app.a4 { fill: #bf5af2; }
.hs-row-on rect { fill: #dbe9ff; }
.hs-icon-tile { fill: #fff; stroke: #e2e4ea; stroke-width: .8; }
.hs-wallpaper { fill: #6b8fd6; }
.hs-apps rect, .hs-apps circle { fill: #ffffff59; }
.hs-dim { fill: #0f172a73; }
.hs-tap { fill: #0866da33; stroke: #0866da; stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }

/* One 10-second loop. iPhone: ⋯ → Share → Add to Home Screen → Add → the icon lands. */
.hs-p, .hs-row-on { opacity: 0; }
.hs-ios-only .hs-ios-menu { animation: hs-ios-menu 10s infinite; }
.hs-ios-only .hs-ios-share { animation: hs-ios-share 10s cubic-bezier(.23, 1, .32, 1) infinite; }
.hs-ios-only .hs-ios-add { animation: hs-ios-add 10s infinite; }
.hs-ios-only .hs-home, .hs-android-only .hs-home { animation: hs-home 10s infinite; }
.hs-ios-only .hs-ios-menu .hs-row-on { animation: hs-row-1 10s infinite; }
.hs-ios-only .hs-ios-share .hs-row-on { animation: hs-row-2 10s infinite; }
.hs-ios-only .hs-tap-1 { animation: hs-tap-a 10s infinite; }
.hs-ios-only .hs-tap-2 { animation: hs-tap-b 10s infinite; }
.hs-ios-only .hs-tap-3 { animation: hs-tap-c 10s infinite; }
.hs-ios-only .hs-tap-4 { animation: hs-tap-d 10s infinite; }
.hs-new-icon { transform-box: fill-box; transform-origin: center; animation: hs-pop 10s cubic-bezier(.34, 1.56, .64, 1) infinite; }
.hs-steps.hs-ios-only li:nth-child(1) { animation: hs-step-ios-1 10s infinite; }
.hs-steps.hs-ios-only li:nth-child(2) { animation: hs-step-ios-2 10s infinite; }
.hs-steps.hs-ios-only li:nth-child(3) { animation: hs-step-ios-3 10s infinite; }
/* Android: ⋮ → Add to Home screen → Install → the icon lands. */
.hs-android-only .hs-android-menu { animation: hs-and-menu 10s infinite; transform-box: fill-box; transform-origin: 100% 0; }
.hs-android-only .hs-android-install { animation: hs-and-install 10s infinite; }
.hs-android-only .hs-android-menu .hs-row-on { animation: hs-row-and 10s infinite; }
.hs-android-only .hs-tap-1 { animation: hs-tap-a 10s infinite; }
.hs-android-only .hs-tap-2 { animation: hs-tap-b 10s infinite; }
.hs-android-only .hs-tap-3 { animation: hs-tap-e 10s infinite; }
.hs-steps.hs-android-only li:nth-child(1) { animation: hs-step-and-1 10s infinite; }
.hs-steps.hs-android-only li:nth-child(2) { animation: hs-step-and-2 10s infinite; }
.hs-steps.hs-android-only li:nth-child(3) { animation: hs-step-and-3 10s infinite; }

@keyframes hs-up { from { opacity: 0; transform: translateY(24px); } }
@keyframes hs-ios-menu { 0%, 24% { opacity: 0; transform: translateY(6px); } 27%, 48% { opacity: 1; transform: none; } 51%, 100% { opacity: 0; } }
@keyframes hs-ios-share { 0%, 48% { opacity: 0; transform: translateY(160px); } 52%, 71% { opacity: 1; transform: none; } 74%, 100% { opacity: 0; transform: none; } }
@keyframes hs-ios-add { 0%, 71% { opacity: 0; } 74%, 85% { opacity: 1; } 88%, 100% { opacity: 0; } }
@keyframes hs-home { 0%, 85% { opacity: 0; } 88%, 99% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hs-pop { 0%, 88% { transform: scale(0); } 93%, 100% { transform: scale(1); } }
@keyframes hs-row-1 { 0%, 38% { opacity: 0; } 41%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes hs-row-2 { 0%, 61% { opacity: 0; } 64%, 72% { opacity: 1; } 73%, 100% { opacity: 0; } }
@keyframes hs-row-and { 0%, 38% { opacity: 0; } 41%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes hs-tap-a { 0%, 13% { opacity: 0; transform: scale(.4); } 16% { opacity: 1; transform: scale(1); } 21%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes hs-tap-b { 0%, 39% { opacity: 0; transform: scale(.4); } 42% { opacity: 1; transform: scale(1); } 47%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes hs-tap-c { 0%, 62% { opacity: 0; transform: scale(.4); } 65% { opacity: 1; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes hs-tap-d { 0%, 78% { opacity: 0; transform: scale(.4); } 81% { opacity: 1; transform: scale(1); } 85%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes hs-tap-e { 0%, 64% { opacity: 0; transform: scale(.4); } 67% { opacity: 1; transform: scale(1); } 72%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes hs-and-menu { 0%, 22% { opacity: 0; transform: scale(.85); } 26%, 48% { opacity: 1; transform: none; } 51%, 100% { opacity: 0; } }
@keyframes hs-and-install { 0%, 50% { opacity: 0; } 53%, 73% { opacity: 1; } 76%, 100% { opacity: 0; } }
@keyframes hs-step-ios-1 { 0%, 50% { color: var(--ink); } 52%, 100% { color: var(--muted); } }
@keyframes hs-step-ios-2 { 0%, 50% { color: var(--muted); } 52%, 72% { color: var(--ink); } 74%, 100% { color: var(--muted); } }
@keyframes hs-step-ios-3 { 0%, 72% { color: var(--muted); } 74%, 100% { color: var(--ink); } }
@keyframes hs-step-and-1 { 0%, 25% { color: var(--ink); } 27%, 100% { color: var(--muted); } }
@keyframes hs-step-and-2 { 0%, 25% { color: var(--muted); } 27%, 50% { color: var(--ink); } 52%, 100% { color: var(--muted); } }
@keyframes hs-step-and-3 { 0%, 50% { color: var(--muted); } 52%, 100% { color: var(--ink); } }
/* The share guide (partials/share_guide.html): the Home Screen guide's sheet and tap rings, over one 10s loop.
   Tap the paper plane, Instagram's sheet rises, tap Share, the phone's sheet rises, tap ownfeed, Saved. */
.sg-sun { fill: #ffffff2e; }
.sg-hill { fill: #0000002e; }
.sg-glyph { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sg-line { fill: #ffffffd9; } .sg-line.soft { fill: #ffffff80; }
.sg-person { fill: #e6e8ee; }
.sg-bar { fill: #c9ccd4; } .sg-bar.soft { fill: #e2e4ea; }
.sg-on { fill: #dbe9ff; }
.sg-notice { fill: #fff; stroke: #258453; stroke-opacity: .4; stroke-width: .8; }
.sg-face { fill: #5b7bb5; }
.sg-phone .sg-pill-text { fill: #fff; font-size: 6px; }
.sg-p { opacity: 0; }
.sg-dim { animation: sg-dim 10s infinite; }
.sg-ig { animation: sg-ig 10s linear infinite; }
.sg-sys { animation: sg-sys 10s linear infinite; }
.sg-on-ig { animation: sg-on-ig 10s infinite; }
.sg-sys .sg-on { animation: sg-on-sys 10s infinite; }
.sg-done { animation: sg-done 10s infinite; }
.sg-done-card { animation: sg-card 10s infinite; }
.sg-tap-1 { animation: sg-tap-a 10s infinite; }
.sg-tap-2 { animation: sg-tap-b 10s infinite; }
.sg-tap-3 { animation: sg-tap-c 10s infinite; }
@keyframes sg-tap-a { 0%, 12% { opacity: 0; transform: scale(.4); } 14% { opacity: 1; transform: scale(1); } 18%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes sg-tap-b { 0%, 38% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; transform: scale(1); } 44%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes sg-tap-c { 0%, 60% { opacity: 0; transform: scale(.4); } 62% { opacity: 1; transform: scale(1); } 66%, 100% { opacity: 0; transform: scale(1.4); } }
@keyframes sg-dim { 0%, 14% { opacity: 0; } 17%, 66% { opacity: 1; } 69%, 100% { opacity: 0; } }
/* Each sheet rises on the drawer curve the moment its tap lands, and the next one covers it. */
@keyframes sg-ig { 0%, 14.4% { opacity: 0; transform: translateY(132px); } 14.5% { opacity: 1; transform: translateY(132px); animation-timing-function: cubic-bezier(.32, .72, 0, 1); } 19%, 46% { opacity: 1; transform: none; } 46.1%, 100% { opacity: 0; transform: none; } }
@keyframes sg-on-ig { 0%, 38% { opacity: 0; } 40%, 45% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes sg-sys { 0%, 40.9% { opacity: 0; transform: translateY(178px); } 41% { opacity: 1; transform: translateY(178px); animation-timing-function: cubic-bezier(.32, .72, 0, 1); } 45.5%, 66% { opacity: 1; transform: none; } 69%, 100% { opacity: 0; transform: none; } }
@keyframes sg-on-sys { 0%, 60% { opacity: 0; } 62%, 66% { opacity: 1; } 69%, 100% { opacity: 0; } }
@keyframes sg-done { 0%, 65% { opacity: 0; } 68%, 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sg-card { 0%, 66% { transform: translateY(-6px); animation-timing-function: cubic-bezier(.23, 1, .32, 1); } 71%, 100% { transform: none; } }

/* Saved: who made what was just saved, with Follow, and the share nudge under it. */
.saved-credit { --ease-out: cubic-bezier(.23, 1, .32, 1); display: flex; align-items: center; gap: 10px; }
.saved-credit > span:not(.face) { flex: 1; min-width: 0; }
/* A long handle moves to its own line whole, and is cut short only when even that is too narrow. */
.saved-credit b { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.saved-credit > span.credit-following { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: var(--text-sm); font-weight: 600; }
.credit-following .icon { width: 16px; height: 16px; color: var(--ok); }
.share-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: -8px 0 18px; padding: 0 14px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer; transition: opacity .2s cubic-bezier(.23, 1, .32, 1), transform .16s cubic-bezier(.23, 1, .32, 1); }
.share-chip[hidden] { display: none; }
.share-chip .icon { width: 16px; height: 16px; color: var(--accent); }
.share-chip:active { transform: scale(.97); }
@starting-style { .share-chip { opacity: 0; transform: translateY(4px); } }
.share-ready { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-right: 6px; color: var(--ok); font-weight: 600; }
.share-ready[hidden] { display: none; }
.share-ready .icon { width: 16px; height: 16px; }
.hs-actions a.primary { display: inline-flex; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  .hs-sheet *, .hs-sheet[open] { animation: none !important; }
  .hs-steps li { color: var(--ink); }
  /* Still, the guide shows the one step that matters: ownfeed in the phone's share sheet. */
  .sg-dim, .sg-sys, .sg-sys .sg-on { opacity: 1; }
  @starting-style { .share-chip { transform: none; } }
}

/* A signed-out visitor's Feed (try.html): only what the real Feed has no need for. */
.guest-wait { min-height: 320px; }
.guest-later { margin: 16px 4px 96px; color: var(--muted); }
/* Asks over whatever is open. A bottom sheet on a phone, a centred box on a desktop. */
.guest-keep { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--ink); animation: guest-keep-in .24s cubic-bezier(.23, 1, .32, 1); }
.guest-keep::backdrop { background: #0006; }
.guest-keep > div { display: grid; gap: 12px; padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
.guest-keep h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.guest-keep p { margin: 0 0 8px; color: var(--ink-2, var(--muted)); font-size: 16px; line-height: 1.5; }
.guest-keep > div:focus { outline: 0; }
.guest-keep a, .guest-keep button { display: flex; align-items: center; justify-content: center; min-height: 48px; width: 100%; font-size: 16px; font-weight: 650; text-decoration: none; }
.guest-keep button { border: 0; background: none; color: var(--ink); cursor: pointer; }
@media (min-width: 761px) {
  .guest-keep { width: min(100% - 32px, 420px); margin: auto; border-radius: 20px; }
  .guest-keep > div { padding: 28px; }
}
@keyframes guest-keep-in { from { opacity: 0; transform: translateY(16px); } }
html:is(.sheet-docked, .sheet-modal) [data-guest] .tray { visibility: hidden; }  /* a post being read gets the screen to itself */
/* The bar's words change once someone has read: a small lift so the eye catches it. */
[data-guest] .tray.is-nudged { animation: guest-tray-lift .4s cubic-bezier(.23, 1, .32, 1); }
@keyframes guest-tray-lift { 40% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .guest-keep, [data-guest] .tray.is-nudged { animation: none; } }
/* The keep bar sits above the phone's tabs instead of over them, and the + stays beside the names. */
[data-guest] .feed-head { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
[data-guest] .feed-head .list-chips { flex: 1; min-width: 0; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
[data-guest] .feed-head .chip { flex: none; }
[data-guest] .feed-add { flex: none; margin: 0; }
@media (max-width: 760px) {
  [data-guest] .tray { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
