/* Public Demo Match Engine stylesheet.
   This file is intentionally separate from dev-engine.css so the public showcase
   can evolve independently from the admin/internal engine view. */
:root {
  --demo-bg-1: #030304;
  --demo-bg-2: #14070b;
  --demo-panel: rgba(14, 12, 14, 0.92);
  --demo-panel-soft: rgba(26, 14, 20, 0.82);
  --demo-border: rgba(148, 163, 184, 0.3);
  --demo-border-strong: rgba(220, 38, 38, 0.56);
  --demo-text: #e5e7eb;
  --demo-muted: #b1bac8;
  --demo-accent: #dc2626;
  --demo-accent-2: #cbd5e1;
  --demo-warn: #f59e0b;
  --demo-ok: #22c55e;
  --demo-err: #ef4444;
}

html,
body {
  min-height: 100%;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body.demo-engine-public-page {
  margin: 0;
  color: var(--demo-text);
  font-family: var(--demo-page-font-family, Inter, system-ui, sans-serif);
  background-color: var(--demo-page-bg-color, #030304);
  background-image: var(--demo-page-background-image, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  line-height: 1.4;
}

body.demo-engine-public-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.78)),
    radial-gradient(circle at top center, rgba(0, 0, 0, 0.36), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.demo-engine-public-page a {
  color: inherit;
  text-decoration: none;
}

.demo-engine-public-page .btn,
.demo-engine-public-page button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.72rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 10, 14, 0.92);
  color: #f8fafc;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.demo-engine-public-page .btn:hover,
.demo-engine-public-page button:hover {
  transform: translateY(-1px);
  border-color: rgba(220, 38, 38, 0.34);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.demo-engine-public-page .btn.primary,
.demo-engine-public-page button.primary {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(127, 29, 29, 0.96));
  border-color: rgba(220, 38, 38, 0.5);
}

.flash {
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.flash-error {
  background: rgba(127, 29, 29, 0.4);
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

.flash-success {
  background: rgba(20, 83, 45, 0.38);
  border: 1px solid rgba(74, 222, 128, 0.5);
  color: #bbf7d0;
}

.demo-engine-public-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(100%, 1760px);
  margin: 0 auto;
  padding: 0 0 1.5rem;
}

.demo-engine-public-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 0 1rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(5, 7, 12, 0.96);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.demo-engine-public-logo {
  display: grid;
  place-items: center;
  width: 124px;
  min-height: 68px;
  padding: 0;
  flex: 0 0 auto;
}

.demo-engine-public-logo img {
  max-width: 100%;
  max-height: 68px;
  object-fit: contain;
}

.demo-engine-public-title {
  min-width: 0;
  display: none;
}

.demo-engine-public-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f8fafc;
  text-shadow: 0 0 18px rgba(226, 232, 240, 0.12);
}

.demo-engine-public-title p {
  margin: 0.45rem 0 0;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.demo-engine-public-nav,
.demo-engine-public-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.demo-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.demo-nav-icon {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  line-height: 1;
}

.demo-engine-public-nav {
  flex: 1 1 auto;
  align-items: center;
}

.demo-engine-public-actions {
  flex: 0 0 auto;
}

.demo-engine-public-actions:empty {
  display: none;
}

.demo-engine-public-main {
  width: 100%;
  padding: 0 1rem;
  overflow: visible;
}

.demo-engine-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 0%, rgba(220, 38, 38, 0.12), transparent 35%),
    linear-gradient(160deg, rgba(14, 10, 12, 0.96), rgba(8, 9, 12, 0.95));
}

.demo-engine-hero-copy {
  max-width: 850px;
}

.demo-engine-hero-copy-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.demo-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: #fca5a5;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 800;
}

.demo-engine-hero h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1.08;
  color: #f8fafc;
}

.demo-engine-hero p {
  margin: 0.45rem 0 0;
  max-width: 74ch;
  color: #cbd5e1;
  line-height: 1.45;
  font-size: 0.98rem;
}

.demo-engine-hero-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
}

.demo-engine-hero-stream {
  margin-top: 0.1rem;
}

.demo-accordion-body {
  padding: 0;
  color: #cbd5e1;
}

.demo-accordion-body p {
  margin: 0 0 0.75rem;
}

.demo-modal[hidden] {
  display: none !important;
}

.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 35;
}

.demo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(6px);
}

