:root {
  --vedapt-background-color: #0b0a08;
  --vedapt-background-image: url("dark.webp");
  --vedapt-background-overlay: linear-gradient(
    rgba(0, 0, 0, 0.22),
    rgba(0, 0, 0, 0.42)
  );
  --vedapt-background-position: center;
  --vedapt-mobile-background-position: 70% center;
}

html.light-mode {
  --vedapt-background-color: #eee5d4;
  --vedapt-background-image: url("light.webp");
  --vedapt-background-overlay: linear-gradient(
    rgba(245, 240, 230, 0.16),
    rgba(245, 240, 230, 0.28)
  );
  --vedapt-mobile-background-position: 52% center;
}

body {
  background-color: var(--vedapt-background-color);
  background-image:
    var(--vedapt-background-overlay),
    var(--vedapt-background-image);
  background-size: cover, cover;
  background-position: center, var(--vedapt-background-position);
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: #f5f0e6;
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
  margin: 0;
  padding: 40px;
  caret-color: transparent;
}

input,
textarea,
[contenteditable="true"] {
  caret-color: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

/* Keep desktop navbar coordinates independent of when destination content
   becomes tall enough to need a vertical scrollbar. */
@media (min-width: 769px) {
  html:has(nav[data-auth-hydration-nav]) {
    scrollbar-gutter: stable;
  }
}

body {
  min-width: 0;
  overflow-x: clip;
}

img,
video,
canvas,
iframe {
  max-width: 100%;
}

main {
  max-width: 900px;
  margin: 70px auto;
}

h1 {
  font-size: 82px;
  letter-spacing: 12px;
  margin-bottom: 10px;
  color: #f8e6b0;
  text-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
}

main > p {
  font-size: 22px;
  margin-bottom: 50px;
  color: #e8dcc2;
}

section {
  background: rgba(20, 18, 15, 0.72);
  padding: 35px;
  margin: 35px auto;
  max-width: 720px;
  border-radius: 20px;
  border: 1px solid rgba(248, 230, 176, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

h2 {
  font-size: 36px;
  margin-bottom: 25px;
  color: #f8e6b0;
}

h3 {
  margin-top: 28px;
  color: #d6b15f;
  font-size: 24px;
}

p {
  font-size: 18px;
  line-height: 1.7;
}

input {
  padding: 14px;
  width: 260px;
  border-radius: 10px;
  border: 1px solid rgba(248, 230, 176, 0.4);
  background: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}

button {
  padding: 14px 28px;
  background: linear-gradient(135deg, #d6b15f, #f8e6b0);
  color: #17120c;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: 0.3s;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(248, 230, 176, 0.5);
}
nav {
  display: flex;
  align-items: center;

  padding: 20px 36px;

  background: rgba(0,0,0,0.4);

  border-bottom: 1px solid rgba(255,255,255,0.1);

  border-radius: 22px;

  margin: 18px auto;

  width: calc(100% - 40px);

  max-width: 1760px;

  backdrop-filter: blur(10px);

  overflow: visible;
}

nav h2 {
  margin: 0;
  margin-right: auto;
  flex-shrink: 0;
}

.hero-buttons {
  margin-top: 25px;
}

.secondary-btn {
  background: transparent;
  border: 1px solid #f8e6b0;
  color: #f8e6b0;
  margin-left: 10px;
}

.leaderboard p {
  font-size: 20px;
  margin: 15px 0;
}
.steps,
.creator-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 25px;
}

.step-card,
.creator-card {
  background: rgba(255, 255, 255, 0.06);
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(248, 230, 176, 0.18);
}

.creator-card button {
  margin-top: 12px;
}

/* Mobile layout */
@media (max-width: 768px) {
  body {
    padding: 20px;
  }

  nav {
    flex-direction: column;
    gap: 15px;
    padding: 20px;

    border-radius: 22px;
  }

  h1 {
    font-size: 48px;
    letter-spacing: 6px;
  }

  section {
    padding: 24px;
  }

  .steps,
  .creator-grid {
    grid-template-columns: 1fr;
  }

  .settings-hub-grid {
    grid-template-columns: 1fr;
  }

  .settings-hub-card {
    min-height: 64px;
    font-size: 18px;
  }

  .settings-account-summary,
  .settings-action-grid {
    grid-template-columns: 1fr;
  }

  .settings-account-summary {
    text-align: center;
  }

  .settings-account-summary img {
    margin: 0 auto;
  }

  .settings-row {
    align-items: flex-start;
  }

  .settings-toggle-list .settings-row,
  .settings-about-list div {
    align-items: center;
  }

  input {
    width: 100%;
    max-width: 260px;
    margin-bottom: 10px;
  }

  button {
    margin-top: 10px;
  }

  .secondary-btn {
    margin-left: 0;
  }
}
#message {
  margin-top: 18px;
  color: #f8e6b0;
  font-weight: bold;
}
.creator-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}
.rank-card {
  background: rgba(255, 255, 255, 0.06);
  padding: 22px;
  margin: 18px 0;
  border-radius: 16px;
  border: 1px solid rgba(248, 230, 176, 0.2);
}

.rank-card span {
  font-size: 36px;
}

.rank-card h3 {
  margin: 8px 0;
}
#login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 320px;
  margin: 25px auto;
}

#login-form input {
  width: 100%;
  box-sizing: border-box;
}

.stat-card {
  background: rgba(255,255,255,0.06);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid rgba(248,230,176,0.15);
}

.stat-card h3 {
  font-size: 40px;
  color: #f8e6b0;
}

.activity-card {
  background: rgba(255,255,255,0.05);
  padding: 18px;
  margin-top: 15px;
  border-radius: 14px;
}

/* Mobile */
@media (max-width: 768px) {
  .stats-grid,
  .actions-grid {
    grid-template-columns: 1fr;
  }
}

.profile-card img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 24px;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.progress-card {
  background: rgba(255,255,255,0.06);
  padding: 14px;
  border-radius: 16px;
}

.progress-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .progress-grid {
    grid-template-columns: 1fr;
  }
}
#upload-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  margin: 25px auto;
}

#upload-form input,
#upload-form textarea {
  width: 100%;
  box-sizing: border-box;
}

textarea {
  min-height: 120px;
  padding: 14px;
  border-radius: 10px;
  font-family: Arial, sans-serif;
  font-size: 16px;
}

#upload-message {
  color: #f8e6b0;
  font-weight: bold;
}

.progress-post {
  position: relative;

  background: rgba(255,255,255,0.06);
  padding: 22px;
  border-radius: 16px;
  border: 1px solid rgba(248,230,176,0.2);
}

.progress-post span {
  color: #f8e6b0;
  font-weight: bold;
}
.feed-post {
  background: rgba(255,255,255,0.06);
  padding: 24px;
  margin-bottom: 18px;
  border-radius: 16px;
  border: 1px solid rgba(248,230,176,0.18);
  text-align: left;
}

.feed-post span {
  color: #f8e6b0;
  font-weight: bold;
}
.settings-card {
  background: rgba(255,255,255,0.06);
  padding: 22px;
  margin: 18px 0;
  border-radius: 16px;
  border: 1px solid rgba(248,230,176,0.18);
  text-align: left;
}

.settings-hub,
.settings-panel {
  text-align: left;
}

.settings-hub h2 {
  text-align: center;
}

.settings-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.settings-hub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 74px;
  margin: 0;
  color: #f8e6b0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  text-align: left;
  background: rgba(255,255,255,0.06);
}

.settings-hub-card::after {
  content: ">";
  color: rgba(248,230,176,0.72);
  font-family: Arial, sans-serif;
  font-size: 20px;
}

.settings-hub-card:hover,
.settings-hub-card:focus-visible {
  border-color: rgba(248,230,176,0.46);
  background: rgba(248,230,176,0.1);
}

.settings-danger-card {
  border-color: rgba(228, 111, 85, 0.34);
  color: #ffb19e;
}

.settings-danger-card::after {
  color: rgba(255,177,158,0.78);
}

.settings-back-btn {
  margin: 0 0 18px;
}

.settings-panel .settings-card {
  margin: 0;
}

.settings-panel .settings-card + .settings-card {
  margin-top: 24px;
}

.settings-card h2 {
  margin-top: 0;
}

.settings-card p {
  margin: 8px 0 14px;
}

.settings-account-summary {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 18px 0;
}

.settings-account-summary img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(248,230,176,0.32);
}

.settings-account-summary h3,
.settings-account-summary p {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.settings-account-identity {
  display: flex;
  min-height: 84px;
  flex-direction: column;
  justify-content: center;
}

.settings-account-identity h3 {
  margin: 0;
}

.settings-account-identity .settings-creator-badge {
  align-self: flex-start;
  margin-bottom: 0;
}

.settings-link-btn,
.settings-action-card {
  text-decoration: none;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.settings-row h3 {
  margin-top: 0;
}

.settings-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 54px;
  height: 30px;
  align-items: center;
}

.settings-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.settings-toggle span {
  position: relative;
  display: block;
  width: 54px;
  height: 30px;
  border: 1px solid rgba(248,230,176,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  transition: 0.2s;
}

.settings-toggle span::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f8e6b0;
  transition: 0.2s;
}

.settings-toggle input:checked + span {
  background: rgba(248,230,176,0.28);
  border-color: rgba(248,230,176,0.55);
}

.settings-toggle input:checked + span::before {
  transform: translateX(24px);
}

.settings-toggle input:focus-visible + span {
  outline: 2px solid rgba(248,230,176,0.72);
  outline-offset: 3px;
}

.settings-toggle input:disabled + span,
.settings-disabled-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.settings-toggle-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.settings-toggle-list .settings-row {
  padding: 14px 0;
  border-bottom: 1px solid rgba(248,230,176,0.12);
  font-size: 18px;
}

.settings-toggle-list .settings-row:last-child {
  border-bottom: 0;
}

.settings-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.settings-action-card {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: space-between;
  color: inherit;
  text-align: left;
}

.settings-action-card strong {
  color: #f8e6b0;
  font-size: 20px;
}

.settings-action-card span,
.settings-about-list span {
  color: #cdbf99;
  font-size: 0.94rem;
  line-height: 1.45;
}

.settings-about-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.settings-about-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(248,230,176,0.12);
}

.settings-about-list div:last-child {
  border-bottom: 0;
}

.settings-card button {
  margin-top: 10px;
}

.settings-radio-group {
  border: 0;
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
}

.settings-radio {
  align-items: center;
  display: flex;
  gap: 10px;
  color: #f5f0df;
}

.light-mode .settings-radio {
  color: #231f17;
}

.light-mode .settings-hub-card {
  background: rgba(255,255,255,0.85);
  color: #6c5624;
}

.light-mode .settings-hub-card::after {
  color: rgba(108,86,36,0.72);
}

.light-mode .settings-hub-card:hover,
.light-mode .settings-hub-card:focus-visible {
  background: rgba(214,177,95,0.16);
  border-color: rgba(139,111,45,0.34);
}

.light-mode .settings-danger-card {
  color: #9f3b25;
  border-color: rgba(179,69,46,0.3);
}

.light-mode .settings-danger-card::after {
  color: rgba(159,59,37,0.72);
}

.light-mode .settings-account-summary img {
  border-color: rgba(139,111,45,0.3);
}

.light-mode .settings-toggle span {
  border-color: rgba(139,111,45,0.24);
  background: rgba(139,111,45,0.08);
}

.light-mode .settings-toggle span::before {
  background: #8b6f2d;
}

.light-mode .settings-toggle input:checked + span {
  background: rgba(214,177,95,0.25);
  border-color: rgba(139,111,45,0.42);
}

.light-mode .settings-toggle-list .settings-row,
.light-mode .settings-about-list div {
  border-bottom-color: rgba(139,111,45,0.14);
}

.light-mode .settings-action-card strong {
  color: #6c5624;
}

.light-mode .settings-action-card span,
.light-mode .settings-about-list span {
  color: #6d6251;
}

@media (max-width: 768px) {
  .settings-hub-grid,
  .settings-account-summary,
  .settings-action-grid {
    grid-template-columns: 1fr;
  }

  .settings-hub-card {
    min-height: 64px;
    font-size: 18px;
  }

  .settings-hub-grid {
    gap: 18px;
  }

  .settings-panel .settings-card + .settings-card {
    margin-top: 20px;
  }

  .settings-account-summary {
    text-align: center;
  }

  .settings-account-summary img {
    margin: 0 auto;
  }

  .settings-account-identity {
    min-height: 0;
    align-items: center;
  }

  .settings-account-identity .settings-creator-badge {
    align-self: center;
  }

  .settings-row {
    align-items: flex-start;
  }

  .settings-toggle-list .settings-row,
  .settings-about-list div {
    align-items: center;
  }
}

.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 18px;
}

.leaderboard-tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(248, 230, 176, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-weight: 800;
  cursor: pointer;
}

.leaderboard-tab.active-leaderboard-tab {
  background: rgba(248, 230, 176, 0.18);
  border-color: rgba(248, 230, 176, 0.48);
}

.leaderboard-list {
  display: grid;
  gap: 12px;
}

.rank-card {
  display: grid;
  grid-template-columns: 58px 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.rank-card > span {
  font-size: inherit;
}

.leaderboard-rank {
  font-size: 22px;
  font-weight: 900;
}

.leaderboard-photo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.leaderboard-photo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.arete-initial-avatar,
.arete-image-avatar-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: #171717;
  border: 1px solid rgba(248, 230, 176, 0.72);
  color: #f8e6b0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.36);
}

.arete-image-avatar-empty {
  object-fit: contain;
}

.arete-image-avatar-empty::before {
  content: attr(data-avatar-initial);
}

.leaderboard-member-main {
  min-width: 0;
}

.leaderboard-member-main h3,
.leaderboard-your-rank-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rank-card .leaderboard-role-indicator,
.leaderboard-your-rank-card .leaderboard-role-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(248, 230, 176, 0.4);
  border-radius: 999px;
  color: #f8e6b0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.leaderboard-state-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.leaderboard-retry,
.leaderboard-load-more {
  min-height: 44px;
}

.leaderboard-load-more {
  display: block;
  margin: 16px auto 0;
}

.leaderboard-load-more[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .rank-card {
    grid-template-columns: 44px 48px minmax(0, 1fr);
  }

  .leaderboard-rank {
    font-size: 18px;
  }

}

.leaderboard-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid rgba(248, 230, 176, 0.36);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.leaderboard-info.tooltip {
  display: inline-flex;
}

.leaderboard-info:focus-visible {
  outline: 2px solid rgba(248, 230, 176, 0.62);
  outline-offset: 2px;
}

.leaderboard-info:focus .tooltip-text,
.leaderboard-info:focus-visible .tooltip-text {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 560px) {
  .leaderboard-info {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    font-size: 14px;
  }
}

.leaderboard-your-rank {
  margin: 0 0 14px;
}

.leaderboard-your-rank[hidden] {
  display: none;
}

.leaderboard-your-rank-card {
  display: grid;
  grid-template-columns: 58px 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 13px 15px;
  border-color: rgba(248, 230, 176, 0.34);
  background: rgba(248, 230, 176, 0.08);
}

.leaderboard-your-rank-card > span {
  font-size: 10px;
  line-height: 1.15;
  font-weight: 900;
  opacity: 0.78;
  text-transform: uppercase;
}

.leaderboard-your-rank-card > strong {
  font-size: 22px;
}

.leaderboard-your-rank-card h3,
.leaderboard-your-rank-card p {
  margin: 0;
}

.leaderboard-list {
  gap: 7px;
}

.leaderboard-list .rank-card {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-list .rank-card:hover {
  transform: translateY(-1px);
}

.leaderboard-list .rank-card h3,
.leaderboard-list .rank-card p {
  margin: 0;
}

.leaderboard-list .rank-card h3 {
  margin-bottom: 3px;
}

.leaderboard-list .rank-card.top-rank-card {
  position: relative;
  overflow: hidden;
}

.leaderboard-list .rank-card.top-rank-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
}

.leaderboard-list .rank-card.rank-gold {
  border-color: rgba(248, 230, 176, 0.58);
  box-shadow: 0 0 0 1px rgba(248, 230, 176, 0.1),
    0 10px 26px rgba(248, 230, 176, 0.08);
}

.leaderboard-list .rank-card.rank-gold::before {
  background: linear-gradient(90deg, rgba(248, 230, 176, 0.7), transparent 52%);
}

.leaderboard-list .rank-card.rank-silver {
  border-color: rgba(209, 213, 219, 0.54);
  box-shadow: 0 0 0 1px rgba(209, 213, 219, 0.08),
    0 10px 24px rgba(209, 213, 219, 0.06);
}

.leaderboard-list .rank-card.rank-silver::before {
  background: linear-gradient(90deg, rgba(209, 213, 219, 0.62), transparent 52%);
}

.leaderboard-list .rank-card.rank-bronze {
  border-color: rgba(205, 127, 50, 0.48);
  box-shadow: 0 0 0 1px rgba(205, 127, 50, 0.08),
    0 10px 24px rgba(205, 127, 50, 0.06);
}

.leaderboard-list .rank-card.rank-bronze::before {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.58), transparent 52%);
}

.leaderboard-list .rank-card.current-user-rank-card {
  border-color: rgba(248, 230, 176, 0.38);
  background: rgba(248, 230, 176, 0.08);
}

.leaderboard-list .rank-card.rank-gold.current-user-rank-card {
  border-color: rgba(248, 230, 176, 0.7);
}

.leaderboard-list .rank-card.rank-silver.current-user-rank-card {
  border-color: rgba(209, 213, 219, 0.64);
}

.leaderboard-list .rank-card.rank-bronze.current-user-rank-card {
  border-color: rgba(205, 127, 50, 0.58);
}

@media (max-width: 560px) {
  .leaderboard-your-rank-card {
    grid-template-columns: 44px 48px minmax(0, 1fr);
    min-height: 74px;
    padding: 12px;
  }

  .leaderboard-your-rank-card > strong {
    font-size: 18px;
  }
}
/* DAY 13 UI POLISH */

* {
  box-sizing: border-box;
}

a {
  transition: 0.25s;
}

a:hover {
  color: #ffffff;
}

section {
  transition: 0.3s;
}

section:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
}

button {
  letter-spacing: 0.5px;
}

button:active {
  transform: scale(0.97);
}

.creator-card,
.step-card,
.stat-card,
.rank-card,
.feed-post,
.progress-post,
.settings-card,
.activity-card,
.progress-card {
  transition: 0.3s;
}

.creator-card:hover,
.step-card:hover,
.stat-card:hover,
.rank-card:hover,
.feed-post:hover,
.progress-post:hover,
.settings-card:hover,
.activity-card:hover,
.progress-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 230, 176, 0.45);
}

input,
textarea {
  outline: none;
}

input:focus,
textarea:focus {
  border: 1px solid #f8e6b0;
  box-shadow: 0 0 18px rgba(248, 230, 176, 0.25);
}

nav {
  position: sticky;
  top: 0;
  z-index: 10;

  backdrop-filter: blur(10px);

  border-radius: 22px;
}

main {
  animation: fadeIn 0.7s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.feed-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.comment-box {
  margin-top: 15px;
}

.comment-input {
  width: 70%;
  margin-right: 8px;
}

.comments-list p {
  background: rgba(255,255,255,0.06);
  padding: 10px;
  border-radius: 10px;
  margin-top: 10px;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(6px);
  box-sizing: border-box;
  padding: 18px;
}

.modal-content {
  background: rgba(20, 18, 15, 0.95);
  padding: 28px;
  border-radius: 18px;
  max-width: 450px;
  width: 90%;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 1px solid rgba(248,230,176,0.25);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
  line-height: 1.2;
}

#close-modal-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  margin: 10px 0;
}

#post-modal .modal-content {
  width: min(96vw, 900px);
  max-width: none;
  height: min(94vh, 820px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

#post-modal .modal-content input,
#post-modal .modal-content textarea,
#post-modal .modal-content select {
  margin: 0;
}

#post-modal .modal-content textarea {
  min-height: 84px;
  resize: none;
}

#post-modal .post-image-picker,
#post-modal .upload-status {
  margin: 0;
}

#post-image-preview {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin: 0;
}

.feed-edit-modal-content {
  width: min(94vw, 720px);
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-edit-modal-content input,
.feed-edit-modal-content textarea {
  width: 100%;
  margin: 0;
}

.feed-edit-modal-content textarea {
  min-height: 120px;
  resize: vertical;
}

.feed-edit-modal-content .post-image-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.feed-edit-modal-content .post-image-label,
.feed-edit-modal-content .secondary-btn {
  margin: 0;
}

#edit-post-image-preview {
  max-height: 320px;
  margin: 2px auto 0;
}

.feed-confirm-modal-content {
  max-width: 430px;
}

#delete-comment-modal .feed-confirm-modal-content {
  position: relative;
  padding: 22px 24px 20px;
}

#delete-post-modal .feed-confirm-modal-content {
  position: relative;
}

#delete-post-modal {
  inset: 0;
  align-items: center;
  justify-content: center;
}

#delete-post-modal .modal-header {
  justify-content: center;
  padding: 0 40px;
  text-align: center;
}

#delete-post-modal .modal-header h2 {
  width: 100%;
}

#delete-post-modal #close-delete-post-modal-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}

#delete-post-modal .feed-modal-actions {
  justify-content: center;
}

#delete-comment-modal .modal-header {
  justify-content: center;
  margin-bottom: 12px;
  padding: 0 32px;
  text-align: center;
}

#delete-comment-modal .modal-header h2 {
  width: 100%;
}

#delete-comment-modal #close-delete-comment-modal-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  min-width: 0;
  padding: 0;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
}

#delete-comment-modal .feed-confirm-modal-content p {
  margin: 0;
  text-align: center;
}

#delete-comment-modal .feed-modal-actions {
  justify-content: center;
  margin-top: 18px;
}

.feed-confirm-modal-content p {
  margin: 0 0 8px;
  font-size: 17px;
}

.feed-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.feed-modal-actions .app-btn,
.feed-modal-actions .secondary-btn {
  margin: 0;
}

.danger-btn {
  border: 1px solid rgba(231, 87, 87, 0.46);
  background: linear-gradient(135deg, #b83d35, #ff8f7f);
  color: #190909;
}

.danger-btn:hover,
.danger-btn:focus-visible {
  box-shadow: 0 0 22px rgba(231, 87, 87, 0.32);
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: arete-spin 0.75s linear infinite;
}

@keyframes arete-spin {
  to {
    transform: rotate(360deg);
  }
}

#close-edit-post-modal-btn,
#close-delete-post-modal-btn,
#close-delete-comment-modal-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

.light-mode .danger-btn {
  border-color: rgba(180, 50, 50, 0.28);
  color: #fff8ed;
}

#menu-btn {
  display: none;
  background: rgba(248, 230, 176, 0.12);
  color: #f8e6b0;
  border: 1px solid rgba(248, 230, 176, 0.3);
  padding: 10px 14px;
  border-radius: 10px;
}

#side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: rgba(20, 18, 15, 0.98);
  border-left: 1px solid rgba(248, 230, 176, 0.25);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 30px;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s;
}

#side-menu a {
  color: #f8e6b0;
  text-decoration: none;
  font-size: 20px;
  width: 100%;
  text-align: left;
}

#close-menu-btn {
  align-self: flex-end;
  padding: 8px 12px;
}

.open-menu {
  transform: translateX(0) !important;
  visibility: visible !important;
}

#side-menu.open-menu {
  pointer-events: auto;
}

@media (max-width: 768px) {

  #menu-btn {
    display: block;
  }

}
#bio-input {
  width: 100%;
  max-width: 420px;
  margin-right: 10px;
}
.light-mode {
  color: #17120c;
}

.light-mode section,
.light-mode .settings-card {
  background: rgba(255,255,255,0.85);
  color: #17120c;
}

.light-mode h1,
.light-mode h2,
.light-mode h3 {
  color: #8b6f2d;
}

.light-mode nav {
  background: rgba(245, 240, 230, 0.45);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 111, 45, 0.08);

  border-radius: 22px;
}

.light-mode main > p {
  color: #5a4520;
  font-weight: bold;
}

.light-mode .secondary-btn {
  color: #8b6f2d;
  border-color: #8b6f2d;
  background: rgba(255, 255, 255, 0.45);
}

.light-mode button {
  color: #17120c;
}

.light-mode section {
  background: rgba(255, 255, 255, 0.88);
}
.save-btn {
  background: rgba(248, 230, 176, 0.14);
  color: #f8e6b0;
  border: 1px solid rgba(248, 230, 176, 0.28);
}

.save-btn:hover {
  border-color: #f8e6b0;
}

#followers-count {
  display: inline-block;
  margin-left: 14px;
  color: #f8e6b0;
  font-weight: bold;
}

.light-mode #followers-count {
  color: #8b6f2d;
}
#creator-search {
  width: 100%;
  max-width: 420px;
  margin: 25px auto;
  display: block;
}
/* CREATOR PAGE FIX */
.creator-grid {
  width: 100%;
}

.creator-card img {
  max-width: 100%;
  display: block;
}
.messages-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.messages-inbox,
.messages-thread {
  margin: 0;
  text-align: left;
}

.messages-layout .messages-thread {
  display: none;
}

.messages-layout.thread-open .messages-inbox {
  display: none;
}

.messages-layout.thread-open .messages-thread {
  display: block;
}

.messages-panel-header,
.messages-thread-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.messages-panel-header {
  justify-content: space-between;
}

.messages-thread-header {
  justify-content: flex-start;
  gap: 10px;
  box-sizing: border-box;
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(248,230,176,0.2);
  border-bottom-color: rgba(248,230,176,0.3);
  border-radius: 12px 12px 0 0;
  background: rgba(255,255,255,0.055);
}

.messages-thread-header > div {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.messages-panel-header .app-btn {
  flex: 0 0 auto;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.messages-panel-header h2,
.messages-thread-header h2 {
  margin: 0;
}

.messages-thread-header h2 {
  font-size: clamp(1.35rem, 2.1vw, 1.55rem);
  line-height: 1.12;
}

.messages-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid rgba(248,230,176,0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: inherit;
  cursor: pointer;
  margin-right: 4px;
}

.conversation-header-avatar {
  flex: 0 0 auto;
}

.conversation-profile-link {
  color: inherit;
  text-decoration: none;
}

.conversation-profile-link:hover,
.conversation-profile-link:focus-visible {
  color: #ffffff;
}

.conversation-avatar-link {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.conversation-title-link,
.conversation-name-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#conversation-subtitle,
#conversation-status {
  margin: 0;
  color: #cdbf99;
  font-size: 0.84rem;
  line-height: 1.3;
}

#conversation-subtitle {
  font-weight: 400;
}

#conversation-status {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
  padding-left: 8px;
  text-align: right;
}

.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.conversation-section-title {
  margin: 10px 4px 2px;
  color: #f8e6b0;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.conversation-list-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(248,230,176,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.conversation-list-item:focus-visible {
  outline: 2px solid rgba(248,230,176,0.65);
  outline-offset: 2px;
}

.conversation-list-item.active,
.conversation-list-item:hover {
  border-color: rgba(248,230,176,0.42);
  background: rgba(248,230,176,0.1);
}

.conversation-list-item.unread strong {
  color: #f8e6b0;
}

.conversation-avatar {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(248,230,176,0.16);
  border: 1px solid rgba(248,230,176,0.24);
  font-weight: 800;
}

.conversation-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-avatar > .arete-initial-avatar,
.conversation-avatar-link > .arete-initial-avatar {
  width: 100%;
  height: 100%;
}

.conversation-list-body,
.conversation-list-top {
  min-width: 0;
  display: flex;
}

.conversation-list-body {
  flex-direction: column;
  gap: 4px;
}

