/* MyHashtag.io premium responsive foundation */
:root {
  --mh-bg: #203246;
  --mh-bg-deep: #162535;
  --mh-panel: rgba(48, 70, 91, 0.84);
  --mh-panel-strong: rgba(54, 80, 104, 0.94);
  --mh-line: rgba(255, 255, 255, 0.11);
  --mh-line-strong: rgba(255, 255, 255, 0.18);
  --mh-text: #edf6ff;
  --mh-muted: #abc2d8;
  --mh-blue: #4a90e2;
  --mh-yellow: #ffd400;
  --mh-green: #3fd288;
  --mh-danger: #ff6262;
  --mh-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  --mh-radius: 14px;
}

/* Cohesion pass: keep the unified navigation thin and aligned with the original feed style. */
.mh-site-header {
  margin: 10px auto 14px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, .08);
  background: rgba(38, 57, 76, .94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.mh-site-header-inner {
  grid-template-columns: auto minmax(240px, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(45, 66, 87, .96);
  border-bottom-color: rgba(255, 255, 255, .06);
}

.mh-site-brand {
  min-width: 154px;
  gap: 8px;
}

.mh-site-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1f4f72;
}

.mh-site-brand strong {
  font-size: 15px;
  line-height: 1.05;
}

.mh-site-brand small {
  font-size: 9px;
  color: #b7e8ff;
}

.mh-site-search {
  height: 38px;
  border-radius: 12px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  background: rgba(17, 31, 45, .9);
}

.mh-site-search input {
  font-size: 14px;
  font-weight: 650;
}

.mh-site-search button {
  background: #f0b82f;
  color: #102033;
  font-size: 12px;
  min-width: 72px;
  padding: 0 12px;
}

.mh-site-actions,
.mh-site-page-actions {
  gap: 5px;
}

.mh-site-actions a,
.mh-site-page-actions a,
.mh-site-page-actions button {
  min-height: 34px;
  border-radius: 10px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, .045);
}

.mh-site-actions a.active,
.mh-site-actions a:hover,
.mh-site-page-actions a:hover,
.mh-site-page-actions button:hover {
  background: rgba(64, 196, 255, .14);
  border-color: rgba(64, 196, 255, .55);
}

.mh-site-actions .create {
  background: rgba(255, 193, 7, .14);
  border-color: rgba(255, 193, 7, .34);
  color: #ffe5a0;
}

.mh-site-context {
  align-items: center;
  gap: 12px;
  padding: 8px 10px 6px;
}

.mh-site-kicker {
  display: inline-flex;
  margin: 0 0 2px;
  color: #8bd8ff;
  font-size: 9px;
  letter-spacing: .04em;
}

.mh-site-context h1 {
  font-size: 17px;
  line-height: 1.12;
  margin: 0;
}

.mh-site-context p {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #c7d8e8;
}

.mh-site-category-rail {
  gap: 6px;
  padding: 0 10px 9px;
}

.mh-site-category-rail a {
  min-height: 30px;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, .04);
}

.mh-site-category-rail a.active {
  background: rgba(64, 196, 255, .15);
  border-color: rgba(64, 196, 255, .55);
}

/* Cohesion pass: reduce the heavy result-card overrides and keep the original card personality. */
.result {
  border-color: rgba(255, 255, 255, .065) !important;
  border-radius: 14px;
  background: linear-gradient(180deg, #33475b 0%, #2f4254 100%) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18) !important;
  outline: 0;
}

.result:hover {
  border-color: rgba(64, 196, 255, .24) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24) !important;
}

.result::before {
  display: none !important;
}

.card-header {
  padding: 5px 8px 4px;
  margin-bottom: 4px !important;
  border-bottom: 0;
  background: transparent;
}

.card-header .author-block {
  gap: 9px;
}

.card-header .media-box {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

.card-header .author-avatar-link {
  width: 34px !important;
  height: 34px !important;
}

.card-header .author-avatar {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border: 2px solid #000 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25) !important;
}

.card-header .author-name {
  color: #e7edf4;
  font-size: 14px;
  font-weight: 800;
  max-width: 200px;
}

.result h2 {
  color: #f2f6fb;
  font-size: 16px;
  line-height: 1.25;
}

.result p {
  color: #cfd9e5;
}

.channel-row {
  margin: 6px 10px;
  padding: 5px 7px;
  border-radius: 8px;
  box-shadow: none;
}

.tag-chip .tag-search-link {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.tag-chip .follow-icon,
.like-btn,
.dislike-btn,
.save-btn,
.share-icon-button,
.card-tools .share-inline,
.mh-open-comments {
  box-shadow: none;
}

.like-dislike-container {
  margin-top: 8px;
  padding: 7px 9px;
  background: rgba(0, 0, 0, .045);
}

.media-title-overlay {
  display: none !important;
}

.feed-infinite-sentinel {
  width: min(1500px, calc(100vw - 16px));
  height: 1px;
  margin: 0 auto;
}

.loading-indicator {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: fit-content;
  max-width: calc(100vw - 32px);
  margin: 18px auto 26px !important;
  padding: 9px 14px !important;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px !important;
  background: rgba(17, 31, 45, .84) !important;
  color: #dceeff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22) !important;
  gap: 9px !important;
  z-index: 1 !important;
}

.loading-indicator span {
  font-size: 12px;
  font-weight: 850;
}

.loading-spinner {
  width: 18px !important;
  height: 18px !important;
  border-width: 2px !important;
  border-color: rgba(255, 255, 255, .18) !important;
  border-top-color: #f0b82f !important;
}

@media (max-width: 1100px) {
  .mh-site-header-inner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mh-site-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .mh-site-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .mh-site-header {
    border-radius: 13px;
    margin-top: 8px;
  }

  .mh-site-header-inner {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .mh-site-brand {
    min-width: 0;
  }

  .mh-site-search {
    order: 0;
    height: 38px;
    grid-template-columns: 34px minmax(0, 1fr) 42px;
  }

  .mh-site-search button {
    display: block !important;
    min-width: 42px !important;
    padding: 0 !important;
    font-size: 0 !important;
    text-align: center !important;
  }

  .mh-site-search button::after {
    content: "Go";
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0;
  }

  .mh-site-actions {
    justify-content: flex-start;
    gap: 5px;
  }

  .mh-site-actions a {
    min-width: 36px;
    min-height: 34px;
    padding: 0 8px;
  }

  .mh-site-context {
    padding: 8px;
  }

  .mh-site-context h1 {
    font-size: 16px;
  }

  .mh-site-context p {
    font-size: 11.5px;
  }

  .mh-site-category-rail {
    padding: 0 8px 8px;
  }

  .mh-site-category-rail a {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11.5px;
  }

  .tag-chip .tag-search-link {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 13.5px;
    font-weight: 850;
  }
}

/* Feed readability and infinite-scroll polish. */
#feeds {
  row-gap: 20px;
}

.result {
  overflow: hidden !important;
  animation: mh-card-enter .24s ease both;
  transform-origin: center top;
}

.result.mh-pending-layout {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  animation: none !important;
}

@keyframes mh-card-enter {
  from {
    opacity: .78;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result .media-box {
  margin: 0 6px 10px;
  border-radius: 12px;
  background: rgba(5, 13, 22, .22);
  overflow: hidden !important;
  contain: paint;
}

.result .feed-thumbnail,
.result .media-box > a > img,
.result .media-box img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.result > a > img.feed-thumbnail,
.result > img.feed-thumbnail {
  display: block;
  width: calc(100% - 12px) !important;
  max-width: calc(100% - 12px) !important;
  height: auto !important;
  margin: 0 6px 10px;
  border-radius: 12px;
  object-fit: cover;
}

.result h2 {
  margin: 8px 12px 5px;
  font-size: 17px;
  line-height: 1.24;
  font-weight: 900;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result p {
  margin: 4px 12px;
  font-size: 14.5px;
  line-height: 1.36;
  letter-spacing: 0;
}

.result > p:not(.favicon-and-site) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.channel-row {
  margin-top: 9px;
}

.tag-chip {
  margin-top: 4px;
}

.card-tools,
.actions-row,
.like-dislike-container {
  border-color: rgba(255, 255, 255, .055) !important;
}

.loading-indicator {
  min-height: 38px;
  backdrop-filter: blur(8px);
}

.loading-indicator::after {
  content: "New results are being placed into the grid";
  color: #94aec8;
  font-size: 11px;
  font-weight: 750;
}

@media (max-width: 640px) {
  #feeds {
    row-gap: 16px;
  }

  .result .media-box {
    margin: 0 6px 9px;
    border-radius: 11px;
  }

  .result h2 {
    margin: 8px 11px 5px;
    font-size: 16px;
    line-height: 1.25;
  }

  .result p {
    margin: 4px 11px;
    font-size: 14px;
    line-height: 1.35;
  }

  .loading-indicator::after {
    display: none;
  }
}

/* Mobile final override: keep the search submit compact and readable. */
@media (max-width: 640px) {
  .mh-site-search {
    grid-template-columns: 34px minmax(0, 1fr) 42px !important;
  }

  .mh-site-search button {
    display: block !important;
    min-width: 42px !important;
    padding: 0 !important;
    font-size: 0 !important;
    text-align: center !important;
  }

  .mh-site-search button::after {
    content: "Go";
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0;
  }
}

/* Mobile final override: keep the search submit compact and readable. */
@media (max-width: 640px) {
  .mh-site-search {
    grid-template-columns: 34px minmax(0, 1fr) 42px !important;
  }

  .mh-site-search button {
    display: block !important;
    min-width: 42px !important;
    padding: 0 !important;
    font-size: 0 !important;
    text-align: center !important;
  }

  .mh-site-search button::after {
    content: "Go";
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0;
  }
}

/* Compact information pass: keep page context without making the header feel like a separate app. */
.mh-site-context {
  padding: 6px 10px 4px;
}

.mh-site-context > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.mh-site-kicker {
  display: none;
}

.mh-site-context h1 {
  font-size: 15px;
  white-space: nowrap;
}

.mh-site-context p {
  max-width: none;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mh-site-page-actions a,
.mh-site-page-actions button {
  min-height: 30px;
  border-radius: 9px;
  font-size: 11.5px;
}

.mh-site-category-rail {
  padding-bottom: 7px;
}

.mh-site-category-rail a {
  min-height: 27px;
  border-radius: 9px;
  font-size: 11.5px;
}

@media (max-width: 640px) {
  .mh-site-context {
    padding: 6px 8px 3px;
  }

  .mh-site-context > div {
    display: block;
  }

  .mh-site-context h1 {
    font-size: 15px;
  }

  .mh-site-context p {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    white-space: normal;
  }

  .mh-site-page-actions {
    gap: 4px;
  }

  .mh-site-page-actions a,
  .mh-site-page-actions button {
    min-height: 29px;
    padding: 0 8px;
    font-size: 11px;
  }

  .mh-site-category-rail {
    padding-bottom: 7px;
  }

  .mh-site-category-rail a {
    min-height: 27px;
    font-size: 11px;
  }
}

* {
  box-sizing: border-box;
}

html {
  text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(circle at 14% -6%, rgba(74, 144, 226, 0.22), transparent 34%),
    radial-gradient(circle at 92% 2%, rgba(255, 212, 0, 0.12), transparent 26%),
    linear-gradient(180deg, var(--mh-bg), var(--mh-bg-deep));
  color: var(--mh-text);
  min-height: 100vh;
}

a {
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
}

.search-bar {
  width: min(1180px, calc(100vw - 24px));
  margin: 8px auto 22px;
  padding: 7px;
  border: 1px solid var(--mh-line);
  border-radius: 16px;
  background: rgba(18, 32, 46, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

#search-query {
  min-height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: #102033;
}

.home-button,
.menu-button,
#search-button,
.button.pin {
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.home-button:hover,
.menu-button:hover,
#search-button:hover,
.button.pin:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

#side-menu {
  background: rgba(18, 32, 46, 0.96);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--mh-line);
}

#tags-container,
.tags-container {
  width: min(1120px, calc(100vw - 24px));
  margin-left: auto;
  margin-right: auto;
}

.tag-link,
.hashtag,
.tag-search-link {
  border-radius: 7px;
  font-weight: 850;
  text-decoration: none !important;
  border-bottom: 0 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

#feeds {
  width: min(1500px, calc(100vw - 16px));
  margin-left: auto;
  margin-right: auto;
}

.link-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--mh-radius);
  background: linear-gradient(180deg, rgba(55, 82, 107, 0.94), rgba(40, 61, 82, 0.94));
  box-shadow: var(--mh-shadow);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 194, 255, 0.28);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.32);
}

.link-card h2,
.link-card h3,
.link-card .title {
  color: var(--mh-text);
  letter-spacing: 0;
}

.card-tools,
.mh-panel,
.mh-card,
.auth-shell {
  border: 1px solid var(--mh-line);
}

.mh-page {
  width: min(1180px, calc(100vw - 28px));
}

.mh-header,
.mh-panel,
.mh-card,
.mh-stat,
.auth-shell {
  box-shadow: var(--mh-shadow);
}

.mh-card,
.mh-panel,
.mh-stat {
  background: linear-gradient(180deg, var(--mh-panel-strong), var(--mh-panel));
}

.mh-grid {
  align-items: stretch;
}

.mh-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mh-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 194, 255, 0.28);
}

