/* Posts: cards, polls, reactions, stats strip, composers, feed lists. */

.post { position: relative; }
.post.card { padding: 1rem; }
.post-reply { border-bottom: 1px solid var(--line); padding: 1rem 0; }
li:last-child > .post-reply { border-bottom: 0; }

.post-head { display: flex; align-items: center; gap: 0.625rem; }
.post-who { min-width: 0; flex: 1; line-height: 1.25; }
/* The name and its flags on one line; a long name gives way, the flags don't. */
.post-name { display: flex; align-items: baseline; min-width: 0; }
.post-author {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}
.post-author:hover { text-decoration: underline; }
.post-meta { display: flex; align-items: center; gap: 0.25rem; font-size: 0.8125rem; color: var(--muted); }
.post-handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-time, .post-kind { flex-shrink: 0; }
/* A post's language when it isn't English: there if you look, not shouting. */
.post-lang { flex-shrink: 0; font-size: 0.75rem; color: var(--muted); opacity: 0.8; }
a.post-lang:hover { opacity: 1; text-decoration: underline; }
.language-picker { width: min(22rem, calc(100vw - 2rem)); }
.language-picker-title { font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600; }
.post-time:hover { text-decoration: underline; }

.post-body {
  margin-top: 0.75rem;
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.375;
  color: var(--ink);
  text-wrap: pretty;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  /* Each paragraph takes its direction from its own first letter (Arabic or Hebrew reads
     right to left) without turning the card around it. */
  unicode-bidi: plaintext;
}
a.post-body:hover { color: color-mix(in oklab, var(--ink) 80%, transparent); }
/* A post's text opens the post (lib/page.js); its #tags and @names are links of their own. */
.post-body[data-href] { cursor: pointer; }
.post-body a.tag, .post-body a.mention, .post-quote-body a.tag, .post-quote-body a.mention { color: var(--link); }
.post-body a.tag:hover, .post-body a.mention:hover, .post-quote-body a.tag:hover, .post-quote-body a.mention:hover { text-decoration: underline; }
/* Pinned to its author's profile. */
.post-pinned { margin: -0.25rem 0 0.625rem; display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.post-pinned .icon { flex-shrink: 0; }
/* Saving for later: only its saver knows. */
.save-form { display: inline-flex; }
.save-pill { padding: 0 0.625rem; }
.save-pill.is-active { color: var(--ink); }
/* Sensitive media: a cover on the posts that need one, and nothing on any other. */
.sensitive { margin-top: 0.75rem; }
.sensitive > summary { list-style: none; }
.sensitive > summary::-webkit-details-marker { display: none; }
.sensitive[open] > summary { display: none; }
.sensitive > .post-media { margin-top: 0; }
.sensitive-cover {
  position: relative;
  display: flex;
  min-height: 8rem;
  aspect-ratio: 16 / 7;
  max-height: 15rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  overflow: hidden;
  border-radius: 14px;
  background-color: var(--ink-2);
  color: #fff;
  cursor: pointer;
}
.sensitive-cover::before { content: ''; position: absolute; inset: 0; background: rgb(0 0 0 / 0.5); }
.sensitive-cover > * { position: relative; }
.sensitive-text { font-size: 0.9375rem; font-weight: 600; }
.sensitive-show { border-radius: 9999px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.7); padding: 0.25rem 0.875rem; font-size: 0.8125rem; font-weight: 500; }
.sensitive-cover:hover .sensitive-show { background: rgb(255 255 255 / 0.15); }
.sensitive-cover:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* A post leaving the page (its author muted or blocked). */
.post.is-leaving { opacity: 0; transition: opacity 0.2s; }
@media (prefers-reduced-motion: reduce) { .post.is-leaving { transition: none; } }
.profile-pinned { margin-bottom: 1rem; }
.post-body.is-reply { font-size: 1.0625rem; font-weight: 400; letter-spacing: 0; }
.post-body-detail { margin-top: 1rem; font-size: 1.625rem; line-height: 1.25; letter-spacing: -0.01em; }

.post-actions { margin: 0.75rem 0 0 -0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.25rem; }
.post-actions.has-poll { margin-top: 0.5rem; }
.post-actions:empty { display: none; }

