:root {
  color-scheme: dark;
  --night: #0d0905;
  --arena-floor: #17100a;
  --stone-face: #2b2013;
  --stone-deep: #191006;
  --stone-edge: #5c4a2b;
  --travertine: #e8d9b5;
  --travertine-dim: #a8916a;
  --gold: #d4a73f;
  --gold-bright: #f5d67a;
  --gold-deep: #8a5f16;
  --gold-line: rgba(212, 167, 63, 0.28);
  --crimson: #a32e22;
  --laurel: #8fbf6f;
  --iron: #c8ccd4;
  --loss: #d95f4a;
  --ink: var(--travertine);
  --muted: var(--travertine-dim);
  --line: var(--gold-line);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.91 0 0 0 0 0.85 0 0 0 0 0.71 0 0 0 0.045 0'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  background:
    radial-gradient(ellipse 60rem 26rem at 50% -6rem, rgba(212, 167, 63, 0.16), transparent 70%),
    radial-gradient(ellipse 30rem 20rem at 8% 30%, rgba(163, 46, 34, 0.10), transparent 70%),
    radial-gradient(ellipse 80rem 30rem at 50% 115%, rgba(196, 158, 94, 0.12), transparent 70%),
    linear-gradient(180deg, var(--night) 0%, var(--arena-floor) 45%, #0b0704 100%);
  color: var(--ink);
  overflow-x: hidden;
}
/* torchlight vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 0 45%, rgba(0, 0, 0, 0.55) 100%);
}
/* drifting arena dust */
.sandstorm {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(232, 217, 181, 0.10) 1px, transparent 1.5px);
  background-size: 46px 46px;
  transform: rotate(-8deg);
  animation: drift 30s linear infinite;
  opacity: 0.3;
}
@keyframes drift { to { transform: translate3d(-92px, 46px, 0) rotate(-8deg); } }

.arena-shell { width: min(1360px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 20px; position: relative; }

/* ---- stone tablet ---- */
.arena-card {
  position: relative;
  border: 1px solid var(--stone-edge);
  border-radius: 6px;
  background:
    var(--grain),
    linear-gradient(180deg, var(--stone-face), #1d1409 60%, var(--stone-deep));
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 232, 180, 0.08),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
/* carved inner frame */
.arena-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(212, 167, 63, 0.2);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
/* corner rosettes */
.arena-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 3px at 9px 9px, rgba(212, 167, 63, 0.55) 0 1.5px, transparent 3px),
    radial-gradient(circle 3px at calc(100% - 9px) 9px, rgba(212, 167, 63, 0.55) 0 1.5px, transparent 3px),
    radial-gradient(circle 3px at 9px calc(100% - 9px), rgba(212, 167, 63, 0.55) 0 1.5px, transparent 3px),
    radial-gradient(circle 3px at calc(100% - 9px) calc(100% - 9px), rgba(212, 167, 63, 0.55) 0 1.5px, transparent 3px);
}

/* ---- typography ---- */
.eyebrow, .section-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-weight: 700;
  font-size: 12px;
  font-family: "Cinzel", Georgia, serif;
}
h1 {
  margin: 0;
  font-family: "Cinzel", "Trajan Pro", Georgia, serif;
  font-weight: 900;
  font-size: clamp(46px, 6.4vw, 92px);
  line-height: 0.98;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6), 0 -1px 0 rgba(255, 240, 200, 0.12);
}
h1 span {
  background: linear-gradient(180deg, var(--gold-bright) 8%, #c9962e 55%, var(--gold-deep) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold);
  -webkit-text-fill-color: transparent;
}
h2 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.subcopy { color: var(--muted); font-size: 18px; max-width: 680px; line-height: 1.65; font-style: italic; }

/* engraved rule under the title */
.hero-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  color: var(--gold);
  font-size: 14px;
}
.hero-rule::before, .hero-rule::after {
  content: "";
  flex: 1;
  max-width: 150px;
  height: 3px;
  border-top: 1px solid rgba(212, 167, 63, 0.55);
  border-bottom: 1px solid rgba(212, 167, 63, 0.25);
}

