:root[data-theme="light"] { color-scheme: light; }
:root[data-theme] {
  --bg: var(--bdbg);
  --sidebar: var(--mute);
  --surface: var(--mute);
  --surface-2: var(--inpt);
  --surface-3: var(--surf);
  --surface-4: var(--edge);
  --line: color-mix(in srgb, var(--edge) 65%, transparent);
  --line-strong: var(--edge);
  --text: var(--lead);
  --muted: var(--bdco);
  --accent: var(--main);
  --accent-2: var(--main);
  --accent-soft: color-mix(in srgb, var(--main) 12%, transparent);
  --content-max: 1440px;
  --topbar-h: 0px;
}
body.design-shell {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
}
.design-main { grid-column: 2; min-width: 0; }
.design-sidebar {
  position: fixed;
  inset: .5rem auto .5rem .5rem;
  z-index: 30;
  width: 15rem;
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--surf) 60%, var(--bg));
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.design-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.35rem;
  font-weight: 800;
}
.design-brand svg { flex: 0 0 auto; color: var(--accent); }
.design-sidebar-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  padding: 1rem .75rem .75rem;
}
.design-nav { display: grid; gap: .5rem; }
.design-sidebar-body > .design-nav {
  border-bottom: 1px solid var(--line);
  padding-bottom: .75rem;
}
.design-sidebar-bottom {
  display: grid;
  gap: 1rem;
  margin-top: auto;
  flex-shrink: 0;
}
.design-nav-tools [data-icon] {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
}
.design-nav-tools [data-scheme] { padding-inline-start: 2.75rem; }
.design-nav-link,
a.design-nav-link:link,
a.design-nav-link:visited {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 2.25rem;
  padding: .35rem .75rem;
  border: 0;
  border-radius: .75rem;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.design-nav-link::before { font-size: 1.25rem; }
.design-nav-link:hover, a.design-nav-link:hover,
a.design-nav-link[aria-current="page"] {
  background: var(--surf);
  color: var(--text);
}
.design-nav-link:hover::before,
.design-nav-link[aria-current="page"]::before { color: var(--accent); }
.design-account {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 4rem;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: .875rem;
  background: var(--surf);
}
.design-account .design-account-icon {
  color: var(--accent);
  font-size: 2rem;
}
.design-account-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: .1rem;
}
.design-account-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.design-account-copy small,
.design-account-copy button,
a.design-account-signup {
  color: var(--muted);
  font-size: .75rem;
}
.design-account-copy button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.design-account-primary { font-size: .875rem; font-weight: 650; }
.design-account-copy a:hover,
.design-account-copy button:hover,
a.design-account-signup:hover { color: var(--accent); }

