/* =============================================================
   profile-stg.css — Profile (STG-UI-004)
   Loaded after app.css — overrides Gilded Vault brown shell.
   Legacy rules remain in app.css (P0 extraction deferred).
   ============================================================= */

/* ── Page shell ─────────────────────────────────────────────────────── */
#page-profile.page {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: calc(100vh - 72px);
  background: var(--stg-paper, #ffffff);
}

#page-profile .profile-page-shell {
  min-height: calc(100vh - 72px);
  background: var(--stg-paper, #ffffff);
  background-image: none;
  background-attachment: scroll;
  color: var(--stg-ink, #161a14);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
}

#page-profile .profile-container {
  max-width: min(1180px, 100%);
  margin: 0 auto;
  padding: var(--sp-5, 24px) var(--sp-6, 32px) var(--sp-9, 96px);
}

#page-profile :focus-visible {
  outline: 2px solid var(--stg-ink, #161a14);
  outline-offset: 2px;
}

/* ── Guest card ─────────────────────────────────────────────────────── */
#page-profile .profile-guest-card {
  max-width: 28rem;
  margin: 2rem auto;
  padding: var(--sp-6, 32px);
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink, #161a14);
  border-radius: var(--stg-r-xl, 32px);
  box-shadow: var(--stg-lift);
  border: none;
}

#page-profile .profile-guest-card__title {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: var(--fs-h2, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-transform: none;
  margin: 0 0 var(--sp-3, 12px);
  color: var(--stg-ink, #161a14);
}

#page-profile .profile-guest-card .profile-lead {
  color: var(--stg-ink-2, #38382f);
  font-size: var(--fs-body, 1rem);
  line-height: 1.55;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
#page-profile .tm-profile-btn {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-weight: 600;
  font-size: var(--fs-small, 0.875rem);
  text-transform: none;
  letter-spacing: 0;
  border-radius: var(--stg-r-pill, 9999px);
  padding: 10px 20px;
}

#page-profile .tm-profile-btn--primary {
  background: var(--stg-accent, #d9f274);
  color: var(--stg-ink, #161a14);
  box-shadow: none;
}

#page-profile .tm-profile-btn--primary:hover {
  filter: brightness(0.97);
}

#page-profile .tm-profile-btn--ghost {
  background: transparent;
  color: var(--stg-ink, #161a14);
  border: 1px solid var(--stg-border-strong, rgba(22, 26, 20, 0.14));
}

#page-profile .tm-profile-btn--ghost:hover {
  background: var(--stg-paper-deep, #f3f2ee);
}

#page-profile .tm-profile-btn--follow {
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink, #161a14);
  border: 1px solid var(--stg-border-strong, rgba(22, 26, 20, 0.14));
}

#page-profile .tm-profile-btn--follow:hover {
  background: var(--stg-pop-lavender, #cbb9e0);
}

/* ── Viewing banner ─────────────────────────────────────────────────── */
#page-profile .profile-viewing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3, 12px);
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-lg, 24px);
  padding: var(--sp-3, 12px) var(--sp-5, 24px);
  margin-bottom: var(--sp-5, 24px);
  border: none;
}

#page-profile .profile-viewing-banner__label {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  color: var(--stg-ink-2, #38382f);
}

#page-profile .profile-viewing-banner__label strong {
  color: var(--stg-ink, #161a14);
  font-weight: 600;
}

#page-profile .profile-viewing-banner__link {
  color: var(--stg-ink, #161a14);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#page-profile .profile-api-error--banner {
  background: rgba(180, 60, 50, 0.08);
  border: 1px solid rgba(180, 60, 50, 0.25);
  color: var(--stg-ink, #161a14);
  border-radius: var(--stg-r-md, 16px);
}

/* ── P1 · Hero ──────────────────────────────────────────────────────── */
#page-profile .profile-hero {
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-2xl, 40px);
  padding: var(--sp-7, 48px);
  margin-bottom: var(--sp-6, 32px);
}

#page-profile .profile-hero__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5, 24px);
  align-items: center;
  padding: 0;
  margin: 0;
}

@media (min-width: 900px) {
  #page-profile .profile-hero__row {
    grid-template-columns: 1.1fr auto;
    align-items: end;
  }
}

#page-profile .profile-hero__left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--sp-5, 24px);
}

#page-profile .profile-hero__avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 4px solid var(--stg-paper, #ffffff);
  background: var(--stg-pop-mint, #b8e6c9);
  box-shadow: var(--stg-lift);
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--stg-ink, #161a14);
  text-transform: none;
}

#page-profile .profile-signed-label--hero {
  margin: 0;
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-hero__pseudo {
  margin: var(--sp-2, 8px) 0 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--stg-ink, #161a14);
}

