/* Phenomena game UI styles. Loaded after style.css; rules namespaced .ph- */

.ph-lore-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.ph-lore-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.ph-lore-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.78);
  backdrop-filter: blur(4px);
}

.ph-lore-panel {
  position: relative;
  background: linear-gradient(180deg, #161a26 0%, #0f1218 100%);
  color: #eaeaea;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 28px 32px 24px;
  width: min(820px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6),
              0 0 1px rgba(255, 255, 255, 0.04);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.ph-lore-panel h2 {
  font-size: 1.35rem;
  margin: 0 0 6px;
  font-weight: 600;
}

.ph-lore-sub {
  color: #aab;
  font-size: 0.92rem;
  margin: 0 0 22px;
  line-height: 1.45;
}

.ph-lore-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 720px) {
  .ph-lore-cards { grid-template-columns: 1fr; }
}

.ph-lore-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.ph-lore-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}
.ph-lore-card:active {
  transform: translateY(1px);
}

.ph-lore-card-title {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.ph-lore-card-tag {
  color: #9ab;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.ph-lore-card-blurb {
  color: #cde;
  font-size: 0.86rem;
  line-height: 1.5;
}

.ph-lore-err {
  color: #f88;
  font-size: 0.86rem;
  min-height: 1.2em;
  margin-top: 12px;
}

.ph-lore-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #9aa;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.ph-lore-close:hover { color: #fff; }

.ph-lore-card-current {
  border-color: rgba(255, 199, 68, 0.55);
  background: rgba(255, 199, 68, 0.08);
}
.ph-lore-current-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 199, 68, 0.22);
  color: #ffc744;
  border-radius: 4px;
  vertical-align: middle;
}

