:root {
  --bg: #080808;
  --panel: rgba(18,18,18,.84);
  --panel-strong: #121212;
  --line: rgba(226,184,91,.22);
  --gold: #d8ad55;
  --gold-light: #f0d18a;
  --text: #f5f2eb;
  --muted: #a8a398;
  --shadow: 0 28px 80px rgba(0,0,0,.48);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(211,164,73,.13), transparent 34%),
    linear-gradient(180deg, #0b0b0b 0%, #050505 100%);
  font-family: Inter, system-ui, sans-serif;
  padding-bottom: 132px;
}
button, a { -webkit-tap-highlight-color: transparent; }
.ambient { position: fixed; border-radius: 50%; filter: blur(100px); pointer-events: none; opacity: .12; z-index: -1; }
.ambient-one { width: 360px; height: 360px; background: #b9832f; left: -180px; top: 28%; }
.ambient-two { width: 420px; height: 420px; background: #7f5a22; right: -220px; top: 10%; }
.topbar {
  height: 76px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.07); padding: 0 clamp(20px,5vw,76px);
  position: sticky; top: 0; z-index: 20; background: rgba(8,8,8,.82); backdrop-filter: blur(18px);
}
.brand { color: var(--text); text-decoration: none; display: flex; gap: 12px; align-items: center; font: 600 14px Cinzel, serif; letter-spacing: .16em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-light); }
.step-indicator { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.step { width: 22px; height: 22px; border: 1px solid #4a463e; border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.step.active { background: var(--gold); border-color: var(--gold); color: #171109; font-weight: 800; }
.line { width: 26px; height: 1px; background: #37342f; }
.step-copy { margin-left: 8px; }
main { width: min(1460px, calc(100% - 40px)); margin: 0 auto; }
.hero { text-align: center; padding: 78px 16px 54px; max-width: 850px; margin: auto; }
.eyebrow, .section-kicker { color: var(--gold); letter-spacing: .2em; font-size: 11px; font-weight: 700; }
.hero h1 { font: 600 clamp(38px,5vw,68px)/1.04 Cinzel, serif; letter-spacing: -.03em; margin: 15px 0 20px; }
.hero-copy { color: var(--muted); font-size: clamp(15px,2vw,18px); line-height: 1.7; max-width: 720px; margin: 0 auto; }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.trust-row span { border: 1px solid var(--line); color: #c7bfaf; border-radius: 999px; padding: 9px 13px; font-size: 12px; background: rgba(255,255,255,.025); }
.selector-shell { border: 1px solid rgba(255,255,255,.075); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); padding: clamp(18px,3vw,36px); backdrop-filter: blur(18px); }
.selector-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.selector-toolbar h2 { font: 600 clamp(25px,3vw,36px) Cinzel, serif; margin: 7px 0 0; }
.section-kicker { margin: 0; }
.filters { background: #0a0a0a; border: 1px solid rgba(255,255,255,.07); padding: 5px; border-radius: 12px; display: flex; gap: 4px; }
.filter { color: var(--muted); border: 0; background: transparent; border-radius: 8px; padding: 10px 15px; cursor: pointer; font-weight: 600; }
.filter.active { color: #160f05; background: var(--gold-light); }
.character-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.character-card { position: relative; min-height: 340px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; overflow: hidden; background: #111; cursor: pointer; isolation: isolate; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; padding: 0; text-align: left; color: white; }
.character-card:hover { transform: translateY(-4px); border-color: rgba(216,173,85,.55); box-shadow: 0 18px 48px rgba(0,0,0,.42); }
.character-card.selected { border: 2px solid var(--gold-light); box-shadow: 0 0 0 4px rgba(216,173,85,.12), 0 18px 54px rgba(0,0,0,.52); }
.character-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.015); transition: transform .35s ease; }
.character-card:hover img { transform: scale(1.05); }
.character-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.92) 100%); }
.card-info { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 17px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.card-info strong { display: block; font: 600 18px Cinzel, serif; }
.card-info small { color: #c3bbaa; display: block; margin-top: 5px; }
.select-icon { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.character-card.selected .select-icon { color: #1b1205; background: var(--gold-light); border-color: var(--gold-light); }
.selection-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 14px 20px; background: rgba(9,9,9,.88); border-top: 1px solid rgba(216,173,85,.18); backdrop-filter: blur(22px); }
.selection-inner { max-width: 1320px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.selected-summary { display: flex; align-items: center; gap: 13px; min-width: 0; }
.selected-thumb { width: 62px; height: 62px; border-radius: 13px; background-size: cover; background-position: center; border: 1px solid rgba(255,255,255,.12); }
.selected-thumb.placeholder { background: radial-gradient(circle, #39342c 0 12%, #171717 13%); }
.selection-label { display: block; font-size: 9px; color: var(--gold); letter-spacing: .18em; margin-bottom: 4px; }
.selected-summary strong { display: block; font-size: 15px; }
.selected-summary small { display: block; margin-top: 3px; color: var(--muted); }
.continue-button, .mint-button { border: 0; border-radius: 12px; background: linear-gradient(135deg, #f0d18a, #c89537); color: #171006; padding: 16px 22px; font-weight: 800; cursor: pointer; min-width: 250px; box-shadow: 0 9px 30px rgba(192,135,37,.2); }
.continue-button:disabled { filter: grayscale(1); opacity: .42; cursor: not-allowed; box-shadow: none; }
.preview-dialog { width: min(1060px, calc(100% - 28px)); border: 1px solid rgba(216,173,85,.3); padding: 0; border-radius: 24px; background: #0c0c0c; color: var(--text); box-shadow: 0 40px 100px rgba(0,0,0,.75); overflow: hidden; }
.preview-dialog::backdrop { background: rgba(0,0,0,.8); backdrop-filter: blur(9px); }
.dialog-close { position: absolute; right: 14px; top: 12px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.55); color: white; font-size: 24px; cursor: pointer; }
.preview-layout { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 630px; }
.preview-image-wrap { position: relative; min-height: 560px; background: #111; }
.preview-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-badge { position: absolute; left: 18px; bottom: 18px; background: rgba(8,8,8,.72); border: 1px solid rgba(216,173,85,.35); color: var(--gold-light); font-size: 10px; letter-spacing: .15em; padding: 9px 12px; border-radius: 999px; backdrop-filter: blur(8px); }
.preview-copy { padding: clamp(28px,5vw,58px); display: flex; flex-direction: column; justify-content: center; }
.preview-copy h2 { font: 600 clamp(31px,4vw,48px) Cinzel, serif; margin: 10px 0 14px; }
.preview-copy > p { color: var(--muted); line-height: 1.65; }
.detail-card { border: 1px solid rgba(255,255,255,.09); border-radius: 14px; margin: 19px 0 24px; overflow: hidden; }
.detail-card div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.detail-card div:last-child { border-bottom: 0; }
.detail-card span { color: var(--muted); font-size: 13px; }
.detail-card strong { font-size: 13px; text-align: right; }
.mint-button { width: 100%; }
.change-button { width: 100%; border: 0; background: transparent; color: #c7bfaf; padding: 14px; cursor: pointer; }
.integration-note { font-size: 11px; margin: 6px 0 0; }
code { color: var(--gold-light); }
@media (max-width: 1050px) { .character-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px) {
  .step-indicator .line, .step-indicator .step:not(.active), .step-copy { display:none; }
  main { width: min(100% - 24px, 1460px); }
  .hero { padding-top: 54px; }
  .selector-toolbar { align-items: stretch; flex-direction: column; }
  .filters { align-self: flex-start; }
  .character-grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .character-card { min-height: 285px; }
  .selection-inner { align-items: stretch; }
  .continue-button { min-width: auto; }
  .preview-layout { grid-template-columns: 1fr; }
  .preview-image-wrap { min-height: 410px; }
}
@media (max-width: 560px) {
  body { padding-bottom: 184px; }
  .brand { font-size: 11px; }
  .character-grid { grid-template-columns: 1fr; }
  .character-card { min-height: 420px; }
  .selection-inner { flex-direction: column; }
  .continue-button { width: 100%; }
  .selected-thumb { width: 48px; height: 48px; }
}