.mh-avatar {
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* Result card polish: visual-only, preserves generated tag colors and card logic. */
.result {
  border-color: rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(52, 73, 94, 0.96);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  outline: 1px solid rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.result:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.31),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.result::before {
  content: "";
  display: block;
  height: 3px;
  margin: -5px -5px 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.16));
}

.card-header {
  padding: 7px 9px 8px;
  margin: 0 0 8px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0));
}

.card-header .author-block {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.card-header .media-box {
  position: static !important;
  z-index: auto !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  overflow: visible !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.card-header .media-title-overlay {
  display: none !important;
}

.card-header .author-avatar-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px !important;
  height: 34px !important;
  overflow: visible !important;
  border-radius: 999px;
  text-decoration: none !important;
}

.card-header .author-avatar {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  margin: 0 !important;
  border: 2px solid rgba(255, 255, 255, 0.52) !important;
  border-radius: 999px !important;
  object-fit: cover;
  box-shadow:
    0 0 0 2px rgba(11, 25, 39, 0.72),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.card-header .author-name {
  color: #f3f8ff;
  max-width: 138px;
  letter-spacing: 0;
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.result h2 {
  color: #f3f8ff;
  line-height: 1.25;
  letter-spacing: 0;
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.result p {
  color: #c9d7e5;
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.result a,
.result a:hover,
.result a:focus,
.result a:visited {
  text-decoration: none !important;
}

.result h2,
.result h2:hover,
.result .author-name,
.result .source-name,
.result .favicon-and-site a,
.result .read-more-link {
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.result img,
.result iframe,
.result .youtube-thumbnail,
.result .facebook-embed,
.result .tiktok-embed {
  border-radius: 10px;
}

.channel-row {
  margin: 8px 10px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--channel-accent, rgba(139, 194, 255, 0.55));
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.source-search-link,
.author-search-link {
  text-decoration: none;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 3px 4px 3px 0;
}

.tag-chip .tag-search-link {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  font-size: 13.5px;
  line-height: 1.12;
  font-weight: 900;
  text-decoration: none !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.16);
}

.tag-chip .follow-icon {
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.16);
}

.like-dislike-container {
  margin: 10px -1px -1px;
  padding: 9px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.05));
}

.like-btn,
.dislike-btn,
.save-btn,
.share-icon-button,
.card-tools .share-inline,
.mh-open-comments {
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
}

.like-btn:hover,
.dislike-btn:hover,
.save-btn:hover,
.share-icon-button:hover,
.card-tools .share-inline:hover,
.mh-open-comments:hover {
  transform: translateY(-1px);
}

#myBtn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.mh-share-open {
  overflow: hidden;
}

/* Share surface: full-page premium workspace, not a compact modal. */
#mh-share-overlay {
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 0%, rgba(74, 144, 226, 0.28), transparent 34%),
    radial-gradient(circle at 86% 8%, rgba(255, 212, 0, 0.17), transparent 28%),
    radial-gradient(circle at 50% 105%, rgba(63, 210, 136, 0.14), transparent 32%),
    rgba(8, 15, 25, 0.94) !important;
  backdrop-filter: blur(22px);
}

#mh-share-overlay .mh-modal {
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 14%, rgba(0, 178, 255, 0.16), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(255, 0, 128, 0.13), transparent 30%),
    radial-gradient(circle at 44% 105%, rgba(255, 212, 0, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(30, 48, 67, 0.96), rgba(14, 25, 39, 0.98)),
    var(--mh-bg-deep);
  box-shadow: none !important;
}

#mh-share-overlay .mh-head {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 74px;
  padding: 16px clamp(18px, 3vw, 42px);
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(13, 25, 39, 0.84);
  backdrop-filter: blur(18px);
}

#mh-share-overlay .mh-head::after {
  content: "";
  position: absolute;
  left: clamp(18px, 3vw, 42px);
  right: clamp(18px, 3vw, 42px);
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #ffd400, #ff3fb4, #3fd288);
  opacity: 0.85;
}

#mh-share-overlay .mh-title {
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 10px 34px rgba(74, 144, 226, 0.24);
}

#mh-share-overlay .mh-sub {
  max-width: 780px;
  color: #bcd1e7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#mh-share-overlay .mh-close {
  width: 44px;
  height: 44px;
  position: static !important;
  flex: 0 0 44px;
  margin-left: auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

#mh-share-overlay .mh-close:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(255, 98, 98, 0.52);
  background: rgba(255, 98, 98, 0.16);
}

#mh-share-overlay .mh-body {
  width: min(1380px, calc(100vw - 28px));
  margin: 0 auto;
  padding: clamp(16px, 2.4vw, 34px) 0 44px;
  overflow: auto;
  display: grid;
  align-content: start;
  grid-auto-rows: auto;
  gap: 18px;
}

#mh-share-overlay .share-header,
#mh-share-overlay .share-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(35, 55, 76, 0.78);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.26);
  overflow: visible;
}

#mh-share-overlay .share-header::before,
#mh-share-overlay .share-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #00d4ff, #3fd288, #ffd400, #ff3fb4);
  opacity: 0.84;
}

#mh-share-overlay .share-header {
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.1fr) minmax(210px, 0.55fr);
  gap: 18px;
  padding: 16px;
  align-items: stretch;
}

#mh-share-overlay .sp-preview {
  min-height: 230px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

#mh-share-overlay .sp-preview.is-fallback .sp-media img {
  display: none;
}

#mh-share-overlay .sp-preview.is-fallback .sp-media::before {
  content: "#";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 88px;
  font-weight: 950;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, #10243a 0%, #11607a 54%, #223650 100%);
}

#mh-share-overlay .sp-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 26%, transparent 70%, rgba(0, 212, 255, 0.11));
}

#mh-share-overlay .sp-overlay {
  padding: 18px;
}

#mh-share-overlay .sp-title {
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.14;
}

#mh-share-overlay .sp-url {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
}

#mh-share-overlay .sp-info {
  padding: 16px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(74, 144, 226, 0.2), transparent 36%),
    rgba(255, 255, 255, 0.04);
}

#mh-share-overlay .sp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
}

#mh-share-overlay .chip {
  min-height: 48px;
  justify-content: center;
  border-radius: 14px;
  font-size: 13px;
}

#mh-share-overlay .sp-stats .chip:nth-child(1) {
  border-color: rgba(63, 210, 136, 0.4);
  background: radial-gradient(circle at 12% 10%, rgba(63, 210, 136, 0.32), transparent 42%), linear-gradient(135deg, rgba(63, 210, 136, 0.18), rgba(255, 255, 255, 0.035));
}

#mh-share-overlay .sp-stats .chip:nth-child(2) {
  border-color: rgba(255, 98, 98, 0.38);
  background: radial-gradient(circle at 12% 10%, rgba(255, 98, 98, 0.3), transparent 42%), linear-gradient(135deg, rgba(255, 98, 98, 0.16), rgba(255, 255, 255, 0.035));
}

#mh-share-overlay .sp-stats .chip:nth-child(3) {
  border-color: rgba(139, 194, 255, 0.4);
  background: radial-gradient(circle at 12% 10%, rgba(74, 144, 226, 0.32), transparent 42%), linear-gradient(135deg, rgba(74, 144, 226, 0.18), rgba(255, 255, 255, 0.035));
}

#mh-share-overlay .sp-stats .chip:nth-child(4) {
  border-color: rgba(255, 212, 0, 0.42);
  background: radial-gradient(circle at 12% 10%, rgba(255, 212, 0, 0.32), transparent 42%), linear-gradient(135deg, rgba(255, 212, 0, 0.18), rgba(255, 255, 255, 0.035));
}

#mh-share-overlay .sp-controls,
#mh-share-overlay .sp-actions {
  align-content: start;
}

#mh-share-overlay .sp-actions .btn-ghost,
#mh-share-overlay .sp-controls .btn-ghost,
#mh-share-overlay .switch {
  min-height: 44px;
  border-radius: 14px;
}

#mh-share-overlay .sp-actions {
  display: grid;
  grid-auto-rows: min-content;
}

#mh-share-overlay .sp-actions .btn-ghost:first-child,
#mh-share-overlay #mh-share-copy-link {
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.28), rgba(255, 255, 255, 0.05));
  border-color: rgba(139, 194, 255, 0.34);
}

#mh-share-overlay .sp-actions .btn-ghost,
#mh-share-overlay .sp-controls .btn-ghost,
#mh-share-overlay .copy-row .copy-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.18);
}

#mh-share-overlay #mh-share-copy-all {
  border-color: rgba(255, 212, 0, 0.42);
  background: linear-gradient(135deg, rgba(255, 212, 0, 0.24), rgba(255, 255, 255, 0.04));
}

#mh-share-overlay #mh-share-shorten {
  border-color: rgba(63, 210, 136, 0.38);
  background: linear-gradient(135deg, rgba(63, 210, 136, 0.18), rgba(255, 255, 255, 0.04));
}

#mh-share-overlay #mh-share-open {
  border-color: rgba(0, 212, 255, 0.38);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.17), rgba(255, 255, 255, 0.04));
}

#mh-share-overlay .share-tabs {
  position: sticky;
  top: 74px;
  z-index: 4;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(14, 27, 42, 0.82);
  backdrop-filter: blur(16px);
  overflow-x: auto;
}

#mh-share-overlay .share-tabs .tab {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid transparent;
  white-space: nowrap;
}

#mh-share-overlay .share-tabs .tab.active {
  border-color: rgba(139, 194, 255, 0.36);
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.28), rgba(255, 255, 255, 0.04));
}

#mh-share-overlay .share-tabs .tab:nth-child(1).active { border-color: rgba(0, 212, 255, 0.54); }
#mh-share-overlay .share-tabs .tab:nth-child(2).active { border-color: rgba(255, 212, 0, 0.54); }
#mh-share-overlay .share-tabs .tab:nth-child(3).active { border-color: rgba(255, 63, 180, 0.54); }
#mh-share-overlay .share-tabs .tab:nth-child(4).active { border-color: rgba(63, 210, 136, 0.54); }

