@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Outfit', Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eaf6ea;
  color: #1a2f1a;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

header {
  text-align: left;
  margin-bottom: 28px;
}

.site-icon {
  width: 1em;
  height: 1em;
  vertical-align: middle;
  margin-right: 8px;
  flex-shrink: 0;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

#user-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-indicator-text {
  font-size: 0.85rem;
  color: #6b7280;
  white-space: nowrap;
}

.user-indicator-text strong {
  color: #4b9168;
  font-weight: 700;
}

.logout-btn {
  padding: 5px 12px;
  border: 1px solid #9f2a1f;
  background: transparent;
  color: #9f2a1f;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.logout-btn:hover {
  background: #9f2a1f;
  color: white;
}

.login-btn {
  padding: 9px 18px;
  border: 2px solid #4b9168;
  background: #4b9168;
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.login-btn:hover {
  background: #3a6e4e;
  border-color: #3a6e4e;
}

#login-dropdown-wrap {
  position: relative;
}

.login-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid #d4e7d4;
  border-radius: 14px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  z-index: 200;
  display: grid;
  gap: 12px;
}

.login-dropdown label {
  display: grid;
  gap: 5px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a2e1a;
}

.login-dropdown input {
  padding: 10px 12px;
  border: 1px solid #b5d4b5;
  border-radius: 8px;
  font-size: 1rem;
  background: #f9fcf9;
  width: 100%;
  box-sizing: border-box;
}

.login-dropdown input:focus {
  outline: none;
  border-color: #4b9168;
  box-shadow: 0 0 0 3px rgba(75, 145, 104, 0.15);
}

.auth-submit-btn {
  padding: 10px;
  background: #4b9168;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-submit-btn:hover {
  background: #3a6e4e;
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.leaderboard-button {
  flex-shrink: 0;
  padding: 9px 18px;
  border: 2px solid #4b9168;
  background: transparent;
  color: #4b9168;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.leaderboard-button:hover {
  background: #4b9168;
  color: white;
}

header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

header p {
  margin: 0;
  color: #3c5f3c;
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.6;
}

#start-screen {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d4e7d4;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(46, 92, 46, 0.08);
}

.objective-note {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #234123;
}

.instructions {
  margin: 0 0 20px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.instructions > li {
  line-height: 1.55;
  color: #1a2f1a;
}

.instructions > li strong {
  display: block;
  margin-bottom: 4px;
}

.level-hints {
  margin: 6px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #3c5f3c;
  font-size: 0.92rem;
}

.instructions-start-label {
  margin: 0 0 8px;
  font-weight: 700;
  color: #234123;
  font-size: 0.95rem;
}


.auth-message {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  min-height: 1.2em;
}

.auth-message.error  { color: #9f2a1f; }
.auth-message.success { color: #1d6d2f; }

.auth-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
  color: #5a7a5a;
  line-height: 1.4;
}

.mode-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.mode-button {
  padding: 10px 20px;
  border: 2px solid #4b9168;
  background: transparent;
  color: #4b9168;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mode-button.active {
  background: #4b9168;
  color: white;
}

.mode-button:hover:not(.active) {
  background: #e8f5ee;
}

.level-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.level-button,
#guess-form button,
#restart-button {
  padding: 16px 18px;
  border: none;
  background: #4b9168;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
  font-weight: 600;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.level-button {
  padding: 10px 22px;
  font-size: 0.9rem;
  border-radius: 8px;
}

.level-button:hover,
#guess-form button:hover,
#restart-button:hover {
  background: #3e7c57;
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

#game-screen {
  margin-top: 24px;
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  align-items: start;
}

.image-panel {
  background: white;
  border-radius: 20px;
  border: 1px solid #d7e8d7;
  padding: 12px;
  box-shadow: 0 20px 40px rgba(55, 96, 55, 0.08);
}

.image-panel img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
}

.guess-panel {
  background: white;
  border-radius: 24px;
  border: 1px solid #d7e8d7;
  padding: 22px;
  box-shadow: 0 18px 36px rgba(55, 96, 55, 0.06);
}

#guess-form {
  display: grid;
  gap: 18px;
}

#guess-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: #234123;
}

#guess-form input {
  padding: 14px;
  font-size: 16px;
  border-radius: 14px;
  border: 1px solid #bcd5b7;
  background: #f7fbf7;
  width: 100%;
  max-width: 280px;
  -webkit-appearance: none;
  appearance: none;
}