.conversation-list-top {
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conversation-list-top strong {
  min-width: 0;
}

.conversation-list-meta {
  min-width: 0;
  max-width: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.conversation-list-time {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.conversation-list-top strong,
.conversation-preview,
.conversation-list-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-list-top span,
.conversation-list-subtitle,
.conversation-preview {
  color: #cdbf99;
  font-size: 0.84rem;
}

.unread-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f8e6b0;
}

.chat-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  width: min(100%, 900px);
  margin: 0 auto;
  min-height: min(560px, 58vh);
  max-height: 62vh;
  overflow-y: auto;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(248,230,176,0.2);
  border-top: 0;
  border-radius: 0;
  background: rgba(0,0,0,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.message {
  box-sizing: border-box;
  width: fit-content;
  max-width: min(68%, 620px);
  padding: 11px 14px 9px;
  border-radius: 14px;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message p {
  margin: 0;
  line-height: 1.48;
  white-space: pre-wrap;
}

.message-meta,
.read-receipt {
  display: block;
  margin-top: 5px;
  color: #c9bc98;
  font-size: 0.74rem;
  line-height: 1.25;
}

.received {
  align-self: flex-start;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(248,230,176,0.24);
}

.sent {
  align-self: flex-end;
  background: rgba(248,230,176,0.17);
  border: 1px solid rgba(248,230,176,0.42);
}

.read-receipt {
  align-self: flex-end;
}

.message-input-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  box-sizing: border-box;
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(248,230,176,0.22);
  border-top-color: rgba(248,230,176,0.3);
  border-radius: 0 0 12px 12px;
  background: rgba(255,255,255,0.055);
}

.message-input-area textarea {
  box-sizing: border-box;
  height: 46px;
  min-height: 46px;
  max-height: 140px;
  line-height: 1.35;
  margin-bottom: 0;
  overflow-y: hidden;
  resize: none;
}

.message-input-area .app-btn {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 82px;
  min-height: 46px;
  border-color: rgba(248,230,176,0.48);
  background: rgba(248,230,176,0.2);
  color: #fff4cf;
}

.message-input-area .app-btn:disabled {
  border-color: rgba(248,230,176,0.14);
  background: rgba(255,255,255,0.035);
  color: rgba(239,230,204,0.46);
  opacity: 1;
}

.message-input-area .app-btn:hover:disabled {
  transform: none;
}

.send-message-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  opacity: 0.85;
  animation: send-message-spin 0.75s linear infinite;
}

#send-message-btn.is-sending .send-message-spinner {
  display: inline-block;
}

@keyframes send-message-spin {
  to {
    transform: rotate(360deg);
  }
}

.messages-empty {
  display: grid;
  gap: 6px;
  padding: 18px;
  color: #cdbf99;
  text-align: center;
}

.messages-empty strong {
  color: #f8e6b0;
}

.messages-modal[hidden] {
  display: none;
}

.messages-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.messages-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 3, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.messages-modal .messages-modal-content {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  margin: 0;
  padding: 26px;
  overflow: hidden;
  text-align: left;
  background: rgba(12, 10, 6, 0.94);
  border-color: rgba(248,230,176,0.28);
  box-shadow: 0 34px 90px rgba(0,0,0,0.64);
}

.messages-modal .messages-modal-content:hover {
  transform: none;
}

.messages-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.messages-modal-header h2,
.messages-modal-header p {
  margin: 0;
}

.messages-modal-header p {
  margin-top: 6px;
  color: #cdbf99;
}

.messages-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(248,230,176,0.26);
  border-radius: 10px;
  background: rgba(0,0,0,0.18);
  color: #f8e6b0;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.messages-modal-close:hover,
.messages-modal-close:focus-visible {
  transform: none;
  background: rgba(248,230,176,0.12);
  box-shadow: 0 0 22px rgba(248,230,176,0.18);
}

.messages-modal-open {
  overflow: hidden;
}

.settings-danger-btn {
  border-color: rgba(231, 87, 87, 0.48);
  background: rgba(231, 87, 87, 0.13);
  color: #ffd3cf;
}

.settings-danger-btn:hover,
.settings-danger-btn:focus-visible {
  border-color: rgba(231, 87, 87, 0.72);
  background: rgba(231, 87, 87, 0.22);
}

.settings-delete-modal[hidden] {
  display: none;
}

.settings-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.settings-delete-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 3, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.settings-delete-modal-panel {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(440px, 100%);
  margin: 0;
  padding: 26px;
  background: rgba(12, 10, 6, 0.94);
  border-color: rgba(231, 87, 87, 0.34);
  box-shadow: 0 34px 90px rgba(0,0,0,0.64);
}

.settings-delete-modal-panel:hover {
  transform: none;
}

.settings-delete-modal-panel h2,
.settings-delete-modal-panel p {
  margin-top: 0;
}

.settings-delete-modal-panel .app-input {
  margin-bottom: 12px;
}

.settings-delete-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(248,230,176,0.26);
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  color: #f8e6b0;
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.light-mode .settings-danger-btn {
  border-color: rgba(180, 50, 50, 0.3);
  background: rgba(180, 50, 50, 0.1);
  color: #8a2525;
}

.light-mode .settings-delete-modal-panel {
  background: rgba(255, 251, 243, 0.96);
  border-color: rgba(180, 50, 50, 0.26);
}

.settings-account-modal .settings-delete-modal-panel {
  border-color: rgba(248,230,176,0.3);
}

.settings-field-label {
  display: block;
  margin: 12px 0 6px;
  color: #f5f0df;
  font-weight: 700;
}

.account-confirmation-field {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin: 12px 0;
  padding: 0;
  border: 0;
  background: none;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.account-confirmation-field input[type="checkbox"] {
  appearance: auto;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  margin: 3px 0 0;
  padding: 0;
  border: initial;
  border-radius: 3px;
  background: initial;
  box-shadow: none;
}

.account-confirmation-field span {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  border: 0;
  line-height: 1.45;
}

.settings-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.settings-modal-actions button {
  margin-top: 0;
}

.settings-provider-note {
  color: #cdbf99;
}

.settings-action-success {
  text-align: left;
}

.light-mode .settings-account-modal .settings-delete-modal-panel {
  border-color: rgba(139,111,45,0.26);
}

.light-mode .settings-field-label {
  color: #231f17;
}

.light-mode .settings-provider-note {
  color: #6d6251;
}

@media (max-width: 520px) {
  .settings-delete-modal {
    padding: 12px;
  }

  .settings-modal-actions button {
    width: 100%;
  }
}

.messages-modal .start-conversation-list {
  max-height: min(644px, calc(100vh - 164px));
  overflow-y: auto;
  padding-right: 4px;
}

.start-conversation-list,
.start-conversation-section,
.start-program-group {
  display: grid;
  gap: 10px;
}

.start-conversation-section {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding-top: 6px;
}

.start-conversation-section + .start-conversation-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(248,230,176,0.12);
}

.start-conversation-section h3,
.start-program-group h4 {
  margin: 0;
  color: #f8e6b0;
}

.start-program-group {
  margin-top: 4px;
}

.start-program-group h4 {
  font-size: 0.95rem;
}

.start-conversation-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(248,230,176,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}

.start-conversation-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.start-conversation-main strong,
.start-conversation-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-conversation-main span {
  color: #cdbf99;
  font-size: 0.86rem;
}

.light-mode #conversation-subtitle,
.light-mode #conversation-status,
.light-mode .conversation-list-top span,
.light-mode .conversation-list-subtitle,
.light-mode .conversation-preview,
.light-mode .message-meta,
.light-mode .read-receipt,
.light-mode .messages-empty {
  color: #6d6251;
}

.light-mode .messages-thread-header {
  border-color: rgba(76,57,20,0.14);
  border-bottom-color: rgba(76,57,20,0.2);
  background: rgba(255,255,255,0.5);
  box-shadow: none;
}

.light-mode .messages-back-btn {
  border-color: rgba(76,57,20,0.2);
  background: rgba(255,255,255,0.64);
  color: #3b2e18;
}

.light-mode .conversation-list-item,
.light-mode .start-conversation-row {
  background: rgba(255,255,255,0.75);
}

.light-mode .received {
  border-color: rgba(63,55,43,0.15);
  background: rgba(255,255,255,0.78);
  color: #201c16;
  box-shadow: none;
}

.light-mode .conversation-list-item.active,
.light-mode .conversation-list-item:hover {
  background: rgba(214,177,95,0.25);
}

.light-mode .sent {
  border-color: rgba(139,103,28,0.23);
  background: rgba(238,219,171,0.5);
  color: #271f12;
  box-shadow: none;
}

.light-mode .chat-box {
  border-color: rgba(76,57,20,0.14);
  background: rgba(239,235,226,0.68);
  box-shadow: inset 0 1px 2px rgba(72,54,20,0.035);
}

.light-mode .message-meta,
.light-mode .read-receipt {
  color: #665b4a;
}

.light-mode .message-input-area {
  border-color: rgba(76,57,20,0.14);
  border-top-color: rgba(76,57,20,0.2);
  background: rgba(255,255,255,0.5);
  box-shadow: none;
}

.light-mode .message-input-area textarea {
  border-color: rgba(76,57,20,0.27);
  background: rgba(255,255,255,0.86);
}

.light-mode .message-input-area .app-btn:not(:disabled) {
  border-color: #8b6f2d;
  background: #8b6f2d;
  color: #ffffff;
}

.light-mode .message-input-area .app-btn:disabled {
  border-color: rgba(76,57,20,0.2);
  background: #e8e1d2;
  color: #746b5d;
}

.light-mode .conversation-section-title,
.light-mode .messages-empty strong,
.light-mode .start-conversation-section h3,
.light-mode .start-program-group h4 {
  color: #3f3524;
}

.light-mode .messages-modal-header p,
.light-mode .start-conversation-main span {
  color: #6d6251;
}

.light-mode .messages-modal .messages-modal-content {
  background: rgba(255,255,255,0.94);
  border-color: rgba(47,36,18,0.16);
}

.light-mode .messages-modal-close {
  border-color: rgba(47,36,18,0.18);
  background: rgba(47,36,18,0.06);
  color: #3f3524;
}

@media (max-width: 820px) {
  .messages-modal {
    padding: 16px;
  }

  .messages-modal-content {
    max-height: calc(100vh - 32px);
    padding: 22px;
  }

  .messages-modal .start-conversation-list {
    max-height: calc(100vh - 148px);
  }

  .chat-box {
    min-height: 360px;
    max-height: 56vh;
  }

  .message {
    max-width: 86%;
  }

  .start-conversation-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .start-conversation-row .app-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}
.challenge-card {
  background: rgba(255,255,255,0.06);
  padding: 24px;
  margin-bottom: 20px;
  border-radius: 16px;
  border: 1px solid rgba(248,230,176,0.18);
  text-align: left;
}

.challenge-card span {
  display: block;
  color: #f8e6b0;
  font-weight: bold;
  margin: 12px 0;
}

.joined-challenge {
  background: rgba(248,230,176,0.35);
  color: #17120c;
}

.light-mode .challenge-card span {
  color: #8b6f2d;
}
.streak-card {
  background: rgba(255,255,255,0.06);
  padding: 26px;
  border-radius: 18px;
  border: 1px solid rgba(248,230,176,0.2);
}

.streak-card h3 {
  font-size: 32px;
  color: #f8e6b0;
}

.light-mode .streak-card h3 {
  color: #8b6f2d;
}
.locked {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  opacity: 0.6;
}

.unlocked {
  background: rgba(248,230,176,0.18);
  border: 1px solid rgba(248,230,176,0.45);
  box-shadow: 0 0 25px rgba(248,230,176,0.25);
}

.light-mode .unlocked {
  background: rgba(214,177,95,0.25);
}
.notification-card {
  padding: 24px;
  margin-bottom: 18px;
  border-radius: 16px;
  text-align: left;
}

.unread {
  background: rgba(248,230,176,0.16);
  border: 1px solid rgba(248,230,176,0.45);
}

.read {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  opacity: 0.65;
}

.light-mode .unread {
  background: rgba(214,177,95,0.25);
}

.light-mode .read {
  background: rgba(255,255,255,0.7);
}
.light-mode #menu-btn {
  background: rgba(214, 177, 95, 0.18);
  color: #8b6f2d;
  border: 1px solid rgba(139, 111, 45, 0.25);
}
/* REUSABLE CARD SYSTEM */

.app-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(248,230,176,0.18);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
}

.light-mode .app-card {
  background: rgba(255,255,255,0.82);
}
/* REUSABLE BUTTON SYSTEM */

.app-btn {
  background: rgba(248, 230, 176, 0.14);
  color: #f8e6b0;
  border: 1px solid rgba(248, 230, 176, 0.28);
  padding: 12px 18px;
  border-radius: 12px;
  transition: 0.25s;
  cursor: pointer;
  font-weight: bold;
}

.app-btn:hover {
  background: rgba(248, 230, 176, 0.24);
  border-color: #f8e6b0;
  transform: translateY(-2px);
}

.notification-destination-link {
  display: inline-flex;
  margin: 2px 0 12px;
  text-decoration: none;
}

.app-btn:disabled,
.app-btn:disabled:hover,
button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.light-mode .app-btn {
  background: rgba(214, 177, 95, 0.14);
  color: #8b6f2d;
  border: 1px solid rgba(139, 111, 45, 0.24);
}

.light-mode .app-btn:hover {
  background: rgba(214, 177, 95, 0.22);
}

.like-count {
  margin-left: 6px;
  font-weight: bold;
  color: inherit;
}
.light-mode .like-count {
  color: #5c4315 !important;
}
/* REUSABLE SECTION SYSTEM */

.app-section {
  margin-bottom: 32px;
}

.section-title {
  margin-bottom: 14px;
}

.section-subtitle {
  margin-bottom: 20px;
  opacity: 0.9;
}
/* PAGE HEADER SYSTEM */

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header p {
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

/* MOBILE NAV FINAL FIX */
@media (max-width: 768px) {
  #menu-btn {
    display: block !important;
  }
}
/* UI POLISH SYSTEM */

button {
  transition:
    background 0.25s,
    transform 0.2s,
    border-color 0.25s,
    opacity 0.25s;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: scale(0.97);
}

.modal-content {
  border-radius: 22px;
  border: 1px solid rgba(248,230,176,0.22);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.light-mode .modal-content {
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}
/* REUSABLE FORM SYSTEM */

.app-input,
.app-textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(248,230,176,0.18);
  background: rgba(255,255,255,0.05);
  color: white;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 14px;
  transition: 0.25s;
}

.app-textarea {
  resize: none;
  overflow-y: auto;
}

.app-input:focus,
.app-textarea:focus {
  outline: none;
  border-color: rgba(248,230,176,0.55);
  box-shadow: 0 0 0 4px rgba(248,230,176,0.08);
}

.light-mode .app-input,
.light-mode .app-textarea {
  background: rgba(255,255,255,0.75);
  color: #2b2b2b;
}

.app-input:is(select) {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

.app-input:is(select):invalid {
  color: rgba(248,230,176,0.62);
}

.app-input:is(select) option {
  color: #1f1a12;
}

.light-mode .app-input:is(select):invalid {
  color: #6a552d;
}

.category-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin: 2px 0;
}

.feed-field-error {
  margin: -8px 0 12px;
  color: #ffb4ab;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.feed-field-error[hidden] {
  display: none;
}

.app-input.feed-field-invalid,
.app-textarea.feed-field-invalid,
.category-pill-group.feed-field-invalid {
  border-color: rgba(255, 112, 102, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 112, 102, 0.12);
}

.category-pill-group.feed-field-invalid {
  border: 1px solid rgba(255, 112, 102, 0.9);
  border-radius: 14px;
  padding: 8px;
}

.light-mode .feed-field-error {
  color: var(--arete-light-error);
}

.light-mode :is(
  .app-input.feed-field-invalid,
  .app-textarea.feed-field-invalid,
  .category-pill-group.feed-field-invalid
) {
  border-color: rgba(159, 29, 29, 0.72);
  box-shadow: 0 0 0 3px rgba(159, 29, 29, 0.1);
}

.category-pill {
  min-height: 36px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid rgba(248, 230, 176, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #f8e6b0;
  font-size: 14px;
  font-weight: 800;
  box-shadow: none;
}

.category-pill:hover,
.category-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(248, 230, 176, 0.48);
  background: rgba(248, 230, 176, 0.11);
}

.category-pill.selected-category-pill {
  border-color: rgba(248, 230, 176, 0.64);
  background: linear-gradient(135deg, #d6b15f, #f8e6b0);
  color: #17120c;
}

.light-mode .category-pill {
  border-color: rgba(139, 111, 45, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: #6c5624;
}

.light-mode .category-pill:hover,
.light-mode .category-pill:focus-visible {
  border-color: rgba(139, 111, 45, 0.38);
  background: rgba(214, 177, 95, 0.16);
}

.light-mode .category-pill.selected-category-pill {
  border-color: rgba(139, 111, 45, 0.42);
  background: linear-gradient(135deg, #8b6f2d, #d6b15f);
  color: #ffffff;
}
/* CARD SPACING CLEANUP */

.feed-post,
.creator-card,
.challenge-card,
.notification-card,
.settings-card,
.rank-card,
.stat-card,
.activity-card,
.progress-card {
  margin-bottom: 18px;
}

.feed-post h3,
.creator-card h3,
.challenge-card h3,
.notification-card h3 {
  margin-top: 0;
}

/* ANIMATION SYSTEM */

.fade-in {
  animation: fadeIn 0.45s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hover-lift {
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}
/* REUSABLE TAG SYSTEM */

.app-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 8px 14px;
  border-radius: 999px;

  background: rgba(248,230,176,0.12);
  border: 1px solid rgba(248,230,176,0.25);

  color: #f8e6b0;
  font-size: 14px;
  font-weight: bold;
}

.light-mode .app-tag {
  background: rgba(214,177,95,0.14);
  border: 1px solid rgba(139,111,45,0.2);
  color: #8b6f2d;
}
/* EMPTY STATE SYSTEM */

.empty-state {
  padding: 40px 24px;
  text-align: center;

  border: 1px dashed rgba(248,230,176,0.22);
  border-radius: 20px;

  background: rgba(255,255,255,0.04);
}

.empty-state h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.empty-state p {
  opacity: 0.85;
  margin-bottom: 18px;
}

.light-mode .empty-state {
  background: rgba(255,255,255,0.72);
}
/* LOADING / SKELETON SYSTEM */

.session-loading-region {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 460px);
  margin: 4px auto 18px;
  padding: 10px 14px;
  color: #d8ccb5;
  font-size: 14px;
}

.session-loading-region[hidden] {
  display: none !important;
}

.session-loading-indicator {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(248, 230, 176, 0.22);
  border-top-color: #d6b15f;
  border-radius: 50%;
  animation: vedaptLoadingSpin 0.85s linear infinite;
}

@keyframes vedaptLoadingSpin {
  to {
    transform: rotate(360deg);
  }
}

.dashboard-account-loading {
  max-width: 980px;
  margin: 0 auto 22px;
}

.dashboard-account-loading .session-loading-region {
  justify-content: flex-start;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
}

.dashboard-account-loading .app-btn {
  margin-top: 6px;
}

.skeleton-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(248,230,176,0.14);
  margin-bottom: 18px;
}

.skeleton-line {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.08),
    rgba(248,230,176,0.18),
    rgba(255,255,255,0.08)
  );
  margin-bottom: 12px;
  animation: loadingPulse 1.4s infinite;
}

.skeleton-line.short {
  width: 45%;
}

.skeleton-line.medium {
  width: 70%;
}

.skeleton-line.long {
  width: 100%;
}

@keyframes loadingPulse {
  0% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.45;
  }
}

.light-mode .skeleton-card {
  background: rgba(255,255,255,0.75);
}

.light-mode .skeleton-line {
  background: linear-gradient(
    90deg,
    rgba(139, 111, 45, 0.08),
    rgba(139, 111, 45, 0.2),
    rgba(139, 111, 45, 0.08)
  );
}

.light-mode .session-loading-region {
  color: var(--arete-light-subtle);
}

.light-mode .session-loading-indicator {
  border-color: rgba(139, 111, 45, 0.2);
  border-top-color: var(--arete-light-gold-strong);
}
/* ALERT SYSTEM */

.alert {
  padding: 14px 18px;
  border-radius: 14px;
  margin: 14px 0;
  font-weight: bold;
}

.alert-success {
  background: rgba(70, 180, 120, 0.18);
  border: 1px solid rgba(70, 180, 120, 0.35);
  color: #8ff0b0;
}

.alert-error {
  background: rgba(220, 80, 80, 0.18);
  border: 1px solid rgba(220, 80, 80, 0.35);
  color: #ff9a9a;
}

.light-mode .alert-success {
  color: #1f6a3d;
}

.light-mode .alert-error {
  color: #8b2222;
}
/* STATUS INDICATOR SYSTEM */

.status {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  width: fit-content;

  margin: 6px auto 14px auto;

  padding: 8px 14px;

  font-size: 14px;
  font-weight: bold;

  border-radius: 999px;

  background: rgba(248, 230, 176, 0.08);

  border: 1px solid rgba(248, 230, 176, 0.18);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-online .status-dot {
  background: #4cd964;
}

body.light-mode .status-online {
  background: rgba(76, 174, 96, 0.14);
  border-color: rgba(31, 122, 57, 0.42);
  color: #184f2d;
}

.status-offline .status-dot {
  background: #8f8f8f;
}

.status-active .status-dot {
  background: #f6c343;
}

.creator-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 6px auto 14px;
  padding: 8px 14px;
  border: 1px solid rgba(248, 230, 176, 0.18);
  border-radius: 999px;
  background: rgba(248, 230, 176, 0.08);
  color: #f8e6b0;
  font-size: 14px;
  font-weight: 700;
}

.creator-badge-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #4a90e2;
}

body.light-mode .creator-badge {
  background: rgba(184, 138, 43, 0.18);
  border-color: rgba(151, 107, 24, 0.55);
  color: #62440d;
}

.presence-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.creator-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.creator-card .app-btn,
.creator-card button {
  margin-top: auto;
}
/* SECTION DIVIDER SYSTEM */

.section-divider {
  height: 1px;
  border: none;
  margin: 32px 0;

  background: rgba(248,230,176,0.18);
}

.light-mode .section-divider {
  background: rgba(139,111,45,0.18);
}
/* TOOLTIP SYSTEM */

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;

  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);

  width: 220px;
  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(20, 18, 15, 0.95);
  color: #f8e6b0;

  font-size: 14px;
  line-height: 1.4;
  text-align: center;

  transition: 0.25s;
  z-index: 50;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.light-mode .tooltip-text {
  background: rgba(255, 255, 255, 0.95);
  color: #17120c;
}
/* PROGRESS BAR SYSTEM */

.progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #d6b15f, #f8e6b0);
  border-radius: 999px;
}

.light-mode .progress-bar {
  background: rgba(139,111,45,0.14);
}
/* STATS CARD SYSTEM */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.stat-box {
  text-align: center;
  padding: 24px;
  border-radius: 18px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(248,230,176,0.14);
}

.stat-number {
  font-size: 32px;
  font-weight: bold;
  color: #f8e6b0;
  margin-bottom: 8px;
}

.stat-label {
  opacity: 0.85;
}

.light-mode .stat-box {
  background: rgba(255,255,255,0.75);
}

.light-mode .stat-number {
  color: #8b6f2d;
}
/* MILESTONE SYSTEM */

.milestone-card {
  padding: 20px;
  border-radius: 18px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(248,230,176,0.14);

  margin-bottom: 18px;
}

.milestone-title {
  font-weight: bold;
  margin-bottom: 10px;
}

.milestone-progress {
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.85;
}

.light-mode .milestone-card {
  background: rgba(255,255,255,0.75);
}
/* CALLOUT SYSTEM */

.callout {
  padding: 18px 20px;
  border-radius: 16px;
  margin: 18px 0;
  text-align: center;
  border: 1px solid rgba(248,230,176,0.22);
  background: rgba(248,230,176,0.08);
}

.callout strong {
  color: #f8e6b0;
}

.light-mode .callout {
  background: rgba(214,177,95,0.14);
  border: 1px solid rgba(139,111,45,0.2);
}

.light-mode .callout strong {
  color: #8b6f2d;
}
/* SECTION HEADER SYSTEM */

.section-header {
  margin-bottom: 20px;
  text-align: center;
}

.section-header h2 {
  margin-bottom: 8px;
}

.section-header p {
  opacity: 0.8;
  font-size: 14px;
}
.actions-grid a {
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
/* LINK BUTTON CLEANUP */

a.app-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

a.app-btn:hover {
  color: #f8e6b0;
}

/* PAGE HEADER SYSTEM */

.page-header {
  text-align: center;
  margin-bottom: 30px;
}

.page-header h1 {
  margin-bottom: 10px;
}

.page-header p {
  opacity: 0.8;
  max-width: 700px;
  margin: 0 auto;
}

.page-header #open-modal-btn {
  margin-top: 26px;
}
/* QUICK ACTION POLISH */

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.actions-grid .app-btn {
  width: 100%;
}
a.secondary-btn {
  display: inline-block;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #f8e6b0;
  color: #f8e6b0;
  font-size: 16px;
  font-weight: bold;
  margin-left: 10px;
}
@media (max-width: 768px) {
  .creator-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}
/* CARD HOVER CONSISTENCY */

.app-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.app-card:hover {
  transform: translateY(-4px);
}
/* ACTIVITY FEED POLISH */

.activity-card {
  position: relative;
  padding-left: 24px;
}

.activity-card::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;

  width: 8px;
  height: 8px;

  border-radius: 50%;
  background: #f8e6b0;
}
/* PROFILE LAYOUT */

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  max-width: 760px;
  margin: 0 auto;
  padding: 32px;
}

.profile-card > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;

  width: 100%;
  max-width: 760px;

  margin: 28px auto;
}

.profile-stat {
  width: 120px;
  min-height: 100px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
}

.profile-stat-number {
  font-size: 24px;
  font-weight: bold;
}

.profile-stat-label {
  opacity: 0.8;
  font-size: 14px;
}

#bio-text {
  max-width: 520px;
  margin: 18px 0;
  text-align: left;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

/* MOBILE PROFILE FIX */

@media (max-width: 768px) {
  .profile-card {
    grid-template-columns: 1fr;
    max-width: 100%;
    overflow: hidden;
    padding: 22px;
    text-align: center;
  }

  .profile-card img {
    width: 220px;
    height: 220px;
    margin: 0 auto;
  }

  .profile-card > div {
    align-items: center;
    text-align: center;
  }

  #bio-text {
    text-align: center;
  }

  .profile-stats {
  grid-template-columns: repeat(2, 1fr);
  max-width: 400px;
}

  .profile-actions {
    flex-direction: column;
    gap: 10px;
  }
}

/* EMPTY STATE SYSTEM */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  margin-top: 20px;
}

.empty-state h3 {
  margin-bottom: 10px;
}

.empty-state p {
  opacity: 0.8;
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
/* FORM INPUT CONSISTENCY */

input,
textarea {
  font-family: inherit;
}

#message-input,
#bio-input,
#progress-title,
#progress-note,
.comment-input {
  border-radius: 14px;
  border: 1px solid rgba(248,230,176,0.18);
  background: rgba(255,255,255,0.06);
  color: #f5f0e6;
  padding: 14px 16px;
}

.light-mode #message-input,
.light-mode #bio-input,
.light-mode #progress-title,
.light-mode #progress-note,
.light-mode .comment-input {
  background: rgba(255,255,255,0.8);
  color: #17120c;
}
/* MOBILE SPACING CLEANUP */

@media (max-width: 768px) {
  main {
    margin: 40px auto;
  }

  section {
    margin: 24px auto;
    padding: 24px 18px;
  }

  h1 {
    font-size: 44px;
    letter-spacing: 5px;
  }

  h2 {
    font-size: 28px;
  }

  .app-card {
    padding: 18px;
  }

  .page-header {
    margin-bottom: 24px;
  }
}
/* UNIVERSAL CARD HOVER */

.app-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.app-card:hover {
  transform: translateY(-4px);
}
#image-preview {
  display: none;
  width: 100%;
  max-width: 320px;
  margin: 16px auto;
  border-radius: 16px;
  border: 1px solid rgba(248,230,176,0.22);
}

.upload-preview {
  display: none;
  width: 100%;
  max-width: 100%;
  max-height: 300px;
  margin: 14px 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(248,230,176,0.22);
  object-fit: contain;
  background: rgba(0,0,0,0.24);
}

.upload-status {
  min-height: 22px;
  margin: 6px 0 12px;
  font-size: 0.92rem;
  color: #f5d27b;
}

.post-image-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
}

.post-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

#post-modal .post-image-input,
.feed-edit-modal-content .post-image-input {
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
}

.post-image-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
}

.post-image-input:focus + .post-image-label {
  border-color: rgba(248,230,176,0.55);
  box-shadow: 0 0 0 4px rgba(248,230,176,0.08);
}

.post-image-filename {
  flex: 1 1 160px;
  min-width: 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.light-mode .upload-status {
  color: #5d4514;
}

.light-mode .post-image-filename {
  color: rgba(43,43,43,0.68);
}
.saved-progress-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
}
/* LIGHT MODE CARD OUTLINE FIX */

.light-mode section,
.light-mode .app-card,
.light-mode .settings-card,
.light-mode .progress-post,
.light-mode .creator-card,
.light-mode .challenge-card,
.light-mode .notification-card,
.light-mode .rank-card,
.light-mode .stat-card,
.light-mode .activity-card,
.light-mode .milestone-card,
.light-mode .streak-card {
  border: 1px solid rgba(139, 111, 45, 0.28);
  box-shadow: 0 12px 35px rgba(139, 111, 45, 0.16);
}

.light-mode .app-card:hover,
.light-mode section:hover {
  border-color: rgba(139, 111, 45, 0.45);
  box-shadow: 0 16px 45px rgba(139, 111, 45, 0.22);
}
.delete-post-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;

  background: rgba(220, 70, 70, 0.16);
  color: #ff8a8a;
  border: 1px solid rgba(220, 70, 70, 0.35);

  border-radius: 50%;
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  font-size: 16px;
}

.delete-post-btn:hover {
  background: rgba(220, 70, 70, 0.28);
  border-color: rgba(220, 70, 70, 0.6);
}
#bio-message {
  color: #8ff0b0;
  font-weight: bold;
  margin-top: 10px;
}
#toast-message {
  position: fixed;
  top: 24px;
  right: 24px;

  background: #14120f;
  color: #f8e6b0;

  border: 1px solid rgba(248,230,176,0.55);
  border-radius: 14px;

  padding: 14px 18px;

  font-weight: bold;

  z-index: 99999;

  opacity: 0;

  transform: translateY(-10px);

  pointer-events: none;

  transition: 0.25s;

  box-shadow: 0 0 24px rgba(248,230,176,0.25);
}

#toast-message.show-toast {
  opacity: 1;
  transform: translateY(0);
}

.light-mode #toast-message {
  background: rgba(255,255,255,0.95);
  color: #8b6f2d;
  border: 1px solid rgba(139,111,45,0.3);
}
.program-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.program-create-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.program-create-card[hidden],
#creator-only-message[hidden] {
  display: none;
}

.program-create-card h2,
.program-create-card p {
  margin: 0;
}

.program-create-card p {
  margin-top: 8px;
  opacity: 0.82;
}

.create-program-modal {
  z-index: 180;
}

.create-program-modal-content {
  box-sizing: border-box;
  width: min(94vw, 920px);
  max-width: none;
  max-height: min(92vh, 860px);
  text-align: left;
}

.create-program-modal-content .modal-header {
  position: relative;
  display: block;
  text-align: center;
}

.create-program-modal-content .modal-header > div {
  width: 100%;
  padding-inline: 46px;
  box-sizing: border-box;
}

.create-program-modal-content .modal-header p {
  margin: 8px 0 0;
  opacity: 0.82;
}

.create-program-modal-content #close-create-program-modal-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  line-height: 1;
}

.creator-onboarding-modal {
  z-index: 190;
}

.creator-onboarding-content {
  box-sizing: border-box;
  width: min(94vw, 540px);
  max-width: none;
  padding: 34px;
  text-align: left;
  border-radius: 8px;
  border-color: rgba(248, 230, 176, 0.38);
  background:
    linear-gradient(
      135deg,
      rgba(248, 230, 176, 0.08),
      rgba(152, 217, 194, 0.07)
    ),
    rgba(20, 18, 15, 0.96);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.creator-onboarding-content h2 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.15;
}

.creator-onboarding-content p {
  margin: 0 0 16px;
  color: rgba(245, 240, 230, 0.88);
  font-size: 17px;
  line-height: 1.65;
}

