/* ——— Learning Lane (js/campus.js, js/screens/campus.js) ———
   A street of places, one per subject: the building, its sign, its host and
   project, and a foot with the sparkle meter and the race button. */

.cp-lane {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 22px 18px;
  padding: 8px 0 28px;
}

.cp-place {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 14px;
  border: 3px solid var(--outline);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
  animation: km-rise 0.45s var(--bounce) backwards;
  animation-delay: calc(var(--i) * 70ms);
}

.cp-go {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s var(--bounce);
}
.cp-go:hover { transform: translateY(-3px) scale(1.02); }
.cp-go:active { transform: scale(0.97); }

.cp-art { width: min(100%, 240px); height: auto; overflow: visible; }
.cp-win.lit { filter: drop-shadow(0 0 6px rgba(255, 213, 77, 0.9)); }
.cp-piece.have { animation: cp-pop 0.5s var(--bounce) backwards; animation-delay: calc(var(--i) * 90ms + 250ms); transform-box: fill-box; transform-origin: center; }
.cp-gear { animation: cp-spin 6s linear infinite; }
.cp-smoke { animation: cp-puff 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

.cp-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -4px;
  padding: 4px 14px 5px;
  border: 3px solid var(--outline);
  border-radius: 14px;
  background: #fff;
  line-height: 1.15;
}
.cp-sign b { font-size: 19px; }
.cp-sign small { font-size: 14px; color: var(--ink-soft); font-weight: 500; }

.cp-ribbon {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 1;
  translate: -50% 0;
  padding: 3px 12px;
  border: 2.5px solid var(--outline);
  border-radius: 999px;
  background: var(--gold, #ffd54d);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  animation: cp-bob 1.8s ease-in-out infinite;
}

.cp-host { margin: 0; font-size: 15px; text-align: center; color: var(--ink-soft); line-height: 1.25; }
.cp-host span { font-size: 1.25em; }

.cp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.cp-foot .sparkle-meter { margin-left: 0; font-size: 15px; }
.cp-next { font-size: 13px; color: var(--ink-soft); }
.cp-race {
  padding: 5px 12px;
  border: 2.5px solid var(--outline);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.cp-race:hover { background: var(--lilac-soft); }

@keyframes cp-pop { from { transform: scale(0); } }
@keyframes cp-spin { to { rotate: 360deg; } }
@keyframes cp-puff { 50% { translate: 4px -6px; opacity: 0.6; } }
@keyframes cp-bob { 50% { translate: -50% -3px; } }

@media (prefers-reduced-motion: reduce) {
  .cp-place, .cp-piece.have, .cp-gear, .cp-smoke, .cp-ribbon { animation: none; }
}

/* ——— The weekly crown on Home (js/screens/home.js) ——— */

.week-crown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25em 0.5em;
  width: fit-content;
  max-width: 100%;
  margin: 0.5em 0 0 !important;
  padding: 0.35em 0.7em;
  border: 3px solid var(--outline);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: max(12px, 0.95cqw) !important;
  color: var(--ink) !important;
}
.wc-icon { font-size: 1.3em; }
.wc-slots { display: inline-flex; gap: 0.2em; }
.wc-slots i { font-style: normal; font-size: 1.15em; opacity: 0.35; }
.wc-slots i.have { opacity: 1; animation: cp-pop 0.4s var(--bounce) backwards; animation-delay: calc(var(--i) * 80ms + 300ms); display: inline-block; }
.week-crown small { font-size: 0.85em; color: var(--ink-soft); }
.week-crown.full { background: linear-gradient(135deg, #fff6c2, #ffe7f2); }
@media (orientation: portrait) {
  .week-crown { font-size: max(12px, 3cqw) !important; }
  .week-crown small { display: none; }
}
