:root {
  --shell-paper: #f7f8f4;
  --shell-surface: #ffffff;
  --shell-ink: #18201c;
  --shell-muted: #5b655f;
  --shell-line: #dce2da;
  --shell-blue: #4668ff;
  --shell-red: #d84d38;
  --shell-lime: #d9f51f;
  --shell-shadow: 0 18px 45px rgba(24, 32, 28, 0.1);
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header,
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 66px;
  border-bottom: 1px solid rgba(24, 32, 28, 0.1);
  background: rgba(247, 248, 244, 0.96);
  box-shadow: 0 6px 22px rgba(24, 32, 28, 0.05);
  backdrop-filter: blur(14px);
}

.brand {
  font-weight: 900;
}

.nav-links {
  align-items: center;
  gap: clamp(10px, 1.8vw, 22px);
}

.nav-links a {
  color: var(--shell-muted);
  font-weight: 800;
}

.nav-links [data-auth-link] {
  min-width: 68px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--shell-ink);
}

.premium-locked-link {
  opacity: 0.82;
}

.premium-lock-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 7px;
  border: 1px solid rgba(24, 32, 28, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--shell-muted);
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
  vertical-align: middle;
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 17px;
}

.header-rewards {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 156px;
  min-height: 38px;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--shell-line);
  border-radius: 999px;
  background: var(--shell-surface);
  color: var(--shell-ink);
  padding: 7px 12px;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(24, 32, 28, 0.05);
}

button.header-pill {
  cursor: pointer;
  font: inherit;
}

.header-pill strong {
  min-width: 1.2ch;
  font-size: 1rem;
}

.rocket-icon,
.ruby-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.rocket-icon svg,
.ruby-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.rocket-icon {
  color: #c6cbc4;
  background: var(--shell-surface);
  box-shadow: 0 0 0 3px rgba(24, 32, 28, 0.04);
}

.rocket-icon.saved {
  color: var(--shell-blue);
  background: rgba(70, 104, 255, 0.11);
  box-shadow: 0 0 0 3px rgba(70, 104, 255, 0.08), 0 0 18px rgba(70, 104, 255, 0.42);
}

.rocket-icon.frozen {
  color: #c08418;
  background: rgba(224, 170, 49, 0.16);
  box-shadow: 0 0 0 3px rgba(224, 170, 49, 0.1), 0 0 16px rgba(224, 170, 49, 0.28);
}

.rocket-icon.lost {
  color: var(--shell-red);
  background: rgba(216, 77, 56, 0.1);
  box-shadow: 0 0 0 3px rgba(216, 77, 56, 0.08), 0 0 16px rgba(216, 77, 56, 0.35);
}

.rocket-icon.pending {
  color: #aeb5af;
  background: var(--shell-surface);
}

.ruby-icon {
  color: #e3485f;
  background: rgba(227, 72, 95, 0.1);
}

.reward-metric {
  display: grid !important;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: start;
  gap: 7px;
  white-space: nowrap;
  font-size: clamp(2.15rem, 4.8vw, 2.9rem) !important;
  font-weight: 500 !important;
  line-height: 0.95 !important;
}

.reward-metric > .reward-value {
  display: block !important;
  color: var(--shell-ink) !important;
  font: inherit !important;
  line-height: inherit !important;
  text-transform: none !important;
}

.reward-metric > .reward-art {
  position: relative;
  display: inline-grid !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: inherit;
  font: inherit !important;
  line-height: 1 !important;
  text-transform: none !important;
  width: 0.58em;
  height: 0.58em;
}

.reward-metric > .reward-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.xp-art {
  width: 0.5em;
  height: 0.56em;
  color: var(--shell-blue);
  filter: drop-shadow(0 0 7px rgba(70, 104, 255, 0.36));
}

.xp-art .xp-star-main {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0.43em;
  height: 0.43em;
}

.xp-art .xp-star-small {
  position: absolute;
  right: 0;
  top: 0;
  width: 0.22em;
  height: 0.22em;
}

