/**
 * LATEST VISION CMS - Threads & Material 3 Social UI
 * Clean, modern, responsive layout inspired by Instagram Threads & Material 3
 */

:root {
  --threads-bg: #ffffff;
  --threads-card-bg: #ffffff;
  --threads-border: #f0f0f0;
  --threads-border-darker: #e5e5e5;
  --threads-text: #000000;
  --threads-text-muted: #737373;
  --threads-pill-bg: #000000;
  --threads-pill-text: #ffffff;
  --threads-pill-hover: #262626;
  --threads-sidebar-width: 76px;
  --threads-drawer-width: 290px;
  --threads-like-color: #ff3040;
  --threads-repost-color: #00ba7c;
  /* Shared card/input tokens used across views (were undefined → fell back to
     a hardcoded dark color and broke light mode). Defined here so every
     public page (threads.css is always loaded) gets correct values. */
  --bg-card: #ffffff;
  --bg-input: #f9fafb;
}

[data-theme="dark"] {
  --threads-bg: #101010;
  --threads-card-bg: #141414;
  --threads-border: #262626;
  --threads-border-darker: #333333;
  --threads-text: #f5f5f5;
  --threads-text-muted: #a3a3a3;
  --threads-pill-bg: #ffffff;
  --threads-pill-text: #000000;
  --threads-pill-hover: #e5e5e5;
  --bg-card: #161b22;
  --bg-input: rgba(255,255,255,0.06);
}

/* Universal Consistent Non-Stretching Avatar Guarantee */
.avatar, img.avatar, .thread-avatar img, .threads-card-avatar-wrap img, .header-avatar img, .composer-avatar img, .reply-node-head img, .news-comment-avatar, .chain-avatar, .user-avatar, .home-suggested-user img {
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  max-width: none;
}

/* ============================================================
   PAGE LAYOUT WITH FIXED LEFT SIDEBAR
   ============================================================ */
body.threads-active-layout {
  background: var(--threads-bg);
  color: var(--threads-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.threads-app-container {
  display: flex;
  min-height: 100vh;
}

/* LEFT FIXED NAVIGATION (DESKTOP) */
.threads-nav-sidebar {
  width: var(--threads-sidebar-width);
  height: 100vh;
  height: 100dvh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  overflow-y: auto;
  gap: 20px;
  border-right: 1px solid var(--threads-border);
  background: var(--threads-bg);
  z-index: 100;
}

.threads-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--threads-text);
  text-decoration: none;
  border-radius: 12px;
  transition: transform 0.15s ease;
}
.threads-logo-link:hover {
  transform: scale(1.08);
}

.threads-nav-icons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.threads-nav-item {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--threads-text-muted);
  text-decoration: none;
  position: relative;
  transition: all 0.15s ease;
}
.threads-nav-item:hover, .threads-nav-item.active {
  color: var(--threads-text);
  background: rgba(125, 125, 125, 0.08);
}

.threads-nav-item .nav-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.threads-nav-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.threads-btn-plus {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--threads-pill-bg);
  color: var(--threads-pill-text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.threads-btn-plus:hover {
  transform: scale(1.1);
}

.threads-btn-drawer {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--threads-text-muted);
  padding: 8px;
  border-radius: 10px;
  transition: color 0.15s ease;
}
.threads-btn-drawer:hover {
  color: var(--threads-text);
}

/* ============================================================
   DRAWER MENU (MATCHING SCREENSHOT 3)
   ============================================================ */
.threads-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.threads-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.threads-drawer-pane {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(var(--threads-drawer-width), calc(100vw - 24px));
  background: var(--threads-card-bg);
  border-right: 1px solid var(--threads-border);
  z-index: 210;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  overflow-y: auto;
}
.threads-drawer-overlay.open .threads-drawer-pane {
  transform: translateX(0);
}

.threads-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--threads-border);
  margin-bottom: 12px;
}
.threads-drawer-logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--threads-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.threads-drawer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.threads-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--threads-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s ease;
}
.threads-drawer-link:hover, .threads-drawer-link.active {
  background: rgba(125, 125, 125, 0.08);
  font-weight: 600;
}
.threads-drawer-link svg {
  color: var(--threads-text);
  flex-shrink: 0;
}

.threads-drawer-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 14px 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--threads-text-muted);
  text-transform: capitalize;
}

