/* =====================================================================
   css/feed.css — PULSE v2 Home Feed, Post Card, Weather, Thread & Picker
   Owner: feed worker. Hairline Threads/Bluesky aesthetic + Live Layer.
   ===================================================================== */

/* ---------- Home Header, Tabs & Desktop Inline Composer ---------- */
.pf-home-page,
.pf-thread-page {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-width: 0;
  background: var(--background);
}

.pf-home-hdr {
  position: sticky;
  top: 0;
  z-index: 26;
}

.pf-home-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 4px;
}

.pf-home-title-row .ds-largetitle {
  padding: 0;
}

.pf-tabs-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.pf-tabs-wrap [data-tab-bar="home"] {
  flex: 1;
  min-width: 0;
}

.pf-tabs-actions {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0 6px 0 2px;
  flex-shrink: 0;
}

.pf-tabs-add,
.pf-tabs-more {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms ease;
}

.pf-tabs-add:hover,
.pf-tabs-more:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.pf-tabs-add:active,
.pf-tabs-more:active {
  transform: scale(.92);
}

.pf-tabs-add svg,
.pf-tabs-more svg {
  width: 18px;
  height: 18px;
}

.pf-tabs-more.is-active {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.pf-tab-pin {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  color: var(--primary);
  opacity: .9;
}
.pf-tab-pin svg {
  width: 12px;
  height: 12px;
}

.pf-pin-btn {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: var(--background);
  color: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, transform 120ms ease;
}
.pf-pin-btn:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}
.pf-pin-btn:active {
  transform: scale(.92);
}
.pf-pin-btn svg {
  width: 15px;
  height: 15px;
}
.pf-pin-btn.is-pinned {
  background: color-mix(in srgb, var(--primary) 13%, var(--background));
  border-color: color-mix(in srgb, var(--primary) 42%, var(--card-border));
  color: var(--primary);
}
.pf-pin-btn.is-pinned svg {
  fill: currentColor;
}
.pf-fht-ico.is-pinned {
  background: color-mix(in srgb, var(--primary) 18%, var(--content));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 38%, transparent);
}

/* Followed Hashtags overflow modal */
.pf-fht-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.pf-fht-row:hover { background: var(--ds-hover); }
.pf-fht-row.is-active { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.pf-fht-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--primary) 11%, var(--content));
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ds-font-display);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.pf-fht-body { flex: 1; min-width: 0; }
.pf-fht-tag {
  font-family: var(--ds-font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pf-fht-sub {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-fht-acts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .pf-home-title-row,
  .pf-compose-prompt,
  .pf-thread-hdr {
    display: none !important;
  }
}

body.mobile-sim .pf-home-title-row,
body.mobile-sim .pf-compose-prompt,
body.mobile-sim .pf-thread-hdr {
  display: none !important;
}

/* Desktop inline "What's happening?" composer prompt */
.pf-compose-prompt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.pf-compose-main {
  flex: 1;
  min-width: 0;
}

.pf-compose-input {
  width: 100%;
  text-align: left;
  padding: 8px 0 10px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--muted-foreground);
  cursor: text;
  transition: color 150ms ease;
}

.pf-compose-input:hover {
  color: var(--foreground);
}

.pf-compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.pf-compose-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pf-compose-tools::-webkit-scrollbar {
  display: none;
}

.pf-compose-tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 140ms ease, transform 120ms ease;
}

.pf-compose-tool:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.pf-compose-tool:active {
  transform: scale(.96);
}

.pf-compose-tool svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Followed hashtag sub-header & scheduled queue */
.pf-tag-banner {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--content) 38%, var(--background));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-tag-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pf-tag-banner-title {
  font-family: var(--ds-font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.pf-tag-banner-sub {
  font-size: 12.5px;
  color: var(--muted-foreground);
  margin-top: 2px;
}

.pf-tag-banner-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pf-sched-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--primary) 7%, var(--background));
  font-size: 12.5px;
}

.pf-sched-txt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--foreground);
  min-width: 0;
}

.pf-sched-txt svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

