:root {
  --ice: #f4fbff;
  --ink: #111a1f;
  --muted: #5d6a70;
  --navy: #15253e;
  --gold: #f69e18;
  --burgundy: #842834;
  --green: #15253e;
  --green-2: #223957;
  --red: #842834;
  --blue: #1d6fa3;
  --page-bg: #f4fbff;
  --page-grid: rgba(21, 37, 62, 0.055);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-soft: rgba(21, 37, 62, 0.04);
  --text: #111a1f;
  --text-muted: #5d6a70;
  --line: rgba(17, 26, 31, 0.12);
  --panel: var(--surface);
  --shadow: 0 18px 50px rgba(16, 31, 36, 0.14);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ice: #0d1420;
  --ink: #f6f8fb;
  --muted: #aeb8c7;
  --page-bg: #0d1420;
  --page-grid: rgba(246, 158, 24, 0.08);
  --surface: rgba(18, 29, 47, 0.94);
  --surface-solid: #121d2f;
  --surface-soft: rgba(246, 158, 24, 0.08);
  --text: #f6f8fb;
  --text-muted: #aeb8c7;
  --line: rgba(255, 255, 255, 0.14);
  --panel: var(--surface);
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(rgba(244, 251, 255, 0.9), rgba(244, 251, 255, 0.9)),
    url("./assets/eagles-ice-bg.png") center top / cover fixed no-repeat,
    var(--page-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background-color 180ms ease, color 180ms ease;
}

:root[data-theme="dark"] body {
  background:
    linear-gradient(rgba(13, 20, 32, 0.2), rgba(13, 20, 32, 0.28)),
    url("./assets/eagles-ice-bg.png") center top / cover fixed no-repeat,
    var(--page-bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.theme-toggle {
  position: absolute;
  z-index: 5;
  top: 30px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  padding: 0 14px;
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .theme-toggle {
  background: rgba(21, 37, 62, 0.92);
  color: white;
  border-color: rgba(246, 158, 24, 0.38);
}

.hero {
  position: relative;
  min-height: clamp(150px, 24vh, 230px);
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(7, 19, 37, 0.9), rgba(7, 19, 37, 0.48) 58%, rgba(7, 19, 37, 0.18)),
    url("./assets/eagles-ice-bg.png") center center / cover no-repeat,
    #15253e;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  display: none;
}

.hero::after {
  inset: 0;
  background: linear-gradient(180deg, transparent 0 72%, rgba(7, 19, 37, 0.22));
}

.hero__content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(14px, 3vw, 24px);
  width: min(760px, 92%);
  padding: clamp(18px, 4vw, 34px);
  color: white;
}

.hero__text {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(1.9rem, 4.2vw, 3.25rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.hero__copy {
  display: none;
  max-width: 520px;
  margin-bottom: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.45;
}

.team-tagline {
  display: block;
  margin-bottom: 0;
  color: var(--gold);
  font-size: clamp(0.9rem, 1.7vw, 1.1rem);
  font-weight: 950;
  line-height: 1.25;
}

.team-logo {
  display: block;
  object-fit: contain;
}

.team-logo--hero {
  width: clamp(58px, 8vw, 88px);
  height: clamp(52px, 7vw, 78px);
  margin-bottom: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.team-logo--panel {
  width: 58px;
  height: 52px;
  flex: 0 0 auto;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-panel,
.dashboard {
  margin-top: -34px;
  position: relative;
  z-index: 2;
}

.login-panel,
.topbar,
.team-hq,
.squad-missions,
.team-roles,
.team-streaks,
.team-matchups,
.meter-card,
.log-card,
.workouts,
.notification-panel,
.team-identity,
.team-standings,
.badge-shelf,
.leaderboard,
.chirp-board,
.team-chat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 34px rgba(16, 31, 36, 0.1);
  backdrop-filter: blur(14px);
}

:root[data-theme="dark"] .login-panel,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .team-hq,
:root[data-theme="dark"] .squad-missions,
:root[data-theme="dark"] .team-roles,
:root[data-theme="dark"] .team-streaks,
:root[data-theme="dark"] .team-matchups,
:root[data-theme="dark"] .meter-card,
:root[data-theme="dark"] .log-card,
:root[data-theme="dark"] .workouts,
:root[data-theme="dark"] .notification-panel,
:root[data-theme="dark"] .team-identity,
:root[data-theme="dark"] .team-standings,
:root[data-theme="dark"] .badge-shelf,
:root[data-theme="dark"] .leaderboard,
:root[data-theme="dark"] .chirp-board,
:root[data-theme="dark"] .team-chat {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.login-panel {
  padding: clamp(18px, 3vw, 28px);
}

.login-grid,
.challenge-grid,
.chirp-targets,
.preset-row {
  display: grid;
  gap: 10px;
}

.login-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin: 18px 0;
}

.login-grid button,
.preset-row button,
.chirp-targets button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  min-height: 44px;
  font-weight: 800;
}

.login-grid button {
  display: grid;
  align-content: center;
  gap: 2px;
  text-align: left;
  padding: 8px 12px;
}

.login-grid button strong,
.login-grid button span {
  display: block;
}

.login-grid button span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.login-grid button.is-selected {
  border-color: rgba(246, 158, 24, 0.72);
  background: rgba(246, 158, 24, 0.13);
  box-shadow: inset 0 0 0 2px rgba(246, 158, 24, 0.24);
  animation: selected-player-glow 1500ms ease-in-out infinite alternate;
}

.login-loading {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-muted);
  padding: 18px;
  font-weight: 900;
  text-align: center;
}

.pin-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.pin-panel h3,
.pin-panel p {
  margin-bottom: 0;
}

.pin-panel #pinHelp {
  margin-top: 4px;
  color: var(--text-muted);
  line-height: 1.35;
}

.pin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pin-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.pin-field input {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 950;
  letter-spacing: 0.24em;
}

#coachCodeInput {
  letter-spacing: 0;
}

.pin-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.coach-help {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.coach-help button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0;
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pin-actions button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 900;
}

.pin-actions button[type="button"] {
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
}

.pin-actions button[type="submit"] {
  border: 0;
  background: var(--navy);
  color: white;
}

.pin-error {
  min-height: 20px;
  color: var(--burgundy);
  font-size: 0.9rem;
  font-weight: 850;
}

.log-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-solid);
  color: var(--text);
}

