/* Gece maçı: projektör altında çim, tebeşir çizgiler, sodyum amber vurgu. */
:root {
  --pitch: #0c1d14;        /* floodlit turf, near-black green */
  --pitch-raised: #12271b;
  --chalk: #eaf3ec;        /* pitch-marking white */
  --chalk-dim: #adc2b3;    /* eski #9db3a4 — 0.72 opaklık altında 4.36:1'e
                              düşüyordu (MİLLÎ rozeti, sheet satırları);
                              yeni değer aynı blend'de 5.4:1 */
  --amber: #f2b63c;        /* sodium floodlight */
  --turf: #3fae6a;         /* found / success */
  --card-red: #d95550;     /* miss vurgusu (kenarlık — metinde KULLANMA) */
  --card-red-soft: #ef8a84; /* miss METNİ: raised zeminde 6.49:1
                               (card-red 4.03, opacity'yle 2.79'du) */
  --gutter: 16px;          /* #board yatay padding — center-line ile senkron */
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* display:flex gibi kurallar hidden özniteliğini ezmesin */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--pitch);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;   /* WCAG 1.4.12 — eskiden UA 'normal' (~1.15) */
  overscroll-behavior: none;
}

/* Saha arka planı: dikey saha (mobil) — üstte ve altta birer kale,
   çim şeritleri; geniş ekranda yatay sahaya döner. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--pitch);
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 109"><g fill="none" stroke="%23EAF3EC" stroke-opacity="0.14" stroke-width="0.35"><rect x="2" y="2" width="64" height="105"/><line x1="2" y1="54.5" x2="66" y2="54.5"/><circle cx="34" cy="54.5" r="9.15"/><rect x="13.84" y="2" width="40.32" height="16.5"/><rect x="24.84" y="2" width="18.32" height="5.5"/><rect x="30.34" y="0.4" width="7.32" height="1.6"/><path d="M 26.7 18.5 A 9.15 9.15 0 0 0 41.3 18.5"/><rect x="13.84" y="90.5" width="40.32" height="16.5"/><rect x="24.84" y="101.5" width="18.32" height="5.5"/><rect x="30.34" y="107" width="7.32" height="1.6"/><path d="M 26.7 90.5 A 9.15 9.15 0 0 1 41.3 90.5"/><path d="M 2 4 A 2 2 0 0 0 4 2"/><path d="M 64 2 A 2 2 0 0 0 66 4"/><path d="M 66 105 A 2 2 0 0 0 64 107"/><path d="M 4 107 A 2 2 0 0 0 2 105"/><circle cx="34" cy="13" r="0.5" fill="%23EAF3EC" fill-opacity="0.14" stroke="none"/><circle cx="34" cy="96" r="0.5" fill="%23EAF3EC" fill-opacity="0.14" stroke="none"/><circle cx="34" cy="54.5" r="0.5" fill="%23EAF3EC" fill-opacity="0.14" stroke="none"/></g></svg>'),
    repeating-linear-gradient(180deg,
      rgba(234, 243, 236, 0.022) 0px, rgba(234, 243, 236, 0.022) 44px,
      transparent 44px, transparent 88px);
  background-repeat: no-repeat, repeat;
  background-position: center, center;
  background-size: auto 96%, auto;
}

@media (min-width: 800px) and (orientation: landscape) {
  body::before {
    background-image:
      url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 109 68"><g fill="none" stroke="%23EAF3EC" stroke-opacity="0.14" stroke-width="0.35"><rect x="2" y="2" width="105" height="64"/><line x1="54.5" y1="2" x2="54.5" y2="66"/><circle cx="54.5" cy="34" r="9.15"/><rect x="2" y="13.84" width="16.5" height="40.32"/><rect x="2" y="24.84" width="5.5" height="18.32"/><rect x="0.4" y="30.34" width="1.6" height="7.32"/><path d="M 18.5 26.7 A 9.15 9.15 0 0 1 18.5 41.3"/><rect x="90.5" y="13.84" width="16.5" height="40.32"/><rect x="101.5" y="24.84" width="5.5" height="18.32"/><rect x="107" y="30.34" width="1.6" height="7.32"/><path d="M 90.5 26.7 A 9.15 9.15 0 0 0 90.5 41.3"/><path d="M 2 4 A 2 2 0 0 0 4 2"/><path d="M 105 2 A 2 2 0 0 0 107 4"/><path d="M 107 64 A 2 2 0 0 0 105 66"/><path d="M 4 66 A 2 2 0 0 0 2 64"/><circle cx="13" cy="34" r="0.5" fill="%23EAF3EC" fill-opacity="0.14" stroke="none"/><circle cx="96" cy="34" r="0.5" fill="%23EAF3EC" fill-opacity="0.14" stroke="none"/><circle cx="54.5" cy="34" r="0.5" fill="%23EAF3EC" fill-opacity="0.14" stroke="none"/></g></svg>'),
      repeating-linear-gradient(90deg,
        rgba(234, 243, 236, 0.022) 0px, rgba(234, 243, 236, 0.022) 64px,
        transparent 64px, transparent 128px);
    background-size: auto 94%, auto;
  }
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  /* space-between üç çocukla (h1 | tabs | dil) sekmeleri ORTAYA itiyordu;
     sekmeler margin-left:auto ile eskisi gibi sağa yaslanır, dil düğmesi
     onların hemen sağında durur. */
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 16px calc(10px);
  padding-top: calc(10px + env(safe-area-inset-top));
  border-bottom: 2px solid var(--chalk);
}