.threads-drawer-btn-post {
  margin-top: auto;
  padding-top: 16px;
}
.threads-drawer-btn-post button {
  width: 100%;
  padding: 13px;
  background: var(--threads-pill-bg);
  color: var(--threads-pill-text);
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}
.threads-drawer-btn-post button:hover {
  opacity: 0.9;
}

/* ============================================================
   MAIN CONTENT AREA & COLUMNS
   ============================================================ */
.threads-main-wrap {
  margin-left: var(--threads-sidebar-width);
  width: calc(100% - var(--threads-sidebar-width));
  display: flex;
  justify-content: center;
  padding: 0 16px 80px;
}

.threads-center-feed {
  width: 100%;
  max-width: 630px;
  padding-top: 16px;
}

.threads-right-sidebar {
  width: 320px;
  margin-left: 36px;
  padding-top: 24px;
  position: sticky;
  top: 0;
  height: fit-content;
}

@media (max-width: 1080px) {
  .threads-right-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .threads-nav-sidebar {
    display: none;
  }
  .threads-main-wrap {
    margin-left: 0;
    width: 100%;
    padding: 0 12px 76px;
  }
}

/* ============================================================
   THREADS TOP COMPOSER CARD (Apa yang baru?)
   ============================================================ */
.threads-top-composer {
  background: var(--threads-card-bg);
  border: 1px solid var(--threads-border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.threads-top-composer:hover {
  border-color: var(--threads-border-darker);
}
.threads-top-composer .composer-placeholder {
  flex: 1;
  color: var(--threads-text-muted);
  font-size: 0.95rem;
}
.threads-top-composer .composer-btn-submit {
  background: var(--threads-border);
  color: var(--threads-text);
  border: none;
  padding: 8px 18px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

/* ============================================================
   THREAD FEED CARDS (MATCHING SCREENSHOT 1)
   ============================================================ */
.threads-card {
  background: var(--threads-card-bg);
  border: 1px solid var(--threads-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  gap: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.threads-card:hover {
  border-color: var(--threads-border-darker);
}

.threads-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.threads-card-avatar-wrap img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.threads-card-avatar-wrap .avatar-badge-follow {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--threads-pill-bg);
  color: var(--threads-pill-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid var(--threads-card-bg);
  cursor: pointer;
}

.threads-card-main {
  flex: 1;
  min-width: 0;
}

.threads-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.threads-card-author-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}
.threads-card-author-name {
  font-weight: 700;
  color: var(--threads-text);
  text-decoration: none;
}
.threads-card-author-name:hover {
  text-decoration: underline;
}

.threads-topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #3b82f6;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}
.threads-topic-pill::before {
  content: "›";
  color: var(--threads-text-muted);
  font-size: 0.9rem;
  margin-right: 2px;
}

.threads-card-time {
  color: var(--threads-text-muted);
  font-size: 0.82rem;
}

.threads-card-more-btn {
  background: none;
  border: none;
  color: var(--threads-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.threads-card-more-btn:hover {
  color: var(--threads-text);
}

.threads-card-body-text {
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--threads-text);
  word-break: break-word;
}
.threads-card-body-text a {
  color: #2563eb;
  text-decoration: none;
}
.threads-card-body-text a:hover {
  text-decoration: underline;
}

/* CAROUSEL */
.threads-carousel-container {
  position: relative;
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--threads-border);
  background: #000;
}
.threads-carousel-track {
  display: flex;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.threads-carousel-slide {
  min-width: 100%;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.threads-carousel-slide img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  cursor: zoom-in;
}

.threads-carousel-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
}

.threads-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.15s ease;
}
.threads-carousel-arrow.prev { left: 10px; }
.threads-carousel-arrow.next { right: 10px; }
.threads-carousel-arrow:hover { background: rgba(0,0,0,0.85); }

/* ACTION ROW (HEART, COMMENT, REPOST, SHARE, BOOKMARK) */
.threads-card-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}

.threads-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--threads-text);
  font-size: 0.86rem;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.threads-act-btn:hover {
  opacity: 0.8;
}

.threads-act-btn.like-btn.active svg {
  fill: var(--threads-like-color);
  stroke: var(--threads-like-color);
  animation: heartPulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.threads-act-btn.repost-btn.active svg {
  stroke: var(--threads-repost-color);
  animation: repostSpin 0.35s ease;
}
.threads-act-btn.bookmark-btn.active svg {
  fill: var(--threads-text);
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

@keyframes repostSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(180deg); }
}

/* ============================================================
   RIGHT SIDEBAR: SEARCH & SUGGESTED FOLLOWS (SCREENSHOT 1)
   ============================================================ */
.threads-search-bar {
  position: relative;
  margin-bottom: 24px;
}
.threads-search-bar input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: rgba(125, 125, 125, 0.08);
  border: 1px solid transparent;
  border-radius: 9999px;
  color: var(--threads-text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.threads-search-bar input:focus {
  border-color: var(--threads-border-darker);
}
.threads-search-bar svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--threads-text-muted);
}

