.profile-dashboard {
  max-width: 1200px;
  margin: auto;
}
.profile-dashboard .profile-heading {
  margin-bottom: 24px;
  flex-direction: row;
  align-items: center;
}
.profile-dashboard h1 {
  font-size: 36px;
}
.profile-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
}
.profile-person {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  min-width: 0;
}
.profile-person-heading {
  display: flex;
  align-items: center;
  gap: 24px;
}
.profile-person .identity-copy {
  min-width: 0;
}
.profile-person .identity-copy h2 {
  font-size: 26px;
  margin: 0;
  overflow-wrap: anywhere;
}
.profile-person .profile-email {
  font-size: 14px;
  margin-top: 5px;
}
.profile-photo-button {
  position: relative;
  border: 0;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  overflow: visible;
  padding: 0;
  cursor: pointer;
}
.profile-photo-button:hover {
  box-shadow: 0 0 0 3px #ed168133;
}
.profile-photo-add {
  position: absolute;
  right: -2px;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--pink);
  color: white;
  font-size: 22px;
  line-height: 1;
}
.profile-photo-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}
.profile-photo-actions button {
  font-size: 14px;
  min-height: 36px;
  padding: 0;
}
.profile-photo-reward {
  font-size: 14px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.profile-status-progress {
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.profile-status-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 14px;
  color: var(--muted);
}
.profile-status-caption > strong {
  font-size: 18px;
  color: var(--navy);
}
.profile-status-progress .level-scale {
  background: #ece8f3;
  margin: 12px 0;
  height: 7px;
}
.profile-status-progress .home-link {
  font-size: 14px;
}
.profile-achievements {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.profile-achievements-title {
  font-size: 16px;
  font-weight: 650;
  color: var(--navy);
}
.profile-achievements-title > span {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
.profile-achievements-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.profile-achievements-badges .achievement-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.profile-achievements-badges svg {
  width: 25px;
  height: 25px;
}
.profile-badge-more {
  display: grid;
  place-items: center;
  background: var(--soft);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 14px;
  color: var(--pink-dark);
}
.profile-achievements > .home-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  white-space: nowrap;
  font-size: 16px;
}
.profile-achievements > .home-link span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}
.profile-overview .balance-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
  min-width: 0;
}
.profile-overview .balance-caption {
  font-size: 16px;
  position: relative;
  z-index: 1;
}
.profile-overview .balance-number {
  font-size: 54px;
  margin: 12px 0 0;
  line-height: 1.3;
}
.profile-overview .balance-number > span {
  font-size: 16px;
}
.profile-overview .balance-card > p {
  font-size: 14px;
  margin: 12px 0 24px;
  position: relative;
  z-index: 1;
}
.profile-overview .balance-card > .primary-button {
  font-size: 16px;
  position: relative;
  z-index: 1;
}
.profile-overview .balance-card > .profile-balance-activate {
  display: block;
  background: none;
  color: #fff;
  padding: 0;
  margin-top: 16px;
  min-height: 36px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.profile-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.profile-section-nav a {
  padding: 12px 18px;
  background: #f5f3f8;
  border-radius: 10px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}
.profile-section-nav a:hover {
  background: var(--soft);
  color: var(--pink-dark);
}
.profile-section-nav a > span {
  margin-left: 8px;
  color: var(--pink-dark);
}
.profile-daily {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 28px;
  margin: 24px 0;
}
.profile-daily-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.profile-daily h2 {
  font-size: 20px;
  color: var(--navy);
}
.profile-daily-top p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 7px;
}
.profile-daily-top .primary-button {
  font-size: 15px;
  white-space: normal;
}
.profile-daily-details {
  margin-top: 15px;
}
.profile-daily-details > summary {
  cursor: pointer;
  color: var(--navy);
  font-size: 14px;
  min-height: 30px;
}
.profile-daily-details > .muted {
  font-size: 14px;
}
.profile-daily-details .daily-days {
  margin: 15px 0;
}
.profile-daily-details .daily-day > span,
.profile-daily-details .daily-day small {
  font-size: 14px;
}
.profile-daily-details .daily-day {
  min-height: 105px;
}
.profile-purchases {
  scroll-margin-top: 24px;
}
.profile-purchases .hub-section-heading h2 {
  font-size: 26px;
}
.purchase-section-note {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 20px;
}
.purchase-search-row {
  display: flex;
  align-items: center;
  gap: 18px;
}
.purchase-search {
  flex: 1;
  max-width: 540px;
  min-width: 0;
}
.purchase-search input {
  font-size: 16px;
}
.purchase-search-row > .muted {
  font-size: 14px;
  margin-left: auto;
  white-space: nowrap;
}
.profile-purchases .reward-orders-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.profile-purchases .purchase-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}
.purchase-item-heading {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}
.purchase-thumb {
  display: grid;
  place-items: center;
  width: 88px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f3f8;
}
.purchase-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.purchase-thumb-empty {
  color: var(--pink-dark);
  font-weight: 700;
}
.profile-purchases .purchase-card h3 {
  font-size: 17px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  margin: 4px 0 8px;
}
.purchase-item-heading .partner,
.profile-purchases time {
  font-size: 14px;
}
.purchase-item-heading > strong {
  font-size: 18px;
  color: var(--pink-dark);
  white-space: nowrap;
}
.purchase-item-heading > strong small {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.profile-purchases .purchased-promo {
  margin-top: 20px;
  padding: 14px;
  background: #f8f6fb;
  border-radius: 10px;
}
.profile-purchases .purchased-promo > span {
  font-size: 14px;
}
.profile-purchases .purchased-promo > div {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.profile-purchases .purchased-promo code {
  font-size: 18px;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  max-width: 100%;
}
.profile-purchases .purchased-promo button {
  font-size: 14px;
  min-height: 36px;
}
.purchase-conditions {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  min-height: 40px;
  margin-top: 8px;
}
.purchase-delivery {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}
.purchase-delivery summary {
  cursor: pointer;
  min-height: 32px;
}
.purchase-delivery p {
  overflow-wrap: anywhere;
  margin: 8px 0;
}
.purchase-search-empty {
  text-align: center;
  padding: 38px 16px;
}
.purchase-search-empty h3,
.reward-orders-empty h3 {
  font-size: 20px;
  color: var(--navy);
}
.purchase-search-empty p,
.reward-orders-empty p {
  font-size: 16px;
  color: var(--muted);
  margin: 10px 0 18px;
}
.profile-history {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 24px;
  margin: 28px 0;
}
.profile-history > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  cursor: pointer;
  padding: 24px 28px;
  list-style: none;
}
.profile-history > summary::-webkit-details-marker {
  display: none;
}
.profile-history > summary h2 {
  font-size: 24px;
  color: var(--navy);
  margin: 0;
}
.profile-history > summary > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}
.profile-history > summary:after {
  content: '+';
  font-size: 25px;
  color: var(--navy);
}
.profile-history[open] > summary:after {
  content: '−';
}
.profile-history-content {
  padding: 0 28px 26px;
}
.profile-history .points-stats {
  gap: 12px;
  margin: 0 0 22px;
}
.profile-history .points-stat {
  padding: 16px;
  background: #f8f6fb;
  border: 0;
}
.profile-history .points-stat > strong {
  font-size: 24px;
}
.profile-photo-dialog {
  max-width: 440px;
}
.profile-photo-preview {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  margin: 24px auto;
}
.profile-photo-dialog > .muted {
  text-align: center;
  margin: 0 0 22px;
  font-size: 14px;
}
.profile-photo-dialog button {
  min-height: 44px;
}
.profile-photo-button:focus-visible,
.profile-history summary:focus-visible,
.profile-daily-details summary:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 4px;
}
@media (max-width: 1000px) {
  .profile-overview {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 18px;
  }
  .profile-person {
    padding: 24px;
  }
  .profile-person-heading {
    gap: 16px;
  }
  .profile-overview .balance-card {
    padding: 24px;
  }
  .profile-overview .balance-number {
    font-size: 46px;
  }
  .purchase-item-heading {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }
  .purchase-thumb {
    width: 72px;
    height: 64px;
  }
  .purchase-item-heading > strong {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .profile-purchases .purchase-card {
    padding: 18px;
  }
}
@media (max-width: 760px) {
  .profile-dashboard h1 {
    font-size: 30px;
  }
  .profile-overview {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-person {
    padding: 22px 20px;
  }
  .profile-person .identity-copy h2 {
    font-size: 23px;
  }
  .profile-photo-button {
    width: 76px;
    height: 76px;
  }
  .profile-overview .balance-card {
    padding: 24px;
  }
  .profile-overview .balance-number {
    font-size: 46px;
  }
  .profile-achievements {
    align-items: start;
    gap: 15px;
    flex-wrap: wrap;
  }
  .profile-section-nav {
    gap: 7px;
    margin: 20px 0;
  }
  .profile-section-nav a {
    font-size: 14px;
    padding: 11px 14px;
  }
  .profile-daily {
    padding: 20px;
  }
  .profile-daily-top {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }
  .profile-daily-top .primary-button {
    width: 100%;
  }
  .profile-daily-details .daily-days {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .profile-daily-details .daily-day strong {
    font-size: 23px;
  }
  .profile-daily-details .daily-day > span,
  .profile-daily-details .daily-day small {
    font-size: 12px;
  }
  .profile-purchases {
    padding: 22px 20px;
  }
  .profile-purchases .hub-section-heading h2 {
    font-size: 24px;
  }
  .profile-purchases .hub-section-heading {
    gap: 14px;
    flex-wrap: wrap;
  }
  .purchase-search-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .purchase-search {
    max-width: none;
  }
  .purchase-search-row > .muted {
    margin-left: 0;
  }
  .profile-purchases .reward-orders-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .purchase-item-heading {
    grid-template-columns: 80px minmax(0, 1fr) auto;
  }
  .purchase-thumb {
    width: 80px;
    height: 64px;
  }
  .purchase-item-heading > strong {
    display: block;
    grid-column: auto;
  }
  .profile-history > summary {
    padding: 22px 20px;
    gap: 12px;
  }
  .profile-history > summary h2 {
    font-size: 22px;
  }
  .profile-history > summary > span {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .profile-history > summary:after {
    margin-left: auto;
  }
  .profile-history-content {
    padding: 0 20px 22px;
  }
  .profile-history .points-stats {
    grid-template-columns: 1fr;
  }
  .profile-photo-dialog {
    width: calc(100% - 32px);
    padding: 24px;
  }
  .profile-photo-dialog .purchase-dialog-actions {
    flex-wrap: wrap;
  }
  .profile-photo-dialog .primary-button {
    flex: 1;
  }
}
@media (max-width: 420px) {
  .profile-person-heading {
    align-items: flex-start;
    gap: 14px;
  }
  .profile-person .identity-copy h2 {
    font-size: 21px;
  }
  .profile-photo-button {
    width: 64px;
    height: 64px;
  }
  .profile-status-caption {
    align-items: flex-start;
  }
  .profile-photo-actions {
    gap: 12px;
  }
  .purchase-item-heading {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .purchase-thumb {
    width: 64px;
    height: 58px;
  }
  .purchase-item-heading > strong {
    grid-column: 2;
    display: flex;
    gap: 6px;
  }
  .profile-photo-preview {
    width: 180px;
    height: 180px;
  }
}
