:root {
  color-scheme: dark;
  --bg: #17191b;
  --surface: #212326;
  --main: #f3eee5;
  --muted: #c6bbac;
  --line: #4d4640;
  --gold: #e7bf92;
  --dark: #282117;
  --focus: #f8d8ad;
  font: 100%/1.5 "Segoe UI", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--main); background: var(--bg); }
a { color: inherit; text-underline-offset: .2em; }
button, select { font: inherit; }
button {
  min-height: 42px;
  padding: .52rem .85rem;
  color: var(--main);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--gold); }
button:disabled, select:disabled { cursor: default; opacity: .56; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.masthead, main, footer {
  width: min(100% - 80px, 1250px);
  margin-inline: auto;
}
.masthead {
  min-height: 75px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  font: 700 1.42rem/1 "Segoe UI", sans-serif;
  letter-spacing: -.06em;
  text-decoration: none;
}
nav, footer div { display: flex; gap: 1.55rem; align-items: center; flex-wrap: wrap; }
nav a, footer a { color: var(--muted); font-size: .86rem; }
.safety {
  margin: 22px 0 25px;
  color: var(--muted);
  font-size: .78rem;
  display: flex;
  gap: .65rem;
  align-items: center;
}
.safety span { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); flex: 0 0 7px; }
.loom {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 74px);
  align-items: start;
}
.artwork { margin: 0; }
.artwork img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  background: #e0c09e;
  border: 1px solid #675344;
  box-shadow: 0 18px 40px #0005;
}
.artwork figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--muted);
  font: .72rem/1.45 "Consolas", "Microsoft JhengHei", monospace;
}
.art-tabs { display: flex; gap: 5px; }
.art-tabs button { min-height: 32px; padding: .3rem .55rem; background: transparent; }
.art-tabs button[aria-pressed="true"] { color: var(--gold); border-color: #a17d5a; background: #302923; }
.introduce { padding-top: clamp(4px, 2vw, 26px); }
.series { margin: 0; color: var(--gold); font: .75rem/1.4 "Consolas", "Microsoft JhengHei", monospace; letter-spacing: .13em; text-transform: uppercase; }
h1 {
  margin: .38rem 0 .83rem;
  font: 400 clamp(3.35rem, 7vw, 6.15rem)/.96 Georgia, "Palatino Linotype", serif;
  letter-spacing: -.075em;
}
[lang="zh-Hant"] h1 { font: 700 clamp(2.55rem, 5vw, 5.25rem)/1.13 "Microsoft JhengHei", system-ui, sans-serif; letter-spacing: -.055em; }
.description { max-width: 39ch; margin: 0 0 1.45rem; color: var(--muted); font-size: 1rem; }
.checkout { border-top: 1px solid var(--line); padding-top: .94rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.section-head h2 { margin: 0; font-size: 1rem; }
.section-head span { color: var(--muted); font-size: .74rem; }
.inventory { margin: .8rem 0; padding: .65rem 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: var(--surface); border: 1px solid var(--line); }
.inventory div { min-width: 0; padding: 0 .68rem; }
.inventory div + div { border-left: 1px solid var(--line); }
dt { font-size: .72rem; color: var(--muted); }
dd { margin: .16rem 0 0; font-size: .84rem; font-weight: 600; overflow-wrap: anywhere; }
.connect-row { display: flex; align-items: center; gap: .72rem; margin-bottom: .57rem; }
#wallet { color: var(--muted); font: .75rem "Consolas", monospace; overflow-wrap: anywhere; }
.purchase-row { display: grid; grid-template-columns: minmax(92px, 130px) 1fr; gap: .5rem; align-items: end; }
.purchase-row label { color: var(--muted); font-size: .72rem; }
select { display: block; margin-top: .24rem; min-height: 42px; width: 100%; color: var(--main); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: .4rem .5rem; font-size: .92rem; }
.primary { background: var(--gold); color: var(--dark); border-color: var(--gold); font-weight: 700; }
.primary:hover:not(:disabled) { background: var(--focus); }
.text-button { width: 100%; margin: .5rem 0 0; }
.small, .status { margin: .5rem 0; font-size: .79rem; color: var(--muted); }
.status { min-height: 1.4em; color: var(--gold); }
.approval { background: var(--surface); border: 1px solid var(--line); padding: .8rem .95rem; }
.approval h3 { margin: 0; font-size: .95rem; }
.approval dl { margin: .46rem 0 .85rem; }
.approval dl div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .1rem .8rem; }
.approval dl div + div { margin-top: .26rem; }
.approval dd { font-variant-numeric: tabular-nums; }
.confirm-row { display: flex; flex-wrap: wrap; gap: .5rem; }
#transaction { font-size: .84rem; color: var(--gold); }
.contract {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(155px, .4fr) minmax(0, 1fr);
  gap: .5rem 1rem;
  align-items: center;
  margin-top: clamp(26px, 6vw, 57px);
  padding: 14px 0;
}
.contract h2 { font-size: .85rem; margin: 0; }
.contract p { font-size: .73rem; margin: .2rem 0 0; color: var(--muted); }
.contract code { color: var(--gold); font-size: .79rem; overflow-wrap: anywhere; }
.contract a { display: inline-block; margin-left: .8rem; color: var(--muted); font-size: .8rem; }
footer { padding: 1rem 0 1.75rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .78rem; color: var(--muted); }

@media (max-width: 850px) {
  .masthead, main, footer { width: calc(100% - 52px); }
  .loom { gap: 24px; }
}
@media (max-width: 720px) {
  .masthead, main, footer { width: calc(100% - 36px); }
  .masthead { min-height: 56px; }
  nav, footer div { gap: .5rem 1rem; }
  nav a, footer a { font-size: .78rem; }
  .safety { margin: 14px 0; }
  .loom { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .right { display: contents; }
  .introduce { grid-row: 1; padding-top: 0; }
  h1 { margin-bottom: .55rem; }
  .description { margin: 0; font-size: .89rem; }
  .contract { grid-template-columns: minmax(0,1fr); }
  .contract a { margin-left: 0; display: block; }
  footer { flex-direction: column; gap: .5rem; }
}