/* ---------- Slim "On Air" Live Radio Strip (Home top) ---------- */
.pf-onair-bar {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.pf-onair-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pf-onair-rail::-webkit-scrollbar {
  display: none;
}

.pf-onair-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid color-mix(in srgb, #f43f5e 28%, var(--border));
  background: color-mix(in srgb, #f43f5e 10%, var(--background));
  color: #e11d48;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 140ms ease, transform 120ms ease;
}

[data-theme="dark"] .pf-onair-badge,
[data-theme="oled"] .pf-onair-badge {
  color: #fb7185;
  background: color-mix(in srgb, #f43f5e 16%, var(--card));
}

.pf-onair-badge:hover {
  background: color-mix(in srgb, #f43f5e 17%, var(--background));
}

.pf-onair-badge:active {
  transform: scale(0.97);
}

.pf-onair-pulse {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #f43f5e;
  box-shadow: 0 0 0 0 rgba(244, 63, 94, .65);
  animation: pfOnAirPulse 1.8s ease-out infinite;
  flex-shrink: 0;
}

@keyframes pfOnAirPulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, .65); }
  70% { box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.pf-onair-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 4px 7px 4px 5px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  flex-shrink: 0;
  max-width: 248px;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.pf-onair-pill:hover {
  border-color: color-mix(in srgb, var(--st-a, #f43f5e) 42%, var(--border));
  background: color-mix(in srgb, var(--st-a, #f43f5e) 5%, var(--card));
}

.pf-onair-pill:active {
  transform: scale(0.985);
}

.pf-onair-pill[data-playing="true"] {
  border-color: color-mix(in srgb, var(--st-a, #f43f5e) 58%, transparent);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--st-a, #f43f5e) 11%, var(--card)),
    color-mix(in srgb, var(--st-b, #8b5cf6) 9%, var(--card)));
  box-shadow: 0 3px 12px -4px color-mix(in srgb, var(--st-a, #f43f5e) 35%, transparent);
}

.pf-onair-av-btn {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 9999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pf-onair-ring {
  width: 32px;
  height: 32px;
  padding: 2px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--st-a, #f43f5e), var(--st-b, #8b5cf6));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pf-onair-ring img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  border: 1.5px solid var(--card);
  display: block;
}

.pf-onair-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: #f43f5e;
  border: 1.8px solid var(--card);
}

.pf-onair-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.pf-onair-top {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.pf-onair-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 124px;
}

.pf-onair-cnt {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.pf-onair-show {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-foreground);
  min-width: 0;
  max-width: 146px;
}

.pf-onair-pill[data-playing="true"] .pf-onair-show {
  color: var(--st-a, #f43f5e);
  font-weight: 600;
}

.pf-onair-eq {
  display: none;
  align-items: flex-end;
  gap: 1.5px;
  height: 9px;
  flex-shrink: 0;
}

.pf-onair-pill[data-playing="true"] .pf-onair-eq {
  display: inline-flex;
}

.pf-onair-eq i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 9999px;
  background: currentColor;
  transform-origin: bottom;
  animation: pfOnAirEq 0.72s ease-in-out infinite alternate;
}

.pf-onair-eq i:nth-child(2) {
  animation-duration: 0.54s;
  animation-delay: 0.14s;
}

.pf-onair-eq i:nth-child(3) {
  animation-duration: 0.66s;
  animation-delay: 0.28s;
}

@keyframes pfOnAirEq {
  0% { transform: scaleY(0.28); }
  100% { transform: scaleY(1); }
}

.pf-onair-act {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--foreground) 7%, transparent);
  color: var(--foreground);
  transition: background-color 140ms ease, color 140ms ease;
}

.pf-onair-act svg {
  width: 13px;
  height: 13px;
}

.pf-onair-pill:hover .pf-onair-act {
  background: color-mix(in srgb, var(--st-a, #f43f5e) 16%, transparent);
  color: var(--st-a, #f43f5e);
}

.pf-onair-pill[data-playing="true"] .pf-onair-act,
.pf-onair-pill[data-busy="true"] .pf-onair-act {
  background: linear-gradient(135deg, var(--st-a, #f43f5e), var(--st-b, #8b5cf6));
  color: #ffffff;
}

.pf-onair-spin {
  animation: pfOnAirSpin 0.85s linear infinite;
}

@keyframes pfOnAirSpin {
  to { transform: rotate(360deg); }
}

/* ---------- Living Weather & Daily Moment Full-Width Card ---------- */
.pf-wx-wrap {
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.pf-wx-card {
  position: relative;
  width: 100%;
  padding: 14px 16px;
  color: #ffffff;
  overflow: hidden;
  isolation: isolate;
}

.pf-wx-card::after {
  display: none;
}

/* Constant locked-height sky stage: opening/closing 5h NEVER stretches, scales, or shifts clouds/sun/moon/gradient */
.pf-wx-sky-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.pf-wx-sky-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 360px;
}

.pf-wx-clouds-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 152px;
  display: block;
}

.pf-wx-celestial {
  position: absolute;
  top: -2px;
  right: 72px;
  width: 92px;
  height: 92px;
  display: block;
  overflow: visible;
  z-index: 3;
}

.pf-wx-fx-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 340px;
  display: block;
  z-index: 1;
}

.pf-wx-sky-shade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 360px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8, 12, 24, .06) 0%, rgba(8, 12, 24, .22) 55%, rgba(8, 12, 24, .36) 100%);
}

/* Smooth in-place 5h forecast accordion (zero DOM teardown = sky animation never resets!) */
.pf-wx-forecast-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 240ms var(--ds-ease), opacity 200ms ease;
}

.pf-wx-forecast-wrap.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.pf-wx-forecast-inner {
  overflow: hidden;
  min-height: 0;
}

.pf-wx-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pf-wx-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.pf-wx-ico {
  flex-shrink: 0;
  margin-left: -4px;
  transition: transform 150ms ease;
}

.pf-wx-ico:hover {
  transform: scale(1.05);
}

.pf-wx-headline {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  line-height: 1.15;
}

.pf-wx-temp {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .25);
  transition: opacity 140ms ease;
}

.pf-wx-temp:hover {
  opacity: .84;
}

.pf-wx-city {
  font-size: 14.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .96);
  text-shadow: 0 1px 6px rgba(6, 10, 22, .62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-wx-city:hover {
  text-decoration: underline;
}

.pf-wx-cond {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .90);
  text-shadow: 0 1px 6px rgba(6, 10, 22, .62);
}

.pf-wx-sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, .88);
  text-shadow: 0 1px 6px rgba(6, 10, 22, .62);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 140ms ease;
}

.pf-wx-sub:hover {
  color: #ffffff;
}

.pf-wx-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 11px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background-color 150ms ease, transform 120ms ease;
}

.pf-wx-pill:hover {
  background: rgba(255, 255, 255, .26);
}

@media (max-width: 520px) {
  .pf-wx-card {
    padding: 13px 14px;
  }
  .pf-wx-left {
    gap: 8px;
  }
  .pf-wx-headline {
    gap: 5px;
    flex-wrap: nowrap;
    padding-right: 48px;
    overflow: hidden;
  }
  .pf-wx-temp {
    font-size: 21px;
    flex-shrink: 0;
  }
  .pf-wx-city {
    font-size: 13.5px;
    flex-shrink: 0;
  }
  .pf-wx-cond {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pf-wx-celestial {
    right: 68px;
    top: -6px;
    width: 64px;
    height: 64px;
  }
}

body.mobile-sim .pf-wx-card {
  padding: 13px 14px;
}

body.mobile-sim .pf-wx-left {
  gap: 8px;
}

body.mobile-sim .pf-wx-headline {
  gap: 5px;
  flex-wrap: nowrap;
  padding-right: 48px;
  overflow: hidden;
}

body.mobile-sim .pf-wx-temp {
  font-size: 21px;
  flex-shrink: 0;
}

body.mobile-sim .pf-wx-city {
  font-size: 13.5px;
  flex-shrink: 0;
}

body.mobile-sim .pf-wx-cond {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.mobile-sim .pf-wx-celestial {
  right: 68px;
  top: -6px;
  width: 64px;
  height: 64px;
}

.pf-wx-pill:active {
  transform: scale(.96);
}

.pf-wx-chev {
  width: 14px;
  height: 14px;
  transition: transform 200ms var(--ds-ease);
}

.pf-wx-chev.is-open {
  transform: rotate(180deg);
}

.pf-wx-moment {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255, 255, 255, .96);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .24);
}

.pf-wx-forecast {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-wx-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.pf-wx-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--ds-radius-m);
  background: rgba(8, 12, 24, .24);
  border: 1px solid rgba(255, 255, 255, .15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pf-wx-slot-hr {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
}

.pf-wx-slot-em {
  font-size: 15px;
  line-height: 1.1;
}

.pf-wx-slot-t {
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.pf-wx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, .88);
}

.pf-wx-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pf-wx-metric {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pf-wx-metric svg {
  width: 13px;
  height: 13px;
  opacity: .9;
}

.pf-wx-atm-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background-color 150ms ease;
}

.pf-wx-atm-btn:hover {
  background: rgba(255, 255, 255, .28);
}

.pf-wx-atm-btn svg {
  width: 12px;
  height: 12px;
}

/* ---------- Post Card (Threads / Bluesky Hairline Grade) ---------- */
.pf-post {
  position: relative;
  padding: 14px 16px 12px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 140ms ease;
}

.pf-post:hover {
  background: color-mix(in srgb, var(--content) 26%, var(--background));
}

.pf-post.pf-focal {
  padding: 16px 16px 12px;
  cursor: default;
}

.pf-post.pf-focal:hover {
  background: var(--background);
}

@media (max-width: 767px) {
  .pf-post:hover {
    background: var(--background);
  }
}

body.mobile-sim .pf-post:hover {
  background: var(--background);
}

.pf-post.pf-muted {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted-foreground);
  background: color-mix(in srgb, var(--content) 35%, var(--background));
  cursor: default;
}

/* Context line (Pinned · Reposted by · Promoted) — sleek inline single row */
.pf-ctx-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  margin-bottom: 6px;
  padding-left: 0;
}

.pf-focal .pf-ctx-wrap {
  padding-left: 0;
}

.pf-context {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  line-height: 1.2;
}

.pf-ctx-sep {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-foreground);
  opacity: 0.55;
  line-height: 1;
}

.pf-context svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Newly submitted reply highlight pulse */
@keyframes pfReplyFlash {
  0% { background: color-mix(in srgb, var(--primary) 14%, transparent); }
  100% { background: transparent; }
}

.pf-reply-item.is-just-posted,
.pf-nested-item.is-just-posted {
  animation: pfReplyFlash 1.6s ease-out;
  border-radius: 12px;
}

/* Hashtag verification badge row */
.pf-tagcheck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.pf-tagcheck-l {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-weight: 600;
}

.pf-tagcheck.is-ok .pf-tagcheck-l {
  color: var(--success);
}

.pf-tagcheck.is-warn .pf-tagcheck-l {
  color: var(--warning);
}

.pf-tagcheck-l svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.pf-tagcheck button {
  padding: 2px 10px;
  border-radius: 9999px;
  background: var(--content);
  color: var(--muted-foreground);
  font-size: 11.5px;
  font-weight: 600;
  flex-shrink: 0;
  transition: color 140ms ease, background-color 140ms ease;
}

.pf-tagcheck button:hover {
  color: var(--error);
  background: color-mix(in srgb, var(--error) 10%, transparent);
}

/* Author header row */
.pf-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
  border-radius: 9999px;
}

.pf-id {
  flex: 1;
  min-width: 0;
  padding-top: 0;
}

.pf-line1 {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  line-height: 1.25;
}

.pf-name {
  font-family: var(--ds-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-name:hover {
  text-decoration: underline;
}

.pf-focal .pf-name {
  font-size: 15.5px;
}

.pf-dot,
.pf-time {
  font-size: 13px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.pf-line2 {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 1px;
  line-height: 1.25;
}

.pf-handle {
  font-size: 13px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-edited {
  font-size: 12px;
  font-weight: 600;
  color: var(--link);
  flex-shrink: 0;
}

.pf-edited:hover {
  text-decoration: underline;
}

.pf-more {
  width: 32px;
  height: 32px;
  margin: 0 -6px 0 0;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: background-color 140ms ease, color 140ms ease;
}

.pf-more:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.pf-more svg {
  width: 18px;
  height: 18px;
}

/* Body column: full-width across desktop, mobile & focal post */
.pf-body {
  padding-left: 0;
  margin-top: 8px;
}

.pf-focal .pf-body {
  padding-left: 0;
  margin-top: 12px;
}

.pf-text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--foreground);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.pf-focal .pf-text {
  font-size: 17px;
  line-height: 1.5;
}

/* Post media: rounded 16px on desktop, full-bleed edge-to-edge on mobile */
.pf-post .post-media-bleed {
  position: relative;
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--content);
  overflow: hidden;
}

@media (max-width: 767px) {
  .pf-ctx-wrap {
    padding-left: 0;
  }

  .pf-body {
    padding-left: 0;
    margin-top: 8px;
  }

  .pf-post .post-media-bleed {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    max-width: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

body.mobile-sim .pf-ctx-wrap {
  padding-left: 0;
}

body.mobile-sim .pf-body {
  padding-left: 0;
  margin-top: 8px;
}

body.mobile-sim .pf-post .post-media-bleed {
  margin-left: -16px;
  margin-right: -16px;
  width: calc(100% + 32px);
  max-width: none;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

/* Double-tap heart burst */
@keyframes pfBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(-10deg); }
  22% { opacity: 1; transform: translate(-50%, -50%) scale(1.18) rotate(4deg); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1.28); }
}

.pf-burst {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  color: #ffffff;
  filter: drop-shadow(0 6px 20px rgba(244, 36, 94, .65)) drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
  animation: pfBurst 860ms var(--ds-ease) forwards;
}

.pf-burst svg {
  width: 72px;
  height: 72px;
  fill: #ff3b5c;
  stroke: #ffffff;
  stroke-width: 1.5;
}

/* Quote post card */
.pf-quote {
  margin-top: 10px;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--background);
  transition: background-color 140ms ease, border-color 140ms ease;
}

.pf-quote:hover {
  background: var(--ds-hover);
}

.pf-quote-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pf-quote-name {
  font-family: var(--ds-font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-quote.is-composer {
  margin-top: 0;
  background: var(--card);
}

.pf-quote.is-composer:hover {
  background: var(--card);
}

.pf-quote-meta {
  font-size: 12.5px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.cmp-quote-rm {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
  transition: background-color 140ms ease, color 140ms ease;
}

.cmp-quote-rm:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.cmp-quote-rm svg {
  width: 14px;
  height: 14px;
}

.pf-quote-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.pf-quote-body {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.42;
  color: var(--foreground);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-quote-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--content);
}

.pf-quote-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pf-quote-more {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 20, .55);
  color: #fff;
  font-family: var(--ds-font-display);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.pf-quote-gif {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .74);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.pf-gallery-more {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 20, .54);
  color: #fff;
  font-family: var(--ds-font-display);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Poll */
.pf-poll {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card);
}

.pf-poll-q {
  font-family: var(--ds-font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 10px;
}

.pf-poll-opts {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pf-poll-opt {
  position: relative;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  font-size: 13.5px;
  overflow: hidden;
  transition: border-color 140ms ease, transform 120ms ease;
}

.pf-poll-opt:hover {
  border-color: var(--primary);
}

.pf-poll-opt:active {
  transform: scale(.99);
}

.pf-poll-opt.is-picked {
  border-color: var(--primary);
}

.pf-poll-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: color-mix(in srgb, var(--foreground) 8%, transparent);
  transition: width 360ms var(--ds-ease);
}

.pf-poll-opt.is-win .pf-poll-fill,
.pf-poll-opt.is-picked .pf-poll-fill {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}

.pf-poll-lbl {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--foreground);
}

.pf-poll-opt.is-picked .pf-poll-lbl,
.pf-poll-opt.is-win .pf-poll-lbl {
  font-weight: 700;
}

.pf-poll-chk {
  width: 14px;
  height: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

.pf-poll-pct {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.pf-poll-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-foreground);
}

/* Readers added context note */
.pf-note {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--content) 55%, var(--background));
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-note-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--foreground);
}

.pf-note-head svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.pf-note p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted-foreground);
}