#page-profile .profile-hero__email,
#page-profile .profile-hero__member {
  margin: 4px 0 0;
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2, 8px);
  justify-content: flex-start;
}

@media (min-width: 900px) {
  #page-profile .profile-hero__actions {
    justify-content: flex-end;
  }
}

/* ── P2 · Tabs ──────────────────────────────────────────────────────── */
#page-profile .profile-page-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2, 8px);
  padding: 4px;
  margin: 0 0 var(--sp-6, 32px);
  max-width: 100%;
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-pill, 9999px);
  border: none;
}

#page-profile .profile-page-switch__btn {
  flex: 0 1 auto;
  min-width: 0;
  padding: 8px 16px;
  border: none;
  border-radius: var(--stg-r-pill, 9999px);
  background: transparent;
  color: var(--stg-ink-2, #38382f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: background var(--dur-1, 120ms) ease, color var(--dur-1, 120ms) ease;
}

#page-profile .profile-page-switch__btn:hover {
  color: var(--stg-ink, #161a14);
  background: var(--stg-paper, #ffffff);
}

#page-profile .profile-page-switch__btn[aria-selected="true"] {
  background: var(--stg-ink, #161a14);
  color: var(--stg-paper, #ffffff);
  box-shadow: none;
}

#page-profile .profile-tab-nowrap {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
}

#page-profile .profile-tab-amp {
  opacity: 0.72;
}

/* ── STG-UI-004 · Body grid (main + aside) ─────────────────────────── */
#page-profile .profile-body-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-5, 24px);
  align-items: start;
}

#page-profile .profile-main-col {
  min-width: 0;
}

#page-profile .profile-aside-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4, 16px);
}

@media (min-width: 1025px) {
  #page-profile .profile-aside-col {
    position: sticky;
    top: 88px;
  }
}

@media (max-width: 1024px) {
  #page-profile .profile-body-grid {
    grid-template-columns: 1fr;
  }
}

/* Section headers (STG-UI-004) */
#page-profile .profile-section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4, 16px);
  flex-wrap: wrap;
  margin: var(--sp-6, 32px) 0 var(--sp-4, 16px);
}

#page-profile .profile-section--patterns .profile-section-row {
  margin-top: 0;
}

#page-profile .profile-section-eyebrow {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-section-h2 {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: var(--sp-2, 8px) 0 0;
  color: var(--stg-ink, #161a14);
}

#page-profile .profile-section-h2 em {
  font-style: italic;
}

#page-profile .profile-section-row__end {
  display: flex;
  align-items: center;
  gap: var(--sp-2, 8px);
}

#page-profile .profile-section-meta {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-visibility-tabs {
  display: inline-flex;
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-pill, 9999px);
  padding: 3px;
  margin-bottom: var(--sp-4, 16px);
}

#page-profile .profile-visibility-tabs button {
  padding: 8px 16px;
  border: none;
  border-radius: var(--stg-r-pill, 9999px);
  background: transparent;
  color: var(--stg-ink-2, #38382f);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  font-weight: 500;
  cursor: pointer;
}

#page-profile .profile-visibility-tabs button[aria-selected="true"] {
  background: var(--stg-ink, #161a14);
  color: var(--stg-paper, #ffffff);
}

#page-profile .stg-viewtoggle {
  display: inline-flex;
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-pill, 9999px);
  padding: 2px;
}

#page-profile .stg-viewtoggle button {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: var(--stg-r-pill, 9999px);
  background: transparent;
  color: var(--stg-ink-3, #6b6b5f);
  cursor: pointer;
  display: grid;
  place-items: center;
}

#page-profile .stg-viewtoggle button.is-active {
  background: var(--stg-paper, #ffffff);
  color: var(--stg-ink, #161a14);
}

/* Patterns list host — row chrome from browse-stg.css (dual selector) */
#page-profile .profile-patterns-host {
  min-width: 0;
  width: 100%;
}

/* List rows — meta + actions always visible on profile */
#page-profile .profile-patterns-host .catalog-row .cat-actions {
  opacity: 1;
  flex-shrink: 0;
  z-index: 2;
}

#page-profile .profile-patterns-host .profile-browse-pattern-row--list {
  grid-template-columns: 56px 176px 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
}

#page-profile .profile-patterns-host .profile-browse-pattern-row--list .thumb-row {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

#page-profile .profile-patterns-host .profile-browse-pattern-row--list .row-info .title {
  font-size: 1rem;
  line-height: 1.08;
}

#page-profile .profile-patterns-host .profile-browse-pattern-row--list .row-info .orig-artist {
  font-size: 0.8rem;
}

#page-profile .profile-patterns-host .profile-browse-pattern-row--list .cat-step-grid-block .cat-meta-row {
  margin-top: 4px;
}

