:root {
  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --text: #13201a;
  --muted: #637269;
  --border: #dce5df;
  --primary: #0f7a3d;
  --primary-ink: #ffffff;
  --primary-soft: #dcf2e4;
  --danger: #c62828;
  --danger-soft: #fde7e7;
  --warn: #a15c00;
  --warn-soft: #fff1d6;
  --yes: #15803d;
  --maybe: #c27803;
  --no: #c62828;
  --a: #ea580c;
  --a-soft: #ffedd5;
  --b: #2563eb;
  --b-soft: #dbeafe;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 24, .05), 0 4px 16px rgba(16, 32, 24, .05);
  --nav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1310;
    --surface: #141e19;
    --surface-2: #1b2721;
    --text: #e6eee9;
    --muted: #94a89c;
    --border: #25342c;
    --primary: #22a85a;
    --primary-soft: #163a25;
    --danger: #ef5350;
    --danger-soft: #3a1717;
    --warn: #f0a83a;
    --warn-soft: #3a2a10;
    --yes: #22c55e;
    --maybe: #f2b233;
    --no: #ef5350;
    --a: #fb8a3c;
    --a-soft: #3c2414;
    --b: #5b8ff9;
    --b-soft: #172a4d;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  -webkit-tap-highlight-color: transparent;
}
body.minimal { padding-bottom: 24px; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.25rem; }
h3 { font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.full { grid-column: 1 / -1; }
[hidden] { display: none !important; }

/* ---------- Üst bar & navigasyon ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--primary); color: #fff;
}
.brand { color: #fff; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.topnav { display: none; gap: 4px; }
.topnav a, .auth a { color: rgba(255, 255, 255, .85); padding: 6px 10px; border-radius: 8px; font-size: .9rem; }
.topnav a.on, .topnav a:hover, .auth a.on, .auth a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.auth { margin-left: auto; display: flex; gap: 2px; white-space: nowrap; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--border);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .72rem; font-weight: 500;
}
.bottomnav a.on { color: var(--primary); }

@media (min-width: 768px) {
  .topnav { display: flex; }
  .bottomnav { display: none; }
  body { padding-bottom: 32px; }
}

/* ---------- Yerleşim ---------- */
.container { max-width: 760px; margin: 0 auto; padding: 12px 12px 0; }
.narrow { max-width: 420px; margin: 24px auto; }
section { margin-bottom: 8px; }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 4px 8px; font-weight: 600; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 4px 12px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.card.list { padding: 0; overflow: hidden; }
.card.empty, .empty { text-align: center; color: var(--muted); padding: 24px 16px; }
.empty p { margin: 0 0 12px; }
.card.note { background: var(--warn-soft); border-color: transparent; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-card { display: block; color: inherit; }

/* ---------- Flash & toast ---------- */
.flash { display: block; padding: 11px 14px; border-radius: 12px; margin-bottom: 12px; font-weight: 500; }
.flash-ok { background: var(--primary-soft); color: var(--primary); }
.flash-err { background: var(--danger-soft); color: var(--danger); }
.flash-warn { background: var(--warn-soft); color: var(--warn); }
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #1f2a24; color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: .9rem; transition: .2s; z-index: 50; max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.danger { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.btn.ghost { background: transparent; }
.btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: .85rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row > .btn, .btn-row > form { flex: 1 1 auto; }
.btn-row > form .btn { width: 100%; }

/* ---------- Form ---------- */
.form { display: grid; gap: 12px; }
.form + .form { margin-top: 12px; }
label { display: grid; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 16px;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text); }
label.check input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--primary); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

details.collapsible { padding: 0; }
details.collapsible > summary {
  list-style: none; cursor: pointer; padding: 14px; font-weight: 600; color: var(--primary);
}
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible[open] > summary { border-bottom: 1px solid var(--border); }
details.collapsible > form { padding: 14px; }
details.collapsible > form + form { padding-top: 0; margin-top: 0; }

.toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.toolbar .search { flex: 1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); cursor: pointer;
}
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check:has(input:checked) { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-check:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
fieldset.alt-pos { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.alt-pos legend { padding: 0; margin-bottom: 6px; font-size: .85rem; font-weight: 600; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip.team-A { background: var(--a-soft); border-color: transparent; }
.chip.team-B { background: var(--b-soft); border-color: transparent; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select { flex: 1 1 140px; width: auto; }

/* ---------- Liste ---------- */
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border); color: inherit;
  width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; text-align: left;
}
.list-item:last-child { border-bottom: 0; }
a.list-item:active, button.list-item:active { background: var(--surface-2); }
.li-main { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.li-title { font-weight: 600; }
.li-stats { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.li-score { font-weight: 800; font-size: 1.1rem; display: flex; gap: 4px; }
.inactive { opacity: .55; }
.ta { color: var(--a); }
.tb { color: var(--b); }

/* ---------- Rozetler ---------- */
.pos {
  display: inline-grid; place-items: center; min-width: 32px; height: 22px; padding: 0 5px;
  border-radius: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .02em; color: #fff; flex-shrink: 0;
}
.pos-KL { background: #d49b00; }
.pos-DEF { background: #2f6fd6; }
.pos-OS { background: #16a34a; }
.pos-FV { background: #dc2626; }
.pos.pos-alt { min-width: 26px; height: 18px; font-size: .62rem; opacity: .55; }
.badge { padding: 4px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.st-open { background: var(--primary-soft); color: var(--primary); }
.st-teams { background: var(--b-soft); color: var(--b); }
.st-played { background: var(--surface-2); color: var(--muted); }
.st-cancelled { background: var(--danger-soft); color: var(--danger); }
.tag { font-size: .7rem; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.tag.mvp { background: var(--warn-soft); color: var(--warn); }
.rating { display: inline-block; min-width: 30px; text-align: center; padding: 2px 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-a { background: var(--a); }
.dot-b { background: var(--b); }

.formbar { display: inline-flex; gap: 3px; }
.f { width: 20px; height: 20px; border-radius: 5px; display: inline-grid; place-items: center; font-size: .68rem; font-weight: 800; color: #fff; }
.f-G { background: var(--yes); }
.f-B { background: #8a948f; }
.f-M { background: var(--no); }

/* ---------- Ana sayfa ---------- */
.nm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.nm-date { font-size: 1.15rem; font-weight: 700; }
.progress-label { display: flex; justify-content: space-between; margin: 14px 0 6px; font-size: .9rem; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s; }
.progress.full { grid-column: 1 / -1; margin-top: 4px; }

.scoreboard .sb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 6px 0; }
.sb-team { font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }
.sb-team.ta { text-align: right; }
.sb-score { font-size: 2.2rem; font-weight: 800; letter-spacing: .02em; }
.sb-score span { color: var(--muted); font-weight: 400; }
.sb-inputs { display: flex; align-items: center; gap: 6px; }
.sb-inputs input { width: 64px; height: 56px; font-size: 1.8rem; font-weight: 800; text-align: center; padding: 0; }
.scorers { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.mvp-line { margin-top: 10px; }

.leader-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.leader { margin: 0; color: inherit; display: grid; gap: 2px; }
.l-icon { font-size: 1.3rem; }
.l-label { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.l-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.l-val { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.l-val small { font-size: .75rem; color: var(--muted); font-weight: 500; }
@media (min-width: 560px) { .leader-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Maç başlığı ---------- */
.match-head { padding-bottom: 0; }
.mh-top { display: flex; align-items: center; gap: 10px; }
.mh-info { flex: 1; min-width: 0; }
.mh-info h1 { font-size: 1.05rem; }
.back { font-size: 1.8rem; line-height: 1; color: var(--muted); padding: 0 6px 4px 0; }
.mini-score { display: flex; justify-content: center; gap: 10px; margin-top: 8px; font-weight: 600; }
.tabs { display: flex; margin: 12px -14px 0; border-top: 1px solid var(--border); overflow-x: auto; }
.tabs a {
  flex: 1; text-align: center; padding: 12px 8px; color: var(--muted); font-weight: 600; font-size: .9rem;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Katılım ---------- */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; }
.cnt b { display: block; font-size: 1.35rem; line-height: 1.2; }
.cnt span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.cnt-yes b { color: var(--yes); }
.cnt-maybe b { color: var(--maybe); }
.cnt-no b { color: var(--no); }
.cnt-none b { color: var(--muted); }

.att-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--border); }
.att-row:last-child { border-bottom: 0; }
.att-name { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.att-row[data-status="yes"] { background: color-mix(in srgb, var(--yes) 7%, transparent); }
.att-row[data-status="no"] .att-name { opacity: .55; }
.seg { display: flex; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; flex-shrink: 0; }
.seg button {
  width: 44px; height: 40px; border: 0; background: var(--surface); color: var(--muted);
  font-size: 1.05rem; font-weight: 800; cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--border); }
.att-row[data-status="yes"] .s-yes { background: var(--yes); color: #fff; }
.att-row[data-status="maybe"] .s-maybe { background: var(--maybe); color: #fff; }
.att-row[data-status="no"] .s-no { background: var(--no); color: #fff; }
.att-row.busy .seg { opacity: .5; pointer-events: none; }
.att-st { font-size: .8rem; font-weight: 700; }
.att-row[data-status="yes"] .att-st::after { content: "Geliyor"; color: var(--yes); }
.att-row[data-status="maybe"] .att-st::after { content: "Belki"; color: var(--maybe); }
.att-row[data-status="no"] .att-st::after { content: "Gelmiyor"; color: var(--no); }
.att-row[data-status="none"] .att-st::after { content: "—"; color: var(--muted); }

/* ---------- Kadro ---------- */
.team-summary { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.ts { padding: 8px; border-radius: 10px; }
.ts-a { background: var(--a-soft); }
.ts-b { background: var(--b-soft); }
.ts-name { font-weight: 800; }
.ts-a .ts-name { color: var(--a); }
.ts-b .ts-name { color: var(--b); }
.ts-meta { font-size: .8rem; color: var(--muted); }
.ts-vs { color: var(--muted); font-weight: 700; }
.sticky-actions { position: sticky; top: 54px; z-index: 5; margin: 0 -12px 12px; padding: 8px 12px; background: var(--bg); }
.sticky-actions .btn { flex: 1 1 0; padding: 0 10px; }

.team-cols { display: grid; gap: 12px; }
@media (min-width: 600px) { .team-cols { grid-template-columns: 1fr 1fr; } }
.team-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 0; }
.col-a { border-top: 4px solid var(--a); }
.col-b { border-top: 4px solid var(--b); }
.col-none { margin-top: 12px; border-style: dashed; }
.pcards { display: grid; gap: 6px; }
.pcards:empty::after { content: "Oyuncu yok"; color: var(--muted); font-size: .85rem; text-align: center; padding: 8px; }
.pcard { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 10px; background: var(--surface-2); }
.pcard .pname { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .power { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ab { display: flex; gap: 4px; }
.ab button {
  width: 40px; height: 36px; border-radius: 8px; border: 2px solid; background: transparent;
  font-weight: 800; cursor: pointer; font-size: .85rem;
}
.ab .ab-a { border-color: var(--a); color: var(--a); }
.ab .ab-b { border-color: var(--b); color: var(--b); }
.ab .ab-a.on { background: var(--a); color: #fff; }
.ab .ab-b.on { background: var(--b); color: #fff; }

.pitch-wrap { margin-bottom: 12px; }
.pitch {
  position: relative; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 68 / 105;
  border-radius: var(--radius); overflow: hidden; color: #fff;
  background: repeating-linear-gradient(180deg, #2f9a4f 0 7.14%, #2a8c48 7.14% 14.28%);
  box-shadow: inset 0 0 0 3px #1f7a3c;
}
.pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pitch-lines * { fill: none; stroke: rgba(255,255,255,.8); stroke-width: 2; vector-effect: non-scaling-stroke; }
.pitch-lines .spot { fill: rgba(255,255,255,.8); }
.pitch-label {
  position: absolute; left: 8px; z-index: 1;
  padding: 2px 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .03em;
  max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pl-a { top: 8px; background: var(--a); }
.pl-b { bottom: 8px; background: var(--b); }
.pitch-players { position: absolute; inset: 0; z-index: 2; }
.pp {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 2px;
  width: min(68px, calc(100% / var(--n, 1) - 4px));
  font-size: .68rem; font-weight: 700; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.pp i {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: .75rem; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.pp-A i { background: var(--a); }
.pp-B i { background: var(--b); }
.pp-empty i { background: rgba(255,255,255,.12); border-style: dashed; border-color: rgba(255,255,255,.7); box-shadow: none; font-size: .6rem; }
.pp-empty span { background: none; opacity: .75; font-weight: 600; }
.pp-gk i { border-color: #facc15; box-shadow: 0 0 0 2px rgba(250,204,21,.35), 0 2px 5px rgba(0,0,0,.35); }
.pp span {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(0,0,0,.35); padding: 0 5px; border-radius: 6px;
}

/* ---------- Sonuç ---------- */
.res-team { border-top: 4px solid var(--border); }
.res-A { border-top-color: var(--a); }
.res-B { border-top-color: var(--b); }
.res-row { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; gap: 8px; }
.res-row:last-child { border-bottom: 0; }
.res-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.res-ctrls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.stepper .st-label { padding: 0 2px 0 8px; font-size: .9rem; }
.stepper button { width: 34px; height: 38px; border: 0; background: var(--surface-2); color: var(--text); font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.stepper input { width: 36px; min-height: 38px; height: 38px; border: 0; border-radius: 0; text-align: center; padding: 0; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button,
.sb-inputs input::-webkit-inner-spin-button, .sb-inputs input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.rating-sel { width: 84px; min-height: 40px; padding: 6px 8px; }
.mvp-toggle { display: inline-flex; cursor: pointer; }
.mvp-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mvp-toggle span {
  display: inline-flex; align-items: center; gap: 2px; height: 40px; min-width: 44px; padding: 0 8px; justify-content: center;
  border: 1px solid var(--border); border-radius: 10px; font-size: 1.1rem; filter: grayscale(1); opacity: .6;
}
.mvp-toggle span small { font-size: .7rem; font-weight: 700; }
.mvp-toggle input:checked + span { filter: none; opacity: 1; background: var(--warn-soft); border-color: var(--warn); }
.mvp-toggle input:focus-visible + span { outline: 2px solid var(--primary); }
.sticky-save { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; margin-bottom: 12px; }
.sticky-save .btn { box-shadow: 0 6px 20px rgba(15, 122, 61, .35); min-height: 50px; font-size: 1rem; }
@media (min-width: 768px) { .sticky-save { bottom: 12px; } }

/* ---------- Ödeme ---------- */
.pay-row .pay-state::after { content: "Ödemedi"; color: var(--no); font-weight: 700; font-size: .85rem; }
.pay-row.paid .pay-state::after { content: "✓ Ödedi"; color: var(--yes); }
.pay-row.paid { background: color-mix(in srgb, var(--yes) 7%, transparent); }

/* ---------- Profil & istatistik ---------- */
.profile { position: relative; text-align: center; padding-top: 20px; }
.profile .back { position: absolute; left: 14px; top: 10px; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center;
  font-size: 1.8rem; font-weight: 800; color: #fff;
}
.pos-bg-KL { background: #d49b00; }
.pos-bg-DEF { background: #2f6fd6; }
.pos-bg-OS { background: #16a34a; }
.pos-bg-FV { background: #dc2626; }
.profile-form { margin-top: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.stat-grid .stat { margin: 0 0 4px; text-align: center; padding: 12px 6px; }
.stat b { display: block; font-size: 1.3rem; }
.stat span { font-size: .75rem; color: var(--muted); font-weight: 600; }
.copy-box { display: flex; gap: 8px; margin: 10px 0 0; }
.copy-box input { font-size: .8rem; min-height: 38px; }

.table-wrap { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .88rem; white-space: nowrap; }
.stats-table th, .stats-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.stats-table th { font-size: .75rem; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.stats-table tr:last-child td { border-bottom: 0; }
.stats-table .sticky { position: sticky; left: 0; text-align: left; background: var(--surface); z-index: 1; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.stats-table th.sticky { background: var(--surface-2); }
.stats-table .sticky a { color: var(--text); font-weight: 600; }
.stats-table td.hl { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.rank { display: inline-block; width: 22px; color: var(--muted); font-size: .78rem; }

/* ---------- Oyuncu sayfası (p.php) ---------- */
.hello h1 { margin-bottom: 4px; }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.rsvp button {
  min-height: 48px; border-radius: 11px; border: 2px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 700; cursor: pointer;
}
.rsvp .rsvp-yes.on { background: var(--yes); border-color: var(--yes); color: #fff; }
.rsvp .rsvp-maybe.on { background: var(--maybe); border-color: var(--maybe); color: #fff; }
.rsvp .rsvp-no.on { background: var(--no); border-color: var(--no); color: #fff; }
.my-team { margin-top: 10px; padding: 10px; border-radius: 10px; text-align: center; }
.my-team.team-A { background: var(--a-soft); color: var(--a); }
.my-team.team-B { background: var(--b-soft); color: var(--b); }
.coming { margin-top: 12px; }
.coming summary { cursor: pointer; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.vote-form { display: grid; gap: 4px; }
.vote-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.vote-name { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.vote-row select { width: 72px; min-height: 40px; padding: 6px; }
.vote-form .btn { margin-top: 10px; }
