/* =========================================================
   SHARED: Global Resets & Layout
   ========================================================= */
* { box-sizing: border-box; }

.streams-layout {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  gap: 20px;
  padding: 0 20px;
}

.streams-main {
  flex: 1;
  min-width: 0; /* Prevents flex overflow */
}

/* =========================================================
   SHARED: Sidebar Navigation
   ========================================================= */
.streams-sidebar {
  width: 200px;
  background: var(--lfl-surface, #111);
  border-radius: 10px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 70px;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-group-title {
  padding: 10px 16px 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--lfl-muted, #777);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item {
  background: transparent;
  border: none;
  color: var(--lfl-text, #eee);
  text-align: left;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.sidebar-item:hover { background: var(--lfl-surface-soft, #1d1d1d); }
.sidebar-item.active { background: var(--lfl-blue-solid, #007bff); color: var(--lfl-on-accent, #fff); }

.lfl-connect-icon {
  width: 1.18em;
  height: 1.18em;
  flex: 0 0 1.18em;
  display: inline-block;
  vertical-align: middle;
  overflow: visible;
}

.notes-default-view {
  position: relative;
  margin: 4px 10px 2px;
  padding-top: 10px;
  border-top: 1px solid var(--lfl-border, rgba(255,255,255,0.1));
}

.notes-default-toggle,
.notes-default-option {
  width: 100%;
  border: 1px solid var(--lfl-border, rgba(255,255,255,0.12));
  border-radius: 6px;
  background: var(--lfl-surface, #181818);
  color: var(--lfl-text, #ddd);
  cursor: pointer;
  text-align: left;
}

.notes-default-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  font-size: 0.8rem;
}

.notes-default-toggle:hover,
.notes-default-toggle:focus-visible,
.notes-default-option:hover,
.notes-default-option:focus-visible { border-color: var(--lfl-border, #666); background: var(--lfl-surface-soft, #222); color: var(--lfl-text, #fff); }

.notes-default-view.open .notes-default-toggle .chev { transform: rotate(180deg); }

.notes-default-menu {
  display: grid;
  gap: 4px;
  margin-top: 5px;
  padding: 4px;
  border: 1px solid var(--lfl-border, rgba(255,255,255,0.12));
  border-radius: 7px;
  background: var(--lfl-surface, #101010);
}

.notes-default-menu[hidden] { display: none; }

.notes-default-option {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 5px;
  padding: 7px 8px;
  border-color: transparent;
  font-size: 0.8rem;
}

.notes-default-option.active { color: var(--lfl-text, #fff); background: var(--lfl-surface-soft, #202020); }

.notes-default-option:disabled { cursor: wait; opacity: 0.65; }

.notes-default-status {
  display: block;
  padding: 5px 2px 0;
  color: var(--lfl-muted, #aaa);
  font-size: 0.72rem;
  line-height: 1.25;
}

.notes-default-status:empty { display: none; }

/* Toggle button (Mobile) */
.sidebar-toggle {
  display: none;
  width: 100%;
  background: var(--lfl-surface, #111);
  color: var(--lfl-text, #eee);
  border: 1px solid var(--lfl-border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  justify-content: space-between;
  align-items: center;
}
.sidebar-toggle .chev { opacity: 0.8; transition: transform 0.15s ease; }

/* =========================================================
   SHARED: Tabs & Tools
   ========================================================= */
.notes-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--lfl-border, #ddd);
}



.notes-tab {
  background: transparent;
  border: none;
  color: var(--lfl-text, #eee);
  text-align: left;
  padding: 10px 16px;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.notes-tab:hover { background: var(--lfl-surface-soft, #1d1d1d); }
.notes-tab.active { background: var(--lfl-blue-solid, #007bff); color: var(--lfl-on-accent, #fff); }


.notes-tabs-tools { margin-left: auto; display: flex; gap: 8px; }
.notes-tab-tool {
  width: 46px; height: 34px; border-radius: 10px;
  border: 1px solid var(--lfl-border, rgba(255,255,255,0.12));
  background: var(--lfl-wash, rgba(255,255,255,0.06));
  color: inherit; font-weight: 800; cursor: pointer; line-height: 1;
}
.notes-tab-tool:hover { background: var(--lfl-wash, rgba(255,255,255,0.10)); }

.note-link-preview {
  display: block;
  width: min(100%, 480px);
  margin: 8px 0;
  overflow: hidden;
  border: 1px solid var(--lfl-border, rgba(255,255,255,0.14));
  border-radius: 12px;
  background: var(--lfl-surface, #0d0d0d);
  color: var(--lfl-text, #fff);
  text-decoration: none;
}
.note-link-preview:hover {
  border-color: var(--lfl-border, rgba(255,255,255,0.28));
  background: var(--lfl-surface, #131313);
}
.note-link-preview-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--lfl-surface, #050505);
}
.note-link-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
}
.note-link-preview-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.3;
}
.note-link-preview-domain {
  color: var(--lfl-muted, #aaa);
  font-size: 12px;
}
.note-link-preview-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  margin-top: 2px;
  color: var(--lfl-text, #c7c7c7);
  font-size: 13px;
  line-height: 1.35;
}
.note-link-preview-description[hidden] {
  display: none;
}
.note-link-preview--no-image .note-link-preview-copy {
  min-height: 54px;
  justify-content: center;
}

.notes-tab-desc {
  text-align: center; margin: 0 0 18px; color: var(--lfl-text, #cfcfcf); font-size: 14px;
}
#notes-status {
  text-align: center; margin: 10px 0 18px; color: var(--lfl-text, #ccc); font-size: 14px;
}

/* Shared header and content width for My Notes and Notes Feed. */
.notes-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 8px;
}

.notes-page-title {
  margin: 0;
  color: var(--lfl-text, #fff);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}

.notes-page-description {
  margin: 0 0 18px;
  text-align: left;
}

.notes-page-status {
  min-height: 22px;
  margin: 10px 0 14px;
  color: var(--lfl-text, #ccc);
  font-size: 13px;
  text-align: left;
}

/* =========================================================
   SHARED: Composer
   ========================================================= */
.notes-compose {
  background: var(--lfl-surface, #111);
  border: 1px solid var(--lfl-border, #222);
  border-radius: 10px;
  padding: 12px;
  margin: 0 auto 18px;
  max-width: 820px;
}

.notes-compose textarea {
  width: 100%; min-height: 80px; resize: vertical; padding: 10px;
  border-radius: 8px; border: 1px solid var(--lfl-border, #333); background: var(--lfl-surface, #000); color: var(--lfl-text, #fff); outline: none;
}

.notes-compose-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.notes-publish-btn {
  background: var(--lfl-blue-solid, #0a84ff); border: none; color: var(--lfl-on-accent, #fff); padding: 8px 12px;
  border-radius: 8px; cursor: pointer;
}
.notes-publish-btn:hover { filter: brightness(1.05); }

.notes-compose-status { color: var(--lfl-muted, #bbb); font-size: 13px; }
.notes-compose-hint { margin-top: 8px; color: var(--lfl-muted, #aaa); font-size: 12px; }

.notes-compose-panel {
  margin: 10px 0 14px; padding: 10px; border-radius: 14px;
  border: 1px solid var(--lfl-border, rgba(255,255,255,0.10)); background: var(--lfl-wash, rgba(255,255,255,0.04));
}
.notes-compose-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 8px;
}
.notes-compose-panel-title { font-weight: 700; opacity: 0.9; }
.notes-compose-close {
  border: none; background: transparent; color: inherit;
  opacity: 0.7; cursor: pointer; font-size: 16px;
}
.notes-compose-close:hover { opacity: 1; }

/* =========================================================
   SHARED: Note Cards & Feed
   ========================================================= */
.notes-feed {
  max-width: 820px; display: flex; flex-direction: column;
  gap: 12px; padding-bottom: 30px;
}

.notesdir-main .notes-feed {
  width: 100%;
  max-width: 100%;
}

.note-card {
  background: var(--lfl-surface, #111); border: 1px solid var(--lfl-border, #222); border-radius: 10px; padding: 12px;
}

.note-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.note-avatar {
  width: 44px; height: 44px; border-radius: 999px; object-fit: cover;
  background: var(--lfl-surface-soft, #222); border: 1px solid var(--lfl-border, #333);
}
.note-head--compact .note-avatar,
.note-avatar--compact {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.meta-id { cursor: pointer; }

.note-who {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.note-head-mainrow {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.note-head-mainrow--standard > .note-identity {
  flex: 1 1 auto;
}
.note-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.note-name {
  font-weight: 600; color: var(--lfl-text, #fff); font-size: 14px;
  display: inline-flex; align-items: center; gap: 4px;
  min-width: 0; max-width: 100%; padding: 1px 4px; border-radius: 8px;
  text-decoration: none;
}
.note-display-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* My Notes and Notes Network emphasize the primary author without enlarging
   usernames inside embedded notes or other LFL pages. */
body.notes-username-emphasis #notesFeed > .note-card > .note-head .note-name {
  font-size: 16px;
  font-weight: 700;
}
.lfl-gender-badge {
  width: 18px; height: 18px; flex: 0 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; background: #393838;
  font-size: 11px; font-weight: 700; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.lfl-gender-male { background: #4da3ff; }
.lfl-gender-female { background: #ff2a8d; }
.lfl-gender-trans_male,
.lfl-gender-trans_female { background: #9e00ad; }
.lfl-gender-other { background: #9e0404; }
.lfl-gender-prefer_not_to_say { background: #8b5a2b; }
.lfl-gender-not_set { background: #393838; }
.lfl-country-flag {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}
.note-identity-meta {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
  opacity: .9;
}
.lfl-profile-icon {
  width: 18px; height: 18px; flex: 0 0 18px;
  border-radius: 50%; object-fit: cover;
}
.meta-id:hover { background: var(--lfl-wash, rgba(255,255,255,0.06)); }

.note-meta { display: flex; align-items: center; gap: 8px; color: var(--lfl-muted, #aaa); font-size: 12px; flex-wrap: wrap; }
.meta-id { display: inline-block; padding: 2px 6px; border-radius: 8px; opacity: 0.85; }
.meta-id:hover { opacity: 1; text-decoration: underline; }

/* Event three-dot menu */
.note-head-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.note-head-mainrow--standard .note-head-tools .note-identity-meta {
  min-height: 18px;
  padding-left: 0;
  opacity: .9;
}

/* Local, normalized Watchlist changes. These cards intentionally avoid the
   normal event actions/menu because they are derived from kind:3 snapshots,
   not standalone signed Nostr notes. */
.watchlist-activity-card {
  border-color: var(--lfl-blue-border, rgba(89, 163, 255, 0.28));
  background: linear-gradient(135deg, var(--lfl-blue-wash, rgba(20, 44, 67, 0.48)), var(--lfl-surface, #111) 58%);
}

.watchlist-activity-card--removed {
  border-color: var(--lfl-red-border, rgba(255, 122, 122, 0.25));
  background: linear-gradient(135deg, var(--lfl-wash-strong, rgba(65, 30, 34, 0.42)), var(--lfl-surface, #111) 58%);
}

.watchlist-activity-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.watchlist-activity-kind {
  margin-top: 3px;
  text-align: right;
  color: var(--lfl-blue-text, #9eb8d2);
  font-size: 0.8em;
  opacity: 0.78;
}

.watchlist-activity-body {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.55;
}

.watchlist-activity-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--lfl-on-accent, #fff);
  background: var(--lfl-blue-solid, #1976d2);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}

.watchlist-activity-card--removed .watchlist-activity-symbol {
  background: var(--lfl-red-solid, #8f3434);
}

.watchlist-activity-target {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 3px;
  border: 1px solid var(--lfl-border, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  color: var(--lfl-blue-text, #dbeeff);
  text-decoration: none;
  vertical-align: middle;
}

.watchlist-activity-target:hover {
  border-color: var(--lfl-blue-border, rgba(89, 163, 255, 0.65));
  background: var(--lfl-blue-wash, rgba(89, 163, 255, 0.1));
}

.watchlist-activity-target img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--lfl-surface-soft, #222);
}

.watchlist-activity-date {
  margin: 6px 0 0;
  text-align: right;
  font-size: 0.73em;
  opacity: 0.6;
}

/* Leave the same right-side space as the three-dot button so the activity
   label aligns with the identity tools instead of sitting beneath the menu. */
.note-kind-row { padding-right: 31px; }
.note-kind-label {
  color: var(--lfl-muted, #aaa);
  font-weight: 750;
  letter-spacing: .04em;
}

.event-menu {
  position: relative;
  display: inline-flex;
  z-index: 20;
}

.event-menu-toggle,
.watchlist-activity-menu-toggle {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--lfl-muted, #aaa);
  font: 700 22px/1 system-ui, sans-serif;
  cursor: pointer;
}

.event-menu-toggle:hover,
.event-menu-toggle:focus-visible,
.event-menu-toggle[aria-expanded="true"],
.watchlist-activity-menu-toggle:hover,
.watchlist-activity-menu-toggle:focus-visible,
.watchlist-activity-menu-toggle[aria-expanded="true"] {
  color: var(--lfl-text, #fff);
  background: var(--lfl-wash, rgba(255, 255, 255, 0.09));
  outline: none;
}

.event-menu-popover {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: max-content;
  min-width: 174px;
  padding: 6px;
  border: 1px solid var(--lfl-border, #3c3c3c);
  border-radius: 10px;
  background: var(--lfl-surface, #191919);
  box-shadow: 0 12px 30px var(--lfl-shadow, rgba(0, 0, 0, 0.45));
  z-index: 1000;
}

.event-menu-popover[hidden] { display: none; }

.event-menu-item,
.watchlist-activity-menu-item {
  width: 100%;
  display: block;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--lfl-text, #eee);
  font: 500 13px/1.25 system-ui, sans-serif;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.event-menu-item:hover,
.event-menu-item:focus-visible,
.watchlist-activity-menu-item:hover,
.watchlist-activity-menu-item:focus-visible {
  background: var(--lfl-wash, rgba(255, 255, 255, 0.09));
  outline: none;
}

.event-menu-item:disabled,
.watchlist-activity-menu-item:disabled {
  opacity: 0.55;
  cursor: wait;
}

.event-menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: var(--lfl-surface-hover, #363636);
}

.event-menu-item--danger { color: var(--lfl-red-text, #ff7777); }
.event-menu-item--danger:hover,
.event-menu-item--danger:focus-visible { background: var(--lfl-red-wash, rgba(255, 65, 65, 0.13)); }

.event-menu-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 14px);
  max-width: min(90vw, 520px);
  padding: 10px 14px;
  border: 1px solid var(--lfl-green-border, #3d6349);
  border-radius: 10px;
  background: var(--lfl-surface-soft, #18271d);
  color: var(--lfl-text, #eaffef);
  box-shadow: 0 10px 28px var(--lfl-shadow, rgba(0, 0, 0, 0.45));
  font: 600 13px/1.3 system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 10000;
}

.event-menu-toast[data-tone="error"] {
  border-color: var(--lfl-red-border, #744040);
  background: var(--lfl-surface-soft, #2d1919);
  color: var(--lfl-text, #ffe9e9);
}

.event-menu-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 560px) {
  .event-menu-popover { min-width: 164px; }
  .event-menu-item,
  .watchlist-activity-menu-item { padding: 9px 10px; }
}

.lfl-note-view {
  width: min(820px, calc(100% - 24px));
  margin: 28px auto;
}

.lfl-note-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lfl-note-view-head h2 { margin: 0; }

#noteViewStatus:empty { display: none; }

.lfl-note-view-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

/*
 * .note-pill sets display:inline-flex below, which otherwise overrides the
 * browser's built-in [hidden] rule. Keep conditional note-page controls truly
 * absent until note-view.js decides that they are usable in this tab.
 */
.lfl-note-view-controls > [hidden] {
  display: none !important;
}

.lfl-note-view-controls--bottom {
  justify-content: flex-start;
  margin-top: 18px;
  padding-top: 14px;
  padding-right: 58px;
  border-top: 1px solid var(--lfl-border, #292929);
}

.lfl-note-view-controls--bottom > [data-note-view-back] {
  min-height: 46px;
  flex: 1 1 280px;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 750;
}

.lfl-note-view-controls--bottom > [data-note-view-close] {
  min-height: 46px;
  padding-inline: 18px;
}

.lfl-note-view-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid var(--lfl-border, #292929);
  border-radius: 12px;
  background: var(--lfl-surface, #111);
  color: var(--lfl-muted, #999);
  font-size: 12px;
}

.lfl-note-view-count strong {
  color: var(--lfl-text, #eef7ff);
  font-size: 16px;
}

.lfl-note-thread {
  margin-top: 24px;
}

.lfl-note-thread h3 {
  margin: 0 0 6px;
}

.lfl-note-thread > p {
  margin: 0 0 12px;
  color: var(--lfl-muted, #999);
  font-size: 13px;
}

.lfl-note-thread-more {
  display: flex;
  justify-content: center;
  margin: 14px 0 4px;
}

.lfl-thread-branch {
  margin-left: min(calc(var(--thread-depth, 0) * 24px), 120px);
  padding-left: calc(var(--thread-depth, 0) * 2px);
  border-left: calc(min(var(--thread-depth, 0), 1) * 2px) solid var(--lfl-amber-border, rgba(255, 153, 0, .28));
}

@media (max-width: 640px) {
  .lfl-thread-branch {
    margin-left: min(calc(var(--thread-depth, 0) * 10px), 40px);
  }
}

/* Body */
.note-body {
  color: var(--lfl-text, #eee); font-size: 14px; line-height: 1.45;
  word-break: break-word;
}
.note-line { margin: 2px 0; }
.note-line-empty { height: 8px; }

/* DMs arrows */
.note-body dm-arrow { color: var(--lfl-text, #eee); }
.dm-arrow {
  text-align: center; opacity: 0.75; font-size: 14px; padding: 6px 0;
}
.note-body .zap-sats { color: var(--lfl-amber-text, #f7931a); font-weight: 800; }

/* Actions */
.note-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.note-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font-size: 13px; text-decoration: none;
  background: var(--lfl-surface-soft, #222); color: var(--lfl-text, #eee); border: 1px solid var(--lfl-border, #444); cursor: pointer;
}
.note-pill:hover { background: var(--lfl-surface-hover, #333); border-color: var(--lfl-amber-border, #ff9900); color: var(--lfl-text, #fff); }

/* Stats */
.note-engagement-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--lfl-border, rgba(255, 255, 255, 0.08));
}
.note-engagement-row > .note-stats {
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.note-stats {
  display: flex; gap: 6px; margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--lfl-border, rgba(255, 255, 255, 0.08)); font-size: 17px; opacity: 0.95;
}
.note-stats--split {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
.note-stat { white-space: nowrap; }
.note-interaction-controls {
  min-width: max-content;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.note-interaction-control {
  appearance: none;
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 3px 9px;
  border: 1px solid var(--lfl-border, #4a4a4a);
  border-radius: 9px;
  background: var(--lfl-surface-soft, #242424);
  color: var(--lfl-text, #f4f4f4);
  font: 700 13px/1 system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.note-interaction-control:hover,
.note-interaction-control:focus-visible,
.note-interaction-control[aria-expanded="true"] {
  border-color: var(--lfl-amber-border, #ff9900);
  background: var(--lfl-surface-hover, #34302a);
  color: var(--lfl-text, #fff);
  outline: none;
}
.note-interaction-control:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 153, 0, .3);
}
.note-interaction-control:disabled { opacity: .58; cursor: wait; }
.note-interaction-control.note-zap-trigger {
  border-color: var(--lfl-amber-border, #6d5215);
  background: linear-gradient(180deg, var(--lfl-surface-soft, #2a210c), var(--lfl-surface, #191406));
  color: var(--lfl-amber-text, #ffe59a);
  box-shadow: 0 0 0 1px rgb(255 194 48 / 7%), 0 0 13px rgb(255 190 40 / 7%);
}
.note-interaction-control.note-zap-trigger:hover,
.note-interaction-control.note-zap-trigger:focus-visible,
.note-interaction-control.note-zap-trigger[aria-expanded="true"] {
  border-color: var(--lfl-amber-border, #b88616);
  background: linear-gradient(180deg, var(--lfl-amber-wash, #392b0d), var(--lfl-surface, #201806));
  color: var(--lfl-amber-text, #fff0b6);
}
.note-interaction-controls--compact .note-respond-label { display: none; }
.note-interaction-controls--compact .note-interaction-control {
  min-height: 0;
  padding: 3px 8px;
}
.note-respond-menu {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.note-respond-option {
  appearance: none;
  width: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 7px 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--lfl-surface, #191919);
  color: var(--lfl-text, #eee);
  font: 650 14px/1.2 system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}
.note-respond-option > :first-child { font-size: 18px; text-align: center; }
.note-respond-option:hover,
.note-respond-option:focus-visible {
  border-color: var(--lfl-amber-border, rgba(255, 153, 0, .65));
  background: var(--lfl-surface-soft, #29251f);
  color: var(--lfl-text, #fff);
  outline: none;
}

@media (max-width: 420px) {
  .note-respond-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-respond-option {
    min-height: 42px;
    flex-direction: row;
    gap: 8px;
    padding-inline: 10px;
  }
}
.note-reply-trigger,
.note-stat-trigger {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.note-reply-trigger:hover,
.note-reply-trigger[aria-expanded="true"],
.note-stat-trigger:hover,
.note-stat-trigger[aria-expanded="true"] {
  color: var(--lfl-amber-text, #ffb347);
}
.note-inline-reply-slot {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--lfl-border, #303030);
  border-radius: 12px;
  background: var(--lfl-surface, #0d0d0d);
}
.note-inline-reply-slot[hidden] { display: none; }
.note-inline-reply-form label { display: block; }
.note-inline-reply-form textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid var(--lfl-border, #3a3a3a);
  border-radius: 9px;
  background: var(--lfl-surface, #151515);
  color: var(--lfl-text, #fff);
  font: inherit;
  line-height: 1.4;
}
.note-inline-reply-form textarea:focus {
  outline: 2px solid var(--lfl-amber-border, rgba(255, 153, 0, .36));
  border-color: var(--lfl-amber-border, #ff9900);
}
.note-inline-emoji-tools { margin-top: 8px; }
.note-inline-emoji-picker {
  display: grid;
  gap: 12px;
  max-height: min(520px, 70vh);
  margin-top: 8px;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--lfl-border, #353535);
  border-radius: 10px;
  background: var(--lfl-surface, #111);
}
.note-inline-emoji-picker[hidden] { display: none; }
.note-inline-emoji-head,
.note-inline-emoji-categories {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.note-inline-emoji-head { justify-content: space-between; }
.note-inline-emoji-section { display: grid; gap: 7px; }
.note-inline-emoji-search {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid var(--lfl-border, #3a3a3a);
  border-radius: 8px;
  background: var(--lfl-surface, #151515);
  color: var(--lfl-text, #fff);
  font: inherit;
}
.note-inline-emoji-category,
.note-inline-emoji-choice {
  appearance: none;
  min-width: 38px;
  min-height: 38px;
  padding: 5px;
  border: 1px solid var(--lfl-border, #333);
  border-radius: 8px;
  background: var(--lfl-surface, #191919);
  color: var(--lfl-text, #fff);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.note-inline-emoji-category:hover,
.note-inline-emoji-category[aria-selected="true"],
.note-inline-emoji-choice:hover { border-color: var(--lfl-amber-border, #ff9900); background: var(--lfl-surface-soft, #282018); }
.note-inline-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 5px;
}
.note-inline-emoji-choice img {
  display: block;
  width: 26px;
  height: 26px;
  margin: auto;
  object-fit: contain;
}
.note-inline-emoji-status { margin: 0; color: var(--lfl-muted, #999); font-size: 12px; }
.note-inline-emoji-status[hidden] { display: none; }
.note-inline-reply-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.note-inline-reply-status {
  min-width: 0;
  margin-right: auto;
  color: var(--lfl-muted, #aaa);
  font-size: 12px;
}
.note-inline-reply-send { border-color: var(--lfl-amber-border, #ad6800); }
.note-inline-reply-send:disabled,
.note-inline-reply-cancel:disabled { cursor: wait; opacity: .55; }
.note-reaction-panel,
.note-boost-form,
.note-zap-form {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 10px;
}
.note-reaction-choices,
.note-zap-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.note-reaction-choice,
.note-zap-presets button {
  appearance: none;
  min-width: 38px;
  min-height: 36px;
  padding: 5px 8px;
  border: 1px solid var(--lfl-border, #3a3a3a);
  border-radius: 9px;
  background: var(--lfl-surface, #171717);
  color: var(--lfl-text, #fff);
  font: inherit;
  cursor: pointer;
}
.note-reaction-choice:hover,
.note-zap-presets button:hover { border-color: var(--lfl-amber-border, #ff9900); background: var(--lfl-surface-soft, #242424); }
.note-custom-reaction-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.note-custom-reaction-form label { flex: 1 1 160px; }
.note-custom-reaction-form input,
.note-zap-fields input {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--lfl-border, #3a3a3a);
  border-radius: 8px;
  background: var(--lfl-surface, #151515);
  color: var(--lfl-text, #fff);
  font: inherit;
}
.note-zap-fields {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr);
  gap: 9px;
}
.note-zap-fields label {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 5px;
  color: var(--lfl-muted, #bbb);
  font-size: 12px;
}
.note-zap-fields input { min-width: 0; max-width: 100%; }
.note-zap-presets { grid-column: 1 / -1; }
.note-zap-mode {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 8px 9px 9px;
  border: 1px solid var(--lfl-border, #303030);
  border-radius: 9px;
  background: var(--lfl-surface, #101010);
}
.note-zap-mode legend { padding: 0 5px; color: var(--lfl-muted, #aaa); font-size: 11px; }
.note-zap-mode label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--lfl-border, #363636);
  border-radius: 8px;
  color: var(--lfl-text, #ccc);
  cursor: pointer;
  font-size: 12px;
}
.note-zap-mode label:has(input:checked) {
  border-color: var(--lfl-amber-border, #826319);
  background: var(--lfl-surface, #211a09);
  color: var(--lfl-amber-text, #ffe8a5);
}
.note-zap-mode input { margin: 0; accent-color: var(--lfl-amber-text, #d7a62b); }
.note-zap-identity { margin: 0; color: var(--lfl-muted, #aaa); font-size: 11px; line-height: 1.45; }
.live-card .note-zap-fields,
.video-card .note-zap-fields { grid-template-columns: minmax(0, 1fr); }
.live-card .note-zap-presets,
.video-card .note-zap-presets { grid-column: auto; }
.note-zap-form .note-inline-reply-actions {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}
.note-zap-form .note-inline-reply-status {
  flex: 1 1 100%;
  margin-right: 0;
}
.note-zap-form .note-inline-reply-actions .note-pill {
  min-width: 0;
  flex: 1 1 110px;
  justify-content: center;
  text-align: center;
  white-space: normal;
}
.note-zap-unavailable { margin: 0; color: var(--lfl-red-text, #ffb0b0); font-size: 13px; }
.note-zap-invoice[hidden] { display: none; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.note-stat-quote-icon {
  display: inline-grid;
  place-items: center;
  min-width: 1.12em;
  height: 1.12em;
  padding: 0 .12em;
  border: 1px solid var(--lfl-blue-border, rgba(77, 163, 255, .72));
  border-radius: 4px;
  background: var(--lfl-blue-wash, rgba(33, 150, 243, .42));
  color: var(--lfl-text, #eef8ff);
  font-size: .88em;
  font-weight: 800;
  line-height: 1;
}
.sidebar-quote-icon {
  display: inline-grid;
  place-items: center;
  width: 1.18em;
  height: 1.18em;
  flex: 0 0 1.18em;
  border: 1px solid var(--lfl-blue-border, rgba(77, 163, 255, .72));
  border-radius: 4px;
  background: var(--lfl-blue-wash, rgba(33, 150, 243, .42));
  color: var(--lfl-text, #eef8ff);
  font-size: .9em;
  font-weight: 800;
  line-height: 1;
}
.sats-symbol { color: var(--lfl-amber-text, #f7931a); font-weight: 800; margin-right: 2px; }
.note-stat-sats { font-weight: 600; letter-spacing: 0.1px; }
.note-zap-activity-trigger .sats-symbol { transition: filter .15s ease; }
.note-zap-activity-trigger:hover .sats-symbol,
.note-zap-activity-trigger[aria-expanded="true"] .sats-symbol {
  filter: drop-shadow(0 0 5px rgba(247, 147, 26, .72));
}

.zap-activity-backdrop {
  display: none;
}
.zap-activity-panel {
  position: fixed;
  z-index: 100080;
  max-height: min(520px, calc(100vh - 24px));
  overflow: hidden;
  border: 1px solid var(--lfl-border, #444);
  border-radius: 14px;
  background: var(--lfl-surface, rgba(15, 15, 15, .985));
  color: var(--lfl-text, #eee);
  box-shadow: 0 18px 50px var(--lfl-shadow, rgba(0, 0, 0, .72));
}
.zap-activity-panel--inline {
  position: static;
  z-index: auto;
  min-width: 0;
  grid-column: 1 / -1;
  width: 100%;
  max-height: none;
  margin-top: 10px;
  box-sizing: border-box;
  box-shadow: none;
}
.zap-activity-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--lfl-border, #303030);
}
.zap-activity-title {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--lfl-text, #fff);
  font-size: 15px;
}
.zap-activity-close {
  appearance: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--lfl-border, #444);
  border-radius: 999px;
  background: var(--lfl-surface-soft, #222);
  color: var(--lfl-text, #ddd);
  font: 700 20px/27px system-ui, sans-serif;
  cursor: pointer;
}
.zap-activity-close:hover { border-color: var(--lfl-amber-border, #f7931a); color: var(--lfl-text, #fff); }
.zap-activity-body {
  max-height: min(450px, calc(100vh - 100px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 12px 10px;
}
.zap-activity-panel--inline .zap-activity-body { max-height: 520px; }
.video-card .zap-activity-item-heading,
.live-card .zap-activity-item-heading { display: grid; gap: 2px; }
.video-card .zap-activity-item-heading span,
.live-card .zap-activity-item-heading span { white-space: normal; overflow-wrap: anywhere; }
.zap-activity-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 8px 0 7px;
  border-bottom: 1px solid var(--lfl-border, #303030);
  background: var(--lfl-surface, rgba(15, 15, 15, .985));
}
.zap-activity-tab {
  appearance: none;
  min-width: 0;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid var(--lfl-border, #343434);
  border-radius: 7px;
  background: var(--lfl-surface, #1a1a1a);
  color: var(--lfl-text, #ddd);
  font: 700 16px/1 system-ui, sans-serif;
  cursor: pointer;
}
.zap-activity-tab:hover,
.zap-activity-tab:focus-visible {
  border-color: var(--lfl-border, #666);
  background: var(--lfl-surface-soft, #252525);
  outline: none;
}
.zap-activity-tab[aria-selected="true"] {
  border-color: var(--lfl-amber-border, #a77519);
  background: var(--lfl-surface-soft, #30240d);
  color: var(--lfl-amber-text, #fff1b5);
  box-shadow: inset 0 -2px 0 #d99a21;
}
.zap-activity-items { min-width: 0; }
.zap-activity-loading,
.zap-activity-empty {
  margin: 0;
  padding: 16px 4px 10px;
  color: var(--lfl-muted, #aaa);
  font-size: 13px;
}
.zap-activity-empty.is-error { color: var(--lfl-red-text, #ff9ca5); }
.zap-activity-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--lfl-border, rgba(255,255,255,.08));
}
.zap-activity-item:last-child { border-bottom: 0; }
.zap-activity-avatar {
  width: 48px;
  height: 48px;
  border: 1px solid var(--lfl-border, #3b3b3b);
  border-radius: 999px;
  background: var(--lfl-surface-soft, #222);
  object-fit: cover;
}
.zap-activity-item-content { min-width: 0; }
.zap-activity-item-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.zap-activity-item-heading strong {
  min-width: 0;
  overflow: hidden;
  color: var(--lfl-text, #fff);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zap-activity-item-heading a { color: inherit; text-decoration: none; }
.zap-activity-item-heading a:hover { color: var(--lfl-amber-text, #ffb347); text-decoration: underline; }
.zap-activity-item-heading span {
  flex: 0 0 auto;
  color: var(--lfl-amber-text, #f5a33a);
  font-size: 13px;
  white-space: nowrap;
}
.zap-activity-comment {
  margin: 5px 0 0;
  color: var(--lfl-text, #ccc);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.zap-activity-snippet {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--lfl-text, #ccc);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.zap-activity-open {
  display: inline-block;
  margin-top: 5px;
  color: var(--lfl-amber-text, #ffb347);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.zap-activity-open:hover,
.zap-activity-open:focus-visible { color: var(--lfl-amber-text, #ffd28b); text-decoration: underline; }
.zap-activity-limit {
  margin: 0;
  padding: 10px 0 3px;
  color: var(--lfl-muted, #888);
  font-size: 11px;
  text-align: center;
}

.video-stats .note-stats,
.note-inline-video .note-stats {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.video-stats .note-engagement-row {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Compact media cards always keep zap totals on a second row. Each row can
   still wrap individual counters if future values become unusually large. */
.video-stats .note-stats--compact {
  width: 100%;
  display: grid;
  gap: 5px;
}
.note-stats-primary,
.note-stats-zaps {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.note-engagement-row--compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 5px 8px;
}
.note-engagement-row--compact > .note-stats,
.note-engagement-row--compact > .live-stats { display: contents; }
.note-engagement-row--compact .note-stats-primary,
.note-engagement-row--compact .live-stats-primary { grid-column: 1 / -1; }
.note-engagement-row--compact .note-stats-zaps,
.note-engagement-row--compact .live-stats-zaps { grid-column: 1; }
.note-engagement-row--compact .note-interaction-controls { grid-column: 2; }

@media (max-width: 640px) {
  .note-engagement-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 5px 8px;
  }
  .note-engagement-row > .note-stats { display: contents; }
  .note-engagement-row .note-stats-primary { grid-column: 1 / -1; }
  .note-engagement-row .note-stats-zaps { grid-column: 1; }
  .note-engagement-row .note-interaction-controls { grid-column: 2; }
  .note-engagement-row .note-respond-label { display: none; }
  .note-stats--split { display: grid; gap: 5px; }
  .note-zap-fields { grid-template-columns: 1fr; }
  .note-zap-presets { grid-column: auto; }
  .zap-activity-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100070;
    display: block;
    border: 0;
    background: rgba(0,0,0,.54);
  }
  .zap-activity-panel:not(.zap-activity-panel--inline) {
    left: 8px !important;
    right: 8px;
    top: auto !important;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    width: auto !important;
    max-height: min(68vh, 560px);
    border-radius: 16px;
  }
  .zap-activity-panel:not(.zap-activity-panel--inline) .zap-activity-body {
    max-height: calc(min(68vh, 560px) - 54px);
  }
  .zap-activity-item-heading { display: grid; gap: 2px; }
  .zap-activity-item-heading span { white-space: normal; }
}

.note-time-bottom { margin-top: 6px; font-size: 13px; opacity: 0.75; text-align: right; }

.note-date--client {
  min-height: 20px;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: inherit;
  font-size: .73em;
  opacity: .72;
  text-align: right;
}
.lfl-client-identity {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  font: inherit;
  appearance: none;
  cursor: pointer;
}
.lfl-client-identity::before {
  content: "";
  position: absolute;
  inset: -6px;
}
.lfl-client-identity:focus-visible {
  outline: 2px solid var(--lfl-blue-border, #66aaff);
  outline-offset: 3px;
}
.lfl-client-icon {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: var(--lfl-surface-soft, #2b2b2b);
  pointer-events: none;
}
.lfl-client-popover {
  position: fixed;
  z-index: 100120;
  width: max-content;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid var(--lfl-border, rgba(255,255,255,.18));
  border-radius: 9px;
  color: var(--lfl-text, #f5f5f5);
  background: var(--lfl-surface-soft, #202020);
  box-shadow: 0 8px 24px var(--lfl-shadow, rgba(0,0,0,.48));
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: anywhere;
}
.lfl-client-popover-name { font-weight: 600; }
.lfl-client-popover-status {
  margin-top: 2px;
  color: var(--lfl-green-text, #7ee787);
  font-size: 11px;
}

/* Images */
.note-inline-img { margin: 10px 0; line-height: 0; }
.note-inline-audio { margin: 10px 0; width: min(100%, 520px); }
.note-inline-audio audio { display: block; width: 100%; max-width: 100%; }
.note-img {
  max-width: 420px; width: 100%; height: auto;
  border-radius: 10px; display: block;
}

.note-img-source{
  margin: 6px 0 0 0;
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: left;
}

.note-marketplace-embed { overflow: hidden; }
.note-marketplace-image-link { display: block; background: var(--lfl-surface, #0a0a0a); }
.note-marketplace-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}
.note-marketplace-body { padding-top: 12px; }
.note-marketplace-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 8px 0 6px;
  color: var(--lfl-muted, #bbb);
  font-size: 13px;
}
.note-marketplace-meta strong { color: var(--lfl-green-text, #82d59d); font-size: 16px; }
.note-marketplace-description { margin: 9px 0 0; color: var(--lfl-text, #c8c8c8); line-height: 1.45; }
.note-media-zap-target { overflow: hidden; }
.note-media-zap-image-link { display: block; background: #090909; }
.note-media-zap-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #090909;
}
.note-media-zap-target .note-embed-body { padding: 12px; }
.note-media-zap-target .note-embed-actions a { color: var(--lfl-blue-text, #9bcaff); font-weight: 650; text-decoration: none; }
.note-media-zap-target .note-embed-actions a:hover { text-decoration: underline; }
.note-source-link{
  text-decoration: underline;
}

.note-img-source a { color: inherit; text-decoration: none; }
.note-img-source a:hover { text-decoration: underline; }
.note-img-click { display: inline-block; text-decoration: none !important; border: 0 !important; outline: 0 !important; }

/* Direct video URLs still need a CSS cue. LFL upload thumbnails now contain a baked play badge. */
.note-video-click {
  position: relative;
}

.note-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  padding-left: 4px;
  border: 2px solid var(--lfl-border, rgba(255,255,255,0.9));
  border-radius: 999px;
  background: var(--lfl-surface, rgba(0,0,0,0.68));
  color: var(--lfl-text, #fff);
  font-size: 32px;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  pointer-events: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.note-video-play-icon {
  display: block;
  transform: translateY(-20%);
}

.note-video-click:hover .note-video-play {
  transform: translate(-50%, -50%) scale(1.06);
  background: var(--lfl-surface, rgba(0,0,0,0.8));
}

@media (max-width: 560px) {
  .note-video-play {
    width: 54px;
    height: 54px;
    font-size: 27px;
  }
}

/* Embeds */
.note-embed {
  margin-top: 10px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--lfl-border, #333); background: var(--lfl-surface, #0b0b0b);
}
.note-embed-missing { color: var(--lfl-muted, #aaa); font-size: 13px; }
.note-embed-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.note-embed-who {
  flex: 1;
  min-width: 0;
}
.note-embed-avatar {
  width: 34px; height: 34px; border-radius: 999px; object-fit: cover;
  background: var(--lfl-surface-soft, #222); border: 1px solid var(--lfl-border, #333);
}
.note-embed-name { font-weight: 600; color: var(--lfl-text, #fff); font-size: 13px; }
.note-embed-meta { font-size: 12px; color: var(--lfl-muted, #aaa); }
.note-embed-body { color: var(--lfl-text, #eee); font-size: 13px; line-height: 1.4; 
  
  
  word-break: break-word; }
.note-embed-headline, .note-embed-title { margin: 0 0 4px 0; }
.note-embed-by { margin: 0; opacity: 0.9; }
.note-embed-actions { margin-top: 8px; }
.note-embed-date {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.note-embed-open {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border: 1px solid var(--lfl-border, #3a3a3a);
  border-radius: 999px;
  color: var(--lfl-blue-text, #c7dcff);
  background: var(--lfl-surface, #171717);
  font: inherit;
  font-size: 1em;
  line-height: 1.25;
  text-decoration: none;
  opacity: .9;
}
.note-embed-open:hover,
.note-embed-open:focus-visible { color: var(--lfl-text, #fff); border-color: var(--lfl-border, #666); background: var(--lfl-surface-soft, #222); }

/* =========================================================
   SHARED: Mobile / Tablet
   ========================================================= */
@media (max-width: 900px) {
  .streams-layout { flex-direction: column; padding: 10px; margin: 10px auto; }
  
  .streams-sidebar {
    width: 100%; position: static; top: auto; padding: 8px;
    border-radius: 10px; overflow: visible;
  }
  
  .streams-main { width: 100%; }

  .sidebar-toggle { display: flex; }
  .sidebar-list {
    display: none; margin-top: 8px; max-height: 55vh; overflow-y: auto; padding-right: 4px;
  }
  .streams-sidebar.open .sidebar-list { display: flex; }
  .streams-sidebar.open .sidebar-toggle .chev { transform: rotate(180deg); }

  .notes-default-view { display: none; }
  .streams-sidebar.open .notes-default-view { display: block; }
  
  .sidebar-item { width: 100%; padding: 10px 14px; white-space: normal; }
}


.nostr-mention-profile{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  text-decoration:none;
  font-size:0.9em;
  opacity:0.9;
  border:1px solid var(--lfl-border, rgba(106,103,103));
  background-color: var(--lfl-surface-hover, #393939);
}
.nostr-mention-profile:hover{
  opacity:1;
}


/* Prevent embed cards from getting too tall */
.note-embed-body-snipped {
  max-height: 320px;
  overflow: hidden;
}


/* ---------- VIDEO ---------- */

.note-inline-video {
  margin: 10px 0;
  line-height: 0;   /* removes baseline gaps without breaking layout */
}

.note-video-click {
  display: block;
  border-radius: 10px;
  overflow: hidden; /* clips white seams on edges */
    background:#000;     /* keep video letterboxing black in either theme */
  padding:0;
  border:0;
}

.note-video {
  width: 100%;
  max-height: 420px;
  background: #000;

  display: block;
  border: none;
  outline: none;

  pointer-events: none;
    margin:0;
  background:#000;

  transform: translateZ(0);        /* kills the 1px seam on some GPUs/browsers */
  backface-visibility: hidden;     /* extra seam killer */
}

.note-video-source {
  line-height: 1.3;  /* restore normal text layout */
  margin-top: 6px;
  font-size: 12px;
  opacity: .8;
  overflow-wrap: anywhere;
  text-align: left;
}



/* --- kill the 1px/white seams + weird extra gaps on YT cards --- */
.note-embed-youtube {
  padding: 0;                 /* remove embed padding for this type */
  border: 0;                  /* remove border if it shows as a line */
  background: transparent;    /* remove background that can peek through */
}

.note-embed-youtube .note-youtube-thumb {
  display: block;
  line-height: 0;             /* BIG one: removes baseline gap */
  border-radius: 78px;
  overflow: hidden;
}

.note-embed-youtube .note-img {
  display: block;             /* BIG one: prevents inline-image gap */
  line-height: 0;
  margin: 0;
  border: 0;
}

/* tighten spacing between thumbnail and the source line */
.note-embed-youtube .note-img-source {
  margin-top: 6px;
  line-height: 1.2;
}


.note-embed-youtube .note-youtube-thumb,
.note-embed-youtube .note-img,
.note-embed-youtube .note-img-source {
  white-space: normal;
}

.note-embed-youtube,
.note-embed-youtube * {
  white-space: normal !important;
}



/* =========================================================
   NOTES: Upload + Publish row tweaks
   ========================================================= */

/* Upload button should not be the tiny "tool" square */
#uploadBtn.notes-tab-tool{
  width: auto;
  height: auto;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: normal;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}


/* one row: upload left, publish right */
.notes-compose-actions{
  justify-content: space-between;
}

.notes-compose-actions #uploadStatus{
  margin-left: 8px;
  margin-right: auto; /* pushes Publish to the far right */
}




/* ---------- RUMBLE EMBED ---------- */

.note-embed-rumble {
  padding: 0;
  border: 0;
  background: transparent;
}

/* anchor container */
.note-embed-rumble .note-rumble-thumb{
  display: block;
  position: relative;
  line-height: 0;
  border-radius: 14px;
  overflow: hidden;
}

/* image behaves like youtube thumbnail */
.note-embed-rumble .note-img{
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
}

/* centered play icon */
.note-embed-rumble .note-rumble-play{
  position: absolute;
  inset: 0;                /* fill container */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: var(--lfl-text, white);
  text-shadow: 0 2px 12px rgba(0,0,0,.85);
  pointer-events: none;
}

/* spacing like youtube */
.note-embed-rumble .note-img-source{
  margin-top: 6px;
  line-height: 1.2;
}


/* Rumble thumb wrapper should size to the image, like your .note-img-click does */
.note-embed-rumble .note-rumble-thumb{
  display: inline-block;
  text-decoration: none !important;
  border: 0 !important;
  outline: 0 !important;
}


/* ensure overlay is centered over the actual image width */
.note-embed-rumble .note-img{
  max-width: 420px;          /* keep your global limit */
  width: 100%;
}
.note-reaction-body img.nostr-custom-emoji,
.notification-message img.nostr-custom-emoji {
  width: 1.6em;
  height: 1.6em;
  object-fit: contain;
  vertical-align: -0.35em;
}

/* ---------- KIND 1010 NOTE EDITS ---------- */
.note-edit-indicator {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 1px 7px;
  border: 1px solid var(--lfl-blue-border, rgba(148, 163, 184, .28));
  border-radius: 999px;
  background: var(--lfl-wash-strong, rgba(15, 23, 42, .42));
  color: var(--lfl-muted, #a8b3c7);
  font: inherit;
  font-size: .74rem;
  cursor: pointer;
}
.note-edit-indicator:hover,
.note-edit-indicator:focus-visible {
  color: var(--lfl-text, #fff);
  border-color: var(--lfl-cyan-border, rgba(125, 211, 252, .72));
}
.note-embed-date .note-edit-indicator { margin-right: 0; }
.note-edit-modal[hidden] { display: none; }
.note-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 20px;
}
.note-edit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .82);
  backdrop-filter: blur(5px);
}
.note-edit-dialog {
  position: relative;
  width: min(820px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  border: 1px solid var(--lfl-blue-border, rgba(148, 163, 184, .28));
  border-radius: 18px;
  background: var(--lfl-surface, #0b1220);
  color: var(--lfl-text, #e5edf8);
  box-shadow: 0 24px 80px var(--lfl-shadow, rgba(0, 0, 0, .55));
}
.note-edit-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--lfl-blue-border, rgba(148, 163, 184, .2));
  background: var(--lfl-surface, rgba(11, 18, 32, .96));
}
.note-edit-dialog-head h2,
.note-edit-dialog-head p { margin: 0; }
.note-edit-dialog-head p { margin-top: 5px; color: var(--lfl-muted, #9aa8bc); font-size: .88rem; }
.note-edit-close {
  align-self: start;
  border: 0;
  background: transparent;
  color: var(--lfl-text, #cbd5e1);
  font-size: 1rem;
  cursor: pointer;
}
.note-edit-dialog-body { display: grid; gap: 12px; padding: 16px 20px 22px; }
.note-edit-history-entry {
  padding: 14px;
  border: 1px solid var(--lfl-blue-border, rgba(148, 163, 184, .2));
  border-radius: 12px;
  background: var(--lfl-surface-soft, rgba(15, 23, 42, .7));
}
.note-edit-history-entry.is-current { border-color: var(--lfl-cyan-border, rgba(56, 189, 248, .55)); }
.note-edit-history-head { display: flex; justify-content: space-between; gap: 12px; color: var(--lfl-muted, #9aa8bc); font-size: .8rem; }
.note-edit-history-entry p { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-edit-history-entry pre {
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: var(--lfl-surface, #030712);
  color: var(--lfl-text, #cbd5e1);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
body.note-edit-modal-open { overflow: hidden; }
@media (max-width: 620px) {
  .note-edit-modal { padding: 8px; }
  .note-edit-history-head { flex-direction: column; }
}

/* Server-rendered public note. This is the permanent root card: JavaScript
   enhances its existing slots rather than swapping in a second card. */
.lfl-note-server-preview {
  margin: 0;
}
.lfl-note-server-preview > .note-head {
  min-height: 44px;
}

/* Shared Notes Feed and Media Feed cache help. */
.feed-cache-help { margin: 8px 0 12px; font-size: .875rem; line-height: 1.5; color: var(--lfl-muted, #aaa); }
.feed-cache-help summary { cursor: pointer; color: var(--lfl-text, #eee); }
.feed-cache-help p { max-width: 85ch; }

/* Keep cache help readable within the feed sidebar on desktop and mobile. */
.streams-sidebar > .feed-cache-help { padding: 0 10px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .streams-sidebar > .feed-cache-help { display: none; }
  .streams-sidebar.open > .feed-cache-help { display: block; }
}

/* Custom Notes feed: an inline panel that stays inside the sidebar on mobile. */
.notes-default-menu { padding: 10px; }
.notes-feed-help { margin: 3px 0 8px; font-size: .78rem; color: var(--lfl-muted, #aaa); }
.notes-feed-presets, .notes-feed-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.notes-feed-presets button, .notes-feed-actions button {
  border: 1px solid var(--lfl-border, #555); border-radius: 6px; padding: 8px;
  background: var(--lfl-surface-soft, #222); color: var(--lfl-text, #eee); cursor: pointer;
  font: inherit; font-size: .78rem;
}
.notes-feed-actions [data-feed-save] { background: var(--lfl-blue-solid, #007bff); color: var(--lfl-on-accent, #fff); }
.notes-feed-choices { min-width: 0; border: 0; padding: 0; margin: 8px 0; max-height: min(44vh, 340px); overflow-y: auto; }
.notes-feed-choices legend { font-size: .78rem; padding-bottom: 5px; }
.notes-feed-choices label { display: flex; align-items: center; gap: 8px; min-height: 38px; font-size: .82rem; cursor: pointer; }
.notes-feed-choices input { flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--lfl-blue-solid, #007bff); }
.notes-feed-choices input:focus-visible { outline: 2px solid var(--lfl-blue-solid, #007bff); outline-offset: 2px; }
.notes-default-menu button:disabled { opacity: .6; cursor: wait; }
.notes-default-menu .notes-default-option { display: block; margin-top: 6px; }

/* My feed hides unselected categories in both desktop and mobile sidebars. */
.notesdir-sidebar .sidebar-item[hidden] { display: none !important; }