input::placeholder {
  color: color-mix(in srgb, var(--text-muted), transparent 18%);
}

.input-row button,
.primary-action {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-action {
  width: 100%;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-action.is-saved {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(240, 189, 57, 0.28);
  transform: translateY(-1px);
}

.dashboard {
  display: grid;
  gap: 16px;
}

.dashboard-tabs {
  position: sticky;
  top: 10px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 10px 30px rgba(16, 31, 36, 0.1);
  padding: 8px;
  backdrop-filter: blur(14px);
}

.dashboard-tabs button {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 10px;
  text-align: left;
}

.dashboard-tabs strong,
.dashboard-tabs span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-tabs strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 950;
}

.dashboard-tabs span {
  font-size: 0.76rem;
  font-weight: 850;
}

.dashboard-tabs button.is-active {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(246, 158, 24, 0.2);
}

.dashboard-tabs button.is-active strong,
.dashboard-tabs button.is-active span {
  color: var(--navy);
}

.dashboard-panel-hidden {
  display: none !important;
}

:root[data-theme="dark"] .dashboard-tabs {
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.topbar,
.section-heading,
.meter-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  padding: 18px;
}

.active-player-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 900;
}

:root[data-theme="dark"] .icon-button {
  color: var(--gold);
}

.celly-toast {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  pointer-events: none;
}

.celly-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(420px, 100%);
  overflow: hidden;
  border: 2px solid rgba(246, 158, 24, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(116deg, transparent 0 58%, rgba(246, 158, 24, 0.96) 58.3% 61.4%, transparent 61.7%),
    linear-gradient(135deg, rgba(21, 37, 62, 0.98), rgba(132, 40, 52, 0.96));
  color: white;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  animation: celly-pop 1800ms ease both;
}

.celly-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%);
  animation: celly-shine 900ms ease 120ms both;
}

.celly-card::before {
  content: "";
  position: absolute;
  left: -38px;
  bottom: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, white 0 18%, #111a1f 19% 22%, white 23% 100%);
  box-shadow: 16px 0 22px rgba(246, 158, 24, 0.72);
  animation: puck-streak 760ms cubic-bezier(0.2, 0.82, 0.28, 1) 120ms both;
}

.celly-card img {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  padding: 7px;
  object-fit: contain;
}

.celly-card div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.celly-card p,
.celly-card strong,
.celly-card span {
  display: block;
  margin: 0;
}

.celly-card p {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.celly-card strong {
  margin-top: 2px;
  font-size: clamp(1.8rem, 9vw, 3.1rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.celly-card span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.25;
}

.celly-light {
  position: absolute;
  top: -30px;
  right: -26px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 158, 24, 0.98) 0 30%, rgba(246, 158, 24, 0.26) 31% 58%, transparent 59%);
  box-shadow: 0 0 28px rgba(246, 158, 24, 0.8);
  animation: celly-light 520ms ease-in-out 3 alternate;
}

@keyframes celly-pop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  12%,
  82% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

@keyframes celly-shine {
  to {
    transform: translateX(120%);
  }
}