.demo-modal-dialog {
  position: relative;
  width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  overflow: auto;
  margin: 1.5rem auto;
  padding: 1.1rem 1.15rem 1rem;
  border: 1px solid rgba(220, 38, 38, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at 85% 0%, rgba(220, 38, 38, 0.1), transparent 38%),
    linear-gradient(165deg, rgba(12, 10, 12, 0.98), rgba(8, 9, 12, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.demo-modal-dialog h3 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  color: #f8fafc;
}

.demo-modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin-left: auto;
  border: 1px solid rgba(220, 38, 38, 0.34);
  background: rgba(10, 10, 13, 0.94);
}

.demo-engine-setup-shell {
  padding: 1.1rem;
}

.dev-hint-bar {
  margin: 0 0 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-left: 4px solid var(--demo-accent);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(127, 29, 29, 0.28), rgba(9, 9, 11, 0.9)),
    radial-gradient(circle at 10% 0%, rgba(220, 38, 38, 0.2), transparent 45%);
  color: #e2e8f0;
  line-height: 1.52;
}

.dev-hint-bar strong {
  color: #ffffff;
}

.demo-modules-card,
.dev-engine-card,
.engine-updates-card {
  margin-bottom: 1rem;
}

.demo-modules-card,
.engine-updates-card {
  border: 1px solid rgba(148, 163, 184, 0.42);
  background:
    radial-gradient(circle at 80% -5%, rgba(220, 38, 38, 0.14), transparent 42%),
    linear-gradient(165deg, rgba(12, 10, 12, 0.95), rgba(8, 9, 12, 0.95));
}

.dev-engine-card {
  border: 1px solid var(--demo-border-strong);
  background:
    radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.2), transparent 38%),
    linear-gradient(165deg, var(--demo-bg-2), var(--demo-bg-1) 65%);
}

.dev-engine-card .card-head,
.demo-modules-card .card-head,
.engine-updates-card .card-head {
  background: linear-gradient(180deg, #ffffff 0%, #d1d5db 54%, #9ca3af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 14px rgba(148, 163, 184, 0.18);
}

.dev-engine-card .muted,
.demo-modules-card .muted,
.engine-updates-card .muted {
  color: var(--demo-muted);
}

.module-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.module-item {
  --module-accent: rgba(220, 38, 38, 0.42);
  --module-accent-soft: rgba(220, 38, 38, 0.14);
  --module-accent-strong: #fecaca;
  border: 1px solid var(--demo-border);
  border-radius: 12px;
  padding: 0.8rem;
  background:
    linear-gradient(155deg, rgba(19, 9, 12, 0.88), rgba(8, 8, 10, 0.94)),
    linear-gradient(90deg, var(--module-accent-soft), transparent 48%);
  box-shadow: inset 0 0 0 1px var(--module-accent-soft);
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.module-item p {
  margin: 0.45rem 0;
}

.module-item small {
  color: var(--demo-muted);
}

.module-head strong,
.module-toggle-head strong {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.module-glyph {
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 8px;
  background: var(--module-accent-soft, rgba(220, 38, 38, 0.14));
  border: 1px solid var(--module-accent, rgba(220, 38, 38, 0.28));
  color: var(--module-accent-strong, #fecaca);
  font-size: 0.82rem;
  line-height: 1;
}

.module-status {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.module-status.on {
  color: var(--module-accent-strong, #dcfce7);
  background: var(--module-accent-soft, rgba(34, 197, 94, 0.18));
  border: 1px solid var(--module-accent, rgba(34, 197, 94, 0.5));
}

.module-status.off {
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.5);
}

#dev-engine-form {
  display: grid;
  gap: 0.9rem;
}

#dev-engine-form label {
  color: var(--demo-text);
}

#dev-engine-form input,
#dev-engine-form select {
  width: 100%;
  margin-top: 0.32rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(12, 9, 11, 0.96), rgba(10, 10, 13, 0.96));
  color: var(--demo-text);
  padding: 0.62rem 0.7rem;
  box-sizing: border-box;
}

#dev-engine-form input:focus,
#dev-engine-form select:focus {
  outline: none;
  border-color: rgba(220, 38, 38, 0.88);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.22);
}

.demo-duel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.1rem;
}

.duel-corner {
  min-width: 0;
  display: grid;
  justify-items: center;
}

.duel-vs {
  align-self: center;
  justify-self: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #e2e8f0;
  background: linear-gradient(145deg, rgba(220, 38, 38, 0.42), rgba(24, 24, 27, 0.28));
  border: 1px solid rgba(220, 38, 38, 0.62);
  border-radius: 999px;
  padding: 0.45rem 0.72rem;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.02), 0 0 18px rgba(220, 38, 38, 0.18);
}

