/* ===== Game Shell — night-city world (active only on body.gs-active) ===== */
body.gs-active .topbar { display: none; }
body.gs-active .content { padding: 0; max-width: none; margin: 0; }
body.gs-active #view { position: relative; }

/* world */
.gs-world {
  position: relative; min-height: calc(100vh - 0px); overflow: hidden;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at 34% 8%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.5px 1.5px at 58% 22%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 76% 12%, rgba(255,255,255,.3), transparent),
    radial-gradient(1.5px 1.5px at 90% 26%, rgba(255,255,255,.35), transparent),
    radial-gradient(900px 400px at 50% 110%, rgba(108,92,231,.10), transparent),
    linear-gradient(180deg, #06070d 0%, #0a0d18 45%, #0e1322 100%);
}
.gs-sky { position: fixed; bottom: 0; left: 0; width: 100%; pointer-events: none; z-index: 0; will-change: transform; }
.gs-sky-far { height: 52vh; }
.gs-sky-near { height: 40vh; }
body.lively .gs-search { animation: gs-sweep 8s ease-in-out infinite alternate; transform-origin: 120px 50px; }
body.lively .gs-search2 { animation: gs-sweep 11s ease-in-out infinite alternate-reverse; transform-origin: 300px 60px; }
@keyframes gs-sweep { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.gs-win { opacity: .15; animation: gs-flicker 6s steps(1) infinite; }
@keyframes gs-flicker { 0%, 100% { opacity: .15; } 12% { opacity: .55; } 48% { opacity: .55; } 60% { opacity: .2; } 78% { opacity: .5; } }
.gs-antenna { animation: gs-blink 2.6s ease-in-out infinite; }
@keyframes gs-blink { 0%, 100% { opacity: .15; } 50% { opacity: .8; } }
.gs-car-a { animation: gs-drive-a 13s linear infinite; }
.gs-car-b { animation: gs-drive-b 17s linear infinite; }
@keyframes gs-drive-a { from { transform: translateX(0); } to { transform: translateX(460px); } }
@keyframes gs-drive-b { from { transform: translateX(0); } to { transform: translateX(-460px); } }
@media (prefers-reduced-motion: reduce) { .gs-win, .gs-antenna, .gs-car, .gs-search, .gs-search2 { animation: none !important; } }

/* ===== static HQ background (employee/agent pack only) ===== */
.gs-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: #06070d url('/img/hq-bg.jpg') center center / cover no-repeat; }
/* phones: tighter portrait crop, keep the agent framed on the left */
@media (max-width: 600px) {
  .gs-bg { background-image: url('/img/hq-bg-mobile.jpg'); background-position: 38% center; }
}
/* The lively page-entry animation puts a transform on .gs-world; a transformed ancestor
   re-bases position:fixed onto that (tall) scroll box, so .gs-bg stretches to the full
   trail height and the image zooms until the animation ends. Skip the rise on HQ so the
   fixed background always measures against the viewport. */
body.gs-active .content > * { animation: none !important; }

/* ===== left-side rankings tracker ===== */
.gs-lb { position: fixed; left: 8px; top: 32%; width: 138px; z-index: 6; cursor: pointer;
  background: rgba(10,13,22,.62); border: 1px solid var(--border); border-left: 2px solid var(--accent);
  border-radius: 9px; padding: 8px 9px; backdrop-filter: blur(4px); }
.gs-lb-head { font-family: 'Courier New', monospace; font-size: 8.5px; letter-spacing: 1.5px; color: var(--accent); opacity: .85; margin-bottom: 6px; }
.gs-lb-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 11px; }
.gs-lb-pos { font-family: 'Courier New', monospace; font-weight: 800; color: var(--muted); width: 14px; text-align: center; flex: none; }
.gs-lb-row:nth-child(2) .gs-lb-pos { color: #fdcb6e; }
.gs-lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.gs-lb-pts { font-family: 'Courier New', monospace; font-weight: 700; color: var(--accent); font-size: 10.5px; flex: none; }
.gs-lb-row.me { background: var(--accent-soft); border-radius: 5px; margin: 0 -4px; padding: 3px 4px; }
.gs-lb-row.me .gs-lb-name { color: var(--accent); }
.gs-lb-sep { text-align: center; color: var(--muted); font-size: 9px; line-height: .6; opacity: .6; }
.gs-lb-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border);
  font-family: 'Courier New', monospace; font-size: 8.5px; letter-spacing: 1px; color: var(--muted); }
@media (max-width: 600px) { .gs-lb { top: auto; bottom: calc(118px + env(safe-area-inset-bottom)); width: 126px; } }

/* HUD */
.gs-hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px calc(10px); gap: 10px;
  background: linear-gradient(180deg, rgba(10,11,16,.92), rgba(10,11,16,.6) 70%, transparent);
}
.gs-plate { display: flex; align-items: center; gap: 9px; background: rgba(23,26,34,.85);
  border: 1px solid var(--border); border-radius: 12px; padding: 6px 10px; }
.gs-cn { font-family: 'Courier New', monospace; font-weight: 800; letter-spacing: 1.5px; font-size: 13px; }
.gs-cl { font-size: 10.5px; color: var(--accent); font-weight: 700; letter-spacing: 1px; }
.gs-ring { width: 34px; height: 34px; }
.gs-right { display: flex; align-items: center; gap: 8px; }
.gs-intel { background: rgba(23,26,34,.85); border: 1px solid var(--accent); border-radius: 99px;
  padding: 6px 14px; font-family: 'Courier New', monospace; font-weight: 800; letter-spacing: 1px;
  color: var(--accent); font-size: 14px; }