#mh-share-overlay .share-panel {
  display: block !important;
  padding: 18px;
  scroll-margin-top: 142px;
}

#mh-share-overlay .share-panel[data-panel="quick"]::before {
  background: linear-gradient(90deg, #00d4ff, #4a90e2);
}

#mh-share-overlay .share-panel[data-panel="direct"]::before {
  background: linear-gradient(90deg, #ffd400, #ff8a00);
}

#mh-share-overlay .share-panel[data-panel="embed"]::before {
  background: linear-gradient(90deg, #ff3fb4, #845ef7);
}

#mh-share-overlay .share-panel[data-panel="qr"]::before {
  background: linear-gradient(90deg, #3fd288, #00d4ff);
}

#mh-share-overlay .share-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#mh-share-overlay .share-section-title span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f5f9ff;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 950;
  line-height: 1.1;
}

#mh-share-overlay .share-section-title span::before {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #06111f;
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

#mh-share-overlay .share-panel[data-panel="quick"] .share-section-title span::before {
  content: "01";
  background: linear-gradient(135deg, #00d4ff, #8bc2ff);
}

#mh-share-overlay .share-panel[data-panel="direct"] .share-section-title span::before {
  content: "02";
  background: linear-gradient(135deg, #ffd400, #ff9f1c);
}

#mh-share-overlay .share-panel[data-panel="embed"] .share-section-title span::before {
  content: "03";
  background: linear-gradient(135deg, #ff3fb4, #b197fc);
}

#mh-share-overlay .share-panel[data-panel="qr"] .share-section-title span::before {
  content: "04";
  background: linear-gradient(135deg, #3fd288, #00d4ff);
}

#mh-share-overlay .share-section-title small {
  color: #a9bfd5;
  font-size: 12.5px;
  font-weight: 800;
  text-align: right;
}

#mh-share-overlay .share-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

#mh-share-overlay .share-item {
  position: relative;
  min-height: 78px;
  border-radius: 16px;
  padding: 16px;
  overflow: hidden;
}

#mh-share-overlay .share-item::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -30%;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

#mh-share-overlay .share-item i {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

#mh-share-overlay .share-item:nth-child(1) i { background: rgba(24, 119, 242, 0.26); color: #8bc2ff; }
#mh-share-overlay .share-item:nth-child(2) i { background: rgba(255, 255, 255, 0.15); color: #fff; }
#mh-share-overlay .share-item:nth-child(3) i { background: rgba(10, 102, 194, 0.26); color: #8bc2ff; }
#mh-share-overlay .share-item:nth-child(4) i { background: rgba(37, 211, 102, 0.24); color: #7cffb0; }
#mh-share-overlay .share-item:nth-child(5) i { background: rgba(42, 171, 238, 0.24); color: #83d9ff; }
#mh-share-overlay .share-item:nth-child(6) i { background: rgba(255, 69, 0, 0.24); color: #ff9a70; }
#mh-share-overlay .share-item:nth-child(7) i { background: rgba(230, 0, 35, 0.24); color: #ff8ca0; }
#mh-share-overlay .share-item:nth-child(8) i { background: rgba(255, 212, 0, 0.24); color: #ffe770; }
#mh-share-overlay .share-item:nth-child(9) i { background: rgba(139, 194, 255, 0.22); color: #b9d9ff; }
}

#mh-share-overlay .share-item:nth-child(1) { border-color: rgba(24, 119, 242, 0.44); }
#mh-share-overlay .share-item:nth-child(2) { border-color: rgba(255, 255, 255, 0.28); }
#mh-share-overlay .share-item:nth-child(3) { border-color: rgba(10, 102, 194, 0.44); }
#mh-share-overlay .share-item:nth-child(4) { border-color: rgba(37, 211, 102, 0.44); }
#mh-share-overlay .share-item:nth-child(5) { border-color: rgba(42, 171, 238, 0.44); }
#mh-share-overlay .share-item:nth-child(6) { border-color: rgba(255, 69, 0, 0.44); }
#mh-share-overlay .share-item:nth-child(7) { border-color: rgba(230, 0, 35, 0.44); }
#mh-share-overlay .share-item:nth-child(8) { border-color: rgba(255, 212, 0, 0.44); }
#mh-share-overlay .share-item:nth-child(9) { border-color: rgba(139, 194, 255, 0.44); }

#mh-share-overlay .copy-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
}

#mh-share-overlay .copy-row label {
  display: flex;
  align-items: center;
  min-width: 0 !important;
  color: #d9e8f8;
  font-weight: 900;
}

#mh-share-overlay .copy-row label::before {
  content: "";
  width: 7px;
  height: 24px;
  margin-right: 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd400, #ff8a00);
  box-shadow: 0 0 18px rgba(255, 212, 0, 0.28);
}

#mh-share-overlay .copy-row input,
#mh-share-overlay .copy-row textarea,
#mh-share-overlay .code-box textarea {
  border-radius: 14px;
  background: rgba(8, 18, 31, 0.78);
  border-color: rgba(255, 255, 255, 0.16);
}

#mh-share-overlay .copy-row .copy-btn,
#mh-share-overlay .btn-ghost {
  min-height: 40px;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

#mh-share-overlay .copy-row .copy-btn:hover,
#mh-share-overlay .btn-ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 194, 255, 0.34);
}

#mh-share-overlay .qr-wrap {
  justify-content: center;
}

#mh-share-overlay .qr-box {
  border: 8px solid rgba(63, 210, 136, 0.16);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), 0 0 44px rgba(63, 210, 136, 0.18);
}

#mh-share-overlay .qr-tools .btn-ghost:first-child {
  border-color: rgba(63, 210, 136, 0.42);
  background: linear-gradient(135deg, rgba(63, 210, 136, 0.2), rgba(255, 255, 255, 0.04));
}

/* Solid-color share refinement: vibrant, flatter, cleaner premium surface. */
#mh-share-overlay {
  background: #07111d !important;
}

#mh-share-overlay .mh-modal {
  background: #0d1927 !important;
}

#mh-share-overlay .mh-head {
  background: #0b1724 !important;
}

#mh-share-overlay .mh-head::after {
  background: #2ec5ff !important;
}

#mh-share-overlay .share-header,
#mh-share-overlay .share-panel {
  background: #24384c !important;
}

#mh-share-overlay .share-header::before {
  background: #2ec5ff !important;
}

#mh-share-overlay .share-panel[data-panel="quick"]::before {
  background: #2ec5ff !important;
}

#mh-share-overlay .share-panel[data-panel="direct"]::before {
  background: #ffd447 !important;
}

#mh-share-overlay .share-panel[data-panel="embed"]::before {
  background: #ff4fae !important;
}

#mh-share-overlay .share-panel[data-panel="qr"]::before {
  background: #35d08a !important;
}

#mh-share-overlay .sp-info,
#mh-share-overlay .share-tabs {
  background: #1b2c3e !important;
}

#mh-share-overlay .sp-preview::after {
  background: none !important;
}

#mh-share-overlay .sp-stats .chip:nth-child(1) {
  background: #244f49 !important;
  border-color: #35d08a !important;
}

#mh-share-overlay .sp-stats .chip:nth-child(2) {
  background: #503646 !important;
  border-color: #ff6b7c !important;
}

#mh-share-overlay .sp-stats .chip:nth-child(3) {
  background: #244760 !important;
  border-color: #69b7ff !important;
}

#mh-share-overlay .sp-stats .chip:nth-child(4) {
  background: #514b25 !important;
  border-color: #ffd447 !important;
}

#mh-share-overlay .btn-ghost,
#mh-share-overlay .copy-row .copy-btn,
#mh-share-overlay .switch {
  background: #21374c !important;
}

#mh-share-overlay #mh-share-copy-all {
  background: #4f4622 !important;
  border-color: #ffd447 !important;
}

#mh-share-overlay #mh-share-copy-link {
  background: #23486a !important;
  border-color: #69b7ff !important;
}

#mh-share-overlay #mh-share-shorten {
  background: #214b45 !important;
  border-color: #35d08a !important;
}

#mh-share-overlay #mh-share-open {
  background: #1f4b5f !important;
  border-color: #2ec5ff !important;
}

#mh-share-overlay .share-tabs .tab.active {
  background: #23486a !important;
}

#mh-share-overlay .share-tabs .tab:nth-child(1).active {
  background: #1e5365 !important;
}

#mh-share-overlay .share-tabs .tab:nth-child(2).active {
  background: #504621 !important;
}

#mh-share-overlay .share-tabs .tab:nth-child(3).active {
  background: #4d2b4a !important;
}

#mh-share-overlay .share-tabs .tab:nth-child(4).active {
  background: #214b45 !important;
}

#mh-share-overlay .share-panel[data-panel="quick"] .share-section-title span::before {
  background: #2ec5ff !important;
}

#mh-share-overlay .share-panel[data-panel="direct"] .share-section-title span::before {
  background: #ffd447 !important;
}

#mh-share-overlay .share-panel[data-panel="embed"] .share-section-title span::before {
  background: #ff4fae !important;
}

#mh-share-overlay .share-panel[data-panel="qr"] .share-section-title span::before {
  background: #35d08a !important;
}

#mh-share-overlay .share-item {
  background: #263b50 !important;
}

#mh-share-overlay .share-item::before {
  inset: 0 auto 0 0;
  width: 6px;
  height: auto;
  border-radius: 16px 0 0 16px;
  background: #69b7ff !important;
}

#mh-share-overlay .share-item:nth-child(1)::before { background: #1877f2 !important; }
#mh-share-overlay .share-item:nth-child(2)::before { background: #ffffff !important; }
#mh-share-overlay .share-item:nth-child(3)::before { background: #0a66c2 !important; }
#mh-share-overlay .share-item:nth-child(4)::before { background: #25d366 !important; }
#mh-share-overlay .share-item:nth-child(5)::before { background: #2aabee !important; }
#mh-share-overlay .share-item:nth-child(6)::before { background: #ff4500 !important; }
#mh-share-overlay .share-item:nth-child(7)::before { background: #e60023 !important; }
#mh-share-overlay .share-item:nth-child(8)::before { background: #ffd447 !important; }
#mh-share-overlay .share-item:nth-child(9)::before { background: #69b7ff !important; }

#mh-share-overlay .copy-row label::before {
  background: #ffd447 !important;
}

#mh-share-overlay .copy-row input,
#mh-share-overlay .copy-row textarea,
#mh-share-overlay .code-box textarea {
  background: #081625 !important;
}

#mh-share-overlay .qr-tools .btn-ghost:first-child {
  background: #214b45 !important;
  border-color: #35d08a !important;
}

#mh-share-overlay .share-workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: -2px;
}

#mh-share-overlay .workflow-card {
  border: 1px solid rgba(255, 255, 255, .12);
  border-left: 5px solid #2ec5ff;
  border-radius: 16px;
  padding: 13px 14px;
  background: #1b2c3e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

#mh-share-overlay .workflow-card:nth-child(2) {
  border-left-color: #ffd447;
}

#mh-share-overlay .workflow-card:nth-child(3) {
  border-left-color: #ff4fae;
}

#mh-share-overlay .workflow-card:nth-child(4) {
  border-left-color: #35d08a;
}

#mh-share-overlay .workflow-card strong {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  margin-bottom: 5px;
}

#mh-share-overlay .workflow-card span {
  display: block;
  color: #bcd1e7;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 650;
}

#mh-share-overlay .section-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: #1b2c3e;
  color: #c7d9eb;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 750;
}

#mh-share-overlay .section-note i {
  color: #2ec5ff;
  margin-top: 2px;
}

