/* Team portal — Gen-3 FRLG re-skin (2026-07-24). PRESENTATION ONLY: every
   selector below targets the exact DOM team-portal.js already renders —
   its data logic, ids, events, and backend calls are untouched (Codex lane).
   Panel = gen3-frame1 paper window over the FRLG title backdrop; sections
   are white sticker windows; the tab bar is a Gen-3 menu strip with the
   red ▶ selection cursor; actions are framed A-button plates.
   The frame border-image is duplicated from styles.css .gen3-frame1 because
   this file must not depend on adding classes inside Codex's renderer. */

.team-portal-open {
  position: absolute;
  top: 10px;
  right: 252px;
  z-index: 58;
  min-width: 118px;
  min-height: 36px;
  padding: 7px 10px;
  color: #102f44;
  font: 800 11px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .03em;
  background: #F8F8F8;
  border: 2px solid #102f44;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE, 3px 3px 0 #102f44;
  cursor: pointer;
}

.team-portal-open::before {
  content: "◆";
  margin-right: 5px;
  color: #E82010;
}

.team-portal-open:focus-visible,
.team-portal button:focus-visible,
.team-portal input:focus-visible {
  outline: 3px solid #ffcd4c;
  outline-offset: 2px;
}

/* FRLG title-screen backdrop, same as the event guide + profile. */
.team-portal {
  --u: 2px;
  position: absolute;
  inset: 0;
  z-index: 64;
  padding: clamp(8px, 2vw, 20px);
  overflow: hidden;
  color: #606060;
  font-family: 'PokeDialogue', 'PokeText', "Courier New", monospace;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .05) 3px 4px),
    linear-gradient(180deg,
      #000 0 4%,
      #7a1818 4% 9%,
      #10283A 9% 91%,
      #7a1818 91% 96%,
      #000 96% 100%);
}

/* gen3-frame1 paper window (border-image copied from styles.css). */
.team-portal-panel {
  width: min(100%, 1050px);
  height: 100%;
  margin: 0 auto;
  padding: clamp(10px, 2vw, 20px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #7373AC #DED5DE;
  background: #F8F8F8;
  background-clip: padding-box;
  border: calc(var(--u) * 7) solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16' rx='3' fill='%23293131'/%3E%3Crect x='1' y='1' width='14' height='14' rx='2.5' fill='%234A4A6A'/%3E%3Crect x='2' y='2' width='12' height='12' rx='2' fill='%23626294'/%3E%3Crect x='3' y='3' width='10' height='10' rx='1.5' fill='%237373AC'/%3E%3Crect x='4' y='4' width='8' height='8' rx='1' fill='%238B8BCD'/%3E%3Crect x='5' y='5' width='6' height='6' rx='.5' fill='%23DED5DE'/%3E%3Crect x='6' y='6' width='4' height='4' fill='%23F8F8F8'/%3E%3C/svg%3E") 7;
}

.team-portal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 3px double #B8B8B0;
}

/* Red PokeText eyebrows shared by every section card. */
.team-portal-header p,
.team-create-card > span,
.team-my-requests > span,
.team-approval-card > span {
  margin: 0 0 4px;
  color: #C74637;
  font: 800 9px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .16em;
}

.team-portal-header h2 {
  margin: 0;
  color: #424242;
  font: 800 clamp(18px, 3vw, 27px)/1.1 'PokeText', ui-monospace, monospace;
  letter-spacing: .03em;
  text-shadow: 2px 2px 0 #D0D0C8;
}

.team-portal-header span {
  display: block;
  margin-top: 6px;
  color: #606060;
  font-size: 13px;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.team-portal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  color: #F8F8F8;
  font: 900 26px/28px system-ui, sans-serif;
  background: #E82010;
  border: 2px solid #293131;
  border-radius: 50%;
  box-shadow: 2px 2px 0 #293131;
  cursor: pointer;
}

/* ---- tab bar: Gen-3 menu strip with the ▶ cursor --------------------------- */

