/* ── Social: Feed, Explore, the post viewer, the composer ────────────────────
   The pictures are the interface. Chrome is quiet and timeless — Inter, pills,
   hairlines, theme surfaces — so a riso print and a datamoshed clip sit next
   to each other without the frame competing. The Windows 2000/XP years are
   honoured in a few details rather than worn as a costume:

     · the task pane: grouped panels down the left with a header bar each
     · the status bar along the bottom, in Tahoma, split into panes
     · the viewer's close button, a small cherry square like Luna's
     · the balloon tip that points first-time visitors at their Feed

   Styles every class js/feed.js renders (it used to be css/feed.css, a full
   Y2K bevel skin), in both of its homes: the overlay inside the editor and
   the page at /explore/ (explore.html, js/social.js). All three themes. */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
html {
  --so-ground: #ffffff;
  --so-surface: #f6f7fb;
  --so-raise: #ffffff;
  --so-line: rgba(28, 42, 94, 0.11);
  --so-line-2: rgba(28, 42, 94, 0.2);
  --so-text: #1c2a5e;
  --so-muted: #6f82c8;
  --so-faint: rgba(28, 42, 94, 0.45);
  --so-chip: rgba(28, 42, 94, 0.06);
  --so-chip-2: rgba(28, 42, 94, 0.1);
  --so-tile: #eef0f6;
  --so-glass: rgba(255, 255, 255, 0.78);
  --so-shadow: 0 12px 34px rgba(20, 32, 70, 0.14);
  --so-sel: #d61f4d;
  --so-sel-rgb: 214, 31, 77;
  --so-cta: linear-gradient(120deg, #f0334f, #8e0e3a);
  --so-cta-glow: rgba(190, 20, 60, 0.35);
  --so-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --so-xp: Tahoma, Verdana, "Segoe UI", "Inter", sans-serif;
  --sx-top-h: 60px;
}
html[data-theme="dark"] {
  --so-ground: #000000;
  --so-surface: #0b0d13;
  --so-raise: #12151d;
  --so-line: rgba(255, 255, 255, 0.1);
  --so-line-2: rgba(255, 255, 255, 0.18);
  --so-text: #f3f5fc;
  --so-muted: #b9c2dd;
  --so-faint: rgba(243, 245, 252, 0.5);
  --so-chip: rgba(255, 255, 255, 0.07);
  --so-chip-2: rgba(255, 255, 255, 0.12);
  --so-tile: #10131a;
  --so-glass: rgba(10, 12, 20, 0.68);
  --so-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
  --so-sel: #ff6b86;
  --so-sel-rgb: 255, 107, 134;
}
html[data-theme="black"] {
  --so-ground: #000000;
  --so-surface: #000000;
  --so-raise: #000000;
  --so-line: rgba(255, 255, 255, 0.14);
  --so-line-2: rgba(255, 255, 255, 0.26);
  --so-text: #ffffff;
  --so-muted: #cdd4e8;
  --so-faint: rgba(255, 255, 255, 0.5);
  --so-chip: rgba(255, 255, 255, 0.035);
  --so-chip-2: rgba(255, 255, 255, 0.08);
  --so-tile: #0a0a0a;
  --so-glass: rgba(0, 0, 0, 0.72);
  --so-shadow: 0 16px 44px rgba(0, 0, 0, 0.7);
  --so-sel: #ff6b86;
  --so-sel-rgb: 255, 107, 134;
}

/* ── The two homes ──────────────────────────────────────────────────────── */
.fd-root { color: var(--so-text); font: 400 13px/1.45 var(--so-font); -webkit-font-smoothing: antialiased; }
.fd-root *, .fd-root *::before, .fd-root *::after { box-sizing: border-box; }
.fd-root button { font-family: inherit; }
.fd-root[hidden] { display: none; }

/* In the editor: a window over everything, full screen on a phone. */
.fd-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 18px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px) saturate(130%); backdrop-filter: blur(12px) saturate(130%);
}
.fd-overlay .fd-modal {
  position: relative;
  width: min(1180px, 100%); height: min(90vh, 940px);
  display: flex; flex-direction: column;
  background: var(--so-ground); color: var(--so-text);
  border: 1px solid var(--so-line-2); border-radius: 20px;
  box-shadow: var(--so-shadow); overflow: hidden;
}
@media (max-width: 760px) {
  .fd-overlay:not(.fd-immersive) { padding: 0; background: var(--so-ground); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .fd-overlay:not(.fd-immersive) .fd-modal { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .fd-overlay:not(.fd-immersive) .fd-head { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .fd-overlay:not(.fd-immersive) .fd-body { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
/* The iPhone app has no desktop behind it, at any width. */
html.lr-native .fd-overlay:not(.fd-immersive) { padding: 0; background: var(--so-ground); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.lr-native .fd-overlay:not(.fd-immersive) .fd-modal { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
html.lr-native .fd-overlay:not(.fd-immersive) .fd-head { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
html.lr-native .fd-overlay:not(.fd-immersive) .fd-body { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

/* On its own page: part of the page, no frame. */
.fd-page { position: relative; }
.fd-page .fd-modal { position: static; display: block; }

/* ── The toolbar ────────────────────────────────────────────────────────── */
.fd-head {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--so-line);
  background: var(--so-ground);
  flex: 0 0 auto;
}
.fd-title { margin: 0; font: 800 17px/1.1 var(--so-font); letter-spacing: -0.01em; color: var(--so-text); }
/* In the editor the tabs say where you are; the title is for screen readers. */
.fd-overlay:not(.fd-immersive) .fd-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.fd-tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--so-chip); border-radius: 999px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.fd-tabs::-webkit-scrollbar { display: none; }
.fd-tab {
  flex: 0 0 auto; border: 0; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  background: transparent; color: var(--so-muted);
  font: 600 12.5px/1 var(--so-font);
  transition: background 0.15s ease, color 0.15s ease;
}
.fd-tab:hover { color: var(--so-text); }
.fd-tab.on { background: var(--so-text); color: var(--so-ground); }
.fd-page .fd-tabs { display: none; }

.fd-sortwrap {
  position: relative; display: inline-flex; align-items: center;
  height: 34px; border: 1px solid var(--so-line-2); border-radius: 999px;
  color: var(--so-text); background: transparent;
}
.fd-sortwrap[hidden] { display: none; }
.fd-sortsel {
  appearance: none; -webkit-appearance: none; border: 0; background: none; outline: none; cursor: pointer;
  height: 100%; padding: 0 30px 0 14px; color: inherit;
  font: 600 12.5px/1 var(--so-font);
}
.fd-sortsel option { color: #1c2a5e; background: #fff; }
.fd-sortsel:focus-visible { outline: 2px solid var(--so-sel); outline-offset: 2px; border-radius: 999px; }
.fd-sortchev, .fd-sortwrap > i {
  position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: translateY(-70%) rotate(45deg); opacity: 0.7;
}
.fd-sortwrap svg { position: absolute; right: 10px; width: 12px; height: 12px; pointer-events: none; opacity: 0.7; }

.fd-search {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; min-width: 180px; max-width: 360px; flex: 1 1 220px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--so-chip); color: var(--so-muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.fd-search:focus-within { border-color: rgba(var(--so-sel-rgb), 0.7); background: transparent; }
.fd-search svg { width: 15px; height: 15px; flex: none; }
.fd-search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  color: var(--so-text); font: 500 14px/1 var(--so-font);   /* 14px+, or iOS zooms on focus */
}
.fd-search input::placeholder { color: var(--so-faint); }
.fd-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.fd-bell, .fd-head .fd-back, .fd-head .fd-close {
  position: relative; flex: none;
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--so-line-2); background: transparent; color: var(--so-text); cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.fd-bell:hover, .fd-head .fd-back:hover, .fd-head .fd-close:hover { background: var(--so-chip); }
.fd-bell:active, .fd-head .fd-back:active, .fd-head .fd-close:active { transform: scale(0.95); }
.fd-bell[hidden], .fd-head .fd-back[hidden] { display: none; }
.fd-bell svg, .fd-head .fd-back svg, .fd-head .fd-close svg { width: 17px; height: 17px; }
.fd-bell b {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--so-cta); color: #fff;
  font: 700 10px/18px var(--so-font); text-align: center;
  box-shadow: 0 0 0 2px var(--so-ground);
}
.fd-bell b[hidden] { display: none; }

/* Post — the toolbar's one hero. Also the composer's submit. */
.fd-post {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--so-cta); color: #fff;
  font: 700 13px/1 var(--so-font);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 22px var(--so-cta-glow);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}
.fd-post svg { width: 15px; height: 15px; }
.fd-post:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 10px 26px rgba(190, 20, 60, 0.5); }
.fd-post:active:not(:disabled) { transform: scale(0.97); }
.fd-post:disabled { opacity: 0.45; cursor: not-allowed; }
.fd-page .fd-head .fd-post { display: none; }        /* the page's own header leads to the editor */
.fd-page .fd-head .fd-close { display: none; }

.fd-root button:focus-visible, .fd-root a:focus-visible, .fd-fcard-media:focus-visible { outline: 2px solid var(--so-sel); outline-offset: 2px; }

/* ── The body ───────────────────────────────────────────────────────────── */
.fd-body {
  position: relative; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 16px;
  background: var(--so-ground);
  container-type: inline-size; container-name: fdbody;
}
.fd-page .fd-body { overflow: visible; padding: 0; background: transparent; }
.fd-note { margin: 0; padding: 40px 8px; text-align: center; color: var(--so-muted); font: 500 13.5px/1.5 var(--so-font); }
.fd-body > .fd-note { min-height: 40vh; display: flex; align-items: center; justify-content: center; }
.fd-note-sm { padding: 6px 0; font-size: 12.5px; text-align: left; }
.fd-pitch { margin: 0 0 14px; max-width: 720px; color: var(--so-muted); font: 500 13px/1.5 var(--so-font); }
.fd-pitch b { color: var(--so-text); font-weight: 700; }

/* ── Explore: justified rows, nothing cropped ───────────────────────────────
   Each tile's width grows with its aspect ratio (--ar, set per tile), so every
   row comes out one height and every picture keeps its own shape — a contact
   sheet rather than a wall of squares. The ::after soaks up the last row so it
   is not stretched. Same markup from the server and from feed.js. */
.fd-grid.fd-just { --row-h: 232px; display: flex; flex-wrap: wrap; gap: 6px; }
.fd-grid.fd-just::after { content: ''; flex: 999999 1 0; }
.fd-just > .fd-tile {
  flex-grow: var(--ar, 1); flex-shrink: 1;
  flex-basis: calc(var(--ar, 1) * var(--row-h));
  aspect-ratio: var(--ar, 1);
  min-width: 0;
}
@container fdbody (max-width: 900px) { .fd-grid.fd-just { --row-h: 190px; } }
@container fdbody (max-width: 600px) { .fd-grid.fd-just { --row-h: 150px; gap: 3px; } }
@media (max-width: 600px) { .fd-page .fd-grid.fd-just { --row-h: 150px; gap: 3px; } }

.fd-tile {
  position: relative; display: block; padding: 0; margin: 0; border: 0;
  border-radius: 10px; overflow: hidden; cursor: pointer;
  background: var(--so-tile); color: #fff; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 600px) { .fd-tile { border-radius: 6px; } }
.fd-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1); }
.fd-tile::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55));
  opacity: 0; transition: opacity 0.2s ease;
}
.fd-tile-who, .fd-tile-cam {
  position: absolute; z-index: 2; pointer-events: none;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fd-tile-who { left: 10px; bottom: 9px; max-width: calc(100% - 20px); font: 600 12px/1.2 var(--so-font); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-tile-cam {
  left: 8px; bottom: 30px; max-width: calc(100% - 16px);
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px 0 6px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font: 600 11px/1 var(--so-font);
}
.fd-tile-cam svg { width: 13px; height: 13px; flex: none; }
.fd-tile-cam b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) {
  .fd-tile:hover img { transform: scale(1.035); }
  .fd-tile:hover::after, .fd-tile:focus-visible::after { opacity: 1; }
  .fd-tile:hover .fd-tile-who, .fd-tile:hover .fd-tile-cam,
  .fd-tile:focus-visible .fd-tile-who, .fd-tile:focus-visible .fd-tile-cam { opacity: 1; transform: none; }
}
.fd-tile:not(:has(.fd-tile-who)) .fd-tile-cam { bottom: 8px; }
.fd-tile:focus-visible { outline: 2px solid var(--so-sel); outline-offset: 2px; }

/* Marks at rest: a clip, a carousel, music, new since your last visit. */
.fd-tile.fd-is-clip::before {
  content: ''; position: absolute; right: 8px; top: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.42) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='white'/%3E%3C/svg%3E") center / 14px no-repeat;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.fd-tile-car {
  position: absolute; right: 8px; top: 8px; z-index: 2; pointer-events: none;
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font: 700 11px/1 var(--so-font);
}
.fd-tile-car svg { width: 13px; height: 13px; }
.fd-tile.fd-is-clip .fd-tile-car { right: 38px; }
.fd-tile-music {
  position: absolute; left: 8px; top: 8px; z-index: 2; pointer-events: none;
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.42); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.fd-tile-music svg { width: 12px; height: 12px; }
.fd-tile-new { position: absolute; left: 8px; top: 8px; z-index: 3; width: 9px; height: 9px; border-radius: 50%; background: var(--so-sel); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }
.fd-tile-music ~ .fd-tile-new { left: 36px; top: 16px; }
.fd-tile-audio {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; pointer-events: none;
  display: flex; align-items: center; gap: 5px; padding: 4px 8px 4px 6px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font: 700 10.5px/1 var(--so-font);
}
.fd-tile-audio i { font-style: normal; font-size: 8px; }

/* The last tile is the door in. */
.fd-tile.fd-tile-post {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; text-align: center; cursor: pointer;
  background: transparent; border: 1.5px dashed var(--so-line-2);
  color: var(--so-muted); font: 500 12px/1.3 var(--so-font);
}
.fd-tile.fd-tile-post::after { display: none; }
.fd-tile-post strong { color: var(--so-text); font: 700 13px/1.2 var(--so-font); }
.fd-tile-post-ico { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--so-cta); color: #fff; box-shadow: 0 6px 16px var(--so-cta-glow); }
.fd-tile-post-ico svg { width: 18px; height: 18px; }
.fd-tile.fd-tile-post:hover { border-color: rgba(var(--so-sel-rgb), 0.6); color: var(--so-text); }

/* ── Feed: one column of posts, suggestions beside it ──────────────────── */
.fd-feed { display: grid; grid-template-columns: minmax(0, 600px) 300px; justify-content: center; gap: 44px; align-items: start; }
.fd-feed-col { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.fd-feed-aside { position: sticky; top: 8px; min-width: 0; }
.fd-page .fd-feed-aside { top: calc(var(--sx-top-h) + 24px); }
.fd-sugg-strip { display: none; }
@container fdbody (max-width: 980px) {
  .fd-feed { grid-template-columns: minmax(0, 600px); }
  .fd-feed-aside { display: none; }
  .fd-sugg-strip { display: block; }
}
@media (max-width: 1180px) {
  .fd-page .fd-feed { grid-template-columns: minmax(0, 600px); }
  .fd-page .fd-feed-aside { display: none; }
  .fd-page .fd-sugg-strip { display: block; }
}

.fd-fcard { display: flex; flex-direction: column; min-width: 0; }
.fd-fcard-head { display: flex; align-items: center; gap: 10px; padding: 0 2px 10px; }
.fd-fcard-head .fd-avatar { width: 34px; height: 34px; }
.fd-fcard-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fd-fcard-who b { font: 650 14px/1.2 var(--so-font); color: var(--so-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-fcard-when { font: 400 11.5px/1 var(--so-xp); color: var(--so-muted); }
.fd-fcard-media {
  position: relative; width: 100%; aspect-ratio: var(--ar, 1); max-height: min(78vh, 760px);
  border-radius: 14px; overflow: hidden; background: var(--so-tile); cursor: zoom-in;
}
.fd-fcard-acts { display: flex; align-items: center; gap: 2px; padding: 8px 0 2px; }
.fd-act {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 9px;
  border: 0; border-radius: 999px; background: none; color: var(--so-text); cursor: pointer;
  font: 600 13px/1 var(--so-font); font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, color 0.15s ease;
}
.fd-act:hover { background: var(--so-chip); }
.fd-act svg { width: 22px; height: 22px; }
.fd-act.fd-like.on { color: var(--so-sel); }
.fd-act.fd-like.on svg { fill: currentColor; animation: fd-pop 0.28s ease; }
.fd-fcard-cap { margin: 6px 2px 0; font: 400 14px/1.5 var(--so-font); color: var(--so-text); overflow-wrap: anywhere; }
.fd-fcard-cap b { font-weight: 650; margin-right: 2px; }
.fd-use.fd-use-card { margin-left: auto; min-height: 38px; padding: 3px 16px 3px 4px; gap: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px var(--so-cta-glow); }
.fd-use-card .fd-use-ico { width: 30px; height: 30px; }
.fd-use-card .fd-use-ico svg { width: 18px; height: 18px; }
.fd-use-card .fd-use-l { font-size: 12.5px; }
.fd-use-card .fd-use-name { max-width: 150px; }
@media (max-width: 480px) { .fd-use-card .fd-use-name { display: none; } }

/* The media box: CONTAINed over a blurred copy of itself, never cropped. */
.fd-mbox { position: absolute; inset: 0; overflow: hidden; }
.fd-mbox-back { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(30px) saturate(1.3) brightness(0.6); transform: scale(1.15); }
.fd-mbox-img, .fd-mbox-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fd-mbox-vid { z-index: 1; }
.fd-mbox-video::after {
  content: ''; position: absolute; right: 10px; top: 10px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='white'/%3E%3C/svg%3E") center / 15px no-repeat;
}

/* ── Carousels ──────────────────────────────────────────────────────────── */
.fd-car { position: absolute; inset: 0; overflow: hidden; background: #000; }
.fd-car-track {
  position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.fd-car-track::-webkit-scrollbar { display: none; }
.fd-car-cell { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; }
.fd-car-cell img, .fd-car-cell video { width: 100%; height: 100%; object-fit: contain; display: block; }
.fd-car-dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.fd-car-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); transition: background 0.2s ease, transform 0.2s ease; }
.fd-car-dots i.on { background: #fff; transform: scale(1.15); }
.fd-car-n { position: absolute; right: 10px; top: 10px; z-index: 2; padding: 4px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); color: #fff; font: 600 11px/1 var(--so-font); font-variant-numeric: tabular-nums; }
.fd-car-btn {
  position: absolute; top: 50%; z-index: 3; width: 32px; height: 32px; margin-top: -16px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.88); color: #111; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); opacity: 0; transition: opacity 0.18s ease;
}
.fd-car-btn svg { width: 16px; height: 16px; }
.fd-car-btn[hidden] { display: none; }
.fd-car-prev { left: 10px; }
.fd-car-next { right: 10px; }
.fd-car:hover .fd-car-btn, .fd-car-btn:focus-visible { opacity: 1; }
@media (hover: none) { .fd-car-btn { display: none; } }

/* ── Creators you might like ───────────────────────────────────────────── */
/* A section label in the task-pane manner: small caps over one muted line. */
.fd-sec { display: flex; flex-direction: column; gap: 3px; margin: 0 0 12px; }
.fd-sec b { font: 800 11px/1.2 var(--so-font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--so-text); }
.fd-sec span { font: 500 12px/1.35 var(--so-font); color: var(--so-muted); }
.fd-sugg-grid .fd-sugg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.fd-sugg-strip { margin: 4px 0; }
.fd-sugg-strip .fd-sugg-list { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.fd-sugg-strip .fd-scard { flex: 0 0 200px; scroll-snap-align: start; }
.fd-scard {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 10px;
  border: 1px solid var(--so-line); border-radius: 18px; background: var(--so-surface);
}
.fd-scard-covers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 12px; overflow: hidden; cursor: pointer; }
.fd-scard-covers span { aspect-ratio: 1; background: var(--so-tile); display: block; }
.fd-scard-covers img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-scard-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fd-scard-id .fd-avatar { width: 36px; height: 36px; }
.fd-scard-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; }
.fd-scard-meta strong { font: 700 13.5px/1.2 var(--so-font); color: var(--so-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-scard-why { font: 500 12px/1.35 var(--so-font); color: var(--so-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fd-scard .fd-follow { align-self: stretch; }
/* Beside the feed: the task pane — a group with its header bar. */
.fd-feed-aside .fd-sugg { border: 1px solid var(--so-line); border-radius: 18px; background: var(--so-surface); overflow: hidden; }
.fd-feed-aside .fd-sec {
  margin: 0; padding: 12px 16px 11px;
  background: linear-gradient(180deg, var(--so-raise), var(--so-surface));
  border-bottom: 1px solid var(--so-line);
}
.fd-feed-aside .fd-sugg-list { display: flex; flex-direction: column; padding: 6px 8px 8px; }
.fd-feed-aside .fd-scard { flex-direction: row; align-items: center; gap: 8px; padding: 8px; border: 0; border-radius: 12px; background: none; }
.fd-feed-aside .fd-scard:hover { background: var(--so-chip); }
.fd-feed-aside .fd-scard-id { flex: 1; }
.fd-feed-aside .fd-scard .fd-follow { align-self: center; height: 30px; padding: 0 12px; font-size: 12px; }
.fd-feed-aside .fd-note-sm { padding: 8px; }

.fd-feed-empty {
  padding: 26px 24px; border: 1px solid var(--so-line); border-radius: 20px;
  background: var(--so-surface);
}
.fd-feed-empty h3 { margin: 0 0 6px; font: 800 20px/1.25 var(--so-font); letter-spacing: -0.01em; color: var(--so-text); text-wrap: balance; }
.fd-feed-empty p { margin: 0; color: var(--so-muted); font: 500 14px/1.5 var(--so-font); }
.fd-feed-empty .fd-btn-hero { margin-top: 16px; }
.fd-btn-hero {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--so-cta); color: #fff; font: 700 14px/1 var(--so-font); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 22px var(--so-cta-glow);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.fd-btn-hero:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 10px 26px rgba(190, 20, 60, 0.5); }
.fd-btn-hero:active { transform: scale(0.97); }
.fd-refresh {
  align-self: center; height: 38px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(var(--so-sel-rgb), 0.5); background: rgba(var(--so-sel-rgb), 0.08);
  color: var(--so-sel); font: 700 13px/1 var(--so-font);
}

/* ── Follow ─────────────────────────────────────────────────────────────── */
.fd-follow {
  flex: none; height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--so-text); background: var(--so-text); color: var(--so-ground);
  font: 700 12.5px/1 var(--so-font); white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.fd-follow:active { transform: scale(0.97); }
.fd-follow.on { background: transparent; color: var(--so-muted); border-color: var(--so-line-2); }

/* ── Avatars and names ──────────────────────────────────────────────────── */
.fd-avatar {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--so-chip-2) center / cover no-repeat;
  border: 1px solid var(--so-line-2);
}
.fd-avatar-ok { display: grid; place-items: center; background: var(--so-cta); border: 0; color: #fff; }
.fd-avatar-ok svg { width: 60%; height: 60%; }
.fd-profile-link { cursor: pointer; pointer-events: auto; }
.fd-profile-link:hover strong, .fd-profile-link:hover b, .fd-profile-link:hover .fd-who, b.fd-profile-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Cameras ────────────────────────────────────────────────────────────── */
.fd-cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 16px; }
.fd-cam { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; color: var(--so-text); text-align: left; text-decoration: none; }
.fd-cam-art { width: 100%; aspect-ratio: 10 / 13; display: flex; align-items: center; justify-content: center; border-radius: 12px; margin-bottom: 4px; }
.fd-cam-art canvas, .fd-cam-art img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3)); transition: transform 0.18s ease; }
.fd-cam:hover .fd-cam-art canvas, .fd-cam:hover .fd-cam-art img { transform: translateY(-3px); }
.fd-cam strong { font: 650 13px/1.25 var(--so-font); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-cam-by { font: 500 12px/1.3 var(--so-font); color: var(--so-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-cam-keep .fd-cam-art { border: 1.5px dashed var(--so-line-2); color: var(--so-muted); }
.fd-cam-keep .fd-cam-art svg { width: 24px; height: 24px; }

/* ── Music ──────────────────────────────────────────────────────────────── */
.fd-music-shelf { display: flex; flex-direction: column; gap: 2px; max-width: 760px; }
.fd-music-row { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; }
.fd-music-row:hover { background: var(--so-chip); }
.fd-music-row.on { background: rgba(var(--so-sel-rgb), 0.1); }
.fd-music-play { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--so-line-2); background: var(--so-chip); color: var(--so-text); font-size: 11px; cursor: pointer; }
.fd-music-row.playing .fd-music-play { background: var(--so-cta); border-color: transparent; color: #fff; }
.fd-music-meta { min-width: 0; }
.fd-music-name { margin: 0; font: 650 14px/1.25 var(--so-font); color: var(--so-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-music-by { margin: 3px 0 0; font: 500 12px/1.2 var(--so-font); color: var(--so-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-music-len { font: 400 11.5px/1 var(--so-xp); color: var(--so-muted); font-variant-numeric: tabular-nums; }
.fd-music-use { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--so-line-2); background: transparent; color: var(--so-text); font: 650 12px/1 var(--so-font); cursor: pointer; }
.fd-music-use:hover { background: var(--so-chip); }

/* ── People ─────────────────────────────────────────────────────────────── */
.fd-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fd-person { display: flex; align-items: center; gap: 12px; padding: 12px; min-width: 0; border: 1px solid var(--so-line); border-radius: 18px; background: var(--so-surface); }
.fd-person .fd-avatar { width: 46px; height: 46px; }
.fd-person-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; cursor: pointer; }
.fd-person-meta strong { font: 700 14px/1.2 var(--so-font); color: var(--so-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-person-meta span { font: 500 12px/1.3 var(--so-font); color: var(--so-muted); }
.fd-person-covers { display: flex; gap: 3px; }
.fd-person-covers img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; display: block; }
@media (max-width: 420px) { .fd-person-covers { display: none; } }

/* ── Notifications ──────────────────────────────────────────────────────── */
.fd-notif {
  position: absolute; top: 60px; right: 12px; z-index: 20;
  width: min(380px, calc(100% - 24px)); max-height: 70%; overflow-y: auto;
  background: var(--so-raise); color: var(--so-text);
  border: 1px solid var(--so-line-2); border-radius: 18px; box-shadow: var(--so-shadow);
}
.fd-page .fd-notif { position: fixed; top: calc(var(--sx-top-h) + 8px); right: 16px; max-height: calc(100vh - var(--sx-top-h) - 32px); }
.fd-notif-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--so-raise); border-bottom: 1px solid var(--so-line); font: 800 11px/1 var(--so-font); letter-spacing: 0.12em; text-transform: uppercase; }
.fd-notif-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--so-line); background: none; cursor: pointer; text-align: left; color: var(--so-text); font: 500 13px/1.35 var(--so-font); }
.fd-notif-row:hover { background: var(--so-chip); }
.fd-notif-row .fd-avatar { width: 32px; height: 32px; }
.fd-notif-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fd-notif-txt em { font: 400 11.5px/1 var(--so-xp); font-style: normal; color: var(--so-muted); }
.fd-notif-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.fd-notif .fd-note { padding: 20px 16px; text-align: left; }

/* ── The viewer: one post per screen, on black ──────────────────────────── */
.fd-root.fd-immersive { position: fixed; inset: 0; z-index: 80; display: block; padding: 0; background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
.fd-page.fd-immersive { z-index: 300; }
.fd-immersive .fd-modal { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; border-radius: 0; background: #000; box-shadow: none; }
.fd-immersive .fd-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  --fd-safe-top: env(safe-area-inset-top, 0px);
  padding: calc(12px + var(--fd-safe-top)) 14px 30px; border: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.fd-immersive .fd-head > * { pointer-events: auto; }
.fd-immersive .fd-tabs, .fd-immersive .fd-sortwrap, .fd-immersive .fd-search, .fd-immersive .fd-post,
.fd-immersive .fd-bell, .fd-immersive .fd-title { display: none; }
.fd-immersive .fd-head .fd-back { border-color: rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.35); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* Luna's close button, in cherry: the one wink at the old window frame. */
.fd-immersive .fd-head .fd-close {
  display: inline-flex; margin-left: auto;
  width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid rgba(110, 10, 40, 0.9);
  background: linear-gradient(180deg, #ff7a8c 0%, #f0334f 42%, #b0123f 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 4px rgba(90, 6, 30, 0.45), 0 4px 12px rgba(0, 0, 0, 0.4);
}
.fd-immersive .fd-head .fd-close:hover { filter: brightness(1.08); background: linear-gradient(180deg, #ff8a9a 0%, #f4445e 42%, #b81645 100%); }
.fd-immersive .fd-head .fd-close svg { width: 15px; height: 15px; filter: drop-shadow(0 1px 1px rgba(80, 6, 30, 0.6)); }
.fd-immersive .fd-body { flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; background: #000; }

.fd-reel { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.fd-reel::-webkit-scrollbar { display: none; }
.fd-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden; }
.fd-stage { position: absolute; inset: 0; }
.fd-stage > img.fd-back {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: blur(40px) saturate(1.3) brightness(0.42); transform: scale(1.15);
}
.fd-fore, .fd-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fd-vid { z-index: 1; }
.fd-slide.fd-is-car .fd-car { background: transparent; }

.fd-over {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; gap: 9px;
  padding: 28px 92px 28px 18px; color: #fff; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.32) 40%, rgba(0, 0, 0, 0.72));
}
.fd-byline { display: flex; align-items: center; gap: 9px; pointer-events: auto; }
.fd-byline .fd-avatar { width: 32px; height: 32px; border-color: rgba(255, 255, 255, 0.5); }
.fd-over .fd-who { font: 650 14px/1.2 var(--so-font); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.fd-byline .fd-follow, .fd-over .fd-follow { height: 28px; padding: 0 12px; font-size: 12px; border-color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.92); color: #111; }
.fd-byline .fd-follow.on { background: rgba(0, 0, 0, 0.25); color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.fd-cap { margin: 0; max-width: 52ch; font: 400 14px/1.45 var(--so-font); color: rgba(255, 255, 255, 0.94); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* "Use this camera" — the hero: using someone's look is what the app is for. */
.fd-use {
  pointer-events: auto; align-self: flex-start; max-width: 100%;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 6px 18px 6px 7px; border: 0; border-radius: 999px;
  background: var(--so-cta); color: #fff; text-align: left; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 22px rgba(190, 20, 60, 0.45);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}
.fd-use:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px rgba(190, 20, 60, 0.55); }
.fd-use:active:not(:disabled) { transform: scale(0.97); }
.fd-use:disabled { opacity: 0.7; cursor: default; }
.fd-use-ico { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.fd-use-ico svg { width: 20px; height: 20px; }
.fd-use-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.1; }
.fd-use-l { font: 700 13px/1.1 var(--so-font); white-space: nowrap; }
.fd-use-name { font: 500 11px/1.1 var(--so-font); color: rgba(255, 255, 255, 0.86); max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-use-name:empty { display: none; }
.fd-remix { margin-top: 2px; font: 500 12px/1.3 var(--so-font); color: rgba(255, 255, 255, 0.8); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); pointer-events: auto; }
.fd-remix b { font-weight: 700; color: #fff; }
.fd-remix i { font-style: normal; }

/* The rail: like, comments, keep, share, more — one column of equal keys. */
.fd-rail { position: absolute; right: 12px; bottom: 28px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fd-rail > button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 48px; min-height: 48px; padding: 5px 0; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; cursor: pointer; font: 700 11px/1 var(--so-font); font-variant-numeric: tabular-nums;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}
.fd-rail > button:hover { transform: translateY(-1px); background: rgba(0, 0, 0, 0.45); border-color: rgba(255, 255, 255, 0.4); }
.fd-rail > button:active { transform: scale(0.94); }
.fd-like-ico { font-size: 17px; line-height: 1; transition: color 0.16s ease; }
.fd-rail .fd-like.on { border-color: rgba(255, 107, 134, 0.8); background: rgba(255, 79, 122, 0.22); }
.fd-rail .fd-like.on .fd-like-ico { color: #ff4f7a; animation: fd-pop 0.28s ease; }
@keyframes fd-pop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
.fd-like-n { font: 700 11px/1 var(--so-font); }
.fd-cmt-ico { font-size: 15px; line-height: 1; }
.fd-fav-ico { font-size: 17px; line-height: 1; opacity: 0.6; }
.fd-rail .fd-fav.on { border-color: #ffc857; background: rgba(255, 200, 87, 0.18); }
.fd-rail .fd-fav.on .fd-fav-ico { opacity: 1; color: #ffc857; }
.fd-share-ico { display: inline-flex; font-size: 18px; line-height: 1; }
.fd-share-ico svg { width: 19px; height: 19px; }
.fd-count { font: 500 10.5px/1 var(--so-font); color: rgba(255, 255, 255, 0.82); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); font-variant-numeric: tabular-nums; }
.fd-count b { color: #fff; font-weight: 700; }

/* Borrowed music: a chip on the picture. */
.fd-music-chip {
  position: absolute; left: 14px; bottom: 112px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px; max-width: min(70%, 300px);
  padding: 7px 13px 7px 10px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font: 600 12px/1 var(--so-font); cursor: pointer;
}
.fd-music-chip-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-music-chip-ico { flex: 0 0 auto; font-size: 12px; opacity: 0.85; }
.fd-music-chip.playing .fd-music-chip-ico { animation: fd-spin 2.6s linear infinite; }
@keyframes fd-spin { to { transform: rotate(360deg); } }
.fd-slide.fd-has-music audio { display: none; }

/* ── The side: a column on a desktop, a sheet on a phone ───────────────── */
.fd-side { color: var(--so-text); background: var(--so-ground); font: 400 13px/1.45 var(--so-font); }
.fd-side-grab, .fd-side-peek { display: none; }
.fd-side-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.fd-side-by { display: flex; align-items: center; gap: 10px; }
.fd-side-by .fd-avatar { width: 36px; height: 36px; }
.fd-side-who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fd-side-who strong { font: 700 14px/1.2 var(--so-font); color: var(--so-text); }
.fd-side-when { font: 400 11.5px/1 var(--so-xp); color: var(--so-muted); }
.fd-side-cap { margin: 0; font: 400 14px/1.5 var(--so-font); overflow-wrap: anywhere; }
.fd-side-cap-empty { display: none; }
.fd-side-cam { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--so-line); border-radius: 16px; background: var(--so-surface); }
.fd-side-cam[hidden] { display: none; }
.fd-side-cam-row { display: flex; align-items: center; gap: 10px; }
.fd-side-cam-art { width: 44px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; }
.fd-side-cam-art canvas { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3)); }
.fd-side-cam-meta { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.fd-side-cam-meta strong { font: 700 13px/1.2 var(--so-font); color: var(--so-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-side-cam-meta span { font: 500 11.5px/1.3 var(--so-font); color: var(--so-muted); }
.fd-side .fd-use-side { min-height: 38px; padding: 4px 14px 4px 5px; gap: 7px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px var(--so-cta-glow); }
.fd-side .fd-use-side .fd-use-ico { width: 28px; height: 28px; }
.fd-side .fd-use-side .fd-use-ico svg { width: 17px; height: 17px; }
.fd-side .fd-use-side .fd-use-l { font-size: 12px; }
.fd-remix-side { color: var(--so-muted); text-shadow: none; }
.fd-remix-side b { color: var(--so-text); }
.fd-side-also { display: flex; flex-direction: column; gap: 6px; }
.fd-side-also[hidden] { display: none; }
.fd-side-also-l, .fd-side-cmts-l { font: 800 10.5px/1.2 var(--so-font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--so-muted); }
.fd-side-also-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.fd-side-also-tile { width: 56px; height: 44px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--so-tile); }
.fd-side-also-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-side-also-more { font: 600 11.5px/1 var(--so-font); color: var(--so-muted); padding: 0 4px; }
.fd-side-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.fd-side-act {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--so-line-2); background: transparent; color: var(--so-text);
  font: 650 12.5px/1 var(--so-font);
}
.fd-side-act:hover { background: var(--so-chip); }
.fd-side-act svg { width: 14px; height: 14px; }
.fd-side-act.on { background: var(--so-text); color: var(--so-ground); border-color: var(--so-text); }
.fd-side-act[hidden] { display: none; }
.fd-side-cmts { display: flex; flex-direction: column; gap: 10px; }
.fd-side .fd-cmt-list { display: flex; flex-direction: column; gap: 12px; }
.fd-side .fd-note { padding: 4px 0; text-align: left; font-size: 13px; }
.fd-side-edit { align-self: flex-start; border: 0; background: none; padding: 0; font: 650 12.5px/1 var(--so-font); color: var(--so-sel); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fd-side-edit[hidden] { display: none; }
.fd-side-editbox { display: flex; flex-direction: column; gap: 8px; }
.fd-side-editbox textarea { resize: vertical; min-height: 72px; padding: 10px 12px; border-radius: 12px; }
.fd-side-editbtns { display: flex; gap: 6px; }

@media (min-width: 900px) {
  .fd-immersive .fd-slide:not(.fd-is-track) .fd-stage { right: 380px; }
  .fd-immersive .fd-slide .fd-side { position: absolute; top: 0; right: 0; bottom: 0; width: 380px; overflow-y: auto; border-left: 1px solid var(--so-line); }
  .fd-immersive .fd-slide .fd-side-body { padding-top: 64px; }
  .fd-immersive .fd-slide:not(.fd-is-track) .fd-over,
  .fd-immersive .fd-slide:not(.fd-is-track) .fd-rail { display: none; }
  .fd-immersive .fd-slide .fd-music-chip { bottom: 22px; }
  .fd-immersive .fd-head { right: 380px; }
}
@media (max-width: 899px) {
  .fd-side {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; max-height: 44px; overflow: hidden;
    border-top: 1px solid var(--so-line); border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.35); transition: max-height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .fd-side-open .fd-side { max-height: 78%; overflow-y: auto; }
  .fd-side-grab { display: block; width: 100%; height: 20px; border: 0; background: none; padding: 0; cursor: pointer; touch-action: none; }
  .fd-side-grab span { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--so-line-2); margin: 8px auto 0; }
  .fd-side-peek { display: block; text-align: center; font: 500 11.5px/1 var(--so-font); color: var(--so-muted); padding: 2px 10px 10px; }
  .fd-side-open .fd-side-peek { display: none; }
  .fd-side .fd-side-by, .fd-side .fd-side-cap, .fd-side .fd-side-acts { display: none; }
  .fd-over { padding-bottom: 64px; }
  .fd-rail { bottom: 64px; }
  .fd-music-chip { bottom: 150px; }
}

/* ── Comments ───────────────────────────────────────────────────────────── */
.fd-cmt-row { display: flex; align-items: flex-start; gap: 9px; }
.fd-cmt-row .fd-avatar { width: 28px; height: 28px; }
.fd-cmt-body { flex: 1; min-width: 0; font: 400 13.5px/1.45 var(--so-font); overflow-wrap: anywhere; }
.fd-cmt-body b { font-weight: 650; }
.fd-cmt-body em { margin-left: 6px; font: 400 11px/1 var(--so-xp); font-style: normal; color: var(--so-muted); }
.fd-cmt-del, .fd-cmt-more { flex: none; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 0; background: none; color: var(--so-muted); cursor: pointer; font: 700 12px/1 var(--so-font); }
.fd-cmt-del:hover, .fd-cmt-more:hover { background: var(--so-chip); color: var(--so-text); }
.fd-cmt-del[hidden], .fd-cmt-more[hidden] { display: none; }
.fd-cmt-form { display: flex; gap: 8px; }
.fd-cmt-form[hidden] { display: none; }
.fd-cmt-in {
  flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--so-line-2); background: var(--so-chip); color: var(--so-text);
  font: 400 14px/1.3 var(--so-font);
}
textarea.fd-cmt-in { border-radius: 14px; padding: 10px 14px; }
.fd-cmt-in::placeholder { color: var(--so-faint); }
.fd-cmt-in:focus { outline: none; border-color: rgba(var(--so-sel-rgb), 0.7); }
.fd-cmt-send { flex: 0 0 auto; min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--so-cta); color: #fff; font: 700 13px/1 var(--so-font); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px var(--so-cta-glow); }
.fd-cmt-send:disabled { opacity: 0.55; cursor: default; }
.fd-cmt-signin { min-height: 42px; border-radius: 999px; border: 1px solid var(--so-line-2); background: transparent; color: var(--so-text); font: 650 13px/1 var(--so-font); cursor: pointer; }
.fd-cmt-signin[hidden] { display: none; }

/* The sheet raised over a post: comments on old builds, and the music library. */
.fd-cmt { position: absolute; inset: 0; z-index: 12; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.fd-cmt-card {
  display: flex; flex-direction: column; width: min(540px, 100%); max-height: min(76%, 600px);
  background: var(--so-raise); color: var(--so-text);
  border: 1px solid var(--so-line-2); border-bottom: 0; border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.45); overflow: hidden;
}
.fd-cmt-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--so-line); }
.fd-cmt-title { margin: 0; font: 800 11px/1 var(--so-font); letter-spacing: 0.14em; text-transform: uppercase; }
.fd-cmt-x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--so-line-2); background: transparent; color: inherit; cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.fd-cmt-x svg { width: 14px; height: 14px; }
.fd-cmt-list { flex: 1 1 auto; min-height: 90px; overflow-y: auto; overscroll-behavior: contain; padding: 10px 16px; display: flex; flex-direction: column; gap: 12px; }
.fd-cmt-card .fd-cmt-form { padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--so-line); }
.fd-music-tools { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--so-line); }
.fd-music-q { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--so-line-2); background: var(--so-chip); color: var(--so-text); font: 400 14px/1 var(--so-font); }
.fd-music-q::placeholder { color: var(--so-faint); }
.fd-music-sorts { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--so-chip); flex: 0 0 auto; }
.fd-music-sort { padding: 7px 12px; border-radius: 999px; border: 0; background: transparent; color: var(--so-muted); font: 650 11.5px/1 var(--so-font); cursor: pointer; }
.fd-music-sort.on { background: var(--so-text); color: var(--so-ground); }
.fd-music-list { gap: 2px; }
.fd-music-clear { margin: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px)); min-height: 42px; border-radius: 999px; border: 1px solid rgba(226, 85, 95, 0.5); background: rgba(226, 85, 95, 0.1); color: #e2555f; font: 650 13px/1 var(--so-font); cursor: pointer; }
.fd-music-clear[hidden] { display: none; }
@media (max-width: 560px) { .fd-music-tools { flex-wrap: wrap; } .fd-music-q { flex: 1 1 100%; } }

/* ── The composer ───────────────────────────────────────────────────────── */
.fd-compose { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.fd-compose > .fd-music { z-index: 4; position: fixed; }
.fd-compose-card {
  width: min(440px, 100%); max-height: 90vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; padding: 20px;
  background: var(--so-raise); color: var(--so-text);
  border: 1px solid var(--so-line-2); border-radius: 22px; box-shadow: var(--so-shadow);
}
.fd-compose-title { margin: 0; font: 800 11px/1.3 var(--so-font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--so-text); }
.fd-compose-prev { border-radius: 14px; overflow: hidden; background: #000; max-height: 340px; }
.fd-compose-prev img, .fd-compose-prev video { display: block; width: 100%; height: auto; max-height: 340px; object-fit: contain; }
.fd-compose-prev.fd-prev-track { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; max-height: none; }
.fd-compose-prev.fd-prev-track .fd-prev-art { width: 150px; height: 150px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.fd-compose-prev.fd-prev-track audio { display: block; width: 100%; height: 40px; flex: 0 0 auto; }
.fd-field { display: flex; flex-direction: column; gap: 6px; }
.fd-field[hidden] { display: none; }
.fd-field > span { font: 800 10.5px/1 var(--so-font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--so-muted); }
.fd-field em { font-style: normal; opacity: 0.7; text-transform: none; letter-spacing: 0; font-weight: 500; }
.fd-caption, .fd-title-in {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--so-line-2); background: var(--so-chip); color: var(--so-text);
  font: 400 14px/1.45 var(--so-font); resize: vertical;
}
.fd-caption::placeholder, .fd-title-in::placeholder { color: var(--so-faint); }
.fd-caption:focus, .fd-title-in:focus { outline: none; border-color: rgba(var(--so-sel-rgb), 0.7); }
.fd-stack { margin: 0; font: 500 12px/1.4 var(--so-font); color: var(--so-muted); }
.fd-consent { display: flex; gap: 10px; align-items: flex-start; font: 500 12.5px/1.45 var(--so-font); color: var(--so-text); cursor: pointer; }
.fd-consent-box { margin-top: 2px; flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--so-sel); }
.fd-compose-card .fd-note { padding: 0; text-align: left; font-size: 12px; }
.fd-compose-card .fd-post { height: 46px; font-size: 14px; }
.fd-cancel { height: 40px; border: 0; background: none; color: var(--so-muted); font: 600 13px/1 var(--so-font); cursor: pointer; border-radius: 999px; }
.fd-cancel:hover { color: var(--so-text); background: var(--so-chip); }
.fd-music-pick { display: flex; align-items: center; gap: 10px; }
.fd-music-pick[hidden] { display: none; }
.fd-music-pick-label { font: 800 10.5px/1 var(--so-font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--so-muted); flex: 0 0 auto; }
.fd-music-pick-btn, .fd-cover-pick {
  flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px dashed var(--so-line-2); background: var(--so-chip); color: var(--so-text);
  font: 600 12.5px/1.2 var(--so-font); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fd-cover-pick { flex: 0 0 auto; }
.fd-music-pick-btn.on { border-style: solid; border-color: rgba(var(--so-sel-rgb), 0.7); background: rgba(var(--so-sel-rgb), 0.08); }

/* ── Tracks: the player ─────────────────────────────────────────────────── */
.fd-track { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 20px 132px; text-align: center; color: #fff; }
.fd-track-art { width: min(52vh, 300px, 74vw); aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); background: #111; }
.fd-track-title { margin: 0; font: 700 clamp(15px, 4.4vw, 20px)/1.25 var(--so-font); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); overflow-wrap: anywhere; }
.fd-track-by { margin: 4px 0 0; font: 500 12px/1 var(--so-font); color: rgba(255, 255, 255, 0.7); }
.fd-track-deck { display: flex; align-items: center; gap: 12px; width: min(560px, 90vw); }
.fd-track-play { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--so-cta); color: #fff; font-size: 15px; cursor: pointer; }
.fd-wave { flex: 1 1 auto; min-width: 0; height: 62px; cursor: pointer; touch-action: none; }
.fd-track-time { display: flex; justify-content: space-between; width: min(560px, 90vw); margin: -6px 0 0; font: 400 11px/1 var(--so-xp); color: rgba(255, 255, 255, 0.6); }
.fd-track audio { display: none; }
.fd-slide.fd-is-track .fd-stage > img.fd-back { filter: blur(46px) saturate(1.5) brightness(0.4); }

/* ── Report or block ────────────────────────────────────────────────────── */
.fd-report-ov { position: fixed; inset: 0; z-index: 2147483100; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: rgba(0, 0, 0, 0.45); }
.fd-report { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 22px; background: var(--so-raise); border: 1px solid var(--so-line-2); box-shadow: var(--so-shadow); }
.fd-report button { height: 48px; border-radius: 14px; border: 0; background: var(--so-chip); color: var(--so-text); font: 600 15px/1 var(--so-font); cursor: pointer; }
.fd-report button[data-a="report"], .fd-report button[data-a="block"] { color: #e2384f; }
.fd-report button[data-a="x"] { background: none; color: var(--so-muted); }

@media (prefers-reduced-motion: reduce) {
  .fd-tile img, .fd-use, .fd-post, .fd-rail > button, .fd-side, .fd-act, .fd-follow { transition: none; }
  .fd-rail .fd-like.on .fd-like-ico, .fd-act.fd-like.on svg, .fd-music-chip.playing .fd-music-chip-ico { animation: none; }
  .fd-reel, .fd-car-track { scroll-behavior: auto; }
}

/* The save toast's share-only form (was in feed.css). */
.save-toast.share-only { gap: 8px; }
.save-toast-share { color: inherit; }

/* In the viewer the top corners belong to back and close: the count goes low. */
.fd-car-stage .fd-car-n { top: auto; bottom: 14px; right: 14px; }
@media (max-width: 899px) { .fd-car-stage .fd-car-n { bottom: 120px; } .fd-car-stage .fd-car-dots { bottom: 116px; } }