.ruby-stat-icon {
  width: 0.56em;
  height: 0.56em;
  color: #e3485f;
  filter: drop-shadow(0 0 7px rgba(227, 72, 95, 0.25));
}

.freeze-stat-icon {
  width: 0.56em;
  height: 0.56em;
  color: #aeb5af;
}

.streak-popover {
  position: fixed;
  top: 74px;
  right: clamp(18px, 4vw, 56px);
  z-index: 120;
  width: min(384px, calc(100vw - 28px));
  border: 1px solid var(--shell-line);
  border-radius: 8px;
  background: var(--shell-surface);
  box-shadow: 0 24px 70px rgba(24, 32, 28, 0.18);
  padding: 24px;
}

.streak-popover[hidden] {
  display: none;
}

.streak-popover::before {
  content: "";
  position: absolute;
  top: -9px;
  right: 48px;
  width: 16px;
  height: 16px;
  border-left: 1px solid var(--shell-line);
  border-top: 1px solid var(--shell-line);
  background: var(--shell-surface);
  transform: rotate(45deg);
}

.streak-popover-head {
  display: grid;
  place-items: center;
}

.streak-popover-ring {
  --streak-popover-progress: 0%;
  position: relative;
  display: grid;
  place-items: center;
  width: 154px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--shell-blue) var(--streak-popover-progress), #d6dbd4 0);
}

.streak-popover-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--shell-surface);
}

.streak-popover-ring-inner {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
}

.streak-popover-ring strong {
  display: block;
  color: var(--shell-ink);
  font-size: clamp(2.5rem, 10vw, 3.7rem);
  font-weight: 500;
  line-height: 0.9;
}

.streak-popover-ring span {
  color: var(--shell-muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.streak-popover p {
  margin: 16px 0 18px;
  color: var(--shell-ink);
  line-height: 1.55;
}

.streak-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.streak-week span {
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--shell-muted);
  font-weight: 850;
}

.streak-week i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--shell-line);
  border-radius: 50%;
  background: var(--shell-surface);
  color: #c6cbc4;
  font-style: normal;
}

.streak-week i svg {
  width: 20px;
  height: 20px;
}

.streak-week span.saved i {
  border-color: rgba(70, 104, 255, 0.18);
  background: rgba(70, 104, 255, 0.12);
  color: var(--shell-blue);
  box-shadow: 0 0 18px rgba(70, 104, 255, 0.22);
}

.streak-week span.frozen i {
  border-color: rgba(224, 170, 49, 0.34);
  background: rgba(224, 170, 49, 0.16);
  color: #c08418;
}

.streak-week span.lost i {
  border-color: rgba(216, 77, 56, 0.32);
  background: rgba(216, 77, 56, 0.1);
  color: var(--shell-red);
}

.streak-week span.pending i {
  border-color: var(--shell-line);
  background: var(--shell-surface);
  color: #c6cbc4;
}

.streak-week span.today i {
  outline: 2px solid var(--shell-blue);
  outline-offset: 2px;
}

.streak-week .day-progress-count {
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0;
}

.streak-max {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  border-radius: 8px;
  background: #f0f1ef;
  padding: 16px;
  text-align: center;
}

.streak-max b {
  color: var(--shell-ink);
  font-size: 1.15rem;
}

.streak-max span {
  color: var(--shell-muted);
}

.hero {
  border-bottom: 1px solid var(--shell-line);
  background: var(--shell-paper) !important;
  color: var(--shell-ink) !important;
}

.hero h1 {
  max-width: 900px;
  color: var(--shell-ink);
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.04;
}

.hero p:last-child {
  color: var(--shell-muted) !important;
}

.hero .eyebrow {
  color: var(--shell-blue);
}

@media (max-width: 860px) {
  .site-header,
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-rewards {
    min-width: 0;
  }

  .streak-popover {
    top: 112px;
    right: 14px;
  }
}
