:root {
  /* Aliased to the shared dark-theme tokens (cosmic-ref-theme.css) rather
     than hardcoded — these had been flattened to solid black/white by an
     earlier pass, making 27+ text elements render as black-on-dark. */
  --profile-bg: var(--bg-primary);
  --profile-surface: var(--bg-card);
  --profile-navy: var(--bg-secondary);
  --profile-gold: var(--accent-gold);
  /* Eyebrow labels / emphasis text (.profile-eyebrow, 23 uses) — a gold
     accent, not plain white, so it keeps reading as an accent rather than
     losing its distinction from primary body text. */
  --profile-gold-deep: var(--accent-gold);
  --profile-gold-pale: var(--status-excellent-soft);
  --profile-ink: var(--text-primary);
  --profile-muted: var(--text-secondary);
  --profile-border: var(--border-color);
  --profile-shadow: 0 16px 38px rgba(8, 12, 40, 0.45);
  --profile-radius: 20px;
}

html {
  scroll-behavior: smooth;
}

body.profile-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text-primary);
  background: var(--bg-primary);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.profile-page *,
.profile-page *::before,
.profile-page *::after {
  box-sizing: border-box;
}

.profile-page a {
  color: inherit;
  text-decoration: none;
}

.profile-page button,
.profile-page input,
.profile-page select {
  font: inherit;
}

.profile-app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(560px, 1fr) 310px;
  width: min(100%, 1720px);
  min-height: 100vh;
  margin: 0 auto;
  border-inline: 1px solid rgba(120, 90, 70, 0.18);
  background-color: var(--bg-glass);
}

.profile-app-shell::before,
.profile-app-shell::after {
  position: fixed;
  z-index: -1;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(120, 90, 70, 0.18);
  border-radius: 50%;
  content: "";
}

.profile-app-shell::before {
  top: 18px;
  left: 18px;
}

.profile-app-shell::after {
  right: 18px;
  bottom: 18px;
}

.profile-left-sidebar,
.profile-right-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #E5D9C8 transparent;
}

.profile-left-sidebar {
  grid-column: 1;
  padding: 30px 24px 34px;
  border-right: 1px solid var(--profile-border);
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.profile-sidebar-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  color: var(--text-primary);
}

.profile-brand img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.profile-brand span {
  display: grid;
  gap: 2px;
}

.profile-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
}

.profile-brand small {
  color: var(--profile-gold-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  letter-spacing: 0.22em;
}

.profile-sidebar-close {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--profile-border);
  border-radius: 50%;
  color: var(--text-primary);
  background: var(--bg-card);
  font-size: 25px;
  cursor: pointer;
}

.profile-nav {
  display: grid;
  gap: 18px;
  margin: 34px 0 28px;
}

.profile-nav-group {
  display: grid;
  gap: 4px;
}

.profile-nav-group + .profile-nav-group {
  padding-top: 15px;
  border-top: 1px solid rgba(120, 90, 70, 0.18);
}

.profile-nav-group-label {
  margin: 0 0 5px;
  padding: 0 14px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.profile-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-primary);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.profile-nav a > span {
  display: grid;
  place-items: center;
  width: 24px;
  flex: 0 0 24px;
  color: var(--text-primary);
  font-size: 21px;
}

.profile-nav a:hover,
.profile-nav a:focus-visible {
  transform: translateX(3px);
  border-color: var(--profile-border);
  color: var(--profile-gold-deep);
  background: var(--bg-glass);
}

.profile-nav-submenu {
  display: grid;
  gap: 2px;
  margin: 6px 0 0 20px;
  padding-left: 10px;
  border-left: 1px solid rgba(120, 90, 70, 0.18);
}

.profile-nav-submenu a {
  min-height: 41px;
  padding-inline: 11px;
  border-radius: 11px;
  color: var(--text-primary);
  font-size: 12.5px;
}

.profile-nav-submenu a > span {
  width: 20px;
  flex-basis: 20px;
  font-size: 16px;
}

.profile-nav a.is-active {
  color: var(--profile-gold-deep);
  background: var(--bg-status-success);
}

.profile-nav a.is-active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -1px;
  width: 3px;
  border-radius: 2px;
  background: var(--profile-gold);
  content: "";
}

.profile-nav-signout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(120, 90, 70, 0.18);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}

.profile-nav-signout:hover,
.profile-nav-signout:focus-visible {
  background: var(--bg-card);
  outline: none;
}

.profile-nav a.is-active > span {
  color: var(--profile-gold-deep);
}

.profile-sidebar-card,
.profile-card {
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius);
  background-color: var(--bg-glass);
  box-shadow: var(--profile-shadow);
}

.profile-sidebar-card {
  padding: 22px;
}

.profile-support-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.profile-mini-emblem,
.profile-avatar,
.profile-chart-emblem {
  background-color: var(--profile-navy);
}

.profile-mini-emblem {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(58, 42, 18, 0.12);
}

.profile-mini-emblem::before,
.profile-mini-emblem::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--profile-gold);
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.profile-mini-emblem::before {
  width: 27px;
  height: 2px;
}

.profile-mini-emblem::after {
  width: 2px;
  height: 27px;
}

