:root {
  --bg: #fbf7fa;
  --surface: #fff;
  --surface-soft: #f7eef4;
  --line: #ead9e3;
  --line-soft: #f0e4ec;
  --text: #201720;
  --muted: #786778;
  --blue: #e64f7a;
  --blue-dark: #bd315d;
  --accent: #12a594;
  --accent-soft: #e9f8f5;
  --shadow: 0 8px 28px rgba(91, 32, 62, .09);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img, picture { display: block; width: 100%; height: 100%; }
img { object-fit: cover; background: var(--surface-soft); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 60px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 240px;
  align-items: center;
  gap: 18px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 rgba(18, 38, 63, .02);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--blue);
  font-weight: 950;
  letter-spacing: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
}

.brand strong { font-size: 1.3rem; }

.search {
  width: min(100%, 520px);
  justify-self: center;
}

.search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--surface-soft);
  color: var(--text);
  outline: 0;
}

.search input:focus {
  border-color: rgba(230, 79, 122, .42);
  background: #fff;
}

.topbar nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.topbar nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--blue);
  font-weight: 850;
}

.topbar nav .join {
  color: #fff;
  background: var(--blue);
}

.app-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 650px) 300px;
  gap: 18px;
  padding: 18px;
  align-items: start;
}

.rail,
.right-panel {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 8px;
}

.rail a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 850;
}

.rail a:hover,
.rail a.active {
  color: var(--blue);
  background: #fdebf1;
}

.content-column {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.marketplace-shell {
  grid-template-columns: 190px minmax(0, 1fr) 280px;
}

.marketplace-column {
  gap: 18px;
}

.home-auth,
.profile-card,
.feed-post,
.side-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}

.home-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 18px;
  padding: 22px;
  border-radius: 18px;
}

.market-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 22px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(18, 165, 148, .13), transparent 34%),
    linear-gradient(135deg, #fff, #fcf1f6);
  box-shadow: var(--shadow);
}

.market-hero > div > span,
.section-title span {
  color: var(--blue);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.market-hero h1 {
  max-width: 620px;
  margin: 8px 0 0;
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

.market-hero p {
  max-width: 610px;
  margin: 14px 0 0;
  color: var(--muted);
}

.market-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.market-stats strong {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line-soft);
  color: var(--blue-dark);
}

.market-hero .signup-card {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
}

.directory {
  display: grid;
  gap: 14px;
}

.section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: end;
  padding: 4px 2px;
}

.section-title h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.creator-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.creator-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(230, 79, 122, .18), rgba(18, 165, 148, .12)),
    var(--surface-soft);
}

.creator-card-body {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 42px 14px 14px;
}

.creator-avatar {
  position: absolute;
  top: -30px;
  left: 14px;
  width: 62px;
  height: 62px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--surface-soft);
}

.creator-avatar-img {
  width: 100%;
  height: 100%;
}

.creator-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
}

.creator-card-body > span {
  color: var(--muted);
  font-size: .9rem;
}

.creator-card p {
  min-height: 58px;
  margin: 2px 0 0;
  color: #3f3640;
  font-size: .94rem;
}

.creator-meta {
  display: grid;
  gap: 2px;
  margin-top: 2px;
}

.creator-meta strong {
  color: var(--text);
  font-size: .9rem;
}

.creator-meta em {
  color: var(--muted);
  font-size: .88rem;
  font-style: normal;
}

.creator-cta {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.creator-cta:hover {
  background: var(--blue-dark);
}

.home-copy span {
  color: var(--blue);
  font-weight: 950;
}

.eyebrow {
  width: max-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #087d70;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-copy h1 {
  max-width: 560px;
  margin: 8px 0 0;
  font-size: clamp(2.25rem, 4vw, 4.1rem);
  line-height: 1;
  letter-spacing: 0;
}

.home-copy p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.signup-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.signup-card h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

label {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 850;
}

input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: 0;
  background: #fff;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(230, 79, 122, .14);
}

button,
.side-card a,
.subscribe {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

button:hover,
.side-card a:hover,
.subscribe:hover {
  background: var(--blue-dark);
}

.signup-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.signup-card p a {
  color: var(--blue);
  font-weight: 850;
}

.profile-card {
  overflow: hidden;
  border-radius: 18px;
}

.cover {
  height: 205px;
  background:
    linear-gradient(135deg, rgba(230, 79, 122, .22), rgba(230, 79, 122, .04)),
    var(--surface-soft);
}

.profile-main {
  position: relative;
  padding: 76px 20px 18px;
}

.profile-avatar {
  position: absolute;
  left: 20px;
  top: -54px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  background: #dce8f3;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
}

.profile-avatar .avatar-fallback,
.profile-avatar-img {
  width: 100%;
  height: 100%;
}

.subscribe {
  position: absolute;
  right: 20px;
  top: 18px;
  min-width: 150px;
}

.profile-main h2 {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1;
}

.handle {
  margin: 6px 0 0;
  color: var(--muted);
}

.bio {
  max-width: 590px;
  margin: 14px 0 0;
  color: #273547;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
}

.profile-stats strong {
  color: var(--text);
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-soft);
}

.profile-tabs a {
  min-height: 52px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  border-bottom: 3px solid transparent;
}

.profile-tabs a.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.feed {
  display: grid;
  gap: 14px;
}

.feed-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 6px 2px;
}

.feed-title h2 {
  margin: 0;
  font-size: 1.3rem;
}