.team-portal-tabs {
  position: sticky;
  top: calc(clamp(10px, 2vw, 20px) * -1);
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0 0;
  padding: 4px;
  background: #F8F8F8;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE, 0 3px 0 rgba(41, 49, 49, .18);
}

.team-portal-tabs button {
  position: relative;
  min-height: 34px;
  padding: 6px 6px 6px 16px;
  color: #606060;
  font: 800 10px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .03em;
  text-shadow: 1px 1px 0 #D0D0C8;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}

.team-portal-tabs button:hover { color: #E00808; }

.team-portal-tabs button.is-active {
  color: #E00808;
  background: #FFFDF2;
  border-color: #F86858;
  box-shadow: inset 0 0 0 1px #FFD8D0;
}

.team-portal-tabs button.is-active::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -4px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #E00808;
  filter: drop-shadow(1px 1px 0 #D0D0C8);
}

/* ---- toolbar + live status --------------------------------------------------- */

.team-portal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  margin-top: 4px;
}

.team-portal-account {
  margin: 0;
  color: #205838;
  font: 800 9px/1.4 'PokeText', ui-monospace, monospace;
  letter-spacing: .05em;
  text-shadow: 1px 1px 0 #D0D0C8;
}

.team-portal-refresh,
.team-secondary-button {
  min-height: 32px;
  padding: 7px 10px;
  color: #424242;
  font: 800 9px/1 'PokeText', ui-monospace, monospace;
  background: #F8F8F8;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE, 2px 2px 0 #293131;
  cursor: pointer;
}

.team-portal-refresh:active,
.team-secondary-button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: inset 0 0 0 2px #DED5DE;
}

.team-portal-status {
  min-height: 1.3em;
  margin: 4px 0 8px;
  color: #606060;
  font-size: 12.5px;
  font-weight: 800;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.team-portal-status[data-kind="success"] { color: #205838; }
.team-portal-status[data-kind="error"] { color: #E00808; }

/* ---- section cards: white Gen-3 sticker windows ------------------------------ */

.team-find-layout,
.team-mine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, .8fr);
  gap: 14px;
}

.team-public-list,
.team-private-join,
.team-create-card,
.team-my-requests,
.team-roster-card,
.team-approval-card,
.team-portal-empty {
  padding: 14px;
  background: #FFFFFF;
  border: 3px solid #293131;
  border-radius: 8px;
  box-shadow: 4px 5px 0 rgba(41, 49, 49, .2);
}

.team-section-title,
.team-roster-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 2px dashed #B8B8B0;
}

.team-section-title span,
.team-roster-heading span,
.team-private-join > span,
.team-access-code span {
  color: #C74637;
  font: 800 9px/1.2 'PokeText', ui-monospace, monospace;
  letter-spacing: .14em;
}

/* Section names big in the dialogue face — the strongest thing on each card. */
.team-section-title h3,
.team-private-join h3,
.team-create-card h3,
.team-my-requests h3,
.team-roster-heading h3,
.team-approval-card h3,
.team-portal-empty h3 {
  margin: 4px 0 0;
  color: #424242;
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-weight: 400;
  font-size: clamp(17px, 2.4vw, 23px);
  line-height: 1.15;
  text-shadow: 2px 2px 0 #D0D0C8;
}

/* Count bubbles (public-team total, roster n/max). */
.team-section-title b,
.team-roster-heading b {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-content: center;
  color: #F8F8F8;
  font: 800 12px/1 'PokeText', ui-monospace, monospace;
  background: #E82010;
  border: 2px solid #293131;
  border-radius: 50%;
  box-shadow: inset 0 -5px 0 rgba(41, 49, 49, .2);
}

/* ---- public team rows --------------------------------------------------------- */

.team-public-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 13px 0;
  border-bottom: 1px dashed #B8B8B0;
}

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

.team-public-card h4 {
  margin: 0;
  color: #424242;
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.2;
  text-shadow: 1px 1px 0 #D0D0C8;
}