.profile-support-card strong {
  display: block;
  margin: 2px 0 7px;
  color: var(--text-primary);
  font-size: 14px;
}

.profile-support-card p,
.profile-privacy-card > p:not(.profile-eyebrow) {
  margin: 0;
  color: var(--profile-muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.profile-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text-primary);
  background: var(--bg-glass);
  font-size: 12px;
  font-weight: 700;
}

.profile-online-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2F9E66;
  box-shadow: 0 0 0 3px rgba(47, 158, 102, 0.22);
}

.profile-privacy-card {
  position: relative;
  overflow: hidden;
}

.profile-privacy-card::after {
  position: absolute;
  top: -42px;
  right: -46px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(120, 90, 70, 0.18);
  border-radius: 50%;
  content: "";
}

.profile-eyebrow {
  margin: 0 0 8px;
  color: var(--profile-gold-deep);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.profile-privacy-card h2 {
  margin: 0 0 9px;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
}

.profile-privacy-card ul {
  display: grid;
  gap: 14px;
  margin: 19px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--profile-border);
  list-style: none;
}

.profile-privacy-card li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text-secondary);
  font-size: 12px;
}

.profile-privacy-card li span {
  width: 20px;
  color: var(--profile-gold-deep);
  font-size: 17px;
}

.profile-center {
  position: relative;
  grid-column: 2;
  min-width: 0;
  padding: 38px 28px 46px;
  background-color: var(--bg-glass);
}

.profile-center::before {
  position: absolute;
  top: -50px;
  right: -40px;
  z-index: 0;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  opacity: 0.08;
  background-image: none;
  background-position: center;
  background-size: cover;
  content: "";
  pointer-events: none;
  mix-blend-mode: multiply;
}

.profile-center > * {
  position: relative;
  z-index: 1;
}

.profile-page-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 105px;
  padding: 4px 14px 20px;
}

.profile-page-header h1 {
  margin: 0;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 3vw, 48px);
  font-weight: 500;
  line-height: 1.05;
}

.profile-page-header > div > p:last-child {
  margin: 10px 0 0;
  color: var(--profile-muted);
  font-size: 14px;
}

.profile-header-spark {
  margin: 14px 0 0 auto;
  color: var(--profile-gold);
  font-size: 23px;
}

.profile-mobile-nav-button {
  display: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--profile-border);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--bg-card);
  font-size: 20px;
  cursor: pointer;
}

.profile-card {
  padding: 24px;
}

.profile-identity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 182px;
  padding: 28px;
}

.profile-avatar-wrap {
  position: relative;
  width: 112px;
  height: 112px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border: 1px solid rgba(120, 90, 70, 0.18);
  border-radius: 50%;
  color: #4A1B0C;
  background-position: center;
  background-size: cover;
  box-shadow: 0 14px 26px rgba(58, 42, 18, 0.12);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
}

.profile-avatar.has-photo {
  color: transparent;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-button {
  position: absolute;
  right: -2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 2px solid var(--profile-surface);
  border-radius: 50%;
  color: var(--profile-gold-deep);
  background: var(--profile-gold-pale);
  box-shadow: 0 6px 18px rgba(58, 42, 18, 0.08);
  cursor: pointer;
  transition: transform 180ms ease;
}

.profile-avatar-button:hover,
.profile-avatar-button:focus-visible {
  transform: translateY(-2px);
}

.profile-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.profile-name-line h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 500;
}

.profile-member-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--profile-gold-deep);
  background: var(--bg-glass);
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-identity-copy > p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 7px 0;
  color: var(--profile-muted);
  font-size: 13px;
}

.profile-identity-copy > p > span:first-child {
  display: grid;
  place-items: center;
  width: 18px;
  color: var(--text-secondary);
  font-size: 16px;
}

.profile-outline-button,
.profile-gold-button,
.profile-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 17px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.profile-outline-button {
  border: 1px solid rgba(120, 90, 70, 0.18);
  color: var(--profile-gold-deep);
  background: var(--bg-card);
}

.profile-gold-button {
  border: 1px solid #712B13;
  color: #ffffff;
  background: linear-gradient(135deg, #8C2A3A, #712B13);
  box-shadow: 0 9px 20px rgba(58, 42, 18, 0.12);
}

.profile-text-button {
  border: 1px solid transparent;
  color: var(--profile-muted);
  background: transparent;
}

.profile-outline-button:hover,
.profile-outline-button:focus-visible,
.profile-gold-button:hover,
.profile-gold-button:focus-visible,
.profile-text-button:hover,
.profile-text-button:focus-visible {
  transform: translateY(-2px);
}

.profile-outline-button:hover,
.profile-outline-button:focus-visible {
  background: var(--bg-glass);
  box-shadow: 0 8px 18px rgba(58, 42, 18, 0.08);
}

.profile-gold-button:hover,
.profile-gold-button:focus-visible {
  box-shadow: 0 12px 24px rgba(58, 42, 18, 0.12);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius);
  background: var(--bg-glass);
  box-shadow: var(--profile-shadow);
}

.profile-stat-card {
  position: relative;
  padding: 24px 14px;
  text-align: center;
  transition: transform 180ms ease, background-color 180ms ease;
}

