/*
 * BlurShare — every screen (docs/SITE.md, docs/BRAND.md).
 *
 * Paper-white and ink, with the family's teal for what can be pressed; dark
 * when the system asks for it. Scoped under .sc-app so nothing here reaches
 * BlurPager's own admin panel.
 *
 * BlurPager's baseline (public/styles.css) paints every `button` with
 * `color: #fff` and a radius, and pads `main`; each override below states
 * background, colour, border and radius together (BlurPager D143, D147).
 */

:root {
  --sc-bg: #f6f4ef;
  --sc-panel: #ffffff;
  --sc-raise: #f0ede6;
  --sc-line: #e3ded3;
  --sc-ink: #1f2328;
  --sc-muted: #6b6f76;
  --sc-teal: #00a7af;
  --sc-teal-ink: #007d84;
  --sc-heart: #e0245e;
  --sc-unread: #e8f8f8;
  --sc-radius: 14px;
  --sc-shadow: 0 1px 2px rgba(31, 35, 40, 0.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --sc-bg: #101317;
    --sc-panel: #171b21;
    --sc-raise: #1f242b;
    --sc-line: #2a3038;
    --sc-ink: #e7e9ec;
    --sc-muted: #959ba4;
    --sc-teal: #00c6cf;
    --sc-teal-ink: #4fdde4;
    --sc-heart: #ff4d7d;
    --sc-unread: #12292b;
    --sc-shadow: none;
  }
}

html:has(.sc-app), body:has(.sc-app) { background: var(--sc-bg); }
body:has(.sc-app) { margin: 0; }

.sc-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sc-bg);
  color: var(--sc-ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.sc-app a { color: var(--sc-teal-ink); text-decoration: none; }
.sc-app a:hover { text-decoration: underline; }
.sc-app h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 0.6rem; }
.sc-app h2 { font-size: 1.05rem; margin: 0 0 0.75rem; }
.sc-muted, .sc-meta { color: var(--sc-muted); }
.sc-meta { font-size: 0.86rem; }
.sc-meta a { color: var(--sc-muted); }
.sc-inline { display: inline; margin: 0; }
[data-on] { /* painted by state below */ }

/* --- the bar ------------------------------------------------------------ */

.sc-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.55rem max(1rem, calc((100vw - 1040px) / 2));
  background: var(--sc-panel);
  border-bottom: 1px solid var(--sc-line);
}
.sc-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.15rem; color: var(--sc-ink); }
.sc-app a.sc-brand { color: var(--sc-ink); text-decoration: none; }
.sc-brand b { color: var(--sc-teal); }
.sc-mark { width: 1.75rem; height: 1.75rem; border-radius: 6px; flex: none; }
.sc-nav { display: flex; gap: 1.1rem; }
.sc-app .sc-nav a { color: var(--sc-ink); font-weight: 500; }
.sc-who { margin-left: auto; display: flex; align-items: center; gap: 0.9rem; }
.sc-pill {
  display: inline-block;
  min-width: 1.3em;
  padding: 0 0.4em;
  border-radius: 999px;
  background: var(--sc-heart);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.35rem;
  text-align: center;
}

/* --- buttons ------------------------------------------------------------ */

