/* Tahmin Botu — mobil öncelikli arayüz.
   Tek vurgu rengi (turkuaz), nötr griler; koyu tema cihaz ayarını izler. */

:root {
  --bg: #f3f5f4;
  --card: #ffffff;
  --card-2: #f7f9f8;
  --line: #e3e8e6;
  --line-2: #d3dad7;
  --text: #17201e;
  --muted: #687571;
  --acc: #0f8f7e;
  --acc-ink: #ffffff;
  --acc-soft: rgba(15, 143, 126, .11);
  --acc-line: rgba(15, 143, 126, .45);
  --good: #15803d;
  --good-soft: rgba(21, 128, 61, .12);
  --bad: #d43c3c;
  --bad-soft: rgba(212, 60, 60, .11);
  --warn: #a35a00;
  --warn-soft: rgba(217, 119, 6, .13);
  --draw: #98a29f;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 6px rgba(16, 24, 40, .04);
  --radius: 14px;
  --tabbar-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1312;
    --card: #161e1c;
    --card-2: #1b2422;
    --line: #26302d;
    --line-2: #33403c;
    --text: #e7edeb;
    --muted: #93a29d;
    --acc: #2cc2ac;
    --acc-ink: #03201b;
    --acc-soft: rgba(44, 194, 172, .14);
    --acc-line: rgba(44, 194, 172, .5);
    --good: #3ccf73;
    --good-soft: rgba(60, 207, 115, .14);
    --bad: #f26464;
    --bad-soft: rgba(242, 100, 100, .14);
    --warn: #f5b942;
    --warn-soft: rgba(245, 185, 66, .14);
    --draw: #7a8784;
    --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 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

#app { max-width: 720px; margin: 0 auto; }
#view {
  overflow-x: clip;
  padding: 12px 14px calc(var(--tabbar-h) + var(--safe-b) + 24px);
  min-height: 100vh;
}
body.has-slip #view { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 96px); }
.loading, .empty { color: var(--muted); text-align: center; padding: 48px 12px; }
.empty b { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }

