/* v221 - Shelfd Secure Key E2EE recovery modal */
.dm-e2ee-recovery-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 2, 10, 0.74);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.dm-e2ee-recovery-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.dm-e2ee-recovery-card {
  width: min(92vw, 430px);
  border-radius: 26px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: linear-gradient(145deg, rgba(13, 10, 31, 0.98), rgba(27, 18, 58, 0.98));
  box-shadow: 0 26px 80px rgba(0,0,0,0.58), 0 0 30px rgba(34,211,238,0.08);
  padding: 24px 20px 20px;
  color: #f8f4ff;
  position: relative;
}
.dm-e2ee-recovery-x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #d8cff3;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.dm-e2ee-recovery-kicker {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.38);
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}
.dm-e2ee-recovery-card h3 {
  margin: 0 36px 10px 0;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.5px;
  font-weight: 900;
}
.dm-e2ee-recovery-card p {
  margin: 0 0 16px;
  color: #b8afd1;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 650;
}
.dm-e2ee-recovery-label {
  display: block;
  margin: 10px 0 7px;
  color: #e8e3f3;
  font-size: 12px;
  font-weight: 900;
}
.dm-e2ee-recovery-input {
  width: 100%;
  min-height: 48px;
  border-radius: 15px;
  border: 1px solid rgba(167,139,250,0.28);
  background: rgba(0,0,0,0.34);
  color: #ffffff;
  padding: 0 14px;
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  margin-bottom: 10px;
}
.dm-e2ee-recovery-input:focus {
  border-color: rgba(34,211,238,0.62);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.10);
}
.dm-e2ee-recovery-error {
  min-height: 18px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
  margin-top: -2px;
}
.dm-e2ee-recovery-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.dm-e2ee-recovery-actions button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.dm-e2ee-recovery-secondary {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: #d8cff3;
}
.dm-e2ee-recovery-primary {
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(34,211,238,0.18);
}
@media (max-width: 600px) {
  .dm-e2ee-recovery-modal {
    align-items: flex-end;
    padding: 14px 14px max(14px, env(safe-area-inset-bottom));
  }
  .dm-e2ee-recovery-card {
    width: 100%;
    border-radius: 24px;
    padding: 22px 18px 18px;
  }
  .dm-e2ee-recovery-card h3 {
    font-size: 22px;
  }
  .dm-e2ee-recovery-actions {
    flex-direction: column-reverse;
  }
  .dm-e2ee-recovery-actions button {
    width: 100%;
  }
}

/* v430: feed-post-page rendered as an Instagram-style bottom sheet (81vh).
   Slide-up uses transform/translateY only (composited, ProMotion-ready). The
   inline cssText written by openActivityReplyPage/openFeedPostPage targets the
   sheet container; this CSS handles visuals + animation. Drag-to-close is wired
   in JS via the .feed-post-bottom-sheet-grabber handle. */
#feed-post-page {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: transparent !important;
  pointer-events: none;
}
#feed-post-page.is-open { pointer-events: auto; }
#feed-post-page .feed-post-bottom-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 280ms cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
#feed-post-page.is-open .feed-post-bottom-sheet-backdrop {
  opacity: 1;
  pointer-events: auto;
}
#feed-post-page .overlay-page-inner {
  position: absolute !important;
  left: 50% !important;
  top: auto !important;
  right: auto !important;
  bottom: 0 !important;
  width: min(100%, 640px) !important;
  max-width: 640px !important;
  height: 81vh !important;
  height: 81dvh !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-top: 1px solid rgba(255, 255, 245, 0.18) !important;
  border-left: 1px solid rgba(255, 255, 245, 0.10) !important;
  border-right: 1px solid rgba(255, 255, 245, 0.10) !important;
  border-radius: 22px 22px 0 0 !important;
  background: rgba(10, 8, 26, 0.98) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 -22px 48px rgba(0, 0, 0, 0.4) !important;
  transform: translate3d(-50%, 100%, 0) !important;
  transition: transform 360ms cubic-bezier(.22, 1, .36, 1) !important;
  will-change: transform !important;
  touch-action: pan-y !important;
}
#feed-post-page.is-open .overlay-page-inner {
  transform: translate3d(-50%, 0, 0) !important;
}
#feed-post-page.is-dragging .overlay-page-inner {
  transition: none !important;
}
#feed-post-page .feed-post-bottom-sheet-grabber {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 36px;
  padding-top: 12px;
  cursor: grab;
  background: transparent;
  border: 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#feed-post-page .feed-post-bottom-sheet-grabber:active { cursor: grabbing; }
#feed-post-page .feed-post-bottom-sheet-grabber-bar {
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  pointer-events: none;
}
#feed-post-page .overlay-page-content {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* v430/v432: composer slides up/down with the bottom sheet so it never lingers
   in front of the closing animation. Keyboard offset (--feed-reply-keyboard-offset)
   continues to push it up via existing `bottom: var(--feed-reply-keyboard-offset)` rule.
   v432: explicit safe-area-aware horizontal padding so the composer row stays
   visually centered on iPhone PWA / Safari (it was sitting off-center on mobile). */
#feed-post-page #feed-post-replies-composer.feed-post-floating-composer {
  left: 50% !important;
  right: auto !important;
  width: min(100%, 640px) !important;
  max-width: 640px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  padding-left: calc(14px + env(safe-area-inset-left, 0px)) !important;
  padding-right: calc(14px + env(safe-area-inset-right, 0px)) !important;
  padding-top: 8px !important;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translate3d(-50%, 110%, 0) !important;
  transition: transform 360ms cubic-bezier(.22, 1, .36, 1) !important;
  will-change: transform !important;
}
#feed-post-page #feed-post-replies-composer.feed-post-floating-composer .feed-reply-composer {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
#feed-post-page.is-open #feed-post-replies-composer.feed-post-floating-composer {
  transform: translate3d(-50%, 0, 0) !important;
}
#feed-post-page.is-dragging #feed-post-replies-composer.feed-post-floating-composer {
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  #feed-post-page .overlay-page-inner,
  #feed-post-page .feed-post-bottom-sheet-backdrop,
  #feed-post-page #feed-post-replies-composer.feed-post-floating-composer {
    transition: none !important;
  }
}
/* v433: tighten the bottom-sheet header — the sheet sits 19vh below the top of
   the screen, so safe-area-inset-top isn't relevant here and the previous
   max(14px, env(safe-area-inset-top) + 8px) was leaving a big empty gap below
   the drag handle. Compact the header so the title sits right under the notch. */
#feed-post-page .overlay-page-header {
  min-height: 40px !important;
  padding: 4px 18px 8px !important;
  padding-top: 4px !important;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  backdrop-filter: none;
}
#feed-post-page .overlay-page-title {
  font-size: 19px;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}
#feed-post-detail-container {
  padding: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