.topbar h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Dil geçiş düğmesi: karşı dilin sayfasına düz bağlantı — bulmacalar iki
   dilde BİREBİR aynı (2026-08-03 eşitleme), Günlük ilerlemesi localStorage
   anahtarları dil-bağımsız olduğu için geçişte korunur. */
.lang-switch {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 6px 9px;
  border: 2px solid var(--chalk-dim);
  color: var(--chalk-dim);
  text-decoration: none;
  background: none;          /* artık <button> — /en/ yolu kaldırıldı */
  cursor: pointer;
  flex-shrink: 0;
}
.lang-switch:hover,
.lang-switch:focus-visible { color: var(--chalk); border-color: var(--chalk); }

.tabs { display: flex; border: 2px solid var(--chalk); margin-left: auto; }
/* Bitişik dokunma hedefleri: 0px boşluk yerine ince ayırıcı */
.tabs button + button,
.picker-mode button + button,
.pos-filter button + button { border-left: 1px solid var(--chalk-dim); }

.tabs button {
  min-height: 44px;
  min-width: 84px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--chalk);
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.tabs button[aria-pressed="true"] {
  background: var(--chalk);
  color: var(--pitch);
}

/* ---------- board ---------- */
#board {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 20px calc(var(--gutter) + env(safe-area-inset-right)) 12px
           calc(var(--gutter) + env(safe-area-inset-left));
  gap: 14px;
}

/* Üst filtre şeritleri TEK satırda (dar ekranda kendiliğinden sarar):
   dönem + sonsuz modu + günlük uzunluk alt alta 2-3 satır yiyordu. */
.strip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.strip-row .pos-filter { flex: 1 1 auto; min-width: 0; }

/* Açılan (kaçırılan) cevaplar: sonuç panelini sayfanın dibine iten 30+
   satırlık döküm yerine katlanır kova. Yerel details/summary — klavye ve
   ekran okuyucu desteği bedava. */
.revealed-bucket { border-left: 3px solid var(--card-red); }
.revealed-bucket summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  background: var(--pitch-raised);
  color: var(--card-red-soft);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;             /* varsayılan üçgeni kaldır, kendi okumuz var */
}
.revealed-bucket summary::-webkit-details-marker { display: none; }
.revealed-bucket summary::after {
  content: "›";
  margin-left: auto;
  font-size: 18px;
  transition: transform 0.2s;
}
.revealed-bucket[open] summary::after { transform: rotate(90deg); }
.revealed-bucket summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}
.revealed-bucket .squad {
  margin-top: 8px;
  content-visibility: auto;     /* 30+ satırda boyama maliyetini ertele */
}