/* ---------------------------------------------------------------- başlık */
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 2px 12px; }
.phead h1 { font-size: 1.45rem; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.phead .sub { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: .85rem; margin: 0 0 12px; }
.note.info { background: var(--acc-soft); color: var(--acc); }
.foot-note { color: var(--muted); font-size: .78rem; text-align: center; margin: 24px 8px 0; }
.section-h { font-size: .88rem; font-weight: 700; color: var(--muted);
             margin: 18px 4px 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.section-h:first-child { margin-top: 4px; }
.section-h small { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* ---------------------------------------------------------------- kartlar */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px;
}
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.card { min-width: 0; }
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.meta .dot::before { content: "·"; margin-right: 6px; }
.tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: .68rem;
       font-weight: 650; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.tag.acc { border-color: transparent; background: var(--acc-soft); color: var(--acc); }
.tag.live { border-color: transparent; background: var(--bad-soft); color: var(--bad); }
.tag.good { border-color: transparent; background: var(--good-soft); color: var(--good); }
.tag.bad { border-color: transparent; background: var(--bad-soft); color: var(--bad); }
.tag.warn { border-color: transparent; background: var(--warn-soft); color: var(--warn); }

/* maç kartı */
.match .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.match .top .meta { min-width: 0; }
.match .teams { display: block; font-weight: 650; font-size: 1rem; line-height: 1.3; margin: 2px 0 10px; }
.match .teams .vs { color: var(--muted); font-weight: 400; margin: 0 4px; }
.match .facts { margin-top: 9px; font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.match .facts b { color: var(--text); font-weight: 600; }
.more { flex: none; display: inline-flex; align-items: center; gap: 2px; color: var(--acc); font-weight: 600;
        font-size: .8rem; min-height: 44px; padding: 0 0 0 10px; white-space: nowrap; margin: -10px -4px -10px 0; }
.more .n { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- oran düğmesi */
.odds { display: grid; gap: 6px; }
.odds.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.odds.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.odd {
  position: relative; min-height: 52px; min-width: 0; padding: 5px 4px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 10px;
  transition: background .12s, border-color .12s, transform .06s;
}
.odd:active { transform: scale(.97); }
.odd .ol { font-size: .7rem; color: var(--muted); line-height: 1.1; max-width: 100%; overflow: hidden;
           text-overflow: ellipsis; white-space: nowrap; }
.odd .ov { font-size: 1.05rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.odd .op { font-size: .68rem; color: var(--muted); line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.odd .op .val { color: var(--good); font-weight: 700; }
.odd.fair .ov { font-weight: 600; }
.odd.fav::after {        /* modelin bu gruptaki en olası seçeneği */
  content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--acc);
}
.odd.sel { background: var(--acc); border-color: var(--acc); }
.odd.sel .ol, .odd.sel .ov, .odd.sel .op, .odd.sel .op .val { color: var(--acc-ink); }
.odd.sel.fav::after { background: var(--acc-ink); }
.odd:disabled { opacity: .45; cursor: default; }
.odd.empty-odd { visibility: hidden; }
@media (hover: hover) { .odd:not(:disabled):not(.sel):hover { border-color: var(--acc-line); } }

/* ---------------------------------------------------------------- segment ve çipler */
.segment { display: grid; grid-template-columns: 1fr 1fr; background: var(--card-2); border: 1px solid var(--line);
           border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.segment button { border: 0; background: transparent; border-radius: 9px; min-height: 38px; font-weight: 600;
                  color: var(--muted); font-size: .9rem; }
.segment button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
@media (prefers-color-scheme: dark) { .segment button.on { background: var(--line-2); } }

.chips { position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 10px; padding: 2px 14px;
         scroll-padding: 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
        background: var(--card); font-size: .86rem; font-weight: 550; white-space: nowrap; }
.chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip small { opacity: .65; margin-left: 4px; font-weight: 500; }

/* sıralama satırı */
.sortbar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.sortbar label { color: var(--muted); font-size: .82rem; }
.sortbar select { min-height: 40px; border: 1px solid var(--line-2); background: var(--card); border-radius: 10px;
                  padding: 0 30px 0 10px; font-size: .88rem; appearance: none; -webkit-appearance: none;
                  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
                  background-position: right 14px center, right 9px center; background-size: 5px 5px; background-repeat: no-repeat; }
.iconbtn { min-width: 40px; min-height: 40px; border: 1px solid var(--line-2); background: var(--card); border-radius: 10px;
           display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; font-size: .85rem; }
.sortbar .count { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* güçlü tahmin satırı */
.sugg { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 10px; align-items: center; }
.sugg .teams { font-weight: 600; font-size: .92rem; margin: 2px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.sugg .pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .9rem; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-weight: 700;
        font-size: .8rem; font-variant-numeric: tabular-nums; background: var(--card-2); color: var(--muted); }
.pill.strong { background: var(--acc); color: var(--acc-ink); }
.pill.mid { background: var(--acc-soft); color: var(--acc); }

/* ---------------------------------------------------------------- maç detayı */
.dhead {
  position: sticky; top: 0; z-index: 30; margin: -12px -14px 12px; padding: 8px 10px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center;
}
.back { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.9rem; line-height: 1; color: var(--acc);
        display: flex; align-items: center; justify-content: center; border-radius: 12px; padding-bottom: 4px; }
.dhead .t { text-align: center; min-width: 0; }
.dhead .t b { display: block; font-size: 1rem; line-height: 1.25; }
.dhead .meta { justify-content: center; margin-top: 2px; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; text-align: center; }
.hero .team { font-weight: 700; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.hero .team small { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; margin-top: 2px; }
.hero .mid { color: var(--muted); font-size: .8rem; text-align: center; }
.hero .mid b { display: block; font-size: 1.1rem; color: var(--text); font-variant-numeric: tabular-nums; }
.probbar { display: flex; height: 6px; gap: 2px; border-radius: 99px; overflow: hidden; margin: 12px 0 4px; }
.probbar span { display: block; min-width: 2px; }
.problbl { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

details.mkt { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
details.mkt + details.mkt { margin-top: 10px; }
details.mkt > summary {
  list-style: none; cursor: pointer; min-height: 46px; padding: 0 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; font-weight: 650; font-size: .95rem;
}
details.mkt > summary::-webkit-details-marker { display: none; }
details.mkt > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
                               transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .15s; }
details.mkt[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.mkt > summary small { color: var(--muted); font-weight: 500; font-size: .75rem; margin-left: auto; }
.mkt-body { padding: 0 10px 10px; display: grid; gap: 6px; }
.ourow { display: grid; grid-template-columns: 46px repeat(2, minmax(0, 1fr)); gap: 6px; align-items: center; }
.ourow .line { text-align: center; font-weight: 700; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.legend { color: var(--muted); font-size: .74rem; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 2px 4px 0; }
.legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); margin-right: 5px; vertical-align: 1px; }
.legend .val { color: var(--good); font-weight: 700; }

.scores { display: flex; flex-wrap: wrap; gap: 6px; }
.score { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.score b { font-size: 1rem; }
.score small { color: var(--muted); margin-left: 6px; }
.score.best { border-color: var(--acc-line); background: var(--acc-soft); }
ul.why { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
ul.why li { position: relative; padding-left: 18px; font-size: .92rem; }
ul.why li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }

.kv { width: 100%; border-collapse: collapse; font-size: .9rem; }
.kv th { font-size: .75rem; color: var(--muted); font-weight: 600; padding: 0 4px 8px; text-align: center; }
.kv td { padding: 8px 4px; border-top: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.kv td:first-child, .kv th:first-child { text-align: left; color: var(--muted); font-size: .82rem; width: 30%; }
.form { display: inline-flex; gap: 3px; vertical-align: middle; }
.form i { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
          font-style: normal; font-size: .6rem; font-weight: 700; color: #fff; }
.form .G { background: var(--good); } .form .B { background: var(--draw); } .form .M { background: var(--bad); }
.weather { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.weather b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.weather span { color: var(--muted); font-size: .75rem; }
.absent { display: grid; gap: 6px; font-size: .9rem; }
.absent .muted, .muted { color: var(--muted); }

/* ---------------------------------------------------------------- kupon */
.slipbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); z-index: 40;
  width: min(692px, calc(100% - 20px)); min-height: 54px; padding: 8px 8px 8px 16px; border-radius: 14px;
  background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-variant-numeric: tabular-nums;
}
.slipbar[hidden] { display: none; }
button.slipbar { border: 0; text-align: left; font: inherit; cursor: pointer; padding-left: 10px; }
.slipbar .sb-count { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--acc); color: var(--acc-ink);
                     display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; }
.slipbar .sb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.slipbar .s1 { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slipbar .s2 { font-size: .78rem; opacity: .75; white-space: nowrap; }
.slipbar .go { background: var(--acc); color: var(--acc-ink); border-radius: 10px; min-height: 38px; padding: 0 12px;
               display: inline-flex; align-items: center; font-weight: 700; font-size: .88rem; white-space: nowrap; }

.slip-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 8px; align-items: center; padding: 10px 6px 10px 12px; }
.slip-item .teams { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 2px 0; }
.slip-item .sel-l { font-size: .88rem; }
.slip-item .sel-l .muted { font-size: .8rem; }
.slip-item .o { text-align: right; font-variant-numeric: tabular-nums; }
.slip-item .o b { display: block; font-size: 1.1rem; }
.slip-item .o span { font-size: .7rem; color: var(--muted); }
.x { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px; color: var(--muted); font-size: 1.1rem; }
.x:hover { background: var(--card-2); }

.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.totals div span { display: block; color: var(--muted); font-size: .75rem; }
.totals div b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.totals .big b { color: var(--acc); }
.stake { display: grid; gap: 8px; margin-top: 14px; }
.stake-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); gap: 6px; }
.input { min-height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); padding: 0 12px;
         width: 100%; font-size: 16px; font-variant-numeric: tabular-nums; }
.input:focus, select:focus, button:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 1px; }
.stake-row .chip { min-height: 44px; padding: 0 12px; }
.btn { min-height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); font-weight: 650; font-size: .95rem; width: 100%; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); min-height: 44px; }
.btn:disabled { opacity: .5; }
.actions { display: grid; gap: 6px; margin-top: 14px; }

.agg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.agg b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.agg span { font-size: .72rem; color: var(--muted); }
.agg .pos { color: var(--good); } .agg .neg { color: var(--bad); }
.coupon .ch { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coupon .ch b { font-size: .98rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coupon .rows { margin-top: 8px; }
.coupon .row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.coupon .row .st { font-size: 1rem; text-align: center; }
.coupon .row .r { text-align: right; font-variant-numeric: tabular-nums; }
.coupon .row .r small { display: block; color: var(--muted); font-size: .72rem; }
.coupon .cf { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.coupon .cf .btns { display: flex; gap: 4px; }
.coupon .cf .btn.ghost { width: auto; padding: 0 10px; font-size: .85rem; color: var(--acc); }
.coupon .cf .btn.ghost.danger { color: var(--bad); }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- tablolar */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.st { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
table.st th { font-size: .72rem; color: var(--muted); font-weight: 600; padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--line); }
table.st td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.st tr:last-child td { border-bottom: 0; }
table.st .l { text-align: left; }
table.st td.team { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
table.st tr.up td.team { font-weight: 650; }
table.st td.team .upd { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); margin-left: 6px; vertical-align: 2px; }
.wide-only { display: none; }
table.st .form { gap: 2px; }
table.st .form i { width: 15px; height: 15px; font-size: .55rem; }
@media (max-width: 400px) { table.st td.team { max-width: 118px; } table.st td, table.st th { padding-left: 4px; padding-right: 4px; } }
@media (min-width: 560px) { .wide-only { display: table-cell; } table.st td.team { max-width: 220px; } }

/* performans */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 1.5rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tile .k { font-size: .82rem; font-weight: 600; margin-top: 2px; }
.tile .d { font-size: .74rem; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tile:last-child:nth-child(odd) { grid-column: auto; } }
.calib { display: grid; gap: 12px; }
.cal-row .cl { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 4px; }
.cal-row .cl span { color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; border-radius: 99px; }
.bar .exp { background: var(--draw); } .bar .act { background: var(--acc); }
.hist .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .86rem; }
.hist .row:first-child { border-top: 0; padding-top: 0; }

/* ---------------------------------------------------------------- alt menü */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (min-width: 760px) { .tabbar { left: 50%; right: auto; width: 720px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; } }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
            color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: -.02em; min-width: 0; }
.tabbar a span { white-space: nowrap; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--acc); }
.tabbar a.on svg { stroke-width: 2.1; }
.badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
         background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.badge[hidden] { display: none; }

/* bildirim */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); z-index: 120;
  max-width: calc(100% - 32px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px;
  font-size: .88rem; font-weight: 550; box-shadow: 0 6px 20px rgba(0,0,0,.2); text-align: center;
  animation: toast-in .18s ease-out; pointer-events: none;   /* altındaki dokunmaları engellemesin */
}
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 370px) {
  #view { padding-left: 10px; padding-right: 10px; }
  .chips { margin: 0 -10px 10px; padding: 2px 10px; }
  .dhead { margin: -12px -10px 12px; }
  .odd .ov { font-size: 1rem; }
  .phead h1 { font-size: 1.3rem; }
}
.upd-legend { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); margin-right: 6px; vertical-align: 2px; }

/* hazır kuponlar: mobilde yatay kaydırılan kartlar */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: min(300px, 84%); gap: 10px; overflow-x: auto;
           scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px 4px; scroll-padding: 14px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > .card { scroll-snap-align: start; }
@media (min-width: 640px) { .hscroll { grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; } }
.ready { display: flex; flex-direction: column; gap: 8px; }
.ready .rh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ready .rh b { font-size: 1.02rem; }
.ready .rd { font-size: .78rem; line-height: 1.35; }
.ready .rp { display: grid; border-top: 1px solid var(--line); }
.ready .rrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 0;
               border-bottom: 1px solid var(--line); font-size: .84rem; }
