/* Wordmark */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.wordmark img { display: block; height: 40px; width: auto; max-width: 100%; }
.wordmark-large img { height: 96px; }

/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: #2A3B31; }
.btn-primary:disabled { background: var(--border); color: var(--muted); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink); }
.btn-secondary:disabled { color: var(--muted); }
.btn-mustard { background: var(--mustard); color: var(--ink); }
.btn-mustard:hover:not(:disabled) { background: #DDAC2B; }
.btn-block { width: 100%; }
.btn-small { min-height: 44px; padding: 8px 16px; font-size: 1rem; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 4px;
  background: none;
  border: 0;
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Kart */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
}
.card-title { font-size: 1.25rem; }
.section-label { font-size: 1.125rem; font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* Chip */
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  font-weight: 600;
}
.chip:hover { border-color: var(--green); }
.chip[aria-pressed="true"], .chip.is-selected {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.chip-static {
  min-height: 0;
  padding: 3px 10px;
  border-width: 1px;
  border-radius: 999px;
  font-size: 0.9375rem;
  background: var(--green-soft);
  border-color: var(--green-soft);
  color: var(--ink);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row .chip { min-height: 44px; padding-inline: 14px; }

/* Form */
.field { display: grid; gap: 6px; }
.field label, .field-title { font-family: var(--font-head); font-size: 1.125rem; font-weight: 500; }
.field-help { font-size: 0.9375rem; color: var(--muted); }
.field-error { font-weight: 600; color: var(--wrong); }
.text-input {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
}
.text-input:focus-visible { border-color: var(--green); border-radius: var(--radius-btn); }

/* Sekmeler */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--border-soft);
  border-radius: var(--radius-btn);
}
.tab {
  flex: 1 1 0;
  min-height: 44px;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-weight: 600;
  color: var(--ink);
}
.tab[aria-selected="true"] { background: var(--surface); box-shadow: inset 0 0 0 2px var(--green); }

/* Sıralama tablosu */
.board { display: grid; gap: 10px; }
.board-note { font-size: 0.875rem; color: var(--muted); }
.board-list { display: grid; }
.board-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 8px 4px;
  border-top: 1px solid var(--border-soft);
}
.board-row:first-child { border-top: 0; }
.board-row.is-me { background: var(--green-soft); border-radius: 8px; }
.board-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-family: var(--font-head);
  font-weight: 600;
}
.board-rank.top { background: var(--mustard); border-radius: 50%; }
.board-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-team { display: block; font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.board-score { font-family: var(--font-head); font-weight: 600; font-variant-numeric: tabular-nums; }
.board-me-line { margin-top: 4px; padding-top: 8px; border-top: 2px solid var(--border); font-weight: 600; }
.board-subtitle { font-size: 1.0625rem; font-weight: 500; margin-top: 4px; }

/* Oyun çubuğu */
.game-bar { display: grid; gap: 8px; }
.game-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 500;
}
.game-time { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.timer-track {
  height: 10px;
  overflow: hidden;
  background: var(--border-soft);
  border-radius: 999px;
}
.timer-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transform-origin: left center;
}
.is-urgent .timer-fill { background: var(--wrong); }
.is-urgent.game-time, .is-urgent .game-time, .timer-warning { color: var(--wrong); }
.timer-warning { font-weight: 700; font-size: 0.9375rem; min-height: 1.4em; }

/* Geri bildirim */
.feedback {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-btn);
  font-weight: 600;
}
.feedback:empty { visibility: hidden; }
.feedback.is-correct { background: var(--correct-bg); color: var(--ink); }
.feedback.is-wrong { background: var(--wrong-bg); color: var(--wrong); }
.feedback.is-neutral { background: var(--border-soft); color: var(--ink); }

/* Çoktan seçmeli */
.question-text { font-family: var(--font-body); font-size: 1.3125rem; font-weight: 700; line-height: 1.3; }
.options { display: grid; gap: 10px; }
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  font-weight: 600;
  text-align: left;
}
.option:hover:not(:disabled) { border-color: var(--green); }
.option.is-selected { border-color: var(--ink); background: var(--green-soft); }
.option-key {
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 0.875rem;
  color: var(--muted);
}
.option-text { flex: 1; }
.option:disabled { color: var(--ink); opacity: 1; }
.option.is-correct { background: var(--correct-bg); border-color: var(--green); }
.option.is-wrong { background: var(--wrong-bg); border-color: var(--wrong); color: var(--wrong); }
.option-mark { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9375rem; }

