/* ============================================================
   Astra Origins — Feed page · feed-only styles
   Mirrors newdesign_reference/css/feed.css plus supplementary
   classes for skeletons, link preview, tagged users, modals.
   ============================================================ */

.f-feed { display: flex; flex-direction: column; gap: 0; }

.f-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  margin-top: 16px;
}
.f-col-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#f-posts-container { display: flex; flex-direction: column; gap: 12px; }

/* ── Tabs ─────────────────────────────────────────────── */
.f-tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-wrap: wrap;
}
.f-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.f-tab:hover { background: var(--surface-2); }
.f-tab.is-on { background: var(--ink); color: white; }
.f-tab.is-on .ct { color: oklch(0.75 0.005 240); }
.f-tab .ct {
  font-size: 9px; color: var(--ink-3);
  letter-spacing: 0.04em;
}
.f-tabs-r {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--ink-3); letter-spacing: 0.1em;
  padding-right: 8px;
}

/* ── Composer ─────────────────────────────────────────── */
.f-composer {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.f-composer-row { display: flex; gap: 8px; align-items: center; }
.f-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: white;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  overflow: hidden;
}
.f-avatar-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-composer-input {
  flex: 1; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 12px; outline: none;
}
.f-composer-input::placeholder { color: var(--ink-3); }
.f-composer-input:focus {
  background: var(--surface); border-color: var(--accent-line);
}
.f-composer-actions {
  display: flex; gap: 4px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.f-composer-actions button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600; color: var(--ink-2);
}
.f-composer-actions button:hover { background: var(--surface-2); color: var(--ink); }
.f-composer-cta {
  margin-left: auto;
  background: var(--accent) !important;
  color: white !important;
  padding: 6px 16px !important;
}

/* ── Post card ────────────────────────────────────────── */
.f-post {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px;
}
.f-post-head {
  display: grid; grid-template-columns: 40px 1fr auto;
  gap: 10px; align-items: center;
  margin-bottom: 8px;
}
.f-avatar-md {
  width: 40px; height: 40px; border-radius: 50%;
  color: white;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: linear-gradient(135deg, oklch(0.4 0.14 250), oklch(0.25 0.06 250));
  box-shadow: inset -3px -4px 10px oklch(0 0 0 / 0.25);
  overflow: hidden;
}
.f-avatar-md img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-post-line1 {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.f-post-share-quote .f-post-line1 {
   margin-left:5px;
}
.f-post-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.f-post-name a { color: inherit; text-decoration: none; }
.f-post-name a:hover { color: var(--accent); }
.f-badge {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px; border-radius: 50%;
  color: white; font-size: 8px; font-weight: 800;
}
.f-badge .bi { font-size: 8px; line-height: 1; }
.f-post-handle { font-size: 11px; color: var(--ink-3); }
.f-post-dot { color: var(--ink-3); }
.f-post-time { font-size: 10px; color: var(--ink-3); }
.f-post-line2 { display: flex; gap: 5px; margin-top: 3px; }
.f-tag { font-size: 10px; color: var(--accent); font-weight: 600; }
.f-post-more {
  font-size: 14px; color: var(--ink-3);
  padding: 4px 8px; border-radius: 5px;
}
.f-post-more:hover { background: var(--surface-2); }

/* Owner menu (Edit/Delete) */
.f-post-more-wrap { position: relative; }
.f-post-more-menu {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 4px;
  list-style: none;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px oklch(0.18 0.02 250 / 0.18);
  width: 180px;
  z-index: 5;
}
.f-post-more-menu[hidden] { display: none; }
.f-post-more-menu li { margin: 0; }
.f-post-more-menu button {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px; align-items: center;
  width: 100%; padding: 7px 10px;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}
.f-post-more-menu button:hover { background: var(--surface-2); }
.f-post-more-menu button[data-action="delete-post"] { color: oklch(0.5 0.2 25); }
.f-post-more-menu button[data-action="delete-post"]:hover {
  background: oklch(0.95 0.06 25 / 0.5);
}
.f-post-more-menu button .bi { font-size: 13px; }

.f-post-body {
  font-size: 13px; line-height: 1.55;
  color: var(--ink);
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
.f-post-body .tagged-user {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  padding: 0 2px;
  border-radius: 3px;
  transition: background 200ms ease;
}
.f-post-body .tagged-user:hover {
  background: var(--accent-soft);
}
.f-post-body a:not(.tagged-user) {
  color: var(--accent);
  text-decoration: none;
}
.f-post-body a:not(.tagged-user):hover { text-decoration: underline; }

/* Read more / less toggle */
.f-post-body .f-ellipsis {
  color: var(--ink-3);
  margin-right: 2px;
}
.f-post-body .f-readmore {
  display: inline;
  padding: 0;
  margin-left: 4px;
  background: transparent;
  border: 0;
  font: inherit;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  transition: opacity 200ms ease;
}
.f-post-body .f-readmore:hover { text-decoration: underline; }
.f-post-body .f-readmore:focus-visible {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
  border-radius: 2px;
}

.f-post-media { margin-bottom: 10px; }
/* Show the FULL image — no cropping. Smaller images sit centered on a
   subtle light-grey letterbox. Tall images cap at ~70vh so they never
   dominate the feed. */
.f-media-img {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: min(540px, 70vh);
  min-height: 120px;
}
.f-media-img img,
.f-media-img video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(540px, 70vh);
  object-fit: contain;
  margin: 0 auto;
}
.f-media-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, white 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 28% 60%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 35%, white 50%, transparent 51%),
    radial-gradient(1px 1px at 75% 75%, white 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 30%, white 50%, transparent 51%);
  opacity: 0.85;
}
.f-media-neb {
  position: absolute; inset: 0;
  mix-blend-mode: screen;
}
.f-media-label {
  position: absolute; bottom: 8px; left: 10px;
  padding: 3px 7px; border-radius: 4px;
  background: oklch(0 0 0 / 0.5); color: white;
  backdrop-filter: blur(4px);
  font-size: 9px; letter-spacing: 0.1em;
}

