@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --bg-top: #f7f8fa;
  --bg-bottom: #eef1f5;
  --card: rgba(255, 255, 255, 0.9);
  --text: #111827;
  --muted: #6b7280;
  --line: #edf1f5;
  --primary: #0f766e;
  --primary-2: #0b5f59;
  --danger: #b91c1c;
  --success: #166534;
  --headline-red: #d11f2e;
  --radius: 15px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04), 0 10px 20px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 2px 8px rgba(17, 24, 39, 0.08), 0 16px 30px rgba(17, 24, 39, 0.10);

  /* Density preset: balanced (default) */
  --space-page: 14px;
  --space-card-py: 12px;
  --space-card-px: 13px;
  --space-card-gap: 12px;
  --h2-size: 1.28rem;
  --h2-weight: 780;
  --body-size: 0.92rem;
  --meta-size: 0.81rem;
}

/* Preset A: compact */
body[data-density="compact"] {
  --space-page: 10px;
  --space-card-py: 8px;
  --space-card-px: 9px;
  --space-card-gap: 6px;
  --h2-size: 1.2rem;
  --h2-weight: 760;
  --body-size: 0.88rem;
  --meta-size: 0.78rem;
}

/* Preset C: airy */
body[data-density="airy"] {
  --space-page: 14px;
  --space-card-py: 12px;
  --space-card-px: 13px;
  --space-card-gap: 10px;
  --h2-size: 1.34rem;
  --h2-weight: 800;
  --body-size: 0.95rem;
  --meta-size: 0.84rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Manrope, Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-page);
}

.header h1 {
  margin: 0 0 4px 0;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 820;
}

.header h1 a {
  color: var(--headline-red);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #e02936 0%, #be1b28 100%);
  box-shadow: 0 6px 12px rgba(190, 27, 40, 0.26);
}

.header a {
  color: inherit;
  text-decoration: none;
}

h2 {
  margin: 0 0 7px 0;
  font-size: var(--h2-size);
  font-weight: var(--h2-weight);
  letter-spacing: -0.015em;
}

h3 {
  margin: 8px 0;
  font-size: 0.98rem;
  font-weight: 700;
}

p {
  margin: 0.3rem 0;
  font-size: var(--body-size);
  line-height: 1.4;
}

.top-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary) !important;
  border: 1px solid rgba(15, 118, 110, 0.2);
  transition: all 0.18s ease;
}

.nav-pill:hover {
  background: rgba(15, 118, 110, 0.16);
  transform: translateY(-1px);
}

.chip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e3e8ee;
  background: rgba(255,255,255,0.92);
  color: #1f2937;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 640;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(17,24,39,0.06);
}

.chip-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(17,24,39,0.10);
  border-color: #d6dee7;
}

.link-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.back-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 620;
}

.density-switch {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--meta-size);
}

.density-select {
  min-width: 104px;
  padding: 6px 8px;
  font-size: var(--meta-size);
  border-radius: 9px;
  background: rgba(255,255,255,0.9);
}

.card {
  background: var(--card);
  backdrop-filter: saturate(145%) blur(4px);
  -webkit-backdrop-filter: saturate(145%) blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  padding: var(--space-card-py) var(--space-card-px);
  margin-bottom: var(--space-card-gap);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.card,
.match-link {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.list { list-style: none; padding: 0; margin: 0; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.counts,
.muted,
.status {
  color: var(--muted);
  font-size: var(--meta-size);
}

.match-divider {
  height: 1px;
  background: #eceff3;
  margin: 8px 0 6px;
}

.status {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 650;
}

.season-sub {
  margin-top: -2px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: var(--meta-size);
}

.section-kicker {
  margin: 4px 0 10px;
  color: #6b7280;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.match-card {
  border-radius: 14px;
}

.match-title {
  font-size: 1.12rem;
  font-weight: 790;
}

.meta-line {
  color: var(--muted);
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon {
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
  width: 16px;
  min-width: 16px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sum-yes { color: #168457; font-weight: 680; margin-right: 10px; }
.sum-no { color: #c23a3a; font-weight: 680; margin-right: 10px; }
.sum-open { color: #6b7280; font-weight: 650; }

.match-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.stack { display: grid; gap: 7px; }

input, select, textarea, button {
  font: inherit;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.07);
}

button {
  background: linear-gradient(180deg, #0f8a80 0%, var(--primary) 100%);
  color: white;
  border: 0;
  font-weight: 620;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.32);
  filter: saturate(1.03);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.22);
}

.error { color: var(--danger); font-size: 0.9rem; }
.success { color: var(--success); font-size: 0.9rem; }

.player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-name {
  font-size: 0.9rem;
  font-weight: 520;
}

.badge {
  font-size: 0.74rem;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.1);
}

.badge-yes {
  background: #dcfce7;
  color: #166534;
}

.badge-no {
  background: #fee2e2;
  color: #991b1b;
}

.badge-open {
  background: #f3f4f6;
  color: #374151;
}

.choices {
  margin: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
}

.choices label {
  display: block;
  margin: 5px 0;
}

.inline-check {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fixed-cta {
  position: sticky;
  bottom: 10px;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin: 12px 0 4px;
  padding: 11px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #0f8a80 0%, var(--primary-2) 100%);
  box-shadow: 0 10px 18px rgba(15, 118, 110, 0.26);
  font-weight: 650;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fixed-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(15, 118, 110, 0.32);
}