.ph-codex-lore-link {
  color: #4ad8ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(74, 216, 255, 0.4);
  cursor: pointer;
}
.ph-codex-lore-link:hover { color: #82e7ff; }

/* ── Find prompt (bottom-centre HUD pill) ───────────────── */

.ph-prompt {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 7000;
  padding: 10px 16px;
  background: rgba(15, 18, 26, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #e9edf2;
  font: 500 0.95rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  white-space: nowrap;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.ph-prompt.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.ph-prompt-name { color: #fff; }
.ph-prompt-tier {
  color: #ffc744;
  font-weight: 600;
  margin-left: 6px;
  font-size: 0.85rem;
}
.ph-prompt-dist {
  color: #99aabb;
  margin-left: 8px;
  font-size: 0.85rem;
}
.ph-prompt-key {
  margin-left: 10px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  font-size: 0.8rem;
  color: #cfe;
}

/* ── Find toast (top-right) ─────────────────────────────── */

.ph-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 7100;
  width: 320px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(20, 25, 34, 0.96) 0%, rgba(13, 16, 22, 0.96) 100%);
  border: 1px solid rgba(255, 199, 68, 0.4);
  border-radius: 10px;
  color: #eef0f3;
  font: 0.92rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.ph-toast.show {
  opacity: 1;
  transform: translateX(0);
}
.ph-toast-error { border-color: rgba(255, 90, 90, 0.5); }
.ph-toast-find  { border-color: rgba(255, 199, 68, 0.5); }

.ph-toast-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.ph-toast-tier {
  color: #ffc744;
  font-size: 0.85rem;
  margin-left: 4px;
  font-weight: 500;
}
.ph-toast-sub {
  color: #d99;
  font-size: 0.86rem;
  margin-bottom: 6px;
}
.ph-toast-body {
  color: #cdd;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 8px;
  font-style: italic;
}
.ph-toast-points {
  color: #ffc744;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.ph-toast-mults {
  color: #99aabb;
  font-size: 0.78rem;
}
/* Compact LockedCTA inside the find toast. */
.ph-toast-cta { margin-top: 8px; }
.ph-toast-cta .locked-cta {
  margin: 0;
  padding: 8px 10px;
  gap: 8px;
}
.ph-toast-cta .locked-cta-icon { font-size: 1.1rem; }
.ph-toast-cta .locked-cta-label { font-size: 0.85rem; }
.ph-toast-cta .locked-cta-sub { font-size: 0.72rem; }

/* ── Codex (button + modal) ─────────────────────────────── */

.ph-codex-btn {
  position: fixed;
  top: 220px;
  right: 16px;
  z-index: 6000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(15, 18, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #eee;
  font: 600 0.86rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ph-codex-btn:hover {
  background: rgba(30, 38, 54, 0.92);
  border-color: rgba(255, 199, 68, 0.4);
}
.ph-codex-btn-glyph { color: #ffc744; font-size: 1.05rem; }
.ph-codex-btn-points {
  margin-left: 6px;
  padding: 2px 7px;
  background: rgba(255, 199, 68, 0.16);
  color: #ffc744;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ph-codex-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.ph-codex-modal.show { opacity: 1; pointer-events: auto; }
.ph-codex-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 10, 16, 0.72);
  backdrop-filter: blur(3px);
}
.ph-codex-panel {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-codex-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ph-codex-header h2 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.ph-codex-stats {
  flex: 1;
  color: #99aabb;
  font-size: 0.85rem;
}
.ph-codex-close {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.ph-codex-close:hover { color: #fff; }
.ph-codex-body {
  padding: 14px 22px 22px;
  overflow-y: auto;
}
.ph-codex-section {
  margin: 18px 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #889;
}
.ph-codex-section:first-child { margin-top: 0; }
.ph-codex-empty {
  color: #779;
  font-size: 0.88rem;
  padding: 8px 4px;
}
.ph-codex-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ph-codex-row {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}
.ph-codex-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ph-codex-row-unknown { opacity: 0.55; }
.ph-codex-tier {
  display: inline-block;
  width: 32px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 0;
  border-radius: 4px;
}
.ph-codex-tier-1 { background: rgba(74, 216, 255, 0.18); color: #4ad8ff; }
.ph-codex-tier-2 { background: rgba(200, 112, 255, 0.18); color: #c870ff; }
.ph-codex-tier-3 { background: rgba(255, 199, 68, 0.2);  color: #ffc744; }
.ph-codex-tier-4 { background: rgba(255, 85, 68, 0.22);  color: #ff8474; }
.ph-codex-tier-5 { background: rgba(255, 255, 255, 0.18); color: #fff; }
.ph-codex-name { flex: 1; font-weight: 600; }
.ph-codex-name-locked { color: #667; font-style: italic; }
.ph-codex-count {
  color: #99aabb;
  font-size: 0.82rem;
}
.ph-codex-flavor {
  margin-top: 4px;
  color: #cdd;
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.4;
}
.ph-codex-obs {
  margin-top: 6px;
  color: #889;
  font-size: 0.78rem;
}
.ph-codex-obs-key { color: #aab; font-weight: 600; }

/* ── Mastery panel inside the codex ─────────────────────── */

.ph-mastery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.ph-mastery-row {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 10px 12px;
}
.ph-mastery-complete {
  border-color: rgba(255, 199, 68, 0.55);
  background: rgba(255, 199, 68, 0.08);
}
.ph-mastery-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.86rem;
  margin-bottom: 6px;
}
.ph-mastery-name { font-weight: 600; color: #e9edf2; }
.ph-mastery-count { color: #99aabb; font-variant-numeric: tabular-nums; }
.ph-mastery-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.ph-mastery-fill {
  height: 100%;
  background: linear-gradient(90deg, #4ad8ff 0%, #ffc744 100%);
  transition: width 0.3s ease;
}

/* ── Event pill + modal ─────────────────────────────────── */

.ph-event-pill {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 6500;
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 7px 14px;
  background: linear-gradient(180deg, rgba(140, 100, 255, 0.95) 0%, rgba(80, 60, 200, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font: 600 0.86rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 6px 18px rgba(80, 60, 200, 0.4);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.ph-event-pill.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.ph-event-pill:hover { background: linear-gradient(180deg, rgba(160, 120, 255, 1) 0%, rgba(100, 80, 220, 1) 100%); }
.ph-event-pill-icon { font-size: 1rem; }
.ph-event-pill-time { color: rgba(255, 255, 255, 0.75); font-size: 0.78rem; }

.ph-event-modal {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.ph-event-modal.show { opacity: 1; pointer-events: auto; }
.ph-event-panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  background: linear-gradient(180deg, #1c1830 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(140, 100, 255, 0.4);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-event-body {
  padding: 14px 22px 22px;
}
.ph-event-desc {
  color: #cdd;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 14px;
}
.ph-event-bonuses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ph-event-bonus {
  background: rgba(140, 100, 255, 0.18);
  border: 1px solid rgba(140, 100, 255, 0.45);
  color: #e0d0ff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
}
.ph-event-section {
  margin: 18px 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b9a6ff;
}
.ph-event-steps {
  margin: 0 0 8px;
  padding-left: 20px;
  color: #cdd;
  font-size: 0.92rem;
  line-height: 1.55;
}
.ph-event-steps li { margin-bottom: 4px; }
.ph-event-steps li b { color: #ffc744; }
.ph-event-set-home {
  background: rgba(255, 199, 68, 0.18);
  border: 1px solid rgba(255, 199, 68, 0.55);
  color: #ffe79f;
  padding: 4px 10px;
  border-radius: 6px;
  font: 600 0.9rem inherit;
  cursor: pointer;
  margin-left: 4px;
  transition: background 0.12s ease;
}
.ph-event-set-home:hover {
  background: rgba(255, 199, 68, 0.32);
}
.ph-event-bonuses-note {
  color: #99aabb;
  font-size: 0.82rem;
  margin: 0 0 6px;
  font-style: italic;
}
.ph-event-bonuses-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ph-event-bonuses-list li {
  background: rgba(140, 100, 255, 0.12);
  border-left: 3px solid rgba(140, 100, 255, 0.55);
  padding: 8px 12px;
  border-radius: 6px;
  color: #e0d0ff;
  font-size: 0.9rem;
  line-height: 1.45;
}
.ph-event-bonuses-list li b { color: #fff; }

.ph-event-tp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0 6px;
}
.ph-event-tp-label {
  color: #99aabb;
  font-size: 0.82rem;
  font-weight: 600;
  margin-right: 4px;
}
.ph-event-tp {
  background: rgba(140, 100, 255, 0.18);
  border: 1px solid rgba(140, 100, 255, 0.5);
  color: #e0d0ff;
  padding: 6px 12px;
  border-radius: 6px;
  font: 600 0.86rem inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ph-event-tp:hover {
  background: rgba(140, 100, 255, 0.32);
  border-color: rgba(140, 100, 255, 0.8);
}

/* ── Nearby panel ───────────────────────────────────────── */

.ph-nearby {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 6000;
  width: 240px;
  background: rgba(15, 18, 26, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #e9edf2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  padding: 10px 12px 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.ph-nearby.show { opacity: 1; }
.ph-nearby-head {
  color: #889;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 600;
}
.ph-nearby-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ph-nearby-row {
  display: grid;
  grid-template-columns: 26px 1fr auto auto;
  gap: 6px;
  align-items: center;
  font-size: 0.84rem;
  padding: 3px 0;
}
.ph-nearby-tier {
  font-size: 0.66rem;
  text-align: center;
  padding: 1px 0;
  border-radius: 3px;
}
.ph-nearby-name {
  color: #cdd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph-nearby-arrow {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  width: 1.2em;
  text-align: center;
}
.ph-nearby-dist {
  color: #99aabb;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}
.ph-nearby-inrange {
  background: rgba(255, 199, 68, 0.12);
  border-radius: 4px;
}
.ph-nearby-inrange .ph-nearby-name { color: #ffc744; font-weight: 600; }
.ph-nearby-far .ph-nearby-name,
.ph-nearby-far .ph-nearby-dist { color: #889; }
.ph-nearby-far .ph-nearby-arrow { color: #aab; }
.ph-nearby-empty {
  color: #889;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 4px 0;
}

/* ── Compass dial (P5g) ─────────────────────────────────── */

.ph-compass {
  position: fixed;
  bottom: 220px;
  left: 16px;
  z-index: 6000;
  pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.45));
}

/* ── Tutorial overlay (P5h) ─────────────────────────────── */

.ph-tutorial {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.22s ease;
  pointer-events: none;
}
.ph-tutorial.show { opacity: 1; pointer-events: auto; }
.ph-tutorial-backdrop {
  position: absolute; inset: 0;
  z-index: 9500;
  background: rgba(8, 10, 16, 0.78);
  backdrop-filter: blur(4px);
}
.ph-tutorial-spotlight {
  z-index: 9600 !important;
  border-radius: 12px;
  box-shadow:
    0 0 0 2px rgba(255, 199, 68, 0.9),
    0 0 24px 4px rgba(255, 199, 68, 0.55);
  transition: box-shadow 0.18s ease;
}
.ph-tutorial-panel {
  position: relative;
  z-index: 9700;
  width: min(560px, calc(100vw - 32px));
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  border: 1px solid rgba(255, 199, 68, 0.4);
  border-radius: 14px;
  padding: 22px 28px 22px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  color: #e9edf2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-tutorial-progress {
  color: #889;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 10px;
}
.ph-tutorial-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.ph-tutorial-body {
  color: #cdd;
  font-size: 0.96rem;
  line-height: 1.55;
  margin: 0 0 20px;
}
.ph-tutorial-body b { color: #ffc744; }
.ph-tutorial-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ph-tutorial-nav {
  display: flex;
  gap: 8px;
}
.ph-tutorial button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cdd;
  padding: 8px 16px;
  border-radius: 6px;
  font: 600 0.88rem inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ph-tutorial button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}
.ph-tutorial button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ph-tutorial-primary {
  background: rgba(255, 199, 68, 0.22) !important;
  border-color: rgba(255, 199, 68, 0.55) !important;
  color: #ffe79f !important;
}
.ph-tutorial-primary:hover:not(:disabled) {
  background: rgba(255, 199, 68, 0.32) !important;
  border-color: rgba(255, 199, 68, 0.85) !important;
}
.ph-tutorial-skip {
  color: #889 !important;
  background: transparent !important;
  border-color: transparent !important;
}
.ph-tutorial-skip:hover {
  color: #cdd !important;
}

/* ── Journey lattice bar (top-centre HUD) ──────────────── */

.ph-journey-bar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 18, 26, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #cdd;
  font: 600 0.78rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ph-journey-bar:hover {
  background: rgba(30, 38, 54, 0.92);
  border-color: rgba(255, 255, 255, 0.3);
}
.ph-journey-label { color: #889; text-transform: uppercase; letter-spacing: 0.08em; }
.ph-journey-track {
  position: relative;
  width: 140px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.ph-journey-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #4ad8ff 0%, #c870ff 50%, #ffc744 100%);
  transition: width 0.4s ease;
}
.ph-journey-count {
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.ph-journey-ready {
  border-color: rgba(255, 199, 68, 0.6);
  box-shadow: 0 0 18px rgba(255, 199, 68, 0.25);
}
.ph-journey-ready .ph-journey-count { color: #ffc744; }
.ph-journey-done .ph-journey-fill {
  background: linear-gradient(90deg, #ffc744, #fff);
}

/* ── Milestone reveal modal ─────────────────────────────── */

.ph-milestone-modal {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.22s ease;
  pointer-events: none;
}
.ph-milestone-modal.show { opacity: 1; pointer-events: auto; }
.ph-milestone-panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  border: 1px solid rgba(200, 112, 255, 0.55);
  border-radius: 14px;
  padding: 22px 28px 22px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  color: #e9edf2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-milestone-progress {
  color: #c870ff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 10px;
}
.ph-milestone-title {
  margin: 0 0 14px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}
.ph-milestone-body {
  color: #cdd;
  font-size: 1.0rem;
  line-height: 1.6;
  margin: 0 0 12px;
  font-style: italic;
}
.ph-milestone-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ── Journey panel ──────────────────────────────────────── */

.ph-journey-modal {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.ph-journey-modal.show { opacity: 1; pointer-events: auto; }
.ph-journey-panel {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(200, 112, 255, 0.45);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-journey-body { padding: 14px 22px 22px; overflow-y: auto; }
.ph-journey-list {
  list-style: none; margin: 0 0 8px; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.ph-journey-ms {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
}
.ph-journey-ms-unlocked {
  border-color: rgba(200, 112, 255, 0.45);
  background: rgba(200, 112, 255, 0.06);
}
.ph-journey-ms-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.ph-journey-ms-thr {
  color: #c870ff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
}
.ph-journey-ms-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}
.ph-journey-ms-body {
  color: #cdd;
  font-size: 0.92rem;
  line-height: 1.55;
  font-style: italic;
  margin-top: 6px;
}
.ph-journey-ms-locked {
  color: #667;
  font-size: 0.85rem;
  font-style: italic;
}
.ph-journey-ch {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 14px;
}
.ph-journey-ch-claimed {
  opacity: 0.65;
  border-color: rgba(255, 199, 68, 0.4);
}
.ph-journey-ch-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.ph-journey-ch-title { color: #fff; font-weight: 600; }
.ph-journey-ch-reward {
  color: #c870ff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ph-journey-ch-desc {
  color: #cdd;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 8px;
}
.ph-journey-ch-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.ph-journey-ch-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #4ad8ff, #c870ff);
  transition: width 0.3s ease;
}
.ph-journey-ch-action {
  display: flex;
  justify-content: flex-end;
}
.ph-journey-claimed {
  color: #ffc744;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ph-journey-progress-pct {
  color: #889;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.ph-journey-conv {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 18px;
}
.ph-journey-conv h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #fff;
}
.ph-journey-conv p {
  color: #cdd;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 10px;
  font-style: italic;
}
.ph-journey-conv-ready {
  border-color: rgba(255, 199, 68, 0.6);
  background: rgba(255, 199, 68, 0.08);
  box-shadow: 0 0 22px rgba(255, 199, 68, 0.18) inset;
}
.ph-journey-conv-done {
  border-color: rgba(74, 216, 255, 0.6);
  background: rgba(74, 216, 255, 0.06);
}

/* ── Inbox button + modal ───────────────────────────────── */

.ph-inbox-btn {
  position: fixed;
  top: 304px;
  right: 16px;
  z-index: 6000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(15, 18, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #eee;
  font: 600 0.86rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ph-inbox-btn:hover {
  background: rgba(30, 38, 54, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
}
.ph-inbox-btn.ph-has-unread {
  border-color: rgba(255, 199, 68, 0.5);
}
.ph-inbox-badge {
  background: #ffc744;
  color: #221a00;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.ph-inbox-modal {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.ph-inbox-modal.show { opacity: 1; pointer-events: auto; }
.ph-inbox-panel {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-inbox-body { padding: 14px 22px 22px; overflow-y: auto; }
.ph-inbox-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.ph-inbox-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ph-inbox-row:hover { background: rgba(255, 255, 255, 0.06); }
.ph-inbox-unread {
  border-left: 3px solid #ffc744;
  background: rgba(255, 199, 68, 0.06);
}
.ph-inbox-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #99aabb;
  margin-bottom: 4px;
}
.ph-inbox-sender { color: #ffc744; font-weight: 600; }
.ph-inbox-subject { font-weight: 600; color: #fff; margin-bottom: 6px; }
.ph-inbox-body-text { color: #cdd; font-size: 0.92rem; line-height: 1.5; }

/* ── Conditions HUD pill + panel ────────────────────────── */

.ph-conds-pill {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 6000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(15, 18, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #eee;
  font: 600 0.82rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ph-conds-pill:hover {
  background: rgba(30, 38, 54, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
}
.ph-conds-tod { color: #fff; }
.ph-conds-sep { color: #556; }
.ph-conds-wx { color: #cde; }
.ph-conds-moon { font-size: 1rem; line-height: 1; }
.ph-conds-mock {
  color: #221a00;
  background: rgba(255, 199, 68, 0.85);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ph-conds-modal {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.ph-conds-modal.show { opacity: 1; pointer-events: auto; }
.ph-conds-panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-conds-body { padding: 14px 22px 22px; }
.ph-conds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.ph-conds-key {
  color: #889;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.ph-conds-val {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
}
.ph-conds-note {
  color: #cdd;
  font-size: 0.85rem;
  line-height: 1.5;
  background: rgba(255, 199, 68, 0.06);
  border: 1px solid rgba(255, 199, 68, 0.18);
  border-radius: 8px;
  padding: 10px 14px;
}
.ph-conds-note code {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.85em;
}
.ph-conds-toggle-row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ph-conds-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cdd;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}
.ph-conds-toggle input[type=checkbox] {
  accent-color: #ffc744;
}

/* ── Weatherweaving modal ───────────────────────────────── */

.ph-weather-modal {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.ph-weather-modal.show { opacity: 1; pointer-events: auto; }
.ph-weather-panel {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(140, 180, 255, 0.4);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-weather-body { padding: 16px 22px 22px; }
.ph-weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ph-weather-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #e9edf2;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.ph-weather-card:hover:not(:disabled) {
  background: rgba(140, 180, 255, 0.12);
  border-color: rgba(140, 180, 255, 0.55);
}
.ph-weather-card:active:not(:disabled) { transform: translateY(1px); }
.ph-weather-card:disabled { opacity: 0.5; cursor: not-allowed; }
.ph-weather-current { border-color: rgba(255, 199, 68, 0.55); }
.ph-weather-unaffordable { opacity: 0.55; }
.ph-weather-icon { font-size: 1.6rem; line-height: 1; }
.ph-weather-name {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: capitalize;
}
.ph-weather-cost {
  color: #99aabb;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.ph-weather-tag {
  margin-left: 4px;
  color: #ffc744;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}
.ph-weather-hint {
  color: #99aabb;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ── Resonance (button + badge + panel) ─────────────────── */

.ph-resonance-btn {
  position: fixed;
  top: 262px;
  right: 16px;
  z-index: 6000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(15, 18, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #eee;
  font: 600 0.86rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ph-resonance-btn:hover {
  background: rgba(30, 38, 54, 0.92);
  border-color: rgba(74, 216, 255, 0.5);
}

.ph-resonance-badge {
  position: fixed;
  top: 56px;
  right: 16px;
  z-index: 6500;
  padding: 6px 12px;
  background: linear-gradient(180deg, rgba(255, 199, 68, 0.95) 0%, rgba(255, 153, 0, 0.95) 100%);
  color: #221a00;
  border-radius: 999px;
  font: 700 0.85rem -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 6px 18px rgba(255, 153, 0, 0.4);
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.ph-resonance-badge.show {
  opacity: 1;
  transform: translateY(0);
}
.ph-resonance-badge-mult { font-size: 1.0rem; }
.ph-resonance-badge-time { color: #553a00; }

.ph-resonance-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.ph-resonance-modal.show { opacity: 1; pointer-events: auto; }

.ph-resonance-panel {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-resonance-body {
  padding: 14px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ph-resonance-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 16px;
}
.ph-resonance-section h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
}
.ph-resonance-help {
  color: #99aabb;
  font-size: 0.82rem;
  margin: 0 0 10px;
}
.ph-resonance-action {
  background: rgba(74, 216, 255, 0.18);
  border: 1px solid rgba(74, 216, 255, 0.45);
  color: #cdf;
  padding: 8px 14px;
  border-radius: 6px;
  font: 600 0.88rem inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.ph-resonance-action:hover {
  background: rgba(74, 216, 255, 0.28);
  border-color: rgba(74, 216, 255, 0.75);
}
.ph-resonance-input-row {
  display: flex;
  gap: 8px;
}
.ph-res-redeem-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font: 600 1rem ui-monospace, Menlo, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ph-res-redeem-input:focus { outline: 1px solid rgba(74, 216, 255, 0.55); }

.ph-resonance-result {
  margin-top: 10px;
  color: #cdd;
  font-size: 0.86rem;
}
.ph-res-code {
  font: 700 1.6rem ui-monospace, Menlo, monospace;
  letter-spacing: 0.16em;
  color: #ffc744;
  margin-bottom: 4px;
}
.ph-res-help { color: #99aabb; font-size: 0.78rem; }
.ph-res-success {
  color: #ffc744;
  font: 700 1.1rem inherit;
}

/* ── Abilities modal ────────────────────────────────────── */

.ph-abilities-modal {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.ph-abilities-modal.show { opacity: 1; pointer-events: auto; }

.ph-abilities-panel {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-abilities-body {
  padding: 14px 22px 22px;
  overflow-y: auto;
}
.ph-abilities-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ph-abilities-list .ph-codex-row { padding-bottom: 12px; }
.ph-ability-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.ph-ability-unlock {
  background: rgba(74, 216, 255, 0.18);
  border: 1px solid rgba(74, 216, 255, 0.45);
  color: #cdf;
  padding: 6px 12px;
  border-radius: 6px;
  font: 600 0.86rem inherit;
  cursor: pointer;
}
.ph-ability-unlock:hover {
  background: rgba(74, 216, 255, 0.28);
  border-color: rgba(74, 216, 255, 0.75);
}
.ph-ability-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cdd;
  padding: 6px 12px;
  border-radius: 6px;
  font: 600 0.82rem inherit;
  cursor: pointer;
}
.ph-ability-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.ph-ability-status {
  color: #ffc744;
  font-size: 0.82rem;
  font-weight: 600;
}
.ph-ability-locked-tag {
  color: #889;
  font-size: 0.82rem;
  font-style: italic;
}
.ph-ability-owned { border-left: 3px solid rgba(255, 199, 68, 0.55); }
.ph-ability-buyable { border-left: 3px solid rgba(74, 216, 255, 0.55); }
.ph-ability-locked, .ph-ability-unaffordable { opacity: 0.7; }

/* ── Forecast modal ─────────────────────────────────────── */

.ph-forecast-modal {
  position: fixed; inset: 0; z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease; pointer-events: none;
}
.ph-forecast-modal.show { opacity: 1; pointer-events: auto; }

.ph-forecast-panel {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #161a26 0%, #0e1119 100%);
  color: #e9edf2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.6);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ph-forecast-body { padding: 14px 22px 22px; overflow-y: auto; }
.ph-forecast-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.ph-forecast-windows {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ph-forecast-window {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
.ph-forecast-day {
  color: #ffc744;
  font-weight: 600;
}
.ph-forecast-time { color: #cfe; font-variant-numeric: tabular-nums; }
.ph-forecast-dur { color: #889; font-size: 0.78rem; }

/* ── Locked CTA (shared component) ──────────────────────── */

.locked-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.1s ease;
}
.locked-cta:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}
.locked-cta:active { transform: scale(0.99); }
.locked-cta-icon {
  font-size: 1.4rem;
  flex: 0 0 auto;
}
.locked-cta-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.locked-cta-label {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}
.locked-cta-sub {
  color: #889;
  font-size: 0.8rem;
}
.locked-cta-cta {
  flex: 0 0 auto;
  background: rgba(255, 199, 68, 0.22);
  border: 1px solid rgba(255, 199, 68, 0.55);
  color: #ffe79f;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}
.locked-cta-bar {
  display: block;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.locked-cta-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,
    rgba(255, 199, 68, 0.7), rgba(255, 199, 68, 1));
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Owned: full color, suggests a usable action */
.locked-cta-active {
  background: rgba(255, 199, 68, 0.18);
  border-color: rgba(255, 199, 68, 0.6);
}
.locked-cta-active .locked-cta-label { color: #ffe79f; }
.locked-cta-active:hover {
  background: rgba(255, 199, 68, 0.30);
  border-color: rgba(255, 199, 68, 0.85);
}

/* Affordable: gold pulse ring drawing attention */
.locked-cta-affordable {
  border-color: rgba(255, 199, 68, 0.55);
  animation: locked-cta-pulse 2.4s ease-in-out infinite;
}
@keyframes locked-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 199, 68, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(255, 199, 68, 0.18); }
}

/* Locked + needs more pts: muted, but still inviting */
.locked-cta-locked .locked-cta-label,
.locked-cta-prereq .locked-cta-label { color: #cdd; }
.locked-cta-locked .locked-cta-icon,
.locked-cta-prereq .locked-cta-icon { opacity: 0.7; }

/* Compact mastery / event / nearby teaser placements. */
.ph-mastery-cta { margin-top: 8px; }
.ph-mastery-cta .locked-cta { margin: 0; padding: 6px 10px; gap: 8px; }
.ph-mastery-cta .locked-cta-label { font-size: 0.85rem; }
.ph-mastery-cta .locked-cta-sub { font-size: 0.72rem; }

#ph-resonance-cta,
#ph-event-cta,
#ph-nearby-cta { margin-top: 10px; }
#ph-nearby-cta .locked-cta { margin: 0; padding: 8px 10px; }
#ph-nearby-cta .locked-cta-label { font-size: 0.82rem; }
#ph-nearby-cta .locked-cta-sub { font-size: 0.7rem; }

/* Flash for ability rows when scrolled into view from a teaser tap. */
.ph-ability-flash {
  animation: ph-ability-flash 1.5s ease-in-out;
}
@keyframes ph-ability-flash {
  0%   { box-shadow: 0 0 0 0 rgba(255, 199, 68, 0); }
  20%  { box-shadow: 0 0 0 3px rgba(255, 199, 68, 0.7); }
  100% { box-shadow: 0 0 0 0 rgba(255, 199, 68, 0); }
}
