#arena-dialog {
  width: min(1040px, calc(100% - 20px));
  padding: clamp(14px, 3vw, 28px);
}
.arena-intro {
  background: #173e3a;
  color: #fff9dc;
  padding: 22px;
  border-radius: 12px;
  margin: 0 0 20px;
}
.arena-intro h2 {
  margin: 8px 0;
  color: inherit;
}
#arena-dialog .arena-intro p {
  color: #fff9dc;
  max-width: 68ch;
  line-height: 1.65;
}
.arena-intro .eyebrow {
  color: #f0ce70;
}
.arena-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.arena-rules span {
  border: 1px solid #74918b;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12px;
}
#arena-create {
  margin-bottom: 20px;
  padding: 14px;
  border: 2px solid #708d76;
  border-radius: 8px;
}
#arena-form {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  padding-top: 14px;
}
#arena-form label {
  display: grid;
  gap: 6px;
}
#arena-form [hidden] {
  display: none;
}
.arena-invited {
  border-color: #29654b;
  box-shadow: 0 0 0 2px #c2dcb0;
}
.arena-share {
  margin: 16px 0;
  padding: 12px;
  background: #e9eddc;
  border-radius: 6px;
}
.arena-share summary {
  cursor: pointer;
  min-height: 32px;
}
.arena-share label {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.arena-share input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 14px;
}
.arena-share a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #174d37;
  font-weight: bold;
}
#arena-form input,
#arena-form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  box-sizing: border-box;
}
#arena-form p,
#arena-form button {
  grid-column: 1 / -1;
}
.arena-card {
  border: 2px solid #80967c;
  border-radius: 10px;
  padding: 18px;
  background: #fffbea;
  margin-bottom: 18px;
  color: #203b32;
  overflow-wrap: anywhere;
}
.arena-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.arena-card h3 {
  margin: 8px 0;
  font-size: 21px;
}
.arena-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.arena-actions button,
.arena-selection > button {
  min-height: 44px;
}
.arena-hint {
  padding: 12px;
  background: #e3ecd5;
  border-left: 4px solid #526e49;
  line-height: 1.6;
}
.arena-entries {
  font-size: 12px;
  line-height: 1.8;
}
.arena-teams {
  margin: 14px 0;
}
.arena-team {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #c5cba9;
}
.arena-team-invited {
  background: #dcebc9;
}
.arena-team label {
  flex: 1 1 180px;
}
.arena-team input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.arena-team button {
  min-height: 44px;
}
.arena-pool {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.arena-mon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  padding: 10px 6px;
  background: #f6f1df;
  color: #263f38;
  border: 2px solid #a2af97;
  border-radius: 8px;
  text-align: center;
  font: inherit;
  text-transform: none;
  box-sizing: border-box;
}
.arena-mon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
}
.arena-mon span,
.arena-mon small {
  font-size: 11px;
  line-height: 1.5;
}
.arena-mon b {
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 18px;
}
.arena-mon[aria-pressed='true'] {
  border-color: #29654b;
  background: #dcebc9;
  box-shadow: inset 0 0 0 1px #29654b;
}
.arena-mon[aria-pressed='true']:disabled {
  opacity: 1;
}
.arena-selection {
  border-top: 2px solid #c5cba9;
  margin-top: 16px;
}
.arena-selection h4 {
  font-size: 17px;
  margin-bottom: 8px;
}
.arena-selection p {
  line-height: 1.6;
}
.arena-bracket {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-top: 20px;
}
.arena-bracket section {
  flex: 1 0 170px;
}
.arena-pair {
  border: 1px solid #9fae96;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
}
.arena-pair p {
  margin: 4px 0;
}
.arena-pair small {
  font-size: 11px;
}
.arena-pair .winner {
  font-weight: 800;
  color: #246441;
}
.arena-champion {
  font-size: 24px;
  font-weight: bold;
}
.arena-pack summary,
#arena-create summary {
  cursor: pointer;
  min-height: 32px;
}
#arena-entry {
  min-height: 40px;
}
@media (max-width: 600px) {
  #arena-dialog {
    padding: 12px;
  }
  .arena-intro,
  .arena-card {
    padding: 14px;
  }
  .arena-pool {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .arena-pool.opponent {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .opponent .arena-mon img {
    width: 46px;
    height: 46px;
  }
  .opponent .arena-mon strong {
    font-size: 10px;
  }
  .opponent .arena-mon span {
    font-size: 9px;
  }
  #arena-form {
    grid-template-columns: 1fr;
  }
  #arena-entry {
    font-size: 11px;
    padding: 6px 8px;
  }
}