.ready .rrow .num { font-weight: 700; font-size: .95rem; }
.ready .rt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
.ready .rt span { display: block; color: var(--muted); font-size: .68rem; line-height: 1.2; }
.ready .rt b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.ready .btn { min-height: 44px; }
.ready-note { font-size: .74rem; margin: 6px 4px 4px; line-height: 1.4; }
@media (max-width: 370px) { .hscroll { margin: 0 -10px; padding: 2px 10px 4px; } }

body.has-slip .toast { bottom: calc(var(--tabbar-h) + var(--safe-b) + 74px); }
html.sheet-open .toast { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 14px); }
.small { font-size: .78rem; }
.muted.small { line-height: 1.4; }
.btn.ghost.danger { color: var(--bad); }

/* ---------------------------------------------------------------- yapışkan araç çubuğu, arama, yenile */
.toolbar { position: sticky; top: 0; z-index: 25; margin: 0 -14px 4px; padding: 8px 14px 2px;
           background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.toolbar .segment { margin-bottom: 6px; }
.toolbar .chips { margin-bottom: 8px; }
.toolbar-row { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 8px; }
.day-label { font-weight: 700; font-size: .92rem; color: var(--muted); }
.chips.dim { opacity: .45; }
.search { position: relative; margin-bottom: 8px; }
.search input { width: 100%; min-height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card);
                padding: 0 44px 0 38px; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search .s-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted);
                  stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search .s-clear { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; }