.gs-streak { background: rgba(23,26,34,.85); border: 1px solid var(--border); border-radius: 99px;
  padding: 6px 12px; font-family: 'Courier New', monospace; font-weight: 800; font-size: 13px;
  color: var(--muted); filter: grayscale(1); }
.gs-streak.lit { color: #fdcb6e; border-color: rgba(253,203,110,.5); filter: none;
  animation: gs-flame 2.2s ease-in-out infinite; }
@keyframes gs-flame { 0%,100% { box-shadow: 0 0 6px rgba(253,150,50,.25); } 50% { box-shadow: 0 0 16px rgba(253,150,50,.55); } }
.gs-supply { position: fixed; left: 14px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  font-size: 34px; animation: gs-drop-bounce 1.8s cubic-bezier(.34,1.56,.64,1) infinite; }
.gs-supply span { font-family: 'Courier New', monospace; font-size: 9px; letter-spacing: 1.5px;
  color: #fdcb6e; background: rgba(10,11,16,.8); border: 1px solid rgba(253,203,110,.4);
  border-radius: 99px; padding: 2px 7px; }
@keyframes gs-drop-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (min-width: 821px) { .gs-supply { bottom: 30px; } }
.gs-bell { position: relative; background: rgba(23,26,34,.85); border: 1px solid var(--border);
  border-radius: 99px; width: 38px; height: 38px; font-size: 16px; color: var(--text); }
.gs-bell-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff;
  font-size: 10px; border-radius: 99px; padding: 1px 5px; font-weight: 700; }

/* path */
.gs-path {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
  padding: 86px 16px 120px; gap: 26px; max-width: 480px; margin: 0 auto;
}
.gs-path::before { content: ''; position: absolute; top: 80px; bottom: 100px; left: 50%; width: 4px;
  transform: translateX(-50%); border-radius: 99px;
  background: repeating-linear-gradient(180deg, var(--surface-3) 0 10px, transparent 10px 22px); }
.gs-zone-label { font-family: 'Courier New', monospace; font-size: 11px; letter-spacing: 3px;
  color: var(--muted); background: var(--bg); padding: 4px 10px; border-radius: 99px; z-index: 2; }
.gs-today-label { color: var(--accent); border: 1px solid var(--accent-soft); }

.gs-row { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; min-height: 86px; }
.gs-row:nth-child(odd) .gs-node { transform: translateX(-52px); }
.gs-row:nth-child(even) .gs-node { transform: translateX(52px); }
.gs-node { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  transition: filter .2s; }
.gs-node:active .gs-circle { transform: scale(.9); }
.gs-circle { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; background: var(--surface-2); border: 4px solid var(--border);
  box-shadow: 0 6px 0 rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.gs-node:hover .gs-circle { transform: scale(1.1); }
.gs-label { font-family: 'Courier New', monospace; font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  color: var(--text); text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.gs-sub { font-size: 10px; color: var(--muted); margin-top: -2px; }

.gs-node.done .gs-circle { background: var(--success); border-color: #0a9c7d; color: #06281f; font-weight: 900; font-size: 28px; }
.gs-node.done .gs-label { color: var(--success); }
.gs-node.now .gs-circle { border-color: var(--accent); background: var(--surface-3); animation: gs-pulse 1.6s infinite; }
@keyframes gs-pulse { 0% { box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 0 0 var(--accent-soft); }
  70% { box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 0 16px transparent; }
  100% { box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 0 0 transparent; } }
.gs-node.todo, .gs-node.locked { opacity: .5; }
.gs-node.locked .gs-circle { background: var(--surface); }
.gs-node.off .gs-circle { opacity: .6; }
.gs-node.missed .gs-circle { border-color: var(--danger); color: var(--danger); }
.gs-node.gold .gs-circle { background: linear-gradient(135deg, #fdcb6e, #e1a93c); border-color: #fdcb6e;
  animation: gs-gold 2.4s ease-in-out infinite; }
@keyframes gs-gold { 0%,100% { box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 14px rgba(253,203,110,.3); }
  50% { box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 30px rgba(253,203,110,.6); } }

/* Strider on the map */
.gs-strider { position: absolute; width: 78px; pointer-events: none; display: none; z-index: 3; }
.gs-row:nth-child(odd) .gs-strider { right: 8%; }
.gs-row:nth-child(even) .gs-strider { left: 8%; }

/* briefing sheet */
.gs-sheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(8,9,14,.7); animation: fadein .2s; }
.gs-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--accent-soft); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 10px 22px calc(24px + env(safe-area-inset-bottom));
  animation: gs-sheet-up .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes gs-sheet-up { from { transform: translateY(100%); } }
.gs-sheet-stamp { font-family: 'Courier New', monospace; font-size: 10px; letter-spacing: 3px;
  color: var(--danger); border: 1.5px solid var(--danger); border-radius: 4px; padding: 2px 8px;
  display: inline-block; transform: rotate(-2deg); margin: 8px 0 10px; }
.gs-sheet h2 { font-family: 'Courier New', monospace; letter-spacing: 1px; }

/* desktop: widescreen world, map centered */
@media (min-width: 821px) {
  .gs-path { max-width: 560px; }
  .gs-hud { left: 230px; } /* clear the sidebar */
  body.gs-active .sidebar { z-index: 40; }
}
@media (prefers-reduced-motion: reduce) {
  .gs-search, .gs-node.now .gs-circle, .gs-node.gold .gs-circle { animation: none !important; }
}