.pf-note-btn {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--background);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  transition: all 140ms ease;
}

.pf-note-btn:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.pf-note-btn.is-on {
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
  background: color-mix(in srgb, var(--success) 10%, var(--background));
  color: var(--success);
}

/* Subscribers-only locked card (no price shown in feed) */
.pf-locked {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-locked-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 8%, var(--card)), var(--card));
  overflow: hidden;
  min-height: 164px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-locked-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.2);
  opacity: .26;
  transform: scale(1.12);
  pointer-events: none;
}

.pf-locked-inner {
  position: relative;
  z-index: 2;
  padding: 20px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 310px;
}

.pf-locked-ico {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--foreground) 8%, var(--background));
  border: 1px solid var(--card-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
  margin-bottom: 2px;
}

.pf-locked-ico svg {
  width: 17px;
  height: 17px;
}

.pf-locked-title {
  font-family: var(--ds-font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--foreground);
}

.pf-locked-sub {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted-foreground);
}

/* Focused post meta & stats row */
.pf-focal-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted-foreground);
}

.pf-focal-meta b {
  font-family: var(--ds-font-display);
  font-weight: 700;
  color: var(--foreground);
}

.pf-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted-foreground);
}

.pf-stats b {
  font-family: var(--ds-font-display);
  font-weight: 800;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

/* Action bar (identical across Home feed and Post preview / Thread focal post) */
.pf-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  margin-left: -8px;
  margin-right: -8px;
}

