/* Salmon mode easter egg (fun facts spam) */
body.salmon-mode {
  --teal: #fb7185;
  --cyan: #fda4af;
  --violet: #fb923c;
  --grad: linear-gradient(135deg, #fb7185 0%, #fb923c 50%, #fbbf24 100%);
}

/* Daily challenge */
.daily-row {
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.daily-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.daily-badge {
  font-size: 0.72rem;
  color: var(--dim);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.daily-badge.is-done {
  color: var(--teal);
  border-color: rgba(45, 212, 191, 0.35);
}

.daily-task {
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  color: var(--muted);
}

.daily-task strong {
  color: var(--text);
  font-size: 1.05rem;
}

/* Achievements */
.achievements {
  padding: 0.85rem 1rem 0.95rem;
  margin-bottom: 0.85rem;
}

.achievements .section-title {
  margin: 0;
  font-size: 1.05rem;
}

.achievements-count {
  font-size: 0.75rem;
  color: var(--dim);
}

.achievements-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-content: start;
}

.ach-item {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding: 0.45rem 0.55rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  opacity: 0.42;
  filter: grayscale(0.7);
}

.ach-item.is-unlocked {
  opacity: 1;
  filter: none;
  border-color: rgba(45, 212, 191, 0.28);
  background: rgba(45, 212, 191, 0.06);
}

.ach-icon {
  font-size: 1.15rem;
  line-height: 1.2;
}

.ach-body strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text);
}

.ach-body small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.72rem;
  color: var(--dim);
  line-height: 1.3;
}

/* Achievement notice: global in the lobby, embedded in play chrome during a game. */
.achievement-toast {
  position: fixed;
  top: max(4.2rem, calc(env(safe-area-inset-top) + 3.4rem));
  right: 1rem;
  z-index: 75;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: min(23rem, calc(100vw - 2rem));
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem 0.7rem 0.85rem;
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 0.85rem;
  background: rgba(8, 14, 26, 0.97);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(-0.6rem) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.achievement-toast[hidden] {
  display: none;
}

.achievement-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.achievement-toast-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.achievement-toast-copy {
  min-width: 0;
}

.achievement-toast-copy small,
.achievement-toast-copy strong,
.achievement-toast-copy > span {
  display: block;
}

.achievement-toast-copy small {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.achievement-toast-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-toast-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-toast-close {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
}

.achievement-toast-close:hover,
.achievement-toast-close:focus-visible {
  border-color: rgba(251, 191, 36, 0.5);
  color: var(--text);
  outline: none;
}

.achievement-toast.in-play-bar {
  position: static;
  width: min(100%, 28rem);
  min-height: 2.7rem;
  margin: 0 auto;
  padding: 0.35rem 0.45rem 0.35rem 0.6rem;
  border-radius: 0.7rem;
  box-shadow: none;
  transform: scale(0.98);
}

.achievement-toast.in-play-bar.show {
  transform: scale(1);
}

.achievement-toast.in-play-bar .achievement-toast-copy small {
  display: none;
}

.play-title-block.has-achievement-toast > h2,
.play-title-block.has-achievement-toast > .play-controls {
  display: none;
}

.play-bar.has-achievement-toast #btn-share-run {
  display: none;
}

@media (max-width: 720px) {
  .achievement-toast {
    top: max(3.5rem, calc(env(safe-area-inset-top) + 3rem));
    right: 0.65rem;
    width: calc(100vw - 1.3rem);
  }

  .achievement-toast.in-play-bar {
    gap: 0.4rem;
    padding-inline: 0.45rem 0.35rem;
  }

  .achievement-toast.in-play-bar .achievement-toast-copy > span {
    display: none;
  }

  .achievement-toast.in-play-bar .achievement-toast-icon {
    font-size: 1.05rem;
  }

  .achievement-toast.in-play-bar .achievement-toast-close {
    width: 1.6rem;
    height: 1.6rem;
  }
}