.daily-steps {
  display: flex;
  gap: 8px;
  justify-content: center;
  font-family: var(--display);
  font-size: 15px;
  color: var(--chalk-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-steps .step {
  width: 34px;
  height: 6px;
  background: var(--pitch-raised);
  border: 1px solid var(--chalk-dim);
}
.daily-steps .step.done { background: var(--turf); border-color: var(--turf); }
.daily-steps .step.deferred { border-color: var(--amber); background: transparent; }
.daily-steps .step.now { border-color: var(--amber); background: var(--amber); }

.daily-steps .step-label {
  margin-left: 8px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  align-self: center;
}
.daily-steps { align-items: center; }

/* ---------- custom matchup picker ---------- */
.picker { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }

.picker-mode { display: flex; border: 2px solid var(--chalk-dim); }
.picker-mode button {
  flex: 1;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--chalk-dim);
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.picker-mode button[aria-pressed="true"] {
  background: var(--chalk);
  color: var(--pitch);
}

.picker-field { display: flex; flex-direction: column; gap: 6px; }
.picker-field span {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
::placeholder { color: var(--chalk-dim); opacity: 1; }  /* WebKit düşük-alfa
   varsayılanını ezer — tarayıcıya göre 2.5:1'e düşüyordu */

.combo { position: relative; }

.combo input {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  font-size: 16px;
  background: var(--pitch-raised);
  color: var(--chalk);
  border: 1px solid var(--chalk-dim);
  border-radius: 0;
  caret-color: var(--amber);
}
.combo input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.combo input.chosen { border-color: var(--turf); }

.combo-list {
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 20;
  max-height: 38vh;
  overflow-y: auto;
  list-style: none;
  background: var(--pitch);
  border: 1px solid var(--chalk);
  border-top: 0;
}
.combo-list li {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--pitch-raised);
}
.combo-list li:active, .combo-list li:hover,
.combo-list li.active {
  background: var(--pitch-raised);
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}
.combo-list .combo-empty { color: var(--chalk-dim); cursor: default; }

#start-custom {
  min-height: 48px;
  border: 0;
  background: var(--amber);
  color: var(--pitch);
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

/* Santra: iki takım, ortada sayaç — sayfanın imzası. */
.kickoff { text-align: center; }

.team {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 8vw, 40px);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  overflow-wrap: break-word;
}

.center-line {
  position: relative;
  margin: 10px 0;
  height: 64px;
}
.center-line::before {          /* touchline through the center spot */
  content: "";
  position: absolute;
  left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 50%;
  border-top: 2px solid var(--chalk);
}
.score-badge {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  padding: 3px 10px;
  background: var(--pitch);          /* tebeşir çizgisini maskeler */
  border: 1px solid var(--chalk-dim);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--chalk-dim);
}
.score-badge b {
  color: var(--amber);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

@keyframes bumpkf {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
#progress.bump, .score-badge b.bump {
  display: inline-block;
  animation: bumpkf 0.3s ease-out;
}

.onboard {
  padding: 10px 12px;
  background: var(--pitch-raised);
  border-left: 3px solid var(--amber);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
}
.onboard b { color: var(--amber); }
#onboard-close {
  align-self: flex-end;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--chalk);
  background: transparent;
  color: var(--chalk);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.center-circle {
  position: relative;
  width: 64px; height: 64px;
  margin: 0 auto;
  border: 2px solid var(--chalk);
  border-radius: 50%;
  background: var(--pitch);
  display: grid;
  place-items: center;
}
#progress {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
}

.prompt {
  text-align: center;
  color: var(--chalk-dim);
  font-size: 16px;
}
#retry-btn {
  margin-left: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
/* Sheet açıkken arka plan kaymasın (mobilde parmak sürüklemesi #board'u
   kaydırıyor, popup kapanınca kullanıcı başka yerde buluyordu kendini) */
body.sheet-open #board { overflow: hidden; }

.copy-link {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--chalk-dim);
  background: transparent;
  color: var(--chalk-dim);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.copy-link:hover { color: var(--amber); border-color: var(--amber); }
.copy-link:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.copy-link svg { width: 16px; height: 16px; }

/* ---------- squad list (found players) ---------- */
.squad { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.squad li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--pitch-raised);
  border-left: 3px solid var(--turf);
  animation: rollin 0.25s ease-out;
}

.squad li .no {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  min-width: 26px;
  text-align: right;
  color: var(--turf);
  font-variant-numeric: tabular-nums;
}

.squad li .name { font-size: 16px; }

.squad li .name-block { display: flex; flex-direction: column; gap: 1px; }
.squad li .pos {
  margin-left: 8px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.85;
}
.squad li .stint {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--chalk-dim);
  font-variant-numeric: tabular-nums;
}

.squad li[data-qid] {
  cursor: pointer;
  transition: background-color 0.2s;
}
.squad li[data-qid]:hover { background: color-mix(in srgb, var(--chalk) 8%, var(--pitch-raised)); }
.squad li[data-qid]:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.squad li[data-qid] .name::after {
  content: "›";
  margin-left: 8px;
  color: var(--chalk-dim);
  font-weight: 700;
}

.squad li.revealed { border-left-color: var(--card-red); }
/* opacity:0.75 kaldırıldı: card-red metni 2.79:1'e düşürüyordu (okunmaz);
   soluk his yerine metin rengi soft kırmızı — 6.49:1 */