.threads-suggested-card {
  background: var(--threads-card-bg);
  border: 1px solid var(--threads-border);
  border-radius: 16px;
  padding: 18px;
}
.threads-suggested-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 16px 0;
  color: var(--threads-text);
}

.threads-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.threads-user-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.threads-user-info-left img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.threads-user-names {
  min-width: 0;
  overflow: hidden;
}
.threads-user-name-bold {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--threads-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.threads-user-handle {
  font-size: 0.8rem;
  color: var(--threads-text-muted);
}

.btn-pill-follow {
  padding: 7px 18px;
  background: var(--threads-pill-bg);
  color: var(--threads-pill-text);
  border: 1px solid transparent;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.btn-pill-follow:hover {
  opacity: 0.9;
}
.btn-pill-follow.following {
  background: transparent;
  border-color: var(--threads-border-darker);
  color: var(--threads-text);
}

/* ============================================================
   USER CARD POPOVER DIALOG (MATCHING SCREENSHOT 2)
   ============================================================ */
.threads-user-popover {
  position: absolute;
  width: 310px;
  background: var(--threads-card-bg);
  border: 1px solid var(--threads-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.22);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}
.threads-user-popover.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.popover-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.popover-user-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--threads-text);
  margin-bottom: 2px;
}
.popover-user-handle {
  font-size: 0.86rem;
  color: var(--threads-text-muted);
}
.popover-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.popover-user-bio {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--threads-text);
  margin-bottom: 12px;
}

.popover-followers-count {
  font-size: 0.85rem;
  color: var(--threads-text-muted);
  margin-bottom: 16px;
}

.popover-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.popover-btn-follow {
  width: 100%;
  padding: 9px;
  background: var(--threads-pill-bg);
  color: var(--threads-pill-text);
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
}
.popover-btn-message {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--threads-border-darker);
  color: var(--threads-text);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

/* ============================================================
   "UTAS BARU" MODAL DIALOG POPUP (MATCHING SCREENSHOT 5)
   ============================================================ */
.threads-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
}
.threads-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.threads-modal-dialog {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  background: var(--threads-card-bg);
  border: 1px solid var(--threads-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.threads-modal-dialog > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.threads-chain-item > .avatar, .threads-chain-item > .avatar-placeholder { flex-shrink: 0; }
.composer-field-label { display: block; font-size: .75rem; font-weight: 600; margin: .65rem 0 .3rem; color: var(--threads-text-muted); }
.composer-link-input { width: 100%; min-height: 44px; padding: .65rem .75rem; border: 1px solid var(--threads-border-darker); border-radius: 7px; background: var(--bg-input); color: var(--threads-text); font: inherit; font-size: .875rem; }
.modal-media-preview { display: flex; flex-wrap: wrap; gap: 10px; margin: .75rem 0; }
.chain-tool-upload, .chain-tool-toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .5rem .65rem; border: 1px solid var(--threads-border-darker); border-radius: 6px; background: transparent; color: var(--threads-text); font-size: .78rem; }
.chain-tool-upload input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.chain-tool-upload:focus-within { outline: 3px solid var(--primary); outline-offset: 3px; }
.chain-tool-upload:hover, .chain-tool-toggle:hover { background: var(--bg-muted); }
.thread-poll-composer { border: 1px solid var(--threads-border-darker); border-radius: 8px; padding: 1rem; margin-top: 1rem; }
.thread-poll-composer legend { font-size: .85rem; font-weight: 700; padding: 0 .35rem; }
.thread-poll-composer label { display: block; font-size: .75rem; font-weight: 600; margin-bottom: .3rem; }
.thread-poll-composer input, .thread-poll-composer select { min-height: 44px; width: 100%; border: 1px solid var(--threads-border-darker); border-radius: 6px; background: var(--bg-input); color: var(--threads-text); padding: .5rem .65rem; font: inherit; font-size: .85rem; margin-bottom: .75rem; }
.composer-privacy label { display: block; font-size: .7rem; color: var(--threads-text-muted); margin-bottom: .25rem; }
.composer-privacy select { min-height: 44px; max-width: 100%; }
.thread-image-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.thread-image-open img { width: 100%; height: 100%; max-height: 480px; object-fit: contain; }
.thread-poll-option.selected { box-shadow: inset 0 0 0 1px var(--primary); font-weight: 600; }
.thread-poll-option:disabled { opacity: 1; }
.thread-poll-option:not(:disabled):hover { box-shadow: inset 0 0 0 1px var(--primary); }
.thread-poll-option .poll-result { white-space: nowrap; font-size: .78rem; color: var(--text-soft); }
.threads-modal-overlay.open .threads-modal-dialog {
  transform: scale(1);
}

.threads-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--threads-border);
}
.threads-modal-btn-cancel {
  background: none;
  border: none;
  font-size: 0.95rem;
  color: var(--threads-text);
  cursor: pointer;
  font-weight: 500;
}
.threads-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--threads-text);
}
.threads-modal-icons-right {
  display: flex;
  gap: 12px;
  color: var(--threads-text);
}

