:root {
  color-scheme: dark;
  --ink: #f6f7fb;
  --muted: #9a9a9f;
  --page: #0b0b0c;
  --panel: #222222;
  --panel-soft: #1a1a1b;
  --line: #373737;
  --blue: #2388d9;
  --green: #19c37d;
  --red: #dc4a4a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.18) 1px, transparent 1.7px) 0 0 / 23px 23px,
    linear-gradient(180deg, #050506 0%, #101011 38%, #0b0b0c 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

main {
  margin-left: 236px;
}

.mobile-menu-button {
  display: none;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 236px;
  display: grid;
  align-content: start;
  gap: 24px;
  border-right: 1px solid var(--line);
  background: rgba(12, 12, 13, 0.96);
  box-shadow: var(--shadow);
  padding: 26px 18px;
}

.app-sidebar__brand {
  display: grid;
  gap: 4px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid var(--line);
}

.app-sidebar__brand strong {
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}

.app-sidebar__brand span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.app-sidebar__nav {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 0 13px;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.sidebar-link:hover,
.sidebar-link:focus-visible,
.sidebar-link.is-active {
  border-color: rgba(25, 195, 125, 0.26);
  background: rgba(25, 195, 125, 0.1);
  color: var(--green);
  outline: none;
}

.sidebar-backdrop {
  display: none;
}

.picks-backdrop,
.sim-backdrop,
.auto-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.66);
}

.picks-backdrop[hidden],
.picks-menu[hidden],
.sim-backdrop[hidden],
.sim-menu[hidden],
.auto-team-menu[hidden],
.auto-backdrop[hidden],
.auto-menu[hidden] {
  display: none !important;
}

.auto-team-menu {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 22px;
  pointer-events: none;
}

.auto-team-card {
  width: min(100%, 430px);
  display: grid;
  gap: 18px;
  border: 1px solid rgba(25, 195, 125, 0.24);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
  pointer-events: auto;
}

.auto-team-card h2 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  line-height: 1.05;
}

.auto-team-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.auto-team-card input,
.auto-team-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 0 12px;
}

.auto-team-card input:focus,
.auto-team-card select:focus {
  border-color: rgba(25, 195, 125, 0.56);
  outline: none;
}

.auto-photo-preview {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 10px;
}

.auto-photo-preview[hidden],
.auto-menu__photo[hidden] {
  display: none !important;
}

.auto-photo-preview img,
.auto-menu__photo img,
.team-auto-card__photo {
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(25, 195, 125, 0.24);
  border-radius: 12px;
  background: #05090b;
}

.auto-photo-preview img {
  width: 72px;
}

.auto-team-actions,
.auto-menu__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.picks-menu,
.sim-menu,
.auto-menu {
  position: fixed;
  top: 26px;
  right: 26px;
  bottom: 26px;
  left: 262px;
  z-index: 80;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(25, 195, 125, 0.24);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.picks-menu__header,
.sim-menu__header,
.auto-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 22px 26px;
}

.auto-menu__header small {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.auto-menu__photo {
  margin-left: auto;
}

.auto-menu__photo img {
  width: 76px;
}

.picks-menu__status,
.sim-menu__status {
  max-width: none;
  border-bottom: 1px solid var(--line);
  padding: 12px 26px;
  text-align: left;
}

.picks-menu__controls,
.sim-menu__controls {
  border-bottom: 1px solid var(--line);
  padding: 14px 26px;
}

.picks-menu__controls label,
.sim-menu__controls label {
  display: grid;
  grid-template-columns: 120px minmax(220px, 420px);
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.auto-menu {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.auto-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, auto) minmax(150px, 200px) minmax(160px, 220px) auto auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 26px;
}

.auto-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0 12px;
  cursor: pointer;
}

.tool-button:hover,
.tool-button:focus-visible,
.tool-button.is-active {
  border-color: rgba(25, 195, 125, 0.42);
  background: rgba(25, 195, 125, 0.14);
  color: var(--green);
  outline: none;
}

