:root,
html[data-palette="1"] {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --bg-1: #040a1c;
  --bg-2: #0b2152;
  --accent: #e8e0df;
  --ink: #f3f6ff;
  --ink-muted: rgba(243, 246, 255, 0.72);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  --paper: #fffaf4;
  --radius-card: 20px;
  --radius-pill: 999px;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Inter", Arial, sans-serif;
}

.paper {
  --paper-section-gap: clamp(var(--space-5), 3vw, var(--space-6));
  padding: clamp(var(--space-4), 4vw, var(--space-6));
  color: #28211b;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .2);
}

.paper > .paper-section + .paper-section {
  margin-block-start: var(--paper-section-gap);
}

.pd-card.paper > .pd-overview,
.pd-card.paper > .pd-details,
.pd-card.paper > .pd-related {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid #eceeed;
}

.pd-gallery,
.pd-info,
.pd-related-row {
  min-width: 0;
}

.pd-photo {
  margin: var(--space-2);
}

.pd-buy {
  align-items: start;
}

.pd-price-line {
  gap: var(--space-2);
}

.top-info-inner .top-shop-link {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 var(--space-3);
  margin: var(--space-1) 0;
  color: #1d1712;
  background: #ffd2b4;
  border-radius: var(--radius-pill);
}

.alfa-card-home .card-wishlist {
  position: absolute;
  z-index: 4;
  top: var(--space-2);
  right: var(--space-2);
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #0f3d2e;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 61, 46, .22);
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.alfa-card-home .card-wishlist:focus-visible {
  outline: 3px solid #0f3d2e;
  outline-offset: 2px;
}

.account-card.paper {
  box-shadow: 0 20px 60px rgba(0, 0, 0, .24);
}

.account-dashboard-tabs {
  flex-wrap: wrap;
  border-radius: 14px;
}

.account-dashboard-tabs button {
  min-width: 100px;
  flex: 1 1 28%;
  padding: 4px 8px;
  border-radius: 10px;
}

.account-tab-panel[hidden] {
  display: none;
}

.account-tab-panel > h2 {
  color: #28211b;
}

.account-record-list {
  display: grid;
  gap: var(--space-3);
}

.account-record-card {
  min-width: 0;
  padding: var(--space-4);
  color: #28211b;
  background: #fff;
  border: 1px solid #e6ddd2;
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.account-record-card h3 {
  margin: 0 0 var(--space-2);
  color: #28211b;
  font-size: 1rem;
}

.account-record-card p {
  margin: 0;
  color: #675a4d;
}

.account-record-actions,
.account-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.account-record-actions button,
.account-wishlist-card button,
.account-form-actions button {
  min-height: 44px;
  padding: 0 var(--space-3);
  color: #342b23;
  background: #fff;
  border: 1px solid #b7a792;
  border-radius: 10px;
  font-weight: 700;
}

.account-form-actions .site-button-primary {
  color: #fff;
  background: #0f3d2e;
  border-color: #0f3d2e;
}

.account-form .account-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.account-form .account-checkbox input {
  width: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: #0f3d2e;
}

.account-wishlist-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.account-wishlist-card a {
  min-width: 0;
  color: #0f3d2e;
  font-weight: 700;
}

.account-verification {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  margin: var(--space-3) 0;
  color: #75551b;
  background: #fff8e9;
  border-radius: 10px;
}

.account-verification button {
  min-height: 40px;
  padding: 0 var(--space-3);
  color: #624833;
  background: #fff;
  border: 1px solid #d6c6ad;
  border-radius: 9px;
  font-weight: 700;
}

.account-panel-state.is-error {
  color: #842b24;
}

.account-delete-button {
  min-height: 44px;
  padding: 0 var(--space-4);
  color: #fff;
  background: #9c2f26;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .pd-buy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }

  .pd-qty {
    justify-self: start;
  }

  .pd-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .pd-btn {
    width: 100%;
    min-width: 0;
    padding-inline: var(--space-2);
    white-space: normal;
  }
}

html[data-palette="2"] {
  --bg-1: #1d130c;
  --bg-2: #4a3220;
  --accent: #ffc98b;
  --ink: #fbefdc;
  --ink-muted: rgba(251, 239, 220, 0.72);
  --glass-bg: rgba(255, 233, 205, 0.1);
  --glass-border: rgba(255, 233, 205, 0.22);
  --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  --paper: #fff8ee;
}

html[data-palette="3"] {
  --bg-1: #052315;
  --bg-2: #0d4030;
  --accent: #ffd9b8;
  --ink: #eefaf3;
  --ink-muted: rgba(238, 250, 243, 0.72);
  --glass-bg: rgba(225, 255, 239, 0.09);
  --glass-border: rgba(225, 255, 239, 0.2);
  --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  --paper: #f8fff9;
}

html[data-palette="4"] {
  --bg-1: #26091a;
  --bg-2: #5a1a36;
  --accent: #f2c46d;
  --ink: #fff0e6;
  --ink-muted: rgba(255, 240, 230, 0.72);
  --glass-bg: rgba(255, 225, 237, 0.09);
  --glass-border: rgba(255, 225, 237, 0.2);
  --glass-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  --paper: #fff8f4;
}