.threads-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.threads-chain-item {
  display: flex;
  gap: 12px;
  position: relative;
  margin-bottom: 16px;
}
.threads-chain-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 48px;
  bottom: -16px;
  width: 2px;
  background: var(--threads-border);
}

.chain-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chain-input-wrap {
  flex: 1;
}
.chain-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 700;
}
.chain-badge-num {
  font-size: 0.75rem;
  background: rgba(125, 125, 125, 0.12);
  color: var(--threads-text-muted);
  padding: 1px 6px;
  border-radius: 6px;
}

.chain-textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--threads-text);
  font-size: 0.98rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 60px;
  outline: none;
  font-family: inherit;
}

.chain-tools-bar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  color: var(--threads-text-muted);
}
.chain-tool-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--threads-text-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.chain-tool-icon:hover {
  color: var(--threads-text);
}

.btn-add-chain {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--threads-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 0;
  margin-left: 52px;
  transition: color 0.15s ease;
}
.btn-add-chain:hover {
  color: var(--threads-text);
}

.threads-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--threads-border);
}

.modal-privacy-select {
  background: transparent;
  border: none;
  color: var(--threads-text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  font-weight: 500;
  outline: none;
}

.btn-modal-submit {
  background: var(--threads-pill-bg);
  color: var(--threads-pill-text);
  border: none;
  padding: 9px 24px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn-modal-submit:hover {
  opacity: 0.9;
}

/* ============================================================
   MOBILE BOTTOM NAVIGATION
   ============================================================ */
.threads-mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--threads-bg);
  border-top: 1px solid var(--threads-border);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
}
@media (max-width: 768px) {
  .threads-mobile-bottom-bar {
    display: flex;
  }
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.threads-toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.threads-toast {
  background: var(--threads-pill-bg);
  color: var(--threads-pill-text);
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: toastFade 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes toastFade {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   v1.1 LAYOUT FIXES — fixed sidebar no longer overlaps content,
   mobile bottom nav gets padding + labels + active states.
   ============================================================ */

/* Push all body content to the right of the fixed 76px sidebar on desktop. */
@media (min-width: 769px) {
  body.public-layout {
    padding-left: var(--threads-sidebar-width);
  }
  .site-header { border-bottom: 1px solid var(--threads-border); }
  /* Brand mark sizing inside the sidebar */
  .lv-brand-mark { display: block; border-radius: 12px; }
}

/* Mobile: keep content clear of the bottom navigation bar. */
@media (max-width: 768px) {
  body.public-layout { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .threads-toast-container { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 2rem); }
  .threads-modal-overlay { padding: 10px; }
  .threads-modal-dialog { border-radius: 12px; max-height: calc(100dvh - 20px); }
  .threads-modal-body { padding: 16px 12px; }
  .threads-modal-footer { gap: .5rem; }
  .threads-modal-footer .btn-modal-submit { min-height: 44px; padding: .65rem .85rem; }
}

/* ---- Mobile bottom navigation (refined) ---- */
.threads-mobile-bottom-bar {
  height: 60px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}
.threads-mobile-bottom-bar a,
.threads-mobile-bottom-bar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--threads-text-muted);
  text-decoration: none;
  background: none;
  border: none;
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.threads-mobile-bottom-bar a.active,
.threads-mobile-bottom-bar a:active {
  color: var(--threads-text);
}
.threads-mobile-bottom-bar .bn-label {
  font-size: 0.6rem;
  line-height: 1;
  letter-spacing: 0.2px;
}
.threads-mobile-bottom-bar .bn-plus {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--threads-pill-bg);
  color: var(--threads-pill-text);
  font-size: 1.5rem;
  font-weight: 300;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.threads-mobile-bottom-bar .bn-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 22px);
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 10px;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  text-align: center;
}

