/* ── BASE ─────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--red);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

.help-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.help-button { height: 22px; display: block; transition: transform 0.15s; }
.help-button:hover { transform: scale(1.1); }

/* ── LAYOUT ───────────────────────────────────────── */
.container {
  max-width: 420px;
  margin: 2rem auto 0;
  width: 90%;
}

/* ── MONTH DIVIDERS ───────────────────────────────── */
.month-divider {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin: 2rem 0 1rem;
}

/* ── MONTH FILTER ─────────────────────────────────── */
.month-filter {
  position: sticky;
  top: var(--nav-height);
  z-index: 99;
  background: var(--red);
  padding: 0.5rem 1rem;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: flex-start;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(0,0,0,0.18);
}
.month-filter::-webkit-scrollbar { display: none; }
.month-btn {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
  transition: background 0.15s, color 0.15s;
}
.month-btn:hover  { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.9); }
.month-btn.active { background: var(--black); color: var(--white); }

/* ── PAGE TITLE ───────────────────────────────────── */
.page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.55);
  max-width: 420px;
  width: 90%;
  margin: 1.25rem auto 0.25rem;
}
.page-title span {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255,255,255,0.35);
}

/* ── FIXTURE CARD ─────────────────────────────────── */
.predictor {
  border-radius: 10px;
  padding: 1rem;
  padding-right: 1.75rem;
  margin-bottom: 1rem;
  background: var(--off-white);
  color: var(--black);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

/* ── RESULT TAB ───────────────────────────────────── */
.result-tab {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: linear-gradient(to bottom, #e2e0dd, #d4d2cf);
  transition: background 0.3s;
}
body.predictions-saved .predictor.win  .result-tab { background: #3aaa6e; }
body.predictions-saved .predictor.loss .result-tab { background: var(--red-dark); }
body.predictions-saved .predictor.draw .result-tab { background: var(--gold); }

.competition-label {
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.28);
  margin-bottom: 0.2rem;
}

.matchday-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.date { font-weight: 600; color: #999; }

.team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.team img { width: 36px; height: 36px; object-fit: contain; }
.team-info { flex: 1; margin-left: 0.6rem; }
.team-name { font-size: 0.95rem; font-weight: 600; }

.score-control { display: flex; align-items: center; gap: 6px; }
.change-score {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  color: var(--black);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.change-score:hover { background: rgba(0,0,0,0.12); }
.score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  width: 24px;
  text-align: center;
}

/* ── ACTION BUTTONS ───────────────────────────────── */
.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  max-width: 420px;
  width: 90%;
  margin: 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 98;
  background: var(--red);
  padding: 0.65rem 0 0.6rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.btn-row {
  display: flex;
  gap: 0.6rem;
  width: 100%;
}
.action-btn {
  flex: 1;
  height: 46px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.28);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.action-btn:hover  { background: rgba(0,0,0,0.42); color: var(--white); }
.action-btn:active { transform: scale(0.97); }
.action-btn--danger:hover  { background: rgba(180,20,20,0.55); }
.action-btn--primary {
  background: var(--gold);
  color: var(--black);
}
.action-btn--primary:hover { background: #ffc433; color: var(--black); }
.how-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color 0.15s;
}
.how-link:hover { color: rgba(255,255,255,0.7); }

/* ── MODALS ───────────────────────────────────────── */
.help-modal,
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 16px 16px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.help-modal {
  align-items: center;
  padding: 16px;
}
.help-modal.show,
.modal.show { visibility: visible; opacity: 1; }

.help-modal-content,
.modal-content {
  background: var(--white);
  color: var(--black);
  width: 100%;
  max-width: 760px;
  max-height: 78vh;
  overflow-y: auto;
}
.help-modal-content {
  position: relative;
  max-width: 500px;
  padding: 2.5rem 1.5rem 1.5rem;
  border-radius: 8px;
}
.help-modal-content p,
.help-modal-content li { line-height: 1.6; margin-bottom: 0.5rem; }
.help-modal-content ul { margin: 0.25rem 0 1rem 1.5rem; }
.help-modal-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  margin: 1rem 0;
}

.close-button {
  float: right;
  background: var(--blue);
  color: var(--white);
  border: none;
  font-size: 1.75rem;
  font-weight: 700;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 1rem 0 0;
  line-height: 1;
}
.help-modal-content .close-button {
  float: none;
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: none;
  color: rgba(0,0,0,0.3);
  font-size: 1.5rem;
  font-weight: 400;
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.help-modal-content .close-button:hover {
  background: rgba(0,0,0,0.06);
  color: rgba(0,0,0,0.65);
}

/* ── NEWSPAPER ────────────────────────────────────── */
.paper-banner {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.paper-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.paper-date { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }

.paper-scroll { background: var(--white); color: var(--black); }
.paper-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 1rem 1rem;
}
.paper-story { flex: 1.1; }
.article-title { color: #555; font-size: 0.85rem; margin-bottom: 0.2rem; }
.headline { font-size: 2.25rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.75rem; }
.article-info { font-size: 0.75rem; color: #777; margin-bottom: 0.75rem; }
.story-text { font-size: 0.95rem; line-height: 1.65; }
.paper-figure { flex: 0.9; }
.paper-caption { font-size: 0.68rem; color: #555; font-style: italic; margin-top: 6px; }
.paper-image-frame { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.paper-image-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ── FOOTER ───────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 1rem;
  color: var(--white);
}
.dhd-logo { max-height: 24px; opacity: 0.3; transition: opacity 0.2s; display: inline-block; }
.dhd-logo:hover { opacity: 0.65; }
.copy { font-size: 0.7rem; color: rgba(255,255,255,0.3); margin-top: 0.5rem; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (min-width: 768px) {
  .paper-body { flex-direction: row; gap: 2rem; padding: 0 1.5rem 1.5rem; }
  .paper-figure { margin: 0; }
  .modal-content { max-height: 68vh; }
}
