:root {
  color-scheme: dark;
  --bg: #101311;
  --panel: #171c19;
  --panel-2: #1e2521;
  --line: #303a34;
  --text: #f3f5ef;
  --muted: #aeb9ad;
  --soft: #d8dece;
  --lime: #b7ef5d;
  --green: #37c484;
  --gold: #ffd166;
  --coral: #ff6f61;
  --aqua: #67d8d0;
  --rose: #f58aa7;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 14px;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(16, 19, 17, 0.96), rgba(12, 16, 14, 0.96)),
    repeating-linear-gradient(45deg, rgba(183, 239, 93, 0.055) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(135deg, rgba(103, 216, 208, 0.04) 0 1px, transparent 1px 26px),
    #101311;
  color: var(--text);
  font-family:
    Outfit, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.app-frame {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(420px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 209, 102, 0.48);
  border-radius: 10px 10px 16px 16px;
  background:
    radial-gradient(circle at 50% 72%, rgba(255, 92, 168, 0.35), transparent 32%),
    linear-gradient(145deg, rgba(183, 239, 93, 0.28), transparent 44%),
    linear-gradient(180deg, #18251c, #0f1512);
  color: var(--lime);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.28);
  clip-path: polygon(8% 0, 92% 0, 100% 70%, 50% 100%, 0 70%);
}

.mark-goal {
  position: absolute;
  top: 8px;
  width: 26px;
  height: 17px;
  border: 3px solid rgba(255, 209, 102, 0.9);
  border-bottom: 0;
}

.mark-goal::before {
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 28px;
  background: rgba(255, 209, 102, 0.9);
  content: "";
  transform: translateX(-50%);
}

.mark-core {
  position: relative;
  z-index: 1;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(183, 239, 93, 0.52);
  border-radius: 50%;
  background: #101311;
  color: var(--lime);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 21px;
  line-height: 1;
  box-shadow: 0 0 18px rgba(183, 239, 93, 0.2);
}

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

h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.96;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #252d28;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button.spin-button {
  min-height: 48px;
  padding: 10px 22px;
  border-color: rgba(255, 209, 102, 0.72);
  background: linear-gradient(135deg, #ffd166, #b7ef5d 58%, #37c484);
  color: #0d140f;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 10px 28px rgba(183, 239, 93, 0.18);
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(183, 239, 93, 0.48);
  background: #2d372f;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.button.primary {
  border-color: rgba(183, 239, 93, 0.5);
  background: linear-gradient(135deg, #b7ef5d, #37c484);
  color: #0d140f;
}

.button.warning {
  border-color: rgba(255, 111, 97, 0.44);
  background: rgba(255, 111, 97, 0.13);
  color: #ffd8d3;
}

.button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.icon,
.button-icon {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  line-height: 1;
}

.button-icon {
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.panel {
  scroll-margin-top: 112px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(23, 28, 25, 0.92);
  box-shadow: var(--shadow);
}

.draft-panel,
.results-panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 0;
}

.panel-title {
  font-size: 15px;
}

.mini {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.meter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.metric {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111713;
}

.metric b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.pitch {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  margin: 0 12px 12px;
  border: 1px solid rgba(183, 239, 93, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 12.5% 100%,
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 10%,
    linear-gradient(180deg, #1f6b43 0%, #145532 100%);
}

.pitch::before,
.pitch::after {
  position: absolute;
  z-index: 0;
  left: 9%;
  right: 9%;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
  content: "";
}

.pitch::before {
  top: 50%;
}

.pitch::after {
  top: 12%;
  box-shadow: 0 560px rgba(255, 255, 255, 0.16);
}

.slots {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: repeat(8, minmax(52px, auto));
  gap: 9px;
  padding: 16px;
}

.slot-line {
  display: grid;
  gap: 10px;
}

.slot-line.fullback,
.slot-line.hooker {
  grid-template-columns: minmax(0, 0.72fr);
  justify-content: center;
}

.slot-line.wings,
.slot-line.centres,
.slot-line.halves,
.slot-line.edges {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slot-line.middles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slot-line.lock {
  grid-template-columns: minmax(0, 0.72fr);
  justify-content: center;
}

.slot {
  min-width: 0;
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(9, 16, 11, 0.74);
  backdrop-filter: blur(6px);
}

.slot.open {
  border-color: rgba(255, 209, 102, 0.82);
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.22), rgba(55, 196, 132, 0.1)),
    rgba(9, 16, 11, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(255, 209, 102, 0.18),
    0 0 0 2px rgba(255, 209, 102, 0.08);
}

.slot.filled {
  border-color: rgba(183, 239, 93, 0.42);
  background: rgba(18, 30, 18, 0.88);
}

.slot-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--soft);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.slot-rating {
  display: inline-flex;
  min-width: 30px;
  justify-content: center;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--rating-bg, rgba(183, 239, 93, 0.16));
  color: var(--rating-color, var(--lime));
}

.slot-name {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.slot.open .slot-name {
  color: var(--gold);
}

.slot.open .slot-role {
  color: #fff1b9;
}

.slot.open .slot-meta {
  color: var(--gold);
  font-weight: 900;
}

.slot.goal-kicker-slot {
  border-color: rgba(255, 209, 102, 0.58);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.12), transparent 64%),
    rgba(13, 19, 15, 0.9);
}

.slot-meta {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.mode-button {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111713;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  font-size: 11px;
}

.mode-button small {
  margin-top: 1px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.mode-button.active small {
  color: #fff1b9;
}

.intro-panel {
  margin: 12px 12px 0;
  padding: 12px;
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
    rgba(17, 23, 19, 0.92);
}

.intro-panel h2 {
  color: var(--gold);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 0.96;
}

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

.intro-grid p {
  color: var(--soft);
  font-size: 11px;
  line-height: 1.35;
}

.mode-button.active {
  border-color: rgba(103, 216, 208, 0.58);
  background: rgba(103, 216, 208, 0.12);
  color: var(--aqua);
}

.mode-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.style-picker {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.style-picker h3 {
  font-size: 14px;
}

.style-picker p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.style-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.style-button {
  min-width: 0;
  min-height: 52px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111713;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.style-button b,
.style-button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-button b {
  color: var(--text);
  font-size: 11px;
}

.style-button span {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.15;
}

.style-button.active {
  border-color: rgba(255, 209, 102, 0.62);
  background: rgba(255, 209, 102, 0.12);
}

.style-badge {
  display: inline-flex;
  margin-left: 4px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.goal-kicker-picker {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.goal-kicker-picker h3 {
  font-size: 14px;
}

.goal-kicker-picker p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.goal-kicker-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.goal-kicker-button {
  display: grid;
  min-width: 0;
  min-height: 62px;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111713;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.goal-kicker-button b,
.goal-kicker-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-kicker-button b {
  color: var(--text);
  font-size: 10px;
}

.goal-kicker-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.goal-kicker-button.active {
  border-color: rgba(255, 209, 102, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.14), transparent 66%),
    #141911;
}

.kicker-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.kicker-stat {
  display: inline-flex;
  min-width: 0;
  padding: 2px 4px;
  border: 1px solid var(--rating-border, rgba(255, 255, 255, 0.1));
  border-radius: 999px;
  background: var(--rating-bg, rgba(255, 255, 255, 0.05));
  color: var(--rating-color, var(--soft));
  font-size: 8px;
  font-weight: 950;
  line-height: 1.1;
  white-space: nowrap;
}

.prediction-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 10px;
  align-items: center;
  margin: 0 12px 12px;
  padding: 12px;
  border: 1px solid rgba(103, 216, 208, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(103, 216, 208, 0.12), transparent 58%),
    #111713;
}

.prediction-panel h3 {
  font-size: 18px;
  line-height: 1.05;
}

.prediction-panel p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

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

.prediction-metric {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.prediction-metric span,
.prediction-metric b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-metric span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.prediction-metric b {
  margin-top: 4px;
  color: var(--text);
  font-size: 11px;
  font-weight: 950;
}

.spin-stage {
  padding: 12px;
}

.wheel-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.16), transparent 48%),
    linear-gradient(145deg, rgba(103, 216, 208, 0.12), transparent 58%),
    #111713;
}

.wheel-card::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 19px, rgba(255, 255, 255, 0.045) 19px 20px);
  content: "";
  pointer-events: none;
}

.wheel-card > * {
  position: relative;
  z-index: 1;
}

.next-slot {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.wheel-title {
  margin-top: 6px;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 0.94;
  letter-spacing: 0;
}

.wheel-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.team-name {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.team-name.compact {
  gap: 4px;
}

.team-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--team-a) 0 50%, var(--team-b) 50% 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.16),
    0 1px 6px rgba(0, 0, 0, 0.22);
}

.team-name.compact .team-icon {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.team-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-immortal-mini,
.inline-immortal,
.inline-goal-kicker {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  color: #f6d8ff;
  font-size: 0.78em;
  font-weight: 950;
  text-transform: uppercase;
}

.team-immortal-mini {
  color: #ffd166;
  text-transform: none;
}

.inline-goal-kicker {
  color: var(--gold);
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 7px;
  align-items: start;
  margin-top: 10px;
}

.player-card {
  display: flex;
  min-width: 0;
  min-height: 168px;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #151b18;
}

.player-card:hover {
  border-color: rgba(183, 239, 93, 0.34);
}

.player-card.unavailable {
  border-color: rgba(255, 255, 255, 0.05);
  background: #111512;
  opacity: 0.48;
}

.player-card.unavailable:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.player-card.immortal {
  border-color: rgba(221, 167, 255, 0.58);
  background:
    linear-gradient(135deg, rgba(221, 167, 255, 0.18), transparent 48%),
    linear-gradient(145deg, rgba(255, 209, 102, 0.14), transparent 62%),
    #17151d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.player-card.immortal.unavailable {
  opacity: 0.58;
}

.player-top {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.player-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.04;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rating-badge {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--rating-border, rgba(183, 239, 93, 0.36));
  border-radius: 8px;
  background: var(--rating-bg, #0e1510);
  color: var(--rating-color, var(--lime));
  font-size: 16px;
  font-weight: 950;
}

.player-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.tag {
  padding: 2px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font-size: 8px;
  font-weight: 800;
}

.tag.alt {
  border-color: rgba(103, 216, 208, 0.25);
  color: var(--aqua);
}

.tag.immortal-tag {
  border-color: rgba(221, 167, 255, 0.42);
  background: rgba(221, 167, 255, 0.12);
  color: #f6d8ff;
}

.ratings {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.rating-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.bar {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

.rating-immortal {
  --rating-color: #f6d8ff;
  --rating-bg: linear-gradient(135deg, rgba(221, 167, 255, 0.24), rgba(255, 209, 102, 0.18));
  --rating-border: rgba(221, 167, 255, 0.64);
}

.rating-red {
  --rating-color: #ff4d5f;
  --rating-bg: rgba(255, 77, 95, 0.14);
  --rating-border: rgba(255, 77, 95, 0.45);
}

.rating-orange {
  --rating-color: #ff9d3d;
  --rating-bg: rgba(255, 157, 61, 0.14);
  --rating-border: rgba(255, 157, 61, 0.42);
}

.rating-yellow {
  --rating-color: #ffd166;
  --rating-bg: rgba(255, 209, 102, 0.14);
  --rating-border: rgba(255, 209, 102, 0.42);
}

.rating-green {
  --rating-color: #37c484;
  --rating-bg: rgba(55, 196, 132, 0.14);
  --rating-border: rgba(55, 196, 132, 0.42);
}

.rating-blue {
  --rating-color: #67d8d0;
  --rating-bg: rgba(103, 216, 208, 0.13);
  --rating-border: rgba(103, 216, 208, 0.38);
}

.rating-grey {
  --rating-color: #aeb9ad;
  --rating-bg: rgba(174, 185, 173, 0.11);
  --rating-border: rgba(174, 185, 173, 0.24);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 7px;
}

.card-actions .button {
  width: 100%;
  min-width: 0;
}

.position-pick {
  min-height: 28px;
  flex-direction: column;
  gap: 1px;
  align-items: flex-start;
  padding: 4px 5px;
  font-size: 9px;
  line-height: 1.05;
  text-align: left;
}

.position-pick span {
  color: rgba(13, 20, 15, 0.78);
  font-size: 7px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.position-pick.secondary {
  border-color: rgba(255, 209, 102, 0.48);
  background: linear-gradient(135deg, #ffd166, #37c484);
}

.position-pick.cover {
  border-color: rgba(255, 157, 61, 0.54);
  background: linear-gradient(135deg, #ff9d3d, #ffd166);
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 18px;
}

.result-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  padding: 12px;
}

.simulation-stage {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.sim-game-card {
  min-height: 210px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(103, 216, 208, 0.08), transparent),
    #111713;
}

.sim-game-card.win {
  border-color: rgba(55, 196, 132, 0.42);
  background:
    linear-gradient(135deg, rgba(55, 196, 132, 0.18), transparent 58%),
    #111713;
}

.sim-game-card.loss {
  border-color: rgba(255, 111, 97, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 111, 97, 0.16), transparent 58%),
    #111713;
}

.sim-game-card.gold {
  border-color: rgba(255, 209, 102, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.24), transparent 58%),
    #111713;
}

.sim-game-card h2 {
  margin-top: 6px;
  font-size: clamp(44px, 9vw, 96px);
  line-height: 0.9;
}

.sim-opponent {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.sim-result {
  margin-top: 9px;
  font-size: 20px;
  font-weight: 950;
}

.sim-scorers {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.speech-card h2 {
  font-size: clamp(36px, 7vw, 74px);
}

.speech-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.speech-button {
  min-height: 76px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  text-align: left;
}

.speech-button span,
.speech-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speech-button small {
  color: rgba(13, 20, 15, 0.78);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  white-space: normal;
}

.sim-progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.sim-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua), var(--lime), var(--gold));
  transition: width 220ms ease;
}

.sim-list {
  max-height: 390px;
  overflow-y: auto;
}

.result-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111713;
}

.performance-card {
  grid-column: 1 / -1;
  border-color: rgba(103, 216, 208, 0.24);
}

.result-card h2 {
  font-size: clamp(24px, 5vw, 46px);
  line-height: 0.94;
}

.status-pill {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.13);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.leaders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.leader {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.leader span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.leader b {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px;
}

.tab {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111713;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}

.tab.active {
  border-color: rgba(183, 239, 93, 0.4);
  color: var(--lime);
}

.table-wrap {
  overflow-x: auto;
  padding: 0 12px 12px;
}

.table-note {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--soft);
}

table.compact-table {
  min-width: 560px;
}

.sim-result-cell {
  text-align: center;
}

th,
td {
  padding: 7px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-size: 11px;
}

.win {
  color: var(--lime);
  font-weight: 900;
}

.loss {
  color: #ffb0a8;
  font-weight: 900;
}

.gold {
  color: var(--gold);
  font-weight: 950;
}

.scorer-cell {
  min-width: 220px;
  color: var(--muted);
  font-size: 10px;
  white-space: normal;
}

.notice {
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 5;
  max-width: min(380px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(183, 239, 93, 0.35);
  border-radius: 8px;
  background: #111713;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .pitch {
    min-height: 560px;
  }
}

@media (max-width: 760px) {
  .panel {
    scroll-margin-top: 158px;
  }

  .player-card {
    scroll-margin-top: 158px;
  }

  .shell {
    padding: 8px;
  }

  .topbar {
    position: sticky;
    z-index: 4;
    top: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 10px;
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
      linear-gradient(135deg, rgba(16, 19, 17, 0.97), rgba(12, 16, 14, 0.97)),
      repeating-linear-gradient(45deg, rgba(183, 239, 93, 0.055) 0 1px, transparent 1px 18px),
      #101311;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .mark-goal {
    top: 7px;
    width: 22px;
    height: 14px;
  }

  .mark-core {
    width: 21px;
    height: 21px;
    font-size: 18px;
  }

  h1 {
    font-size: 36px;
  }

  .subtitle {
    font-size: 11px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
    gap: 6px;
  }

  .button {
    min-height: 34px;
    padding: 7px 8px;
  }

  .spin-button {
    grid-column: 1 / -1;
    min-height: 52px;
  }

  .draft-panel {
    order: 1;
  }

  .results-panel {
    order: 1;
  }

  .squad-panel {
    order: 2;
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .style-picker,
  .style-options,
  .goal-kicker-picker,
  .intro-grid,
  .prediction-panel,
  .prediction-grid {
    grid-template-columns: 1fr;
  }

  .goal-kicker-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meter-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .pitch {
    min-height: 0;
    margin: 0 8px 8px;
  }

  .slots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .slot-line.fullback,
  .slot-line.hooker,
  .slot-line.lock,
  .slot-line.wings,
  .slot-line.centres,
  .slot-line.halves,
  .slot-line.edges,
  .slot-line.middles {
    display: contents;
  }

  .slot {
    min-height: 54px;
    padding: 7px;
  }

  .player-card {
    min-height: 0;
  }

  .leaders {
    grid-template-columns: 1fr;
  }

  .speech-options {
    grid-template-columns: 1fr;
  }

  .speech-button {
    min-height: 64px;
  }

  .sim-list {
    padding-right: 8px;
    padding-left: 8px;
  }

  table.sim-table {
    min-width: 0;
    table-layout: fixed;
  }

  .sim-table th,
  .sim-table td {
    padding: 6px 4px;
    font-size: 10px;
  }

  .sim-game-cell {
    width: 34px;
  }

  .sim-stage-cell {
    width: 42px;
    font-weight: 900;
  }

  .sim-score-cell {
    width: 56px;
    font-weight: 900;
  }

  .sim-result-cell {
    width: 34px;
    font-size: 12px;
  }

  .sim-opponent-cell {
    overflow: hidden;
    min-width: 0;
  }

  .sim-opponent-cell .team-name {
    max-width: 100%;
  }

  .sim-opponent-cell .team-label {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tabs {
    overflow-x: auto;
  }
}
