:root {
  --bg: #0E1013;
  --surface: #171A1F;
  --line: #2A2F37;
  --text: #E8ECF1;
  --text-soft: #C3CAD3;
  --muted: #8C95A1;
  --faint: #6B7480;
  --accent: #A9C1D6;
  --steel: #7E9BB5;
  --available: #5FB3A8;
  --serif: 'Bodoni Moda', serif;
  --sans: 'Jost', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--text); }
input::placeholder, textarea::placeholder { color: #5C6470; }
button { font: inherit; }

.page {
  min-height: 100vh;
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.backdrop { position: absolute; top: 0; left: 0; right: 0; height: 560px; overflow: hidden; }
.backdrop svg { position: absolute; top: 10px; left: 50%; transform: translateX(-10%); height: 540px; width: auto; opacity: 0.75; }
.backdrop-fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(14,16,19,0.35) 0%, rgba(14,16,19,0.6) 45%, var(--bg) 100%);
}

.column {
  width: 100%; max-width: 560px; padding: 0 22px;
  display: flex; flex-direction: column; flex: 1;
  position: relative; z-index: 1;
}

/* Masthead */
.masthead {
  padding: 34px 0 26px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line);
}
.eyebrow { font-size: 10px; letter-spacing: 0.38em; text-transform: uppercase; color: var(--accent); }
.logo {
  font-family: var(--serif); font-size: 44px; font-weight: 400; letter-spacing: 0.02em; line-height: 1;
  color: var(--text); text-decoration: none;
}
.logo:hover { color: var(--text); }
.logo span { font-style: italic; color: var(--accent); }
.tagline { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); }
.rule { width: 28px; height: 1px; background: var(--steel); }

/* Shared */
main { display: flex; flex-direction: column; }
h1 { margin: 0; font-family: var(--serif); font-weight: 400; }
p { margin: 0; text-wrap: pretty; }
.intro { display: flex; flex-direction: column; text-align: center; }
.lede { font-size: 14px; line-height: 1.6; color: var(--muted); }
.kicker { font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); }
.back {
  align-self: flex-start; min-height: 44px; display: flex; align-items: center;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.back:hover { color: var(--text); }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.btn {
  all: unset; cursor: pointer; text-align: center; min-height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--text); color: var(--bg); border: 1px solid var(--text);
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
}
.btn:hover { background: #FFFFFF; color: var(--bg); }
.btn:focus-visible, .card:focus-visible, .back:focus-visible, .logo:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.btn[disabled] { opacity: 0.35; cursor: default; }
.btn[disabled]:hover { background: var(--text); }
.btn-outline { background: transparent; color: var(--text); min-height: 48px; padding: 0 28px; margin-top: 12px; }
.btn-outline:hover { background: transparent; color: var(--text); border-color: #FFFFFF; }

/* Image frame */
.frame { position: relative; width: 100%; aspect-ratio: 4 / 5; background: var(--surface); border: 1px solid var(--line); }
.frame-inner { position: absolute; inset: 8px; display: flex; align-items: center; justify-content: center; }
.frame-lg .frame-inner { inset: 12px; }
.frame-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); color: #5C6470; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; text-align: center; padding: 8px;
}
.is-traded .frame-inner { filter: grayscale(1); opacity: 0.45; }
.stamp-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.stamp {
  transform: rotate(-12deg);
  border: 2px solid var(--steel); outline: 1px solid var(--steel); outline-offset: 3px;
  padding: 6px 16px; font-family: var(--serif); font-size: 20px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); background: rgba(14,16,19,0.85);
}
.frame-lg .stamp { outline-offset: 4px; padding: 10px 26px; font-size: 34px; }

/* Home */
.home { padding: 34px 0 48px; gap: 28px; }
.home .intro { gap: 8px; }
.home h1 { font-size: 28px; line-height: 1.15; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 16px; }
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; }
.card:hover { color: var(--text); }
.card:hover .frame { border-color: #3A414C; }
.card-text { display: flex; flex-direction: column; gap: 6px; }
.is-traded .card-text { opacity: 0.55; }
.card-lot { font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); }
.card-name { font-family: var(--serif); font-size: 19px; line-height: 1.2; }
.card-price { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--accent); }
.status { display: flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* Item */
.item { padding: 22px 0 48px; gap: 24px; }
.item .intro { gap: 14px; align-items: center; }
.item h1 { font-size: 36px; line-height: 1.1; }
.item-desc { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.55; color: var(--text-soft); max-width: 420px; }
.facts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.fact { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.fact dt { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 0; font-family: var(--serif); font-size: 16px; text-align: right; display: flex; align-items: center; gap: 8px; }
.fact .dot { width: 7px; height: 7px; }
.facts-list { margin: 0; }
.traded-note { text-align: center; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); }

/* Offer */
.offer { padding: 22px 0 48px; gap: 28px; }
.offer .intro { gap: 10px; }
.offer h1 { font-size: 30px; line-height: 1.15; }
.fields { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  font-family: var(--serif); font-size: 20px; line-height: 1.4; padding: 12px 0; min-height: 48px;
  border: none; border-bottom: 1px solid var(--steel); background: transparent; color: var(--text);
  outline: none; border-radius: 0; resize: none;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); }

/* Done */
.done { padding: 64px 0; align-items: center; gap: 22px; text-align: center; }
.seal {
  width: 64px; height: 64px; border: 1px solid var(--steel); outline: 1px solid var(--steel); outline-offset: 4px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--accent);
}
.done h1 { font-size: 32px; line-height: 1.15; }
.done-sub { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--text-soft); }
.done-rule { width: 40px; height: 1px; background: var(--steel); }
.done-detail { font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 360px; }

/* Footer */
.footer {
  margin-top: auto; padding: 24px 0 32px; border-top: 1px solid var(--line);
  text-align: center; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint);
}

/* Status messages */
.loading { padding: 64px 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); }
.form-error { margin: 0; min-height: 1em; font-size: 13px; color: #D98A7E; text-align: center; }
.form-error:empty { display: none; }
