.war-prize {
  margin: 0 0 0.4rem;
  color: var(--accent-bright);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.war-table th:nth-child(1),
.war-table td:nth-child(1) {
  width: 3.2rem;
}

.war-table th:nth-child(2),
.war-table td:nth-child(2) {
  width: auto;
  color: var(--text);
}

.war-table th:nth-child(3),
.war-table td:nth-child(3) {
  width: 6.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* История войн */
.war-hist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.war-hist-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

.war-hist-live {
  border-color: rgba(255, 140, 0, 0.55);
}

.war-hist-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.9rem;
  width: 100%;
  padding: 0.75rem 0.95rem;
  color: inherit;
  text-align: left;
}

.war-hist-more {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.35rem;
}

.war-hist-num {
  font-weight: 700;
  color: var(--accent-bright);
}

.war-hist-result {
  font-weight: 600;
}

.war-hist-when,
.war-hist-meta {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.war-hist-prize {
  grid-column: 1 / -1;
  color: var(--accent-bright);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.war-hist-body {
  padding: 0.2rem 0.95rem 1rem;
  border-top: 1px solid var(--border);
}

.war-hist-body h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.war-hist-big {
  margin: 0.8rem 0 0.3rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.war-hist-totals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  margin: 0.8rem 0 0.2rem;
}

.war-hist-totals div {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.war-hist-totals b {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.war-hist-totals span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.war-stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.war-stats th,
.war-stats td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.war-stats th {
  color: var(--text-muted);
  font-weight: 600;
}

.war-stats th:nth-child(2),
.war-stats td:nth-child(2) {
  text-align: left;
  width: 100%;
}

.war-stats th:first-child,
.war-stats td:first-child {
  text-align: left;
}

/* Подменю войн: слева под шапкой, в пустом поле рядом с колонкой. */
.war-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 820px) minmax(0, 1fr);
  column-gap: 1.5rem;
  align-items: start;
  padding: calc(var(--header-h) + 2rem) max(0.85rem, env(safe-area-inset-right)) 3rem max(0.85rem, env(safe-area-inset-left));
}

.war-stage > .war-games {
  grid-column: 1;
  justify-self: start;
  align-self: start;
  width: max-content;
  max-width: 100%;
  min-width: 0;
}

.war-stage > .clan-main {
  grid-column: 2;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.25rem 3rem;
}

.war-games {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 0.2rem;
  background:
    linear-gradient(var(--amber-9, #ffc53d), var(--amber-9, #ffc53d)) left top / 18px 2px no-repeat,
    linear-gradient(var(--amber-9, #ffc53d), var(--amber-9, #ffc53d)) left top / 2px 18px no-repeat,
    linear-gradient(var(--amber-9, #ffc53d), var(--amber-9, #ffc53d)) right bottom / 18px 2px no-repeat,
    linear-gradient(var(--amber-9, #ffc53d), var(--amber-9, #ffc53d)) right bottom / 2px 18px no-repeat,
    var(--olive-2, #181917);
  border: 1px solid var(--olive-6, #383a36);
  font-family: var(--display, "Tektur"), "Golos Text", system-ui, sans-serif;
}

.war-games a,
.war-games .is-soon {
  display: flex;
  align-items: center;
  padding: 0.72rem 0.95rem;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-11, #afb5ad);
  text-decoration: none;
  white-space: nowrap;
}

.war-games a:hover {
  color: var(--olive-12, #eceeec);
  background: var(--olive-3, #212220);
}

.war-games a[aria-current="page"] {
  color: var(--amber-9, #ffc53d);
  background: var(--amber-3, #302008);
  box-shadow: inset 0 -2px 0 var(--amber-9, #ffc53d);
}

.war-games a[aria-current="page"]:hover {
  color: var(--amber-9, #ffc53d);
}

.war-games .is-soon {
  color: var(--olive-9, #687066);
  cursor: default;
}

@media (max-width: 1320px) {
  .war-stage {
    grid-template-columns: minmax(0, 820px);
    justify-content: center;
  }

  .war-stage > .war-games,
  .war-stage > .clan-main {
    grid-column: 1;
  }

  .war-stage > .war-games {
    width: max-content;
    max-width: 100%;
    margin-bottom: 1rem;
  }
}

@media (max-width: 720px) {
  .war-stage {
    display: block;
    padding: 0.85rem 0.85rem 2.5rem;
  }

  .war-stage > .clan-main {
    padding: 0;
  }

  .war-games a,
  .war-games .is-soon {
    padding: 0.65rem 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }
}