.creator-onboarding-agreement {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 22px 0 26px;
  padding: 16px;
  border: 1px solid rgba(248, 230, 176, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #f8e6b0;
  font-size: 16px;
  line-height: 1.45;
}

.seller-profile-form,
.marketplace-checkout-content,
.program-seller-disclosure {
  display: grid;
  gap: 14px;
}

.seller-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.seller-profile-fields label,
.marketplace-checkout-consent {
  display: grid;
  gap: 7px;
}

.marketplace-checkout-modal {
  align-items: flex-start;
  overflow-y: auto;
  padding: 28px 16px;
}

.marketplace-checkout-content {
  width: min(760px, calc(100vw - 32px));
  max-height: none;
}

.marketplace-order-summary,
.program-seller-disclosure {
  padding: 14px;
  border: 1px solid rgba(248, 230, 176, 0.24);
  border-radius: 12px;
  background: rgba(248, 230, 176, 0.07);
}

.marketplace-order-summary p,
.program-seller-disclosure p {
  margin: 0;
  overflow-wrap: anywhere;
}

.marketplace-checkout-consent {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.marketplace-checkout-consent input:focus-visible {
  outline: 3px solid #fff1a8;
  outline-offset: 3px;
}

.light-mode .marketplace-checkout-consent input:focus-visible {
  outline-color: var(--arete-light-gold-strong);
}

.seller-non-trader-warning,
[data-checkout-non-trader] {
  color: #ffe8a3;
  font-weight: 700;
}

@media (max-width: 720px) {
  .seller-profile-fields {
    grid-template-columns: 1fr;
  }
}

.creator-onboarding-agreement input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #d6b15f;
}

.creator-onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.light-mode .creator-onboarding-content {
  background:
    linear-gradient(
      135deg,
      rgba(214, 177, 95, 0.13),
      rgba(15, 125, 104, 0.08)
    ),
    rgba(255, 255, 255, 0.96);
  border-color: rgba(139, 111, 45, 0.28);
}

.light-mode .creator-onboarding-content p {
  color: rgba(35, 31, 23, 0.78);
}

.light-mode .creator-onboarding-agreement {
  background: rgba(139, 111, 45, 0.06);
  border-color: rgba(139, 111, 45, 0.16);
  color: #6c5624;
}

.program-form {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.program-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.program-form-grid > .program-top-field {
  min-width: 0;
  margin: 0;
}

.program-price-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.program-price-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #f8e6b0;
  font-size: 0.9rem;
  font-weight: 800;
}

body.light-mode .program-price-label {
  color: var(--arete-light-gold-strong);
}

.program-price-row .app-input {
  box-sizing: border-box;
  width: 180px;
  max-width: 100%;
  height: 52px;
  margin-bottom: 0;
  padding: 12px 42px;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.program-price-row .app-input::placeholder {
  text-align: center;
  opacity: 1;
}

.program-price-row .app-input::-webkit-inner-spin-button,
.program-price-row .app-input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.program-schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.program-task-schedule {
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 18px;
  padding: 16px;
  border: 1px solid rgba(248,230,176,0.16);
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
}

.program-schedule-control {
  display: grid;
  width: min(100%, 280px);
  margin-inline: auto;
  gap: 7px;
}

.program-schedule-control label,
.program-cover-field > label {
  color: #f8e6b0;
  font-size: 0.9rem;
  font-weight: 800;
}

.program-schedule-control label {
  text-align: center;
}

.program-schedule-control .app-input {
  margin-bottom: 0;
}

.program-form #program-task-schedule-type {
  padding-right: 42px;
  padding-left: 42px;
  text-align: center;
  text-align-last: center;
}

#program-form #program-task-schedule-type option {
  text-align: center;
}

.program-form .app-input,
.program-form .app-textarea {
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
}

.program-form .app-input {
  height: 52px;
}

.program-form .program-top-field {
  display: block;
  box-sizing: border-box;
  height: 52px;
  min-height: 52px;
  width: 100%;
  padding: 14px 42px 14px 16px;
  border: 1px solid rgba(248,230,176,0.18);
  border-radius: 14px;
  background-color: rgba(255,255,255,0.05);
  color: white;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
  margin-bottom: 0;
}

#program-form #program-title {
  grid-column: 1;
  grid-row: 1;
}

#program-form #program-category {
  grid-column: 2;
  grid-row: 1;
}

#program-form #program-difficulty {
  grid-column: 1;
  grid-row: 2;
}

#program-form #program-duration {
  grid-column: 2;
  grid-row: 2;
}

.program-form select.program-top-field {
  padding: 14px 42px 14px 16px;
  text-align-last: left;
}

.program-form .program-top-field::placeholder,
.program-form select.program-top-field:invalid {
  color: rgba(248,230,176,0.62);
  opacity: 1;
}

body.light-mode .program-form .program-top-field::placeholder {
  color: var(--arete-light-ink);
  opacity: 1;
}

.program-form .app-textarea {
  min-height: 124px;
}

.program-schedule-help {
  max-width: 540px;
  margin: 0;
  color: #d7c58d;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.program-cover-field {
  display: grid;
  gap: 7px;
  text-align: center;
}

.program-cover-help {
  max-width: 620px;
  margin: 0;
  margin-inline: auto;
  color: rgba(248,230,176,0.7);
  font-size: 0.88rem;
  line-height: 1.45;
}

.program-cover-help span {
  display: block;
}

.program-cover-field .app-input {
  width: 100%;
  margin-bottom: 0;
}

.program-duration-error {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: -2px 0 8px;
  color: #f0a6a6;
  font-size: 0.86rem;
  line-height: 1.35;
}

.program-description-field {
  display: grid;
  gap: 7px;
  width: 100%;
  text-align: left;
}

.program-description-field .app-textarea {
  margin-bottom: 0;
}

.program-field-help,
.program-field-error {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
}

.program-field-help {
  color: rgba(248,230,176,0.72);
}

.program-field-error {
  min-height: 18px;
  color: #f0a6a6;
}

.program-description-field .app-textarea[aria-invalid="true"] {
  border-color: #f0a6a6;
}

.program-publication-errors {
  box-sizing: border-box;
  width: min(100%, 760px);
  padding: 14px 16px;
  border: 1px solid rgba(240,166,166,0.55);
  border-radius: 8px;
  background: rgba(128,28,28,0.18);
  color: #ffd3d3;
  text-align: left;
}

.program-publication-errors[hidden] {
  display: none;
}

.program-publication-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.program-publication-errors li + li {
  margin-top: 6px;
}

.task-builder {
  margin: 14px 0 0;
}

.task-builder-legacy-input {
  display: none;
}

.task-builder-panel,
.task-builder-week {
  border: 1px solid rgba(248,230,176,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.035);
}

.task-builder-panel {
  padding: 16px;
}

.task-builder-panel-header,
.task-builder-stepper-top,
.task-builder-stepper-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-builder-panel-header {
  margin-bottom: 12px;
}

.task-builder-panel h3,
.task-builder-panel p,
.task-builder-stepper-top p {
  margin: 0;
}

.task-builder-panel h3 {
  color: #f8e6b0;
  font-size: 1rem;
}

.task-builder-panel p,
.task-builder-week small {
  color: rgba(248,230,176,0.7);
  line-height: 1.4;
}

.task-builder .task-builder-input-guide {
  margin: 0 0 10px;
  color: rgba(248,230,176,0.78);
  font-size: 0.9rem;
  line-height: 1.45;
}

.task-builder-list {
  display: grid;
  gap: 10px;
}

.task-builder-week {
  overflow: hidden;
}

.task-builder-week summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  color: #f8e6b0;
  font-weight: 800;
}

.task-builder-week summary::-webkit-details-marker {
  display: none;
}

.task-builder-week summary::after {
  content: "+";
  color: #d7c58d;
  font-size: 1.2rem;
  line-height: 1;
}

.task-builder-week[open] summary::after {
  content: "-";
}

.task-builder-week .task-builder-textarea {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
}

.task-builder-textarea {
  resize: none;
  overflow-y: auto;
}

#creator-empty-state .empty-state {
  border: 0;
  background: rgba(255,255,255,0.04);
  box-shadow: none;
}

.task-builder-stepper {
  display: grid;
  gap: 14px;
}

.task-builder-stepper-top p {
  color: #f8e6b0;
  font-weight: 800;
  text-align: center;
}

.task-builder-stepper-subtitle {
  color: rgba(248,230,176,0.72);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.task-builder-stepper-top .app-btn,
.task-builder-stepper-actions .app-btn {
  min-width: 110px;
}

.program-free-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(248,230,176,0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: #f8e6b0;
  font-weight: 700;
}

.program-free-toggle input {
  width: 18px;
  height: 18px;
}

.program-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.program-modal-actions .app-btn {
  box-sizing: border-box;
  width: 180px;
  height: 52px;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
}

.program-final-actions {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 4px;
}

.edit-program-actions {
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0;
}

.edit-program-actions .app-btn {
  box-sizing: border-box;
  width: 180px;
  height: 52px;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.program-search-input {
  display: block;
  width: min(100%, 760px);
  margin: 0 auto 22px;
}

.program-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 0;
  text-align: left;
  cursor: pointer;
}

.program-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.program-card h3 {
  margin: 0 0 6px;
}

.program-creator,
.program-description,
.program-members {
  margin: 0;
}

.program-creator,
.program-members {
  opacity: 0.78;
  font-size: 14px;
}

.program-price {
  white-space: nowrap;
}

.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.program-task-list {
  margin: 0;
  padding-left: 1.25rem;
  text-align: left;
  opacity: 0.9;
}

.program-task-list li {
  padding-left: 3px;
  line-height: 1.45;
}

.program-task-list li + li {
  margin-top: 6px;
}

.program-task-more {
  margin: 6px 0 0 1.25rem;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.72;
}

.program-card .join-program-btn {
  margin-top: auto;
  width: 100%;
}

.program-card .join-program-btn {
  cursor: pointer;
}

.program-card .join-program-btn:disabled {
  pointer-events: none;
}

.creator-hub {
  --creator-section-padding-x: 32px;
  --creator-section-padding-y: 28px;
  --creator-section-content-gap: 22px;
  --creator-inner-gap: 12px;
  --creator-inner-padding-x: 32px;
  --creator-inner-padding-y: 24px;
  --creator-section-radius: 18px;
  display: grid;
  gap: 20px;
  width: min(100%, 1320px);
  max-width: none;
  margin: 0 auto;
}

.creator-hub-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 0;
  text-align: left;
}

.creator-hub-header h1 {
  margin: 0 0 6px;
  font-size: 36px;
  letter-spacing: 0;
  text-shadow: none;
}

.creator-hub-header p {
  margin: 0;
  max-width: none;
  text-align: left;
}

#creator-dashboard-greeting {
  color: #f8e6b0;
  font-size: 19px;
  font-weight: bold;
}

#creator-dashboard-status {
  margin: 0;
}

.creator-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.creator-quick-actions .app-btn {
  width: 196px;
  min-height: 44px;
  margin: 0;
  padding: 11px 16px;
  font-size: 15px;
  justify-content: center;
}

.creator-program-switcher {
  display: grid;
  gap: 6px;
  width: min(100%, 320px);
}

.creator-program-switcher[hidden] {
  display: none;
}

.creator-program-switcher label {
  color: rgba(248,230,176,0.76);
  font-size: 13px;
  font-weight: bold;
}

.creator-program-switcher select {
  min-height: 42px;
}

.creator-hub-section {
  display: grid;
  gap: var(--creator-section-content-gap);
  max-width: none;
  margin: 0;
  padding: var(--creator-section-padding-y) var(--creator-section-padding-x);
  background: rgba(12, 10, 6, 0.52);
  border: 1px solid rgba(248,230,176,0.18);
  border-radius: var(--creator-section-radius);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  backdrop-filter: none;
}

.creator-hub-section[hidden] {
  display: none;
}

.creator-hub-section:hover {
  transform: none;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.creator-hub-section .section-header {
  display: flex;
  justify-content: space-between;
  gap: var(--creator-inner-gap);
  align-items: center;
  margin: 0;
  padding: 0;
  text-align: left;
}

.creator-hub-section .section-header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.creator-hub-section .section-header p {
  margin: 0;
  padding-right: 0;
  font-size: 15px;
  text-align: right;
}

.creator-hub .empty-state {
  padding: var(--creator-inner-padding-y) var(--creator-inner-padding-x);
  border-style: solid;
  border-radius: var(--creator-section-radius);
}

.creator-needs-review-list,
.creator-dashboard-programs,
.creator-community-activity-list,
.creator-members-summary,
.creator-member-list {
  display: grid;
  gap: var(--creator-inner-gap);
}

.creator-attention-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  color: inherit;
  text-decoration: none;
}

.creator-attention-summary strong {
  margin-right: auto;
}

.creator-review-item,
.creator-dashboard-program,
.creator-community-activity,
.creator-selected-program-card,
.creator-members-card {
  display: grid;
  gap: 16px;
  margin-bottom: 0;
  padding: var(--creator-inner-padding-y) var(--creator-inner-padding-x);
  background: rgba(12, 10, 6, 0.52);
  border-radius: var(--creator-section-radius);
}

.creator-review-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.creator-review-member {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.creator-review-member img,
.creator-review-member span {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.creator-review-avatar-link {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 50%;
  text-decoration: none;
}

.creator-review-name-link {
  color: inherit;
  text-decoration: none;
}

.creator-review-avatar-link:hover,
.creator-review-name-link:hover {
  opacity: 0.86;
}

.creator-review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-review-actions .creator-message-action {
  display: inline-grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.creator-review-member img {
  object-fit: cover;
}

.creator-review-member span {
  display: grid;
  place-items: center;
  color: #17120c;
  font-weight: bold;
  background: #f8e6b0;
}

.creator-review-member h3,
.creator-dashboard-program-main h3,
.creator-community-activity h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  letter-spacing: 0;
}

.creator-selected-program-main h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 20px;
  letter-spacing: 0;
}

.creator-review-member p,
.creator-community-activity p {
  margin: 2px 0 0;
  color: rgba(248,230,176,0.72);
  font-size: 14px;
}

.creator-review-meta,
.creator-program-stats,
.creator-activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(248,230,176,0.76);
  font-size: 14px;
}

.creator-review-meta {
  justify-content: flex-end;
}

.creator-review-meta span,
.creator-program-stats span,
.creator-activity-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(248,230,176,0.16);
  border-radius: 999px;
}

.creator-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--creator-inner-gap);
}

.creator-stat-card {
  min-height: auto;
  margin: 0;
  padding: var(--creator-inner-padding-y) var(--creator-inner-padding-x);
  border-radius: var(--creator-section-radius);
}

.creator-stat-card .stat-number {
  font-size: 32px;
}

.creator-stat-card .stat-label {
  font-size: 13px;
}

.creator-dashboard-program {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.creator-selected-program-main,
.creator-members-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.creator-selected-program-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.creator-dashboard-program-main {
  min-width: 0;
}

.creator-dashboard-program-main h3 {
  margin-bottom: 8px;
}

.creator-dashboard-program .program-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
}

.creator-dashboard-program .app-btn,
.creator-review-item .app-btn,
.creator-selected-program-actions .app-btn {
  min-height: 42px;
  margin: 0;
  padding: 10px 14px;
  font-size: 15px;
  white-space: nowrap;
}

.creator-selected-program-actions .app-btn {
  width: auto;
  min-width: 144px;
  justify-content: center;
  white-space: normal;
}

.creator-community-activity {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.creator-community-activity .app-tag {
  margin-bottom: 6px;
}

.creator-activity-meta {
  justify-content: flex-end;
  justify-self: end;
}

.creator-members-card-header p {
  margin: 2px 0 0;
  color: rgba(248,230,176,0.72);
  font-size: 14px;
}

.creator-member-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(248,230,176,0.12);
  color: inherit;
  text-decoration: none;
}

.creator-member-row:hover,
.creator-member-row:focus-visible {
  color: inherit;
  text-decoration: none;
}

a.creator-member-row {
  margin: -2px;
  padding: 10px 2px 0;
  border-radius: 8px;
}

a.creator-member-row:hover,
a.creator-member-row:focus-visible {
  background: rgba(248,230,176,0.07);
  outline: none;
}

.creator-member-row:first-child {
  padding-top: 0;
  border-top: 0;
}

a.creator-member-row:first-child {
  padding-top: 2px;
}

.creator-member-row img,
.creator-member-row span {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.creator-member-row img {
  object-fit: cover;
}

.creator-member-row span {
  display: grid;
  place-items: center;
  color: #17120c;
  font-size: 13px;
  font-weight: bold;
  background: #f8e6b0;
}

.creator-member-row strong,
.creator-member-row small {
  display: block;
}

.creator-member-row small {
  margin-top: 2px;
  color: rgba(248,230,176,0.7);
}

.creator-members-view-all {
  justify-self: start;
  margin: 2px 0 0;
}

.dashboard-modal .dashboard-modal-panel.creator-members-modal-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  box-sizing: border-box;
  width: min(100%, 720px);
  max-width: calc(100vw - 24px);
  max-height: min(82dvh, 720px);
  overflow: hidden;
}

.creator-members-modal-panel .creator-member-list {
  grid-auto-rows: minmax(min-content, max-content);
  align-content: start;
  min-width: 0;
  min-height: 0;
  max-height: min(56dvh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 10px 2px 0;
  scrollbar-gutter: stable;
}

.creator-members-modal-panel .creator-member-row,
.creator-members-modal-panel a.creator-member-row,
.creator-members-modal-panel a.creator-member-row:first-child {
  box-sizing: border-box;
  min-width: 0;
  min-height: 58px;
  height: auto;
  margin: 0;
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid rgba(248, 230, 176, 0.14);
  border-radius: 0;
}

.creator-members-modal-panel .creator-member-row:last-child {
  border-bottom: 0;
}

.creator-members-modal-panel .creator-member-row > div {
  min-width: 0;
  line-height: 1.3;
}

.creator-members-modal-panel .creator-member-row strong {
  overflow-wrap: anywhere;
}

.creator-members-modal-panel .creator-member-row small {
  line-height: 1.35;
}

#creator-members-load-more {
  justify-self: center;
  margin: 0;
}

#standard-dashboard[hidden],
#creator-dashboard[hidden],
#dashboard-mode-switch[hidden],
#creator-account-section[hidden] {
  display: none;
}

.dashboard-mode-switch {
  display: inline-flex;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 22px;
  padding: 4px;
  border: 1px solid rgba(248,230,176,0.22);
  border-radius: 999px;
  background: rgba(12, 10, 6, 0.46);
}

.dashboard-mode-option {
  min-width: 112px;
  min-height: 38px;
  margin: 0;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(248,230,176,0.78);
  box-shadow: none;
}

.dashboard-mode-option:hover,
.dashboard-mode-option:focus-visible {
  transform: none;
  box-shadow: none;
  color: #f8e6b0;
}

.dashboard-mode-option.active-dashboard-mode {
  background: linear-gradient(135deg, #d6b15f, #f8e6b0);
  color: #17120c;
}

.personal-dashboard {
  display: grid;
  gap: 20px;
  width: min(100%, 1320px);
  max-width: none;
  margin: 0 auto;
  font-size: 17px;
}

.personal-dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 4px;
  text-align: left;
}

.personal-dashboard-header h1 {
  font-size: 31px;
  letter-spacing: 0;
  margin: 0 0 5px;
  text-shadow: none;
}

.personal-dashboard-header p {
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
  max-width: none;
  text-align: left;
}

.dashboard-program-switcher {
  display: grid;
  gap: 6px;
  min-width: min(100%, 280px);
}

.dashboard-program-switcher[hidden] {
  display: none;
}

.dashboard-program-switcher label {
  color: rgba(248,230,176,0.76);
  font-size: 13px;
  font-weight: bold;
}

.dashboard-program-switcher select {
  min-height: 42px;
}

.personal-dashboard > section,
.personal-dashboard .app-section,
.personal-dashboard .dashboard-two-column {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  margin: 0;
  max-width: none;
  padding: 0;
}

.personal-dashboard .section-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 10px;
  text-align: left;
}

.personal-dashboard .section-header h2 {
  font-size: 23px;
  letter-spacing: 0;
  margin: 0;
}

.personal-dashboard .section-header p {
  font-size: 15px;
  line-height: 1.35;
  margin: 0;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 12px;
  align-items: start;
}

.dashboard-program-summary-wrap {
  display: grid;
}

.dashboard-summary-column {
  min-width: 0;
}

.dashboard-card-header {
  padding: 0 2px;
}

.dashboard-quiet-copy {
  margin: 0;
  opacity: 0.78;
}

.dashboard-program-grid,
.dashboard-two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.dashboard-summary-column .dashboard-program-grid {
  grid-template-columns: 1fr;
}

.dashboard-program-card,
.dashboard-panel {
  background: rgba(12, 10, 6, 0.52);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
  padding: 22px;
}

.dashboard-panel[hidden],
.dashboard-reminders-section[hidden] {
  display: none;
}

.dashboard-program-card h3,
.dashboard-program-card h2,
.dashboard-panel h2,
.dashboard-feedback-item h3 {
  font-size: 21px;
  letter-spacing: 0;
  margin: 0 0 4px;
}

.dashboard-program-card p,
.dashboard-feedback-item p,
.dashboard-quiet-copy {
  font-size: 17px;
  line-height: 1.45;
  margin: 0;
}

.dashboard-selected-program-card {
  gap: 12px;
  text-align: left;
}

.dashboard-selected-program-card h2 {
  font-size: 28px;
  line-height: 1.12;
  margin: 6px 0 2px;
  text-align: left;
}

.dashboard-selected-program-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.dashboard-selected-program-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  text-align: left;
}

.dashboard-program-creator {
  color: rgba(248,230,176,0.74);
  font-size: 14px;
  font-weight: bold;
}

.dashboard-program-current-day,
.dashboard-program-end-state {
  color: rgba(248,230,176,0.78);
  font-size: 14px;
  font-weight: bold;
}

.dashboard-program-end-state {
  color: #f8e6b0;
}

.dashboard-program-meta,
.dashboard-reminder-item {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dashboard-selected-program-card .dashboard-program-meta {
  text-align: left;
}

.dashboard-program-meta span,
.dashboard-item-meta,
.dashboard-card-status {
  color: rgba(248,230,176,0.78);
  font-size: 14px;
}

.dashboard-card-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  white-space: nowrap;
  border: 1px solid rgba(248,230,176,0.22);
  border-radius: 999px;
}

.dashboard-selected-category {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  justify-self: start;
  color: #f8e6b0;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0;
  border: 1px solid rgba(248,230,176,0.28);
  border-radius: 999px;
  background: rgba(248,230,176,0.12);
}

.dashboard-program-count-link {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
  padding: 12px 14px;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.dashboard-program-count-link strong {
  color: #f8e6b0;
  font-size: 15px;
}

.dashboard-program-count-link span,
.dashboard-text-link {
  color: rgba(248,230,176,0.78);
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
}

.dashboard-text-link:hover {
  color: #f8e6b0;
}

.dashboard-panel-header {
  margin-bottom: 2px;
}

.dashboard-focus-copy {
  display: grid;
  gap: 6px;
  font-size: 16px;
  line-height: 1.4;
}

.dashboard-focus-copy strong {
  color: #f8e6b0;
  font-size: 19px;
}

.dashboard-task-list,
.dashboard-feedback-list,
.dashboard-task-preview,
.dashboard-reminder-list {
  display: grid;
  gap: 9px;
}

.dashboard-action-card {
  cursor: pointer;
}

.dashboard-action-card:focus-visible {
  outline: 2px solid #f8e6b0;
  outline-offset: 3px;
}

.dashboard-task-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 0;
  padding: 11px 14px;
  text-align: left;
  cursor: pointer;
}

.dashboard-task-preview-row {
  padding: 7px 0;
  border-top: 1px solid rgba(248,230,176,0.12);
}

.dashboard-task-preview-row:first-child {
  border-top: 0;
}

.dashboard-task-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.dashboard-task-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.35;
}

.dashboard-task-summary {
  margin: 0;
  color: rgba(248,230,176,0.88);
  font-size: 17px;
  line-height: 1.45;
}

.dashboard-task-more {
  color: rgba(248,230,176,0.72);
  font-size: 14px;
}

.dashboard-feedback-item {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(248,230,176,0.14);
}

.dashboard-feedback-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.dashboard-feedback-item .app-btn {
  justify-self: start;
}

.dashboard-panel .app-btn {
  margin-top: auto;
  align-self: flex-start;
}

.dashboard-reminder-item {
  justify-content: space-between;
  padding: 10px 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
  border-top: 1px solid rgba(248,230,176,0.14);
}

.dashboard-reminder-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.dashboard-reminder-item strong {
  color: #f8e6b0;
  font-size: 16px;
}

.dashboard-reminder-item span {
  color: rgba(248,230,176,0.78);
  font-size: 14px;
}

.dashboard-reminder-banner {
  margin-top: -4px;
  margin-bottom: 0;
  padding: 12px 18px;
  background: rgba(248,230,176,0.08);
  border: 1px solid rgba(248,230,176,0.18);
  border-radius: 8px;
}

.dashboard-reminder-banner[hidden] {
  display: none;
}

.dashboard-reminder-banner .dashboard-reminder-list {
  gap: 0;
}

.dashboard-reminder-banner .dashboard-reminder-item {
  border-top: 0;
  padding: 0;
}

.dashboard-modal[hidden] {
  display: none;
}

.dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.dashboard-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 4, 0.72);
  backdrop-filter: blur(4px);
}

.dashboard-modal-panel {
  --dashboard-modal-padding: 24px;
  position: relative;
  z-index: 1;
  background: rgba(12, 10, 6, 0.9);
  width: min(100%, 720px);
  max-height: min(82vh, 720px);
  overflow: auto;
  padding: var(--dashboard-modal-padding);
}

.dashboard-modal-header {
  display: block;
  padding: 0 54px;
  text-align: center;
}

.dashboard-modal-close {
  position: absolute;
  top: var(--dashboard-modal-padding);
  right: var(--dashboard-modal-padding);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(248,230,176,0.26);
  background: rgba(0,0,0,0.16);
  color: #f8e6b0;
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
}

.dashboard-modal-open {
  overflow: hidden;
}

.dashboard-compact-empty {
  margin-bottom: 0;
  padding: 14px;
}

.dashboard-compact-empty h3 {
  font-size: 17px;
  margin: 0;
}

.personal-dashboard .app-btn {
  min-height: 42px;
  padding: 12px 18px;
  font-size: 16px;
}

.light-mode .dashboard-program-card,
.light-mode .dashboard-panel {
  background: rgba(255,255,255,0.9);
}

.light-mode .creator-hub-section {
  background: rgba(255,255,255,0.9);
  border-color: rgba(47,36,18,0.14);
  box-shadow: 0 12px 30px rgba(47,36,18,0.08);
}

.light-mode .creator-hub-section:hover {
  box-shadow: 0 12px 30px rgba(47,36,18,0.08);
}

.light-mode .creator-review-item,
.light-mode .creator-dashboard-program,
.light-mode .creator-community-activity,
.light-mode .creator-selected-program-card,
.light-mode .creator-members-card {
  background: rgba(255,255,255,0.9);
}

.light-mode #creator-dashboard-greeting {
  color: #8b6f2d;
}

.light-mode #creator-dashboard-status,
.light-mode .creator-review-member p,
.light-mode .creator-community-activity p,
.light-mode .creator-members-card-header p,
.light-mode .creator-member-row small,
.light-mode .creator-review-meta,
.light-mode .creator-program-stats,
.light-mode .creator-activity-meta,
.light-mode .creator-program-switcher label {
  color: rgba(47,36,18,0.72);
}

.light-mode .creator-review-meta span,
.light-mode .creator-program-stats span,
.light-mode .creator-activity-meta span {
  border-color: rgba(47,36,18,0.14);
}

.light-mode .creator-member-row {
  border-top-color: rgba(47,36,18,0.12);
}

.light-mode .dashboard-mode-switch {
  background: rgba(255,255,255,0.78);
  border-color: rgba(47,36,18,0.16);
}

.light-mode .dashboard-mode-option {
  color: rgba(47,36,18,0.72);
}

.light-mode .dashboard-mode-option:hover,
.light-mode .dashboard-mode-option:focus-visible {
  color: #6c5624;
}

.light-mode .dashboard-mode-option.active-dashboard-mode {
  color: #17120c;
}

.light-mode .dashboard-modal-panel {
  background: rgba(255,255,255,0.96);
}

.light-mode .dashboard-program-meta span,
.light-mode .dashboard-item-meta,
.light-mode .dashboard-card-status,
.light-mode .dashboard-reminder-item span,
.light-mode .dashboard-program-count-link span,
.light-mode .dashboard-text-link,
.light-mode .dashboard-task-more,
.light-mode .dashboard-program-switcher label {
  color: rgba(47,36,18,0.72);
}

.light-mode .dashboard-reminder-item strong,
.light-mode .dashboard-program-count-link strong,
.light-mode .dashboard-focus-copy strong {
  color: #8b6f2d;
}

.light-mode .dashboard-card-status,
.light-mode .dashboard-modal-close,
.light-mode .dashboard-selected-category {
  border-color: rgba(47,36,18,0.18);
}

.light-mode .dashboard-program-creator,
.light-mode .dashboard-program-current-day {
  color: rgba(47,36,18,0.66);
}

.light-mode .dashboard-program-end-state,
.light-mode .dashboard-selected-category {
  color: #8b6f2d;
}

.light-mode .dashboard-selected-category {
  background: rgba(214, 177, 95, 0.14);
}

.light-mode .dashboard-task-summary {
  color: rgba(47,36,18,0.82);
}

.light-mode .dashboard-task-preview-row {
  border-top-color: rgba(47,36,18,0.12);
}

.light-mode .dashboard-reminder-banner {
  background: rgba(214, 177, 95, 0.12);
  border-color: rgba(47,36,18,0.14);
}