.feed-title span {
  color: var(--muted);
  font-weight: 750;
}

.feed-post {
  border-radius: 18px;
  overflow: hidden;
}

.post-head {
  min-height: 64px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
}

.avatar-wrap,
.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-soft);
}

.post-head strong,
.post-head span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-head span {
  color: var(--muted);
  font-size: .9rem;
}

.post-menu {
  color: var(--muted);
  font-weight: 950;
  letter-spacing: .08em;
}

.post-copy {
  padding: 0 14px 12px;
}

.post-copy h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.post-copy p {
  margin: 8px 0 0;
  color: #2c3848;
}

.post-copy span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .9rem;
}

.post-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--surface-soft);
  overflow: hidden;
}

.post-media:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 32, .38), transparent 45%);
}

.media-lock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  transform: translateX(-50%);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--blue);
  font-weight: 950;
}

.post-actions {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-top: 1px solid var(--line-soft);
}

.post-actions a {
  color: var(--muted);
  font-size: 1.22rem;
}

.feed-post.empty {
  padding-bottom: 18px;
}

.right-panel {
  gap: 14px;
}

.side-card {
  border-radius: 18px;
  padding: 18px;
}

.side-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.side-card p {
  margin: 10px 0 16px;
  color: var(--muted);
}

.side-card a {
  width: 100%;
}

.creator-suggestions {
  display: grid;
  gap: 12px;
}

.sidebar-creator-list {
  display: grid;
  gap: 8px;
}

.sidebar-creator {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
}

.sidebar-avatar,
.sidebar-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-soft);
}

.sidebar-creator strong,
.sidebar-creator em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-creator strong {
  font-size: .95rem;
}

.sidebar-creator em {
  color: var(--muted);
  font-size: .86rem;
  font-style: normal;
}

.sidebar-register form {
  display: grid;
  gap: 10px;
}

.side-card.muted {
  background: #fafdff;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 20px 0 20px max(18px, calc((100vw - 1240px) / 2 + 18px));
}

.settings-overlay:target {
  display: flex;
}

.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, .48);
}

.settings-card,
.language-card {
  position: relative;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(15, 23, 32, .24);
}

.settings-card {
  width: min(248px, calc(100vw - 36px));
  overflow: hidden;
}

.settings-card header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.settings-user {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-soft);
}

.settings-card header a {
  color: #8795a6;
  font-size: 1.7rem;
  line-height: 1;
}

.settings-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row.active {
  background: #fdebf1;
  color: var(--blue-dark);
}

.row-icon {
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 1.25rem;
}

.settings-row strong {
  font-size: .94rem;
}

.settings-row em {
  color: var(--blue);
  font-style: normal;
  font-weight: 950;
}

.language-card {
  width: min(220px, calc(100vw - 52px));
  margin-left: 16px;
  padding: 4px 0;
}

.language-option {
  min-height: 40px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0 16px;
}

.language-option strong {
  font-size: .94rem;
  font-weight: 500;
}

.radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #c7d1dc;
}

.radio.checked {
  border: 6px solid var(--blue);
}

.site-footer {
  width: min(100%, 1240px);
  margin: 20px auto 0;
  padding: 24px 18px 40px;
  color: var(--muted);
  text-align: center;
}

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
  box-shadow: var(--shadow);
}

.auth-page {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 28px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
}

.auth-panel,
.auth-info {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.auth-panel h1,
.auth-info h2 {
  margin: 8px 0 0;
  font-size: 2rem;
  line-height: 1.05;
}

.auth-panel p,
.auth-info p {
  color: var(--muted);
}

.auth-info ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.auth-info li {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: #2c3848;
  font-weight: 800;
}

.auth-panel form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.form-note,
.form-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 800;
}

.form-note {
  color: #086c55;
  background: #e8f8f3;
}

.form-error {
  color: #b42318;
  background: #fff0f0;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 180px minmax(0, 1fr) auto;
  }

  .app-shell {
    grid-template-columns: minmax(0, 650px) 280px;
    justify-content: center;
  }

  .marketplace-shell {
    grid-template-columns: minmax(0, 760px) 280px;
  }

  .rail {
    display: none;
  }
}

@media (max-width: 880px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search {
    display: none;
  }

  .app-shell {
    grid-template-columns: minmax(0, 650px);
    padding: 10px;
  }

  .marketplace-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .right-panel {
    position: static;
    grid-row: 1;
  }

  .home-auth,
  .market-hero,
  .section-title,
  .auth-page {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .topbar {
    padding: 8px 10px;
  }

  .brand strong {
    display: none;
  }

  .topbar nav > a:not(.join):not([href="#settings"]) {
    display: none;
  }

  .settings-overlay,
  .settings-overlay:target {
    padding: 20px;
  }

  .language-overlay:target {
    align-items: flex-start;
  }

  .language-card {
    margin-left: 10px;
  }

  .home-auth {
    padding: 16px;
  }

  .market-hero {
    padding: 18px;
  }

  .home-copy h1 {
    font-size: 2.35rem;
  }

  .market-hero h1 {
    font-size: 2.25rem;
  }

  .creator-grid {
    grid-template-columns: 1fr;
  }

  .cover {
    height: 156px;
  }

  .profile-main {
    padding: 66px 14px 16px;
  }

  .profile-avatar {
    left: 14px;
    width: 96px;
    height: 96px;
  }

  .subscribe {
    right: 14px;
    min-width: 120px;
  }
}
