/* Shared action controls: keep every page aligned with the home design. */
:root { --action-radius: .75rem; }
.primary-pill,
.ghost-pill,
.secondary-button,
.toolbar-icon {
  border-radius: var(--action-radius);
  font-weight: 600;
  line-height: 1.4;
}
.primary-pill:not(.ghost-swap) {
  border: 1px solid rgba(218, 180, 255, .4);
  background: linear-gradient(135deg, #9952ed, #7039cf);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 16px rgba(112, 57, 207, .22);
}
.primary-pill:not(.ghost-swap):hover {
  background: linear-gradient(135deg, #aa65f6, #8149df);
}
.secondary-button,
.ghost-pill {
  background: rgba(171, 114, 244, .06);
  border: 1px solid rgba(189, 153, 235, .24);
  box-shadow: none;
}
.secondary-button:hover,
.ghost-pill:hover { background: rgba(171, 114, 244, .16); }
.primary-pill:focus-visible,
.secondary-button:focus-visible,
.ghost-pill:focus-visible,
.toolbar-icon:focus-visible { outline: 2px solid #dbbaff; outline-offset: 3px; }
.action-toggle,
.modal-close,
.post-share-dialog-close,
.image-lightbox-close,
.image-lightbox-nav,
.story-create-dialog-head button,
.story-report-menu summary,
.story-archive-viewers { border-radius: var(--action-radius); }
.primary-pill:disabled,
.secondary-button:disabled,
.ghost-pill:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* A single quiet track makes the feed sorting feel like one control. */
:is(body, .home-main-blend) .feed-tabs {
  gap: .2rem;
  padding: .3rem;
  background: rgba(17, 12, 27, .8);
  border: 1px solid rgba(189, 153, 235, .15);
  border-radius: .95rem;
  max-width: 100%;
}
:is(body, .home-main-blend) .feed-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.5rem;
  padding: .55rem .95rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: transparent;
  color: #b8a8ca;
  font-size: .85rem;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
:is(body, .home-main-blend) .feed-tabs a i { font-size: .75rem; opacity: .85; }
:is(body, .home-main-blend) .feed-tabs a:hover { background: rgba(173, 122, 235, .1); color: #f4ebff; }
:is(body, .home-main-blend) .feed-tabs a.active {
  background: linear-gradient(135deg, #59368a, #402764);
  border-color: rgba(199, 155, 255, .3);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 8px rgba(0, 0, 0, .2);
}
.site-header .header-post-action {
  border-radius: .95rem;
  border-color: rgba(218, 180, 255, .4);
  background: linear-gradient(135deg, #9952ed, #7039cf);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 4px 16px rgba(112, 57, 207, .22);
  font-weight: 600;
  transition: background .18s ease, box-shadow .18s ease;
}
.site-header .header-post-action:hover {
  background: linear-gradient(135deg, #aa65f6, #8149df);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 5px 20px rgba(112, 57, 207, .35);
}
.site-header .header-post-action i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  font-size: .7rem;
}
:is(body, .home-main-blend) .feed-tabs a:focus-visible,
.site-header .header-post-action:focus-visible { outline: 2px solid #dbbaff; outline-offset: 3px; }
@media (min-width: 701px) {
  .site-header .header-post-action { height: 3.25rem; padding: 0 .95rem; gap: .55rem; }
}
@media (max-width: 380px) {
  :is(body, .home-main-blend) .feed-tabs a { padding: .55rem .65rem; gap: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  :is(body, .home-main-blend) .feed-tabs a,
  .site-header .header-post-action { transition: none; transform: none; }
}


/* Search shares the quieter surfaces and compact geometry of the panels. */
.site-header .home-topbar-search {
  padding: .25rem .4rem;
  border-radius: .95rem;
  border: 1px solid rgba(189, 153, 235, .18);
  background: linear-gradient(155deg, #21162f, #130e1e 75%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.site-header .home-topbar-search-inner { min-height: 0; }
.site-header .home-topbar-search:focus-within {
  border-color: #ab7cdb;
  box-shadow: 0 0 0 3px rgba(171, 124, 219, .12);
}
.site-header .home-topbar-search input {
  height: 2.7rem;
  padding: 0 3rem 0 .75rem;
  border-radius: .65rem;
  font-size: .9rem;
  background: transparent;
  box-shadow: none;
}
.site-header .home-topbar-search input:focus { outline: none; }
.site-header .home-topbar-search input::placeholder { color: #ad9cbe; }
.site-header .home-topbar-search-submit {
  right: .1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .65rem;
  color: #c4acd9;
}
.site-header .home-topbar-search-submit i { position: static; transform: none; color: inherit; }
.site-header .home-topbar-search-submit:hover { background: rgba(173, 122, 235, .12); color: #fff; }
.site-header .home-topbar-search-submit:focus-visible { outline: 2px solid #dbbaff; outline-offset: -2px; }
.site-header .search-suggestions {
  background: linear-gradient(155deg, #21162f, #130e1e 75%);
  border-color: rgba(189, 153, 235, .2);
  border-radius: .95rem;
  padding: .4rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
}
.site-header .search-suggestion-item { border-radius: .65rem; }
.site-header .search-suggestion-item:hover,
.site-header .search-suggestion-item:focus-visible { background: rgba(173, 122, 235, .12); }
.site-header .search-suggestion-type {
  min-width: 4.5rem;
  border-radius: .45rem;
  background: rgba(173, 122, 235, .12);
  color: #d4b3f5;
  font-size: .65rem;
}
.site-header .search-suggestion-copy small,
.site-header .search-suggestion-empty { color: #ad9cbe; }
@media (prefers-reduced-motion: reduce) {
  .site-header .home-topbar-search { transition: none; }
}

/* Keep every header action on the same compact baseline. */
.site-header .home-topbar-actions { --header-action-size: 3.25rem; align-items: center; }
.site-header .home-topbar-actions > .action-menu {
  flex: 0 0 var(--header-action-size);
  width: var(--header-action-size);
  height: var(--header-action-size);
}
.site-header .home-topbar-chip {
  height: var(--header-action-size);
  border-radius: .95rem;
}
.site-header .home-topbar-chip:not(.header-post-action) {
  width: var(--header-action-size);
  border: 1px solid rgba(189, 153, 235, .18);
  background: linear-gradient(155deg, #21162f, #130e1e 75%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
}
.site-header .home-topbar-chip:not(.header-post-action):hover,
.site-header .action-menu[open] > .home-topbar-chip {
  border-color: rgba(199, 155, 255, .4);
  background: #291b3c;
}
.site-header .home-topbar-chip:focus-visible { outline: 2px solid #dbbaff; outline-offset: 3px; }
.site-header .home-topbar-avatar-chip .header-user-avatar { width: 1.75rem; height: 1.75rem; }
@media (max-width: 700px) {
  .site-header .home-topbar-actions { --header-action-size: 3rem; }
}
@media (max-width: 480px) {
  .site-header .home-topbar-actions { --header-action-size: 2.5rem; }
  .site-header .home-topbar-chip { border-radius: .8rem; }
}
@media (max-width: 380px) {
  .site-header .home-topbar-actions { --header-action-size: 2.35rem; }
}