@keyframes celly-light {
  from {
    opacity: 0.45;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes puck-streak {
  0% {
    opacity: 0;
    transform: translateX(0) translateY(12px) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(500px) translateY(-42px) rotate(520deg);
  }
}

@keyframes selected-player-glow {
  from {
    box-shadow: inset 0 0 0 2px rgba(246, 158, 24, 0.18), 0 0 0 rgba(246, 158, 24, 0);
  }
  to {
    box-shadow: inset 0 0 0 2px rgba(246, 158, 24, 0.34), 0 0 22px rgba(246, 158, 24, 0.22);
  }
}

@keyframes winner-shimmer {
  0%,
  48% {
    transform: translateX(-30%);
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  100% {
    transform: translateX(30%);
    opacity: 0;
  }
}

@keyframes badge-pop {
  0% {
    opacity: 0.45;
    transform: translateY(5px) scale(0.96);
  }
  70% {
    transform: translateY(-1px) scale(1.015);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes workout-card-pop {
  0% {
    transform: scale(0.985);
  }
  55% {
    transform: scale(1.012);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes leaderboard-row-glow {
  0% {
    opacity: 0.72;
    transform: translateY(7px);
    filter: drop-shadow(0 0 0 rgba(246, 158, 24, 0));
  }
  58% {
    opacity: 1;
    transform: translateY(0);
    filter: drop-shadow(0 8px 18px rgba(246, 158, 24, 0.16));
  }
  100% {
    filter: drop-shadow(0 0 0 rgba(246, 158, 24, 0));
  }
}

@keyframes reaction-bounce {
  0% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-3px) scale(1.24) rotate(-8deg);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.quick-log,
.team-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.72fr);
  gap: 16px;
}

.meter-card,
.log-card,
.team-hq,
.squad-missions,
.team-roles,
.team-streaks,
.team-matchups,
.workouts,
.notification-panel,
.team-identity,
.team-standings,
.beauty-board,
.avatar-locker,
.badge-shelf,
.leaderboard,
.chirp-board,
.team-chat {
  padding: 18px;
}

.active-team-name {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 850;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  background: rgba(240, 189, 57, 0.22);
  color: #7a4100;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.team-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  border: 1px solid rgba(17, 26, 31, 0.1);
  border-radius: 999px;
  background: color-mix(in srgb, var(--team-color) 18%, transparent);
  color: var(--text);
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 950;
  vertical-align: middle;
  white-space: nowrap;
}

.team-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--team-color);
  box-shadow: 0 0 0 1px rgba(17, 26, 31, 0.18);
}

:root[data-theme="dark"] .badge {
  background: rgba(246, 158, 24, 0.18);
  color: #ffd083;
}

.team-hq {
  display: grid;
  gap: 16px;
  margin: 16px 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(21, 37, 62, 0.96), rgba(21, 37, 62, 0.9) 52%, rgba(132, 40, 52, 0.92)),
    var(--navy);
  color: white;
}

.team-hq__hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.team-hq__hero h2,
.team-hq__hero p {
  margin-bottom: 0;
}

.team-hq__hero #teamHqSummary {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 850;
}

.team-hq-rank {
  display: grid;
  place-items: center;
  min-width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font-size: 1.45rem;
  font-weight: 950;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

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

.team-hq-grid article {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
}

.team-hq-grid span,
.team-hq-grid strong {
  display: block;
}

.team-hq-grid span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
}

.team-hq-grid strong {
  margin-top: 4px;
  color: white;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
}

.team-hq-bonus {
  display: grid;
  gap: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
}

.team-hq-bonus .section-heading h3 {
  color: white;
}

#teamHqHypeButton {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  padding: 0 14px;
  font-weight: 950;
}

#teamHqHypeButton:disabled {
  cursor: default;
  opacity: 0.62;
}

.team-hq-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.team-hq-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #fff4cc);
  transition: width 520ms cubic-bezier(0.2, 0.82, 0.28, 1);
}

.team-hq-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.team-hq-teammate {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px 10px;
}

.team-hq-teammate.is-active {
  border-color: rgba(246, 158, 24, 0.58);
  background: rgba(246, 158, 24, 0.18);
}

.team-hq-teammate strong,
.team-hq-teammate span {
  display: block;
}

.team-hq-teammate span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
}

.squad-missions {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
}

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

.squad-mission-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  padding: 12px;
}

.squad-mission-card.is-done {
  border-color: rgba(246, 158, 24, 0.72);
  background: linear-gradient(180deg, rgba(246, 158, 24, 0.12), var(--surface-solid));
}

.squad-mission-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  font-size: 0.86rem;
  font-weight: 950;
}

.squad-mission-card.is-done .squad-mission-icon {
  background: var(--gold);
  color: var(--navy);
}

.squad-mission-card strong,
.squad-mission-card p,
.squad-mission-card em {
  display: block;
}

.squad-mission-card p {
  margin: 5px 0 10px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.squad-mission-card em {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.squad-mission-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 37, 62, 0.12);
}

.squad-mission-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--burgundy), var(--gold));
}

.team-roles {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
}

.team-role-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.team-role-choice {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.team-role-choice.is-selected {
  border-color: rgba(246, 158, 24, 0.72);
  background: rgba(246, 158, 24, 0.13);
  box-shadow: inset 0 0 0 2px rgba(246, 158, 24, 0.18);
}

.team-role-choice strong,
.team-role-choice span {
  display: block;
}

.team-role-choice strong {
  font-weight: 950;
}

.team-role-choice span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.team-role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.team-role-card {
  min-height: 118px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.team-role-card.is-covered {
  border-style: solid;
  border-color: rgba(21, 37, 62, 0.24);
  background: var(--surface-solid);
}

.team-role-card strong,
.team-role-card p,
.team-role-card span {
  display: block;
}

.team-role-card p {
  margin: 4px 0 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.team-role-card span {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 950;
}

:root[data-theme="dark"] .team-role-card span {
  color: var(--gold);
}

.team-streaks {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
}

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

.team-streak-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  padding: 12px;
}

.team-streak-card.is-live {
  border-color: rgba(246, 158, 24, 0.62);
  background: linear-gradient(180deg, rgba(246, 158, 24, 0.12), var(--surface-solid));
}

.team-streak-card > strong {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  font-size: 1.7rem;
  line-height: 1;
}

.team-streak-card.is-live > strong {
  background: var(--gold);
  color: var(--navy);
}

.team-streak-card span,
.team-streak-card p {
  display: block;
}

.team-streak-card span {
  font-weight: 950;
}

.team-streak-card p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.team-matchups {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
}

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

.team-matchup-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  padding: 12px;
}

.team-matchup-card.is-active {
  border-color: rgba(246, 158, 24, 0.72);
  box-shadow: inset 0 0 0 2px rgba(246, 158, 24, 0.14);
}

.team-matchup-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.team-matchup-vs {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  font-size: 0.78rem;
  font-weight: 950;
}

.team-matchup-team {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-matchup-team strong,
.team-matchup-team span,
.team-matchup-team em {
  display: block;
}

.team-matchup-team strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-matchup-team span {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 950;
}

.team-matchup-team em {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.team-matchup-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 37, 62, 0.12);
}

.team-matchup-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--team-color);
}

