:root {
  --profile-pink: #ff2a8c;
  --profile-orange: #ff6b3a;
  --profile-yellow: #ffd21f;
  --profile-magenta: #d72dff;
  --profile-purple: #7b3ff2;
  --profile-blue: #178cff;
  --profile-mint: #00f5b8;
  --profile-border: rgba(255, 255, 255, 0.1);
  --profile-muted: rgba(244, 242, 250, 0.68);
}

.profile-dashboard-page,
.profile-dashboard-page * {
  box-sizing: border-box;
}

.profile-dashboard-page .nova-clean-header {
  padding: 10px 16px;
}

.profile-dashboard-page .nova-clean-header .nova-header-inner {
  width: 100%;
  max-width: 1380px;
  min-width: 0;
  margin: 0 auto;
  padding: 8px 14px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center !important;
  gap: clamp(12px, 2vw, 28px) !important;
  flex-wrap: nowrap !important;
  border-radius: 22px;
}

.profile-dashboard-page .nova-brand {
  min-width: 0;
}

.profile-dashboard-page .nova-hub-nav {
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
}

.profile-dashboard-page .nova-auth-actions {
  width: auto !important;
  min-width: 0;
  margin: 0;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}

.profile-dashboard-page .nova-header .rb-fill,
.profile-dashboard-page .nova-header .rb-outline {
  min-height: 40px;
  padding: 10px 16px !important;
  white-space: nowrap;
}

.profile-dashboard-page .nova-auth-actions a[href="./profile.html"] {
  animation: none !important;
  background: linear-gradient(90deg, #8f55f5, #28b7ef, #70e7c1) !important;
  box-shadow: 0 6px 18px rgba(123, 63, 242, 0.18) !important;
}

.profile-dashboard {
  width: min(calc(100% - 32px), 1280px);
}

.profile-overview {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(215, 45, 255, 0.11), transparent 34%),
    radial-gradient(circle at 88% 16%, rgba(23, 140, 255, 0.1), transparent 32%),
    rgba(255, 255, 255, 0.035) !important;
}

.profile-overview-layout {
  display: grid !important;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center !important;
  gap: clamp(24px, 4vw, 52px) !important;
}

.profile-member-copy h1[data-user-screen-name] {
  max-width: min(100%, 540px);
  overflow-wrap: anywhere;
  color: #fff;
  font-size: clamp(27px, 3vw, 38px) !important;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-shadow: 0 3px 20px rgba(123, 63, 242, 0.22);
}

.profile-name-row {
  margin-bottom: 14px;
}

.profile-member-copy [data-bio-display] {
  max-width: 650px;
  color: rgba(248, 247, 252, 0.82) !important;
  font-size: 15px !important;
}

.profile-member-copy [data-member-since] {
  color: rgba(248, 247, 252, 0.56) !important;
  margin-top: 10px !important;
}

.profile-stats {
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 10px !important;
}

.profile-stat {
  min-width: 104px;
  padding: 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-checkin-dock {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
}

.profile-checkin-dock:empty {
  display: none;
}

.profile-checkin-dock [data-nova-checkin-fab] {
  position: static !important;
  inset: auto !important;
  display: inline-flex;
  width: auto;
  margin: -4px 4px 2px 0;
  box-shadow: 0 10px 28px rgba(123, 63, 242, 0.24) !important;
}

.profile-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.profile-section-heading p {
  max-width: 700px;
  margin: 0;
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.65;
}

.profile-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-journal-list,
.profile-milestones-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 13px;
}

.profile-journal-entry,
.profile-milestone-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--profile-border);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
}

.profile-journal-entry {
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.profile-journal-entry:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 245, 184, 0.32);
  background: linear-gradient(145deg, rgba(0, 245, 184, 0.07), rgba(123, 63, 242, 0.05));
}

.profile-journal-meta,
.profile-reading-date {
  color: rgba(248, 247, 252, 0.5);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.profile-journal-entry strong {
  display: block;
  margin: 7px 0 5px;
  font-size: 16px;
}

.profile-journal-preview {
  color: rgba(248, 247, 252, 0.65);
  font-size: 12px;
  line-height: 1.55;
}

.profile-milestone-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}

.profile-milestone-card.is-earned {
  border-color: rgba(0, 245, 184, 0.28);
  background: linear-gradient(145deg, rgba(0, 245, 184, 0.07), rgba(23, 140, 255, 0.035));
}

.profile-milestone-card.is-locked {
  opacity: 0.52;
}

.profile-milestone-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--profile-mint);
  background: rgba(0, 245, 184, 0.08);
  border: 1px solid rgba(0, 245, 184, 0.2);
  font-size: 20px;
}

.profile-milestone-card strong {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
}

.profile-milestone-card span {
  display: block;
  margin-top: 5px;
  color: rgba(248, 247, 252, 0.62);
  font-size: 12px;
  line-height: 1.55;
}

.profile-milestone-state {
  margin-top: 8px !important;
  color: var(--profile-mint) !important;
  font-size: 9px !important;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.milestone-confetti {
  position: fixed;
  inset: 0;
  z-index: 100000;
  overflow: hidden;
  pointer-events: none;
}

.milestone-confetti i {
  position: absolute;
  top: -24px;
  left: var(--confetti-x);
  width: var(--confetti-size);
  height: calc(var(--confetti-size) * 1.7);
  border-radius: 2px;
  background: var(--confetti-color);
  box-shadow: 0 0 9px color-mix(in srgb, var(--confetti-color), transparent 30%);
  animation: milestoneConfettiFall var(--confetti-duration) var(--confetti-delay) cubic-bezier(.2,.65,.35,1) forwards;
}

@keyframes milestoneConfettiFall {
  from {
    transform: translate3d(0, -5vh, 0) rotate(0deg);
    opacity: 1;
  }

  to {
    transform: translate3d(var(--confetti-drift), 108vh, 0) rotate(var(--confetti-turn));
    opacity: 0.85;
  }
}

.milestone-celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 3, 14, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: milestoneOverlayIn 0.2s ease-out both;
}