.picker-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.fighter-showcase-card {
  border: 1px solid var(--demo-border);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 0%, rgba(220, 38, 38, 0.16), transparent 42%),
    linear-gradient(170deg, rgba(12, 9, 11, 0.95), rgba(7, 8, 10, 0.95));
  padding: 1.15rem;
  display: grid;
  gap: 0.8rem;
  min-height: 0;
  width: 100%;
  max-width: 760px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.setup-profile-top {
  display: block;
}

.fighter-showcase-card.empty {
  display: grid;
  place-items: center;
  color: var(--demo-muted);
}

.setup-hero {
  border-radius: 18px;
  background: rgba(16, 16, 19, 0.84);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.44);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.28) inset;
  padding: 0.8rem;
}

.duel-corner:last-child .setup-hero {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.28) inset;
}

.setup-hero-inner {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74)),
    var(--fighter-bg-image, none),
    rgba(15, 23, 42, 0.8);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
}

.setup-avatar {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.setup-avatar-fallback {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, rgba(185, 28, 28, 0.5), rgba(39, 39, 42, 0.65));
}

.setup-profile-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.duel-corner:last-child .setup-profile-grid {
  grid-template-columns: minmax(0, 1fr) 190px;
}

.duel-corner:last-child .setup-hero {
  order: 2;
}

.setup-profile-body {
  display: grid;
  gap: 0.6rem;
}

.duel-corner:first-child .setup-profile-body {
  border-left: 3px solid rgba(220, 38, 38, 0.42);
  padding-left: 0.7rem;
}

.duel-corner:last-child .setup-profile-body {
  border-right: 3px solid rgba(34, 197, 94, 0.42);
  padding-right: 0.7rem;
}

.fighter-name {
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.setup-nameplate {
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(17, 10, 13, 0.94), rgba(9, 10, 12, 0.94));
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.5rem;
}

.fighter-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.fighter-nick {
  margin-top: 0.18rem;
  font-size: 0.92rem;
  color: #dbe9ff;
  opacity: 0.84;
}

.setup-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.strip-item {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: rgba(8, 13, 24, 0.82);
  padding: 0.45rem 0.5rem;
  text-align: center;
}

.strip-item b {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fca5a5;
}

.strip-item i {
  display: block;
  margin-top: 0.16rem;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--demo-text);
}

.fighter-meta {
  color: var(--demo-muted);
  font-size: 0.98rem;
}

.fighter-overall-inline {
  text-align: right;
  flex: 0 0 auto;
}

.fighter-overall-inline strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--brand-accent-start, #e2e8f0);
  text-shadow: 0 0 14px var(--brand-accent-soft, rgba(248, 250, 252, 0.18));
}

.fighter-overall-inline span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--demo-muted);
}

.setup-stars {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.setup-stars .star-unit {
  position: relative;
  display: inline-block;
  width: 0.92em;
  height: 0.92em;
  line-height: 1;
  font-size: 1.02rem;
}

.brand-fighter-card .setup-stars .star-front {
  position: absolute;
  inset: 0;
  color: var(--brand-accent-start, var(--demo-accent));
  text-shadow: 0 0 8px var(--brand-accent-soft, rgba(239, 68, 68, 0.24));
  clip-path: inset(0 calc(100% - var(--fill, 0%)) 0 0);
}

.brand-fighter-card .setup-stars .star-back {
  position: absolute;
  inset: 0;
  color: rgba(148, 163, 184, 0.32);
}

.setup-stars b {
  margin-left: 0.36rem;
  font-size: 0.98rem;
  color: var(--brand-accent-start, var(--demo-text));
}

.fighter-moves {
  font-size: 0.94rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0.8rem 0.85rem;
  background: rgba(7, 8, 10, 0.56);
}

.fighter-moves strong {
  display: block;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #cbd5e1;
  font-size: 0.74rem;
}

.fighter-moves span {
  color: var(--brand-accent-start, #fca5a5);
  font-weight: 700;
}

.setup-finisher-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.setup-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
}

.setup-stats-grid-wide {
  padding-top: 0.15rem;
}

.setup-stat {
  display: grid;
  grid-template-columns: 2.25rem 1fr 2.2rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.setup-stat-bar {
  height: 10px;
  background: rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  overflow: hidden;
}

.setup-stat-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #b91c1c);
}

.demo-settings-card {
  margin-top: 0.2rem;
  border: 1px solid rgba(220, 38, 38, 0.36);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(17, 10, 13, 0.92), rgba(9, 10, 12, 0.95));
}