@media (max-width: 860px) {
  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creator-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creator-review-item,
  .creator-dashboard-program,
  .creator-community-activity {
    grid-template-columns: 1fr;
  }

  .creator-review-actions {
    justify-content: flex-end;
  }

  .creator-review-meta,
  .creator-activity-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .creator-hub {
    --creator-section-padding-x: 20px;
    --creator-section-padding-y: 20px;
    --creator-section-content-gap: 18px;
    --creator-inner-gap: 10px;
    --creator-inner-padding-x: 20px;
    --creator-inner-padding-y: 20px;
  }

  .creator-hub-header,
  .creator-hub-section .section-header,
  .creator-selected-program-main,
  .creator-selected-program-actions,
  .creator-members-card-header,
  .creator-dashboard-program .program-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .creator-quick-actions,
  .creator-selected-program-actions,
  .creator-dashboard-program .app-btn {
    width: 100%;
  }

  .creator-quick-actions .app-btn,
  .creator-review-item .app-btn,
  .creator-dashboard-program .app-btn,
  .creator-selected-program-card .app-btn,
  .creator-members-card .app-btn {
    width: 100%;
  }

  .creator-review-actions .creator-message-action {
    flex-basis: 38px;
    width: 38px;
  }

  .creator-review-item,
  .creator-dashboard-program,
  .creator-community-activity,
  .creator-selected-program-card,
  .creator-members-card,
  .creator-stat-card {
    padding: var(--creator-inner-padding-y) var(--creator-inner-padding-x);
  }

  .creator-hub-section .section-header p {
    text-align: left;
  }

  .creator-overview-grid {
    grid-template-columns: 1fr;
  }

  .edit-program-actions .app-btn {
    width: 100%;
  }

  .dashboard-panel .app-btn,
  .dashboard-feedback-item .app-btn {
    width: 100%;
  }

  .personal-dashboard .section-header {
    align-items: stretch;
  }

  .personal-dashboard .section-header {
    flex-direction: column;
    gap: 3px;
  }

  .dashboard-text-link,
  .dashboard-panel .app-btn {
    width: 100%;
  }

  .personal-dashboard-header,
  .dashboard-selected-program-main {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-program-switcher {
    min-width: 0;
  }

  .dashboard-card-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-mode-switch {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-mode-option {
    min-width: 0;
    width: 100%;
  }

  .dashboard-card-status {
    justify-self: start;
    white-space: normal;
  }

  .dashboard-modal {
    padding: 12px;
  }

  .dashboard-modal-panel {
    --dashboard-modal-padding: 18px;
    max-height: 88vh;
  }
}

.program-detail-main {
  max-width: 1120px;
}

.program-back-link {
  margin-bottom: 18px;
}

.program-detail-shell,
.program-detail-section {
  max-width: none;
  text-align: left;
}

.program-hero {
  height: auto;
  min-height: 420px;
  display: flex;
  align-items: stretch;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(10,8,5,0.92), rgba(10,8,5,0.52)),
    var(--vedapt-background-image);
  background-size: cover;
  background-position: center;
}

.program-hero.has-cover {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  background: rgba(10, 8, 5, 0.88);
}

.program-hero-image {
  display: none;
}

.program-hero.has-cover .program-hero-image {
  grid-column: 2;
  grid-row: 1;
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: rgba(0,0,0,0.18);
}

.program-hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.program-hero-content {
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 34px;
}

.program-hero.has-cover .program-hero-content {
  grid-column: 1;
  grid-row: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  overflow: visible;
  background: rgba(10,8,5,0.94);
}

.program-hero-topline,
.program-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.program-hero h1 {
  margin: 0;
  font-size: 46px;
  letter-spacing: 0;
  text-align: left;
}

.program-detail-creator {
  color: #f8e6b0;
  font-weight: 800;
  text-decoration: none;
}

.program-detail-creator:hover {
  text-decoration: underline;
}

.program-hero-content > p {
  max-width: 620px;
  margin: 0;
  color: #e8dcc2;
  font-size: 16px;
  line-height: 1.6;
}

.program-detail-meta > div {
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid rgba(248,230,176,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
}

.program-detail-meta span {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  opacity: 0.72;
}

.program-detail-meta strong {
  color: #f8e6b0;
  font-size: 17px;
}

#program-join-btn {
  width: fit-content;
  min-width: 148px;
  min-height: 42px;
  padding: 0 18px;
}

.program-detail-tasks {
  display: grid;
  gap: 12px;
}

.program-progress {
  margin-bottom: 16px;
}

.program-progress-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.program-progress-header strong {
  color: #f8e6b0;
  font-size: 26px;
}

.program-progress-header span,
#program-progress-note {
  opacity: 0.78;
}

#program-progress-note {
  margin: 0;
  font-size: 14px;
}

.program-detail-task {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0;
}

.program-task-checkbox {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: #d6b15f;
  cursor: pointer;
}

.program-task-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.program-detail-task span {
  color: #f8e6b0;
  font-size: 22px;
  line-height: 1;
}

.program-detail-task p {
  margin: 0;
}

.related-program-card {
  min-height: 220px;
}

.light-mode .program-hero {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.94), rgba(255,255,255,0.7)),
    var(--vedapt-background-image);
  background-size: cover;
  background-position: center;
}

.light-mode .program-hero.has-cover {
  background: rgba(255,255,255,0.92);
}

.light-mode .program-hero.has-cover .program-hero-content {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.97), rgba(255,255,255,0.9) 72%, rgba(255,255,255,0.72));
}

.light-mode .program-hero-content > p {
  color: #4b3920;
}

.light-mode .program-detail-creator,
.light-mode .program-detail-meta strong,
.light-mode .program-progress-header strong,
.light-mode .program-detail-task span {
  color: #8b6f2d;
}

.light-mode .program-detail-meta > div {
  background: rgba(255,255,255,0.78);
  border-color: rgba(139,111,45,0.22);
}

.light-mode .program-free-toggle {
  background: rgba(255,255,255,0.75);
  border-color: rgba(139,111,45,0.18);
  color: #8b6f2d;
}

.light-mode .program-schedule-help {
  color: #7a682c;
}

.light-mode .program-task-schedule {
  border-color: rgba(139,111,45,0.18);
  background: rgba(255,255,255,0.48);
}

.light-mode .program-schedule-control label,
.light-mode .program-cover-field > label {
  color: #8b6f2d;
}

.light-mode .program-cover-help {
  color: #6f5f2f;
}

.light-mode .program-duration-error {
  color: #a84646;
}

.light-mode .task-builder-panel,
.light-mode .task-builder-week {
  background: rgba(255,255,255,0.72);
  border-color: rgba(139,111,45,0.18);
}

.light-mode .task-builder-panel h3,
.light-mode .task-builder-stepper-top p,
.light-mode .task-builder-week summary {
  color: #8b6f2d;
}

.light-mode .task-builder-panel p,
.light-mode .task-builder-week small {
  color: #6f5f2f;
}

.light-mode .task-builder .task-builder-input-guide {
  color: #6f5f2f;
}

@media (max-width: 680px) {
  .creator-onboarding-content {
    padding: 26px;
  }

  .creator-onboarding-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .creator-onboarding-actions .app-btn {
    width: 100%;
    margin: 0;
  }

  .program-create-card {
    align-items: stretch;
    flex-direction: column;
  }

  .program-create-card .app-btn,
  .program-modal-actions .app-btn {
    width: 100%;
  }

  .program-form-grid,
  .programs-grid {
    grid-template-columns: 1fr;
  }

  .program-price-row,
  .program-schedule-row,
  .program-card-header {
    flex-direction: column;
  }

  .program-schedule-row {
    display: block;
  }

  .program-price-row .app-input {
    width: 100%;
    max-width: none;
  }

  .task-builder-panel-header,
  .task-builder-stepper-top,
  .task-builder-stepper-actions,
  .task-builder-week summary {
    align-items: stretch;
    flex-direction: column;
  }

  .task-builder-stepper-top .app-btn,
  .task-builder-stepper-actions .app-btn {
    width: 100%;
  }

  .program-hero {
    height: auto;
    min-height: 0;
  }

  .program-hero.has-cover {
    grid-template-columns: 1fr;
    grid-template-rows: auto clamp(220px, 62vw, 340px);
  }

  .program-hero.has-cover .program-hero-image {
    grid-column: 1;
    grid-row: 2;
    height: 100%;
    min-height: 0;
  }

  .program-hero.has-cover .program-hero-content {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    padding-right: 18px;
    overflow: visible;
  }

  .program-hero-content {
    padding: 24px 18px;
  }

  .program-hero h1 {
    font-size: 34px;
  }

  .program-progress-header {
    align-items: flex-start;
    flex-direction: column;
  }

  #program-join-btn {
    width: 100%;
  }
}

.program-progress-text {
  margin-top: 10px;
  font-weight: bold;
}
.program-complete {
  color: #f8e6b0;
  font-weight: bold;
  text-shadow: 0 0 14px rgba(248,230,176,0.45);
}

.light-mode .program-complete {
  color: #8b6f2d;
  text-shadow: none;
}
.program-badge {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  display: inline-block;
  font-weight: bold;
}

.locked-badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  opacity: 0.7;
}

.unlocked-badge {
  background: rgba(248,230,176,0.18);
  border: 1px solid rgba(248,230,176,0.4);
  color: #f8e6b0;
  box-shadow: 0 0 20px rgba(248,230,176,0.25);
}

.light-mode .unlocked-badge {
  color: #8b6f2d;
}
.active-nav {
  background: rgba(248,230,176,0.14);
  border: 1px solid rgba(248,230,176,0.28);
  border-radius: 999px;
  padding: 5px 10px;

  color: #f8e6b0 !important;

  box-shadow:
    0 0 18px rgba(248,230,176,0.12);
}

.light-mode .active-nav {
  color: #8b6f2d !important;

  background: rgba(139,111,45,0.08);

  border: 1px solid rgba(139,111,45,0.14);
}

.bell-icon {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.notification-actions {
  margin-bottom: 28px;
}
.creator-card p:first-of-type {
  min-height: 140px;
}
.creator-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.82);

  align-items: center;
  justify-content: center;

  z-index: 9999;
}

.creator-modal-content {
  width: 90%;
  max-width: 380px;
  max-height: 85vh;
  overflow-y: auto;

  padding: 28px;
  position: relative;

  text-align: center;

  background: #1e1e1e;
  border: 1px solid rgba(248, 230, 176, 0.25);
  border-radius: 22px;

  box-shadow:
    0 0 40px rgba(248, 230, 176, 0.16),
    0 0 80px rgba(0, 0, 0, 0.55);
}

#modal-image {
  width: 120px;
  height: 120px;

  object-fit: cover;
  border-radius: 50%;

  margin: 0 auto 18px;
  display: block;
}

#close-creator-modal {
  position: absolute;
  top: 14px;
  right: 14px;

  width: 36px;
  height: 36px;

  border-radius: 50%;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding-left: 1px;

  font-size: 16px;
  line-height: 1;

  z-index: 2;
}

#modal-stats {
  margin-bottom: 18px;
}

#modal-stats p {
  margin: 8px 0;
  font-weight: 600;
}

#modal-description {
  margin-bottom: 18px;
}

.modal-program-item {
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
}

#join-creator-btn {
  margin-top: 20px;
}

#creator-joined-count {
  margin-top: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  opacity: 0.85;
}

#creator-reviews {
  margin-top: 22px;
}

#reviews-list {
  margin-bottom: 14px;
}

.review-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(248,230,176,0.16);
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
  text-align: left;
}

.review-card p {
  margin: 0 0 6px;
  font-size: 15px;
}

.review-card span {
  opacity: 0.75;
  font-size: 13px;
}

#review-input {
  width: 100%;
  margin: 10px 0;
}
.logout-btn {
  border: none;
  border-radius: 999px;

  padding: 6px 12px;

  background: rgba(248,230,176,0.08);
  color: #f8e6b0;

  cursor: pointer;
  font-weight: 600;
}

.logout-btn:hover {
  background: rgba(248,230,176,0.18);
}

.light-mode .logout-btn {
  background: rgba(139,111,45,0.08);
  color: #8b6f2d;
}

.logged-out-main-links,
.logged-in-actions,
.logged-out-actions {
  display: contents;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);

  margin-left: auto;
  min-width: 0;

  flex-wrap: nowrap;
  overflow: visible;
}

.nav-links a,
.nav-links button {
  color: #f8e6b0;

  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;

  text-decoration: none;
  white-space: nowrap;
}

.light-mode .nav-links a,
.light-mode .nav-links button {
  color: #17120c;
}

.private-link {
  display: none;
}

/* Unresolved authentication is a loading state, never a logged-out paint. */
body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-out-link,
body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .private-link,
body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-out-actions,
body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .user-menu {
  display: none !important;
}

/* The unresolved desktop navbar uses the authenticated boxes verbatim. */
@media (min-width: 769px) {
  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "brand center actions";
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) nav h2 {
    grid-area: brand;
    justify-self: start;
    margin-right: 0;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .nav-links {
    display: contents;
    margin-left: 0;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-out-main-links {
    grid-area: center;
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
    justify-self: center;
    margin-left: 0;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-out-main-links > a:not(.logged-out-link) {
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    line-height: 1;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-out-main-links > a[href="dashboard"],
  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-in-actions > a[href="messages"],
  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-in-actions > a[href="notifications"],
  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-in-actions > .user-menu,
  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-in-actions #user-avatar-btn {
    display: flex !important;
    visibility: hidden;
    pointer-events: none;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-out-main-links > a[href="dashboard"] {
    display: inline-flex !important;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-in-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
    justify-self: end;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-in-actions > :is(
    a[href="messages"],
    a[href="notifications"]
  ) {
    min-width: 70px;
    width: 70px;
    height: 38px;
    align-items: center;
    justify-content: flex-start;
    margin-left: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    background: transparent;
    position: relative;
    overflow: visible;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-in-actions > :is(
    a[href="messages"],
    a[href="notifications"]
  ) > .nav-icon-surface {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 999px;
  }

  html:not(.auth-guest-known) body:is(.auth-pending, :not(.auth-resolved), :not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav])) .logged-in-actions > :is(
    a[href="messages"],
    a[href="notifications"]
  ) > :is(#notification-badge, .nav-badge) {
    position: absolute;
    left: 38px;
    top: 50%;
    margin: 0;
    transform: translateY(-50%);
  }
}

/* A previously signed-out tab uses the final guest geometry before authority
   confirms it. Authenticated-only slots remain outside the layout. */
@media (min-width: 769px) {
  html.auth-guest-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "brand center actions";
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
  }

  html.auth-guest-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) nav h2 { grid-area: brand; justify-self: start; margin-right: 0; }
  html.auth-guest-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .nav-links { display: contents; margin-left: 0; }
  html.auth-guest-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .logged-out-main-links { grid-area: center; display: flex !important; align-items: center; gap: clamp(12px, 1.6vw, 24px); justify-self: center; margin-left: 0; }
  html.auth-guest-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .logged-out-actions { grid-area: actions; display: flex !important; align-items: center; gap: clamp(12px, 1.6vw, 24px); justify-self: end; }
  html.auth-guest-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .logged-out-link { display: inline-flex !important; }
  html.auth-guest-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .nav-links a:not(.nav-icon-link) { padding: 5px 10px; border: 1px solid transparent; border-radius: 999px; line-height: 1; }
  html.auth-guest-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) :is(.auth-link, .theme-icon-btn) { margin-left: 0; }
}

@media (min-width: 769px) {
  html.auth-nav-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .logged-out-main-links > a[href="dashboard"] {
    display: inline-flex !important;
    visibility: visible;
    pointer-events: none;
  }

  html.auth-nav-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .logged-in-actions > a[href="messages"],
  html.auth-nav-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .logged-in-actions > a[href="notifications"] {
    display: flex !important;
    visibility: visible;
    pointer-events: none;
  }

  html.auth-nav-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .logged-in-actions > .user-menu {
    display: flex !important;
    visibility: visible;
    pointer-events: none;
  }

  html.auth-nav-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) .logged-in-actions #user-avatar-btn {
    display: flex !important;
    visibility: visible;
    pointer-events: none;
  }

  html.auth-nav-known body:not(.logged-in):not(.logged-out):has(nav[data-auth-hydration-nav]) #nav-avatar-img {
    visibility: hidden;
  }
}

/* READY is the only state that activates account controls. This deliberately
   follows the pending presentation rules so an already-authoritative navbar
   cannot retain their inert pointer handling. */
@media (min-width: 769px) {
  body.logged-in.auth-resolved .logged-in-actions > :is(
    a[href="messages"],
    a[href="notifications"],
    .user-menu
  ),
  body.logged-in.auth-resolved .logged-in-actions #user-avatar-btn {
    pointer-events: auto !important;
    visibility: visible !important;
  }
}

.auth-link {
  background: transparent;
  border: none;

  padding: 0;

  line-height: 1;
}

.auth-link:hover {
  color: #ffffff;
}

.theme-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(248, 230, 176, 0.28);
  background: rgba(248, 230, 176, 0.1);
  color: #f8e6b0;
  font-family: Arial, sans-serif;
  font-size: 17px;
  line-height: 1;
}

.theme-icon-btn:hover {
  background: rgba(248, 230, 176, 0.2);
}

.light-mode .theme-icon-btn {
  border-color: rgba(139, 111, 45, 0.24);
  background: rgba(139, 111, 45, 0.08);
  color: #17120c;
}

.side-theme-toggle {
  margin-top: 4px;
}

.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 4px;
  z-index: 10000;
}

.user-avatar-btn {
  display: none;

  width: 30px;
  height: 30px;

  border-radius: 50%;

  overflow: hidden;

  border: 1px solid rgba(248, 230, 176, 0.25);

  background: rgba(248, 230, 176, 0.08);

  color: #f8e6b0;

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;

  padding: 0;

  align-items: center;
  justify-content: center;

  line-height: 1;
}

#nav-avatar-img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  display: block;
}

.user-avatar-btn:hover {
  background: rgba(248, 230, 176, 0.2);
}

.user-avatar-btn.avatar-empty::before {
  content: none;
}

.user-dropdown {
  display: none;

  position: absolute;
  right: 0;
  top: 40px;

  width: 170px;
  padding: 14px 0;

  border-radius: 12px;

  background: #111;
  border: 1px solid rgba(248, 230, 176, 0.15);

  z-index: 10001;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.user-menu:hover .user-dropdown {
  display: block;
}

.nav-links .user-dropdown a,
.nav-links .user-dropdown button {
  all: unset;

  box-sizing: border-box;

  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 12px 0;

  color: #f8e6b0;

  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;

  text-align: center;

  cursor: pointer;
}

.nav-links .user-dropdown a:hover,
.nav-links .user-dropdown button:hover {
  background: rgba(248, 230, 176, 0.1);
}

.nav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  box-sizing: border-box;
}

#notification-badge,
.nav-badge {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 26px;
  height: 26px;

  margin-left: 0;

  border-radius: 50%;

  background: #f8e6b0;
  color: #17120c;

  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;

  line-height: 1;

  position: relative;
  top: 0;

  padding: 0;
  flex-shrink: 0;
}

.light-mode #notification-badge,
.light-mode .nav-badge {
  background: #8b6f2d;
  color: #fff;
}

.message-badge {
  margin-left: 6px;
}

.notification-sender-link {
  color: #f8e6b0;
  font-weight: 800;
  text-decoration: none;
}

.notification-sender-link:hover {
  text-decoration: underline;
}

.light-mode .notification-sender-link {
  color: #8b6f2d;
}

nav {
  overflow: visible;
}
.logged-out nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "brand center actions";
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
}

.logged-out nav h2 {
  grid-area: brand;
  justify-self: start;
}

.logged-out .nav-links {
  display: contents;
  margin-left: 0;
}

.logged-out .logged-out-main-links {
  grid-area: center;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
  justify-self: center;
  margin-left: 0;
}

.logged-out .logged-out-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
  justify-self: end;
}

.logged-out .nav-links a:not(.nav-icon-link) {
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  line-height: 1;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.logged-out .nav-links a:not(.nav-icon-link):hover {
  background: rgba(248,230,176,0.14);
  border-color: rgba(248,230,176,0.28);
  color: #f8e6b0;
  box-shadow: 0 0 18px rgba(248,230,176,0.12);
}

.light-mode.logged-out .nav-links a:not(.nav-icon-link):hover {
  background: rgba(139,111,45,0.08);
  border-color: rgba(139,111,45,0.14);
  color: #8b6f2d;
}

.logged-out .auth-link {
  margin-left: 0;
}

.logged-out .theme-icon-btn {
  margin-left: 0;
}

@media (max-width: 768px) {
  .logged-out nav {
    display: flex;
    gap: 15px;
  }

  .logged-out .nav-links {
    display: flex;
  }

  .logged-out .logged-out-main-links,
  .logged-out .logged-out-actions {
    display: contents;
  }
}

.logged-in .nav-links {
  display: contents;
  margin-left: 0;
}

.logged-in nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "brand center actions";
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
}

.logged-in nav h2 {
  grid-area: brand;
  justify-self: start;
}

.logged-in .logged-out-main-links {
  grid-area: center;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
  justify-self: center;
  margin-left: 0;
}

.logged-in .logged-out-main-links > a:not(.logged-out-link) {
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  line-height: 1;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.logged-in .logged-in-actions > .nav-icon-link {
  min-width: 70px;
  width: 70px;
  height: 38px;
  align-items: center;
  justify-content: flex-start;
  margin-left: 0;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  position: relative;
  overflow: visible;
}

.logged-in .logged-in-actions > .nav-icon-link > .nav-icon-surface {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.logged-in .logged-in-actions > .nav-icon-link > :is(#notification-badge, .nav-badge) {
  position: absolute;
  left: 38px;
  top: 50%;
  margin: 0;
  transform: translateY(-50%);
}

.logged-in .logged-in-actions > .nav-icon-link:not(.active-nav) {
  background: transparent;
}

.light-mode.logged-in .logged-in-actions > .nav-icon-link:not(.active-nav) {
  background: transparent;
}

@media (min-width: 769px) {
  .logged-in .logged-out-main-links > a:not(.logged-out-link):hover,
  .logged-in .logged-in-actions > .nav-icon-link:hover > .nav-icon-surface,
  .logged-in .logged-in-actions > .nav-icon-link.active-nav > .nav-icon-surface {
    background: rgba(248,230,176,0.14);
    border-color: rgba(248,230,176,0.28);
    color: #f8e6b0;
    box-shadow: 0 0 18px rgba(248,230,176,0.12);
  }

  .light-mode.logged-in .logged-out-main-links > a:not(.logged-out-link):hover,
  .light-mode.logged-in .logged-in-actions > .nav-icon-link:hover > .nav-icon-surface,
  .light-mode.logged-in .logged-in-actions > .nav-icon-link.active-nav > .nav-icon-surface {
    background: rgba(139,111,45,0.08);
    border-color: rgba(139,111,45,0.14);
    color: #8b6f2d;
    box-shadow: 0 0 18px rgba(139,111,45,0.08);
  }

}

/* Shared category filter */
.category-filter-slot {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 8;
  margin: -4px auto 18px;
}

.category-filter-section-open {
  position: relative;
  z-index: 20;
}

.category-filter {
  position: relative;
  display: inline-flex;
}

.category-filter__button,
.category-filter__clear {
  appearance: none;
  border: 1px solid rgba(248, 230, 176, 0.28);
  border-radius: 10px;
  background: rgba(248, 230, 176, 0.1);
  color: #f8e6b0;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
}

.category-filter__button {
  min-height: 38px;
  padding: 8px 13px;
}

.category-filter__button:hover,
.category-filter__button[aria-expanded="true"] {
  border-color: #f8e6b0;
  background: rgba(248, 230, 176, 0.2);
}

.category-filter__popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: min(292px, calc(100vw - 36px));
  box-sizing: border-box;
  transform: translateX(-50%);
  padding: 14px;
  border: 1px solid rgba(248, 230, 176, 0.28);
  border-radius: 14px;
  background: #17120c;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
  text-align: left;
}

.category-filter__choices {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.category-filter__choices legend {
  margin-bottom: 10px;
  padding: 0;
  color: #f8e6b0;
  font-size: 0.84rem;
  font-weight: 800;
}

.category-filter__choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.category-filter__choice {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #f6ead0;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
}

.category-filter__choice:hover {
  background: rgba(248, 230, 176, 0.1);
}

.category-filter__choice input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #d6b15f;
}

.category-filter__choice:has(input:checked) {
  border-color: rgba(248, 230, 176, 0.32);
  background: rgba(248, 230, 176, 0.14);
}

.category-filter__clear {
  width: 100%;
  min-height: 34px;
  margin-top: 12px;
  padding: 6px 10px;
}

.category-filter__clear:hover:not(:disabled) {
  border-color: #f8e6b0;
  background: rgba(248, 230, 176, 0.18);
}

.category-filter__button:focus-visible,
.category-filter__clear:focus-visible,
.category-filter__choice:has(input:focus-visible) {
  outline: 2px solid #f8e6b0;
  outline-offset: 2px;
}

.light-mode .category-filter__button,
.light-mode .category-filter__clear {
  border-color: rgba(139, 111, 45, 0.3);
  background: rgba(214, 177, 95, 0.12);
  color: #755b22;
}

.light-mode .category-filter__button:hover,
.light-mode .category-filter__button[aria-expanded="true"],
.light-mode .category-filter__clear:hover:not(:disabled) {
  border-color: #8b6f2d;
  background: rgba(214, 177, 95, 0.2);
}

.light-mode .category-filter__popover {
  border-color: rgba(139, 111, 45, 0.28);
  background: #fffdf8;
  box-shadow: 0 16px 32px rgba(76, 57, 20, 0.18);
}

.light-mode .category-filter__choices legend,
.light-mode .category-filter__choice {
  color: #493712;
}

.light-mode .category-filter__choice:hover {
  background: rgba(214, 177, 95, 0.12);
}

.light-mode .category-filter__choice:has(input:checked) {
  border-color: rgba(139, 111, 45, 0.32);
  background: rgba(214, 177, 95, 0.16);
}

.light-mode .category-filter__button:focus-visible,
.light-mode .category-filter__clear:focus-visible,
.light-mode .category-filter__choice:has(input:focus-visible) {
  outline-color: #8b6f2d;
}

@media (max-width: 420px) {
  .category-filter-slot {
    margin-bottom: 16px;
  }

  .category-filter__popover {
    width: min(292px, calc(100vw - 28px));
    padding: 12px;
  }

  .category-filter__choice-list {
    gap: 4px;
  }
}

/* Discovery-page category filter placement */
.feed-discovery-controls,
.program-discovery-controls,
.creator-discovery-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 18px;
  margin-bottom: 18px;
}

.feed-page .feed-tabs,
.feed-page #feed-category-filter,
.programs-page .program-search-input,
.programs-page #program-category-filter,
.creators-page #creator-search,
.creators-page #creator-category-filter {
  margin: 0;
}

.feed-page .feed-tabs {
  justify-content: flex-start;
}

.programs-page .program-search-input,
.creators-page #creator-search {
  width: 100%;
  max-width: none;
}

.feed-page #feed-category-filter,
.programs-page #program-category-filter,
.creators-page #creator-category-filter {
  justify-content: flex-end;
}

.feed-page #feed-category-filter .category-filter__popover,
.programs-page #program-category-filter .category-filter__popover,
.creators-page #creator-category-filter .category-filter__popover {
  right: 0;
  left: auto;
  transform: none;
}

@media (max-width: 768px) {
  .feed-discovery-controls,
  .program-discovery-controls,
  .creator-discovery-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .feed-page #feed-category-filter,
  .programs-page #program-category-filter,
  .creators-page #creator-category-filter {
    justify-content: flex-start;
  }

  .feed-page #feed-category-filter .category-filter__popover,
  .programs-page #program-category-filter .category-filter__popover,
  .creators-page #creator-category-filter .category-filter__popover {
    right: auto;
    left: 0;
  }
}

.logged-in .logged-in-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 24px);
  justify-self: end;
}

@media (max-width: 768px) {
  .logged-in nav {
    display: flex;
    gap: 15px;
  }

  .logged-in .nav-links {
    display: flex;
  }

  .logged-in .logged-out-main-links {
    display: contents;
  }

  .logged-in .logged-in-actions {
    display: contents;
  }
}

.logged-out nav {
  min-height: auto;
}
nav h2 {
  font-size: 36px;
  margin: 0;
  margin-right: auto;
  flex-shrink: 0;
}

.logged-out nav h2 {
  margin-right: 0;
}
.user-dropdown {
  top: 30px;
}
#register-modal {
  display: none;

  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.85);
backdrop-filter: blur(8px);

  align-items: center;
  justify-content: center;

  z-index: 9999;
}

#register-modal .modal-content {
  width: min(420px, 90%);

  position: relative;

  background: #111;

  border: 1px solid rgba(248, 230, 176, 0.25);

  box-shadow:
    0 0 40px rgba(248, 230, 176, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.6);

  padding: 30px;

  border-radius: 20px;
}

#close-register-btn {
  position: absolute;
  top: 14px;
  right: 14px;

  background: transparent;
  border: none;

  color: #f8e6b0;

  cursor: pointer;
  font-weight: 700;
}

#signup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#auth-message {
  margin-top: 18px;

  color: #f8e6b0;

  font-weight: 700;

  text-align: center;
}

#register-modal.is-open {
  display: flex;
}

.auth-text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 12px;

  border: 0;
  background: transparent;
  color: #f8e6b0;

  cursor: pointer;
  font-weight: 700;
}

.password-reset-form {
  margin-top: 14px;

  display: grid;
  gap: 10px;
}

.password-reset-form[hidden] {
  display: none;
}

#resend-verification-btn {
  margin: 12px auto 0;
}

.email-verification-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;

  padding: 12px 18px;

  border-bottom: 1px solid rgba(248, 230, 176, 0.22);
  background: rgba(248, 230, 176, 0.12);
  color: #f8e6b0;

  font-weight: 700;
  text-align: center;
}

.email-verification-banner[hidden] {
  display: none;
}

.email-verification-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.email-verification-actions .app-btn {
  width: auto;
  min-height: 36px;
  padding: 8px 12px;
}

.auth-status:empty {
  display: none;
}

.auth-pending .auth-only-logged-out {
  visibility: hidden;
  pointer-events: none;
}

body.light-mode #register-modal {
  background: rgba(47, 36, 18, 0.28);
}

body.light-mode #register-modal .modal-content {
  background: var(--arete-light-card-solid);
  border-color: var(--arete-light-border);
  color: var(--arete-light-ink);
  box-shadow: 0 20px 50px rgba(47, 36, 18, 0.18);
}

body.light-mode #register-modal :is(h2, h3, strong, label) {
  color: var(--arete-light-gold-strong);
}

body.light-mode #close-register-btn {
  background: rgba(90, 67, 21, 0.1);
  border: 1px solid var(--arete-light-border);
  color: var(--arete-light-ink);
}

body.light-mode #close-register-btn:hover,
body.light-mode #close-register-btn:focus-visible {
  background: rgba(90, 67, 21, 0.18);
  color: #000;
}

body.light-mode :is(#auth-message, .email-verification-banner) {
  color: var(--arete-light-ink);
}

body.light-mode .email-verification-banner {
  background: rgba(255, 250, 240, 0.96);
  border-color: var(--arete-light-border);
}

body.light-mode .email-verification-banner[data-status="success"] {
  background: rgba(17, 107, 60, 0.1);
  border-color: rgba(17, 107, 60, 0.35);
  color: var(--arete-light-success);
}

body.light-mode .email-verification-banner[data-status="warning"] {
  background: rgba(108, 86, 36, 0.12);
  border-color: rgba(108, 86, 36, 0.38);
  color: var(--arete-light-gold-strong);
}

body.light-mode .email-verification-banner[data-status="error"] {
  background: rgba(159, 29, 29, 0.09);
  border-color: rgba(159, 29, 29, 0.32);
  color: var(--arete-light-error);
}

body.light-mode .email-verification-banner a {
  color: var(--arete-light-gold-strong);
  text-decoration-thickness: 2px;
}
.rank-card {
  transition: transform 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-4px);
}

.rank-1 {
  border: 2px solid gold;
}

.rank-2 {
  border: 2px solid silver;
}

.rank-3 {
  border: 2px solid #cd7f32;
}
.rank-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.rank-card a {
  color: inherit;
  text-decoration: none;
}