.team-public-card p {
  grid-column: 1;
  margin: 0;
  color: #606060;
  font-size: 12.5px;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.team-public-card div {
  display: flex;
  grid-column: 1;
  flex-wrap: wrap;
  gap: 6px;
}

/* Metadata chips: bordered Gen-3 plates instead of web pills. */
.team-public-card div span,
.team-my-requests article span {
  padding: 4px 6px 3px;
  color: #3050C8;
  font: 800 8px/1 'PokeText', ui-monospace, monospace;
  background: #B8D8F8;
  border: 1px solid #293131;
  border-radius: 3px;
}

.team-my-requests article span[data-status="pending"] {
  color: #8B6420;
  background: #F8E8A0;
}

.team-my-requests article span[data-status="declined"],
.team-my-requests article span[data-status="rejected"] {
  color: #A02020;
  background: #F8C8D8;
}

.team-my-requests article span[data-status="approved"] {
  color: #205838;
  background: #B8ECC0;
}

.team-public-card .team-primary-button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}

/* Primary actions: A-button yellow plates with hard shadows. */
.team-primary-button,
.team-approve-button,
.team-reject-button {
  min-height: 38px;
  padding: 9px 11px;
  color: #293131;
  font: 800 9.5px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .03em;
  background: #F8D048;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: 2px 2px 0 #293131;
  cursor: pointer;
}

.team-approve-button {
  color: #205838;
  background: #B8ECC0;
}

.team-reject-button {
  color: #A02020;
  background: #F8C8D8;
}

.team-primary-button:active:not(:disabled),
.team-approve-button:active,
.team-reject-button:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.team-primary-button:disabled,
.team-secondary-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

/* ---- private team join: taped-note card ---------------------------------------- */

.team-private-join {
  background: #FFF4D8;
  border-color: #293131;
}

.team-lock-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  place-content: center;
  color: #F8D048;
  font-size: 18px;
  background: #293131;
  border: 3px solid #4A4A6A;
  transform: rotate(45deg);
  box-shadow: 2px 2px 0 rgba(41, 49, 49, .3);
}

.team-private-join > p,
.team-create-card > p,
.team-my-requests > p,
.team-approval-card > p,
.team-portal-empty p {
  color: #606060;
  font-size: 12.5px;
  line-height: 1.5;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.team-private-join form,
.team-create-card form {
  display: grid;
  gap: 11px;
  margin-top: 13px;
}

.team-private-join label,
.team-create-card > form > label {
  display: grid;
  gap: 5px;
  color: #424242;
  font: 800 10px/1.3 'PokeText', ui-monospace, monospace;
  letter-spacing: .04em;
}

.team-private-join input,
.team-create-card input {
  min-height: 40px;
  padding: 8px 10px;
  color: #424242;
  font: 400 14px/1.3 'PokeDialogue', ui-rounded, sans-serif;
  background: #F8F8F8;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE;
}

/* ---- create team --------------------------------------------------------------- */

.team-create-card { max-width: 720px; }

.team-create-card fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 11px;
  border: 2px solid #293131;
  border-radius: 4px;
}

.team-create-card legend {
  padding: 0 5px;
  color: #424242;
  font: 800 10px/1 'PokeText', ui-monospace, monospace;
}

.team-create-card fieldset label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 8px;
  align-items: center;
  padding: 8px;
  background: #F8F8F8;
  border: 1px dashed #B8B8B0;
  border-radius: 4px;
}

.team-create-card fieldset label b {
  font: 800 10px/1 'PokeText', ui-monospace, monospace;
  color: #424242;
}

.team-create-card fieldset input[type="radio"] { accent-color: #E00808; }

.team-create-card fieldset small {
  grid-column: 2;
  color: #98988C;
  font-size: 10.5px;
}

/* ---- my team / requests --------------------------------------------------------- */

.team-my-requests { max-width: 720px; }

.team-my-requests article,
.team-approval-card article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed #B8B8B0;
}

.team-my-requests article strong,
.team-approval-card article strong {
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: #424242;
  text-shadow: 1px 1px 0 #D0D0C8;
}

