:root {
  --ink: #07080b;
  --panel: #14161c;
  --line: rgba(212, 184, 122, 0.18);
  --brass: #c4a35a;
  --brass-2: #e6d3a1;
  --ivory: #f3eee4;
  --mute: #9b958a;
  --shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--ink); color: var(--ivory); }
body {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 380;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* —— SPLASH —— */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(196, 163, 90, 0.09), transparent 62%),
    conic-gradient(from 210deg at 50% 50%, #07080b, #12141a 25%, #07080b 50%, #101218 75%, #07080b);
}
.gate::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(-18deg, transparent 0 18px, rgba(196, 163, 90, 0.03) 18px 19px);
  animation: drift 28s linear infinite;
  pointer-events: none;
}
@keyframes drift { to { transform: translateY(-80px); } }

.stage {
  position: relative;
  width: min(920px, 100%);
  aspect-ratio: 16 / 10;
  min-height: 520px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
@media (max-width: 720px) {
  .stage { aspect-ratio: auto; min-height: 620px; }
}

.ornament {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ornament svg { width: 100%; height: 100%; display: block; }

.seal {
  position: absolute;
  top: 28px;
  width: 72px;
  height: 72px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Fraunces, serif;
  font-size: 28px;
  color: var(--brass);
  box-shadow: 0 0 0 8px rgba(196, 163, 90, 0.06), inset 0 0 0 4px rgba(196, 163, 90, 0.2);
  animation: pulse 4.5s ease-in-out infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 14px rgba(196, 163, 90, 0.02), inset 0 0 0 4px rgba(196, 163, 90, 0.35); }
}

.wordmark {
  text-align: center;
  z-index: 2;
  padding: 80px 24px 24px;
}
.wordmark .kicker {
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--brass);
  margin-bottom: 18px;
}
.wordmark h1 {
  font-family: Fraunces, serif;
  font-weight: 480;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.9;
  letter-spacing: 0.04em;
}
.wordmark h1 span {
  display: inline-block;
  animation: rise 0.9s ease both;
}
.wordmark h1 span:nth-child(n) { animation-delay: calc(var(--i) * 60ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) rotate(-4deg); }
  to { opacity: 1; transform: none; }
}
.wordmark .rule {
  width: 120px;
  height: 1px;
  margin: 22px auto;
  background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.wordmark p {
  color: var(--mute);
  max-width: 38ch;
  margin: 0 auto;
  line-height: 1.55;
  font-size: 15px;
}

.gate-actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 12px;
  margin-top: 36px;
  justify-content: center;
  flex-wrap: wrap;
}

