/* Turbokoşu: mobil öncelikli, sakin, veri öncelikli arayüz.
   Token'lar ve ölçülmüş kontrastlar için DESIGN.md'ye bakın. */

/* ---------- Token'lar ---------- */
:root {
  --bg: #eef0f3;
  --surface: #f5f6f8;
  --card: #fbfbfc;
  --raised: #e4e7ec;
  --border: #c9ced6;
  --border-strong: #aab2bd;
  --text: #0f172a;
  --muted: #1e293b;
  --dim: #334155;
  --odds: #11151b;
  --brand: #5b36a3;
  --brand-strong: #472786;
  --brand-subtle: #ebe4f7;
  --brand-line: #8b6cc9;
  --accent: var(--brand);
  --accent-soft: var(--brand-subtle);
  --accent-line: var(--brand-line);
  --accent-subtle: var(--brand-subtle);
  --accent-strong: var(--brand-strong);
  --pos: #136b45;
  --neg: #b0322a;
  --pos-ink: #0b4a2e;
  --pos-tint: #d7efe1;
  --neg-ink: #7a1d16;
  --neg-tint: #f8dcd8;
  --tr: #b3121f;
  --us: #1f3a7a;
  --other: #3d4654;
  --badge-ink: #fbfbfc;
  --wm-opacity: 0.16;
  --bar: #9aa6b5;
  --focus: var(--brand-strong);

  --brand-alpha: rgba(91, 54, 163, 0.12);
  --line: var(--border);
  --hover: var(--raised);
  --surface-hover: var(--raised);
  --text-muted: var(--muted);
  --bg-alt: var(--surface);

  --brand-logo-fill: #7c3aed;
  --brand-logo-glow: drop-shadow(0 1px 3px rgba(124, 58, 237, 0.35));
  --brand-box-border: rgba(124, 58, 237, 0.65);
  --brand-box-glow: 0 0 10px rgba(124, 58, 237, 0.25);
  --brand-box-glow-pulse: 0 0 18px rgba(124, 58, 237, 0.5);
  --brand-accent-color: #6d28d9;
  --brand-accent-glow: none;
  --brand-name-shadow: none;
  --brand-notice-color: #5b36a3;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --tap: 2.75rem; /* 44px */
  --topbar-h: 4.875rem; /* ~78px: %50 büyütülmüş ferah üst panel */
  --tabbar-h: 3.5rem;
  --ticker-h: 2.75rem; /* 44px: dokunma alanı */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181d;
    --surface: #181d23;
    --card: #1d232b;
    --raised: #262d37;
    --border: #2e3641;
    --border-strong: #3a4350;
    --text: #ffffff;
    --muted: #cbd5e1;
    --dim: #94a3b8;
    --odds: #f1f3f5;
    --brand: #b7a3f5;
    --brand-strong: #d4c6fb;
    --brand-subtle: #2e2640;
    --brand-line: #8a75cc;
    --accent: var(--brand);
    --accent-soft: var(--brand-subtle);
    --accent-line: var(--brand-line);
    --accent-subtle: var(--brand-subtle);
    --accent-strong: var(--brand-strong);
    --pos: #74d3a0;
    --neg: #f39486;
    --pos-ink: #a6f0c6;
    --pos-tint: #163a2a;
    --neg-ink: #ffc2b8;
    --neg-tint: #44221f;
    --tr: #b3121f;
    --us: #1f3a7a;
    --other: #3d4654;
    --badge-ink: #fbfbfc;
    --wm-opacity: 0.12;
    --bar: #5b6676;
    --focus: var(--brand-strong);
    --brand-logo-fill: #c084fc;
    --brand-logo-glow: drop-shadow(0 0 8px rgba(192, 132, 252, 0.75));
    --brand-box-border: rgba(168, 85, 247, 0.75);
    --brand-box-glow: 0 0 12px rgba(168, 85, 247, 0.4);
    --brand-box-glow-pulse: 0 0 20px rgba(168, 85, 247, 0.65);
    --brand-accent-color: #c084fc;
    --brand-accent-glow: 0 0 10px rgba(192, 132, 252, 0.6);
    --brand-name-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    --brand-notice-color: #c4b5fd;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14181d;
  --surface: #181d23;
  --card: #1d232b;
  --raised: #262d37;
  --border: #2e3641;
  --border-strong: #3a4350;
  --text: #ffffff;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --odds: #f1f3f5;
  --brand: #b7a3f5;
  --brand-strong: #d4c6fb;
  --brand-subtle: #2e2640;
  --brand-line: #8a75cc;
  --accent: var(--brand);
  --accent-soft: var(--brand-subtle);
  --accent-line: var(--brand-line);
  --accent-subtle: var(--brand-subtle);
  --accent-strong: var(--brand-strong);
  --pos: #74d3a0;
  --neg: #f39486;
  --pos-ink: #a6f0c6;
  --pos-tint: #163a2a;
  --neg-ink: #ffc2b8;
  --neg-tint: #44221f;
  --tr: #b3121f;
  --us: #1f3a7a;
  --badge-ink: #fbfbfc;
  --wm-opacity: 0.12;
  --bar: #5b6676;
  --focus: var(--brand-strong);
  --brand-logo-fill: #c084fc;
  --brand-logo-glow: drop-shadow(0 0 8px rgba(192, 132, 252, 0.75));
  --brand-box-border: rgba(168, 85, 247, 0.75);
  --brand-box-glow: 0 0 12px rgba(168, 85, 247, 0.4);
  --brand-box-glow-pulse: 0 0 20px rgba(168, 85, 247, 0.65);
  --brand-accent-color: #c084fc;
  --brand-accent-glow: 0 0 10px rgba(192, 132, 252, 0.6);
  --brand-name-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  --brand-notice-color: #c4b5fd;
  color-scheme: dark;
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 8rem;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + var(--ticker-h) + env(safe-area-inset-bottom));
  overflow-wrap: break-word;
}
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.num, .odds-value, .tnum { font-variant-numeric: tabular-nums lining-nums; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 0.5rem; top: -4rem;
  background: var(--card); color: var(--text);
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  z-index: 50;
}
.skip-link:focus { top: 0.5rem; }

.icon {
  width: 1.25rem; height: 1.25rem;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}

/* ---------- Üst bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 0.5rem;
  min-height: var(--topbar-h);
  padding: 0.25rem max(1rem, env(safe-area-inset-right)) 0.25rem max(1rem, env(safe-area-inset-left));
  padding-top: max(0.25rem, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.85rem;
  min-height: 2.85rem;
  text-decoration: none;
  background: transparent;
  border: 2px dashed var(--brand-box-border);
  border-radius: 10px;
  animation: brand-box-pulse 3s infinite ease-in-out;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--brand-box-glow);
}

@keyframes brand-box-pulse {
  0%, 100% {
    box-shadow: var(--brand-box-glow);
    border-color: var(--brand-box-border);
  }
  50% {
    box-shadow: var(--brand-box-glow-pulse);
    border-color: #c084fc;
  }
}

.brand:hover,
.brand:focus-visible {
  border-color: #c084fc;
  border-style: dashed;
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.8);
  transform: translateY(-1px) scale(1.02);
}

@keyframes horseRunIn {
  0% { opacity: 0; transform: translateX(-14px); }
  60% { opacity: 1; transform: translateX(3px); }
  100% { opacity: 1; transform: translateX(0); }
}

.brand-mark {
  width: 3.2rem;
  height: 2.05rem;
  fill: var(--brand-logo-fill);
  filter: var(--brand-logo-glow);
  flex: none;
  animation: horseRunIn 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.25s ease;
  transform-origin: center left;
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  transform: translateX(4px) scale(1.08);
  filter: drop-shadow(0 0 12px rgba(192, 132, 252, 0.95));
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .brand-mark { animation: none; transition: none; }
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  text-shadow: var(--brand-name-shadow);
}

.brand-name .brand-accent {
  color: var(--brand-accent-color);
  text-shadow: var(--brand-accent-glow);
}

/* Marka kapsayıcısı ve sabit yurtdışı yarışlar notu */
.brand-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  flex: none;
}

.brand-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand-notice-color, #c4b5fd);
  padding: 0 0.15rem;
  line-height: 1.15;
  white-space: nowrap;
  user-select: none;
}

.brand-notice-icon {
  font-size: 0.78rem;
  line-height: 1;
  flex: none;
}

.brand-notice-text {
  display: inline;
}

