/* Celebrations, level-ups and the Nova wardrobe. */

/* ------------------------------------------------------------------ celebration overlay */
.celebrate {
  position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--bg, #14171d) 82%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  overflow-y: auto;
}
.cel-card {
  width: min(420px, 100%); display: grid; justify-items: center; gap: 12px; text-align: center;
  padding: 22px 20px 20px; border-radius: 28px;
  background: var(--bg-2, #181c23); border: 1px solid var(--line, #2e3440);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
@media (max-width: 560px) {
  .celebrate { padding: 0; align-items: end; }
  .cel-card { width: 100%; border-radius: 28px 28px 0 0; border-width: 1px 0 0; padding: 24px 22px calc(22px + env(safe-area-inset-bottom)); min-height: min(62%, 560px); align-content: center; box-shadow: none; }
}
.cel-stage { position: relative; width: 264px; height: 232px; margin-bottom: 4px; }
.cel-rays {
  position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--mint, #3ddc97) 24%, transparent) 0 10deg, transparent 10deg 30deg);
  -webkit-mask-image: radial-gradient(circle, #000 28%, transparent 70%); mask-image: radial-gradient(circle, #000 28%, transparent 70%);
}
.cel-nova { position: absolute; left: 6px; top: 8px; width: 160px; height: 160px; }
.cel-nova svg { width: 100%; height: 100%; display: block; }
.cel-emblem { position: absolute; right: 0; bottom: 4px; width: 118px; height: 118px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .3)); }
.cel-emblem svg { width: 100%; height: 100%; display: block; }
.cel-emblem .medal { width: 100%; height: 100%; }
.cel-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ok-text, #4fd1ae); }
.cel-title { font-size: 1.4rem; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--text, #edf0f5); max-width: 22ch; text-wrap: balance; }
.cel-second { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 16px; background: var(--surface, #1c2028); border: 1px solid var(--line, #2e3440); font-size: .92rem; color: var(--text-2, #aab2c0); }
.cel-second b { color: var(--text, #edf0f5); }
.cel-mini { width: 40px; height: 40px; flex: none; }
.cel-mini svg { width: 100%; height: 100%; display: block; }
.cel-outfit { font-size: .88rem; color: var(--text-2, #aab2c0); padding: 8px 12px; border-radius: 12px; background: var(--surface-2, #252a34); }
.cel-card .btn { margin-top: 6px; width: 100%; min-height: 52px; font-size: 1.05rem; background: var(--mint, #3ddc97); color: var(--mint-ink, #04140c); box-shadow: inset 0 -4px 0 var(--mint-deep, #1fa66d); border-color: transparent; }
.cel-card .btn:focus-visible { outline: 3px solid var(--text, #fff); outline-offset: 3px; }

/* motion: only when the device and the app both allow it */
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="off"]) .celebrate:not(.is-still) { animation: cel-fade .22s ease-out both; }
  :root:not([data-motion="off"]) .celebrate:not(.is-still) .cel-card { animation: cel-rise .38s var(--ease, cubic-bezier(.2, .8, .2, 1)) both; }
  :root:not([data-motion="off"]) .celebrate:not(.is-still) .cel-rays { animation: cel-spin 28s linear infinite, cel-fade .8s ease-out both; }
  :root:not([data-motion="off"]) .celebrate:not(.is-still) .cel-nova { animation: cel-pop .55s .12s cubic-bezier(.3, 1.5, .5, 1) both; }
  :root:not([data-motion="off"]) .celebrate:not(.is-still) .cel-emblem { animation: cel-pop .6s .32s cubic-bezier(.3, 1.6, .5, 1) both; }
  :root:not([data-motion="off"]) .celebrate:not(.is-still) .cel-kicker,
  :root:not([data-motion="off"]) .celebrate:not(.is-still) .cel-title { animation: cel-up .4s .5s ease-out both; }
}
@keyframes cel-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cel-rise { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes cel-spin { to { transform: rotate(360deg); } }
@keyframes cel-pop { from { opacity: 0; transform: scale(.5) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes cel-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.celebrate.is-still *, [data-motion="off"] .celebrate * { animation: none !important; transition: none !important; }

/* ------------------------------------------------------------------ Nova's wardrobe (Me page) */
.wardrobe { border-top: 3px solid var(--mint, #3ddc97); }
.ward-top { display: flex; align-items: center; gap: 16px; }
.ward-preview { width: 92px; height: 92px; flex: none; }
.ward-preview svg { width: 100%; height: 100%; display: block; }
.ward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.ward-item {
  display: grid; align-content: start; justify-items: center; gap: 4px; padding: 10px 8px 12px; text-align: center; cursor: pointer;
  border-radius: 16px; background: var(--surface-2, #252a34); border: 2px solid var(--line, #2e3440); color: var(--text, #edf0f5); font: inherit;
}
.ward-item:hover { border-color: var(--line-2, #3d4452); }
.ward-item:focus-visible { outline: 3px solid var(--accent-text, #8fb0ff); outline-offset: 2px; }
.ward-item[aria-pressed="true"] { border-color: var(--mint, #3ddc97); background: color-mix(in srgb, var(--mint, #3ddc97) 12%, var(--surface-2, #252a34)); }
.ward-item .ward-art { width: 64px; height: 64px; }
.ward-item .ward-art svg { width: 100%; height: 100%; display: block; }
.ward-item b { font-size: .9rem; }
.ward-item .ward-note { font-size: .78rem; line-height: 1.3; color: var(--text-2, #aab2c0); }
.ward-item[aria-pressed="true"] .ward-note { color: var(--ok-text, #4fd1ae); font-weight: 700; }
.ward-item.is-locked { cursor: default; border-style: dashed; background: transparent; }
.ward-item.is-locked .ward-art { filter: grayscale(1); opacity: .42; }
.ward-item.is-locked b { color: var(--text-2, #aab2c0); }
.profile-mark { width: 84px; height: 84px; flex: none; }
.profile-mark svg { width: 100%; height: 100%; display: block; }