.team-my-requests article small {
  color: #98988C;
  font: 800 9px/1 'PokeText', ui-monospace, monospace;
}

.team-roster-heading p {
  margin: 5px 0 0;
  color: #606060;
  font-size: 12.5px;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.team-roster {
  display: grid;
  gap: 7px;
  margin: 13px 0;
  padding: 0;
  list-style: none;
}

/* Roster rows read like Gen-3 party slots. */
.team-roster li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  background: #F8F8F8;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE;
}

.team-roster li strong {
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: #424242;
  text-shadow: 1px 1px 0 #D0D0C8;
}

.team-roster li span {
  color: #E00808;
  font: 800 8px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .06em;
}

/* Show-once access code: taped yellow note with PokeText code. */
.team-access-code {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding: 10px;
  background: #FFF4D8;
  border: 2px dashed #D8883C;
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(41, 49, 49, .14);
}

.team-access-code code {
  color: #424242;
  font: 800 17px/1.2 'PokeText', ui-monospace, monospace;
  letter-spacing: .12em;
  text-shadow: 1px 1px 0 #D0D0C8;
  overflow-wrap: anywhere;
}

.team-approval-card { background: #FFFDF2; }

.team-approval-card article div {
  display: flex;
  gap: 6px;
}

.team-inline-empty {
  padding: 12px;
  color: #606060;
  font-size: 12.5px;
  line-height: 1.45;
  text-shadow: 1px 1px 0 #E8E8E0;
  background: #F8F8F8;
  border: 1px dashed #B8B8B0;
  border-left: 4px solid #F8D048;
}

/* ---- HUD chip badge (leader's pending knocks) -------------------------------------- */

.team-portal-badge {
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 3px;
  place-content: center;
  color: #F8F8F8;
  font: 800 10px/1 'PokeText', ui-monospace, monospace;
  background: #E82010;
  border: 2px solid #293131;
  border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(41, 49, 49, .3);
  animation: team-knock-pop 1.07s steps(2, jump-none) infinite;
}

/* ---- lobby: Fortnite layout in the Gen-3 kit ---------------------------------------- */

.team-lobby {
  display: grid;
  gap: 14px;
}

/* Hero display — the team name is the loudest thing in the lobby. */
.team-lobby-hero {
  padding: 18px 14px 14px;
  text-align: center;
  background: #FFFFFF;
  border: 3px solid #293131;
  border-radius: 8px;
  box-shadow: 4px 5px 0 rgba(41, 49, 49, .2);
}

.team-lobby-hero > span {
  color: #C74637;
  font: 800 9px/1.2 'PokeText', ui-monospace, monospace;
  letter-spacing: .14em;
}

.team-lobby-name {
  margin: 8px 0 4px;
  color: #424242;
  font: 800 clamp(26px, 5vw, 44px)/1.05 'PokeText', ui-monospace, monospace;
  letter-spacing: .03em;
  text-shadow: 3px 3px 0 #D0D0C8;
  overflow-wrap: anywhere;
}

.team-lobby-hero p {
  margin: 0;
  color: #606060;
  font-size: 13px;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.team-lobby-body {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: start;
}

.team-lobby-code-card,
.team-lobby-blurb,
.team-knocks {
  display: grid;
  gap: 9px;
  padding: 14px;
  background: #FFFFFF;
  border: 3px solid #293131;
  border-radius: 8px;
  box-shadow: 4px 5px 0 rgba(41, 49, 49, .2);
}

.team-lobby-code-card > span,
.team-lobby-blurb > span,
.team-knocks > span {
  color: #C74637;
  font: 800 9px/1.2 'PokeText', ui-monospace, monospace;
  letter-spacing: .14em;
}

/* The code itself: a big taped plate, readable across the room. */
.team-lobby-code {
  justify-self: start;
  padding: 8px 14px;
  color: #424242;
  font: 800 clamp(21px, 3vw, 30px)/1.1 'PokeText', ui-monospace, monospace;
  letter-spacing: .2em;
  text-shadow: 2px 2px 0 #D0D0C8;
  background: #FFF4D8;
  border: 2px dashed #D8883C;
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(41, 49, 49, .14);
}

.team-lobby-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-lobby-link {
  color: #98988C;
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.team-blurb-field {
  min-height: 92px;
  padding: 9px 10px;
  color: #424242;
  font: 400 14px/1.45 'PokeDialogue', ui-rounded, sans-serif;
  background: #F8F8F8;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE;
  resize: vertical;
}

.team-lobby-blurb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-lobby-blurb-footer small {
  color: #98988C;
  font-size: 10.5px;
}

/* ---- knock-cards: pending join requests on the leader's lobby ---------------------- */

.team-knocks { background: #FFFDF2; }

.team-knocks h3 {
  margin: 0;
  color: #424242;
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-weight: 400;
  font-size: clamp(17px, 2.4vw, 23px);
  line-height: 1.15;
  text-shadow: 2px 2px 0 #D0D0C8;
}

.team-knocks > p {
  margin: 0;
  color: #606060;
  font-size: 12.5px;
  text-shadow: 1px 1px 0 #E8E8E0;
}

.team-knock-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #F8F8F8;
  border: 2px solid #293131;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #DED5DE;
}

.team-knock-card img {
  width: 34px;
  image-rendering: pixelated;
}

.team-knock-card strong {
  display: block;
  color: #424242;
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-weight: 400;
  font-size: 15px;
  text-shadow: 1px 1px 0 #D0D0C8;
}

.team-knock-card small {
  color: #98988C;
  font-size: 10.5px;
}

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

/* ---- squad slots: the bottom row ---------------------------------------------------- */

.team-squad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.team-squad-slot {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 128px;
  padding: 12px 8px 10px;
  text-align: center;
  background: #FFFFFF;
  border: 3px solid #293131;
  border-radius: 8px;
  box-shadow: 4px 5px 0 rgba(41, 49, 49, .2);
}

.team-squad-slot img {
  width: 44px;
  image-rendering: pixelated;
}

.team-squad-slot strong {
  color: #424242;
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-weight: 400;
  font-size: 14px;
  text-shadow: 1px 1px 0 #D0D0C8;
  overflow-wrap: anywhere;
}

.team-squad-slot span {
  padding: 3px 6px 2px;
  color: #3050C8;
  font: 800 8px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .06em;
  background: #B8D8F8;
  border: 1px solid #293131;
  border-radius: 3px;
}

.team-squad-slot.is-you { border-color: #E00808; }

.team-squad-slot.is-you span { color: #A02020; background: #FFD8D0; }

/* Empty seat = big friendly + INVITE plate. */
.team-slot-empty {
  align-content: center;
  color: #98988C;
  font: 800 12px/1 'PokeText', ui-monospace, monospace;
  letter-spacing: .05em;
  background: #F8F8F8;
  border-style: dashed;
  border-color: #B8B8B0;
  box-shadow: none;
  cursor: pointer;
}

.team-slot-empty:hover { color: #E00808; border-color: #F86858; }

.team-lobby-footer {
  display: flex;
  justify-content: flex-end;
}

/* ---- waiting room ------------------------------------------------------------------- */

.team-waiting-room {
  display: grid;
  gap: 12px;
  max-width: 650px;
  margin: 0 auto;
  padding: 18px 16px;
  text-align: center;
  background: #FFFFFF;
  border: 3px solid #293131;
  border-radius: 8px;
  box-shadow: 4px 5px 0 rgba(41, 49, 49, .2);
}

.team-waiting-room > span {
  color: #C74637;
  font: 800 9px/1.2 'PokeText', ui-monospace, monospace;
  letter-spacing: .14em;
}

.team-waiting-room h3 {
  margin: 0;
  color: #424242;
  font: 800 clamp(22px, 4vw, 34px)/1.1 'PokeText', ui-monospace, monospace;
  letter-spacing: .03em;
  text-shadow: 3px 3px 0 #D0D0C8;
  overflow-wrap: anywhere;
}

.team-waiting-line {
  margin: 0;
  color: #606060;
  font-size: 14px;
  text-shadow: 1px 1px 0 #E8E8E0;
}

/* The Gen-3 red advance cursor, pulsing while the leader decides. */
.team-wait-cursor {
  display: inline-block;
  margin-left: 8px;
  color: #E00808;
  animation: team-knock-pop 1.07s steps(2, jump-none) infinite;
}

.team-squad-ghost-row {
  grid-template-columns: minmax(0, 220px);
  justify-content: center;
}

/* Your seat, ghosted until the leader accepts. */
.team-squad-slot.is-ghost {
  border-style: dashed;
  border-color: #7373AC;
  background: #F8F8F8;
  box-shadow: none;
  animation: team-ghost-breathe 2.14s steps(2, jump-none) infinite;
}

.team-squad-slot.is-ghost img {
  filter: grayscale(1) opacity(.55);
}

.team-squad-slot.is-ghost span {
  color: #8B6420;
  background: #F8E8A0;
}

.team-waiting-note {
  color: #98988C;
  font-size: 10.5px;
  line-height: 1.5;
}

.team-waiting-others {
  display: grid;
  gap: 6px;
  text-align: left;
}

.team-waiting-others article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #F8F8F8;
  border: 1px dashed #B8B8B0;
  border-radius: 4px;
}

.team-waiting-others strong {
  color: #424242;
  font-family: 'PokeDialogue', ui-rounded, sans-serif;
  font-weight: 400;
  font-size: 13px;
}

.team-waiting-others span {
  padding: 4px 6px 3px;
  font: 800 8px/1 'PokeText', ui-monospace, monospace;
  border: 1px solid #293131;
  border-radius: 3px;
}

.team-waiting-others span[data-status="pending"] { color: #8B6420; background: #F8E8A0; }
.team-waiting-others span[data-status="rejected"],
.team-waiting-others span[data-status="declined"] { color: #A02020; background: #F8C8D8; }
.team-waiting-others span[data-status="withdrawn"] { color: #606060; background: #DED5DE; }
.team-waiting-others span[data-status="approved"] { color: #205838; background: #B8ECC0; }

@keyframes team-knock-pop {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(2px); opacity: .35; }
}

@keyframes team-ghost-breathe {
  from { border-color: #7373AC; }
  to { border-color: #DED5DE; }
}

@media (prefers-reduced-motion: reduce) {
  .team-portal-badge,
  .team-wait-cursor,
  .team-squad-slot.is-ghost {
    animation: none;
  }
}

/* ---- empty / error states --------------------------------------------------------- */

.team-portal-empty {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.team-portal-empty > span {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  place-content: center;
  color: #F8F8F8;
  font: 800 24px/1 'PokeText', ui-monospace, monospace;
  background: #626294;
  border: 3px solid #293131;
  border-radius: 50%;
  box-shadow: inset 0 -6px 0 #4A4A6A;
}

.team-portal-error > span { background: #E82010; box-shadow: inset 0 -6px 0 rgba(41, 49, 49, .3); }

.team-portal-error small { color: #A02020; }

@media (max-width: 760px) {
  .team-portal-open {
    top: 54px;
    right: 10px;
    min-width: 108px;
    min-height: 36px;
    font-size: 9px;
  }

  .team-portal { --u: 1.5px; padding: 4px; }

  .team-portal-panel { padding: 9px 8px 14px; }

  .team-find-layout,
  .team-mine-layout,
  .team-lobby-body {
    grid-template-columns: 1fr;
  }

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

  .team-lobby-blurb-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-public-card { grid-template-columns: 1fr; }

  .team-public-card .team-primary-button {
    grid-column: 1;
    grid-row: auto;
  }

  .team-portal-tabs { top: -10px; }
}

@media (max-width: 390px) {
  .team-portal-tabs button {
    padding-left: 12px;
    font-size: 8px;
  }

  .team-portal-header span { display: none; }

  .team-my-requests article,
  .team-approval-card article {
    align-items: flex-start;
    flex-direction: column;
  }
}