/* Spor kategorileri: tek etkin kategori varsa yalnızca o gösterilir. */
.sports { display: none !important; }
.sport-btn {
  min-height: var(--tap); padding: 0 0.75rem;
  border: 1px solid var(--brand-line); border-radius: 999px;
  background: var(--brand-subtle); color: var(--brand-strong);
  font-size: 0.875rem; font-weight: 650; white-space: nowrap; cursor: pointer;
}
.sport-btn:not([aria-current]) { background: none; border-color: var(--border); color: var(--muted); }
.topbar-date {
  display: none; min-width: 0; text-align: right;
  color: var(--dim); font-size: 0.8125rem; font-weight: 500; line-height: 1.25;
}
@media (min-width: 30rem) {
  .topbar-date { display: block; }
}
.icon-btn {
  display: inline-grid; place-items: center;
  width: var(--tap); height: var(--tap);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); color: var(--muted);
  cursor: pointer; flex: none;
}
.text-size-btn { font-size: 1rem; font-weight: 750; color: var(--text); letter-spacing: -0.02em; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* ---------- Düzen ---------- */
.layout { display: block; }
.sidebar { display: none; }
.content { min-width: 0; }
.chat-rail { display: none; }
main { outline: none; padding: 0 1rem 1.5rem; max-width: 48rem; margin: 0 auto; }

/* ---------- Seçici (mobil) ---------- */
.picker {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0 0.375rem;
}
.chip-row {
  display: flex; gap: 0.75rem;
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 0.125rem 1rem;
  scroll-padding-inline: 1rem;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-row + .chip-row { margin-top: 0.375rem; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 0.4375rem;
  min-height: var(--tap);
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 0.9375rem; font-weight: 650;
  cursor: pointer; white-space: nowrap;
}
.chip-meeting { padding-left: 0.375rem; font-weight: 600; }
/* Ülke filigranı (hipodrom çubukları ve mobil çipler). Tam bayrak değil;
   sağ uçta, eğik kesimli, düşük opaklıkta motif. */
.cc-tr { --wm-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 46'%3E%3Cpath fill='%23c8102e' d='M20 0H88V46H0z'/%3E%3Ccircle cx='50' cy='23' r='12' fill='%23f4f1ea'/%3E%3Ccircle cx='53.2' cy='23' r='9.6' fill='%23c8102e'/%3E%3Cpath fill='%23f4f1ea' d='m67 17.6 1.5 4 4.2.1-3.3 2.6 1.2 4.1-3.6-2.4-3.6 2.4 1.2-4.1-3.3-2.6 4.2-.1z'/%3E%3C/svg%3E"); }
.cc-us { --wm-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 46'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Cpath d='M20 0H88V46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23c)'%3E%3Crect width='88' height='46' fill='%23f4f1ea'/%3E%3Cpath fill='%23b3121f' d='M0 0h88v5H0zM0 10h88v5H0zM0 20h88v5H0zM0 30h88v5H0zM0 40h88v6H0z'/%3E%3Crect width='48' height='25' fill='%231f3a7a'/%3E%3Cg fill='%23f4f1ea'%3E%3Ccircle cx='25' cy='6' r='1.7'/%3E%3Ccircle cx='33' cy='6' r='1.7'/%3E%3Ccircle cx='41' cy='6' r='1.7'/%3E%3Ccircle cx='29' cy='12.5' r='1.7'/%3E%3Ccircle cx='37' cy='12.5' r='1.7'/%3E%3Ccircle cx='21' cy='19' r='1.7'/%3E%3Ccircle cx='29' cy='19' r='1.7'/%3E%3Ccircle cx='37' cy='19' r='1.7'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.chip-meeting { position: relative; isolation: isolate; overflow: hidden; }
.chip-meeting::after {
  content: ""; position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 3.75rem;
  background: var(--wm-img, none) no-repeat right center / auto 100%;
  opacity: var(--wm-opacity); pointer-events: none;
}
.chip-meeting { padding-right: 1.25rem; }

.chip:hover { border-color: var(--border-strong); }
.chip[aria-pressed="true"] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  font-weight: 650;
}
/* Ülke rozeti: ülke renginde dolu, açık yazı (TR 6.7:1, ABD 10.4:1). */
.cbadge {
  display: inline-grid; place-items: center; flex: none;
  min-width: 2.25rem; padding: 0 0.375rem;
  border-radius: 0.3rem;
  background: var(--border-strong); color: var(--badge-ink);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; line-height: 1.45;
}
.cbadge:not(.cb-tr):not(.cb-us) { background: var(--other); }
.cbadge.cb-tr { background: var(--tr); }
.cbadge.cb-us { background: var(--us); box-shadow: inset 0 -2px 0 var(--tr); }
.cbadge.cb-gb, .cbadge.cb-ing { background: #1e3a8a; }
.cbadge.cb-fra, .cbadge.cb-fr { background: #2563eb; }
.cbadge.cb-irl, .cbadge.cb-ie { background: #15803d; }
.cbadge.cb-au, .cbadge.cb-avu { background: #047857; }
.cbadge.cb-cl, .cbadge.cb-sil { background: #c2410c; }
.cbadge.cb-za, .cbadge.cb-gaf { background: #065f46; }
.cbadge.cb-ca, .cbadge.cb-kan { background: #991b1b; }
.cbadge.cb-ae, .cbadge.cb-bae { background: #854d0e; }
.cbadge-sm { min-width: 0; padding: 0 0.3rem; }
.chip-sample {
  font-size: 0.8125rem; font-weight: 500; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: 4px; padding: 0 0.3rem; line-height: 1.35;
}
.chip-time { color: var(--muted); font-weight: 500; }
.chip[aria-pressed="true"] .chip-time { color: var(--accent); }
/* Mobil hipodrom satırı: grup etiketi (bayrak + ad + sayı) ve çipler tek satırda. */
.chip-group {
  flex: none; align-self: center;
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding-left: 0.125rem;
}
.chip-group-label { display: grid; font-size: 0.8125rem; font-weight: 700; line-height: 1.15; color: var(--text); }
.chip-group-sub { font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.chip-divider { flex: none; width: 1px; align-self: stretch; margin: 0.375rem 0.25rem; background: var(--border-strong); }
.flag { width: 1.375rem; height: 0.9625rem; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); }

/* ---------- Koşu başlığı ---------- */
.race-head { padding: 0.5rem 0 0.5rem; }
.race-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem;
  color: var(--muted); font-size: 0.875rem; font-weight: 500;
}
.race-where { display: inline-flex; align-items: center; gap: 0.375rem; }
.race-title {
  margin-top: 0.125rem;
  font-size: 1.25rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em;
}
.race-no { color: var(--accent); font-weight: 650; }
.race-specs {
  display: flex; flex-wrap: wrap; gap: 0 0.375rem;
  margin: 0.125rem 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.4;
}
.race-specs .sep { color: var(--dim); }
.altili {
  display: inline-flex; align-items: center; padding: 0 0.375rem; border-radius: 999px;
  border: 1px solid var(--brand-line); color: var(--brand-strong); background: var(--brand-subtle);
  font-size: 0.8125rem; font-weight: 650; line-height: 1.45; white-space: nowrap;
}
.legend-note { color: var(--dim); font-size: 0.875rem; }
.legend-note summary {
  display: inline-flex; align-items: center; gap: 0.25rem; min-height: var(--tap);
  color: var(--accent); font-weight: 600; cursor: pointer;
}
.legend-note p { margin: 0 0 0.375rem; }
.runner-list > .legend-note:last-child { margin-top: 0.25rem; }

/* ---------- Bölüm seçici (segment) ---------- */
.seg {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.25rem;
  padding: 0.25rem;
  background: var(--raised);
  border-radius: calc(var(--radius-sm) + 0.25rem);
}
.seg-btn {
  min-height: var(--tap);
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
}
.seg-btn[aria-selected="true"], .seg-btn[aria-pressed="true"] {
  background: var(--card); color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 -2px 0 var(--accent-line);
}
.pane { padding-top: 0.625rem; }

/* ---------- Koşucu kartları ---------- */
.runner-list { display: grid; gap: 0.375rem; }
.runner-list .runner:nth-child(even) { background: var(--surface); border-bottom: 1px solid var(--border); }
.list-note { color: var(--dim); font-size: 0.75rem; }
.runner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem 0.625rem 0 0.5rem;
}
.runner-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem; align-items: start;
}
.saddle { display: flex; align-items: stretch; gap: 0.25rem; }
.silk { width: 0.3125rem; border-radius: 2px; background: var(--silk, var(--border-strong)); }
.saddle-no {
  display: grid; place-items: center;
  min-width: 1.75rem; height: 1.875rem;
  border-radius: var(--radius-sm);
  background: var(--raised); color: var(--text);
  font-weight: 700; font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.horse-name {
  font-size: 0.875rem; font-weight: 650; line-height: 1.25;
  letter-spacing: 0.01em;
}
.runner-sub { color: var(--muted); font-size: 0.875rem; margin-top: 0.0625rem; }
.more-form { display: none !important; }
/* Dar ekran: jokey satırı tek satır (uzunsa "…"), Form ayrıntıya iner; ilk ekrana daha çok at sığar */
@media (max-width: 29.99rem) {
  .runner-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .more .stat-form { display: none; }
  .more-form { display: grid !important; }
}
.runner-sub .sep { color: var(--dim); padding: 0 0.25rem; }

.price { text-align: right; min-width: 4rem; }
.price-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--dim); line-height: 1.2; }
.odds-value {
  display: block;
  color: var(--odds);
  font-size: 1.125rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em;
}
/* Oran hareketi: düşen yeşil, yükselen kırmızı zeminli hap. Ok işareti ayrıca
   yanında kalır (yalnızca renkle anlatılmaz). Mürekkep/zemin ≥8:1. */
.odds-value.mv-down, .odds-value.mv-up {
  display: inline-block;
  padding: 0.0625rem 0.25rem; margin-right: -0.25rem;
  border-radius: 0.3125rem;
}
.odds-value.mv-down { background: var(--pos-tint); color: var(--pos-ink); }
.odds-value.mv-up { background: var(--neg-tint); color: var(--neg-ink); }
.trend {
  display: inline-flex; align-items: baseline; gap: 0.2rem;
  font-size: 0.8125rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.trend.down { color: var(--pos); }
.trend.up { color: var(--neg); }
.trend.same { color: var(--dim); }
.trend-sym { font-size: 0.75rem; }

.price-foreign { display: block; margin-top: 0.125rem; font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.price-foreign b { color: var(--odds); font-weight: 650; }

.runner-stats {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.75rem;
  min-height: 2.75rem;
  margin-top: 0.125rem; padding: 0;
  border-top: 1px solid var(--border);
}
.stat { display: inline-flex; align-items: baseline; gap: 0.375rem; }
.stat .k { font-size: 0.8125rem; color: var(--dim); font-weight: 500; }
.stat .v { font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat .rank { color: var(--muted); font-weight: 500; }
.form { display: inline-flex; gap: 0.3rem; font-size: 0.8125rem; }
.form .f1 { color: var(--pos); font-weight: 700; }

.more summary { cursor: pointer; list-style: none;  min-height: 2.75rem; display: flex; align-items: center; }
.more summary::-webkit-details-marker { display: none; }
.more-hint {
  margin-left: auto; display: inline-grid; place-items: center;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  color: var(--muted); background: var(--raised);
}
.more-hint .icon { width: 1rem; height: 1rem; transition: transform 120ms ease; }
.more[open] .more-hint .icon { transform: rotate(180deg); }
.more summary:hover .more-hint { color: var(--text); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.more-list { display: grid; gap: 0.25rem; padding: 0 0 0.75rem; }
.more-list div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.5rem; }
.more-list dt { color: var(--dim); font-size: 0.875rem; }
.more-list dd { font-size: 0.9375rem; }

/* ---------- Tablo (geniş ekran) ---------- */
.table-wrap { display: none; }
.runners-table { width: 100%; border-collapse: collapse; }
.runners-table caption { text-align: left; }
.runners-table th {
  text-align: left; font-size: 0.8125rem; font-weight: 600; color: var(--dim);
  padding: 0.5rem 0.625rem; border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.runners-table td {
  padding: 0.375rem 0.625rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle; font-size: 0.875rem;
}
.runners-table tbody tr { border-bottom: 1px solid var(--border); }
.runners-table tbody tr:nth-child(even) { background: var(--surface); }
.runners-table tbody tr:hover { background: var(--raised); }
.runners-table .r { text-align: right; }
.runners-table .odds-value { font-size: 1rem; display: inline-block; } /* 16 px (önce 20 px) */
.runners-table .odds-value.mv-down, .runners-table .odds-value.mv-up { margin-right: 0; }
.runners-table .cell-sub { color: var(--muted); font-size: 0.875rem; }
.runners-table .saddle-no { height: 2rem; }

/* ---------- Bloklar, yorumlar ---------- */
.block { margin-top: 1.25rem; }
.block-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.625rem; }
.block-note { color: var(--dim); font-size: 0.875rem; margin: -0.375rem 0 0.75rem; }
.comment-list { display: grid; gap: 0.625rem; }
.comment {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem 0.875rem;
}
.comment-head { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.5rem; }
.avatar {
  display: grid; place-items: center; flex: none;
  width: 2.25rem; height: 2.75rem; border-radius: 50%;
  background: var(--raised); color: var(--text);
  font-weight: 700; font-size: 0.9375rem;
}
.comment-author { font-weight: 650; font-size: 0.9375rem; line-height: 1.25; }
.comment-role { color: var(--dim); font-size: 0.8125rem; }
.ai-tag {
  display: inline-block; margin-left: 0.375rem;
  font-size: 0.8125rem; font-weight: 600; color: var(--accent);
  border: 1px solid var(--accent-line); border-radius: 4px;
  padding: 0 0.35rem; line-height: 1.4; vertical-align: 0.1em;
}
.comment-time { margin-left: auto; color: var(--dim); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.comment-text { font-size: 0.9375rem; line-height: 1.55; color: var(--text); max-width: 65ch; }
.comment-text .comment-p { margin: 0 0 0.5rem; line-height: 1.6; }
.comment-text .comment-p:last-child { margin-bottom: 0; }
.comment-text .comment-h3 { font-size: 1.05rem; font-weight: 700; margin: 0.75rem 0 0.25rem; color: var(--text); }
.comment-text .comment-h4 { font-size: 0.95rem; font-weight: 700; margin: 0.5rem 0 0.25rem; color: var(--accent); }
.comment-text .comment-quote { border-left: 3px solid var(--accent); margin: 0.5rem 0; padding: 0.375rem 0.75rem; background: var(--raised); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; }
.comment-text .comment-figure { margin: 0.625rem 0; }
.comment-text .comment-img { max-width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.comment-text .comment-caption { font-size: 0.8125rem; color: var(--muted); margin-top: 0.25rem; }
.comment-text .comment-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.comment-text .comment-list-ul, .comment-text .comment-list-ol { margin: 0.375rem 0 0.625rem 1.25rem; padding: 0; line-height: 1.5; }
.comment-text .comment-list-ul li, .comment-text .comment-list-ol li { margin-bottom: 0.25rem; }
.comment-kind { color: var(--dim); font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.25rem; }
.empty { color: var(--muted); padding: 1rem 0; }

/* ---------- Oranlar sekmesi ---------- */
.odds-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.summary-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.625rem 0.875rem;
}
.summary-item dt { color: var(--dim); font-size: 0.8125rem; }
.summary-item dd { font-weight: 650; font-size: 0.9375rem; }
.odds-rows { display: grid; gap: 0.375rem; }
.odds-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.625rem 0.875rem 0.625rem 0.75rem;
}
.odds-row .horse-name { font-size: 1rem; }
.agf-bar { margin-top: 0.375rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--dim); }
.agf-track { flex: 1; height: 0.375rem; border-radius: 3px; background: var(--raised); overflow: hidden; max-width: 12rem; }
.agf-fill { display: block; height: 100%; background: var(--bar); border-radius: 3px; }
.agf-bar .num { color: var(--muted); font-weight: 600; }
.legend {
  display: flex; flex-wrap: wrap; gap: 0.25rem 1rem;
  margin: 0.75rem 0 0; color: var(--dim); font-size: 0.8125rem;
}

/* ---------- Yayın ---------- */
.stream-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.stream-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0e1116; display: grid; place-items: center; }
.stream-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stream-start {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid #f1f3f5; background: rgba(14, 17, 22, 0.6); color: #f1f3f5;
  font: inherit; font-size: 1rem; font-weight: 650; cursor: pointer;
}
.stream-meta { padding: 0.75rem 1rem 1rem; }
.stream-meta p { color: var(--muted); font-size: 0.9375rem; }
.stream-meta .stream-title { color: var(--text); font-weight: 650; margin-bottom: 0.25rem; }
.stream-links { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.stream-link {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 3.25rem; padding: 0.5rem 0.875rem;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.stream-link:hover { border-color: var(--accent-line); }
.sl-main { display: grid; gap: 0.0625rem; min-width: 0; flex: 1; }
.sl-label { font-weight: 650; font-size: 1rem; }
.sl-meta { color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }
.sl-icon { flex: none; color: var(--muted); }
@media (min-width: 40rem) {
  .stream-links { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
}

/* ---------- Yorumlar görünümü ---------- */
.view-head { padding: 1rem 0 0.75rem; }
.view-title { font-size: 1.25rem; font-weight: 700; }
.view-sub { color: var(--dim); font-size: 0.9375rem; margin-top: 0.125rem; }
.race-block {
  border-top: 1px solid var(--border);
  padding: 1rem 0 1.25rem;
}
.race-block:first-of-type { border-top: 0; padding-top: 0.25rem; }
.race-block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin-bottom: 0.625rem; }
.race-block-title { font-size: 1.0625rem; font-weight: 700; }
.race-block-meta { color: var(--dim); font-size: 0.875rem; }
.pick-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.625rem;
  font-size: 0.9375rem; color: var(--muted); margin-bottom: 0.625rem;
}
.pick-line strong { color: var(--text); font-weight: 650; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0 1rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text);
  font-weight: 600; font-size: 0.9375rem;
  cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--accent-line); }
.btn .icon { width: 1.125rem; height: 1.125rem; }
.btn-row { margin-top: 0.75rem; }

/* ---------- 6'lı ---------- */
.ganyan-controls { display: grid; gap: 0.5rem; margin-bottom: 0.75rem; }
.seg.seg-auto { grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); }
.slip {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem;
}
.slip-title { font-weight: 700; font-size: 1.0625rem; }
.slip-badge { color: var(--accent); font-size: 0.875rem; font-weight: 600; }
.slip-notes { color: var(--muted); font-size: 0.9375rem; margin-top: 0.375rem; }
.slip-legs {
  margin-top: 0.75rem; padding: 0.625rem 0.75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 650; font-size: 1.0625rem; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.slip-legs .slash { color: var(--dim); padding: 0 0.3rem; font-weight: 400; }
.slip-calc { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.slip-calc dt { color: var(--dim); font-size: 0.8125rem; }
.slip-calc dd { font-weight: 700; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.slip-calc .total dd { color: var(--odds); font-size: 1.25rem; }
.slip-actions { margin-top: 0.875rem; }
.legs { display: grid; gap: 0.625rem; margin-top: 1rem; }
.leg {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
}
.leg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.625rem; margin-bottom: 0.375rem; }
.leg-no { font-weight: 700; font-size: 0.875rem; color: var(--muted); min-width: 4.5rem; }
.leg-race { color: var(--dim); font-size: 0.875rem; }
.leg-link { margin-left: auto; min-height: var(--tap); display: inline-flex; align-items: center; gap: 0.25rem; color: var(--accent); font-weight: 600; font-size: 0.875rem; background: none; border: 0; cursor: pointer; padding: 0 0.25rem; }
.leg-horse {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 0.625rem;
  padding: 0.5rem 0; border-top: 1px solid var(--border);
}
.leg-horse:first-of-type { border-top: 0; }
.leg-horse .saddle-no { min-width: 2rem; height: 2rem; font-size: 0.9375rem; }
.leg-horse .horse-name { font-size: 0.9375rem; }
.leg-horse .runner-sub { font-size: 0.875rem; }
.role {
  font-size: 0.8125rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 0.125rem 0.5rem; white-space: nowrap;
}
.role-banko { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- Sanal Kupon ve Hazır Kuponlar ---------- */
.sanal-kupon {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sanal-kupon.is-pinned {
  border: 1.5px solid var(--accent);
  background: var(--card);
  box-shadow: 0 2px 10px rgba(91, 54, 163, 0.12);
  position: relative;
}

.kupon-badge-editor {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-subtle);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.8125rem;
  line-height: 1.25;
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
}

.kupon-head {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.kupon-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}

.kupon-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  color: var(--dim);
}

.kupon-meta .kupon-author {
  font-weight: 600;
  color: var(--muted);
}

.kupon-meta .kupon-date {
  color: var(--dim);
}

.kupon-meta .kupon-info {
  color: var(--accent);
  font-weight: 600;
}

.kupon-legs {
  display: grid;
  gap: 0.5rem;
}

.kupon-leg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.leg-horses {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.k-horse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.875rem;
  height: 1.875rem;
  padding: 0 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-sizing: border-box;
}

.k-horse.banko {
  background: var(--pos-tint, rgba(95, 207, 154, 0.2));
  color: var(--pos, #5fcf9a);
  border: 1px solid var(--pos);
  box-shadow: 0 0 0 1px var(--pos, #5fcf9a);
}

.kupon-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

.kupon-footer .kupon-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.875rem;
}

.kupon-footer .kupon-tutar {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--odds);
}

.kuponlar-sections {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}

.kuponlar-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Kupon Durum Rozetleri (TUTTU, KAYBETTİ, BEKLİYOR) */
.kupon-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  line-height: 1.25;
}
.kupon-status.tuttu {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.kupon-status.kaybetti {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.kupon-status.bekliyor {
  background: var(--brand-subtle);
  color: var(--brand-strong);
  border: 1px solid var(--brand-line);
}

/* Koşu Detayı Hazır Kupon Paneli (#pane-kupon) */
#pane-kupon {
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.race-kupon-head {
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.race-kupon-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}
.race-kupon-sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.race-kupon-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.race-kupon-section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
.race-kupon-analysis {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.race-kupon-analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.race-kupon-analysis-author {
  font-weight: 700;
  color: var(--brand-strong);
  font-size: 0.9375rem;
}
.race-kupon-analysis-text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  margin: 0;
}
.race-kupon-box {
  background: var(--card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kuponlar-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.kuponlar-section-sub {
  font-size: 0.875rem;
  color: var(--dim);
  margin: -0.375rem 0 0;
}

.kuponlar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 48rem) {
  .kuponlar-grid {
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  }
}

/* ---------- Alt sekme çubuğu ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem;
  min-height: var(--tabbar-h);
  border: 0; background: none; color: var(--dim);
  font-size: 0.8125rem; font-weight: 600; line-height: 1.2; text-align: center;
  cursor: pointer;
}
.tabbar-btn[aria-current="page"] { color: var(--accent); }
.tabbar-btn[aria-current="page"] .icon { stroke-width: 2.4; }


.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--ticker-h) + env(safe-area-inset-bottom) + 0.75rem);
  z-index: 40;
  max-width: calc(100vw - 2rem);
  background: var(--text); color: var(--bg);
  padding: 0.625rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.9375rem; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity 150ms ease;
}
.toast.show { opacity: 1; }

/* ---------- Düşen Oranlar ---------- */
.sample-note {
  margin-top: 0.5rem; padding: 0.375rem 0.625rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  color: var(--muted); font-size: 0.8125rem;
}
.drop-group { margin-top: 0.875rem; }
.dg-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem;
  margin: 0 0 0.375rem; font-size: 1rem; font-weight: 700; line-height: 1.35;
}
.dg-where { display: inline-flex; align-items: center; gap: 0.375rem; min-width: 0; }
.dg-name { overflow-wrap: anywhere; }
.dg-race { color: var(--accent); font-weight: 650; white-space: nowrap; }
.pool-note {
  margin: 0 0 0.375rem; padding: 0.5rem 0.75rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--muted); font-size: 0.875rem;
}
.pool-src { color: var(--dim); }
.drop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; }
.drop-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.625rem;
  width: 100%; min-height: 3.5rem; padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  text-align: left; cursor: pointer;
}
.drop-row:hover { border-color: var(--border-strong); }
.drop-main { display: grid; min-width: 0; gap: 0.0625rem; }
.drop-main .horse-name { overflow-wrap: anywhere; }
.drop-src { color: var(--muted); font-size: 0.8125rem; line-height: 1.3; }
.drop-price { display: grid; justify-items: end; gap: 0.125rem; }
.drop-price .odds-value { font-size: 1.0625rem; margin-right: 0; } /* 17 px (önce 22 px) */
.chg { display: inline-flex; align-items: baseline; gap: 0.25rem; white-space: nowrap; }
.chg-from { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.chg-arrow { color: var(--dim); font-size: 0.875rem; }
.chg-card { justify-content: flex-end; }
.chg-card .odds-value { margin-right: 0; }
.chg-card .trend { font-size: 0.8125rem; }
.runners-table .chg { justify-content: flex-end; }
.ekuri {
  display: inline-block; padding: 0 0.3rem; border: 1px solid var(--border-strong); border-radius: 4px;
  color: var(--muted); font-size: 0.8125rem; font-weight: 600; line-height: 1.35;
}
.howto { margin-top: 0.5rem; color: var(--muted); font-size: 0.875rem; }
.howto summary {
  display: inline-flex; align-items: center; min-height: var(--tap);
  color: var(--accent); font-weight: 650; cursor: pointer;
}
.howto ul { margin: 0 0 0.25rem; padding-left: 1.125rem; display: grid; gap: 0.25rem; }
.loading { display: grid; gap: 0.5rem; padding: 0.75rem 0; }
.loading-text { color: var(--muted); font-size: 0.9375rem; }
.skel { height: 3.75rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); } /* durağan: sonsuz animasyon yalnız şeritlerde */
.load-error-inline { color: var(--neg); font-weight: 650; }
.load-error {
  margin: 0.75rem 0; padding: 0.625rem 0.875rem;
  border: 1px solid var(--neg); border-radius: var(--radius-sm);
  color: var(--text); background: var(--neg-tint); font-size: 0.9375rem;
}

/* ---------- Akan şeritler ----------
   Tek sonsuz animasyon türü; transform ile (GPU). Üzerine gelince, odakta,
   dokununca ve sekme gizliyken durur. Hareket azaltma tercihinde durur ve
   elle kaydırılabilir bir listeye döner. */
.ticker {
  display: flex; align-items: stretch;
  height: var(--ticker-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  overflow: hidden;
}
.ticker[hidden] { display: none !important; }
.ticker-top {
  position: sticky;
  top: var(--topbar-h);
  z-index: 24;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ticker-bottom {
  position: fixed; left: 0; right: 0; z-index: 29;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); border-bottom: 0;
}
.ticker-label {
  flex: none; display: flex; align-items: center; gap: 0.375rem;
  padding: 0 0.625rem 0 max(0.75rem, env(safe-area-inset-left));
  color: var(--brand-strong); font-weight: 700;
  border-right: 1px solid var(--border);
  background: var(--surface);
}
.ticker-label .icon { width: 1rem; height: 1rem; }
.ticker-viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.ticker-track {
  display: flex; width: max-content; height: 100%;
  animation: tk-scroll var(--tk-dur, 60s) linear infinite;
  will-change: transform;
}
.ticker-track[data-dir="ltr"] { animation-direction: reverse; }
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track,
.ticker.is-paused .ticker-track,
.is-hidden .ticker-track { animation-play-state: paused; }
@keyframes tk-scroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
.ticker-list { display: flex; margin: 0; padding: 0; list-style: none; }
.ticker-list li { display: flex; flex-shrink: 0; }
.tick {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: var(--ticker-h); padding: 0 1.25rem;
  border: 0; border-right: 1px solid var(--border); background: none;
  color: var(--text); font-size: 0.85rem; white-space: nowrap; cursor: pointer;
  flex-shrink: 0;
}
.tick:hover { background: var(--raised); }
.tick-author { font-weight: 700; color: var(--brand-strong); }
.tick-ai {
  font-size: 0.8125rem; font-weight: 600; color: var(--brand-strong);
  border: 1px solid var(--brand-line); border-radius: 4px; padding: 0 0.3rem; line-height: 1.35;
}
.tick-text { color: var(--text); font-weight: 500; }
.tick-ref, .tick-race { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; }
.tick-ref { color: var(--muted); }
.tick-cd { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--brand-strong); font-weight: 700; }
.tick-cd .tnum { display: inline-block; min-width: 4.5em; }
.icon-sm { width: 0.875rem; height: 0.875rem; }
.tick-drop { display: inline-flex; align-items: center; gap: 0.3rem; }
.tick-drop-name { font-weight: 600; }
.odds-value.odds-sm { display: inline-block; font-size: 0.9375rem; margin-right: 0; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; transform: none; }
  .ticker-viewport { overflow-x: auto; scrollbar-width: none; }
  .ticker-viewport::-webkit-scrollbar { display: none; }
  .ticker-clone { display: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 40rem) {
  main { padding: 0 1.5rem 2rem; }
  .chip-row { padding: 0.125rem 1.5rem; scroll-padding-inline: 1.5rem; }
  .race-title { font-size: 1.5rem; }
}

/* ---------- Masaüstü ---------- */
@media (min-width: 64rem) {
  body { padding-bottom: var(--ticker-h); }
  .tabbar { display: none; }
  .ticker-bottom { bottom: 0; }
  .toast { bottom: calc(var(--ticker-h) + 0.75rem); }
  .topbar { position: sticky; top: 0; z-index: 25; padding-left: 1.5rem; padding-right: 1.5rem; }
  .layout {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    width: 100%;
    max-width: 96rem;
    margin: 0 auto;
  }
  .sidebar {
    display: block !important;
    border-right: 1px solid var(--border);
    position: sticky;
    top: calc(var(--topbar-h) + var(--ticker-h));
    height: calc(100vh - var(--topbar-h) - var(--ticker-h) - var(--ticker-h));
    overflow-y: auto;
    background: var(--bg);
  }
  .sidebar-inner {
    padding: 0.75rem 0.625rem calc(1.5rem + var(--ticker-h));
  }

  /* Sol Menü Ülke Filtre Butonları (🏁 Tümü, 🇹🇷 Türkiye, 🌍 Yurt Dışı) */
  .side-country-filters {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.35rem;
    padding-bottom: 0.625rem;
    margin-bottom: 0.625rem;
    border-bottom: 1px solid var(--border);
  }
  .side-country-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .side-country-btn .flag-icon {
    font-size: 1.15rem;
    line-height: 1;
  }
  .side-country-btn:hover {
    background: var(--raised);
    color: var(--text);
    border-color: var(--border-strong);
  }
  .side-country-btn.is-active {
    background: var(--brand-subtle);
    color: var(--brand-strong);
    border-color: var(--brand-line);
    font-weight: 750;
  }

  /* Yurt Dışı Ülke Filtreleri (Tüm YD, 🇦🇺 Avustralya, 🇮🇪 İrlanda, 🇫🇷 Fransa, 🇺🇸 ABD, 🇨🇱 Şili vb.) */
  .side-sub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-bottom: 0.625rem;
    margin-bottom: 0.625rem;
    border-bottom: 1px dashed var(--border);
  }
  .side-sub-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
  }
  .side-sub-btn .sub-count {
    font-size: 0.6875rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
  }
  .side-sub-btn:hover:not(:disabled) {
    background: var(--raised);
    color: var(--text);
    border-color: var(--border-strong);
  }
  .side-sub-btn.is-active {
    background: var(--brand-subtle);
    color: var(--brand-strong);
    border-color: var(--brand-line);
    font-weight: 750;
  }
  .side-sub-btn.is-active .sub-count {
    color: var(--brand-strong);
    font-weight: 750;
  }
  .side-sub-btn:disabled,
  .side-sub-btn.is-empty {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--bg);
  }
  .reg-flag {
    font-size: 0.9375rem;
    line-height: 1;
    display: inline-block;
  }

  /* Ülke Grupları */
  .side-group { padding: 0.25rem 0 0.5rem; }
  .side-group + .side-group { border-top: 1px solid var(--border); padding-top: 0.5rem; }
  .side-group-head {
    margin: 0;
    padding: 0;
  }
  .side-group-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.35rem 0.5rem;
    margin: 0 0 0.25rem;
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 750;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .side-group-btn:hover {
    background: var(--raised);
    color: var(--text);
  }
  .side-group-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .side-group-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
  }
  .side-group-count {
    color: var(--muted);
    font-weight: 600;
  }
  .side-group-chevron {
    font-size: 0.7rem;
    color: var(--muted);
    transition: transform 0.2s ease;
    user-select: none;
    display: inline-block;
  }
  .side-group:not(.is-closed) .side-group-chevron {
    transform: rotate(180deg);
  }
  .side-group.is-closed .side-group-body {
    display: none;
  }

  /* Hipodrom Akordeon Kartı */
  .side-meeting {
    margin: 0 0 0.375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    overflow: hidden;
    transition: border-color 0.15s ease;
  }
  .side-meeting:hover {
    border-color: var(--border-strong);
  }
  .side-meeting.is-active,
  .side-meeting[aria-current="true"] {
    border-color: var(--brand-line);
    box-shadow: inset 3px 0 0 var(--brand-line);
  }

  /* Hipodrom Başlık Butonu */
  .side-meeting-btn {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.35rem 0.625rem;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
  }
  .side-meeting-btn:hover {
    background: var(--raised);
  }
  .side-city {
    font-size: 0.9375rem;
    font-weight: 750;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .side-meeting-btn .count {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
  }
  .side-chevron {
    font-size: 0.75rem;
    color: var(--muted);
    transition: transform 0.2s ease;
    user-select: none;
    display: inline-block;
  }
  .side-meeting.is-open .side-chevron {
    transform: rotate(180deg);
  }

  /* Koşular (Akordeon açıldığında gösterilir) */
  .side-races {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0.35rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
  }
  .side-meeting:not(.is-open) .side-races {
    display: none;
  }
  .side-race-btn {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.25rem;
    padding: 0.2rem 0.5rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    text-align: left;
    color: var(--muted);
    font-size: 0.8125rem;
    cursor: pointer;
  }
  .side-race-btn:hover {
    background: var(--raised);
    color: var(--text);
  }
  .side-race-btn.is-active,
  .side-race-btn[aria-current="true"] {
    background: var(--brand-subtle);
    color: var(--brand-strong);
    font-weight: 750;
    box-shadow: inset 3px 0 0 var(--brand-line);
  }
  .side-race-btn .n {
    font-weight: 750;
    color: var(--text);
    white-space: nowrap;
  }
  .side-race-btn .nm {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .side-race-btn .ts {
    display: grid;
    justify-items: end;
    gap: 0.1rem;
  }

  /* Masaüstü Üst Menü Gezinme */
  .topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 1.25rem;
  }
  .topbar-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
  }
  .topbar-nav-btn .icon {
    width: 1.1rem;
    height: 1.1rem;
  }
  .topbar-nav-btn:hover {
    background: var(--raised);
    color: var(--text);
  }
  .topbar-nav-btn.is-active,
  .topbar-nav-btn[aria-current="page"] {
    background: var(--brand-alpha);
    color: var(--brand-strong);
    border-color: rgba(220, 38, 38, 0.25);
    font-weight: 750;
  }

  /* Masaüstünde sol menü aktif olduğu için üst seçici gizlenir */
  .picker {
    display: none;
  }

  main {
    max-width: 96rem;
    width: 100%;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .race-head { padding-top: 1.125rem; }
  .seg { max-width: 30rem; }
  .comment-list { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
  .legs { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
  .ganyan-controls { grid-template-columns: 1fr 1fr; }
}

/* Tablo, içerik alanı yeterince genişse gösterilir. Container query rem'e
   göre çalıştığı için telefonda/tarayıcıda yazı büyütülünce kartlara döner. */
#pane-runners { container-type: inline-size; }
@container (min-width: 60rem) {
  .runner-list { display: none; }
  .table-wrap {
    display: block;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow-x: auto;
  }
}

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

/* ---------- Veri kaynağı (TJK) ---------- */
.data-source {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.375rem;
  margin: 0.625rem 0 0; color: var(--muted); font-size: 0.8125rem; font-weight: 500;
}
.data-source time { color: var(--text); font-weight: 600; }
.src-extra { color: var(--dim); }
.src-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--pos); flex: none; }
.src-dot.is-stale { background: var(--neg); }
.badge-stale {
  display: inline-block; padding: 0 0.375rem; border-radius: 4px; line-height: 1.5;
  background: var(--neg-tint); color: var(--neg-ink); font-weight: 600; font-size: 0.8125rem;
}
.odds-value.odds-none { color: var(--muted); font-weight: 600; } /* "—" ve "Koşmaz": ≥7:1 */
.price-none { display: block; font-size: 0.8125rem; color: var(--dim); white-space: nowrap; }
.tag-scratched {
  display: inline-block; margin-left: 0.25rem; padding: 0 0.3rem; border-radius: 4px; vertical-align: 0.1em;
  border: 1px solid var(--border-strong); color: var(--muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0;
}

/* ---------- Düşen Oranlar: kaynak süzgeci ---------- */
.seg-filter { margin-top: 0.625rem; max-width: 26rem; }
.price-foreign .odds-value.odds-sm { margin-left: 0.125rem; }
.price-foreign .trend { margin-left: 0.125rem; font-size: 0.8125rem; }

/* ---------- Veri tazeliği (üst bar) ----------
   Durum hem renk hem metinle verilir (Canlı / Gecikmeli / Durdu / Beklemede).
   Nokta sabittir (animasyon yok); yalnız metin saniyede bir güncellenir. */
:root {
  --warn-ink: #5c3d00;
  --warn-tint: #fbe7b5;
  --idle-ink: var(--muted);
  --idle-tint: var(--raised);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --warn-ink: #ffd98a; --warn-tint: #3d3113; }
}
:root[data-theme="dark"] { --warn-ink: #ffd98a; --warn-tint: #3d3113; }

/* Tek tazelik satırı: üst barda, marka ile aynı sırada. Dokunma hedefi 44 px. Mobilde yalnız durum
   hapı; saat ve kaynak ayrıntısı panelde. Geniş ekranda "Son güncelleme ..." de görünür. */
.fresh { position: relative; min-width: 0; flex: 0 1 auto; }
.fresh-btn {
  display: flex; align-items: center; gap: 0.375rem;
  min-height: var(--tap); min-width: var(--tap); padding: 0 0.25rem;
  border: 0; background: none; color: var(--muted); text-align: left;
  font: inherit; font-size: 0.8125rem; font-weight: 500; cursor: pointer;
}
.fresh-text { font-variant-numeric: tabular-nums; display: none; }
.fresh-pill { font-size: 0.8125rem; padding: 0.125rem 0.5rem; }
@media (max-width: 29.99rem) {
  .sports.is-single { display: none; }
  .fresh { margin-left: auto; }
  .fresh[hidden] + .text-size-btn { margin-left: auto; }
}
@media (min-width: 30rem) {
  .fresh-text { display: inline; }
}
.fresh-pill, .src-pill {
  display: inline-flex; align-items: center; gap: 0.3125rem;
  padding: 0 0.4375rem; border-radius: 999px; line-height: 1.5;
  font-size: 0.8125rem; font-weight: 650; white-space: nowrap;
}
.fresh-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; flex: none; }
.st-canli { background: var(--pos-tint); color: var(--pos-ink); }
.st-gecikmeli { background: var(--warn-tint); color: var(--warn-ink); }
.st-durdu { background: var(--neg-tint); color: var(--neg-ink); }
.st-beklemede, .st-bekleniyor { background: var(--idle-tint); color: var(--idle-ink); }
.race-note { margin-top: 0.25rem; color: var(--muted); font-size: 0.875rem; }
.fresh-panel {
  position: absolute; z-index: 40; top: calc(100% + 0.25rem); right: 0;
  min-width: min(22rem, calc(100vw - 2rem)); padding: 0.625rem 0.75rem;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  font-size: 0.8125rem;
}
.fresh-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.fresh-panel li { display: grid; grid-template-columns: 1fr auto; gap: 0.125rem 0.75rem; align-items: center; }
.fresh-panel .src-name { font-weight: 650; }
.fresh-panel .src-meta { grid-column: 1 / -1; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (hover: hover) {
  .fresh:hover .fresh-panel[hidden] { display: block; }
}

.race-fresh {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem;
  margin-top: 0.375rem; color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums;
}
.topbar { flex-wrap: wrap; row-gap: 0; }

/* ---------- Koşu durumu etiketi ----------
   Başlamadı · Koşuyor · Sonuç bekleniyor · Koşu bitti. Metin + renk (yalnız renk değil);
   12 px, mevcut düğmelerin içinde (ayrı dokunma hedefi değil). Mürekkep/zemin ≥7:1. */
.rs {
  display: inline-flex; align-items: center; gap: 0.25rem; flex: none;
  padding: 0 0.375rem; border: 1px solid transparent; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 650; line-height: 1.45; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.rs-dot { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: currentColor; flex: none; }
.rs-hazirlik { background: var(--raised); color: var(--muted); border-color: var(--border); }
.rs-hazirlik .rs-dot { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.rs-kosuyor { background: var(--warn-tint); color: var(--warn-ink); }
.rs-sonuc_bekleniyor { background: var(--raised); color: var(--warn-ink); border-color: var(--warn-ink); border-style: dashed; }
.rs-sonuc_bekleniyor .rs-dot { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.rs-bitti { background: var(--text); color: var(--card); }
.rs-bitti .rs-dot { border-radius: 1px; }
.race-kicker .rs { margin-left: 0.125rem; }
.chip-race { gap: 0.375rem; }

/* ---------- Büyük yazı (A+ %112 / %125), dar ekran ----------
   Marka yazısı yerine yalnız logo (üst bar tek satırda kalsın); koşucu kartında oran bloğu
   adın altına iner, ad ve jokey tam genişlikte okunur. */
@media (max-width: 29.99rem) {
  :root[data-scale="125"] .brand-name { display: none; }
  :root[data-scale] .runner-main { grid-template-columns: auto minmax(0, 1fr); row-gap: 0.25rem; }
  :root[data-scale] .runner-main .price {
    grid-column: 2; text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem;
  }
  :root[data-scale] .runner-main .price .price-label { flex-basis: 100%; }
  :root[data-scale] .runner-main .chg-card { justify-content: flex-start; }
  :root[data-scale] .odds-row { grid-template-columns: auto minmax(0, 1fr); }
  :root[data-scale] .odds-row .price { grid-column: 2; text-align: left; }
  :root[data-scale] .drop-row { grid-template-columns: auto minmax(0, 1fr); }
  :root[data-scale] .drop-row .drop-price { grid-column: 2; justify-items: start; }
}

/* ---------- ABD sabah oranı ----------
   Havuzlar açılmadan önceki Equibase değeri (morning line): etiket soluk ve eğik, sayı hapsız.
   Sayının rengi --odds kalır (kontrast ≥7). Dar sütunda etiket alt satıra kayabilir. */
.price-foreign.is-muted { white-space: normal; }
.price-foreign.is-muted .abd-lbl { font-style: italic; color: var(--dim); }
.price-foreign.is-muted .odds-value { font-weight: 550; }
.abd-late { font-size: 0.8125rem; font-weight: 600; color: var(--warn-ink); }

/* ---------- Tazelik paneli, dar ekran ----------
   Pil sağ kenarda değil; right:0 + min-width ile panel ekranın soluna taşıyordu.
   Mobilde ekrana sabitlenir: iki yanda 1rem boşluk. */
@media (max-width: 47.99rem) {
  .fresh-panel {
    position: fixed; left: 1rem; right: 1rem; top: calc(var(--topbar-h) + 0.25rem);
    min-width: 0; max-width: none;
  }
}

/* ---------- A+ bildirimi ----------
   Kartların üstüne binmesin: alt şeridin (yaklaşan koşular) üstüne oturur. */
.toast { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 0.0625rem); padding-block: 0.5rem; }
@media (min-width: 64rem) {
  .toast { bottom: 0.25rem; }
}

/* ---------- A+ %125, dar ekran: kartları sıkılaştır ----------
   ≥2 at ilk ekrana sığsın: iç boşluklar azalır, Handikap gizlenir (tabloda durur),
   istatistik satırı 44 px'lik dokunma hedefi olarak kalır. */
@media (max-width: 29.99rem) {
  :root[data-scale="125"] .runner { padding-top: 0.375rem; }
  :root[data-scale="125"] .runner-main { gap: 0.125rem 0.5rem; }
  :root[data-scale="125"] .runner-sub { margin-top: 0; }
  :root[data-scale="125"] .runner-stats { margin-top: 0.125rem; gap: 0 0.75rem; }
  :root[data-scale="125"] .runner-stats .stat:nth-child(2) { display: none; }
  :root[data-scale="125"] .runner-list { gap: 0.375rem; }
  /* Oran etiketi oranla aynı satırda ("TJK ganyan 26.90 → 19.15 ▼"); bir satır kazanılır */
  :root[data-scale="125"] .runner-main .price .price-label { flex-basis: auto; display: inline; }
  :root[data-scale="125"] .race-specs { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  :root[data-scale="125"] .race-specs .sep { padding: 0 0.375rem; }
  /* Dokunma hedefi 44 px'te sabit kalır (rem ile %125 büyüyüp 55 px olmaz); yazı yine büyük */
  :root[data-scale="125"] { --tap: 44px; }
}

/* ---------- Düşen Oranlar: AGF ayrı bölüm, pencere notu, 4'lü süzgeç ---------- */
.seg-filter { grid-template-columns: repeat(4, 1fr); max-width: 32rem; }
.seg-filter .seg-btn { padding: 0 0.25rem; font-size: 0.8125rem; }
.drop-section + .drop-section { margin-top: 1.5rem; }
.drop-section-title { margin: 0.75rem 0 0; font-size: 1.0625rem; font-weight: 700; }
.drop-section-sub { color: var(--dim); font-size: 0.8125rem; font-weight: 500; margin-left: 0.25rem; }
.window-note {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0.5rem 0 0; padding: 0.5rem 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--muted); font-size: 0.9375rem;
}
.window-note strong { color: var(--text); }
.chg-tick .odds-value { font-size: 0.9375rem; }
.chg-tick .chg-from { font-size: 0.8125rem; }
.comments-none { margin-top: 0.5rem; }

/* ---------- Çerez bilgilendirme şeridi (cerez.js) ----------
   Uygulama sayfasında sekme çubuğu ve alt şeridin üstünde durur; hukuk sayfalarında ekranın altında. */
.cerez-bar {
  position: fixed; z-index: 45;
  left: max(0.75rem, env(safe-area-inset-left)); right: max(0.75rem, env(safe-area-inset-right));
  bottom: calc(env(safe-area-inset-bottom) + 0.75rem);
  max-width: 40rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  padding: 0.75rem 0.875rem;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 0.5rem 1.5rem rgba(10, 12, 16, 0.25);
}
.cerez-bar-app { bottom: calc(var(--tabbar-h) + var(--ticker-h) + env(safe-area-inset-bottom) + 0.5rem); }
.cerez-text { flex: 1 1 16rem; margin: 0; font-size: 0.875rem; line-height: 1.45; color: var(--muted); }
.cerez-text a { color: var(--brand); font-weight: 600; }
.cerez-ok {
  min-height: var(--tap); min-width: 5.5rem; padding: 0 1.125rem;
  border: 1px solid var(--brand-strong); border-radius: var(--radius-sm);
  background: var(--brand-strong); color: var(--card);
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
}
@media (min-width: 64rem) {
  .cerez-bar-app { bottom: calc(var(--ticker-h) + 0.75rem); }
}


/* ---------- 18+ Yaş Doğrulama ve Sorumluluk Reddi (Disclaimer) Dialog ---------- */
.age-dlg {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  padding: 0;
  max-width: 36rem;
  width: calc(100% - 2rem);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.age-dlg::backdrop {
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.age-dlg-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.age-dlg-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.875rem;
}
.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.25rem 0.625rem;
  background: var(--brand-subtle);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand-strong);
}
.age-badge-num {
  background: var(--brand-strong);
  color: var(--card);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
  font-size: 0.875rem;
  font-weight: 800;
}
.age-dlg-title {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text);
}
.age-dlg-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}
.age-alert {
  padding: 0.625rem 0.875rem;
  background: var(--raised);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
}
.age-points {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.age-points li strong {
  color: var(--text);
}
.age-legal-links {
  font-size: 0.8125rem;
  color: var(--dim);
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
  margin: 0;
}
.age-legal-links a {
  color: var(--brand);
  text-decoration: underline;
}
.age-dlg-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.age-accept-btn {
  background: var(--brand-strong);
  color: var(--card);
  border: 1px solid var(--brand-line);
  font-weight: 700;
  padding: 0.625rem 1.25rem;
  min-height: 2.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.age-accept-btn:hover {
  filter: brightness(1.08);
}
.age-decline-btn {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--border);
  padding: 0.625rem 1rem;
  min-height: 2.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.age-decline-btn:hover {
  background: var(--raised);
  color: var(--text);
}
.age-dlg.closing {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ---------- Kuponlar: Yapay Zekâ Yakında Kartı ---------- */
.kupon-soon-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.kupon-soon-icon {
  font-size: 2rem;
  line-height: 1;
  flex: none;
}
.kupon-soon-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.kupon-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  align-self: flex-start;
  font-size: 0.8125rem;
  font-weight: 750;
  color: var(--brand-strong);
  background: var(--brand-subtle);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  padding: 0.125rem 0.625rem;
}
.kupon-soon-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.45;
}

.kupon-tahmini {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--dim);
}

/* ---------- Site Mikro-Footer ---------- */
.site-footer {
  margin-top: 2rem;
  padding: 1.25rem 0.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--dim);
}
.site-footer p {
  margin: 0 0 0.5rem;
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.75rem;
}
.site-footer a {
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--brand);
}


/* Yasal Uyarı Kutusu */
.yasal-uyari-kutu {
  margin-top: 1.5rem;
  padding: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  line-height: 1.4;
  text-align: center;
  background: var(--surface);
}
.yasal-uyari-kutu strong {
  color: var(--text);
  font-weight: 600;
}
/* At Detay Cekmecesi (Horse Detail Drawer) */
.horse-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.horse-drawer:not([hidden]) {
  pointer-events: auto;
}
.horse-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.horse-drawer.open .horse-drawer-backdrop {
  opacity: 1;
}
.horse-drawer-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg);
  height: 100%;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.horse-drawer.open .horse-drawer-panel {
  transform: translateX(0);
}
.horse-drawer-head {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--surface);
}
.horse-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.horse-drawer-no {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--brand-strong);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.25rem;
}
.horse-drawer-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.horse-drawer-origin {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--dim);
}
.horse-drawer-close {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.horse-drawer-close:hover {
  background: var(--border);
  color: var(--text);
}
.horse-drawer-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.9375rem;
}