.pf-focal .pf-actions {
  margin-top: 8px;
}

.pf-spacer {
  flex: 1;
}

.pf-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 9px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  transition: color 140ms ease, background-color 140ms ease, transform 120ms ease;
}

.pf-act:active {
  transform: scale(.9);
}

.pf-ico {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.pf-count:empty {
  display: none;
}

.pf-like:hover,
.pf-like.is-on {
  color: #f4245e;
}

.pf-like:hover {
  background: rgba(244, 36, 94, .1);
}

.pf-reply:hover {
  color: #1d9bf0;
  background: rgba(29, 155, 240, .1);
}

.pf-repost:hover,
.pf-repost.is-on {
  color: #00ba7c;
}

.pf-repost:hover {
  background: rgba(0, 186, 124, .1);
}

.pf-share:hover,
.pf-bm:hover,
.pf-bm.is-on {
  color: var(--primary);
}

.pf-share:hover,
.pf-bm:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

@keyframes pfSpringPop {
  0% { transform: scale(1); }
  38% { transform: scale(1.36) rotate(-7deg); }
  72% { transform: scale(.92); }
  100% { transform: scale(1); }
}

.pf-act.is-pop .pf-ico {
  animation: pfSpringPop 320ms var(--ds-ease);
}

/* Reply preview peek under feed post */
.pf-peek {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 4px 10px 4px 4px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  transition: background-color 140ms ease, color 140ms ease;
}

.pf-peek:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.pf-peek-av {
  display: inline-flex;
}

.pf-peek-av img {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1.5px solid var(--background);
  margin-left: -5px;
}

.pf-peek-av img:first-child {
  margin-left: 0;
}

/* ---------- Sponsored Card ---------- */
.pf-sponsored {
  cursor: default;
}

.pf-sp-label {
  font-weight: 600;
  color: var(--muted-foreground);
}

.pf-sp-headline {
  font-family: var(--ds-font-display);
  font-weight: 700;
  color: var(--foreground);
}

.pf-sp-media {
  background: var(--card);
}

.pf-sp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.pf-sp-host {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-sp-title {
  font-family: var(--ds-font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- People You May Know Horizontal Rail ---------- */
.pf-pymk {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.pf-pymk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 12px;
}

.pf-pymk-head h2 {
  font-family: var(--ds-font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

.pf-pymk-card {
  position: relative;
  width: 158px;
  padding: 16px 12px 13px;
  border-radius: var(--ds-radius-l);
  border: 1px solid var(--card-border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 150ms ease, transform 140ms ease;
}

.pf-pymk-card:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--card-border));
}

.pf-pymk-x {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: background-color 140ms ease, color 140ms ease;
}

.pf-pymk-x:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.pf-pymk-x svg {
  width: 14px;
  height: 14px;
}

.pf-pymk-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 4px;
  font-family: var(--ds-font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--foreground);
}

.pf-pymk-handle {
  max-width: 100%;
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-pymk-reason {
  width: 100%;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

/* ---------- Infinite Scroll Sentinel ---------- */
.pf-inf-sentinel {
  padding: 20px 16px 28px;
  display: flex;
  justify-content: center;
  background: var(--background);
}

.pf-inf-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted-foreground);
}

.pf-inf-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--primary);
  animation: dsPulseRing 1.8s var(--ds-ease) infinite;
}

/* ---------- Thread Page, Pinned/Inline Reply Composer & Replies ---------- */
.pf-thread-hdr {
  order: 1;
  position: sticky;
  top: 0;
  z-index: 26;
}

body:has(.pf-thread-page) #installBanner {
  display: none !important;
}