.squad li.revealed .no { color: var(--card-red-soft); }

@keyframes rollin {
  from { transform: translateX(-10px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ---------- daily result ---------- */
.result-panel { text-align: center; padding: 8px 0; }
.result-panel h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.result-panel h2.clickable {
  cursor: pointer;
  color: var(--amber);
  text-decoration: underline dotted;
  text-underline-offset: 5px;
  transition: opacity 0.2s;
}
.result-panel h2.clickable:hover { opacity: 0.85; }
.result-panel h2.clickable:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
.result-panel pre {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: pre-wrap;
}
.result-actions { display: flex; gap: 10px; justify-content: center; }

.result-actions button {
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.result-actions #next-btn { border-color: var(--chalk); color: var(--chalk); }

/* ---------- guess bar ----------
   2026-08-03: alt banttan OYUN ALANININ İÇİNE taşındı (soru satırının hemen
   altı) ve kompaktlaştı. #board kayarken tepede YAPIŞKAN kalır — uzun cevap
   listesinde de hep elinin altında. Dokunma hedefleri 44px kuralında. */
.dugout {
  position: sticky;
  top: -1px;                   /* alt-piksel aralık sızıntısına karşı */
  z-index: 15;                 /* liste içeriği üstünde, sheet/toast altında */
  display: flex;
  flex-wrap: wrap;             /* öneri çipleri ikinci satıra katlanır */
  gap: 8px;
  margin: 10px 0 12px;
  padding: 8px 0;
  background: var(--pitch);    /* yapışıkken altından akan içeriği örter */
  border-bottom: 1px solid var(--chalk-dim);
}

#guess-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  font-size: 16px;             /* iOS zoom guard */
  background: var(--pitch-raised);
  border: 1px solid var(--chalk-dim);
  border-radius: 0;
  color: var(--chalk);
  caret-color: var(--amber);
}

.dugout .suggest-bar { width: 100%; }
#guess-input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
#guess-input.shake { animation: shake 0.3s; }

@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.dugout button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}
#guess-btn { background: var(--amber); color: var(--pitch); }
#pass-btn { background: transparent; color: var(--chalk); border: 2px solid var(--chalk); }

/* Tur bitti kipi: bar tek geniş sonraki-eylem düğmesine döner —
   pasif input + Tahmin ölü ağırlıktı, birincil eylem paneldeydi. */
.dugout.bar-next #guess-input,
.dugout.bar-next #guess-btn { display: none; }
.dugout.bar-next #pass-btn {
  flex: 1;
  background: var(--amber);
  color: var(--pitch);
  border-color: var(--amber);
}

button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
/* Seçili durumda zemin chalk: amber halka 1.61:1'le kayboluyordu —
   İÇ pitch halkası (15.4:1) */
.tabs button[aria-pressed="true"]:focus-visible,
.pos-filter button[aria-pressed="true"]:focus-visible,
.picker-mode button[aria-pressed="true"]:focus-visible {
  outline: 2px solid var(--pitch);
  outline-offset: -4px;
}

/* ---------- joker ---------- */
.joker-row { display: flex; gap: 8px; align-items: center; justify-content: center; }
#joker-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
#joker-btn:disabled { opacity: 0.55; cursor: default; }
.joker-kinds { display: flex; gap: 6px; }
.joker-kinds button {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--chalk-dim);
  background: var(--pitch-raised);
  color: var(--chalk);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
}
.match-hints { display: flex; flex-direction: column; gap: 5px; }
.match-hints:empty { display: none; }
.match-hints div {
  padding: 8px 12px;
  background: var(--pitch-raised);
  border-left: 3px solid var(--amber);
  font-size: 16px;
}

/* ---------- zamana karşı ---------- */
.score-badge.blitz b { color: var(--card-red-soft); }