#page-profile .profile-patterns-host .catalog-row .cat-meta-row .pill {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-paper, #ffffff);
  color: var(--stg-ink-2, #38382f);
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 500;
}

#page-profile .profile-patterns-host .pattern-card-meta-row {
  margin-top: 6px;
}

#page-profile .profile-patterns-host .pattern-card-meta-actions {
  display: flex;
  gap: 2px;
  align-items: center;
}


#page-profile .profile-patterns-host .pattern-card-stat-num {
  font-size: var(--fs-caption, 0.75rem);
  font-variant-numeric: tabular-nums;
}

/* Grid mode — cartes compactes (pas de gros blocs) */
#page-profile .profile-patterns-host.stg-pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-3, 12px);
}

@media (max-width: 520px) {
  #page-profile .profile-patterns-host.stg-pattern-grid {
    grid-template-columns: 1fr;
  }
}

#page-profile .profile-pattern-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) max-content;
  gap: var(--sp-2, 8px) var(--sp-3, 12px);
  align-items: center;
  padding: var(--sp-2, 8px) var(--sp-3, 12px);
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-lg, 24px);
  color: var(--stg-ink, #161a14);
  position: relative;
  min-width: 0;
  overflow: visible;
  transition: background var(--dur-1, 120ms) ease;
}

#page-profile .profile-pattern-card:has(.bw-row__menu:not(.hidden)) {
  z-index: 8;
}

#page-profile .profile-pattern-card:hover {
  background: var(--stg-pop-cream, #f4ecd8);
}

#page-profile .profile-pattern-card__thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--stg-r-md, 16px);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

#page-profile .profile-pattern-card__thumb.tone-mint { background: var(--stg-pop-mint, #b8e6c9); }
#page-profile .profile-pattern-card__thumb.tone-sky { background: var(--stg-pop-sky, #b9dee6); }
#page-profile .profile-pattern-card__thumb.tone-peach { background: var(--stg-pop-peach, #f6c7b8); }
#page-profile .profile-pattern-card__thumb.tone-lavender { background: var(--stg-pop-lavender, #cbb9e0); }
#page-profile .profile-pattern-card__thumb.tone-lime { background: var(--stg-accent, #d9f274); }
#page-profile .profile-pattern-card__thumb.tone-ink { background: var(--stg-ink, #161a14); }

#page-profile .profile-pattern-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(22, 26, 20, 0);
  color: var(--stg-paper, #ffffff);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

#page-profile .profile-pattern-card:hover .profile-pattern-card__play {
  background: rgba(22, 26, 20, 0.35);
}

#page-profile .profile-pattern-card__info {
  min-width: 0;
}

#page-profile .profile-pattern-card__title {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: var(--fs-small, 0.875rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-profile .profile-pattern-card__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-pattern-card__sub .chip {
  padding: 1px 8px;
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-paper, #ffffff);
  color: var(--stg-ink-2, #38382f);
  font-weight: 500;
}

#page-profile .profile-pattern-card__visibility {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--stg-r-pill, 9999px);
  background: var(--stg-paper, #ffffff);
  color: var(--stg-ink-2, #38382f);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  align-self: start;
  white-space: nowrap;
}

#page-profile .profile-pattern-card__visibility--private {
  background: var(--stg-ink, #161a14);
  color: var(--stg-paper, #ffffff);
}

#page-profile .profile-pattern-card__hover-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 2px;
  z-index: 4;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur-2, 200ms) ease, transform var(--dur-2, 200ms) ease;
}

#page-profile .profile-pattern-card:hover .profile-pattern-card__hover-actions {
  opacity: 1;
  transform: translateY(0);
}

#page-profile .profile-pattern-card__hover-actions .stg-btn--ghost.bw-btn-open,
#page-profile .profile-pattern-card__hover-actions .pattern-card-play {
  display: none;
}

#page-profile .profile-pattern-card__hover-actions .stg-iconbtn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: var(--stg-paper, #ffffff);
}

#page-profile .profile-pattern-card__hover-actions .bw-row__menu {
  right: 0;
  top: calc(100% + 4px);
  z-index: 100;
}

#page-profile .profile-patterns-host .catalog-row:has(.bw-row__menu:not(.hidden)) {
  position: relative;
  z-index: 8;
}

#page-profile .profile-patterns-host .catalog-row .cat-actions {
  z-index: 1;
}

#page-profile .profile-patterns-host .catalog-row .bw-row__menu {
  z-index: 100;
}