.x-post-detail-card {
  width: 100%;
  padding: 18px 20px 12px;
  border: 0;
  background: transparent;
  color: #f7f3ff;
  overflow: hidden;
}
.x-post-main-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  min-width: 0;
}
.x-post-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #17102f;
  border: 1px solid rgba(167,139,250,0.24);
  cursor: pointer;
}
.x-post-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
  color: #c4b5fd;
}
.x-post-body {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}
.x-post-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  line-height: 1.2;
}
.x-post-author {
  min-width: 0;
  max-width: 70%;
  color: #f8f4ff;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.x-post-time {
  color: #8f86b0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.x-post-action-text {
  margin-top: 6px;
  color: #b6acd0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.x-post-title {
  margin-top: 6px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.x-post-stars {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 1px;
}
.x-post-text {
  margin-top: 10px;
  color: #f2edf9;
  font-size: 18px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}
.x-post-meta-line {
  margin-top: 10px;
}
.x-post-media-poster {
  flex: 0 0 104px;
  width: 104px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 0;
  overflow: hidden;
  background: #100b24;
  padding: 0;
  cursor: pointer;
}
.x-post-media-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.x-post-trailer-card {
  width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.035);
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.x-post-trailer-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.x-post-trailer-play {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.56);
  color: #fff;
  font-size: 22px;
}
.x-post-trailer-copy {
  display: block;
  padding: 12px 14px;
}
.x-post-trailer-copy strong,
.x-post-trailer-copy small {
  display: block;
}
.x-post-trailer-copy strong { font-size: 15px; }
.x-post-trailer-copy small { color: #8f86b0; margin-top: 3px; }
.x-post-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(48px, 18vw, 120px);
  margin-top: 16px;
  padding: 12px 0 2px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #8f86b0;
}
.x-post-action-btn,
.activity-interaction-btn {
  color: #9b90c7;
}
.x-post-action-btn {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 54px;
  padding: 8px 4px;
  color: #9b90c7;
  font-size: 15px;
  font-weight: 800;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
.x-post-action-btn svg,
.x-post-action-btn [data-like-icon-slot] svg,
.activity-interaction-btn [data-like-icon-slot] svg {
  width: 21px;
  height: 21px;
  display: block;
}
.x-post-action-btn.liked,
.activity-interaction-btn.liked {
  color: #9b90c7;
  background: transparent;
}
.x-post-action-btn.liked [data-like-icon-slot],
.activity-interaction-btn.liked [data-like-icon-slot] { color: #ff4968; }
.x-post-action-btn.liked [data-activity-like-count],
.activity-interaction-btn.liked [data-activity-like-count] { color: #ff6b7d; }
#feed-post-replies-composer {
  padding: 18px 20px !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  background: transparent;
}
.feed-reply-composer {
  display: flex !important;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  min-width: 0;
}
.feed-reply-avatar {
  flex: 0 0 42px;
  width: 42px !important;
  height: 42px !important;
  border-radius: 50%;
  overflow: hidden;
}
.feed-reply-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  font-size: 18px !important;
  line-height: 1.4 !important;
  color: #f2edf9 !important;
}
.feed-reply-actions {
  padding-left: 55px;
  margin-top: 8px;
}
#feed-reply-btn {
  min-width: 88px;
  min-height: 42px;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 900;
}
#feed-post-replies-list {
  padding: 0 !important;
}
.feed-reply-item,
.x-reply-item {
  display: flex !important;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  min-width: 0;
  padding: 18px 20px !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  grid-template-columns: none !important;
}
.feed-reply-avatar-col {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feed-reply-avatar-img {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #17102f;
  color: #c4b5fd;
  font-size: 16px;
  font-weight: 900;
  border: 1px solid rgba(167,139,250,0.2);
}
.feed-reply-thread-line {
  width: 2px;
  min-height: 18px;
  flex: 1;
  background: rgba(255,255,255,0.09);
  margin-top: 8px;
}
.feed-reply-content {
  flex: 1 1 auto !important;
  width: calc(100% - 55px) !important;
  min-width: 0 !important;
  max-width: none !important;
  display: block;
}
.feed-reply-header {
  display: flex !important;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin-bottom: 6px !important;
  white-space: nowrap;
}
.feed-reply-author {
  min-width: 0;
  max-width: 70%;
  color: #f8f4ff !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feed-reply-time {
  color: #8f86b0 !important;
  font-size: 13px !important;
  font-weight: 700;
  white-space: nowrap;
}
.feed-reply-text {
  display: block !important;
  width: 100% !important;
  color: #f2edf9 !important;
  font-size: 17px !important;
  line-height: 1.42 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  letter-spacing: normal !important;
}
.x-empty-replies {
  padding: 28px 20px;
  color: #8f86b0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
@media (max-width: 768px) {
  #feed-post-page .overlay-page-inner {
    width: 100%;
    max-width: none;
  }
  #feed-post-page .overlay-page-header {
    min-height: 58px;
  }
  .x-post-detail-card {
    padding: 16px 16px 10px;
  }
  .x-post-main-row {
    gap: 11px;
  }
  .x-post-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
  .x-post-title {
    font-size: 20px;
  }
  .x-post-text {
    font-size: 17px;
  }
  .x-post-media-poster {
    flex-basis: 92px;
    width: 92px;
  }
  .x-post-actions-row {
    justify-content: space-around;
    gap: 0;
  }
  #feed-post-replies-composer {
    padding: 16px !important;
  }
  .feed-reply-actions {
    padding-left: 53px;
  }
  .feed-reply-item,
  .x-reply-item {
    padding: 16px !important;
    gap: 11px;
  }
  .feed-reply-avatar-col,
  .feed-reply-avatar-img {
    width: 40px !important;
    min-width: 40px;
    height: 40px !important;
    flex-basis: 40px;
  }
  .feed-reply-content {
    width: calc(100% - 51px) !important;
  }
}