.hero-links {
  position: absolute;
  top: 18px; right: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}
.x-link, .ca-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(212, 167, 63, 0.45);
  border-radius: 3px;
  color: var(--gold);
  background: rgba(212, 167, 63, 0.08);
  text-decoration: none;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.1);
}
.x-link svg { width: 14px; height: 14px; fill: currentColor; }
.x-link:hover, .ca-chip:hover { background: rgba(212, 167, 63, 0.18); color: var(--gold-bright); }
.ca-chip { cursor: pointer; }
.ca-chip .ca-label {
  padding-right: 8px;
  border-right: 1px solid rgba(212, 167, 63, 0.4);
}
.ca-chip .ca-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--travertine);
}
.ca-chip.copied .ca-value { color: var(--laurel); }
.hero { display: grid; grid-template-columns: minmax(420px, 1.15fr) 320px minmax(300px, 0.72fr); gap: 28px; padding: 40px 42px; align-items: center; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.live-panel {
  width: min(520px, 100%);
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 191, 111, 0.46);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(143, 191, 111, 0.11), rgba(0, 0, 0, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.08), 0 0 28px rgba(143, 191, 111, 0.08);
}
.live-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--travertine); font-family: "Cinzel", Georgia, serif; text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; }
.live-line b { color: var(--laurel); }
.live-line span:last-child { color: var(--muted); letter-spacing: 0.08em; }
.live-dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--laurel);
  box-shadow: 0 0 0 0 rgba(143, 191, 111, 0.75), 0 0 16px rgba(143, 191, 111, 0.9);
  animation: livePulse 1.15s ease-out infinite;
}
.live-meter { margin-top: 10px; height: 4px; background: rgba(232, 217, 181, 0.12); border-radius: 999px; overflow: hidden; }
.live-meter span { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, var(--laurel), var(--gold-bright)); transition: width 0.25s linear; }
body[data-live="syncing"] .live-dot { background: var(--gold); box-shadow: 0 0 16px rgba(212, 167, 63, 0.9); }
body[data-live="offline"] .live-panel { border-color: rgba(217, 95, 74, 0.58); }
body[data-live="offline"] .live-line b, body[data-live="offline"] .live-dot { color: var(--loss); background: var(--loss); }
body.just-updated .live-panel { animation: updateFlash 0.85s ease-out; }
body.data-changed .board-card, body.data-changed .agent-card, body.data-changed .score-row { animation: dataGlow 0.9s ease-out; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 11px rgba(143, 191, 111, 0); } 100% { box-shadow: 0 0 0 0 rgba(143, 191, 111, 0); } }
@keyframes updateFlash { 0% { border-color: var(--gold-bright); box-shadow: 0 0 34px rgba(245, 214, 122, 0.28); } 100% { } }
@keyframes dataGlow { 0% { filter: brightness(1.16); } 100% { filter: none; } }
.primary-link, .ghost-link {
  text-decoration: none;
  border-radius: 3px;
  padding: 14px 22px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}
.primary-link {
  background: linear-gradient(180deg, var(--gold-bright), #c9962e 55%, #a3721c);
  color: #241505;
  border: 1px solid #8a5f16;
  box-shadow: 0 10px 26px rgba(212, 167, 63, 0.22), inset 0 1px 0 rgba(255, 245, 214, 0.6);
}
.primary-link:hover { filter: brightness(1.08); }
.ghost-link {
  border: 1px solid var(--stone-edge);
  color: var(--travertine);
  background: rgba(232, 217, 181, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.08);
}
.ghost-link:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---- emblem + laurels ---- */
.arena-emblem { display: grid; place-items: center; min-height: 300px; position: relative; }
.brand-mark {
  width: 230px; height: 230px;
  object-fit: cover;
  border-radius: 999px;
  border: 6px solid #cfbd93;
  box-shadow:
    0 0 0 2px #1f160d,
    0 0 0 5px rgba(212, 167, 63, 0.45),
    0 24px 70px rgba(0, 0, 0, 0.65);
  z-index: 2;
}
.laurel { position: absolute; width: 130px; height: 260px; color: var(--gold); opacity: 0.8; z-index: 1; }
.laurel svg { width: 100%; height: 100%; display: block; }
.laurel.left { transform: translateX(-128px); }
.laurel.right { transform: translateX(128px) scaleX(-1); }

/* ---- scoreboard ---- */
.stone-panel { display: grid; gap: 12px; align-content: center; }
.score-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(232, 217, 181, 0.08), rgba(0, 0, 0, 0.18));
  border: 1px solid var(--stone-edge);
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.07);
}
.score-row > span:first-child {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--gold);
}