.reactions { display: flex; align-items: center; gap: 0.125rem; }
/* How many have seen it: a quiet count, not a button. */
.post-views { display: inline-flex; height: 2.25rem; align-items: center; gap: 0.3125rem; padding: 0 0.625rem; font-size: 0.8125rem; color: var(--muted); cursor: default; }
.post-views svg { opacity: 0.8; }
/* A post its author sees before it's published (its video is processing). */
.post-pending { margin-top: 0.75rem; display: flex; align-items: flex-start; gap: 0.5rem; border-radius: 0.75rem; padding: 0.625rem 0.75rem; background: var(--surface-2); font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); }
.post-pending svg { flex-shrink: 0; margin-top: 0.125rem; }
.pill {
  display: inline-flex;
  height: 2.25rem;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s, background-color 0.15s;
}
.pill:hover { background: var(--surface-2); color: var(--ink); }
.pill.is-active { background: var(--surface-2); color: var(--ink); }
.react-icon { display: inline-flex; }

/* Spreads and retakes. The spread button opens its menu under it: spread (or take it back)
   and retake. A post someone passed on to you says who; a retake shows the post it's about. */
.spread-menu > .menu-popup, .share-menu > .menu-popup { left: 0; }
.post-spread { margin: -0.25rem 0 0.625rem; display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.post-spread .icon { flex-shrink: 0; }
.post-spread a { font-weight: 600; color: var(--ink-2); }
.post-spread a:hover { text-decoration: underline; }
.post-quote {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-radius: 14px;
  padding: 0.75rem 0.875rem;
  box-shadow: 0 0 0 1px var(--line);
  transition: background-color 0.15s;
}
a.post-quote:hover { background: var(--surface-2); }
/* Inside a retake the box is the post itself: its text whole, its pictures and video whole,
   its poll to vote in. Clicking the box (not those) opens the post; its head is the link. */
.post-quote[data-href] { cursor: pointer; }
.post-quote[data-href]:hover:not(:has(.poll:hover, .post-media:hover, .sensitive:hover)) { background: var(--surface-2); }
.post-quote-head { display: flex; min-width: 0; align-items: baseline; gap: 0.25rem; font-size: 0.8125rem; color: var(--muted); }
a.post-quote-head:hover .post-quote-name { text-decoration: underline; }
.post-quote-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink); }
.post-quote-handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-quote-body {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.375;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* The composer's smaller box keeps to five lines. */
a.post-quote .post-quote-body { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.post-quote-note { font-size: 0.8125rem; color: var(--muted); }
.post-quote.is-gone { font-size: 0.875rem; font-style: italic; color: var(--muted); }
.composer-quote .post-quote { margin-top: 0; }
.post-quote > .post-media, .post-quote > .sensitive, .post-quote > .poll { margin-top: 0.5rem; }
/* Pictures whole: in one row, each as wide as its shape needs for the same height, so none
   is cut. One picture keeps its own shape; a very tall one is held in and shown whole. */
.post-quote .post-media.media-2, .post-quote .post-media.media-3, .post-quote .post-media.media-4 { display: flex; aspect-ratio: auto; }
.post-quote .post-media:not(.media-video) .media-item { flex: var(--ratio) 1 0; aspect-ratio: var(--ratio); }
.post-quote .media-3 .media-item:first-child { grid-row: auto; }
/* Full width (or the height cap would narrow it to a sliver), the picture whole inside on
   its own colour. */
.post-quote .media-1 .media-item { width: 100%; max-height: min(30rem, 70vh); }
.post-quote .media-item img { object-fit: contain; }
.post-quote .media-video { max-height: min(32rem, 75vh); }

/* ─── Pictures and videos ────────────────────────────────────────────────── */

.post-media {
  margin-top: 0.75rem;
  display: grid;
  gap: 2px;
  overflow: hidden;
  border-radius: 0.875rem;
  border: 1px solid var(--line);
  background: var(--line);
}
.media-item { position: relative; display: block; min-height: 0; min-width: 0; overflow: hidden; }
.media-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.15s; }
.media-item:hover img { opacity: 0.94; }
.media-item:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
/* One picture keeps its shape (within limits), full width: where the limits or the height cap
   hold it in, it shows whole, centred on its own colour (never shrunk to one side with an
   empty band beside it). Two to four share a wide box. */
.media-1 .media-item { width: 100%; aspect-ratio: var(--ratio); max-height: min(34rem, 75vh); }
.media-1 .media-item img { object-fit: contain; }
.media-2, .media-3, .media-4 { aspect-ratio: 16 / 10; grid-template-columns: 1fr 1fr; }
.media-3, .media-4 { grid-template-rows: 1fr 1fr; }
.media-3 .media-item:first-child { grid-row: span 2; }
.media-video { aspect-ratio: var(--ratio); max-height: 80vh; border-color: transparent; background: #000; }
.media-video video { display: block; width: 100%; height: 100%; background: #000; }
.media-video.is-processing, .media-video.is-failed { place-items: center; aspect-ratio: 16 / 9; border-color: var(--line); background: var(--surface-2); }
.media-note { padding: 1rem; font-size: 0.875rem; color: var(--muted); }

/* A poll option's picture, beside it. */
.poll-options > li.has-image:not(.poll-result) { display: flex; align-items: stretch; gap: 0.5rem; }
.poll-options > li.has-image > .poll-option { min-width: 0; flex: 1; }
.poll-image {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 3.5rem;
  min-height: 3.5rem;
  overflow: hidden;
  border-radius: 0.625rem;
  background: var(--surface-2);
}
.poll-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.poll-image:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.poll-result.has-image { display: flex; align-items: center; gap: 0.25rem; padding-left: 0.375rem; }
.poll-result.has-image .poll-image { width: 2.75rem; min-height: 2.75rem; height: 2.75rem; margin: 0.375rem 0; }
.poll-result.has-image .poll-result-row { min-width: 0; flex: 1; }

/* ─── Lightbox ────────────────────────────────────────────────────────────── */

.has-lightbox { overflow: hidden; }
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: rgb(0 0 0 / 0.92);
  color: #fff;
}
.lightbox::backdrop { background: transparent; }
/* The picture always fits the screen whole, however tall or wide: the stage's single cell
   has a definite size (minmax(0, 1fr), never its content's), so max-height can hold it. */
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.lightbox-stage {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding: 3.5rem 1rem 0.5rem;
  touch-action: pan-y;
}
.lightbox-img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.lightbox-caption { max-width: 48rem; max-height: 30dvh; overflow-y: auto; margin: 0 auto; padding: 0.5rem 1rem 1.25rem; font-size: 0.9375rem; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }
.lightbox-caption:empty { display: none; }
.lightbox-count { position: absolute; top: 1rem; left: 1rem; font-size: 0.875rem; opacity: 0.8; }
.lightbox-button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
}
.lightbox-button:hover { background: rgb(255 255 255 / 0.22); }
.lightbox-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox-close { top: 0.625rem; right: 0.625rem; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 0.625rem; }
.lightbox-next { right: 0.625rem; }
@media (hover: none) { .lightbox-prev, .lightbox-next { display: none; } }

/* ─── Polls ─────────────────────────────────────────────────────────────── */

.poll { margin-top: 0.75rem; }
.poll-options { display: flex; flex-direction: column; gap: 0.5rem; }
.poll-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  background: var(--surface);
  padding: 0.625rem 1rem;
  text-align: left;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow 0.15s, background-color 0.15s;
}
.poll-option:hover:not(:disabled) { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink-2); }
.poll-option:disabled { cursor: wait; }
.poll-option.is-pending { box-shadow: inset 0 0 0 2px var(--ink); }
.poll-option .spinner { color: var(--ink-2); }
.poll-dot { height: 0.625rem; width: 0.625rem; flex-shrink: 0; border-radius: 9999px; opacity: 0.8; }
.poll-label { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.poll-label.is-leading { font-weight: 600; color: var(--ink); }
.poll-label.is-plain { color: var(--ink-2); }
.poll-note { margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted); }
.poll-result { position: relative; overflow: hidden; border-radius: 0.75rem; background: var(--surface-2); }
.poll-bar { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 0.75rem; transform-origin: left center; animation: bt-grow-x 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.poll-result-row { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; font-size: 0.9375rem; }
.poll-you { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 500; color: var(--ink-2); }
.poll-share { width: 2.75rem; text-align: right; font-weight: 600; color: var(--ink); }

/* ─── The composer ───────────────────────────────────────────────────────── */

.composer { margin-bottom: 1rem; padding: 0.875rem 1rem; transition: box-shadow 0.15s; }
.composer:focus-within { box-shadow: 0 0 0 1px var(--line-strong); }
.composer.is-dropping { box-shadow: 0 0 0 2px var(--focus); }
/* It grows with what's written (field-sizing, or js autosize where that's missing), never by hand. */
.composer-body {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  max-height: 60vh;
  resize: none;
  overflow-y: auto;
  border: 0;
  background: transparent;
  padding: 0.25rem 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.375;
  color: var(--ink);
  outline: none;
  field-sizing: content;
}
.composer-body::placeholder { color: var(--muted); }
.composer[data-mode="reply"] .composer-body { min-height: 2rem; font-family: var(--font-sans); font-size: 1rem; line-height: 1.5; }
.composer-quote { margin-top: 0.5rem; }
.composer-quote .post-quote { margin-top: 0; }

/* Pictures and a video, while they upload. */
.composer-media { margin-top: 0.75rem; display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.composer-media[hidden] { display: none; }
.composer-media.media-1 { grid-template-columns: minmax(0, 1fr); }
.upload-tile {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.upload-preview { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.upload-tile[data-kind="video"] .upload-preview { aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.upload-tile.is-uploading .upload-preview { opacity: 0.7; }
.upload-bar { height: 3px; background: var(--line); }
.upload-bar span { display: block; width: 0; height: 100%; background: var(--focus); transition: width 0.2s; }
.upload-tile.is-ready .upload-bar { visibility: hidden; }
.upload-status { padding: 0.375rem 0.625rem 0; font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.upload-status:empty { display: none; }
.upload-tile.is-failed { border-color: var(--danger); }
.upload-tile.is-failed .upload-status { color: var(--danger); }
.upload-remove {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 9999px;
  background: rgb(0 0 0 / 0.6);
  color: #fff;
}
.upload-remove:hover { background: rgb(0 0 0 / 0.8); }
.upload-remove:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.upload-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; padding: 0.5rem 0.625rem 0.625rem; }
.upload-extras:empty { display: none; }
.upload-alt { width: 100%; border: 0; border-radius: 0.375rem; background: transparent; padding: 0.25rem 0; font-size: 0.8125rem; color: var(--ink); outline: none; }
.upload-alt::placeholder { color: var(--muted); }
.upload-alt:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.upload-tracks { width: 100%; margin: 0; padding: 0; list-style: none; font-size: 0.75rem; color: var(--muted); }
.upload-tracks:empty { display: none; }

/* The poll: options appear as they're filled in (two to six); each can have a picture. */
.composer-poll { margin: 0.75rem 0 0; display: flex; min-width: 0; flex-direction: column; gap: 0.5rem; border: 0; padding: 0; }
.composer-poll[hidden] { display: none; }
.composer-poll-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.poll-row { display: flex; align-items: center; gap: 0.5rem; }
.poll-row .control { min-width: 0; flex: 1; }
.poll-row-thumb:empty { display: none; }
.poll-row-image { position: relative; display: block; width: 2.75rem; height: 2.75rem; overflow: hidden; border-radius: 0.5rem; background: var(--surface-2); }
.poll-row-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.poll-row-image.is-uploading img, .poll-row-image.is-processing img { opacity: 0.5; }
.poll-row-image.is-failed { outline: 2px solid var(--danger); outline-offset: -2px; }
.poll-row-remove {
  position: absolute;
  top: 0.125rem;
  right: 0.125rem;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: rgb(0 0 0 / 0.65);
  color: #fff;
}
.composer-poll-note { font-size: 0.75rem; color: var(--muted); }
.composer-poll-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; }
.composer-poll-remove { margin-right: -0.5rem; color: var(--ink-2); }
/* Without a script: a plain poll in a fold. */
.composer-poll-fallback { margin-top: 0.75rem; }
.composer-poll-fallback summary { cursor: pointer; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.composer-poll-fields { margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; border: 0; padding: 0; }

.composer-bar { margin-top: 0.625rem; display: flex; align-items: center; gap: 0.5rem; }
.composer-tools { margin-left: -0.5rem; display: flex; align-items: center; gap: 0.125rem; }
.composer-tools[hidden] { display: none; }
.composer-tool, .poll-row-add {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  color: var(--ink-2);
}
.composer-tool:hover:not(:disabled), .poll-row-add:hover { background: var(--surface-2); color: var(--ink); }
.composer-tool:disabled { cursor: default; opacity: 0.4; }
.composer-tool.is-active { background: color-mix(in oklab, var(--link) 12%, transparent); color: var(--link); }
/* "Sensitive": a pill with its label, after the round tools' rules so it isn't squeezed
   into their circle. */
.composer-tool.composer-sensitive {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  width: auto;
  padding: 0 0.75rem 0 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.composer-tool.composer-sensitive[hidden] { display: none; }
.composer-icon { display: inline-grid; place-items: center; }
.composer-count { margin-left: auto; }
.composer-error { margin-top: 0.5rem; font-size: 0.875rem; color: var(--danger); }
.composer-error[hidden] { display: none; }
.btn-xs { height: 1.75rem; gap: 0.25rem; padding: 0 0.625rem; font-size: 0.75rem; }

/* The composer in a dialog ("Post" anywhere but the feed, a retake). */
.composer-dialog { width: min(36rem, calc(100vw - 1.5rem)); padding: 0; }
.composer-dialog .composer { margin: 0; border: 0; padding-top: 3rem; box-shadow: none; }
.composer-dialog-close { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 1; }
.post.is-new { animation: bt-fade-up 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* ─── Lists ──────────────────────────────────────────────────────────────── */

.feed { display: flex; flex-direction: column; gap: 0.75rem; }
.feed-items { display: flex; flex-direction: column; gap: 0.75rem; }
.feed-footer { display: flex; flex-direction: column; gap: 0.75rem; }
.feed-more { display: flex; justify-content: center; padding: 0.75rem 0; }
.feed-end { font-size: 0.875rem; color: var(--muted); }
.feed-refresh { margin: -0.25rem 0 0.5rem; display: flex; justify-content: flex-end; }
.feed-intro { margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted); }

.welcome {
  margin-bottom: 0.5rem;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.75rem 1.25rem;
}
.welcome h1 {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}
.welcome p { margin-top: 0.75rem; max-width: 32rem; font-size: 1.0625rem; line-height: 1.625; color: var(--ink-2); }
.welcome-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.home-tabs {
  position: sticky;
  top: 3.5rem;
  z-index: 20;
  margin: 1.25rem -1rem 0;
  background: color-mix(in oklab, var(--page) 90%, transparent);
  padding: 0 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.home-panel { margin-top: 1rem; }

.post-page { display: flex; flex-direction: column; gap: 2rem; }
.post-page-loading { display: flex; flex-direction: column; gap: 1.5rem; }
.replying-to { margin-bottom: 0.5rem; display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.replying-to:hover { color: var(--ink); }
.replies { scroll-margin-top: 5rem; }
.replies h2 { margin-bottom: 0.75rem; font-family: var(--font-serif); font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.025em; }
.replies-count { font-family: var(--font-sans); font-size: 1rem; font-weight: 400; color: var(--muted); }
.replies-list { margin-top: 0.5rem; }
.replies .feed, .replies .feed-items { gap: 0; }
.replies-loading { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem 0; }
.replies-empty { padding: 1.5rem 0; text-align: center; font-size: 0.875rem; color: var(--muted); }

@media (min-width: 640px) {
  .post.card { padding: 1.25rem; }
  .post-body-detail { font-size: 1.875rem; }
  .welcome { padding: 2.25rem 2rem; }
  .welcome h1 { font-size: 2.5rem; }
}

/* The flags someone flies, after their name (modules/flags.rs). */
.post-flags { flex: none; margin-left: 0.3rem; font-size: 0.95em; letter-spacing: 0.08em; }
.profile-flags { display: inline-flex; gap: 0.25rem; margin-left: 0.5rem; vertical-align: middle; }
.profile-flag { font-size: 1.6rem; line-height: 1; text-decoration: none; transition: transform 0.15s; }
.profile-flag:hover { transform: scale(1.12); }
.grid-flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.5rem; }

/* Flag pages. */
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.5rem; margin: 1rem 0 1.5rem; padding: 0; list-style: none; }
.flag-tile { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 0.75rem; text-decoration: none; color: var(--ink); }
.flag-tile:hover { background: var(--surface-2); }
.flag-emoji { font-size: 1.5rem; line-height: 1; }
.flag-name { min-width: 0; flex: 1; overflow: hidden; font-size: 0.875rem; text-overflow: ellipsis; white-space: nowrap; }
.flag-count { font-size: 0.8125rem; color: var(--muted); }
.flag-head { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; }
.flag-hero { font-size: 3.5rem; line-height: 1; }
.flag-credit { margin-top: 2rem; font-size: 0.8125rem; color: var(--muted); }
.flag-credit a { text-decoration: underline; }
.lightbox-button[hidden] { display: none; }

/* People's own words anywhere: a right-to-left name or word keeps to itself (it can't
   turn the line around it), and a long unbroken string wraps instead of spilling out. */
.post-author, .post-quote-name, .poll-label, .profile-name, .upload-status { unicode-bidi: isolate; }
.post-quote-body, .profile-bio, .lightbox-caption { unicode-bidi: plaintext; overflow-wrap: anywhere; }
.post-author, .post-quote-name, .profile-name { overflow-wrap: anywhere; }