/* ── v196: Mobile fix — squashed friend cards in Requests tab ── */
@media (max-width: 640px) {
  #requests-view .user-card:has(.friend-actions-group) {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  #requests-view .user-card .friend-actions-group {
    width: 100% !important;
    max-width: none !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* ── v202: Activity page — profile header strip ── */
.activity-page-header { margin-bottom: 20px; }
.activity-page-user-strip {
  display: flex;
  align-items: center;
  gap: 14px;
}
.activity-page-user-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(167,139,250,0.45);
  display: none;
}
.activity-page-user-strip.has-user .activity-page-user-avatar {
  display: block;
}
.activity-page-user-info { min-width: 0; }
.activity-page-title {
  font-size: 22px; font-weight: 700; color: #e8e3f3;
  font-family: 'DM Sans', sans-serif; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.activity-page-subtitle { font-size: 13px; color: #9a90b5; }
.activity-page-header-actions {
  display: none;
  gap: 10px;
  margin-top: 16px;
}
.activity-page-action-btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid rgba(167,139,250,0.38);
  background: rgba(109,40,217,0.15);
  color: #e0d8ff;
  transition: background 0.18s, border-color 0.18s;
  white-space: nowrap;
  text-align: center;
}
.activity-page-action-btn:hover {
  background: rgba(109,40,217,0.26);
  border-color: rgba(167,139,250,0.6);
}
.activity-page-profile-btn {
  background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(124,58,237,0.28);
}
.activity-page-profile-btn:hover { filter: brightness(1.08) !important; }
body.light-mode .activity-page-title { color: #12082e; }
body.light-mode .activity-page-subtitle { color: #7c6faa; }
body.light-mode .activity-page-action-btn {
  background: rgba(237,233,254,0.86) !important;
  border-color: rgba(124,58,237,0.24) !important;
  color: #12082e !important;
}
body.light-mode .activity-page-profile-btn {
  background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* ── v203: user-filter-active — Twitter/Instagram-style feed cards ── */
.activity-page.user-filter-active #activity-page-feed {
  padding-left: 0;
  padding-right: 0;
}
.activity-page.user-filter-active .activity-card {
  grid-template-columns: minmax(0,1fr) 82px !important;
  grid-template-rows: auto auto !important;
  border-radius: 0 !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.055) !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 0 !important;
  padding: 0 !important;
}
.activity-page.user-filter-active .activity-card::before { display: none !important; }
.activity-page.user-filter-active .activity-card:active { transform: none !important; }
.activity-page.user-filter-active .activity-avatar-wrap { display: none !important; }
.activity-page.user-filter-active .activity-who-row { display: none !important; }
.activity-page.user-filter-active .activity-content-col {
  grid-column: 1 !important;
  grid-row: 1 !important;
  padding: 14px 10px 12px 16px !important;
  gap: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}
.activity-page.user-filter-active .activity-action-text {
  font-size: 12px !important;
  color: #7b72a8 !important;
  font-weight: 500 !important;
  margin-bottom: 4px !important;
  line-height: 1.3 !important;
}
.activity-page.user-filter-active .activity-card-title-inline {
  display: block !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #f4f0ff !important;
  line-height: 1.2 !important;
  margin-bottom: 8px !important;
  white-space: normal !important;
}
.activity-page.user-filter-active .activity-stars-row {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  gap: 2px !important;
}
.activity-page.user-filter-active .activity-star { font-size: 14px !important; }
.activity-page.user-filter-active .activity-comment-preview {
  margin-bottom: 8px !important;
  font-size: 13px !important;
}
.activity-page.user-filter-active .activity-card-bottom {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: auto !important;
}
.activity-page.user-filter-active .activity-card-time  { font-size: 11px !important; color: #56507a !important; }
.activity-page.user-filter-active .activity-event-label { font-size: 10px !important; letter-spacing: 0.7px !important; }
.activity-page.user-filter-active .activity-card-sep   { font-size: 9px !important; color: #38335a !important; }
.activity-page.user-filter-active .activity-card-section { font-size: 10px !important; color: #56507a !important; }
.activity-page.user-filter-active .activity-poster-col,
.activity-page.user-filter-active .activity-poster-placeholder {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 82px !important;
  min-width: 82px !important;
  align-self: stretch !important;
}
.activity-page.user-filter-active .activity-poster-img {
  min-height: 100px !important;
  border-radius: 0 !important;
}
.activity-page.user-filter-active .activity-poster-col::after {
  background: linear-gradient(to right, rgba(7,5,26,0.45) 0%, transparent 35%) !important;
}
.activity-page.user-filter-active .activity-interactions {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 6px 8px 10px 8px !important;
  border-top: 1px solid rgba(255,255,255,0.04) !important;
}
.activity-page.user-filter-active .activity-interaction-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: none !important;
  border: none !important;
  color: #635d8a !important;
  font-size: 13px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  padding: 6px 10px !important;
  border-radius: 20px !important;
  transition: color 0.15s, background 0.15s !important;
  flex: none !important;
}
.activity-page.user-filter-active .activity-interaction-btn svg {
  width: 17px !important;
  height: 17px !important;
  flex-shrink: 0 !important;
}
.activity-page.user-filter-active .activity-interaction-btn:hover {
  background: rgba(167,139,250,0.09) !important;
  color: #a78bfa !important;
}
.activity-page.user-filter-active .activity-reply-btn:hover {
  background: rgba(96,165,250,0.08) !important;
  color: #7cb9f7 !important;
}
.activity-page.user-filter-active .activity-interaction-btn.liked { color: #9b90c7 !important; }
.activity-page.user-filter-active .activity-interaction-btn.liked:hover {
  background: transparent !important;
  color: #9b90c7 !important;
}
body.light-mode .activity-page.user-filter-active .activity-card {
  background: transparent !important;
  border-bottom-color: rgba(0,0,0,0.07) !important;
}
body.light-mode .activity-page.user-filter-active .activity-action-text  { color: #7c6faa !important; }
body.light-mode .activity-page.user-filter-active .activity-card-title-inline { color: #12082e !important; }
body.light-mode .activity-page.user-filter-active .activity-card-time    { color: #9a90b5 !important; }
body.light-mode .activity-page.user-filter-active .activity-card-section { color: #9a90b5 !important; }
body.light-mode .activity-page.user-filter-active .activity-interaction-btn { color: #8878b8 !important; }

/* ── v205: Add to Shelf — universal search filter pills + result badges ── */
.shelf-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}
.shelf-filter-pill {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: 1px solid rgba(167,139,250,0.3);
  background: rgba(109,40,217,0.1);
  color: #a78bfa;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.shelf-filter-pill:hover {
  background: rgba(109,40,217,0.22);
  border-color: rgba(167,139,250,0.55);
}
.shelf-filter-pill.active {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border-color: transparent;
  color: #fff;
}
.shelf-result-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  vertical-align: middle;
  margin-left: 4px;
  font-family: 'DM Sans', sans-serif;
}
.badge-movie       { background: rgba(59,130,246,0.2);  color: #60a5fa; }
.badge-tv          { background: rgba(34,197,94,0.18);  color: #4ade80; }
.badge-anime-tv    { background: rgba(245,158,11,0.18); color: #fbbf24; }
.badge-anime-movie { background: rgba(236,72,153,0.18); color: #f9a8d4; }
.badge-game        { background: rgba(6,182,212,0.18);  color: #67e8f9; }
.badge-manga       { background: rgba(168,85,247,0.18); color: #d8b4fe; }
.badge-book        { background: rgba(249,115,22,0.18); color: #fdba74; }
.badge-generic     { background: rgba(148,163,184,0.18); color: #cbd5e1; }

body.light-mode .shelf-filter-pill {
  background: rgba(124,58,237,0.08);
  border-color: rgba(124,58,237,0.25);
  color: #6d28d9;
}
body.light-mode .shelf-filter-pill.active {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff;
  border-color: transparent;
}

/* ── v206: Main feed activity card revamp — Instagram/Twitter-inspired ── */
#community-view #activity-tab-view .activity-card {
  grid-template-columns: 44px minmax(0,1fr) 78px !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  padding: 0 !important;
  background: rgba(16, 10, 36, 0.94) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}
#community-view #activity-tab-view .activity-card:hover {
  background: rgba(22, 14, 48, 0.97) !important;
  border-color: rgba(255,255,255,0.22) !important;
  box-shadow: none !important;
}
#community-view #activity-tab-view .activity-avatar-wrap {
  grid-column: 1 !important;
  grid-row: 1 !important;
  padding: 14px 0 0 12px !important;
  width: 44px !important;
  min-width: 44px !important;
  align-self: start !important;
}
#community-view #activity-tab-view .activity-content-col {
  grid-column: 2 !important;
  grid-row: 1 !important;
  padding: 13px 10px 11px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
}
#community-view #activity-tab-view .activity-card .activity-poster-col,
#community-view #activity-tab-view .activity-card .activity-poster-placeholder {
  grid-column: 3 !important;
  grid-row: 1 !important;
  width: 78px !important;
  min-width: 78px !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  border-radius: 0 16px 0 0 !important;
}
#community-view #activity-tab-view .activity-poster-img {
  width: 78px !important;
  border-radius: 0 !important;
}
/* Full-width split interaction bar */
#community-view #activity-tab-view .activity-interactions {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: flex !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-top: 0 !important;
}
#community-view #activity-tab-view .activity-interaction-btn {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 9px 0 !important;
  border-radius: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #5e5880 !important;
  background: none !important;
  transition: background 0.15s, color 0.15s !important;
}
#community-view #activity-tab-view .activity-interaction-btn:hover {
  background: transparent !important;
  color: #a78bfa !important;
}
#community-view #activity-tab-view .activity-interaction-btn[data-activity-action="reply"]:hover {
  background: transparent !important;
  color: #7cb9f7 !important;
}
#community-view #activity-tab-view .activity-interaction-btn.liked {
  color: #5e5880 !important;
}
#community-view #activity-tab-view .activity-interaction-btn.liked:hover {
  background: transparent !important;
  color: #5e5880 !important;
}
#community-view #activity-tab-view .activity-interaction-btn + .activity-interaction-btn {
  border-left: 0 !important;
}
/* Typography */
#community-view #activity-tab-view .activity-who-row {
  margin-bottom: 2px !important;
  gap: 5px !important;
  align-items: center !important;
}
#community-view #activity-tab-view .activity-card-name {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #cec7e8 !important;
  letter-spacing: -0.1px !important;
}
#community-view #activity-tab-view .activity-action-text {
  font-size: 12.5px !important;
  color: #78719a !important;
  margin-bottom: 4px !important;
  line-height: 1.35 !important;
}
#community-view #activity-tab-view .activity-card-title-inline {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #f3f0ff !important;
  line-height: 1.25 !important;
  letter-spacing: -0.3px !important;
}
#community-view #activity-tab-view .activity-stars-row {
  margin: 5px 0 3px !important;
}
#community-view #activity-tab-view .activity-comment-preview {
  margin: 5px 0 3px !important;
  font-size: 12px !important;
}
#community-view #activity-tab-view .activity-card-bottom {
  margin-top: 7px !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}