.profile-stat-card + .profile-stat-card::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 1px;
  background: var(--profile-border);
  content: "";
}

.profile-stat-card:hover {
  z-index: 1;
  transform: translateY(-3px);
  background: var(--bg-glass);
}

.profile-stat-card > span {
  display: block;
  height: 28px;
  color: var(--profile-gold-deep);
  font-size: 26px;
}

.profile-stat-card > strong {
  display: block;
  margin: 5px 0 2px;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 500;
}

.profile-stat-card h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
}

.profile-stat-card p {
  margin: 6px 0 0;
  color: var(--profile-muted);
  font-size: 0.75rem;
}

.profile-subscription-card,
.profile-membership-details {
  margin-top: 18px;
}

.profile-subscription-card {
  overflow: hidden;
  border-color: rgba(186, 117, 23, 0.35);
  background:
    radial-gradient(circle at 92% 0%, rgba(232, 163, 61, 0.18), transparent 13rem),
    linear-gradient(135deg, #FFFDF8, #F7F0E6);
  box-shadow: 0 14px 32px rgba(58, 42, 18, 0.12);
}

.profile-subscription-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.profile-subscription-topline .profile-eyebrow,
.profile-subscription-topline h2,
.profile-subscription-status,
.profile-subscription-date {
  color: #ffffff;
}

.profile-subscription-topline h2 {
  margin: 5px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 4vw, 31px);
  letter-spacing: 0.03em;
}

.profile-subscription-status {
  margin: 0;
  color: #854F0B;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-subscription-card .profile-outline-button {
  flex: 0 0 auto;
  color: #ffffff;
  border-color: #712B13;
  background: var(--bg-glass);
}

.profile-subscription-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 23px 0 16px;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  background: var(--bg-glass);
}

.profile-subscription-highlights div {
  min-width: 0;
  padding: 13px 11px;
}

.profile-subscription-highlights div + div {
  border-left: 1px solid var(--border-color);
}

.profile-subscription-highlights strong,
.profile-subscription-highlights span {
  display: block;
  overflow-wrap: anywhere;
}

.profile-subscription-highlights strong {
  color: #ffffff;
  font-size: 15px;
}

.profile-subscription-highlights span {
  margin-top: 4px;
  color: #854F0B;
  font-size: 0.75rem;
  line-height: 1.35;
}

.profile-subscription-date {
  margin: 0;
  color: #854F0B;
  font-size: 12px;
}

.profile-membership-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.profile-membership-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--profile-border);
  border-right: 0;
  border-bottom: 0;
}

.profile-membership-facts div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--profile-border);
  border-bottom: 1px solid var(--profile-border);
}

.profile-membership-facts dt {
  margin-bottom: 5px;
  color: var(--profile-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-membership-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.profile-active-benefits {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--profile-border);
}

.profile-active-benefits h3 {
  margin: 0 0 10px;
  color: #4A1B0C;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.profile-active-benefits ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-active-benefits li {
  padding: 6px 9px;
  border: 1px solid rgba(120, 90, 70, 0.18);
  border-radius: 999px;
  color: #6B5A44;
  background: var(--bg-status-success);
  font-size: 0.75rem;
}

.profile-payment-list,
.profile-purchase-list {
  display: grid;
}

.profile-purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--profile-border);
}

.profile-purchase-row:first-child { padding-top: 0; }
.profile-purchase-row:last-child { padding-bottom: 0; border-bottom: 0; }
.profile-purchase-row div { display: grid; gap: 4px; min-width: 0; }
.profile-purchase-row strong { overflow-wrap: anywhere; color: var(--text-primary); font-size: 13px; }
.profile-purchase-row span { color: var(--profile-muted); font-size: 0.75rem; }
.profile-purchase-row b { flex: 0 0 auto; color: var(--profile-gold-deep); font-size: 14px; }

.profile-chat-wallet {
  display: grid;
  gap: 26px;
}

.profile-wallet-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 16px;
}

.profile-wallet-balance {
  display: grid;
  gap: 8px;
  min-height: 170px;
  padding: 28px;
  border: 1px solid rgba(186, 117, 23, 0.35);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 18%, rgba(232, 163, 61, 0.30), transparent 34%),
    linear-gradient(135deg, #8C2A3A, #712B13);
  color: var(--text-primary);
  box-shadow: 0 18px 44px rgba(58, 42, 18, 0.12);
}

.profile-wallet-balance > span {
  color: #FAECE7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.profile-wallet-balance strong {
  align-self: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 500;
}

.profile-wallet-balance strong b {
  color: #FAC775;
  font-size: 1.35em;
}

.profile-wallet-balance small {
  color: var(--text-secondary);
}

.profile-wallet-buy-more {
  justify-self: start;
  margin-top: .35rem;
  border-color: rgba(250, 236, 231, 0.55);
  background: var(--accent-gold);
  color: #FAECE7;
  font-weight: 800;
}

.profile-wallet-buy-more:hover,
.profile-wallet-buy-more:focus-visible {
  filter: brightness(1.05);
}

.profile-wallet-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-wallet-totals div {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--profile-line);
  border-radius: 18px;
  background: var(--profile-cream);
}