.sc-app .sc-button, .sc-app button.sc-button {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  background: var(--sc-teal);
  color: #fff;
  border: 1px solid var(--sc-teal);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.sc-app .sc-button:hover { filter: brightness(1.05); text-decoration: none; }
.sc-app .sc-button.sc-ghost { background: transparent; color: var(--sc-teal-ink); }
.sc-app .sc-button.sc-big { padding: 0.75rem 1.5rem; font-size: 1.05rem; }
.sc-app button.sc-quiet {
  padding: 0.2rem 0.4rem;
  background: transparent;
  color: var(--sc-muted);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.sc-app button.sc-quiet:hover { color: var(--sc-ink); background: var(--sc-raise); }
.sc-app button:disabled { opacity: 0.6; cursor: default; }
.sc-quiet-link { margin-left: 1rem; }

/* follow: «Следвай» when off, «Следваш» when on */
.sc-app button.sc-follow {
  padding: 0.35rem 0.9rem;
  background: var(--sc-teal);
  color: #fff;
  border: 1px solid var(--sc-teal);
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
form[data-on="1"] button.sc-follow { background: transparent; color: var(--sc-ink); border-color: var(--sc-line); }
.sc-if-on { display: none; }
form[data-on="1"] .sc-if-on { display: inline; }
form[data-on="1"] .sc-if-off { display: none; }
form.is-busy { opacity: 0.6; }

/* --- layout ------------------------------------------------------------- */

.sc-main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 1.25rem 1rem 2.5rem; box-sizing: border-box; }
.sc-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.25rem; align-items: start; }
.sc-stream { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.sc-solo { max-width: 640px; margin: 0 auto; }
.sc-side { position: sticky; top: 4.5rem; display: flex; flex-direction: column; gap: 0.9rem; }
.sc-card {
  background: var(--sc-panel);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
  padding: 1rem 1.1rem;
}
.sc-narrow { max-width: 460px; margin: 1.5rem auto; }
.sc-center-text { text-align: center; }
.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sc-foot { text-align: center; color: var(--sc-muted); font-size: 0.85rem; padding: 1.25rem 1rem 2rem; }
.sc-foot p { margin: 0.3rem 0; }
.sc-langs { display: flex; justify-content: center; gap: 0.9rem; }
.sc-app .sc-langs a { color: var(--sc-muted); }
.sc-app .sc-langs a[data-on="1"] { color: var(--sc-ink); font-weight: 650; }
.sc-nav-open { margin-left: 0.5rem; }

/* --- avatars ------------------------------------------------------------ */

.sc-av {
  --h: 186;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: hsl(var(--h) 55% 46%);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  user-select: none;
}
.sc-app a.sc-av { color: #fff; text-decoration: none; }
.sc-av-s { width: 2rem; height: 2rem; font-size: 0.9rem; }
.sc-av-l { width: 5rem; height: 5rem; font-size: 2.1rem; }

/* --- posts -------------------------------------------------------------- */

.sc-post { padding-bottom: 0.5rem; }
.sc-post-head { display: flex; gap: 0.7rem; align-items: center; }
.sc-post-who { min-width: 0; }
.sc-app .sc-name { color: var(--sc-ink); font-weight: 650; }
.sc-badge {
  display: inline-block;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--sc-raise);
  color: var(--sc-teal-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: 0.1em;
}
.sc-topic { margin: 0.7rem 0 0; font-size: 0.9rem; color: var(--sc-muted); }
.sc-topic b { color: var(--sc-ink); }
.sc-body { margin: 0.6rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-post-foot { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; }
.sc-end { margin-left: auto; }
.sc-app .sc-act, .sc-app button.sc-act {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  background: transparent;
  color: var(--sc-muted);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
}
.sc-app .sc-act:hover { background: var(--sc-raise); text-decoration: none; }
form[data-on="1"] .sc-like { color: var(--sc-heart); }
.sc-heart { font-size: 1.05rem; line-height: 1; }

/* --- composer, tabs, notes ---------------------------------------------- */

.sc-composer textarea, .sc-form textarea, .sc-form input:not([type="checkbox"]):not([type="radio"]), .sc-composer input, .sc-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  background: var(--sc-bg);
  color: var(--sc-ink);
  border: 1px solid var(--sc-line);
  border-radius: 10px;
  font: inherit;
}
.sc-composer textarea { resize: vertical; min-height: 4.5rem; border: 0; background: transparent; padding: 0.2rem 0; font-size: 1.05rem; }
.sc-composer textarea:focus { outline: none; }
.sc-composer-row { display: flex; gap: 0.6rem; align-items: center; border-top: 1px solid var(--sc-line); padding-top: 0.6rem; margin-top: 0.4rem; }
.sc-composer-row input { flex: 1; padding: 0.45rem 0.65rem; font-size: 0.92rem; }
.sc-left { font-size: 0.85rem; min-width: 2.2em; text-align: right; }
.sc-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--sc-line); }
.sc-app .sc-tabs a { padding: 0.45rem 0.9rem; color: var(--sc-muted); border-bottom: 2px solid transparent; font-weight: 600; text-decoration: none; }
.sc-app .sc-tabs a[data-on="1"] { color: var(--sc-ink); border-bottom-color: var(--sc-teal); }
.sc-tabs-inline { display: flex; gap: 0.4rem; margin: 0.6rem 0 0.4rem; }
.sc-app .sc-tabs-inline a { padding: 0.2rem 0.7rem; border-radius: 999px; color: var(--sc-muted); border: 1px solid var(--sc-line); font-size: 0.9rem; text-decoration: none; }
.sc-app .sc-tabs-inline a[data-on="1"] { color: #fff; background: var(--sc-teal); border-color: var(--sc-teal); }
.sc-note { margin: 0; padding: 0.7rem 0.9rem; border-radius: 10px; background: var(--sc-raise); color: var(--sc-muted); font-size: 0.92rem; }
.sc-empty { color: var(--sc-muted); text-align: center; padding: 2rem 0; margin: 0; }
.sc-more { align-self: center; padding: 0.5rem 1rem; }
.sc-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  background: var(--sc-ink);
  color: var(--sc-panel);
  z-index: 20;
  max-width: calc(100vw - 2rem);
}

/* --- forms -------------------------------------------------------------- */

.sc-form { display: flex; flex-direction: column; gap: 0.9rem; }
.sc-form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.95rem; }
.sc-form small { font-weight: 400; color: var(--sc-muted); font-size: 0.82rem; }
.sc-form .sc-check { flex-direction: row; align-items: flex-start; gap: 0.5rem; font-weight: 400; }
.sc-form .sc-check input { margin-top: 0.3rem; }
.sc-kinds { display: flex; gap: 1.5rem; border: 0; margin: 0; padding: 0; }
.sc-prefixed { display: flex; align-items: center; gap: 0.3rem; font-weight: 400; }
.sc-error, .sc-app .form-message.error, .sc-app .field-error { color: #c0392b; margin: 0; font-size: 0.9rem; font-weight: 400; }
.sc-app .form-message.ok { color: var(--sc-teal-ink); margin: 0; }
.sc-app .has-error { border-color: #c0392b; }
.sc-reply { margin-top: 1rem; }
.sc-reply button { align-self: flex-end; }

/* --- people, profile, comments, notices --------------------------------- */

.sc-person { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0; border-top: 1px solid var(--sc-line); }
.sc-person:first-of-type { border-top: 0; }
.sc-person-text { flex: 1; min-width: 0; }
.sc-bio-short { margin: 0.2rem 0 0; font-size: 0.92rem; }
.sc-side .sc-person { padding: 0.45rem 0; }
.sc-search { display: flex; gap: 0.5rem; }
.sc-search input { flex: 1; }

.sc-profile { display: flex; gap: 1.1rem; align-items: flex-start; }
.sc-profile-text { flex: 1; min-width: 0; }
.sc-profile-text p { margin: 0.3rem 0; }
.sc-bio { white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-counts { color: var(--sc-muted); font-size: 0.92rem; }
.sc-counts b { color: var(--sc-ink); }
.sc-profile-act { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }

.sc-comment { display: flex; gap: 0.65rem; padding: 0.7rem 0; border-top: 1px solid var(--sc-line); align-items: flex-start; }
.sc-comment:first-of-type { border-top: 0; }
.sc-comment-text { flex: 1; min-width: 0; }
.sc-comment-head { margin: 0; font-size: 0.92rem; }
.sc-comment .sc-body { margin-top: 0.15rem; }

.sc-app a.sc-notice { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0.6rem; margin: 0 -0.6rem; border-radius: 10px; color: var(--sc-ink); text-decoration: none; }
.sc-app a.sc-notice:hover { background: var(--sc-raise); }
.sc-notice[data-unread="1"] { background: var(--sc-unread); }
.sc-excerpt { color: var(--sc-muted); }

/* --- the front page for a stranger -------------------------------------- */

.sc-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; padding: 3rem 0 2rem; }
.sc-app .sc-hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; margin-bottom: 1rem; }
.sc-hero h1 b { color: var(--sc-teal); }
.sc-lead { font-size: 1.15rem; color: var(--sc-muted); }
.sc-hero-act { margin-top: 1.5rem; }
.sc-hero-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.sc-hero-points li { background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: var(--sc-radius); padding: 1rem 1.1rem; }

/* --- phones ------------------------------------------------------------- */

@media (max-width: 820px) {
  .sc-cols { grid-template-columns: 1fr; }
  .sc-side { position: static; }
  .sc-hero { grid-template-columns: 1fr; padding-top: 1.5rem; }
}
@media (max-width: 560px) {
  .sc-bar { gap: 0.7rem; flex-wrap: wrap; }
  .sc-nav { order: 3; width: 100%; justify-content: space-around; }
  .sc-main { padding: 0.8rem 0.6rem 2rem; }
  .sc-card { padding: 0.85rem 0.9rem; }
  .sc-profile { flex-wrap: wrap; }
  .sc-profile-act { align-items: flex-start; flex-direction: row; }
  .sc-composer-row { flex-wrap: wrap; }
  .sc-composer-row input { flex-basis: 100%; }
  .sc-composer-row .sc-button { margin-left: auto; }
}

/* --- photos (S19) ------------------------------------------------------- */

.sc-av { overflow: hidden; }
.sc-av-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* A post's photos (S24): one frame shaped like its tallest photo, held between
   16:9 and 9:19 by the server (--r), so they show whole; several are a row to
   swipe, one at a time. On a computer the frame is at most 80 % of the window
   high and narrows to keep its shape. */
.sc-gallery { position: relative; margin: 0.7rem auto 0; width: min(100%, calc(80vh * var(--r))); }
.sc-photos { display: flex; aspect-ratio: var(--r); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 10px; background: var(--sc-raise); }
.sc-photos::-webkit-scrollbar { display: none; }
.sc-photos a { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; min-width: 0; }
.sc-photos img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* One photo fills its frame exactly; only a photo past 16:9 or 9:19 loses edges. */
.sc-photos[data-n="1"] img { object-fit: cover; }
.sc-gallery-count { position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.8rem; pointer-events: none; }
.sc-gallery-prev, .sc-gallery-next { position: absolute; top: 50%; transform: translateY(-50%); width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.sc-gallery-prev { left: 0.5rem; }
.sc-gallery-next { right: 0.5rem; }
.sc-gallery-prev[disabled], .sc-gallery-next[disabled] { visibility: hidden; }
@media (pointer: coarse) { .sc-gallery-prev, .sc-gallery-next { display: none; } }
.sc-attach { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.7rem; border-radius: 999px; color: var(--sc-teal-ink); cursor: pointer; font-size: 0.92rem; font-weight: 600; white-space: nowrap; }
.sc-attach:hover { background: var(--sc-raise); }
.sc-previews { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.sc-previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.sc-avatar-field { display: flex; gap: 1rem; align-items: center; }
.sc-avatar-inputs { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; min-width: 0; }
.sc-avatar-inputs input[type="file"] { font: inherit; font-size: 0.9rem; font-weight: 400; }
@media (max-width: 560px) { .sc-attach-text { display: none; } }

/* --- video (S20) -------------------------------------------------------- */

/* A video takes its own shape (S24): the module sets --r from the video once
   the browser knows it, held between 16:9 and 9:19; 16:9 until then. */
.sc-video { display: grid; place-items: center; margin: 0.7rem auto 0; width: min(100%, calc(80vh * var(--r, 1.7778))); aspect-ratio: var(--r, 16 / 9); border-radius: 10px; overflow: hidden; background: #000; }
.sc-video video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.sc-video-note { margin: 0; padding: 1.5rem 1rem; color: #e7e9ec; text-align: center; font-size: 0.92rem; }
.sc-progress { font-size: 0.85rem; white-space: nowrap; }

/* --- the photo viewer (S21) ------------------------------------------------ */

.sc-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 13, 0.94);
  touch-action: none;
}
.sc-viewer-img { max-width: calc(100vw - 2rem); max-height: calc(100vh - 5rem); object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.sc-app .sc-viewer button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
  border-radius: 50%;
  font: 1.9rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.sc-app .sc-viewer button:hover { background: rgba(255, 255, 255, 0.24); }
.sc-app .sc-viewer .sc-viewer-close { top: 0.8rem; right: 0.8rem; }
.sc-app .sc-viewer .sc-viewer-prev { left: 0.8rem; top: 50%; transform: translateY(-50%); }
.sc-app .sc-viewer .sc-viewer-next { right: 0.8rem; top: 50%; transform: translateY(-50%); }
.sc-viewer-count { position: absolute; bottom: 0.8rem; left: 0; right: 0; margin: 0; text-align: center; color: #c9ced6; font-size: 0.9rem; }
.sc-photos a { cursor: zoom-in; }
@media (max-width: 560px) {
  .sc-app .sc-viewer .sc-viewer-prev, .sc-app .sc-viewer .sc-viewer-next { top: auto; bottom: 0.5rem; transform: none; }
}

/* --- share (S23) --------------------------------------------------------- */
.sc-share-icon { flex: none; }
.sc-share[data-done] { color: var(--sc-ink); }

/* --- pages and the avatar menu (S26) ------------------------------------- */
.sc-switch { position: relative; }
.sc-switch > summary { list-style: none; cursor: pointer; }
.sc-switch > summary::-webkit-details-marker { display: none; }
.sc-switch-menu { position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 20; min-width: 15rem; max-width: calc(100vw - 2rem); padding: 0.4rem; background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; gap: 0.1rem; }
.sc-app .sc-switch-me { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem; padding: 0.5rem 0.6rem; color: var(--sc-ink); text-decoration: none; border-radius: 8px; }
.sc-switch-me small { flex-basis: 100%; color: var(--sc-muted); }
.sc-switch-label { margin: 0.3rem 0.6rem 0.1rem; color: var(--sc-muted); font-size: 0.8rem; }
.sc-switch-form { margin: 0; }
.sc-switch-item { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.4rem 0.6rem; border: 0; border-radius: 8px; background: transparent; color: var(--sc-ink); font: inherit; text-align: left; cursor: pointer; }
.sc-app .sc-switch-link { padding: 0.45rem 0.6rem; border-radius: 8px; color: var(--sc-ink); text-decoration: none; border-top: 1px solid var(--sc-line); }
.sc-switch-item:hover, .sc-app .sc-switch-me:hover, .sc-app .sc-switch-link:hover { background: var(--sc-raise); }
.sc-av-xs { width: 1.6rem; height: 1.6rem; font-size: 0.75rem; }
.sc-page-head { display: flex; align-items: center; gap: 0.8rem; }
.sc-page-text { flex: 1; min-width: 0; }
.sc-page-sub { margin: 1rem 0 0.4rem; font-size: 0.95rem; color: var(--sc-muted); }
.sc-managers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.sc-managers li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.sc-add-manager { margin-top: 0.9rem; }
.sc-add-manager select { font: inherit; }

/* --- «Continue with BlurPaper» (S27) ------------------------------------- */
.sc-paper { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.8rem 0 0.4rem; }
.sc-app button.sc-paper-button { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; }
/* BlurPaper's logo beside the words (SO-29). */
.sc-paper-mark { width: 1.35rem; height: 1.35rem; flex: none; border-radius: 3px; }
.sc-hero-paper a { display: inline-flex; align-items: center; gap: 0.45rem; }
.sc-hero-paper .sc-paper-mark { width: 1.15rem; height: 1.15rem; }
.sc-paper .sc-muted { margin: 0; font-size: 0.88rem; }
.sc-or { display: flex; align-items: center; gap: 0.7rem; margin: 1rem 0 0.4rem; color: var(--sc-muted); font-size: 0.88rem; }
.sc-or::before, .sc-or::after { content: ''; flex: 1; border-top: 1px solid var(--sc-line); }
.sc-hero-paper { margin: 0.6rem 0 0; font-size: 0.95rem; }

/* --- stories (S28) ------------------------------------------------------- */
.sc-stories { padding: 0.8rem 0.9rem; }
.sc-stories-solo { padding: 0; background: none; border: 0; box-shadow: none; }
.sc-story-row { display: flex; gap: 0.9rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.1rem; }
.sc-story-row::-webkit-scrollbar { display: none; }
.sc-story { flex: none; }
.sc-story-ring { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 4.6rem; padding: 0; border: 0; background: none; color: var(--sc-ink); font: inherit; cursor: pointer; }
.sc-story-ring .sc-av { width: 3.6rem; height: 3.6rem; font-size: 1.3rem; outline: 2px solid var(--sc-panel); outline-offset: -2px; }
/* Unseen: a bright ring. Seen: a quiet one. Your own «+»: none. */
.sc-story .sc-story-ring .sc-av { box-shadow: 0 0 0 2px var(--sc-panel), 0 0 0 4.5px var(--sc-teal); }
.sc-story[data-seen="1"] .sc-story-ring .sc-av { box-shadow: 0 0 0 2px var(--sc-panel), 0 0 0 3.5px var(--sc-line); }
.sc-story-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; color: var(--sc-muted); }
.sc-story-plus { position: absolute; top: 2.55rem; right: 0.55rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--sc-teal); color: #fff; font-weight: 700; line-height: 1.25rem; text-align: center; box-shadow: 0 0 0 2px var(--sc-panel); }
.sc-story-form { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sc-story-form textarea { width: 100%; font: inherit; }
.sc-story-hint { margin: 0; font-size: 0.82rem; }
.sc-story-colors { display: flex; gap: 0.45rem; }
.sc-story-colors label { width: 1.7rem; height: 1.7rem; border-radius: 50%; cursor: pointer; position: relative; }
.sc-story-colors input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sc-story-colors label:has(input:checked) { box-shadow: 0 0 0 2px var(--sc-panel), 0 0 0 4px var(--sc-ink); }
.sc-story-colors label:has(input:focus-visible) { outline: 2px solid var(--sc-teal); outline-offset: 3px; }
.sc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sc-bg-0 { background: linear-gradient(135deg, #00c6cf, #0b6f8f); }
.sc-bg-1 { background: linear-gradient(135deg, #ff7a59, #c2185b); }
.sc-bg-2 { background: linear-gradient(135deg, #7b5cff, #2b1a7a); }
.sc-bg-3 { background: linear-gradient(135deg, #2fbf71, #0f5d3a); }
.sc-bg-4 { background: linear-gradient(135deg, #f4b400, #d35400); }
.sc-bg-5 { background: linear-gradient(135deg, #3a3f47, #111418); }

.sc-story-view { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; touch-action: none; }
.sc-story-view > * { width: min(100%, calc(100vh * 9 / 16)); }
.sc-story-bars { display: flex; gap: 4px; padding: 0.6rem 0.6rem 0; }
.sc-story-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.sc-story-bar > span { display: block; height: 100%; width: 0; background: #fff; }
.sc-story-head { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.6rem; }
.sc-app .sc-story-who { display: flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; min-width: 0; }
.sc-story-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-story-who small { opacity: 0.75; }
.sc-story-close { border: 0; background: none; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; padding: 0 0.3rem; }
.sc-story-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 10px; user-select: none; -webkit-user-select: none; }
.sc-story-img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; pointer-events: none; }
.sc-story-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 1.2rem 1rem 1rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); text-align: center; font-size: 1.05rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-story-text p { margin: 0; padding: 1.5rem; font-size: clamp(1.2rem, 5vw, 1.8rem); font-weight: 650; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-story-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 3rem; padding: 0.4rem 0.8rem; font-size: 0.88rem; }
.sc-story-views { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.9; }
.sc-story-del { border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 999px; background: none; color: #fff; padding: 0.25rem 0.8rem; font: inherit; cursor: pointer; }

/* Messages (S29): the list is the notices' rows; a conversation is bubbles,
   one's own on the right in teal, a box that scrolls, the field under it. */
.sc-chat .sc-excerpt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sc-muted); }
.sc-chat .sc-notice-text { min-width: 0; flex: 1; }
.sc-thread { display: flex; flex-direction: column; gap: 0.6rem; }
.sc-thread-head { justify-content: flex-start; padding-bottom: 0.6rem; border-bottom: 1px solid var(--sc-line); }
.sc-thread-head form { margin-left: auto; }
.sc-app .sc-thread-who { display: flex; align-items: center; gap: 0.6rem; color: var(--sc-ink); min-width: 0; }
.sc-thread-who > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sc-msgs { display: flex; flex-direction: column; gap: 0.35rem; max-height: min(62vh, 640px); overflow-y: auto; padding: 0.2rem 0.1rem; overscroll-behavior: contain; }
.sc-msgs-start { text-align: center; font-size: 0.86rem; margin: 0.4rem 0 0.8rem; }
.sc-msg { align-self: flex-start; max-width: min(78%, 34rem); padding: 0.45rem 0.75rem 0.3rem; border-radius: 16px 16px 16px 4px; background: var(--sc-raise); }
.sc-msg[data-mine="1"] { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--sc-teal); color: #fff; }
.sc-app .sc-msg[data-mine="1"] a, .sc-msg[data-mine="1"] .sc-meta { color: #fff; }
.sc-msg[data-mine="1"] .sc-meta { opacity: 0.8; }
.sc-msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-msg-story { margin: 0 0 0.2rem; font-size: 0.8rem; opacity: 0.8; font-style: italic; }
.sc-msg time { display: block; font-size: 0.72rem; text-align: right; }
.sc-msg-form { display: flex; gap: 0.5rem; align-items: flex-end; }
.sc-msg-form textarea { flex: 1; resize: vertical; min-height: 2.6rem; max-height: 10rem; padding: 0.55rem 0.8rem; border: 1px solid var(--sc-line); border-radius: 20px; background: var(--sc-panel); color: var(--sc-ink); font: inherit; }
.sc-story-reply { display: flex; gap: 0.5rem; flex: 1; }
.sc-story-reply input { flex: 1; min-width: 0; padding: 0.5rem 0.9rem; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 999px; background: rgba(0, 0, 0, 0.35); color: #fff; font: inherit; }
.sc-story-reply input::placeholder { color: rgba(255, 255, 255, 0.75); }
.sc-story-reply button { border: 0; border-radius: 999px; background: #fff; color: #111; padding: 0.4rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }

/* Polls (S30). «Poll» is a button among the composer's labels: BlurPager's
   baseline paints every button, so all of it is stated. An answer is a
   pill to press; once results show, a bar fills it to its share. */
.sc-app button.sc-attach { background: none; border: 0; border-radius: 999px; color: var(--sc-teal-ink); font: inherit; font-size: 0.92rem; font-weight: 600; }
.sc-app button.sc-attach[aria-expanded="true"] { background: var(--sc-raise); }
.sc-poll-edit { display: grid; gap: 0.4rem; margin: 0.5rem 0 0; padding: 0; border: 0; }
.sc-poll-edit input, .sc-poll-edit select { padding: 0.45rem 0.7rem; border: 1px solid var(--sc-line); border-radius: 10px; background: var(--sc-panel); color: var(--sc-ink); font: inherit; }
.sc-poll-days { display: flex; align-items: center; gap: 0.5rem; color: var(--sc-muted); font-size: 0.9rem; }
.sc-poll { display: grid; gap: 0.4rem; margin: 0.6rem 0 0.2rem; }
.sc-app .sc-poll-opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; width: 100%; padding: 0.55rem 0.9rem; border: 1.5px solid var(--sc-teal); border-radius: 999px; background: none; color: var(--sc-ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.sc-app .sc-poll-opt:hover:not(:disabled) { background: var(--sc-unread); }
.sc-app .sc-poll-opt:disabled { cursor: default; opacity: 1; }
.sc-poll-pct { display: none; }
.sc-poll-text { position: relative; overflow-wrap: anywhere; }
.sc-poll[data-show="results"] .sc-poll-opt { border-color: transparent; border-radius: 10px; background: var(--sc-raise); }
.sc-poll[data-show="results"] .sc-poll-opt::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); background: color-mix(in srgb, var(--sc-teal) 28%, transparent); transition: width 0.5s ease; }
.sc-poll[data-show="results"] .sc-poll-opt[data-mine="1"] .sc-poll-text::after { content: " ✓"; color: var(--sc-teal-ink); }
.sc-poll[data-show="results"] .sc-poll-pct { display: inline; position: relative; }
.sc-poll-foot { margin: 0.1rem 0 0; }

/* Reposts and quotes (S31). «↻» is a <details> menu like the avatar's; a
   quoted post is a small bordered card inside the post; «… reposted» is a
   quiet line over the card it heads. */
.sc-reposted { margin: -0.2rem 0 0.5rem; color: var(--sc-muted); font-size: 0.86rem; font-weight: 600; }
.sc-app .sc-reposted a { color: var(--sc-muted); }
.sc-repost-menu { position: relative; display: inline-block; }
.sc-repost-menu > summary { list-style: none; cursor: pointer; }
.sc-repost-menu > summary::-webkit-details-marker { display: none; }
.sc-repost-menu[data-on="1"] > summary { color: #17a34a; }
.sc-repost-pop { position: absolute; bottom: calc(100% + 0.3rem); left: 0; z-index: 20; display: grid; min-width: 11rem; padding: 0.3rem; border: 1px solid var(--sc-line); border-radius: 12px; background: var(--sc-panel); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.sc-app .sc-repost-item { display: block; width: 100%; padding: 0.5rem 0.7rem; border: 0; border-radius: 8px; background: none; color: var(--sc-ink); font: inherit; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.sc-app .sc-repost-item:hover { background: var(--sc-raise); text-decoration: none; }
.sc-repost-pop form { margin: 0; }
.sc-repost-pop form[data-on="1"] .sc-if-off, .sc-repost-pop form:not([data-on="1"]) .sc-if-on { display: none; }
.sc-app a.sc-quote, .sc-quote { display: grid; gap: 0.2rem; margin: 0.6rem 0 0.2rem; padding: 0.6rem 0.8rem; border: 1px solid var(--sc-line); border-radius: 12px; color: var(--sc-ink); text-decoration: none; }
.sc-app a.sc-quote:hover { background: var(--sc-raise); text-decoration: none; }
.sc-quote-who { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-quote-text { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.sc-quote-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; margin-top: 0.3rem; }
.sc-quote-gone { color: var(--sc-muted); font-style: italic; }
.sc-quote-draft { margin: 0.2rem 0 0.4rem; }

/* Saved posts (S33): an outlined bookmark, filled once saved. */
.sc-save-icon path { fill: none; }
.sc-app form[data-on="1"] .sc-save { color: var(--sc-teal-ink); }
form[data-on="1"] .sc-save-icon path { fill: currentColor; }

/* Video stories (S34). The sound and close buttons are BlurPager buttons
   underneath (a blue fill, a radius): all of it is stated. The «preparing»
   words sit in the middle, clear of a caption at the bottom. */
.sc-app .sc-story-close, .sc-app .sc-story-sound { border: 0; border-radius: 0; background: none; color: #fff; box-shadow: none; padding: 0 0.3rem; cursor: pointer; }
.sc-app .sc-story-sound { font-size: 1.3rem; margin-left: auto; margin-right: 0.4rem; }
.sc-story-wait { position: absolute; inset: auto 1rem 45% 1rem; margin: 0; text-align: center; font-size: 1rem; opacity: 0.9; }

/* Events (S35): a calendar leaf beside the name, the time and the place;
   «I'm going» is the follow button's toggle. The feed's side lists the next
   three with the same leaf. */
.sc-event { display: flex; align-items: center; gap: 0.8rem; margin: 0.6rem 0 0.2rem; padding: 0.7rem 0.8rem; border: 1px solid var(--sc-line); border-radius: 12px; background: var(--sc-raise); }
.sc-event[data-past="1"] { opacity: 0.7; }
.sc-event-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.sc-event-title { overflow-wrap: anywhere; }
.sc-soon-date { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 3rem; height: 3.2rem; border-radius: 10px; background: var(--sc-panel); border: 1px solid var(--sc-line); line-height: 1.05; }
.sc-soon-date b { font-size: 1.3rem; }
.sc-soon-date small { color: var(--sc-heart); font-weight: 700; text-transform: uppercase; font-size: 0.68rem; letter-spacing: 0.04em; }
.sc-soon { margin-top: 1rem; }
.sc-app a.sc-soon-item { display: flex; gap: 0.7rem; align-items: center; padding: 0.45rem 0; color: var(--sc-ink); text-decoration: none; }
.sc-app a.sc-soon-item:hover b { text-decoration: underline; }
.sc-soon-item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sc-soon-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-event-edit input[type="datetime-local"] { padding: 0.35rem 0.6rem; border: 1px solid var(--sc-line); border-radius: 10px; background: var(--sc-panel); color: var(--sc-ink); font: inherit; }