#community-view #activity-tab-view .activity-card-time {
  font-size: 11px !important;
  color: #4a4468 !important;
}
@media (max-width: 480px) {
  #community-view #activity-tab-view .activity-card {
    grid-template-columns: 40px minmax(0,1fr) 64px !important;
    border-radius: 14px !important;
  }
  #community-view #activity-tab-view .activity-card .activity-poster-col,
  #community-view #activity-tab-view .activity-card .activity-poster-placeholder {
    width: 64px !important;
    min-width: 64px !important;
  }
  #community-view #activity-tab-view .activity-poster-img {
    width: 64px !important;
  }
}

/* ── v206: Single-user activity page updates ── */
.activity-page.user-filter-active .activity-card {
  grid-template-columns: minmax(0,1fr) 88px !important;
}
.activity-page.user-filter-active .activity-content-col {
  padding: 15px 12px 12px 16px !important;
}
.activity-page.user-filter-active .activity-poster-col,
.activity-page.user-filter-active .activity-poster-placeholder {
  width: 88px !important;
  min-width: 88px !important;
}
.activity-page.user-filter-active .activity-interactions {
  padding: 0 !important;
  gap: 0 !important;
  border-top: 0 !important;
}
.activity-page.user-filter-active .activity-interaction-btn {
  flex: 1 !important;
  justify-content: center !important;
  padding: 10px 0 !important;
  border-radius: 0 !important;
}
.activity-page.user-filter-active .activity-interaction-btn + .activity-interaction-btn {
  border-left: 0 !important;
}
.activity-page.user-filter-active .activity-card-title-inline {
  font-size: 16px !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px !important;
}
body.light-mode #community-view #activity-tab-view .activity-card {
  background: rgba(245,242,255,0.9) !important;
  border-color: rgba(255,255,255,0.58) !important;
}
body.light-mode #community-view #activity-tab-view .activity-card:hover {
  background: rgba(237,233,254,0.96) !important;
  border-color: rgba(255,255,255,0.68) !important;
}
body.light-mode #community-view #activity-tab-view .activity-card-name { color: #1e0b4a !important; }
body.light-mode #community-view #activity-tab-view .activity-action-text { color: #7c6faa !important; }
body.light-mode #community-view #activity-tab-view .activity-card-title-inline { color: #12082e !important; }
body.light-mode #community-view #activity-tab-view .activity-card-time { color: #9088ba !important; }
body.light-mode #community-view #activity-tab-view .activity-interaction-btn { color: #8878b8 !important; }
body.light-mode #community-view #activity-tab-view .activity-interactions {
  border-top-color: transparent !important;
}
body.light-mode #community-view #activity-tab-view .activity-interaction-btn + .activity-interaction-btn {
  border-left: 0 !important;
}

/* v223: My Lists category cog top-left + hard hidden category guard. */
body.main-tab-mylist #mylist-view #mylist-header #mylist-edit-controls,
#mylist-view #mylist-header #mylist-edit-controls {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  justify-content: flex-start !important;
  justify-self: stretch !important;
  align-self: start !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  border: 0 !important;
}

#mylist-view #mylist-header .mylist-edit-row {
  width: 100% !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

#mylist-view #mylist-header .mylist-cog-btn {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

#mylist-view #mylist-header .mylist-cog-btn.confirming {
  width: auto !important;
  min-width: 70px !important;
  padding: 0 13px !important;
  font-size: 11px !important;
}

#mylist-view .mylist-categories-section .section-toggle,
body:not(.light-mode):not(.true-dark-mode) #mylist-view .mylist-categories-section .section-toggle,
body.light-mode #mylist-view .mylist-categories-section .section-toggle {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
}

body #mylist-view #mylist-header .section-toggle > .section-btn.screenlist-hidden-list-tab,
body:not(.light-mode):not(.true-dark-mode) #mylist-view #mylist-header .section-toggle > .section-btn.screenlist-hidden-list-tab,
body.light-mode #mylist-view #mylist-header .section-toggle > .section-btn.screenlist-hidden-list-tab,
body.true-dark-mode #mylist-view #mylist-header .section-toggle > .section-btn.screenlist-hidden-list-tab {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* v224: cog in top-left header on My Lists */
.mylist-header-cog {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 0;
  border: none;
  background: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  transition: color 0.18s, transform 0.3s;
  flex-shrink: 0;
}
.mylist-header-cog svg {
  width: 24px;
  height: 24px;
  display: block;
}
.mylist-header-cog:hover { color: rgba(255,255,255,0.7); transform: rotate(60deg); }
body.main-tab-mylist .mylist-header-cog { display: inline-flex !important; }
body.main-tab-mylist .header-import-btn { display: none !important; }

@media (max-width: 700px) {
  body.main-tab-mylist .mylist-header-cog {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: end !important;
    margin: 0 0 0 -4px !important;
  }

  body.main-tab-mylist .header-dm-icon,
  body.main-tab-mylist .header-dm-icon svg,
  body.main-tab-mylist .mylist-header-cog svg {
    width: 24px !important;
    height: 24px !important;
  }
}

/* Settings modal */
.mylist-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: auto;
  overscroll-behavior: contain;
}
html.mylist-settings-open,
body.mylist-settings-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
.mylist-settings-panel {
  /* v847: redesigned to match the charcoal/lavender system used by the
     auth-flow panels and the card-comment composer. Was the legacy
     deep-purple #0e0c22 with cyan/teal action button; now charcoal
     surface + lavender accents end-to-end. Width tightened (was
     min-width: 230px with no max — could stretch wide). */
  position: absolute;
  min-width: 200px;
  max-width: 280px;
  background: #181c20;
  border: 1px solid rgba(196,181,253,0.22);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), 0 0 0 0.5px rgba(255,255,255,0.04);
  padding: 16px;
  font-family: Aptos, 'Aptos Display', 'Segoe UI', sans-serif;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  pointer-events: all;
  animation: mylistSettingsIn 0.2s cubic-bezier(0.34,1.56,0.64,1) both;
  transform-origin: 20px 0px;
}
.mylist-settings-panel::-webkit-scrollbar { display: none; }
.mylist-settings-panel *,
.mylist-settings-panel button {
  font-family: Aptos, 'Aptos Display', 'Segoe UI', sans-serif !important;
}

.mylist-settings-panel.closing {
  animation: mylistSettingsOut 0.15s ease-in both;
}
@keyframes mylistSettingsIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes mylistSettingsOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.7); }
}
.mylist-settings-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.mylist-settings-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.52);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 10px 0 6px;
}
.mylist-settings-section-label:first-of-type { margin-top: 0; }
.mylist-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}
.mylist-settings-row-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.mylist-settings-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.92);
}
.mylist-settings-row-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
.mylist-settings-row-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 10px;
  font-weight: 700;
}
.mylist-settings-row-label {
  font-size: 13px;
  color: #ffffff;
  flex: 1;
}
.mylist-edit-list-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(196,181,253,0.14);
  border-radius: 10px;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease;
}
.mylist-edit-list-toggle:hover { background: rgba(255,255,255,0.09); border-color: rgba(196,181,253,0.26); }
.mylist-edit-list-toggle.open { border-color: rgba(167,139,250,0.34); }
.mylist-edit-list-arrow {
  display: inline-block;
  font-size: 12px;
  opacity: 0.7;
  transition: transform 220ms cubic-bezier(0.16,1,0.3,1);
  flex-shrink: 0;
}
.mylist-edit-list-section {
  margin-top: 8px;
  border: 1px solid rgba(196,181,253,0.12);
  border-radius: 10px;
  overflow: hidden;
}
.mylist-edit-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(196,181,253,0.08);
}
.mylist-edit-list-row:last-child { border-bottom: 0; }
.mylist-edit-list-row-label {
  font-size: 13px;
  color: #ffffff;
  flex: 1;
  font-weight: 500;
}
.mylist-edit-list-count {
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  margin-left: 4px;
}
.mylist-delete-category-btn {
  font-size: 11px;
  font-weight: 700;
  color: #f87171;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.22);
  border-radius: 7px;
  padding: 4px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.mylist-delete-category-btn:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); }
