:root {
  color-scheme: dark;
  --bg: #111318;
  --panel: #1b1f27;
  --panel-2: #222835;
  --line: #343b49;
  --text: #f4f6f8;
  --muted: #aeb7c4;
  --faint: #747e8d;
  --green: #53a86b;
  --yellow: #c8a64d;
  --gray: #4b5565;
  --red: #e06c68;
  --blue: #69a8d7;
  --key: #d8dde5;
  --key-text: #171b22;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(105, 168, 215, 0.12), transparent 340px),
    radial-gradient(circle at top right, rgba(83, 168, 107, 0.16), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 19, 24, 0.94);
  backdrop-filter: blur(10px);
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100vw - 40px));
  min-height: 60px;
  margin: 0 auto;
}

.brand-link,
.nav-links a {
  color: var(--text);
  text-decoration: none;
}

.brand-link {
  flex: 0 0 auto;
  font-size: 1.15rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 800;
}

.nav-links .nav-play {
  min-width: 74px;
  background: var(--key);
  color: var(--key-text);
  text-align: center;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.brand-link:hover,
.brand-link:focus-visible {
  color: var(--text);
}

.nav-links .nav-play:hover,
.nav-links .nav-play:focus-visible {
  background: white;
  color: var(--key-text);
}

.nav-links .nav-active:not(.nav-play) {
  background: rgba(105, 168, 215, 0.14);
  color: #d5ecff;
}

.nav-links .nav-play.nav-active {
  background: white;
  color: var(--key-text);
}

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  text-align: center;
}

.topbar p {
  width: min(680px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hidden {
  display: none;
}

.board {
  display: grid;
  justify-items: center;
}

.game-panel {
  display: grid;
  gap: 16px;
  width: min(560px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.94);
  box-shadow: var(--shadow);
}

.game-head,
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.game-title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 950;
  line-height: 1;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stats-row div {
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.stats-row div > span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stats-row strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 1.35rem;
}

.status-line {
  min-height: 25px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.status-line[data-tone="good"] {
  color: #a7e0b8;
}

.status-line[data-tone="warn"] {
  color: #f1d889;
}

.status-line[data-tone="bad"] {
  color: #f3aaa7;
}

.word-board {
  display: grid;
  gap: 7px;
  justify-content: center;
}

.word-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  width: min(360px, calc(100vw - 72px));
}

.word-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: #141820;
  color: var(--text);
  font-size: clamp(1.35rem, 8vw, 2.05rem);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.word-cell.absent {
  border-color: var(--gray);
  background: var(--gray);
}

.word-cell.present {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #17130a;
}

.word-cell.correct {
  border-color: var(--green);
  background: var(--green);
  color: #07150c;
}

.shake {
  animation: shake 0.36s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-7px);
  }

  40%,
  80% {
    transform: translateX(7px);
  }
}

.control-row {
  justify-content: center;
}

.control-row button,
.ghost-button,
.feedback-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.control-row button,
.ghost-button {
  padding: 9px 14px;
  background: var(--key);
  color: var(--key-text);
}

.ghost-button {
  min-width: 124px;
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.keyboard {
  display: grid;
  gap: 7px;
  width: 100%;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.key {
  display: grid;
  place-items: center;
  min-width: 0;
  width: clamp(27px, 8vw, 43px);
  height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--key);
  color: var(--key-text);
  font-size: 0.92rem;
  font-weight: 950;
}

.key.wide {
  width: clamp(54px, 15vw, 76px);
  font-size: 0.78rem;
}

.key.absent {
  background: var(--gray);
  color: var(--text);
}

.key.present {
  background: var(--yellow);
  color: #17130a;
}

.key.correct {
  background: var(--green);
  color: #07150c;
}

.key.ready {
  background: #58d98f;
  color: #06140b;
  animation: enter-breathe 1.05s ease-in-out infinite;
}

@keyframes enter-breathe {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(88, 217, 143, 0.18),
      0 0 0 2px rgba(88, 217, 143, 0.45);
    transform: translateY(0);
  }

  50% {
    box-shadow:
      0 0 0 8px rgba(88, 217, 143, 0.18),
      0 0 18px rgba(88, 217, 143, 0.58);
    transform: translateY(-2px);
  }
}

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