.team-matchup-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.goal-meter {
  width: 100%;
  height: 18px;
  margin: 24px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 37, 62, 0.12);
}

:root[data-theme="dark"] .goal-meter {
  background: rgba(255, 255, 255, 0.12);
}

.goal-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  transition: width 520ms cubic-bezier(0.2, 0.82, 0.28, 1);
}

#goalText {
  margin-bottom: 0;
  color: var(--text-muted);
  font-weight: 750;
}

.shot-stepper {
  display: grid;
  grid-template-columns: 74px 1fr 74px;
  gap: 8px;
}

.shot-stepper button {
  border: 0;
  border-radius: 8px;
  background: var(--burgundy);
  color: white;
  font-weight: 950;
}

.shot-stepper input {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 950;
}

.goalie-note {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.save-confirmation {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

:root[data-theme="dark"] .save-confirmation {
  color: #8ee2b8;
}

.preset-row {
  grid-template-columns: repeat(4, 1fr);
  margin: 12px 0;
}

.workouts {
  display: grid;
  gap: 16px;
}

.notification-panel {
  display: grid;
  gap: 14px;
}

.team-messenger {
  display: grid;
  gap: 0;
  width: min(100%, 820px);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: 0 16px 42px rgba(16, 31, 36, 0.12);
}

.team-messenger > .section-heading {
  padding: 16px 18px 12px;
  background:
    linear-gradient(135deg, rgba(21, 37, 62, 0.96), rgba(29, 111, 163, 0.92)),
    var(--navy);
}

.team-messenger > .section-heading .section-kicker,
.team-messenger > .section-heading h3 {
  color: white;
}

.team-messenger > .section-heading .badge {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.messenger-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-solid);
  padding: 6px;
}

.messenger-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.messenger-tabs button.is-active {
  background: rgba(246, 158, 24, 0.16);
  color: var(--navy);
}

.messenger-tabs span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: rgba(21, 37, 62, 0.1);
  color: #7a4100;
  font-size: 0.72rem;
}

.messenger-panel {
  display: grid;
  gap: 0;
  background: var(--surface-soft);
}

.messenger-subhead {
  padding: 14px 14px 0;
}

.messenger-panel[data-message-panel="team"] .messenger-subhead {
  display: none;
}

.messenger-panel[data-message-panel="hype"],
.messenger-panel[data-message-panel="inbox"] {
  padding-bottom: 14px;
}

.messenger-panel .chirp-types,
.messenger-panel .chirp-targets,
.messenger-panel .chirp-feed,
.messenger-panel .notification-feed {
  margin-inline: 14px;
}

:root[data-theme="dark"] .team-messenger {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .messenger-tabs {
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .messenger-tabs button.is-active {
  color: var(--gold);
  background: rgba(246, 158, 24, 0.16);
}

.notification-feed {
  display: grid;
  gap: 10px;
}

.notification-item {
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: var(--surface-solid);
  padding: 12px;
}

.notification-item--chirp {
  border-left-color: var(--burgundy);
}

.notification-item--hype {
  border-left-color: var(--gold);
}

.notification-item strong,
.notification-item p,
.notification-item span {
  display: block;
}

.notification-item p {
  margin: 4px 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.35;
}

.notification-item span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.team-standings,
.beauty-board,
.avatar-locker,
.badge-shelf {
  display: grid;
  gap: 14px;
}

.team-name-form,
.team-chat-form {
  display: grid;
  gap: 8px;
}

.team-chat-form {
  border-top: 1px solid var(--line);
  background: var(--surface-solid);
  padding: 12px;
}

.team-name-form label,
.team-chat-form label {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.team-chat-form label {
  display: none;
}

.team-name-row,
.team-chat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.team-name-row input,
.team-chat-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  min-height: 42px;
  padding: 0 14px;
  font-weight: 850;
}

.team-name-row button,
.team-chat-row button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  padding: 0 16px;
  font-weight: 950;
}

.team-name-row input,
.team-name-row button {
  border-radius: 8px;
}

:root[data-theme="dark"] .team-name-row button,
:root[data-theme="dark"] .team-chat-row button {
  background: var(--gold);
  color: var(--navy);
}

#teamNameHelp {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.team-standings-grid {
  display: grid;
  gap: 10px;
}

