.page-profile {
  --brand-action: #174d35;
  --brand-action-hover: #0c3925;
  --brand-surface: #f5f6f2;
  --brand-badge: #bd3205;
  --catalog-line: #e7ebe6;
}
.page-profile > .header { position: sticky; z-index: 4; top: 0; border-bottom-color: var(--catalog-line); }
.page-profile .profile-icon-link[aria-current] { background: var(--brand-surface); }
.account-page { display: grid; align-content: start; gap: clamp(14px, 1.6vw, 22px); padding-top: clamp(14px, 2.5vw, 30px); }
.profile-hero {
  display: grid;
  align-content: center;
  min-height: clamp(132px, 12.5vw, 186px);
  border-radius: clamp(18px, 3vw, 32px);
  padding: clamp(20px, 4vw, 52px);
  background: linear-gradient(90deg, #9f290c 0%, #ad2b0bdb 31%, #ad2b0b00 65%), #b83310 url('hero.jpg') 55% 48% / cover no-repeat;
  color: white;
}
.profile-hero .back-link { color: #fff5ed; margin-bottom: 10px; }
.profile-hero .back-link:hover { color: white; text-decoration: underline; }
.profile-hero .back-link:focus-visible { outline-color: white; }
.profile-hero h1 { max-width: 79%; margin: 0; font-size: clamp(31px, 5vw, 56px); line-height: 1.04; letter-spacing: -.048em; }
#account-feedback { margin: 0; }
.profile-panel {
  margin-inline: auto;
  width: min(100%, 560px);
  border-color: var(--catalog-line);
  padding: clamp(22px, 5vw, 42px);
}
.profile-panel h2 { margin: 0 0 12px; font-size: clamp(19px, 3vw, 23px); }
.profile-panel p { margin: 0 0 16px; line-height: 1.5; color: var(--muted); }
.profile-panel .notice { color: #583410; }
.profile-panel .button { width: 100%; min-height: 46px; border-radius: 12px; }
.profile-panel .account-yandex { background: #202020; color: white; }
.profile-panel .account-yandex:hover:not(:disabled) { background: #363636; }
.account-page .text-button { color: var(--brand-action); }
#account-yandex-guest { margin-top: 16px; }
.profile-panel .account-phone-note { margin: 9px 0 0; font-size: 14px; }
.profile-panel .account-verified { margin: -6px 0 0; color: var(--brand-action); font-size: 14px; }
.account-call .text-button { margin-top: 10px; }
.account-dashboard { width: min(100%, 880px); margin-inline: auto; }
.account-overview-heading { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: clamp(13px,2.6vw,21px); margin: 3px 0 17px; }
.account-overview-heading .account-avatar { width: clamp(52px, 7vw, 74px); }
.account-overview-heading h1 { margin: 0; font-size: clamp(25px,4vw,42px); font-weight: 900; letter-spacing: -.047em; line-height: 1.1; overflow-wrap: anywhere; }
.account-icon-button.account-gear { color: var(--ink); background: #f5f6f2; font-size: 25px; }
.account-gear span { line-height: 1; }
.account-shortcuts { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: clamp(8px,2.4vw,16px); }
.account-bonus-card, .account-orders-link {
  min-width: 0; min-height: 122px; border-radius: 19px; padding: clamp(12px,2.5vw,22px);
}
.account-bonus-card { border: 1px solid #f2dca1; background: linear-gradient(135deg,#fff7df,#fff1c9); color: #4c361c; scroll-margin-top: 78px; }
.account-shortcut-heading { display: flex; gap: 6px; align-items: center; }
.account-shortcut-heading h2 { margin: 0; font-size: clamp(13px,2.1vw,17px); font-weight: 900; }
.account-shortcut-heading .bonus-star { width: 20px; height: 20px; }
.account-balance-refresh { position: relative; margin-inline-start: auto; flex: none; min-width: 29px; height: 28px; padding: 0; border: 0; border-radius: 8px; color: #694718; background: #ffe7ac; font-size: 18px; line-height: 1; }
.account-balance-refresh::after { content: ''; position: absolute; inset: -7px -5px; }
.account-balance-refresh:hover:not(:disabled) { background: #ffdc86; }
.account-balance { display: flex; align-items: baseline; gap: 2px 6px; flex-wrap: wrap; margin-top: 7px; font-size: 13px; overflow-wrap: anywhere; }
.account-balance-number { font-size: clamp(26px,4.7vw,43px); letter-spacing: -.05em; font-weight: 950; line-height: 1; font-variant-numeric: tabular-nums; }
.account-balance-accounts { width: 100%; margin: 6px 0 0; padding: 0; list-style: none; font-size: 12px; }
.account-orders-link { position: relative; display: grid; justify-items: start; align-content: space-between; gap: 10px; border: 1px solid #d6e5d9; background: #eef6ee; color: var(--brand-action); }
.account-orders-link:hover { background: #e2efe4; }
.account-orders-link strong { padding-inline-end: 8px; font-size: clamp(14px,2.3vw,19px); font-weight: 900; line-height: 1.2; }
.account-orders-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: white; }
.account-orders-link .account-order-arrow { position: absolute; top: 20px; right: 16px; }
.account-promotions { margin-top: clamp(20px,3.5vw,30px); }
.account-promotions h2 { margin: 0 0 11px; font-size: clamp(19px,3vw,26px); font-weight: 900; letter-spacing: -.035em; }
.account-offers-empty { display: flex; align-items: center; gap: clamp(10px,3vw,22px); min-height: 102px; padding: 9px clamp(12px,3vw,24px); border: 1px solid var(--catalog-line); border-radius: 18px; background: #fafaf6; }
.account-offers-empty img { width: clamp(72px,15vw,102px); height: auto; flex: none; }
.account-offers-empty p { margin: 0; color: var(--ink); font-size: clamp(14px,2.1vw,17px); font-weight: 800; line-height: 1.3; }
.account-back, .orders-back { justify-self: start; margin: 0 0 12px; }
.orders-page { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.orders-sign-in { width: min(100%,520px); margin-inline: auto; }
.orders-sign-in h1 { margin: 0; }
.account-receipt { position: relative; display: inline-block; width: 14px; height: 18px; margin-inline: 4px; border: 1.6px solid currentColor; border-radius: 3px; }
.account-receipt::after { content: ''; position: absolute; top: 4px; inset-inline: 2px; height: 1px; background: currentColor; box-shadow: 0 3px currentColor, 0 6px currentColor; }
.account-card { min-width: 0; border: 1px solid var(--catalog-line); border-radius: 18px; padding: clamp(16px, 2.1vw, 24px); background: white; }
.account-heading { display: flex; align-items: center; gap: clamp(12px, 2vw, 22px); }
.account-heading-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.account-heading h1 { margin: 0 0 4px; color: var(--muted); font-size: 15px; font-weight: 750; }
.account-heading p { margin: 0; font-size: clamp(23px, 3vw, 36px); font-weight: 900; line-height: 1.1; letter-spacing: -.035em; }
.account-avatar { display: grid; flex: none; place-items: center; width: clamp(60px, 8vw, 86px); aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid #dce8df; border-radius: 28%; background: #e7f1e8; color: var(--brand-action); font-size: clamp(20px, 3vw, 34px); font-weight: 900; }
button.account-avatar:hover { border-color: var(--brand-action); }
.account-avatar img, .account-avatar-option img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.account-icon-button { display: grid; flex: none; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--catalog-line); border-radius: 12px; background: #fff; color: var(--brand-action); }
.account-icon-button:hover { background: var(--brand-surface); }
.account-logout { margin-inline-start: auto; }
.account-exit-icon { position: relative; width: 12px; height: 16px; margin-right: 6px; border: 1.7px solid currentColor; border-right: 0; border-radius: 3px 0 0 3px; }
.account-exit-icon::before { content: ''; position: absolute; width: 12px; height: 1.7px; top: 5.5px; left: 5px; background: currentColor; }
.account-exit-icon::after { content: ''; position: absolute; width: 6px; height: 6px; top: 3px; left: 10px; transform: rotate(45deg); border-top: 1.7px solid currentColor; border-right: 1.7px solid currentColor; }
.account-details { margin: 0; padding: 4px 14px; border-radius: 12px; background: var(--brand-surface); }
.account-details div { display: grid; grid-template-columns: minmax(5em, max-content) minmax(0, 1fr); align-items: baseline; gap: 10px; padding-block: 9px; }
.account-details div + div { border-top: 1px solid var(--catalog-line); }
.account-details dt { color: var(--muted); font-size: 14px; line-height: 1.25; }
.account-details dd { margin: 0; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
#account-data .account-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 23px; padding: 12px 0 0; border-top: 1px solid var(--catalog-line); background: none; border-radius: 0; }
#account-data .account-details > div { grid-template-columns: 1fr; gap: 3px; padding: 0; border: 0; }
.account-editor { margin-top: 17px; }
.account-editor summary { width: fit-content; color: var(--brand-action); cursor: pointer; font-weight: 800; }
.account-editor form { max-width: 420px; }
.account-editor p { margin: 0; color: var(--muted); font-size: 14px; }
.account-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.account-section-heading :is(h1,h2) { margin: 0; font-size: clamp(20px, 3vw, 27px); letter-spacing: -.025em; }
.account-section-heading .button { min-height: 40px; padding: 7px 12px; line-height: 1.2; }
.account-list { display: grid; gap: 10px; }
.account-list > p { margin: 0; color: var(--muted); }
.account-list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--catalog-line); border-radius: 12px; }
.account-list-item > div { min-width: 0; overflow-wrap: anywhere; }
.account-list-item p, .account-list-item h3 { margin: 4px 0 0; white-space: pre-wrap; }
.account-list-item h3 { font-size: 17px; }
.account-list-item time { display: block; margin-top: 7px; font-size: 13px; color: var(--brand-action); font-weight: 750; }
.account-actions, .account-settings { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.account-settings { margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--catalog-line); }
.account-page .account-danger-link { color: #a52f23; }
.account-page .account-email-note { color: var(--brand-action); font-weight: 750; overflow-wrap: anywhere; }
.page-profile .account-dialog { inset: 0; width: min(500px, calc(100% - 28px)); height: fit-content; max-height: calc(100% - 28px); margin: auto; padding: clamp(18px, 4vw, 27px); border: 1px solid var(--catalog-line); border-radius: 20px; background: white; }
.account-dialog p { color: var(--muted); }
.account-dialog a { text-decoration: underline; }
.account-dialog .account-close { font-size: 25px; line-height: 1; }
.account-dialog .account-danger-button { background: #a52f23; }
.account-avatar-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.account-avatar-option { display: grid; min-width: 0; gap: 4px; padding: 4px; color: var(--brand-action); border: 1px solid var(--catalog-line); border-radius: 13px; background: white; font-size: 12px; font-weight: 800; }
.account-avatar-option img { border-radius: 9px; }
.account-avatar-option:hover, .account-avatar-option[aria-pressed="true"] { border-color: var(--brand-action); background: var(--brand-surface); }
.account-history h1 { margin: 0 0 14px; font-size: clamp(26px, 4vw, 42px); letter-spacing: -.042em; scroll-margin-top: 85px; }
.account-orders { padding: 4px clamp(12px, 2vw, 22px); }
.account-orders > p { margin: 0; padding: 14px 0; color: var(--muted); }
.account-order { display: grid; grid-template-columns: 74px minmax(0,1fr) auto 18px; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--catalog-line); color: var(--ink); }
.account-order:last-child { border: 0; }
.account-order:hover .account-order-title { color: var(--orange); }
.account-order-arrow { width: 7px; height: 7px; justify-self: center; border: solid var(--brand-action); border-width: 1.7px 1.7px 0 0; transform: rotate(45deg); }
.account-order-photo, .account-order-placeholder { width: 100%; height: 62px; border-radius: 12px; background: var(--brand-surface); }
.account-order-photo { object-fit: cover; display: block; }
.account-order-placeholder { display: grid; place-items: center; color: var(--brand-action); }
.account-order-main, .account-order-end { min-width: 0; display: grid; gap: 4px; }
.account-order-title { font-weight: 850; }
.account-order-meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.account-order-end { justify-items: end; text-align: right; }
.account-order-status { justify-self: end; padding: 5px 9px; border-radius: 8px; background: #e7f1e8; color: var(--brand-action); font-size: 12px; font-weight: 850; line-height: 1.2; text-align: right; }
.account-order-status:is([data-step="-1"],[data-step="1"],[data-step="2"]) { background: #fff0e8; color: #9c2f10; }
.account-order-status[data-step="-2"] { background: #ffefed; color: #a33127; }
.account-order-amount { white-space: nowrap; }
.account-order-content { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(240px,1fr); gap: 16px; align-items: start; }
.account-order-content .active-order-card { grid-template-columns: minmax(0,1fr); box-shadow: none; }
.account-order-content .active-order-photo { height: 130px; object-position: 50% 67%; }
.account-order-content .active-order-status { font-size: clamp(22px,2.5vw,30px); }
.account-order-content .active-order-main { padding: clamp(13px,1.7vw,22px); }
.account-order-content .active-order-label { font-size: 11px; }
.account-order-facts { display: grid; gap: 9px; margin: 16px 0 0; padding: 12px 14px; border-radius: 13px; background: var(--brand-surface); }
.account-order-facts > div { display: grid; grid-template-columns: auto minmax(0,1fr); column-gap: 9px; }
.account-order-facts svg { grid-row: span 2; width: 19px; height: 19px; margin-top: 3px; color: var(--brand-action); fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.account-order-facts dt, .account-order-payment { color: var(--muted); font-size: 13px; }
.account-order-facts dd { margin: 0; font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.account-order-receipt h3 { margin: 0 0 14px; font-size: 22px; letter-spacing: -.025em; }
.account-order-items { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.account-order-items li { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: 8px; align-items: center; font-size: 14px; line-height: 1.25; }
.account-order-items li > div { display: grid; gap: 3px; overflow-wrap: anywhere; }
.account-order-items li > div > span { color: var(--muted); font-size: 12px; }
.account-order-items li > strong { white-space: nowrap; }
.account-order-item-photo, .account-order-item-placeholder { width: 46px; height: 44px; border-radius: 9px; background: var(--brand-surface); }
.account-order-item-photo { object-fit: cover; }
.account-order-item-placeholder { display: grid; place-items: center; color: var(--brand-action); }
.account-order-totals { display: grid; gap: 8px; margin: 16px 0 0; padding-top: 11px; border-top: 1px solid var(--catalog-line); }
.account-order-totals > div { display: flex; justify-content: space-between; gap: 9px; }
.account-order-totals > div:last-child { font-size: 19px; font-weight: 900; }
.account-order-totals dd, .account-order-payment { margin: 0; text-align: right; }
.account-order-support { width: 100%; margin-top: 14px; border-radius: 11px; text-align: center; }
.account-page #account-confirm-form { margin-top: 20px; }
.profile-panel .consent[hidden] { display: none; }
.profile-panel .consent input { accent-color: var(--brand-action); margin-top: .27em; }
.profile-panel .consent a { color: var(--brand-action); text-decoration: underline; }
.profile-panel button:focus-visible {
  outline: 2px solid var(--brand-action); outline-offset: 3px;
}
@media (max-width: 760px) {
  .profile-hero { background-image: linear-gradient(90deg, #9f290cf5, #ad2b0b80 65%, #ad2b0b00), url('hero.jpg'); }
  .orders-page { width: calc(100% - 28px); }
}
@media (max-width: 900px) {
  .account-order-content { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 470px) {
  .account-shortcuts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-bonus-card, .account-orders-link { min-height: 99px; border-radius: 16px; }
  .account-avatar-options { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .account-order { grid-template-columns: 51px minmax(0,1fr) 12px; gap: 7px 10px; }
  .account-order-photo, .account-order-placeholder { height: 51px; }
  .account-order-end { grid-column: 2; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; text-align: left; }
  .account-order > .account-order-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .account-order-status { text-align: left; }
}