/* Make horse names look clickable */
.horse-name {
  cursor: pointer;
  transition: color 0.2s ease;
}
.horse-name:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

/* ---------- Padok Yorumu ---------- */
.comment.comment-padok {
  background: rgba(183, 163, 245, 0.08);
  border: 1px solid rgba(183, 163, 245, 0.32);
  box-shadow: 0 2px 12px rgba(183, 163, 245, 0.05);
}
.comment.comment-padok .comment-kind {
  color: var(--brand);
  background: rgba(183, 163, 245, 0.16);
  border: 1px solid rgba(183, 163, 245, 0.35);
}

/* ---------- Yorumlar Görünümü ---------- */
#view-comments .meeting-group {
  margin-bottom: 2rem;
  background: var(--raised);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
#view-comments .meeting-group-title {
  padding: 1rem 1.25rem;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}
#view-comments .meeting-group-title:hover {
  background: var(--hover);
}
#view-comments .race-block {
  padding: 1.25rem;
  border-bottom: 1px dashed var(--border);
}
#view-comments .race-block:last-child {
  border-bottom: none;
}
#view-comments .race-block-head {
  transition: opacity 0.2s ease;
}
#view-comments .race-block-head:hover {
  opacity: 0.8;
}

/* -- New Topbar Layout -- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--topbar-h);
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.topbar-nav {
  display: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.date-selector {
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
}

.date-quick-btn {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  border: none;
  background: none;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.date-quick-btn:hover {
  color: var(--text);
  background: var(--border);
}

.date-quick-btn.is-active {
  background: var(--brand);
  color: #fff !important;
  font-weight: 700;
}

.date-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.topbar-date-display {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.date-picker-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.search-wrap {
  margin: 0;
  position: relative;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 0.75rem;
  height: 2.75rem;
  width: 200px;
  transition: width 0.25s ease, border-color 0.2s;
  position: relative;
}

.search-input-box:focus-within {
  width: 240px;
  border-color: var(--brand);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* TABLET VE KUCUK LAPTOP */