.pf-thread-focal {
  order: 2;
}

.pf-thread-composer {
  order: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.pf-replies-bar {
  order: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.pf-replies-title {
  font-family: var(--ds-font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--foreground);
}

.pf-replies-list {
  order: 5;
  display: flex;
  flex-direction: column;
}

@media (max-width: 767px) {
  .pf-replies-bar {
    order: 3;
  }

  .pf-replies-list {
    order: 4;
    flex: 1 0 auto;
  }

  .pf-thread-composer {
    order: 5;
    position: sticky;
    bottom: 0;
    z-index: 25;
    margin-top: auto;
    padding: 10px 14px 12px;
    border-top: 1px solid var(--border);
    border-bottom: 0;
    background: var(--ds-glass);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
  }

  .pf-thread-composer .pf-quick-emojis {
    display: none;
  }

  .pf-thread-composer .pf-tray-slot {
    order: -2;
  }

  .pf-thread-composer #replyAttachPreview {
    order: -1;
  }
}

body.mobile-sim .pf-replies-bar {
  order: 3;
}

body.mobile-sim .pf-replies-list {
  order: 4;
  flex: 1 0 auto;
}

body.mobile-sim .pf-thread-composer {
  order: 5;
  position: sticky;
  bottom: 0;
  z-index: 25;
  margin-top: auto;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: var(--ds-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}

body.mobile-sim .pf-thread-composer .pf-quick-emojis {
  display: none;
}

body.mobile-sim .pf-thread-composer .pf-tray-slot {
  order: -2;
}

body.mobile-sim .pf-thread-composer #replyAttachPreview {
  order: -1;
}

.pf-quick-emojis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pf-quick-emojis::-webkit-scrollbar {
  display: none;
}

.pf-quick-emoji {
  width: 34px;
  height: 32px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  transition: background-color 140ms ease, transform 120ms ease;
}

.pf-quick-emoji:hover {
  background: var(--ds-hover);
  transform: scale(1.12);
}

.pf-quick-emoji:active {
  transform: scale(.9);
}

.pf-inline-reply-row,
.pf-composer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pf-reply-pill {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 4px 5px 4px 14px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.pf-reply-pill:focus-within {
  border-color: var(--primary);
  background: var(--background);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.pf-reply-pill input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 15px;
  color: var(--foreground);
}

.pf-reply-pill input::placeholder {
  color: var(--muted-foreground);
}

.pf-reply-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.pf-tool-btn {
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted-foreground);
  transition: background-color 140ms ease, color 140ms ease, transform 120ms ease;
}

.pf-tool-btn:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.pf-tool-btn:active {
  transform: scale(.9);
}

.pf-tool-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.pf-tool-gif {
  width: auto;
  padding: 0 5px;
}

.pf-tool-gif span {
  padding: 2px 5px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
}

/* Gift comment card highlight + anonymous badge + gift toggle box */
.pf-reply-item.is-gift-comment {
  background: color-mix(in srgb, #f59e0b 7%, var(--background));
}

.pf-gift-cmt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  color: #b45309;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
}

html.dark .pf-gift-cmt-badge {
  color: #fbbf24;
  background: color-mix(in srgb, #f59e0b 20%, transparent);
}

.pf-gift-cmt-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.pf-anon-av {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--foreground) 10%, var(--content));
  color: var(--muted-foreground);
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}