/* ---------- 3x3 ızgara ---------- */
.grid-wrap { overflow-x: auto; }
.grid-table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.grid-table th, .grid-table td {
  border: 1px solid var(--chalk-dim);
  text-align: center;
  vertical-align: middle;
  padding: 4px;
}
.grid-table th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--pitch-raised);
  height: 48px;
  overflow-wrap: break-word;
}
.grid-table td {
  height: 72px;
  cursor: pointer;
  font-size: 14px;
  overflow-wrap: break-word;
}
.grid-table td.sel { outline: 3px solid var(--amber); outline-offset: -3px; }
.grid-table td.hitc { background: color-mix(in srgb, var(--turf) 22%, var(--pitch-raised)); cursor: default; }
.grid-table td:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.grid-status {
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
.grid-panel { display: flex; flex-direction: column; gap: 10px; }
.dugout.no-pass #pass-btn { display: none; }

/* ---------- toast ---------- */
/* Yardım penceresi: sheet kabuğunu giyer, daha dar ve metin odaklı.
   Karartma sheet'inki (yarı saydam) — "şeffaf pencere" isteği oradan. */
.sheet.help { max-width: 480px; }
/* Pencere içi dil çipi: X'in solunda, aynı yükseklik hattında. */
.help-lang {
  position: absolute;
  top: 10px; right: 62px;
  height: 44px;
}
.sheet.help h2 {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-right: 40px;   /* X düğmesiyle çakışmasın */
}
#help-body h3 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 14px 0 4px;
}
#help-body p { margin: 6px 0; font-size: 15px; line-height: 1.45; }
#help-body b { color: var(--turf); }
#help-body .eksi { color: var(--card-red-soft); }

/* Sekme ipucu balonu — toast paletiyle aynı (chalk zemin, pitch metin). */
.tab-tip {
  position: fixed;
  z-index: 60;
  max-width: 280px;
  padding: 8px 12px;
  background: var(--chalk);
  color: var(--pitch);
  font-size: 14px;
  line-height: 1.35;
  pointer-events: none;   /* balon fareyi yakalayıp titremesin */
}

#toast {
  position: fixed;
  z-index: 60;  /* sheet (50) ve combo (20) ÜSTÜNDE — eksikken sheet açıkken
                   toast görünmüyordu */
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  max-width: min(90vw, 420px);
  padding: 10px 16px;
  background: var(--chalk);
  color: var(--pitch);
  font-size: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- wider screens: cap the column ---------- */
@media (min-width: 640px) {
  #board { width: 100%; max-width: 560px; margin: 0 auto; }
  body { align-items: stretch; }
}

@media (max-width: 430px) {
  .topbar { flex-wrap: wrap; justify-content: center; padding-bottom: 8px; }
  .topbar h1 { font-size: 18px; width: 100%; text-align: center; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; min-width: 0; padding: 0 8px; font-size: 15px; }
}

/* ---------- kariyer modu ---------- */
.career { display: flex; flex-direction: column; gap: 12px; }
.career-title {
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.career-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}
.career-filter > span {
  grid-column: 1 / -1;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
#career-apply {
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.2s;
}
#career-apply:hover { background: color-mix(in srgb, var(--amber) 15%, transparent); }

.pos-filter { display: flex; border: 1px solid var(--chalk-dim); }
.pos-filter button {
  flex: 1;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--chalk-dim);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s;
}
.pos-filter button[aria-pressed="true"] {
  background: var(--chalk);
  color: var(--pitch);
}

.hint-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hint-chips button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--chalk-dim);
  background: transparent;
  color: var(--chalk);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}
.hint-chips button:hover { background: var(--pitch-raised); }
.hint-chips button:disabled {
  opacity: 0.55;  /* .35 harcanmış ipucunun ETİKETİNİ okunmaz yapıyordu */
  cursor: default;
  text-decoration: line-through;
}

.hint-out { display: flex; flex-direction: column; gap: 5px; }
.hint-out:empty { display: none; }
.hint-out div {
  padding: 8px 12px;
  background: var(--pitch-raised);
  border-left: 3px solid var(--chalk-dim);
  font-size: 16px;
}
.hint-out img {
  width: 96px; height: 96px;
  object-fit: cover;
  border: 2px solid var(--chalk);
  border-radius: 50%;
  margin: 4px auto;
  display: block;
}

.career-steps { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.career-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  background: var(--pitch-raised);
  border-left: 3px solid var(--amber);
}
.career-steps li .years {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--amber);
  min-width: 86px;
  font-variant-numeric: tabular-nums;
}
.career-steps li.locked { border-left-color: var(--chalk-dim); opacity: 0.65; }
.career-steps li.locked .years { color: var(--chalk-dim); }
#career-more {
  min-height: 46px;
  border: 2px solid var(--chalk);
  background: transparent;
  color: var(--chalk);
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}
#career-more:disabled { opacity: 0.6; cursor: default; }