@media (max-width: 64rem) { /* 1024px */
  .search-input-box {
    width: 180px;
  }
  .search-input-box:focus-within {
    width: 220px;
  }
}

/* GENEL MOBIL VE TABLET GUVENLIK: Yatay Tasmalari Onle */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  width: 100%;
}

@media (max-width: 48rem) { /* 768px - Tablet ve Mobil */
  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
  }
  .topbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
  }
  .brand-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .brand {
    padding: 0.25rem 0.6rem;
  }
  .brand-name {
    font-size: 1.2rem;
  }
  .brand-mark {
    width: 2.2rem;
    height: 1.4rem;
  }
  .brand-notice {
    font-size: 0.65rem;
    white-space: normal;
    max-width: 100%;
    line-height: 1.2;
    margin-top: 0.15rem;
  }
  .date-selector {
    margin-left: 0 !important;
  }
  .topbar-date-display {
    font-size: 0.88rem;
  }
  .topbar-clock-display {
    font-size: 0.95rem;
  }
  .topbar-cal-icon, .topbar-clock-icon {
    font-size: 0.95rem;
  }
  .daily-predictions-wrap {
    margin-left: 0;
  }
  .daily-predictions-btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    gap: 0.35rem;
  }
  .daily-btn-icon {
    font-size: 1rem;
  }
  .daily-btn-glow-badge {
    padding: 0.15rem 0.35rem;
    font-size: 0.65rem;
  }
  .topbar-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
    gap: 0.35rem;
  }
  .icon-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 6px;
  }
  .social-links {
    gap: 0.35rem;
  }
  .social-icon {
    width: 30px;
    height: 30px;
  }
  .social-icon svg {
    width: 18px;
    height: 18px;
  }
  .fresh-btn {
    padding: 0.25rem 0.5rem;
  }
  .search-input-box {
    width: 100%;
  }
}