.team-standings-summary {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 10px;
}

.team-rank-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(246, 158, 24, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 244, 216, 0.96), rgba(255, 255, 255, 0.94)),
    #fff8e8;
  color: var(--navy);
  padding: 13px 14px;
  box-shadow: 0 8px 20px rgba(16, 31, 36, 0.08);
}

.team-rank-card.is-active {
  border-color: rgba(246, 158, 24, 0.85);
  background:
    linear-gradient(135deg, rgba(255, 207, 94, 0.96), rgba(255, 244, 216, 0.96)),
    #ffd66b;
}

.team-rank-card span,
.team-rank-card strong,
.team-rank-card em {
  display: block;
  margin: 0;
}

.team-rank-card span {
  color: var(--burgundy);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-rank-card strong {
  color: var(--navy);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.05;
}

.team-rank-card em {
  color: rgba(21, 37, 62, 0.72);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.team-standing-row {
  display: grid;
  grid-template-columns: 62px minmax(180px, 1fr) minmax(180px, 0.72fr) minmax(98px, auto);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(246, 158, 24, 0.34);
  border-left: 6px solid var(--team-color);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 244, 216, 0.96), rgba(255, 255, 255, 0.94)),
    #fff8e8;
  color: var(--navy);
  padding: 12px;
  box-shadow: 0 8px 20px rgba(16, 31, 36, 0.07);
}

.team-standing-row.is-active {
  border-color: rgba(246, 158, 24, 0.92);
  border-left-color: var(--gold);
  background:
    linear-gradient(135deg, rgba(255, 207, 94, 0.96), rgba(255, 244, 216, 0.96)),
    #ffd66b;
  box-shadow: inset 0 0 0 2px rgba(246, 158, 24, 0.2), 0 12px 28px rgba(16, 31, 36, 0.12);
}

.team-standing-rank {
  display: grid;
  place-items: center;
  width: 54px;
  height: 50px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  line-height: 1;
}

.team-standing-rank strong,
.team-standing-rank em {
  display: block;
}

.team-standing-rank strong {
  font-size: 1.1rem;
  font-weight: 950;
}

.team-standing-rank em {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.team-standing-main strong,
.team-standing-main span,
.team-standing-score strong,
.team-standing-score span,
.team-standing-score em {
  display: block;
}

.team-standing-main strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 1.08rem;
}

.team-standing-main span,
.team-standing-score span,
.team-standing-score em {
  color: rgba(21, 37, 62, 0.66);
  font-size: 0.82rem;
  font-weight: 850;
}

.team-standing-main span {
  margin-top: 3px;
  font-size: 0.88rem;
}

.team-standing-tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  padding: 0 8px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.team-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 37, 62, 0.14);
}

.team-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--team-color), var(--gold));
}

.team-standing-score {
  min-width: 82px;
  text-align: right;
  white-space: nowrap;
}

.team-standing-score strong {
  color: var(--navy);
  font-size: 1.32rem;
  line-height: 1;
}

:root[data-theme="dark"] .team-rank-card,
:root[data-theme="dark"] .team-standing-row {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.score-rules {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.4;
}

.badge-grid {
  display: grid;
  gap: 10px;
}

.award-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  padding: 12px;
}

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

.beauty-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(246, 158, 24, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 244, 216, 0.96), rgba(255, 255, 255, 0.94)),
    #fff8e8;
  padding: 14px;
}

.beauty-card:not(.is-empty)::after {
  content: "";
  position: absolute;
  inset: -30% -80%;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-30%);
  animation: winner-shimmer 3600ms ease-in-out infinite;
  pointer-events: none;
}

.beauty-card:first-child {
  border-color: rgba(132, 40, 52, 0.4);
  background:
    linear-gradient(135deg, rgba(255, 204, 91, 0.95), rgba(255, 244, 216, 0.96)),
    #ffd66b;
}

.beauty-card.is-empty {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 244, 216, 0.96), rgba(255, 255, 255, 0.94)),
    #fff8e8;
  opacity: 0.78;
}

:root[data-theme="dark"] .beauty-card,
:root[data-theme="dark"] .beauty-card.is-empty {
  border-color: rgba(255, 215, 128, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 244, 216, 0.96), rgba(255, 255, 255, 0.92)),
    #fff8e8;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  opacity: 1;
}

:root[data-theme="dark"] .beauty-card:not(.is-empty) {
  background:
    linear-gradient(135deg, rgba(255, 204, 91, 0.95), rgba(255, 244, 216, 0.96)),
    #ffd66b;
}

.beauty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--gold);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}

:root[data-theme="dark"] .beauty-icon {
  background: var(--gold);
  color: var(--navy);
}

.beauty-card p,
.beauty-card strong,
.beauty-card em {
  display: block;
  margin: 0;
}