.choice-tile {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px solid rgba(105, 168, 215, 0.25);
  border-radius: 8px;
  background: #d8dde5;
  color: #111318;
  font-size: 2rem;
  font-weight: 950;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.choice-tile:hover,
.choice-tile:focus-visible {
  background: #58d98f;
  box-shadow: 0 0 0 5px rgba(88, 217, 143, 0.16);
  transform: translateY(-2px);
}

.feedback {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 9, 12, 0.68);
  backdrop-filter: blur(6px);
}

.feedback.hidden {
  display: none;
}

.feedback-panel {
  width: min(520px, 100%);
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.98);
  box-shadow: var(--shadow);
  padding: 24px;
  color: var(--text);
  text-align: center;
}

.feedback.good .feedback-panel {
  border-color: rgba(83, 168, 107, 0.9);
}

.feedback.bad .feedback-panel {
  border-color: rgba(224, 108, 104, 0.9);
}

.feedback-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 900;
}

.feedback.good .feedback-kicker,
.feedback.good .feedback-title {
  color: #a7e0b8;
}

.feedback.bad .feedback-kicker,
.feedback.bad .feedback-title {
  color: #f3aaa7;
}

.feedback-title {
  min-height: 0;
  margin: 0 0 12px;
  font-size: clamp(2rem, 7vw, 3.8rem);
  font-weight: 900;
  line-height: 1.08;
}

.feedback p {
  overflow-wrap: anywhere;
}

.feedback-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.feedback-stats span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.feedback-stats strong {
  color: var(--text);
  font-size: 1.45rem;
}

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

.feedback-actions button:first-child {
  background: var(--key);
  color: var(--key-text);
}

.feedback-actions button:last-child {
  background: #2d3340;
  color: white;
}

.seo-content,
.content-shell {
  width: min(920px, 100%);
  margin: 42px auto 0;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.9);
  box-shadow: var(--shadow);
  padding: 20px;
}

.seo-content h2,
.content-card h1,
.content-card h2 {
  margin: 0 0 12px;
}

.seo-content h3,
.content-card h3 {
  margin: 18px 0 8px;
}

.seo-content p,
.seo-content li,
.content-card p,
.content-card li {
  color: var(--muted);
  line-height: 1.65;
}

.seo-content a,
.content-card a {
  color: #d5ecff;
}

.faq-accordion {
  width: min(1080px, 100%);
  padding: 18px 0 0;
  color: var(--text);
}

.faq-accordion h2 {
  margin: 0 0 18px;
  color: #f4f6f8;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.faq-item summary h2 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.25;
}

.faq-item {
  border: 1px solid rgba(105, 168, 215, 0.22);
  border-radius: 8px;
  background: rgba(27, 31, 39, 0.92);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.faq-item + .faq-item {
  margin-top: 10px;
}

.faq-item:hover {
  border-color: rgba(88, 217, 143, 0.42);
  background: rgba(34, 40, 53, 0.96);
}

.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 13px 18px 13px 36px;
  color: var(--text);
  font-weight: 900;
  list-style: none;
  outline: 0;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "";
  position: absolute;
  left: 17px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #58d98f;
  transition: transform 0.18s ease;
  filter: drop-shadow(0 0 7px rgba(88, 217, 143, 0.45));
}

.faq-item[open] summary::before {
  transform: rotate(90deg);
}

.faq-body {
  padding: 0 36px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-body h3 {
  margin: 14px 0 8px;
  color: #8fc6ef;
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.faq-body p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.faq-body a {
  color: #b7e9c8;
  font-weight: 800;
}

.content-cta {
  margin-top: 24px;
}

.content-card .content-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--key);
  color: var(--key-text);
  font-weight: 900;
  text-decoration: none;
}

.content-shell {
  padding-bottom: 36px;
  padding-top: 10px;
}

.content-card {
  max-width: 860px;
  margin: 0 auto;
}