#page-profile .profile-patterns-host .pf-pattern-vis-pill--private {
  background: var(--stg-ink, #161a14);
  color: var(--stg-paper, #ffffff);
}

/* ── P3 · Patterns (Browse rows) ──────────────────────────────────── */
#page-profile .profile-feed-card {
  background: var(--stg-paper-2, #fafaf7);
  color: var(--stg-ink, #161a14);
  border: none;
  border-radius: var(--stg-r-xl, 32px);
  box-shadow: var(--stg-lift);
  overflow: hidden;
}

#page-profile .profile-feed-card__head {
  background: transparent;
  border-bottom: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  padding: var(--sp-4, 16px) var(--sp-5, 24px);
}

#page-profile .profile-feed-card__head-title {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stg-ink-3, #6b6b5f);
}

/* Brown inventory card → STG light (beats app.css ~6100+) */
#page-profile .profile-feed-card--patterns-brown {
  background: var(--stg-paper-2, #fafaf7);
  color: var(--stg-ink, #161a14);
  border: none;
  box-shadow: var(--stg-lift);
}

#page-profile .profile-feed-card--patterns-brown .profile-feed-card__head {
  background: transparent;
  border-bottom: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
}

#page-profile .profile-feed-card--patterns-brown .profile-feed-card__head-title {
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-feed-card--patterns-brown .profile-pattern-row {
  background: var(--stg-paper, #ffffff);
  border-bottom-color: var(--stg-border, rgba(22, 26, 20, 0.06));
}

#page-profile .profile-feed-card--patterns-brown .profile-pattern-row:hover {
  background: var(--stg-pop-cream, #f4ecd8);
}

#page-profile .profile-feed-card--patterns-brown .profile-pattern-row__main,
#page-profile .profile-feed-card--patterns-brown .profile-pattern-row__title,
#page-profile .profile-feed-card--patterns-brown .profile-pattern-row__meta {
  color: var(--stg-ink, #161a14);
}

#page-profile .profile-feed-card--patterns-brown .profile-pattern-row__stats--icons {
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-feed-card--patterns-brown .profile-stat-ic .bi {
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-patterns-expand-wrap {
  padding: var(--sp-3, 12px) var(--sp-4, 16px);
  text-align: center;
  border-top: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  background: transparent;
}

#page-profile .profile-pattern-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--sp-3, 12px);
  align-items: center;
  padding: var(--sp-3, 12px) var(--sp-4, 16px);
  margin: 0;
  background: var(--stg-paper, #ffffff);
  border-bottom: 1px solid var(--stg-border, rgba(22, 26, 20, 0.06));
  border-radius: 0;
  transition: background var(--dur-1, 120ms) ease;
}

#page-profile .profile-pattern-row:hover {
  background: var(--stg-pop-cream, #f4ecd8);
}

#page-profile .profile-pattern-row__title {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: var(--fs-body-lg, 1.125rem);
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--stg-ink, #161a14);
}

#page-profile .profile-pattern-row__meta {
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-pattern-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--stg-r-md, 16px);
}

#page-profile .tm-meta-pill {
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink-2, #38382f);
  border: none;
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--stg-r-pill, 9999px);
}

#page-profile .profile-pattern-badge--public {
  background: var(--stg-ink, #161a14);
  color: var(--stg-paper, #ffffff);
}

#page-profile .profile-pattern-badge--private {
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink-2, #38382f);
}

#page-profile .profile-pattern-preview-btn,
#page-profile .profile-pattern-more-btn {
  border: 1px solid var(--stg-border-strong, rgba(22, 26, 20, 0.14));
  background: var(--stg-paper, #ffffff);
  color: var(--stg-ink, #161a14);
  border-radius: var(--stg-r-sm, 8px);
}

#page-profile .profile-pattern-dropdown {
  background: var(--stg-paper, #ffffff);
  border: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
  box-shadow: var(--stg-lift-2);
  color: var(--stg-ink, #161a14);
}


#page-profile .profile-feed-empty {
  color: var(--stg-ink-3, #6b6b5f);
  padding: var(--sp-5, 24px);
}

/* ── P4 · Aside (STG-UI-004) ────────────────────────────────────────── */
#page-profile .profile-aside-card {
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-xl, 32px);
  padding: var(--sp-5, 24px);
  border: none;
  box-shadow: var(--stg-lift);
}

#page-profile .profile-aside-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3, 12px);
  margin-bottom: var(--sp-4, 16px);
}

#page-profile .profile-aside-eyebrow {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-stat-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 12px);
}

#page-profile .profile-stat-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3, 12px);
}

#page-profile .profile-stat-list__k {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  color: var(--stg-ink-2, #38382f);
}

#page-profile .profile-stat-list__v {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: var(--fs-h3, 1.375rem);
  font-weight: 400;
  color: var(--stg-ink, #161a14);
  font-variant-numeric: tabular-nums;
}

#page-profile .pf-liked-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2, 8px);
  list-style: none;
  margin: 0;
  padding: 0;
}

