/* progressive UI unlocks / onboarding (loaded after style.css)
   body.onb = a first-time pilot still discovering the game; body.ul-<feature> = that part is open.
   Locked parts are faded out (not removed) so they can fade in when unlocked. */
#hud #tl-panel, #hud #tr-panel, #hud #flight, #hud #status, #hud #nova, #hud #radar-wrap, #hud #keyhint,
#hud #mtrack, #hud #markers, #hud #qpanel {
  transition: opacity 0.9s ease, visibility 0s linear 0s;
}
body.onb:not(.ul-hud) #tl-panel,
body.onb:not(.ul-keys) #tr-panel,
body.onb:not(.ul-flight) #flight,
body.onb:not(.ul-flight) #status,
body.onb:not(.ul-nova) #nova,
body.onb:not(.ul-radar) #radar-wrap,
body.onb:not(.ul-keys) #keyhint,
body.onb:not(.ul-missions) #mtrack,
body.onb:not(.ul-markers) #markers,
body.onb:not(.ul-markers) #tbox,
body.onb:not(.ul-markers) #tarrow,
body.onb:not(.ul-markers) #lock,
body.onb:not(.ul-quantum) #qpanel,
body.onb:not(.ul-quantum) #ring-q {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

/* the gentle first-minutes hints (bottom centre, one line, never more than one at a time) */
#onb-hint {
  position: fixed; left: 50%; bottom: 36vh; transform: translate(-50%, 8px);
  z-index: 6; pointer-events: none; opacity: 0;
  font-family: var(--kr, 'Noto Sans KR', sans-serif); font-size: 17px; font-weight: 400; letter-spacing: 0.02em;
  color: #e6eef3; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.9);
  transition: opacity 0.9s ease, transform 0.9s ease;
  white-space: nowrap;
}
#onb-hint.on { opacity: 1; transform: translate(-50%, 0); }
#onb-hint kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 7px; margin: 0 3px; border-radius: 3px;
  font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 15px; color: #dff6ff;
  border: 1px solid rgba(120, 220, 255, 0.55); background: rgba(10, 30, 40, 0.55);
  box-shadow: inset 0 -2px 0 rgba(120, 220, 255, 0.2);
}

/* PC only */
#pc-only {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #0b1a26 0%, #03070b 70%); color: #dce8ee;
  font-family: 'Noto Sans KR', sans-serif; text-align: center; padding: 24px;
}
#pc-only .box { max-width: 420px; }
#pc-only .k { font-family: 'Rajdhani', sans-serif; letter-spacing: 0.32em; font-size: 13px; color: #7fd8ff; margin-bottom: 14px; }
#pc-only h1 { font-family: 'Rajdhani', sans-serif; font-weight: 300; font-size: 40px; letter-spacing: 0.06em; margin: 0 0 18px; color: #f4f7fa; }
#pc-only p { font-size: 16px; line-height: 1.75; color: #b9c8d1; margin: 0; }

/* contract tracker: the next contract slides in instead of a separate toast */
#mtrack.next { animation: mtNext 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes mtNext { 0% { opacity: 0; transform: translateX(18px); } 100% { opacity: 1; transform: none; } }