/* ---- Cute emoji avatar placeholder ---- */
.lv-cute-avatar {
  font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
  user-select: none;
  border: 1px solid var(--threads-border, rgba(0,0,0,0.06));
}

/* ============================================================
   NESTED / THREADED REPLIES (reply-to-reply, max depth 10)
   ============================================================ */
.reply-tree { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.reply-node {
  position: relative;
  background: var(--threads-card-bg);
  border: 1px solid var(--threads-border);
  border-radius: 12px;
  padding: 12px 14px;
}
.reply-node.reply-depth-deep {
  background: rgba(125,125,125,0.04);
  border-style: dashed;
}
.reply-node-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.reply-node-head .reply-author {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--threads-text);
  text-decoration: none;
}
.reply-node-head .reply-handle,
.reply-node-head .reply-time {
  font-size: 0.78rem;
  color: var(--threads-text-muted);
}
.reply-node-head .reply-to {
  font-size: 0.74rem;
  color: var(--threads-text-muted);
  background: rgba(125,125,125,0.08);
  padding: 1px 7px;
  border-radius: 10px;
}
.reply-node-head .reply-to a { color: var(--threads-text); font-weight: 600; text-decoration: none; }
.reply-node-body {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--threads-text);
  word-break: break-word;
}
.reply-node-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--threads-text-muted);
}
.reply-node-actions button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  padding: 2px 0;
}
.reply-node-actions button:hover { color: var(--threads-text); }
.reply-node-actions .like-active { color: #ff3040; }

/* Indentation "guideline" per depth — capped visually so deep threads stay readable */
.reply-children {
  margin-left: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--threads-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
@media (max-width: 640px) {
  .reply-children { margin-left: 10px; padding-left: 10px; }
}
.reply-children.collapsed { display: none; }
.reply-toggle-children {
  background: none; border: none; color: var(--threads-text-muted);
  font-size: 0.76rem; font-weight: 700; cursor: pointer; padding: 4px 0; margin-top: 4px;
}

/* Inline reply composer (used inside a reply node) */
.reply-inline-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--threads-border);
  display: none;
}
.reply-inline-form.open { display: block; }
.reply-inline-form textarea {
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--threads-border);
  border-radius: 10px;
  background: rgba(125,125,125,0.05);
  color: var(--threads-text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
}
.reply-inline-form .reply-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

/* ============================================================
   EMOJI / STICKER PICKER (composer + reply)
   ============================================================ */
.lv-emoji-picker {
  position: absolute;
  bottom: 100%;
  margin-bottom: 8px;
  left: 0;
  background: var(--threads-card-bg);
  border: 1px solid var(--threads-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  padding: 10px;
  width: 280px;
  max-width: calc(100vw - 32px);
  z-index: 1200;
  display: none;
}
.lv-emoji-picker.open { display: block; }
.lv-emoji-picker .picker-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--threads-border);
  padding-bottom: 6px;
}
.lv-emoji-picker .picker-tab {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: 2px 6px; border-radius: 8px;
}
.lv-emoji-picker .picker-tab.active { background: rgba(125,125,125,0.12); }
.lv-emoji-picker .picker-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
}
.lv-emoji-picker .picker-grid button {
  background: none; border: none; cursor: pointer;
  font-size: 1.25rem; padding: 4px; border-radius: 8px;
  line-height: 1;
}
.lv-emoji-picker .picker-grid button:hover { background: rgba(125,125,125,0.12); }
.lv-emoji-picker .picker-stickers .picker-grid button { font-size: 1.6rem; }

/* ============================================================
 * UNIFIED BERANDA 3-COLUMN LAYOUT & SOCIAL-NEWS STREAM
 * Matching Image 1 & Image 2 Mockups
 * ============================================================ */
.lv-unified-home-wrapper {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 340px;
  gap: 24px;
  max-width: 1440px;
  margin: 16px auto 40px;
  padding: 0 16px;
  align-items: start;
}