.auto-toolbar label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.auto-toolbar input[type="color"] {
  width: 52px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 4px;
}

.auto-toolbar input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.auto-save-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.auto-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
}

#auto-canvas {
  width: min(100%, 760px, calc(100vh - 178px));
  aspect-ratio: 1;
  height: auto;
  border: 1px solid rgba(25, 195, 125, 0.22);
  border-radius: 14px;
  background: #101011;
  box-shadow: var(--shadow);
  touch-action: none;
  cursor: crosshair;
}

.hero {
  position: relative;
  min-height: 390px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero__image {
  display: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(35, 136, 217, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(5, 5, 6, 0.12), rgba(13, 13, 14, 0.72));
}

.hero__content {
  position: relative;
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 72px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3rem, 7vw, 4.9rem);
  line-height: 0.95;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.hero__copy {
  max-width: 760px;
  margin: 16px auto 0;
  color: rgba(246, 247, 251, 0.78);
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  font-weight: 700;
  line-height: 1.45;
}

.clague-rating {
  width: min(520px, 100%);
  margin: 24px auto 0;
  padding: 16px 20px;
  border: 1px solid rgba(25, 195, 125, 0.24);
  border-radius: 16px;
  background: rgba(34, 34, 34, 0.8);
  box-shadow: var(--shadow);
}

.clague-rating span,
.clague-rating small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.clague-rating span {
  color: var(--green);
  text-transform: uppercase;
}

.clague-rating strong {
  display: block;
  margin: 5px 0 4px;
  min-height: 34px;
  color: var(--green);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1;
}

.hero-controls {
  width: min(460px, 100%);
  min-height: 62px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px 9px 9px 22px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  background: #202020;
  box-shadow: var(--shadow);
}

.controls label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
  text-align: left;
}

select {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #151516;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  padding: 0 12px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button--dark {
  background: var(--green);
  color: #06130d;
}

.button--small {
  min-height: 36px;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 0.84rem;
}

.shell {
  width: min(1440px, calc(100% - 56px));
  margin: 0 auto 56px;
  position: relative;
  z-index: 2;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 40px auto 20px;
}

.summary-card,
.upcoming-panel,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 92px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 18px 22px 18px 88px;
  position: relative;
}

.summary-card::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.24), transparent),
    var(--green);
}

.summary-card:nth-child(2)::before {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.24), transparent),
    var(--blue);
}

.summary-card:nth-child(3)::before {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.24), transparent),
    var(--green);
}

.summary-card::after {
  content: "";
  position: absolute;
  left: 41px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  box-shadow:
    -9px 8px 0 rgba(0, 0, 0, 0.72),
    9px 8px 0 rgba(0, 0, 0, 0.72);
  transform: translateY(-50%);
}

.summary-card--hidden {
  display: none;
}

.summary-card span,
.summary-card small {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.summary-card strong {
  display: block;
  min-height: 28px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.05;
}

.upcoming-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.36fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 20px;
  overflow: hidden;
}

.upcoming-panel > div:first-child,
.panel__header {
  padding: 22px 26px;
}

.team-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.upcoming-card {
  min-width: 0;
  padding: 22px 26px 22px 0;
}

