:root {
  color-scheme: light;
  --ink: #1a312b;
  --muted: #737b73;
  --paper: #f5f4ed;
  --line: #e2e4da;
  --gold: #f6d477;
  --blue: #8bd0ec;
  --field: #173c32;
  --font: 'DM Sans', system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
}
button,
input,
select {
  font: inherit;
}
button,
select,
summary {
  cursor: pointer;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
  opacity: 0.38;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #57a3b8;
  outline-offset: 3px;
}
button:disabled:active {
  transform: none;
}
[hidden] {
  display: none !important;
}
select {
  width: 100%;
  padding: 11px 32px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fafbf7;
  min-width: 0;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #677367;
}
label select {
  margin-top: 7px;
}
input[type='range'] {
  width: 100%;
  accent-color: #416b50;
}
input[type='checkbox'] {
  accent-color: var(--gold);
}
.site-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
}
.brand {
  display: flex;
  gap: 7px;
  align-items: center;
  text-decoration: none;
  font-weight: 800;
  font-family: Manrope, var(--font);
  letter-spacing: 1px;
  font-size: 16px;
  color: var(--ink);
}
.brand > span:last-child {
  font-weight: 400;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 23px;
  margin-right: 5px;
}
.header-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #6c786c;
}
.version {
  color: #929a90;
  margin-left: 7px;
}
.status-dot {
  height: 6px;
  width: 6px;
  background: #82a47a;
  display: inline-block;
  border-radius: 50%;
  flex-shrink: 0;
}
main {
  max-width: 1440px;
  padding: 0 48px;
  margin: auto;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0 28px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: #83917d;
}
h1 {
  font-family: Manrope, var(--font);
  font-size: 43px;
  line-height: 1.13;
  letter-spacing: -1.9px;
  margin: 8px 0 10px;
  font-weight: 800;
}
h1 em {
  font-style: normal;
  color: #5c7960;
}
.intro p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}
.button {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 11px 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
}
.button.light {
  background: transparent;
  font-size: 12px;
}
.button.light span {
  font-size: 17px;
}
.button:hover:not(:disabled) {
  background: #eaeee3;
}
.button.snap {
  background: var(--gold);
  color: #243a28;
  border-color: var(--gold);
  padding: 13px 23px;
  font-weight: 700;
}
.button.snap:hover:not(:disabled) {
  background: #ffe49a;
}
.button.dark {
  background: transparent;
  color: #d9e5d9;
  border-color: #3d564a;
  font-size: 12px;
}
.button.dark:hover:not(:disabled) {
  background: #365345;
}
.button.small {
  padding: 9px 10px;
  font-size: 11px;
  flex: 1;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 20px;
  align-items: start;
}
.field-panel {
  border-radius: 14px;
  overflow: hidden;
  background: #132f28;
  box-shadow: 0 12px 35px #142d2512;
}
.field-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #315044;
  color: #dce5d5;
  gap: 10px;
}
.play-status,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.play-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}
.toolbar-divider {
  width: 1px;
  height: 12px;
  background: #496354;
}
.down-label {
  color: #9eaf99;
}
.clock {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #c6d5c2;
  min-width: 34px;
}
.toggle {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #aebfa5;
}
.field-wrap {
  position: relative;
  background: radial-gradient(ellipse at 50% 45%, #27513d, #17392e);
  overflow: hidden;
}
.field-wrap svg {
  display: block;
  width: 100%;
  touch-action: none;
  user-select: none;
}
.field-caption {
  position: absolute;
  bottom: 13px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #b9c9ae;
  pointer-events: none;
}
.field-caption > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-offense,
.legend-defense {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.legend-defense {
  background: var(--blue);
}
.attack-direction {
  margin-left: auto;
  color: #7c9b78;
}
.transport {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #35533c;
  align-items: center;
}
.transport-primary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.speed-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9db093;
  font-size: 11px;
}
.speed-label select {
  background: #213f32;
  border-color: #405c48;
  color: #d6e4cc;
  margin: 0;
  padding: 9px;
  width: 65px;
}
.field-hint {
  padding: 0 22px 16px;
  font-size: 11px;
  color: #a5b99e;
  min-height: 31px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel {
  padding: 19px;
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.1px;
  margin: 0;
}
.small-tag {
  font-size: 9px;
  color: #899280;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
.setup-grid {
  display: grid;
  gap: 13px;
}
.segmented {
  margin-top: 18px;
  background: #eeefe7;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  gap: 4px;
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 9px 10px;
  flex: 1;
  font-size: 11px;
  border-radius: 6px;
  color: #71806a;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
}
.segmented button.active {
  background: #fffefb;
  box-shadow: 0 1px 5px #00000010;
  color: var(--ink);
  font-weight: 700;
}
.segmented i {
  width: 7px;
  height: 7px;
}
.text-button {
  border: 0;
  background: none;
  font-size: 11px;
  color: #6b7e62;
  padding: 0;
}
.player-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 16px;
  min-height: 40px;
}
.player-badge {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: var(--gold);
  color: #36432c;
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 4px #ffffff55;
}
.player-heading h3 {
  font-size: 13px;
  margin: 0 0 4px;
  font-weight: 700;
}
.muted {
  color: var(--muted);
  font-size: 11px;
}
.priority-badge {
  font-size: 8px;
  letter-spacing: 0.4px;
  color: #7d6a30;
  background: #faf1d5;
  padding: 5px;
  border-radius: 4px;
  margin-left: auto;
  white-space: nowrap;
}
.attributes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 17px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.attributes > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.attributes span {
  font-family: Manrope, var(--font);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}
.attributes small {
  font-size: 8px;
  letter-spacing: 0.8px;
  color: #929889;
}
.control-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.assignment-note {
  font-size: 11px;
  line-height: 1.65;
  color: #77816e;
  margin: 13px 0 0;
}
.abilities {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 13px;
}
.abilities summary {
  font-size: 11px;
  color: #839078;
}
.ability-fields {
  padding-top: 11px;
  display: grid;
  gap: 8px;
}
.ability-fields label {
  font-size: 11px;
}
.log-panel {
  padding-bottom: 12px;
}
.log-panel .section-title {
  margin-bottom: 9px;
}
#play-log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
#play-log li {
  font-size: 11px;
  line-height: 1.65;
  color: #6c7c64;
  padding: 9px 0;
  display: flex;
  gap: 9px;
  border-top: 1px solid #ecede6;
}
#play-log li:first-child {
  border-top: 0;
}
#play-log time {
  color: #99a18e;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  font-size: 10px;
  padding-top: 1px;
}
#play-log .empty-log {
  display: block;
  color: #929b85;
}
#defense-controls > label + label {
  margin-top: 12px;
}
#zone-controls {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
#zone-depth-value {
  float: right;
  font-variant-numeric: tabular-nums;
}
.result-overlay {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 80%);
  padding: 22px;
  text-align: center;
  background: #f8f7edee;
  backdrop-filter: blur(8px);
  border: 1px solid #fff9;
  border-radius: 12px;
  box-shadow: 0 12px 32px #061e2844;
  pointer-events: none;
}
.result-overlay .eyebrow {
  color: #849575;
  font-size: 9px;
}
.result-overlay h2 {
  font-family: Manrope, var(--font);
  font-size: 25px;
  letter-spacing: -0.7px;
  margin: 8px 0;
  color: #213d2d;
}
.result-overlay p {
  font-size: 12px;
  line-height: 1.5;
  color: #687c60;
  margin: 0;
}
.result-overlay > span:last-child {
  display: inline-block;
  font-family: Manrope, var(--font);
  font-weight: 700;
  margin-top: 11px;
  color: #3f6d41;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #8a9483;
  font-size: 10px;
  padding: 24px 0 30px;
}
footer > span:first-child {
  display: flex;
  gap: 7px;
  align-items: center;
}
.footer-dot {
  width: 4px;
  height: 4px;
  background: #8b9b7e;
  border-radius: 50%;
  flex-shrink: 0;
}
.help-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 18px 22px;
  margin-bottom: 20px;
  border: 1px solid #dbe0cf;
  border-radius: 10px;
  background: #edf0e5;
}
.help-panel b {
  font-size: 12px;
}
.help-panel p {
  font-size: 12px;
  line-height: 1.6;
  color: #728166;
  margin: 6px 0 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.live-dot {
  background: var(--gold);
}
.live-dot:after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  animation: pulse 1.5s ease-out infinite;
}
@keyframes pulse {
  to {
    transform: scale(3);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (min-width: 1200px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 322px;
  }
  .panel {
    padding: 21px;
  }
  .intro {
    padding: 34px 0 30px;
  }
}
@media (max-width: 1050px) {
  .site-header {
    padding: 0 24px;
  }
  main {
    padding: 0 24px;
  }
  .workspace {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .panel {
    padding: 15px;
  }
  .field-toolbar {
    padding: 16px;
  }
  .transport {
    padding: 14px;
    gap: 6px;
  }
  .button.snap {
    padding: 12px 15px;
  }
  .button.dark {
    padding: 10px;
  }
  .intro h1 {
    font-size: 38px;
  }
}
@media (max-width: 800px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .log-panel {
    grid-column: 1/-1;
  }
  .inspector {
    grid-column: 2;
    grid-row: 1/3;
  }
  .play-setup {
    grid-column: 1;
  }
  .log-panel {
    grid-column: 1;
    grid-row: 2;
  }
  .intro {
    padding: 25px 0;
  }
  .intro p {
    max-width: 340px;
    line-height: 1.6;
  }
  .field-wrap svg {
    max-height: none;
  }
  .help-panel {
    gap: 14px;
  }
  .header-note {
    font-size: 9px;
  }
  .version {
    display: none;
  }
  footer > span:last-child {
    display: none;
  }
}
@media (max-width: 520px) {
  .site-header {
    height: 62px;
    padding: 0 16px;
  }
  .brand {
    font-size: 13px;
    gap: 5px;
  }
  .brand-mark {
    width: 26px;
    height: 26px;
    font-size: 20px;
  }
  .header-note {
    font-size: 8px;
    letter-spacing: 0.6px;
    gap: 5px;
  }
  main {
    padding: 0 12px;
  }
  .intro {
    padding: 24px 4px 20px;
    gap: 10px;
    align-items: flex-start;
  }
  .intro h1 {
    font-size: 34px;
  }
  .intro .eyebrow {
    font-size: 8px;
  }
  .intro p {
    font-size: 11px;
    max-width: 220px;
  }
  .intro .button {
    font-size: 10px;
    padding: 8px;
    margin-top: 25px;
  }
  .intro .button span {
    display: none;
  }
  .help-panel {
    grid-template-columns: 1fr;
  }
  .field-toolbar {
    padding: 14px 12px;
  }
  .play-status {
    font-size: 9px;
    gap: 7px;
  }
  .toolbar-right {
    gap: 7px;
  }
  .toggle {
    font-size: 9px;
  }
  .transport {
    padding: 12px;
    align-items: flex-start;
  }
  .transport-primary {
    gap: 5px;
  }
  .button.snap {
    font-size: 12px;
    padding: 11px 12px;
  }
  .button.dark {
    font-size: 10px;
    padding: 11px 8px;
  }
  .speed-label {
    font-size: 0;
    gap: 0;
  }
  .speed-label select {
    font-size: 11px;
    width: 53px;
    padding: 9px 5px;
  }
  .field-hint {
    padding: 0 13px 13px;
    font-size: 10px;
    line-height: 1.5;
  }
  .field-caption {
    left: 15px;
    right: 15px;
    gap: 12px;
    font-size: 8px;
  }
  .sidebar {
    display: flex;
    gap: 12px;
  }
  .panel {
    padding: 18px;
  }
  .setup-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .panel select {
    font-size: 12px;
  }
  .attributes small {
    font-size: 9px;
  }
  .attributes span {
    font-size: 24px;
  }
  .player-heading h3 {
    font-size: 14px;
  }
  footer {
    padding: 18px 4px;
    font-size: 9px;
  }
  select,
  input {
    font-size: 16px !important;
  }
  .speed-label select {
    font-size: 12px !important;
  }
  .setup-grid select {
    padding: 10px 5px;
  }
  .assignment-note {
    font-size: 12px;
  }
  .button.small {
    font-size: 12px;
  }
  .abilities summary {
    font-size: 12px;
  }
  .log-panel li {
    font-size: 12px !important;
  }
}
/* Keep the complete play and snap controls within a typical desktop viewport. */
@media (min-width: 801px) {
  .site-header {
    height: 64px;
  }
  .intro {
    padding: 20px 0;
  }
  .intro h1 {
    font-size: 36px;
    margin: 6px 0 8px;
  }
  .intro p {
    font-size: 12px;
  }
}
/* Team building and the drive duel. */
.intro-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.match-bar {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr auto;
  align-items: center;
  gap: 20px;
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
}
.team-score {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 15px;
  align-items: center;
}
.team-score .eyebrow {
  font-size: 8px;
  grid-column: 1;
}
.team-score b {
  grid-column: 1;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.team-score strong {
  grid-column: 2;
  grid-row: 1/3;
  font:
    800 30px Manrope,
    var(--font);
  color: #4c6750;
}
.cpu-score strong {
  color: #5c8c9d;
}
.match-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.match-center > b {
  font-size: 14px;
}
.match-center > span:last-child {
  font-size: 10px;
  color: #7b8773;
}
.match-notice {
  font-size: 11px;
  line-height: 1.5;
  color: #75816e;
  padding: 12px 3px;
  min-height: 41px;
}
.match-notice.warning {
  color: #9a4d28;
}
.field-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.coach-panel {
  padding: 18px;
}
.coach-panel .section-title {
  margin-bottom: 7px;
}
.coach-intro {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 13px;
}
#coach-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.coach-option {
  text-align: left;
  border: 1px solid #e1e5d9;
  background: #f6f7f0;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
  color: var(--ink);
  position: relative;
}
.coach-option:hover:not(:disabled) {
  border-color: #8fa57f;
  background: #eef2e6;
}
.coach-number {
  font-family: Manrope, var(--font);
  font-weight: 800;
  font-size: 11px;
  color: #8b9d7c;
}
.coach-option b {
  font-size: 11px;
  line-height: 1.45;
  display: block;
  margin-bottom: 7px;
}
.coach-option small {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  color: #76816c;
}
.coach-option em {
  display: block;
  font-style: normal;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 9px;
  color: #839077;
}
.coach-apply {
  font-size: 10px;
  font-weight: 700;
  margin-top: auto;
  padding-top: 4px;
}
.compact-attributes {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.compact-attributes span {
  font-size: 18px;
}
.compact-attributes small {
  font-size: 8px;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.play-setup .setup-grid {
  grid-template-columns: 1fr;
}
.sidebar .panel {
  padding: 17px;
}
.sidebar .section-title {
  margin-bottom: 12px;
}
dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  border: 1px solid #d7ded0;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  padding: 26px;
  box-shadow: 0 24px 100px #001a2555;
}
dialog::backdrop {
  background: #122f2cb3;
  backdrop-filter: blur(4px);
}
.team-dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}
.team-dialog-heading h2 {
  font-family: Manrope, var(--font);
  font-size: 26px;
  letter-spacing: -0.8px;
  margin-top: 5px;
}
.roster-summary {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 26px;
  align-items: center;
}
.roster-summary input {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #dce0d3;
  background: #fffef9;
  color: var(--ink);
  margin-top: 7px;
}
.budget-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.budget-card b {
  font-size: 13px;
}
.budget-card span {
  font-size: 11px;
  color: #69805f;
}
.budget-card small {
  font-size: 10px;
  color: #89917f;
}
.budget-track {
  height: 7px;
  border-radius: 5px;
  background: #e0e6d7;
  margin: 11px 0 7px;
  overflow: hidden;
}
.budget-track > span {
  height: 100%;
  display: block;
  background: #829d6c;
  border-radius: 5px;
  transition: width 0.12s;
}
.budget-track > span.over-budget {
  background: #c87645;
}
.over-budget-text {
  color: #a64f2b !important;
}
.roster-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 16px;
}
.roster-layout .segmented {
  margin: 0 0 10px;
}
.roster-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  max-height: 372px;
  overflow-y: auto;
  padding-right: 4px;
}
.roster-player {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: transparent;
  padding: 9px;
  border-radius: 7px;
  color: var(--ink);
  text-align: left;
}
.roster-player:hover {
  background: #ecefe5;
}
.roster-player.selected {
  background: #fffef9;
  border-color: #cad6bb;
}
.roster-slot {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e6e8d8;
  font-size: 10px;
  font-weight: 700;
}
.roster-player.selected .roster-slot {
  background: var(--gold);
}
.roster-player b {
  display: block;
  font-size: 11px;
  margin-bottom: 3px;
}
.roster-player small {
  display: block;
  font-size: 9px;
  color: #86917b;
}
.roster-cost {
  margin-left: auto;
  font-size: 10px;
  color: #8a967e;
  font-variant-numeric: tabular-nums;
}
.roster-editor {
  background: #fffef9;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px;
}
.roster-editor h3 {
  font-size: 13px;
  margin: 0;
}
.roster-ability {
  display: block;
  margin-bottom: 17px;
}
.roster-ability > span {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #465d3f;
  font-weight: 600;
}
.roster-ability output {
  font-size: 13px;
  font-weight: 700;
}
.roster-ability input {
  display: block;
  margin: 9px 0 5px;
}
.roster-ability small {
  display: block;
  font-weight: 400;
  font-size: 10px;
  line-height: 1.45;
  color: #8a9480;
}
.roster-editor .text-button {
  margin-top: 2px;
}
.saved-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.saved-teams > div:first-child {
  flex: 1;
  min-width: 220px;
}
.saved-teams h3 {
  font-size: 13px;
  margin: 0 0 5px;
}
.saved-teams p {
  font-size: 10px;
  line-height: 1.5;
  color: #849078;
  margin: 0;
}
.save-controls {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.save-controls .button {
  font-size: 11px;
  padding: 10px 12px;
}
.saved-team-picker {
  display: flex;
  gap: 12px;
  flex: 1 1 100%;
  align-items: center;
}
.saved-team-picker select {
  flex: 1;
  width: auto;
  min-width: 0;
}
.saved-team-picker .button {
  flex: 0;
}
.team-message {
  font-size: 11px;
  color: #738564;
  line-height: 1.5;
  min-height: 17px;
  margin: 14px 0 0;
}
@media (min-width: 801px) {
  .intro {
    padding: 19px 0;
  }
  .intro h1 {
    font-size: 34px;
  }
  .field-toolbar {
    padding: 15px 20px;
  }
  .match-bar {
    padding: 15px 20px;
  }
  .field-column .field-wrap svg {
    min-height: 360px;
  }
}
@media (max-width: 1050px) {
  .match-bar {
    gap: 12px;
  }
  .match-center > b {
    font-size: 12px;
  }
  .team-score b {
    font-size: 12px;
  }
  .team-score strong {
    font-size: 26px;
  }
  #coach-options {
    grid-template-columns: 1fr;
  }
  .coach-option {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: start;
  }
  .coach-option b {
    margin-bottom: 4px;
  }
  .coach-option em {
    margin-top: 5px;
  }
  .coach-apply {
    margin: 0;
    white-space: nowrap;
  }
  .compact-attributes {
    gap: 5px;
  }
  .compact-attributes span {
    font-size: 17px;
  }
}
@media (max-width: 800px) {
  .match-bar {
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
  }
  .match-center {
    grid-row: 2;
    grid-column: 1/-1;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  .match-center .small-tag {
    display: none;
  }
  .cpu-score {
    grid-column: 2;
  }
  .match-bar #new-match {
    grid-column: 3;
    grid-row: 1;
  }
  .sidebar {
    display: flex;
    align-items: stretch;
  }
  .coach-panel {
    order: 2;
  }
  #coach-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .coach-option {
    display: flex;
  }
  .compact-attributes span {
    font-size: 23px;
  }
  .compact-attributes small {
    font-size: 10px;
  }
  .intro-actions {
    flex-direction: column;
    gap: 9px;
  }
  .sidebar .panel {
    padding: 18px;
  }
}
@media (max-width: 560px) {
  .match-bar {
    padding: 13px;
    gap: 8px;
  }
  .match-bar #new-match {
    font-size: 9px;
  }
  .team-score {
    gap: 4px 8px;
  }
  .team-score strong {
    font-size: 24px;
  }
  .team-score b {
    font-size: 11px;
  }
  .team-score .eyebrow {
    font-size: 7px;
  }
  .match-center > b {
    font-size: 11px;
  }
  .match-center > span:last-child {
    font-size: 9px;
  }
  .match-notice {
    font-size: 10px;
    padding: 10px 4px;
  }
  .intro .button {
    margin-top: 14px;
  }
  .intro-actions .text-button {
    font-size: 10px;
  }
  .intro h1 {
    font-size: 31px;
  }
  .intro p {
    max-width: 200px;
  }
  #coach-options {
    grid-template-columns: 1fr;
  }
  .coach-option {
    display: grid;
    grid-template-columns: 20px 1fr auto;
  }
  .coach-option small {
    font-size: 11px;
  }
  .coach-option b {
    font-size: 12px;
  }
  dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 18px;
  }
  .team-dialog-heading {
    margin-bottom: 18px;
  }
  .team-dialog-heading h2 {
    font-size: 23px;
  }
  .roster-summary {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .roster-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .roster-list {
    max-height: 190px;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }
  .roster-player {
    padding: 7px;
    gap: 6px;
  }
  .roster-player b {
    font-size: 10px;
  }
  .roster-player small {
    font-size: 8px;
  }
  .roster-cost {
    display: none;
  }
  .roster-slot {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }
  .roster-editor {
    padding: 17px;
  }
  .roster-ability small {
    font-size: 11px;
  }
  .roster-ability > span {
    font-size: 12px;
  }
  .saved-team-picker {
    gap: 8px;
  }
  .budget-card small {
    font-size: 10px;
  }
  .saved-teams p {
    font-size: 11px;
  }
  .team-message {
    font-size: 12px;
  }
}