.ghost, .gold {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ivory);
  padding: 12px 20px;
  font: 500 13px Outfit, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.gold { background: var(--brass); color: #1a1408; border-color: var(--brass); }
.gold:hover { filter: brightness(1.06); }
.ghost:hover { border-color: var(--brass); color: var(--brass-2); }

.auth {
  position: absolute;
  z-index: 5;
  width: min(380px, calc(100% - 32px));
  background: rgba(12, 13, 18, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
  display: none;
  backdrop-filter: blur(12px);
}
.auth.open { display: block; }
.auth h3 {
  font-family: Fraunces, serif;
  font-weight: 480;
  font-size: 26px;
  margin-bottom: 6px;
}
.auth .sub { color: var(--mute); font-size: 13px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-2); }
.field input {
  background: #0b0c10;
  border: 1px solid var(--line);
  color: var(--ivory);
  padding: 11px 12px;
  outline: none;
}
.field input:focus { border-color: var(--brass); }
.auth .err {
  display: none;
  color: #e08a7a;
  font-size: 13px;
  margin-bottom: 10px;
}
.auth .err.show { display: block; }
.auth .row { display: flex; gap: 8px; }
.auth .row .gold, .auth .row .ghost { flex: 1; }

/* —— APP —— */
.app-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Plus Jakarta Sans", Outfit, system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(196, 163, 90, 0.12), transparent 55%),
    radial-gradient(900px 500px at -10% 80%, rgba(196, 163, 90, 0.06), transparent 50%),
    var(--ink);
}
.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
header.app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 12px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}
.mark {
  width: 34px; height: 34px;
  border: 1px solid var(--brass);
  display: grid; place-items: center;
  font-family: Fraunces, serif;
  color: var(--brass);
  font-size: 18px;
}
header.app nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.who { color: var(--mute); font-size: 13px; letter-spacing: 0.04em; }
.bal {
  font-variant-numeric: tabular-nums;
  color: var(--brass-2);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.pill-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  margin: 22px auto 0;
  width: min(560px, 100%);
  background: rgba(12, 12, 12, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}
.pill-tabs.wide { width: min(920px, 100%); }
.pill-tab {
  appearance: none;
  flex: 1;
  border: none;
  background: transparent;
  color: #8a8a8a;
  font-family: "Plus Jakarta Sans", Outfit, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pill-tab:hover:not(:disabled) { color: #ececec; background: rgba(255, 255, 255, 0.04); }
.pill-tab.active {
  color: #1a1408;
  background: var(--brass);
  box-shadow: none;
}
.pill-tab:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.pill-tab .soon {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 700;
}

.hero { padding: 40px 0 32px; }
.panel-view[hidden] { display: none !important; }
.domain-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: var(--ivory);
  font-family: "Plus Jakarta Sans", Outfit, system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 0;
}
.domain-title:hover { color: var(--brass-2); }
.chev {
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--brass);
  border-bottom: 2px solid var(--brass);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -8px;
}
.domain-title.open .chev,
.key-btn.open .chev { transform: rotate(225deg); margin-top: 6px; }
.drop {
  margin-top: 0;
  border: 1px solid var(--line);
  background: #101218;
}
.key-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--brass-2);
  padding: 18px 22px;
  font: 600 13px "Plus Jakarta Sans", Outfit, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}