.beauty-card p {
  color: var(--burgundy);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

:root[data-theme="dark"] .beauty-card p {
  color: var(--burgundy);
}

.beauty-card button {
  display: block;
  width: 100%;
  margin: 4px 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  padding: 0;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.08;
  text-align: left;
}

.beauty-card button:hover {
  color: var(--burgundy);
}

.beauty-card strong {
  color: var(--navy);
  font-size: 0.93rem;
  line-height: 1.25;
}

:root[data-theme="dark"] .beauty-card button,
:root[data-theme="dark"] .beauty-card strong {
  color: var(--navy);
}

.beauty-card em {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

:root[data-theme="dark"] .beauty-card em {
  color: rgba(21, 37, 62, 0.74);
}

.beauty-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.badge-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.avatar-choice {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.avatar-choice:hover,
.avatar-choice.is-selected {
  border-color: rgba(246, 158, 24, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 207, 94, 0.96), rgba(255, 244, 216, 0.96)),
    #ffd66b;
}

.avatar-choice.is-selected {
  box-shadow: inset 0 0 0 2px rgba(246, 158, 24, 0.18);
}

.avatar-choice strong,
.avatar-choice em {
  display: block;
}

.avatar-choice strong {
  color: var(--navy);
  font-size: 0.94rem;
}

.avatar-choice em {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

:root[data-theme="dark"] .avatar-choice strong {
  color: var(--navy);
}

:root[data-theme="dark"] .avatar-choice {
  border-color: rgba(255, 215, 128, 0.7);
  background:
    linear-gradient(180deg, rgba(255, 244, 216, 0.97), rgba(255, 255, 255, 0.92)),
    #fff8e8;
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .avatar-choice em {
  color: rgba(21, 37, 62, 0.68);
}

:root[data-theme="dark"] .avatar-choice:hover,
:root[data-theme="dark"] .avatar-choice.is-selected {
  border-color: rgba(246, 158, 24, 0.95);
  background:
    linear-gradient(135deg, rgba(255, 207, 94, 0.96), rgba(255, 244, 216, 0.96)),
    #ffd66b;
}

.avatar-shell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(246, 158, 24, 0.36);
  border-radius: 12px;
  background: var(--surface-solid);
  overflow: hidden;
  flex: none;
  box-shadow: 0 10px 24px rgba(16, 31, 36, 0.16);
}

:root[data-theme="dark"] .avatar-shell {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.avatar-shell .avatar-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-shell--brand {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.74) 58%, rgba(246, 158, 24, 0.18)),
    linear-gradient(135deg, rgba(21, 37, 62, 0.98), rgba(132, 40, 52, 0.92));
}

.avatar-shell--brand .avatar-art {
  width: 76%;
  height: 76%;
  object-fit: contain;
}

.avatar-brand-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 20px;
  height: 20px;
  padding: 2px;
  border: 1px solid rgba(246, 158, 24, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  object-fit: contain;
  box-shadow: 0 4px 10px rgba(16, 31, 36, 0.24);
}

.avatar-shell--small {
  width: 48px;
  height: 48px;
}

.avatar-shell--tiny {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border-width: 1px;
}

.avatar-shell--tiny .avatar-brand-badge {
  display: none;
}

.avatar-shell--choice {
  width: 50px;
  height: 50px;
}

.avatar-shell--profile {
  width: 78px;
  height: 78px;
  border-radius: 12px;
}

.avatar-shell--profile .avatar-brand-badge {
  width: 26px;
  height: 26px;
}

.leaderboard-avatar {
  display: inline-flex;
  margin-right: 8px;
  vertical-align: middle;
}

.award-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  opacity: 0.55;
}

.award-card.is-earned {
  opacity: 1;
  border-color: rgba(246, 158, 24, 0.45);
  background: linear-gradient(180deg, rgba(246, 158, 24, 0.1), var(--surface-solid));
  animation: badge-pop 520ms cubic-bezier(0.2, 0.82, 0.28, 1) both;
}

.award-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(246, 158, 24, 0.15);
  font-size: 1.35rem;
}

.award-card strong,
.award-card p {
  display: block;
  margin: 0;
}

.award-card p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

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

.challenge-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-solid);
}

.challenge-card.is-done {
  border-color: rgba(246, 158, 24, 0.48);
  background: linear-gradient(180deg, rgba(246, 158, 24, 0.1), var(--surface-solid));
  animation: workout-card-pop 460ms cubic-bezier(0.2, 0.82, 0.28, 1) both;
}

.challenge-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(246, 158, 24, 0.15);
  color: var(--burgundy);
  border: 1px solid rgba(246, 158, 24, 0.2);
  font-size: 1.45rem;
  line-height: 1;
}

:root[data-theme="dark"] .challenge-icon {
  background: rgba(246, 158, 24, 0.13);
  color: var(--gold);
  border-color: rgba(246, 158, 24, 0.28);
}

.challenge-card p {
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.35;
}

.workout-how {
  margin-top: 10px;
}

.workout-how summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--navy);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 950;
  list-style: none;
  cursor: pointer;
}

.workout-how summary::-webkit-details-marker {
  display: none;
}

.workout-how summary::after {
  content: "+";
  margin-left: 8px;
  color: var(--gold);
  font-weight: 950;
}

.workout-how[open] summary::after {
  content: "-";
}

.workout-how p {
  margin-top: 8px;
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  font-size: 0.9rem;
}

:root[data-theme="dark"] .workout-how summary {
  color: var(--gold);
}

.challenge-card button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 900;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 5px;
}

