/* =========================================================
   ALSC — page 04 / team selection
   Shared roster grid + one-shot confirmation dock
   ========================================================= */

.page--team {
  --team-card-bg: linear-gradient(158deg, rgba(19, 26, 36, 0.96), rgba(8, 12, 17, 0.98));
}

.team-page {
  padding-top: clamp(18px, 3.2vh, 38px);
  padding-bottom: 40px;
  animation: pageRise 0.7s var(--ease) both;
}

.team-page .bg-ghost {
  top: 8%;
  bottom: auto;
  right: -0.05em;
  font-size: clamp(14rem, 30vw, 34rem);
  opacity: 0.75;
}

.team-wrap {
  width: 100%;
}

.team-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
  padding-bottom: clamp(20px, 3.1vh, 31px);
  border-bottom: 1px solid var(--line);
}

.team-head__copy {
  min-width: 0;
}

.team-head .page-title {
  font-size: clamp(3.4rem, 6.5vw, 6.35rem);
}

.team-head .page-title em {
  -webkit-text-stroke: 1px var(--red);
  color: transparent;
}

.team-head .page-title__zh {
  max-width: 780px;
  margin-top: 14px;
  font-size: 0.78rem;
  line-height: 1.85;
}

.team-account {
  display: flex;
  flex-direction: column;
  min-width: 215px;
  max-width: 280px;
  padding: 0 0 5px 20px;
  border-left: 1px solid var(--line);
}

.team-account__label {
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 0.44rem;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

.team-account strong {
  overflow: hidden;
  margin-top: 5px;
  color: var(--bone);
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-account__meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

/* Toolbar */

.team-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 54px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.team-toolbar__legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--muted-dim);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.team-toolbar__legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-star {
  color: #f3cd73;
  font-size: 0.62rem;
  font-weight: 400;
  filter: drop-shadow(0 0 6px rgba(243, 205, 115, 0.28));
}

.team-toolbar__sync {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
}

.team-sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-dim);
  font-size: 0.51rem;
  letter-spacing: 0.035em;
  line-height: 1.4;
  white-space: nowrap;
}

.team-sync__dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 9px rgba(182, 255, 106, 0.7);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.team-sync[data-state="loading"] .team-sync__dot {
  background: #f3cd73;
  box-shadow: 0 0 9px rgba(243, 205, 115, 0.7);
  animation: statusPulse 1.1s ease-in-out infinite;
}

.team-sync[data-state="error"] {
  color: var(--red-bright);
}

.team-sync[data-state="error"] .team-sync__dot {
  background: var(--red-bright);
  box-shadow: 0 0 9px rgba(255, 75, 80, 0.8);
}

.team-refresh {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: rgba(242, 239, 231, 0.025);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--display);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.team-refresh:hover {
  border-color: rgba(242, 239, 231, 0.32);
  background: rgba(242, 239, 231, 0.06);
  color: var(--bone);
}

.team-refresh.is-busy {
  cursor: wait;
  opacity: 0.55;
}

.team-refresh:disabled {
  cursor: wait;
  opacity: 0.45;
}

/* Shared roster grid */

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.team-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--team-card-bg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease);
}

.team-card::before,
.team-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 9px;
  height: 9px;
  pointer-events: none;
  opacity: 0.6;
}

.team-card::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.team-card::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.team-card[data-selected="true"] {
  border-color: rgba(227, 38, 46, 0.82);
  box-shadow: 0 0 0 1px rgba(227, 38, 46, 0.18), 0 18px 40px rgba(0, 0, 0, 0.28), 0 0 32px rgba(227, 38, 46, 0.08);
  transform: translateY(-2px);
}

.team-card[data-selected="true"]::before,
.team-card[data-selected="true"]::after {
  border-color: var(--red);
  opacity: 1;
}

.team-card[data-mine="true"] {
  border-color: rgba(182, 255, 106, 0.28);
}

.team-card[data-mine="true"]::before,
.team-card[data-mine="true"]::after {
  border-color: var(--signal);
  opacity: 0.75;
}

