/* Roster showcase. Every rule stays within the home roster surface. */
.home-screen .home-visual {
  --roster-rare: #c7a1ff;
  --roster-rare-line: #a985de;
  --roster-rare-fill: #46335f;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 8px;
  border: 0;
  background: none;
  box-shadow: none;
}
.home-screen .roster-faction-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 0 0 48px;
  gap: 6px;
  width: 100%;
  margin: 0;
}
.home-screen .roster-faction-tabs button {
  --faction-tab: #9ed3eb;
  --faction-tab-line: #709ab0;
  --faction-tab-fill: #233c49;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #52636d;
  border-radius: 4px;
  background: #17262e;
  color: #aabac3;
  text-align: left;
  box-shadow: inset 0 1px #e6f4ff08;
  touch-action: manipulation;
}
.home-screen .roster-faction-tabs button[data-squad-view="t"] {
  --faction-tab: #efcb83;
  --faction-tab-line: #b99c64;
  --faction-tab-fill: #3d392c;
}
.home-screen .roster-faction-tabs button[aria-pressed="true"] {
  color: var(--faction-tab);
  border-color: var(--faction-tab-line);
  background: linear-gradient(105deg, var(--faction-tab-fill), #1a2a31);
  box-shadow: inset 0 -2px var(--faction-tab-line), inset 0 1px #ffffff12;
}
.home-screen .roster-faction-tabs .faction-mark,
.home-screen .roster-faction-tabs mark { flex: 0 0 25px; width: 25px; height: 25px; margin: 0; color: inherit; background: none; }
.home-screen .roster-faction-tabs b { font-size: 13px; line-height: 1.2; white-space: nowrap; }
.home-screen .roster-faction-tabs small { margin-left: auto; font: 600 10px/1.2 var(--mono); letter-spacing: .7px; color: inherit; opacity: .76; }
.home-screen .roster-panel {
  --roster-accent: #9bcfe7;
  --roster-edge: #678a9e;
  --roster-soft: #385b70;
  --roster-wash: #273e4c;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #69828e80;
  border-radius: 5px;
  background: #182830;
  box-shadow: inset 0 1px #e6f3ff0d, 0 6px 20px #070f171c;
}
.home-screen .roster-panel[data-roster-side="t"] {
  --roster-accent: #edca80;
  --roster-edge: #a88e5e;
  --roster-soft: #695d3c;
  --roster-wash: #3d3b2e;
}
.home-screen[data-squad-view="ct"] .roster-panel[data-roster-side="t"],
.home-screen[data-squad-view="t"] .roster-panel[data-roster-side="ct"] { display: none; }
.home-screen .roster-panel-header {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 42px;
  min-width: 0;
  padding: 6px 12px;
  border-bottom: 1px solid #bfd7e21c;
  background: linear-gradient(105deg, var(--roster-wash), #19282f);
}
.home-screen .roster-panel-header > .faction-mark { flex: 0 0 26px; width: 26px; height: 26px; margin: 0; color: var(--roster-accent); }
.home-screen .roster-panel-header > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.home-screen .roster-overline { font: 500 9px/1.2 var(--mono); color: #a0b6c0; letter-spacing: 1.1px; }
.home-screen .roster-panel-header b { font-size: 12px; line-height: 1.25; color: #e3edf0; white-space: nowrap; }
.home-screen .roster-count { margin-left: auto; color: var(--roster-accent); font: 600 10px/1.2 var(--mono); white-space: nowrap; }
.home-screen .roster-focus {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(120deg, var(--roster-wash), #18272f 77%);
}
.home-screen .roster-focus-art {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  background-image: linear-gradient(#adc9d207 1px, transparent 1px), linear-gradient(90deg, #adc9d207 1px, transparent 1px);
  background-size: 22px 22px;
}
.home-screen .roster-focus-art::after { content: ""; position: absolute; inset: auto 9% 0; height: 1px; z-index: -1; background: linear-gradient(90deg, transparent, var(--roster-edge), transparent); }
.home-screen .roster-watermark { position: absolute; top: 12%; left: 5%; color: var(--roster-accent); opacity: .075; font: 900 clamp(65px, 7.5vw, 108px)/1 var(--sans); letter-spacing: -6px; pointer-events: none; }
.home-screen .roster-watermark .faction-mark { width: 145px; height: 145px; }
.home-screen .roster-focus-portrait { position: absolute; inset: 5px 0 0; display: flex; align-items: flex-end; justify-content: center; min-width: 0; min-height: 0; }
.home-screen .roster-focus-portrait > img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: center bottom; }
.home-screen .roster-index { position: absolute; left: 10px; bottom: 9px; color: #c3d7de80; font: 500 10px/1 var(--mono); letter-spacing: 1px; }
.home-screen .roster-focus[data-profile-kind="avatar"] .roster-focus-portrait,
.home-screen .roster-focus[data-profile-kind="emblem"] .roster-focus-portrait { inset: 0; align-items: center; }
.home-screen .roster-focus[data-profile-kind="avatar"] .roster-focus-portrait > img { width: min(132px, 65%); height: auto; aspect-ratio: 1; object-fit: cover; object-position: center; border: 1px solid var(--roster-edge); border-radius: 6px; padding: 5px; background: #17252e; box-shadow: 0 0 0 6px #aecadd07, 0 10px 24px #070f1740; }
.home-screen .roster-focus[data-profile-kind="emblem"] .roster-focus-portrait > img { width: min(138px, 70%); height: 65%; object-fit: contain; }
.home-screen .roster-focus-info { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; padding: 18px 14px 18px 7px; }
.home-screen .roster-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.home-screen .roster-name-row h2 { margin: 0; color: #f0f4f4; font-size: 24px; line-height: 1.2; letter-spacing: -.7px; overflow-wrap: anywhere; }
.home-screen .roster-rarity { display: inline-flex; align-items: center; min-height: 20px; padding: 3px 5px; border: 1px solid #849ea74d; border-radius: 3px; color: #afc1c9; background: #18303b; font-size: 9px; line-height: 1; white-space: nowrap; }
.home-screen .roster-rarity[hidden] { display: none; }
.home-screen .roster-focus[data-rarity="rare"] .roster-rarity { border-color: var(--roster-rare-line); color: var(--roster-rare); background: #362b45; }
.home-screen .roster-role { margin: 8px 0 0; color: var(--roster-accent); font-size: 12px; line-height: 1.4; font-weight: 650; letter-spacing: .5px; }
.home-screen .roster-focus[data-rarity="rare"] .roster-role { color: var(--roster-rare); }
.home-screen .roster-quote { margin: 14px 0 0; color: #e0e8eb; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.home-screen .roster-focus-info .role-reveal { display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; min-height: 44px; max-width: 100%; margin: 7px 0 0; padding: 6px 9px; border: 1px solid #97bbc05c; border-radius: 3px; color: #c7dce3; background: #14252d; font-size: 11px; line-height: 1.3; touch-action: manipulation; }
.home-screen .roster-focus-info .role-secret-wrap { display: inline-block; min-height: 16px; }
.home-screen .roster-secret .role-secret[aria-hidden="true"],
.home-screen .roster-secret[aria-expanded="true"] .roster-secret-label { display: none; }
.home-screen .roster-secret[aria-expanded="true"] .role-secret { opacity: 1; color: #dfc580; }
.home-screen .roster-selectors { flex: 0 0 auto; min-width: 0; padding: 9px 10px 10px; border-top: 1px solid #abc5cf26; background: #13232b; }
.home-screen .roster-group-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 0 7px; color: #a1b8c3; font-size: 10px; line-height: 1.2; letter-spacing: .6px; }
.home-screen .roster-group-label > span { color: #819ba8; font: 500 9px/1.2 var(--mono); letter-spacing: .6px; }
.home-screen .roster-grid, .home-screen .roster-support-grid { display: grid; gap: 5px; min-width: 0; }
.home-screen .roster-ct-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.home-screen .roster-t-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-screen .roster-pick { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 74px; padding: 5px 3px; overflow: hidden; border: 1px solid #6076805c; border-radius: 3px; background: linear-gradient(150deg, #ffffff05, #ffffff00), #1b2c35; color: #d0dde2; cursor: pointer; touch-action: manipulation; box-shadow: inset 0 1px #c7dce807; }
.home-screen .roster-pick > img { display: block; flex: 0 0 auto; width: 34px; height: 32px; margin: 0; border-radius: 2px; object-fit: contain; object-position: center; }
.home-screen .roster-pick > img.profile-portrait { width: 30px; height: 30px; object-fit: cover; }
.home-screen .roster-pick-name { display: block; max-width: 100%; font-size: 11px; font-weight: 650; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-screen .roster-pick-role { display: block; max-width: 100%; color: #98afbb; font-size: 9px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-screen .roster-pick[aria-pressed="true"] { border-color: var(--roster-accent); background: linear-gradient(145deg, var(--roster-wash), #20323b); color: #f1f6f6; box-shadow: inset 0 -2px var(--roster-accent), inset 0 1px #ffffff0c; }
.home-screen .roster-pick[aria-pressed="true"] .roster-pick-role { color: var(--roster-accent); }
.home-screen .roster-pick[data-rarity="rare"] { border-color: #8f71b890; }
.home-screen .roster-pick[data-rarity="rare"][aria-pressed="true"] { border-color: var(--roster-rare); box-shadow: inset 0 -2px var(--roster-rare), inset 0 1px #ffffff0c; }
.home-screen .roster-pick[data-rarity="rare"][aria-pressed="true"] .roster-pick-role { color: var(--roster-rare); }
.home-screen .roster-mini-badge { position: absolute; top: 3px; right: 3px; min-width: 18px; padding: 2px 3px; border: 1px solid #aa82dc80; border-radius: 2px; color: var(--roster-rare); background: #33263fea; font-size: 8px; line-height: 1; letter-spacing: 0; }
.home-screen .roster-support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 6px; }
.home-screen .roster-support-grid .roster-pick { display: grid; grid-template-columns: 31px minmax(0, 1fr); grid-template-rows: auto auto; min-height: 46px; padding: 5px 9px; gap: 2px 7px; text-align: left; align-content: center; }
.home-screen .roster-support-grid .roster-pick > img { grid-column: 1; grid-row: 1 / 3; width: 30px; height: 30px; }
.home-screen .roster-support-grid .roster-pick-name, .home-screen .roster-support-grid .roster-pick-role { grid-column: 2; }
.home-screen .roster-support-grid .roster-mini-badge { top: 5px; right: 5px; }
.home-screen .roster-t-grid .roster-pick { min-height: 66px; }
.home-screen .roster-t-grid .roster-pick > img { width: 31px; height: 28px; }
.home-screen :is(.roster-pick, .roster-faction-tabs button, .roster-focus-info .role-reveal):focus-visible { outline: 2px solid #eff9fd; outline-offset: -4px; }
.home-screen :is(.roster-pick, .roster-faction-tabs button):active { transform: none; background: #324952; }
@media (hover: hover) {
  .home-screen .roster-pick:hover { border-color: var(--roster-edge); background-color: #263c46; }
  .home-screen .roster-pick[data-rarity="rare"]:hover { border-color: var(--roster-rare); }
  .home-screen .roster-faction-tabs button:hover { border-color: var(--faction-tab-line); }
}
@media (min-width: 761px) {
  .home-screen .home-visual { height: 500px; align-self: start; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .home-screen .roster-faction-tabs button { gap: 6px; padding-inline: 8px; }
  .home-screen .roster-faction-tabs small { display: none; }
  .home-screen .roster-panel-header { padding-inline: 9px; gap: 7px; }
  .home-screen .roster-panel-header > div { flex-direction: column; gap: 2px; }
  .home-screen .roster-name-row h2 { font-size: 20px; }
  .home-screen .roster-focus-info { padding-right: 10px; }
  .home-screen .roster-quote { font-size: 12px; }
  .home-screen .roster-pick-name { font-size: 10px; }
  .home-screen .roster-pick-role { font-size: 8px; }
}
@media (max-width: 760px) {
  .home-screen[data-home-view="squad"] .home-visual { display: flex; height: auto; flex: 1 1 0; min-height: 0; gap: 8px; }
  .home-screen .roster-faction-tabs { flex: 0 0 46px; }
  .home-screen .roster-faction-tabs button { padding: 6px 10px; }
  .home-screen .roster-faction-tabs small { display: none; }
  .home-screen .roster-panel-header { flex-basis: 36px; padding: 5px 10px; }
  .home-screen .roster-panel-header > .faction-mark { width: 23px; height: 23px; flex-basis: 23px; }
  .home-screen .roster-panel-header > div { gap: 8px; }
  .home-screen .roster-panel-header b { font-size: 11px; }
  .home-screen .roster-overline { font-size: 8px; }
  .home-screen .roster-count { font-size: 9px; }
  .home-screen .roster-focus { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .home-screen .roster-focus-art { min-height: 0; }
  .home-screen .roster-focus-portrait { inset: 3px 6% 0; }
  .home-screen .roster-watermark { top: 15%; left: 13%; font-size: 90px; }
  .home-screen .roster-index { left: 12px; bottom: 8px; }
  .home-screen .roster-focus[data-profile-kind="avatar"] .roster-focus-portrait > img { width: auto; height: min(120px, 75%); max-width: 50%; }
  .home-screen .roster-focus[data-profile-kind="emblem"] .roster-focus-portrait > img { width: 110px; height: 76%; }
  .home-screen .roster-focus-info { position: relative; display: block; padding: 10px 12px 11px; border-top: 1px solid #a4c5d317; background: linear-gradient(110deg, #15272eee, #1b2b33); }
  .home-screen .roster-name-row { gap: 8px; }
  .home-screen .roster-name-row h2 { font-size: 20px; letter-spacing: -.5px; }
  .home-screen .roster-rarity { min-height: 18px; padding: 3px 5px; }
  .home-screen .roster-role { margin-top: 4px; font-size: 11px; line-height: 1.25; }
  .home-screen .roster-quote { margin-top: 5px; font-size: 12px; line-height: 1.35; }
  .home-screen .roster-focus-info:has(.role-reveal) { padding-right: 104px; min-height: 80px; }
  .home-screen .roster-focus-info .role-reveal { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); max-width: 91px; margin: 0; padding: 6px; font-size: 10px; }
  .home-screen .roster-selectors { padding: 8px; }
  .home-screen .roster-group-label { margin-bottom: 6px; font-size: 9px; }
  .home-screen .roster-grid, .home-screen .roster-support-grid { gap: 4px; }
  .home-screen .roster-pick { min-height: 72px; gap: 3px; padding: 4px 2px; }
  .home-screen .roster-pick > img { width: 31px; height: 30px; }
  .home-screen .roster-pick > img.profile-portrait { width: 29px; height: 29px; }
  .home-screen .roster-pick-name { font-size: 10px; }
  .home-screen .roster-pick-role { font-size: 9px; }
  .home-screen .roster-support-grid { margin-top: 5px; }
  .home-screen .roster-support-grid .roster-pick { min-height: 44px; padding: 4px 7px; }
  .home-screen .roster-t-grid .roster-pick { min-height: 65px; }
}
@media (max-width: 760px) and (max-height: 590px) {
  .home-screen .roster-focus-info { padding-block: 7px; }
  .home-screen .roster-quote { display: none; }
  .home-screen .roster-pick { min-height: 64px; }
  .home-screen .roster-t-grid .roster-pick { min-height: 59px; }
  .home-screen .roster-pick > img { height: 25px; width: 27px; }
  .home-screen .roster-pick > img.profile-portrait { width: 25px; height: 25px; }
}
@media (max-width: 760px) and (max-height: 520px) {
  .home-screen[data-home-view="squad"] .home-visual { gap: 5px; }
  .home-screen .roster-faction-tabs { flex-basis: 44px; }
  .home-screen .roster-panel-header { flex-basis: 27px; padding-block: 3px; }
  .home-screen .roster-panel-header > .faction-mark { width: 20px; height: 20px; flex-basis: 20px; }
  .home-screen .roster-overline { display: none; }
  .home-screen .roster-focus { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .home-screen .roster-focus-portrait { inset: 3px 0 0; }
  .home-screen .roster-focus-info { display: flex; justify-content: center; padding: 7px 9px 7px 5px; border-top: 0; background: none; }
  .home-screen .roster-name-row { gap: 4px 6px; }
  .home-screen .roster-name-row h2 { font-size: 18px; }
  .home-screen .roster-role { font-size: 10px; margin-top: 5px; }
  .home-screen .roster-index { left: 5px; bottom: 5px; font-size: 8px; }
  .home-screen .roster-watermark { top: 15%; left: 7%; font-size: 65px; }
  .home-screen .roster-focus[data-profile-kind="avatar"] .roster-focus-portrait > img { width: min(88px, 66%); height: auto; max-height: 75%; max-width: 70%; padding: 3px; }
  .home-screen .roster-focus[data-profile-kind="emblem"] .roster-focus-portrait > img { width: 78px; height: 66%; }
  .home-screen .roster-focus-info:has(.role-reveal) { min-height: 0; padding-right: 7px; }
  .home-screen .roster-focus-info .role-reveal { position: static; transform: none; min-height: 44px; margin-top: 5px; max-width: 100%; padding: 4px 6px; }
  .home-screen .roster-selectors { padding: 5px 6px 6px; }
  .home-screen .roster-group-label { margin-bottom: 4px; font-size: 8px; line-height: 1.2; }
  .home-screen .roster-group-label > span { font-size: 8px; }
  .home-screen .roster-pick { min-height: 54px; gap: 2px; padding: 3px 2px; }
  .home-screen .roster-pick > img, .home-screen .roster-pick > img.profile-portrait { width: 23px; height: 21px; }
  .home-screen .roster-pick-name { font-size: 9px; line-height: 1.15; }
  .home-screen .roster-pick-role { font-size: 8px; line-height: 1.15; }
  .home-screen .roster-support-grid { margin-top: 4px; }
  .home-screen .roster-support-grid .roster-pick { min-height: 44px; grid-template-columns: 25px minmax(0, 1fr); padding: 3px 6px; gap: 2px 5px; }
  .home-screen .roster-support-grid .roster-pick > img { width: 24px; height: 26px; }
  .home-screen .roster-support-grid .roster-pick-name { font-size: 10px; }
  .home-screen .roster-t-grid .roster-pick { min-height: 50px; }
  .home-screen .roster-t-grid .roster-pick > img { width: 22px; height: 20px; }
  .home-screen .roster-mini-badge { top: 2px; right: 2px; font-size: 7px; padding: 2px; min-width: 16px; }
}
@media (max-width: 360px) {
  .home-screen .roster-faction-tabs b { font-size: 12px; }
  .home-screen .roster-faction-tabs small { font-size: 8px; letter-spacing: .3px; }
  .home-screen .roster-panel-header > div { gap: 5px; }
  .home-screen .roster-pick-name { font-size: 9px; }
  .home-screen .roster-pick-role { font-size: 8px; }
  .home-screen .roster-mini-badge { font-size: 7px; padding-inline: 2px; }
}

/* Rarity is shared across factions, including the full portrait and selected card. */
.home-screen .roster-focus[data-rarity="rare"] { --roster-accent:var(--roster-rare); --roster-edge:var(--roster-rare-line); --roster-wash:#322941; background:linear-gradient(120deg,#322941,#1d2631 77%); }
.home-screen .roster-focus[data-rarity="rare"] .roster-focus-info { background:linear-gradient(110deg,#262232ee,#1d2631); }
.home-screen .roster-pick[data-rarity="rare"][aria-pressed="true"] { background:linear-gradient(145deg,#423151,#222c38); }