@media (min-width: 640px) {
  .options { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .option-key { display: inline-flex; }
}

/* Maç başlığı ve skor bandı */
.match-head { display: grid; gap: 12px; text-align: center; }
.match-season { font-family: var(--font-head); font-weight: 500; }
.score-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-btn);
  font-family: var(--font-head);
}
.score-band-team { font-size: 1.125rem; font-weight: 500; overflow-wrap: anywhere; }
.score-band-home { text-align: right; }
.score-band-away { text-align: left; }
.score-band-score { font-size: 1.75rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-inputs { display: inline-flex; align-items: center; gap: 8px; }
.score-input {
  width: 52px;
  height: 56px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--white);
  border-radius: 10px;
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
}
.score-input:focus-visible { outline-color: var(--mustard); }
.match-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.match-meta span { display: inline-flex; align-items: center; gap: 5px; }
.match-context { color: var(--muted); font-style: italic; }
.score-result { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* Gol Atanlar */
.goal-columns { display: grid; gap: 16px; }
.goal-column { display: grid; gap: 10px; align-content: start; min-width: 0; }
.goal-column-title { font-size: 1rem; font-weight: 500; color: var(--muted); }
.goal-row { display: grid; gap: 4px; }
.goal-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.goal-input {
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
}
.goal-input::placeholder {
  color: var(--muted);
  opacity: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.05em;
}
.goal-input:focus-visible { border-color: var(--green); border-radius: 10px; }
.goal-input.is-correct { background: var(--correct-bg); border-color: var(--green); }
.goal-input.is-wrong { background: var(--wrong-bg); border-color: var(--wrong); }
.goal-minute { font-family: var(--font-head); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.goal-tag { font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.goal-empty { color: var(--muted); font-size: 0.9375rem; }
.goal-verdict { display: flex; align-items: center; gap: 5px; font-size: 0.9375rem; font-weight: 600; }
.goal-verdict.is-correct { color: var(--green); }
.goal-verdict.is-wrong { color: var(--wrong); }

@media (min-width: 640px) {
  .goal-columns { grid-template-columns: 1fr 1fr; }
}

/* Harf Harf */
.letter-strip {
  display: flex;
  gap: 6px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.letter-cell {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 2px solid var(--border-soft);
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 600;
}
.letter-cell .letter-mark {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--surface);
  border-radius: 50%;
}
.letter-cell.is-active { background: var(--mustard); border-color: var(--ink); }
.letter-cell.is-correct { background: var(--correct-bg); border-color: var(--green); color: var(--green); }
.letter-cell.is-wrong { background: var(--wrong-bg); border-color: var(--wrong); color: var(--wrong); }
.letter-cell.is-pass { border: 2px dashed var(--ink); }
.letter-center { display: none; }
.letter-big { font-family: var(--font-head); font-size: 2.25rem; font-weight: 700; line-height: 1; }
.letter-form { display: grid; gap: 10px; }
.letter-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }

@media (min-width: 1024px) {
  .letter-strip {
    position: relative;
    display: block;
    width: 470px;
    height: 470px;
    margin-inline: auto;
    padding: 0;
    overflow: visible;
  }
  .letter-cell {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -22px 0 0 -22px;
    transform: rotate(var(--angle)) translate(212px) rotate(calc(-1 * var(--angle)));
  }
  .letter-center {
    position: absolute;
    inset: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
  }
}

/* Dev paneli */
.dev-panel {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  gap: 6px;
  width: min(250px, calc(100vw - 24px));
  padding: 10px;
  background: var(--ink);
  color: var(--white);
  border-radius: 12px;
  font-size: 0.875rem;
}
.dev-panel button {
  min-height: 36px;
  padding: 4px 8px;
  background: #2F4238;
  color: var(--white);
  border: 1px solid #55685D;
  border-radius: 8px;
  text-align: left;
}
.dev-panel summary { cursor: pointer; font-weight: 700; min-height: 24px; }
.dev-panel-body { display: grid; gap: 6px; margin-top: 6px; }
