:root {
  --ink: #0f172a;
  --card: #fff;
  --accent: #2e6bff;
  --shadow: 0 18px 36px rgba(15, 23, 42, .20);
  --stroke: #e3e9f8;
  --muted: #6b7280;
  --bg-a: #f7f9ff;
  --bg-b: #eef3ff;
}

/* ========== Global ========== */
* { box-sizing: border-box }
[hidden] { display: none !important }
html, body { min-height: 100% }
body {
  margin: 0;
  background: linear-gradient(180deg, #eef3ff 0%, #f7f9ff 40%, #f9fbff 100%);
  font: 15px/1.5 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--ink);
  background-attachment: fixed;
}
.wrap { max-width: 820px; margin: 0 auto; padding: 18px }

/* ========== Header ========== */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0 0 6px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.page-head::before,
.page-head::after { content: none !important; }

.page-head .back-wrap {
  position: static;
  transform: none;
  padding-left: 6px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink, #0f172a);
  opacity: .9;
}
.back-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  opacity: .85;
}

/* ========== Title ========== */
.section-title {
  text-align: center;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: .2px;
  line-height: 1.25;
  margin: 14px 0 20px;
  font-size: clamp(22px, 5vw, 28px);
}

/* ========== Empty-Card ========== */
.empty-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  color: #111827;
  margin-bottom: 24px;
}
.empty-card strong { display: block; font-size: 17px; font-weight: 900; margin-bottom: 6px; }
.empty-card p { margin: 0; color: #64748b; font-weight: 600; font-size: 14px; }
.empty-card svg {
  display: block;
  overflow: visible;
  margin: 0 auto 12px;
  padding-bottom: 2px;
  width: 52px;
  height: 52px;
  color: var(--accent, #2e6bff);
  filter: drop-shadow(0 4px 10px rgba(46, 107, 255, .2));
}

/* ========== Filter-Card ========== */
.filter-card {
  background: var(--card);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  border: 1px solid var(--stroke);
  margin-top: 16px;
  margin-bottom: 26px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; color: #0f172a; margin-bottom: 6px; }

/* Pills */
.pill-row { display: flex; gap: 8px; }
.pill {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  background: #e3e9f8;
  color: #1e293b;
  cursor: pointer;
  transition: .2s;
}
.pill.is-active {
  background: linear-gradient(180deg, #3f6cff, #2e5af9);
  color: #fff;
  box-shadow: 0 8px 18px rgba(46, 107, 255, .25);
}

/* League Selector */
.select-like {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #dbe3ff;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  background: #fff;
  font-weight: 700;
  color: #0f172a;
  font-size: 15px;
}
.league-panel {
  margin-top: 10px;
  background: #fff;
  border: 1px solid #e3e9f8;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .1);
  padding: 14px;
}
.league-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 14px;
  max-height: 280px;
  overflow: auto;
}
.chip { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #0f172a; }
.chip input { accent-color: var(--accent); }
.league-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #3f6cff, #2e5af9);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.btn-light {
  background: #e3e9f8;
  color: #0f172a;
  font-weight: 800;
}

/* Stepper */
.row2 { display: flex; gap: 10px; }
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-a, #f7f9ff);
  border: 1px solid var(--stroke, #e3e9f8);
  border-radius: 10px;
  padding: 6px 8px;
}
.stepper .sval {
  width: 48px;
  font-weight: 600;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #111827;
}
.sbtn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--card, #fff);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  cursor: pointer;
  transition: .15s ease all;
}
.sbtn:hover {
  background: #dce5ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(46, 107, 255, .25);
}
.sbtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(46, 107, 255, .18);
}
.sbtn svg {
  width: 18px;
  height: 18px;
  stroke: #2e6bff;
  stroke-width: 2.5;
  stroke-linecap: round;
  display: block;
  pointer-events: none;
}

/* Apply Button */
.apply-btn {
  width: 100%;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #3f6cff, #2e5af9);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(46, 107, 255, .28);
  transition: .18s ease all;
  margin-top: 8px;
}
.apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(46, 107, 255, .32);
}
.apply-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(46, 107, 255, .22);
}