.profile-wallet-totals dt {
  color: var(--profile-muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-wallet-totals dd {
  margin: 0;
  color: var(--text-secondary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
}

.profile-wallet-packs,
.profile-wallet-ledger {
  display: grid;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--profile-line);
}

.profile-wallet-packs h3,
.profile-wallet-ledger h3 {
  margin: 0;
  color: var(--text-primary);
}

.profile-wallet-packs p,
.profile-wallet-ledger-heading span {
  margin: 5px 0 0;
  color: var(--profile-muted);
  font-size: 12px;
}

.profile-wallet-pack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-wallet-pack {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(120, 90, 70, 0.18);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-primary);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.profile-wallet-pack:hover,
.profile-wallet-pack:focus-visible {
  border-color: var(--profile-gold-deep);
  box-shadow: 0 12px 28px rgba(58, 42, 18, 0.12);
  transform: translateY(-2px);
}

.profile-wallet-pack:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.profile-wallet-buy-status {
  margin: 0;
  min-height: 1.25em;
  color: var(--profile-muted);
  font-size: 13px;
}

.profile-wallet-buy-status.is-error {
  color: #C0392B;
}

.profile-wallet-buy-status.is-success {
  color: #2F9E66;
}

/* Buy Minutes modal (Step 7 — Razorpay Checkout) */
.profile-buy-minutes-modal {
  width: min(28rem, calc(100vw - 2rem));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: 0 28px 80px rgba(58, 42, 18, 0.28);
}

.profile-buy-minutes-modal::backdrop {
  background: rgba(58, 42, 18, 0.45);
  backdrop-filter: blur(3px);
}

.profile-buy-minutes-card {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 1.35rem 1.4rem 1.4rem;
  border: 1px solid rgba(120, 90, 70, 0.18);
  border-radius: 20px;
  background: var(--bg-card-gradient);
  color: var(--text-primary);
}

.profile-buy-minutes-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.profile-buy-minutes-header h3 {
  margin: .2rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.profile-buy-minutes-close {
  appearance: none;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(232, 214, 184, 0.45);
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.profile-buy-minutes-lead {
  margin: 0;
  color: var(--profile-muted);
  font-size: .95rem;
  line-height: 1.55;
}

.profile-buy-minutes-summary {
  display: grid;
  gap: .55rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: var(--bg-glass);
  border: 1px solid rgba(120, 90, 70, 0.18);
}

.profile-buy-minutes-summary div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: .92rem;
}

.profile-buy-minutes-summary-minutes {
  padding-bottom: .35rem;
  margin-bottom: .15rem;
  border-bottom: 1px solid rgba(120, 90, 70, 0.18);
}

.profile-buy-minutes-summary-minutes strong {
  font-size: 1.12rem;
  letter-spacing: .01em;
}

.profile-buy-minutes-summary span {
  color: var(--profile-muted);
}

.profile-buy-minutes-summary strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.profile-buy-minutes-summary .is-final {
  padding-top: .35rem;
  margin-top: .1rem;
  border-top: 1px solid rgba(120, 90, 70, 0.18);
  font-weight: 700;
}

.profile-buy-minutes-summary .is-final strong {
  font-size: 1.05rem;
  color: var(--text-primary);
}

.profile-buy-minutes-summary .is-save {
  color: var(--text-primary);
}

.profile-buy-minutes-points {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--profile-muted);
  font-size: .88rem;
  line-height: 1.55;
}

.profile-buy-minutes-status {
  margin: 0;
  min-height: 1.25em;
  color: var(--profile-muted);
  font-size: .9rem;
}

.profile-buy-minutes-status.is-error {
  color: #C0392B;
}

.profile-buy-minutes-status.is-success {
  color: #2F9E66;
}

.profile-buy-minutes-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
}

@media (max-width: 780px) {
  .profile-wallet-pack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.profile-wallet-pack strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.profile-wallet-pack span {
  color: var(--profile-gold-deep);
  font-weight: 800;
}

.profile-wallet-pack small {
  color: var(--profile-muted);
}

.profile-wallet-ledger-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.profile-wallet-transactions {
  display: grid;
}

.profile-wallet-transaction {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--profile-line);
}

.profile-wallet-transaction:last-child {
  border-bottom: 0;
}

.profile-wallet-transaction-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--profile-gold-deep);
  font-weight: 900;
}

.profile-wallet-transaction-copy {
  display: grid;
  gap: 4px;
}

.profile-wallet-transaction-copy strong {
  color: var(--text-secondary);
  font-size: 13px;
}

.profile-wallet-transaction-copy span,
.profile-wallet-transaction-amount small {
  color: var(--profile-muted);
  font-size: 0.75rem;
}

.profile-wallet-transaction-amount {
  display: grid;
  gap: 3px;
  justify-items: end;
  color: var(--text-primary);
  font-weight: 900;
}

.profile-wallet-transaction.is-debit .profile-wallet-transaction-amount {
  color: var(--text-primary);
}

.profile-wallet-policy {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--profile-gold);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.65;
}

.profile-details-card,
.profile-astrology-card,
.profile-history-card {
  margin-top: 18px;
}

.profile-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 21px;
}

.profile-section-heading h2,
.profile-security-card h2,
.profile-help-card h2 {
  margin: 0;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
}