.leaderboard-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 950;
}

.leaderboard-tabs button.is-active {
  background: var(--navy);
  color: white;
  box-shadow: 0 8px 20px rgba(21, 37, 62, 0.18);
}

:root[data-theme="dark"] .leaderboard-tabs button.is-active {
  background: var(--gold);
  color: var(--navy);
}

.leaderboard ol,
.chirp-feed {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
}

.leaderboard li {
  min-height: 50px;
  list-style: none;
  animation: leaderboard-row-glow 560ms ease both;
}

.leaderboard li:nth-child(1) {
  animation-delay: 0ms;
}

.leaderboard li:nth-child(2) {
  animation-delay: 45ms;
}

.leaderboard li:nth-child(3) {
  animation-delay: 90ms;
}

.leaderboard-profile-button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-solid);
  color: var(--text);
  text-align: left;
}

.leaderboard-profile-button:hover {
  border-color: rgba(246, 158, 24, 0.62);
  background: linear-gradient(180deg, rgba(246, 158, 24, 0.08), var(--surface-solid));
  transform: translateY(-1px);
}

.rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  font-weight: 950;
}

:root[data-theme="dark"] .rank {
  background: var(--gold);
  color: var(--navy);
}

.player-line {
  min-width: 0;
}

.player-line strong,
.player-line span {
  display: block;
}

.player-line span,
.chirp-item span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.score {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--navy);
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.score strong,
.score span {
  display: block;
}

.score span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

:root[data-theme="dark"] .score {
  color: var(--gold);
}

.chirp-targets {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  margin-top: 16px;
}

.chirp-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 4px;
}

.chirp-types button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-weight: 900;
}

.chirp-types button.is-active {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 6px 16px rgba(246, 158, 24, 0.22);
}

:root[data-theme="dark"] .chirp-types button.is-active {
  color: var(--navy);
}

.chirp-targets button {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 38px;
  border-style: dashed;
  border-color: rgba(21, 37, 62, 0.22);
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
}

.chirp-targets button strong,
.chirp-targets button span {
  display: block;
}

.chirp-targets button span {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.chirp-targets button:hover {
  border-style: solid;
  border-color: rgba(246, 158, 24, 0.65);
  background: rgba(246, 158, 24, 0.1);
}

:root[data-theme="dark"] .chirp-targets button {
  border-color: rgba(255, 255, 255, 0.22);
}

.chirp-feed {
  max-height: 320px;
  overflow: auto;
}

.team-chat {
  grid-column: 1 / -1;
}

.team-zone .leaderboard {
  grid-column: 1 / -1;
}

.team-chat-feed {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: min(430px, 58vh);
  max-height: min(540px, 62vh);
  margin: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 14px 14px, rgba(21, 37, 62, 0.055) 1.5px, transparent 1.5px),
    var(--surface-soft);
  background-size: 22px 22px;
  padding: 18px 14px;
}

.team-chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: var(--surface-solid);
  margin: 0;
  padding: 10px 12px 0;
}

.team-chat-prompts button {
  min-height: 30px;
  border: 1px solid rgba(21, 37, 62, 0.16);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 11px;
  font-size: 0.78rem;
  font-weight: 900;
}

.team-chat-prompts button:hover {
  border-color: rgba(246, 158, 24, 0.72);
  background: rgba(246, 158, 24, 0.12);
}

:root[data-theme="dark"] .team-chat-prompts button {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.team-chat-item {
  display: grid;
  grid-template-columns: 32px minmax(0, auto);
  align-items: end;
  justify-self: start;
  gap: 8px;
  width: min(100%, 680px);
  max-width: 88%;
}

.team-chat-item.is-mine {
  grid-template-columns: minmax(0, auto);
  justify-self: end;
  justify-items: end;
}

.team-chat-item .chirp-reactions {
  margin-top: 5px;
  padding: 0 4px;
}

.team-chat-item .chirp-reactions button {
  min-height: 24px;
  gap: 3px;
  padding: 0 7px;
  font-size: 0.72rem;
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
}

.team-chat-item.is-mine .chirp-reactions {
  justify-content: flex-end;
}

.team-chat-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font-size: 0.8rem;
  font-weight: 950;
  text-transform: uppercase;
}

.team-chat-message {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-width: 0;
}

.team-chat-item.is-mine .team-chat-message {
  justify-items: end;
}

.team-chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  max-width: 100%;
  margin-bottom: 4px;
}

.team-chat-meta strong,
.team-chat-meta em,
.team-chat-time {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.team-chat-meta em,
.team-chat-time {
  color: color-mix(in srgb, var(--text-muted), transparent 20%);
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
}

.team-chat-bubble {
  max-width: 100%;
  border-radius: 17px 17px 17px 5px;
  background: var(--surface-solid);
  color: var(--text);
  padding: 9px 12px;
  box-shadow: 0 5px 14px rgba(16, 31, 36, 0.09);
}

.team-chat-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 760;
  line-height: 1.4;
}

.team-chat-item.is-mine .team-chat-bubble {
  border-radius: 17px 17px 5px 17px;
  background: var(--blue);
  color: white;
}