.pf-anon-av svg {
  width: 18px;
  height: 18px;
}

.mg-anon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--ds-radius-m);
  border: 1px solid var(--card-border);
  background: var(--card);
}

.mg-anon-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--foreground);
}

.mg-anon-sub {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.35;
  margin-top: 2px;
}

.pf-reply-send {
  flex-shrink: 0;
}

/* Inline reply form nested under a comment */
.pf-inline-reply {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pf-inline-reply-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.pf-inline-reply-to {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-inline-reply-to strong {
  color: var(--foreground);
  font-weight: 700;
}

.pf-inline-reply-to span {
  color: var(--link);
}

.pf-inline-close {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.pf-inline-close:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.pf-inline-close svg {
  width: 14px;
  height: 14px;
}

/* Staged media card inside reply/composer */
.pf-staged {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--card-border));
  background: var(--card);
}

.pf-staged-thumb {
  width: 52px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.pf-staged-meta {
  flex: 1;
  min-width: 0;
}

.pf-staged-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-staged-sub {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 1px;
}

.pf-staged-rm {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.pf-staged-rm:hover {
  background: var(--ds-hover);
  color: var(--error);
}

.pf-staged-rm svg {
  width: 15px;
  height: 15px;
}

/* Replies list + Thread connector lines */
.pf-reply-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.pf-reply-grid {
  display: flex;
  gap: 12px;
}

.pf-reply-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.pf-thread-line {
  width: 2px;
  flex: 1;
  min-height: 14px;
  margin-top: 6px;
  border-radius: 9999px;
  background: var(--card-border);
}

.pf-reply-main {
  flex: 1;
  min-width: 0;
}

.pf-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pf-reply-who {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  line-height: 1.25;
}

.pf-reply-name {
  font-family: var(--ds-font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-reply-name:hover {
  text-decoration: underline;
}

.pf-reply-meta {
  font-size: 12.5px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-reply-text {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--foreground);
  overflow-wrap: anywhere;
}

.pf-reply-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  margin-left: -8px;
}

.pf-nested-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pf-nested-item {
  display: flex;
  gap: 10px;
}

.pf-nested-to {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.pf-nested-to span {
  color: var(--link);
  font-weight: 600;
}

.pf-replies-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 14px;
}

/* ---------- Instagram-Grade Inline Comment Picker (Emoji · GIF · Image) ---------- */
.icp-tray {
  padding: 12px;
  border-radius: var(--ds-radius-l);
  border: 1px solid var(--card-border);
  background: var(--background);
  box-shadow: var(--ds-shadow-pop);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: inlineReplyPop 160ms var(--ds-ease);
}

.icp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.icp-seg {
  flex: 1;
  display: flex;
}

.icp-seg button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
}

.icp-tab-ico {
  width: 15px;
  height: 15px;
  display: inline-flex;
}

.icp-tab-ico svg {
  width: 15px;
  height: 15px;
}

.icp-close {
  width: 32px;
  height: 32px;
}

.icp-close svg {
  width: 17px;
  height: 17px;
}

.icp-search input {
  height: 38px;
  font-size: 16px;
}

.icp-search-clr {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: background-color 120ms ease, color 120ms ease;
}

.icp-search-clr:hover {
  background: var(--ds-hover);
  color: var(--foreground);
}

.icp-search-clr svg {
  width: 15px;
  height: 15px;
}

.icp-cats {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.icp-chip {
  height: 28px;
  padding: 0 11px;
  font-size: 12px;
}

.icp-grid-scroll {
  max-height: 204px;
  overflow-y: auto;
}

.icp-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  align-content: start;
}

@media (min-width: 640px) {
  body:not(.mobile-sim) .icp-emoji-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

.icp-emoji-btn {
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  transition: background-color 120ms ease, transform 120ms ease;
}

.icp-emoji-btn:hover {
  background: var(--ds-hover);
  transform: scale(1.15);
}

.icp-emoji-btn:active {
  transform: scale(.9);
}

.icp-gif-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  grid-auto-rows: max-content;
}

@media (min-width: 640px) {
  body:not(.mobile-sim) .icp-gif-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.icp-img-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.icp-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--ds-radius-m);
  border: 1.5px dashed color-mix(in srgb, var(--primary) 55%, var(--card-border));
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.icp-upload:hover {
  background: color-mix(in srgb, var(--primary) 13%, transparent);
}

.icp-upload svg {
  width: 17px;
  height: 17px;
}

.icp-img-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
}

.icp-img-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  grid-auto-rows: max-content;
}

.icp-media-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  text-align: left;
  transition: border-color 140ms ease, transform 120ms ease;
}

