/* JSU City tutorial: Quick Start cards + Help topics (js/tutorial.js).
   One accent (gold), one text scale, 44px+ tap targets, no side-scrolling at 320px. */

#tutorialOverlay {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, #0a0a1a 0%, #0d0d2a 100%);
  z-index: 500;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color: #fff;
}
#tutorialOverlay.open { display: flex; }

/* Header: [button] [title] [spacer]. The title can shrink, so it is never cut off. */
.tut-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; min-height: 60px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: #0d0d1f;
  border-bottom: 1px solid rgba(255, 213, 79, 0.25);
}
.tut-head-btn, .tut-head-space { flex: 0 0 108px; }
.tut-head-btn {
  min-height: 44px; padding: 0 10px; white-space: nowrap;
  background: rgba(255, 213, 79, 0.1);
  border: 2px solid rgba(255, 213, 79, 0.3);
  border-radius: 10px;
  color: #ffd54f; font: 800 17px 'Nunito', sans-serif;
  cursor: pointer;
}
.tut-title {
  flex: 1; min-width: 0; margin: 0; text-align: center;
  font: 800 20px/1.2 'Nunito', sans-serif; color: #ffd54f;
  overflow-wrap: anywhere;
}

.tut-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.tut-wrap { max-width: 560px; margin: 0 auto; }

/* Shared interactive states */
#tutorialOverlay button:focus-visible,
#tutorialOverlay summary:focus-visible {
  outline: 3px solid #ffd54f; outline-offset: 2px;
}
#tutorialOverlay button { -webkit-tap-highlight-color: transparent; }

/* Quick Start: one card fills the screen; no scrolling */
.tut-card {
  min-height: 100%; max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.tut-step { text-align: center; font-size: 15px; font-weight: 800; color: rgba(255, 255, 255, 0.62); }
.tut-card-main { text-align: center; }
.tut-card-icon { font-size: 64px; line-height: 1; }
.tut-card-title {
  margin: 14px 0 10px;
  font: 900 28px/1.15 'Cinzel', serif; color: #ffd54f;
  text-wrap: balance;
}
.tut-card-text { margin: 0 0 14px; font-size: 20px; line-height: 1.5; color: #fff; text-wrap: pretty; }
.tut-chip {
  display: inline-block; padding: 10px 16px;
  background: rgba(255, 213, 79, 0.12);
  border: 2px solid rgba(255, 213, 79, 0.35);
  border-radius: 12px;
  font-size: 17px; font-weight: 800; color: #ffd54f;
}
.tut-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.tut-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.28); }
.tut-dot.on { background: #ffd54f; }
.tut-card-actions { display: flex; flex-direction: column; gap: 10px; }
.tut-primary {
  width: 100%; min-height: 56px; padding: 0 16px;
  border: none; border-radius: 14px;
  background: linear-gradient(135deg, #ffd54f, #f0a500);
  color: #1a1a2e; font: 900 20px 'Nunito', sans-serif;
  cursor: pointer;
}
.tut-secondary {
  width: 100%; min-height: 48px; padding: 0 16px;
  background: transparent;
  border: 2px solid rgba(255, 213, 79, 0.3); border-radius: 12px;
  color: #ffd54f; font: 800 17px 'Nunito', sans-serif;
  cursor: pointer;
}

/* Help list */
.tut-intro { margin: 0 0 16px; font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, 0.85); }
.tut-group { margin: 20px 0 8px; font-size: 15px; font-weight: 800; color: rgba(255, 255, 255, 0.62); }
.tut-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tut-row {
  width: 100%; min-height: 64px; padding: 10px 14px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 213, 79, 0.15); border-radius: 14px;
  color: #fff; font-family: 'Nunito', sans-serif;
  cursor: pointer;
}
.tut-row:hover { background: rgba(255, 213, 79, 0.08); border-color: rgba(255, 213, 79, 0.35); }
.tut-row-icon { flex: 0 0 auto; font-size: 30px; line-height: 1; }
.tut-row-text { flex: 1; min-width: 0; }
.tut-row-title { display: block; font-size: 19px; font-weight: 800; }
.tut-row-short { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.68); }
.tut-row-arrow { flex: 0 0 auto; font-size: 26px; color: rgba(255, 213, 79, 0.6); }
.tut-replay { margin-top: 20px; }

/* Topic page */
.tut-summary { margin: 0 0 10px; font-size: 19px; line-height: 1.45; color: #fff; text-wrap: pretty; }
.tut-points { list-style: none; margin: 0; padding: 0; }
.tut-points li {
  position: relative; padding: 6px 0 6px 26px;
  font-size: 17px; line-height: 1.45; color: rgba(255, 255, 255, 0.85);
}
.tut-points li::before { content: '\25B8'; position: absolute; left: 6px; color: #ffd54f; font-weight: 900; }
.tut-points strong, .tut-rules strong { color: #fff; }
.tut-more {
  margin-top: 12px;
  border: 2px solid rgba(255, 213, 79, 0.25); border-radius: 14px;
  background: rgba(255, 213, 79, 0.05);
}
.tut-more summary {
  min-height: 48px; padding: 12px 16px;
  font-size: 18px; font-weight: 800; color: #ffd54f;
  cursor: pointer; list-style-position: inside;
}
.tut-rules { padding: 0 16px 14px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }
.tut-rules h4 { margin: 14px 0 4px; font-size: 16px; font-weight: 800; color: #ffd54f; }
.tut-rules p { margin: 0 0 8px; }
.tut-rules ul { margin: 0 0 8px; padding-left: 20px; }
.tut-rules li { margin: 4px 0; }
.tut-nav { display: flex; gap: 10px; margin-top: 18px; }
.tut-nav-btn {
  flex: 1; min-height: 48px; padding: 0 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 213, 79, 0.2); border-radius: 12px;
  color: #fff; font: 800 16px 'Nunito', sans-serif;
  cursor: pointer;
}
.tut-nav-btn:disabled { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  #tutorialOverlay * { transition: none !important; animation: none !important; }
}

/* "How the game and points work" link at the top of Help */
.tut-guide-link {
  display: block; margin: 0 0 16px; padding: 14px 16px; text-decoration: none;
  background: rgba(255, 213, 79, 0.14); border: 2px solid #ffd54f; border-radius: 12px; color: #fff;
}
.tut-guide-title { display: block; font: 800 19px 'Nunito', sans-serif; color: #ffd54f; }
.tut-guide-sub { display: block; margin-top: 2px; font-size: 16px; color: rgba(255, 255, 255, 0.85); }