.mylist-delete-category-btn.confirming {
  color: #fbbf24;
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.3);
}
.mylist-delete-category-btn:disabled { opacity: 0.5; cursor: default; }
.mylist-vis-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  min-width: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(124,111,160,0.25);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
  flex-shrink: 0;
}
.mylist-vis-toggle.on { background: #7c3aed; }
.mylist-vis-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
  pointer-events: none;
}
.mylist-vis-toggle.on .mylist-vis-knob { left: 21px; }
.mylist-settings-divider {
  height: 1px;
  background: rgba(244,240,255,0.6);
  margin: 12px 8px 12px;
  box-shadow: 0 0 10px rgba(244,240,255,0.18);
}
.mylist-settings-action-btn {
  /* v847: lavender gradient (was teal/cyan #0891b2 → #06b6d4 — legacy). */
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border: 1px solid rgba(196,181,253,0.42);
  border-radius: 999px;
  padding: 7px 18px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(139,92,246,0.22);
  transition: background 0.18s, transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.mylist-settings-action-btn:hover {
  background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  border-color: rgba(196,181,253,0.62);
  box-shadow: 0 10px 26px rgba(139,92,246,0.34);
  transform: translateY(-1px);
}


.mylist-settings-import-box {
  border: 1px solid rgba(239,68,68,0.78);
  border-radius: 13px;
  padding: 8px 10px;
  background: rgba(239,68,68,0.035);
  box-shadow: inset 0 0 0 1px rgba(127,29,29,0.16);
}
.mylist-settings-milky-divider {
  height: 1px;
  background: rgba(244,240,255,0.6);
  margin: 14px 8px 12px;
  box-shadow: 0 0 10px rgba(244,240,255,0.18);
}
.mylist-settings-clear-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mylist-clear-category-row {
  padding: 7px 0;
}
.mylist-clear-category-row .mylist-settings-row-main {
  justify-content: space-between;
}

@media (max-width: 700px) {
  /* v847: narrowed from full-width bottom sheet to a centered popover
     near the cog. The 100vw bottom-sheet read as a heavy legacy panel;
     a tighter popover matches the modernized charcoal/lavender look. */
  .mylist-settings-panel {
    width: min(86vw, 320px) !important;
    max-width: 320px !important;
    border-radius: 18px !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* v241: contain mylist page horizontally — stops native browser pan without touching html/body */
/* overflow-x: clip (not hidden) avoids creating a BFC, so overflow-y stays visible and
   the profile avatar's negative-margin offset isn't clipped */
#mylist-view { overflow-x: clip; }

/* v227: single-row compact category buttons */
body #mylist-view #mylist-header .mylist-categories-section .section-toggle,
body:not(.light-mode) #mylist-view #mylist-header .mylist-categories-section .section-toggle,
body.light-mode #mylist-view #mylist-header .mylist-categories-section .section-toggle,
body.true-dark-mode #mylist-view #mylist-header .mylist-categories-section .section-toggle {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 3px !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

body #mylist-view #mylist-header .mylist-categories-section .section-toggle > .section-btn,
body:not(.light-mode) #mylist-view #mylist-header .mylist-categories-section .section-toggle > .section-btn,
body.light-mode #mylist-view #mylist-header .mylist-categories-section .section-toggle > .section-btn,
body.true-dark-mode #mylist-view #mylist-header .mylist-categories-section .section-toggle > .section-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  padding: 6px 4px !important;
  font-size: 13px !important;
  min-height: 32px !important;
  border-radius: 10px !important;
}

/* v234: sliding pill highlight for category + status tabs */
#mylist-view #mylist-header .section-toggle,
#mylist-view #mylist-toolbar .tabs {
  position: relative !important;
}

.section-sliding-pill,
.tab-sliding-pill {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  border-radius: 999px !important;
  background: #7c3aed !important;
  box-shadow: none !important;
  will-change: transform !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
  transform: translate3d(0, 0, 0); /* no !important — JS inline styles must be able to override this */
  transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1) !important;
}
.section-sliding-pill.pill-init,
.tab-sliding-pill.pill-init {
  transition: none !important;
}

/* Buttons sit above the pill; active ones use transparent bg so pill shows */
body #mylist-view #mylist-header .section-toggle > .section-btn,
body #mylist-view #mylist-toolbar .tabs > .tab-btn {
  position: relative !important;
  z-index: 1 !important;
}

body #mylist-view #mylist-header .section-toggle > .section-btn.active,
body:not(.light-mode) #mylist-view #mylist-header .section-toggle > .section-btn.active,
body.light-mode #mylist-view #mylist-header .section-toggle > .section-btn.active,
body #mylist-view #mylist-toolbar .tabs > .tab-btn.active,
body:not(.light-mode) #mylist-view #mylist-toolbar .tabs > .tab-btn.active,
body.light-mode #mylist-view #mylist-toolbar .tabs > .tab-btn.active {
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

/* v224: nuke category count bubbles on ALL states */
body #mylist-view .section-count-bubble,
body #mylist-view #mylist-header .section-count-bubble,
body #mylist-view #mylist-header .section-btn .section-count-bubble,
body #mylist-view #mylist-header .section-btn.active .section-count-bubble,
body:not(.light-mode) #mylist-view #mylist-header .section-btn.active .section-count-bubble,
body.light-mode #mylist-view #mylist-header .section-btn.active .section-count-bubble,
body.true-dark-mode #mylist-view #mylist-header .section-btn.active .section-count-bubble {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* v224: full-bleed divider between categories and status */
body #mylist-view #mylist-header.mylist-section-card::after,
body:not(.light-mode) #mylist-view #mylist-header.mylist-section-card::after,
body.light-mode #mylist-view #mylist-header.mylist-section-card::after,
body.true-dark-mode #mylist-view #mylist-header.mylist-section-card::after {
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  margin-left: -50vw !important;
  background: rgba(196,181,253,0.18) !important;
}



/* v233: slightly enlarge My Lists overall rating */
#mylist-view .rating-area .rating-label {
  font-size: 13px !important;
}
#mylist-view .rating-area .star-label {
  font-size: 14px !important;
}
/* v235: My Lists anime export icon + swipe-safe rating zone */
#mylist-view .media-card-export-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(46, 81, 162, 0.34);
  background: rgba(255,255,255,0.065);
  vertical-align: middle;
  text-decoration: none;
  overflow: hidden;
}
#mylist-view .media-card-export-icon:hover {
  transform: translateY(-1px);
  border-color: rgba(46, 81, 162, 0.72);
}
#mylist-view .media-card-export-icon img {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
}
#mylist-view .anime-card-mal-icon {
  background: rgba(46,81,162,0.16);
}
#mylist-view .rating-area,
#mylist-view .stars,
#mylist-view .star-btn {
  touch-action: manipulation;
}
@media (max-width: 600px) {
  #mylist-view .media-card-export-icon img {
    width: 14px;
    height: 14px;
  }
}
body.light-mode #mylist-view .media-card-export-icon {
  border-color: rgba(46, 81, 162, 0.24);
  background: rgba(46,81,162,0.08);
}
body.true-dark-mode #mylist-view .media-card-export-icon {
  border-color: rgba(46, 81, 162, 0.42);
  background: rgba(46,81,162,0.14);
}

