:root {
  color-scheme: light;
  --ink: #452b2d;
  --muted: #765a5d;
  --accent: #aa414b;
  --accent-hover: #8b303a;
  --coral: #db7780;
  --paper: #fffaf7;
  --white: #fffdfb;
  --wash: #fff0f1;
  --line: #ead8d7;
  --gold: #886127;
  --gold-wash: #fff4df;
  --red: #a12f2b;
  --radius: 20px;
  --shadow: 0 12px 35px #75393b0a;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.65;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: var(--accent); text-underline-offset: 4px; }
a, button, input, select, summary { scroll-margin-block: 24px; }
button, select { min-height: 48px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
.wrap { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 8px; left: 8px; padding: 12px 18px; background: var(--white); border: 2px solid var(--accent); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.demo-strip { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: center; padding: 10px 24px; background: var(--ink); color: #fff7ef; font-size: 12px; line-height: 1.6; letter-spacing: .03em; }
.demo-strip strong { font-weight: 650; }
.demo-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #d9b271; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; min-height: 112px; padding-block: 24px; }
.brand { display: flex; align-items: center; gap: 12px; max-width: 100%; min-width: 0; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; background: var(--accent); color: var(--white); border-radius: 15px; }
.brand-title { display: block; font-size: 21px; line-height: 1.4; font-weight: 750; letter-spacing: .02em; overflow-wrap: anywhere; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .11em; }
nav { display: flex; flex-wrap: wrap; gap: 24px; }
nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: none; }
nav a:hover { color: var(--accent); text-decoration: underline; }

.hero { display: grid; grid-template-columns: 1.02fr 1fr; gap: 64px; align-items: start; padding-top: 24px; }
.hero > * { min-width: 0; }
.art-card { position: relative; display: flex; flex-direction: column; min-height: 0; margin: 0; padding: 30px; overflow: hidden; border: 1px solid #efd8d9; border-radius: 24px; background: linear-gradient(145deg, #ffecee 0%, #fff5ec 80%); }
.art-topline { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 11px; line-height: 1.6; font-weight: 700; letter-spacing: .14em; }
.art-topline .eyebrow { margin: 0; }
.badge { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 6px; background: var(--wash); color: var(--accent); font-size: 12px; font-weight: 650; line-height: 1.5; }
.badge.outline { border: 1px solid #c99ea3; color: var(--muted); background: transparent; }
.artwork-image { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; margin-block: 20px; border-radius: 10px; }
.art-caption { position: relative; z-index: 1; padding: 16px; border: 1px dashed #cda9ab; border-radius: 10px; background: #fffdfbb8; text-align: center; }
.art-caption strong { display: block; font-size: 16px; font-weight: 650; }
.art-caption span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.art-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 23px; color: var(--muted); font-size: 12px; }
.purchase-column { padding-top: 4px; }
h1 { margin-bottom: 18px; font-size: clamp(30px, 3.2vw, 42px); font-weight: 650; letter-spacing: -.035em; line-height: 1.35; }
.lead { max-width: 35em; margin-bottom: 20px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.price-line { display: flex; gap: 15px; align-items: center; }
.price-line > strong { font-size: 48px; line-height: 1.15; font-weight: 550; letter-spacing: -.055em; }
.price-line > span { font-size: 13px; line-height: 1.55; }
.price-line small { color: var(--muted); font-size: 12px; }
.supply-note { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; margin: 17px 0 23px; font-size: 12px; color: var(--muted); }
.purchase-form { border-top: 1px solid var(--line); padding-top: 20px; }
.buyer-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.buyer-heading label { font-size: 14px; font-weight: 650; }
.local-label { color: var(--muted); font-size: 11px; }
select { width: 100%; max-width: 100%; border: 1px solid #c2a5a8; border-radius: 9px; padding: 10px 12px; color: var(--ink); background: var(--white); cursor: pointer; }
.balance-line { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: baseline; margin: 11px 0 0; color: var(--muted); font-size: 13px; }
.balance-line strong { color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }
.balance-line small { font-size: 11px; font-weight: 500; }
.field-note { margin: 6px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.check-row { display: flex; gap: 11px; align-items: flex-start; min-height: 44px; margin: 12px 0; padding-block: 10px; font-size: 13px; line-height: 1.7; cursor: pointer; }
.check-row input { width: 19px; height: 19px; flex: 0 0 19px; margin: 2px 0 0; accent-color: var(--accent); }
.check-row span { min-width: 0; }
.confirm-row { margin: 12px 0; }
button.primary { display: flex; align-items: center; justify-content: center; width: 100%; gap: 10px; min-height: 52px; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 9px; color: var(--white); background: var(--accent); font-size: 14px; font-weight: 650; cursor: pointer; transition: background .16s, box-shadow .16s; }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.primary:active { box-shadow: inset 0 0 0 3px #fff4; }
button.primary:disabled { cursor: not-allowed; color: #6d5558; background: #e9d7d9; border-color: #d9bfc3; box-shadow: none; }
.purchase-note { margin-top: 9px; }
.status-message { min-height: 24px; margin: 10px 0 0; font-size: 13px; color: var(--accent); overflow-wrap: anywhere; }
.status-message:empty { min-height: 0; }
.status-message.error, .status-message[data-kind="error"] { color: var(--red); }
.error-message { margin-top: 10px; padding: 14px 16px; border: 1px solid #d7aaa5; border-radius: 8px; color: var(--red); background: #fff0ed; font-size: 13px; overflow-wrap: anywhere; }
.test-controls { margin-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
summary { cursor: pointer; }
.test-controls summary { min-height: 44px; padding-block: 12px; color: var(--muted); }
.test-controls .check-row { margin-block: 0; }
.test-controls .field-note { margin-bottom: 0; }

.ledger-strip { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 28px; margin-top: 44px; padding: 28px 0; border-block: 1px solid var(--line); }
.ledger-strip > div { min-width: 0; }
.ledger-strip > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.stat-label { display: block; color: var(--muted); font-size: 12px; }
.ledger-strip p { margin: 4px 0 3px; font-size: 12px; }
.ledger-strip strong { font-size: 31px; font-weight: 550; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-note { display: block; color: var(--muted); font-size: 11px; }
.section-space { margin-top: 64px; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 12px; }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { margin-bottom: 0; font-size: clamp(24px, 2.5vw, 30px); font-weight: 650; line-height: 1.4; letter-spacing: -.035em; }
.section-kicker { padding-bottom: 4px; font-size: 12px; color: var(--muted); }
.section-description { margin-bottom: 22px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.collection-grid, .order-list { list-style: none; padding: 0; margin: 0; }
.collection-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.collection-grid li { min-width: 0; padding: 22px 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--white); font-size: 13px; overflow-wrap: anywhere; }
.collection-grid li strong, .token-id { display: block; color: var(--ink); font-size: 20px; font-weight: 600; }
.collection-grid li > * + * { margin-top: 7px; }
.collection-grid li p { margin-bottom: 0; }
.collection-grid .empty-state { grid-column: 1 / -1; }
.collection-grid li:not(.empty-state)::before { content: ""; display: block; width: 23px; height: 23px; margin-bottom: 18px; background: var(--wash); border: 1px solid #ddb8be; border-radius: 8px; transform: rotate(-8deg); }
.empty-state { padding: 35px 22px !important; color: var(--muted); background: #fffcf9 !important; text-align: center; border: 1px dashed #cfb6b8 !important; }
.buyer-chip { padding: 7px 11px; border-radius: 7px; background: var(--wash); color: var(--muted); font-size: 12px; }
.buyer-chip strong { margin-left: 5px; color: var(--accent); font-weight: 650; }
.order-list { border-radius: 14px; overflow: hidden; }
.order-list li { padding: 18px 22px; border: 1px solid var(--line); color: var(--muted); background: var(--white); font-size: 13px; overflow-wrap: anywhere; }
.order-list li + li { border-top: 0; }
.order-list li:first-child { border-radius: 14px 14px 0 0; }
.order-list li:last-child { border-radius: 0 0 14px 14px; }
.order-list li:only-child { border-radius: 14px; }
.order-list li strong { color: var(--ink); font-weight: 650; }
.order-list li p { margin: 5px 0 0; }
.order-list li span, .order-list li time { margin-right: 12px; }
.order-list .record { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 22px; }
.muted { color: var(--muted); }

.formal-notes { border: 1px solid var(--line); border-radius: 14px; background: #fff6ed; }
.formal-notes > summary { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; min-height: 64px; padding: 18px 24px; font-size: 14px; font-weight: 650; }
.formal-notes > summary::marker { color: var(--gold); }
.summary-note { color: var(--gold); font-size: 12px; font-weight: 500; }
.summary-note::after { content: " +"; }
.formal-notes[open] .summary-note::after { content: " −"; }
.formal-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; padding: 6px 24px 24px; }
.formal-content h3 { margin-bottom: 7px; font-size: 14px; font-weight: 650; }
.formal-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.formal-footnote { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid #e4cfb7; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px; margin-top: 56px; padding-block: 28px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.8; }
.site-footer strong { color: var(--ink); font-size: 13px; font-weight: 650; }
.site-footer p { margin-bottom: 0; }
.site-footer a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; gap: 10px; font-size: 12px; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.noscript { margin: 20px; padding: 18px; border: 1px solid var(--red); color: var(--red); background: var(--white); }

@media (max-width: 1000px) {
  .wrap { width: min(1180px, calc(100% - 48px)); }
  .hero { gap: 36px; }
  .art-card { padding: 24px; }
  .art-topline { align-items: flex-start; flex-direction: column; }
  .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .site-header { min-height: auto; padding-block: 22px 16px; }
  nav { gap: 22px; width: 100%; }
  nav a { font-size: 13px; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 12px; }
  .art-card { min-height: 0; padding: 22px; }
  .art-topline { flex-direction: row; align-items: center; }
  .art-foot { padding-top: 18px; }
  .purchase-column { padding: 0 2px; }
  h1 { font-size: clamp(29px, 6.5vw, 40px); }
  .lead { font-size: 15px; }
  .ledger-strip { grid-template-columns: 1fr 1fr; gap: 22px 20px; margin-top: 32px; padding-block: 24px; }
  .ledger-strip > div + div { padding-left: 20px; }
  .ledger-strip > div:last-child { grid-column: 1 / -1; padding-top: 19px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .section-space { margin-top: 44px; }
  .section-heading { align-items: flex-start; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .collection-grid li { padding: 18px 15px; }
  .order-list li { padding: 17px 18px; }
  .formal-notes > summary { padding: 18px; }
  .formal-content { grid-template-columns: 1fr; gap: 20px; padding: 4px 18px 20px; }
  .site-footer { margin-top: 36px; padding-bottom: max(28px, env(safe-area-inset-bottom)); align-items: flex-start; }
}

@media (max-width: 390px) {
  .demo-strip { justify-content: flex-start; padding-inline: 18px; gap: 4px 9px; }
  .demo-strip > span:last-child { width: 100%; padding-left: 15px; }
  .brand-title { font-size: 19px; }
  .brand small { letter-spacing: .04em; }
  .brand-mark { width: 42px; height: 44px; flex-basis: 42px; }
  .art-card { padding: 18px; }
  .art-topline .eyebrow { font-size: 10px; letter-spacing: .08em; }
  .badge { font-size: 11px; }
  .price-line > strong { font-size: 44px; }
  button.primary { font-size: 13px; padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