.rank-card a:hover {
  text-decoration: underline;
}
.creator-type-tag {
  display: inline-block;

  margin: 10px 0;

  padding: 5px 12px;

  border-radius: 999px;

  border: 1px solid rgba(248, 230, 176, 0.25);

  background: rgba(248, 230, 176, 0.08);

  color: #f8e6b0;

  font-size: 14px;
  font-weight: 700;
}
.creator-card .creator-type-tag {
  width: auto !important;
  height: auto !important;

  min-width: 0 !important;
  min-height: 0 !important;

  display: inline-block !important;

  margin: 10px auto !important;
  padding: 5px 12px !important;

  border-radius: 999px !important;

  border: 1px solid rgba(248, 230, 176, 0.25) !important;
  background: rgba(248, 230, 176, 0.08) !important;

  color: #f8e6b0 !important;

  font-size: 14px !important;
  font-weight: 700 !important;

  text-align: center !important;
}
#creator-profile-image {
  width: 180px;
  height: 180px;

  object-fit: cover;

  border-radius: 20px;

  display: block;

  margin: 0 auto 20px;
}
#back-to-creators {
  display: inline-block;

  margin-bottom: 20px;

  padding: 10px 16px;

  border-radius: 10px;

  background: rgba(255,255,255,0.08);

  text-decoration: none;
}
#creator-program-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.review-header {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 10px;
}

.review-avatar {
  width: 34px;
  height: 34px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(248, 230, 176, 0.12);
  border: 1px solid rgba(248, 230, 176, 0.25);

  color: #f8e6b0;

  font-weight: 800;
}
.review-date {
  display: block;

  margin-top: 8px;

  opacity: 0.65;

  font-size: 13px;
}
#creator-profile-summary {
  opacity: 0.8;

  font-size: 15px;

  margin: 10px 0 20px;

  text-align: center;
}
#creator-achievements {
  display: flex;
  justify-content: center;
  text-align: center;

  margin: 25px 0;
}
.feed-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;

  margin-bottom: 16px;

  flex-wrap: wrap;
}

.feed-tab {
  padding: 10px 16px;

  border-radius: 999px;

  border: 1px solid rgba(248, 230, 176, 0.2);

  background: rgba(255, 255, 255, 0.05);

  color: #f8e6b0;

  cursor: pointer;

  font-weight: 700;
}

.active-feed-tab {
  background: rgba(248, 230, 176, 0.18);

  border-color: rgba(248, 230, 176, 0.45);

  box-shadow: 0 0 18px rgba(248, 230, 176, 0.12);
}

#feed-tab-message {
  text-align: center;

  margin-bottom: 17px;

  opacity: 0.85;
}
.settings-creator-badge[hidden],
.profile-creator-badge[hidden],
.settings-action-success[hidden] {
  display: none;
}

#auth-action-password-form[hidden],
.auth-action-buttons[hidden],
.auth-action-email[hidden] {
  display: none;
}

.auth-action-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 4vw, 40px);
}

.not-found-card h1 {
  margin: 8px 0 16px;
  font-size: clamp(36px, 8vw, 52px);
  letter-spacing: 0;
}

.not-found-card h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.not-found-card .app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  text-decoration: none;
}

.auth-action-header {
  display: flex;
  width: min(560px, 100%);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.auth-action-brand {
  color: #f8e6b0;
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.45);
}

.auth-action-main {
  display: grid;
  flex: 1;
  width: min(560px, 100%);
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(32px, 8vh, 76px) 0;
  place-items: center;
}

.auth-action-card {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: clamp(24px, 5vw, 38px);
  text-align: left;
  background: rgba(20, 18, 15, 0.76);
  border-color: rgba(248, 230, 176, 0.25);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.auth-action-card:hover {
  transform: none;
}

.auth-action-kicker {
  margin: 0 0 8px;
  color: #d6b15f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.auth-action-card h1 {
  margin: 0;
  color: #f8e6b0;
  font-size: clamp(32px, 6vw, 44px);
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: none;
}

.auth-action-card > #auth-action-message {
  margin: 14px 0 0;
  color: #e8dcc2;
  font-size: 1.05rem;
  line-height: 1.6;
}

.auth-action-email {
  margin: 18px 0 0;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border: 1px solid rgba(248, 230, 176, 0.2);
  border-radius: 10px;
  background: rgba(248, 230, 176, 0.08);
  color: #f5f0df;
  font-size: 0.92rem;
  font-weight: 700;
}

#auth-action-password-form {
  margin-top: 22px;
}

.auth-action-field {
  margin-top: 16px;
}

.auth-action-field .settings-field-label {
  margin-top: 0;
}

.auth-action-password-control {
  position: relative;
}

.auth-action-password-control .app-input {
  margin: 0;
  padding-right: 78px;
}

.auth-action-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 36px;
  margin: 0;
  padding: 6px 10px;
  transform: translateY(-50%);
  border: 1px solid rgba(248, 230, 176, 0.25);
  border-radius: 9px;
  background: rgba(248, 230, 176, 0.09);
  color: #f8e6b0;
  font-family: inherit;
  font-size: 0.82rem;
}

.auth-action-password-toggle:hover,
.auth-action-password-toggle:focus-visible {
  transform: translateY(-50%);
  background: rgba(248, 230, 176, 0.18);
  box-shadow: none;
}

.auth-action-field-help {
  margin: 8px 0 0;
  color: rgba(232, 220, 194, 0.82);
  font-size: 0.9rem;
  line-height: 1.45;
}

#auth-action-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 22px;
}

.auth-action-status {
  min-height: 0;
  margin: 16px 0 0;
  color: #f5d27b;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
}

.auth-action-status:empty {
  display: none;
}

.auth-action-status[data-tone="error"] {
  color: #ffb5ad;
}

.auth-action-status[data-tone="loading"] {
  color: #f5d27b;
}

.auth-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.auth-action-buttons .app-btn {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-decoration: none;
}

.auth-action-footer {
  display: flex;
  width: min(560px, 100%);
  margin: 0 auto;
  justify-content: space-between;
  gap: 16px;
  color: rgba(232, 220, 194, 0.78);
  font-size: 0.9rem;
  text-align: left;
}

.auth-action-footer a {
  color: #f8e6b0;
  font-weight: 700;
}

body.light-mode .auth-action-brand,
body.light-mode .auth-action-card h1 {
  color: var(--arete-light-gold-strong);
  text-shadow: none;
}

body.light-mode .auth-action-card {
  background: rgba(255, 250, 240, 0.94);
  border-color: var(--arete-light-border);
  box-shadow: 0 20px 50px rgba(47, 36, 18, 0.18);
}

body.light-mode .auth-action-card > #auth-action-message,
body.light-mode .auth-action-field-help,
body.light-mode .auth-action-footer {
  color: var(--arete-light-subtle);
}

body.light-mode .auth-action-email {
  border-color: rgba(90, 67, 21, 0.24);
  background: rgba(214, 177, 95, 0.12);
  color: var(--arete-light-ink);
}

body.light-mode .auth-action-password-toggle {
  border-color: rgba(90, 67, 21, 0.26);
  background: rgba(214, 177, 95, 0.12);
  color: var(--arete-light-gold-strong);
}

body.light-mode .auth-action-password-toggle:hover,
body.light-mode .auth-action-password-toggle:focus-visible {
  background: rgba(214, 177, 95, 0.22);
}

body.light-mode .auth-action-status[data-tone="error"] {
  color: var(--arete-light-error);
}

body.light-mode .auth-action-status[data-tone="loading"] {
  color: var(--arete-light-gold-strong);
}

@media (max-width: 520px) {
  .auth-action-main {
    padding-block: 34px;
  }

  .auth-action-footer {
    align-items: center;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .auth-action-buttons .app-btn {
    width: 100%;
  }
}

.feed-load-more-btn {
  display: block;

  margin: 18px auto 0;
}

.feed-load-more-btn[hidden] {
  display: none;
}

.feed-post.app-card {
  padding: 16px;
}

.feed-post h3 {
  margin-bottom: 12px;
}

.feed-post h4 {
  margin: 0 0 10px;
}

.feed-program-source {
  display: inline-flex;
  width: fit-content;
  margin: -2px 0 10px;
  padding: 5px 10px;
  border: 1px solid rgba(248, 230, 176, 0.28);
  border-radius: 999px;
  background: rgba(248, 230, 176, 0.1);
  color: #f8e6b0;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.feed-program-source:hover {
  border-color: rgba(248, 230, 176, 0.48);
  background: rgba(248, 230, 176, 0.17);
  text-decoration: none;
}

.light-mode .feed-program-source {
  border-color: rgba(139, 111, 45, 0.22);
  background: rgba(214, 177, 95, 0.14);
  color: #6b4f16;
}

.feed-post p {
  margin: 0 0 12px;
}

.feed-post-image {
  display: block;

  width: auto;

  height: auto;

  max-width: 100%;

  max-height: 420px;

  object-fit: contain;

  background: transparent;

  border-radius: 16px;

  margin: 13px auto;
}

@media (max-width: 768px) {
  .feed-post-image {
    max-height: 360px;
  }
}
.compact-actions {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: 12px;
}

.icon-action {
  background: transparent;

  border: none;

  color: #f8e6b0;

  cursor: pointer;

  font-size: 15px;

  font-weight: 600;

  padding: 4px;
}

.icon-action:hover {
  opacity: 0.8;
}
.feed-post-header {
  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  gap: 10px;

  margin-bottom: 8px;
}

.feed-post-time {
  font-size: 13px;

  color: #9c9c9c;

  line-height: 1;
}

.feed-post-meta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.post-owner-menu {
  position: relative;
  flex: 0 0 auto;
}

.post-owner-menu-btn {
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(248, 230, 176, 0.2);
  border-radius: 8px;
  background: rgba(248, 230, 176, 0.06);
  color: #f8e6b0;
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1;
}

.post-owner-menu-btn:hover,
.post-owner-menu-btn:focus-visible {
  transform: none;
  background: rgba(248, 230, 176, 0.13);
  border-color: rgba(248, 230, 176, 0.36);
  box-shadow: 0 0 18px rgba(248, 230, 176, 0.16);
}

.post-owner-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 174px;
  padding: 8px;
  border: 1px solid rgba(248, 230, 176, 0.18);
  border-radius: 10px;
  background: rgba(17, 15, 12, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
  z-index: 50;
}

.post-owner-menu.open .post-owner-dropdown {
  display: grid;
  gap: 4px;
}

.post-menu-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f8e6b0;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.post-menu-item:hover,
.post-menu-item:focus-visible {
  transform: none;
  background: rgba(248, 230, 176, 0.11);
  box-shadow: none;
}

.post-menu-item:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.post-menu-message {
  margin: 0 4px 6px;
  color: #c8b98e;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.post-delete-btn {
  color: #ffb5ad;
}

.post-delete-btn:hover,
.post-delete-btn:focus-visible {
  background: rgba(231, 87, 87, 0.14);
}

.light-mode .post-owner-menu-btn {
  border-color: rgba(139, 111, 45, 0.22);
  background: rgba(214, 177, 95, 0.1);
  color: #6b4f16;
}

.light-mode .post-owner-dropdown {
  border-color: rgba(139, 111, 45, 0.18);
  background: rgba(255, 251, 242, 0.98);
}

.light-mode .post-menu-item {
  color: #5b4214;
}

.light-mode .post-menu-item:hover,
.light-mode .post-menu-item:focus-visible {
  background: rgba(214, 177, 95, 0.14);
}

.light-mode .post-menu-message {
  color: #7c6a42;
}

.light-mode .post-delete-btn {
  color: #8a2525;
}
.feed-post-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;

  margin: 0;
}

.feed-post-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 16px;
}
.profile-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 34px;
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.profile-edit-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 8px;
}

.profile-card > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.profile-card #profile-image-link {
  display: block;
}

.profile-card #profile-image-link.profile-image-viewer-trigger {
  cursor: pointer;
}

.profile-card img {
  width: 180px;
  height: 180px;

  object-fit: cover;
  border-radius: 50%;

  margin: 0;

  border: 3px solid rgba(248, 230, 176, 0.35);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.profile-image-viewer-modal {
  z-index: 320;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: clamp(14px, 4vw, 34px);
}

.profile-image-viewer-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92vw, 860px);
  max-height: calc(100dvh - 40px);
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid rgba(248, 230, 176, 0.28);
  border-radius: 18px;
  background: rgba(20, 18, 15, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.profile-image-viewer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  min-width: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}

#profile-image-viewer-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(78vh, 720px);
  object-fit: contain;
  border-radius: 14px;
  border: 2px solid rgba(248, 230, 176, 0.28);
  background: rgba(0, 0, 0, 0.24);
}

@media (max-width: 640px) {
  .profile-image-viewer-modal {
    padding: 12px;
  }

  .profile-image-viewer-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 52px 12px 12px;
    border-radius: 14px;
  }

  .profile-image-viewer-close {
    top: 10px;
    right: 10px;
  }

  #profile-image-viewer-img {
    max-height: calc(100dvh - 100px);
    border-radius: 12px;
  }
}

#public-follow-btn,
#public-message-btn {
  min-width: 132px;
  justify-content: center;
  margin: 0;
}

.profile-crop-modal {
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
}

.profile-edit-modal-content {
  display: grid;
  gap: 18px;
}

.profile-edit-fields {
  display: grid;
  gap: 14px;
}

.profile-edit-field {
  display: grid;
  gap: 8px;
  color: #f8e6b0;
  font-weight: 800;
}

.profile-edit-field span {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.profile-edit-field input,
.profile-edit-field textarea {
  margin: 0;
}

#profile-edit-modal #bio-input {
  height: 110px;
  resize: none;
  overflow-y: auto;
}

.profile-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-edit-actions .app-btn {
  min-width: 110px;
}

.profile-crop-modal-content {
  box-sizing: border-box;
  width: min(96vw, 980px);
  height: min(94vh, 820px);
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  overflow: hidden;
  text-align: center;
}

.profile-crop-modal-content h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

#profile-crop-modal .profile-crop-modal-content {
  width: min(92vw, 560px);
  height: auto;
  max-height: calc(100dvh - 36px);
  grid-template-rows: auto auto auto auto auto;
  gap: 16px;
  padding: 24px;
  overflow: hidden;
}

#profile-crop-modal .profile-crop-modal-content h2 {
  line-height: 1.2;
}

.profile-crop-stage {
  position: relative;
  width: min(70vh, 76vw, 560px);
  height: min(70vh, 76vw, 560px);
  align-self: center;
  justify-self: center;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid rgba(248, 230, 176, 0.45);
  background: rgba(0, 0, 0, 0.35);
  cursor: grab;
  touch-action: none;
}

#profile-crop-modal .profile-crop-stage {
  width: min(52vh, 72vw, 420px);
  height: min(52vh, 72vw, 420px);
}

.profile-crop-stage:active {
  cursor: grabbing;
}

.profile-crop-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

#profile-crop-image {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

#program-crop-image {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.program-crop-modal-content {
  width: min(96vw, 1180px);
  height: min(94vh, 820px);
}

.program-cover-crop-stage {
  width: min(100%, calc((94vh - 190px) * 16 / 9), 1040px);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}

.program-cover-crop-stage::after {
  border-radius: 8px;
}

.profile-crop-control {
  display: grid;
  gap: 8px;
  width: min(460px, 100%);
  justify-self: center;
  margin: 0;
  color: #f8e6b0;
  font-weight: 800;
}

#profile-crop-zoom,
#program-crop-zoom {
  width: min(460px, 100%);
  accent-color: #d6b15f;
}

#profile-crop-modal #profile-crop-zoom {
  margin: 0;
  justify-self: center;
}

.profile-crop-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
  flex-wrap: wrap;
}

.profile-crop-actions .app-btn {
  min-width: 126px;
}

.light-mode .profile-crop-stage {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(93, 69, 20, 0.28);
}

.light-mode .profile-crop-control {
  color: #5d4514;
}

@media (max-width: 640px) {
  #post-modal {
    padding: 10px;
  }

  #post-modal .modal-content {
    width: 100%;
    height: 100dvh;
    padding: 16px;
    border-radius: 0;
  }

  #post-modal .modal-content textarea {
    min-height: 72px;
  }

  .profile-crop-modal {
    padding: 10px;
  }

  .profile-crop-modal-content,
  .program-crop-modal-content {
    width: 100%;
    height: 100dvh;
    padding: 16px;
    border-radius: 0;
  }

  .profile-crop-modal-content h2 {
    font-size: 22px;
  }

  #profile-crop-modal .profile-crop-modal-content {
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 20px);
    gap: 14px;
    padding: 16px;
  }

  .profile-crop-stage {
    width: clamp(180px, min(82vw, calc(100dvh - 210px)), 560px);
    height: clamp(180px, min(82vw, calc(100dvh - 210px)), 560px);
  }

  #profile-crop-modal .profile-crop-stage {
    width: clamp(180px, min(76vw, calc(100dvh - 230px)), 380px);
    height: clamp(180px, min(76vw, calc(100dvh - 230px)), 380px);
  }

  .program-cover-crop-stage {
    width: min(100%, max(260px, calc((100dvh - 210px) * 16 / 9)));
  }

  .profile-crop-actions .app-btn {
    flex: 1 1 130px;
    min-width: 0;
  }
}

#profile-name {
  font-size: 28px;
  margin: 4px 0 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-card > div .status {
  margin: 0 auto;
}

.profile-rank-highlight {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  margin: 12px 0 18px;
  padding: 0 3px;
  text-align: center;
}

.profile-rank-number {
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  color: #f8e6b0;
}

.profile-rank-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.75;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 800;
}

.profile-stats {
  width: 100%;
  max-width: 620px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;

  margin: 24px auto;
}

.profile-stat {
  padding: 14px 10px;
  border-radius: 16px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(248,230,176,0.14);

  text-align: center;
}

.clickable-stat {
  cursor: pointer;
}

.clickable-stat:hover {
  border-color: rgba(248,230,176,0.4);
}

.profile-connections-modal-content {
  width: min(92vw, 560px);
  max-width: 560px;
}

.profile-connections-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-connection-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(248,230,176,0.12);
}

.profile-connection-row:last-child {
  border-bottom: 0;
}

.profile-connection-photo-link {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  border: 1px solid rgba(248,230,176,0.18);
}

.profile-connection-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-connection-photo.arete-initial-avatar {
  display: inline-flex;
}

.profile-connection-name {
  color: inherit;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.profile-connection-name:hover {
  color: #f8e6b0;
}

.profile-connection-follow-btn {
  min-width: 112px;
  padding: 10px 14px;
}

.profile-connection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.profile-connection-remove-btn {
  min-width: 88px;
  padding: 10px 14px;
}

.profile-connection-follow-btn:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.profile-connections-empty {
  margin: 12px 0 4px;
  opacity: 0.78;
}

.profile-connections-load-more {
  margin: 18px auto 0;
}

.light-mode .profile-connection-row {
  border-bottom-color: rgba(139,111,45,0.16);
}

.light-mode .profile-connection-name:hover {
  color: #8b6f2d;
}

@media (max-width: 520px) {
  .profile-connection-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .profile-connection-photo-link {
    width: 44px;
    height: 44px;
  }

  .profile-connection-actions {
    grid-column: 2;
    justify-self: start;
  }

  .profile-connection-follow-btn {
    min-width: 104px;
  }
}
.profile-bio {

  width: 100%;
  max-width: 620px;

  margin: 32px auto;

  padding: 24px;

  border-radius: 18px;

  background: rgba(255,255,255,.03);

  border: 1px solid rgba(248,230,176,.12);

}

.profile-bio-title {

  font-size: 12px;

  letter-spacing: 2px;

  text-transform: uppercase;

  color: #f8e6b0;

  opacity: .75;

  margin-bottom: 14px;

  text-align: center;

}

#bio-text {

  font-size: 16px;

  line-height: 1.7;

  color: rgba(255,255,255,.92);

  text-align: center;

  max-width: 500px;

  margin: 0 auto;

}

.profile-creator-badge {
  width: fit-content;
  margin: 0 auto;
}

.profile-creator-section {
  max-width: 860px;
  margin: 0 auto 18px;
}

.profile-creator-programs {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.profile-creator-program {
  display: grid;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.profile-creator-program h3,
.profile-creator-program p {
  margin: 0;
}

.creator-profile-link {
  color: #f8e6b0;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.creator-profile-link:hover,
.creator-profile-link:focus-visible {
  text-decoration: underline;
}

#profile-posts,
.profile-saved-posts {

  max-width: 760px;

  margin: 24px auto;

  display: flex;

  flex-direction: column;

  gap: 18px;

}

.profile-post-card {

  text-align: left;

  padding: 22px;

}

.profile-post-card h3 {

  margin-bottom: 12px;

}

.profile-post-card img {

  width: 100%;

  border-radius: 16px;

  margin-top: 16px;

}
.feed-user-link {
  color: inherit;
  text-decoration: none;
}

.feed-user-link:hover {
  text-decoration: underline;
}
.post-action {
  background: transparent;
  border: none;
  color: #f8e6b0;
  cursor: pointer;

  font-size: 15px;
  font-weight: 700;

  padding: 6px 8px;
  border-radius: 999px;

  transition: transform 0.15s ease, background 0.15s ease;
}

.post-action:hover {
  background: rgba(248, 230, 176, 0.08);
  transform: scale(1.06);
}

.like-btn.liked {
  background: rgba(248, 230, 176, 0.18);
  border: 1px solid rgba(248, 230, 176, 0.32);
}

.light-mode .like-btn.liked {
  background: rgba(214, 177, 95, 0.2);
  border-color: rgba(139, 111, 45, 0.28);
}

.compact-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}
.comments-section {
  display: none;
  margin-top: 15px;
}

.comment-input-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
}

.comment-input {
  flex: 1;
  box-sizing: border-box;
  height: 46px;
  margin: 0;
}

.comment-placeholder {
  opacity: 0.7;
  font-size: 14px;
}
.comment-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
}

.comment-avatar-link {
  display: block;
  width: 38px;
  height: 38px;
}

.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 230, 176, 0.1);
  border: 1px solid rgba(248, 230, 176, 0.18);
  font-size: 17px;
}

.arete-initial-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: #171717;
  border: 1px solid rgba(248, 230, 176, 0.72);
  color: #f8e6b0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.36);
}

.comment-avatar.arete-initial-avatar,
.program-community-avatar.arete-initial-avatar,
.review-avatar.arete-initial-avatar,
.creator-member-row .arete-initial-avatar,
.creator-review-member .arete-initial-avatar,
.progress-member-photo.arete-initial-avatar,
.program-member-photo.arete-initial-avatar,
.program-review-avatar.arete-initial-avatar,
.leaderboard-photo.arete-initial-avatar {
  background: #171717;
  border-color: rgba(248, 230, 176, 0.72);
  color: #f8e6b0;
}