#mh-share-overlay .share-panel[data-panel="direct"] .section-note i {
  color: #ffd447;
}

#mh-share-overlay .share-panel[data-panel="embed"] .section-note i {
  color: #ff4fae;
}

#mh-share-overlay .share-panel[data-panel="qr"] .section-note i {
  color: #35d08a;
}

#mh-share-overlay .btn-ghost.copied,
#mh-share-overlay .copy-btn.copied {
  background: #214b45 !important;
  border-color: #35d08a !important;
  color: #f3fff8 !important;
}

#mh-share-overlay .copy-row input:focus,
#mh-share-overlay .copy-row textarea:focus,
#mh-share-overlay .code-box textarea:focus {
  outline: none;
  border-color: #69b7ff !important;
  box-shadow: 0 0 0 3px rgba(105, 183, 255, .18);
}

@media (max-width: 1100px) {
  #mh-share-overlay .share-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tag-chip .tag-search-link {
    min-height: 29px;
    padding: 5px 8px;
    font-size: 14.5px;
  }

  #mh-share-overlay .share-header {
    grid-template-columns: 1fr;
  }

  #mh-share-overlay .sp-preview {
    min-height: 250px;
  }

  #mh-share-overlay .sp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #mh-share-overlay .sp-actions {
    grid-template-columns: 1fr 1fr;
  }

  #mh-share-overlay .sp-actions .btn-ghost:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .tag-chip .tag-search-link {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 15px;
  }

  #mh-share-overlay .mh-head {
    min-height: 68px;
    padding: 12px 14px;
    flex-direction: row !important;
    align-items: center !important;
  }

  #mh-share-overlay .mh-head > div:first-child {
    width: auto !important;
    min-width: 0;
    padding-right: 10px;
  }

  #mh-share-overlay .mh-close {
    position: static !important;
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    margin-left: auto;
  }

  #mh-share-overlay .mh-body {
    width: calc(100vw - 14px);
    padding-bottom: 28px;
  }

  #mh-share-overlay .share-tabs {
    position: static;
    top: auto;
    min-height: 52px;
    align-items: center;
  }

  #mh-share-overlay .share-panel,
  #mh-share-overlay .share-header {
    border-radius: 16px;
    padding: 12px;
  }

  #mh-share-overlay .copy-row {
    grid-template-columns: 1fr;
  }

  #mh-share-overlay .copy-row .copy-btn {
    width: 100%;
  }

  #mh-share-overlay .share-workflow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #mh-share-overlay .workflow-card {
    padding: 11px 12px;
  }

  #mh-share-overlay .section-note {
    font-size: 12px;
  }
}

.auth-shell {
  position: relative;
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--mh-blue), var(--mh-yellow), var(--mh-green));
}

@media (max-width: 900px) {
  .search-bar {
    width: calc(100vw - 16px);
    grid-template-columns: auto auto 1fr auto auto;
  }

  #feeds {
    width: calc(100vw - 10px);
  }

  .mh-page {
    width: calc(100vw - 20px);
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .search-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-radius: 0 0 16px 16px;
    width: 100vw;
    margin-top: 0;
  }

  #search-query {
    min-width: 0;
    font-size: 16px;
  }

  .home-button,
  .menu-button,
  #search-button,
  .button.pin {
    min-width: 38px;
    min-height: 38px;
  }

  .mh-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .mh-grid {
    grid-template-columns: 1fr !important;
  }

  .mh-stats {
    grid-template-columns: 1fr !important;
  }

  .mh-profile {
    align-items: center !important;
    flex-direction: column;
    text-align: center;
  }

  .mh-cover {
    height: 130px !important;
  }

  .auth-shell {
    width: calc(100vw - 22px);
    padding: 24px 18px;
    border-radius: 16px;
  }
}

@media (min-width: 1500px) {
  #feeds {
    width: min(1680px, calc(100vw - 40px));
  }
}

/* Unified MyHashtag header shared by pages with page-specific category rails. */
.mh-site-header {
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  background: #101d2b;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .34);
  overflow: hidden;
}

.mh-site-header-inner {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #142235;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.mh-site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-width: 190px;
}

.mh-site-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0;
}

.mh-site-brand small {
  display: block;
  color: #9ee7ff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mh-site-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #214b66;
  display: grid;
  place-items: center;
  color: #9ee7ff;
}

.mh-site-search {
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: #081625;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
}

.mh-site-search i {
  color: #69b7ff;
  text-align: center;
}

.mh-site-search input {
  height: 100%;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: 750;
  outline: 0;
}

.mh-site-search button {
  height: 100%;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .12);
  background: #256fa8;
  color: #fff;
  font-weight: 950;
  padding: 0 16px;
  cursor: pointer;
}

.mh-site-actions,
.mh-site-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mh-site-actions a,
.mh-site-page-actions a,
.mh-site-page-actions button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: #1b2c3e;
  color: #eaf4ff;
  border-radius: 14px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.mh-site-actions a.active,
.mh-site-actions a:hover,
.mh-site-page-actions a:hover,
.mh-site-page-actions button:hover {
  background: #214b66;
  border-color: #2ec5ff;
}

.mh-site-actions .create {
  background: #214b45;
  border-color: rgba(53, 208, 138, .45);
}

.mh-site-context {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.mh-site-kicker {
  display: block;
  color: #9ee7ff;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}

.mh-site-context h1 {
  font-size: 24px;
  margin: 0 0 4px;
  color: #fff;
}

.mh-site-context p {
  margin: 0;
  color: #bcd1e7;
  font-weight: 750;
  max-width: 900px;
}

.mh-site-category-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 16px;
}

.mh-site-category-rail a {
  flex: 0 0 auto;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: #1b2c3e;
  color: #dceeff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  font-weight: 900;
}

.mh-site-category-rail a.active {
  background: #214b66;
  border-color: #2ec5ff;
  color: #fff;
}

.mh-site-category-rail a:nth-child(2) i { color: #ffd447; }
.mh-site-category-rail a:nth-child(3) i { color: #ff4fae; }
.mh-site-category-rail a:nth-child(4) i { color: #35d08a; }

@media (max-width: 1100px) {
  .mh-site-header-inner {
    grid-template-columns: 1fr;
  }

  .mh-site-actions {
    justify-content: flex-start;
  }

  .mh-site-context {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .mh-site-header {
    border-radius: 18px;
  }

  .mh-site-header-inner,
  .mh-site-context {
    padding: 12px;
  }

  .mh-site-search {
    grid-template-columns: 38px minmax(0, 1fr) 46px;
  }

  .mh-site-search button {
    display: block;
    min-width: 46px;
    padding: 0;
    font-size: 0;
    text-align: center;
  }

  .mh-site-search button::after {
    content: "Go";
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0;
  }

  .mh-site-actions a span {
    display: none;
  }

  .mh-site-actions a {
    min-width: 42px;
    justify-content: center;
  }

  .mh-site-context h1 {
    font-size: 21px;
  }

  .mh-site-category-rail {
    padding: 0 12px 12px;
  }
}

/* Comments surface: full-page discussion workspace. */
body.mh-comments-open {
  overflow: hidden;
}

#mh-comments-overlay {
  align-items: stretch !important;
  justify-content: center !important;
  padding: 14px;
  background: rgba(3, 10, 18, .82) !important;
}

#mh-comments-overlay .mh-modal {
  width: min(1380px, calc(100vw - 28px)) !important;
  max-height: calc(100vh - 28px) !important;
  min-height: min(860px, calc(100vh - 28px));
  border-radius: 22px !important;
  background: #101d2b !important;
  border: 1px solid rgba(255, 255, 255, .13) !important;
  box-shadow: 0 36px 120px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

#mh-comments-overlay .mh-head {
  min-height: 78px;
  background: #16283a !important;
  border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
}

#mh-comments-overlay .comments-portal-head {
  align-items: flex-start;
  padding: 18px 24px;
}

#mh-comments-overlay .portal-title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#mh-comments-overlay .portal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9ee7ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

#mh-comments-overlay .portal-kicker i {
  color: #2ec5ff;
}

#mh-comments-overlay .mh-title {
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  font-size: 21px;
  letter-spacing: 0;
}

#mh-comments-overlay .mh-sub {
  color: #bcd1e7;
  max-width: 920px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}

#mh-comments-overlay .portal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

#mh-comments-overlay .portal-badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #1b2c3e;
  border: 1px solid rgba(255, 255, 255, .12);
  color: #dceeff;
  font-size: 12px;
  font-weight: 850;
}

#mh-comments-overlay .portal-badges span:nth-child(1) i { color: #35d08a; }
#mh-comments-overlay .portal-badges span:nth-child(2) i { color: #ffd447; }
#mh-comments-overlay .portal-badges span:nth-child(3) i { color: #ff4fae; }

#mh-comments-overlay .portal-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#mh-comments-overlay .sort-control {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #9fb7ce;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

#mh-comments-overlay #mh-cmt-sort {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 12px;
  background: #0b1826;
  color: #eaf4ff;
  font-weight: 850;
  padding: 0 12px;
}

#mh-comments-overlay .mh-close {
  width: 42px;
  height: 42px;
  background: #1b2c3e !important;
  border-color: rgba(255, 255, 255, .14) !important;
}

#mh-comments-overlay .mh-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  grid-template-areas:
    "post composer"
    "stats composer"
    "workflow composer"
    "toolbar composer"
    "thread composer";
  gap: 0;
  height: 100%;
  background: #0d1724;
}

#mh-comments-overlay .post-header {
  grid-area: post;
  display: flex !important;
  background: #142235 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
}

#mh-comments-overlay .post-header .ava {
  border-radius: 16px;
  border-color: rgba(46, 197, 255, .38);
}

#mh-comments-overlay .post-header .info .title {
  color: #fff;
  font-size: 17px;
}

#mh-comments-overlay .post-header .info .by strong {
  color: #2ec5ff;
}

#mh-comments-overlay .post-header::after {
  content: "Connected discovery card";
  margin-left: auto;
  align-self: flex-start;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #214b45;
  border: 1px solid rgba(53, 208, 138, .42);
  color: #c9ffe3;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
}

#mh-comments-overlay .stats-row {
  grid-area: stats;
  background: #101d2b !important;
  padding: 14px 18px;
}

#mh-comments-overlay .count-chip {
  background: #1b2c3e !important;
  border-color: rgba(255, 255, 255, .12) !important;
  color: #eaf4ff;
  box-shadow: none;
}

#mh-comments-overlay .count-chip:nth-child(1) i { color: #2ec5ff; }
#mh-comments-overlay .count-chip:nth-child(2) i { color: #ffd447; }
#mh-comments-overlay .count-chip:nth-child(3) i { color: #ff4fae; }
#mh-comments-overlay .count-chip:nth-child(4) i { color: #35d08a; }

#mh-comments-overlay .comments-workflow {
  grid-area: workflow;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
  background: #0d1724;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

#mh-comments-overlay .workflow-card {
  border: 1px solid rgba(255, 255, 255, .11);
  border-left: 5px solid #2ec5ff;
  border-radius: 16px;
  background: #1b2c3e;
  padding: 12px 13px;
}

#mh-comments-overlay .workflow-card:nth-child(2) { border-left-color: #ffd447; }
#mh-comments-overlay .workflow-card:nth-child(3) { border-left-color: #ff4fae; }
#mh-comments-overlay .workflow-card:nth-child(4) { border-left-color: #35d08a; }

#mh-comments-overlay .workflow-card strong {
  display: block;
  color: #fff;
  font-size: 13.5px;
  margin-bottom: 4px;
}

#mh-comments-overlay .workflow-card span {
  display: block;
  color: #bfd2e6;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

#mh-comments-overlay .comments-toolbar {
  grid-area: toolbar;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #101d2b;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