@media (max-width: 1200px) {
  .lv-unified-home-wrapper {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .lv-home-right-sidebar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 860px) {
  .lv-unified-home-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 10px;
  }
  .lv-home-left-sidebar {
    display: none;
  }
}

/* LEFT SIDEBAR */
.lv-home-left-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 6px;
}

.lv-left-nav-group, .lv-left-bottom-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lv-left-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--threads-text, #111827);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.lv-left-nav-item:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
}

.lv-left-nav-item.active {
  background: #ede9fe;
  color: #6366f1;
  font-weight: 700;
}

[data-theme="dark"] .lv-left-nav-item.active {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.lv-ruang-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--threads-text-muted, #6b7280);
}

.lv-ruang-add-btn {
  background: none;
  border: none;
  color: var(--threads-text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
  border-radius: 4px;
}

.lv-ruang-add-btn:hover {
  color: #6366f1;
}

.lv-ruang-items-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lv-ruang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--threads-text, #374151);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.lv-ruang-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .lv-ruang-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* TOP FEED TABS */
.lv-top-feed-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--threads-border, #e5e7eb);
  margin-bottom: 20px;
  padding-bottom: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.lv-tab-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.lv-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--threads-text-muted, #6b7280);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lv-tab-btn:hover {
  color: var(--threads-text, #111827);
  background: rgba(0, 0, 0, 0.04);
}

.lv-tab-btn.active {
  background: #ede9fe;
  color: #6366f1;
}

[data-theme="dark"] .lv-tab-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
}

