:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-alt: #f5f8fd;
  --border: rgba(93, 111, 143, .18);
  --text: #243145;
  --muted: #68768b;
  --brand: #6c63ff;
  --brand-dark: #5147dd;
  --brand-soft: #eef0ff;
  --accent: #2f9b8f;
  --danger: #c95d4c;
  --warning: #fff3cd;
  --success: #4b9c72;
  --shadow: 0 14px 34px rgba(34, 48, 72, .08);
  --shadow-hover: 0 18px 42px rgba(78, 89, 145, .15);
  --glass: rgba(255, 255, 255, .78);
  --glass-strong: rgba(255, 255, 255, .92);
  --glass-border: rgba(255, 255, 255, .72);
  --social-surface: #ffffff;
  --social-page: #f3f6fb;
  --social-soft: #f6f8fc;
  --social-line: rgba(93, 111, 143, .16);
  --social-shadow: 0 15px 35px rgba(34, 48, 72, .08);
  --social-radius: 8px;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #f9fbff 0%, #f3f6fb 46%, #eef3f9 100%);
  color: var(--text);
}

a {
  color: var(--brand-dark);
}

.topbar {
  top: 14px;
  width: min(1440px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 10px 18px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background: var(--glass);
  box-shadow: 0 10px 30px rgba(34, 48, 72, .08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar__main,
.topbar__site-nav {
  width: min(1180px, 100%);
}

.topbar__brand {
  gap: 10px;
  min-width: 0;
}

.topbar__logo {
  width: 58px;
  height: 52px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topbar__logo--image img {
  object-fit: contain;
}

.topbar__title {
  color: #1e293b;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0;
}

.mobile-menu-btn,
.mobile-account-btn,
.mobile-close-btn,
.shop-search-toggle,
.content-overflow__toggle,
.mobile-chat-back {
  border-color: rgba(93, 111, 143, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: var(--brand-dark);
  box-shadow: 0 4px 14px rgba(34, 48, 72, .06);
}

.mobile-menu-btn:hover,
.mobile-account-btn:hover,
.mobile-close-btn:hover,
.shop-search-toggle:hover,
.shop-search-toggle.is-active,
body.mobile-account-open .mobile-account-btn {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 20px rgba(108, 99, 255, .16);
}

.topbar__site-nav {
  grid-template-columns: 42px minmax(0, auto) 42px;
}

.topbar__nav-links {
  gap: 8px;
}

.topbar__nav-links a {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: #3a3a5c;
  font-weight: 750;
}

.topbar__nav-links a:hover,
.topbar__nav-links a[aria-current='page'] {
  background: linear-gradient(90deg, #6c63ff, #4da3ff);
  color: #fff;
  box-shadow: 0 12px 22px rgba(90, 120, 255, .28);
}

.topbar__search-panel {
  width: min(560px, 100%);
}

.topbar__search {
  height: 44px;
  border-color: rgba(93, 111, 143, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 4px 15px rgba(34, 48, 72, .04);
}

.topbar__search:focus-within {
  border-color: rgba(108, 99, 255, .42);
  box-shadow: 0 8px 25px rgba(108, 99, 255, .16);
}

.topbar__search i {
  color: var(--brand);
}

.topbar__actions {
  right: max(24px, calc((100vw - 1180px) / 2));
  border-color: var(--glass-border);
  border-radius: 8px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-hover);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page {
  grid-template-columns: minmax(210px, 240px) minmax(0, 780px) minmax(300px, 310px);
  gap: 22px;
  width: min(1440px, calc(100% - 32px));
  max-width: 1440px;
  padding: 22px 0 40px;
}

.content {
  min-width: 0;
}

.sidebar--left {
  top: 118px;
}

.sticky-ad {
  top: 118px;
}

.panel {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel--accent {
  background: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(246, 249, 255, .78));
}

.panel__header h2 {
  color: #1f2d3d;
  font-weight: 850;
  letter-spacing: 0;
}

.nav-list {
  gap: 4px;
}

.nav-btn {
  min-height: 42px;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #3a3a5c;
  font-weight: 700;
}

.nav-btn i {
  width: 20px;
  color: #69748a;
  text-align: center;
}

.nav-btn:hover {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 10px 24px rgba(108, 99, 255, .12);
  transform: translateX(3px);
}

.nav-btn:hover i,
.nav-btn.is-active i {
  color: currentColor;
}

.nav-btn.is-active {
  background: linear-gradient(90deg, #6c63ff, #4da3ff);
  color: #fff;
  box-shadow: 0 12px 22px rgba(90, 120, 255, .26);
}

.feed-mode-tabs,
.search-tabs {
  border-color: rgba(93, 111, 143, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
}

.primary-btn,
.ghost-btn,
.danger-btn,
.chip-btn {
  border-radius: 999px;
  font-weight: 750;
}

.primary-btn,
.chip-btn.is-active {
  background: linear-gradient(90deg, #6c63ff, #4da3ff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(90, 120, 255, .22);
}

.primary-btn:hover,
.chip-btn.is-active:hover {
  background: linear-gradient(90deg, #5b51ec, #3d94f0);
  box-shadow: 0 12px 24px rgba(90, 120, 255, .3);
}

.ghost-btn,
.chip-btn:not(.is-active) {
  border-color: rgba(93, 111, 143, .14);
  background: rgba(255, 255, 255, .72);
  color: #35435a;
}

.ghost-btn:hover,
.chip-btn:not(.is-active):hover {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 18px rgba(108, 99, 255, .12);
}

.danger-btn {
  background: #fff1ef;
  color: var(--danger);
}

.status-banner,
.empty-state {
  border: 1px solid rgba(93, 111, 143, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 24px rgba(34, 48, 72, .06);
}

#postsView > .panel,
#profilesView > .panel,
#newsView > .panel,
#subscriptionsView > .panel,
#searchView > .panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#postsFeed,
#profilesFeed,
#newsFeed,
#subscriptionsFeed,
#searchResults,
#profileDetailCard .feed-list,
#myProfileCard .feed-list {
  width: min(100%, 760px);
  gap: 22px;
}

.post-card.portfolio-post,
.profile-card,
.profile-card--feed,
.news-post-card {
  overflow: hidden;
  border: 1px solid var(--social-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--social-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card.portfolio-post:hover,
.profile-card:hover,
.news-post-card:hover {
  border-color: rgba(108, 99, 255, .22);
  box-shadow: var(--shadow-hover);
}

.post-card.portfolio-post > .content-card__head,
.profile-card > .content-card__head,
.news-post-card > .post-card__head {
  min-height: 74px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, .96);
}

.content-card__head .avatar,
.news-post-card > .post-card__head .avatar,
.avatar {
  border-radius: 50%;
}

.content-card__head .avatar,
.news-post-card > .post-card__head .avatar {
  width: 44px;
  height: 44px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(93, 111, 143, .2), 0 8px 16px rgba(34, 48, 72, .08);
}

.avatar--image img,
.comment-avatar img,
.chat-avatar img {
  border-radius: inherit;
}

.content-card__identity h3,
.news-post-card > .post-card__head h3 {
  color: #1f2d3d;
}

.portfolio-gallery,
.profile-gallery--carousel,
.news-photo-grid {
  border-color: rgba(93, 111, 143, .12);
  background: #f7f9fd;
}

.portfolio-photo-stage,
.portfolio-photo-btn,
.portfolio-photo,
.profile-gallery--carousel .profile-photo,
.news-photo-grid .post-card__image {
  background-color: #f7f9fd;
}

.portfolio-post__body,
.profile-card__body {
  padding: 16px 18px 12px;
  background: #fff;
}

.portfolio-price-line {
  border-radius: 999px;
  background: #eef7f5;
  color: #15766c;
}

.portfolio-tags {
  color: var(--brand-dark);
}

.portfolio-action-row {
  margin: 0 14px 14px;
  padding: 4px;
  border-radius: 8px;
  background: #f6f8fc;
}

.portfolio-action-btn,
.portfolio-action-stat {
  min-height: 42px;
  border-radius: 8px;
  color: #52647a;
}

.portfolio-action-btn:hover {
  background: #fff;
  color: var(--brand);
}

.portfolio-action-btn.is-active,
.portfolio-action-btn[data-like-photo].is-active,
.portfolio-action-btn[data-like-profile].is-active {
  background: #fff0f3;
  color: #d92d52;
}

.comment-item {
  gap: 12px;
  padding: 10px 0;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef0ff, #e6f7f4);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(93, 111, 143, .12);
}

.comment-item__author {
  color: #2a3850;
  font-weight: 850;
}

.comment-item[data-plus-themed="true"] .comment-avatar {
  background: rgba(var(--plus-accent-rgb), .12);
  color: var(--plus-accent);
  box-shadow: 0 0 0 2px rgba(var(--plus-accent-rgb), .2);
}

.comment-item[data-plus-themed="true"] .comment-item__author,
.comment-item[data-plus-themed="true"] .comment-author-link,
.thread-item[data-plus-themed="true"] .thread-item__head > strong,
.chat-header-identity[data-plus-themed="true"] h2 {
  color: var(--plus-accent);
}

.plus-status-icon {
  object-fit: contain;
}

.chat-layout {
  gap: 18px;
}

.chat-panel {
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
}

.chat-panel__header {
  min-height: 66px;
  padding: 14px 16px;
  border-bottom-color: rgba(93, 111, 143, .14);
  background: rgba(255, 255, 255, .88);
}

.chat-header-identity h2 {
  color: #1f2d3d;
  font-weight: 850;
}

.chat-avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, #eef0ff, #e6f7f4);
  color: var(--brand-dark);
}

.chat-header-avatar .chat-avatar {
  width: 46px;
  height: 46px;
  box-shadow: 0 0 0 1px rgba(93, 111, 143, .16), 0 8px 18px rgba(34, 48, 72, .08);
}

.chat-header-identity[data-plus-themed="true"] .chat-avatar,
.thread-item[data-plus-themed="true"] .chat-avatar {
  background: rgba(var(--plus-accent-rgb), .12);
  color: var(--plus-accent);
  box-shadow: 0 0 0 2px rgba(var(--plus-accent-rgb), .2);
}

.chat-messages {
  background:
    linear-gradient(180deg, rgba(247, 249, 253, .98), rgba(238, 244, 248, .98));
}

.message-card {
  border-radius: 8px 18px 18px 18px;
  box-shadow: 0 2px 8px rgba(34, 48, 72, .08);
}

.message-card--mine {
  border-radius: 18px 8px 18px 18px;
  background: #e8f5ff;
}

.chat-form {
  padding: 14px 16px;
  background: rgba(255, 255, 255, .92);
}

.chat-form textarea,
.chat-form .primary-btn,
.chat-attach-button {
  border-radius: 18px;
}

.thread-item {
  margin-bottom: 6px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}

.thread-item:hover,
.thread-item.is-active {
  border-color: rgba(108, 99, 255, .18);
  background: #fff;
  box-shadow: 0 8px 18px rgba(108, 99, 255, .1);
}

.thread-item .thread-badge {
  background: linear-gradient(90deg, #6c63ff, #4da3ff);
}

.ad-card {
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.user-chip {
  border-radius: 999px;
}

.inline-form > input,
.inline-form > select,
textarea,
input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
input[type='url'],
input[type='file'],
select {
  border-radius: 8px;
}

.profile-card[data-plus-themed="true"],
.portfolio-post[data-plus-themed="true"],
.public-profile-overview[data-plus-themed="true"],
.plus-account-panel[data-plus-themed="true"] {
  border-color: rgba(var(--plus-accent-rgb), .68);
  background: linear-gradient(180deg, rgba(var(--plus-accent-rgb), .12), rgba(255, 255, 255, .98) 34%);
  box-shadow: 0 15px 35px rgba(var(--plus-accent-rgb), .16);
}

.profile-card[data-plus-themed="true"] > .content-card__head,
.portfolio-post[data-plus-themed="true"] > .content-card__head,
.public-profile-overview[data-plus-themed="true"] > .public-profile-hero {
  background: linear-gradient(135deg, rgba(var(--plus-accent-rgb), .18), rgba(255, 255, 255, .9));
}

[data-plus-themed="true"] .content-card__identity h3 a,
[data-plus-themed="true"] .public-profile-identity h1,
[data-plus-themed="true"] .public-profile-handle,
[data-plus-themed="true"] .portfolio-tags,
[data-plus-themed="true"] .profile-card__price {
  color: var(--plus-accent);
}

@media (min-width: 901px) {
  #messagesView .chat-layout {
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    align-items: stretch;
  }

  #messagesView .chat-panel--conversation {
    min-height: 620px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  #messagesView.chat-open .chat-panel--threads {
    display: block;
  }

  #messagesView.chat-open .chat-panel--conversation {
    height: clamp(620px, calc(100vh - 170px), 820px);
    height: clamp(620px, calc(100dvh - 170px), 820px);
  }

  #messagesView.chat-open .mobile-chat-back {
    display: none;
  }
}

@media (max-width: 1120px) {
  .topbar {
    width: min(1000px, calc(100% - 24px));
    padding: 9px 14px 11px;
  }

  .page {
    grid-template-columns: 1fr;
    width: min(880px, calc(100% - 24px));
    padding-top: 18px;
  }

  .content {
    width: 100%;
  }

  .sidebar--left {
    border-radius: 0 22px 22px 0;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .sidebar--left .panel {
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    top: 8px;
    width: calc(100% - 16px);
    margin-top: 8px;
    border-radius: 18px;
  }

  .topbar__main {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }

  .topbar__brand {
    grid-column: 2;
  }

  .topbar__logo {
    width: 44px;
    height: 40px;
  }

  .topbar__title {
    font-size: 16px;
  }

  .topbar__site-nav {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 6px;
  }

  .topbar__nav-slot {
    position: static;
    width: 36px;
  }

  .topbar__nav-links {
    justify-content: flex-start;
  }

  .topbar__nav-links a {
    min-height: 34px;
    padding: 0 12px;
  }

  .topbar__actions {
    right: 8px;
    left: 8px;
    max-width: none;
  }

  .page {
    width: 100%;
    padding: 12px 8px 28px;
  }

  .panel {
    padding: 14px;
  }

  #postsFeed,
  #profilesFeed,
  #newsFeed,
  #subscriptionsFeed,
  #searchResults,
  #profileDetailCard .feed-list,
  #myProfileCard .feed-list {
    gap: 16px;
  }

  .portfolio-gallery,
  .news-photo-grid {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  .post-card.portfolio-post > .content-card__head,
  .profile-card > .content-card__head,
  .news-post-card > .post-card__head {
    padding: 14px 12px;
  }

  .portfolio-post__body,
  .profile-card__body {
    padding: 14px 12px 10px;
  }

  .portfolio-action-row {
    margin-right: 10px;
    margin-left: 10px;
  }

  #messagesView.chat-open .chat-panel--conversation {
    height: clamp(520px, calc(100dvh - 116px), 760px);
  }

  .message-card {
    max-width: min(84%, 520px);
  }
}

@media (max-width: 430px) {
  .mobile-menu-btn,
  .mobile-account-btn {
    min-width: 38px;
    height: 38px;
    padding: 0;
  }

  .mobile-menu-btn span,
  .mobile-account-btn span {
    display: none;
  }

  .topbar__brand {
    gap: 6px;
  }

  .topbar__logo {
    width: 40px;
    height: 36px;
  }

  .topbar__title {
    font-size: 15px;
  }

  .topbar__nav-links a {
    padding: 0 10px;
    font-size: 13px;
  }

  .feed-mode-tabs {
    border-radius: 8px;
  }

  .feed-mode-btn {
    font-size: 13px;
  }

  .chat-form__row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
  }

  .chat-form .primary-btn {
    min-width: 42px;
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-card.portfolio-post,
  .profile-card,
  .news-post-card,
  .nav-btn,
  .portfolio-action-btn,
  .ghost-btn,
  .primary-btn {
    transition: none;
  }
}

/* Template copy pass: header and social action row. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(8px, 1.5vw, 16px);
  padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2vw, 24px);
  border-radius: clamp(24px, 3vw, 48px);
}

.topbar__main {
  display: contents;
}

.topbar__brand {
  order: 1;
  flex: 0 0 auto;
  gap: 0;
}

.topbar__logo {
  width: auto;
  height: auto;
  display: flex;
  background: transparent;
}

.topbar__logo--image img {
  width: auto;
  height: clamp(35px, 5vw, 80px);
  max-width: min(210px, 32vw);
  object-fit: contain;
}

.topbar__search-panel {
  order: 2;
  display: block;
  flex: 1 1 200px;
  width: auto;
  max-width: 350px;
  margin: 0;
}

.topbar__site-nav {
  order: 3;
  width: auto;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 20px);
  margin: 0;
}

.topbar__nav-slot {
  display: none;
}

.topbar__nav-links {
  gap: clamp(8px, 1.5vw, 20px);
}

.topbar__nav-links a {
  min-height: 40px;
  padding: clamp(6px, 1vw, 10px) clamp(10px, 1.5vw, 20px);
  border-radius: 30px;
  color: #3a3a5c;
  font-weight: 700;
}

.topbar__nav-links a:hover {
  background: #fff;
  color: #6c63ff;
  box-shadow: 0 8px 20px rgba(108, 99, 255, .2);
  transform: translateY(-2px);
}

.topbar__nav-links a[aria-current='page'] {
  background: linear-gradient(90deg, #6c63ff, #4da3ff);
  color: #fff;
  box-shadow: 0 12px 22px rgba(90, 120, 255, .4);
}

.mobile-account-btn {
  order: 4;
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}

.mobile-account-btn span {
  display: none;
}

.mobile-menu-btn {
  order: 0;
}

.topbar__actions {
  top: calc(100% + 8px);
  right: 18px;
}

.nav-btn--mobile-only {
  display: none;
}

.portfolio-action-row,
.portfolio-action-row--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2.5vw, 28px);
  margin: 0;
  padding: clamp(8px, 1.2vw, 16px) clamp(14px, 2vw, 24px);
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.portfolio-action-btn,
.portfolio-action-stat {
  min-height: 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 1 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5b5b7a;
  font-weight: 600;
  font-size: 15px;
  box-shadow: none;
}

.portfolio-action-btn i,
.portfolio-action-stat i {
  color: inherit;
  transition: transform .2s ease, color .2s ease;
}

.portfolio-action-btn:hover {
  background: transparent;
  color: #6c63ff;
  box-shadow: none;
}

.portfolio-action-btn:hover i {
  transform: translateY(-1px);
}

.portfolio-action-btn.is-active,
.portfolio-action-btn[data-like-photo].is-active,
.portfolio-action-btn[data-like-profile].is-active {
  background: transparent;
  color: #d92d52;
}

.portfolio-post[data-plus-themed='true'] > .portfolio-action-row,
.profile-card[data-plus-themed='true'] > .portfolio-action-row,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row,
[data-plus-themed='true'] .portfolio-action-row {
  background: transparent;
  box-shadow: none;
  border: 0;
}

.portfolio-post[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn,
.portfolio-post[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-stat,
.profile-card[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn,
.profile-card[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-stat,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-stat,
[data-plus-themed='true'] .portfolio-action-row .portfolio-action-btn,
[data-plus-themed='true'] .portfolio-action-row .portfolio-action-stat {
  background: transparent;
  box-shadow: none;
  border: 0;
  color: #5b5b7a;
}

.portfolio-post[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn:hover,
.profile-card[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn:hover,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn:hover,
[data-plus-themed='true'] .portfolio-action-row .portfolio-action-btn:hover {
  background: transparent;
  color: #6c63ff;
}

.portfolio-post[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn.is-active,
.profile-card[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn.is-active,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn.is-active,
[data-plus-themed='true'] .portfolio-action-row .portfolio-action-btn.is-active {
  background: transparent;
  color: #d92d52;
}

.portfolio-action-share__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
  }

  .mobile-menu-btn {
    display: grid;
    order: 0;
    flex: 0 0 42px;
  }

  .topbar__brand {
    order: 1;
    flex: 1 1 auto;
    justify-content: flex-start;
    min-width: 0;
  }

  .topbar__site-nav {
    order: 3;
    width: 100%;
    flex: 1 0 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar__site-nav::-webkit-scrollbar {
    display: none;
  }

  .topbar__nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar__nav-links::-webkit-scrollbar {
    display: none;
  }

  .topbar__nav-link--mobile-drawer {
    display: none !important;
  }

  .topbar__search-panel {
    order: 4;
    flex: 1 0 100%;
    max-width: 180px;
  }

  .mobile-account-btn {
    order: 2;
    flex: 0 0 42px;
  }

  .nav-btn--mobile-only {
    display: flex;
  }

  .portfolio-action-row,
  .portfolio-action-row--compact {
    gap: 12px;
    padding: 8px 14px;
    justify-content: space-around;
  }

  .portfolio-action-btn,
  .portfolio-action-stat {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .topbar__logo--image img {
    height: 36px;
    max-width: 120px;
  }

  .topbar__search-panel {
    max-width: 140px;
  }
}

/* Mobile header and livelier rounded cards. */
.topbar__mobile-search,
.mobile-notification-btn {
  display: none;
}

.mobile-notification-btn {
  position: relative;
  min-width: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(93, 111, 143, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  color: var(--brand-dark);
  box-shadow: 0 4px 14px rgba(34, 48, 72, .06);
  cursor: pointer;
}

.mobile-notification-btn:hover,
.mobile-notification-btn.has-unread {
  background: #fff;
  color: #6c63ff;
  box-shadow: 0 8px 20px rgba(108, 99, 255, .16);
}

.mobile-notification-btn span {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  font-size: 10px;
  line-height: 1;
}

.mobile-notification-btn span[hidden] {
  display: none;
}

.post-card.portfolio-post,
.profile-card,
.profile-card--feed,
.news-post-card {
  overflow: hidden;
  border-radius: clamp(16px, 2.5vw, 32px);
  background: #fff;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .08);
  transform: translateY(0);
  transition: transform .35s ease, box-shadow .35s ease, border-color .25s ease;
}

.portfolio-post[data-plus-themed='true'],
.profile-card[data-plus-themed='true'],
.public-profile-overview[data-plus-themed='true'] {
  border-radius: clamp(16px, 2.5vw, 32px);
}

.post-card.portfolio-post > .content-card__head,
.profile-card > .content-card__head,
.news-post-card > .post-card__head {
  border-radius: clamp(16px, 2.5vw, 32px) clamp(16px, 2.5vw, 32px) 0 0;
}

.portfolio-action-row,
.portfolio-action-row--compact,
.post-card.portfolio-post > .post-author-actions,
.post-card.portfolio-post > .content-safety-actions,
.news-post-card > .post-actions,
.news-post-card > .post-comments {
  border-radius: 0 0 clamp(16px, 2.5vw, 32px) clamp(16px, 2.5vw, 32px);
}

.portfolio-gallery,
.profile-gallery--carousel,
.news-photo-grid {
  overflow: hidden;
}

.portfolio-photo,
.profile-gallery--carousel .profile-photo,
.news-photo-grid .post-card__image {
  transition: transform .4s ease, filter .3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .post-card.portfolio-post:hover,
  .profile-card:hover,
  .news-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px rgba(108, 99, 255, .2);
  }

  .post-card.portfolio-post:hover .portfolio-photo,
  .profile-card:hover .profile-photo,
  .news-post-card:hover .post-card__image {
    transform: scale(1.03);
    filter: brightness(1.05);
  }
}

@media (max-width: 760px) {
  .topbar {
    position: sticky;
    top: 8px;
    z-index: 1200;
  }

  .topbar__brand {
    flex: 1 1 92px;
  }

  .topbar__mobile-search,
  .mobile-notification-btn {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }

  .topbar__mobile-search {
    order: 2;
  }

  .mobile-notification-btn {
    order: 3;
  }

  .mobile-account-btn {
    order: 4;
  }

  .topbar__site-nav {
    display: none;
  }

  .topbar__search-panel {
    display: none;
    order: 5;
    flex: 1 0 100%;
    width: 100%;
    max-width: none;
  }

  body.shop-search-open .topbar__search-panel {
    display: block;
  }

  .post-card.portfolio-post,
  .profile-card,
  .profile-card--feed,
  .news-post-card {
    border-radius: 18px;
    transition: box-shadow .25s ease;
  }
}

/* Account menu modes and smoother drawer behavior. */
.topbar__actions {
  border-radius: 24px;
  transform-origin: top right;
  animation: softPanelIn .22s ease;
}

.auth-switcher {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(93, 111, 143, .12);
  border-radius: 18px;
  background: rgba(246, 248, 252, .92);
}

.auth-mode-btn {
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  border-radius: 14px;
  font-size: 13px;
  white-space: normal;
}

.auth-mode-btn.is-active {
  border-color: transparent;
  background: linear-gradient(90deg, #6c63ff, #4da3ff);
  color: #fff;
  box-shadow: 0 10px 18px rgba(90, 120, 255, .24);
}

.topbar__actions .inline-form {
  width: 100%;
  animation: softPanelIn .2s ease;
}

.topbar__actions .inline-form.is-hidden {
  display: none;
}

.topbar__actions .inline-form > input,
.topbar__actions .inline-form > select {
  border-radius: 16px;
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.topbar__actions .inline-form > input:focus,
.topbar__actions .inline-form > select:focus {
  border-color: rgba(108, 99, 255, .45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 99, 255, .1);
  outline: none;
}

.profile-inline-composer {
  overflow: hidden;
  border: 1px solid rgba(93, 111, 143, .12);
  border-radius: clamp(18px, 2.5vw, 28px);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .08);
  animation: softPanelIn .24s ease;
}

.profile-inline-composer > .panel__header {
  margin: 0;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(93, 111, 143, .1);
  background: rgba(255, 255, 255, .92);
}

.profile-inline-composer .composer-form {
  margin: 0;
  padding: 16px 20px 20px;
  border-radius: 0 0 clamp(18px, 2.5vw, 28px) clamp(18px, 2.5vw, 28px);
  background: #fff;
}

.publication-policy-notice,
.composer-form textarea,
.composer-form input,
.composer-inline-fields input,
.composer-field input,
.form-grid textarea,
.form-grid input {
  border-radius: 16px;
}

.publication-policy-notice__icon {
  border-radius: 14px;
}

.composer-form textarea,
.composer-form input,
.composer-inline-fields input,
.composer-field input,
.form-grid textarea,
.form-grid input {
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.composer-form textarea:focus,
.composer-form input:focus,
.composer-inline-fields input:focus,
.composer-field input:focus,
.form-grid textarea:focus,
.form-grid input:focus {
  border-color: rgba(108, 99, 255, .45);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, .1);
}

.composer-form input[type='file'] {
  padding: 10px;
  background: #f8fbff;
  color: #5b5b7a;
}

.composer-form input[type='file']::file-selector-button {
  margin-right: 10px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6c63ff, #4da3ff);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.composer-form input[type='file']::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(90, 120, 255, .22);
}

@keyframes softPanelIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .topbar__actions {
    right: 8px;
    left: 8px;
    max-width: none;
    border-radius: 22px;
  }

  .auth-switcher {
    grid-template-columns: 1fr;
  }
}

/* Cohesive Plus surfaces after the template layer. */
.portfolio-post[data-plus-themed='true'],
.profile-card[data-plus-themed='true'],
.profile-card--feed[data-plus-themed='true'],
.public-profile-overview[data-plus-themed='true'],
.plus-account-panel[data-plus-themed='true'] {
  border-color: rgba(var(--plus-accent-rgb), .72);
  background:
    linear-gradient(180deg, rgba(var(--plus-accent-rgb), .18), rgba(var(--plus-accent-rgb), .075)),
    rgba(var(--plus-accent-rgb), .045);
  box-shadow: 0 18px 42px rgba(var(--plus-accent-rgb), .18);
}

.portfolio-post[data-plus-themed='true'] > .content-card__head,
.profile-card[data-plus-themed='true'] > .content-card__head,
.public-profile-overview[data-plus-themed='true'] > .public-profile-hero {
  border-bottom: 1px solid rgba(var(--plus-accent-rgb), .2);
  background:
    linear-gradient(135deg, rgba(var(--plus-accent-rgb), .2), rgba(var(--plus-accent-rgb), .075)),
    rgba(var(--plus-accent-rgb), .045);
}

.portfolio-post[data-plus-themed='true'] > .partner-badge--link,
.profile-card[data-plus-themed='true'] > .partner-badge--link,
.public-profile-overview[data-plus-themed='true'] .public-profile-about > .partner-badge--link {
  border: 1px solid rgba(var(--plus-accent-rgb), .32);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .62), rgba(var(--plus-accent-rgb), .16)),
    rgba(var(--plus-accent-rgb), .12);
  color: var(--plus-accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36), 0 8px 18px rgba(var(--plus-accent-rgb), .1);
}

.portfolio-post[data-plus-themed='true'] > .portfolio-post__body,
.profile-card[data-plus-themed='true'] > .profile-card__body,
.public-profile-overview[data-plus-themed='true'] > .public-profile-about {
  background:
    linear-gradient(180deg, rgba(var(--plus-accent-rgb), .075), rgba(var(--plus-accent-rgb), .12)),
    rgba(var(--plus-accent-rgb), .055);
}

.portfolio-post[data-plus-themed='true'] > .portfolio-action-row,
.profile-card[data-plus-themed='true'] > .portfolio-action-row,
.profile-card[data-plus-themed='true'] > .profile-actions,
.profile-card[data-plus-themed='true'] > .profile-feed-actions,
.profile-card[data-plus-themed='true'] > .content-safety-actions,
.portfolio-post[data-plus-themed='true'] > .post-author-actions,
.portfolio-post[data-plus-themed='true'] > .content-safety-actions,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row {
  border-top: 1px solid rgba(var(--plus-accent-rgb), .16);
  background:
    linear-gradient(180deg, rgba(var(--plus-accent-rgb), .11), rgba(var(--plus-accent-rgb), .17)),
    rgba(var(--plus-accent-rgb), .07);
}

.portfolio-post[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn,
.portfolio-post[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-stat,
.profile-card[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn,
.profile-card[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-stat,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-stat,
[data-plus-themed='true'] .portfolio-action-row .portfolio-action-btn,
[data-plus-themed='true'] .portfolio-action-row .portfolio-action-stat {
  background: transparent;
  color: #4f5d77;
}

.portfolio-post[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn:hover,
.profile-card[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn:hover,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn:hover,
[data-plus-themed='true'] .portfolio-action-row .portfolio-action-btn:hover {
  background: rgba(var(--plus-accent-rgb), .1);
  color: var(--plus-accent);
}

.portfolio-post[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn.is-active,
.profile-card[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn.is-active,
.public-profile-overview[data-plus-themed='true'] > .portfolio-action-row .portfolio-action-btn.is-active,
[data-plus-themed='true'] .portfolio-action-row .portfolio-action-btn.is-active {
  background: rgba(217, 45, 82, .08);
  color: #d92d52;
}

[data-plus-themed='true'] .content-overflow__toggle {
  border-color: rgba(var(--plus-accent-rgb), .24);
  background:
    linear-gradient(135deg, rgba(var(--plus-accent-rgb), .16), rgba(var(--plus-accent-rgb), .08)),
    rgba(var(--plus-accent-rgb), .08);
  color: var(--plus-accent);
  box-shadow: 0 8px 18px rgba(var(--plus-accent-rgb), .11);
}

[data-plus-themed='true'] .content-overflow__toggle:hover,
[data-plus-themed='true'] .content-overflow.is-open .content-overflow__toggle {
  border-color: rgba(var(--plus-accent-rgb), .34);
  background:
    linear-gradient(135deg, rgba(var(--plus-accent-rgb), .22), rgba(var(--plus-accent-rgb), .12)),
    rgba(var(--plus-accent-rgb), .12);
  color: var(--plus-accent);
  box-shadow: 0 10px 22px rgba(var(--plus-accent-rgb), .16);
}

[data-plus-themed='true'] .content-overflow__menu {
  border-color: rgba(var(--plus-accent-rgb), .22);
  background:
    linear-gradient(180deg, rgba(var(--plus-accent-rgb), .08), rgba(var(--plus-accent-rgb), .13)),
    rgba(var(--plus-accent-rgb), .06);
  box-shadow: 0 14px 32px rgba(var(--plus-accent-rgb), .16);
}

[data-plus-themed='true'] .content-overflow__menu button {
  color: #4f5d77;
}

[data-plus-themed='true'] .content-overflow__menu button:hover {
  background: rgba(var(--plus-accent-rgb), .12);
  color: var(--plus-accent);
}

@media (max-width: 760px) {
  .portfolio-post[data-plus-themed='true'] > .partner-badge--link,
  .profile-card[data-plus-themed='true'] > .partner-badge--link {
    margin: 8px auto 12px;
  }

  .portfolio-post[data-plus-themed='true'] > .portfolio-action-row,
  .profile-card[data-plus-themed='true'] > .portfolio-action-row,
  .public-profile-overview[data-plus-themed='true'] > .portfolio-action-row {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* Header sits flush with the browser edge on every breakpoint. */
.topbar {
  top: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: max(40px, calc((100vw - 1440px) / 2 + 24px));
  border-radius: 0 0 clamp(22px, 2.5vw, 36px) clamp(22px, 2.5vw, 36px);
}

@media (min-width: 1121px) {
  .topbar {
    padding-block: 6px;
  }

  .topbar__logo--image img {
    height: clamp(36px, 4vw, 58px);
  }

  .topbar__nav-links a {
    min-height: 36px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

@media (max-width: 760px) {
  .topbar {
    top: 0;
    width: 100%;
    margin: 0;
    padding-right: 20px;
    padding-left: 20px;
    border-radius: 0 0 18px 18px;
  }
}