/* MOBIL (320px - 430px: Xiaomi, iPhone vb.) */
@media (max-width: 30rem) {
  .topbar {
    padding: 0.4rem 0.5rem;
    gap: 0.35rem;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand {
    padding: 0.2rem 0.4rem;
  }
  .brand-notice {
    font-size: 0.6rem;
    line-height: 1.15;
  }
  .topbar-date-display {
    font-size: 0.8rem;
  }
  .topbar-clock-display {
    font-size: 0.88rem;
  }
  .daily-predictions-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
  }
  .daily-btn-glow-badge {
    display: none; /* En dar ekranlarda buton ferah kalsın */
  }
  .icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 4px;
  }
  .social-icon {
    width: 26px;
    height: 26px;
  }
  .social-icon svg {
    width: 15px;
    height: 15px;
  }
}

/* New styles for Turbokosu modifications */
/* New styles for Turbokosu modifications */
.date-selector {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin-left: 0.5rem;
}
.date-picker-wrap {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.date-picker-wrap:hover {
  opacity: 0.85;
  border: none !important;
  box-shadow: none !important;
}
.topbar-cal-icon,
.topbar-clock-icon {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.85;
}
.topbar-date-display {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.topbar-clock-sep {
  color: var(--dim);
  font-size: 1rem;
  margin: 0 0.15rem;
}
.topbar-clock-display {
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 750;
  color: #a855f7;
  font-variant-numeric: tabular-nums;
}

/* Günlük Tahminler Butonu (Header) */
.daily-predictions-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
  flex: none;
  margin-left: 0.35rem;
}
.daily-predictions-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #180d2b 0%, #0d061a 100%);
  color: #ffffff;
  border: 2px solid #a855f7;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.65), 0 0 24px rgba(147, 51, 234, 0.4);
  animation: purple-glow-pulse 2.2s infinite ease-in-out;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  line-height: 1.2;
}
.daily-predictions-btn:hover {
  background: linear-gradient(135deg, #251347 0%, #170a2f 100%);
  border-color: #c084fc;
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.95), 0 0 38px rgba(147, 51, 234, 0.65);
  transform: translateY(-1px) scale(1.03);
  color: #ffffff;
}
.daily-predictions-btn:active,
.daily-predictions-btn.is-active,
.daily-predictions-btn[aria-current="page"] {
  background: linear-gradient(135deg, #321270 0%, #1e0940 100%);
  border-color: #e9d5ff;
  box-shadow: 0 0 24px rgba(192, 132, 252, 0.95), 0 0 42px rgba(147, 51, 234, 0.8);
}
.daily-btn-icon {
  font-size: 1.3rem;
  display: inline-block;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8));
  animation: float-icon 3s ease-in-out infinite;
}
.daily-btn-text {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.8);
  font-weight: 850;
}
.daily-btn-glow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #9333ea;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.9);
  text-transform: uppercase;
}
.daily-btn-glow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse-dot 1.5s infinite;
}

