/* Game shell: map scene, stops, chips, sheets, badges. */

.game-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; }
.game-bar h1 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.chips { display: flex; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--icbc-blue); color: #fff; border: none; border-radius: 999px;
  padding: 0.3rem 0.7rem; font-size: 0.85rem; font-weight: 600; font-family: inherit; cursor: pointer;
}
.chip svg { width: 14px; height: 14px; }

.map-wrap { position: relative; max-width: 480px; margin: 0 auto; }
.map-scene { display: block; width: 100%; height: auto; }

.stop {
  position: absolute; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid #fff; background: var(--icbc-blue);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; font-family: inherit;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.stop svg { width: 30px; height: 30px; }
.stop.done { background: var(--green); }
.stop.locked { background: #fff; border-color: #B9C4CE; cursor: pointer; }
.stop.locked svg { opacity: 0.55; }
.stop.trophy { background: #FFD34D; border-color: #fff; }
.stop:focus-visible { outline: 3px solid var(--icbc-navy); outline-offset: 2px; }
.stop-stars { position: absolute; left: 50%; transform: translateX(-50%); bottom: -16px; display: flex; gap: 1px; }
.stop-stars svg { width: 13px; height: 13px; }
.map-mascot { position: absolute; width: 64px; transform: translate(-50%, -100%); pointer-events: none; }

.mode-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem;
  max-width: 480px; margin: 0.75rem auto 0; padding: 0 1rem 2rem;
}
.mode-chip {
  background: #fff; border: 2px solid var(--icbc-blue); border-radius: var(--radius);
  color: var(--icbc-navy); font-weight: 600; font-size: 0.8rem; font-family: inherit;
  padding: 0.6rem 0.25rem; cursor: pointer; text-align: center; min-height: 52px;
}
.mode-chip:hover { background: #EAF4FB; }

.chip-region { background: #FFFFFF; color: var(--icbc-navy); }
.disclaimer {
  max-width: 480px; margin: 0 auto; padding: 0 1rem 2.5rem;
  font-size: 0.72rem; color: var(--muted); text-align: center;
}

/* ---- site layout: framed app card + desktop info sidebar + footer ---- */
body { background: #EAF1F8; }

.site-main {
  max-width: 1060px; margin: 0 auto; padding: 1.25rem 1rem 0;
  display: flex; gap: 2rem; align-items: flex-start; justify-content: center;
}
.app-column {
  width: 100%; max-width: 480px; flex-shrink: 0;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 59, 113, 0.10);
}
.app-column .map-wrap { max-width: none; }
.app-column .mode-bar { max-width: none; margin-top: 0.5rem; padding-bottom: 1.25rem; }

.info-column { display: none; }
@media (min-width: 900px) {
  .info-column {
    display: block; flex: 1 1 0; max-width: 400px;
    position: sticky; top: 76px; padding-top: 0.25rem;
    max-height: calc(100vh - 90px); overflow-y: auto;
  }
}
.info-hero h2 { margin: 0 0 0.5rem; font-size: 1.6rem; color: var(--icbc-navy); line-height: 1.2; }
.info-hero p { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.info-block {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.info-block h3 { margin: 0 0 0.6rem; font-size: 1rem; color: var(--icbc-navy); }
.info-steps, .info-list { margin: 0; padding-left: 1.15rem; color: var(--text); font-size: 0.9rem; line-height: 1.5; }
.info-steps li { margin-bottom: 0.55rem; }
.info-steps strong { color: var(--icbc-navy); }
.info-list li { margin-bottom: 0.4rem; }

.site-footer {
  max-width: 1060px; margin: 1.5rem auto 0; padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid var(--border); text-align: center;
}
.footer-credit { margin: 0 0 0.6rem; font-size: 1rem; color: var(--icbc-navy); }
.footer-credit strong { color: var(--icbc-blue); }
.footer-links { margin: 0 0 0.6rem; }
.footer-links a { color: var(--icbc-blue); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.footer-links a:hover { text-decoration: underline; }
.site-footer .disclaimer { max-width: 640px; padding: 0 0 0.6rem; }
.footer-copy { margin: 0; font-size: 0.75rem; color: var(--muted); }

/* advertise card (sidebar) */
.info-ad-block { border-color: var(--icbc-blue); background: #F4F9FE; }
.info-ad { margin: 0 0 0.85rem; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.info-ad-btn {
  display: inline-block; background: var(--icbc-blue); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 0.85rem; padding: 0.5rem 0.9rem; border-radius: var(--radius);
}
.info-ad-btn:hover { background: var(--icbc-navy); }

/* contact page */
.contact-main { max-width: 640px; margin: 0 auto; padding: 2rem 1rem; }
.contact-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 2rem 1.75rem; box-shadow: 0 6px 24px rgba(0, 59, 113, 0.08);
}
.contact-card h2 { margin: 0 0 1rem; color: var(--icbc-navy); font-size: 1.6rem; }
.contact-card p { color: var(--text); line-height: 1.6; margin: 0 0 1rem; }
.contact-lead { font-size: 1.05rem; }
.contact-actions { margin: 1.5rem 0 1rem; }
.contact-actions .mode-btn { max-width: 300px; }
.contact-fallback { color: var(--muted); font-size: 0.9rem; }
.contact-fallback #contact-addr { color: var(--icbc-navy); font-weight: 600; }
.home-link { color: inherit; text-decoration: none; }
.link-back { color: var(--icbc-blue); font-weight: 600; text-decoration: none; }
.link-back:hover { text-decoration: underline; }
.picker-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem;
  width: 100%; background: #fff; border: 1px solid var(--border);
  padding: 0.75rem; border-radius: var(--radius); cursor: pointer;
  font-family: inherit; font-size: 0.95rem; color: var(--text); min-height: 48px;
}
.picker-row:hover { border-color: var(--icbc-blue); background: #fafcfe; }
.picker-row .picker-class { color: var(--muted); font-size: 0.8rem; flex-shrink: 0; }
.picker-row strong { font-weight: 600; color: var(--icbc-navy); }

.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0, 22, 43, 0.45); z-index: 40;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  background: #fff; border-radius: 16px 16px 0 0; padding: 1.25rem 1rem 1.5rem;
  max-width: 520px; margin: 0 auto; max-height: 75vh; overflow-y: auto;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}
.sheet h2 { margin: 0 0 0.25rem; font-size: 1.15rem; color: var(--icbc-navy); display: flex; align-items: center; gap: 0.5rem; }
.sheet h2 svg { width: 30px; height: 30px; }
.sheet .sheet-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 1rem; }
.sheet .sheet-stars { display: flex; gap: 3px; margin: 0.5rem 0 1rem; }
.sheet .sheet-stars svg { width: 26px; height: 26px; }
.sheet-actions { display: flex; flex-direction: column; gap: 0.5rem; }

.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.badge-cell { text-align: center; font-size: 0.72rem; color: var(--muted); }
.badge-cell .badge-medal {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 0.3rem;
  background: #FFD34D; display: flex; align-items: center; justify-content: center;
}
.badge-cell .badge-medal svg { width: 30px; height: 30px; }
.badge-cell.locked .badge-medal { background: #E7ECF1; }
.badge-cell.locked .badge-medal svg { opacity: 0.35; }
.badge-cell .badge-name { font-weight: 600; color: var(--icbc-navy); }
.badge-cell.locked .badge-name { color: var(--muted); }

@keyframes stop-pop { 0% { transform: translate(-50%, -50%) scale(0); } 70% { transform: translate(-50%, -50%) scale(1.2); } 100% { transform: translate(-50%, -50%) scale(1); } }
.stop.pop { animation: stop-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@media (prefers-reduced-motion: reduce) { .stop.pop { animation: none !important; } }

/* Rush Hour timer bar */
.app-header.quiz-header { position: sticky; }
.challenge-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, 0.25); }
#challenge-fill { height: 100%; width: 100%; background: #FFD34D; }

/* quiz: image panel + segments + ticker */
.progress-segments { display: flex; gap: 2px; margin: 0 0 0.75rem; }
.progress-segments .seg { flex: 1; height: 6px; border-radius: 3px; background: #D6DCE2; }
.progress-segments .seg.on { background: var(--icbc-blue); }
.progress-segments .seg.good { background: var(--green); }
.progress-segments .seg.bad { background: var(--red); }

.quiz-columns { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 768px) {
  .quiz-container { max-width: 900px; }
  .quiz-columns { flex-direction: row; align-items: flex-start; gap: 1.5rem; }
  .quiz-columns .question-image { flex: 0 0 44%; margin-bottom: 0; }
  .quiz-columns .quiz-right { flex: 1; }
}

.celebrations { display: flex; flex-direction: column; gap: 0.5rem; margin: 0 0 1rem; }
.celebration-card {
  background: #fff; border: 2px solid var(--icbc-blue); border-radius: var(--radius);
  padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.75rem;
  font-weight: 600; color: var(--icbc-navy);
}
.celebration-card svg { width: 28px; height: 28px; flex-shrink: 0; }
.celebration-card.unlock { border-color: var(--green); }
.celebration-card.badge { border-color: #FFD34D; }
.big-stars { display: flex; justify-content: center; gap: 8px; margin: 0.5rem 0; }
.big-stars svg { width: 44px; height: 44px; }
.big-stars svg.earned { animation: anim-pop 0.5s cubic-bezier(0.34, 1.8, 0.5, 1) both; }
@media (prefers-reduced-motion: reduce) { .big-stars svg.earned { animation: none !important; } }

.xp-float {
  position: absolute; color: var(--green); font-weight: 700; font-size: 1rem;
  pointer-events: none; z-index: 30;
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}
@media (prefers-reduced-motion: reduce) { .xp-float { display: none !important; } }
