#perfil-page {
  --profile-gold: #e7c56e;
  --profile-violet: #9871e8;
  --profile-panel: rgba(20, 18, 39, .82);
  --profile-line: rgba(255, 255, 255, .085);
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 24px 100px;
  color: #f6f3fa;
}

#profile-page { box-sizing: border-box; width: 100%; min-width: 0; max-width: none; margin: 0; }

#perfil-page p { text-align: left; }
#profile-content[hidden], .profile-vitals[hidden], .profile-name-edit[hidden] { display: none !important; }

.profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 150px;
  padding: 28px 34px;
  border: 1px solid rgba(231, 197, 110, .2);
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 15%, rgba(152, 113, 232, .2), transparent 35%),
    linear-gradient(135deg, rgba(31, 26, 53, .96), rgba(15, 14, 29, .96));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
}

.profile-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -125px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(231, 197, 110, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(152, 113, 232, .035), 0 0 0 88px rgba(231, 197, 110, .025);
  pointer-events: none;
}

.profile-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(231, 197, 110, .3);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(231, 197, 110, .16), rgba(152, 113, 232, .16));
  color: var(--profile-gold);
  font-size: 1.55rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 15px 35px rgba(0, 0, 0, .2);
}

.profile-intro { position: relative; z-index: 1; min-width: 0; }
.profile-kicker, .section-eyebrow {
  margin: 0 0 8px;
  color: var(--profile-gold);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.profile-hero h1 {
  margin: 0;
  font: 650 clamp(1.75rem, 3.5vw, 2.7rem)/1.08 Raleway, sans-serif;
  letter-spacing: -.045em;
}

.profile-email { margin: 8px 0 0; color: #aca6b8; font-size: .82rem; }
.profile-vitals { position: relative; z-index: 1; display: flex; gap: 10px; }
.profile-vitals div {
  min-width: 108px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 15px;
  background: rgba(7, 7, 18, .26);
  text-align: center;
  backdrop-filter: blur(12px);
}
.profile-vitals strong, .profile-vitals span { display: block; }
.profile-vitals strong { color: var(--profile-gold); font: 650 1.45rem Raleway, sans-serif; }
.profile-vitals span { margin-top: 2px; color: #9690a2; font-size: .64rem; }
.profile-name-edit, .quiet-button {
  padding: 0;
  border: 0;
  background: none;
  color: #aaa3b7;
  font: 600 .72rem Raleway, sans-serif;
  text-decoration: underline;
  cursor: pointer;
}
.profile-name-edit { position: absolute; z-index: 2; left: 129px; bottom: 20px; }
.profile-name-form { position: relative; z-index: 2; grid-column: 2/-1; padding-top: 12px; border-top: 1px solid var(--profile-line); }
.profile-name-form label { display: block; margin-bottom: 7px; color: #c9c3d5; font-size: .76rem; }
.profile-name-form div { display: flex; gap: 8px; }
.profile-name-form input, .period-product textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  background: rgba(8, 8, 21, .5);
  color: #fff;
  font: inherit;
  outline: none;
}
.profile-name-form input:focus, .period-product textarea:focus { border-color: rgba(231, 197, 110, .48); box-shadow: 0 0 0 3px rgba(231, 197, 110, .07); }
.profile-name-form input { padding: 11px 13px; }
.profile-name-form button { padding: 10px 18px; border: 0; border-radius: 10px; background: var(--profile-gold); color: #1a1420; font-weight: 800; }
.profile-alert { margin: 14px 4px 0; color: #d8c99f; font-size: .8rem; }
.profile-loading { padding: 80px 20px; color: #aaa4bb; text-align: center; }
.profile-loading p { text-align: center !important; }
#profile-signin { padding: 12px 21px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #efd383, #cda64e); color: #17121f; font: 800 .8rem Raleway, sans-serif; cursor: pointer; }

#profile-content {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  padding-top: 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
}

.profile-section {
  position: relative;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--profile-line);
  border-radius: 22px;
  background: var(--profile-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 18px 55px rgba(0, 0, 0, .14);
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
}
.profile-section::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 28px;
  width: 44px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--profile-gold), var(--profile-violet));
}
.astrology-section { grid-column: span 8; background: radial-gradient(circle at 94% 4%, rgba(231, 197, 110, .11), transparent 34%), var(--profile-panel); }
.week-section { grid-column: span 4; background: radial-gradient(circle at 90% 0, rgba(152, 113, 232, .13), transparent 38%), var(--profile-panel); }
.patterns-section { grid-column: span 5; }
.deepen-section { grid-column: span 7; background: radial-gradient(circle at 95% 8%, rgba(152, 113, 232, .2), transparent 35%), linear-gradient(145deg, rgba(36, 26, 59, .94), rgba(19, 16, 37, .94)); }
.history-section { grid-column: 1/-1; scroll-margin-top: 92px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading h2, .deepen-copy h2 {
  margin: 0;
  font: 700 clamp(1.18rem, 2.3vw, 1.55rem)/1.15 Raleway, sans-serif;
  letter-spacing: -.035em;
}
.text-link { color: var(--profile-gold); font-size: .76rem; font-weight: 700; }
.daily-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(231, 197, 110, .25);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(231, 197, 110, .14), rgba(152, 113, 232, .1));
  color: #efd993;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.daily-cta:hover { transform: translateY(-1px); border-color: rgba(231, 197, 110, .48); background: linear-gradient(135deg, rgba(231, 197, 110, .2), rgba(152, 113, 232, .14)); }
.daily-cta span { font-size: 1rem; transition: transform .18s ease; }
.daily-cta:hover span { transform: translateX(3px); }
.daily-cta.is-complete { border-color: rgba(152, 113, 232, .28); color: #d8c8f1; }

.natal-identity, .natal-empty { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.identity-label { color: #a98bdd; font-size: .65rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.natal-identity h3, .natal-empty h3, .synastry-card h3, .horoscope-profile-card h3 { margin: 7px 0 6px; font: 650 1.05rem/1.3 Raleway, sans-serif; }
.natal-identity p, .natal-empty p, .synastry-card p, .horoscope-profile-card p { margin: 0; color: #b9b3c5; line-height: 1.55; }
.big-three { display: flex; gap: 8px; grid-row: 1/3; grid-column: 2; }
.big-three div { display: grid; place-items: center; min-width: 92px; padding: 13px 8px; border-left: 1px solid var(--profile-line); }
.big-three div > span { color: var(--profile-gold); font-size: 1.25rem; }
.big-three small { color: #938c9f; font-size: .65rem; }
.big-three strong { margin-top: 4px; font: 700 .78rem Raleway, sans-serif; text-align: center; }
.natal-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.primary-button, .secondary-button, .available-map button, .history-actions button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  font: 800 .75rem Raleway, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.primary-button, .available-map button, .history-actions button:first-child { background: linear-gradient(135deg, #f0d27f, #caa248); color: #18131e; box-shadow: 0 8px 22px rgba(205, 165, 75, .13); }
.primary-button--large { padding: 13px 20px; }
.secondary-button, .history-actions button { border: 1px solid rgba(231, 197, 110, .28); background: transparent; color: #dfcb94; }
.primary-button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.available-maps { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--profile-line); }
.available-maps > summary { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; color: #dcd7e5; font-size: .77rem; font-weight: 750; cursor: pointer; list-style: none; }
.available-maps > summary::-webkit-details-marker { display: none; }
.available-maps > summary strong { display: grid; place-items: center; min-width: 25px; height: 25px; border: 1px solid rgba(231, 197, 110, .2); border-radius: 99px; color: var(--profile-gold); font-size: .66rem; }
.available-maps__list { padding-top: 12px; }
.available-maps__list > p { margin: 0 0 8px !important; color: #9790a4; font-size: .73rem; }
.available-map { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .055); font-size: .75rem; }
.available-map button { padding: 7px 10px; font-size: .68rem; }
.synastry-card { display: grid; grid-template-columns: 45px 1fr auto; gap: 15px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--profile-line); }
.horoscope-profile-card { display: grid; grid-template-columns: 45px 1fr auto; gap: 15px; align-items: center; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--profile-line); }
.horoscope-profile-sky { position: relative; display: grid; place-items: center; width: 42px; height: 42px; color: #d6b971; }
.horoscope-profile-sky i { position: absolute; inset: 2px; border: 1px solid rgba(214,185,113,.35); border-radius: 50%; }
.horoscope-profile-sky b { position: absolute; right: -2px; color: #bda9c9; font-size: .72rem; }
.horoscope-profile-cta { color: #d6b971; text-decoration: none; font-weight: 700; white-space: nowrap; }
.synastry-orbits { position: relative; width: 43px; height: 43px; }
.synastry-orbits span { position: absolute; width: 30px; height: 30px; border: 1px solid #a383dc; border-radius: 50%; }
.synastry-orbits span:last-child { left: 12px; top: 9px; border-color: var(--profile-gold); }
.synastry-context { margin-top: 5px !important; color: #d0c4e4 !important; font-size: .75rem; }
.synastry-profile-cta { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(231, 197, 110, .25); border-radius: 10px; color: var(--profile-gold); font-size: .7rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.synastry-profile-cta:hover { border-color: rgba(231, 197, 110, .48); background: rgba(231, 197, 110, .07); }
.profile-synastries { margin-top: 17px; }
.profile-synastries:empty { display: none; }
.profile-synastries__label { margin: 0 0 7px; color: #898293; font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.profile-synastries__grid { display: grid; gap: 7px; }
.profile-synastry { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.06); color: #e9e3ed; text-decoration: none; }
.profile-synastry:hover strong { color: var(--profile-gold); }
.profile-synastry > span:not(.profile-synastry__orbits) { min-width: 0; }
.profile-synastry small, .profile-synastry em { display: block; color: #8e8799; font-size: .61rem; font-style: normal; }
.profile-synastry strong { display: block; margin: 2px 0 3px; font-size: .76rem; transition: color .18s ease; }
.profile-synastry b { color: var(--profile-gold); font-size: .9rem; }
.profile-synastry__orbits { position: relative; width: 34px; height: 32px; }
.profile-synastry__orbits i { position: absolute; width: 23px; height: 23px; border: 1px solid #9a77db; border-radius: 50%; }
.profile-synastry__orbits i:last-child { right: 0; bottom: 0; border-color: #e2789b; }

.week-section .section-heading { flex-direction: column; }
.week-progress-copy, .coverage-copy { margin: 0 0 11px; color: #cfc9d8; font-size: .83rem; line-height: 1.5; }
.week-progress { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.week-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--profile-violet), var(--profile-gold)); transition: width .4s ease; }
.week-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 16px; }
.week-card { min-width: 0; padding: 7px; border: 1px solid rgba(255, 255, 255, .065); border-radius: 12px; background: rgba(255, 255, 255, .018); text-align: center; }
.week-card.is-recorded { border-color: rgba(231, 197, 110, .25); background: rgba(231, 197, 110, .035); }
.week-card__day { display: block; margin-bottom: 6px; color: #8f899a; font-size: .59rem; text-transform: capitalize; }
.week-card img, .week-card__empty { width: 100%; aspect-ratio: 2/3; border-radius: 7px; object-fit: cover; }
.week-card img.is-reversed { transform: rotate(180deg); }
.week-card__empty { display: grid; place-items: center; border: 1px dashed rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .15); }
.week-card strong { display: block; margin-top: 5px; font-size: .58rem; line-height: 1.2; overflow-wrap: anywhere; }
.week-card:not(.is-recorded) strong { display: none; }
.week-milestone { margin: 12px 0 0; color: #a99abc; font-size: .72rem; line-height: 1.45; }

.patterns-section .section-heading { flex-direction: column; }
.range-switch, .period-picker { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: rgba(255, 255, 255, .045); }
.range-switch { width: 100%; }
.range-switch button, .period-picker button { flex: 1; padding: 8px 11px; border: 0; border-radius: 8px; background: transparent; color: #9d96a9; font: 750 .7rem Raleway, sans-serif; cursor: pointer; }
.range-switch button.is-active, .period-picker button.is-active { background: rgba(231, 197, 110, .13); color: #ecd38f; box-shadow: inset 0 0 0 1px rgba(231, 197, 110, .08); }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.stat-card { padding: 17px; border-top: 1px solid var(--profile-line); }
.stat-card:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--profile-line); }
.stat-card h3 { margin: 0 0 12px; font: 750 .79rem Raleway, sans-serif; }
.stat-card p { margin: 7px 0; color: #aaa4b6; font-size: .74rem; line-height: 1.45; }
.stat-card p strong { color: var(--profile-gold); font-size: 1rem; }
.top-cards, .stat-list { margin: 0; padding: 0; list-style: none; }
.top-cards li { display: flex; gap: 9px; align-items: center; margin-top: 7px; }
.top-cards img { width: 30px; height: 45px; border-radius: 5px; object-fit: cover; }
.top-cards strong, .top-cards span { display: block; }
.top-cards strong { font-size: .7rem; }
.top-cards span { color: #918b9d; font-size: .62rem; }
.stat-list li { display: grid; grid-template-columns: 1fr 36px; gap: 5px 7px; align-items: center; margin: 9px 0; }
.stat-list li > div:first-child { display: flex; justify-content: space-between; grid-column: 1/3; font-size: .64rem; }
.stat-list span, .stat-list small { color: #918b9d; }
.stat-list small { font-size: .58rem; text-align: right; }
.stat-bar { height: 4px; border-radius: 9px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.stat-bar span { display: block; height: 100%; background: linear-gradient(90deg, #8963cf, #c19be8); }
.stats-empty { padding: 22px 0; }
.stats-empty a { color: var(--profile-gold); }

.deepen-copy > p:last-child { max-width: 580px; color: #bbb4c7; line-height: 1.55; }
.period-picker { width: max-content; margin: 18px 0 15px; }
.period-product h3 { margin: 0 0 7px; font: 700 1rem Raleway, sans-serif; }
.period-coverage, .period-status, #period-balance { color: #9992a5; font-size: .72rem; }
.period-product label { display: block; margin: 16px 0 7px; font-size: .75rem; }
.period-product label span { color: #85808e; }
.period-product textarea { padding: 12px; resize: vertical; }
.period-purchase-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 12px; }
.period-purchase-row p { margin: 0; }
.period-status a { color: var(--profile-gold); }
.saved-title { margin: 20px 0 9px; font: 700 .9rem Raleway, sans-serif; }
.saved-insight { margin-top: 8px; border-top: 1px solid var(--profile-line); }
.saved-insight > summary { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; cursor: pointer; }
.saved-insight summary small { color: #928b9e; }
.saved-insight > div { padding: 0 0 14px; color: #d5cfdf; line-height: 1.65; }
.saved-insight h4 { margin: 15px 0 5px; color: var(--profile-gold); }
.saved-insight p { margin: 0 0 8px; }

.history-group { border-top: 1px solid var(--profile-line); }
.history-group > summary { display: flex; justify-content: space-between; padding: 15px 2px; cursor: pointer; color: #d8d3df; }
.history-group > summary strong { color: var(--profile-gold); }
.history-group > div { padding: 0 0 12px; }
.history-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 13px 2px; border-top: 1px solid rgba(255, 255, 255, .045); }
.history-row span { color: #9d86bd; font-size: .59rem; font-weight: 800; text-transform: uppercase; }
.history-row h3 { margin: 4px 0; font-size: .8rem; }
.history-row p { margin: 0; color: #96909f; font-size: .67rem; }
.history-actions { display: flex; gap: 6px; }
.history-actions button { padding: 7px 10px; font-size: .65rem; }
.history-reading { flex: 0 0 100%; }
.history-reading > summary { color: var(--profile-gold); cursor: pointer; font-size: .7rem; }
.history-reading > div { margin-top: 11px; line-height: 1.6; }
.local-note, .empty-copy { color: #96909f; font-size: .72rem; }

@media (max-width: 1020px) {
  .astrology-section, .week-section, .patterns-section, .deepen-section { grid-column: 1/-1; }
  .week-section .section-heading, .patterns-section .section-heading { flex-direction: row; }
  .week-cards { grid-template-columns: repeat(7, minmax(75px, 1fr)); overflow-x: auto; }
  .week-card:not(.is-recorded) strong { display: block; }
}

@media (max-width: 700px) {
  html { overflow-x: hidden; }
  body.page-perfil-page .dropdown-menu { width: 100% !important; max-width: 100vw !important; }
  #perfil-page { padding: 22px 14px 70px; }
  .profile-hero { grid-template-columns: auto 1fr; gap: 15px; min-height: 0; padding: 21px; border-radius: 20px; }
  .profile-avatar { width: 54px; height: 54px; border-radius: 17px; }
  .profile-vitals { grid-column: 1/-1; }
  .profile-vitals div { flex: 1; min-width: 0; padding: 11px; }
  .profile-name-edit { position: static; grid-column: 2; justify-self: start; }
  .profile-name-form { grid-column: 1/-1; }
  #profile-content { display: block; padding-top: 6px; }
  .profile-section { margin-top: 14px; padding: 22px; border-radius: 18px; }
  .section-heading--split, .week-section .section-heading, .patterns-section .section-heading { flex-direction: column; }
  .natal-identity, .natal-empty { grid-template-columns: 1fr; }
  .big-three { grid-column: 1; grid-row: auto; }
  .big-three div { flex: 1; min-width: 0; padding: 10px 5px; }
  .synastry-card, .horoscope-profile-card { grid-template-columns: 40px 1fr; }
  .horoscope-profile-cta { grid-column: 2; }
  .synastry-profile-cta { grid-column: 2; justify-self: start; }
  .coming-soon { grid-column: 2; width: max-content; }
  .week-cards { grid-template-columns: repeat(7, 92px); }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card, .stat-card:nth-child(odd) { padding: 16px 0; border-right: 0; }
  .period-purchase-row, .history-row { align-items: stretch; flex-direction: column; }
  .history-actions { flex-wrap: wrap; }
  .history-actions button { flex: 1; }
}
