:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #211731;
  background: #f8f6fa;
  --ink: #211731;
  --muted: #665d73;
  --line: #e7dfee;
  --accent: #57308b;
  --accent-hover: #432067;
  --soft: #f2eafa;
  --white: #fff;
  --gold: #f3d18b;
  --midnight: #140e1f;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #a166c7; outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -4rem; padding: .75rem; background: var(--white); z-index: 3; }
.skip:focus { top: .5rem; }
.header { background: var(--midnight); color: #fbf7ff; border-bottom: 1px solid #483050; }
.header-inner, main, .footer { max-width: 1264px; margin: auto; padding-inline: 36px; }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 36px; }
.brand { color: #fff5e5; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; font-size: 18px; font-weight: 760; white-space: nowrap; letter-spacing: .035em; }
.brand-mark { width: 52px; height: 52px; object-fit: contain; }
nav, .account { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
nav a { text-decoration: none; color: #d9ccdf; font-size: 14px; font-weight: 650; padding: 10px 12px; border-radius: 8px; }
nav a[aria-current="page"], nav a:hover { color: #ffe2a8; background: #382446; }
.account { margin-left: auto; gap: 12px; }
.role-select { display: flex; align-items: center; gap: 8px; }
.role-select label { font-size: 13px; }
.account select { width: auto; padding: 6px 7px; min-height: 36px; }
.account .button { color: #ffe5ad; background: #302039; border-color: #8c6b5d; }
.account .button:hover { background: #543359; }
.wallet-id { font-size: 13px; color: #e5d7ee; font-variant-numeric: tabular-nums; white-space: nowrap; }
main { padding-block: 32px 48px; min-height: calc(100vh - 155px); }
.footer { color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-block: 18px; font-size: 13px; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); position: relative; isolation: isolate;
  min-height: 395px; overflow: hidden; border-radius: 21px; border: 1px solid #513964; color: #fff9ff;
  background: radial-gradient(ellipse at 78% 52%, #3e216b 0%, #271d53 30%, transparent 68%),
    linear-gradient(118deg, #1b1028 9%, #261238 45%, #100e29 92%);
  box-shadow: 0 18px 34px #24143619;
}
.hero-copy { display: grid; justify-items: start; align-content: center; padding: clamp(28px, 5vw, 65px); z-index: 1; }
.hero p { max-width: 45ch; color: #dfcfe9; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 5vw, 48px); letter-spacing: -.04em; line-height: 1.17; overflow-wrap: anywhere; }
.hero h1 { font-size: clamp(38px, 6vw, 72px); letter-spacing: -.015em; }
h2 { font-size: 21px; line-height: 1.25; }
h3 { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
p { line-height: 1.65; }
.hero-description { margin-top: 13px; overflow-wrap: anywhere; }
.price { margin-top: 20px; color: var(--gold); font-size: 40px; font-weight: 760; font-variant-numeric: tabular-nums; letter-spacing: -.035em; overflow-wrap: anywhere; }
.price small { font-size: 14px; font-weight: 600; letter-spacing: normal; color: #decee9; white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-actions:empty { display: none; }
.hero-art { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; height: 100%; min-height: 350px; }
.hero-art::before, .hero-art::after {
  content: ""; position: absolute; z-index: -1; width: min(80%, 355px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid #ddb97742; transform: translateY(-1%);
}
.hero-art::before { width: min(88%, 391px); border-color: #a486d332; }
.hero-art::after { box-shadow: inset 0 0 52px #1e25634d, 0 0 80px #a141d849; }
.hero-art img { display: block; width: min(100%, 437px); height: auto; filter: drop-shadow(0 14px 18px #0e0617a6); }
.featured, .catalog { margin-top: 34px; }
.featured h2, .catalog h2 { font-size: clamp(22px, 3.4vw, 29px); letter-spacing: -.025em; }
.featured-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.featured-button, .filter-button { border: 1px solid var(--line); color: var(--ink); background: var(--white); }
.featured-button { display: grid; gap: 3px; min-width: min(100%, 145px); padding: 10px 15px; border-radius: 9px; text-align: left; font-weight: 720; overflow-wrap: anywhere; }
.featured-price { display: block; color: var(--muted); font-size: 13px; font-weight: 500; }
.catalog, .checkout-grid { scroll-margin-top: 74px; }
.catalog-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.category-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-button { min-height: 38px; padding: 5px 13px; border-radius: 7px; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.featured-button:hover, .filter-button:hover,
.featured-button[aria-pressed="true"], .filter-button[aria-pressed="true"] { color: var(--accent-hover); border-color: #bb9dcc; background: var(--soft); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: 16px; }
.product-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.product-artwork { display: grid; place-items: center; height: clamp(145px, 18vw, 196px); overflow: hidden; border-bottom: 1px solid var(--line); padding: 10px; background: radial-gradient(ellipse at 51% 62%, #eee1f7, #f6f0fa 68%); }
.product-artwork svg, .product-artwork img { display: block; max-width: 100%; width: auto; height: 100%; object-fit: contain; }
.product-artwork.brand-artwork img { opacity: .78; }
.product-copy { padding: 18px; display: grid; align-content: start; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.product-category { color: var(--accent); font-size: 12px; font-weight: 680; }
.product-name { line-height: 1.25; font-size: 21px; }
.product-description { color: var(--muted); font-size: 14px; }
.product-price { margin-block: 4px 3px; color: #472266; font-variant-numeric: tabular-nums; line-height: 1.3; }
.product-price strong { font-size: 25px; letter-spacing: -.025em; }
.product-price span, .product-stock { color: var(--muted); font-size: 13px; }
.product-card:only-child { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-rows: 1fr; }
.product-card:only-child .product-artwork { min-height: 166px; height: 100%; border: 0; border-right: 1px solid var(--line); }
.product-card:only-child .product-copy { align-content: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: start; gap: 18px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .75fr); gap: 18px; margin-top: 28px; align-items: start; }
.checkout-summary .totals { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.stack { display: grid; gap: 16px; min-width: 0; }
.panel, .record { background: var(--white); border: 1px solid var(--line); border-radius: 17px; min-width: 0; }
.panel { padding: 22px; }
.record { padding: 16px; }
.panel h2 { margin-bottom: 14px; }
.panel > form + * { margin-top: 14px; }
.page-head { display: grid; gap: 7px; margin-bottom: 20px; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: var(--white); font-weight: 700; text-decoration: none; }
.button:hover { background: var(--accent-hover); }
.button.gold { color: #28152c; background: linear-gradient(115deg, #ffdfa0, #e8b969); border-color: #f8d797; }
.button.gold:hover { background: #ffe4af; }
.button.glass { color: #fff7ff; background: #ffffff0c; border-color: #e0c9e564; }
.button.glass:hover { background: #ffffff1f; }
.hero .button { min-width: 112px; justify-content: center; }
.button.secondary { background: var(--soft); color: var(--accent-hover); }
.button.secondary:hover { background: #eadbf4; }
.button.small { min-height: 36px; padding: 6px 11px; font-size: 13px; }
.button:disabled { cursor: wait; opacity: .58; }
form { display: grid; gap: 13px; }
.form-field { display: grid; gap: 6px; }
form .button { justify-self: start; }
label { display: grid; gap: 6px; font-weight: 650; font-size: 14px; }
input, select, textarea { min-width: 0; width: 100%; min-height: 44px; border: 1px solid #d9cde1; border-radius: 8px; background: var(--white); padding: 8px 10px; color: var(--ink); }
textarea { resize: vertical; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.catalog-editor-controls, .catalog-editor { display: grid; gap: 12px; }
.catalog-editor { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.catalog-toggles { display: flex; flex-wrap: wrap; gap: 5px 13px; }
.catalog-toggles label { display: flex; align-items: center; min-height: 35px; }
.catalog-toggles input { accent-color: var(--accent); min-height: auto; width: 18px; height: 18px; margin: 0; }
.notice { position: sticky; top: 8px; z-index: 1; background: var(--soft); color: #302575; border-radius: 10px; padding: 12px 14px; margin-bottom: 15px; overflow-wrap: anywhere; }
.notice.error { background: #fff0f2; color: #941f37; }
.badge { border-radius: 999px; background: var(--soft); color: #3d2d9b; padding: 5px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.complete { background: #e5f6eb; color: #15593b; }
.badge.neutral { background: #eeeef2; color: #444759; }
.info { margin: 8px 0; display: grid; gap: 7px; font-size: 14px; }
.info > div { display: grid; grid-template-columns: minmax(70px, max-content) minmax(0, 1fr); gap: 10px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; }
.stat { display: grid; gap: 5px; border-radius: 12px; background: #f5f4fd; padding: 12px; }
.stat strong { font-size: 23px; }
.empty { color: var(--muted); padding-block: 8px; }
.record-list { display: grid; gap: 10px; }
.details { overflow-wrap: anywhere; white-space: pre-wrap; font-size: 12px; color: var(--muted); }
summary { cursor: pointer; font-weight: 650; }

@media (max-width: 760px) {
  .header-inner, main, .footer { padding-inline: 16px; }
  .header-inner { flex-wrap: wrap; gap: 9px; padding-block: 11px; }
  nav { order: 3; width: 100%; gap: 4px; }
  nav a { padding: 8px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 40px; height: 40px; }
  .account { gap: 6px; }
  .wallet-id { display: none; }
  main { padding-block: 20px 32px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); min-height: 296px; }
  .hero-copy { padding: 25px 0 25px 24px; }
  .hero-art { min-height: 0; }
  .hero-art img { width: min(120%, 290px); }
  .featured, .catalog { margin-top: 26px; }
  .checkout-grid { grid-template-columns: 1fr; margin-top: 23px; }
  .panel { padding: 16px; }
}

@media (max-width: 500px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 23px 22px 4px; }
  .hero-art { height: 184px; }
  .hero-art::before { width: 174px; }
  .hero-art::after { width: 154px; }
  .hero-art img { width: 203px; }
  .hero .price { margin-top: 14px; font-size: 34px; }
  .hero-actions { margin-top: 14px; }
  .product-card:only-child { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .product-card:only-child .product-artwork { height: 150px; min-height: 0; border: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 390px) {
  .role-select label { font-size: 0; }
  .account select { font-size: 13px; }
  .field-pair { grid-template-columns: 1fr; }
}
