:root {
  color-scheme: dark;
  --bg: #100f16;
  --panel: #1a1723;
  --panel-strong: #242030;
  --ink: #f7f0df;
  --muted: #aaa0ba;
  --line: #3d354d;
  --cyan: #56d8d8;
  --coral: #f0654f;
  --gold: #f0b74b;
  --green: #76d672;
  --violet: #9b7bf4;
  --shadow: rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 4%, rgba(240, 183, 75, 0.10), transparent 24rem),
    radial-gradient(circle at 74% 0%, rgba(86, 216, 216, 0.08), transparent 28rem),
    var(--bg);
  color: var(--ink);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.72; }

.app-shell {
  width: min(1540px, calc(100vw - 96px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 20px;
}

.brand-lockup,
.topbar-actions,
.report-actions,
.featured-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-actions,
.report-actions {
  flex-wrap: wrap;
}

.featured-head {
  justify-content: space-between;
  margin: 16px 0 8px;
}

.pixel-mark {
  display: grid;
  grid-template-columns: repeat(2, 16px);
  grid-template-rows: repeat(2, 16px);
  gap: 4px;
  padding: 7px;
  background: #05050a;
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--coral);
}

.pixel-mark span:nth-child(1) { background: var(--cyan); }
.pixel-mark span:nth-child(2) { background: var(--gold); }
.pixel-mark span:nth-child(3) { background: var(--violet); }
.pixel-mark span:nth-child(4) { background: var(--green); }

.eyebrow,
.mini-label {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 0.95; }
h2 { margin-bottom: 0; font-size: 1.35rem; }
h3 { margin-bottom: 0; }

.primary-button,
.ghost-button {
  min-height: 42px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 4px 4px 0 #05050a;
}

.primary-button { background: var(--coral); }
.ghost-button { background: var(--panel-strong); }
.small-button { min-height: 34px; padding: 0 10px; }
.tiny-button { min-height: 28px; padding: 0 8px; font-size: 0.76rem; box-shadow: 2px 2px 0 #05050a; }

.primary-button:hover,
.ghost-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #05050a;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(500px, 1.36fr) minmax(380px, 0.96fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(26, 23, 35, 0.95);
  box-shadow: 0 16px 44px var(--shadow);
  padding: 18px;
}

.panel-heading,
.panel-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.counter,
.status-dot,
.panel-subheading span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

input, select, textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #111019;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus { border-color: var(--cyan); }

.need-box,
.skill-form,
.task-box,
.console-panel {
  display: grid;
  gap: 12px;
}

.inline-grid,
.repository-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.sprite-grid,
.repository-list,
.ranking-list {
  display: grid;
  gap: 10px;
}

.sprite-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sprite-card,
.ranking-item,
.comparison-box,
.token-board,
.battle-caption {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #15131d;
}

.sprite-card {
  position: relative;
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr);
  gap: 6px;
  aspect-ratio: 1;
  min-height: 0;
  padding: 10px;
  overflow: hidden;
}

.sprite-card.selected {
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(86, 216, 216, 0.45);
}

.sprite-card::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 8;
  max-height: calc(100% - 20px);
  overflow: hidden;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  background: rgba(5, 5, 10, 0.96);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  padding: 9px;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease 2s, transform 0.18s ease 2s;
}

.sprite-card:hover::after,
.sprite-card:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.sprite-face {
  position: relative;
  justify-self: center;
  width: 76px;
  height: 82px;
  border: 0;
  background: transparent;
  animation: bob 1.6s ease-in-out infinite;
  animation-delay: var(--delay);
  transform-origin: center top;
  zoom: 0.5;
}

.sprite-face span,
.battle-sprite span,
.boss span {
  position: absolute;
  display: block;
  image-rendering: pixelated;
}

.sprite-card strong,
.ranking-item strong {
  display: block;
  margin-bottom: 3px;
}

.sprite-copy {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
}

.sprite-copy strong,
.sprite-copy em,
.sprite-copy p,
.battle-sprite strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sprite-copy strong {
  display: -webkit-box;
  min-height: 2.4em;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sprite-card em,
.ranking-item em {
  display: block;
  white-space: nowrap;
  color: var(--gold);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
  margin-bottom: 5px;
}

.sprite-card p,
.ranking-item p,
.comparison-box span,
.battle-caption span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 0;
}