#guess-form button {
  width: 100%;
  max-width: 280px;
  display: block;
}

#message {
  margin-top: 18px;
  min-height: 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

#message.success {
  color: #1d6d2f;
}

#message.error {
  color: #9f2a1f;
}

#answer-reveal {
  margin-top: 10px;
  padding: 10px 14px;
  background: #f0f7f0;
  border: 1px solid #c5ddc5;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2a4a2a;
  line-height: 1.4;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

#restart-button {
  background: #88b77f;
  padding: 10px 16px;
  font-size: 0.9rem;
}

#round-indicator {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #3e7c57;
  margin-bottom: 12px;
}

#timer-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

#timer-count {
  font-size: 1.2rem;
  font-weight: 800;
  color: #4b9168;
  min-width: 2ch;
  text-align: right;
  transition: color 0.3s;
}

#timer-count.urgent {
  color: #c0392b;
}

#timer-bar-track {
  flex: 1;
  height: 8px;
  background: #d7e8d7;
  border-radius: 4px;
  overflow: hidden;
}

#timer-bar {
  height: 100%;
  width: 100%;
  background: #4b9168;
  border-radius: 4px;
  transition: width 1s linear, background-color 0.3s;
}

#timer-bar.urgent {
  background: #c0392b;
}

#navigation-buttons {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

#next-round-button {
  width: 100%;
  max-width: 280px;
  padding: 16px 18px;
  border: none;
  background: #4b9168;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
  font-weight: 600;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#next-round-button:hover {
  background: #3e7c57;
  transform: translateY(-1px);
}

#next-round-button:disabled {
  background: #a0b89a;
  cursor: not-allowed;
  opacity: 0.65;
}

#next-round-button:disabled:hover {
  background: #a0b89a;
  transform: none;
}

#score-screen {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  border: 1px solid #d7e8d7;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(55, 96, 55, 0.1);
}

.score-container h2 {
  margin: 0 0 28px;
  font-size: 2rem;
  color: #1a2f1a;
}

.final-score {
  font-size: 3.5rem;
  font-weight: 800;
  color: #4b9168;
  margin: 24px 0 32px;
  letter-spacing: -0.02em;
}

#score-dialog {
  font-size: 1.05rem;
  color: #3a5a3a;
  margin: 0 0 24px;
  line-height: 1.5;
  max-width: 380px;
  margin-inline: auto;
}

#play-again-button {
  margin-top: 24px;
  width: 100%;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}

#guess-form button:disabled,
#guess-form input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Leaderboard ─────────────────────────────────────── */
.leaderboard-note {
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: #6b7280;
  letter-spacing: 0.01em;
}

.period-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}