.demo-setup-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr) minmax(280px, 0.9fr);
  gap: 0.9rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.demo-settings-card .row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0.5rem 0;
}

.demo-settings-card label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.module-inline-list {
  display: grid;
  gap: 0.55rem;
  width: 100%;
}

.module-inline-row {
  --module-accent: rgba(220, 38, 38, 0.42);
  --module-accent-soft: rgba(220, 38, 38, 0.14);
  --module-accent-strong: #fecaca;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--module-accent, rgba(148, 163, 184, 0.16));
  border-radius: 12px;
  background:
    linear-gradient(155deg, rgba(14, 12, 14, 0.92), rgba(8, 9, 12, 0.92)),
    linear-gradient(90deg, var(--module-accent-soft), transparent 58%);
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px var(--module-accent-soft);
}

.module-inline-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.module-inline-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #f8fafc;
  line-height: 1.3;
  flex-wrap: wrap;
}

.module-inline-copy small {
  color: #cbd5e1;
  font-size: 0.84rem;
  line-height: 1.4;
  display: block;
}

.module-inline-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.module-inline-controls input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--module-accent-solid, #22c55e);
  display: block;
}

.module-key-weapon_chance {
  --module-accent: rgba(245, 158, 11, 0.5);
  --module-accent-soft: rgba(180, 83, 9, 0.2);
  --module-accent-strong: #fde68a;
  --module-accent-solid: #f59e0b;
}

.module-key-crowd_momentum {
  --module-accent: rgba(6, 182, 212, 0.5);
  --module-accent-soft: rgba(8, 145, 178, 0.18);
  --module-accent-strong: #a5f3fc;
  --module-accent-solid: #06b6d4;
}

.module-key-ref_mishap {
  --module-accent: rgba(139, 92, 246, 0.5);
  --module-accent-soft: rgba(76, 29, 149, 0.2);
  --module-accent-strong: #ddd6fe;
  --module-accent-solid: #8b5cf6;
}

.module-key-interruption_tease {
  --module-accent: rgba(244, 63, 94, 0.5);
  --module-accent-soft: rgba(159, 18, 57, 0.2);
  --module-accent-strong: #fecdd3;
  --module-accent-solid: #f43f5e;
}

.module-key-amazing_comeback {
  --module-accent: rgba(34, 197, 94, 0.5);
  --module-accent-soft: rgba(20, 83, 45, 0.2);
  --module-accent-strong: #bbf7d0;
  --module-accent-solid: #22c55e;
}

.module-key-force_post_match_conflict {
  --module-accent: rgba(249, 115, 22, 0.5);
  --module-accent-soft: rgba(154, 52, 18, 0.22);
  --module-accent-strong: #fdba74;
  --module-accent-solid: #f97316;
}

.demo-summary-card {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(17, 10, 13, 0.92), rgba(9, 10, 12, 0.95));
}

.demo-summary-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.demo-summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.demo-summary-list div:last-child {
  border-bottom: 0;
}

.demo-summary-list dt {
  color: #b1bac8;
}

.demo-summary-list dd {
  margin: 0;
  color: #f8fafc;
  font-weight: 700;
  text-align: right;
}

.preflight {
  margin: 0.3rem 0 0;
  padding: 0.58rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(13, 13, 16, 0.68);
  font-weight: 700;
}

.preflight-warn {
  color: #fcd34d;
}

.preflight-ok {
  color: #86efac;
}

.preflight-error {
  color: #fca5a5;
}

.launch-btn {
  width: min(100%, 420px);
  margin-top: 0.15rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(220, 38, 38, 0.65);
  border-radius: 12px;
  background: linear-gradient(130deg, rgba(220, 38, 38, 0.92), rgba(127, 29, 29, 0.94));
  color: #f1f5f9;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 22px rgba(127, 29, 29, 0.34);
}

.demo-engine-launch-row {
  display: flex;
  justify-content: center;
}

.launch-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.engine-updates-body .updates-block {
  margin: 0.55rem 0 0.9rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--demo-border);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(17, 10, 13, 0.76), rgba(8, 9, 12, 0.8));
}

.engine-updates-body .updates-block h2 {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  color: #e2e8f0;
}

.engine-updates-body .updates-block ul {
  margin: 0;
  padding-left: 1.1rem;
}

.engine-updates-body .updates-block li {
  margin: 0.2rem 0;
  color: #d6deea;
}