.icp-media-card:hover {
  border-color: var(--primary);
}

.icp-media-card:active {
  transform: scale(.97);
}

.icp-media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.icp-media-card.is-photo {
  aspect-ratio: 4 / 3;
}

.icp-gif-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .72);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.icp-media-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 7px 5px;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icp-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted-foreground);
}

@media (prefers-reduced-motion: reduce) {
  .pf-burst,
  .pf-act.is-pop .pf-ico,
  .icp-tray {
    animation-duration: .001ms !important;
  }
}

/* ---------- Money gifts ---------- */
.pf-gift {
  position: relative;
  overflow: visible;
}
.pf-gift:hover:not(:disabled) {
  color: #d97706;
  background: rgba(245, 158, 11, .11);
}
.pf-gift.is-on {
  color: #d97706;
}
html.dark .pf-gift:hover:not(:disabled),
html.dark .pf-gift.is-on {
  color: #fbbf24;
}
.pf-gift.is-own,
.pf-gift:disabled {
  opacity: .42;
  cursor: default;
  pointer-events: none;
}

@keyframes mgGiftPop {
  0% { transform: scale(1); }
  32% { transform: scale(1.42) rotate(-10deg); }
  64% { transform: scale(.92) rotate(5deg); }
  100% { transform: scale(1); }
}
@keyframes mgBurstRing {
  0% { opacity: .85; transform: translate(-50%, -50%) scale(.35); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.9); }
}
@keyframes mgBurstSparks {
  0% {
    opacity: 1;
    box-shadow:
      0 -6px 0 1px #f59e0b,
      6px -4px 0 1px #ff3b5c,
      6px 4px 0 1px #5b5bf6,
      0 6px 0 1px #10b981,
      -6px 4px 0 1px #f59e0b,
      -6px -4px 0 1px #ff3b5c;
  }
  100% {
    opacity: 0;
    box-shadow:
      0 -24px 0 0 #f59e0b,
      21px -13px 0 0 #ff3b5c,
      21px 13px 0 0 #5b5bf6,
      0 24px 0 0 #10b981,
      -21px 13px 0 0 #f59e0b,
      -21px -13px 0 0 #ff3b5c;
  }
}

.pf-gift.is-burst .pf-ico,
.disc-np-gift.is-burst svg,
.disc-station-gift.is-burst svg {
  animation: mgGiftPop 480ms var(--ds-ease);
}
.pf-gift.is-burst::after,
.disc-np-gift.is-burst::after,
.disc-station-gift.is-burst::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 2px solid #f59e0b;
  pointer-events: none;
  animation: mgBurstRing 560ms var(--ds-ease) forwards;
}
.pf-gift.is-burst::before,
.disc-np-gift.is-burst::before,
.disc-station-gift.is-burst::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 9999px;
  pointer-events: none;
  animation: mgBurstSparks 620ms var(--ds-ease) forwards;
}

/* Money Gift Sheet & Desktop Anchored Popover */
.mg-head-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.mg-pop {
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mg-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.mg-pop-title {
  font-family: var(--ds-font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--foreground);
  line-height: 1.2;
}
.mg-pop-sub {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 1px;
}
.mg-pop-body,
.mg-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mg-sheet-body {
  padding: 16px;
}
.mg-full-body {
  padding: 18px 18px 24px;
  gap: 18px;
}
.mg-prev-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mg-prev-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
}
.mg-prev-kicker svg {
  width: 14px;
  height: 14px;
}
.mg-prev-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mg-prev-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--ds-font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--foreground);
  line-height: 1.2;
}
.mg-prev-handle {
  font-size: 12.5px;
  color: var(--muted-foreground);
  margin-top: 1px;
}
.mg-prev-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--foreground);
  white-space: pre-line;
}
.mg-prev-media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background);
}
.mg-prev-media img {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  display: block;
}
.mg-prev-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.mg-prev-media-cell {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background);
}
.mg-prev-media-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mg-prev-media-more {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 20, .58);
  color: #fff;
  font-family: var(--ds-font-display);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mg-prev-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.mg-prev-stats b { color: var(--foreground); font-weight: 700; }