.milestone-celebration-card {
  width: min(100%, 520px);
  max-height: min(720px, calc(100vh - 40px));
  overflow-y: auto;
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid rgba(0, 245, 184, 0.3);
  border-radius: 28px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 15% 10%, rgba(215, 45, 255, 0.18), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(23, 140, 255, 0.16), transparent 38%),
    linear-gradient(155deg, rgba(19, 13, 34, 0.98), rgba(7, 6, 18, 0.99));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 48px rgba(0, 245, 184, 0.1);
  animation: milestoneCardIn 0.24s ease-out both;
}

.milestone-celebration-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border: 1px solid rgba(0, 245, 184, 0.38);
  border-radius: 22px;
  color: var(--profile-mint);
  background: linear-gradient(145deg, rgba(0, 245, 184, 0.14), rgba(123, 63, 242, 0.12));
  box-shadow: 0 12px 32px rgba(0, 245, 184, 0.1);
  font-size: 28px;
  font-weight: 900;
}

.milestone-celebration-kicker {
  margin-bottom: 9px;
  color: var(--profile-mint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.milestone-celebration-card h2 {
  margin: 0;
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.milestone-celebration-card > p {
  margin: 14px auto 0;
  max-width: 410px;
  color: rgba(248, 247, 252, 0.74);
  line-height: 1.65;
}

.milestone-celebration-card .milestone-celebration-message {
  color: rgba(248, 247, 252, 0.92);
}

.milestone-celebration-card .milestone-celebration-date {
  color: rgba(248, 247, 252, 0.5);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.milestone-celebration-status {
  min-height: 22px;
  margin-top: 15px;
  color: var(--profile-mint);
  font-size: 12px;
  font-weight: 800;
}

.milestone-celebration-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.milestone-celebration-actions button:disabled {
  cursor: wait;
  opacity: 0.68;
}

@keyframes milestoneOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes milestoneCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-reading-note {
  margin: -4px 0 20px;
  color: rgba(248, 247, 252, 0.52);
  font-size: 12px;
  line-height: 1.6;
}

.profile-reading-note strong {
  color: rgba(215, 45, 255, 0.9);
}

.profile-reading-card {
  padding: 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(123, 63, 242, 0.22);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(123, 63, 242, 0.075), rgba(23, 140, 255, 0.035));
}

.profile-reading-spread {
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.profile-reading-content {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-reading-content[hidden] {
  display: none;
}

.profile-reading-question {
  margin-bottom: 14px;
  color: rgba(248, 247, 252, 0.62);
  font-size: 13px;
  font-style: italic;
}

.profile-reading-text {
  color: rgba(248, 247, 252, 0.86);
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 1180px) {
  .profile-dashboard-page .nova-clean-header .nova-header-inner {
    gap: 12px !important;
  }

  .profile-dashboard-page .nova-header .rb-fill,
  .profile-dashboard-page .nova-header .rb-outline {
    padding-inline: 13px !important;
  }

  .profile-dashboard-page .nova-auth-actions .nova-pill {
    display: none !important;
  }

  .profile-overview-layout {
    grid-template-columns: auto minmax(220px, 1fr);
  }

  .profile-stats {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: stretch;
  }

  .profile-stat {
    flex: 1 1 0;
  }
}

@media (max-width: 900px) and (min-width: 721px) {
  .profile-dashboard-page .nova-clean-header .nova-header-inner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-dashboard-page .nova-hub-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .profile-dashboard-page .nova-auth-actions {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 720px) {
  .profile-dashboard-page .nova-clean-header {
    padding: 7px 8px;
  }

  .profile-dashboard-page .nova-clean-header .nova-header-inner {
    display: flex !important;
    min-height: 62px !important;
    padding: 7px 10px !important;
  }

  .profile-dashboard {
    width: min(calc(100% - 20px), 1280px);
    padding-top: 22px !important;
    padding-bottom: 50px !important;
  }

  .profile-overview-layout {
    grid-template-columns: 1fr;
    gap: 22px !important;
  }

  .profile-overview-layout > div:first-child {
    align-items: flex-start !important;
  }

  .profile-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px !important;
  }

  .profile-stat {
    min-width: 0;
    padding: 12px 7px !important;
  }

  .profile-stat > div:first-child {
    font-size: 22px !important;
  }

  .profile-stat > div:last-child {
    font-size: 8px !important;
    line-height: 1.4;
  }

  .profile-checkin-dock {
    justify-content: stretch;
  }

  .profile-checkin-dock [data-nova-checkin-fab] {
    width: 100%;
    justify-content: center;
    margin: 0;
  }

  .profile-section-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .profile-journal-list,
  .profile-milestones-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-journal-entry {
    transition: none;
  }

  .profile-journal-entry:hover {
    transform: none;
  }

  .milestone-confetti {
    display: none;
  }

  .milestone-celebration-overlay,
  .milestone-celebration-card {
    animation: none;
  }
}

@media (max-width: 560px) {
  .milestone-celebration-actions {
    flex-direction: column;
  }

  .milestone-celebration-actions button {
    width: 100%;
  }
}
