:root {
  --bg: #12110e;
  --bg-raise: #1c1914;
  --ink: #f6f1e7;
  --muted: #cfc6b6;
  --line: #463f35;
  --orange: #ff5c2a;
  --blue: #9fdfff;
  --acid: #e7ff4a;
  --ink-strong: #17140f;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(520px 280px at 88% 8%, rgba(231, 255, 74, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(255, 92, 42, 0.14), transparent 32%),
    repeating-linear-gradient(-14deg, transparent, transparent 11px, rgba(255, 255, 255, 0.018) 11px, rgba(255, 255, 255, 0.018) 12px),
    var(--bg);
  color: var(--ink);
  font-family: Outfit, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

a { color: inherit; }
button, select, input { font: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--acid);
  color: var(--ink-strong);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { transform: none; }

.top, .hero, .bench, .guide, .foot {
  width: min(1080px, calc(100% - 40px));
  margin-inline: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 6px;
}
.mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo {
  width: 48px;
  height: 48px;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}
.word {
  font-family: Fraunces, serif;
  font-weight: 640;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.word small {
  display: block;
  margin-top: 3px;
  font-family: Outfit, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acid);
}
.account {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(23, 20, 15, 0.72);
}
.account strong { color: var(--acid); font-weight: 600; }

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
  align-items: end;
  padding: 18px 0 8px;
}
.kicker {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
h1 {
  margin: 0;
  font-family: Fraunces, serif;
  font-weight: 560;
  font-size: clamp(3.4rem, 7vw, 6.1rem);
  letter-spacing: -0.048em;
  line-height: 0.88;
}
.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
}
.hero-logo {
  width: min(240px, 100%);
  height: auto;
  justify-self: end;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}

.bench { padding: 8px 0 28px; }
.mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(23, 20, 15, 0.8);
}
.mode button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.mode button[aria-selected="true"] {
  background: var(--acid);
  color: var(--ink-strong);
  font-weight: 600;
}

#merge-form {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}
.pick[hidden] { display: none; }
.pick {
  position: relative;
  background: linear-gradient(180deg, #262218 0%, #16140f 100%);
  border: 1px solid #5a5146;
  border-radius: 26px 26px 18px 18px;
  padding: 26px 18px 16px;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.pick::before {
  content: "";
  position: absolute;
  top: -1px;
  width: 58px;
  height: 12px;
  background: var(--bg);
  border: 1px solid #5a5146;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.pick-a::before { left: 22px; }
.pick-b::before { right: 22px; }
.pick-a { box-shadow: inset 5px 0 0 var(--orange), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.pick-b { box-shadow: inset 5px 0 0 var(--blue), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.spine {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: #8d8476;
}
.pick label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
select, .pick input {
  width: 100%;
  margin-top: 14px;
  color: var(--ink);
  background: #0e0d0b;
  border: 1px solid #4d463c;
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 1.05rem;
}
.pick .filter {
  margin-top: 10px;
  padding: 8px 12px;
  font-size: 0.92rem;
}
select {
  appearance: none;
  text-overflow: ellipsis;
  background: #0e0d0b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23f4efe6' stroke-width='1.8'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 42px;
}
.pick input::placeholder { color: #8d8476; }
select:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}
.merge {
  align-self: center;
  width: 138px;
  height: 138px;
  border: 0;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink-strong);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
}
.merge svg { display: block; }
.merge:hover { transform: translateY(-2px); }
.merge:disabled { cursor: wait; opacity: 0.7; transform: none; }

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chips button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}
.chips button:hover { color: var(--ink); border-color: #6d655b; }
.form-error, .notice { min-height: 1.4em; margin: 12px 0 0; }
.form-error:empty { min-height: 0; margin: 0; }
.form-error { color: #ffb4a2; }
.notice {
  background: #241c12;
  border: 1px solid #6a4b24;
  color: #f0d7a4;
  border-radius: 12px;
  padding: 10px 12px;
}

.guide {
  padding: 8px 0 56px;
}
.guide-head {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.guide-head h2 {
  margin: 0 0 8px;
  font-family: Fraunces, serif;
  font-weight: 560;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
  max-width: 18em;
  text-wrap: balance;
}
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.pill {
  border-radius: 999px;
  padding: 6px 11px;
  background: #2a261f;
  color: var(--muted);
  font-size: 0.86rem;
}
.pill strong { color: var(--ink); font-weight: 600; }
.expect { max-width: 42rem; color: var(--muted); }

.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  background: rgba(28, 25, 20, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px 8px;
}
.num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--ink-strong);
  font-weight: 600;
}
.step h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.step p { margin: 0 0 12px; color: #e4ddd2; }
.prompt, .checks {
  background: #0e0d0b;
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 14px;
}
.prompt {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}
.prompt-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.copy {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
.checks { margin: 0 0 14px; padding-left: 28px; }
.checks li { margin: 0 0 8px; }

.lockbox { position: relative; margin-top: 14px; }
.blurred {
  max-height: 460px;
  overflow: hidden;
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}
.pay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 24px));
  background: #f6f1e7;
  color: var(--ink-strong);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.pay h3 {
  margin: 0 0 8px;
  font-family: Fraunces, serif;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.pay p { margin: 0 0 14px; }
.pay-actions { display: flex; flex-direction: column; gap: 8px; }
.unlock, .restore-toggle {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
}
.unlock { background: var(--acid); color: var(--ink-strong); font-weight: 600; }
.unlock:disabled { opacity: 0.6; cursor: not-allowed; }
.restore-toggle { background: transparent; color: #3d3428; text-decoration: underline; }
.restore { display: flex; gap: 8px; }
.restore input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #c9bfb0;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink-strong);
  background: white;
}
.restore button {
  border: 0;
  border-radius: 999px;
  background: var(--ink-strong);
  color: #f6f1e7;
  padding: 10px 14px;
  cursor: pointer;
}
.pay-error { color: #8d2a12; min-height: 1.2em; }

.foot {
  padding: 8px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}
.foot a { color: var(--blue); }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
  .top { align-items: flex-start; gap: 12px; }
  .account { text-align: right; }
  #merge-form { grid-template-columns: 1fr; }
  .merge { width: 100%; height: 72px; border-radius: 18px; grid-auto-flow: column; }
  .blurred { max-height: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .merge:hover { transform: none; }
}
