.account-page {
  --display: var(--font);
  --violet: #8b6bc7;
  background:
    radial-gradient(circle at 8% 18%, rgba(242, 124, 118, .14), transparent 25rem),
    radial-gradient(circle at 92% 34%, rgba(146, 98, 251, .12), transparent 24rem),
    var(--paper);
}

.account-page .site-header {
  position: relative;
}

.account-button.active {
  background: var(--ink);
  color: #fff;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(30rem, 1.1fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: start;
  min-height: 44rem;
  padding-top: clamp(3.5rem, 8vw, 7rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.account-intro {
  position: sticky;
  top: 2rem;
  padding-top: 1.8rem;
}

.account-intro .eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.account-intro h1 {
  max-width: 11ch;
  margin: 1rem 0 1.5rem;
  font-family: var(--display);
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: .94;
  letter-spacing: -.055em;
}

.account-intro h1 span {
  color: var(--coral);
}

.account-lead {
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.account-benefits {
  display: grid;
  gap: .85rem;
  margin: 2.5rem 0;
  padding: 0;
  list-style: none;
}

.account-benefits li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: .85rem;
  align-items: start;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(40, 40, 39, .12);
}

.account-benefits li > span {
  color: var(--violet);
  font-family: var(--display);
  font-weight: 700;
}

.account-benefits strong { display: block; margin-bottom: .15rem; }
.account-benefits p { margin: 0; color: var(--muted); }

.account-game-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.account-game-row a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .75rem .45rem .5rem;
  border: 1px solid rgba(40, 40, 39, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}

.account-game-row a:hover { transform: translateY(-2px); border-color: var(--ink); }
.account-game-row img { width: 2rem; height: 2rem; object-fit: contain; }

.account-card {
  position: relative;
  overflow: hidden;
  min-height: 38rem;
  padding: clamp(1.6rem, 4vw, 3rem);
  border: 1px solid rgba(40, 40, 39, .14);
  border-radius: 2rem;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 1.5rem 5rem rgba(63, 44, 84, .12);
  backdrop-filter: blur(16px);
}

.account-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: .42rem;
  background: linear-gradient(90deg, var(--coral) 0 50%, var(--violet) 50%);
  content: "";
}

.account-card-mark {
  position: absolute;
  top: 1.5rem;
  right: 1.7rem;
  opacity: .2;
  transform: rotate(8deg);
}

.account-view { position: relative; z-index: 1; }
.account-view[hidden] { display: none !important; }
.account-view h2 { margin: .35rem 0 1.4rem; font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -.035em; }
.account-view h3 { margin: .6rem 0; font-family: var(--display); font-size: 1.6rem; }
.account-view > p { color: var(--muted); line-height: 1.6; }
.account-kicker { margin: 0; color: var(--violet) !important; font-size: .76rem; font-weight: 800; letter-spacing: .12em; }

.account-status {
  position: relative;
  z-index: 2;
  margin: 0 0 1.2rem;
  padding: .85rem 1rem;
  border-radius: .9rem;
  background: #e9f9ef;
  color: #17643a;
  font-size: .92rem;
  line-height: 1.45;
}

.account-status.is-error { background: #fff0ee; color: #9e3029; }

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin-bottom: 1.4rem;
  padding: .28rem;
  border-radius: 999px;
  background: #f0ece6;
}

.account-tabs button {
  min-height: 2.65rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.account-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 .2rem .8rem rgba(40, 40, 39, .08); }

.account-form { display: grid; gap: 1rem; }
.account-form[hidden] { display: none; }
.account-form label, .danger-zone label { display: grid; gap: .45rem; color: var(--ink); font-size: .86rem; font-weight: 750; }
.account-form small { color: var(--muted); font-size: .75rem; font-weight: 500; line-height: 1.35; }

.account-form input[type="email"],
.account-form input[type="password"],
.account-form input[type="text"],
.danger-zone input {
  width: 100%;
  min-height: 3.2rem;
  padding: .75rem .9rem;
  border: 1px solid #d9d2ca;
  border-radius: .85rem;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 550;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.account-form input:focus, .danger-zone input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(146, 98, 251, .14); }
.account-form input:disabled { opacity: .65; }

.password-field { position: relative; display: block; }
.password-field input { padding-right: 3.5rem !important; }
.password-field button { position: absolute; top: 50%; right: .55rem; transform: translateY(-50%); border: 0; background: transparent; color: var(--violet); font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }

.account-two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.account-check { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 550 !important; line-height: 1.45; }
.account-check input { width: 1.1rem; height: 1.1rem; margin-top: .1rem; accent-color: var(--violet); }
.account-check a { color: var(--violet); }

.account-submit { width: 100%; min-height: 3.2rem; margin-top: .2rem; border: 0; cursor: pointer; }
.account-submit:disabled, .secondary-button:disabled { cursor: wait; opacity: .6; }
.account-text-action, .account-back { justify-self: center; border: 0; background: transparent; color: var(--violet); font: inherit; font-size: .86rem; font-weight: 750; cursor: pointer; }
.account-back { justify-self: start; padding: 0; display: inline-flex; align-items: center; gap: .35rem; }

.turnstile-slot { min-height: 4.2rem; display: grid; place-items: center; }
.turnstile-slot:empty::before { content: "Preparando comprobación…"; color: var(--muted); font-size: .78rem; }

.account-loading, .account-centered { min-height: 31rem; display: grid; place-items: center; align-content: center; text-align: center; }
.account-loading p { margin: 1rem 0 0; color: var(--muted); }
.account-spinner { width: 2.8rem; height: 2.8rem; border: 3px solid rgba(146, 98, 251, .18); border-top-color: var(--violet); border-radius: 50%; animation: account-spin .8s linear infinite; }
@keyframes account-spin { to { transform: rotate(360deg); } }
.account-mail { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin-bottom: 1rem; border-radius: 1.35rem; background: var(--coral); color: #fff; font-family: var(--display); font-size: 2rem; font-weight: 800; transform: rotate(-5deg); }
.account-centered .button { min-width: 14rem; margin-top: 1rem; border: 0; cursor: pointer; }
.account-centered .account-text-action { margin-top: .7rem; }

.profile-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; padding-right: 4rem; }
.profile-heading h2 { margin: .2rem 0 .2rem; font-size: 2.15rem; }
.profile-heading p:last-child { margin: 0; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.profile-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 4rem; height: 4rem; border-radius: 1.3rem; background: var(--profile-color, var(--violet)); color: #fff; font-family: var(--display); font-size: 1.8rem; font-weight: 800; transform: rotate(-3deg); }
.color-picker { margin: .2rem 0; padding: 0; border: 0; }
.color-picker legend { margin-bottom: .6rem; font-size: .86rem; font-weight: 750; }
.color-picker > div { display: flex; flex-wrap: wrap; gap: .55rem; }
.color-option { position: relative; display: block !important; }
.color-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.color-option span { display: block; width: 2.2rem; height: 2.2rem; border: 3px solid #fff; border-radius: 50%; background: var(--choice); box-shadow: 0 0 0 1px #d3ccc4; cursor: pointer; }
.color-option input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.color-option input:focus-visible + span { outline: 3px solid rgba(146, 98, 251, .3); outline-offset: 3px; }

.account-actions { display: grid; gap: 1rem; margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid #e1dbd4; }
.secondary-button { min-height: 2.8rem; border: 1px solid #cfc7bf; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 750; cursor: pointer; }
.danger-zone { color: #8f342e; font-size: .85rem; }
.danger-zone summary { width: max-content; cursor: pointer; font-weight: 750; }
.danger-zone p { max-width: 34rem; color: var(--muted); line-height: 1.5; }
.danger-zone label { max-width: 24rem; }
.danger-zone button { margin-top: .8rem; padding: .75rem 1rem; border: 0; border-radius: .75rem; background: #b83d35; color: #fff; font: inherit; font-weight: 750; cursor: pointer; }
.danger-zone button:disabled { cursor: not-allowed; opacity: .4; }
.account-noscript { padding: 1rem; border-radius: 1rem; background: #fff0ee; color: #9e3029; }

@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2.5rem; }
  .account-intro { position: static; padding-top: 0; }
  .account-intro h1 { max-width: 13ch; }
  .account-benefits { grid-template-columns: repeat(3, 1fr); }
  .account-benefits li { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .account-layout { padding-top: 1.6rem; padding-bottom: 4rem; }
  .account-intro h1 { font-size: 3.2rem; }
  .account-benefits { grid-template-columns: 1fr; gap: 0; }
  .account-benefits li { grid-template-columns: 2.5rem 1fr; }
  .account-game-row span { display: none; }
  .account-game-row a { padding: .42rem; }
  .account-card { min-height: 34rem; padding: 1.5rem 1.15rem; border-radius: 1.4rem; }
  .account-card-mark { width: 3.5rem; top: 1.1rem; right: 1rem; }
  .account-two-fields { grid-template-columns: 1fr; }
  .profile-heading { padding-right: 3rem; }
}