/* resting on a view: a small blinking nudge toward photo mode */
#photo-hint {
  position: fixed; left: 50%; bottom: 6.5vh; transform: translateX(-50%); z-index: 6; pointer-events: none;
  font-family: 'Noto Sans KR', sans-serif; font-size: 14px; color: #e9f3f7; letter-spacing: 0.04em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9); opacity: 0; transition: opacity 0.8s ease;
}
#photo-hint.on { opacity: 1; animation: phBlink 2.4s ease-in-out infinite; }
#photo-hint kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 7px; margin-right: 6px; border-radius: 3px;
  font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 14px; color: #fff4d6;
  border: 1px solid rgba(243, 200, 117, 0.7); background: rgba(40, 30, 10, 0.5);
}
@keyframes phBlink { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* on foot: the flight console, radar and reticle have nothing to say */
body.walking #flight, body.walking #radar-wrap, body.walking #reticle, body.walking #stick, body.walking #stickline { opacity: 0 !important; visibility: hidden !important; }

/* contracts are a later chapter: until unlocked they don't appear in the records window either */
body.onb:not(.ul-missions) #achwin [data-tab="missions"],
body.onb:not(.ul-missions) #achwin .ov-mis,
body.onb:not(.ul-missions) #achwin .ov-mis-h,
body.onb:not(.ul-missions) #aw-tabs [data-tab="missions"] { display: none !important; }

/* finding other travellers: edge arrows (off screen) and corner brackets (on screen), warm gold */
#finder { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#finder .fd, #finder .fb { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; transition: opacity 0.5s ease; }
#finder .fd.on, #finder .fb.on { opacity: 1; }
#finder .fd .ring {
  position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 120, 0.28) 0%, rgba(255, 180, 90, 0.08) 60%, rgba(0, 0, 0, 0) 72%);
  border: 2px solid rgba(255, 210, 140, 0.85); box-shadow: 0 0 14px rgba(255, 190, 110, 0.6);
}
#finder .fd .ring::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255, 210, 140, 0.8);
  animation: fdRing 1.8s ease-out infinite;
}
#finder .fd i { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; }
#finder .fd i::before {
  content: ''; position: absolute; left: 18px; top: 13px; width: 0; height: 0;
  border-left: 20px solid #ffe2b0; border-top: 11px solid transparent; border-bottom: 11px solid transparent;
  filter: drop-shadow(0 0 6px rgba(255, 200, 120, 0.9));
}
#finder .tx {
  position: absolute; left: 0; top: 0; width: 140px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  text-align: center; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9); white-space: nowrap;
}
#finder .tx b { font: 700 15px Rajdhani, 'Noto Sans KR', sans-serif; letter-spacing: 0.05em; color: #ffe2b8; }
#finder .tx .wh { font: 500 13px 'Noto Sans KR', sans-serif; color: #f5ead8; }
#finder .tx .co { font: 600 13px Rajdhani, sans-serif; letter-spacing: 0.06em; color: #e7c79a; }
/* on-screen brackets around the ship */
#finder .fb i { position: absolute; width: 12px; height: 12px; border: 2px solid #ffd59a; filter: drop-shadow(0 0 5px rgba(255, 190, 110, 0.9)); animation: fdBr 2.2s ease-in-out infinite; }
#finder .fb .c1 { left: calc(-1 * var(--r, 30px)); top: calc(-1 * var(--r, 30px)); border-right: 0; border-bottom: 0; }
#finder .fb .c2 { left: calc(var(--r, 30px) - 12px); top: calc(-1 * var(--r, 30px)); border-left: 0; border-bottom: 0; }
#finder .fb .c3 { left: calc(-1 * var(--r, 30px)); top: calc(var(--r, 30px) - 12px); border-right: 0; border-top: 0; }
#finder .fb .c4 { left: calc(var(--r, 30px) - 12px); top: calc(var(--r, 30px) - 12px); border-left: 0; border-top: 0; }
#finder .fb .tx { transform: translate(-70px, calc(var(--r, 30px) + 6px)); }
@keyframes fdRing { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes fdBr { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
/* your own coordinates (top-left panel), to compare with the travellers' */
#my-coord { margin-top: 6px; font: 600 13px Rajdhani, 'Noto Sans KR', sans-serif; letter-spacing: 0.06em; color: #9fd6e6; }

/* traveller panel: a card in the right column, under the contract tracker and above the radar
   (main.js travellerPanel sets its top and height) */
#tpanel {
  position: fixed; right: 24px; top: 128px; width: 304px; overflow: hidden; z-index: 6; pointer-events: auto;
  padding: 11px 15px 12px; font-family: 'Noto Sans KR', sans-serif; color: #eef3f6;
  --ch: 10px; --pb: rgba(12, 11, 8, 0.74);
  opacity: 0; transform: translateX(18px); visibility: hidden;
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.45s, top 0.3s ease;
}
#tpanel.on { opacity: 1; transform: none; visibility: visible; transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s, top 0.3s ease; }
@media (min-width: 1800px) { #tpanel { right: 32px; } }
#tpanel .tp-h { display: flex; align-items: baseline; gap: 8px; }
#tpanel .tp-h .k { font: 600 calc(12px * var(--ui, 1)) Rajdhani, sans-serif; letter-spacing: 0.24em; color: #f3c875; }
#tpanel .tp-h b { font-size: calc(15px * var(--ui, 1)); font-weight: 600; color: #fff1d8; }
#tpanel .tp-h b em { font-style: normal; color: #f3c875; }
#tpanel .tp-fold { margin-left: auto; display: flex; align-items: center; gap: 5px; background: none; border: 0; color: #d9c49a; font: 500 calc(12.5px * var(--ui, 1)) 'Noto Sans KR', sans-serif; cursor: pointer; padding: 2px 0; }
#tpanel .tp-fold:hover { color: #fff; }
#tpanel.tight .tp-fold { display: none; }
#tpanel kbd {
  display: inline-block; white-space: nowrap; flex: none; min-width: 1.5em; padding: 0 6px; border-radius: 3px; text-align: center;
  font: 600 13px Rajdhani, 'Noto Sans KR', sans-serif; color: #fff4d6;
  border: 1px solid rgba(243, 200, 117, 0.7); background: rgba(40, 30, 10, 0.55); box-shadow: inset 0 -2px 0 rgba(243, 200, 117, 0.2);
}
#tpanel .tp-list { list-style: none; margin: 9px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#tpanel .tp-list li { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px 6px 10px; border-left: 2px solid rgba(243, 200, 117, 0.45); background: linear-gradient(90deg, rgba(243, 200, 117, 0.09), rgba(243, 200, 117, 0) 85%); }
#tpanel .tp-list li:first-child { border-left-color: #f3c875; }
#tpanel .tp-list .nm { font-size: calc(14.5px * var(--ui, 1)); }
#tpanel .tp-list span { font-size: calc(13px * var(--ui, 1)); color: #ddd5c6; }
#tpanel .tp-list .co { font: 600 calc(12.5px * var(--ui, 1)) Rajdhani, sans-serif; letter-spacing: 0.05em; color: #c9b48e; }
#tpanel .tp-list .bond { color: #9fe0c0; font-size: calc(12.5px * var(--ui, 1)); }
#tpanel .tp-list .more { padding: 2px 0 0 10px; border: 0; background: none; font-size: calc(12.5px * var(--ui, 1)); color: #b9ad97; }
#tpanel .tp-body { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(243, 200, 117, 0.18); display: flex; flex-wrap: wrap; gap: 6px 12px; }
#tpanel .tp-body span { display: inline-flex; align-items: center; gap: 5px; font-size: calc(12.5px * var(--ui, 1)); color: #ddd5c6; white-space: nowrap; }
#tpanel .tp-body kbd { min-width: 0; padding: 0 5px; font-size: 12.5px; }
#tpanel.fold .tp-body, #tpanel.tight .tp-body { display: none; }

/* a traveller's call sign: colour dot + "초록 외계인 크랄" */
.nm { font-weight: 600; color: #fff1d8; white-space: nowrap; }
.nm i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
#my-name { margin-top: 3px; font: 500 13px 'Noto Sans KR', sans-serif; color: #e9e2d3; }
#my-name i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* traveller alert: wide gold banner, top centre (main.js travellerAlerts) */
#trav-alert {
  position: fixed; left: 50%; top: 17vh; z-index: 7; pointer-events: none; display: flex; align-items: center; gap: 16px;
  min-width: min(560px, 90vw); max-width: 92vw; padding: 12px 22px 12px 16px; zoom: var(--capk, 1);
  font-family: 'Noto Sans KR', sans-serif; color: #f3e8d6;
  background: linear-gradient(90deg, rgba(16, 12, 6, 0.55), rgba(44, 30, 10, 0.86) 22%, rgba(44, 30, 10, 0.86) 78%, rgba(16, 12, 6, 0.55));
  border-top: 1px solid rgba(243, 200, 117, 0.75); border-bottom: 1px solid rgba(243, 200, 117, 0.75);
  box-shadow: 0 0 28px rgba(243, 190, 100, 0.22);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0 50%);
  opacity: 0; transform: translate(-50%, -12px) scaleX(0.92); visibility: hidden;
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.5s;
}
#trav-alert.on { opacity: 1; transform: translate(-50%, 0); visibility: visible; transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
#trav-alert.on::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 220, 150, 0.28), transparent); animation: taSweep 1.1s ease-out 1; pointer-events: none; }
@keyframes taSweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
#trav-alert .ta-arrow { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(243, 200, 117, 0.85); background: radial-gradient(circle, rgba(243, 200, 117, 0.22), transparent 70%); animation: taPulse 1.4s ease-in-out infinite; }
#trav-alert .ta-arrow i { position: absolute; inset: 0; transform: rotate(var(--ta-rot, 0rad)); transition: transform 0.15s linear; }
#trav-alert .ta-arrow i::before { content: ''; position: absolute; left: 50%; top: 6px; margin-left: -8px; border: 8px solid transparent; border-bottom: 14px solid #ffd58a; border-top: 0; filter: drop-shadow(0 0 4px rgba(255, 200, 110, 0.9)); }
#trav-alert.ahead .ta-arrow i::before { top: 50%; margin-top: -6px; margin-left: -6px; border: 0; width: 12px; height: 12px; border-radius: 50%; background: #ffd58a; }
#trav-alert.noarrow .ta-arrow i::before { top: 50%; margin: -7px 0 0 -7px; border: 0; width: 14px; height: 14px; background: #ffd58a; transform: rotate(45deg); border-radius: 0; }
#trav-alert.noarrow .ta-arrow i { transform: none; }
@keyframes taPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(243, 200, 117, 0.55); } 50% { box-shadow: 0 0 0 9px rgba(243, 200, 117, 0); } }
#trav-alert .ta-text { flex: 1; min-width: 0; }
#trav-alert .ta-text .k { font: 600 12px Rajdhani, sans-serif; letter-spacing: 0.3em; color: #f3c875; }
#trav-alert h4 { margin: 1px 0 2px; font-size: calc(22px * var(--ui, 1)); font-weight: 700; letter-spacing: 0.04em; color: #fff1d8; white-space: nowrap; }
#trav-alert p { font-size: calc(14.5px * var(--ui, 1)); color: #f5e3c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#trav-alert[data-level="3"] h4 { color: #ffe9b0; }
#trav-alert[data-level="0"] { border-color: rgba(243, 200, 117, 0.45); }
#trav-alert .ta-keys { flex: none; display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: #f3d9a8; }
#trav-alert .ta-keys span { margin-right: 6px; }
#trav-alert kbd {
  display: inline-block; white-space: nowrap; min-width: 1.6em; padding: 1px 7px; border-radius: 3px; text-align: center;
  font: 600 14px Rajdhani, 'Noto Sans KR', sans-serif; color: #fff4d6;
  border: 1px solid rgba(243, 200, 117, 0.75); background: rgba(40, 30, 10, 0.6); box-shadow: inset 0 -2px 0 rgba(243, 200, 117, 0.22);
}