#page-profile .pf-liked-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(22, 26, 20, 0.06);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-1, 120ms) ease, border-color var(--dur-1, 120ms) ease, transform var(--dur-1, 120ms) ease;
}

#page-profile .pf-liked-row:hover,
#page-profile .pf-liked-row:focus-within {
  background: var(--stg-pop-cream, #f4ecd8);
  border-color: rgba(22, 26, 20, 0.12);
  transform: translateY(-1px);
}

#page-profile .pf-liked-row__thumb {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(22, 26, 20, 0.06);
}

#page-profile .pf-liked-row__thumb.tone-mint { background: var(--stg-pop-mint, #b8e6c9); }
#page-profile .pf-liked-row__thumb.tone-sky { background: var(--stg-pop-sky, #b9dee6); }
#page-profile .pf-liked-row__thumb.tone-peach { background: var(--stg-pop-peach, #f6c7b8); }
#page-profile .pf-liked-row__thumb.tone-lavender { background: var(--stg-pop-lavender, #cbb9e0); }
#page-profile .pf-liked-row__thumb.tone-lime { background: var(--stg-accent, #d9f274); }
#page-profile .pf-liked-row__thumb.tone-ink { background: var(--stg-ink, #161a14); }

#page-profile .pf-liked-row__pad-grid {
  position: absolute;
  inset: 22% 18%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  pointer-events: none;
}

#page-profile .pf-liked-row__pad-grid i {
  background: rgba(22, 26, 20, 0.12);
  border-radius: 1px;
}

#page-profile .pf-liked-row__pad-grid i.is-on {
  background: var(--stg-ink, #161a14);
}

#page-profile .pf-liked-row__thumb.tone-ink .pf-liked-row__pad-grid i {
  background: rgba(244, 236, 216, 0.18);
}

#page-profile .pf-liked-row__thumb.tone-ink .pf-liked-row__pad-grid i.is-on {
  background: var(--stg-paper, #ffffff);
}

#page-profile .pf-liked-row__thumb-icon {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 26, 20, 0.72);
  color: var(--stg-paper, #ffffff);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--dur-1, 120ms) ease, transform var(--dur-1, 120ms) ease;
  pointer-events: none;
}

#page-profile .pf-liked-row:hover .pf-liked-row__thumb-icon,
#page-profile .pf-liked-row:focus-within .pf-liked-row__thumb-icon,
#page-profile .pf-liked-row__thumb:focus-visible .pf-liked-row__thumb-icon {
  opacity: 1;
  transform: translateY(0);
}

#page-profile .pf-liked-row__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#page-profile .pf-liked-row__title {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--stg-ink, #161a14);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

#page-profile .pf-liked-row__creator {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.76rem;
  color: var(--stg-ink-3, #6b6b5f);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#page-profile .pf-liked-row__open {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(22, 26, 20, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--stg-ink, #161a14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background var(--dur-1, 120ms) ease, border-color var(--dur-1, 120ms) ease, color var(--dur-1, 120ms) ease;
}

#page-profile .pf-liked-row__open:hover,
#page-profile .pf-liked-row__open:focus-visible {
  background: var(--stg-paper, #ffffff);
  border-color: rgba(22, 26, 20, 0.18);
}

#page-profile .profile-quick-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#page-profile .profile-quick-links__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2, 8px);
  padding: 6px 0;
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  color: var(--stg-ink, #161a14);
  text-decoration: none;
}

#page-profile .profile-quick-links__item:hover {
  color: var(--stg-ink-2, #38382f);
}

#page-profile .profile-side-card,
#page-profile .profile-side-card--stats,
#page-profile .profile-side-card--likes-sidebar {
  background: var(--stg-paper-2, #fafaf7);
  border-radius: var(--stg-r-xl, 32px);
  padding: var(--sp-5, 24px);
  border: none;
  box-shadow: var(--stg-lift);
}

#page-profile .profile-liked-list__btn {
  background: var(--stg-paper, #ffffff);
  border: none;
  border-radius: var(--stg-r-md, 16px);
  color: var(--stg-ink, #161a14);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
}

#page-profile .profile-liked-list__btn:hover {
  background: var(--stg-pop-cream, #f4ecd8);
}

#page-profile .profile-side-card__label {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stg-ink-3, #6b6b5f);
  margin-bottom: var(--sp-4, 16px);
}

#page-profile .profile-stats-num {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--stg-ink, #161a14);
  line-height: 1;
}

#page-profile .profile-stats-cap {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-sidebar__sticky {
  top: 88px;
}

#page-profile .profile-see-all {
  color: var(--stg-ink, #161a14);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── P5 · Bio (STG-UI-004 bio-block) ────────────────────────────────── */
#page-profile .profile-view--bio {
  padding: 0;
}