@keyframes purple-glow-pulse {
  0% {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6), 0 0 20px rgba(147, 51, 234, 0.35);
    border-color: #a855f7;
  }
  50% {
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.85), 0 0 34px rgba(147, 51, 234, 0.6);
    border-color: #c084fc;
  }
  100% {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6), 0 0 20px rgba(147, 51, 234, 0.35);
    border-color: #a855f7;
  }
}
@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px) scale(1.1); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Sosyal Medya İkonları - %50 Büyütülmüş */
.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.social-icon svg {
  width: 26px;
  height: 26px;
}
.social-icon:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.footer-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.footer-social-links .social-icon {
  width: 40px;
  height: 40px;
}

.program-wrap {
  position: relative;
}
.burger-menu-btn,
.program-menu-btn {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.burger-menu-btn:hover,
.program-menu-btn:hover {
  background: var(--raised);
  border-color: var(--brand);
}
.burger-menu-btn[aria-expanded="true"],
.program-menu-btn[aria-expanded="true"] {
  background: var(--brand-alpha);
  color: var(--brand-strong);
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-alpha);
}
.burger-icon {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 900;
}
.burger-arrow,
.program-btn-arrow {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}
.burger-menu-btn[aria-expanded="true"] .burger-arrow,
.program-menu-btn[aria-expanded="true"] .program-btn-arrow {
  transform: rotate(180deg);
}