.sprite-card p {
  display: -webkit-box;
  min-height: 3.1em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sprite-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.sprite-actions input {
  width: 18px;
  height: 18px;
}

.battle-panel {
  min-height: 720px;
}

.boss-stage {
  position: relative;
  height: 430px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, rgba(240, 101, 79, 0.18), transparent 10rem),
    linear-gradient(180deg, #121827, #090912);
  box-shadow: 7px 7px 0 #05050a;
}

.boss-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(247, 240, 223, 0.65) 1px, transparent 1px),
    radial-gradient(circle, rgba(86, 216, 216, 0.5) 1px, transparent 1px);
  background-size: 78px 78px, 113px 113px;
  opacity: 0.38;
}

.boss-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100px;
  z-index: 4;
  width: 34px;
  height: 34px;
  background: var(--gold);
  box-shadow:
    30px -12px 0 var(--coral),
    -32px 10px 0 var(--cyan),
    0 0 0 8px rgba(240, 183, 75, 0.2);
  opacity: 0;
  transform: translateX(-50%) scale(0.5);
  pointer-events: none;
}

.boss-stage.is-fighting::after {
  animation: hit-burst 0.72s steps(3) infinite;
}

.boss {
  position: absolute;
  left: 50%;
  top: 44px;
  width: 142px;
  height: 118px;
  transform: translateX(-50%);
  background: #5a2747;
  border: 6px solid #05050a;
  box-shadow: 0 10px 0 #2c1426, 0 0 0 4px var(--coral);
  animation: boss-breathe 1.1s ease-in-out infinite;
}

.boss.is-hit {
  animation: boss-hit 0.24s steps(2) infinite;
}

.boss-horn {
  position: absolute;
  top: -28px;
  width: 28px;
  height: 34px;
  background: var(--gold);
  border: 4px solid #05050a;
}

.boss-horn.left { left: 10px; }
.boss-horn.right { right: 10px; }
.boss-eye {
  position: absolute;
  top: 36px;
  width: 18px;
  height: 18px;
  background: var(--cyan);
  box-shadow: 0 0 0 4px #05050a;
}
.boss-eye.left { left: 32px; }
.boss-eye.right { right: 32px; }
.boss-mouth {
  position: absolute;
  left: 42px;
  bottom: 24px;
  width: 58px;
  height: 14px;
  background: #05050a;
  box-shadow: 0 14px 0 var(--coral);
}

