/* Camdrametrics Wrapped — full-screen story in the style of Spotify Wrapped */
:root {
  --wr-black: #121212;
  --wr-white: #ffffff;
  --wr-green: #1ed760;
  --wr-lime: #cdf564;
  --wr-pink: #f573a0;
  --wr-hot: #ff3d8b;
  --wr-purple: #7c3aed;
  --wr-violet: #2d1b69;
  --wr-blue: #2d46b9;
  --wr-cyan: #4ff0e6;
  --wr-orange: #ff6437;
  --wr-yellow: #ffd23f;
  --wr-display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --wr-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--wr-black);
  color: var(--wr-white);
  font-family: var(--wr-body);
  -webkit-font-smoothing: antialiased;
}

.wr {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
}

.wr-stage {
  position: relative;
  width: min(440px, 100%);
  height: min(860px, calc(100dvh - 72px));
  min-height: 560px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--wr-violet);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 480px) {
  .wr { padding: 0; gap: 0; }
  .wr-stage { width: 100%; height: 100dvh; min-height: 0; border-radius: 0; }
  .wr-years { position: fixed; bottom: 10px; left: 0; right: 0; z-index: 5; }
}

.wr-progress {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
}

.wr-progress span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.wr-progress span i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--wr-white);
}

.wr-progress span.done i { width: 100%; }

.wr-top {
  position: absolute;
  z-index: 4;
  top: 22px;
  left: 16px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.wr-top-actions { display: flex; gap: 4px; }

.wr-icon {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--wr-white);
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 50%;
}

.wr-icon:hover { background: rgba(255, 255, 255, 0.12); }

.wr-tap {
  position: absolute;
  z-index: 2;
  top: 70px;
  bottom: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.wr-tap--prev { left: 0; width: 32%; }
.wr-tap--next { right: 0; width: 68%; }
.wr-tap:focus-visible { outline: 2px solid var(--wr-white); outline-offset: -4px; }

.wr-slides { position: absolute; inset: 0; }

.wr-slide {
  position: absolute;
  inset: 0;
  padding: 84px 26px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
}

.wr-slide > * { position: relative; z-index: 1; }

/* Decorative shapes */
.wr-blob {
  position: absolute !important;
  z-index: 0 !important;
  border-radius: 50%;
  filter: blur(0.5px);
  pointer-events: none;
}

.wr-ring {
  position: absolute !important;
  z-index: 0 !important;
  border-radius: 50%;
  border: 26px solid currentColor;
  pointer-events: none;
}

.wr-kicker {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  opacity: 0.9;
}

.wr-h {
  font-family: var(--wr-display);
  font-size: clamp(30px, 9vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  overflow-wrap: anywhere;
}

.wr-huge {
  font-family: var(--wr-display);
  font-size: clamp(96px, 34vw, 156px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 0;
}

.wr-big {
  font-family: var(--wr-display);
  font-size: clamp(40px, 12vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  overflow-wrap: anywhere;
}

.wr-p {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0;
}

.wr-small {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  opacity: 0.85;
  margin: 0;
}

.wr-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wr-list li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: baseline;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
}

.wr-list li b {
  font-family: var(--wr-display);
  font-size: 26px;
  font-weight: 400;
}

.wr-list li span:last-child {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.85;
  white-space: nowrap;
}

.wr-bars { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }

.wr-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
}

.wr-bar-track { flex: 1; min-width: 0; }

.wr-bar-fill {
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 2.4em;
  transform-origin: left center;
}

.wr-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.wr-chip {
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 800;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.22);
}

.wr-ticker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 46%;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.wr-ticker span {
  font-family: var(--wr-display);
  font-size: 22px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

/* Summary card */
.wr-summary {
  background: var(--wr-black);
  padding: 72px 18px 18px;
  justify-content: flex-start;
}

.wr-card {
  border-radius: 14px;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--wr-black);
  background: linear-gradient(160deg, var(--wr-lime), var(--wr-green));
}

.wr-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wr-card-head .wr-h { font-size: 26px; }
.wr-card-head span { font-weight: 800; font-size: 13px; white-space: nowrap; }

.wr-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
}

.wr-card-grid div { min-width: 0; }
.wr-card-grid dt { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.75; }
.wr-card-grid dd { margin: 3px 0 0; font-family: var(--wr-display); font-size: 21px; line-height: 1.05; overflow-wrap: anywhere; }
.wr-card-grid ol { margin: 4px 0 0; padding-left: 1.2em; font-weight: 800; font-size: 14px; line-height: 1.35; }
.wr-card-foot { font-size: 12px; font-weight: 800; opacity: 0.7; }

.wr-actions {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.wr-btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: none;
  font: 800 15px var(--wr-body);
  cursor: pointer;
  background: var(--wr-white);
  color: var(--wr-black);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.wr-btn--ghost { background: transparent; color: var(--wr-white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.wr-btn:hover { filter: brightness(0.92); }

.wr-years {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.wr-years a {
  color: var(--wr-white);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.wr-years a.active { background: var(--wr-white); color: var(--wr-black); }

.wr-empty { text-align: center; max-width: 30rem; }
.wr-empty h1 { font-family: var(--wr-display); font-size: 40px; margin: 0 0 8px; }
.wr-empty a { color: var(--wr-green); font-weight: 800; }

/* Entrance animations */
.wr-in > *:not(.wr-blob):not(.wr-ring) { animation: wr-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wr-in > *:nth-child(2) { animation-delay: 0.08s; }
.wr-in > *:nth-child(3) { animation-delay: 0.22s; }
.wr-in > *:nth-child(4) { animation-delay: 0.36s; }
.wr-in > *:nth-child(5) { animation-delay: 0.5s; }
.wr-in > *:nth-child(6) { animation-delay: 0.64s; }
.wr-in > *:nth-child(7) { animation-delay: 0.78s; }
.wr-in .wr-blob, .wr-in .wr-ring { animation: wr-pop 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wr-in .wr-bar-fill { animation: wr-grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes wr-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes wr-pop { from { opacity: 0; transform: scale(0.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes wr-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .wr-in > *, .wr-in .wr-blob, .wr-in .wr-ring, .wr-in .wr-bar-fill { animation: none !important; }
}