.content-card h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.content-meta {
  margin-top: -4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.content-card ul,
.content-card ol {
  padding-left: 1.35rem;
}

@media (max-width: 900px) {
  .primary-nav {
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 8px 0;
  }

  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 4px 0 8px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
  }

  .faq-accordion {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .primary-nav {
    width: min(100vw - 24px, 1120px);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    overflow: hidden;
  }

  .brand-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 7px 9px;
    font-size: 0.88rem;
  }

  .app-shell {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 12px;
  }

  .game-panel {
    gap: 13px;
    padding: 13px;
  }

  .game-head {
    align-items: flex-start;
  }

  .ghost-button {
    min-width: 104px;
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .stats-row {
    gap: 6px;
  }

  .stats-row div {
    min-height: 58px;
    padding: 8px;
  }

  .stats-row strong {
    font-size: 1.12rem;
  }

  .seven-stats {
    grid-template-columns: 1fr;
  }

  .word-row {
    gap: 5px;
    width: min(330px, calc(100vw - 48px));
  }

  .word-cell {
    border-width: 2px;
  }

  .keyboard-row {
    gap: 4px;
  }

  .key {
    height: 44px;
    font-size: 0.82rem;
  }

  .feedback-actions,
  .feedback-stats {
    grid-template-columns: 1fr;
  }

  .faq-item summary {
    padding: 12px 14px 12px 32px;
  }

  .faq-body {
    padding: 0 18px 16px;
  }
}

.seven-board {
  align-items: start;
}

.seven-game {
  width: min(1180px, 100%);
  min-width: 0;
}

.seven-stage {
  width: 100%;
  border: 1px solid rgba(221, 227, 235, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 78, 59, 0.72), rgba(21, 27, 35, 0.96) 44%, rgba(49, 42, 24, 0.8)),
    #151b23;
  box-shadow: var(--shadow);
}

.seven-stage.hidden {
  display: none;
}

.setup-stage,
.result-stage {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 4vw, 34px);
}

.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.44fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: stretch;
}

.setup-main {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
}

.seven-hero,
.result-hero {
  display: grid;
  gap: 10px;
  max-width: 780px;
}

.seven-hero h2,
.result-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.seven-hero h2 span {
  display: block;
}

.seven-hero p,
.result-hero p {
  max-width: 680px;
  margin: 0;
  color: #d7dfdc;
  font-size: 1.02rem;
  line-height: 1.55;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(780px, 100%);
}

.mode-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.46);
}

.mode-card.is-active {
  border-color: rgba(99, 218, 139, 0.55);
  box-shadow: inset 0 0 0 1px rgba(99, 218, 139, 0.22);
}

.mode-card span,
.panel-label,
.draw-label {
  color: #aeb9b6;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mode-card strong {
  font-size: 1.45rem;
}

.mode-card p {
  margin: 0;
  color: #c8d2cf;
  line-height: 1.45;
}

.setup-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.setup-status {
  width: min(760px, 100%);
}

.setup-preview {
  display: grid;
  align-content: stretch;
  gap: 12px;
  min-height: 100%;
  min-width: 0;
}

.preview-card,
.preview-squad,
.preview-metrics,
.preview-steps {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(7, 12, 16, 0.48);
}

.preview-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(104, 223, 143, 0.18), rgba(7, 12, 16, 0.6)),
    rgba(7, 12, 16, 0.48);
}

.preview-card span {
  color: #aeb9b6;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-card strong {
  color: #f6fbf7;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1;
}

.preview-card p {
  margin: 0;
  color: #cbd5d1;
  line-height: 1.45;
}

.preview-squad {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  min-height: 210px;
  padding: 12px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.12) 49%, rgba(255, 255, 255, 0.12) 51%, transparent 51%),
    repeating-linear-gradient(90deg, rgba(35, 118, 67, 0.74) 0 42px, rgba(25, 93, 53, 0.74) 42px 84px);
}

.preview-player {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(8, 12, 15, 0.66);
  color: #fff3bf;
  font-size: 0.76rem;
  font-weight: 950;
}

.preview-player.keeper {
  grid-column: 3;
  color: #d7e9ff;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.preview-metrics div {
  display: grid;
  gap: 2px;
  min-height: 78px;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
}

.preview-metrics strong {
  color: #68df8f;
  font-size: 1.65rem;
  line-height: 1;
}

.preview-metrics span {
  color: #cbd5d1;
  font-size: 0.78rem;
  font-weight: 850;
}

.preview-steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 16px 16px 16px 34px;
  color: #dce5e1;
  line-height: 1.45;
}