.profile-section-heading > div > p:last-child {
  margin: 6px 0 0;
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.55;
}

.profile-section-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--profile-border);
  border-radius: 50%;
  color: var(--profile-gold-deep);
  background: var(--bg-glass);
  font-size: 19px;
}

#profile-details-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.profile-field--wide {
  grid-column: 1 / -1;
}

.profile-field > span {
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-field input,
.profile-field select {
  width: 100%;
  height: 47px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid rgba(120, 90, 70, 0.18);
  border-radius: 11px;
  outline: none;
  color: var(--text-primary);
  background: var(--bg-glass);
  font-size: 13px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.profile-field input:focus,
.profile-field select:focus {
  border-color: #8C2A3A;
  box-shadow: 0 0 0 3px rgba(140, 42, 58, 0.18);
}

#profile-details-fields:disabled .profile-field input,
#profile-details-fields:disabled .profile-field select {
  color: var(--text-primary);
  background: var(--bg-glass);
  cursor: default;
  opacity: 1;
}

.profile-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--profile-border);
}

.profile-form-actions[hidden] {
  display: none;
}

.profile-form-status,
.profile-action-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--profile-gold-deep);
  font-size: 0.75rem;
  text-align: right;
}

.profile-astrology-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.profile-chart-emblem {
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border: 1px solid rgba(186, 117, 23, 0.35);
  border-radius: 50%;
  background: var(--bg-glass);
}

.profile-chart-emblem img {
  width: 126px;
  height: 126px;
  object-fit: cover;
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.profile-astro-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--profile-border);
  border-left: 1px solid var(--profile-border);
}

.profile-astro-facts div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--profile-border);
  border-bottom: 1px solid var(--profile-border);
}

.profile-astro-facts dt {
  margin-bottom: 4px;
  color: var(--profile-muted);
  font-size: 0.75rem;
}

.profile-astro-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

.profile-life-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px;
  border-left: 3px solid var(--profile-gold);
  border-radius: 0 12px 12px 0;
  background: var(--bg-glass);
}

.profile-life-summary > span {
  color: var(--profile-gold-deep);
  font-size: 20px;
}

.profile-life-summary h3 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 500;
}

.profile-life-summary p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.profile-horoscope-button {
  width: max-content;
  margin: 20px 0 0 auto;
}

.profile-section-heading--row {
  align-items: flex-end;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--profile-border);
}

.profile-section-heading--row > a {
  color: var(--profile-gold-deep);
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-empty-state {
  display: grid;
  place-items: center;
  padding: 28px 16px 14px;
  text-align: center;
}

.profile-empty-state > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  border: 1px solid var(--profile-border);
  border-radius: 50%;
  color: var(--profile-gold-deep);
  background: var(--bg-glass);
  font-size: 24px;
}

.profile-empty-state h3 {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.profile-empty-state p {
  max-width: 480px;
  margin: 0 0 17px;
  color: var(--profile-muted);
  font-size: 0.75rem;
  line-height: 1.65;
}

.profile-empty-state--compact {
  grid-template-columns: auto minmax(0, 1fr) auto;
  place-items: center start;
  gap: 14px;
  padding: 6px 0 0;
  text-align: left;
}

.profile-empty-state--compact > span {
  margin: 0;
}

.profile-empty-state--compact p {
  margin: 0;
}

.profile-assurance {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 28px 10px 4px;
  color: var(--profile-muted);
  text-align: center;
}

.profile-assurance > span {
  color: var(--profile-gold-deep);
  font-size: 19px;
}

.profile-assurance p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.7;
}

.profile-right-sidebar {
  grid-column: 3;
  padding: 38px 22px 32px;
  border-left: 1px solid var(--profile-border);
  background-color: var(--bg-glass);
}

.profile-right-sidebar > * + * {
  margin-top: 18px;
}

.profile-right-sidebar .profile-card {
  padding: 22px;
}

.profile-security-card h2,
.profile-help-card h2 {
  margin-bottom: 14px;
  font-size: 21px;
}

.profile-settings-list {
  display: grid;
}

.profile-settings-list button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 53px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--profile-border);
  color: var(--text-primary);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.profile-settings-list button:last-child {
  border-bottom: 0;
}

.profile-settings-list button:hover,
.profile-settings-list button:focus-visible {
  transform: translateX(3px);
  color: var(--profile-gold-deep);
}

.profile-settings-list button > span {
  color: var(--text-primary);
  font-size: 18px;
}

.profile-settings-list button strong {
  font-size: 12px;
  font-weight: 700;
}

.profile-settings-list button i {
  color: var(--profile-muted);
  font-size: 21px;
  font-style: normal;
}

.profile-settings-list button.is-danger {
  color: #C0392B;
}

.profile-settings-list button.is-danger > span {
  color: #C0392B;
}

.profile-action-status {
  text-align: left;
  line-height: 1.5;
}

.profile-quote-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 228px;
  overflow: hidden;
  text-align: center;
}

.profile-quote-card::before,
.profile-quote-card::after {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(186, 117, 23, 0.30);
  content: "";
}