.match-viewer-shell {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background:
    radial-gradient(circle at 50% -10%, rgba(239, 68, 68, 0.3), transparent 46%),
    linear-gradient(165deg, rgba(16, 6, 10, 0.96), rgba(4, 8, 22, 0.96));
}

.demo-engine-public-page .match-viewer-shell {
  min-height: calc(100vh - 15.5rem);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.demo-engine-public-page .match-viewer-shell.report-open {
  min-height: auto;
}

.demo-steel-text {
  background: linear-gradient(180deg, #ffffff 0%, #d1d5db 54%, #9ca3af 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 14px rgba(226, 232, 240, 0.16);
}

.viewer-report-head {
  margin: 0.35rem 0 1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.viewer-report-head strong {
  font-size: 1.45rem;
  color: #e2e8f0;
  text-shadow: 0 0 14px rgba(148, 163, 184, 0.45);
}

.viewer-report-head .rope {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), #ef4444, rgba(239, 68, 68, 0.1));
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.arena {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(250px, 300px);
  gap: 1rem;
  align-items: start;
  overflow: visible;
}

.demo-engine-public-page .arena {
  flex: 1 1 auto;
  align-items: stretch;
}

.fighter-panel,
.stream-panel {
  border: 1px solid var(--demo-border);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(8, 12, 24, 0.42), rgba(4, 8, 20, 0.9));
  padding: 0.9rem;
  box-shadow: inset 0 0 0 1px var(--fighter-accent, rgba(239, 68, 68, 0.32));
}

.demo-engine-public-page .fighter-panel,
.demo-engine-public-page .stream-panel {
  height: 100%;
}

.demo-engine-public-page .fighter-panel {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.demo-engine-public-page .stream-panel {
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.stream-live-head {
  position: sticky;
  top: 1rem;
  z-index: 8;
}

.stream-fighter-head {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  padding: 0.9rem 0.9rem 1rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.94)),
    var(--fighter-bg-image, none);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fighter-panel h3 {
  margin: 0;
  text-align: center;
}

.stream-fighter-avatar {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
  border: 2px solid var(--fighter-accent, rgba(239, 68, 68, 0.8));
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.fighter-nick-meta {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.stream-overall-band {
  margin: 0.2rem 0 0.75rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.65);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem;
}

.stream-overall-value {
  font-size: 2.35rem;
  line-height: 0.95;
  font-weight: 900;
  color: var(--brand-accent-start, #ef4444);
  text-align: left;
  text-shadow: 0 0 14px var(--brand-accent-soft, rgba(239, 68, 68, 0.24));
}

.stream-overall-value span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.stream-overall-stars {
  justify-self: end;
}

.brand-fighter-card .viewer-stars .star-front,
.brand-fighter-card .fighter-finisher strong {
  color: var(--brand-accent-start, #ef4444);
}

.brand-fighter-card .strip-item b,
.brand-fighter-card .setup-stars b,
.brand-fighter-card .fighter-moves span {
  color: var(--brand-accent-start, #fca5a5);
}

.brand-fighter-card {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74)),
    linear-gradient(180deg, var(--brand-card-background, rgba(8, 13, 24, 0.92)), rgba(2, 6, 23, 0.94));
}

.brand-fighter-card .bar.hp .fill,
.brand-fighter-card .bar.sta .fill,
.brand-fighter-card .bar.mom .fill,
.brand-fighter-card .setup-stat-bar i {
  background: linear-gradient(90deg, var(--brand-accent-start, #ef4444), var(--brand-accent-end, #7f1d1d));
}

.stream-fighter-head {
  position: relative;
}

.stream-avatar-wrap {
  position: relative;
  width: min(100%, 220px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
}

.viewer-stars {
  display: flex;
  align-items: center;
  gap: 0.16rem;
}

.viewer-stars .star-unit {
  position: relative;
  display: inline-block;
  width: 0.92em;
  height: 0.92em;
  line-height: 1;
  font-size: 1.02rem;
}

.viewer-stars .star-back {
  position: absolute;
  inset: 0;
  color: rgba(148, 163, 184, 0.35);
}

.viewer-stars .star-front {
  position: absolute;
  inset: 0;
  color: #ef4444;
  clip-path: inset(0 calc(100% - var(--fill, 0%)) 0 0);
}

.viewer-stars b {
  margin-left: 0.3rem;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.stream-core-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.core-stat {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.32rem 0.35rem;
  background: rgba(2, 6, 23, 0.62);
  text-align: center;
}

.core-stat span {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.core-stat b {
  display: block;
  margin-top: 0.05rem;
  font-size: 0.96rem;
  color: #f8fafc;
}

.bar-wrap {
  display: grid;
  grid-template-columns: 4.4rem 1fr 3.5rem;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.52rem;
  font-size: 0.9rem;
}

.bar-wrap.momentum-wrap {
  grid-template-columns: 4.4rem 1fr 3.5rem;
}

.bar {
  width: 100%;
  height: 15px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.fill {
  height: 100%;
  width: 100%;
  transition: width 160ms linear;
  position: relative;
}

.fill.hp {
  background: linear-gradient(90deg, #dc2626, #ef4444 55%, #f87171);
}

.fill.sta {
  background: linear-gradient(90deg, #0ea5e9, #22d3ee 60%, #67e8f9);
}

.fill.mom {
  background: linear-gradient(90deg, #f59e0b, #f97316 55%, #ef4444);
}

.fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 52%);
}

.fill.is-low {
  filter: saturate(1.15) brightness(1.05);
}

.fill.is-critical {
  filter: saturate(1.3) brightness(1.1);
  animation: hpBlink 0.7s linear infinite;
}

@keyframes hpBlink {
  0% { opacity: 1; }
  50% { opacity: 0.58; }
  100% { opacity: 1; }
}

.totals {
  margin: 0.65rem 0 0;
  display: grid;
  gap: 0.35rem;
}

.totals div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.2rem;
}

.totals dt {
  color: #cbd5e1;
}

.totals dd {
  margin: 0;
  font-weight: 800;
  color: #f8fafc;
}

.unique-moves {
  margin-top: 0.8rem;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 6, 23, 0.56);
}

.unique-moves strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-accent-start, #fca5a5);
}

.unique-moves ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.34rem;
}

.unique-moves li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.88rem;
  color: #e2e8f0;
}

.unique-moves li b {
  flex: 0 0 auto;
  min-width: 2.35rem;
  text-align: center;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand-accent-start, #fca5a5);
}

.unique-moves li.move-kind-finisher {
  padding: 0.34rem 0.45rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.55), rgba(88, 28, 135, 0.34));
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.unique-moves li.move-kind-finisher b {
  background: rgba(127, 29, 29, 0.72);
  color: #fecaca;
}

.unique-moves li.move-kind-signature {
  padding: 0.3rem 0.4rem;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.demo-move-library-page {
  --moves-text: #e5e7eb;
  --moves-box: rgba(2, 6, 23, 0.78);
  --moves-box-text: #f8fafc;
}

.demo-move-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.demo-move-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62));
  color: #e5e7eb;
}

.demo-move-copy h3 {
  margin: 0 0 10px;
  color: #f8fafc;
}

.demo-move-pill-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.demo-move-pill {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.72);
  display: grid;
  gap: 4px;
}

.demo-move-pill span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
}

.demo-move-pill strong {
  color: #f8fafc;
  font-size: 14px;
}

.fighter-finisher {
  margin: 0.28rem 0;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.stream-controls {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.stream-live-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 150px;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.52));
}

.stream-live-head span {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.stream-live-head strong {
  display: block;
  margin-top: 0.16rem;
  color: #f8fafc;
  font-size: 1rem;
}

.stream-live-momentum {
  min-width: 0;
}

.live-momentum-rail {
  position: relative;
  height: 14px;
  margin-top: 0.28rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.live-momentum-fill {
  position: absolute;
  top: 0;
  bottom: 0;
}

.live-momentum-fill-a {
  left: 0;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.88), rgba(96, 165, 250, 0.88));
}

.live-momentum-fill-b {
  right: 0;
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.88), rgba(220, 38, 38, 0.88));
}