.team-chat-item.is-mine .team-chat-meta strong,
.team-chat-item.is-mine .team-chat-meta em {
  color: rgba(255, 255, 255, 0.86);
}

.team-chat-item--empty {
  grid-template-columns: 1fr;
  max-width: min(520px, 92%);
}

.team-chat-item--empty .team-chat-bubble {
  background: var(--surface-solid);
  color: var(--text);
}

:root[data-theme="dark"] .team-chat-feed {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(246, 158, 24, 0.045)),
    var(--surface-soft);
}

:root[data-theme="dark"] .team-chat-bubble {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .team-chat-item.is-mine .team-chat-bubble {
  background: var(--blue);
}

.chirp-item {
  border-left: 5px solid var(--burgundy);
  border-radius: 8px;
  background: var(--surface-solid);
  padding: 12px;
  box-shadow: 0 8px 22px rgba(16, 31, 36, 0.07);
}

:root[data-theme="dark"] .chirp-item {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.chirp-item p {
  margin-bottom: 4px;
  line-height: 1.4;
  font-weight: 800;
}

.chirp-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chirp-reactions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  padding: 0 9px;
  font-size: 0.85rem;
  font-weight: 950;
}

.chirp-reactions button:hover,
.chirp-reactions button.is-active {
  border-color: rgba(246, 158, 24, 0.65);
  background: rgba(246, 158, 24, 0.16);
  color: var(--navy);
}

.chirp-reactions button.is-active span {
  animation: reaction-bounce 360ms cubic-bezier(0.2, 0.82, 0.28, 1) both;
}

:root[data-theme="dark"] .chirp-reactions button:hover,
:root[data-theme="dark"] .chirp-reactions button.is-active {
  color: var(--gold);
}

.chirp-reactions span,
.chirp-reactions b {
  display: inline-block;
  margin: 0;
  line-height: 1;
}

.profile-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 20, 32, 0.72);
  backdrop-filter: blur(6px);
}

.profile-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(780px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  padding: 20px;
}

.profile-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.profile-hero {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  padding-right: 52px;
}

.profile-hero h2 {
  margin-bottom: 3px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.profile-hero p:last-child,
.profile-goal {
  margin-bottom: 0;
  color: var(--text-muted);
  font-weight: 800;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 2px solid rgba(246, 158, 24, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(246, 158, 24, 0.16), rgba(132, 40, 52, 0.12)),
    var(--surface-solid);
  color: var(--navy);
  font-size: 2.2rem;
  font-weight: 950;
}

:root[data-theme="dark"] .profile-avatar {
  color: var(--gold);
}

.profile-meter {
  width: 100%;
  height: 16px;
  margin: 20px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 37, 62, 0.12);
}

:root[data-theme="dark"] .profile-meter {
  background: rgba(255, 255, 255, 0.12);
}

.profile-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--burgundy), var(--gold));
}

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

.profile-stat-grid article,
.profile-activity article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  padding: 12px;
}

.profile-stat-grid span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-stat-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--navy);
  font-size: 1.35rem;
}

:root[data-theme="dark"] .profile-stat-grid strong {
  color: var(--gold);
}

.profile-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid rgba(246, 158, 24, 0.34);
  border-radius: 999px;
  background: rgba(246, 158, 24, 0.12);
  color: var(--navy);
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 950;
}

:root[data-theme="dark"] .profile-badges span {
  color: var(--gold);
}

.profile-badges p,
.profile-activity p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 800;
}

.profile-activity {
  display: grid;
  gap: 8px;
}

.profile-activity article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-activity strong {
  color: var(--navy);
}

:root[data-theme="dark"] .profile-activity strong {
  color: var(--gold);
}

.profile-activity span {
  color: var(--text-muted);
  font-weight: 850;
  text-align: right;
}

.is-hidden {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 9px;
  }

  .hero {
    min-height: 190px;
  }

  .hero::before {
    inset: auto -28% -35% 48%;
    height: 96%;
  }

  .hero::after {
    background: linear-gradient(180deg, transparent 0 70%, rgba(7, 19, 37, 0.28));
  }

  .hero__content {
    grid-template-columns: auto minmax(0, 1fr);
    width: min(100%, 560px);
    padding: 22px 18px;
  }

  .quick-log,
  .team-zone,
  .dashboard-tabs,
  .team-hq-grid,
  .challenge-grid,
  .squad-mission-grid,
  .team-role-picker,
  .team-role-grid,
  .team-streak-grid,
  .team-matchup-grid,
  .messenger-tabs,
  .team-standings-grid,
  .beauty-grid,
  .avatar-grid,
  .profile-stat-grid,
  .input-row,
  .team-name-row,
  .team-chat-row,
  .pin-fields {
    grid-template-columns: 1fr;
  }

  .leaderboard-profile-button {
    grid-template-columns: 34px 1fr;
  }

  .team-standing-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .team-standings-summary {
    grid-template-columns: 1fr;
  }

  .team-standing-row .team-meter {
    grid-column: 1 / -1;
  }

  .team-standing-score {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .leaderboard-profile-button .score {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }

  .pin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .profile-hero {
    grid-template-columns: 58px 1fr;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 1.6rem;
  }

  .profile-activity article {
    display: grid;
  }

  .profile-activity span {
    text-align: left;
  }
}