.burger-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.burger-popover-title {
  font-weight: 750;
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.burger-popover-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.burger-popover-close:hover {
  background: var(--raised);
  color: var(--text);
}

.program-popover {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  width: min(640px, 92vw);
  z-index: 100;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.program-popover[hidden] {
  display: none !important;
}
.program-popover-filters {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.program-popover-filters::-webkit-scrollbar { display: none; }
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.filter-btn.is-active, .filter-btn:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.program-popover-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.popover-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.popover-group-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 0.375rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}
.popover-group-flag .flag {
  width: 1.25rem;
  height: 0.875rem;
  border-radius: 2px;
}
.popover-group-title {
  font-weight: 750;
  color: var(--text);
  font-size: 0.875rem;
}
.popover-group-sub {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.8125rem;
}
.popover-group-meta {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.popover-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.popover-meeting-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  transition: all 0.15s ease;
}
.popover-meeting-card:hover {
  border-color: var(--border-strong);
  background: var(--raised);
}
.popover-meeting-card.is-active {
  border-color: var(--brand);
  background: var(--brand-alpha);
  box-shadow: 0 0 0 1px var(--brand);
}
.popover-meeting-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.popover-meeting-title-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 750;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.popover-meeting-title-btn:hover {
  color: var(--brand-strong);
}
.popover-meeting-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.popover-meeting-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.popover-meeting-races {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.popover-race-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.1s ease;
}
.popover-race-btn:hover {
  background: var(--raised);
  color: var(--text);
  border-color: var(--border-strong);
}
.popover-race-btn[aria-pressed="true"] {
  background: var(--brand-strong);
  color: #fff;
  border-color: var(--brand-strong);
  font-weight: 700;
}
.popover-race-btn[aria-pressed="true"] .rc-time {
  color: #fff;
  opacity: 0.95;
}
.popover-race-btn .rc-num {
  font-weight: 700;
}

.tick-won-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.7rem;
  margin-right: 0.5rem;
  text-transform: uppercase;
  animation: pulse-win 2s infinite;
  box-shadow: 0 0 10px rgba(16,185,129,0.4);
}
@keyframes pulse-win {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70% { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* Ticker Mor Işıltılı Rozetler (Günlük Tahmin, Banko ve Analiz) */
.tick-purple-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #6d28d9 100%);
  color: #ffffff !important;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  margin-right: 0.5rem;
  text-transform: uppercase;
  border: 1px solid rgba(216, 180, 254, 0.45);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.65), 0 0 18px rgba(147, 51, 234, 0.35);
  animation: pulse-purple 2.5s infinite;
  white-space: nowrap;
}
.tick-banko-badge {
  background: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
  border-color: rgba(244, 114, 182, 0.5) !important;
  box-shadow: 0 0 12px rgba(219, 39, 119, 0.6), 0 0 20px rgba(147, 51, 234, 0.4) !important;
}
.tick-analiz-badge {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
  border-color: rgba(165, 180, 252, 0.5) !important;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.6), 0 0 18px rgba(99, 102, 241, 0.35) !important;
}