.live-momentum-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 10px;
  margin-left: -5px;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: 0 0 12px rgba(226, 232, 240, 0.5);
}

.stream-controls button,
.stream-controls .btn {
  margin: 0;
}

.viewer-feed-frame {
  border: 1px solid rgba(239, 68, 68, 0.38);
  border-radius: 16px;
  padding: 0.45rem;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.07), rgba(17, 24, 39, 0.32));
}

.demo-engine-public-page .viewer-feed-frame {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.stream-log {
  min-height: 360px;
  max-height: 620px;
  overflow: auto;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  line-height: 1.35;
}

.demo-engine-public-page .stream-log {
  flex: 1 1 auto;
  min-height: 100%;
  max-height: none;
}

.log-row {
  margin: 0 0 0.42rem;
  padding: 0.46rem 0.54rem;
  border-radius: 12px;
  border-left: 4px solid transparent;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: grid;
  grid-template-columns: 2.2rem 2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.log-row .event-turn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  font-weight: 800;
  color: #e2e8f0;
}

.log-row .event-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.86rem;
  line-height: 1;
}

.log-row .event-text {
  display: block;
  min-width: 0;
}

.event-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.1rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-pill.damage-low {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.46);
  background: rgba(20, 83, 45, 0.32);
}

.event-pill.damage-mid {
  color: #5eead4;
  border-color: rgba(94, 234, 212, 0.46);
  background: rgba(17, 94, 89, 0.32);
}