.upcoming-match {
  display: grid;
  grid-template-columns: minmax(180px, 0.78fr) minmax(220px, 0.85fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.upcoming-match h3 {
  margin: 12px 0 6px;
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  line-height: 1;
}

.upcoming-match p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.upcoming-match__meta {
  display: grid;
  gap: 14px;
}

.upcoming-match__meta div,
.upcoming-match__opponents {
  min-height: 78px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.upcoming-match__meta span,
.upcoming-match__opponents > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.upcoming-match__meta strong {
  display: block;
  font-size: 1.05rem;
}

.panel {
  margin-top: 20px;
  overflow: hidden;
}

.panel__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.panel__actions {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(160px, auto);
  gap: 14px;
  align-items: end;
}

.panel__actions label {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.status {
  max-width: 380px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: right;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #19191a;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-weight: 750;
}

.match-title {
  display: grid;
  gap: 3px;
}

.match-title span {
  color: var(--muted);
  font-size: 0.78rem;
}

.pill {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  border-radius: 999px;
  padding: 0 11px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.pill--red {
  background: var(--red);
}

.pill--blue {
  background: var(--blue);
}

.pill--neutral {
  background: var(--muted);
}

.result {
  color: var(--muted);
}

.result--win {
  color: var(--green);
}

.result--loss {
  color: var(--red);
}

.result--tie {
  color: var(--blue);
}

.score-red {
  color: var(--red);
}

.score-blue {
  color: var(--blue);
}

.team-rating-list {
  display: grid;
  gap: 8px;
  min-width: 176px;
}

.team-rating {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: center;
}

.team-link {
  width: max-content;
  max-width: 190px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.team-link:hover,
.team-link:focus-visible {
  color: var(--green);
  text-decoration: underline;
  outline: none;
}

.team-rating span {
  color: var(--muted);
  font-size: 0.76rem;
}

.stars {
  grid-column: 1 / -1;
  color: var(--green) !important;
  letter-spacing: 0;
}

.rating-source {
  grid-column: 1 / -1;
  color: var(--blue) !important;
  font-size: 0.72rem !important;
}

.stars:empty {
  display: none;
}

.empty {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
}

.team-detail {
  display: grid;
  gap: 18px;
  padding: 22px 26px 26px;
}

.team-detail__loading {
  border: 1px solid rgba(25, 195, 125, 0.22);
  border-radius: 12px;
  background: rgba(25, 195, 125, 0.08);
  color: var(--green);
  font-weight: 850;
  padding: 12px 14px;
}

.team-detail__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.team-detail__stats article {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 14px;
}

.team-detail__stats span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.team-detail__stats strong {
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.05;
}

.team-detail__stats small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.team-auto-list {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 14px;
}

.team-auto-list__header,
.team-auto-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-auto-list__header h3 {
  margin: 0;
  font-size: 1rem;
}

.team-auto-list__header span,
.team-auto-card span,
.team-auto-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.team-auto-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 12px;
}

.team-auto-card__photo {
  width: 64px;
  flex: 0 0 64px;
}

.team-auto-card div:first-child {
  display: grid;
  gap: 3px;
}

.team-auto-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.team-auto-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.team-detail__table-wrap {
  overflow-x: auto;
}

.team-detail__table {
  min-width: 940px;
}

.picks-list {
  display: grid;
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  padding: 18px;
}

.sim-list {
  display: grid;
  gap: 12px;
  align-content: start;
  overflow-y: auto;
  padding: 18px;
}

.pick-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(260px, auto);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 14px;
}

.sim-card,
.sim-summary-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(260px, auto);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 14px;
}

.sim-summary-card {
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  border-color: rgba(25, 195, 125, 0.34);
  background: linear-gradient(135deg, rgba(25, 195, 125, 0.12), rgba(35, 136, 217, 0.1));
}

.sim-summary-card span,
.sim-summary-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.sim-summary-card strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 1.18rem;
}

.sim-card__rank {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #eef7ff;
  font-weight: 950;
}

.sim-card__main,
.sim-card__teams {
  min-width: 0;
}

.sim-card__main {
  display: grid;
  gap: 6px;
}

.sim-card__teams {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.sim-card__teams > span {
  color: var(--muted);
  font-weight: 950;
}

.sim-team-link {
  width: auto;
  max-width: 100%;
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  color: var(--ink);
  font-size: 1rem;
}

.sim-team-link span {
  color: var(--green);
}

.pick-card__rank {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #06130d;
  font-weight: 950;
}

.pick-card__main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.pick-card__team {
  width: auto;
  max-width: none;
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--ink);
  font-size: 1.05rem;
}

.pick-card__team span {
  color: var(--green);
}

.pick-card__meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.pick-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
}

.pick-card__stats span {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pick-card__stats strong {
  color: var(--ink);
  font-size: 1rem;
}

.mobile-match-card {
  display: none;
}

@media (max-width: 980px) {
  main {
    margin-left: 0;
  }

  .mobile-menu-button {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(10, 10, 11, 0.92);
    box-shadow: var(--shadow);
    padding: 10px;
  }

  .mobile-menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .app-sidebar {
    width: min(280px, 82vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0) !important;
  }

  body.auto-open .auto-menu,
  body.sim-open .sim-menu,
  body.picks-open .picks-menu {
    display: grid;
  }

  body.auto-open .auto-backdrop,
  body.sim-open .sim-backdrop,
  body.picks-open .picks-backdrop {
    display: block;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgba(0, 0, 0, 0.58);
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .picks-menu,
  .sim-menu,
  .auto-menu {
    top: 66px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    border-radius: 14px;
  }

  .picks-menu__header,
  .sim-menu__header,
  .auto-menu__header {
    flex-wrap: wrap;
    padding: 16px;
  }

  .auto-menu__photo {
    margin-left: 0;
  }

  .auto-menu__photo img {
    width: 58px;
  }

  .auto-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 16px;
  }

  .auto-toolbar__group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tool-button {
    padding: 0 8px;
  }

  .auto-stage {
    padding: 12px;
  }

  #auto-canvas {
    width: min(100%, calc(100vh - 312px));
  }

  .picks-menu__controls,
  .sim-menu__controls {
    padding: 12px 16px;
  }

  .picks-menu__controls label,
  .sim-menu__controls label {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .picks-menu__status,
  .sim-menu__status {
    padding: 11px 16px;
  }

  .summary-grid,
  .upcoming-panel,
  .upcoming-match,
  .team-detail__stats {
    grid-template-columns: 1fr;
  }

  .team-auto-list__header,
  .team-auto-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-auto-card__actions {
    width: 100%;
    justify-content: stretch;
  }

  .team-auto-card__actions .button {
    flex: 1 1 130px;
  }

  .upcoming-card {
    padding: 0 26px 26px;
  }

  .panel__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel__actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .status {
    max-width: none;
    text-align: left;
  }

  .pick-card,
  .sim-card,
  .sim-summary-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .sim-summary-card {
    grid-template-columns: 1fr;
  }

  .pick-card__stats {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: auto;
  }

  .hero__content {
    width: min(100% - 18px, 960px);
    padding: 38px 0 30px;
  }

  h1 {
    font-size: clamp(2.55rem, 15vw, 3.55rem);
  }

  .hero__copy {
    font-size: 0.98rem;
    line-height: 1.4;
  }

  .clague-rating {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
    text-align: left;
  }

  .clague-rating strong {
    min-height: 30px;
    font-size: 1.55rem;
  }

  .hero-controls {
    gap: 10px;
    border-radius: 14px;
    padding: 12px;
  }

  .hero-controls,
  .controls label {
    grid-template-columns: 1fr;
  }

  .controls {
    gap: 10px;
  }

  .button,
  select {
    width: 100%;
  }

  .shell {
    width: min(100% - 16px, 1440px);
    margin-bottom: 28px;
  }

  .summary-grid {
    gap: 12px;
    margin-top: 14px;
  }

  .summary-card {
    min-height: auto;
    padding: 14px 14px 14px 66px;
  }

  .summary-card::before {
    left: 14px;
    width: 38px;
    height: 38px;
  }

  .summary-card::after {
    left: 27px;
    top: 32px;
  }

  .upcoming-panel,
  .panel {
    border-radius: 12px;
  }

  .upcoming-panel {
    gap: 0;
  }

  .upcoming-card {
    padding: 0 16px 16px;
  }

  .upcoming-match {
    gap: 14px;
  }

  .upcoming-match h3 {
    font-size: 1.35rem;
  }

  .upcoming-match__meta,
  .upcoming-match__opponents {
    min-height: auto;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .upcoming-panel > div:first-child,
  .panel__header {
    padding: 16px;
  }

  .panel {
    margin-top: 14px;
  }

  .panel__actions {
    gap: 10px;
  }

  .status {
    font-size: 0.78rem;
  }

  .team-detail {
    padding: 16px;
  }

  .team-detail__stats article {
    min-height: auto;
    padding: 12px;
  }

  .table-wrap,
  .team-detail__table-wrap {
    overflow-x: visible;
  }

  table,
  .team-detail__table {
    min-width: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
  }

  td {
    display: grid;
    grid-template-columns: minmax(86px, 0.38fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 11px 12px;
    overflow-wrap: anywhere;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;
  }

  td.empty {
    display: block;
    padding: 24px 16px;
  }

  td.empty::before {
    content: none;
  }

  .match-title,
  .team-rating-list {
    min-width: 0;
  }

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

  .team-link {
    width: auto;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .stars,
  .rating-source {
    grid-column: auto;
  }

  .pill {
    max-width: 100%;
  }

  #match-body td:not([data-label="Match"]) {
    display: none;
  }

  #match-body td[data-label="Match"] {
    display: block;
    border-bottom: 0;
    padding: 0;
  }

  #match-body td[data-label="Match"]::before {
    content: none;
  }

  #match-body .match-title--desktop {
    display: none;
  }

  #match-body .mobile-match-card {
    display: grid;
  }

  .mobile-match-card {
    overflow: hidden;
    border-radius: 12px;
    background: #171717;
  }

  .mobile-match-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .mobile-match-card__header div {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .mobile-match-card__header strong {
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1.1;
  }

  .mobile-match-card__header span {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .mobile-match-card__result {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .mobile-match-card__result.result--win {
    border-color: rgba(25, 195, 125, 0.45);
    color: var(--green);
  }

  .mobile-match-card__result.result--loss {
    border-color: rgba(255, 76, 76, 0.45);
    color: var(--red);
  }

  .mobile-match-card__result.result--tie {
    border-color: rgba(47, 134, 255, 0.45);
    color: var(--blue);
  }

  .mobile-match-board {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) minmax(0, 1fr);
  }

  .mobile-match-board__head {
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 8px 6px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
  }

  .mobile-match-board__head--match {
    background: #242424;
  }

  .mobile-match-board__head--red {
    background: #bd1b22;
  }

  .mobile-match-board__head--blue {
    background: #245fb8;
  }

  .mobile-match-board__score {
    display: grid;
    align-content: start;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #242424;
    padding: 10px 6px;
    text-align: center;
  }

  .mobile-match-board__score strong {
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.1;
  }

  .mobile-match-board__score span {
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .mobile-alliance {
    display: grid;
    align-content: start;
    gap: 1px;
    min-width: 0;
  }

  .mobile-alliance--red {
    background: rgba(189, 27, 34, 0.18);
  }

  .mobile-alliance--blue {
    background: rgba(36, 95, 184, 0.22);
  }

  .mobile-team {
    min-height: 92px;
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 9px 8px;
    background: rgba(255, 255, 255, 0.035);
  }

  .mobile-alliance--red .mobile-team:nth-child(odd) {
    background: rgba(189, 27, 34, 0.28);
  }

  .mobile-alliance--blue .mobile-team:nth-child(odd) {
    background: rgba(36, 95, 184, 0.32);
  }

  .mobile-team--clague {
    background: rgba(25, 195, 125, 0.22) !important;
    box-shadow: inset 3px 0 0 var(--green);
  }

  .mobile-team__name {
    width: 100%;
    display: grid;
    gap: 2px;
    color: #ffffff;
    font-size: 0.8rem;
    font-style: italic;
    font-weight: 900;
    line-height: 1.15;
  }

  .mobile-team__name span {
    color: #ffffff;
    font-size: 0.84rem;
    font-style: normal;
    line-height: 1;
  }

  .mobile-team__meta {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.25;
  }

  .mobile-team .stars {
    color: var(--green) !important;
    font-size: 0.82rem;
    line-height: 1;
  }

  .mobile-team small {
    color: var(--blue);
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.2;
  }

  .mobile-team--empty {
    min-height: 92px;
    color: var(--muted);
    font-weight: 900;
  }
}