#page-profile .profile-bio-block {
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-xl, 32px);
  padding: var(--sp-7, 48px);
  margin-bottom: var(--sp-6, 32px);
}

#page-profile .profile-bio-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3, 12px);
  margin-bottom: var(--sp-5, 24px);
}

#page-profile .profile-bio-block__title {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--stg-ink, #161a14);
}

#page-profile .profile-bio-block__meta {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  color: var(--stg-ink-3, #6b6b5f);
  flex: 1 1 100%;
  order: 3;
}

@media (min-width: 640px) {
  #page-profile .profile-bio-block__meta {
    flex: 1 1 auto;
    order: 0;
    text-align: right;
    margin-left: auto;
    padding-left: var(--sp-4, 16px);
  }
}

#page-profile .profile-bio-block__edit {
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
}

#page-profile .profile-bio-block__content {
  margin-bottom: var(--sp-6, 32px);
}

#page-profile .profile-bio-block__text {
  margin: 0 0 var(--sp-4, 16px);
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-body, 1rem);
  line-height: 1.65;
  color: var(--stg-ink-2, #38382f);
  max-width: 60ch;
}

#page-profile .profile-bio-block__text:last-child {
  margin-bottom: 0;
}

#page-profile .profile-bio-block__empty {
  margin: 0;
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-body, 1rem);
  line-height: 1.65;
  color: var(--stg-ink-3, #6b6b5f);
  max-width: 60ch;
}

#page-profile .profile-bio-block__stats {
  padding-top: var(--sp-5, 24px);
  border-top: 1px solid var(--stg-border, rgba(22, 26, 20, 0.08));
}

#page-profile .profile-bio-stat-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 12px);
  max-width: 28rem;
}

#page-profile .profile-bio-stat-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4, 16px);
}

#page-profile .profile-bio-stat-list__k {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  color: var(--stg-ink-2, #38382f);
}

#page-profile .profile-bio-stat-list__v {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  font-weight: 600;
  color: var(--stg-ink, #161a14);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ── P6 · Privacy ───────────────────────────────────────────────────── */
#page-profile .profile-privacy-shell {
  display: grid;
  gap: var(--sp-5, 24px);
}

@media (min-width: 768px) {
  #page-profile .profile-privacy-shell {
    grid-template-columns: 1fr 1fr;
  }
}

#page-profile .profile-privacy-card {
  background: var(--stg-paper-2, #fafaf7);
  border-radius: var(--stg-r-xl, 32px);
  padding: var(--sp-6, 32px);
  border: none;
  box-shadow: var(--stg-lift);
}

#page-profile .profile-privacy-card h3 {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: var(--fs-h3, 1.375rem);
  font-weight: 400;
  color: var(--stg-ink, #161a14);
  margin: 0 0 var(--sp-3, 12px);
}

#page-profile .profile-privacy-desc {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-small, 0.875rem);
  line-height: 1.55;
  color: var(--stg-ink-2, #38382f);
  margin-bottom: var(--sp-4, 16px);
}

#page-profile .profile-privacy-card--danger {
  background: var(--stg-pop-peach, #f6c7b8);
  background: color-mix(in srgb, var(--stg-pop-peach, #f6c7b8) 35%, var(--stg-paper-2, #fafaf7));
}

#page-profile .profile-privacy-card--danger .danger-btn {
  border-color: var(--stg-ink-2, #38382f);
  color: var(--stg-ink, #161a14);
}

/* ── Playlists — STG-UI-010 Variant A (grid cards) ───────────────────── */
#page-profile .profile-playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-4, 16px);
}

@media (min-width: 900px) {
  #page-profile #profilePlaylistsList.profile-playlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#page-profile .profile-pl-block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2, 8px);
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

#page-profile .profile-pl-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 12px);
  padding: var(--sp-3, 12px);
  background: var(--stg-paper, #ffffff);
  border-radius: var(--stg-r-xl, 32px);
  box-shadow: var(--stg-lift);
  color: var(--stg-ink, #161a14);
  min-width: 0;
  transition: background var(--dur-2, 240ms) var(--ease), transform var(--dur-2, 240ms) var(--ease), box-shadow var(--dur-2, 240ms) var(--ease);
}

#page-profile .profile-pl-card:hover {
  background: var(--stg-pop-cream, #f4ecd8);
  transform: translateY(-2px);
  box-shadow: var(--stg-lift-2);
}

#page-profile .profile-pl-card--interactive {
  cursor: pointer;
}

#page-profile .profile-pl-card__thumb {
  aspect-ratio: 1 / 1;
  border-radius: var(--stg-r-lg, 24px);
  position: relative;
  overflow: hidden;
  width: 100%;
}

#page-profile .profile-pl-card__thumb.tone-mint { background: var(--stg-pop-mint, #b8e6c9); }
#page-profile .profile-pl-card__thumb.tone-sky { background: var(--stg-pop-sky, #b9dee6); }
#page-profile .profile-pl-card__thumb.tone-peach { background: var(--stg-pop-peach, #f6c7b8); }
#page-profile .profile-pl-card__thumb.tone-lavender { background: var(--stg-pop-lavender, #cbb9e0); }
#page-profile .profile-pl-card__thumb.tone-lime { background: var(--stg-accent, #d9f274); }

#page-profile .profile-pl-card__mosaic {
  position: absolute;
  inset: 14% 12%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  max-width: none;
  width: auto;
  height: auto;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

#page-profile .profile-pl-mosaic-cell {
  border-radius: 2px;
  min-height: 0;
  min-width: 0;
}

#page-profile .profile-pl-mosaic-cell--icon {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.45);
  color: var(--stg-ink-2, #38382f);
  font-size: 1.25rem;
}

#page-profile .profile-pl-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2, 8px);
  align-items: flex-start;
  text-align: left;
  padding: 0 var(--sp-1, 4px);
  width: 100%;
}

