:root {
  --bg: #0a1f17;
  --bg-2: #0e2a1e;
  --card: #ffffff;
  --card-soft: #f3f7f4;
  --ink: #16241c;
  --muted: #6a7d72;
  --line: #e3e9e4;
  --green: #1f8a5b;
  --green-d: #15613f;
  --gold: #e7b53c;
  --red: #d2453a;
  --blue: #2f6fed;
  --radius: 16px;
  --shadow: 0 14px 34px rgba(8, 30, 20, 0.14);
  --shadow-sm: 0 4px 14px rgba(8, 30, 20, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

.bg-pitch {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(231, 181, 60, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(47, 111, 237, 0.15), transparent 60%),
    linear-gradient(160deg, #0a1f17 0%, #0e2a1e 50%, #0a1f17 100%);
}
.bg-pitch::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.025) 0 60px,
    transparent 60px 120px
  );
}

/* ---------- HEADER ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  color: #0a1f17;
  background: linear-gradient(135deg, var(--gold), #f5d27a);
  box-shadow: var(--shadow-sm);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

.auth-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.steam-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.steam-btn:hover { filter: brightness(1.1); }

.chip-btn {
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  transition: background 0.15s;
}
.chip-btn:hover { background: rgba(255, 255, 255, 0.24); }

/* ---------- RULE BAR ---------- */
.rule-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 8px;
}
.rule-bar span {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rule-bar strong {
  color: var(--gold);
  font-size: 14px;
}
.rule-lock { color: rgba(255, 255, 255, 0.6) !important; }

.missed-badge {
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.missed-badge:hover { background: #b5352b; }
.missed-badge.zero { background: var(--green); }

/* ---------- TABS ---------- */
.tabs {
  display: flex;
  gap: 6px;
  max-width: 1180px;
  margin: 14px auto 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  width: calc(100% - clamp(32px, 8vw, 96px));
}
.tab {
  flex: 1;
  border: none;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 15px;
  padding: 12px;
  border-radius: 10px;
  transition: all 0.18s;
}
.tab:hover { color: #fff; }
.tab.is-active {
  background: #fff;
  color: var(--green-d);
  box-shadow: var(--shadow-sm);
}

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1180px;
  margin: 22px auto;
  padding: 0 clamp(16px, 4vw, 48px) 40px;
}
.view { display: none; }
.view.is-active { display: block; animation: fade 0.3s ease; }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.section-head h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}
.date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-nav input[type="date"] {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.empty {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.05);
  padding: 28px;
  border-radius: var(--radius);
  text-align: center;
}

/* ---------- MATCH CARD ---------- */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.match-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-SCHEDULED { background: #eef3ff; color: var(--blue); }
.status-LIVE { background: #ffecec; color: var(--red); }
.status-FINISHED { background: #e9f5ee; color: var(--green); }
.mc-time { font-size: 13px; color: var(--muted); font-weight: 600; }

.mc-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.mc-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  transition: background 0.15s;
}
.mc-team.picked { background: var(--card-soft); box-shadow: inset 0 0 0 2px var(--green); }
.mc-team img {
  width: 44px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.mc-team span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.vs { color: var(--muted); font-weight: 700; }
.score {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
}
.score i { color: var(--muted); font-style: normal; font-size: 16px; }

.mc-lockmsg {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  background: rgba(220, 53, 69, 0.1);
  padding: 4px;
  border-radius: 4px;
  margin-top: 8px;
}
.mc-lockmsg.open {
  color: var(--blue);
  background: rgba(13, 110, 253, 0.1);
}

.mc-pick {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.pick {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick:hover:not(:disabled) { border-color: var(--green); color: var(--green-d); }
.pick.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(31, 138, 91, 0.3);
}
.pick:disabled { opacity: 0.5; cursor: not-allowed; }
.mc-foot {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* ---------- GROUPS ---------- */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.group-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
}
.group-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green), var(--green-d));
  color: #fff;
  font-weight: 800;
}
.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.standings th {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.standings td {
  text-align: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}
.standings tr:last-child td { border-bottom: none; }
.standings .tcell { text-align: left; }
.standings .pos { color: var(--muted); font-weight: 700; }
.standings .pts { font-weight: 800; color: var(--ink); }
.standings .tcell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.standings .tcell img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
}
.standings .tcell span {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.standings tr.qualify { background: rgba(31, 138, 91, 0.06); }
.standings tr.qualify .pos { color: var(--green); }

.group-toggle {
  margin-top: 12px;
  width: 100%;
  border: none;
  background: var(--card-soft);
  color: var(--green-d);
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.group-toggle:hover { background: #e7efe9; }
.group-matches {
  display: none;
  margin-top: 12px;
  gap: 12px;
  grid-template-columns: 1fr;
}
.group-card.open .group-matches { display: grid; }

/* ---------- KNOCKOUT ---------- */
.knockout-wrap {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.ko-stage {
  min-width: 280px;
  flex: 0 0 auto;
}
.ko-stage h3 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}
.ko-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ko-empty {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}
.ko-empty strong { display: block; font-size: 18px; margin-bottom: 8px; color: #fff; }

/* ---------- RANKING ---------- */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 680px;
}
.rank-row {
  display: grid;
  grid-template-columns: 36px 40px 1fr auto auto;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}
.rank-pos {
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}
.rank-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}
.rank-name { font-weight: 700; }
.rank-meta { font-size: 12px; color: var(--muted); }
.rank-pts {
  font-weight: 800;
  font-size: 18px;
  color: var(--green-d);
}
.rank-pts small { font-size: 11px; color: var(--muted); font-weight: 600; }
.rank-row.top-1 { box-shadow: inset 0 0 0 2px var(--gold), var(--shadow-sm); }
.rank-row.top-1 .rank-pos { color: var(--gold); }
.rank-row.top-2 .rank-pos { color: #9aa6ad; }
.rank-row.top-3 .rank-pos { color: #c08457; }

/* ---------- PALPITES ---------- */
.picks-filters {
  display: flex;
  gap: 6px;
}
.fchip {
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  transition: all 0.15s;
}
.fchip:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.fchip.on { background: #fff; color: var(--green-d); }

.picks-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.pick-sum {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--line);
}
.pick-sum.status-LIVE { border-top-color: var(--red); }
.pick-sum.status-FINISHED { border-top-color: var(--green); }

.ps-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ps-stage {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green-d);
  background: var(--card-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.ps-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.ps-status.sched { background: #eef3ff; color: var(--blue); }
.ps-status.live { background: #ffecec; color: var(--red); }
.ps-status.fin { background: #e9f5ee; color: var(--green); }

.ps-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ps-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 8px;
  border-radius: 10px;
}
.ps-team img {
  width: 46px;
  height: 31px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.ps-team span { font-weight: 700; font-size: 13px; line-height: 1.2; }
.ps-team.mychoice { box-shadow: inset 0 0 0 2px var(--gold); background: #fffdf5; }
.ps-team.winner { background: #eaf6ef; }
.ps-vs { color: var(--muted); font-weight: 700; }
.ps-score { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.ps-score i { color: var(--muted); font-style: normal; font-size: 16px; }

.ps-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--card-soft);
  margin-bottom: 12px;
}
.ps-home { background: var(--green); transition: width 0.4s; }
.ps-draw { background: #f1c75b; transition: width 0.4s; }
.ps-away { background: var(--blue); transition: width 0.4s; }

.ps-mine {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  background: var(--card-soft);
  color: var(--green-d);
}
.ps-mine.empty { color: var(--red); background: #fbeceb; }
.ps-mine.ok { background: #e9f5ee; color: var(--green); }
.ps-mine.bad { background: #fbeceb; color: var(--red); }
.ps-mine.neutral { background: #fff7e6; color: #b07d18; }

.ps-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.ps-col { min-width: 0; }
.ps-col-head {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: center;
}
.ps-col-head.win { color: var(--green); }
.ps-col-voters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.voter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-soft);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  font-size: 12px;
  min-width: 0;
}
.voter img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.voter .vn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.voter .vp {
  margin-left: auto;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 11px;
}
.voter.me { box-shadow: inset 0 0 0 2px var(--gold); }
.voter.hit { background: #e9f5ee; }
.voter.hit .vp { background: var(--green); }
.voter.miss { background: #fbeceb; opacity: 0.85; }
.voter.draw { background: #fff7e6; }
.ps-locked {
  font-size: 13px;
  color: var(--muted);
  background: var(--card-soft);
  padding: 12px 14px;
  border-radius: 10px;
  border-top: 1px solid var(--line);
}
.ps-locked b { color: var(--green-d); }
.muted-line { color: var(--muted); font-size: 12px; }

/* ---------- FOOTER + TOAST ---------- */
.site-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  padding: 24px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- AUTH MODAL ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop.is-open {
  display: flex;
}
.modal-content {
  background: #ffffff;
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.modal-close:hover {
  color: var(--ink);
}
#modalTitle {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
  color: var(--ink);
}
.modal-social {
  margin-bottom: 20px;
}
.steam-btn.full-width {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
}
.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
}
.modal-divider::before, .modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}
.modal-divider:not(:empty)::before {
  margin-right: 12px;
}
.modal-divider:not(:empty)::after {
  margin-left: 12px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
}
.form-group input {
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  background-color: #fff;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
}
.form-group input:focus {
  outline: none;
  border-color: var(--green);
}
.register-only {
  display: none;
}
.modal-backdrop.mode-register .register-only {
  display: flex;
}
.submit-btn {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 8px;
}
.submit-btn:hover {
  background: var(--green-d);
}
.modal-toggle-text {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}
.link-btn {
  background: transparent;
  border: none;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
}
.link-btn:hover {
  text-decoration: underline;
}

/* ---------- PROFILE MODAL ---------- */
.profile-info {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-soft);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.profile-info img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.profile-info div {
  display: flex;
  flex-direction: column;
}
.profile-info strong {
  font-size: 18px;
  color: #fff;
}
.profile-info span {
  font-size: 13px;
  color: var(--muted);
}
.link-box {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.link-box h3 {
  font-size: 15px;
  margin-bottom: 4px;
  color: #fff;
}
.link-box p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

/* ---------- PWA & NOTIFICATIONS PROMPTS ---------- */
.pwa-prompt {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: calc(100% - 32px);
  max-width: 400px;
}
.pwa-prompt.show {
  transform: translateX(-50%) translateY(0);
}
.pwa-prompt-content {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pwa-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  overflow: hidden;
}
.pwa-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pwa-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pwa-text strong {
  font-size: 15px;
  margin-bottom: 2px;
}
.pwa-text span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}
.pwa-btn {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.pwa-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

/* ---------- RESPONSIVE DESIGN ---------- */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    padding: 16px;
    align-items: stretch;
    gap: 12px;
  }
  .header-right {
    justify-content: space-between;
  }
  .rule-bar {
    padding: 0 16px 12px;
  }
  .rule-bar span {
    font-size: 12px;
    padding: 4px 10px;
  }
  .tabs {
    width: calc(100% - 32px);
    margin: 10px 16px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }
  .tab {
    flex: none;
    padding: 10px 16px;
    font-size: 14px;
  }
  .container {
    padding: 0 16px 30px;
    margin: 16px auto;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-head h2 {
    font-size: 20px;
  }
  .date-nav {
    width: 100%;
    justify-content: space-between;
  }
  .date-nav input[type="date"] {
    flex: 1;
    text-align: center;
  }
  .match-grid {
    grid-template-columns: 1fr;
  }
  .groups-grid {
    grid-template-columns: 1fr;
  }
  .picks-list {
    grid-template-columns: 1fr;
  }
  .ps-cols {
    grid-template-columns: 1fr;
  }
  .ranking-list {
    max-width: 100%;
  }
  .rank-row {
    grid-template-columns: 30px 34px 1fr auto;
    font-size: 13px;
    padding: 10px 12px;
  }
  .rank-meta {
    display: none;
  }
  .modal-content {
    padding: 24px 20px;
    max-width: 100%;
    border-radius: 16px;
    margin-top: auto; /* sheet format on mobile */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    animation: slideUpMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideUpMobile {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