.primary-button,
.link-button {
  border: 0;
  border-radius: 8px;
  font-weight: 950;
}

.primary-button {
  min-height: 46px;
  padding: 11px 18px;
  background: #68df8f;
  color: #07130b;
  box-shadow: 0 10px 28px rgba(104, 223, 143, 0.24);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #8df0ab;
}

.link-button {
  min-height: 32px;
  padding: 5px 8px;
  background: transparent;
  color: #bfe8cc;
}

.draft-stage {
  padding: 14px;
}

.draft-top,
.pitch-head,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.draft-top {
  margin-bottom: 12px;
}

.draft-top h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  line-height: 1.05;
}

.draft-actions {
  flex: 0 0 auto;
}

.seven-stats {
  margin-bottom: 12px;
}

.seven-stats div {
  background: rgba(8, 12, 17, 0.54);
}

.draft-layout,
.result-layout {
  display: grid;
  grid-template-columns: 260px minmax(360px, 1fr) 320px;
  gap: 12px;
  align-items: stretch;
}

.draft-sidebar,
.pitch-panel,
.candidate-panel,
.match-card,
.squad-summary {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(9, 13, 18, 0.58);
}

.draft-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.draw-card,
.control-panel,
.mini-leaderboard {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.draw-card {
  min-height: 142px;
  align-content: center;
  background:
    linear-gradient(145deg, rgba(18, 122, 75, 0.56), rgba(12, 17, 24, 0.34)),
    rgba(9, 13, 18, 0.34);
  border-radius: 8px 8px 0 0;
}

.draw-card strong {
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 0.96;
}

.draw-card span:last-child {
  color: #e7eee9;
  font-weight: 850;
}

.control-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.segment-button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #eff6f2;
  font-size: 0.86rem;
  font-weight: 900;
}

.segment-button.is-active {
  border-color: rgba(104, 223, 143, 0.78);
  background: rgba(104, 223, 143, 0.2);
  color: #d9ffe4;
}

.select-label {
  display: grid;
  gap: 8px;
  color: #aeb9b6;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.select-label select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #151d25;
  color: #f5f8f5;
  font: inherit;
  font-weight: 850;
}

.panel-title {
  min-height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-title span,
.pitch-head span {
  font-weight: 950;
}

.panel-title strong,
.pitch-head strong {
  color: #a8efbd;
  font-size: 0.86rem;
}

.mini-leaderboard ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.mini-leaderboard li {
  color: #cbd5d1;
  line-height: 1.35;
}

.mini-leaderboard li strong {
  display: block;
  color: #f5f8f5;
}

.mini-leaderboard li span {
  color: #aeb9b6;
  font-size: 0.84rem;
}

.pitch-panel {
  padding: 14px;
}

.pitch-head {
  margin-bottom: 12px;
}

.pitch {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(92px, auto);
  gap: 8px;
  min-height: 548px;
  padding: 14px;
  border: 1px solid rgba(210, 244, 218, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(255, 255, 255, 0.12) 49.6%, rgba(255, 255, 255, 0.12) 50.4%, transparent 50.4%),
    repeating-linear-gradient(90deg, rgba(38, 123, 70, 0.7) 0 76px, rgba(29, 103, 60, 0.7) 76px 152px),
    #1d6b3c;
}

.squad-slot {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 88px;
  padding: 9px;
  border: 1px dashed rgba(255, 255, 255, 0.31);
  border-radius: 8px;
  background: rgba(5, 12, 8, 0.36);
  text-align: center;
}

.squad-slot.is-filled {
  border-style: solid;
  border-color: rgba(229, 199, 102, 0.65);
  background: rgba(12, 16, 19, 0.78);
}

.squad-slot span {
  color: #a8efbd;
  font-size: 0.75rem;
  font-weight: 950;
}

.squad-slot strong {
  overflow-wrap: anywhere;
  color: #fff9df;
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  line-height: 1.1;
}

.squad-slot em {
  color: #cdd7d0;
  font-size: 0.75rem;
  font-style: normal;
}

.candidate-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.candidate-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
  align-content: start;
}