#page-profile .profile-pl-card__title {
  margin: 0;
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: var(--fs-body-lg, 1.125rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--stg-ink, #161a14);
  text-transform: none;
}

#page-profile .profile-pl-card__meta {
  margin: 0;
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--stg-ink-3, #6b6b5f);
}

#page-profile .profile-pl-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2, 8px);
  width: 100%;
}

#page-profile .profile-pl-card__toggle,
#page-profile .profile-pl-card__link-full {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: var(--fs-caption, 0.75rem);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--stg-r-pill, 9999px);
  border: none;
  background: var(--stg-paper-deep, #f3f2ee);
  color: var(--stg-ink, #161a14);
  cursor: pointer;
  transition: background var(--dur-1, 120ms) ease;
}

#page-profile .profile-pl-card__toggle:hover,
#page-profile .profile-pl-card__link-full:hover {
  background: var(--stg-paper, #ffffff);
}

#page-profile .profile-pl-card__drawer {
  width: 100%;
  margin-top: var(--sp-1, 4px);
  padding: var(--sp-3, 12px);
  background: var(--stg-paper-deep, #f3f2ee);
  border-radius: var(--stg-r-lg, 24px);
}

#page-profile .profile-pl-card__drawer.hidden {
  display: none !important;
}

/* ── Playlists + forum (light STG pass) ───────────────────────────────── */
#page-profile .profile-playlists-title,
#page-profile .profile-sub-page__title,
#page-profile .profile-section-title {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-weight: 400;
  color: var(--stg-ink, #161a14);
  text-transform: none;
}

#page-profile .profile-forum-activity {
  background: var(--stg-paper-2, #fafaf7);
  border: none;
  border-radius: var(--stg-r-lg, 24px);
  box-shadow: var(--stg-lift);
}

#page-profile .profile-forum-activity__title {
  color: var(--stg-ink, #161a14);
}

#page-profile .profile-forum-thread-link {
  color: var(--stg-ink, #161a14);
}

#page-profile .profile-forum-thread-link:hover {
  color: var(--stg-ink-2, #38382f);
}

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #page-profile .profile-viewing-banner {
    align-items: flex-start;
    padding: 12px 16px;
  }

  #page-profile .profile-viewing-banner__report,
  #page-profile .profile-viewing-banner__link {
    width: 100%;
  }

  #page-profile .profile-hero {
    padding: 28px 24px;
  }

  #page-profile .profile-hero__left {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  #page-profile .profile-hero__actions {
    width: 100%;
  }

  #page-profile .profile-page-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 24px;
  }

  #page-profile .profile-page-switch__btn {
    width: 100%;
    justify-content: center;
  }

  #page-profile .profile-page-switch__btn--privacy {
    grid-column: 1 / -1;
  }

  #page-profile .profile-section-row__end {
    width: 100%;
    justify-content: space-between;
  }

  #page-profile .profile-visibility-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  #page-profile .profile-visibility-tabs button {
    min-width: 0;
    padding: 8px 10px;
    text-align: center;
  }

  #page-profile .profile-aside-card {
    padding: 20px;
    border-radius: 24px;
  }
}