.period-pill {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  background: #eef2ef;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}

.period-pill:hover { background: #dfe7e1; }

.period-pill.active {
  background: #4b9168;
  color: white;
}

.period-select {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  cursor: pointer;
}

.leaderboard-wrap {
  overflow-x: auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  white-space: nowrap;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ── Group header row ── */
.leaderboard-table .header-groups th {
  padding: 18px 14px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
  background: white;
  border: none;
  text-align: center;
}

.leaderboard-table .header-groups th.rank-th {
  color: #d1d5db;
}

/* Difficulty group accent — colored top border + label color */
.leaderboard-table th.group-header.grp-easy   { border-top: 3px solid #4b9168; color: #3a7a57; }
.leaderboard-table th.group-header.grp-normal { border-top: 3px solid #3b7ddd; color: #2d6bc4; }
.leaderboard-table th.group-header.grp-hard   { border-top: 3px solid #e07b2a; color: #c06820; }
.leaderboard-table th.group-header.grp-sicko  { border-top: 3px solid #9b43c8; color: #7d34a3; }

/* Sub-header cells carry the group top accent too */
.leaderboard-table .header-subs th.grp-easy   { border-top: 3px solid #4b9168; }
.leaderboard-table .header-subs th.grp-normal { border-top: 3px solid #3b7ddd; }
.leaderboard-table .header-subs th.grp-hard   { border-top: 3px solid #e07b2a; }
.leaderboard-table .header-subs th.grp-sicko  { border-top: 3px solid #9b43c8; }

/* ── Sub-header row ── */
.leaderboard-table .header-subs th {
  padding: 4px 14px 14px;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #b0bac4;
  background: white;
  border-bottom: 1px solid #e9ecef;
  text-align: center;
}

/* ── All cells ── */
.leaderboard-table th,
.leaderboard-table td {
  padding: 11px 14px;
  text-align: center;
  border: none;
  border-bottom: 1px solid #f3f4f6;
}

/* Player + rank columns left-aligned */
.leaderboard-table .rank-th,
.leaderboard-table td.rank-col { text-align: center; }

.leaderboard-table th.sortable { cursor: pointer; user-select: none; }

.leaderboard-table th.sortable a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.leaderboard-table th.sortable:hover a { opacity: 0.75; }

/* Active sort column — green text, no background */
.leaderboard-table th.sort-active { color: #4b9168; }
.leaderboard-table th.sort-active a { color: #4b9168; }

.leaderboard-table .sort-arrow { margin-left: 2px; font-size: 0.8em; }

/* ── Body ── */
.leaderboard-table td.rank-col {
  font-size: 0.78rem;
  font-weight: 500;
  color: #c9d1d9;
  width: 36px;
}

.leaderboard-table td.rank-1 { color: #d4af37; font-weight: 700; }
.leaderboard-table td.rank-2 { color: #9ea3a8; font-weight: 700; }
.leaderboard-table td.rank-3 { color: #a0673a; font-weight: 700; }

.leaderboard-table td.player-col {
  font-weight: 600;
  color: #111827;
  text-align: left;
  padding-left: 4px;
}

.leaderboard-table td.player-col.streak-bronze { color: #a0673a; font-weight: 700; }
.leaderboard-table td.player-col.streak-silver { color: #7a8a96; font-weight: 700; }
.leaderboard-table td.player-col.streak-gold   { color: #b8860b; font-weight: 700; }

.leaderboard-table td.score-total {
  font-weight: 700;
  color: #1a2f1a;
}

.leaderboard-table td.perfect-days-col,
.leaderboard-table td.perfect-streak-col {
  font-weight: 700;
  font-size: 0.9rem;
}

.leaderboard-table tbody tr:nth-child(even) td { background: #fafafa; }
.leaderboard-table tbody tr:last-child td { border-bottom: none; }

.leaderboard-table tbody tr:hover td {
  background: #f0faf5;
  transition: background 0.12s;
}

/* ── Pagination ──────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}

.page-btn {
  display: inline-block;
  padding: 7px 20px;
  border-radius: 999px;
  background: #4b9168;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}

.page-btn:hover { background: #3a6e4e; }

.page-btn.disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: default;
  pointer-events: none;
}

.page-info {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
  min-width: 90px;
  text-align: center;
}

.leaderboard-empty {
  background: white;
  border-radius: 16px;
  padding: 56px 32px;
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

/* ── Ad units ────────────────────────────────────────── */
.page-ad-wrap {
  margin-top: 32px;
  min-height: 90px;
}

.score-ad-wrap {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
  min-height: 90px;
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  margin-top: 48px;
  padding: 20px 0 28px;
  text-align: center;
  border-top: 1px solid #d4e7d4;
  color: #5a7a5a;
  font-size: 0.82rem;
  line-height: 1.8;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #4b9168;
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

.disclaimer {
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
}

/* ── Static pages (About, Contact) ──────────────────── */
.static-page-content {
  max-width: 680px;
  line-height: 1.7;
}

.static-page-content h2 {
  margin-top: 32px;
  margin-bottom: 8px;
  font-size: 1.15rem;
  color: #1a2f1a;
}

.static-page-content p,
.static-page-content ul {
  margin: 0 0 16px;
  color: #3a4f3a;
}

.static-page-content ul {
  padding-left: 20px;
}

.static-page-content li {
  margin-bottom: 6px;
}

.static-page-content a {
  color: #4b9168;
  font-weight: 600;
  text-decoration: none;
}

.static-page-content a:hover {
  text-decoration: underline;
}

/* ── Tablet ──────────────────────────────────────────── */
@media (max-width: 768px) {
  main {
    padding: 20px 16px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .image-panel img {
    max-height: 380px;
  }

  #guess-form input,
  #guess-form button,
  #next-round-button {
    max-width: 100%;
  }
}

/* ── Phone ───────────────────────────────────────────── */
@media (max-width: 480px) {
  main {
    padding: 14px 12px;
  }

  header {
    margin-bottom: 16px;
  }

  .header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-right {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  #login-dropdown-wrap,
  #user-indicator {
    width: 100%;
  }

  .user-actions {
    margin-left: auto;
  }

  .login-dropdown {
    width: calc(100vw - 28px);
    right: auto;
    left: 0;
  }

  .settings-dropdown {
    width: calc(100vw - 28px);
    right: 0;
  }

  .image-panel {
    padding: 8px;
  }

  .image-panel img {
    max-height: 340px;
    border-radius: 10px;
  }

  .guess-panel {
    padding: 16px;
    border-radius: 18px;
  }

  #guess-form {
    gap: 14px;
  }

  #guess-form input {
    padding: 12px;
    border-radius: 10px;
  }

  #guess-form button,
  #next-round-button {
    padding: 14px;
    border-radius: 10px;
  }

  #score-screen {
    padding: 32px 18px;
  }

  .score-container h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }

  .final-score {
    font-size: 2.6rem;
    margin: 16px 0 20px;
  }

  #score-dialog {
    font-size: 0.95rem;
  }

  #play-again-button {
    max-width: 100%;
  }

  .label-row {
    margin-bottom: 12px;
  }
}

/* ── Settings panel ── */
#settings-wrap {
  position: relative;
}

.settings-toggle-btn {
  padding: 5px 9px;
  border: 1px solid #b5d4b5;
  background: transparent;
  color: #4b9168;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}

.settings-toggle-btn:hover {
  background: #e8f5ee;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid #d4e7d4;
  border-radius: 14px;
  padding: 18px 20px;
  width: 280px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  z-index: 200;
  display: grid;
  gap: 12px;
}

.settings-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1a2e1a;
}

.settings-dropdown label {
  display: grid;
  gap: 5px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a2e1a;
}

.settings-dropdown input {
  padding: 10px 12px;
  border: 1px solid #b5d4b5;
  border-radius: 8px;
  font-size: 1rem;
  background: #f9fcf9;
  width: 100%;
  box-sizing: border-box;
}

.settings-dropdown input:focus {
  outline: none;
  border-color: #4b9168;
  box-shadow: 0 0 0 3px rgba(75, 145, 104, 0.15);
}

.settings-divider {
  border: none;
  border-top: 1px solid #e0ede0;
  margin: 2px 0;
}

/* ── Forgot password link ── */
.forgot-pw-btn {
  background: none;
  border: none;
  padding: 0;
  color: #4b9168;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  font-family: inherit;
}

.forgot-pw-btn:hover {
  color: #3a6e4e;
}

/* ── Reset password page ── */
.reset-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d4e7d4;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 440px;
  box-shadow: 0 16px 40px rgba(46, 92, 46, 0.08);
}

.reset-heading {
  margin: 0 0 24px;
  font-size: 1.5rem;
  color: #1a2f1a;
}

.reset-form {
  display: grid;
  gap: 16px;
}

.reset-label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1a2e1a;
}

.reset-label input {
  padding: 12px;
  border: 1px solid #b5d4b5;
  border-radius: 8px;
  font-size: 1rem;
  background: #f9fcf9;
}

.reset-label input:focus {
  outline: none;
  border-color: #4b9168;
  box-shadow: 0 0 0 3px rgba(75, 145, 104, 0.15);
}

.reset-expired-msg {
  color: #5a7a5a;
  line-height: 1.6;
  margin: 0 0 20px;
}

.reset-home-btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

/* ── Device policy note on score screen ── */
.device-flag-msg {
  margin: 14px auto 0;
  max-width: 340px;
  font-size: 0.78rem;
  color: #7a9a7a;
  line-height: 1.4;
}

.device-flag-msg.flagged {
  color: #9f2a1f;
  font-weight: 600;
}

/* ── View today's results button ── */
#summary-btn-wrap {
  margin-top: 16px;
}

.view-summary-btn {
  padding: 10px 22px;
  background: #4b9168;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.view-summary-btn:hover:not(.locked) {
  background: #3a6e4e;
}

.view-summary-btn.locked {
  background: #b8ccb8;
  color: #e8f0e8;
  cursor: default;
}

.summary-btn-msg {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: #7a9a7a;
  min-height: 1.2em;
}

/* ── Daily summary modal ─────────────────────────────────────── */
#daily-summary-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

#daily-summary-overlay.hidden {
  display: none;
}

#daily-summary-modal {
  background: #fff;
  border-radius: 18px;
  padding: 32px 36px 28px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
}

#daily-summary-modal h2 {
  font-size: 1.5rem;
  color: #1d3d1d;
  margin: 0 0 4px;
}

.summary-date {
  font-size: 0.9rem;
  color: #5a7a5a;
  margin: 0 0 20px;
}

.summary-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.summary-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 10px;
  background: #f4faf4;
  border-radius: 10px;
  padding: 8px 14px;
}

.summary-level {
  font-weight: 600;
  font-size: 0.875rem;
  color: #2e5c2e;
  text-align: left;
}

.summary-dots {
  font-size: 1.25rem;
  letter-spacing: 2px;
  text-align: center;
}

.summary-score {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1d3d1d;
  white-space: nowrap;
}

.summary-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1d3d1d;
  margin: 0 0 8px;
}

.summary-message {
  font-size: 0.9rem;
  color: #4a704a;
  margin: 0 0 22px;
  font-style: italic;
}

.summary-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.summary-share-btn {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.summary-share-btn:hover {
  background: #222;
}

.summary-close-btn {
  background: transparent;
  color: #4a704a;
  border: 1px solid #a8c8a8;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.summary-close-btn:hover {
  background: #f0f8f0;
}

/* ── Shinnecock leaderboard level badges ─────────────── */
.level-badge {
  font-weight: 700;
  font-size: 0.82rem;
}
.level-badge-easy   { color: #3a7a57; }
.level-badge-normal { color: #2d6bc4; }
.level-badge-hard   { color: #c06820; }
.level-badge-sicko  { color: #7d34a3; }

/* ── Shinnecock / US Open mode ───────────────────────── */
#shinnecock-screen {
  margin-top: 24px;
}

#shinnecock-score-screen {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  border: 1px solid #d7e8d7;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(55, 96, 55, 0.1);
  margin-top: 24px;
}

.shinn-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#shinn-progress {
  font-size: 1.1rem;
  font-weight: 700;
  color: #3e7c57;
}

.shinn-timer {
  font-size: 1.2rem;
  font-weight: 800;
  color: #4b9168;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.shinn-buttons-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.shinn-prompt {
  font-weight: 700;
  color: #234123;
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.shinn-hole-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.shinn-hole-btn {
  padding: 14px 4px;
  border: 2px solid #4b9168;
  background: transparent;
  color: #4b9168;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.shinn-hole-btn:hover:not(:disabled) {
  background: #e8f5ee;
}

.shinn-hole-btn.correct {
  background: #2e7d52;
  border-color: #2e7d52;
  color: white;
  cursor: default;
}

.shinn-hole-btn.incorrect {
  background: #9f2a1f;
  border-color: #9f2a1f;
  color: white;
  cursor: default;
}

.shinn-hole-btn:disabled {
  opacity: 1;
  cursor: default;
  pointer-events: none;
}

.shinn-time-result {
  font-size: 1.1rem;
  color: #3a5a3a;
  margin: 0 0 12px;
  font-weight: 600;
}

.shinn-lb-msg {
  font-size: 0.88rem;
  font-weight: 600;
  color: #5a7a5a;
  margin: 8px 0 0;
  min-height: 1.2em;
}

.shinn-lb-msg.success { color: #1d6d2f; }
.shinn-lb-msg.flagged { color: #9f2a1f; font-weight: 600; }

#shinn-feedback {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  margin-top: 12px;
}

#shinn-feedback.fb-correct {
  background: #d4edda;
  color: #1d6d2f;
  border: 1px solid #b8ddc8;
}

#shinn-feedback.fb-incorrect {
  background: #fce8e8;
  color: #9f2a1f;
  border: 1px solid #f0b8bc;
}

@media (max-width: 480px) {
  #shinnecock-score-screen {
    padding: 32px 18px;
  }

  .shinn-hole-grid {
    gap: 6px;
  }

  .shinn-hole-btn {
    padding: 12px 2px;
    font-size: 0.9rem;
    border-radius: 8px;
  }
}

/* ── US Open leaderboard tabs ─────────────────────────────────────────────── */
.lb-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.lb-tab {
  padding: 7px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  color: #4b7a5a;
  background: #f0f9f2;
  border: 1.5px solid #c8e6d4;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lb-tab:hover:not(.active) {
  background: #dff0e5;
}

.lb-tab.active                { background: #4b9168; border-color: #4b9168; color: #fff; }
.lb-tab-easy.active           { background: #3a7a57; border-color: #3a7a57; }
.lb-tab-normal.active         { background: #2d6bc4; border-color: #2d6bc4; }
.lb-tab-hard.active           { background: #c06820; border-color: #c06820; }
.lb-tab-sicko.active          { background: #7d34a3; border-color: #7d34a3; }