/* Result */
.result-head { text-align: center; margin: 28px 0 12px; }
.result-head strong { display: block; font-size: 17px; font-weight: 900; }
.result-head span { display: block; color: #64748b; font-weight: 600; font-size: 13.5px; margin-top: 2px; }
.tickets { display: grid; gap: 14px; margin-top: 18px; }
.ticket {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  border: 1px solid #e3e9f8;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.teams { display: flex; flex-direction: column; gap: 8px; }
.line { display: flex; align-items: center; gap: 10px; }
.logo { width: 28px; height: 28px; display: grid; place-items: center; }
.logo img { width: 24px; height: 24px; object-fit: contain; }
.meta { text-align: right; font-size: 12px; color: #6b7280; font-weight: 700; }
.pick {
  grid-column: 1 / -1;
  border-top: 1px dashed #e3e9f8;
  padding-top: 8px;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pick .lbl { font-weight: 700; color: #6b7280; font-size: 13px; }
.pick .val { font-weight: 900; color: #111827; font-size: 14px; }
.odd { font-weight: 900; font-size: 16px; text-align: right; color: #111827; }
.sum {
  margin-top: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  color: #0f172a;
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px }
::-webkit-scrollbar-thumb { background: #cdd6f4; border-radius: 8px }
::-webkit-scrollbar-track { background: transparent }

/* Responsive */
@media (max-width: 420px) {
  .filter-card { padding: 18px 14px; }
  .sbtn { width: 32px; height: 32px; }
  .sval { width: 50px; }
  .apply-btn { padding: 12px 0; font-size: 15px; }
}

/* iOS Input Zoom Fix */
input, button, select, textarea {
  font-size: 16px !important;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
/* Feiner, dezenter Zurück-Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;              /* weniger fett */
  font-size: 15px;
  letter-spacing: -0.1px;        /* minimal kompakter */
  color: #1a1e29;                /* dunkler, aber weicher Ton */
  text-decoration: none;
  opacity: 0.85;                 /* feiner Gesamteindruck */
  transition: opacity .15s ease;
  padding-left: 2px;             /* perfekt zentriert mit Pfeil */
}

.back-link:hover { opacity: 1; }

.back-link svg {
  width: 16px;                   /* etwas kleinerer Pfeil */
  height: 16px;
  stroke-width: 2.1;
  opacity: 0.75;
  transform: translateY(0.5px);  /* optisch zentriert mit Text */
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 15px;
  color: #1a1e29;
  text-decoration: none;
  padding-left: 4px;
  letter-spacing: -0.1px;
}

.back-link svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
  opacity: 0.85;
  transform: translateY(0.3px);
}
/* ========== Feinere Pills (Datumswahl) ========== */
.pill-row {
  display: flex;
  gap: 8px;
}

.pill {
  flex: 1;
  padding: 8px 0;                        /* etwas flacher */
  border: none;
  border-radius: 10px;
  font-weight: 600;                      /* feiner als 800 */
  font-size: 15px;
  letter-spacing: -0.1px;
  background: #edf1fb;
  color: #1f2937;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: inset 0 0 0 1px #d5ddf0;   /* zarter Rahmen-Effekt */
}

.pill:hover {
  background: #e5ebfa;
}

.pill.is-active {
  background: linear-gradient(180deg, #3b66ff 0%, #2e5af9 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(46,107,255,.25);
  transform: translateY(-1px);
}

.pill:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(46,107,255,.18);
}
/* ===== OVERRIDE: Feinere Datumswahl-Pills ===== */
/* Platzieren: GANZ am Ende der CSS oder in <style> NACH dem Link */
.filter-card .pill-row {
  display: flex;
  gap: 8px !important;                     /* kompakter */
}

.filter-card .pill {
  flex: 1 1 0;
  padding: 8px 0 !important;               /* flacher */
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;             /* feiner (vorher 800) */
  font-size: 15px !important;
  letter-spacing: -0.1px;
  background: #edf1fb !important;
  color: #1f2937 !important;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: inset 0 0 0 1px #d5ddf0 !important; /* zarter Rand statt starker Fläche */
}

.filter-card .pill:hover {
  background: #e6ecff !important;
}

.filter-card .pill.is-active {
  background: linear-gradient(180deg, #3b66ff 0%, #2e5af9 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;             /* etwas betonen, aber nicht fett-klobig */
  box-shadow: 0 4px 14px rgba(46,107,255,.22) !important;
  transform: translateY(-1px);
}

.filter-card .pill:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(46,107,255,.16) !important;
}