.comment-body {
  min-width: 0;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.comment-username {
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.comment-username:hover {
  text-decoration: underline;
}

.comment-time {
  opacity: 0.65;
  font-size: 12px;
}

.comment-delete-btn {
  border: 0;
  background: transparent;
  color: #f2b6a0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 0;
}

.comment-delete-btn:hover,
.comment-delete-btn:focus-visible {
  color: #ffd0bf;
  text-decoration: underline;
}

.comment-delete-btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

.comment-text {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.comment-send-btn {
  box-sizing: border-box;

  height: 46px;
  margin: 0;

  padding: 0 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  font-size: 14px;
  font-weight: 600;

  white-space: nowrap;
}

.comment-input-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.comment-like-btn {
  margin-top: 2px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.comments-list .comment-text {
  margin: 4px 0 0;
}

.comment-like-btn:hover,
.comment-like-btn:focus-visible,
.comment-like-btn.liked {
  border-color: rgba(248, 230, 176, 0.34);
  background: rgba(248, 230, 176, 0.12);
}

.comment-like-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.feed-post-targeted,
.comment-targeted {
  outline: 2px solid rgba(248, 230, 176, 0.72);
  outline-offset: 3px;
}

.feed-target-status {
  border-color: rgba(248, 230, 176, 0.34);
  text-align: center;
}

.comment-input-row .comment-input,
.comment-input-row .comment-send-btn {
  height: 46px;
  box-sizing: border-box;
  margin: 0;
}

.comment-input-row .comment-input {
  padding: 0 14px;
}

.comment-input-row .comment-send-btn {
  padding: 0;
  min-width: 0;
  position: static;
}
.profile-post-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 24px;
}

.profile-post-tab {
  background: transparent;
  border: 1px solid rgba(248, 230, 176, 0.18);
  color: #f8e6b0;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.active-profile-post-tab {
  background: rgba(248, 230, 176, 0.14);
  border-color: rgba(248, 230, 176, 0.4);
}

.profile-journey {
  max-width: 760px;
  margin: 24px auto;
  text-align: left;
}

.profile-journey[hidden],
.profile-creator-programs[hidden],
.profile-creator-reviews[hidden],
#profile-posts[hidden],
.profile-saved-posts[hidden] {
  display: none !important;
}

.profile-saved-list {
  display: grid;
  gap: 12px;
}

.profile-saved-posts {
  gap: 14px;
  margin-top: 20px;
}

.profile-saved-card {
  min-height: 0;
  margin: 0;
  padding: 16px;
  cursor: default;
}

.profile-saved-card:hover {
  transform: none;
}

.profile-saved-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-saved-author {
  min-width: 0;
  margin: 0 !important;
  color: inherit;
  font-size: 18px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.profile-saved-unsave {
  flex: 0 0 auto;
  border: 1px solid rgba(248, 230, 176, 0.24);
  background: rgba(248, 230, 176, 0.06);
  font-size: 13px;
  line-height: 1.2;
}

.profile-saved-unsave:hover,
.profile-saved-unsave:focus-visible {
  border-color: rgba(248, 230, 176, 0.46);
  background: rgba(248, 230, 176, 0.13);
  transform: none;
}

.profile-saved-card > h3:not(.profile-saved-author) {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.3;
}

.profile-saved-card > p:not(.creator-type-tag) {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.profile-saved-card .creator-type-tag {
  margin: 10px 0 0;
  padding: 4px 10px;
  font-size: 12px;
}

.profile-saved-card img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  margin: 12px 0 0;
  object-fit: contain;
}

.profile-saved-status {
  text-align: center;
}

.profile-saved-status[hidden] {
  display: none;
}

.profile-saved-error {
  border-color: rgba(214, 96, 96, 0.5);
}

body.light-mode .profile-saved-card {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(90, 67, 21, 0.28);
}

body.light-mode .profile-saved-unsave {
  border-color: rgba(90, 67, 21, 0.3);
  background: rgba(255, 255, 255, 0.74);
  color: var(--arete-light-gold-strong);
}

body.light-mode .profile-saved-unsave:hover,
body.light-mode .profile-saved-unsave:focus-visible {
  border-color: rgba(90, 67, 21, 0.48);
  background: rgba(214, 177, 95, 0.18);
  color: #3d2d0d;
}

.profile-saved-load-more {
  justify-self: center;
  margin: 0 auto;
}

.profile-program-section {
  display: grid;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto 22px;
  text-align: left;
}

.profile-program-section h2 {
  margin: 0;
  font-size: 24px;
}

.profile-program-grid {
  display: grid;
  gap: 14px;
}

.profile-program-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.profile-program-cover {
  width: 100%;
  min-height: 132px;
  border-radius: 8px;
  object-fit: cover;
}

.profile-program-cover-fallback {
  display: grid;
  place-items: center;
  background: rgba(248, 230, 176, 0.14);
  color: #f8e6b0;
  font-size: 38px;
  font-weight: 800;
}

.profile-program-card-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.profile-program-card h3,
.profile-program-card p {
  margin: 0;
}

.profile-program-creator,
.profile-program-metrics {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.profile-program-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-program-progress {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.profile-program-progress .progress-bar {
  margin: 0;
}

.profile-journey-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.profile-journey-summary > div {
  min-width: 0;
}

.profile-journey-summary span,
.profile-journey-selector-label,
.profile-journey-entry-head span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-journey-summary strong {
  display: block;
  margin-top: 5px;
  color: #f8e6b0;
  font-size: 28px;
  line-height: 1;
}

.profile-journey-selector {
  grid-column: span 1;
}

.profile-journey-select {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid rgba(248, 230, 176, 0.22);
  border-radius: 8px;
  background: rgba(20, 18, 15, 0.92);
  color: #f8e6b0;
  font: inherit;
}

.profile-journey-program-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 18px;
}

.profile-journey-program-head h2 {
  margin: 0;
  font-size: 28px;
}

.profile-journey-program-head a {
  color: #f8e6b0;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.profile-journey-timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.profile-journey-entry {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 14px;
}

.profile-journey-marker {
  width: 12px;
  height: 12px;
  margin: 22px auto 0;
  border-radius: 50%;
  background: #f8e6b0;
  box-shadow: 0 0 0 5px rgba(248, 230, 176, 0.1);
}

.profile-journey-entry-body {
  padding: 18px;
  border: 1px solid rgba(248, 230, 176, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-journey-entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.profile-journey-entry-head h3 {
  margin: 0 0 4px;
  color: #f8e6b0;
  font-size: 22px;
}

.profile-journey-entry-head strong {
  display: block;
  margin-top: 4px;
  color: #f8e6b0;
  font-size: 18px;
}

.profile-journey-photo {
  display: block;
  width: 100%;
  max-height: 360px;
  margin: 10px 0 14px;
  border-radius: 8px;
  object-fit: cover;
}

.profile-journey-entry-body p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.6;
}

.profile-journey-notes,
.profile-journey-upload-date {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.profile-journey-notes strong,
.profile-journey-upload-date strong {
  color: #f8e6b0;
  font-size: 14px;
}

.profile-journey-upload-date span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.profile-journey-feedback {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(248, 230, 176, 0.12);
}

.profile-journey-feedback strong {
  color: #f8e6b0;
  font-size: 14px;
}

.profile-journey-feedback span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.5;
}

.profile-journey-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.profile-journey-social .post-action {
  min-height: 36px;
}

.profile-journey-like-btn.liked,
.profile-journey-save-btn.saved {
  border-color: rgba(248, 230, 176, 0.64);
  color: #f8e6b0;
}

.profile-journey-comment-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  flex: 1 1 100%;
  margin-top: 2px;
}

.profile-journey-comment-panel[hidden] {
  display: none;
}

.profile-journey-comment-input {
  min-width: 0;
}

.profile-journey-comments-list {
  min-width: 0;
}

.profile-journey-comment-input-row {
  margin-top: 0;
}

.profile-journey-comment-send {
  min-height: 40px;
}

.profile-journey-social span,
.profile-creator-review-head span {
  color: #f8e6b0;
  font-size: 14px;
  font-weight: 700;
}

.profile-creator-reviews {
  display: grid;
  gap: 16px;
}

.profile-creator-review {
  display: grid;
  gap: 10px;
}

.profile-creator-review-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.profile-creator-review p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.profile-journey-empty {
  text-align: center;
}

.profile-journey-empty h3,
.profile-journey-empty p {
  margin: 0;
}

.profile-journey-empty p {
  margin-top: 8px;
  font-size: 16px;
}

.light-mode .profile-journey-summary span,
.light-mode .profile-journey-selector-label,
.light-mode .profile-journey-entry-head span {
  color: rgba(35, 31, 23, 0.62);
}

.light-mode .profile-journey-summary strong,
.light-mode .profile-journey-program-head h2,
.light-mode .profile-journey-program-head a,
.light-mode .profile-journey-entry-head h3,
.light-mode .profile-journey-entry-head strong,
.light-mode .profile-journey-notes strong,
.light-mode .profile-journey-upload-date strong,
.light-mode .profile-journey-feedback strong {
  color: #6c5624;
}

.light-mode .profile-journey-select {
  border-color: rgba(139, 111, 45, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: #231f17;
}

.light-mode .profile-journey-entry-body {
  border-color: rgba(139, 111, 45, 0.14);
  background: rgba(255, 255, 255, 0.58);
}

.light-mode .profile-journey-entry-body p,
.light-mode .profile-journey-upload-date span,
.light-mode .profile-journey-feedback span,
.light-mode .profile-creator-review p,
.light-mode .profile-program-creator,
.light-mode .profile-program-metrics,
.light-mode .profile-program-progress {
  color: rgba(35, 31, 23, 0.78);
}

.light-mode .profile-journey-social span,
.light-mode .profile-creator-review-head span {
  color: #6c5624;
}

.light-mode .profile-journey-like-btn.liked,
.light-mode .profile-journey-save-btn.saved {
  border-color: rgba(108, 86, 36, 0.36);
  color: #6c5624;
}

@media (max-width: 700px) {
  .profile-journey-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-journey-selector {
    grid-column: 1 / -1;
  }

  .profile-journey-program-head {
    display: block;
  }

  .profile-journey-program-head a {
    display: inline-flex;
    margin-top: 8px;
  }

  .profile-journey-entry-head {
    display: grid;
  }

  .profile-journey-comment-input-row {
    grid-template-columns: 1fr;
  }

  .profile-program-card {
    grid-template-columns: 1fr;
  }

  .profile-program-cover {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}
#notification-badge {
  display: none;

  min-width: 18px;
  height: 18px;

  align-items: center;
  justify-content: center;

  padding: 0 5px;

  border-radius: 999px;

  background: #e53935;
  color: white;

  font-size: 11px;
  font-weight: 800;

  margin-left: 4px;
}

.landing-page main.landing-main {
  --landing-section-inset: 72px;
  --landing-card-inset: 32px;

  max-width: 1120px;
  margin: 58px auto 90px;
  text-align: left;
}

.landing-page section {
  max-width: none;
}

.landing-hero,
.landing-section {
  box-sizing: border-box;
  border-radius: 8px;
}

.landing-hero {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 76px var(--landing-section-inset);
  background:
    linear-gradient(
      135deg,
      rgba(20, 18, 15, 0.9),
      rgba(20, 18, 15, 0.52)
    );
  border: 1px solid rgba(248, 230, 176, 0.22);
}

.landing-kicker,
.landing-section-label {
  color: #98d9c2;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.landing-page h1 {
  margin: 14px 0 18px;
  max-width: 840px;
  font-size: 64px;
  letter-spacing: 0;
  line-height: 1.02;
}

.landing-hero-copy {
  max-width: 820px;
  margin: 0 0 20px;
  color: #f8e6b0;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 800;
}

.landing-hero-subcopy,
.landing-section p {
  max-width: 780px;
  margin: 0;
  color: #e8dcc2;
  font-size: 20px;
  line-height: 1.75;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.landing-hero-actions .app-btn,
.landing-hero-actions .secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 0 22px;
  border-radius: 8px;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 800;
}

.landing-section {
  padding: 58px var(--landing-section-inset);
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(248, 230, 176, 0.18);
  box-shadow: none;
  backdrop-filter: none;
}

.landing-section h2 {
  max-width: 820px;
  margin: 12px 0 18px;
  font-size: 42px;
  line-height: 1.15;
}

.landing-section > h2:first-child {
  margin-top: 0;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.landing-step {
  box-sizing: border-box;
  min-height: 250px;
  padding: var(--landing-card-inset);
  border: 1px solid rgba(248, 230, 176, 0.18);
  border-radius: 8px;
  background: rgba(20, 18, 15, 0.68);
}

.landing-step span {
  color: #e46f55;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.landing-step h3 {
  margin: 18px 0 10px;
  color: #f8e6b0;
  font-size: 23px;
  line-height: 1.2;
}

.landing-step p {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
}

.landing-contrast {
  border: 1px solid rgba(152, 217, 194, 0.28);
  background:
    linear-gradient(
      135deg,
      rgba(152, 217, 194, 0.1),
      rgba(228, 111, 85, 0.08)
    ),
    rgba(20, 18, 15, 0.62);
}

.landing-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
}

.landing-split > div {
  padding-right: 20px;
}

.landing-final {
  padding-bottom: var(--landing-section-inset);
}

.light-mode .landing-hero {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.92),
      rgba(255, 255, 255, 0.66)
    );
  border-color: rgba(139, 111, 45, 0.16);
}

.light-mode .landing-kicker,
.light-mode .landing-section-label {
  color: #0f7d68;
}

.light-mode .landing-hero-copy {
  color: #6c5624;
}

.light-mode .landing-hero-subcopy,
.light-mode .landing-section p,
.light-mode .landing-step p {
  color: #3d3323;
}

.light-mode .landing-section {
  background: transparent;
  border-top-color: rgba(139, 111, 45, 0.18);
}

.light-mode .landing-step {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(139, 111, 45, 0.14);
}

.light-mode .landing-step h3 {
  color: #6c5624;
}

.light-mode .landing-step span {
  color: #b3452e;
}

.light-mode .landing-contrast {
  background:
    linear-gradient(
      135deg,
      rgba(15, 125, 104, 0.09),
      rgba(179, 69, 46, 0.08)
    ),
    rgba(255, 255, 255, 0.75);
  border-color: rgba(15, 125, 104, 0.22);
}

@media (max-width: 960px) {
  .landing-steps,
  .landing-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-page h1 {
    font-size: 54px;
  }
}

@media (max-width: 768px) {
  .landing-page main.landing-main {
    --landing-section-inset: 24px;
    --landing-card-inset: 24px;

    margin: 28px auto 52px;
  }

  .landing-hero {
    min-height: 0;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .landing-page h1 {
    font-size: 42px;
    letter-spacing: 0;
  }

  .landing-hero-copy {
    font-size: 27px;
  }

  .landing-hero-subcopy,
  .landing-section p {
    font-size: 18px;
  }

  .landing-section {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .landing-hero-actions {
    margin-top: 22px;
  }

  .landing-steps {
    margin-top: 24px;
  }

  .landing-section h2 {
    font-size: 32px;
  }

  .landing-steps,
  .landing-split {
    grid-template-columns: 1fr;
  }

  .landing-step {
    min-height: auto;
  }

  .landing-hero-actions .app-btn,
  .landing-hero-actions .secondary-btn {
    width: 100%;
  }
}

/* LIGHT MODE VISIBILITY AUDIT */

body.light-mode {
  color-scheme: light;
  --arete-light-ink: #17120c;
  --arete-light-muted: #4f3d1d;
  --arete-light-subtle: rgba(47, 36, 18, 0.76);
  --arete-light-gold: #6c5624;
  --arete-light-gold-strong: #5a4315;
  --arete-light-card: rgba(255, 255, 255, 0.9);
  --arete-light-card-solid: #fffaf0;
  --arete-light-border: rgba(90, 67, 21, 0.24);
  --arete-light-focus: rgba(90, 67, 21, 0.24);
  --arete-light-success: #116b3c;
  --arete-light-error: #9f1d1d;
}

body.light-mode a:not(.app-btn):not(.secondary-btn):not(.nav-icon-link),
body.light-mode .app-card a:not(.app-btn),
body.light-mode section a:not(.app-btn) {
  color: var(--arete-light-gold-strong);
}

body.light-mode a:not(.app-btn):hover,
body.light-mode a:not(.app-btn):focus-visible {
  color: #3d2d0d;
}

body.light-mode :is(
  .app-card,
  .feed-post,
  .progress-post,
  .creator-card,
  .program-card,
  .program-detail-task,
  .dashboard-program-card,
  .dashboard-panel,
  .creator-dashboard-program,
  .creator-community-activity,
  .creator-review-item,
  .creator-selected-program-card,
  .creator-members-card,
  .notification-card,
  .rank-card,
  .settings-card,
  .stat-card,
  .activity-card,
  .milestone-card,
  .streak-card,
  .review-card,
  .modal-program-item,
  .dashboard-reminder-item,
  .profile-journey-entry-body,
  .profile-creator-review,
  .profile-program-card
) {
  background-color: var(--arete-light-card);
  border-color: var(--arete-light-border);
  color: var(--arete-light-ink);
}

body.light-mode :is(
  .app-card,
  .feed-post,
  .progress-post,
  .creator-card,
  .program-card,
  .notification-card,
  .rank-card,
  .settings-card,
  .dashboard-panel,
  .dashboard-program-card,
  .creator-selected-program-card,
  .profile-journey-entry-body,
  .profile-creator-review,
  .profile-program-card
) :is(p, span, small, label, li, summary):not(.app-tag):not(.nav-badge):not(#notification-badge):not(.message-badge):not(.category-pill):not(.program-badge):not(.locked-badge):not(.unlocked-badge) {
  color: var(--arete-light-subtle);
}

body.light-mode :is(
  .app-card,
  .feed-post,
  .progress-post,
  .creator-card,
  .program-card,
  .notification-card,
  .rank-card,
  .settings-card,
  .dashboard-panel,
  .dashboard-program-card,
  .creator-selected-program-card,
  .profile-journey-entry-body,
  .profile-creator-review,
  .profile-program-card
) :is(h1, h2, h3, h4, strong, b) {
  color: var(--arete-light-gold-strong);
}

body.light-mode :is(
  input,
  textarea,
  select,
  .app-input,
  .app-textarea,
  #message-input,
  #bio-input,
  #progress-title,
  #progress-note,
  .comment-input,
  .profile-journey-select,
  .creator-program-switcher select,
  .dashboard-program-switcher select
) {
  background-color: rgba(255, 255, 255, 0.94);
  border-color: rgba(90, 67, 21, 0.3);
  color: var(--arete-light-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.light-mode :is(input, textarea, select, .app-input, .app-textarea):focus {
  border-color: rgba(90, 67, 21, 0.62);
  box-shadow: 0 0 0 4px var(--arete-light-focus);
  outline: none;
}

body.light-mode :is(input, textarea, .app-input, .app-textarea)::placeholder,
body.light-mode .comment-placeholder {
  color: #6a552d;
  opacity: 1;
}

body.light-mode select,
body.light-mode select option,
body.light-mode .app-input:is(select) option {
  background-color: var(--arete-light-card-solid);
  color: var(--arete-light-ink);
}

body.light-mode :is(input, textarea, select, button, .app-btn):disabled,
body.light-mode :is(input, textarea, select, button, .app-btn)[aria-disabled="true"] {
  background: rgba(244, 235, 214, 0.92);
  border-color: rgba(90, 67, 21, 0.26);
  color: rgba(47, 36, 18, 0.64);
  opacity: 1;
}

body.light-mode :is(button, .app-btn, .secondary-btn, .leaderboard-tab, .category-pill, .dashboard-mode-option):focus-visible,
body.light-mode :is(a, input, textarea, select):focus-visible {
  outline: 3px solid rgba(90, 67, 21, 0.32);
  outline-offset: 2px;
}

body.light-mode .app-btn,
body.light-mode button:not(.theme-icon-btn):not(.user-avatar-btn):not(.auth-link):not(.leaderboard-info):not(.dashboard-modal-close):not(.messages-modal-close) {
  color: var(--arete-light-gold-strong);
  border-color: rgba(90, 67, 21, 0.3);
}

body.light-mode .app-btn:hover,
body.light-mode button:not(.theme-icon-btn):not(.user-avatar-btn):not(.auth-link):hover {
  color: #3d2d0d;
  border-color: rgba(90, 67, 21, 0.48);
}

body.light-mode .message-input-area .app-btn:not(:disabled) {
  border-color: #8b6f2d;
  background: #8b6f2d;
  color: #ffffff;
}

body.light-mode .message-input-area .app-btn:not(:disabled):hover,
body.light-mode .message-input-area .app-btn:not(:disabled):focus-visible {
  border-color: #6f5620;
  background: #6f5620;
  color: #ffffff;
}

body.light-mode #send-message-btn:not(:disabled) {
  border-color: #8b6f2d;
  background: #8b6f2d;
  color: #ffffff;
}

body.light-mode #send-message-btn:disabled {
  border-color: rgba(76,57,20,0.2);
  background: #e8e1d2;
  color: #746b5d;
}

body.light-mode :is(.secondary-btn, .save-btn, .logout-btn) {
  background: rgba(255, 255, 255, 0.72);
  color: var(--arete-light-gold-strong);
  border-color: rgba(90, 67, 21, 0.34);
}

body.light-mode :is(.secondary-btn, .save-btn, .logout-btn):hover {
  background: rgba(214, 177, 95, 0.2);
  color: #3d2d0d;
}

body.light-mode :is(
  .modal-content,
  .creator-modal-content,
  .messages-modal .messages-modal-content,
  .dashboard-modal-panel,
  .create-program-modal-content,
  .creator-onboarding-content
) {
  background: rgba(255, 250, 240, 0.98);
  border-color: rgba(90, 67, 21, 0.26);
  color: var(--arete-light-ink);
}

body.light-mode :is(.modal-content, .creator-modal-content) :is(p, span, small, label, li) {
  color: var(--arete-light-subtle);
}

body.light-mode :is(.modal-content, .creator-modal-content) :is(h2, h3, strong) {
  color: var(--arete-light-gold-strong);
}

body.light-mode :is(
  #close-modal-btn,
  #close-creator-modal,
  .dashboard-modal-close,
  .messages-modal-close,
  #cancel-creator-onboarding-btn
) {
  background: rgba(90, 67, 21, 0.1);
  border: 1px solid rgba(90, 67, 21, 0.24);
  color: var(--arete-light-ink);
}

body.light-mode :is(
  #close-modal-btn,
  #close-creator-modal,
  .dashboard-modal-close,
  .messages-modal-close,
  #cancel-creator-onboarding-btn
):hover {
  background: rgba(90, 67, 21, 0.18);
  color: #000;
}

body.light-mode .user-dropdown {
  background: rgba(255, 250, 240, 0.98);
  border-color: rgba(90, 67, 21, 0.22);
  box-shadow: 0 18px 36px rgba(47, 36, 18, 0.16);
}

body.light-mode .nav-links .user-dropdown a,
body.light-mode .nav-links .user-dropdown button {
  color: var(--arete-light-ink);
}

body.light-mode .nav-links .user-dropdown a:hover,
body.light-mode .nav-links .user-dropdown button:hover {
  background: rgba(214, 177, 95, 0.18);
  color: #3d2d0d;
}

body.light-mode .active-nav:not(.nav-icon-link) {
  background: rgba(90, 67, 21, 0.14);
  border-color: rgba(90, 67, 21, 0.28);
  color: var(--arete-light-ink) !important;
}

body.light-mode .theme-icon-btn,
body.light-mode .user-avatar-btn,
body.light-mode .leaderboard-info {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(90, 67, 21, 0.3);
  color: var(--arete-light-ink);
}

body.light-mode #notification-badge,
body.light-mode .nav-badge,
body.light-mode .message-badge {
  background: #5a4315;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

body.light-mode :is(.app-tag, .program-badge, .locked-badge, .unlocked-badge, .dashboard-selected-category) {
  background: rgba(214, 177, 95, 0.18);
  border-color: rgba(90, 67, 21, 0.26);
  color: var(--arete-light-gold-strong);
}

body.light-mode .category-pill {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(90, 67, 21, 0.28);
  color: var(--arete-light-gold-strong);
}

body.light-mode .category-pill:hover,
body.light-mode .category-pill:focus-visible {
  background: rgba(214, 177, 95, 0.22);
  color: #3d2d0d;
}

body.light-mode .category-pill.selected-category-pill {
  background: linear-gradient(135deg, #5a4315, #a98432);
  border-color: rgba(90, 67, 21, 0.56);
  color: #ffffff;
}

body.light-mode .leaderboard-tab {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(90, 67, 21, 0.26);
  color: var(--arete-light-gold-strong);
}

body.light-mode .leaderboard-tab:hover,
body.light-mode .leaderboard-tab:focus-visible,
body.light-mode .leaderboard-tab.active-leaderboard-tab {
  background: rgba(90, 67, 21, 0.16);
  border-color: rgba(90, 67, 21, 0.42);
  color: var(--arete-light-ink);
}

body.light-mode .leaderboard-your-rank-card,
body.light-mode .leaderboard-list .rank-card.current-user-rank-card {
  background: rgba(214, 177, 95, 0.16);
  border-color: rgba(90, 67, 21, 0.32);
}

body.light-mode .leaderboard-list .rank-card.rank-gold {
  border-color: rgba(154, 112, 24, 0.58);
  box-shadow: 0 0 0 1px rgba(154, 112, 24, 0.12),
    0 10px 24px rgba(154, 112, 24, 0.12);
}

body.light-mode .leaderboard-list .rank-card.rank-gold::before {
  background: linear-gradient(90deg, rgba(214, 177, 95, 0.3), transparent 58%);
  opacity: 1;
}

body.light-mode .leaderboard-list .rank-card.rank-silver {
  border-color: rgba(100, 116, 139, 0.48);
  box-shadow: 0 0 0 1px rgba(100, 116, 139, 0.1),
    0 10px 24px rgba(100, 116, 139, 0.1);
}

body.light-mode .leaderboard-list .rank-card.rank-silver::before {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.28), transparent 58%);
  opacity: 1;
}

body.light-mode .leaderboard-list .rank-card.rank-bronze {
  border-color: rgba(146, 80, 31, 0.5);
  box-shadow: 0 0 0 1px rgba(146, 80, 31, 0.1),
    0 10px 24px rgba(146, 80, 31, 0.1);
}

body.light-mode .leaderboard-list .rank-card.rank-bronze::before {
  background: linear-gradient(90deg, rgba(180, 103, 45, 0.26), transparent 58%);
  opacity: 1;
}

body.light-mode :is(.arete-initial-avatar, .arete-image-avatar-empty, .comment-avatar-fallback),
body.light-mode :is(
  .comment-avatar.arete-initial-avatar,
  .program-community-avatar.arete-initial-avatar,
  .review-avatar.arete-initial-avatar,
  .creator-member-row .arete-initial-avatar,
  .creator-review-member .arete-initial-avatar,
  .progress-member-photo.arete-initial-avatar,
  .program-member-photo.arete-initial-avatar,
  .program-review-avatar.arete-initial-avatar,
  .leaderboard-photo.arete-initial-avatar
) {
  background: #5a4315;
  border-color: rgba(255, 250, 240, 0.88);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(90, 67, 21, 0.22);
}

body.light-mode :is(
  .empty-state,
  .messages-empty,
  .dashboard-compact-empty,
  .profile-connections-empty,
  .profile-journey-empty,
  .comment-placeholder
) {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(90, 67, 21, 0.24);
  color: var(--arete-light-muted);
}

body.light-mode :is(
  .empty-state,
  .messages-empty,
  .dashboard-compact-empty,
  .profile-connections-empty,
  .profile-journey-empty
) :is(h3, strong) {
  color: var(--arete-light-gold-strong);
}

body.light-mode :is(
  .alert-success,
  #bio-message,
  .upload-success,
  .settings-success,
  .program-success
) {
  color: var(--arete-light-success);
}

body.light-mode :is(
  .alert-error,
  .error-message,
  .form-error,
  .settings-error,
  .program-duration-error,
  .upload-error
) {
  color: var(--arete-light-error);
}

body.light-mode :is(.tooltip-text, #toast-message) {
  background: rgba(255, 250, 240, 0.98);
  border-color: rgba(90, 67, 21, 0.26);
  color: var(--arete-light-ink);
}

body.light-mode #side-menu {
  background: rgba(255, 250, 240, 0.98);
  border-left-color: rgba(90, 67, 21, 0.26);
  box-shadow: -18px 0 40px rgba(47, 36, 18, 0.14);
}

body.light-mode #side-menu a,
body.light-mode #side-menu button {
  color: var(--arete-light-ink);
}

body.light-mode #side-menu a:hover,
body.light-mode #side-menu a:focus-visible {
  color: var(--arete-light-gold-strong);
}

/* MVP legal foundation */
.legal-document-page {
  padding: 0;
  text-align: left;
}

.legal-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 20px auto;
  padding: 18px 24px;
  border: 1px solid rgba(248, 230, 176, 0.22);
  border-radius: 18px;
  background: rgba(10, 9, 8, 0.82);
  backdrop-filter: blur(12px);
}

.legal-site-header nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 18px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.legal-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.legal-brand {
  color: #f8e6b0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.legal-site-header a,
.legal-footer a,
.legal-article a,
.auth-legal-links a,
.signup-legal-checkbox a,
.program-purchase-legal a {
  color: #f3cf78;
}

.legal-main {
  width: min(100% - 32px, 980px);
  max-width: 980px;
  margin: 46px auto 64px;
}

.legal-article {
  padding: clamp(24px, 5vw, 58px);
  border: 1px solid rgba(248, 230, 176, 0.25);
  border-radius: 24px;
  background: rgba(17, 15, 12, 0.9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.legal-article > h1 {
  margin: 14px 0 8px;
  font-size: clamp(42px, 8vw, 70px);
  line-height: 1.02;
  letter-spacing: 0.025em;
}

.legal-article section {
  max-width: none;
  margin: 34px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.legal-article h2 {
  margin: 0 0 12px;
  font-size: clamp(25px, 4vw, 34px);
}

.legal-article h3 {
  margin: 24px 0 8px;
  font-size: 22px;
}

.legal-article p,
.legal-article li,
.legal-article dd,
.legal-article dt,
.legal-table {
  font-size: 17px;
  line-height: 1.7;
}

.legal-article ul {
  padding-left: 24px;
}

.legal-meta {
  margin: 0 0 28px;
  color: #d4c8b1;
}

.legal-draft-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 190, 86, 0.5);
  border-radius: 999px;
  color: #ffd890;
  background: rgba(102, 55, 0, 0.28);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.legal-review-callout,
.legal-config-error {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 190, 86, 0.42);
  border-left: 5px solid #f1b957;
  border-radius: 12px;
  color: #f5ead5;
  background: rgba(84, 48, 4, 0.34);
  font-size: 16px;
  line-height: 1.6;
}

.legal-details-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.legal-details-list > div {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(248, 230, 176, 0.14);
}

.legal-details-list dt {
  color: #e4c679;
  font-weight: 700;
}

.legal-details-list dd {
  margin: 0;
}

.legal-unresolved-value {
  color: #ffd18a;
  font-weight: 700;
}

.legal-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(248, 230, 176, 0.22);
  border-radius: 14px;
}

.legal-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(248, 230, 176, 0.16);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: #f8e6b0;
  background: rgba(248, 230, 176, 0.08);
}

.support-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.support-contact-card {
  max-width: none;
  margin: 0;
  padding: 22px;
  text-align: left;
}

.support-contact-card h2 {
  font-size: 25px;
}

.legal-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  width: min(100% - 32px, 980px);
  margin: 0 auto 34px;
  padding: 22px;
  border-top: 1px solid rgba(248, 230, 176, 0.18);
  color: #d4c8b1;
  text-align: center;
}

.signup-legal-fieldset,
.legal-gate fieldset {
  min-width: 0;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(248, 230, 176, 0.3);
  border-radius: 12px;
  text-align: left;
}

.signup-legal-fieldset legend,
.legal-gate legend {
  padding: 0 8px;
  color: #f8e6b0;
  font-weight: 700;
}

.signup-legal-checkbox,
.legal-gate-checkbox {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 12px 0;
  color: #f5f0e6;
  font-size: 16px;
  line-height: 1.45;
  cursor: pointer;
}

.signup-legal-checkbox input,
.legal-gate-checkbox input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #d6b15f;
}

.auth-legal-links,
.program-purchase-legal,
.creator-onboarding-legal-links {
  color: #d8ccb5;
  font-size: 14px;
  line-height: 1.5;
}

.program-purchase-legal {
  max-width: 560px;
  margin: 12px 0 0;
}

.legal-gate[hidden] {
  display: none !important;
}

.legal-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  text-align: left;
}

.legal-gate-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 4, 0.84);
  backdrop-filter: blur(10px);
}

.legal-gate-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-width: 720px;
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: clamp(22px, 4vw, 36px);
  overflow-y: auto;
  border: 1px solid rgba(248, 230, 176, 0.38);
  background: #17130e;
  color: #f5f0e6;
  text-align: left;
}

.legal-gate-panel h2 {
  margin: 16px 0 8px;
  font-size: clamp(30px, 6vw, 42px);
}

.legal-gate-panel p {
  font-size: 16px;
}

.legal-gate-error {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(244, 92, 92, 0.55);
  border-radius: 10px;
  color: #ffd1d1;
  background: rgba(122, 17, 17, 0.35);
}

.legal-gate-note {
  color: #d8ccb5;
}

.legal-gate-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.legal-gate-actions .secondary-btn {
  margin-left: 0;
}

body.legal-gate-active {
  overflow: hidden;
}

.signup-legal-checkbox input:focus-visible,
.legal-gate-checkbox input:focus-visible,
.legal-document-page a:focus-visible,
.legal-site-header button:focus-visible,
.legal-gate a:focus-visible,
.legal-gate button:focus-visible {
  outline: 3px solid #fff1a8;
  outline-offset: 3px;
}

.light-mode .legal-site-header,
.light-mode .legal-article,
.light-mode .legal-gate-panel {
  border-color: var(--arete-light-border);
  background: rgba(255, 250, 240, 0.96);
  color: var(--arete-light-ink);
}

.light-mode .legal-brand,
.light-mode .legal-site-header a,
.light-mode .legal-footer a,
.light-mode .legal-article a,
.light-mode .auth-legal-links a,
.light-mode .signup-legal-checkbox a,
.light-mode .program-purchase-legal a,
.light-mode .legal-article h1,
.light-mode .legal-article h2,
.light-mode .legal-article h3,
.light-mode .legal-gate-panel h2,
.light-mode .signup-legal-fieldset legend,
.light-mode .legal-gate legend {
  color: var(--arete-light-gold-strong);
}

.light-mode .legal-meta,
.light-mode .legal-footer,
.light-mode .legal-gate-note,
.light-mode .auth-legal-links,
.light-mode .program-purchase-legal {
  color: var(--arete-light-subtle);
}

.light-mode .legal-review-callout,
.light-mode .legal-config-error {
  border-color: rgba(130, 84, 10, 0.34);
  border-left-color: #8c651b;
  background: #fff3d2;
  color: var(--arete-light-ink);
}

.light-mode .legal-draft-badge {
  border-color: rgba(130, 84, 10, 0.42);
  background: #fff0c4;
  color: #6d4710;
}

.light-mode .signup-legal-checkbox,
.light-mode .legal-gate-checkbox {
  color: var(--arete-light-ink);
}

.light-mode .legal-gate-error {
  color: #7b1515;
  background: #ffe8e8;
}

@media (max-width: 720px) {
  .legal-site-header {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100% - 24px);
    margin: 12px auto;
    padding: 16px;
  }

  .legal-site-header nav {
    justify-content: flex-start;
    width: 100%;
  }

  .legal-main {
    width: calc(100% - 20px);
    margin-top: 24px;
  }

  .legal-details-list > div,
  .support-contact-grid {
    grid-template-columns: 1fr;
  }

  .legal-details-list > div {
    gap: 2px;
  }

  .legal-gate {
    align-items: start;
    padding: 10px;
  }

  .legal-gate-panel {
    max-height: calc(100vh - 20px);
  }

  .legal-gate-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .legal-gate-actions button {
    width: 100%;
  }
}

body.light-mode #close-menu-btn {
  background: rgba(90, 67, 21, 0.12);
  border: 1px solid rgba(90, 67, 21, 0.28);
  color: var(--arete-light-ink);
}

body.light-mode :is(.landing-kicker, .landing-section-label) {
  color: #0a6f5d;
}

body.light-mode .program-meta-icon,
body.light-mode :is(.profile-rank-number, .profile-bio-title) {
  color: var(--arete-light-gold-strong);
  opacity: 1;
}

body.light-mode :is(.active-nav, .nav-links a.active-nav, #side-menu a.active-nav):not(.nav-icon-link) {
  background: rgba(90, 67, 21, 0.16);
  border-color: rgba(90, 67, 21, 0.34);
  color: var(--arete-light-ink) !important;
}

