:root {
  color-scheme: dark;
  --bg: #171720;
  --bg-2: #222637;
  --panel: rgba(31, 34, 48, 0.82);
  --panel-strong: rgba(20, 21, 31, 0.94);
  --line: rgba(255, 255, 255, 0.18);
  --line-soft: rgba(255, 255, 255, 0.1);
  --text: #fff8e8;
  --muted: #c7c2b8;
  --gold: #f4c76f;
  --gold-2: #ffe9aa;
  --rose: #cf5b73;
  --cyan: #61c7d9;
  --green: #80c67c;
  --danger: #ff725d;
  --slot: rgba(255, 255, 255, 0.08);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  --radius: 8px;
  font-family:
    "Pretendard",
    "Noto Sans KR",
    "Malgun Gothic",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(63, 87, 116, 0.34), rgba(52, 48, 69, 0.32) 42%, rgba(103, 48, 53, 0.26)),
    repeating-radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 36px),
    linear-gradient(180deg, #1c1b26 0%, #273142 58%, #1a1820 100%);
}

.app-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  max-width: 1660px;
  margin: 0 auto;
  align-items: start;
}

.app-content {
  min-width: 0;
}

.category-sidebar {
  position: sticky;
  top: 18px;
  padding: 12px;
  border: 1px solid rgba(244, 199, 111, 0.34);
  border-radius: var(--radius);
  background: rgba(15, 17, 25, 0.74);
  box-shadow: var(--shadow);
}