.key-btn:hover { background: rgba(196, 163, 90, 0.06); }
.key-btn .chev { margin: 0; }
.key-grid {
  display: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 14px 16px;
  justify-items: center;
}
.key-grid.open { display: grid; }
.key-tile {
  appearance: none;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 0;
  width: 100%;
  max-width: 78px;
}
.key-tile.empty { cursor: default; pointer-events: none; }
.key-icon {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101218;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.key-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}
.key-tile.empty .key-icon {
  border-style: dashed;
  border-color: rgba(196, 163, 90, 0.35);
  background: transparent;
}
.key-name {
  font-family: "Plus Jakarta Sans", Outfit, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brass-2);
  text-align: center;
  line-height: 1.15;
  min-height: 1.15em;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.key-tile.selected .key-icon {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass);
}
.buy-panel {
  border-top: 1px solid var(--line);
  padding: 16px 18px 18px;
}
.buy-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.buy-head strong {
  font-family: "Plus Jakarta Sans", Outfit, sans-serif;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-2);
}
.buy-price {
  color: var(--brass);
  font-weight: 700;
  font-size: 18px;
}
.buy-note {
  color: var(--mute);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
  max-width: 62ch;
}
.section-title {
  font-family: "Plus Jakarta Sans", Outfit, sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.section-title.spaced { margin-top: 40px; }
.lede.tight { margin-top: 0; font-size: 15px; margin-bottom: 20px; }
.mine-list {
  list-style: none;
  border: 1px solid var(--line);
  background: #101218;
}
.mine-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.mine-list li:first-child { border-top: none; }
.mine-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mine-row > div { min-width: 0; flex: 1; }
.mine-list b {
  font-size: 16px;
  font-weight: 600;
  word-break: break-all;
}
.mine-list span { color: var(--mute); font-size: 12px; letter-spacing: 0.04em; }
.ns-now { display: block; color: var(--brass-2) !important; margin-top: 6px; word-break: break-all; }
.ns-form {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ns-form:not([hidden]) { display: grid; }
.ns-form .field { margin-bottom: 0; }
.ns-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.ns-actions .flash { margin: 0; }
.flash { display: none; font-size: 13px; margin: 10px 0 16px; }
.flash:not([hidden]) { display: block; }
.flash.ok { color: #8fcaa0; }
.flash.err { color: #e08a7a; }
.admin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 8px 0 8px;
}
.admin-form .field { margin-bottom: 0; min-width: 160px; }
.admin-form .field.grow { flex: 1; min-width: 220px; }
.admin-form.inline .field { min-width: 140px; }
.field select, .field textarea {
  background: #0b0c10;
  border: 1px solid var(--line);
  color: var(--ivory);
  padding: 11px 12px;
  outline: none;
  font: inherit;
  width: 100%;
}
.field select:focus, .field textarea:focus { border-color: var(--brass); }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #101218;
  margin-top: 12px;
}
.shop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.shop-table th {
  text-align: left;
  color: var(--brass-2);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.shop-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  word-break: break-all;
  vertical-align: middle;
}
.shop-table tr:last-child td { border-bottom: none; }
.pill-ok { color: #8fcaa0; }
.pill-sold { color: var(--mute); }
.ghost.tiny {
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.gold:disabled, .ghost:disabled { opacity: 0.55; cursor: not-allowed; }
.sites {
  list-style: none;
  display: none;
}
.sites.open { display: block; }
.sites li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.sites li:first-child { border-top: none; }
.sites b {
  font-family: "Plus Jakarta Sans", Outfit, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0;
}
.eyebrow {
  color: var(--brass);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: Fraunces, serif;
  font-weight: 480;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.95;
  max-width: 14ch;
}
.lede {
  margin-top: 28px;
  max-width: 46ch;
  color: var(--mute);
  font-size: 18px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 72px 0 96px;
}
.rail article { background: transparent; padding: 28px 24px; }
.rail strong { display: block; font-size: 22px; font-family: Fraunces, serif; font-weight: 600; }
.rail span { color: var(--mute); font-size: 13px; letter-spacing: 0.04em; }
footer.app {
  border-top: 1px solid var(--line);
  padding: 22px 0 28px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  font-size: 13px;
  gap: 16px;
  flex-wrap: wrap;
}

.backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 7, 10, 0.72);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 40;
}
.backdrop.open { display: flex; }
.window {
  width: min(760px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #101218;
}
.titlebar h2 {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--brass-2);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; display: block; background: #3a3d46; }
.dots i:last-child { background: var(--brass); cursor: pointer; }
.win-body { padding: 10px 8px 8px; }
.intro { padding: 18px 18px 10px; color: var(--mute); font-size: 14px; line-height: 1.55; }
.brands { list-style: none; }
.brands li {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.brands li:hover { background: rgba(196, 163, 90, 0.06); }
.brands li.active { background: rgba(196, 163, 90, 0.1); }
.num { color: var(--brass); font-size: 12px; letter-spacing: 0.14em; }
.brands b { font-family: Fraunces, serif; font-size: 28px; font-weight: 480; font-style: italic; }
.tag { color: var(--mute); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.detail { display: none; margin: 8px 10px 12px; padding: 18px; border: 1px solid var(--line); background: #101218; }
.detail.show { display: block; }
.detail h3 { font-family: Fraunces, serif; font-size: 26px; font-weight: 480; margin-bottom: 8px; }
.detail p { color: var(--mute); font-size: 14px; line-height: 1.55; margin-bottom: 16px; }
.detail .gold { display: inline-block; }

@media (max-width: 720px) {
  .rail { grid-template-columns: 1fr; }
  .sites b { font-size: 15px; }
  .hero { padding-top: 28px; }
  .pill-tabs, .pill-tabs.wide { border-radius: 18px; flex-wrap: wrap; }
  .pill-tab { font-size: 0.75rem; padding: 9px 8px; }
  .key-grid { gap: 6px 6px; padding: 10px; }
  .key-tile { max-width: 58px; }
  .key-name { font-size: 7px; letter-spacing: 0.02em; }
  .mine-row { flex-wrap: wrap; }
  .ns-form:not([hidden]) { grid-template-columns: 1fr; }
}
