/* rosette.css — the medal a rescued planet gifts (js/rosette.js).
   A fluted ring of the planet's color around a glossy core with a star. The
   whole thing scales from one variable, --rs, so the profile tray and the
   in-scene award share a single look. */

.rosette {
  --rc: #E8C16A;
  --rs: 40px;
  position: relative;
  width: var(--rs); height: var(--rs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rosette::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
    var(--rc) 0deg 11deg,
    color-mix(in srgb, var(--rc) 52%, #0A0820) 11deg 22deg);
  box-shadow: 0 0 calc(var(--rs) * 0.3) color-mix(in srgb, var(--rc) 45%, transparent);
}
.rosette-core {
  position: relative;
  z-index: 1;
  width: 60%; height: 60%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 34% 30%, #fff 0%, var(--rc) 52%, color-mix(in srgb, var(--rc) 45%, #0A0820) 100%);
  box-shadow: inset calc(var(--rs) * -0.08) calc(var(--rs) * -0.1) calc(var(--rs) * 0.2) rgba(6, 5, 18, 0.5),
    inset calc(var(--rs) * 0.05) calc(var(--rs) * 0.05) calc(var(--rs) * 0.12) rgba(255, 255, 255, 0.25);
}
.rosette-core::after {
  content: '★';
  font-size: calc(var(--rs) * 0.28);
  line-height: 1;
  color: rgba(255, 252, 244, 0.95);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

/* ---------- The in-scene award: the citizens hand it over ---------- */

.rosette-award {
  position: fixed;
  inset: 0;
  z-index: 25; /* above the stage, below the overlays and their chrome */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 13vh;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.rosette-award.show { opacity: 1; }
.rosette-award .rosette {
  --rs: clamp(46px, 10vh, 68px);
  filter: drop-shadow(0 0 20px color-mix(in srgb, var(--rc) 55%, transparent));
  animation: rosette-pop 0.75s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}
/* A slow shimmer sweeps the ribbon, the same restrained motion as the
   scanner screens. */
.rosette-award .rosette::after {
  content: '';
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 255, 255, 0.35) 30deg, transparent 70deg);
  mix-blend-mode: screen;
  animation: rosette-shine 4.5s linear infinite;
  pointer-events: none;
}
@keyframes rosette-pop {
  0%   { transform: scale(0.2) rotate(-45deg); opacity: 0; }
  55%  { transform: scale(1.14) rotate(7deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes rosette-shine {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rosette-award .rosette { animation: none; }
  .rosette-award .rosette::after { animation: none; display: none; }
}