.category-title {
  margin: 0 0 10px;
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 900;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-button {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.94rem;
  font-weight: 900;
  text-align: left;
  word-break: keep-all;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.category-button:hover,
.category-button.is-active {
  border-color: rgba(244, 199, 111, 0.86);
  color: #fff8e8;
  background: linear-gradient(135deg, rgba(244, 199, 111, 0.2), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 239, 186, 0.16);
}

.page-section[hidden] {
  display: none !important;
}

.construction-page {
  min-height: 620px;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.construction-message {
  text-align: center;
}

.construction-message h2 {
  font-size: 2.4rem;
  line-height: 1;
  text-shadow: 0 2px 0 #000;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-lockup > div {
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  transform: rotate(45deg);
  border: 3px solid var(--gold-2);
  background: linear-gradient(135deg, #fff3be, #b57a32);
  box-shadow: 0 0 20px rgba(244, 199, 111, 0.52);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 2px solid #171720;
}

.brand-mark::after {
  inset: 22px 7px;
  background: #171720;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.72rem;
  line-height: 1.1;
  text-shadow: 0 2px 0 #000;
  overflow-wrap: anywhere;
}

.maker-credit {
  display: inline-block;
  margin-left: 8px;
  color: rgba(255, 239, 186, 0.82);
  font-size: 0.5em;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
  vertical-align: baseline;
}

h2 {
  margin-bottom: 0;
  font-size: 1.12rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-actions[hidden] {
  display: none !important;
}

.round-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  color: #11131d;
  background: linear-gradient(#fff, #d7d8de);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.32);
  font-size: 1.15rem;
  font-weight: 900;
}

.round-button span {
  font-size: 0.82rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) minmax(340px, 420px);
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  align-items: stretch;
}

.battle-board,
.counter-panel {
  min-width: 0;
}

.battle-board {
  position: relative;
}

.battle-tabs {
  width: max-content;
  display: flex;
  gap: 6px;
  padding: 4px;
  margin: 0 auto -6px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(14, 15, 21, 0.76);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 3;
}

.formation-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 170px) 1fr;
  gap: 12px;
  align-items: stretch;
  margin: 16px 0 12px;
}

.formation-toolbar-title {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 199, 111, 0.4);
  border-radius: var(--radius);
  background: rgba(15, 17, 25, 0.68);
}

.formation-toolbar-title strong {
  font-size: 1.02rem;
}

.excel-status {
  display: block;
  min-height: 16px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-status.is-loaded {
  color: var(--green);
}

.excel-status.is-error {
  color: var(--danger);
}

.formation-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 10px;
  min-width: 0;
}

.formation-option {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
  font-size: 0.84rem;
  font-weight: 900;
}

.formation-option.is-active {
  border-color: var(--gold);
  background:
    linear-gradient(135deg, rgba(244, 199, 111, 0.22), rgba(244, 199, 111, 0.04)),
    rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 2px rgba(244, 199, 111, 0.14);
}

.formation-mini {
  width: 54px;
  height: 46px;
  position: relative;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(206, 75, 92, 0.18), transparent 46%, rgba(77, 111, 224, 0.16)),
    rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.formation-mini-dot {
  position: absolute;
  left: var(--dot-x);
  top: var(--dot-y);
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  background: linear-gradient(#889dff, #4058c9);
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 0.62rem;
  font-weight: 1000;
  line-height: 1;
}

.formation-mini-dot:nth-child(n + 3) {
  background: linear-gradient(#f18aa0, #a83755);
}

.tab-button {
  min-width: 112px;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.tab-button.is-active {
  color: #10111a;
  background: linear-gradient(#fff, #e9e9ed);
}

.arena {
  min-height: 440px;
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr minmax(240px, 320px);
  align-items: center;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(36, 91, 168, 0.28), transparent 46%, rgba(187, 42, 55, 0.22)),
    rgba(18, 21, 31, 0.54);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.team-panel {
  min-height: 390px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: var(--panel);
  position: relative;
}

.attack-panel {
  border-color: rgba(244, 199, 111, 0.72);
  box-shadow: 0 0 0 1px rgba(244, 199, 111, 0.18), 0 0 34px rgba(244, 199, 111, 0.2);
}

.defense-panel {
  border-color: rgba(207, 91, 115, 0.55);
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.side-kicker {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.formation {
  height: 258px;
  position: relative;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(206, 75, 92, 0.08), transparent 45%, rgba(77, 111, 224, 0.1)),
    radial-gradient(circle at 56% 50%, rgba(255, 255, 255, 0.08), transparent 45%);
  overflow: hidden;
}

.formation-defense {
  margin-left: auto;
  margin-right: auto;
}

.slot {
  width: 68px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    var(--slot);
  position: absolute;
  left: var(--slot-x);
  top: var(--slot-y);
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-rows: 30px 16px;
  align-items: center;
  justify-items: center;
  gap: 1px;
  padding: 5px 5px 4px;
  text-align: center;
}

.slot.is-active {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 2px rgba(244, 199, 111, 0.22), 0 0 24px rgba(244, 199, 111, 0.2);
}

.pet-slot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 68px;
  height: 72px;
  display: grid;
  grid-template-rows: 14px 36px 14px;
  align-items: center;
  justify-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid rgba(255, 233, 170, 0.42);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(213, 169, 54, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.07);
  text-align: center;
}

.pet-slot.is-active {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 2px rgba(244, 199, 111, 0.22), 0 0 24px rgba(244, 199, 111, 0.2);
}

.pet-slot-label {
  color: var(--gold-2);
  font-size: 0.58rem;
  font-weight: 1000;
}

.slot-index {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #161722;
  background: rgba(255, 233, 170, 0.94);
  font-size: 0.62rem;
  font-weight: 1000;
  z-index: 2;
}

.slot-empty {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.68);
  font-size: 1.22rem;
  line-height: 1;
}

.slot-meta {
  min-width: 0;
}

.slot-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  font-size: 0.62rem;
  font-weight: 900;
}

.slot-role {
  display: none;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
}

.mini-portrait {
  width: 52px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  font-weight: 1000;
  text-shadow: 0 2px 4px #000;
  position: relative;
}

.portrait-initial {
  position: relative;
  z-index: 1;
}

.slot .mini-portrait {
  width: 30px;
  height: 28px;
  font-size: 0.82rem;
}

.pet-mini-portrait {
  width: 36px;
  height: 36px;
  font-size: 0.9rem;
}

.preset-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #11131d;
  background: linear-gradient(#fff, #d8d8dc);
  font-weight: 900;
}

.versus {
  min-height: 260px;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
}

.versus-flare {
  width: 100%;
  height: 120px;
  background:
    linear-gradient(90deg, rgba(48, 111, 232, 0.78), rgba(255, 255, 255, 0.18), rgba(217, 38, 58, 0.72)),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  filter: blur(9px);
  opacity: 0.72;
}

.versus strong {
  position: absolute;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6.8rem;
  color: #ffe27c;
  text-shadow:
    0 0 10px #fff6b7,
    0 0 30px #ff9f32,
    0 6px 0 #8b4015;
}

.roster-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 12px;
  align-items: center;
  margin: 14px 0 10px;
}

.search-box {
  height: 42px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #191a22;
  overflow: hidden;
}

.search-box span {
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #11131d;
  background: transparent;
  font-weight: 800;
}

.role-filters {
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 17, 25, 0.62);
  font-weight: 900;
}

.filter-button.is-active {
  color: #12131b;
  border-color: var(--gold-2);
  background: linear-gradient(#ffeab4, #e4b95e);
}

.filter-button.is-pet {
  border-color: rgba(255, 233, 170, 0.72);
  color: #15140e;
  background: linear-gradient(#ffeebf, #d5a936);
}

.filter-button.is-pet:not(.is-active) {
  color: #fff8e8;
  background: rgba(213, 169, 54, 0.2);
}

.hero-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 108px;
  gap: 10px;
  min-height: 156px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 8px 4px 14px;
  scrollbar-width: thin;
}

.hero-card {
  height: 140px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--panel-strong);
  padding: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.hero-card.is-picked {
  border-color: var(--gold);
}

.pet-card {
  border-color: rgba(255, 233, 170, 0.5);
}

.hero-portrait {
  height: 94px;
  display: grid;
  place-items: end center;
  padding-bottom: 10px;
  color: white;
  font-size: 2.1rem;
  font-weight: 1000;
  text-shadow: 0 3px 7px #000;
  position: relative;
}

.hero-portrait::before {
  content: "";
  position: absolute;
  inset: 9px 13px 18px;
  border-radius: 50% 50% 42% 42%;
  border: 2px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
}

.hero-portrait span {
  position: relative;
  z-index: 1;
}

.pet-portrait::before {
  border-radius: 50%;
  border-color: rgba(255, 233, 170, 0.34);
}

.hero-element {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 26px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: rgba(0, 0, 0, 0.44);
  font-size: 0.68rem;
  font-weight: 900;
}

.type-badge {
  position: absolute;
  left: 7px;
  bottom: 42px;
  z-index: 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(0, 0, 0, 0.16)),
    var(--type-color, #667085);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 2px 5px rgba(0, 0, 0, 0.44);
  font-size: 0.66rem;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.type-badge-mini {
  left: 3px;
  bottom: 3px;
  width: 17px;
  height: 17px;
  border-radius: 3px;
  font-size: 0.48rem;
}

.pet-badge {
  color: #18140a;
  text-shadow: none;
}

.hero-nameplate {
  min-height: 46px;
  padding: 5px 6px 7px;
  background: linear-gradient(180deg, rgba(16, 17, 24, 0.72), #090a0e);
}

.hero-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 1000;
}

.hero-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 2px;
  color: #ffe67c;
  font-size: 0.68rem;
  font-weight: 900;
}

.counter-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 18, 27, 0.86);
  box-shadow: var(--shadow);
}