/* v239: cleaner larger season cards inside Show Episodes */
#mylist-view .season-header {
  min-height: 96px;
  padding: 12px 14px;
  gap: 14px;
  align-items: flex-start;
  border: 0 !important;
  box-shadow: none !important;
  background: rgba(255,255,255,0.035);
}
#mylist-view .season-header:hover { background: rgba(255,255,255,0.055); }
#mylist-view .season-poster {
  width: 52px;
  aspect-ratio: 2 / 3;
  flex: 0 0 52px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: none;
}
#mylist-view .season-poster-empty {
  display: block;
  background: linear-gradient(135deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025));
}
#mylist-view .season-header-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding-top: 1px;
}
#mylist-view .season-title-line {
  max-width: 100%;
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
#mylist-view .season-title {
  max-width: 100%;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#mylist-view .season-year {
  flex-shrink: 0;
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
}
#mylist-view .season-progress {
  font-size: 12px;
  color: #d8cff3;
  font-weight: 400;
}
#mylist-view .season-rating-chip {
  color: #f59e0b;
  font-size: 11px;
  font-weight: 800;
}
#mylist-view .season-header-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 66px;
}
#mylist-view .season-card-kicker {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #a99dc6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  white-space: nowrap;
}
#mylist-view .season-mark-btn {
  flex-shrink: 0;
  text-decoration: none;
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 999px;
}
body.light-mode #mylist-view .season-header {
  background: rgba(124,58,237,0.045);
  border: 0 !important;
  box-shadow: none !important;
}
body.light-mode #mylist-view .season-header:hover { background: rgba(124,58,237,0.07); }
body.light-mode #mylist-view .season-poster-empty {
  background: rgba(124,58,237,0.07);
}
body.light-mode #mylist-view .season-card-kicker {
  color: #7c6fa0;
}
body.light-mode #mylist-view .season-year {
  color: #5b21b6;
}
body.light-mode #mylist-view .season-progress {
  color: #4c1d95;
}
body.true-dark-mode #mylist-view .season-header {
  background: #000;
  border: 0 !important;
  box-shadow: none !important;
}
body.true-dark-mode #mylist-view .season-header:hover {
  background: #050505;
}
body.true-dark-mode #mylist-view .season-poster-empty {
  background: #080808;
}
body.true-dark-mode #mylist-view .season-card-kicker,
body.true-dark-mode #mylist-view .season-progress {
  color: #fff;
}
body.true-dark-mode #mylist-view .season-year {
  color: #fff;
}

/* v248: subtle season row dividers without restoring card borders */
#mylist-view .season-block {
  position: relative;
  padding-bottom: 9px;
  margin-bottom: 9px;
}
#mylist-view .season-block:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: rgba(196,181,253,0.20);
  opacity: 0.6;
}
body.light-mode #mylist-view .season-block:not(:last-child)::after {
  background: rgba(91,33,182,0.22);
  opacity: 0.6;
}
body.true-dark-mode #mylist-view .season-block:not(:last-child)::after {
  background: rgba(255,255,255,0.18);
  opacity: 0.6;
}
@media (max-width: 600px) {
  #mylist-view .season-header {
    min-height: 94px;
    padding: 12px;
    gap: 12px;
  }
  #mylist-view .season-poster {
    width: 50px;
    flex-basis: 50px;
  }
  #mylist-view .season-title {
    font-size: 14px;
  }
  #mylist-view .season-header-right {
    min-width: 58px;
    gap: 8px;
  }
  #mylist-view .season-card-kicker {
    font-size: 10px;
  }
  #mylist-view .season-mark-btn {
    font-size: 9px;
    padding: 4px 6px;
  }
}

/* v238: My Lists category/status page swipe polish */
.mylist-page-swipe-out,
.mylist-page-swipe-track,
.mylist-page-swipe-strip,
.mylist-page-swipe-panel,
#mylist-view #cards-grid,
#mylist-view #empty-state {
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.mylist-page-swipe-out,
.mylist-page-swipe-track {
  contain: layout paint style;
}

.mylist-page-swipe-strip {
  height: 100%;
  display: flex;
  will-change: transform;
}

.mylist-page-swipe-panel {
  width: 100vw;
  min-width: 100vw;
  height: 100%;
  overflow: hidden;
}

.mylist-finger-swipe-track {
  touch-action: none;
}

/* v241: universal TV/anime episode row layout + smooth episode navigation polish */
#mylist-view .ep-row {
  align-items: center;
  gap: 10px;
}
#mylist-view .ep-list,
#mylist-view .ep-scroll,
#mylist-view .season-eps,
#mylist-view .season-block {
  overflow-anchor: none;
}
#mylist-view .ep-left {
  align-items: center;
  gap: 7px;
  min-width: 0;
}
#mylist-view .ep-name {
  min-width: 0;
  flex: 1;
  text-align: left;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#mylist-view .ep-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}
#mylist-view .ep-number-inline {
  color: #a99dc6;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
#mylist-view .ep-right .ep-rating-btn {
  flex-shrink: 0;
}
body.light-mode #mylist-view .ep-number-inline {
  color: #7c6fa0;
}
body.true-dark-mode #mylist-view .ep-number-inline,
body.true-dark-mode #mylist-view .ep-name {
  color: #fff;
}
@media (max-width: 600px) {
  #mylist-view .ep-row {
    gap: 8px;
  }
  #mylist-view .ep-name {
    font-size: 13.5px;
  }
  #mylist-view .ep-right {
    gap: 5px;
  }
  #mylist-view .ep-number-inline {
    font-size: 11.5px;
  }
}


/* v249: explicit episode row number/title alignment. */
#mylist-view .ep-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}
#mylist-view .ep-title-wrap .ep-number-inline {
  margin-right: 0;
}
#mylist-view .ep-title-wrap .ep-name {
  display: block;
  flex: 1 1 auto;
}
#mylist-view .ep-right .ep-number-inline {
  display: none !important;
}



/* v252: stable season dropdown reveal; JS controls height/display to avoid hidden episode regressions. */
#mylist-view .season-eps {
  overflow: hidden;
  will-change: height, opacity;
}
@media (prefers-reduced-motion: reduce) {
  #mylist-view .season-eps {
    transition: none !important;
  }
}


/* v253: iOS/PWA-safe season dropdown tapping. */
#mylist-view .season-header {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}


/* v301: Full-page post polish — brighter dark dividers, bottom reply composer, delete X only inside post page. */
#feed-post-page {
  --feed-post-divider: rgba(255, 255, 255, 0.16);
  --feed-post-surface: rgba(8, 6, 18, 0.985);
  overflow: hidden !important;
}
body.true-dark-mode #feed-post-page {
  --feed-post-divider: rgba(255, 255, 255, 0.20);
  --feed-post-surface: rgba(5, 5, 5, 0.985);
}
/* v430: 100vh full-height inner retired — bottom-sheet rules above own height
   (81vh / 81dvh). We keep flex-column + theme background, but force position +
   width + height to inherit from the v430 rule by leaving them unset here. */
#feed-post-page .overlay-page-inner {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: var(--feed-post-surface) !important;
}
#feed-post-page .overlay-page-header {
  flex: 0 0 auto !important;
  border-bottom-color: var(--feed-post-divider) !important;
  background: rgba(8, 6, 18, 0.92) !important;
  transform: translateZ(0);
}
body.true-dark-mode #feed-post-page .overlay-page-header {
  background: rgba(5, 5, 5, 0.94) !important;
}
#feed-post-page .overlay-page-title {
  flex: 1 1 auto;
  min-width: 0;
}
.feed-post-page-delete-btn {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
  color: #f8f4ff;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  font-weight: 650;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background 180ms ease, border-color 180ms ease, color 180ms ease;
  will-change: transform;
}
.feed-post-page-delete-btn:active {
  transform: scale(0.92) translateZ(0);
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.52);
  color: #fecaca;
}
#feed-post-page .overlay-page-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important;
  scroll-padding-bottom: calc(126px + env(safe-area-inset-bottom, 0px));
  transform: translateZ(0);
}
#feed-post-detail-container {
  border-bottom-color: var(--feed-post-divider) !important;
}
.x-post-actions-row {
  border-top-color: var(--feed-post-divider) !important;
}
#feed-post-replies-list {
  padding: 0 0 14px !important;
}
.feed-reply-item,
.x-reply-item {
  border-bottom-color: var(--feed-post-divider) !important;
}
.feed-reply-thread-line {
  background: var(--feed-post-divider) !important;
}
#feed-post-replies-composer {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  z-index: 30 !important;
  width: min(100%, 640px) !important;
  transform: translate3d(-50%, 0, 0) !important;
  padding: 11px 16px calc(11px + env(safe-area-inset-bottom, 0px)) !important;
  border-top: 1px solid var(--feed-post-divider) !important;
  border-bottom: 0 !important;
  background: rgba(8, 6, 18, 0.94) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 -14px 34px rgba(0,0,0,0.34);
  contain: layout paint style;
}
body.true-dark-mode #feed-post-replies-composer {
  background: rgba(5,5,5,0.95) !important;
}
#feed-post-replies-composer .feed-reply-composer {
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 7px !important;
}
#feed-post-replies-composer .feed-reply-avatar {
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 36px !important;
}
#feed-post-replies-composer .feed-reply-input {
  min-height: 38px !important;
  max-height: 96px !important;
  padding: 9px 13px !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.055) !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
}
#feed-post-replies-composer .feed-reply-input:focus {
  border-color: rgba(167,139,250,0.46) !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