@media (max-width: 390px) {
  #page-profile .profile-container {
    padding: var(--sp-4, 16px) var(--sp-3, 12px) var(--sp-7, 48px);
  }

  #page-profile .profile-hero {
    padding: 22px 18px;
    border-radius: 28px;
  }

  #page-profile .profile-hero__avatar {
    width: 72px;
    height: 72px;
    font-size: 1.75rem;
  }

  #page-profile .profile-hero__pseudo {
    font-size: 1.9rem;
  }

  #page-profile .profile-hero__actions {
    gap: 6px;
  }

  #page-profile .profile-hero__actions .tm-profile-btn {
    width: 100%;
    justify-content: center;
  }

  #page-profile .profile-page-switch {
    grid-template-columns: 1fr;
  }

  #page-profile .profile-page-switch__btn {
    padding: 6px 12px;
    font-size: var(--fs-caption, 0.75rem);
  }

  #page-profile .profile-tab-nowrap {
    white-space: normal;
    justify-content: center;
  }

  #page-profile .profile-section-row__end {
    align-items: stretch;
    gap: 6px;
  }

  #page-profile .profile-section-meta {
    width: 100%;
  }

  #page-profile .profile-visibility-tabs {
    grid-template-columns: 1fr;
  }

  #page-profile .profile-aside-card {
    padding: 18px 16px;
  }

  #page-profile .profile-stat-list__row {
    gap: 8px;
  }

  #page-profile .pf-liked-row {
    grid-template-columns: 40px minmax(0, 1fr) 28px;
    padding: 8px 10px;
    gap: 8px;
  }

  #page-profile .pf-liked-row__thumb {
    width: 40px;
    height: 40px;
  }

  #page-profile .pf-liked-row__open {
    width: 28px;
    height: 28px;
  }

  #page-profile .profile-pattern-row {
    grid-template-columns: 48px 1fr;
    padding: var(--sp-2, 8px);
  }

  #page-profile .profile-pattern-row-actions {
    grid-column: 1 / -1;
  }
}

/* ── Pattern requests inbox ─────────────────────────────────────────── */
#page-profile .profile-requests-lead {
  color: var(--stg-ink-2, #5c5c5c);
  margin: 0 0 var(--sp-5, 24px);
  max-width: 52ch;
}
#page-profile .profile-requests-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--stg-accent, #e85d04);
  color: #fff;
  vertical-align: middle;
}
#page-profile .profile-req-section {
  margin-bottom: var(--sp-6, 32px);
}
#page-profile .profile-req-section__title {
  font-family: var(--font-ui, "Inter Tight", sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stg-ink-3, #888);
  margin: 0 0 var(--sp-3, 12px);
}
#page-profile .profile-req-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3, 12px);
}
#page-profile .profile-req-row {
  border: 1px solid var(--stg-border, rgba(0, 0, 0, 0.08));
  border-radius: var(--stg-r-md, 12px);
  padding: var(--sp-4, 16px);
  background: var(--stg-surface, #fff);
}
#page-profile .profile-req-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3, 12px);
  flex-wrap: wrap;
}
#page-profile .profile-req-row__title {
  font-size: 1rem;
}
#page-profile .profile-req-row__sub,
#page-profile .profile-req-row__meta,
#page-profile .profile-req-row__msg,
#page-profile .profile-req-row__hint {
  margin: var(--sp-2, 8px) 0 0;
  color: var(--stg-ink-2, #5c5c5c);
  font-size: 0.875rem;
}
#page-profile .profile-req-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--sp-3, 12px);
}
#page-profile .profile-req-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
#page-profile .profile-req-status--pending {
  background: rgba(232, 93, 4, 0.12);
  color: var(--stg-accent, #e85d04);
}
#page-profile .profile-req-status--ok {
  background: rgba(34, 139, 87, 0.12);
  color: #1f7a4d;
}
#page-profile .profile-req-status--no {
  background: rgba(120, 120, 120, 0.12);
  color: var(--stg-ink-3, #888);
}
#page-profile .profile-req-empty,
#page-profile .profile-req-loading {
  color: var(--stg-ink-3, #888);
  font-size: 0.875rem;
}

/* ── Contribution preview modal (cpreview) — dark modal-panel context ── */
.cpreview-panel { padding: 0; }
.cpreview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.cpreview-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #fff);
}
.cpreview-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.375rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  padding: 2px 8px;
  border-radius: 4px;
}
.cpreview-close:hover { color: #fff; }
.cpreview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}
.cpreview-meta strong { color: rgba(255, 255, 255, 0.8); margin-right: 4px; }
.cpreview-grid {
  padding: 0.875rem 1.25rem;
  max-height: 240px;
  overflow-y: auto;
}
.cpreview-track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.cpreview-track__name {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  width: 54px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.cpreview-steps { display: flex; gap: 2px; }
.cpreview-step {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  display: inline-block;
}
.cpreview-step.is-on { background: var(--accent, #ffd700); }
.cpreview-empty {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
}
.cpreview-msg {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.875rem;
}
.cpreview-msg strong { display: block; margin-bottom: 4px; color: rgba(255, 255, 255, 0.75); }
.cpreview-msg p { margin: 0; color: rgba(255, 255, 255, 0.55); }
.cpreview-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