.lv-sort-select {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--threads-border, #e5e7eb);
  background: var(--threads-card-bg, #fff);
  color: var(--threads-text, #111827);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

/* HERO HIGHLIGHT CARD */
.lv-hero-highlight-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

@media (max-width: 680px) {
  .lv-hero-highlight-card {
    grid-template-columns: 1fr;
  }
}

.lv-badge-category {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  background: #6366f1;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.lv-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 10px;
}

.lv-hero-title a {
  color: #ffffff;
  text-decoration: none;
}

.lv-hero-title a:hover {
  text-decoration: underline;
}

.lv-hero-excerpt {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 16px;
}

.lv-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.lv-hero-image-col img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lv-hero-action-dropdown {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* COMPOSER BOX */
.lv-stream-composer-box {
  background: var(--threads-card-bg, #ffffff);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lv-composer-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.lv-composer-dummy-input {
  flex: 1;
  border: none;
  background: var(--bg-input, #f9fafb);
  padding: 12px 16px;
  border-radius: 24px;
  font-size: 0.95rem;
  color: var(--threads-text, #111827);
  cursor: pointer;
  outline: none;
  border: 1px solid var(--threads-border, #e5e7eb);
}

.lv-composer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--threads-border, #e5e7eb);
  padding-top: 12px;
}

.lv-composer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lv-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--threads-text-muted, #6b7280);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}

.lv-tool-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--threads-text);
}

.lv-composer-ruang-select {
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid var(--threads-border, #e5e7eb);
  background: var(--threads-card-bg, #fff);
  color: var(--threads-text, #111827);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.lv-composer-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 8px 18px;
  font-weight: 600;
  background: #6366f1;
  border-color: #6366f1;
}

/* FILTER PILLS */
.lv-filter-pills-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.lv-filter-pills-container::-webkit-scrollbar {
  display: none;
}

.lv-filter-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--threads-border, #e5e7eb);
  background: var(--threads-card-bg, #ffffff);
  color: var(--threads-text-muted, #4b5563);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.lv-filter-pill:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.lv-filter-pill.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

/* MIXED FEED CARDS */
.lv-unified-stream-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.lv-feed-card {
  position: relative;
  background: var(--threads-card-bg, #ffffff);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 16px;
  padding: 20px;
  transition: border-color 0.2s ease;
}

.lv-feed-card:hover {
  border-color: var(--threads-border-darker, #d1d5db);
}

.lv-card-main-layout {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 16px;
  position: relative;
}

@media (max-width: 580px) {
  .lv-card-main-layout {
    grid-template-columns: 1fr;
  }
}

.lv-card-category-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.lv-badge-article {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.lv-card-sub-category {
  font-size: 0.85rem;
  color: var(--threads-text-muted);
  text-decoration: none;
  font-weight: 500;
}

.lv-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
}

.lv-card-title a {
  color: var(--threads-text, #111827);
  text-decoration: none;
}

.lv-card-title a:hover {
  color: #6366f1;
}

.lv-card-excerpt {
  color: var(--threads-text-muted, #4b5563);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 14px;
}

.lv-card-author-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--threads-text-muted, #6b7280);
  flex-wrap: wrap;
}

.lv-news-thumbnail {
  width: 100%;
  height: 105px;
  object-fit: cover;
  border-radius: 12px;
}

.lv-card-dropdown-pos {
  position: absolute;
  top: -4px;
  right: -4px;
}

.btn-dots-menu {
  background: none;
  border: none;
  color: var(--threads-text-muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.btn-dots-menu:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--threads-text);
}

/* CARD FOOTER ACTIONS */
.lv-card-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--threads-border, #e5e7eb);
  padding-top: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.lv-reactions-emojis {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
}

.lv-react-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--threads-text-muted);
  margin-left: 4px;
}

.lv-action-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lv-act-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--threads-text-muted, #6b7280);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
}

.lv-act-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--threads-text);
}

/* COMMENTS SHOWCASE SECTION */
.lv-home-comments-showcase-section {
  background: var(--threads-card-bg, #ffffff);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.lv-comments-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.lv-comments-count-title h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.lv-comments-sort-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--threads-text-muted);
}

.lv-sort-select-sm {
  border: none;
  background: none;
  font-weight: 600;
  color: var(--threads-text);
  cursor: pointer;
  outline: none;
}

.lv-inline-comment-composer {
  margin-bottom: 20px;
}

.lv-inline-composer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input, #f9fafb);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 24px;
  padding: 6px 12px;
}

.lv-inline-comment-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  color: var(--threads-text, #111827);
  font-size: 0.9rem;
}

.lv-inline-composer-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lv-btn-icon-sm {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 6px;
  color: var(--threads-text-muted);
}

.lv-btn-send-comment {
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #6366f1;
  border-color: #6366f1;
}

.lv-comments-preview-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lv-comment-item-card {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--threads-border, #f0f0f0);
}

.lv-comment-item-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lv-comment-content-col {
  flex: 1;
  min-width: 0;
}

.lv-comment-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.lv-comment-author-name {
  font-weight: 700;
  color: var(--threads-text, #111827);
}

.lv-comment-role-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  text-transform: capitalize;
}

.lv-comment-role-badge.badge-author {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.lv-comment-role-badge.badge-admin {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.lv-comment-time {
  color: var(--threads-text-muted, #6b7280);
}

.lv-comment-text-body {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--threads-text, #374151);
  margin-bottom: 6px;
}

.lv-comment-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
}

.lv-cm-act-btn {
  background: none;
  border: none;
  color: var(--threads-text-muted, #6b7280);
  cursor: pointer;
  font-weight: 600;
  padding: 0;
  text-decoration: none;
}

.lv-cm-act-btn:hover {
  color: #6366f1;
}

.lv-cm-act-btn.delete {
  color: #ef4444;
}

.lv-cm-act-btn.like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* RIGHT SIDEBAR WIDGETS */
.lv-home-right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lv-widget-card {
  background: var(--threads-card-bg, #ffffff);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lv-widget-header-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  cursor: pointer;
}

.lv-widget-header-link h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--threads-text, #111827);
}

.lv-widget-arrow {
  color: var(--threads-text-muted);
  font-size: 0.9rem;
}

/* PROFILE WIDGET */
.lv-profile-widget-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.lv-profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lv-profile-name-row h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.lv-profile-handle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.lv-profile-handle {
  font-size: 0.85rem;
  color: var(--threads-text-muted);
}

.lv-profile-role-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.lv-profile-permalink-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input, #f9fafb);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

.lv-profile-url-text {
  font-size: 0.82rem;
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-btn-copy-url, .lv-btn-copy-sm {
  background: none;
  border: none;
  color: var(--threads-text-muted);
  cursor: pointer;
  padding: 2px 4px;
}

.lv-btn-copy-url:hover, .lv-btn-copy-sm:hover {
  color: #6366f1;
}

.lv-btn-edit-profile {
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

/* STATISTIK KOMENTAR WIDGET */
.lv-widget-stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.lv-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.lv-stat-label {
  color: var(--threads-text-muted, #6b7280);
}

.lv-stat-val {
  font-weight: 600;
  color: var(--threads-text, #111827);
}

.lv-btn-change-settings {
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px;
}

/* PERMALINK & URL WIDGET */
.lv-permalinks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lv-pl-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--threads-text-muted, #6b7280);
  margin-bottom: 2px;
  display: block;
}

.lv-pl-url-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--bg-input, #f9fafb);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 8px;
  padding: 6px 10px;
}

.lv-pl-url-text {
  font-size: 0.8rem;
  color: #6366f1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

/* PLAYLIST SAYA WIDGET */
.lv-playlist-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.lv-pl-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-input, #f9fafb);
}

.lv-pl-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lv-pl-icon {
  font-size: 1.1rem;
}

.lv-pl-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lv-pl-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--threads-text, #111827);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-pl-count {
  font-size: 0.75rem;
  color: var(--threads-text-muted);
}

.lv-pl-actions {
  display: flex;
  gap: 4px;
}

.lv-btn-create-pl {
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px;
  border-style: dashed;
}

/* TRENDING TAGS */
.lv-trending-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lv-tag-pill {
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lv-tag-pill:hover {
  background: #6366f1;
  color: #ffffff;
}

/* ============================================================
 * MODALS & DRAWERS (Sunting Cepat, Pengaturan Komentar, Playlist)
 * ============================================================ */
.lv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lv-modal-overlay.open {
  display: flex;
}

.lv-modal-drawer-pane {
  background: var(--threads-card-bg, #ffffff);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: lvModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lvModalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.lv-modal-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--threads-border, #e5e7eb);
}

.lv-modal-body {
  padding: 20px;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}

.lv-modal-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--threads-border, #e5e7eb);
  background: var(--bg-input, #fafafa);
}

.lv-form-group {
  margin-bottom: 16px;
}

.lv-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--threads-text, #374151);
  margin-bottom: 6px;
}

.lv-form-input, .lv-form-textarea, .lv-form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--threads-border, #d1d5db);
  background: var(--threads-card-bg, #ffffff);
  color: var(--threads-text, #111827);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
}

.lv-form-input:focus, .lv-form-textarea:focus, .lv-form-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.lv-url-preview-text {
  font-size: 0.8rem;
  color: #6366f1;
  margin: 6px 0 0;
  word-break: break-all;
  font-family: monospace;
}

/* TOGGLE SWITCH */
.lv-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--threads-border, #f0f0f0);
}

.lv-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.lv-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.lv-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1d5db;
  transition: 0.3s;
  border-radius: 34px;
}

.lv-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .lv-slider {
  background-color: #6366f1;
}

input:checked + .lv-slider:before {
  transform: translateX(22px);
}

/* DROPDOWN POPOVER MENUS */
.dropdown-popover-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 100;
  min-width: 210px;
  background: var(--threads-card-bg, #ffffff);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  padding: 6px;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  color: var(--threads-text, #111827);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

.popover-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .popover-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* REPORT REASONS */
.lv-report-reasons-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lv-report-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--threads-text, #374151);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-input, #f9fafb);
  border: 1px solid var(--threads-border, #e5e7eb);
}

.lv-report-radio-label input[type="radio"] {
  accent-color: #6366f1;
}

/* ============================================================
   MULTI-REACTION POPOVER & EMOJI INTERACTION (THREADS STYLE)
   ============================================================ */
.lv-reaction-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lv-emoji-reaction-picker {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 120;
  background: var(--threads-card-bg, #ffffff);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 40px;
  padding: 4px 10px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.22);
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  animation: lvReactionPopIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: auto;
}

@keyframes lvReactionPopIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lv-emoji-item {
  background: none;
  border: none;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease;
  user-select: none;
}

.lv-emoji-item:hover {
  transform: scale(1.35) translateY(-4px);
  background: rgba(99, 102, 241, 0.12);
}

.lv-emoji-item:active {
  transform: scale(1.1);
}

.lv-react-trigger-btn.reacted .lv-react-emoji-current {
  animation: lvReactBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lvReactBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* TRENDING TERKINI RUANG WIDGET (&TOPIC) */
.lv-widget-trending-ruang {
  background: var(--threads-card-bg, #ffffff);
  border: 1px solid var(--threads-border, #e5e7eb);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.lv-widget-trending-ruang h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--threads-text, #111827);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lv-ruang-trending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lv-ruang-trending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: var(--bg-input, #f9fafb);
  border: 1px solid var(--threads-border, #f0f0f0);
  transition: all 0.15s ease;
}

.lv-ruang-trending-item:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(3px);
}

.lv-ruang-topic-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #6366f1;
}

.lv-ruang-topic-count {
  font-size: 0.78rem;
  color: var(--threads-text-muted, #6b7280);
}