.mode-bar {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
  max-width: 580px;
}
.mode-button {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid #dce2d4;
  border-radius: 10px;
  background: #fffef9;
  padding: 13px 17px;
  font-weight: 700;
  font-size: 13px;
  color: #71836b;
}
.mode-button span {
  font-size: 10px;
  font-weight: 400;
  color: #89967e;
}
.mode-button.active {
  border-color: #234b3b;
  background: #234b3b;
  color: #f7f5e5;
  box-shadow: 0 3px 9px #18382d12;
}
.mode-button.active span {
  color: #bacbad;
}
.mode-button:hover:not(.active) {
  background: #eaf0e1;
}
@media (max-width: 560px) {
  .mode-bar {
    gap: 8px;
    margin-bottom: 16px;
  }
  .mode-button {
    padding: 12px;
    font-size: 12px;
  }
  .mode-button span {
    font-size: 9px;
  }
}
.mode-bar {
  max-width: 1000px;
}
.mode-button {
  min-width: 0;
}
#leave-dialog {
  max-width: 440px;
  padding: 28px;
}
#leave-dialog h2 {
  font-size: 24px;
  margin: 0 0 12px;
}
#leave-dialog p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.leave-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
@media (max-width: 420px) {
  .mode-button {
    padding: 11px 8px;
    font-size: 10px;
  }
  .mode-button span {
    font-size: 8px;
    line-height: 1.5;
  }
  .leave-actions {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .mode-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mode-button {
    font-size: 12px;
    padding: 12px;
  }
  .mode-button span {
    font-size: 9px;
  }
}

/* Three headline modes, with familiar extras kept one tap away. */
.mode-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: none;
  gap: 8px 12px;
}
.mode-secondary {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border-color: transparent;
  padding: 9px 15px;
  font-size: 11px;
}
.mode-secondary span {
  font-size: 9px;
}
.mode-secondary.active {
  box-shadow: none;
  background: #e3ead9;
  color: #294a36;
  border-color: #bdcbb2;
}
.mode-secondary.active span {
  color: #657b59;
}
@media (max-width: 560px) {
  .mode-bar {
    gap: 7px;
  }
  .mode-button {
    padding: 11px 9px;
    font-size: 12px;
  }
  .mode-button span {
    font-size: 9px;
    line-height: 1.4;
  }
  .mode-secondary {
    padding: 8px 6px;
    font-size: 10px;
    justify-content: center;
  }
  .mode-secondary span {
    display: none;
  }
}
