:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  --gold: #e9c88f;
  --cream: #f6e9d2;
  --muted: #ad9e8b;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; color: var(--cream); background: #090a0c; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 6, 8, .55), rgba(5, 6, 8, .28) 50%, rgba(5, 6, 8, .55)),
              linear-gradient(180deg, rgba(5, 6, 8, .65), rgba(5, 6, 8, .22) 48%, rgba(5, 6, 8, .68)),
              url("/assets/shop-background.png") center center / cover no-repeat;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #80d7ff; outline-offset: 3px; }

.page { display: grid; min-height: 100vh; place-items: center; padding: 32px 18px 42px; }
.shop { width: min(100%, 540px); }
.brand { display: grid; justify-items: center; gap: 0; margin: 0 auto 22px; filter: drop-shadow(0 4px 14px #000); }
.brand-initials { display: block; width: 228px; height: auto; }
.brand-name { display: block; width: 274px; height: auto; margin-top: -8px; }
.shop-panel {
  position: relative;
  padding: 32px 39px 31px;
  border: 1px solid #8a6434;
  background: linear-gradient(155deg, rgba(27, 27, 30, .97), rgba(11, 13, 17, .97) 58%, rgba(21, 19, 19, .98));
  box-shadow: 0 20px 75px rgba(0, 0, 0, .78), inset 0 0 28px rgba(137, 87, 39, .12);
}
.shop-panel::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(209, 165, 95, .18); pointer-events: none; }
.panel-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 27px; }
.crystal { width: 48px; height: 58px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(45, 182, 235, .62)); }
.eyebrow { margin: 0 0 5px; color: #c79554; font-size: 10px; font-weight: 700; letter-spacing: .22em; }
h1 { margin: 0; color: var(--cream); font-family: Georgia, "Times New Roman", serif; font-size: clamp(27px, 5.5vw, 35px); font-weight: 500; line-height: 1.15; }
.field, .saved-account { margin-top: 18px; }
.field label, .saved-account label { display: block; margin-bottom: 8px; color: #e1c69a; font-size: 13px; font-weight: 600; }
.field input, .saved-account select {
  width: 100%; height: 51px; padding: 0 15px; border: 1px solid #735938; border-radius: 4px;
  outline: none; color: #fff7eb; background: #151719; box-shadow: inset 0 2px 7px rgba(0, 0, 0, .48);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .saved-account select:focus { border-color: #caa36e; box-shadow: 0 0 0 3px rgba(202, 163, 110, .15); }
.field input::placeholder { color: #786e64; }
#crystal-amount::placeholder { font-size: clamp(11px, 3.2vw, 14px); }
#crystal-amount:focus::placeholder { color: transparent; }
.field-hint { margin: 7px 0 0; color: #90897e; font-size: 11px; line-height: 1.4; }
.field-hint.amount-error { color: #f17c72; font-size: 12px; }
.account-check, .saved-account-meta { margin: 9px 0 0; font-size: 12px; line-height: 1.45; }
.account-check { padding: 9px 11px; border: 1px solid #665747; border-radius: 4px; color: #c9bca8; background: rgba(36, 31, 26, .7); }
.account-check.verified { border-color: rgba(95, 177, 137, .6); color: #c5efda; background: rgba(26, 70, 46, .35); }
.account-check.failed { border-color: rgba(206, 105, 92, .65); color: #f6c9c2; background: rgba(80, 27, 24, .35); }
.saved-account-meta { color: #d6c7ad; }
.amount-control { position: relative; }
.amount-control input { padding-right: 52px; }
.amount-control img { position: absolute; top: 10px; right: 16px; width: 24px; height: 30px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 0 8px rgba(56, 183, 232, .35)); }
.saved-row { display: flex; gap: 8px; }
.saved-row select { min-width: 0; }
.forget-button { flex: none; padding: 0 12px; border: 1px solid #584d41; border-radius: 4px; color: #c6b59c; background: #25211e; font-size: 11px; }
.forget-button:disabled { opacity: .5; cursor: default; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 23px; padding: 17px 1px 16px; border-top: 1px solid rgba(208, 164, 98, .26); border-bottom: 1px solid rgba(208, 164, 98, .26); color: var(--muted); font-size: 13px; }
.price-row strong { color: #ffe0a2; font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 500; }
.remember-row { display: flex; align-items: center; gap: 11px; margin: 20px 0 22px; color: #d8c7ae; font-size: 13px; cursor: pointer; }
.remember-row input { width: 19px; height: 19px; margin: 0; accent-color: #bc8d50; cursor: pointer; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; min-height: 51px; border: 1px solid #e3bb78; border-radius: 4px; color: #271c10; background: linear-gradient(#f2d296, #bd8849); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); font-size: 15px; font-weight: 700; }
.primary-button:hover { background: linear-gradient(#ffe1ab, #d5a562); }
.primary-button:disabled { opacity: .62; cursor: not-allowed; }
.primary-button span { font-size: 20px; font-weight: 400; line-height: 0; }
.availability { margin: 16px 4px 0; color: #9c9184; font-size: 11px; line-height: 1.55; text-align: center; }
.result { margin-top: 18px; padding: 13px 15px; border: 1px solid rgba(80, 171, 193, .45); color: #d2e9e7; background: rgba(22, 59, 65, .35); font-size: 12px; line-height: 1.6; }
.result strong { display: block; color: #ecfaf6; font-size: 13px; }
.result p { margin: 4px 0 0; }
.result.error { border-color: rgba(206, 105, 92, .65); color: #f6c9c2; background: rgba(80, 27, 24, .35); }

@media (max-width: 560px) {
  .page { padding: 24px 12px 32px; }
  .shop-panel { padding: 27px 22px 26px; }
  .brand { margin-bottom: 16px; }
  .brand-initials { width: 184px; }
  .brand-name { width: 222px; }
  .panel-heading { gap: 11px; }
  .crystal { width: 40px; height: 50px; }
  h1 { font-size: 27px; }
  .title-last-word { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