@keyframes pulse-purple {
  0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7), 0 0 10px rgba(147, 51, 234, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0), 0 0 18px rgba(147, 51, 234, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0), 0 0 10px rgba(147, 51, 234, 0.4); }
}

/* Günlük Tahminler View - Analiz Kartları */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.analysis-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.analysis-card:hover {
  border-color: #a855f7;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.15);
  transform: translateY(-2px);
}
.analysis-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.analysis-card-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--text);
}
.analysis-track-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analysis-time-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-strong);
  background: var(--raised);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.analysis-banko-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
}
.analysis-banko-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: #c084fc;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.analysis-banko-name {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 800;
}
.analysis-forecast-text {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}
.btn-analysis-go {
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-strong, var(--border));
  color: var(--brand-strong);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}
.btn-analysis-go:hover {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

/* ========================================================
   YARIŞ LİSTESİ VE ORAN KARŞILAŞTIRMA (AGF / YERLİ / YURT DIŞI)
   ======================================================== */
.track-flag-emoji {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  vertical-align: middle;
  margin-right: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.runner-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.runner-info {
  flex: 1 1 200px;
  min-width: 160px;
}

/* Kartlarda AGF, Yerli Oran, Yurt Dışı Oran Yan Yana 3 Kutu */
.odds-triple-boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(95px, 1fr));
  gap: 0.5rem;
  align-items: stretch;
  background: var(--surface);
  padding: 0.4rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border);
}

.odd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  text-align: center;
  background: var(--card-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.05));
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.odd-box:hover {
  border-color: var(--brand-strong);
}

.odd-box-label {
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
  color: var(--muted);
  white-space: nowrap;
}

.odd-box-agf .odd-box-label {
  color: #c084fc;
}

.odd-box-yerli .odd-box-label {
  color: #38bdf8;
}

.odd-box-foreign .odd-box-label {
  color: #4ade80;
}

.odd-box-val {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  line-height: 1.2;
}

.odd-box-val .odds-value {
  font-size: 1.05rem;
  font-weight: 800;
}

.odd-box-val .odds-none,
.odds-val-empty {
  color: var(--muted);
  opacity: 0.7;
}

.odds-val-scratched {
  color: #f87171;
  font-size: 0.85rem;
  font-weight: 700;
}

.odds-val-foreign {
  color: #4ade80;
  font-weight: 800;
}

/* Tablo Başlıkları ve Hücreleri (AGF - Yerli - Yurt Dışı) */
.runners-table th.col-head-agf {
  color: #c084fc;
  font-weight: 750;
  background: rgba(192, 132, 252, 0.06);
}

.runners-table th.col-head-yerli {
  color: #38bdf8;
  font-weight: 750;
  background: rgba(56, 189, 248, 0.06);
}

.runners-table th.col-head-foreign {
  color: #4ade80;
  font-weight: 750;
  background: rgba(74, 222, 128, 0.06);
}

.table-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.table-badge.badge-agf {
  background: var(--brand-subtle);
  color: var(--brand-strong);
  border: 1px solid var(--brand-line);
}

.table-badge.badge-yerli {
  background: rgba(31, 58, 122, 0.1);
  color: var(--us);
  border: 1px solid rgba(31, 58, 122, 0.3);
}

.table-badge.badge-foreign {
  background: var(--pos-tint);
  color: var(--pos-ink);
  border: 1px solid var(--pos);
}

:root[data-theme="dark"] .table-badge.badge-agf,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .table-badge.badge-agf {
    background: rgba(192, 132, 252, 0.12);
    color: #e9d5ff;
    border: 1px solid rgba(192, 132, 252, 0.25);
  }
  :root:not([data-theme="light"]) .table-badge.badge-yerli {
    background: rgba(56, 189, 248, 0.12);
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.25);
  }
  :root:not([data-theme="light"]) .table-badge.badge-foreign {
    background: rgba(74, 222, 128, 0.12);
    color: #bbf7d0;
    border: 1px solid rgba(74, 222, 128, 0.25);
  }
}
:root[data-theme="dark"] .table-badge.badge-yerli {
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
:root[data-theme="dark"] .table-badge.badge-foreign {
  background: rgba(74, 222, 128, 0.12);
  color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

@media (max-width: 640px) {
  .odds-triple-boxes {
    width: 100%;
    margin-top: 0.5rem;
  }
}

@media (max-width: 414px) {
  .odds-triple-boxes {
    gap: 0.25rem;
    padding: 0.25rem;
  }
  .odd-box {
    padding: 0.25rem;
  }
  .odd-box-label {
    font-size: 0.65rem;
  }
  .odd-box-val,
  .odd-box-val .odds-value {
    font-size: 0.95rem;
  }
}



