:root {
  --bg: #07080d;
  --bg2: #0c0f16;
  --panel: #11151f;
  --panel2: #161b27;
  --line: #232a3a;
  --text: #e9eef8;
  --muted: #8d97ab;
  --faint: #5d6678;
  --blue: #4c8dff;
  --blue2: #7aa7ff;
  --gold: #e2b34a;
  --gold2: #f0d48a;
  --green: #3dd68c;
  --red: #ff6b7d;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Sora", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--sans); }
body {
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 500px at 10% -10%, rgba(76, 141, 255, 0.12), transparent 50%),
    radial-gradient(800px 400px at 90% 0%, rgba(226, 179, 74, 0.08), transparent 45%),
    linear-gradient(180deg, #07080d, #090b12 40%, #07080d);
}
a { color: var(--blue2); text-decoration: none; }
a:hover { color: #fff; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

.shell { max-width: 1180px; margin: 0 auto; padding: 20px 22px 60px; }
.top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; }
.mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #1a2744, #0d1320);
  border: 1px solid #2a3b63;
  font-weight: 700; font-size: 22px; color: var(--blue2);
  box-shadow: inset 0 0 20px rgba(76, 141, 255, 0.15);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; letter-spacing: 0.02em; }
.brand-text em { font-style: normal; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.search { flex: 1; display: flex; min-width: 260px; }
.search input {
  flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  padding: 11px 14px; border-radius: 10px 0 0 10px; font: inherit; outline: none;
}
.search input:focus { border-color: #3b4f78; }
.search button {
  background: var(--blue); color: #061018; border: 0; padding: 0 16px;
  border-radius: 0 10px 10px 0; font-weight: 600; cursor: pointer;
}

.status-pills { display: flex; gap: 8px; }
.pill {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.pill.ok { color: var(--green); border-color: #1e4a36; }
.pill.bad { color: var(--red); border-color: #4a1e28; }
.pill.gold { color: var(--gold2); border-color: #4a3b1e; }

.nav { display: flex; gap: 4px; margin: 18px 0 22px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.nav a {
  color: var(--muted); padding: 10px 12px; border-bottom: 2px solid transparent; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
}
.nav a:hover, .nav a.active { color: var(--text); border-bottom-color: var(--blue); }

.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid.two { grid-template-columns: 1.3fr 0.9fr; }
.grid.home { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 900px) { .grid.two, .grid.home { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 22px; font-weight: 600; }
.stat span { color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--faint); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 6px; border-bottom: 1px solid var(--line); }
td { padding: 9px 6px; border-bottom: 1px solid rgba(35, 42, 58, 0.7); vertical-align: top; }
tr:hover td { background: rgba(255,255,255,0.015); }
.hash { font-family: var(--mono); font-size: 12px; word-break: break-all; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 12px; font-size: 13px; }
.kv b { color: var(--muted); font-weight: 500; }
.trunc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; letter-spacing: 0.04em;
  border: 1px solid var(--line); color: var(--muted);
}
.badge.lottery { color: var(--gold); border-color: #5a4518; background: rgba(226, 179, 74, 0.08); }
.badge.guest { color: #c4b5fd; border-color: #4c3d7a; background: rgba(139, 92, 246, 0.12); }
.badge.asset { color: var(--blue2); border-color: #2a3b63; background: rgba(76, 141, 255, 0.08); }
.badge.ok { color: var(--green); border-color: #1e4a36; }
.badge.warn { color: var(--red); }

.winner {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.winner:last-child { border-bottom: 0; }
.winner .who { display: flex; flex-direction: column; gap: 2px; }
.winner .amt { color: var(--gold2); font-family: var(--mono); }

.countdown {
  font-family: var(--mono); font-size: 28px; color: var(--gold2); letter-spacing: 0.08em;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.row-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.btn {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font: inherit;
}
.btn:hover { border-color: #3b4f78; }
.copy { cursor: pointer; }
.err { color: var(--red); padding: 24px; }
.loading { color: var(--muted); padding: 40px 8px; }
.empty { color: var(--muted); padding: 18px 4px; }
.page-title { margin: 0 0 16px; font-size: 26px; font-weight: 600; }
.sub { color: var(--muted); margin: -10px 0 18px; }
.io { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 12px; }
.arrow { display: grid; place-items: center; color: var(--faint); }
.foot { margin-top: 36px; color: var(--faint); font-size: 12px; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.tabs button.on { color: var(--text); border-color: var(--blue); }
.toolbar {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin-bottom: 14px;
}
.toolbar .search { min-width: 220px; flex: 1; max-width: 420px; }
.member-meta { color: var(--muted); font-size: 12px; }
.notice {
  border: 1px solid #4a3b1e; background: rgba(226, 179, 74, 0.06); color: var(--gold2);
  padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 13px;
}

.crumb { color: var(--faint); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; }
.badge.ipfs { color: #c4b5fd; border-color: #4c3d7a; background: rgba(139, 92, 246, 0.12); }
.click-rows tr[data-href] { cursor: pointer; }

.asset-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .asset-hero { grid-template-columns: 1fr; } }

.media-card { padding: 0; overflow: hidden; }
.media-stage {
  min-height: 380px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 280px at 50% 0%, rgba(76, 141, 255, 0.1), transparent 55%),
    linear-gradient(180deg, #0b0f18, #080a10);
}
.media-stage.video { min-height: 0; background: #000; }
.media-stage video {
  width: 100%;
  max-height: 540px;
  background: #000;
  outline: none;
}
.media-frame {
  margin: 0;
  min-height: 380px;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(900px 280px at 50% 0%, rgba(76, 141, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #0b0f18, #080a10);
}
.media-frame img {
  max-width: 100%;
  max-height: 520px;
  border-radius: 14px;
  object-fit: contain;
  cursor: zoom-in;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}
.media-caption {
  padding: 12px 18px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}
.media-empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 24px;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.media-text {
  margin: 0;
  padding: 18px;
  max-height: 480px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
}
.nft-name { margin: 0 0 8px; font-size: 20px; }
.asset-desc { color: var(--text); line-height: 1.55; white-space: pre-wrap; }
.attr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.attr {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.attr span {
  display: block;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.attr b { font-weight: 500; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(4, 6, 10, 0.88);
  cursor: zoom-out;
}
.lightbox.on { display: grid; }
.lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.obs-hero {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .obs-hero { grid-template-columns: 1fr; } }
.obs-clock { position: relative; display: grid; place-items: center; padding: 8px; }
.obs-clock svg { width: min(280px, 100%); height: auto; }
.obs-clock-label {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 2px;
  text-align: center; pointer-events: none;
}
.obs-clock-label b { font-size: 34px; font-family: var(--mono); color: var(--gold2); letter-spacing: 0.06em; }
.obs-clock-label span { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.era-track { display: flex; gap: 6px; align-items: flex-end; height: 120px; padding: 8px 0 0; }
.era-col {
  flex: 1; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, rgba(226,179,74,0.85), rgba(226,179,74,0.18));
  position: relative; min-width: 0;
}
.era-col.on { box-shadow: 0 0 0 2px #e2b34a, 0 8px 24px rgba(226,179,74,0.2); }
.era-col span {
  position: absolute; bottom: 6px; left: 0; right: 0; text-align: center;
  font-size: 10px; color: #1a1408; font-weight: 600;
}
.pulse-svg { width: 100%; height: 140px; display: block; }
.hat-map { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.luck-row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.luck-row:last-child { border-bottom: 0; }
.luck-bars { position: relative; height: 14px; background: #0d1118; border-radius: 99px; overflow: hidden; }
.luck-exp { position: absolute; inset: 0 auto 0 0; background: rgba(76,141,255,0.35); border-radius: 99px; }
.luck-act { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #c4922a, #f0d48a); border-radius: 99px; opacity: 0.95; }
.launch-strip {
  display: flex; height: 18px; border-radius: 99px; overflow: hidden;
  border: 1px solid var(--line); margin-top: 8px;
}
.launch-strip i:first-child { width: 8px; background: #1a1c24; }
.launch-strip i:last-child { flex: 1; background: linear-gradient(90deg, #3d3114, #e2b34a); }
.kind-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-pill {
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel2); min-width: 90px;
}
.kind-pill b { display: block; font-size: 20px; }
.kind-pill span { color: var(--faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