.mg-prev-radio {
  background: linear-gradient(140deg, var(--st-a, #f43f5e), var(--st-b, #8b5cf6));
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}
.mg-prev-radio-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mg-prev-radio-art {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .36);
}
.mg-prev-radio-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .92);
}
.mg-prev-radio-title {
  font-family: var(--ds-font-display);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
}
.mg-prev-radio-sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .86);
  margin-top: 2px;
}
.mg-quick-notes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.mg-qnote {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
.mg-reassure {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted-foreground);
  text-align: center;
  padding: 4px 8px;
}
.mg-pop-foot {
  padding-top: 2px;
}
.mg-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mg-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mg-range-hint,
.mg-note-cnt {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.mg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mg-chip {
  flex: 1 1 auto;
  min-width: 52px;
  justify-content: center;
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
  font-family: var(--ds-font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mg-amt-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 13px;
  border-radius: var(--ds-radius-m);
  border: 1px solid var(--card-border);
  background: var(--background);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.mg-amt-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.mg-amt-box.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 16%, transparent);
}
.mg-sym {
  font-family: var(--ds-font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.mg-amt-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--ds-font-display);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}
.mg-amt-box input::-webkit-outer-spin-button,
.mg-amt-box input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.mg-code {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 8px;
  background: var(--content);
  color: var(--muted-foreground);
  flex-shrink: 0;
}
.mg-err {
  font-size: 12px;
  font-weight: 600;
  color: var(--error);
}
.mg-note-in {
  padding: 10px 13px !important;
  font-size: 14px !important;
}
.mg-send-btn {
  font-family: var(--ds-font-display);
}
@media (prefers-reduced-motion: reduce) {
  .pf-gift.is-burst .pf-ico,
  .pf-gift.is-burst::after,
  .pf-gift.is-burst::before,
  .disc-np-gift.is-burst svg,
  .disc-np-gift.is-burst::after,
  .disc-np-gift.is-burst::before,
  .disc-station-gift.is-burst svg,
  .disc-station-gift.is-burst::after,
  .disc-station-gift.is-burst::before {
    animation-duration: .001ms !important;
  }
}

/* ---------- Gallery +N Tiles & Composer Filmstrip ---------- */
.pf-more-tile {
  position: relative;
  cursor: pointer;
}
.pf-more-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(10, 14, 24, .56);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #ffffff;
  pointer-events: none;
  transition: background-color 150ms ease;
}
.pf-more-tile:hover .pf-more-overlay {
  background: rgba(10, 14, 24, .66);
}
.pf-more-num {
  font-family: var(--ds-font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.pf-more-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .88);
}
.pf-car-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.pf-cmp-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 2px 2px;
  scrollbar-width: none;
}
.pf-cmp-strip::-webkit-scrollbar {
  display: none;
}
.pf-cmp-strip-item {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}
.pf-cmp-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pf-cmp-strip-idx {
  position: absolute;
  left: 3px;
  bottom: 3px;
  padding: 0 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- X-Style Live "Show N new posts" Inline Bar & Floating Pill ---------- */
.pf-new-bar-slot {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.pf-new-bar-slot.has-new {
  display: block;
  animation: pfNewBarIn 220ms cubic-bezier(.22, 1, .36, 1);
}

@keyframes pfNewBarIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pf-new-bar-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  background: color-mix(in srgb, var(--primary) 5.5%, var(--background));
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, transform 110ms ease;
}

.pf-new-bar-btn:hover {
  background: color-mix(in srgb, var(--primary) 10.5%, var(--background));
}

.pf-new-bar-btn:active {
  background: color-mix(in srgb, var(--primary) 14%, var(--background));
}

.pf-new-bar-l {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pf-new-ico {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pf-new-ico svg {
  width: 12px;
  height: 12px;
}

.pf-new-avs {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.pf-new-av {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid var(--background);
  background: var(--content);
  display: block;
}

.pf-new-av + .pf-new-av {
  margin-left: -7px;
}

.pf-new-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-new-algo-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-foreground);
  background: color-mix(in srgb, var(--foreground) 6%, var(--background));
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

.pf-new-algo-chip svg {
  width: 11.5px;
  height: 11.5px;
  color: var(--primary);
}

/* Sticky Floating Pill when user is scrolled down reading older posts */
.pf-new-float {
  position: fixed;
  z-index: 44;
  left: 50%;
  top: 72px;
  transform: translate(-50%, -14px) scale(.94);
  opacity: 0;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px 0 9px;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 28px -6px rgba(15, 20, 25, .36), 0 2px 6px rgba(15, 20, 25, .14);
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), opacity 180ms ease;
  white-space: nowrap;
}

body.mobile-sim .pf-new-float {
  position: absolute;
}

.pf-new-float.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.pf-new-float:hover {
  filter: brightness(1.06);
}

.pf-new-float:active {
  transform: translate(-50%, 0) scale(.96);
}

.pf-new-float-ico {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--primary-foreground) 18%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pf-new-float-ico svg {
  width: 11.5px;
  height: 11.5px;
}

.pf-new-float .pf-new-av {
  width: 20px;
  height: 20px;
  border-color: var(--primary);
}

/* Smooth fade-highlight for freshly admitted posts */
.pf-post.pf-post-fresh {
  animation: pfPostFresh 2.4s cubic-bezier(.22, 1, .36, 1);
}

@keyframes pfPostFresh {
  0% {
    opacity: 0;
    transform: translateY(-6px);
    background-color: color-mix(in srgb, var(--primary) 11%, var(--background));
  }
  18% {
    opacity: 1;
    transform: translateY(0);
    background-color: color-mix(in srgb, var(--primary) 9%, var(--background));
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    background-color: transparent;
  }
}