.event-pill.damage-high {
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.46);
  background: rgba(113, 63, 18, 0.3);
}

.event-pill.damage-heavy {
  color: #fda4af;
  border-color: rgba(253, 164, 175, 0.46);
  background: rgba(127, 29, 29, 0.32);
}

.event-pill.damage-epic {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.5);
  background: rgba(88, 28, 135, 0.34);
}

.log-row .damage-amount {
  font-weight: 900;
  padding: 0 1px;
}

.log-row .damage-amount.damage-low {
  color: #86efac;
}

.log-row .damage-amount.damage-mid {
  color: #5eead4;
}

.log-row .damage-amount.damage-high {
  color: #fde68a;
}

.log-row .damage-amount.damage-heavy {
  color: #fda4af;
}

.log-row .damage-amount.damage-epic {
  color: #c4b5fd;
}

.log-row.narration {
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.52);
  border-left-color: #93c5fd;
}

.log-row.commentary {
  color: #fee2e2;
  background: rgba(127, 29, 29, 0.3);
  border-left-color: #ef4444;
}

.log-row.system {
  color: #bfdbfe;
  background: rgba(3, 105, 161, 0.24);
  border-left-color: #38bdf8;
}

.log-row.event-weapon {
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.32), rgba(15, 23, 42, 0.45));
}

.log-row.event-weapon .event-icon {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.55);
}

.log-row.event-weapon .event-pill,
.log-row.event-signature .event-pill {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.58);
}

.log-row.event-crowd {
  border-left-color: #06b6d4;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.35), rgba(15, 23, 42, 0.44));
}

.log-row.event-crowd .event-icon {
  color: #a5f3fc;
  border: 1px solid rgba(6, 182, 212, 0.55);
}

.log-row.event-crowd .event-pill {
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.55);
}

.log-row.event-ref {
  border-left-color: #8b5cf6;
  background: linear-gradient(90deg, rgba(76, 29, 149, 0.34), rgba(15, 23, 42, 0.44));
}

.log-row.event-ref .event-icon {
  color: #ddd6fe;
  border: 1px solid rgba(139, 92, 246, 0.55);
}

.log-row.event-ref .event-pill {
  color: #ddd6fe;
  border-color: rgba(139, 92, 246, 0.55);
}

.log-row.event-interruption {
  border-left-color: #f43f5e;
  background: linear-gradient(90deg, rgba(159, 18, 57, 0.34), rgba(15, 23, 42, 0.44));
}

.log-row.event-interruption .event-icon {
  color: #fecdd3;
  border: 1px solid rgba(244, 63, 94, 0.55);
}

.log-row.event-interruption .event-pill {
  color: #fecdd3;
  border-color: rgba(244, 63, 94, 0.55);
}

.log-row.event-setup {
  border-left-color: #38bdf8;
  background: linear-gradient(90deg, rgba(8, 47, 73, 0.36), rgba(15, 23, 42, 0.46));
}

.log-row.event-setup .event-icon {
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.55);
}

.log-row.event-setup .event-pill {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.55);
}

.log-row.event-signature {
  border-left-color: #f59e0b;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.38), rgba(15, 23, 42, 0.46));
}

.log-row.event-signature .event-icon {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.58);
}

.log-row.event-finisher {
  border-left-color: #a855f7;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.38), rgba(15, 23, 42, 0.46));
}

.log-row.event-finisher .event-icon {
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.58);
}

.log-row.event-finisher .event-pill {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.58);
}

.log-row.event-comeback {
  border-left-color: #22c55e;
  background: linear-gradient(90deg, rgba(20, 83, 45, 0.38), rgba(15, 23, 42, 0.46));
}

.log-row.event-comeback .event-icon {
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.58);
}

.log-row.event-comeback .event-pill {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.58);
}

.log-row.commentary .event-pill {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
}

.log-row.system .event-pill {
  color: #93c5fd;
  border-color: rgba(56, 189, 248, 0.45);
}