/* ── Quoted share post (the original post wrapped by a new share) ── */
.f-post-share-quote {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.f-share-head {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}
.f-avatar-xs {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.4 0.14 250), oklch(0.25 0.06 250));
  color: white;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}
.f-avatar-xs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-share-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
  min-width: 0;
}
.f-share-name { font-weight: 700; color: var(--ink); }
.f-share-name a { color: inherit; text-decoration: none; }
.f-share-name a:hover { color: var(--accent); }
.f-share-handle { font-size: 10px; color: var(--ink-3); }
.f-share-dot { color: var(--ink-3); }
.f-share-time { font-size: 10px; color: var(--ink-3); }

.f-share-body {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 8px;
}
.f-share-media {
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 360px;
}
.f-share-media img,
.f-share-media video {
  display: block;
  width: auto; height: auto;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  margin: 0 auto;
}

/* Composer share preview — same look, slightly more padding */
.f-composer-share-preview { margin-top: 4px; }
.f-composer-share-preview[hidden] { display: none; }
.f-composer-share-preview .f-post-share-quote { margin: 0; }

/* Link preview (Microlink result) */
.f-link-preview {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  margin-bottom: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms ease;
}
.f-link-preview:hover { border-color: var(--accent-line); }
.f-link-preview img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  min-height: 78px;
}
.f-link-preview .lp-body { padding: 8px 10px 8px 0; min-width: 0; }
.f-link-preview .lp-title {
  font-size: 12px; font-weight: 700; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.f-link-preview .lp-desc {
  font-size: 10px; color: var(--ink-3); margin-top: 3px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.f-link-preview .lp-host {
  font-size: 9px; font-weight: 800; color: var(--accent);
  letter-spacing: 0.08em; margin-top: 4px; text-transform: uppercase;
}

.f-post-foot {
  display: grid; grid-template-columns: auto 1fr;
  align-items: center; gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.f-post-stats {
  display: flex; gap: 10px; align-items: center;
  font-size: 10px; color: var(--ink-3);
}
.f-post-stats span { display: inline-flex; align-items: center; gap: 4px; }
.f-post-actions { display: flex; gap: 2px; justify-self: end; }
.f-post-actions button {
  padding: 5px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 4px;
}
.f-post-actions button:hover { background: var(--surface-2); color: var(--ink); }
.f-post-actions button.is-active { color: var(--accent); }
.f-post-actions button.is-active .bi {
  filter: drop-shadow(0 0 3px color-mix(in oklch, var(--accent) 60%, transparent));
}
/* Subtle in-flight cue while the AJAX request is pending */
.f-post-actions button.is-pending .bi {
  animation: f-pending-pulse 700ms ease-in-out infinite alternate;
}
@keyframes f-pending-pulse {
  from { transform: scale(1);    opacity: 0.75; }
  to   { transform: scale(1.18); opacity: 1; }
}

.f-load-more {
  text-align: center; padding: 14px;
  font-size: 11px; color: var(--accent); font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  border: 1px dashed var(--accent-line);
  border-radius: 8px;
  background: var(--accent-soft);
}
.f-load-more:hover { background: oklch(from var(--accent) l c h / 0.15); }
.f-load-more.is-hidden { display: none; }

.f-end-marker {
  text-align: center; padding: 18px 14px;
  font-size: 10px; color: var(--ink-3);
  letter-spacing: 0.14em;
}

/* ── Skeleton placeholders (light theme shimmer) ──────── */
.f-post-skel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.f-skel-line, .f-skel-av, .f-skel-block {
  background:
    linear-gradient(90deg,
      oklch(0.92 0.005 250) 0%,
      oklch(0.97 0.004 240) 50%,
      oklch(0.92 0.005 250) 100%);
  background-size: 200% 100%;
  animation: f-skel-shimmer 1.3s linear infinite;
  display: block;
}
.f-skel-line {
  height: 10px;
  border-radius: 4px;
}
.f-skel-line + .f-skel-line { margin-top: 8px; }
.f-skel-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.f-skel-av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.f-skel-stack { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.f-skel-block { height: 140px; border-radius: 8px; margin-top: 10px; }
.f-skel-line.w-30 { width: 30%; }
.f-skel-line.w-50 { width: 50%; }
.f-skel-line.w-70 { width: 70%; }
.f-skel-line.w-90 { width: 90%; }

@keyframes f-skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Right rail widgets ───────────────────────────────── */
.f-rail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.f-widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.f-widget-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.f-widget-head > span:first-child,
.f-widget-head > a:first-child {
  font-size: 12px; font-weight: 800; letter-spacing: -0.005em;
  color: var(--ink);
}
.f-widget-head .dim {
  font-size: 8px; color: var(--ink-3);
  letter-spacing: 0.14em; font-weight: 800;
}

.f-trends { list-style: none; padding: 0; margin: 0; }
.f-trends li {
  display: grid; grid-template-columns: 18px 1fr auto;
  align-items: center; gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.f-trends li:last-child { border-bottom: none; }
.f-trends .rk { font-size: 9px; color: var(--ink-3); font-weight: 800; }
.f-trends .tg { font-size: 12px; font-weight: 700; color: var(--accent); }
.f-trends .ct { font-size: 9px; color: var(--ink-3); letter-spacing: 0.04em; }

.f-comms { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.f-comms li {
  display: grid; grid-template-columns: 30px 1fr auto;
  gap: 8px; align-items: center;
}
.f-comm-av {
  width: 30px; height: 30px; border-radius: 6px;
  display: grid; place-items: center;
  color: white; font-size: 10px; font-weight: 800;
}
.f-comm-name { font-size: 11px; font-weight: 700; color: var(--ink); }
.f-comm-sub { font-size: 8px; color: var(--ink-3); margin-top: 2px; letter-spacing: 0.08em; }
.f-comm-btn {
  padding: 4px 10px; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 9px; font-weight: 800; color: var(--ink);
  letter-spacing: 0.1em;
}
.f-comm-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }

.f-events { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.f-event {
  display: grid; grid-template-columns: 36px 1fr;
  gap: 10px; align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.f-event:last-child { border-bottom: none; }
.f-event-date {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 5px; padding: 4px; text-align: center;
}
.f-event-d { font-size: 14px; font-weight: 800; line-height: 1; color: var(--ink); }
.f-event-m { font-size: 8px; color: var(--ink-3); letter-spacing: 0.1em; margin-top: 1px; }
.f-event-name { font-size: 11px; font-weight: 700; color: var(--ink); }
.f-event-sub { font-size: 8px; color: var(--ink-3); margin-top: 2px; letter-spacing: 0.06em; }

/* ── Feed-only AD variant ─────────────────────────────── */
.t-ad-feed { margin: 0; }

/* ── Active dock icon ─────────────────────────────────── */
.t-dk.is-on {
  background: var(--accent) !important;
  color: white !important;
}

/* ── Comments modal (light theme) ─────────────────────── */
.f-comments-modal {
  position: fixed; inset: 0;
  background: oklch(0.18 0.012 250 / 0.55);
  backdrop-filter: blur(6px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.f-comments-modal.is-open { display: flex; }
.f-comments-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 540px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 60px oklch(0.18 0.02 250 / 0.25);
}
.f-comments-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.f-comments-head h3 { font-size: 12px; font-weight: 800; margin: 0; color: var(--ink); letter-spacing: 0.06em; }
.f-comments-close {
  color: var(--ink-3);
  width: 28px; height: 28px;
  border-radius: 4px;
  display: grid; place-items: center;
  font-size: 18px;
}
.f-comments-close:hover { color: var(--ink); background: var(--surface-2); }
.f-comments-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.f-comments-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
/* Form lays out at the bottom edge so the emoji + POST buttons stay
   aligned with the bottom of the textarea as it grows. */
.f-comment-form { display: flex; gap: 8px; align-items: flex-end; }
.f-comment-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  outline: none;
  resize: none;
  min-height: 36px;
  max-height: 120px;
  overflow-y: auto;
  word-wrap: break-word;
}
.f-comment-input::placeholder { color: var(--ink-3); }
.f-comment-input:focus,
.f-comment-input:focus-visible { background: var(--surface); outline: none; box-shadow: none; }
.f-comment-submit {
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em;
}
.f-comment-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* Emoji button inside the comment form + floating panel above it */
.f-comments-foot,
.f-modal-compose { position: relative; }
.f-comment-emoji-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent);
  background: transparent;
  font-size: 16px;
  flex-shrink: 0;
  border: 0;
}
.f-comment-emoji-btn:hover { background: var(--accent-soft); }

.f-comment-emoji-panel {
  position: absolute;
  bottom: 100%;
  left: 12px;
  right: 12px;
  margin-bottom: 8px;
  z-index: 8;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 -8px 28px oklch(0.18 0.02 250 / 0.18);
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 260px;
}
.f-comment-emoji-panel[hidden] { display: none; }

.f-comment {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 8px 0;
}
.f-comment + .f-comment { border-top: 1px solid var(--line); }
.f-comment-main { min-width: 0; }
.f-comment-meta {
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.f-comment-delete {
  margin-left: auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-3);
  background: transparent;
  border: 0;
  font-size: 11px;
  transition: color 160ms ease, background 160ms ease;
}
.f-comment-delete:hover {
  color: oklch(0.5 0.2 25);
  background: oklch(0.95 0.06 25 / 0.5);
}
.f-comment-author {
  font-weight: 800; color: var(--ink);
  text-decoration: none;
}
.f-comment-author:hover { color: var(--accent); }
.f-comment-time { font-size: 9px; color: var(--ink-3); margin-left: 5px; letter-spacing: 0.04em; }
.f-comment-body { font-size: 12px; line-height: 1.5; color: var(--ink); margin-top: 2px; }
.f-comments-empty { padding: 30px 10px; text-align: center; color: var(--ink-3); font-size: 11px; letter-spacing: 0.06em; }

/* ── Post media modal (cinematic detail view) ─────────── */
.f-post-modal {
  position: fixed; inset: 0;
  background: oklch(0.05 0.01 250 / 0.86);
  backdrop-filter: blur(10px);
  z-index: 1055;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  animation: f-modal-fade 200ms ease-out;
}
.f-post-modal.is-open { display: flex; }
.f-post-modal-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: oklch(0.18 0.02 250 / 0.6);
  color: white;
  display: grid; place-items: center;
  font-size: 16px;
  z-index: 2;
  transition: background 200ms ease, transform 200ms ease;
}
.f-post-modal-close:hover { background: oklch(0.28 0.04 250 / 0.85); transform: rotate(90deg); }

/* Two-column grid: media on the left, side panel on the right.
   Media column flexes; side panel is fixed 380px. */
.f-post--modal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  max-width: 1240px;
  height: min(880px, calc(100vh - 72px));
  box-shadow:
    0 30px 70px oklch(0.02 0.01 250 / 0.6),
    0 0 0 1px oklch(0.3 0.05 250 / 0.25),
    0 0 80px oklch(0.45 0.18 250 / 0.18);
  padding: 0;
  border: none;
}

/* Text-only posts (e.g. opened from the Inbox) — single column, no media pane. */
.f-post--modal.is-no-media { grid-template-columns: minmax(0, 1fr); max-width: 620px; height: min(760px, calc(100vh - 72px)); }
.f-post--modal.is-no-media .f-post-modal-media { display: none; }
.f-post--modal.is-no-media .f-post-modal-side { border-left: 0; }

.f-post-modal-media {
  background:
    radial-gradient(ellipse at 30% 70%, oklch(0.16 0.05 280 / 0.6), transparent 60%),
    radial-gradient(ellipse at 80% 20%, oklch(0.18 0.06 305 / 0.5), transparent 60%),
    oklch(0.04 0.01 250);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
/* The media wrapper retains the post's stars/neb deco but doesn't crop. */
.f-post-modal-media .f-media-img {
  aspect-ratio: auto;
  width: 100%; height: 100%;
  border-radius: 0;
  background: transparent;
  display: grid;
  place-items: center;
  /* Override feed-card caps — modal takes the full available frame */
  max-height: none;
  min-height: 0;
}
.f-post-modal-media .f-media-img img,
.f-post-modal-media .f-media-img video {
  position: static;
  width: auto; height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  margin: 0;
  box-shadow: 0 8px 28px oklch(0 0 0 / 0.5);
}
.f-post-modal-media .f-media-stars,
.f-post-modal-media .f-media-neb { display: none; }
.f-post-modal-media .f-media-label {
  bottom: 14px; left: 16px;
}

.f-post-modal-side {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  min-height: 0;
}
.f-modal-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.f-post-modal-side .f-post-head {
  padding: 14px 16px 10px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.f-post-modal-side .f-post-body {
  padding: 14px 16px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}
.f-post-modal-side .f-post-foot {
  padding: 10px 16px 14px;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: none;
  background: var(--surface);
}

/* Hide the "More" three-dots and the "Comment" action button in modal —
   comments are inline below, comment caption is redundant. */
.f-post-modal-side .f-post-more,
.f-post-modal-side .f-post-actions button[data-action="comment"] { display: none; }

/* Inline comments inside the post modal */
.f-modal-comments-list {
  padding: 6px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.f-modal-comments-list .f-comment:first-child { padding-top: 12px; }
.f-modal-comments-list .f-comments-empty { padding: 22px 6px; }

.f-modal-compose {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.f-modal-compose .f-comment-form { display: flex; gap: 8px; align-items: center; }
.f-modal-compose-guest {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.f-modal-compose-guest a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 0;
}
.f-modal-compose-guest a:hover { text-decoration: underline; }

/* Comment skeleton placeholder while comments load */
.f-comment-skel {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 10px 0;
}
.f-comment-skel + .f-comment-skel { border-top: 1px solid var(--line); }
.f-comment-skel .av,
.f-comment-skel .ln {
  background: linear-gradient(90deg,
    oklch(0.92 0.005 250) 0%,
    oklch(0.97 0.004 240) 50%,
    oklch(0.92 0.005 250) 100%);
  background-size: 200% 100%;
  animation: f-skel-shimmer 1.3s linear infinite;
  display: block;
}
.f-comment-skel .av { width: 32px; height: 32px; border-radius: 50%; }
.f-comment-skel .body { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.f-comment-skel .ln { height: 9px; border-radius: 3px; }

@media (max-width: 900px) {
  .f-post-modal { padding: 0; }
  .f-post--modal {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 50vh) 1fr;
    height: 100vh;
    max-width: none;
    border-radius: 0;
  }
  .f-post-modal-side { border-left: 0; border-top: 1px solid var(--line); }
  .f-post-modal-close { top: 10px; right: 10px; width: 34px; height: 34px; }
}

@keyframes f-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Lock background scroll while any feed modal is open */
body.f-modal-open { overflow: hidden; }

/* Indicate clickable media */
.f-post .f-media-img { cursor: zoom-in; }
.f-post--modal .f-media-img { cursor: default; }

/* ── Report post modal ───────────────────────────────── */
.f-report-modal {
  position: fixed; inset: 0;
  background: oklch(0.18 0.012 250 / 0.55);
  backdrop-filter: blur(6px);
  z-index: 1078;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.f-report-modal.is-open { display: flex; }
.f-report-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 460px;
  padding: 0;
  box-shadow: 0 30px 60px oklch(0.18 0.02 250 / 0.25);
  overflow: hidden;
}
.f-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.f-report-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.f-report-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--ink-3);
  display: grid; place-items: center;
  font-size: 14px;
  background: transparent;
  border: 0;
}
.f-report-close:hover { color: var(--ink); background: var(--surface-2); }

.f-report-form { padding: 14px 16px 16px; }
.f-report-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 14px;
}

.f-report-options {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.f-report-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.f-report-option:hover { background: var(--surface-2); }
.f-report-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
.f-report-radio {
  width: 18px; height: 18px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  transition: border-color 160ms ease;
}
.f-report-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.f-report-option:has(input:checked) .f-report-radio {
  border-color: var(--accent);
}
.f-report-option:has(input:checked) .f-report-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.f-report-option input:focus-visible + .f-report-radio {
  outline: 2px solid var(--accent-line);
  outline-offset: 2px;
}
.f-report-opt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.f-report-opt-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.f-report-opt-sub {
  font-size: 10px;
  color: var(--ink-3);
  line-height: 1.4;
}

.f-report-result {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.f-report-result[hidden] { display: none; }
.f-report-result.is-success {
  background: oklch(0.95 0.06 145 / 0.55);
  color: oklch(0.4 0.15 145);
  border: 1px solid oklch(0.7 0.12 145 / 0.5);
}
.f-report-result.is-error {
  background: oklch(0.95 0.06 25 / 0.45);
  color: oklch(0.45 0.18 25);
  border: 1px solid oklch(0.7 0.18 25 / 0.4);
}

.f-report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.f-report-cancel,
.f-report-submit {
  padding: 10px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 0;
  cursor: pointer;
}
.f-report-cancel {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.f-report-cancel:hover { background: var(--surface-3); color: var(--ink); }
.f-report-submit {
  background: var(--accent);
  color: white;
}
.f-report-submit:hover:not(:disabled) { filter: brightness(1.08); }
.f-report-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── External link warning modal ─────────────────────── */
.f-extlink-modal {
  position: fixed; inset: 0;
  background: oklch(0.18 0.012 250 / 0.55);
  backdrop-filter: blur(6px);
  z-index: 1080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.f-extlink-modal.is-open { display: flex; }
.f-extlink-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  padding: 26px 22px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 30px 60px oklch(0.18 0.02 250 / 0.25);
}
.f-extlink-close {
  position: absolute; top: 8px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--ink-3);
  display: grid; place-items: center;
  font-size: 14px;
  background: transparent;
}
.f-extlink-close:hover { color: var(--ink); background: var(--surface-2); }

.f-extlink-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: oklch(0.95 0.08 60 / 0.55);
  border: 1px solid oklch(0.78 0.16 60 / 0.55);
  font-size: 26px;
  color: oklch(0.55 0.18 60);
}
.f-extlink-title {
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink);
  margin: 0 0 8px;
}
.f-extlink-desc {
  font-size: 12px; line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 14px;
}
.f-extlink-url {
  display: block;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  color: var(--ink);
  letter-spacing: 0;
  word-break: break-all;
  text-align: left;
  margin-bottom: 16px;
  max-height: 80px;
  overflow-y: auto;
}
.f-extlink-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.f-extlink-cancel,
.f-extlink-go {
  padding: 10px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
}
.f-extlink-cancel {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.f-extlink-cancel:hover { background: var(--surface-3); color: var(--ink); }
.f-extlink-go {
  background: var(--accent);
  color: white;
}
.f-extlink-go:hover { filter: brightness(1.08); }

/* ── Login modal (cosmic CTA — kept on darker palette for emphasis) ── */
.f-login-modal {
  position: fixed; inset: 0;
  background: oklch(0.18 0.012 250 / 0.55);
  backdrop-filter: blur(6px);
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.f-login-modal.is-open { display: flex; }
.f-login-dialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 380px;
  padding: 28px 24px 22px;
  text-align: center;
  position: relative;
  box-shadow: 0 30px 60px oklch(0.18 0.02 250 / 0.25);
}
.f-login-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 24px;
  color: var(--accent);
}
.f-login-title { font-size: 13px; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: 0.06em; }
.f-login-desc { font-size: 12px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; }
.f-login-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.f-login-actions a {
  display: inline-flex; justify-content: center; align-items: center; gap: 5px;
  padding: 10px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
}
.f-login-primary { background: var(--accent); color: white; }
.f-login-primary:hover { filter: brightness(1.08); }
.f-login-secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.f-login-secondary:hover { background: var(--surface-2); color: var(--ink); }
.f-login-close {
  position: absolute; top: 8px; right: 10px;
  color: var(--ink-3);
  width: 28px; height: 28px;
  border-radius: 4px;
  display: grid; place-items: center;
  font-size: 18px;
}
.f-login-close:hover { color: var(--ink); background: var(--surface-2); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .f-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .f-tabs { padding: 3px; }
  .f-tab { padding: 6px 9px; font-size: 11px; }
  .f-post { padding: 10px 12px; }
  .f-post-body { font-size: 12px; }
}

/* ═══════════════ COMPOSER MODAL (create + edit) ═══════════════ */
.f-composer-modal {
  position: fixed; inset: 0;
  background: oklch(0.18 0.012 250 / 0.55);
  backdrop-filter: blur(6px);
  z-index: 1062;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 20px;
  overflow-y: auto;
}
.f-composer-modal.is-open { display: flex; }

.f-composer-dialog {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px oklch(0.18 0.02 250 / 0.25);
  overflow: hidden;
}

.f-composer-head {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.f-composer-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.f-composer-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  color: var(--ink-3);
  display: grid; place-items: center;
  font-size: 14px;
  background: transparent;
}
.f-composer-close:hover { background: var(--surface-2); color: var(--ink); }

.f-composer-submit-top {
  display: none; /* visible only on small screens via media query */
}

.f-composer-body {
  padding: 14px 16px 8px;
  display: flex; flex-direction: column;
  gap: 10px;
  position: relative;
}

.f-composer-user {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
}
.f-composer-user .f-avatar-md { width: 44px; height: 44px; }
.f-composer-user-meta { min-width: 0; }
.f-composer-user-name {
  font-size: 13px; font-weight: 800; color: var(--ink);
  line-height: 1.1;
}

/* Audience selector */
.f-audience { position: relative; display: inline-block; margin-top: 4px; }
.f-audience-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  font-size: 11px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0;
}
.f-audience-trigger:hover { filter: brightness(0.96); }
.f-audience-trigger .bi-chevron-down { font-size: 9px; margin-left: 1px; }
.f-audience-icon { font-size: 11px; }

/* Fixed positioning lets the menu escape the dialog's `overflow: hidden`
   and float above the entire modal stack. JS sets `left`/`top` from the
   trigger's getBoundingClientRect, so the dropdown anchors to the pill
   visually but isn't clipped. */
.f-audience-menu {
  position: fixed;
  list-style: none;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px oklch(0.18 0.02 250 / 0.22);
  width: 260px;
  z-index: 1075;
}
.f-audience-menu[hidden] { display: none; }
.f-audience-menu li { margin: 0; padding: 0; }
.f-audience-menu button {
  display: grid;
  grid-template-columns: 22px 1fr 14px;
  gap: 8px; align-items: center;
  width: 100%; padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}
.f-audience-menu button:hover { background: var(--surface-2); }
.f-audience-menu button .bi:first-child { font-size: 14px; color: var(--accent); }
.f-audience-opt-label { display: block; font-size: 12px; font-weight: 800; color: var(--ink); }
.f-audience-opt-sub { display: block; font-size: 10px; color: var(--ink-3); margin-top: 1px; }
.f-audience-opt-check { color: var(--accent); opacity: 0; font-size: 14px; }
.f-audience-menu button[aria-checked="true"] .f-audience-opt-check { opacity: 1; }
.f-audience-sep {
  height: 1px;
  background: var(--line);
  margin: 6px 6px;
  list-style: none;
}
.f-audience-section {
  padding: 6px 10px 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  list-style: none;
}
.f-audience-menu { max-height: 320px; overflow-y: auto; }

/* Editor (contenteditable) */
.f-composer-editor-wrap { position: relative; }
.f-composer-editor {
  min-height: 90px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
}
.f-composer-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-3);
  pointer-events: none;
}
/* Mention chip — atomic, contenteditable=false */
.f-composer-editor .f-mention {
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
  padding: 0 5px;
  border-radius: 4px;
  user-select: all;
}
/* URL inline highlight */
.f-composer-editor .f-url {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
}

/* Mention suggestion list — fixed positioning so it escapes the modal's
   `overflow: hidden` clipping and floats above everything. */
.f-mention-suggest {
  list-style: none;
  margin: 0; padding: 4px;
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px oklch(0.18 0.02 250 / 0.25);
  z-index: 1070;
  width: 280px;
  max-height: 240px;
  overflow-y: auto;
}
.f-mention-suggest[hidden] { display: none; }
.f-mention-suggest li {
  display: grid; grid-template-columns: 32px 1fr;
  gap: 9px; align-items: center;
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.f-mention-suggest li:hover,
.f-mention-suggest li.is-active { background: var(--surface-2); }
.f-mention-suggest li .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  overflow: hidden;
}
.f-mention-suggest li .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-mention-suggest li .meta { min-width: 0; }
.f-mention-suggest li .nm { font-size: 12px; font-weight: 700; color: var(--ink); }
.f-mention-suggest li .un { font-size: 10px; color: var(--ink-3); }

/* Media preview */
.f-composer-media {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.f-composer-media[hidden] { display: none; }
.f-composer-media img,
.f-composer-media video {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}
.f-composer-media-remove {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: oklch(0.18 0.012 250 / 0.7);
  color: white;
  display: grid; place-items: center;
  font-size: 12px;
  border: 0;
}
.f-composer-media-remove:hover { background: oklch(0.18 0.012 250 / 0.9); }

/* Tools / Footer */
.f-composer-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.f-composer-tools { display: flex; gap: 4px; }
.f-composer-tool {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent);
  background: transparent;
  font-size: 16px;
}
.f-composer-tool:hover { background: var(--accent-soft); }

.f-composer-foot-r { display: flex; align-items: center; gap: 12px; }
.f-composer-counter {
  font-size: 11px; color: var(--ink-3);
  min-width: 30px; text-align: right;
}
.f-composer-counter.is-near { color: oklch(0.55 0.18 60); }
.f-composer-counter.is-over { color: oklch(0.5 0.2 25); font-weight: 800; }

.f-composer-submit {
  background: var(--accent);
  color: white;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em;
}
.f-composer-submit:hover:not(:disabled) { filter: brightness(1.08); }
.f-composer-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.f-composer-error {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: oklch(0.95 0.06 25 / 0.4);
  color: oklch(0.4 0.15 25);
  font-size: 11px;
  font-weight: 700;
}
.f-composer-error[hidden] { display: none; }

/* Emoji picker panel */
.f-emoji-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 32px oklch(0.18 0.02 250 / 0.12);
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 280px;
}
.f-emoji-panel[hidden] { display: none; }
.f-emoji-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}
.f-emoji-panel-tabs {
  display: flex; gap: 2px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.f-emoji-panel-close {
  width: 26px; height: 26px;
  border-radius: 50%;
  color: var(--ink-3);
  display: grid; place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.f-emoji-panel-close:hover { color: var(--ink); background: var(--surface-2); }
.f-emoji-panel-tabs button {
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 5px;
  background: transparent;
  opacity: 0.55;
  transition: opacity 150ms ease, background 150ms ease;
}
.f-emoji-panel-tabs button:hover { background: var(--surface-2); opacity: 0.85; }
.f-emoji-panel-tabs button.is-on { opacity: 1; background: var(--accent-soft); }

.f-emoji-panel-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 2px;
  overflow-y: auto;
  padding-top: 2px;
}
.f-emoji-panel-grid button {
  aspect-ratio: 1;
  font-size: 18px;
  border-radius: 4px;
  background: transparent;
  display: grid; place-items: center;
}
.f-emoji-panel-grid button:hover { background: var(--surface-2); }

/* f-composer-input acts as a button when click opens modal */
.f-composer-input {
  cursor: pointer;
}

@media (max-width: 600px) {
  .f-composer-modal { padding: 0; }
  .f-composer-dialog {
    border-radius: 0;
    max-width: 100%;
    min-height: 100vh;
    border: 0;
  }
  .f-composer-submit-top { display: inline-flex; }
  .f-composer-foot .f-composer-submit { display: none; }
}

/* ── Sponsored feed ad (display_location: feed_open) ─────────── */
.f-ad { border-color: var(--accent-line); background: linear-gradient(180deg, oklch(from var(--accent) l c h / 0.04), var(--surface) 70%); }
.f-ad-tag { align-self: flex-start; font-size: 9px; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 6px; padding: 2px 7px; }
.f-ad-sponsored { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-3); }
.f-ad-sponsored .bi { font-size: 11px; color: var(--accent); }
.f-ad-title { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); margin: 2px 0 4px; }
.f-ad-media { margin-top: 8px; }
.f-ad-media a { display: block; }
.f-ad-cta { display: flex; justify-content: flex-end; margin-top: 10px; }
.f-ad-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 8px 15px; text-decoration: none; transition: filter 0.15s; }
.f-ad-btn:hover { filter: brightness(1.07); color: #fff; }