#mh-comments-overlay .comments-search {
  position: relative;
  flex: 1;
  max-width: 520px;
  display: block;
}

#mh-comments-overlay .comments-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #69b7ff;
}

#mh-comments-overlay .comments-search input {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: #081625;
  color: #f3f8ff;
  padding: 0 14px 0 42px;
  font-weight: 760;
}

#mh-comments-overlay .comments-search input:focus {
  outline: none;
  border-color: #69b7ff;
  box-shadow: 0 0 0 3px rgba(105, 183, 255, .16);
}

#mh-comments-overlay .comments-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#mh-comments-overlay .filter-btn {
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: #1b2c3e;
  color: #d9e8f7;
  min-height: 38px;
  padding: 0 13px;
  cursor: pointer;
  font-weight: 850;
}

#mh-comments-overlay .filter-btn.active,
#mh-comments-overlay .filter-btn:hover {
  background: #214b66;
  border-color: #2ec5ff;
  color: #fff;
}

#mh-comments-overlay .thread {
  grid-area: thread;
  min-height: 220px;
  overflow: auto;
  background: #0d1724;
}

#mh-comments-overlay .thread.is-filter-empty::after {
  content: "No comments match the current filter.";
  display: block;
  margin: 18px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .11);
  background: #1b2c3e;
  color: #c7d9eb;
  font-weight: 800;
}

#mh-comments-overlay .comments-empty {
  margin: 22px;
  min-height: 220px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: #142235;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 26px;
}

#mh-comments-overlay .comments-empty .empty-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: #214b66;
  color: #9ee7ff;
  font-size: 25px;
}

#mh-comments-overlay .comments-empty strong {
  color: #fff;
  font-size: 18px;
}

#mh-comments-overlay .comments-empty span {
  color: #bcd1e7;
  max-width: 520px;
  line-height: 1.45;
  font-weight: 700;
}

#mh-comments-overlay #mh-cmt-new {
  grid-area: composer;
  border-top: 0;
  border-left: 1px solid rgba(255, 255, 255, .1);
  background: #142235 !important;
  padding: 18px;
  position: sticky;
  top: 0;
  align-self: stretch;
  min-height: 100%;
}

#mh-comments-overlay .composer-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 13px;
  padding: 14px;
  border-radius: 16px;
  background: #1b2c3e;
  border: 1px solid rgba(255, 255, 255, .12);
}

#mh-comments-overlay .composer-heading strong {
  display: block;
  color: #fff;
  font-size: 16px;
  margin-bottom: 4px;
}

#mh-comments-overlay .composer-heading span {
  display: block;
  color: #bdd0e4;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 700;
}

#mh-comments-overlay .composer-heading .composer-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #214b45;
  border: 1px solid rgba(53, 208, 138, .4);
  color: #c9ffe3;
  font-size: 11px;
  font-weight: 950;
}

#mh-comments-overlay .composer-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

#mh-comments-overlay .composer-capabilities span {
  min-height: 34px;
  border-radius: 12px;
  background: #0d1724;
  border: 1px solid rgba(255, 255, 255, .1);
  color: #dceeff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 850;
}

#mh-comments-overlay .composer-capabilities span:nth-child(1) i { color: #2ec5ff; }
#mh-comments-overlay .composer-capabilities span:nth-child(2) i { color: #ffd447; }
#mh-comments-overlay .composer-capabilities span:nth-child(3) i { color: #ff4fae; }
#mh-comments-overlay .composer-capabilities span:nth-child(4) i { color: #35d08a; }

#mh-comments-overlay .composer-tools {
  align-items: flex-start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#mh-comments-overlay .composer-tools .tool,
#mh-comments-overlay #poll-add-opt.tool {
  background: #1b2c3e !important;
  border-color: rgba(255, 255, 255, .13) !important;
  width: auto !important;
  min-height: 42px;
  padding: 0 12px;
  gap: 8px;
  justify-content: flex-start;
  font-weight: 900;
}

#mh-comments-overlay .composer-tools .tool:hover,
#mh-comments-overlay #poll-add-opt.tool:hover {
  background: #214b66 !important;
}

#mh-comments-overlay .composer-tools .tool span {
  display: inline;
  color: #eaf4ff;
  font-size: 12.5px;
}

#mh-comments-overlay .composer-tools .chips {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

#mh-comments-overlay .composer-tools .chip {
  background: #1b2c3e !important;
  border-color: rgba(255, 255, 255, .13) !important;
  text-align: center;
  min-height: 34px;
  padding: 0 8px;
}

#mh-comments-overlay .composer-tools .chip:hover {
  background: #3c3446 !important;
  color: #ffd447 !important;
}

#mh-comments-overlay .reply-form textarea,
#mh-comments-overlay #mh-cmt-new textarea {
  min-height: 170px;
  background: #081625 !important;
  border-color: rgba(255, 255, 255, .14) !important;
  font-size: 15px;
}

#mh-comments-overlay #mh-cmt-new textarea:focus,
#mh-comments-overlay .reply-form textarea:focus {
  border-color: #69b7ff !important;
  box-shadow: 0 0 0 3px rgba(105, 183, 255, .16) !important;
}

#mh-comments-overlay .composer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

#mh-comments-overlay #mh-posting-as,
#mh-comments-overlay .comment-counter {
  color: #bdd0e4;
  font-size: 12.5px;
  font-weight: 750;
}

#mh-comments-overlay .send {
  background: #256fa8 !important;
  box-shadow: 0 12px 26px rgba(37, 111, 168, .28) !important;
  min-height: 42px;
  border-radius: 13px !important;
}

#mh-comments-overlay .send:disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

#mh-comments-overlay .cmt {
  background: #101d2b;
  border-bottom-color: rgba(255, 255, 255, .07);
}

#mh-comments-overlay .cmt:hover {
  background: #142235 !important;
}

#mh-comments-overlay .cmt .ava {
  background: #214b66 !important;
}

#mh-comments-overlay .cmt .meta .who {
  color: #7bdcff !important;
}

#mh-comments-overlay .badge-author {
  background: #ffd447 !important;
  color: #111;
}

@media (max-width: 1180px) {
  #mh-comments-overlay .mh-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "post"
      "stats"
      "workflow"
      "toolbar"
      "thread"
      "composer";
  }

  #mh-comments-overlay #mh-cmt-new {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    min-height: auto;
    position: static;
  }

  #mh-comments-overlay .comments-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #mh-comments-overlay {
    padding: 0;
  }

#mh-comments-overlay .mh-modal {
  width: 100vw !important;
  max-height: 100vh !important;
    min-height: 100vh;
    border-radius: 0 !important;
  }

  #mh-comments-overlay .mh-head {
    min-height: 72px;
    padding: 12px 14px;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #mh-comments-overlay .mh-head > div:first-child {
    width: 100% !important;
    min-width: 0;
    padding-right: 0;
  }

  #mh-comments-overlay .mh-title {
    font-size: 17px;
  }

  #mh-comments-overlay .mh-sub {
    max-width: 100%;
  }

  #mh-comments-overlay .portal-head-actions {
    position: static !important;
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: flex-end;
    justify-content: stretch;
  }

  #mh-comments-overlay .mh-head > div:last-child {
    position: static !important;
    top: auto !important;
    right: auto !important;
    display: grid !important;
  }

  #mh-comments-overlay .sort-control {
    flex: 1;
  }

  #mh-comments-overlay #mh-cmt-sort {
    width: 100%;
  }

  #mh-comments-overlay .mh-close {
    align-self: end;
  }

  #mh-comments-overlay .portal-badges {
    gap: 6px;
  }

  #mh-comments-overlay .portal-badges span {
    font-size: 11px;
    min-height: 28px;
    padding: 0 8px;
  }

  #mh-comments-overlay .post-header::after {
    display: none;
  }

  #mh-comments-overlay .post-header,
  #mh-comments-overlay .stats-row,
  #mh-comments-overlay .comments-toolbar,
  #mh-comments-overlay #mh-cmt-new {
    padding: 12px 14px;
  }

  #mh-comments-overlay .comments-workflow {
    grid-template-columns: 1fr;
    padding: 12px 14px;
    gap: 8px;
  }

  #mh-comments-overlay .comments-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  #mh-comments-overlay .comments-search {
    max-width: none;
  }

  #mh-comments-overlay .comments-filters {
    justify-content: flex-start;
  }

  #mh-comments-overlay .filter-btn {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }

  #mh-comments-overlay .count-chip {
    flex: 1 1 calc(50% - 8px);
  }

  #mh-comments-overlay .composer-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #mh-comments-overlay .composer-heading {
    flex-direction: column;
  }

  #mh-comments-overlay .composer-capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #mh-comments-overlay .composer-tools {
    grid-template-columns: 1fr 1fr;
  }

  #mh-comments-overlay .composer-tools .chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #mh-comments-overlay .send {
    width: 100%;
  }
}

/* Final visual alignment: thin shared navigation and original-feeling result cards. */
.mh-site-header {
  margin: 10px auto 14px;
  border-radius: 16px;
  border-color: rgba(255, 255, 255, .08);
  background: rgba(38, 57, 76, .94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

.mh-site-header-inner {
  grid-template-columns: auto minmax(240px, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(45, 66, 87, .96);
  border-bottom-color: rgba(255, 255, 255, .06);
}

.mh-site-brand {
  min-width: 154px;
  gap: 8px;
}

.mh-site-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1f4f72;
}

.mh-site-brand strong {
  font-size: 15px;
  line-height: 1.05;
}

.mh-site-brand small {
  font-size: 9px;
  color: #b7e8ff;
}

.mh-site-search {
  height: 38px;
  border-radius: 12px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  background: rgba(17, 31, 45, .9);
}

.mh-site-search input {
  font-size: 14px;
  font-weight: 650;
}

.mh-site-search button {
  background: #f0b82f;
  color: #102033;
  font-size: 12px;
  min-width: 72px;
  padding: 0 12px;
}

.mh-site-actions,
.mh-site-page-actions {
  gap: 5px;
}

.mh-site-actions a,
.mh-site-page-actions a,
.mh-site-page-actions button {
  min-height: 34px;
  border-radius: 10px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, .045);
}

.mh-site-actions a.active,
.mh-site-actions a:hover,
.mh-site-page-actions a:hover,
.mh-site-page-actions button:hover {
  background: rgba(64, 196, 255, .14);
  border-color: rgba(64, 196, 255, .55);
}

.mh-site-actions .create {
  background: rgba(255, 193, 7, .14);
  border-color: rgba(255, 193, 7, .34);
  color: #ffe5a0;
}

.mh-site-context {
  align-items: center;
  gap: 12px;
  padding: 8px 10px 6px;
}

.mh-site-kicker {
  display: inline-flex;
  margin: 0 0 2px;
  color: #8bd8ff;
  font-size: 9px;
  letter-spacing: .04em;
}

.mh-site-context h1 {
  font-size: 17px;
  line-height: 1.12;
  margin: 0;
}

.mh-site-context p {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #c7d8e8;
}

.mh-site-category-rail {
  gap: 6px;
  padding: 0 10px 9px;
}

.mh-site-category-rail a {
  min-height: 30px;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, .04);
}

.mh-site-category-rail a.active {
  background: rgba(64, 196, 255, .15);
  border-color: rgba(64, 196, 255, .55);
}

.mh-site-intel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 7px;
}