.player-card {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 132px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(245, 248, 245, 0.08);
  color: #f7fbf8;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.player-card:hover,
.player-card:focus-visible {
  border-color: rgba(104, 223, 143, 0.78);
  background: rgba(104, 223, 143, 0.16);
  transform: translateY(-2px);
}

.player-card strong {
  overflow-wrap: anywhere;
  font-size: 1.22rem;
  line-height: 1.05;
}

.card-kicker,
.player-meta,
.fit-line {
  color: #c9d3cf;
  font-size: 0.8rem;
  font-weight: 850;
}

.trait-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.trait-row em {
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #e7eee9;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.rarity-icon {
  box-shadow: inset 4px 0 0 #f2d36b;
}

.rarity-legend {
  box-shadow: inset 4px 0 0 #68df8f;
}

.rarity-star {
  box-shadow: inset 4px 0 0 #8dc7f0;
}

.candidate-panel .status-line {
  padding: 0 12px 12px;
  text-align: left;
}

.result-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.match-card,
.squad-summary {
  overflow: hidden;
}

.match-list,
.summary-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.match-row,
.summary-row {
  display: grid;
  grid-template-columns: 84px 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.match-row strong {
  color: #fff0b8;
  font-size: 1.1rem;
}

.match-row span,
.summary-row span {
  color: #aeb9b6;
  font-size: 0.78rem;
  font-weight: 900;
}

.match-row em,
.summary-row em {
  min-width: 0;
  color: #cbd5d1;
  font-style: normal;
}

.summary-row {
  grid-template-columns: 46px minmax(0, 1fr) minmax(90px, 0.6fr);
}

.summary-row strong {
  overflow-wrap: anywhere;
}

.result-w {
  border-color: rgba(104, 223, 143, 0.45);
}

.result-d {
  border-color: rgba(242, 211, 107, 0.45);
}

.result-l {
  border-color: rgba(224, 108, 104, 0.45);
}

.result-actions {
  margin-top: 2px;
}

@media (max-width: 1040px) {
  .setup-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
    gap: 18px;
  }

  .draft-layout {
    grid-template-columns: minmax(230px, 0.7fr) minmax(360px, 1fr);
  }

  .candidate-panel {
    grid-column: 1 / -1;
  }

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

@media (max-width: 760px) {
  .setup-layout,
  .mode-grid,
  .draft-layout,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .setup-preview {
    order: 2;
  }

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

  .draft-actions,
  .draft-actions .ghost-button {
    width: 100%;
  }

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

  .pitch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(88px, auto);
    min-height: 0;
    padding: 10px;
  }

  .match-row,
  .summary-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 540px) {
  .board,
  .seven-game,
  .seven-stage,
  .setup-layout,
  .setup-main,
  .seven-hero,
  .mode-grid,
  .setup-preview,
  .draft-layout,
  .result-layout {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .seven-stage {
    max-width: calc(100vw - 16px);
  }

  .setup-main,
  .mode-grid,
  .setup-preview,
  .draft-sidebar,
  .pitch-panel,
  .candidate-panel,
  .match-card,
  .squad-summary {
    max-width: calc(100vw - 36px);
  }

  .setup-stage,
  .result-stage,
  .draft-stage {
    padding: 10px;
  }

  .seven-hero h2,
  .result-hero h2 {
    width: calc(100vw - 56px);
    max-width: calc(100vw - 56px);
    font-size: 1.34rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .seven-hero p,
  .result-hero p {
    width: calc(100vw - 56px);
    max-width: calc(100vw - 56px);
    font-size: 0.96rem;
    overflow-wrap: anywhere;
  }

  .mode-card,
  .preview-card,
  .preview-steps,
  .candidate-panel,
  .pitch-panel,
  .draft-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .mode-card p,
  .mode-card strong,
  .preview-card p,
  .preview-card strong,
  .setup-status,
  .status-line {
    width: calc(100vw - 70px);
    max-width: calc(100vw - 70px);
    overflow-wrap: anywhere;
  }

  .setup-actions,
  .setup-actions button {
    width: 100%;
  }

  .preview-squad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 180px;
  }

  .preview-player.keeper {
    grid-column: 1 / -1;
  }

  .preview-metrics {
    grid-template-columns: 1fr;
  }

  .preview-metrics div {
    min-height: 58px;
  }

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

  .squad-slot {
    min-height: 78px;
  }
}
