/* grasp-quiet.css — the NIGHT JOB screen (King 2026-10-17: "make it aesthetically pleasing"). */

#gq-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;               /* over everything, the terminal panel included */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top, 0)) 20px max(24px, env(safe-area-inset-bottom, 0));
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(58, 70, 160, 0.55), transparent 60%),
    radial-gradient(90% 60% at 50% 100%, rgba(120, 60, 170, 0.35), transparent 70%),
    rgba(4, 6, 18, 0.93);           /* dark enough to read even where the blur isn't drawn */
  -webkit-backdrop-filter: blur(14px) saturate(0.6);
  backdrop-filter: blur(14px) saturate(0.6);
  opacity: 0;
  transition: opacity 0.45s ease;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  color: #eef1ff;
}
#gq-overlay.is-on { opacity: 1; }
#gq-overlay.is-leaving { opacity: 0; }
html.gq-on, html.gq-on body { overflow: hidden; }

/* NIGHT JOB, over and over, drifting behind the card */
.gq-sky {
  position: absolute;
  inset: -10% -20%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  transform: rotate(-8deg);
  pointer-events: none;
}
.gq-row {
  display: flex;
  white-space: nowrap;
  font: 800 54px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  letter-spacing: 0.08em;
  color: rgba(160, 175, 255, 0.07);
  animation: gq-drift 38s linear infinite;
}
.gq-row:nth-child(even) { animation-direction: reverse; animation-duration: 46s; color: rgba(200, 160, 255, 0.06); }
.gq-row span { padding-right: 0.5em; }
.gq-row i { font-style: normal; margin: 0 0.5em; opacity: 0.8; }
.gq-row:nth-child(3n) { animation-name: gq-drift, gq-flash; animation-duration: 42s, 3.2s; animation-timing-function: linear, ease-in-out; }
@keyframes gq-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes gq-flash { 0%, 100% { color: rgba(160, 175, 255, 0.06); } 50% { color: rgba(190, 200, 255, 0.2); } }

/* the card */
.gq-card {
  position: relative;
  width: min(100%, 380px);
  padding: 30px 24px 24px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(160deg, rgba(40, 46, 96, 0.97), rgba(18, 18, 44, 0.98));   /* solid: the chat never shows through */
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  /* no second backdrop blur here: blur inside blur crashed WebKit (10-17 e2e) and is heavy on a phone */
  animation: gq-rise 0.6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes gq-rise { from { transform: translateY(18px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }

.gq-moon {
  position: relative;
  display: inline-block;
  font-size: 54px;
  line-height: 1;
  animation: gq-float 4s ease-in-out infinite;
}
/* The glow is a halo behind the moon that only changes opacity: animating a filter on the emoji
   crashed WebKit (10-17 e2e) and costs a phone far more. */
.gq-moon::before {
  content: "";
  position: absolute;
  inset: -22px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 150, 0.55), rgba(255, 228, 150, 0) 68%);
  animation: gq-halo 4s ease-in-out infinite;
}
@keyframes gq-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes gq-halo { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.gq-title {
  margin: 14px 0 10px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.22em;
  padding-left: 0.22em;              /* letter-spacing leaves the last letter's gap; keep it centered */
  background: linear-gradient(90deg, #8ea2ff, #ffffff 45%, #d6b8ff 55%, #8ea2ff);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gq-shimmer 3.2s ease-in-out infinite;
}
@keyframes gq-shimmer { 0% { background-position: 100% 0; } 50% { background-position: 0 0; } 100% { background-position: 100% 0; } }

.gq-label { font-size: 17px; line-height: 1.4; font-weight: 600; color: #f4f5ff; }
.gq-note {
  margin-top: 10px;
  font-size: 13px; line-height: 1.4;
  color: rgba(225, 230, 255, 0.72);
}
.gq-dot {
  display: inline-block;
  width: 8px; height: 8px; margin-right: 7px;
  border-radius: 50%;
  background: #8ea2ff;
  box-shadow: 0 0 10px #8ea2ff;
  vertical-align: 1px;
  animation: gq-beat 1.6s ease-in-out infinite;
}
@keyframes gq-beat { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }

.gq-wait {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px; line-height: 1.5;
  color: rgba(235, 238, 255, 0.85);
}

.gq-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.gq-btn {
  height: 50px;
  border-radius: 16px;
  font: 600 16px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.gq-btn:active { transform: scale(0.98); }
.gq-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.gq-stop {
  border: 0;
  background: linear-gradient(135deg, #5b6cff, #a05bff);
  color: #fff;
  box-shadow: 0 10px 26px rgba(110, 90, 255, 0.45);
}
.gq-stop.is-armed { background: linear-gradient(135deg, #ff5b7a, #ff8a5b); box-shadow: 0 10px 26px rgba(255, 90, 110, 0.45); }
.gq-stop:disabled { opacity: 0.7; }
.gq-fine { margin-top: 12px; font-size: 12px; color: rgba(225, 230, 255, 0.55); }

@media (prefers-reduced-motion: reduce) {
  .gq-row, .gq-moon, .gq-moon::before, .gq-title, .gq-dot, .gq-card { animation: none !important; }
}