.refresh { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 4px 4px 10px; border: 0; background: transparent;
           color: var(--muted); font-size: .8rem; text-align: right; border-radius: 12px; }
.refresh small { display: block; font-size: .66rem; line-height: 1.1; }
.refresh .r-icon { order: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card);
                   display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; color: var(--acc); }
.refresh.stale { color: var(--warn); }
body.refreshing .refresh .r-icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.phead { align-items: center; }

/* oran düğmesine dokununca kısa nabız */
.odd.pulse { animation: pulse .28s ease-out; }
@keyframes pulse { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* yükleniyor iskeleti */
.skeleton { display: grid; gap: 12px; padding-top: 8px; }
.sk { border-radius: 14px; background: linear-gradient(90deg, var(--card-2) 0%, var(--line) 50%, var(--card-2) 100%);
      background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.sk-title { height: 30px; width: 40%; } .sk-seg { height: 44px; } .sk-card { height: 150px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* aşağı çekip yenileme göstergesi */
.ptr { position: fixed; top: 6px; left: 50%; transform: translate(-50%, -60px); z-index: 70; display: flex; align-items: center; gap: 8px;
       background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; box-shadow: 0 4px 14px rgba(0,0,0,.12);
       font-size: .82rem; color: var(--muted); opacity: 0; transition: opacity .12s; pointer-events: none; }
.ptr.show { opacity: 1; }
.ptr .ptr-icon { color: var(--acc); font-size: 1.05rem; transition: transform .15s; }
.ptr.ready .ptr-icon { transform: rotate(180deg); }
body { overscroll-behavior-y: contain; }

/* Kuponlarım: hazırlanan kupon kartı */
button.card.draft { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
                    margin-bottom: 12px; border-color: var(--acc-line); background: var(--acc-soft); cursor: pointer; }
button.card.draft > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agg .pos { color: var(--good); } .agg .neg { color: var(--bad); }

/* ---------------------------------------------------------------- kupon penceresi */
html.sheet-open, html.sheet-open body { overflow: hidden; }
.backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(8, 12, 11, .45); opacity: 0; transition: opacity .2s; }
.backdrop.in { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; max-height: 90vh; max-height: 90dvh;
  background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.18);
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .22s cubic-bezier(.2,.8,.2,1);
  padding-bottom: var(--safe-b);
}
.sheet.in { transform: translateY(0); }
.sheet[hidden], .backdrop[hidden] { display: none; }
.sheet-head { flex: none; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 14px 8px 6px; position: relative; touch-action: none; }
.sheet-head .handle { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); }
.sheet-head h2 { grid-column: 2; margin: 0; text-align: center; font-size: 1.05rem; }
.sheet-head .x { grid-column: 3; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px 16px; -webkit-overflow-scrolling: touch; }
.sheet-foot { flex: none; padding: 10px 14px 12px; background: var(--card); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.sheet .slip-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.sheet .slip-item + .slip-item { border-top: 1px solid var(--line); }
.sheet .slip-item .teams { margin: 2px 0; }
.sheet .totals { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.45fr); gap: 6px; }
.sheet .totals .big b { white-space: nowrap; }
.sheet .totals div span { font-size: .68rem; }
.sheet .totals div b { font-size: 1rem; }
.sheet .totals .big b { color: var(--acc); }
.lbl { font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: 6px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 40px; }
.input-wrap .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.stake-row .chip.on { background: var(--text); border-color: var(--text); color: var(--bg); }
@media (max-width: 370px) { .sheet .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toolbar { margin: 0 -10px 4px; padding: 8px 10px 2px; } }
@media (min-width: 640px) {
  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: min(560px, calc(100% - 32px)); height: auto; max-height: 85vh;
           border-radius: 18px; transform: translate(-50%, -46%); opacity: 0; transition: transform .2s, opacity .2s; padding-bottom: 0; }
  .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-head .handle { display: none; }
  .sheet-foot { border-radius: 0 0 18px 18px; }
}