.sprite-party {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.battle-sprite {
  position: absolute;
  left: calc(7% + var(--slot) * 20%);
  bottom: 58px;
  width: 86px;
  height: 96px;
  animation: bob 1.4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.sprite-head {
  left: 24px;
  top: 0;
  width: 34px;
  height: 30px;
  background: var(--c1);
  border: 4px solid #05050a;
}

.sprite-body {
  left: 14px;
  top: 32px;
  width: 54px;
  height: 38px;
  background: var(--c2);
  border: 4px solid #05050a;
  box-shadow: 16px 18px 0 var(--c3);
}

.sprite-shot {
  left: 62px;
  top: 22px;
  width: 16px;
  height: 8px;
  background: var(--gold);
  animation: shoot 0.8s linear infinite;
}

.battle-sprite strong {
  position: absolute;
  left: -16px;
  right: -16px;
  bottom: -6px;
  color: var(--ink);
  font-size: 0.72rem;
  text-align: center;
}

.projectile-lane span {
  position: absolute;
  width: 12px;
  height: 6px;
  background: var(--cyan);
  animation: enemy-shot 1.8s linear infinite;
}
.projectile-lane span:nth-child(1) { left: 42%; top: 170px; }
.projectile-lane span:nth-child(2) { left: 54%; top: 205px; animation-delay: 0.4s; }
.projectile-lane span:nth-child(3) { left: 48%; top: 240px; animation-delay: 0.9s; }

.battle-caption,
.comparison-box {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
}

.results-zone {
  margin-top: 16px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
}

.empty-result {
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: rgba(86, 216, 216, 0.07);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.45;
  padding: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  background: var(--gold);
  color: #111019;
  font-weight: 900;
}

.score-pill {
  color: var(--cyan);
  font-size: 1.15rem;
  font-weight: 900;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  padding: 0 10px;
  color: var(--muted);
  background: #111019;
  font-weight: 900;
}

.segmented-control button.active {
  color: #111019;
  background: var(--cyan);
}

.token-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.token-board div {
  display: grid;
  gap: 4px;
}

.token-board span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.token-board strong {
  color: var(--gold);
  font-size: 1.6rem;
}

.repository-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 16px;
}

.repository-dialog::backdrop {
  background: rgba(5, 5, 10, 0.72);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.repository-tools {
  grid-template-columns: 220px 1fr;
  margin-bottom: 14px;
}

.upload-label input {
  min-height: 45px;
}

.pixel-hero {
  color: #05050a;
}

.pixel-hero::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 66px;
  height: 76px;
  background: #f7f0df;
  clip-path: polygon(24% 0, 78% 0, 78% 10%, 92% 10%, 92% 32%, 100% 32%, 100% 72%, 88% 72%, 88% 88%, 70% 88%, 70% 100%, 28% 100%, 28% 88%, 10% 88%, 10% 72%, 0 72%, 0 32%, 10% 32%, 10% 10%, 24% 10%);
  opacity: 0.96;
}

.hero-shadow {
  left: 16px;
  bottom: 0;
  width: 46px;
  height: 8px;
  background: rgba(0, 0, 0, 0.34);
}

.hero-cape {
  left: 12px;
  top: 30px;
  width: 50px;
  height: 36px;
  background: var(--c3);
  border: 4px solid #05050a;
  opacity: 0.85;
}

.hero-leg {
  top: 58px;
  width: 12px;
  height: 16px;
  background: #5a3929;
  border: 3px solid #05050a;
}
.hero-leg.left { left: 25px; }
.hero-leg.right { left: 42px; }

.hero-body {
  left: 20px;
  top: 34px;
  width: 38px;
  height: 31px;
  background: var(--c2);
  border: 4px solid #05050a;
  box-shadow:
    inset -8px 0 0 rgba(0, 0, 0, 0.18),
    inset 0 8px 0 rgba(255, 255, 255, 0.22);
}

.hero-belt {
  left: 20px;
  top: 50px;
  width: 38px;
  height: 7px;
  background: #5a3929;
  border-left: 4px solid #05050a;
  border-right: 4px solid #05050a;
}

.hero-arm {
  top: 38px;
  width: 12px;
  height: 23px;
  background: #d89b68;
  border: 3px solid #05050a;
}
.hero-arm.left { left: 11px; }
.hero-arm.right { right: 11px; }

.hero-head {
  left: 23px;
  top: 13px;
  width: 32px;
  height: 30px;
  background: #e5ae7b;
  border: 4px solid #05050a;
  box-shadow: inset -7px 0 0 rgba(0, 0, 0, 0.16);
}

.hero-hair {
  left: 18px;
  top: 7px;
  width: 42px;
  height: 18px;
  background: var(--c1);
  border: 4px solid #05050a;
  box-shadow: 10px 12px 0 -4px var(--c1);
}

.hero-hat {
  display: none;
  left: 17px;
  top: -3px;
  width: 44px;
  height: 24px;
  background: var(--c1);
  border: 4px solid #05050a;
  transform: skewX(-12deg);
}

.hero-eye {
  top: 27px;
  width: 5px;
  height: 5px;
  background: #05050a;
  z-index: 2;
}
.hero-eye.left { left: 32px; }
.hero-eye.right { left: 45px; }

.hero-tool {
  right: 7px;
  top: 25px;
  width: 8px;
  height: 42px;
  background: #6e4a2f;
  border: 3px solid #05050a;
  transform: rotate(16deg);
}

.hero-tool::after,
.hero-glint {
  content: "";
  position: absolute;
  display: block;
}

.hero-tool::after {
  left: -5px;
  top: -12px;
  width: 18px;
  height: 18px;
  background: var(--c3);
  border: 3px solid #05050a;
}

.hero-glint {
  right: 4px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow: 8px 8px 0 var(--c3), -8px 12px 0 var(--c1);
  animation: sparkle 1.1s steps(2) infinite;
}

.hero-wizard .hero-hat,
.hero-oracle .hero-hat {
  display: block;
}

.hero-wizard .hero-cape,
.hero-oracle .hero-cape {
  background: var(--c1);
}

.hero-ranger .hero-hair,
.hero-scout .hero-hair {
  height: 25px;
  clip-path: polygon(0 0, 100% 0, 100% 60%, 78% 60%, 78% 100%, 28% 100%, 28% 60%, 0 60%);
}

.hero-builder .hero-tool::after {
  width: 24px;
  height: 10px;
  top: -7px;
  left: -8px;
  background: #8b8f99;
}

.hero-spark .hero-tool::after {
  border-radius: 0;
  background: var(--gold);
  box-shadow: 0 0 0 5px var(--c3);
}

.battle-hero {
  width: 76px;
  height: 82px;
  transform: scale(1.18);
  transform-origin: center bottom;
}

.boss-stage {
  background:
    radial-gradient(circle at 50% 34%, rgba(240, 101, 79, 0.22), transparent 11rem),
    radial-gradient(circle at 22% 28%, rgba(86, 216, 216, 0.08), transparent 13rem),
    linear-gradient(180deg, #111827, #07070f 72%);
}

.boss {
  width: 178px;
  height: 150px;
  background: transparent;
  border: 0;
  box-shadow: none;
  z-index: 3;
}

.boss.is-hit {
  animation: boss-hit 0.24s steps(2) infinite, boss-breathe 1.1s ease-in-out infinite;
}

.boss-shadow {
  left: 30px;
  bottom: 0;
  width: 120px;
  height: 14px;
  background: rgba(0, 0, 0, 0.42);
}

.boss-wing {
  top: 42px;
  width: 48px;
  height: 72px;
  background:
    linear-gradient(90deg, rgba(86, 216, 216, 0.18), transparent 45%),
    #2b1837;
  border: 5px solid #05050a;
  box-shadow:
    inset 10px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 -14px 0 rgba(0, 0, 0, 0.22);
}
.boss-wing.left { left: 0; clip-path: polygon(100% 0, 0 16%, 30% 48%, 0 78%, 100% 100%); }
.boss-wing.right { right: 0; clip-path: polygon(0 0, 100% 16%, 70% 48%, 100% 78%, 0 100%); }

.boss-face {
  left: 39px;
  top: 28px;
  width: 100px;
  height: 94px;
  background: #66304d;
  border: 6px solid #05050a;
  box-shadow:
    inset -12px 0 0 rgba(0, 0, 0, 0.16),
    inset 0 14px 0 rgba(255, 255, 255, 0.08),
    0 0 0 4px var(--coral),
    0 14px 0 #2b1425;
}

.boss-horn {
  top: 0;
  width: 30px;
  height: 38px;
  z-index: 2;
}
.boss-horn.left { left: 48px; }
.boss-horn.right { right: 48px; }

.boss-ear {
  top: 52px;
  width: 28px;
  height: 42px;
  background: var(--c3, #f0654f);
  border: 5px solid #05050a;
  z-index: 1;
}
.boss-ear.left { left: 24px; }
.boss-ear.right { right: 24px; }

.boss-brow {
  top: 55px;
  width: 28px;
  height: 8px;
  background: #05050a;
  z-index: 4;
}
.boss-brow.left { left: 58px; transform: rotate(12deg); }
.boss-brow.right { right: 58px; transform: rotate(-12deg); }

.boss-eye {
  top: 67px;
  width: 17px;
  height: 17px;
  z-index: 4;
}
.boss-eye.left { left: 64px; }
.boss-eye.right { right: 64px; }

.boss-mouth {
  left: 63px;
  bottom: 38px;
  width: 54px;
  height: 12px;
  z-index: 4;
}

.boss-fang {
  bottom: 26px;
  width: 10px;
  height: 14px;
  background: var(--ink);
  border: 3px solid #05050a;
  z-index: 5;
}
.boss-fang.left { left: 75px; }
.boss-fang.right { right: 75px; }

.boss-gem {
  left: 80px;
  top: 38px;
  width: 18px;
  height: 18px;
  background: var(--cyan);
  border: 4px solid #05050a;
  z-index: 5;
  box-shadow: 0 0 0 3px rgba(86, 216, 216, 0.25);
  animation: sparkle 1.4s steps(2) infinite;
}

.boss-claw {
  bottom: 8px;
  width: 34px;
  height: 18px;
  background: #2b1425;
  border: 4px solid #05050a;
  z-index: 2;
}
.boss-claw.left {
  left: 34px;
  transform: rotate(10deg);
  box-shadow: -10px 10px 0 -4px var(--ink), 10px 10px 0 -4px var(--ink);
}
.boss-claw.right {
  right: 34px;
  transform: rotate(-10deg);
  box-shadow: -10px 10px 0 -4px var(--ink), 10px 10px 0 -4px var(--ink);
}

.boss-rune {
  width: 10px;
  height: 10px;
  background: var(--gold);
  z-index: 5;
  opacity: 0.85;
  box-shadow: 14px 0 0 var(--coral), 0 14px 0 var(--cyan);
  animation: rune-float 1.8s steps(4) infinite;
}
.boss-rune.one { left: 24px; top: 18px; }
.boss-rune.two { right: 18px; top: 112px; animation-delay: 0.6s; }

.battle-sprite {
  width: 112px;
  height: 138px;
  --rush-x: 120px;
  --rush-y: -128px;
  animation: battle-idle 1.4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.battle-sprite:nth-child(1) { --rush-x: 230px; --rush-y: -138px; }
.battle-sprite:nth-child(2) { --rush-x: 130px; --rush-y: -150px; }
.battle-sprite:nth-child(3) { --rush-x: 24px; --rush-y: -154px; }
.battle-sprite:nth-child(4) { --rush-x: -92px; --rush-y: -150px; }
.battle-sprite:nth-child(5) { --rush-x: -196px; --rush-y: -138px; }

.boss-stage.is-fighting .battle-sprite {
  animation: hero-fight 1.08s cubic-bezier(0.2, 0.75, 0.24, 1) infinite;
  animation-delay: calc(var(--slot) * 0.08s);
}

.sprite-shot {
  left: 76px;
  top: 28px;
  width: 18px;
  height: 8px;
  background: var(--gold);
  border: 2px solid #05050a;
  opacity: 0.72;
  animation: shoot 0.8s linear infinite;
}

.boss-stage.is-fighting .sprite-shot {
  animation: skill-shot 0.55s linear infinite;
  animation-delay: calc(var(--slot) * 0.07s);
}

.battle-sprite strong {
  left: -20px;
  right: -20px;
  bottom: 0;
  display: block;
  white-space: nowrap;
}

.boss-stage.is-fighting .battle-sprite strong {
  opacity: 0.55;
}

.battle-action-bar {
  display: grid;
  place-items: center;
  margin-top: 16px;
}

.start-test-button {
  min-width: min(320px, 100%);
  min-height: 50px;
  font-size: 1.05rem;
}

.mode-explainer {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(86, 216, 216, 0.08);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
  padding: 11px 12px;
}

.repository-list {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

@keyframes battle-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes hero-fight {
  0%, 100% { transform: translate(0, 0) scale(1); filter: brightness(1); }
  22% { transform: translate(0, -18px) scale(1.04); }
  46% { transform: translate(var(--rush-x), var(--rush-y)) scale(1.12); filter: brightness(1.25); }
  58% { transform: translate(calc(var(--rush-x) * 0.72), calc(var(--rush-y) * 0.75)) scale(1.04); }
  78% { transform: translate(0, -10px) scale(0.98); }
}

@keyframes skill-shot {
  0% { transform: translate(0, 0) scaleX(0.7); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translate(var(--rush-x), calc(var(--rush-y) - 6px)) scaleX(1.35); opacity: 0; }
}

@keyframes hit-burst {
  0%, 100% { opacity: 0; transform: translateX(-50%) scale(0.3) rotate(0deg); }
  35% { opacity: 0.95; transform: translateX(-50%) scale(1) rotate(45deg); }
  70% { opacity: 0.35; transform: translateX(-50%) scale(1.4) rotate(90deg); }
}

@keyframes rune-float {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(-8px); opacity: 1; }
}

@keyframes shoot {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(320px, -70px); opacity: 0; }
}

@keyframes enemy-shot {
  0% { transform: translate(0, 0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(-160px, 150px); opacity: 0; }
}

@keyframes boss-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.04, 0.98); }
}

@keyframes boss-hit {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.8); }
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 1fr 1fr;
  }
  .console-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100%, calc(100vw - 24px));
    padding: 12px 0 28px;
  }
  .topbar,
  .panel-heading,
  .dialog-head {
    align-items: stretch;
    flex-direction: column;
  }
  .workspace,
  .sprite-grid,
  .inline-grid,
  .repository-tools,
  .token-board {
    grid-template-columns: 1fr;
  }
  .topbar-actions,
  .report-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .boss-stage {
    height: 360px;
  }
  .ranking-item {
    grid-template-columns: 38px 1fr;
  }
  .score-pill {
    grid-column: 2;
  }
}