/* ---- colonnade band ---- */
.colonnade {
  height: 56px;
  margin: 0 6px 26px;
  border-top: 1px solid rgba(212, 167, 63, 0.35);
  border-bottom: 4px double rgba(212, 167, 63, 0.4);
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(212, 167, 63, 0.4) 10px 11px, #0b0703 11px 47px, rgba(212, 167, 63, 0.4) 47px 48px, transparent 48px 58px) bottom left / 58px 30px repeat-x,
    radial-gradient(circle 24px at 29px 26px, #0b0703 0 18px, rgba(212, 167, 63, 0.4) 18.5px 20px, transparent 21px) top left / 58px 56px repeat-x,
    var(--grain),
    linear-gradient(180deg, #2a1f11, #1a1108);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 232, 180, 0.07);
}

/* ---- combat stage ---- */
.combat-stage {
  min-height: 250px;
  display: grid;
  grid-template-columns: 1fr 170px 1fr;
  align-items: center;
  gap: 20px;
  padding: 30px 44px;
  margin-bottom: 26px;
  background:
    radial-gradient(ellipse 46rem 12rem at 50% 118%, rgba(196, 158, 94, 0.2), transparent 70%),
    var(--grain),
    linear-gradient(180deg, var(--stone-face), #1d1409 60%, var(--stone-deep));
}
.arch {
  position: absolute; top: 22px; bottom: 22px; width: 170px;
  border: 10px solid rgba(212, 167, 63, 0.16);
  border-bottom: 0;
  border-radius: 110px 110px 0 0;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.arch-left { left: 30px; } .arch-right { right: 30px; }
.fighter {
  min-height: 180px;
  display: grid; place-items: center; align-content: center; gap: 8px;
  border-radius: 4px;
  border: 1px solid var(--stone-edge);
  background: linear-gradient(180deg, rgba(232, 217, 181, 0.07), rgba(0, 0, 0, 0.22));
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.08), inset 0 -14px 30px rgba(0, 0, 0, 0.35);
  position: relative; z-index: 1;
}
.fighter-title {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 900;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.65);
}
.fighter-subtitle { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: 0.26em; font-weight: 700; font-family: "Cinzel", Georgia, serif; }
.fighter-avatar { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(212, 167, 63, 0.45); box-shadow: 0 8px 16px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.18); }
.grokster-avatar { background: #000; }
.fighter-face { font-size: 38px; color: var(--muted); letter-spacing: -0.35em; text-indent: -0.35em; }
.white-fighter .fighter-title { color: #f5ecd6; }
.black-fighter .fighter-title { color: var(--iron); }
.versus { display: grid; place-items: center; gap: 2px; color: var(--gold); z-index: 2; }
.sword { font-size: 78px; line-height: 0.85; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.8)); }
.versus b { font-family: "Cinzel", Georgia, serif; font-size: 20px; letter-spacing: 0.34em; text-indent: 0.34em; }

/* ---- boards ---- */
.grid { display: grid; gap: 22px; margin-bottom: 26px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agent-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-bottom: 26px; align-items: start; }
.full-width-section { grid-template-columns: 1fr; }
.agent-board { overflow: hidden; }
.agent-board table { min-width: 480px; }
.thesis-panel { border-top: 1px solid var(--gold-line); margin-top: 6px; }
.thesis-border { border-left: 3px solid rgba(212, 167, 63, 0.55); background: linear-gradient(90deg, rgba(212, 167, 63, 0.08), transparent 32%); }
.mini-head { padding: 18px 22px 8px; }
.mini-head h3 { margin: 0; font-family: "Cinzel", Georgia, serif; font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase; }
.compact-feed { padding-top: 10px; max-height: 420px; }
.thesis-item { border-left-color: var(--gold); }
.wide-feed { max-height: 520px; }
.heartbeat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
.agent-card { padding: 28px; }
.agent-name { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.agent-title-wrap { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.agent-avatar { width: 28px; height: 28px; object-fit: cover; border-radius: 7px; border: 1px solid rgba(212, 167, 63, 0.45); box-shadow: 0 6px 14px rgba(0,0,0,0.34); background: #000; flex: 0 0 auto; }
.agent-name strong {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat {
  padding: 16px;
  border-radius: 3px;
  border: 1px solid var(--stone-edge);
  background: linear-gradient(180deg, rgba(232, 217, 181, 0.06), rgba(0, 0, 0, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.06);
}
.stat span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.22em; margin-bottom: 8px; font-family: "Cinzel", Georgia, serif; }
.stat b { font-size: 20px; }
.profile-link {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 16px; width: 100%;
  border: 1px solid rgba(212, 167, 63, 0.45);
  border-radius: 3px;
  padding: 13px 14px;
  color: var(--gold-bright);
  background: rgba(212, 167, 63, 0.08);
  text-decoration: none;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}
.profile-link:hover { background: rgba(212, 167, 63, 0.18); }

.section-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 20px; border-bottom: 1px solid var(--gold-line); position: relative; }
/* dentil frieze under section heads */
.section-head::after {
  content: "";
  position: absolute;
  left: 26px; right: 26px; bottom: -1px;
  height: 4px;
  background: repeating-linear-gradient(90deg, rgba(212, 167, 63, 0.35) 0 7px, transparent 7px 15px);
}
.pill {
  border: 1px solid rgba(212, 167, 63, 0.45);
  color: var(--gold);
  padding: 7px 12px;
  border-radius: 2px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: rgba(212, 167, 63, 0.08);
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.1);
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 600px; }
th, td { text-align: left; padding: 15px 22px; border-bottom: 1px solid rgba(212, 167, 63, 0.14); }
th { color: var(--gold); font-size: 10px; text-transform: uppercase; letter-spacing: 0.22em; font-family: "Cinzel", Georgia, serif; }
td { color: var(--travertine); }
.feed { display: grid; gap: 12px; padding: 20px; max-height: 620px; overflow: auto; }
.heartbeat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
.wide-feed { max-height: 520px; }
.item {
  border: 1px solid var(--stone-edge);
  border-left: 3px solid rgba(212, 167, 63, 0.5);
  background: linear-gradient(180deg, rgba(232, 217, 181, 0.05), rgba(0, 0, 0, 0.18));
  border-radius: 3px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.05);
}
.item-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.item-title { font-weight: 700; font-family: "Cinzel", Georgia, serif; letter-spacing: 0.05em; }
.item-meta { color: var(--muted); font-size: 13px; }
.buy, .long { color: var(--laurel); }
.sell, .short { color: var(--loss); }
.watch { color: var(--gold); }
.flat { color: var(--muted); }
.empty { color: var(--muted); padding: 20px; font-style: italic; }
.mint { color: var(--muted); font-size: 12px; word-break: break-all; }

/* ---- footer inscription ---- */
.arena-footer {
  text-align: center;
  padding: 26px 0 34px;
  color: var(--travertine-dim);
  font-family: "Cinzel", Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.arena-footer b { color: var(--gold); font-weight: 700; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .arena-emblem { min-height: 280px; }
  .combat-stage { grid-template-columns: 1fr; }
  .versus { order: 2; }
}
@media (max-width: 820px) {
  .arena-shell { width: min(100% - 22px, 1360px); padding-top: 14px; }
  .two, .agent-columns, .heartbeat-grid { grid-template-columns: 1fr; }
  .hero { padding: 26px 22px; }
  .hero-links { position: static; order: -1; flex-wrap: wrap; }
  .x-link span { display: none; }
  .brand-mark { width: 170px; height: 170px; }
  .laurel { width: 96px; height: 190px; }
  .laurel.left { transform: translateX(-96px); }
  .laurel.right { transform: translateX(96px) scaleX(-1); }
  .stats { grid-template-columns: 1fr; }
  .combat-stage { padding: 20px; }
  .arch { display: none; }
}

/* ================= THE GAMES: animation layer ================= */

/* ---- colosseum gates intro ---- */
body.gates-locked { overflow: hidden; }
.gates { position: fixed; inset: 0; z-index: 60; display: flex; cursor: pointer; }
.gate {
  position: relative;
  flex: 1;
  overflow: hidden;
  background:
    var(--grain),
    repeating-linear-gradient(90deg, #241a0e 0 88px, #2e2214 88px 94px, #1c130a 94px 178px, #292013 178px 184px),
    linear-gradient(180deg, #261b10, #110b06);
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.75);
  transition: transform 1.45s cubic-bezier(0.77, 0, 0.24, 1) 0.55s;
  will-change: transform;
}
/* bronze rivets */
.gate::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle 4px at 50% 50%, rgba(212, 167, 63, 0.4) 0 2.4px, transparent 4px);
  background-size: 118px 142px;
  pointer-events: none;
}
.gate-left { border-right: 2px solid #6f5a35; }
.gate-right { border-left: 2px solid #6f5a35; }
.gate-seal {
  position: absolute;
  top: 50%;
  width: 250px; height: 250px;
  object-fit: cover;
  border-radius: 50%;
  border: 7px solid #cfbd93;
  box-shadow: 0 0 0 3px #1f160d, 0 0 70px rgba(212, 167, 63, 0.4);
  z-index: 2;
}
.seal-left { right: 0; transform: translate(50%, -50%); }
.seal-right { left: 0; transform: translate(-50%, -50%); }
.gate-crack {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(180deg, transparent, rgba(245, 214, 122, 0.95) 30% 70%, transparent);
  opacity: 0.2;
}
.gate-tag {
  position: absolute;
  bottom: 7%; left: 0; right: 0;
  margin: 0;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  z-index: 3;
  animation: tagBreathe 2.4s ease-in-out infinite;
}
@keyframes tagBreathe { 50% { opacity: 0.45; } }
.gates.open .gate-crack { animation: crackGlow 0.7s ease-in forwards; }
@keyframes crackGlow { to { opacity: 1; box-shadow: 0 0 46px 8px rgba(245, 214, 122, 0.55); } }
.gates.open .gate-left { transform: translateX(-102%); }
.gates.open .gate-right { transform: translateX(102%); }
.gates.open .gate-tag { opacity: 0; transition: opacity 0.4s; animation: none; }
.gates.done { opacity: 0; pointer-events: none; transition: opacity 0.45s ease; }

/* ---- hero entrance stagger (fires when body.arena-open lands) ---- */
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } }
@keyframes sealIn { from { opacity: 0; transform: scale(0.72); } }
@keyframes stemDraw { from { stroke-dashoffset: 420; } }
@keyframes leafIn { from { opacity: 0; } }
body.arena-open .hero-copy > * { animation: riseIn 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
body.arena-open .hero-copy > :nth-child(1) { animation-delay: 0.08s; }
body.arena-open .hero-copy > :nth-child(2) { animation-delay: 0.16s; }
body.arena-open .hero-copy > :nth-child(3) { animation-delay: 0.24s; }
body.arena-open .hero-copy > :nth-child(4) { animation-delay: 0.3s; }
body.arena-open .hero-copy > :nth-child(5) { animation-delay: 0.36s; }
body.arena-open .hero-copy > :nth-child(6) { animation-delay: 0.42s; }
body.arena-open .brand-mark { animation: sealIn 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.18) both 0.22s; }
body.arena-open .laurel path { stroke-dasharray: 420; animation: stemDraw 1.1s ease-out both 0.3s; }
body.arena-open .laurel ellipse { animation: leafIn 0.45s ease-out both; }
body.arena-open .score-row { animation: riseIn 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
body.arena-open .score-row:nth-child(1) { animation-delay: 0.5s; }
body.arena-open .score-row:nth-child(2) { animation-delay: 0.62s; }
body.arena-open .score-row:nth-child(n+3) { animation-delay: 0.74s; }

/* ---- scroll reveals ---- */
.reveal-pending { opacity: 0; transform: translateY(28px); }
.reveal-in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }

/* ---- gold glint sweep on the title ---- */
h1 span {
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(255, 248, 220, 0.9) 50%, transparent 58%) no-repeat,
    linear-gradient(180deg, var(--gold-bright) 8%, #c9962e 55%, var(--gold-deep) 96%);
  background-size: 250% 100%, 100% 100%;
  background-position: -160% 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glint 8s ease-in-out infinite 3s;
}
@keyframes glint {
  0% { background-position: -160% 0, 0 0; }
  16% { background-position: 240% 0, 0 0; }
  100% { background-position: 240% 0, 0 0; }
}

/* ---- torches on the colonnade ---- */
.colonnade { position: relative; overflow: visible; }
.torch { position: absolute; top: -36px; width: 18px; height: 66px; z-index: 2; }
.torch-left { left: 5%; }
.torch-right { right: 5%; }
.torch::before {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 9px; height: 46px;
  background: linear-gradient(180deg, #7a5b2b, #3a2a14);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 232, 180, 0.3), 0 6px 14px rgba(0, 0, 0, 0.5);
}
.flame {
  position: absolute;
  left: 50%; top: -6px;
  width: 22px; height: 30px;
  border-radius: 50% 50% 45% 45% / 62% 62% 40% 40%;
  background: radial-gradient(circle at 50% 80%, #fff6cf 0 16%, #f7c34a 42%, #d96c1e 72%, rgba(163, 46, 34, 0) 100%);
  filter: blur(0.5px);
  transform-origin: 50% 100%;
  transform: translateX(-50%);
  animation: flick 0.38s ease-in-out infinite alternate;
}
.flame::after {
  content: "";
  position: absolute;
  inset: -26px;
  background: radial-gradient(circle, rgba(245, 196, 74, 0.35), transparent 62%);
  animation: glowFlick 0.5s ease-in-out infinite alternate;
}
@keyframes flick { from { transform: translateX(-50%) scale(1) rotate(-3deg); } to { transform: translateX(-50%) scale(1.12, 1.24) rotate(3deg); } }
@keyframes glowFlick { from { opacity: 0.7; } to { opacity: 1; } }

/* ---- sword clash every 14s ---- */
.versus { position: relative; }
.sword { display: inline-block; animation: swordIdle 14s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes swordIdle {
  0%, 86% { transform: none; }
  88% { transform: rotate(-10deg) scale(1.08); }
  90% { transform: rotate(7deg) scale(1.05); }
  92% { transform: rotate(-4deg); }
  94%, 100% { transform: none; }
}
.versus::before {
  content: "";
  position: absolute;
  left: 50%; top: 34px;
  width: 9px; height: 9px;
  margin-left: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6cf, #f5d67a 40%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  animation: sparkBurst 14s infinite;
}
@keyframes sparkBurst {
  0%, 87% { opacity: 0; transform: scale(0.4); }
  90% { opacity: 1; transform: scale(3.6); }
  94%, 100% { opacity: 0; transform: scale(0.4); }
}

/* ---- champion system ---- */
.fighter-crown {
  position: absolute;
  top: 10px; right: 12px;
  width: 46px; height: auto;
  opacity: 0;
  transform: scale(0.3) rotate(24deg);
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}
.fighter.is-champion .fighter-crown { animation: crownPop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
@keyframes crownPop { from { opacity: 0; transform: scale(0.2) rotate(38deg); } to { opacity: 1; transform: scale(1) rotate(12deg); } }
.fighter.is-champion { border-color: rgba(212, 167, 63, 0.6); }
.champ-note {
  margin-top: 8px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--gold-bright);
  text-transform: uppercase;
  text-align: center;
  min-height: 14px;
  max-width: 170px;
}
.agent-card.champion {
  border-color: rgba(212, 167, 63, 0.65);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6), 0 0 34px rgba(212, 167, 63, 0.18), inset 0 1px 0 rgba(255, 232, 180, 0.08);
}
.champ-pill { color: #241505 !important; background: linear-gradient(180deg, var(--gold-bright), #c9962e) !important; border-color: #8a5f16 !important; }
.champ-row > span:first-child::before { content: "★ "; color: var(--gold-bright); }

/* ---- fight reactions on new trades ---- */
@keyframes lungeR { 25% { transform: translateX(16px); } 55% { transform: translateX(-4px); } }
@keyframes lungeL { 25% { transform: translateX(-16px); } 55% { transform: translateX(4px); } }
.fighter.lunge-right { animation: lungeR 0.8s ease; }
.fighter.lunge-left { animation: lungeL 0.8s ease; }
@keyframes hitBuy { 0% { box-shadow: inset 0 0 70px rgba(143, 191, 111, 0.5); } }
@keyframes hitSell { 0% { box-shadow: inset 0 0 70px rgba(217, 95, 74, 0.5); } }
.fighter.hit-buy { animation-name: lungeR, hitBuy; animation-duration: 0.8s, 1.1s; }
.fighter.hit-sell { animation-name: lungeR, hitSell; animation-duration: 0.8s, 1.1s; }
.fighter.lunge-left.hit-buy { animation-name: lungeL, hitBuy; }
.fighter.lunge-left.hit-sell { animation-name: lungeL, hitSell; }

/* ---- new feed items ---- */
.item-new { animation: itemNew 1.1s ease both; }
@keyframes itemNew {
  0% { opacity: 0; transform: translateY(-12px); background: rgba(212, 167, 63, 0.24); }
  60% { background: rgba(212, 167, 63, 0.12); }
}

/* ---- number tick flashes ---- */
@keyframes flashUp { 0% { text-shadow: 0 0 16px rgba(143, 191, 111, 0.8); filter: brightness(1.35); } }
@keyframes flashDown { 0% { text-shadow: 0 0 16px rgba(217, 95, 74, 0.8); filter: brightness(1.35); } }
.flash-up { animation: flashUp 1.1s ease; }
.flash-down { animation: flashDown 1.1s ease; }

/* ---- pnl sparklines ---- */
.spark-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--stone-edge);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.16);
  min-height: 36px;
}
.spark { flex: 1; height: 34px; min-width: 0; }
.spark path { fill: none; stroke: var(--laurel); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark.down path { stroke: var(--loss); }
.spark-label { color: var(--muted); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; font-family: "Cinzel", Georgia, serif; white-space: nowrap; }

/* ---- sfx chip ---- */
.sfx-chip { cursor: pointer; }
.sfx-chip[aria-pressed="true"] .ca-value { color: var(--laurel); }

/* ---- brand ring glow pulse ---- */
.brand-mark { animation: ringGlow 7s ease-in-out infinite; }
@keyframes ringGlow {
  0%, 100% { box-shadow: 0 0 0 2px #1f160d, 0 0 0 5px rgba(212, 167, 63, 0.45), 0 24px 70px rgba(0, 0, 0, 0.65); }
  50% { box-shadow: 0 0 0 2px #1f160d, 0 0 0 5px rgba(245, 214, 122, 0.7), 0 0 44px rgba(212, 167, 63, 0.3), 0 24px 70px rgba(0, 0, 0, 0.65); }
}

@media (max-width: 820px) {
  .torch-left { left: 3%; }
  .torch-right { right: 3%; }
  .fighter-crown { width: 38px; }
  .gate-seal { width: 190px; height: 190px; }
}

/* ---- reduced motion: quiet everything ---- */
@media (prefers-reduced-motion: reduce) {
  .gates { display: none; }
  .sandstorm, .flame, .flame::after, .sword, .versus::before, .live-dot, .brand-mark, h1 span { animation: none !important; }
  body.arena-open .hero-copy > *, body.arena-open .brand-mark, body.arena-open .laurel path,
  body.arena-open .laurel ellipse, body.arena-open .score-row,
  .fighter.is-champion .fighter-crown, .item-new, .fighter { animation: none !important; }
  .fighter.is-champion .fighter-crown { opacity: 1; transform: scale(1) rotate(12deg); }
  .reveal-pending { opacity: 1; transform: none; }
}