#feed-post-replies-composer .feed-reply-actions {
  display: flex !important;
  justify-content: flex-end !important;
  padding-left: 46px !important;
  margin-top: 0 !important;
}
#feed-post-replies-composer #feed-reply-btn {
  min-height: 38px !important;
  min-width: 78px !important;
  padding: 0 18px !important;
}
body.light-mode #feed-post-page {
  --feed-post-divider: rgba(18, 8, 46, 0.12);
  --feed-post-surface: rgba(255,255,255,0.985);
}
body.light-mode #feed-post-replies-composer {
  background: rgba(255,255,255,0.94) !important;
  box-shadow: 0 -14px 34px rgba(18,8,46,0.12);
}
body.light-mode #feed-post-replies-composer .feed-reply-input {
  background: #f8f6ff !important;
  color: #12082e !important;
  border-color: rgba(124,58,237,0.18) !important;
}
@media (max-width: 768px) {
  #feed-post-page .overlay-page-content {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #feed-post-replies-composer {
    width: 100% !important;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .feed-post-page-delete-btn {
    width: 36px;
    height: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .feed-post-page-delete-btn,
  #feed-post-replies-composer {
    transition: none !important;
  }
}

/* v276 swipe-back rules retired — v430 bottom-sheet animation owns the page now.
   The swipe-back classes are forced inert so any stale class on #feed-post-page
   cannot fight the bottom-sheet transform. The wrapper itself stays untouched
   (position/inset/background owned by the v430 block above). */
#feed-post-page.feed-post-swipe-dragging,
#feed-post-page.feed-post-swipe-closing,
#feed-post-page.feed-post-swipe-restoring {
  transform: none !important;
  opacity: 1 !important;
  transition: none !important;
}
.feed-post-page-delete-btn {
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #f8f4ff !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
}
.feed-post-page-delete-btn:active {
  transform: scale(0.9) translateZ(0) !important;
  background: transparent !important;
  border-color: transparent !important;
  color: #fecaca !important;
}
.screenlist-delete-post-modal {
  background: rgba(3, 2, 10, 0.72) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}
.screenlist-delete-post-card {
  width: min(92vw, 360px) !important;
  padding: 22px 18px 16px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(255,255,255,0.11) !important;
  background: #11101a !important;
  box-shadow: 0 24px 70px rgba(0,0,0,0.52) !important;
  transform: translate3d(0, 10px, 0) scale(0.985);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), opacity 180ms ease !important;
}
.screenlist-delete-post-modal.open .screenlist-delete-post-card {
  transform: translate3d(0, 0, 0) scale(1);
}
.screenlist-delete-post-copy p {
  margin: 0 0 18px !important;
  color: #f8f4ff !important;
  font-size: 15px !important;
  line-height: 1.42 !important;
  font-weight: 650 !important;
  text-align: center !important;
}
.screenlist-delete-post-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 0 !important;
}
.screenlist-delete-post-cancel,
.screenlist-delete-post-confirm {
  min-height: 40px !important;
  border-radius: 999px !important;
  padding: 0 16px !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  font-family: 'DM Sans', sans-serif !important;
}
.screenlist-delete-post-cancel {
  color: #ffffff !important;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
}
.screenlist-delete-post-confirm {
  color: #ffffff !important;
  background: #dc2626 !important;
  border: 1px solid #ef4444 !important;
  box-shadow: none !important;
}
.screenlist-delete-post-confirm:active,
.screenlist-delete-post-cancel:active {
  transform: scale(0.96);
}
.feed-reply-item.feed-reply-nested,
.x-reply-item.feed-reply-nested {
  padding-left: calc(20px + (var(--reply-depth, 0) * 22px)) !important;
  background: rgba(255,255,255,0.012);
}
.feed-reply-children {
  margin-top: 12px;
  border-left: 1px solid var(--feed-post-divider, rgba(255,255,255,0.16));
}
.feed-reply-children .feed-reply-item,
.feed-reply-children .x-reply-item {
  padding-right: 0 !important;
  padding-bottom: 12px !important;
  border-bottom: 0 !important;
}
.feed-reply-inline-reply {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9b90c7;
  padding: 7px 0 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feed-reply-inline-reply:active {
  color: #c4b5fd;
  transform: scale(0.96);
}
.feed-reply-context {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 46px 8px;
  padding: 0;
  color: #b8afd1;
  font-size: 12px;
  font-weight: 750;
}
.feed-reply-context button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #ffffff;
  width: 28px;
  height: 26px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
body.light-mode .screenlist-delete-post-card {
  background: #ffffff !important;
  border-color: rgba(18,8,46,0.12) !important;
  box-shadow: 0 24px 70px rgba(18,8,46,0.18) !important;
}
body.light-mode .screenlist-delete-post-copy p {
  color: #12082e !important;
}
body.light-mode .screenlist-delete-post-cancel {
  color: #12082e !important;
  border-color: rgba(18,8,46,0.16) !important;
}
body.light-mode .feed-reply-inline-reply,
body.light-mode .feed-reply-context {
  color: #6d5aa8;
}
body.light-mode .feed-reply-context button {
  color: #12082e;
}
@media (max-width: 768px) {
  #feed-post-page {
    box-shadow: -12px 0 34px rgba(0,0,0,0.34);
  }
  .feed-post-page-delete-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 26px !important;
  }
  .feed-reply-item.feed-reply-nested,
  .x-reply-item.feed-reply-nested {
    padding-left: calc(16px + (var(--reply-depth, 0) * 18px)) !important;
  }
  .feed-reply-context {
    margin: 0 42px 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #feed-post-page.feed-post-swipe-closing,
  #feed-post-page.feed-post-swipe-restoring,
  .screenlist-delete-post-card {
    transition: none !important;
  }
}


/* v278 full-page replies retired — v430 bottom-sheet inner owns sizing.
   Keep flex-column behavior so header/content/composer stack correctly inside the sheet. */