/* MOBILE RESPONSIVENESS AUDIT FIXES */
@media (max-width: 768px) {
  body {
    width: 100%;
    padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  main,
  section,
  .app-section,
  .app-card,
  .feed-post,
  .progress-post,
  .creator-card,
  .notification-card,
  .settings-card,
  .program-card,
  .program-create-card,
  .program-form,
  .program-detail-main,
  .program-detail-shell,
  .program-detail-section,
  .profile-card,
  .profile-journey,
  .profile-program-section,
  .profile-creator-section,
  .personal-dashboard,
  .creator-hub,
  .messages-layout {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  main {
    margin: 34px auto 52px;
  }

  section,
  .app-card,
  .feed-post,
  .progress-post,
  .creator-card,
  .notification-card,
  .settings-card,
  .program-card,
  .dashboard-program-card,
  .dashboard-panel,
  .creator-dashboard-program,
  .creator-community-activity,
  .creator-review-item,
  .creator-selected-program-card,
  .creator-members-card,
  .profile-post-card,
  .profile-journey-entry-body,
  .profile-creator-review,
  .profile-program-card {
    padding: clamp(14px, 4vw, 22px);
  }

  section:hover {
    transform: none;
  }

  nav {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 18px;
    padding: 14px;
  }

  nav h2,
  .nav-links,
  .logged-in-actions {
    min-width: 0;
    max-width: 100%;
  }

  nav h2 {
    align-self: center;
    margin-right: 0;
    text-align: center;
  }

  #menu-btn {
    align-self: center;
    margin: 0;
  }

  .nav-links,
  .logged-out .nav-links,
  .logged-in .nav-links {
    display: none;
  }

  #side-menu {
    width: min(86vw, 320px);
    max-width: calc(100vw - 24px);
    height: 100dvh;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) 18px;
    overflow-y: auto;
  }

  #side-menu:not(.open-menu) {
    display: none;
  }

  #side-menu.open-menu {
    display: flex;
  }

  :is(.app-btn, .secondary-btn, button, input, textarea, select, .app-input, .app-textarea) {
    max-width: 100%;
  }

  :is(input, textarea, select, .app-input, .app-textarea) {
    min-width: 0;
  }

  :is(.hero-buttons, .feed-actions, .compact-actions, .feed-modal-actions, .profile-actions, .profile-edit-actions, .profile-crop-actions, .program-actions, .program-modal-actions, .edit-program-actions, .notification-actions, .settings-row, .settings-action-grid, .creator-quick-actions, .creator-selected-program-actions, .creator-dashboard-program .program-actions, .dashboard-program-meta, .dashboard-reminder-item, .profile-journey-social, .profile-program-metrics, .post-image-picker) {
    flex-wrap: wrap;
    min-width: 0;
  }

  :is(.feed-tab, .profile-post-tab, .leaderboard-tab, .category-pill, .app-tag, .program-badge, .locked-badge, .unlocked-badge, .dashboard-card-status) {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  :is(.feed-tabs, .profile-post-tabs, .leaderboard-tabs, .category-pill-group) {
    max-width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  :is(.feed-post-header, .messages-panel-header, .messages-thread-header, .program-card-header, .program-progress-header, .dashboard-selected-program-main, .creator-hub-header, .creator-hub-section .section-header, .profile-journey-program-head, .profile-journey-entry-head) {
    min-width: 0;
  }

  :is(.feed-post-header > *, .program-card-header > *, .dashboard-selected-program-main > *, .creator-hub-header > *, .creator-hub-section .section-header > *, .profile-journey-program-head > *, .profile-journey-entry-head > *) {
    min-width: 0;
  }

  :is(h1, h2, h3, h4, p, a, span, strong, small, label, li, summary, .conversation-title-link, .conversation-name-link, .conversation-preview, .conversation-list-subtitle, .start-conversation-main strong, .start-conversation-main span) {
    overflow-wrap: anywhere;
  }

  .modal,
  #register-modal,
  .creator-modal,
  .messages-modal,
  .settings-delete-modal,
  .dashboard-modal,
  .create-program-modal,
  .creator-onboarding-modal,
  .profile-crop-modal,
  .profile-image-viewer-modal {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    align-items: center;
    justify-content: center;
  }

  :is(.modal-content, .creator-modal-content, .messages-modal .messages-modal-content, .settings-delete-modal-panel, .dashboard-modal-panel, .create-program-modal-content, .creator-onboarding-content, .profile-edit-modal-content, .profile-crop-modal-content, .program-crop-modal-content, .profile-image-viewer-panel, .profile-connections-modal-content) {
    width: 100%;
    max-width: min(100%, 720px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #register-modal {
    align-items: center;
    overflow-y: auto;
  }

  #register-modal .modal-content {
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  .modal-header,
  .messages-modal-header {
    min-width: 0;
  }

  .modal-header h2,
  .messages-modal-header h2,
  .dashboard-modal-header h2 {
    min-width: 0;
    font-size: clamp(22px, 7vw, 32px);
    overflow-wrap: anywhere;
  }

  .dashboard-modal-header {
    padding: 0 44px 0 0;
    text-align: left;
  }

  .comment-input-row,
  .message-input-area {
    grid-template-columns: minmax(0, 1fr);
  }

  .comment-input-row .comment-send-btn,
  .message-input-area .app-btn {
    width: 100%;
  }

  .post-owner-dropdown {
    max-width: calc(100vw - 40px);
  }

  .programs-grid,
  .dashboard-program-grid,
  .dashboard-two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .program-detail-meta > div {
    min-width: min(100%, 140px);
    flex: 1 1 140px;
  }

  .program-hero {
    aspect-ratio: auto;
  }

  .program-hero.has-cover .program-hero-content {
    width: 100%;
    max-width: 100%;
  }

  .task-builder-week .task-builder-textarea {
    width: calc(100% - 24px);
    margin-inline: 12px;
  }

  .profile-stats,
  .profile-journey-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #post-modal .modal-content,
  .profile-crop-modal-content,
  .program-crop-modal-content {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  #post-image-preview,
  #edit-post-image-preview,
  .feed-post-image,
  .profile-post-card img,
  .profile-journey-photo {
    max-height: min(360px, 58dvh);
  }

  .profile-crop-stage {
    width: min(100%, calc(100dvh - 230px));
    height: min(100%, calc(100dvh - 230px));
  }
}

@media (max-width: 430px) {
  body {
    padding-inline: max(10px, env(safe-area-inset-left));
  }

  h1 {
    font-size: clamp(38px, 14vw, 48px);
    letter-spacing: 3px;
  }

  h2 {
    font-size: clamp(24px, 8vw, 32px);
  }

  .secondary-btn {
    margin-left: 0;
  }

  .hero-buttons,
  .feed-modal-actions,
  .profile-edit-actions,
  .program-modal-actions,
  .profile-crop-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-buttons :is(.app-btn, .secondary-btn, button),
  .feed-modal-actions :is(.app-btn, .secondary-btn),
  .profile-edit-actions .app-btn,
  .program-modal-actions .app-btn,
  .profile-crop-actions .app-btn {
    width: 100%;
    margin-inline: 0;
  }

  .profile-connection-row,
  .start-conversation-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .profile-connection-actions,
  .start-conversation-row .app-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-connection-actions .app-btn {
    flex: 1 1 132px;
  }
}

/* LAUNCH MOBILE USABILITY PASS */
@media (max-width: 768px) {
  main {
    margin: 24px auto 46px;
  }

  .page-header,
  .section-header {
    margin-bottom: 16px;
  }

  .page-header h1,
  .section-title,
  main > h1,
  .personal-dashboard-header h1,
  .creator-hub-header h1 {
    font-size: clamp(28px, 8.2vw, 34px);
    line-height: 1.08;
    letter-spacing: 0;
    text-shadow: none;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .section-header h2,
  .personal-dashboard .section-header h2,
  .creator-hub-section .section-header h2,
  .dashboard-panel h2,
  .dashboard-program-card h2,
  .dashboard-program-card h3,
  .program-detail-section .section-header h2,
  .profile-journey-program-head h2,
  .profile-program-section h2 {
    font-size: clamp(20px, 5.8vw, 24px);
    line-height: 1.16;
    letter-spacing: 0;
    overflow-wrap: normal;
  }

  .page-header p,
  .section-subtitle,
  .section-header p,
  .personal-dashboard-header p,
  .creator-hub-header p {
    font-size: 15px;
    line-height: 1.42;
  }

  :is(h1, h2, h3, h4, p, a, span, strong, small, label, li, summary) {
    min-width: 0;
  }

  .page-header {
    display: grid;
    gap: 8px;
  }

  .page-header #open-modal-btn {
    width: min(100%, 190px);
    min-height: 44px;
    margin: 6px auto 0;
  }

  .feed-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
    overflow: visible;
  }

  .feed-tab {
    min-height: 36px;
    padding: 7px 6px;
    font-size: 13px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: normal;
  }

  #feed-tab-message {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.35;
  }

  .feed-post.app-card,
  .feed-post {
    padding: 14px;
  }

  .feed-post h3 {
    font-size: 18px;
    line-height: 1.22;
  }

  .feed-post h4 {
    font-size: 16px;
    line-height: 1.25;
  }

  .personal-dashboard,
  .creator-hub {
    gap: 14px;
  }

  .dashboard-mode-switch {
    width: 100%;
    margin-bottom: 14px;
  }

  .dashboard-mode-option {
    flex: 1 1 0;
    min-width: 0;
  }

  .personal-dashboard-header,
  .creator-hub-header {
    gap: 10px;
    align-items: stretch;
    margin-bottom: 0;
  }

  .dashboard-program-switcher,
  .creator-program-switcher {
    width: 100%;
    min-width: 0;
  }

  .dashboard-program-switcher select,
  .creator-program-switcher select {
    min-height: 44px;
    margin-bottom: 0;
  }

  .dashboard-program-card,
  .dashboard-panel,
  .creator-hub-section,
  .creator-review-item,
  .creator-dashboard-program,
  .creator-community-activity,
  .creator-selected-program-card,
  .creator-members-card,
  .creator-stat-card {
    border-radius: 8px;
    padding: 14px;
  }

  .dashboard-card-grid {
    gap: 12px;
  }

  .dashboard-selected-program-card h2 {
    font-size: clamp(22px, 6.8vw, 27px);
    line-height: 1.12;
    margin: 3px 0 0;
    overflow-wrap: normal;
  }

  .dashboard-selected-program-main {
    gap: 12px;
  }

  .dashboard-selected-program-main .app-btn,
  .dashboard-panel .app-btn,
  .dashboard-feedback-item .app-btn {
    min-height: 44px;
    align-self: stretch;
  }

  .dashboard-program-meta,
  .creator-program-stats,
  .creator-review-meta,
  .creator-activity-meta {
    gap: 5px;
  }

  .dashboard-program-meta span,
  .dashboard-card-status,
  .creator-program-stats span,
  .creator-review-meta span,
  .creator-activity-meta span {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
    overflow-wrap: normal;
  }

  .dashboard-panel-header {
    gap: 7px;
  }

  .dashboard-task-summary,
  .dashboard-program-card p,
  .dashboard-feedback-item p,
  .dashboard-focus-copy {
    font-size: 15px;
    line-height: 1.38;
  }

  .dashboard-task-preview {
    gap: 5px;
  }

  .dashboard-task-preview-row {
    padding: 5px 0;
  }

  .dashboard-reminder-item {
    display: grid;
    gap: 3px;
    padding: 8px 0;
  }

  .creator-hub {
    --creator-section-padding-x: 14px;
    --creator-section-padding-y: 14px;
    --creator-section-content-gap: 12px;
    --creator-inner-gap: 8px;
    --creator-inner-padding-x: 14px;
    --creator-inner-padding-y: 14px;
  }

  .creator-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .creator-quick-actions .app-btn {
    width: 100%;
    min-height: 44px;
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.2;
  }

  #creator-dashboard-greeting,
  #creator-dashboard-status {
    font-size: 14px;
    line-height: 1.35;
  }

  .creator-hub-section .section-header {
    gap: 3px;
  }

  .creator-selected-program-main,
  .creator-members-card-header {
    gap: 10px;
  }

  .creator-selected-program-main h3,
  .creator-review-member h3,
  .creator-dashboard-program-main h3,
  .creator-community-activity h3 {
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: normal;
  }

  .creator-selected-program-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .creator-selected-program-actions .app-btn {
    min-width: 0;
    min-height: 44px;
    padding: 9px 10px;
  }

  .creator-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creator-stat-card .stat-number {
    font-size: 25px;
  }

  .creator-stat-card .stat-label {
    font-size: 12px;
    line-height: 1.25;
  }

  .creator-member-row {
    padding-top: 8px;
  }

  .creator-member-row img,
  .creator-member-row span {
    width: 30px;
    height: 30px;
  }

  .creator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .creator-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
      "avatar name"
      "avatar status"
      "avatar category"
      "bio bio"
      "meta-count meta-rating"
      "action action";
    align-items: start;
    gap: 4px 10px;
    min-height: 0;
    padding: 12px;
    text-align: left;
  }

  .creator-card img {
    grid-area: avatar;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
  }

  .creator-card h3 {
    grid-area: name;
    margin: 0;
    font-size: 18px;
    line-height: 1.16;
    overflow-wrap: normal;
  }

  .creator-card .creator-badge {
    grid-area: status;
    justify-content: flex-start;
    min-height: 24px;
    margin: 0;
    padding: 3px 7px;
    font-size: 11px;
  }

  .creator-card .creator-type-tag {
    grid-area: category;
    min-height: 24px;
    margin: 0;
    padding: 3px 7px;
    font-size: 11px;
    line-height: 1.2;
  }

  .creator-card p:first-of-type {
    min-height: 0;
  }

  .creator-card p:not(.creator-type-tag) {
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
  }

  .creator-card p:not(.creator-type-tag):nth-of-type(2) {
    grid-area: bio;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .creator-card p:not(.creator-type-tag):nth-of-type(3),
  .creator-card p:not(.creator-type-tag):nth-of-type(4) {
    display: inline-flex;
    width: fit-content;
    margin-right: 8px;
    color: rgba(248,230,176,0.72);
  }

  .creator-card p:not(.creator-type-tag):nth-of-type(3) {
    grid-area: meta-count;
  }

  .creator-card p:not(.creator-type-tag):nth-of-type(4) {
    grid-area: meta-rating;
  }

  .creator-card .creator-follow-btn {
    grid-area: action;
    min-height: 44px;
    margin-top: 2px;
    padding: 8px 12px;
  }

  .profile-card {
    gap: 10px;
    padding: 18px 14px;
  }

  .profile-card img {
    width: 116px;
    height: 116px;
  }

  .profile-card > div {
    gap: 9px;
  }

  .profile-rank-highlight,
  .profile-stats,
  .profile-bio {
    width: 100%;
  }

  .profile-journey-summary {
    gap: 8px;
  }

  .profile-journey-summary strong {
    font-size: 23px;
  }

  .profile-journey-entry-body {
    padding: 14px;
  }

  .profile-journey-entry-head h3 {
    font-size: 19px;
    line-height: 1.2;
  }

  .profile-program-card {
    gap: 10px;
  }

  .program-card h3,
  .profile-program-card h3 {
    font-size: 19px;
    line-height: 1.2;
    overflow-wrap: normal;
  }

  .program-card p,
  .profile-program-card p,
  .profile-journey-entry-body p {
    font-size: 15px;
    line-height: 1.45;
  }

  .program-detail-main {
    margin-top: 18px;
  }

  .program-detail-tabs {
    gap: 6px;
    margin: 12px 0;
  }

  .program-detail-tab {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  .page-header h1,
  .section-title,
  main > h1,
  .personal-dashboard-header h1,
  .creator-hub-header h1 {
    font-size: clamp(27px, 8.2vw, 32px);
    line-height: 1.1;
  }

  .page-header {
    margin-bottom: 14px;
  }

  section,
  .app-section,
  .app-card,
  .feed-post,
  .creator-card,
  .program-card,
  .dashboard-panel,
  .dashboard-program-card,
  .creator-hub-section,
  .profile-card {
    padding: 12px;
  }

  .feed-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feed-tab {
    min-height: 34px;
  }

  .creator-card {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 10px;
  }

  .creator-card img {
    width: 52px;
    height: 52px;
  }

  .creator-quick-actions,
  .creator-selected-program-actions {
    grid-template-columns: 1fr;
  }

  .creator-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 340px) {
  .page-header h1,
  .section-title,
  main > h1,
  .personal-dashboard-header h1,
  .creator-hub-header h1 {
    font-size: 26px;
  }

  .feed-tab,
  .program-detail-tab {
    font-size: 12px;
  }

  .creator-overview-grid,
  .profile-stats,
  .profile-journey-summary {
    grid-template-columns: 1fr;
  }
}

/* CREATOR CARD STRUCTURE: explicit wrappers preserve desktop ordering. */
.creator-card-identity,
.creator-card-identity-copy,
.creator-card-badges,
.creator-card-stats {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.creator-card-identity,
.creator-card-identity-copy {
  gap: 8px;
}

.creator-card-badges,
.creator-card-stats {
  gap: 0;
}

.creator-card-username {
  display: none;
}

.creator-card-stat {
  margin: 1em 0;
  font-size: 18px;
  line-height: 1.7;
}

.creator-card-stat strong,
.creator-card-stat span {
  display: inline;
}

.creator-card-stat span::before {
  content: " ";
}

/* REMAINING REAL-DEVICE MOBILE CORRECTIONS */
@media (max-width: 768px) {
  .creator-hub {
    gap: 11px;
  }

  .creator-hub-header {
    display: block;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .creator-hub-header h1 {
    margin: 0 0 4px;
    text-align: center;
  }

  #creator-dashboard-greeting {
    margin: 0;
    text-align: center;
  }

  .creator-hub-header + .creator-program-switcher {
    margin-top: -2px;
  }

  .creator-members-modal-panel .dashboard-modal-header {
    display: grid;
    gap: 2px;
    min-height: 0;
    padding: 0;
    text-align: left;
  }

  .creator-members-modal-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }

  .creator-members-modal-panel .dashboard-modal-header h2 {
    flex: 1 1 auto;
    margin: 0;
    font-size: clamp(20px, 6.4vw, 26px);
    line-height: 1.1;
  }

  .creator-members-modal-panel .dashboard-modal-close {
    position: static;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
  }

  .creator-members-modal-panel #creator-members-modal-count {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
  }

  .creator-card {
    display: flex;
    flex-direction: column;
    gap: 13px;
    min-height: 0;
    padding: 16px;
    border-radius: 16px;
    text-align: left;
  }

  .creator-card-identity {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
  }

  .creator-card-identity > img,
  .creator-card img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    margin: 0;
    border-radius: 14px;
    object-fit: cover;
  }

  .creator-card-identity-copy {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: center;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .creator-card h3 {
    flex: 1 1 140px;
    min-width: 120px;
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
  }

  .creator-card-username {
    display: block;
    order: 3;
    flex: 1 0 100%;
    margin: 0;
    color: rgba(248, 230, 176, 0.72);
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .creator-card-badges {
    display: flex;
    flex: 0 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-width: 0;
  }

  .creator-card .creator-badge,
  .creator-card .creator-type-tag {
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 100%;
    min-height: 24px;
    margin: 0;
    padding: 3px 7px;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal;
  }

  .creator-card-bio,
  .creator-card p.creator-card-bio {
    display: -webkit-box;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .creator-card-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .creator-card-stat {
    display: grid;
    gap: 2px;
    min-width: 0;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid rgba(248, 230, 176, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    text-align: center;
  }

  .creator-card-stat strong,
  .creator-card-stat span {
    display: block;
  }

  .creator-card-stat strong {
    color: #f8e6b0;
    font-size: 17px;
    line-height: 1.15;
  }

  .creator-card-stat span {
    color: rgba(248, 230, 176, 0.7);
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .creator-card-stat span::before {
    content: none;
  }

  .creator-card .creator-follow-btn {
    width: 100%;
    min-height: 44px;
    margin: 0;
  }

  body.light-mode .creator-card-username,
  body.light-mode .creator-card-stat span {
    color: var(--arete-light-subtle);
  }

  body.light-mode .creator-card-stat {
    border-color: rgba(90, 67, 21, 0.2);
    background: rgba(214, 177, 95, 0.08);
  }

  body.light-mode .creator-card-stat strong {
    color: var(--arete-light-gold-strong);
  }
}

@media (max-width: 340px) {
  .creator-card-identity > img,
  .creator-card img {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }

  .creator-card h3 {
    font-size: 18px;
  }
}

/* TARGETED REAL-DEVICE MOBILE CORRECTIONS */
@media (max-width: 768px) {
  html {
    position: relative;
    min-height: 100%;
    background-color: var(--vedapt-background-color);
  }

  body {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    background: transparent;
  }

  html::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 0;
    pointer-events: none;
    background-color: var(--vedapt-background-color);
    background-image:
      var(--vedapt-background-overlay),
      var(--vedapt-background-image);
    background-size: cover, cover;
    background-position: center, var(--vedapt-mobile-background-position);
    background-repeat: no-repeat, no-repeat;
  }

  #menu-btn {
    position: relative;
    z-index: 12;
    min-width: 44px;
    min-height: 44px;
    pointer-events: auto;
  }

  .mobile-logout-link {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(248, 230, 176, 0.18);
  }

  .creator-hub-section[hidden],
  #creator-empty-state[hidden] {
    display: none;
  }

  .creator-hub-header {
    text-align: center;
  }

  .creator-hub-header > div,
  .creator-hub-header p {
    width: 100%;
    text-align: center;
  }

  .creator-program-switcher {
    margin-inline: auto;
    text-align: left;
  }

  .creator-quick-actions {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-inline: auto;
  }

  .creator-quick-actions .app-btn {
    flex: 0 1 196px;
    width: auto;
  }

  #creator-needs-review-section .section-header {
    align-items: flex-start;
  }

  #creator-dashboard-status {
    font-size: clamp(20px, 5.8vw, 24px);
  }

  .creator-members-modal-panel {
    --dashboard-modal-padding: 16px;
    width: 100%;
    padding: var(--dashboard-modal-padding);
  }

  .creator-members-modal-panel .dashboard-modal-header {
    min-height: 52px;
    padding: 0 52px 12px 0;
    text-align: left;
  }

  .creator-members-modal-panel .dashboard-modal-header > div {
    min-width: 0;
  }

  .creator-members-modal-panel .dashboard-modal-header h2 {
    margin: 0;
    font-size: clamp(21px, 7vw, 28px);
    overflow-wrap: normal;
  }

  .creator-members-modal-panel .dashboard-modal-close {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
  }

  .creator-members-modal-panel .creator-member-list {
    gap: 0;
    max-height: calc(100dvh - 168px);
    padding-right: 8px;
  }

  .modal-content,
  .modal-header,
  .modal-header > div,
  .post-image-picker,
  .post-image-filename,
  .program-form,
  .program-form-grid,
  .program-task-schedule,
  .program-schedule-row,
  .task-builder,
  .task-builder-panel,
  .task-builder-panel-header,
  .task-builder-week,
  .task-builder-week summary {
    min-width: 0;
  }

  #post-modal .modal-content {
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 20px);
    padding: 18px 16px;
    overflow-y: auto;
  }

  #post-modal .modal-content textarea {
    flex: 0 0 auto;
    min-height: 128px;
    height: auto;
    line-height: 1.45;
    resize: vertical;
  }

  #post-modal .post-image-picker {
    align-items: flex-start;
  }

  #post-modal .category-pill-group {
    flex: 0 0 auto;
    overflow: visible;
    padding-bottom: 0;
  }

  #post-modal .post-image-filename,
  #post-modal .upload-status {
    flex: 1 1 150px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
  }

  #post-image-preview {
    flex: 0 1 auto;
    max-height: min(280px, 36dvh);
  }

  .create-program-modal-content {
    padding: 18px 16px;
  }

  .create-program-modal-content .modal-header {
    gap: 12px;
  }

  .create-program-modal-content .modal-header > div {
    flex: 1 1 auto;
  }

  .create-program-modal-content #close-create-program-modal-btn {
    width: 44px;
    height: 44px;
  }

  .program-form-grid,
  .program-schedule-row,
  .program-price-row {
    grid-template-columns: minmax(0, 1fr);
  }

  #program-form .program-top-field,
  #program-form #program-title,
  #program-form #program-category,
  #program-form #program-difficulty,
  #program-form #program-duration,
  #edit-program-form .program-top-field {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    min-height: 52px;
    height: 52px;
  }

  #program-form .program-duration-error {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    min-height: 48px;
    height: auto;
  }

  #program-form select,
  #program-form input,
  #program-form textarea {
    width: 100%;
    min-width: 0;
    line-height: 1.4;
  }

  #program-form select {
    padding-block: 12px;
    padding-right: 38px;
    text-overflow: ellipsis;
  }

  #program-form .program-top-field,
  #edit-program-form .program-top-field,
  #program-form select.program-top-field,
  #edit-program-form select.program-top-field {
    height: 52px;
    padding: 14px 42px 14px 16px;
    line-height: 1.45;
  }

  .program-schedule-help,
  .task-builder-panel p,
  .task-builder-input-guide,
  .task-builder-week small {
    height: auto;
    max-height: none;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .task-builder-panel-header,
  .task-builder-week summary {
    align-items: flex-start;
  }

  .task-builder-week summary::after {
    flex: 0 0 auto;
  }

  .creator-card {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "avatar name"
      "avatar status"
      "avatar category"
      "bio bio"
      "meta-count meta-rating"
      "action action";
    gap: 7px 12px;
    padding: 16px;
    border-radius: 16px;
  }

  .creator-card img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
  }

  .creator-card h3 {
    font-size: 20px;
  }

  .creator-card .creator-badge,
  .creator-card .creator-type-tag {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .creator-card p:not(.creator-type-tag) {
    font-size: 14px;
    line-height: 1.4;
  }

  .creator-card p:not(.creator-type-tag):nth-of-type(2) {
    margin-top: 4px;
  }

  .creator-card p:not(.creator-type-tag):nth-of-type(3),
  .creator-card p:not(.creator-type-tag):nth-of-type(4) {
    min-width: 0;
    width: auto;
    margin-right: 0;
  }

  .leaderboard-page .page-header,
  body:has(.leaderboard-subtitle) .page-header {
    justify-items: center;
    text-align: center;
  }

  .leaderboard-subtitle {
    width: min(100%, 34rem);
    margin-inline: auto;
    text-align: center;
  }

  .leaderboard-subtitle .tooltip-text {
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 32px));
    transform: none;
  }

  .profile-post-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    overflow: visible;
  }

  .profile-post-tab {
    min-width: 0;
    min-height: 44px;
    padding: 8px 6px;
    font-size: clamp(12px, 3.8vw, 14px);
    line-height: 1;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .settings-radio-group {
    gap: 8px;
  }

  .settings-radio {
    width: 100%;
    min-height: 44px;
    padding: 9px 10px;
    align-items: center;
    line-height: 1.35;
    white-space: normal;
  }

  .settings-radio input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
  }

  body.light-mode {
    background-color: transparent;
  }

  body.light-mode nav,
  body.light-mode :is(.app-card, .settings-card, .notification-card, .creator-card, .modal-content, .dashboard-modal-panel, .create-program-modal-content) {
    border-color: rgba(74, 53, 15, 0.3);
    box-shadow: 0 12px 30px rgba(47, 36, 18, 0.12);
  }

  body.light-mode :is(.page-header p, .section-header p, main > p, .section-subtitle) {
    color: #4f3d1d;
  }
}

@media (max-width: 430px) {
  .creator-quick-actions {
    flex-direction: column;
    align-items: center;
  }

  .creator-quick-actions .app-btn {
    flex: 0 0 auto;
    width: min(100%, 250px);
  }
}

@media (max-width: 340px) {
  .creator-card {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 13px;
  }

  .creator-card img {
    width: 64px;
    height: 64px;
  }
}

/* Final cascade placement for the corrected mobile component structures. */
@media (max-width: 768px) {
  .creator-members-modal-panel .dashboard-modal-header {
    display: grid;
    gap: 2px;
    min-height: 0;
    padding: 0;
  }

  .creator-members-modal-panel .dashboard-modal-close {
    position: static;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
  }

  .creator-card {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 16px;
  }

  .creator-card-identity > img,
  .creator-card img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 340px) {
  .creator-card {
    padding: 13px;
  }

  .creator-card-identity > img,
  .creator-card img {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }
}
.creator-program-terminal-note,
.program-archive-note {
  color: var(--text-secondary, #6b7280);
  font-weight: 600;
  margin: 0.65rem 0;
}
.creator-connect-mode-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.45rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.creator-connect-card {
  display: grid;
  gap: 0.75rem;
}

.creator-connect-status {
  font-size: 1.05rem;
  font-weight: 700;
}

.creator-connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.creator-connect-ready {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0;
  padding-block: 0.85rem;
}

.creator-connect-section.creator-connect-section-ready {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.creator-connect-section.creator-connect-section-ready:hover {
  box-shadow: none;
}

#creator-connect-setup[hidden],
.creator-connect-ready[hidden] {
  display: none;
}

.creator-connect-ready-copy {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.creator-connect-ready-indicator {
  align-items: center;
  background: rgba(34, 197, 94, 0.14);
  border-radius: 999px;
  color: #15803d;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  height: 1.5rem;
  justify-content: center;
  width: 1.5rem;
}

@media (max-width: 600px) {
  .creator-connect-ready {
    align-items: stretch;
    flex-direction: column;
  }

  .creator-connect-ready .app-btn {
    width: 100%;
  }
}

/* Creator commercial-readiness completion controls. */
.creator-connect-ready > .app-btn {
  flex: 0 0 auto;
  min-height: 40px;
  margin: 0;
  padding: 9px 14px;
  white-space: nowrap;
}

.seller-profile-complete {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin: 0;
  padding-block: 0.85rem;
}

.seller-profile-complete-copy {
  align-items: center;
  display: flex;
  min-width: 0;
  gap: 0.65rem;
}

.seller-profile-complete-copy > div {
  min-width: 0;
}

.seller-profile-complete-copy strong {
  display: block;
  color: #f8e6b0;
  font-size: 1rem;
}

.seller-profile-complete-copy p {
  margin: 0.2rem 0 0;
  color: rgba(248, 230, 176, 0.7);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.seller-profile-complete > .app-btn {
  flex: 0 0 auto;
  min-height: 38px;
  margin: 0;
  padding: 8px 15px;
}

.seller-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#creator-seller-profile-form[hidden],
#creator-seller-profile-complete[hidden],
#seller-profile-cancel[hidden] {
  display: none;
}

.light-mode .seller-profile-complete-copy strong {
  color: #3f2d12;
}

.light-mode .seller-profile-complete-copy p {
  color: rgba(47, 36, 18, 0.68);
}

@media (max-width: 600px) {
  .seller-profile-complete {
    align-items: stretch;
    flex-direction: column;
  }

  .seller-profile-complete > .app-btn,
  .seller-profile-actions .app-btn {
    width: 100%;
  }
}

.landing-footer {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  font-size: 0.9rem;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 1.5rem 2rem 2rem;
}

.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.landing-footer a {
  color: inherit;
}

body.light-mode .landing-footer {
  border-top-color: rgba(28, 23, 13, 0.14);
  color: rgba(28, 23, 13, 0.7);
}

@media (max-width: 600px) {
  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 1.25rem;
  }
}

/*
 * Desktop density: match the visual scale of the existing UI at roughly 90%
 * browser zoom while preserving the established mobile cascade unchanged.
 * `zoom` participates in layout, unlike a transform, so the interface is not
 * visually shrunk inside an unscaled page.
 */
@media (min-width: 769px) {
  .landing-page .landing-hero h1 {
    font-size: 42px;
    text-shadow: none;
  }

  /* Match the established .landing-section surface in both themes. */
  .landing-page .landing-hero,
  .landing-page .landing-contrast {
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(248, 230, 176, 0.18);
    box-shadow: none;
    backdrop-filter: none;
  }

  .light-mode .landing-page .landing-hero,
  .light-mode .landing-page .landing-contrast {
    border-top-color: rgba(139, 111, 45, 0.18);
    box-shadow: 0 12px 35px rgba(139, 111, 45, 0.16);
  }

  .edit-program-actions {
    display: flex;
    gap: 12px;
  }

  .edit-program-actions .app-btn {
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 12px 18px;
    border-radius: 12px;
  }

  .comment-actions {
    display: flex;
    align-items: center;
    margin-top: 6px;
  }

  /* Avoid inheriting the generic comment-list paragraph card inset. */
  .comments-list .comment-text {
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .comment-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    line-height: 1.4;
  }

  .comment-like-btn:hover,
  .comment-like-btn.liked {
    background: transparent;
    color: #f8e6b0;
  }

  .comment-like-btn:focus-visible {
    outline: 2px solid rgba(248, 230, 176, 0.72);
    outline-offset: 3px;
  }

  #authentication-panel > h2 {
    font-size: 41px;
  }

  .password-reset-form {
    width: min(100%, 320px);
    margin: 14px auto 0;
    justify-items: center;
  }

  .password-reset-form :is(input, button) {
    width: 100%;
    margin-inline: 0;
  }

  #register-modal {
    padding: 12px;
  }

  #register-modal .modal-content {
    width: min(520px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 26px;
  }

  #signup-form {
    gap: 10px;
  }

  #signup-form > input {
    margin: 0;
  }

  #signup-form .signup-legal-fieldset {
    margin: 6px 0;
    padding: 14px 16px;
  }

  #signup-form .signup-legal-checkbox {
    margin: 7px 0;
  }

  .creators-page .creator-grid {
    align-items: stretch;
  }

  .creators-page main > .app-section {
    width: 100%;
    max-width: 900px;
  }

  .creators-page .creator-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 0;
    padding: 18px;
    text-align: center;
  }

  .creators-page .creator-card-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .creators-page .creator-card-identity > img {
    width: min(58%, 120px);
    height: auto;
    aspect-ratio: 1;
    margin: 0;
    border-radius: 50%;
    object-fit: cover;
  }

  .creators-page .creator-card-identity-copy,
  .creators-page .creator-card-badges {
    align-items: center;
    gap: 6px;
  }

  .creators-page .creator-card h3 {
    margin: 0;
    font-size: 23px;
    line-height: 1.2;
  }

  .creators-page .creator-card .creator-type-tag {
    margin: 0;
  }

  .creators-page .creator-card .creator-follow-btn {
    width: min(100%, 180px);
    margin-top: auto;
  }

  .edit-program-page main {
    max-width: 1040px;
  }

  .edit-program-page main > .app-section {
    max-width: 980px;
  }

  .edit-program-page #edit-program-form {
    width: 100%;
    padding: 28px;
    text-align: left;
  }

  .legal-site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    width: calc(100% - 120px);
    max-width: 1760px;
    margin: 58px auto;
    padding: 20px 36px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-radius: 22px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
  }

  .legal-site-header .legal-brand {
    justify-self: start;
    font-size: 36px;
    letter-spacing: normal;
  }

  .legal-site-header nav {
    display: contents;
  }

  .legal-site-header .legal-nav-links {
    grid-column: 2;
    justify-self: center;
  }

  .legal-site-header nav > .theme-icon-btn {
    grid-column: 3;
    justify-self: end;
  }

  html {
    zoom: 0.9;
  }
}