.profile-quote-card::before {
  top: 9px;
  left: 9px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.profile-quote-card::after {
  right: 9px;
  bottom: 9px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.profile-quote-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.profile-quote-card p {
  margin: 10px 0;
  color: var(--text-secondary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.5;
}

.profile-quote-card > span {
  color: var(--profile-gold-deep);
  font-size: 17px;
}

.profile-help-card > p:not(.profile-eyebrow) {
  margin: 0 0 17px;
  color: var(--profile-muted);
  font-size: 12px;
  line-height: 1.65;
}

.profile-help-card > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-help-link {
  color: var(--profile-gold-deep);
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  border: 0;
  background: rgba(58, 42, 18, 0.45);
  cursor: pointer;
}

@media (max-width: 1320px) {
  .profile-app-shell {
    grid-template-columns: 270px minmax(520px, 1fr) 286px;
  }

  .profile-left-sidebar {
    padding-inline: 18px;
  }

  .profile-brand img {
    width: 56px;
    height: 56px;
  }

  .profile-brand strong {
    font-size: 24px;
  }

  .profile-center {
    padding-inline: 22px;
  }

  .profile-right-sidebar {
    padding-inline: 17px;
  }
}

@media (max-width: 1120px) {
  .profile-app-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .profile-left-sidebar {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .profile-center {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-right-sidebar {
    position: static;
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    height: auto;
    overflow: visible;
    padding: 0 22px 42px;
    border-left: 0;
  }

  .profile-right-sidebar > * + * {
    margin-top: 0;
  }

  .profile-help-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  body.profile-page.profile-nav-open {
    overflow: hidden;
  }

  .profile-app-shell {
    display: block;
    min-height: 100vh;
    border: 0;
  }

  .profile-left-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: min(330px, 88vw);
    height: 100vh;
    padding: 24px 20px 30px;
    border-right: 1px solid var(--profile-border);
    background: var(--bg-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 18px 0 50px rgba(8, 12, 40, 0.55);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .profile-nav-open .profile-left-sidebar {
    transform: translateX(0);
  }

  .profile-sidebar-close,
  .profile-mobile-nav-button {
    display: grid;
    place-items: center;
  }

  .profile-nav-open .profile-sidebar-backdrop {
    display: block;
  }

  .profile-center {
    padding: 26px 20px 36px;
  }

  .profile-page-header {
    align-items: center;
    min-height: 93px;
    padding-inline: 2px;
  }

  .profile-page-header .profile-eyebrow {
    display: none;
  }

  .profile-page-header h1 {
    font-size: 36px;
  }

  .profile-right-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 0 20px 42px;
  }
}

@media (max-width: 680px) {
  .profile-center {
    padding-inline: 14px;
  }

  .profile-page-header h1 {
    font-size: 31px;
  }

  .profile-page-header > div > p:last-child {
    font-size: 12px;
  }

  .profile-header-spark {
    display: none;
  }

  .profile-card {
    padding: 20px;
    border-radius: 17px;
  }

  .profile-identity-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 17px;
    padding: 22px 20px;
  }

  .profile-avatar-wrap,
  .profile-avatar {
    width: 88px;
    height: 88px;
  }

  .profile-avatar {
    font-size: 39px;
  }

  .profile-avatar-button {
    width: 33px;
    height: 33px;
  }

  .profile-name-line h2 {
    font-size: 24px;
  }

  .profile-member-badge {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .profile-identity-copy > p {
    font-size: 0.75rem;
  }

  .profile-identity-card > .profile-outline-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-subscription-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-subscription-highlights div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--border-color);
  }

  .profile-subscription-highlights div:nth-child(4) {
    border-top: 1px solid var(--border-color);
  }

  .profile-membership-facts {
    grid-template-columns: 1fr;
  }

  .profile-membership-actions {
    justify-content: flex-start;
  }

  .profile-wallet-summary {
    grid-template-columns: 1fr;
  }

  .profile-wallet-pack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-stat-card:nth-child(3)::before {
    display: none;
  }

  .profile-stat-card:nth-child(n + 3) {
    border-top: 1px solid var(--profile-border);
  }

  #profile-details-form fieldset {
    grid-template-columns: 1fr;
  }

  .profile-field--wide {
    grid-column: auto;
  }

  .profile-astrology-layout {
    grid-template-columns: 1fr;
  }

  .profile-chart-emblem {
    margin: 0 auto;
  }

  .profile-life-summary {
    grid-column: auto;
  }

  .profile-empty-state--compact {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-empty-state--compact .profile-gold-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-right-sidebar {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .profile-help-card {
    grid-column: auto;
  }
}

@media (max-width: 500px) {
  .profile-page-header {
    gap: 12px;
  }

  .profile-mobile-nav-button {
    width: 42px;
    height: 42px;
  }

  .profile-page-header h1 {
    font-size: 29px;
  }

  .profile-page-header > div > p:last-child {
    max-width: 230px;
  }

  .profile-identity-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-avatar-wrap {
    margin: 0 auto;
  }

  .profile-name-line,
  .profile-identity-copy > p {
    justify-content: center;
  }

  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-subscription-topline {
    flex-direction: column;
  }

  .profile-subscription-card .profile-outline-button,
  .profile-membership-actions .profile-outline-button,
  .profile-membership-actions .profile-gold-button {
    width: 100%;
  }

  .profile-membership-actions {
    width: 100%;
  }

  .profile-purchase-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .profile-stat-card + .profile-stat-card::before {
    top: 0;
    right: 18px;
    bottom: auto;
    left: 18px;
    width: auto;
    height: 1px;
  }

  .profile-stat-card:nth-child(n + 3) {
    border-top: 0;
  }

  .profile-section-heading--row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-wallet-pack-grid {
    grid-template-columns: 1fr;
  }

  .profile-wallet-ledger-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-wallet-transaction {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-wallet-transaction-amount {
    grid-column: 2;
    justify-items: start;
  }

  .profile-astro-facts {
    grid-template-columns: 1fr;
  }

  .profile-horoscope-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-page *,
  .profile-page *::before,
  .profile-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   DAWN VEDIC — profile shell, daily cosmic card, membership panel.

   The rules above now carry the Dawn palette for borders, fills and shadows.
   This block finishes text and iconography, which inherited near-black
   --text-primary / --text (rgb(44,36,28), rgb(42,33,23)) from the shared
   theme layers and read as grey-on-cream rather than warm ink.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Sidebar navigation: labels maroon, leading glyphs bronze ── */
.profile-page .profile-section-link,
.profile-page .profile-nav-signout,
.profile-page .profile-sidebar-close,
.profile-page .profile-mobile-nav-button {
  color: #4A1B0C !important;
}

.profile-page .profile-section-link > span,
.profile-page .profile-nav-signout > span {
  color: #BA7517 !important;
}

.profile-page .profile-section-link:hover {
  background: rgba(232, 163, 61, 0.16) !important;
  color: #4A1B0C !important;
}

.profile-page .profile-section-link.is-active {
  color: #FAECE7 !important;
  background: #712B13 !important;
}

.profile-page .profile-section-link.is-active > span { color: #FAC775 !important; }

/* ── Muted labels: bronze rather than sand.
   rgb(156,141,117) scored 2.88–3.19 against cream — below AA. ── */
.profile-page .profile-eyebrow,
.profile-page .profile-nav-group-label,
.profile-page .profile-subscription-date,
.profile-page .profile-wallet-ledger-heading {
  color: #854F0B !important;
}

/* ── Headings and body ── */
.profile-page h1,
.profile-page h2,
.profile-page h3,
.profile-page .profile-name-line strong { color: #4A1B0C !important; }

.profile-page .profile-card p:not(.profile-eyebrow),
.profile-page .profile-sidebar-card p,
.profile-page dd,
.profile-page li { color: #6B5A44 !important; }

.profile-page dt { color: #854F0B !important; }

/* ── Membership / purchases panel ── */
.profile-page .profile-membership-facts dd { color: #2C2C2A !important; }
.profile-page .profile-active-benefits li {
  color: #6B5A44 !important;
  border-color: rgba(186, 117, 23, 0.22) !important;
}
.profile-page .profile-subscription-highlights span { color: #854F0B !important; }

/* Wallet balance keeps its maroon fill, so its text stays cream. */
.profile-page .profile-wallet-balance > span { color: #FAECE7 !important; }
.profile-page .profile-wallet-balance strong,
.profile-page .profile-wallet-balance strong b { color: #FAC775 !important; }

/* Status colours stay semantic, just warmed to the palette. */
.profile-page .is-error,
.profile-page .profile-settings-list button.is-danger { color: #C0392B !important; }
.profile-page .is-success { color: #2F9E66 !important; }

/* ── Specificity top-ups ──────────────────────────────────────────────
   cosmic-ref-theme.css loads after this file with `[class*="card"] h2/h3`
   and `--text` rules at (0,2,·) !important, which outrank `.profile-page h2`.
   These reach the same elements without touching the shared rules. */

.profile-page .profile-center .profile-section-heading h2,
.profile-page .profile-center .profile-empty-state h3,
.profile-page .profile-center .profile-membership-activity h3,
.profile-page .profile-center .profile-wallet-ledger-heading h3,
.profile-page .profile-center .profile-stats-grid .profile-stat-card h2,
.profile-page .profile-center .profile-buy-minutes-card h2 {
  color: #4A1B0C !important;
}

/* Numerals and values — the emphasis colour of the page */
.profile-page .profile-center .profile-stats-grid .profile-stat-card strong,
.profile-page .profile-center .profile-subscription-highlights strong,
.profile-page .profile-center .profile-membership-facts dd,
.profile-page .profile-center .profile-buy-minutes-summary strong {
  color: #4A1B0C !important;
}

/* Form field labels */
.profile-page .profile-center .profile-field > span {
  color: #854F0B !important;
}

/* Outline buttons: maroon ink with an amber chevron */
.profile-page .profile-center a.profile-outline-button,
.profile-page .profile-center button.profile-outline-button {
  color: #712B13 !important;
  border-color: rgba(113, 43, 19, 0.35) !important;
}
.profile-page .profile-center a.profile-outline-button > span,
.profile-page .profile-center button.profile-outline-button > span {
  color: #BA7517 !important;
}

/* Avatar camera affordance sits on a maroon disc, so it needs light ink. */
.profile-page .profile-avatar-button { color: #FAECE7 !important; }

/* Broad heading sweep at (0,2,1) — beats cosmic-ref's `[class*="card"] h2/h3`
   (0,2,0) on every card in the shell, sidebar cards and modals included. */
.profile-page .profile-app-shell h2,
.profile-page .profile-app-shell h3 {
  color: #4A1B0C !important;
}

.profile-page .profile-app-shell .profile-sidebar-card strong,
.profile-page .profile-app-shell .profile-settings-list button strong {
  color: #4A1B0C !important;
}

.profile-page .profile-app-shell .profile-settings-list button > span,
.profile-page .profile-app-shell a.profile-outline-button > span {
  color: #BA7517 !important;
}

.profile-page .profile-app-shell .profile-settings-list button.is-danger strong,
.profile-page .profile-app-shell .profile-settings-list button.is-danger > span {
  color: #C0392B !important;
}

/* The avatar affordance sits on a 12%-maroon tint over cream, not a solid
   maroon disc, so cream ink was effectively invisible (1.13:1). */
.profile-page .profile-avatar-button {
  color: #712B13 !important;
}

/* Outline buttons live in the centre column and the right sidebar; scope to
   the shell so both are covered. */
.profile-page .profile-app-shell a.profile-outline-button,
.profile-page .profile-app-shell button.profile-outline-button {
  color: #712B13 !important;
  border-color: rgba(113, 43, 19, 0.35) !important;
}

/* Gold buttons carry a maroon gradient fill. They are anchors, so the
   site-wide `a { color: … !important }` rule painted their label maroon on
   maroon (1.22:1). Force light ink, and do the same for the wallet caption
   which sits on the same maroon panel. */
.profile-page .profile-app-shell a.profile-gold-button,
.profile-page .profile-app-shell button.profile-gold-button {
  color: #FFFFFF !important;
}
.profile-page .profile-app-shell a.profile-gold-button > span,
.profile-page .profile-app-shell button.profile-gold-button > span {
  color: #FAC775 !important;
}

.profile-page .profile-app-shell .profile-wallet-balance small,
.profile-page .profile-app-shell .profile-wallet-summary .profile-wallet-balance * {
  color: #FAECE7 !important;
}
.profile-page .profile-app-shell .profile-wallet-balance strong b { color: #FAC775 !important; }

/* ---------------------------------------------------------------------------
   Refer a friend — sits under the Astrology Credits panel and reuses that
   panel's card, totals and policy styles. Only the code row is new: the code
   itself has to be readable at a glance and copyable by eye, so it is set
   large, in the monospace face, with generous letter spacing.
   --------------------------------------------------------------------------- */
.profile-referral-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--profile-line);
  border-radius: 18px;
  background: var(--profile-cream);
}

.profile-referral-code {
  display: grid;
  gap: 6px;
}

.profile-referral-code span {
  color: var(--profile-muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-referral-code strong {
  color: var(--text-primary);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 30px;
  letter-spacing: .12em;
  line-height: 1.1;
}

.profile-referral-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* The full URL, shown so it can be selected by hand wherever the clipboard
   API is unavailable (older WebViews, insecure contexts). */
.profile-referral-link {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-size: 13px;
  user-select: all;
}

.profile-referral-status {
  margin: 0;
  color: var(--profile-muted);
  font-size: 13px;
  font-weight: 600;
}

.profile-referral-card {
  display: grid;
  gap: 18px;
}

@media (max-width: 640px) {
  .profile-referral-code-row {
    align-items: stretch;
  }

  .profile-referral-actions {
    width: 100%;
  }

  .profile-referral-actions > * {
    flex: 1 1 100%;
    text-align: center;
  }

  .profile-referral-code strong {
    font-size: 26px;
  }
}

/* ---------------------------------------------------------------------------
   Sky alerts — the push opt-in. Sits with Personal Details rather than in a
   panel of its own: it is an account setting, not a feature to go hunting for.
   --------------------------------------------------------------------------- */
.profile-alerts-card {
  display: grid;
  gap: 18px;
}

.profile-alerts-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--profile-line);
  border-radius: 18px;
  background: var(--profile-cream);
}

.profile-alerts-toggle > div {
  display: grid;
  gap: 4px;
}

.profile-alerts-toggle strong {
  color: var(--text-primary);
  font-size: 15px;
}

.profile-alerts-toggle span {
  color: var(--profile-muted);
  font-size: 13px;
  font-weight: 600;
}

.profile-alerts-topics {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--profile-line);
  border-radius: 18px;
}

.profile-alerts-topics legend {
  padding: 0 6px;
  color: var(--profile-muted);
  font-size: 12px;
  font-weight: 700;
}

/* Dim the choices until notifications are actually on, so the panel reads as
   one decision followed by its options rather than four equal controls. */
.profile-alerts-topics[disabled] {
  opacity: .55;
}

.profile-alerts-topics label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.profile-alerts-topics input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-maroon, #8C2A3A);
  flex: none;
}

.profile-alerts-topics span {
  display: grid;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 13px;
}

.profile-alerts-topics b {
  color: var(--text-primary);
  font-size: 14px;
}

.profile-alerts-note {
  margin: 0;
  color: var(--profile-muted);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .profile-alerts-toggle > .button { width: 100%; }
}