/* ---------- oyuncu alt-sayfası ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
}
.sheet {
  width: min(92vw, 480px);
  max-height: 80dvh;
  overflow-y: auto;
  background: var(--pitch);
  border: 2px solid var(--chalk);
  padding: 18px 16px;
  position: relative;
  animation: popin 0.18s ease-out;
}
@keyframes popin {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.sheet-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--chalk-dim);
  background: transparent;
  color: var(--chalk);
  cursor: pointer;
  transition: background-color 0.2s;
}
.sheet-close:hover { background: var(--pitch-raised); }
.sheet-close svg { width: 18px; height: 18px; }
.sheet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.sheet-head img {
  width: 76px; height: 76px;
  object-fit: cover;
  border: 2px solid var(--chalk);
  border-radius: 50%;
  background: var(--pitch-raised);
}
.sheet-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-right: 40px;
}
.sheet-head p { color: var(--chalk-dim); font-size: 14px; margin-top: 2px; }
.sheet-career { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.sheet-career li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 10px;
  background: var(--pitch-raised);
  border-left: 3px solid var(--chalk-dim);
  font-size: 15px;
}
.sheet-career li .years {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--chalk-dim);
  min-width: 86px;
  font-variant-numeric: tabular-nums;
}
.sheet-career li.asked {
  border-left: 3px solid var(--amber);
  background: color-mix(in srgb, var(--amber) 22%, var(--pitch-raised));
}
.sheet-career li.asked .years { color: var(--amber); font-weight: 700; }
.sheet-career li.asked .name {
  color: var(--amber);
  font-weight: 600;
}
.sheet-career li.national { opacity: 0.72; }
.sheet-career li.national .name { color: var(--chalk-dim); }
.sheet-career li.national::after {
  content: "MİLLÎ";
  margin-left: auto;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--chalk-dim);
  border: 1px solid var(--chalk-dim);
  padding: 1px 6px;
}
.sheet-career li .name { flex: 1; min-width: 0; overflow-wrap: break-word; }
/* career-steps'te isim span'ı sınıfsız — uzun kulüp adı taşmasın */
.career-steps li span:not(.years) { min-width: 0; overflow-wrap: break-word; }
.squad li .name-block { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- yazım önerisi ("Bunu mu demek istedin?") ----------
   Tahmin çubuğunun hemen altında; ıska cezası UYGULANMADAN gösterilir.
   Çip stili .hint-chips ile aynı dilde ama vurgulu kenarlıklı — bunlar
   harcanacak ipucu değil, tıklanacak düzeltme. */
.suggest-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--pitch-raised);
  border-left: 3px solid var(--chalk);
}
.suggest-bar[hidden] { display: none; }
.suggest-label {
  font-size: 15px;
  opacity: 0.85;
}
.suggest-bar button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--chalk);
  background: transparent;
  color: var(--chalk);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s;
}
.suggest-bar button:hover { background: var(--chalk); color: var(--pitch); }

/* --- dis profil baglantisi (oyuncu karti) --- */
.dis-profil {
  color: var(--turf, #7ec97e);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* --- altbilgi --- */
.altbilgi {
  max-width: 560px;
  margin: 28px auto 16px;
  padding: 0 14px calc(env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  justify-content: center;
  font-size: 13px;
  opacity: 0.75;
}
.altbilgi a { color: inherit; text-underline-offset: 2px; }

/* --- statik sayfalar (hakkinda / gizlilik) --- */
.statik-sayfa { display: block; }
.statik {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 18px 48px;
  line-height: 1.65;
}
.statik h1 { margin: 18px 0 4px; font-size: 30px; }
.statik h2 { margin: 22px 0 6px; font-size: 20px; }
.statik p { margin: 8px 0; }
.statik .mini { opacity: 0.7; font-size: 14px; }
.statik a { color: var(--turf, #7ec97e); }
.statik hr { margin: 32px 0; border: 0; border-top: 1px solid var(--chalk-dim, #365); }

/* Mac alt modu etiketleri uzadi (Takim×Takim): dar ekranda sigsin */
@media (max-width: 430px) {
  #endless-mode button {
    font-size: 13px;
    padding: 0 4px;
    white-space: nowrap;
  }
}

/* 431-660px bandi: 5 sekme + ? + EN tek satira sigmiyordu ("3×3" kesiliyor,
   dil dugmeleri tasiyordu). Sarma esigi yukari cekildi: sekmeler kendi
   satirina tam genislik iner, ?/EN ust satirda kalir. */
@media (max-width: 660px) {
  .topbar { flex-wrap: wrap; }
  .tabs {
    order: 3;
    width: 100%;
    margin-left: 0;
  }
  .tabs button { flex: 1; min-width: 0; padding: 0 8px; }
}
