/* Career layer: owner, rivalry flags, recap, firing, legacy, history extras. Uses the game.css tokens. */
.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent);
  color: oklch(98% 0.007 85);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
#toast.has-action {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
#toast button {
  min-height: 44px;
  min-width: 64px;
  border: 1px solid oklch(85% 0.05 120);
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font-weight: 700;
  padding: 0 14px;
}
#toast button:focus-visible {
  outline: 2px solid oklch(92% 0.1 110);
  outline-offset: 2px;
}

/* Owner card */
.cr-owner {
  margin-top: 28px;
  padding: 20px 22px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}
.cr-owner header h2 {
  font-size: 26px;
  margin: 4px 0 2px;
}
.cr-owner header p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}
.cr-meter {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: var(--surface);
  overflow: visible;
}
.cr-meter > span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--positive);
  transition: width 0.3s;
}
.cr-meter.is-mid > span {
  background: oklch(62% 0.13 75);
}
.cr-meter.is-low > span {
  background: var(--negative);
}
.cr-line {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--ink);
  opacity: 0.35;
}
.cr-line-fire {
  background: var(--negative);
  opacity: 0.8;
}
.cr-meter-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.cr-meter-line strong {
  font:
    600 32px "Barlow Condensed",
    sans-serif;
  color: var(--ink);
  line-height: 1;
}
.cr-meter-line small {
  margin-left: auto;
  font-size: 12px;
}
.cr-warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--negative);
  background: oklch(95% 0.03 28);
  color: oklch(36% 0.12 28);
  font-size: 13px;
}
.cr-goals {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.cr-goals li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.cr-goal-state {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.cr-goals .is-met .cr-goal-state {
  border-color: var(--positive);
  background: var(--positive);
  color: oklch(98% 0.007 85);
}
.cr-goals .is-missed .cr-goal-state {
  border-color: var(--negative);
  color: var(--negative);
}
.cr-goals li > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cr-goals small {
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.cr-goals strong {
  font-size: 15px;
}
.cr-goals em {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

/* Lineup alert */
.cr-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid oklch(78% 0.1 70);
  border-left: 4px solid oklch(62% 0.14 70);
  border-radius: 6px;
  background: oklch(96% 0.035 80);
  color: var(--ink);
}
.cr-alert > div {
  flex: 1 1 260px;
}
.cr-alert ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}
.cr-alert .btn {
  min-height: 44px;
}
dialog .cr-alert {
  margin: 14px 0 0;
}

/* Rivalry */
.cr-rivalry-flag {
  margin: 0;
  padding: 9px 22px;
  background: oklch(30% 0.05 40);
  color: oklch(94% 0.04 70);
  font-size: 13px;
  letter-spacing: 0.2px;
}
.cr-rivalry-flag b {
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--accent);
  color: oklch(98% 0.007 85);
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.match-preview .cr-rivalry-flag {
  border-radius: 4px;
  margin: 10px 0;
}
.cr-rival-chip,
.cr-rival-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--accent);
  color: oklch(98% 0.007 85);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.cr-forecast {
  margin: 8px 0 0;
  font-size: 13px;
}
.week-fixture .cr-forecast {
  color: oklch(82% 0.018 85);
}
.season-strip .cr-rival-tag {
  justify-self: center;
}

/* Dialogs */
dialog:has(.cr-recap),
dialog:has(.cr-firing),
dialog:has(.cr-legacy-dialog) {
  width: min(720px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  overflow: auto;
}
dialog:has(.cr-firing) .dialog-close,
dialog:has(.cr-legacy-dialog) .dialog-close {
  display: none;
}
.cr-recap h2,
.cr-firing h2,
.cr-legacy-dialog h2 {
  margin: 4px 0 14px;
}
.cr-recap-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 8px;
}
.cr-recap-head strong {
  display: block;
  font:
    600 44px "Barlow Condensed",
    sans-serif;
  line-height: 1;
}
.cr-recap-head span {
  font-size: 13px;
  color: var(--muted);
}
.cr-block {
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
.cr-block h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.cr-block blockquote {
  margin: 10px 0;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--accent);
  font-size: 15px;
}
.cr-shift {
  margin: 4px 0 8px;
  font-size: 14px;
}
.cr-awards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.cr-awards li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  position: relative;
}
.cr-awards small {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.cr-awards span {
  font-size: 12px;
  color: var(--muted);
}
.cr-awards .is-mine,
.cr-hof .is-mine,
.cr-chips .is-mine {
  border-color: var(--accent);
  background: oklch(96% 0.03 60);
}
.cr-yours {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
}
.cr-awards-small {
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 12px 0 6px;
}
.cr-awards-small li {
  grid-template-columns: 68px 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding: 7px 10px;
}
.cr-allpro {
  font-size: 13px;
  margin: 12px 0 6px;
}
.cr-allpro mark {
  background: oklch(92% 0.08 70);
  color: inherit;
  padding: 0 3px;
}
.cr-block details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
}
.cr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
}
.cr-chips span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 12px;
}
.cr-leaders,
.cr-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.cr-leaders > div,
.cr-pair > div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 5px;
}
.cr-leaders small,
.cr-pair small {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.cr-leaders span,
.cr-pair span {
  font-size: 12px;
  color: var(--muted);
}
.cr-money strong {
  font: 600 24px "Barlow Condensed", sans-serif;
}
.cr-firing-record {
  font-weight: 700;
  color: var(--ink);
}
.cr-offers {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.cr-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.cr-offer > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cr-offer .club-disc {
  width: 42px;
  height: 42px;
  font-size: 18px;
}
.cr-offer span {
  display: grid;
}
.cr-offer small {
  color: var(--muted);
  font-size: 12px;
}
.cr-offer .btn {
  min-height: 44px;
}

/* Legacy view */
.cr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 8px 0 20px;
}
.cr-stats > div {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}
.cr-stats small {
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.cr-stats strong {
  font: 600 34px "Barlow Condensed", sans-serif;
  line-height: 1.05;
}
.cr-stats span {
  font-size: 12px;
  color: var(--muted);
}
.cr-honors {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cr-honors li {
  padding: 8px 12px;
  border-radius: 5px;
  background: oklch(94% 0.05 85);
  font-size: 13px;
}
.cr-honors small {
  display: block;
  color: var(--muted);
}
.cr-records caption {
  text-align: left;
  font-weight: 700;
  padding: 6px 0;
}
.cr-hof {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.cr-hof article {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.cr-hof small {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.cr-hof span,
.cr-hof em {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
}
.cr-trans p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.cr-trans small {
  min-width: 90px;
  color: var(--muted);
}
.cr-trans em {
  font-style: normal;
  color: var(--muted);
}
.cr-fin {
  font-size: 12px;
}

@media (max-width: 760px) {
  .cr-owner {
    padding: 16px 16px 4px;
  }
  .cr-awards {
    grid-template-columns: 1fr;
  }
  .cr-rivalry-flag {
    padding: 9px 16px;
  }
  .cr-offer .btn,
  .cr-alert .btn {
    width: 100%;
  }
  dialog:has(.cr-recap),
  dialog:has(.cr-firing),
  dialog:has(.cr-legacy-dialog) {
    padding: 20px 16px;
  }
  .cr-recap-head strong {
    font-size: 38px;
  }
  .cr-trans small {
    min-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cr-meter > span {
    transition: none;
  }
}

.data-table .club-disc {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  font-size: 12px;
  vertical-align: middle;
  border-width: 1px;
}

.cr-firing > p,
.cr-legacy-dialog > p {
  margin: 0 0 12px;
}
.cr-firing h3 {
  margin: 22px 0 4px;
  font-size: 18px;
}
.cr-legacy-dialog .cr-stats {
  margin: 12px 0 16px;
}