#feed-post-page {
  overflow: hidden !important;
}
#feed-post-page .overlay-page-inner {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#feed-post-page .overlay-page-header {
  flex: 0 0 auto !important;
}
#feed-post-page .overlay-page-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding-bottom: calc(var(--feed-post-composer-height, 74px) + var(--feed-reply-keyboard-offset, 0px) + 14px) !important;
  scroll-padding-bottom: calc(var(--feed-post-composer-height, 74px) + var(--feed-reply-keyboard-offset, 0px) + 18px) !important;
}
#feed-post-replies-composer {
  bottom: var(--feed-reply-keyboard-offset, 0px) !important;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translate3d(-50%, 0, 0) !important;
  will-change: transform !important;
}
#feed-post-replies-composer .feed-reply-composer {
  gap: 8px !important;
  margin-bottom: 5px !important;
}
#feed-post-replies-composer .feed-reply-avatar {
  flex: 0 0 32px !important;
  width: 32px !important;
  height: 32px !important;
}
#feed-post-replies-composer .feed-reply-input {
  min-height: 32px !important;
  max-height: 72px !important;
  padding: 6px 11px !important;
  font-size: 16px !important;
  line-height: 1.18 !important;
  overflow-y: auto !important;
}
#feed-post-replies-composer .feed-reply-actions {
  padding-left: 40px !important;
}
#feed-post-replies-composer #feed-reply-btn {
  min-height: 32px !important;
  min-width: 68px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
}
.feed-reply-item.feed-reply-nested,
.x-reply-item.feed-reply-nested,
.feed-reply-item.feed-reply-threaded,
.x-reply-item.feed-reply-threaded {
  padding-left: 20px !important;
  background: transparent !important;
}
.feed-reply-children,
.feed-reply-children .feed-reply-item,
.feed-reply-children .x-reply-item {
  margin: 0 !important;
  border-left: 0 !important;
  padding-left: 0 !important;
}
.feed-reply-thread-line {
  min-height: 22px !important;
  background: rgba(255,255,255,0.18) !important;
}
body.true-dark-mode .feed-reply-thread-line,
body.true-dark-mode .feed-reply-item,
body.true-dark-mode .x-reply-item {
  border-color: rgba(255,255,255,0.18) !important;
}
@media (max-width: 768px) {
  #feed-post-page .overlay-page-content {
    padding-bottom: calc(var(--feed-post-composer-height, 68px) + var(--feed-reply-keyboard-offset, 0px) + 12px) !important;
  }
  #feed-post-replies-composer {
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .feed-reply-item.feed-reply-nested,
  .x-reply-item.feed-reply-nested,
  .feed-reply-item.feed-reply-threaded,
  .x-reply-item.feed-reply-threaded {
    padding-left: 16px !important;
  }
}

/* v279: Full post floating composer rebuild — separate fixed layer, no swipe-transform conflict. */
#feed-post-page {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: pan-y !important;
  transform: none !important;
  box-shadow: none !important;
}
#feed-post-page.feed-post-swipe-dragging,
#feed-post-page.feed-post-swipe-closing,
#feed-post-page.feed-post-swipe-restoring {
  transform: none !important;
  transition: none !important;
  opacity: 1 !important;
}
/* v430 retired the full-height + transform:none rules below. Bottom-sheet inner
   now controls position/height/transform from the v430 block at the top of the
   file. Preserve flex-column + overflow so internal layout still stacks. */
#feed-post-page .overlay-page-inner {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#feed-post-page .overlay-page-header {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 14 !important;
}
#feed-post-page .overlay-page-content,
#feed-post-scroll-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding-bottom: calc(var(--feed-post-composer-height, 54px) + var(--feed-reply-keyboard-offset, 0px) + 20px) !important;
  scroll-padding-bottom: calc(var(--feed-post-composer-height, 54px) + var(--feed-reply-keyboard-offset, 0px) + 24px) !important;
  transform: translateZ(0) !important;
}
#feed-post-replies-composer.feed-post-floating-composer,
#feed-post-replies-composer {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: var(--feed-reply-keyboard-offset, 0px) !important;
  z-index: 1000001 !important;
  width: min(100%, 640px) !important;
  transform: translate3d(-50%, 0, 0) !important;
  margin: 0 !important;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
  border-top: 1px solid var(--feed-post-divider, rgba(255,255,255,0.16)) !important;
  border-bottom: 0 !important;
  background: rgba(8, 6, 18, 0.97) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  backdrop-filter: blur(18px) !important;
  box-shadow: 0 -10px 26px rgba(0,0,0,0.34) !important;
  contain: layout paint !important;
}
body.true-dark-mode #feed-post-replies-composer {
  background: rgba(5,5,5,0.98) !important;
}
#feed-post-replies-composer .feed-reply-context {
  margin: 0 0 5px 40px !important;
  min-height: 16px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}
#feed-post-replies-composer .feed-reply-composer {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
}
#feed-post-replies-composer .feed-reply-avatar {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
}
#feed-post-replies-composer .feed-reply-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 30px !important;
  height: 30px !important;
  max-height: 56px !important;
  padding: 5px 11px !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.055) !important;
  color: #f8f4ff !important;
  font-size: 14px !important;
  line-height: 1.22 !important;
  resize: none !important;
  overflow-y: auto !important;
  transform: translateZ(0) !important;
}
#feed-post-replies-composer .feed-reply-input:focus {
  border-color: rgba(167,139,250,0.36) !important;
  box-shadow: none !important;
  outline: none !important;
}
#feed-post-replies-composer .feed-reply-actions {
  display: none !important;
}
#feed-post-replies-composer #feed-reply-btn {
  flex: 0 0 auto !important;
  min-height: 30px !important;
  height: 30px !important;
  min-width: 58px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}
#feed-post-replies-list {
  padding-bottom: 12px !important;
}
.feed-reply-item,
.x-reply-item,
.feed-reply-item.feed-reply-nested,
.x-reply-item.feed-reply-nested,
.feed-reply-item.feed-reply-threaded,
.x-reply-item.feed-reply-threaded {
  padding: 14px 16px !important;
  gap: 10px !important;
  background: transparent !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--feed-post-divider, rgba(255,255,255,0.16)) !important;
}
.feed-reply-avatar-col {
  flex: 0 0 34px !important;
  width: 34px !important;
}
.feed-reply-avatar-img {
  width: 34px !important;
  height: 34px !important;
}
.feed-reply-content {
  min-width: 0 !important;
  flex: 1 1 auto !important;
}
.feed-reply-thread-line {
  width: 1px !important;
  margin: 7px auto 0 !important;
  min-height: 24px !important;
  background: rgba(255,255,255,0.20) !important;
}
body.true-dark-mode .feed-reply-thread-line {
  background: rgba(255,255,255,0.23) !important;
}
.feed-reply-inline-reply {
  padding-top: 6px !important;
}
body.light-mode #feed-post-replies-composer {
  background: rgba(255,255,255,0.97) !important;
  box-shadow: 0 -10px 26px rgba(18,8,46,0.12) !important;
}
body.light-mode #feed-post-replies-composer .feed-reply-input {
  background: #f8f6ff !important;
  color: #12082e !important;
  border-color: rgba(124,58,237,0.16) !important;
}
@media (max-width: 768px) {
  #feed-post-replies-composer.feed-post-floating-composer,
  #feed-post-replies-composer {
    width: 100% !important;
    left: 0 !important;
    transform: translate3d(0, 0, 0) !important;
    padding: 5px 9px calc(5px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #feed-post-page .overlay-page-content,
  #feed-post-scroll-content {
    padding-bottom: calc(var(--feed-post-composer-height, 50px) + var(--feed-reply-keyboard-offset, 0px) + 18px) !important;
  }
  #feed-post-replies-composer .feed-reply-input {
    font-size: 16px !important; /* prevent iPhone zoom */
    min-height: 30px !important;
    height: 30px !important;
    padding: 4px 10px !important;
  }
  #feed-post-replies-composer .feed-reply-avatar {
    flex-basis: 29px !important;
    width: 29px !important;
    height: 29px !important;
    min-width: 29px !important;
  }
  #feed-post-replies-composer #feed-reply-btn {
    height: 30px !important;
    min-height: 30px !important;
  }
  .feed-reply-item,
  .x-reply-item,
  .feed-reply-item.feed-reply-nested,
  .x-reply-item.feed-reply-nested,
  .feed-reply-item.feed-reply-threaded,
  .x-reply-item.feed-reply-threaded {
    padding: 13px 14px !important;
  }
}


/* v372: Patch Notes is dev-only; remove public entrypoints while preserving version footer. */
button[onclick*="openPatchNotesPage"],
.screenlist-patch-notes-link {
  display: none !important;
}