.team-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 0.53rem;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

.team-card__top strong {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.team-card__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-dim);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.team-card__status::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.team-card__status[data-kind="open"] {
  color: var(--signal);
}

.team-card__status[data-kind="selected"] {
  color: var(--red-bright);
}

.team-card__status[data-kind="mine"] {
  color: var(--signal);
}

.team-card__status[data-kind="full"] {
  color: var(--muted-dim);
}

.team-card__name {
  display: flex;
  min-height: 64px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(242, 239, 231, 0.012);
}

.team-card__name-label {
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 0.47rem;
  letter-spacing: 0.16em;
  line-height: 1.3;
}

.team-card__name strong {
  overflow: hidden;
  color: var(--bone-dim);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card__name.is-empty strong {
  color: var(--muted-dim);
  font-weight: 400;
}

.team-card__name.is-editing {
  min-height: 68px;
  gap: 5px;
  background: rgba(227, 38, 46, 0.045);
}

.team-card__name-input {
  width: 100%;
  height: 30px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(227, 38, 46, 0.55);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--bone);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.team-card__name-input::placeholder {
  color: rgba(242, 239, 231, 0.26);
  font-size: 0.68rem;
  font-weight: 400;
}

.team-card__name-input:focus {
  border-bottom-color: var(--red-bright);
}

.team-card__name-input.has-error {
  border-bottom-color: var(--red-bright);
  color: #ffd3d4;
}

.team-card__name-hint {
  overflow: hidden;
  color: var(--muted-dim);
  font-size: 0.48rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card__name-hint.is-error {
  color: var(--red-bright);
}

.team-slots {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.team-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.015em;
  line-height: 1.3;
  text-align: left;
}

.team-slot:last-child {
  border-bottom: 0;
}

.team-slot__star {
  width: 15px;
  flex: 0 0 15px;
  color: #f3cd73;
  font-size: 0.7rem;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 0 5px rgba(243, 205, 115, 0.22));
}

.team-slot__star.is-empty {
  color: rgba(242, 239, 231, 0.13);
  filter: none;
}

.team-slot__id {
  overflow: hidden;
  min-width: 0;
  color: var(--bone-dim);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-slot__rank {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid rgba(242, 239, 231, 0.16);
  background: rgba(242, 239, 231, 0.025);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.035em;
  line-height: 1.3;
  white-space: nowrap;
}

.team-slot__rank.is-empty {
  opacity: 0.42;
}

.team-slot__you {
  margin-left: 0;
  padding: 2px 5px;
  border: 1px solid rgba(227, 38, 46, 0.34);
  color: var(--red-bright);
  font-family: var(--display);
  font-size: 0.48rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  white-space: nowrap;
}

.team-slot--empty {
  color: var(--muted-dim);
}

.team-slot--pick {
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.team-slot--pick .team-slot__plus {
  margin-left: auto;
  color: var(--muted-dim);
  font-size: 0.8rem;
  line-height: 1;
  transition: color 0.18s ease, transform 0.18s ease;
}

.team-slot--pick:hover {
  background: rgba(227, 38, 46, 0.1);
  color: var(--bone);
}

.team-slot--pick:hover .team-slot__plus {
  color: var(--red-bright);
  transform: rotate(90deg);
}

.team-slot--pick:focus-visible {
  position: relative;
  z-index: 3;
  outline-offset: -2px;
}

.team-slot--blocked {
  cursor: not-allowed;
  opacity: 0.44;
}

.team-slot--selected {
  background: rgba(227, 38, 46, 0.15);
  color: var(--bone);
}

.team-slot--selected .team-slot__plus {
  margin-left: auto;
  color: var(--red-bright);
  font-family: var(--display);
  font-size: 0.38rem;
  letter-spacing: 0.08em;
}

.team-slot--mine {
  background: rgba(227, 38, 46, 0.08);
}

.team-card.is-full .team-card__top {
  border-bottom-color: rgba(242, 239, 231, 0.045);
}

/* Loading / gate */

.team-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 420px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.team-loading__spinner {
  display: block;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(242, 239, 231, 0.12);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: orbit 0.9s linear infinite;
}

.team-gate {
  position: relative;
  display: flex;
  width: min(100%, 660px);
  min-height: 330px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 11px;
  margin: 48px auto 0;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(17, 24, 33, 0.92), rgba(8, 12, 17, 0.97));
  overflow: hidden;
}

.team-gate::before,
.team-gate::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
}

.team-gate::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--red);
  border-left: 1px solid var(--red);
}