.log-row.narration .event-pill {
  color: #cbd5e1;
}

.log-row .event-pill.damage-low {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.46);
  background: rgba(20, 83, 45, 0.32);
}

.log-row .event-pill.damage-mid {
  color: #5eead4;
  border-color: rgba(94, 234, 212, 0.46);
  background: rgba(17, 94, 89, 0.32);
}

.log-row .event-pill.damage-high {
  color: #fde68a;
  border-color: rgba(253, 230, 138, 0.46);
  background: rgba(113, 63, 18, 0.3);
}

.log-row .event-pill.damage-heavy {
  color: #fda4af;
  border-color: rgba(253, 164, 175, 0.46);
  background: rgba(127, 29, 29, 0.32);
}

.log-row .event-pill.damage-epic {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.5);
  background: rgba(88, 28, 135, 0.34);
}

.stream-result {
  margin-top: 0.65rem;
}

.stream-result.done {
  color: #86efac;
  font-weight: 700;
}

.match-report {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 220px 220px minmax(0, 1fr);
  gap: 0.8rem;
}

.demo-engine-public-page .match-report {
  flex: 0 0 auto;
}

.report-card {
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.88), rgba(30, 10, 20, 0.85));
  padding: 0.75rem;
}

.report-card h3 {
  margin: 0 0 0.45rem;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-card p {
  margin: 0;
  padding: 0.35rem 0;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.report-card strong {
  color: #fca5a5;
}

.timer-card strong,
.momentum-card strong {
  font-size: 1.02rem;
}

.momentum-card #summary-edge-value {
  color: #60a5fa;
  font-size: 1.32rem;
}

@media (max-width: 1200px) {
  .demo-engine-public-page .match-viewer-shell {
    min-height: auto;
  }

  .demo-engine-public-head {
    flex-wrap: wrap;
  }

  .demo-engine-public-nav,
  .demo-engine-public-actions {
    justify-content: center;
  }

  .demo-engine-hero {
    flex-direction: column;
  }

  .demo-engine-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .demo-setup-lower-grid {
    grid-template-columns: 1fr;
  }

  .arena {
    grid-template-columns: 1fr;
  }

  .stream-live-head,
  .match-report {
    grid-template-columns: 1fr;
  }

  .demo-engine-public-page .fighter-panel {
    position: static;
  }

  .stream-log {
    min-height: 280px;
    max-height: 460px;
  }
}

@media (max-width: 980px) {
  .demo-engine-public-shell {
    padding: 0 0 1rem;
  }

  .demo-duel-grid {
    grid-template-columns: 1fr;
  }

  .demo-engine-public-page .stream-log {
    min-height: 280px;
  }

  .stream-live-head {
    grid-template-columns: 1fr;
  }

  .stream-fighter-avatar {
    width: 100%;
    height: 100%;
  }

  .stream-avatar-wrap {
    width: min(100%, 190px);
  }

  .duel-vs {
    display: none;
  }

  .demo-settings-card .row {
    grid-template-columns: 1fr;
  }

  .setup-stats-grid {
    grid-template-columns: 1fr;
  }

  .setup-stat-strip {
    grid-template-columns: 1fr;
  }

  .setup-profile-grid,
  .duel-corner:last-child .setup-profile-grid {
    grid-template-columns: 1fr;
  }

  .duel-corner:last-child .setup-hero {
    order: 0;
  }

  .setup-finisher-row {
    grid-template-columns: 1fr;
  }

  .module-inline-row {
    grid-template-columns: 1fr;
  }

  .module-inline-controls {
    justify-content: space-between;
  }

  .stream-core-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fighter-showcase-card {
    width: min(100%, 520px);
  }

  .match-report {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .stream-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stream-controls .btn,
  .stream-controls button {
    width: 100%;
  }

  .stream-log {
    min-height: 240px;
    padding: 0.5rem;
    font-size: 0.84rem;
  }

  .log-row {
    grid-template-columns: 1.8rem 1.8rem minmax(0, 1fr);
    gap: 0.45rem;
  }

  .event-pill {
    grid-column: 3;
    justify-self: start;
    margin-top: 0.15rem;
  }

  .stream-fighter-avatar {
    width: 100%;
    height: 100%;
  }

  .stream-avatar-wrap {
    width: min(100%, 170px);
  }

  .stream-core-stats {
    grid-template-columns: 1fr 1fr;
  }

  .bar-wrap,
  .bar-wrap.momentum-wrap {
    grid-template-columns: 4rem 1fr 3rem;
    font-size: 0.84rem;
  }

}