.mh-site-signals,
.mh-site-shortcuts {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mh-site-signals {
  overflow-x: auto;
  scrollbar-width: none;
}

.mh-site-signals::-webkit-scrollbar {
  display: none;
}

.mh-site-signal,
.mh-site-shortcuts a {
  min-height: 27px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
  background: rgba(255, 255, 255, .035);
  color: #eaf4ff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  white-space: nowrap;
  text-decoration: none;
}

.mh-site-signal i,
.mh-site-shortcuts i {
  color: #8bd8ff;
  font-size: 11px;
}

.mh-site-signal b,
.mh-site-shortcuts span {
  font-size: 11px;
  font-weight: 850;
}

.mh-site-signal small {
  color: #ffd56f;
  font-size: 10px;
  font-weight: 850;
}

.mh-site-shortcuts {
  flex: 0 0 auto;
}

.mh-site-shortcuts a:hover {
  border-color: rgba(255, 193, 7, .42);
  background: rgba(255, 193, 7, .10);
  color: #fff;
}

.result {
  border-color: rgba(255, 255, 255, .065) !important;
  border-radius: 14px;
  background: linear-gradient(180deg, #33475b 0%, #2f4254 100%) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18) !important;
  outline: 0;
}

.result:hover {
  border-color: rgba(64, 196, 255, .24) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24) !important;
}

.result::before {
  display: none !important;
}

.card-header {
  padding: 5px 8px 4px;
  margin-bottom: 4px !important;
  border-bottom: 0;
  background: transparent;
}

.card-header .author-block {
  gap: 9px;
}

.card-header .media-box {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

.card-header .author-avatar-link {
  width: 34px !important;
  height: 34px !important;
}

.card-header .author-avatar {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border: 2px solid #000 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25) !important;
}

.card-header .author-name {
  color: #e7edf4;
  font-size: 14px;
  font-weight: 800;
  max-width: 200px;
}

.result h2 {
  color: #f2f6fb;
  font-size: 16px;
  line-height: 1.25;
}

.result p {
  color: #cfd9e5;
}

.channel-row {
  margin: 6px 10px;
  padding: 5px 7px;
  border-radius: 8px;
  box-shadow: none;
}

.tag-chip .tag-search-link {
  min-height: 24px;
  padding: 3px 7px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.tag-chip .follow-icon,
.like-btn,
.dislike-btn,
.save-btn,
.share-icon-button,
.card-tools .share-inline,
.mh-open-comments {
  box-shadow: none;
}

.like-dislike-container {
  margin-top: 8px;
  padding: 7px 9px;
  background: rgba(0, 0, 0, .045);
}

.source-search-panel {
  width: min(1500px, calc(100vw - 22px));
  margin: 0 auto 14px;
  border: 1px solid rgba(10, 35, 66, .10);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98), rgba(248, 252, 255, .96)),
    #fff;
  box-shadow: 0 16px 34px rgba(10, 35, 66, .10);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(320px, .95fr);
  gap: 12px;
  align-items: stretch;
}

.source-search-main {
  min-width: 0;
  border-radius: 13px;
  background: #ffffff;
  border: 1px solid rgba(10, 35, 66, .08);
  padding: 14px 16px;
}

.source-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #0b78ff;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.source-search-main h2 {
  margin: 10px 0 5px;
  color: #10233f;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.source-search-main p {
  margin: 0;
  color: #54627a;
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 760px;
}