.design-menu-toggle { display: none; }
.design-search-bar {
  grid-column: 2;
  padding: 1rem clamp(1rem, 3vw, 2rem) 0;
  width: min(100%, var(--content-max));
  margin-inline: auto;
}
.design-search { position: relative; width: min(100%, 36rem); }
.design-search input {
  width: 100%;
  min-height: 2.75rem;
  padding: .75rem 1rem .75rem 3rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--inpt);
  color: var(--text);
}
.design-search input::placeholder { color: var(--muted); }
.design-search button {
  position: absolute;
  inset: 0 auto 0 .75rem;
  display: grid;
  place-items: center;
  width: 2rem;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
}
.design-shell :is(a, button, input):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.design-hero, .design-error {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: min(47rem, 94svh);
  padding: 2rem 1rem;
  text-align: center;
}
.design-hero-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  opacity: .23;
  mask-image: radial-gradient(ellipse at center, black 22%, transparent 74%);
}
.design-hero-inner {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1.25rem;
  width: min(100%, 36rem);
}
.design-mascot {
  width: min(15rem, 48vw);
  height: auto;
  margin-bottom: clamp(-11rem, -35vw, -5rem);
  mask-image: linear-gradient(black 46%, transparent 84%);
  pointer-events: none;
}
.design-hero .design-search input {
  min-height: 4.5rem;
  background: color-mix(in srgb, var(--surf) 76%, transparent);
  backdrop-filter: blur(10px);
}
.design-quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .6rem;
  width: 100%;
}
.design-quick-links a.design-nav-link {
  display: grid;
  justify-items: center;
  gap: .5rem;
  padding: .85rem .2rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surf) 60%, var(--bg));
  color: var(--text);
}
.design-quick-links a::before { font-size: 1.65rem; color: var(--accent); }
.design-quick-links a:hover { border-color: var(--accent); background: var(--surf); }
.design-hero p, .design-error p { color: var(--muted); }
.design-error { align-content: center; gap: 1rem; }
.design-error h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
.design-shell .page-header h2 { font-weight: 650; }
.design-shell .page-header { align-items: center; flex-wrap: wrap; }
.design-shell .content-card,
.design-shell .creator-card,
.design-shell .post-document,
.design-shell .comments-panel,
.design-shell .panel,
.design-shell .error-card { background: var(--surface); border-color: var(--line); border-radius: 1rem; }
.design-shell .content-card:hover,
.design-shell .creator-card:hover { border-color: var(--accent); }
.design-shell .post-section h2 { color: var(--text); }
.design-shell .creator-card::after { background: linear-gradient(90deg, var(--surface), transparent); }
.design-shell .content-meta { color: var(--muted); }
.design-shell .content-title,
.design-shell .profile-tab.active,
.design-shell .segment.active,
.design-shell .search-control input,
.design-shell .form-row input,
.design-shell .form-row select,
.design-shell .form-row textarea { color: var(--text); }
.design-shell .eyebrow,
.design-shell .post-chip,
.design-shell .accent-action { color: var(--accent); }
.design-shell .accent-action {
  display: inline-flex;
  width: auto;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-color: var(--line-strong);
  background: var(--accent-soft);
}
.design-shell .accent-action:hover { transform: none; }
.design-shell .accent-action > span { display: inline-block; }
.design-shell .accent-action > [data-icon] {
  flex: 0 0 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
}
.design-shell .accent-action:hover { border-color: var(--accent); }
.design-shell .creator-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)) !important; }
.design-shell .profile-title-line h2, .design-shell .post-heading h1 { overflow-wrap: anywhere; }
.design-shell .profile-banner::after { background: linear-gradient(0deg, var(--bg), transparent); }
.design-shell .source-chip { color: var(--muted); background: var(--surface-3); }
.design-shell .content-thumb { aspect-ratio: 1; }
.design-shell .content-thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1023px) {
  body.design-shell { display: block; }
  .design-sidebar {
    position: sticky;
    inset: 0 0 auto;
    width: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 1rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--bg);
  }
  .design-brand { width: auto; padding: 0; border: 0; }
  .design-menu-toggle {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surf);
    color: var(--text);
    font-size: 1.25rem;
  }
  .design-sidebar-body {
    display: none;
    position: absolute;
    inset: calc(100% + .35rem) .5rem auto auto;
    width: min(17rem, calc(100vw - 1rem));
    max-height: calc(100svh - 5rem);
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--bg);
    box-shadow: var(--shadow);
  }
  .design-menu-toggle[aria-expanded="true"] + .design-sidebar-body { display: flex; }
  .design-error, .design-hero { min-height: min(39rem, 84svh); }
}
@media (max-width: 600px) {
  .design-shell .page-frame { padding-inline: 1rem !important; }
  .design-shell .post-page { padding-inline: 1rem; }
  .design-shell .home-recent { padding-inline: 1rem; }
  .design-shell .content-grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Post previews put the title over the faded thumbnail. */
.design-shell .content-card {
  grid-template-columns: minmax(0, 1fr);
  isolation: isolate;
}
.design-shell .content-thumb,
.design-shell .content-meta { grid-area: 1 / 1; }
.design-shell .content-thumb { background: transparent; }
.design-shell .content-thumb img {
  mask-image: linear-gradient(black 42%, transparent 94%);
  transition: transform .2s ease;
}
.design-shell .content-card:hover .content-thumb img { transform: scale(1.04); }
.design-shell .content-thumb .thumb-fallback { bottom: 25%; }
.design-shell .content-meta {
  align-self: end;
  z-index: 1;
  min-width: 0;
  padding: .65rem .75rem;
  background: linear-gradient(transparent, var(--surface) 40%);
}
.design-shell .content-title {
  order: -1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  font-weight: 650;
}
.design-shell .content-meta-row { flex-wrap: wrap; gap: .25rem .5rem; }
.design-shell .content-meta time { color: var(--muted); }
.design-shell .date-badge { inset: .6rem auto auto .6rem; }
.design-shell .auth-card { background: var(--surface); border-color: var(--line); }
.design-shell .btn-primary:not(:disabled) { color: var(--fore); }
.design-shell .btn-primary:not(:disabled):hover { background: var(--accent); filter: brightness(.92); }
.design-shell :is(.caption, .profile-bio) ul { list-style: disc; padding-inline-start: 1.5em; }
.design-shell :is(.caption, .profile-bio) ol { list-style: decimal; padding-inline-start: 1.5em; }
.design-shell :is(.caption, .profile-bio) :is(h1, h2, h3, h4, h5, h6) { font-weight: 700; }
.design-shell :is(.caption, .profile-bio) a { text-decoration: underline; }
.design-shell .lightbox { margin: auto; }
.design-shell .lightbox-close { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .design-shell .content-card,
  .design-shell .content-thumb img { transition: none; }
}

/* Creator directory: align the live Go page with the supplied design prototype. */
.design-shell .creator-directory.page-frame { max-width: 1920px !important; width:100%; padding: 24px clamp(16px, 2.5vw, 40px) 56px; }
.design-shell .creator-directory-heading { display:flex; align-items:center; gap:14px; margin:0 0 22px; }
.design-shell .creator-directory-heading h1 { margin:0; font-size:clamp(1.75rem,2.2vw,2.25rem); line-height:1.15; font-weight:600; letter-spacing:-.035em; }
.design-shell .creator-shuffle { display:grid; place-items:center; width:44px; height:44px; flex:0 0 auto; color:var(--accent); border:1px solid var(--line); border-radius:50%; background:var(--surface); }
.design-shell .creator-shuffle:hover { border-color:var(--accent); background:var(--surface-2); }
.design-shell .creator-shuffle [data-icon] { width:18px; height:18px; }
.design-shell .creator-directory-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:22px; }
.design-shell .creator-pagination { display:flex; align-items:center; min-height:44px; width:max-content; max-width:100%; border:1px solid var(--line); border-radius:999px; overflow:hidden; background:var(--surface); }
.design-shell .creator-page-numbers { display:flex; align-items:center; gap:4px; padding:4px 8px; }
.design-shell .creator-page-number, .design-shell .creator-page-ellipsis { display:grid; place-items:center; min-width:34px; height:34px; padding:0 8px; color:var(--fore); border-radius:50%; font-size:.86rem; font-weight:600; text-decoration:none; }
.design-shell .creator-page-number:hover { color:var(--accent); background:var(--surface-2); }
.design-shell .creator-page-number.is-active { background:var(--surface-2); }
.design-shell .creator-page-ellipsis { color:var(--muted); }
.design-shell .creator-page-arrow { display:grid; place-items:center; width:42px; height:42px; color:var(--fore); text-decoration:none; border-left:1px solid var(--line); }
.design-shell .creator-page-arrow:hover { color:var(--accent); background:var(--surface-2); }
.design-shell .creator-page-arrow.is-disabled { color:var(--muted); opacity:.55; }
.design-shell .creator-page-arrow [data-icon] { width:17px; height:17px; }
.design-shell .creator-directory-tools { display:flex; align-items:center; justify-content:flex-end; gap:10px; min-width:0; }
.design-shell .creator-search { display:flex; align-items:center; gap:10px; width:min(17rem,30vw); min-width:10rem; height:44px; padding:0 14px; border:1px solid var(--line); border-radius:999px; background:var(--surface); }
.design-shell .creator-search [data-icon] { width:16px; height:16px; color:var(--muted); flex:0 0 auto; }
.design-shell .creator-search input { width:100%; min-width:0; padding:0; color:var(--fore); border:0; outline:0; background:transparent; font:inherit; }
.design-shell .creator-search input::placeholder { color:var(--muted); }
.design-shell .creator-platform-chip, .design-shell .creator-sort-form select { display:flex; align-items:center; gap:8px; height:44px; padding:0 14px; color:var(--fore); border:1px solid var(--line); border-radius:999px; background:var(--surface); font:inherit; white-space:nowrap; }
.design-shell .creator-platform-mark, .design-shell .creator-service-mark { display:grid; place-items:center; width:18px; height:18px; color:var(--accent); border:1px solid currentColor; border-radius:5px; font-size:11px; font-weight:700; }
.design-shell .creator-sort-form { display:flex; gap:6px; }
.design-shell .creator-sort-form select { cursor:pointer; }
.design-shell .creator-sort-form option { color:var(--fore); background:var(--surface); }
.design-shell .creator-sort-submit { padding:0 12px; color:var(--fore); border:1px solid var(--line); border-radius:999px; background:var(--surface); cursor:pointer; }
.design-shell .creator-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,24rem),1fr)) !important; gap:14px; }
.design-shell .creator-grid .creator-card { position:relative; display:block; min-width:0; min-height:116px; overflow:hidden; isolation:isolate; border:1px solid var(--line); border-radius:16px; background:var(--surface); transition:border-color .16s ease, transform .16s ease; }
.design-shell .creator-grid .creator-card:hover { transform:translateY(-1px); border-color:color-mix(in srgb,var(--accent) 55%,var(--line)); }
.design-shell .creator-card-bg { position:absolute; z-index:0; inset:0; opacity:.19; background-image:linear-gradient(90deg,var(--surface) 0%,color-mix(in srgb,var(--surface) 70%,transparent) 55%,var(--surface) 100%),url('/static/design/creator-card-bg.png'); background-position:center,center 42%; background-size:cover; pointer-events:none; }
.design-shell .creator-card-link { position:relative; z-index:1; display:grid; grid-template-columns:80px minmax(0,1fr) auto; grid-template-rows:auto auto; align-items:center; gap:5px 14px; min-height:116px; padding:16px !important; color:var(--fore); text-align:left !important; text-decoration:none; }
.design-shell .creator-avatar { grid-column:1; grid-row:1 / 3; display:grid; place-items:center; width:80px; height:80px; overflow:hidden; color:var(--fore); border:1px solid var(--line); border-radius:14px; background:var(--surface-2); font-size:1.5rem; font-weight:600; }
.design-shell .creator-avatar img { width:100%; height:100%; object-fit:cover; }
.design-shell .creator-card-main { grid-column:2; grid-row:1; display:flex; flex-direction:column; align-self:end; min-width:0; gap:8px; }
.design-shell .creator-card-name { overflow:hidden; color:var(--fore); font-size:1.05rem; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.design-shell .creator-card-services { display:flex; align-items:center; gap:5px; }
.design-shell .creator-verified-mark { display:grid; place-items:center; width:20px; height:20px; color:#82be87; border:1px solid var(--line); border-radius:5px; font-size:13px; }
.design-shell .creator-card-handle { grid-column:3; grid-row:1; align-self:end; max-width:12rem; overflow:hidden; color:var(--fore); font-size:.82rem; font-weight:600; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.design-shell .creator-card-handle small { display:block; margin-top:3px; color:var(--muted); font-size:.68rem; font-weight:400; }
.design-shell .creator-card-stats { grid-column:2 / 4; grid-row:2; display:flex; align-items:center; gap:12px; min-width:0; color:var(--muted); font-size:.75rem; }
.design-shell .creator-card-stats small { color:var(--muted); }
.design-shell .creator-card-stats .creator-card-size { margin-left:auto; color:var(--accent); white-space:nowrap; }
.design-shell .creator-favorite { position:absolute; z-index:3; top:9px; right:10px; display:grid; place-items:center; width:30px; height:30px; padding:0; color:var(--fore); border:0; border-radius:50%; background:transparent; cursor:pointer; }
.design-shell .creator-favorite [data-icon] { width:20px; height:20px; }
.design-shell .creator-favorite[aria-pressed="true"] { color:#ef5555; }
.design-shell .creator-favorite[aria-pressed="true"] [data-icon] { fill:currentColor; }
.design-shell .creator-empty-state { display:grid; justify-items:center; gap:8px; padding:56px 20px; color:var(--muted); border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.design-shell .creator-empty-state [data-icon] { width:30px; height:30px; }
.design-shell .creator-empty-state p { margin:0; }
.design-shell .creator-pagination-bottom { margin:24px auto 0; }
@media (max-width: 1050px) {
  .design-shell .creator-directory-toolbar { align-items:flex-start; flex-direction:column; }
  .design-shell .creator-directory-tools { width:100%; justify-content:flex-start; }
  .design-shell .creator-search { width:min(100%,24rem); }
}
@media (max-width: 600px) {
  .design-shell .creator-directory.page-frame { padding:20px 16px 40px; }
  .design-shell .creator-directory-tools { display:grid; grid-template-columns:1fr auto; }
  .design-shell .creator-search { grid-column:1 / -1; width:100%; }
  .design-shell .creator-platform-chip { justify-content:center; }
  .design-shell .creator-sort-form select { max-width:100%; }
  .design-shell .creator-sort-submit { display:none; }
  .design-shell .creator-card-link { grid-template-columns:64px minmax(0,1fr) auto; min-height:100px; gap:5px 10px; padding:12px !important; }
  .design-shell .creator-avatar { width:64px; height:64px; border-radius:12px; }
  .design-shell .creator-card-handle { max-width:8rem; font-size:.73rem; }
}
@media (prefers-reduced-motion: reduce) {
  .design-shell .creator-grid .creator-card { transition:none; }
}
.design-shell .creator-favorite[aria-pressed="true"] [data-icon] path { fill:currentColor; }