.counter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.match-badge {
  flex: 0 0 auto;
  min-width: 50px;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(244, 199, 111, 0.58);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(244, 199, 111, 0.1);
  font-weight: 1000;
}

.defense-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.summary-chip {
  min-width: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
}

.summary-chip.is-filled {
  color: var(--text);
  border-color: rgba(244, 199, 111, 0.42);
}

.summary-chip.is-pet,
.mini-token.is-pet {
  border-color: rgba(255, 233, 170, 0.62);
  color: var(--gold-2);
  background: rgba(213, 169, 54, 0.14);
}

.counter-list {
  display: grid;
  gap: 10px;
}

.counter-card {
  width: 100%;
  min-height: 92px;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 11px;
  text-align: left;
}

.counter-card.is-active {
  border-color: var(--gold);
  background: rgba(244, 199, 111, 0.13);
}

.counter-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.counter-title-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
}

.mini-team {
  display: flex;
  gap: 6px;
}

.mini-token {
  min-width: 0;
  max-width: 94px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.counter-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.deck-detail {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.detail-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.detail-section {
  margin-bottom: 14px;
}

.detail-section h3 {
  margin: 0 0 8px;
  color: var(--gold-2);
  font-size: 0.9rem;
}

.detail-line,
.skill-list,
.ring-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-line {
  color: var(--text);
  line-height: 1.55;
  font-weight: 800;
}

.skill-list,
.ring-list {
  display: grid;
  gap: 7px;
}

.skill-list li,
.ring-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.step-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #11131d;
  background: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 1000;
}

.ring-list li {
  grid-template-columns: minmax(58px, 74px) minmax(0, 1fr);
}

.ring-hero {
  color: var(--text);
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 14px;
  }

  .category-button {
    padding: 10px;
    font-size: 0.86rem;
  }

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

  .formation-toolbar {
    grid-template-columns: minmax(150px, 180px) 1fr;
  }

  .arena {
    grid-template-columns: minmax(220px, 1fr) 160px minmax(220px, 1fr);
  }

  .counter-panel {
    min-height: 420px;
  }
}

@media (max-width: 780px) {
  .app-shell {
    padding: 12px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    position: static;
  }

  .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-button {
    min-height: 42px;
    text-align: center;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  h1 {
    font-size: 1.12rem;
    line-height: 1.18;
  }

  .round-button {
    width: 36px;
    height: 36px;
  }

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

  .formation-toolbar {
    grid-template-columns: 1fr;
  }

  .formation-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .versus {
    min-height: 100px;
  }

  .versus strong {
    font-size: 4rem;
  }

  .construction-page {
    min-height: 420px;
  }

  .roster-toolbar {
    grid-template-columns: 1fr;
  }

  .battle-tabs {
    margin-left: 0;
    margin-right: 0;
  }

  .tab-button {
    min-width: 96px;
  }
}