.source-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.source-stats span {
  min-width: 0;
  border-radius: 13px;
  border: 1px solid rgba(10, 35, 66, .08);
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 3px 0 0 var(--source-accent, #0b78ff);
}

.source-stats span:nth-child(2) { --source-accent: #ff4b7d; }
.source-stats span:nth-child(3) { --source-accent: #00a96e; }
.source-stats span:nth-child(4) { --source-accent: #ff9f1c; }

.source-stats b {
  color: #10233f;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.source-stats small {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.source-filter-rail {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 1px;
  scrollbar-width: none;
}

.source-filter-rail::-webkit-scrollbar {
  display: none;
}

.source-filter-rail a {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid rgba(10, 35, 66, .10);
  color: #19324f;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(10, 35, 66, .07);
}

.source-filter-rail a.active {
  background: #10233f;
  color: #fff;
  border-color: #10233f;
}

.source-filter-rail a:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 120, 255, .35);
}

@media (max-width: 1100px) {
  .mh-site-header-inner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mh-site-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .mh-site-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .mh-site-header {
    border-radius: 13px;
    margin-top: 8px;
  }

  .mh-site-header-inner {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .mh-site-brand {
    min-width: 0;
  }

  .mh-site-search {
    order: 0;
    height: 38px;
    grid-template-columns: 34px minmax(0, 1fr) 42px;
  }

  .mh-site-actions {
    justify-content: flex-start;
    gap: 5px;
  }

  .mh-site-actions a {
    min-width: 36px;
    min-height: 34px;
    padding: 0 8px;
  }

  .mh-site-context {
    padding: 8px;
  }

  .mh-site-context h1 {
    font-size: 16px;
  }

  .mh-site-context p {
    font-size: 11.5px;
  }

  .mh-site-category-rail {
    padding: 0 8px 8px;
  }

  .mh-site-intel {
    align-items: stretch;
    flex-direction: column;
    padding: 0 8px 7px;
  }

  .mh-site-shortcuts {
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: none;
  }

  .mh-site-shortcuts::-webkit-scrollbar {
    display: none;
  }

  .mh-site-signal,
  .mh-site-shortcuts a {
    min-height: 26px;
    padding: 0 7px;
  }

  .mh-site-signal b,
  .mh-site-shortcuts span {
    font-size: 10.5px;
  }

  .mh-site-signal small {
    font-size: 9.5px;
  }

  .mh-site-category-rail a {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11.5px;
  }

  .tag-chip .tag-search-link {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 13.5px;
    font-weight: 850;
  }

  .source-search-panel {
    width: min(1500px, calc(100vw - 16px));
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 14px;
    grid-template-columns: 1fr;
  }

  .source-search-main {
    padding: 12px;
  }

  .source-search-main h2 {
    font-size: 20px;
  }

  .source-search-main p {
    font-size: 12.5px;
  }

  .source-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-stats span {
    padding: 10px;
  }

  .source-filter-rail a {
    min-height: 32px;
    padding: 0 10px;
    font-size: 11.5px;
  }
}

/* Source search compact command bar: keep it aligned with the unified dark header. */
.source-search-panel {
  width: min(1500px, calc(100vw - 22px));
  margin: -4px auto 10px;
  min-height: 0;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(38, 57, 76, .94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(260px, 1fr) minmax(320px, 1.15fr);
  gap: 8px;
  align-items: center;
}

.source-search-main {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-kicker {
  min-height: 25px;
  padding: 0 9px;
  border-radius: 9px;
  background: rgba(64, 196, 255, .15);
  border: 1px solid rgba(64, 196, 255, .45);
  color: #eaf4ff;
  font-size: 10.5px;
  font-weight: 850;
  text-transform: none;
  letter-spacing: 0;
}

.source-kicker i {
  color: #8bd8ff;
}

.source-search-main h2 {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-search-main p {
  display: none;
}

.source-stats {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.source-stats::-webkit-scrollbar {
  display: none;
}

.source-stats span {
  flex: 0 0 auto;
  min-height: 28px;
  min-width: 0;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.source-stats b {
  color: #fff;
  font-size: 11.5px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.source-stats small {
  margin: 0;
  color: #ffd56f;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.source-filter-rail {
  grid-column: auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: none;
}

.source-filter-rail::-webkit-scrollbar {
  display: none;
}

.source-filter-rail a {
  min-height: 28px;
  flex: 0 0 auto;
  border-radius: 9px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  box-shadow: none;
  color: #eaf4ff;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.source-filter-rail a i {
  color: #8bd8ff;
  font-size: 10.5px;
}

.source-filter-rail a.active {
  background: rgba(64, 196, 255, .16);
  color: #fff;
  border-color: rgba(64, 196, 255, .55);
}

.source-filter-rail a:hover {
  transform: none;
  background: rgba(255, 255, 255, .075);
  border-color: rgba(139, 216, 255, .42);
}

@media (max-width: 980px) {
  .source-search-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .source-filter-rail {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .source-search-panel {
    width: min(1500px, calc(100vw - 22px));
    margin: -2px auto 8px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  .source-search-main {
    gap: 6px;
  }

  .source-search-main h2 {
    font-size: 13px;
  }

  .source-kicker,
  .source-stats span,
  .source-filter-rail a {
    min-height: 26px;
  }

  .source-filter-rail a {
    padding: 0 8px;
    font-size: 10.5px;
  }
}

/* Search intelligence: compact result counts and query signals. */
.search-intelligence-panel {
  width: min(1500px, calc(100vw - 22px));
  margin: -4px auto 10px;
  min-height: 0;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(38, 57, 76, .94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(210px, .58fr) minmax(0, 1.42fr);
  gap: 8px;
  align-items: stretch;
}

.search-intel-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-content: center;
}

.search-intel-kicker {
  grid-row: 1 / 3;
  align-self: center;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  padding: 0 9px;
  background: rgba(255, 212, 0, .14);
  border: 1px solid rgba(255, 212, 0, .36);
  color: #ffe38a;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.search-intel-main h2 {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.18;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-intel-main p {
  min-width: 0;
  margin: 2px 0 0;
  color: #bcd1e4;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-intel-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(9, minmax(74px, 1fr));
  gap: 6px;
}

.search-intel-stats :is(a, span) {
  --search-accent: #40c4ff;
  min-width: 0;
  min-height: 48px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 3px 0 var(--search-accent);
  padding: 7px 6px 6px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 5px;
  align-content: center;
  text-decoration: none;
  color: inherit;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.search-intel-stats :is(a, span):nth-child(2) { --search-accent: #ffd166; }
.search-intel-stats :is(a, span):nth-child(3) { --search-accent: #65d98f; }
.search-intel-stats :is(a, span):nth-child(4) { --search-accent: #ff6b8a; }
.search-intel-stats :is(a, span):nth-child(5) { --search-accent: #8bd8ff; }
.search-intel-stats :is(a, span):nth-child(6) { --search-accent: #b7e986; }
.search-intel-stats :is(a, span):nth-child(7) { --search-accent: #ff9f1c; }
.search-intel-stats :is(a, span):nth-child(8) { --search-accent: #4a90e2; }
.search-intel-stats :is(a, span):nth-child(9) { --search-accent: #f1f5f9; }

.search-intel-stats a:hover,
.search-intel-stats a:focus-visible {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(139, 216, 255, .42);
  transform: translateY(-1px);
  outline: none;
}

.search-intel-stats i {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--search-accent);
  font-size: 12px;
}

.search-intel-stats b {
  min-width: 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.05;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-intel-stats small {
  min-width: 0;
  color: #aecaeb;
  font-size: 9.8px;
  line-height: 1.1;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-intel-rail {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 0;
  scrollbar-width: none;
}

.search-intel-rail::-webkit-scrollbar {
  display: none;
}

.search-intel-chip {
  flex: 0 0 auto;
  max-width: 210px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: #eaf4ff;
  padding: 0 9px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-intel-chip i {
  flex: 0 0 auto;
  color: #8bd8ff;
  font-size: 10.5px;
}

.search-intel-chip b {
  flex: 0 0 auto;
  min-width: 18px;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  padding: 0 5px;
  font-size: 10px;
  line-height: 1;
}

.search-intel-chip.active {
  background: rgba(255, 212, 0, .13);
  border-color: rgba(255, 212, 0, .38);
  color: #ffe8a3;
}

.search-intel-chip.tag {
  background: rgba(255, 107, 138, .10);
  border-color: rgba(255, 107, 138, .26);
}

.search-intel-chip.source {
  background: rgba(64, 196, 255, .10);
  border-color: rgba(64, 196, 255, .28);
}

.search-intel-chip.author {
  background: rgba(101, 217, 143, .10);
  border-color: rgba(101, 217, 143, .28);
}

.search-intel-chip:hover {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(139, 216, 255, .42);
}

.search-intel-entity-grid {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.search-entity-card {
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(11, 26, 40, .24);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.search-entity-card header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.search-entity-card header span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-entity-card header i {
  color: #40c4ff;
  font-size: 11px;
}

.search-entity-card header b {
  flex: 0 0 auto;
  min-width: 26px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(64, 196, 255, .28);
  background: rgba(64, 196, 255, .10);
  color: #dff5ff;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 950;
}

.search-entity-card p {
  margin: 0;
  color: #aecaeb;
  font-size: 10.5px;
  line-height: 1.25;
  font-weight: 750;
}

.search-entity-list {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.search-entity-row {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
  color: #eaf4ff;
  padding: 6px 7px;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.search-entity-row:hover,
.search-entity-row:focus-visible {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(139, 216, 255, .42);
  outline: none;
  transform: translateY(-1px);
}

.search-entity-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.search-entity-row strong,
.search-entity-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-entity-row strong {
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.search-entity-row small {
  color: #9fb9d6;
  font-size: 9.5px;
  font-weight: 750;
}

.search-entity-row b {
  min-width: 25px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 950;
}

.search-entity-row.authors b,
.search-entity-row.members b {
  background: rgba(101, 217, 143, .13);
}

.search-entity-row.tags b {
  background: rgba(255, 107, 138, .14);
}

.search-entity-row.sources b {
  background: rgba(64, 196, 255, .13);
}

.search-entity-empty {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, .12);
  color: #9fb9d6;
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .search-intelligence-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-intel-stats {
    grid-template-columns: repeat(5, minmax(86px, 1fr));
  }

  .search-intel-entity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .search-intelligence-panel {
    width: min(1500px, calc(100vw - 18px));
    margin: -2px auto 8px;
    padding: 8px;
    border-radius: 12px;
  }

  .search-intel-main {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 5px;
  }

  .search-intel-kicker {
    grid-row: auto;
    justify-content: flex-start;
    width: fit-content;
    min-height: 27px;
  }

  .search-intel-main h2 {
    font-size: 13.5px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .search-intel-main p {
    white-space: normal;
  }

  .search-intel-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .search-intel-stats :is(a, span) {
    min-height: 46px;
    padding-inline: 5px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .search-intel-chip {
    max-width: 180px;
    min-height: 27px;
    font-size: 10.5px;
  }

  .search-intel-entity-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .search-entity-card {
    padding: 8px;
  }
}

@media (max-width: 360px) {
  .search-intel-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 2026-05-14 responsive hardening: shared header rails must never create page overflow. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.mh-site-header,
.mh-site-header *,
.mh-site-context,
.mh-site-signals,
.mh-site-shortcuts {
  box-sizing: border-box;
}

.mh-site-header {
  max-width: calc(100vw - 16px);
  overflow: hidden;
}

.mh-site-context {
  min-width: 0;
}

.mh-site-context > div,
.mh-site-signals,
.mh-site-shortcuts,
.mh-site-category-rail {
  min-width: 0;
  max-width: 100%;
}

.mh-site-signals,
.mh-site-shortcuts {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.mh-site-signal,
.mh-site-shortcuts a {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .mh-site-context {
    align-items: stretch;
  }

  .mh-site-context > div {
    width: 100%;
    min-width: 0;
  }

  .mh-site-signals,
  .mh-site-shortcuts {
    width: 100%;
    padding-bottom: 2px;
  }
}

@media (max-width: 430px) {
  .mh-site-header {
    max-width: calc(100vw - 12px);
  }

  .mh-site-context {
    padding-left: 8px;
    padding-right: 8px;
  }

  .mh-site-signal,
  .mh-site-shortcuts a {
    min-height: 36px;
    padding-left: 9px;
    padding-right: 9px;
  }

  .mh-site-category-rail a {
    min-height: 34px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* 2026-05-15 share workspace interaction polish. Keep all complete sections visible,
   but make the navigation rail readable and click-targetable. */
#mh-share-overlay .share-tabs {
  position: relative !important;
  top: auto !important;
  z-index: 40 !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  pointer-events: auto !important;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 16px;
  background: rgba(16, 31, 49, .92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 12px 28px rgba(0, 0, 0, .18);
}

#mh-share-overlay .share-tabs .tab {
  position: relative !important;
  z-index: 41 !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 14px !important;
  pointer-events: auto !important;
}

#mh-share-overlay .share-panel {
  scroll-margin-top: 18px !important;
}

/* 2026-05-15 full improvement package: density, focus tools, card readability, mobile polish, share/comments refinement. */
.mh-density-toggle {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 9px;
  background: rgba(255, 255, 255, .04);
  color: #eaf4ff;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 850;
  cursor: pointer;
}

.mh-density-toggle:hover,
.mh-density-toggle[aria-pressed="true"] {
  background: rgba(255, 193, 7, .14);
  border-color: rgba(255, 193, 7, .42);
  color: #fff4c5;
}

.mh-feed-tools {
  width: min(1500px, calc(100vw - 16px));
  margin: 10px auto 12px;
  padding: 8px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(35, 54, 73, .82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

.mh-feed-tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mh-feed-tool-group::-webkit-scrollbar {
  display: none;
}

.mh-feed-tool-group button,
.mh-visual-status,
.mh-focus-count {
  min-height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .04);
  color: #eaf4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 850;
  white-space: nowrap;
}

.mh-feed-tool-group button {
  cursor: pointer;
}

.mh-feed-tool-group button.active,
.mh-feed-tool-group button:hover {
  background: rgba(64, 196, 255, .16);
  border-color: rgba(64, 196, 255, .55);
  color: #fff;
}

.mh-loaded-search {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(7, 18, 31, .64);
  color: #8bd8ff;
}

.mh-loaded-search input {
  min-width: 0;
  width: 100%;
  height: 32px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eef7ff;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.mh-loaded-search input::placeholder {
  color: rgba(220, 235, 250, .58);
}

.mh-visual-status {
  color: #a8ffd3;
  border-color: rgba(63, 210, 136, .34);
  background: rgba(63, 210, 136, .09);
}

.mh-visual-status.warn {
  color: #ffe9a7;
  border-color: rgba(255, 212, 0, .4);
  background: rgba(255, 212, 0, .10);
}

.mh-focus-count {
  color: #bfd4e8;
}

body.mh-feed-focus-active #feeds .result.mh-focus-dim {
  opacity: .34 !important;
  filter: saturate(.78);
}

body.mh-feed-focus-active #feeds .result.mh-focus-dim:hover {
  opacity: .88 !important;
  filter: none;
}

#feeds .result {
  min-height: 0;
}

#feeds .result .feed-title {
  color: #f5f9ff !important;
  letter-spacing: 0 !important;
  overflow-wrap: anywhere;
}

#feeds .result .feed-description {
  color: #cedce9 !important;
  overflow-wrap: anywhere;
}

#feeds .result .card-meta-stack {
  isolation: isolate;
}

#feeds .result .channel-row,
#feeds .result .site-strip,
#feeds .result .feed-date {
  border: 1px solid rgba(255, 255, 255, .06);
}

#feeds .result .tags-row {
  align-items: stretch !important;
}

#feeds .result .tag-chip {
  min-width: 0;
}

#feeds .result .tag-chip .tag-search-link {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.mh-density-compact #feeds .result .card-header {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

body.mh-density-compact #feeds .result .media-box {
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}

body.mh-density-compact #feeds .result .feed-title {
  margin-bottom: 3px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}

body.mh-density-compact #feeds .result .feed-description {
  margin-bottom: 6px !important;
  font-size: 12.25px !important;
  line-height: 1.32 !important;
}

body.mh-density-compact #feeds .result .card-meta-stack {
  gap: 4px !important;
}

body.mh-density-compact #feeds .result .tag-chip .tag-search-link {
  min-height: 23px !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  font-size: 10.75px !important;
}

body.mh-density-compact #feeds .result .actions-row,
body.mh-density-compact #feeds .result .card-tools {
  margin-top: 5px !important;
}

body.mh-density-comfortable #feeds .result .feed-title {
  line-height: 1.27 !important;
}

body.mh-density-comfortable #feeds .result .card-meta-stack {
  gap: 7px !important;
}

#mh-share-overlay .share-tabs {
  scroll-margin-top: 0;
}

#mh-share-overlay .share-tabs .tab.active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .06), 0 10px 26px rgba(0, 0, 0, .22);
}

#mh-share-overlay .share-header,
#mh-share-overlay .share-workflow,
#mh-share-overlay .share-panel {
  max-width: 100%;
}

#mh-share-overlay .copy-row input,
#mh-share-overlay .copy-row textarea,
#mh-share-overlay #mh-embed-code {
  overflow-wrap: anywhere;
}

#mh-comments-overlay .comments-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(14px);
}

#mh-comments-overlay .comment-counter {
  justify-self: start;
}

#mh-comments-overlay .thread.is-filter-empty {
  min-height: 150px;
}

@media (max-width: 760px) {
  .mh-feed-tools {
    grid-template-columns: minmax(0, 1fr);
    width: min(1500px, calc(100vw - 20px));
    margin-top: 8px;
  }

  .mh-feed-tool-group {
    width: 100%;
  }

  .mh-feed-tool-group button {
    flex: 1 0 auto;
  }

  .mh-visual-status,
  .mh-focus-count {
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .mh-site-header {
    width: min(100%, calc(100vw - 24px)) !important;
    margin-top: 8px !important;
  }

  .mh-site-header-inner {
    gap: 8px !important;
  }

  .mh-site-logo {
    width: 48px !important;
    height: 48px !important;
  }

  .mh-site-brand strong {
    font-size: 24px !important;
  }

  .mh-site-brand small {
    font-size: 12px !important;
  }

  .mh-site-search {
    height: 54px !important;
    border-radius: 16px !important;
    grid-template-columns: 54px minmax(0, 1fr) 84px !important;
    overflow: hidden;
  }

  .mh-site-search input {
    font-size: 17px !important;
  }

  .mh-site-search button {
    width: 84px !important;
    min-width: 84px !important;
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mh-site-search button::after {
    content: "Go" !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    letter-spacing: 0 !important;
  }

  .mh-site-page-actions,
  .mh-site-actions,
  .mh-site-category-rail {
    gap: 8px !important;
  }

  .mh-site-page-actions a,
  .mh-site-page-actions button,
  .mh-site-actions a,
  .mh-density-toggle {
    min-height: 42px !important;
    border-radius: 13px !important;
  }

  #tags-container,
  .tags-container {
    width: min(100%, calc(100vw - 24px)) !important;
  }

  #tags-container a,
  .tags-container a {
    min-height: 40px !important;
    padding: 6px 12px !important;
    border-radius: 9px !important;
    font-size: 18px !important;
    line-height: 1.05 !important;
  }

  #feeds {
    width: min(100%, calc(100vw - 10px)) !important;
  }

  #feeds .result .feed-title {
    font-size: 18px !important;
  }

  #feeds .result .feed-description {
    font-size: 15px !important;
  }

  #feeds .result .tag-chip .tag-search-link {
    font-size: 13px !important;
    min-height: 30px !important;
  }

  #mh-share-overlay .share-tabs {
    margin: 0 14px !important;
  }

  #mh-share-overlay .share-tabs .tab {
    min-width: 112px;
  }

  #mh-comments-overlay .comments-toolbar {
    position: static;
  }
}

/* Professional mobile density pass: keep every control, but let content appear sooner. */
@media (max-width: 640px) {
  .mh-site-header {
    margin-top: 6px !important;
  }

  .mh-site-header-inner {
    padding: 9px !important;
    gap: 7px !important;
  }

  .mh-site-logo {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
  }

  .mh-site-brand strong {
    font-size: 21px !important;
    line-height: 1.05 !important;
  }

  .mh-site-brand small {
    font-size: 10px !important;
  }

  .mh-site-search {
    height: 48px !important;
    grid-template-columns: 48px minmax(0, 1fr) 72px !important;
  }

  .mh-site-search input {
    font-size: 15px !important;
  }

  .mh-site-search button {
    width: 72px !important;
    min-width: 72px !important;
  }

  .mh-site-search button::after {
    font-size: 16px !important;
  }

  .mh-site-context {
    padding: 9px 10px 7px !important;
    gap: 8px !important;
  }

  .mh-site-context h1 {
    font-size: 18px !important;
  }

  .mh-site-context p {
    font-size: 12px !important;
    line-height: 1.28 !important;
  }

  .mh-site-page-actions,
  .mh-site-actions,
  .mh-site-category-rail {
    gap: 6px !important;
  }

  .mh-site-page-actions a,
  .mh-site-page-actions button,
  .mh-site-actions a,
  .mh-density-toggle {
    min-height: 36px !important;
    border-radius: 11px !important;
    padding-inline: 10px !important;
  }

  #tags-container,
  .tags-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: min(100%, calc(100vw - 24px)) !important;
    margin: 8px auto 6px !important;
    padding: 0 2px 4px !important;
    scrollbar-width: none;
  }

  #tags-container::-webkit-scrollbar,
  .tags-container::-webkit-scrollbar {
    display: none;
  }

  #tags-container a,
  .tags-container a {
    flex: 0 0 auto !important;
    min-height: 34px !important;
    padding: 5px 11px !important;
    border-radius: 9px !important;
    font-size: 16px !important;
    line-height: 1 !important;
  }

  #tags-container #reload-tags {
    position: sticky;
    right: 0;
    min-width: 38px !important;
    justify-content: center;
    background: #f1f5f9 !important;
  }

  .mh-feed-tools {
    gap: 7px !important;
    padding: 7px !important;
  }

  .mh-feed-tool-group {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }

  .mh-feed-tool-group::-webkit-scrollbar {
    display: none;
  }

  .mh-feed-tool-group button {
    min-height: 34px !important;
    flex: 0 0 auto !important;
  }

  .mh-loaded-search {
    min-height: 38px !important;
  }
}

.qr-fallback {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, .24);
  border-radius: 14px;
  color: #b9cce0;
  background: rgba(255, 255, 255, .04);
  font-weight: 900;
}

