.cm-account-stage[hidden] { display: none !important; }

.cm-account-stage {
  min-height: min(900px, calc(100vh - 160px));
  padding: clamp(2rem, 6vw, 5rem) 1.25rem clamp(4rem, 8vw, 7rem);
  position: relative;
  isolation: isolate;
}

.cm-account-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 10%, rgba(190, 145, 255, .12), transparent 34rem),
    radial-gradient(circle at 82% 18%, rgba(244, 198, 111, .08), transparent 30rem);
}

.cm-account-stage-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.cm-account-stage-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cm-account-back {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  opacity: .78;
  cursor: pointer;
  padding: .45rem 0;
}

.cm-account-back:hover { opacity: 1; }

.cm-account-stage-mark {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .52;
}

.cm-account-panel {
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 30px;
  padding: clamp(1.35rem, 3vw, 2.5rem);
  background: rgba(22, 17, 35, .72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .26);
  backdrop-filter: blur(18px);
}

.cm-account-panel-head { margin-bottom: 1.5rem; }
.cm-account-panel-head h1 {
  margin: .2rem 0 0;
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(2.25rem, 6vw, 4.1rem);
  font-weight: 600;
  line-height: .98;
}

.cm-account-eyebrow {
  margin: 0;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .58;
}

.cm-account-intro {
  max-width: 680px;
  margin: -.5rem 0 1.5rem;
  line-height: 1.65;
  opacity: .72;
}

.cm-auth-frame-wrap {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(7, 5, 13, .26);
}

.cm-auth-frame {
  display: block;
  width: 100%;
  min-height: 680px;
  border: 0;
  background: transparent;
}

.cm-account-loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .9rem;
  opacity: .68;
}

.cm-account-loading span {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, .16);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: cm-account-spin .8s linear infinite;
}

@keyframes cm-account-spin { to { transform: rotate(360deg); } }

.cm-profile-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
}

.cm-profile-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(192, 147, 255, .3), rgba(244, 198, 111, .28));
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.6rem;
}

.cm-profile-summary strong,
.cm-profile-summary span { display: block; }
.cm-profile-summary strong { font-size: 1.05rem; }
.cm-profile-summary span { margin-top: .2rem; opacity: .58; font-size: .88rem; }

.cm-rules-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(244, 198, 111, .22);
  border-radius: 20px;
  background: rgba(244, 198, 111, .06);
}

.cm-rules-card strong { display: block; margin-bottom: .2rem; }
.cm-rules-card p { margin: 0; opacity: .68; line-height: 1.45; }

.cm-profile-form { display: grid; gap: 1.15rem; }
.cm-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.cm-profile-grid:has(.cm-profile-field:nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cm-profile-field { display: grid; gap: .5rem; }
.cm-profile-field > span { font-weight: 700; font-size: .9rem; }
.cm-profile-field small { opacity: .52; line-height: 1.35; }

.cm-profile-field input,
.cm-profile-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: .85rem .95rem;
  outline: none;
  background: rgba(6, 4, 12, .36);
  color: inherit;
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.cm-profile-field textarea { resize: vertical; min-height: 130px; }
.cm-profile-field input:focus,
.cm-profile-field textarea:focus {
  border-color: rgba(208, 170, 255, .56);
  box-shadow: 0 0 0 3px rgba(190, 145, 255, .08);
}

.cm-profile-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: .35rem;
}

.cm-profile-save-state { opacity: .7; font-size: .9rem; }

.cm-account-notice {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  font-size: .92rem;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .04);
}

.cm-account-notice.is-success { border-color: rgba(129, 224, 173, .25); }
.cm-account-notice.is-error { border-color: rgba(255, 130, 145, .26); }
.cm-nav-logout { font: inherit; cursor: pointer; }

@media (max-width: 800px) {
  .cm-account-panel { border-radius: 22px; }
  .cm-profile-grid,
  .cm-profile-grid:has(.cm-profile-field:nth-child(3)) { grid-template-columns: 1fr; }
  .cm-rules-card { align-items: flex-start; flex-direction: column; }
  .cm-auth-frame { min-height: 760px; }
}

@media (prefers-reduced-motion: reduce) {
  .cm-account-loading span { animation-duration: 1.8s; }
}

/* Keep account/profile content clear of the fixed site header. */
.cm-account-stage {
  padding-top: 118px !important;
}

@media (max-width: 900px) {
  .cm-account-stage {
    padding-top: 104px !important;
  }
}

.cm-profile-about{width:100%;margin:18px 0}.cm-profile-about .cm-profile-field{width:100%}.cm-profile-about textarea{min-height:180px;resize:vertical;line-height:1.5}
