@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=DM+Serif+Display&display=swap');

:root {
  --primary: #FF8F00;
  --primary-dark: #FFA000;
  --primary-light: #FFB300;
  --accent: #FFC107;
  --accent-light: #FFF8E1;
  --danger: #E63946;
  --danger-light: #FFE0E3;
  --bg: #F0F4F1;
  --surface: #FFFFFF;
  --surface-alt: #F8FAF9;
  --text: #1A1A2E;
  --text-secondary: #5C6B73;
  --text-light: #9DB2BF;
  --border: #D8E2DC;
  --border-light: #EDF2EF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'DM Serif Display', serif;
}

::selection {
  background: var(--primary-light);
  color: white;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1rem;
}

.loading-screen p {
  color: var(--text-secondary);
  font-weight: 500;
}

.loading-pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* ===== ROLE SELECT ===== */
.role-select-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.role-select-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.5s ease-out;
}

.role-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.role-select-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.role-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.role-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.role-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.role-btn:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.role-btn-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.role-btn-label {
  font-weight: 700;
  font-size: 1.1rem;
  display: block;
  color: var(--text);
}

.role-btn-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: block;
  font-weight: 400;
}

/* ===== APP SHELL ===== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-logo {
  font-size: 1.5rem;
}

.header-left h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-badge {
  background: var(--accent-light);
  color: var(--primary-dark);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.switch-role-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.switch-role-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-btn:hover:not(.active) {
  color: var(--text);
  background: var(--surface-alt);
}

/* ===== MAIN ===== */
.app-main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ===== SECTION LOADING (SKELETON) ===== */
.section-loading {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-card {
  height: 80px;
  background: linear-gradient(90deg, var(--border-light) 25%, var(--surface) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-md);
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 320px;
  margin: 0 auto;
}

/* ===== HUNT SETUP ===== */
.hunt-setup {
  animation: fadeInUp 0.4s ease-out;
}

.setup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.setup-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.setup-stats {
  display: flex;
  gap: 0.5rem;
}

.stat-pill {
  background: var(--accent-light);
  color: var(--primary-dark);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.add-item-form {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.add-item-form h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-field input {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--surface);
  color: var(--text);
}

.form-field input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

.form-field-small {
  max-width: 100px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.add-btn {
  width: 100%;
}

/* ===== HUNT ITEMS LIST ===== */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hunt-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease-out both;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hunt-item-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.item-content {
  flex: 1;
  min-width: 0;
}

.item-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.item-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.item-points {
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.item-clue {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.item-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.btn-icon:hover {
  background: var(--surface-alt);
}

.btn-icon-danger:hover {
  background: var(--danger-light);
}

/* ===== EDIT FORM (inline) ===== */
.edit-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.edit-input {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  flex: 1;
  min-width: 120px;
}

.edit-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

.edit-input-small {
  max-width: 80px;
  min-width: 60px;
  flex: 0;
}

.edit-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-save {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel {
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
}

/* ===== PLAYER VIEW ===== */
.player-view {
  animation: fadeInUp 0.4s ease-out;
}

.player-stats-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-block {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-display);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

.progress-bar-container {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-bar {
  flex: 1;
  height: 10px;
  background: var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.completion-banner {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  color: white;
  text-align: center;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.4s ease-out;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.filter-btn:hover:not(.active) {
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ===== PLAYER ITEM CARDS ===== */
.player-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.player-item-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
  animation: fadeInUp 0.4s ease-out both;
  box-shadow: var(--shadow-sm);
}

.player-item-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.player-item-card.found {
  border-color: var(--primary-light);
  background: linear-gradient(135deg, rgba(82, 183, 136, 0.05), rgba(82, 183, 136, 0.02));
}

.player-item-check {
  flex-shrink: 0;
}

.check-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  transition: all 0.2s ease;
}

.check-circle.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.player-item-info {
  flex: 1;
  min-width: 0;
}

.player-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.found-name {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.player-item-clue {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.player-item-points {
  background: var(--accent-light);
  color: var(--primary-dark);
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== LEADERBOARD ===== */
.leaderboard {
  animation: fadeInUp 0.4s ease-out;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.leaderboard-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.podium {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.podium-spot {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  flex: 1;
  max-width: 180px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.podium-1 {
  border-color: #FFD700;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), var(--surface));
}

.podium-2 {
  border-color: #C0C0C0;
}

.podium-3 {
  border-color: #CD7F32;
}

.podium-you {
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.25), var(--shadow-md);
}

.podium-medal {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.35rem;
}

.podium-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
  color: var(--text);
  margin-bottom: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-score {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--primary);
  display: block;
}

.podium-found {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

/* ===== LEADERBOARD TABLE ===== */
.leaderboard-table {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-header {
  display: grid;
  grid-template-columns: 60px 1fr 80px 80px;
  padding: 0.75rem 1.25rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.table-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px 80px;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  animation: fadeInUp 0.4s ease-out both;
  transition: background 0.15s ease;
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:hover {
  background: var(--surface-alt);
}

.row-you {
  background: rgba(82, 183, 136, 0.06);
  border-left: 3px solid var(--primary);
}

.col-rank {
  font-weight: 700;
  font-size: 1rem;
}

.col-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.you-tag {
  background: var(--primary-light);
  color: white;
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 8px;
  font-weight: 700;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.completion-bar-mini {
  display: block;
  height: 4px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  max-width: 120px;
}

.completion-fill-mini {
  display: block;
  height: 100%;
  background: var(--primary-light);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.col-found {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.col-points {
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
  text-align: center;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .app-main {
    padding: 1rem;
  }

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

  .form-field-small {
    max-width: none;
  }

  .player-stats-bar {
    gap: 0.5rem;
  }

  .stat-block {
    padding: 0.75rem 0.5rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .podium {
    flex-direction: column;
    align-items: center;
  }

  .podium-spot {
    max-width: 100%;
    width: 100%;
  }

  .table-header,
  .table-row {
    grid-template-columns: 48px 1fr 60px 60px;
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
  }

  .role-select-card {
    padding: 2rem 1.5rem;
  }

  .setup-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .leaderboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .edit-form {
    flex-direction: column;
  }

  .edit-input {
    min-width: auto;
    width: 100%;
  }

  .edit-input-small {
    max-width: none;
    width: 100%;
  }

  .header-left h1 {
    font-size: 1rem;
  }

  .user-badge {
    display: none;
  }

  .filter-row {
    flex-wrap: wrap;
  }
}
```

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to Scavenger Hunt! Choose whether you're the organizer creating the hunt, or a player looking for items.", "view": "role-select", "highlight_selector": ".role-buttons", "wait_for": "user_interaction"},
  {"step": 2, "narration": "As an organizer, add items to find with a name, clue, and point value. Each item becomes a challenge for players.", "view": "organizer", "highlight_selector": ".add-item-form", "wait_for": "user_interaction"},
  {"step": 3, "narration": "Your hunt items appear in a list. You can edit or delete any item. Players will see these clues and try to find each one.", "view": "organizer", "highlight_selector": ".items-list", "wait_for": "tap_to_continue"},
  {"step": 4, "narration": "As a player, you'll see all the items to find along with their clues. Tap an item to mark it as found and earn points!", "view": "player", "highlight_selector": ".player-items-list", "wait_for": "user_interaction"},
  {"step": 5, "narration": "Track your progress with the stats bar and progress indicator. Filter items to see what's remaining.", "view": "player", "highlight_selector": ".player-stats-bar", "wait_for": "tap_to_continue"},
  {"step": 6, "narration": "The leaderboard shows all players ranked by points. A podium highlights the top 3 and a detailed table shows everyone's progress.", "view": "leaderboard", "highlight_selector": ".leaderboard", "wait_for": "tap_to_continue"}
]
-->

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary-light);
  color: var(--primary);
}

.proof-capture-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.3s ease-out;
}

.proof-capture-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.proof-capture-header h3 {
  font-size: 1rem;
  color: var(--primary-dark);
}

.proof-capture-helper,
.proof-state,
.proof-error,
.player-item-proof {
  font-size: 0.85rem;
}

.proof-capture-helper,
.proof-state,
.player-item-proof {
  color: var(--text-secondary);
}

.proof-error {
  color: var(--danger);
  margin-top: 0.75rem;
}

.proof-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.proof-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.proof-upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.proof-preview {
  margin-top: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.proof-preview img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.proof-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.player-item-proof {
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .proof-capture-header,
  .proof-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .proof-actions-row {
    flex-direction: column;
  }

  .proof-actions-row > * {
    width: 100%;
  }
}

.hunt-status-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.hunt-state-pill {
  flex-shrink: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hunt-state-pill.running { background: rgba(82, 183, 136, 0.15); color: var(--primary-dark); }
.hunt-state-pill.ended { background: rgba(230, 57, 70, 0.12); color: var(--danger); }
.hunt-state-pill.pending { background: rgba(212, 163, 115, 0.16); color: var(--primary-dark); }

.hunt-status-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.hunt-status-copy strong {
  font-size: 0.95rem;
  color: var(--text);
}

.hunt-status-copy span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hunt-timer-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.timer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.timer-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.timer-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.hunt-lock-banner {
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.hunt-lock-banner.pending {
  background: rgba(212, 163, 115, 0.12);
  color: var(--primary-dark);
  border: 1px solid rgba(212, 163, 115, 0.28);
}

.hunt-lock-banner.ended {
  background: rgba(230, 57, 70, 0.08);
  color: var(--danger);
  border: 1px solid rgba(230, 57, 70, 0.18);
}

.player-item-card.locked {
  opacity: 0.8;
}

.player-item-card.locked:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
  .hunt-status-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hunt-timer-panel {
    grid-template-columns: 1fr;
  }
}

.proof-location-card {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.proof-state-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.proof-state-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.proof-state-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.player-item-location {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.active-hunters-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.active-hunters-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.active-hunters-header h3 {
  font-size: 1rem;
  color: var(--primary-dark);
}

.active-hunters-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.active-hunters-count {
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--primary-dark);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.active-hunters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.active-hunter-pill {
  background: rgba(82, 183, 136, 0.12);
  color: var(--primary-dark);
  border: 1px solid rgba(82, 183, 136, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.active-hunters-empty {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .active-hunters-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.post-hunt-map-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.3s ease-out;
}

.post-hunt-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.post-hunt-map-header h3 {
  font-size: 1rem;
  color: var(--primary-dark);
}

.post-hunt-map-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.post-hunt-map-summary {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-end;
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--primary-dark);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.post-hunt-map-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.post-hunt-map-stat {
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.post-hunt-map-stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-display);
}

.post-hunt-map-stat-label {
  font-size: 0.74rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.post-hunt-map-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

.post-hunt-map-canvas {
  width: 100%;
  height: 320px;
}

.post-hunt-map-empty,
.post-hunt-map-empty-list {
  padding: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.post-hunt-map-list {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-hunt-map-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
}

.post-hunt-map-row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.post-hunt-map-row-main strong {
  font-size: 0.92rem;
  color: var(--text);
}

.post-hunt-map-row-main span,
.post-hunt-map-row-location {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .post-hunt-map-header,
  .post-hunt-map-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-hunt-map-summary {
    align-items: flex-start;
  }

  .post-hunt-map-stats {
    grid-template-columns: 1fr;
  }

  .post-hunt-map-canvas {
    height: 260px;
  }
}

.ai-clue-generator-panel {
  margin-bottom: 1.25rem;
}

.ai-clue-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.ai-success-text {
  margin-top: 0.5rem;
}

.ai-prompt-preview {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.generated-clues-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.generated-clue-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.generated-clue-card.selected {
  border-color: var(--primary-light);
  background: rgba(82, 183, 136, 0.04);
}

.generated-clue-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.generated-clue-select {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.generated-clue-points {
  background: var(--accent-light);
  color: var(--primary-dark);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.generated-clue-editors {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .ai-clue-fields {
    grid-template-columns: 1fr;
  }

  .generated-clue-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .generated-clue-editors {
    grid-template-columns: 1fr;
  }
}

.invite-sharing-panel {
  margin-bottom: 1.25rem;
}

.invite-link-box {
  margin-top: 0.75rem;
}

.invite-link-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.invite-link-input:focus {
  outline: none;
}

.invite-text-preview {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.invite-text-preview label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.invite-textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.hunt-invite-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.3s ease-out;
}

.hunt-invite-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.hunt-invite-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--primary-dark);
}

.hunt-invite-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hunt-invite-pill {
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--primary-dark);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hunt-invite-linkbox {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hunt-invite-linkbox label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.hunt-invite-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hunt-invite-row input {
  flex: 1;
  min-width: 220px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.hunt-invite-row input:focus {
  outline: none;
}

.hunt-invite-helper {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hunt-invite-status {
  font-size: 0.85rem;
  font-weight: 600;
}

.hunt-invite-status.success {
  color: var(--primary);
}

.hunt-invite-status.error {
  color: var(--danger);
}