/* 2026-05-15 UX polish: organized header, intelligence, filters, and video previews. */
.mh-site-header {
  background:
    linear-gradient(135deg, rgba(11, 31, 52, .97) 0%, rgba(31, 63, 84, .98) 48%, rgba(16, 80, 94, .94) 100%) !important;
  border-color: rgba(100, 220, 255, .20) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
  overflow: hidden !important;
}

.mh-site-header-inner {
  grid-template-columns: minmax(142px, 170px) minmax(260px, 1fr) auto !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  background: rgba(4, 16, 30, .18);
}

.mh-site-search {
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22), inset 0 0 0 1px rgba(96, 206, 255, .14) !important;
}

.mh-site-search button {
  min-width: 92px;
  background: linear-gradient(135deg, #ffd447, #ffb31f) !important;
  color: #07131f !important;
}

.mh-site-context {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  padding: 10px 12px 8px !important;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.mh-site-context h1 {
  font-size: 18px !important;
}

.mh-site-context p {
  max-width: 920px;
}

.mh-site-page-actions {
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.mh-site-intel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  padding: 0 12px 9px !important;
}

.mh-site-signals {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 7px !important;
  overflow: visible !important;
}

.mh-site-signal {
  min-width: 0 !important;
  min-height: 30px !important;
  border-color: rgba(128, 215, 255, .16) !important;
  background: rgba(255, 255, 255, .055) !important;
}

.mh-site-signal b,
.mh-site-signal small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mh-site-signal small {
  color: #ffd866 !important;
}

.mh-site-shortcuts,
.mh-site-category-rail,
.mh-site-actions {
  scrollbar-width: thin !important;
}

.mh-site-category-rail {
  flex-wrap: wrap !important;
  padding: 0 12px 10px !important;
}

.search-intelligence-panel {
  width: min(1500px, calc(100vw - 22px)) !important;
  margin: 10px auto 10px !important;
  padding: 12px !important;
  border-radius: 16px !important;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) !important;
  gap: 10px !important;
  background:
    linear-gradient(135deg, rgba(9, 29, 49, .97) 0%, rgba(31, 58, 82, .96) 52%, rgba(14, 75, 91, .94) 100%) !important;
  border-color: rgba(125, 224, 255, .18) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

.search-intel-main {
  display: block !important;
  padding: 2px 2px 0;
}

.search-intel-kicker {
  width: fit-content;
  min-height: 30px !important;
  margin-bottom: 7px;
  background: rgba(255, 212, 0, .16) !important;
  color: #ffe38a !important;
}

.search-intel-main h2 {
  font-size: 20px !important;
  line-height: 1.05 !important;
  white-space: normal !important;
}

.search-intel-main p {
  margin-top: 5px !important;
  white-space: normal !important;
  font-size: 12px !important;
  color: #c7ddf2 !important;
}

.search-intel-stats {
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)) !important;
  gap: 8px !important;
}

.search-intel-stats :is(a, span) {
  min-height: 62px !important;
  border-radius: 12px !important;
  padding: 9px 9px 8px !important;
  background: rgba(255, 255, 255, .055) !important;
  border-color: rgba(255, 255, 255, .10) !important;
}

.search-intel-stats b {
  font-size: 16px !important;
}

.search-intel-stats small {
  font-size: 10.5px !important;
}

.search-intel-rail {
  grid-column: 1 / -1 !important;
  flex-wrap: wrap !important;
  align-content: flex-start !important;
  max-height: 88px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  gap: 7px !important;
  padding: 8px !important;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(2, 12, 24, .18);
  scrollbar-width: thin !important;
}

.search-intel-rail::-webkit-scrollbar {
  display: block !important;
  width: 8px;
}

.search-intel-rail::-webkit-scrollbar-thumb {
  background: rgba(139, 216, 255, .44);
  border-radius: 999px;
}

.search-intel-chip {
  max-width: min(260px, 100%) !important;
  min-height: 31px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .06) !important;
}

.search-intel-chip.tag { background: rgba(255, 75, 151, .13) !important; }
.search-intel-chip.source { background: rgba(55, 199, 255, .13) !important; }
.search-intel-chip.author { background: rgba(68, 220, 139, .13) !important; }

.search-intel-entity-grid {
  grid-column: 1 / -1 !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 10px !important;
}

.search-entity-card {
  max-height: 238px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px !important;
  background: rgba(8, 22, 38, .34) !important;
  border-color: rgba(255, 255, 255, .10) !important;
}

.search-entity-card header {
  flex: 0 0 auto;
}

.search-entity-card p {
  flex: 0 0 auto;
}

.search-entity-list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.search-entity-list::-webkit-scrollbar {
  width: 8px;
}

.search-entity-list::-webkit-scrollbar-thumb {
  background: rgba(139, 216, 255, .38);
  border-radius: 999px;
}

.feed-filterbar {
  width: min(1500px, calc(100vw - 22px)) !important;
  margin: 10px auto 6px !important;
  padding: 8px !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 14px !important;
  background: rgba(8, 23, 38, .62) !important;
  border: 1px solid rgba(125, 224, 255, .16) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18) !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
}

.filter-tab {
  flex: 0 0 auto !important;
  min-height: 34px !important;
  border-radius: 999px !important;
}

#tags-container,
.tags-container,
.mh-feed-tool-group,
.source-filter-rail {
  scrollbar-width: thin !important;
}

#tags-container::-webkit-scrollbar,
.tags-container::-webkit-scrollbar,
.mh-feed-tool-group::-webkit-scrollbar,
.source-filter-rail::-webkit-scrollbar {
  display: block !important;
  height: 8px;
}

#tags-container::-webkit-scrollbar-thumb,
.tags-container::-webkit-scrollbar-thumb,
.mh-feed-tool-group::-webkit-scrollbar-thumb,
.source-filter-rail::-webkit-scrollbar-thumb {
  background: rgba(139, 216, 255, .42);
  border-radius: 999px;
}

.source-filter-rail {
  justify-content: flex-start !important;
  overflow-x: auto !important;
  padding-bottom: 4px !important;
}

.media-box .video-preview-card,
.media-box .video-fallback-card {
  width: 100%;
  min-height: 176px;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(135deg, #111e31, #1f3f54);
  color: #fff;
  text-decoration: none !important;
}

.video-preview-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.04);
}

.video-preview-card::after,
.video-fallback-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.55));
  pointer-events: none;
}

.video-provider {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(5, 15, 26, .74);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.youtube-thumbnail .play-button {
  position: relative;
  z-index: 2;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff0033, #ff4b72);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .40);
  transition: transform .16s ease, box-shadow .16s ease;
}

.youtube-thumbnail:hover .play-button,
.youtube-thumbnail:focus-visible .play-button {
  transform: scale(1.06);
  box-shadow: 0 22px 42px rgba(0, 0, 0, .46);
}

.youtube-thumbnail.thumb-missing::before {
  content: "YouTube";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.74);
  font-size: 22px;
  font-weight: 950;
}

.video-embed-frame {
  width: 100%;
  min-height: 176px;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  border-radius: 10px;
  background: #000;
}

.video-fallback-card {
  gap: 8px;
  text-align: center;
  padding: 18px;
}

.video-fallback-card > * {
  position: relative;
  z-index: 2;
}

.video-fallback-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 0, 51, .20);
  color: #ff4b72;
  font-size: 24px;
}

.video-fallback-card strong {
  font-size: 15px;
  font-weight: 950;
}

.video-fallback-card span:last-child {
  max-width: 260px;
  color: #c9d8e7;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .mh-site-header-inner {
    grid-template-columns: 1fr !important;
  }

  .mh-site-context,
  .mh-site-intel {
    grid-template-columns: 1fr !important;
  }

  .mh-site-page-actions,
  .mh-site-shortcuts {
    justify-content: flex-start !important;
  }

  .mh-site-signals {
    display: flex !important;
    overflow-x: auto !important;
    padding-bottom: 4px;
  }

  .mh-site-signal {
    flex: 0 0 auto !important;
  }

  .search-intelligence-panel {
    grid-template-columns: 1fr !important;
  }

  .search-intel-entity-grid {
    display: flex !important;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .search-entity-card {
    flex: 0 0 min(330px, 86vw);
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .mh-site-header {
    width: min(100%, calc(100vw - 24px)) !important;
    margin-top: 12px !important;
  }

  .mh-site-context h1 {
    font-size: 19px !important;
  }

  .mh-site-signals {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
  }

  .mh-site-signal {
    flex: initial !important;
    width: auto !important;
  }

  .mh-site-actions,
  .mh-site-category-rail,
  .mh-site-shortcuts {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
  }

  .mh-site-actions a,
  .mh-site-category-rail a,
  .mh-site-shortcuts a {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  .search-intelligence-panel {
    width: min(100%, calc(100vw - 22px)) !important;
    padding: 10px !important;
  }

  .search-intel-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .search-intel-stats :is(a, span) {
    min-height: 58px !important;
  }

  .feed-filterbar {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    justify-content: flex-start !important;
  }

  .feed-filterbar .filter-tab {
    flex: 1 1 calc(50% - 6px) !important;
    justify-content: center !important;
  }
}
