:root {
  --bg: #0c0b09;
  --bg-2: #141210;
  --ink: #f7f1e6;
  --muted: #a3988a;
  --line: rgba(247, 241, 230, 0.09);
  --brass: #e7c78a;
  --brass-dim: rgba(231, 199, 138, 0.16);
  --up: #dff26a;
  --down: #ff6a45;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(820px 380px at 0% 0%, rgba(231, 199, 138, 0.09), transparent 58%),
    radial-gradient(700px 420px at 100% 0%, rgba(223, 242, 106, 0.04), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-weight: 360;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

.page {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.brand, .identity { display: flex; gap: 16px; align-items: center; }
.identity { flex-direction: column; align-items: flex-end; gap: 10px; }

.mark {
  width: 46px;
  height: 46px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 0 5px rgba(231, 199, 138, 0.08);
}
.mark::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 10px;
  width: 1px;
  height: 26px;
  background: var(--brass);
}

h1 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 64px;
  line-height: 0.8;
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brass);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.muted { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.45; }

.lang {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.lang button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
}
.lang button.on {
  color: #1a150f;
  background: var(--brass);
}

#address {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(460px, 100%);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 8px 8px 8px 14px;
  text-align: left;
  transition: border-color 0.15s ease;
}
#address-text {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.01em;
  word-break: break-all;
  line-height: 1.35;
}
#copy-label {
  flex: none;
  background: var(--brass);
  color: #1a150f;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
}
#address:hover { border-color: rgba(231, 199, 138, 0.7); }

.pulse { margin: 0; color: var(--muted); font-size: 13px; }
.pulse::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(223, 242, 106, 0.55);
  animation: beat 1.8s infinite;
  vertical-align: 1px;
}
.pulse.down::before { background: var(--down); animation: none; }

@keyframes beat {
  70% { box-shadow: 0 0 0 8px transparent; }
}

.note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(231, 199, 138, 0.28);
  border-radius: 14px;
  color: var(--ink);
  background: var(--brass-dim);
}

.hero, .lower, .watch {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.watch { display: block; }
.hero { grid-template-columns: 0.92fr 1.45fr 0.72fr; align-items: stretch; }
.lower { grid-template-columns: 0.92fr 1.35fr; }

.panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 199, 138, 0.7), transparent);
}

.section-head, .chart-head, .split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.section-head, .chart-head { align-items: baseline; margin-bottom: 8px; }
.chart-head .eyebrow, .section-head .eyebrow { margin-bottom: 0; }

.figure {
  margin: 6px 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 68px;
  letter-spacing: -0.045em;
  line-height: 0.86;
  font-variant-numeric: tabular-nums;
}
.rate {
  background:
    radial-gradient(180px 140px at 100% 0%, rgba(231, 199, 138, 0.16), transparent 68%),
    var(--bg-2);
}
.rate .figure { font-size: 78px; }
.unit { margin: 10px 0 0; color: var(--muted); letter-spacing: 0.14em; font-size: 12px; }

.split {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.split div { min-width: 0; }
.split dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.split dd {
  margin: 6px 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.chart-card { min-height: 340px; }
#chart { width: 100%; height: 250px; display: block; margin-top: 8px; }
.chart-grid { stroke: rgba(247, 241, 230, 0.06); stroke-width: 1; }
.chart-line {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart-fill { fill: url(#fade); }
.chart-halo { fill: rgba(223, 242, 106, 0.22); }
.chart-dot { fill: var(--up); }

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.coin {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 18px 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.mini {
  flex: 1 0 100%;
  height: 64px;
  margin-top: 2px;
}
.mini.empty {
  height: 28px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.mini svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mini .base {
  stroke: rgba(247, 241, 230, 0.22);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.mini path {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.mini circle { fill: var(--brass); }
.mini.up path { stroke: var(--up); }
.mini.up circle { fill: var(--up); }
.mini.down path { stroke: var(--down); }
.mini.down circle { fill: var(--down); }
.ok-dot {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--down);
}
.ok-dot.on {
  background: var(--up);
  box-shadow: 0 0 8px rgba(223, 242, 106, 0.7);
}
.coin-copy { min-width: 0; flex: 1; }
.coin-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.coin .name {
  font-weight: 560;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coin .sym {
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.chip {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chip.watching { color: var(--brass); }
.chip.bought, .chip.qualified { color: var(--up); }
.mult {
  flex: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--brass);
}
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: contain;
  flex: none;
  background: #1a1714;
  padding: 3px;
}
.avatar.fallback {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--brass);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
}
.board > .empty { grid-column: 1 / -1; }

.positions, .tape { display: flex; flex-direction: column; }
.tape {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 380px;
  overflow: auto;
}

.row, .pos {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row { grid-template-columns: 64px 1fr auto auto; }
.pos { grid-template-columns: auto 1fr auto; }
.row:last-child, .pos:last-child { border-bottom: 0; }
.kind {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kind.buy, .up { color: var(--up); }
.kind.sell { color: var(--down); }
.kind.claim { color: var(--brass); }
.sym { font-weight: 560; }
.right {
  text-align: right;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.empty {
  color: var(--muted);
  margin-top: 8px;
  padding: 28px 8px;
  text-align: center;
  border: 1px dashed rgba(247, 241, 230, 0.14);
  border-radius: 14px;
}

.rules ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 4px;
  padding: 0;
}
.rules li {
  margin: 0;
  padding: 14px 14px 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  color: #ebe3d6;
  line-height: 1.5;
  counter-increment: rule;
}
.rules ol { counter-reset: rule; }
.rules li::before {
  content: counter(rule, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  color: var(--brass);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
}

@media (max-width: 980px) {
  .page { width: min(100% - 28px, 1160px); padding-top: 22px; }
  h1 { font-size: 48px; }
  .figure, .rate .figure { font-size: 52px; }
  .hero, .lower, .top, .rules ol { display: flex; flex-direction: column; }
  .board { grid-template-columns: 1fr 1fr; }
  .identity, .lang { align-items: flex-start; justify-content: flex-start; }
  #address { max-width: 100%; }
  .row { grid-template-columns: 64px 1fr; }
  .row .right:last-child { grid-column: 2; }
}

@media (max-width: 640px) {
  .board { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse::before { animation: none; }
}