.team-gate::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--red);
  border-bottom: 1px solid var(--red);
}

.team-gate__code {
  position: absolute;
  top: 18px;
  right: 24px;
  color: rgba(242, 239, 231, 0.035);
  font-family: var(--display);
  font-size: clamp(6rem, 13vw, 11rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.team-gate__kicker {
  position: relative;
  z-index: 1;
  color: var(--red-bright);
  font-family: var(--display);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
}

.team-gate h2 {
  position: relative;
  z-index: 1;
  margin: 1px 0 0;
  color: var(--bone);
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.team-gate__text {
  position: relative;
  z-index: 1;
  max-width: 450px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.025em;
  line-height: 1.8;
}

.team-gate__actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
}

.team-gate__retry {
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.57rem;
  letter-spacing: 0.08em;
}

.team-gate__retry:hover {
  border-color: rgba(242, 239, 231, 0.32);
  color: var(--bone);
}

/* Locked banner */

.team-app {
  animation: pageRise 0.55s var(--ease) both;
}

.team-locked {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(182, 255, 106, 0.22);
  background:
    linear-gradient(90deg, rgba(182, 255, 106, 0.055), transparent 48%),
    rgba(11, 17, 17, 0.7);
}

.team-locked__copy {
  min-width: 0;
}

.team-locked__kicker {
  color: var(--signal);
  font-family: var(--display);
  font-size: 0.46rem;
  letter-spacing: 0.2em;
  line-height: 1.4;
}

.team-locked__copy > strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--bone);
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-locked__copy p {
  max-width: 660px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.63rem;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

.team-locked__meta {
  display: flex;
  min-width: 120px;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.team-locked__meta span {
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 0.43rem;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.team-locked__meta strong {
  color: var(--signal);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.team-locked__meta small {
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 0.46rem;
  line-height: 1.5;
}

.team-locked:focus {
  outline: none;
}

/* Floating confirmation dock */

.team-dock {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(300px, 440px) auto;
  align-items: center;
  gap: 13px 20px;
  width: min(calc(100% - 2 * var(--gutter)), 1600px);
  padding: 13px 15px;
  border: 1px solid rgba(242, 239, 231, 0.16);
  background: rgba(8, 12, 18, 0.93);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.54);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.team-dock::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 20px;
  height: 1px;
  background: var(--red);
}

body.has-team-dock {
  padding-bottom: var(--team-dock-space, 170px);
  scroll-padding-bottom: calc(var(--team-dock-space, 170px) + 16px);
}

.team-dock__summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.team-dock__eyebrow {
  color: var(--muted-dim);
  font-family: var(--display);
  font-size: 0.4rem;
  letter-spacing: 0.17em;
  line-height: 1.3;
}

.team-dock__summary > strong {
  overflow: hidden;
  color: var(--bone);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-dock__summary > strong.is-empty {
  color: var(--muted);
  font-weight: 400;
}

.team-dock__help {
  overflow: hidden;
  color: var(--muted-dim);
  font-size: 0.5rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-dock__help.is-error {
  color: var(--red-bright);
}

.team-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  cursor: pointer;
}

.team-check:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.5;
}

.team-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.team-check__box {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 1px;
  border: 1px solid rgba(242, 239, 231, 0.3);
  background: rgba(0, 0, 0, 0.14);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.team-check__box::after {
  content: "✓";
  color: #fff;
  font-size: 0.58rem;
  line-height: 1;
  transform: scale(0);
  transition: transform 0.2s var(--ease);
}

.team-check input:checked + .team-check__box {
  border-color: var(--red);
  background: var(--red);
}

.team-check input:checked + .team-check__box::after {
  transform: scale(1);
}

.team-check input:focus-visible + .team-check__box {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
}

.team-check__text {
  color: var(--muted);
  font-size: 0.51rem;
  letter-spacing: 0.01em;
  line-height: 1.55;
}

.team-check__text b {
  color: var(--bone-dim);
  font-weight: 500;
}

.team-dock__action {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.team-dock__action .btn {
  min-width: 188px;
  min-height: 49px;
  padding: 0 16px 0 20px;
  font-size: 0.63rem;
}

.team-dock__action .btn__arrow {
  width: 26px;
  height: 26px;
}

.team-clear {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--muted-dim);
  cursor: pointer;
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.team-clear:hover {
  color: var(--bone);
}

.team-dock__feedback {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.54rem;
  letter-spacing: 0.025em;
  line-height: 1.5;
}

.team-dock__feedback.is-error {
  color: var(--red-bright);
}

.team-dock__feedback.is-success {
  color: var(--signal);
}

.team-noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  max-width: 360px;
  padding: 13px 16px;
  border: 1px solid rgba(227, 38, 46, 0.5);
  background: #0b1017;
  color: var(--bone);
  font-size: 0.7rem;
  line-height: 1.6;
}

/* Responsive */

@media (max-width: 1220px) {
  .team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .team-dock {
    grid-template-columns: minmax(210px, 0.8fr) minmax(280px, 1fr) auto;
  }

  .team-check__text {
    font-size: 0.48rem;
  }
}

@media (max-width: 980px) {
  .team-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 19px;
  }

  .team-account {
    max-width: none;
    min-width: 0;
    padding: 0;
    border-left: 0;
  }

  .team-account strong {
    margin-top: 4px;
  }

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

  .team-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .team-toolbar__sync {
    width: 100%;
    justify-content: space-between;
  }

  .team-locked {
    flex-direction: column;
    gap: 14px;
  }

  .team-locked__meta {
    align-items: flex-start;
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
    text-align: left;
  }

  .team-dock {
    bottom: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    padding: 13px 16px calc(13px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .team-check {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .team-dock__action {
    grid-column: 2;
    grid-row: 1;
  }

  .team-dock__feedback {
    grid-row: 3;
  }
}

@media (max-width: 640px) {
  .team-page {
    padding-top: 16px;
  }

  .team-head .page-title {
    font-size: clamp(2.9rem, 14vw, 4rem);
  }

  .team-head .page-title__zh {
    font-size: 0.7rem;
  }

  .team-toolbar__legend {
    gap: 6px 15px;
    font-size: 0.49rem;
  }

  .team-sync {
    font-size: 0.46rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .team-card__top {
    min-height: 30px;
    padding: 7px 10px;
  }

  .team-card__name {
    min-height: 60px;
  }

  .team-slot {
    min-height: 38px;
    font-size: 0.76rem;
  }

  .team-dock {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .team-dock__summary > strong {
    font-size: 0.8rem;
  }

  .team-check {
    grid-column: 1;
    grid-row: 2;
  }

  .team-dock__action {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    justify-self: stretch;
  }

  .team-dock__action .btn {
    width: 100%;
  }

  .team-clear {
    flex: 0 0 auto;
  }

  .team-dock__feedback {
    grid-row: 4;
  }

  .team-gate {
    margin-top: 28px;
    padding: 26px 21px;
  }

  .team-gate__actions {
    width: 100%;
  }

  .team-gate__actions .btn {
    width: 100%;
  }

  .team-gate__retry {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .team-head .page-title {
    font-size: 2.65rem;
  }

  .team-dock__action {
    flex-wrap: wrap;
  }

  .team-clear {
    width: 100%;
    padding: 2px 0;
    text-align: center;
  }
}