/* Keep the three Profile stats equal-sized on phones. */
@media (max-width: 768px) {
  .profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 620px;
  }
}

/* Keep the Program publication confirmation separate from text-input styling. */
#edit-program-form .program-promise-attestation {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: min(100%, 640px);
  margin: 0 auto;
  color: rgba(248, 230, 176, 0.82);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

#edit-program-form .program-promise-attestation input[type="checkbox"] {
  appearance: auto;
  box-sizing: border-box;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  accent-color: #d6b15f;
}

#edit-program-form .program-promise-attestation input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(248, 230, 176, 0.5);
  outline-offset: 2px;
}

body.light-mode #edit-program-form .program-promise-attestation {
  color: var(--arete-light-subtle);
}

body.light-mode #edit-program-form .program-promise-attestation input[type="checkbox"]:focus-visible {
  outline-color: rgba(90, 67, 21, 0.42);
}
 
/* MOBILE UI CONSISTENCY PASS
 * Keep the established desktop presentation as the reference while giving
 * every phone surface the same spacing, typography, card, control and modal
 * rhythm. This layer is intentionally mobile-only.
 */
@media (max-width: 768px) {
  body {
    --mobile-shell: rgba(10, 9, 7, 0.88);
    --mobile-surface: rgba(18, 16, 12, 0.82);
    --mobile-surface-soft: rgba(255, 255, 255, 0.055);
    --mobile-border: rgba(248, 230, 176, 0.22);
    --mobile-border-strong: rgba(248, 230, 176, 0.34);
    --mobile-heading: #f8e6b0;
    --mobile-copy: #f5f0e6;
    --mobile-subtle: #d8ccb5;
    --mobile-accent: #98d9c2;
    --mobile-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    --mobile-card-radius: 16px;
    --mobile-shell-radius: 18px;

    padding: max(12px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  body.light-mode {
    --mobile-shell: rgba(255, 250, 240, 0.88);
    --mobile-surface: rgba(255, 250, 240, 0.88);
    --mobile-surface-soft: rgba(255, 255, 255, 0.62);
    --mobile-border: rgba(90, 67, 21, 0.22);
    --mobile-border-strong: rgba(90, 67, 21, 0.32);
    --mobile-heading: var(--arete-light-gold-strong);
    --mobile-copy: var(--arete-light-ink);
    --mobile-subtle: #4f3d1d;
    --mobile-accent: #0a6f5d;
    --mobile-shadow: 0 12px 28px rgba(47, 36, 18, 0.11);
  }

  body > nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 68px;
    margin: 0 auto 24px;
    padding: 12px 14px 12px 18px;
    border: 1px solid var(--mobile-border);
    border-radius: var(--mobile-shell-radius);
    background: var(--mobile-shell);
    box-shadow: var(--mobile-shadow);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }

  body > nav h2 {
    align-self: auto;
    margin: 0;
    color: var(--mobile-heading);
    font-size: clamp(29px, 8.2vw, 34px);
    line-height: 1;
    text-align: left;
    text-shadow: none;
  }

  body > nav #menu-btn {
    align-self: auto;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    background: var(--mobile-surface-soft);
    color: var(--mobile-heading);
    box-shadow: none;
  }

  #side-menu {
    gap: 4px;
    width: min(86vw, 320px);
    padding: max(18px, env(safe-area-inset-top)) 16px
      max(18px, env(safe-area-inset-bottom));
    border-left: 1px solid var(--mobile-border);
    background: var(--mobile-shell);
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.38);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  #side-menu > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 10px;
    line-height: 1.2;
  }

  #side-menu > :is(#close-menu-btn, .theme-icon-btn) {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 12px;
  }

  main {
    margin: 24px auto 52px;
  }

  .page-header {
    display: grid;
    gap: 8px;
    margin: 0 auto 22px;
  }

  .page-header h1,
  .section-title,
  main > h1,
  .personal-dashboard-header h1,
  .creator-hub-header h1 {
    margin: 0;
    color: var(--mobile-heading);
    font-size: clamp(34px, 10vw, 42px);
    line-height: 1.06;
    letter-spacing: 0;
    overflow-wrap: normal;
    text-shadow: none;
    text-wrap: balance;
  }

  .page-header p,
  .section-subtitle,
  .section-header p,
  .personal-dashboard-header p,
  .creator-hub-header p,
  main > p {
    margin-top: 0;
    color: var(--mobile-subtle);
    font-size: 15px;
    line-height: 1.5;
    opacity: 1;
  }

  .section-header {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
  }

  .section-header h2,
  .personal-dashboard .section-header h2,
  .creator-hub-section .section-header h2,
  .dashboard-panel h2,
  .dashboard-program-card h2,
  .dashboard-program-card h3,
  .program-detail-section .section-header h2,
  .profile-journey-program-head h2,
  .profile-program-section h2 {
    margin: 0;
    color: var(--mobile-heading);
    font-size: clamp(22px, 6.4vw, 28px);
    line-height: 1.14;
    letter-spacing: 0;
    text-shadow: none;
  }

  main > .app-section {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--mobile-border);
    border-radius: var(--mobile-shell-radius);
    background: var(--mobile-surface);
    box-shadow: var(--mobile-shadow);
  }

  :is(
    .app-card,
    .feed-post,
    .progress-post,
    .notification-card,
    .settings-card,
    .program-card,
    .dashboard-program-card,
    .dashboard-panel,
    .creator-hub-section,
    .creator-review-item,
    .creator-dashboard-program,
    .creator-community-activity,
    .creator-selected-program-card,
    .creator-members-card,
    .profile-card,
    .profile-post-card,
    .profile-journey-entry-body,
    .profile-creator-review,
    .profile-program-card,
    .messages-inbox,
    .messages-thread
  ) {
    border: 1px solid var(--mobile-border);
    border-radius: var(--mobile-card-radius);
    background: var(--mobile-surface-soft);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.light-mode :is(
    .app-card,
    .feed-post,
    .progress-post,
    .notification-card,
    .settings-card,
    .program-card,
    .dashboard-program-card,
    .dashboard-panel,
    .creator-hub-section,
    .creator-review-item,
    .creator-dashboard-program,
    .creator-community-activity,
    .creator-selected-program-card,
    .creator-members-card,
    .profile-card,
    .profile-post-card,
    .profile-journey-entry-body,
    .profile-creator-review,
    .profile-program-card,
    .messages-inbox,
    .messages-thread,
    .modal-content,
    .dashboard-modal-panel,
    .create-program-modal-content
  ) {
    border-color: var(--mobile-border);
    background: var(--mobile-surface-soft);
    box-shadow: 0 8px 22px rgba(47, 36, 18, 0.1);
  }

  :is(.app-btn, .secondary-btn, .category-filter__trigger, .dashboard-mode-option) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-inline: 0;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    box-shadow: none;
  }

  :is(.app-btn, .secondary-btn, .category-filter__trigger, .dashboard-mode-option):hover {
    transform: none;
  }

  :is(input, textarea, select, .app-input, .app-textarea) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-radius: 12px;
  }

  :is(.empty-state, .messages-empty, .profile-saved-status) {
    display: grid;
    gap: 8px;
    width: 100%;
    margin: 12px 0 0;
    padding: 22px 16px;
    border: 1px dashed var(--mobile-border-strong);
    border-radius: 14px;
    background: var(--mobile-surface-soft);
    color: var(--mobile-subtle);
    text-align: center;
  }

  :is(.empty-state, .messages-empty, .profile-saved-status) :is(h2, h3, strong) {
    margin: 0;
    color: var(--mobile-heading);
  }

  :is(.empty-state, .messages-empty, .profile-saved-status) p {
    margin: 0;
    color: var(--mobile-subtle);
    line-height: 1.5;
    opacity: 1;
  }

  .modal,
  #register-modal,
  .creator-modal,
  .messages-modal,
  .settings-delete-modal,
  .dashboard-modal,
  .create-program-modal,
  .creator-onboarding-modal,
  .profile-crop-modal,
  .profile-image-viewer-modal,
  .profile-connections-modal {
    align-items: center;
    justify-content: center;
    padding: max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  :is(.modal, #register-modal) {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  :is(.messages-modal-backdrop, .dashboard-modal-backdrop, .legal-gate-backdrop) {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  :is(
    .modal-content,
    .creator-modal-content,
    .messages-modal .messages-modal-content,
    .settings-delete-modal-panel,
    .dashboard-modal-panel,
    .create-program-modal-content,
    .creator-onboarding-content,
    .profile-edit-modal-content,
    .profile-crop-modal-content,
    .program-crop-modal-content,
    .profile-image-viewer-panel,
    .profile-connections-modal-content,
    .legal-gate-panel
  ) {
    box-sizing: border-box;
    width: 100%;
    max-width: min(100%, 720px);
    max-height: calc(100dvh - 20px);
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--mobile-border-strong);
    border-radius: 18px;
    background: var(--mobile-shell);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
    overscroll-behavior: contain;
  }

  .modal-header,
  .messages-modal-header,
  .dashboard-modal-header {
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    margin-bottom: 16px;
  }

  .dashboard-modal-header {
    display: flex;
    padding: 0;
  }

  .dashboard-modal-header > div {
    flex: 1 1 auto;
    min-width: 0;
  }

  .dashboard-modal-header .dashboard-modal-close {
    position: static;
    margin: 0;
  }

  .dashboard-modal-header h2 {
    font-size: clamp(22px, 6.5vw, 28px);
  }

  :is(.modal-header, .messages-modal-header, .dashboard-modal-header) h2 {
    min-width: 0;
    margin: 0;
    color: var(--mobile-heading);
    font-size: clamp(24px, 7.5vw, 32px);
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: normal;
    text-shadow: none;
  }

  :is(
    #close-modal-btn,
    #close-register-btn,
    #close-create-program-modal-btn,
    .messages-modal-close,
    .dashboard-modal-close,
    .profile-image-viewer-close
  ) {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    background: var(--mobile-surface-soft);
    color: var(--mobile-heading);
    box-shadow: none;
  }

  :is(.feed-modal-actions, .profile-edit-actions, .program-modal-actions, .profile-crop-actions, .legal-gate-actions) {
    gap: 10px;
  }

  /* Homepage */
  .landing-page main.landing-main {
    --landing-section-inset: 18px;
    --landing-card-inset: 18px;
    margin: 18px auto 52px;
  }

  .landing-page .landing-hero,
  .landing-page .landing-section,
  .landing-page .landing-contrast,
  .light-mode .landing-page .landing-hero,
  .light-mode .landing-page .landing-section,
  .light-mode .landing-page .landing-contrast {
    margin: 0;
    padding: 32px var(--landing-section-inset);
    border: 0;
    border-top: 1px solid var(--mobile-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .landing-page .landing-hero {
    min-height: 0;
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .landing-page .landing-hero h1 {
    max-width: 100%;
    margin: 12px 0 16px;
    color: var(--mobile-heading);
    font-size: clamp(38px, 11vw, 44px);
    line-height: 1.04;
    letter-spacing: 0;
    text-shadow: none;
    text-wrap: balance;
  }

  .landing-page :is(.landing-kicker, .landing-section-label) {
    color: var(--mobile-accent);
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .landing-page .landing-section h2 {
    margin: 10px 0 14px;
    color: var(--mobile-heading);
    font-size: clamp(30px, 8.5vw, 36px);
    line-height: 1.1;
    letter-spacing: 0;
    text-shadow: none;
    text-wrap: balance;
  }

  .landing-page :is(.landing-hero-subcopy, .landing-section p) {
    color: var(--mobile-copy);
    font-size: 17px;
    line-height: 1.62;
  }

  .landing-page .landing-hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 22px;
  }

  .landing-page .landing-hero-actions :is(.app-btn, .secondary-btn) {
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 15px;
  }

  .landing-page .landing-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 22px;
  }

  .landing-page .landing-step,
  .light-mode .landing-page .landing-step {
    min-height: 0;
    padding: var(--landing-card-inset);
    border: 1px solid var(--mobile-border);
    border-radius: var(--mobile-card-radius);
    background: var(--mobile-surface-soft);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  }

  .landing-page .landing-step h3 {
    margin: 12px 0 8px;
    color: var(--mobile-heading);
    font-size: 21px;
    line-height: 1.2;
  }

  .landing-page .landing-step p {
    color: var(--mobile-copy);
    font-size: 16px;
    line-height: 1.55;
  }

  /* Creators, Programs and Feed */
  :is(.creator-discovery-controls, .program-discovery-controls) {
    gap: 10px;
  }

  .programs-page .section-header a,
  .feed-page #feed-tab-message a {
    color: var(--mobile-heading);
    text-decoration-color: currentColor;
  }

  .creators-page .creator-card {
    gap: 13px;
    padding: 16px;
    border-radius: var(--mobile-card-radius);
  }

  .creators-page .creator-card-identity > img,
  .creators-page .creator-card img {
    border-radius: 50%;
  }

  .creator-card-stat {
    border-color: var(--mobile-border);
    border-radius: 12px;
    background: var(--mobile-surface-soft);
  }

  .programs-grid,
  .creator-grid,
  .feed-list {
    gap: 14px;
  }

  .feed-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding-bottom: 0;
    overflow: visible;
  }

  .logged-out .feed-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feed-tab,
  .profile-post-tab {
    min-width: 0;
    min-height: 44px;
    padding: 8px 7px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: normal;
  }

  /* Profile */
  main > section:has(> .profile-card),
  main > section:has(> .profile-post-tabs) {
    margin: 0 auto 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .profile-card {
    gap: 14px;
    padding: 20px 16px;
  }

  .profile-card img {
    width: 116px;
    height: 116px;
  }

  .profile-rank-highlight {
    margin: 10px 0 4px;
  }

  .profile-rank-number {
    font-size: 32px;
    line-height: 1;
  }

  .profile-stats {
    gap: 10px;
    width: 100%;
    margin: 12px auto;
  }

  .profile-stat {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 88px;
    padding: 12px;
    border: 1px solid var(--mobile-border);
    border-radius: 14px;
    background: var(--mobile-surface-soft);
  }

  .profile-post-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .profile-actions {
    width: 100%;
  }

  .profile-actions .app-btn {
    width: min(100%, 240px);
  }

  /* Messages */
  main > .messages-layout {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .messages-layout {
    gap: 14px;
  }

  .messages-inbox,
  .messages-thread {
    padding: 16px;
  }

  .messages-panel-header {
    align-items: flex-start;
    gap: 12px;
  }

  .conversation-list-item {
    padding: 12px;
    border-color: var(--mobile-border);
    border-radius: 12px;
    background: var(--mobile-surface-soft);
  }

  .messages-thread-header,
  .chat-box,
  .message-input-area {
    border-color: var(--mobile-border);
    background: var(--mobile-surface-soft);
  }

  .messages-thread-header {
    padding: 12px;
    border-radius: 14px 14px 0 0;
  }

  .chat-box {
    min-height: 320px;
    padding: 16px 12px;
  }

  .message {
    max-width: 82%;
    border-radius: 14px;
  }

  .message-input-area {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
    border-radius: 0 0 14px 14px;
  }

  .message-input-area .app-btn {
    width: auto;
    min-width: 78px;
    min-height: 46px;
  }

  /* Dashboard */
  .personal-dashboard,
  .creator-hub {
    gap: 16px;
  }

  .dashboard-card-grid,
  .creator-dashboard-layout,
  .creator-overview-grid {
    gap: 14px;
  }

  .dashboard-program-card,
  .dashboard-panel,
  .creator-hub-section,
  .creator-review-item,
  .creator-dashboard-program,
  .creator-community-activity,
  .creator-selected-program-card,
  .creator-members-card,
  .creator-stat-card {
    padding: 16px;
    border-radius: var(--mobile-card-radius);
  }

  .dashboard-mode-switch {
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--mobile-border);
    border-radius: 14px;
    background: var(--mobile-surface-soft);
  }

  .creator-quick-actions,
  .creator-selected-program-actions {
    gap: 10px;
  }

  /* Legal and support */
  .legal-site-header {
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0 auto 24px;
    padding: 16px;
    border: 1px solid var(--mobile-border);
    border-radius: var(--mobile-shell-radius);
    background: var(--mobile-shell);
    box-shadow: var(--mobile-shadow);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }

  .legal-site-header .legal-brand {
    color: var(--mobile-heading);
    font-size: 30px;
    line-height: 1;
    text-shadow: none;
  }

  .legal-site-header nav {
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .legal-nav-links {
    justify-content: center;
    gap: 8px 14px;
    line-height: 1.35;
  }

  .legal-main {
    width: 100%;
    margin: 0 auto 44px;
  }

  .legal-article {
    padding: 22px 20px;
    border: 1px solid var(--mobile-border);
    border-radius: var(--mobile-shell-radius);
    background: var(--mobile-surface);
    box-shadow: var(--mobile-shadow);
  }

  .legal-article > h1 {
    margin: 0 0 8px;
    color: var(--mobile-heading);
    font-size: clamp(36px, 10.5vw, 44px);
    line-height: 1.02;
    letter-spacing: 0;
    text-shadow: none;
    text-wrap: balance;
  }

  .legal-article h2 {
    margin: 24px 0 10px;
    color: var(--mobile-heading);
    font-size: clamp(24px, 7vw, 29px);
    line-height: 1.14;
    text-shadow: none;
  }

  .legal-article h3 {
    color: var(--mobile-heading);
    font-size: 20px;
    line-height: 1.25;
  }

  .legal-article :is(p, li, dt, dd) {
    color: var(--mobile-copy);
    font-size: 16px;
    line-height: 1.62;
  }

  .legal-article > section {
    margin: 22px 0 0;
    padding: 0 0 22px;
    border: 0;
    border-bottom: 1px solid var(--mobile-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .legal-article > section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .legal-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 12px;
  }

  .support-contact-grid,
  .support-reference-grid {
    gap: 12px;
  }

  /* Authentication and account-action surfaces */
  #authentication-panel {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 18px;
    border: 1px solid var(--mobile-border);
    border-radius: var(--mobile-shell-radius);
    background: var(--mobile-surface);
    box-shadow: var(--mobile-shadow);
  }

  #authentication-panel > h2,
  .auth-action-card h1 {
    margin: 0 0 14px;
    color: var(--mobile-heading);
    font-size: clamp(31px, 8.8vw, 38px);
    line-height: 1.08;
    letter-spacing: 0;
    text-shadow: none;
  }

  #authentication-panel :is(input, .app-input) {
    min-height: 52px;
    margin: 0;
  }

  #login-form {
    gap: 12px;
  }

  .auth-legal-links {
    color: var(--mobile-subtle);
    font-size: 13px;
    line-height: 1.5;
  }

  #register-modal .modal-content {
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 20px);
    padding: 22px 18px 18px;
    border-radius: 18px;
    background: var(--mobile-shell);
  }

  #register-modal .modal-content > h2 {
    margin: 0 0 14px;
    padding-right: 48px;
    color: var(--mobile-heading);
    font-size: clamp(29px, 8.4vw, 34px);
    line-height: 1.08;
    text-align: left;
    text-shadow: none;
  }

  #close-register-btn {
    top: 10px;
    right: 10px;
  }

  #signup-form {
    gap: 11px;
  }

  #signup-form > input {
    min-height: 52px;
    margin: 0;
  }

  #signup-form .signup-legal-fieldset {
    margin: 4px 0;
    padding: 13px 14px;
    border-radius: 14px;
  }

  #signup-form .signup-legal-checkbox {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
  }

  .auth-action-header,
  .auth-action-footer {
    width: 100%;
  }

  .auth-action-card {
    padding: 22px 18px;
  }
}

@media (max-width: 430px) {
  main > .app-section,
  .legal-article {
    padding: 16px;
  }

  .landing-page main.landing-main {
    --landing-section-inset: 16px;
    --landing-card-inset: 16px;
  }

  .dashboard-program-card,
  .dashboard-panel,
  .creator-hub-section,
  .creator-review-item,
  .creator-dashboard-program,
  .creator-community-activity,
  .creator-selected-program-card,
  .creator-members-card,
  .creator-stat-card {
    padding: 14px;
  }

  .creator-quick-actions,
  .creator-selected-program-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* MOBILE UI CORRECTION PASS
 * These overrides are intentionally phone-only so the established desktop
 * presentation remains unchanged.
 */
@media (max-width: 768px) {
  /* Author-level component display rules must never defeat semantic hidden
     state. This also keeps retry/recovery controls available only on errors. */
  [hidden] {
    display: none !important;
  }

  .logged-in #side-menu .side-theme-toggle.logged-out-link {
    display: none !important;
  }

  /* Keep every discovery category readable with one consistent label style. */
  .category-filter__popover {
    width: min(340px, calc(100vw - 28px));
  }

  .category-filter__choice {
    min-height: 44px;
    padding: 8px 7px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  /* Signed-in and signed-out Feed use the same compact three-tab geometry. */
  .feed-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Give the selected Creator Program state a little air above its title. */
  .creator-selected-program-main .creator-program-state {
    display: inline-flex;
    margin: 0 0 10px;
    transform: translateY(-2px);
  }

  /* Three compact, equally weighted attention metrics. */
  #creator-attention-summary.creator-attention-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 0;
    padding: 12px 2px;
  }

  #creator-attention-summary > :is(strong, span) {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.15px;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
  }

  #creator-attention-summary > :is(strong, span) + :is(strong, span) {
    border-left: 1px solid var(--mobile-border);
  }

  #creator-attention-summary > span:last-child {
    white-space: nowrap;
  }

  #creator-attention-summary > :is(strong, span) > span {
    display: block;
    margin: 0 0 4px;
    color: var(--mobile-heading);
    font-size: 22px;
    font-weight: 850;
    line-height: 1;
  }

  /* Match desktop's low-key intent with a compact two-column stats strip. */
  #creator-overview-section .creator-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  #creator-overview-section .creator-stat-card {
    display: grid;
    align-content: center;
    gap: 3px;
    min-height: 60px;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #creator-overview-section .creator-stat-card + .creator-stat-card {
    border-left: 1px solid var(--mobile-border);
  }

  #creator-overview-section .creator-stat-card .stat-number {
    margin: 0;
    font-size: 20px;
    line-height: 1;
  }

  #creator-overview-section .creator-stat-card .stat-label {
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.25;
  }

  .leaderboard-tabs {
    width: 100%;
    margin-inline: auto;
    justify-content: center;
    overflow: visible;
  }

  .settings-hub-grid {
    gap: 12px;
  }

  .settings-hub-card {
    min-height: 58px;
    margin: 0;
    padding: 11px 16px;
  }

  /* Keep profile identity headings inside the phone viewport even for rare,
     unusually long account names. */
  #profile-username,
  #profile-name {
    max-width: 100%;
    line-height: 1.08;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
    word-break: normal;
    text-wrap: balance;
  }

  #profile-username {
    font-size: clamp(27px, 7.4vw, 34px);
  }

  #profile-name {
    font-size: clamp(22px, 6.2vw, 28px);
  }

  /* The About resource values share one deliberate right-hand column instead
     of drifting according to each label's length. */
  [data-settings-panel="about"] .settings-about-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  [data-settings-panel="about"] .settings-about-list > div > :is(span, a) {
    min-width: 0;
    justify-self: stretch;
    line-height: 1.35;
    text-align: right;
    overflow-wrap: anywhere;
  }

  [data-settings-panel="about"] .settings-about-list a {
    color: var(--mobile-heading);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  /* Remove the generic button margin so this action starts level with Inbox. */
  .messages-panel-header #start-conversation-btn {
    align-self: flex-start;
    margin: 0;
  }

  /* The phone tooltip must open into available content space, not above the
     page heading where it is clipped by the viewport. */
  .leaderboard-subtitle .tooltip-text {
    top: calc(100% + 8px);
    right: -2px;
    bottom: auto;
    left: auto;
    width: min(190px, calc(100vw - 32px));
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.35;
    text-align: left;
    transform: none;
  }

  body:has(.leaderboard-subtitle) .page-header {
    position: relative;
    z-index: 2;
  }

  /* Give the non-creator dashboard one centered, fully contained mobile
     column and make the final Creator Account section a real peer card. */
  #standard-dashboard:has(> #creator-account-section:not([hidden])) {
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
  }

  #standard-dashboard:has(> #creator-account-section:not([hidden])) > :is(
    .personal-dashboard-header,
    .app-section,
    #creator-account-section
  ) {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  #standard-dashboard:has(> #creator-account-section:not([hidden]))
    .personal-dashboard-header {
    justify-items: center;
    padding-inline: 4px;
    text-align: center;
  }

  #standard-dashboard:has(> #creator-account-section:not([hidden]))
    .personal-dashboard-header h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  #standard-dashboard:has(> #creator-account-section:not([hidden]))
    .personal-dashboard-header :is(h1, p) {
    margin-inline: auto;
    text-align: center;
  }

  #creator-account-section:not([hidden]) {
    padding: 16px;
    border: 1px solid var(--mobile-border);
    border-radius: var(--mobile-card-radius);
    background: var(--mobile-surface-soft);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  }

  #creator-account-section:not([hidden]) .section-header {
    display: grid;
    justify-items: center;
    gap: 6px;
    text-align: center;
  }

  #creator-account-section:not([hidden]) .section-header :is(h2, p) {
    margin: 0;
    text-align: center;
  }

  /* The three creator attention labels remain compact without becoming tiny. */
  #creator-attention-summary > :is(strong, span) {
    font-size: 11.5px;
    line-height: 1.28;
    letter-spacing: 0;
  }

  #creator-attention-summary > :is(strong, span) > span {
    font-size: 23px;
  }

  #creator-overview-section .creator-stat-card .stat-label {
    font-size: 12px;
    line-height: 1.3;
  }

  /* In mobile light mode the legal article is already the page surface, so
     Support's inner sections use spacing and dividers instead of nested boxes. */
  body.light-mode .legal-article:has(#support-case-signed-out) :is(
    #support-case-signed-out.app-card,
    #support-case-signed-in > .app-card,
    .support-contact-card.app-card,
    .support-case-detail.app-card
  ) {
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.light-mode .legal-article:has(#support-case-signed-out) .support-contact-card.app-card {
    padding: 4px 0 16px;
  }
}

/* Creator payout-frequency control. */
.creator-payout-preference-card {
  margin-top: 0.75rem;
  padding-block: 0.85rem;
}

.creator-payout-preference-summary {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.creator-payout-preference-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  text-align: left;
}

.creator-payout-preference-copy strong {
  color: #f8e6b0;
  display: block;
  font-size: 1rem;
}

.creator-payout-preference-copy span {
  color: rgba(248, 230, 176, 0.7);
  font-size: 0.84rem;
}

#creator-payout-frequency-change {
  flex: 0 0 auto;
  margin: 0;
  min-height: 38px;
  padding: 8px 15px;
  white-space: nowrap;
}

.creator-payout-preference-editor {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.creator-payout-preference-editor label {
  font-weight: 700;
  grid-column: 1 / -1;
}

.creator-payout-preference-editor select {
  min-height: 42px;
}

.creator-payout-preference-actions {
  display: flex;
  gap: 0.5rem;
}

.creator-payout-preference-actions .app-btn {
  margin: 0;
  min-height: 42px;
  min-width: 88px;
  white-space: nowrap;
}

.creator-payout-frequency-status {
  margin: 0.65rem 0 0;
}

.light-mode .creator-payout-preference-copy strong {
  color: #3f2d12;
}

.light-mode .creator-payout-preference-copy span {
  color: rgba(47, 36, 18, 0.68);
}

#creator-payout-preference-form[hidden],
#creator-payout-preference-summary[hidden],
#creator-payout-preference-editor[hidden],
#creator-payout-frequency-status[hidden] {
  display: none;
}

/* Completed seller disclosure uses the same compact treatment. */
body #creator-seller-profile-section.seller-profile-collapsed {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

body #creator-seller-profile-section.seller-profile-collapsed:hover {
  box-shadow: none;
}

.seller-profile-complete-copy {
  align-items: initial;
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  text-align: left;
}

.seller-profile-complete-copy strong {
  display: block;
  color: #f8e6b0;
  font-size: 1rem;
}

.seller-profile-complete-details {
  color: rgba(248, 230, 176, 0.7);
  display: block;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

#creator-seller-profile-intro[hidden] {
  display: none;
}

.light-mode .seller-profile-complete-details {
  color: rgba(47, 36, 18, 0.68);
}

@media (max-width: 600px) {
  .creator-payout-preference-card {
    padding-block: 0.85rem;
  }

  .creator-payout-preference-editor {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

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

  .creator-payout-preference-actions .app-btn {
    width: 100%;
  }

  .seller-profile-complete {
    align-items: center;
    flex-direction: row;
  }

  .seller-profile-complete > .app-btn {
    width: auto;
  }
}