/* ---------------------------------------------------------------- başlık menüsü ve güncelleme */
.hmenu { position: relative; }
.upd-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 4px 4px 10px; border: 0; background: transparent;
           color: var(--muted); font-size: .8rem; text-align: right; border-radius: 12px; font-variant-numeric: tabular-nums; }
.upd-btn small { display: block; font-size: .66rem; line-height: 1.1; }
.upd-btn.stale { color: var(--warn); }
.upd-btn .dots { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card);
                 display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; color: var(--acc); }
.spin { display: inline-block; animation: spin .9s linear infinite; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; width: min(290px, calc(100vw - 28px)); background: var(--card);
        border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.16); padding: 6px; display: grid; gap: 2px; }
.menu button { border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 10px; min-height: 52px; display: grid; gap: 2px; }
.menu button:hover:not(:disabled) { background: var(--card-2); }
.menu button b { font-size: .92rem; }
.menu button span { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.menu button:disabled { opacity: .55; }
.jobpill { background: var(--card); border: 1px solid var(--acc-line); border-radius: 12px; padding: 8px 12px; font-size: .82rem; margin: -4px 0 12px; }
.jobpill .jp-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.jobpill .jp-row .spin { color: var(--acc); }
.jobpill .jp-last { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.jobpill.err { border-color: var(--bad); }
.jobpill.err .jp-row { justify-content: space-between; color: var(--bad); }
.jobpill pre { margin: 6px 0 2px; white-space: pre-wrap; font-size: .72rem; color: var(--muted); max-height: 120px; overflow: auto; }

/* ---------------------------------------------------------------- UEFA */
table.st.uefa th.cur, table.st.uefa td.cur { background: var(--acc-soft); }
table.st.uefa td.cur b { color: var(--acc); }
table.st.uefa tr.up td { background: var(--acc-soft); }
table.st.uefa tr.up td.cur { background: color-mix(in srgb, var(--acc) 22%, transparent); }
table.st.uefa tr.detail td { white-space: normal; text-align: left; background: var(--card-2); }
.linkbtn { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-align: left; min-height: 36px; cursor: pointer; }
.linkbtn.acc { color: var(--acc); font-weight: 600; min-height: 32px; }
table.st.uefa td.team .linkbtn { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.exp { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.exp svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.seasons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; text-align: center; }
.seasons div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 2px; }
.seasons div.on { border-color: var(--acc-line); }
.seasons span { display: block; font-size: .64rem; color: var(--muted); }
.seasons b { font-size: .8rem; font-variant-numeric: tabular-nums; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.filters label { display: grid; gap: 4px; }
.filters label span { font-size: .75rem; color: var(--muted); font-weight: 600; }
.filters select { min-height: 44px; border: 1px solid var(--line-2); background: var(--card); border-radius: 10px; padding: 0 10px; font-size: .92rem; }
.card.sum { font-size: .9rem; }
.acc { color: var(--acc); }
.club .ch { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.club .cstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; text-align: center; }
.club .cstats span { display: block; font-size: .68rem; color: var(--muted); }
.club .cstats b { font-variant-numeric: tabular-nums; }
@media (max-width: 340px) { .tabbar a { font-size: 9.5px; letter-spacing: -.03em; } .tabbar svg { width: 21px; height: 21px; } }

/* ---------------------------------------------------------------- UEFA: Wikipedia tarzı tablolar */
.table-wrap.wiki { position: relative; }
table.wt { border-collapse: separate; border-spacing: 0; font-size: .84rem; }
table.wt th { white-space: nowrap; background: var(--card); }
table.wt th.grp { border-bottom: 1px solid var(--line); color: var(--text); font-weight: 650; }
table.wt th.sub { font-size: .68rem; padding-top: 4px; padding-bottom: 6px; }
table.wt td, table.wt th { padding: 8px 9px; background: var(--card); }
table.wt th.cur, table.wt td.cur { background: color-mix(in srgb, var(--acc) 10%, var(--card)); }
table.wt td.cur { color: var(--acc); font-weight: 650; }
table.wt tr.up td { background: color-mix(in srgb, var(--acc) 8%, var(--card)); }
table.wt tr.up td.cur { background: color-mix(in srgb, var(--acc) 18%, var(--card)); }
table.wt tr.up td .cn { font-weight: 700; }
table.wt td.k { color: var(--muted); font-size: .8rem; position: relative; }
/* ilk sütunlar yapışkan (yatay kaydırmada # ve ülke/kulüp görünür kalır) */
table.wt .s0 { position: sticky; left: 0; z-index: 2; width: 34px; min-width: 34px; max-width: 34px; }
table.wt .s1 { position: sticky; left: 34px; z-index: 2; min-width: 104px; max-width: 132px; overflow: hidden; text-overflow: ellipsis;
               box-shadow: 1px 0 0 var(--line); }
table.wt .s0w { position: sticky; left: 0; z-index: 2; min-width: 136px; max-width: 168px; overflow: hidden; text-overflow: ellipsis;
                box-shadow: 1px 0 0 var(--line); }
table.wt thead .s0, table.wt thead .s1, table.wt thead .s0w { z-index: 3; }
table.wt tr.click { cursor: pointer; }
@media (hover: hover) { table.wt tr.click:hover td { background: color-mix(in srgb, var(--acc) 6%, var(--card)); } }
table.wt tr.click:focus-visible td { outline: 2px solid var(--acc-line); outline-offset: -2px; }
table.wt tr.open td { border-bottom-color: transparent; }
table.wt .chev { display: inline-block; width: 14px; color: var(--muted); font-size: .75rem; }
table.wt tfoot td { border-top: 1px solid var(--line-2); border-bottom: 0; color: var(--muted); font-size: .8rem; }
table.wt tfoot td b { color: var(--text); }
table.wt tr.detail td { padding: 0 9px 10px; white-space: normal; text-align: left; background: var(--card-2); }
.eps { display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 6px; background: var(--good-soft); color: var(--good);
       font-size: .64rem; font-weight: 750; vertical-align: 1px; }
.bd { display: grid; gap: 6px; padding-top: 8px; position: sticky; left: 9px; max-width: calc(100vw - 48px); }
.bd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .78rem; padding: 6px 8px; background: var(--card);
          border: 1px solid var(--line); border-radius: 10px; }
.more-btn { margin-top: 10px; }
.foot-note.left { text-align: left; margin: 10px 4px 0; display: grid; gap: 4px; line-height: 1.45; }
.filters.one { grid-template-columns: minmax(0, 1fr); max-width: 320px; }
@media (min-width: 900px) { body[data-page="uefa"] #app { max-width: 1060px; } }

/* canlı maç etiketi: yanıp sönen nokta */
.lv:empty { display: none; }
.tag.pulse::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px;
  animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tag.pulse::before { animation: none; } }

/* Kuponlarım: para özeti (yatırılan, kazanç, net, bekleyen) */
.card.money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; margin: 10px 0 12px; }
.money > div { display: flex; flex-direction: column; min-width: 0; }
.money span { font-size: .72rem; color: var(--muted); }
.money b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.money small { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.money .pos { color: var(--good); } .money .neg { color: var(--bad); }
@media (min-width: 640px) { .card.money { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- Laravel: üst çubuk, simülatör şeridi, altbilgi */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
          padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 6px; }
.brand { font-weight: 750; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.credits-pill, .login-link { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px;
          border-radius: 999px; font-size: .85rem; font-weight: 650; }
.credits-pill { background: var(--acc-soft); color: var(--acc); font-variant-numeric: tabular-nums; }
.login-link { border: 1px solid var(--acc-line); color: var(--acc); }
.simbar { margin: 4px 14px 0; padding: 7px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line);
          color: var(--muted); font-size: .78rem; line-height: 1.35; }
.simbar b { color: var(--text); }
.simbar a { color: var(--acc); font-weight: 600; white-space: nowrap; }
/* alt boşluğu altbilgi bırakır (sekme çubuğu + kupon çubuğu) */
#view, body.has-slip #view { min-height: 60vh; padding-bottom: 12px; }
.site-foot { padding: 8px 18px calc(var(--tabbar-h) + var(--safe-b) + 28px); color: var(--muted); font-size: .76rem; line-height: 1.5; text-align: center; }
body.has-slip .site-foot { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 96px); }
.site-foot p { margin: 0 0 8px; }
.site-foot a { color: var(--acc); }
.help-line { background: var(--acc-soft); color: var(--text); border-radius: 10px; padding: 9px 12px; }
.foot-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.tabbar a[aria-current="page"] { color: var(--acc); }
.tabbar .tab-badge { position: absolute; top: 4px; left: calc(50% + 7px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--bad); color: #fff; font: 700 10px/16px system-ui, sans-serif; font-style: normal; text-align: center; }
.live-next { margin-top: 10px; }
.pk .now { font-weight: 600; }
.pk .now.good { color: var(--good); }
.pk .now.bad { color: var(--bad); }
