.card-protocol-faction-chooser {
  position: absolute;
  z-index: 130;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 22px;
  overflow: auto;
  background: rgba(1, 7, 10, 0.94);
  backdrop-filter: blur(12px);
}

.card-protocol[data-faction-chooser="true"] .card-protocol-game-menu {
  display: none;
}

.card-protocol-faction-chooser > header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  width: min(100%, 620px);
  margin-bottom: 14px;
}

.card-protocol-faction-chooser h3 {
  margin: 0;
  color: #f2c866;
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.2vw, 40px);
  text-align: left;
}

.card-protocol-faction-chooser > header button {
  justify-self: end;
  width: 48px;
  min-height: 48px;
  border: 1px solid rgba(255, 243, 195, 0.5);
  border-radius: 50%;
  color: #fff3c3;
  background: #0c242b;
  font-size: 28px;
  cursor: pointer;
}

.card-protocol-faction-browser {
  display: grid;
  grid-template-columns: 52px minmax(0, 720px) 52px;
  align-items: center;
  gap: 14px;
  width: min(100%, 620px);
}

.card-protocol-faction-browser__arrow {
  width: 52px;
  min-height: 86px;
  border: 1px solid rgba(112, 217, 220, 0.4);
  border-radius: 30px;
  color: #fff3c3;
  background: rgba(7, 28, 34, 0.9);
  font-family: var(--font-heading);
  font-size: 44px;
  cursor: pointer;
}

.card-protocol-faction-card {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-self: center;
  width: min(100%, clamp(320px, 42vh, 430px));
  min-height: 0;
  overflow: hidden;
  border: 2px solid #f2c866;
  border-radius: 9px;
  background: #07151b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.card-protocol-faction-card.is-claimed {
  border-color: rgba(255, 243, 195, 0.32);
  filter: saturate(0.58);
}

.card-protocol-faction__poster {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  object-position: center;
  background: #020809;
}

.card-protocol-faction-card__copy {
  display: grid;
  gap: 5px;
  padding: 16px 18px 17px;
  border-top: 1px solid rgba(112, 217, 220, 0.58);
  border-bottom: 5px solid #52dfd5;
  background: #020b0b;
}

.card-protocol-faction-card__copy > span,
.card-protocol-faction-card__copy > small {
  color: #70d9dc;
  font-family: var(--font-copy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.card-protocol-faction-card__copy h4 {
  margin: 0;
  color: #fff3c3;
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
}

.card-protocol-faction-card__action {
  min-height: 64px;
  border: 0;
  border-radius: 0;
  color: #151006;
  background: linear-gradient(180deg, #f8d978, #d8a93e);
  font-family: var(--font-copy);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.card-protocol-faction-card__action:disabled {
  color: rgba(255, 248, 220, 0.55);
  background: #263339;
  cursor: not-allowed;
}

@media (max-width: 760px) and (orientation: portrait) {
  .card-protocol-faction-chooser {
    position: fixed;
    align-content: start;
    padding: calc(12px + env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  }

  .card-protocol-faction-chooser > header {
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 10px;
  }

  .card-protocol-faction-chooser h3 {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    font-size: 24px;
  }

  .card-protocol-faction-chooser > header button {
    grid-column: 2;
    grid-row: 1;
  }

  .card-protocol-faction-browser {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 6px;
  }

  .card-protocol-faction-browser__arrow {
    width: 44px;
    min-height: 70px;
    font-size: 34px;
  }

  .card-protocol-faction-card {
    grid-template-rows: auto auto auto;
    width: 100%;
    min-height: 0;
  }

  .card-protocol-faction-card__copy {
    gap: 4px;
    padding: 12px 14px 13px;
  }

  .card-protocol-faction-card__copy h4 {
    font-size: clamp(24px, 7.2vw, 31px);
  }

  .card-protocol-faction-card__action {
    min-height: 56px;
    font-size: 16px;
  }
}

@media (max-width: 380px) and (orientation: portrait) {
  .card-protocol-faction-card__copy h4 {
    font-size: 21px;
  }
}
