/* 🎯 FIRST MISSION — Prof. Byte's scavenger-hunt onboarding checklist.
   Brutalist look shared with tour.css/byte.css (hard borders, riso offset
   shadows). Chip + panel float bottom-right, clear of the Avery Tunes panel
   (right:8px, width:260px) and the always-in-taskbar miniplayer/pet perch. */

/* --- persistent tracker chip ------------------------------------------ */
.mission-chip {
  position: fixed;
  right: 280px;
  bottom: calc(var(--taskbar-h) + 10px);
  z-index: 90;
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--hover);
  padding: 6px 10px 6px 6px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  animation: mission-pop 0.28s steps(4) both;
  transition: transform 0.06s, box-shadow 0.06s;
}
.mission-chip:hover { box-shadow: 6px 6px 0 var(--hover); transform: translate(-1px, -1px); }
.mission-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mission-thumb { width: 26px; height: 26px; image-rendering: pixelated; flex-shrink: 0; display: block; }
.mission-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; }
.mission-count { color: var(--hover); }
.mission-caret { font-size: 9px; opacity: 0.6; display: inline-block; transition: transform 0.15s; }
.mission-chip.mission-open .mission-caret { transform: rotate(180deg); }
@keyframes mission-pop {
  0%   { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* --- expanded checklist panel ------------------------------------------ */
.mission-panel {
  position: fixed;
  right: 280px;
  bottom: calc(var(--taskbar-h) + 48px);
  z-index: 91;
  width: 280px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--hover);
  font-family: 'Inter', sans-serif;
}
.mission-phead {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 2px solid var(--ink);
  background: var(--accent);
}
.mission-phead img { width: 32px; height: 32px; image-rendering: pixelated; flex-shrink: 0; }
.mission-ptitle { flex: 1; font-family: Geologica, sans-serif; font-weight: 900; font-size: 12px; letter-spacing: 0.3px; color: var(--ink); }
.mission-psub { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 9.5px; opacity: 0.75; margin-top: 2px; }
.mission-pmin {
  background: none; border: 0; font-size: 15px; line-height: 1; cursor: pointer; color: var(--ink);
  padding: 2px 4px;
}
.mission-pmin:hover { color: var(--hover); }
.mission-list { list-style: none; margin: 0; padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.mission-item { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; line-height: 1.4; }
.mission-check { font-weight: 900; flex-shrink: 0; width: 14px; }
.mission-item.done { opacity: 0.55; }
.mission-item.done .mission-txt { text-decoration: line-through; }
.mission-item.done .mission-check { color: var(--hover); }

/* --- "want a mission, cadet?" offer card -------------------------------- */
.mission-offer {
  position: fixed;
  right: 20px;
  bottom: calc(var(--taskbar-h) + 16px);
  z-index: 92;
  display: flex; align-items: flex-end; gap: 10px;
  max-width: min(360px, calc(100vw - 40px));
  animation: mission-pop 0.3s steps(4) both;
}
.mission-offer-bot { width: 64px; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.5)); flex-shrink: 0; display: block; }
.mission-offer-bubble { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--hover); padding: 12px 14px; }
.mission-offer-name { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 9.5px; letter-spacing: 0.7px; color: var(--hover); margin-bottom: 5px; text-transform: uppercase; }
.mission-offer-copy { font-family: Inter, sans-serif; font-size: 12.5px; line-height: 1.5; }
.mission-offer-btns { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.mission-offer-yes {
  background: var(--accent); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: Geologica, sans-serif; font-weight: 900; font-size: 11.5px;
  padding: 7px 14px; cursor: pointer;
  transition: transform 0.06s, box-shadow 0.06s;
}
.mission-offer-yes:hover { background: var(--hover); color: var(--white); }
.mission-offer-yes:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.mission-offer-no { background: transparent; border: 0; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.3px; text-decoration: underline; color: #888; cursor: pointer; }
.mission-offer-no:hover { color: var(--hover); }

/* --- celebration + certificate ------------------------------------------ */
.mission-celeb {
  position: fixed; inset: 0; z-index: 12000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 5, 16, 0.82);
  padding: 20px;
}
.mission-celeb-card { display: flex; align-items: flex-end; gap: 14px; max-width: 520px; animation: mission-pop 0.32s steps(4) both; }
.mission-celeb-card[hidden] { display: none; }
.mission-celeb-bot { width: 130px; image-rendering: pixelated; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.55)); display: block; }
.mission-celeb-bubble { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 7px 7px 0 var(--hover); padding: 18px 20px; max-width: 340px; }
.mission-celeb-title { font-family: Geologica, sans-serif; font-weight: 900; font-size: 19px; line-height: 1.25; margin-bottom: 10px; }
.mission-celeb-copy { font-family: Inter, sans-serif; font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.mission-celeb-cert-btn, .mission-celeb-close {
  background: var(--accent); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: Geologica, sans-serif; font-weight: 900; font-size: 12px;
  padding: 9px 18px; cursor: pointer;
  transition: transform 0.06s, box-shadow 0.06s;
}
.mission-celeb-cert-btn:hover, .mission-celeb-close:hover { background: var(--hover); color: var(--white); }
.mission-celeb-cert-btn:active, .mission-celeb-close:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

.mission-cert {
  position: relative;
  background: var(--paper); color: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--hover), 12px 12px 0 var(--accent);
  padding: 32px 40px; max-width: 480px; width: calc(100vw - 60px);
  text-align: center; font-family: 'Inter', sans-serif;
  animation: mission-pop 0.3s steps(4) both;
}
.mission-cert-seal { font-size: 42px; margin-bottom: 8px; }
.mission-cert-h { font-family: Geologica, sans-serif; font-weight: 900; font-size: 20px; letter-spacing: 0.06em; margin-bottom: 14px; text-transform: uppercase; }
.mission-cert-body { font-size: 14px; line-height: 1.6; margin-bottom: 14px; }
.mission-cert-role { display: inline-block; margin-top: 6px; font-family: Geologica, sans-serif; font-weight: 900; font-size: 18px; letter-spacing: 0.05em; color: var(--hover); }
.mission-cert-date { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; opacity: 0.7; margin-bottom: 4px; }
.mission-cert-sig { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 12px; color: var(--hover); margin-bottom: 18px; }

@media (max-width: 900px) {
  .mission-chip, .mission-panel, .mission-offer, .mission-celeb { display: none !important; }
}
