/* ═══════════════════════════════════════════════════════════
   Journey Island Map
   ═══════════════════════════════════════════════════════════ */

/* Hub tile */
.subj-journey .subj-icon-wrap {
  background: var(--green);
  color: var(--surface);
}

/* Screen container */
.journey-header {
  text-align: center;
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
}
.journey-title {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--dark);
  margin: 0 0 var(--sp-1);
}
.journey-subtitle {
  font-size: .78rem;
  color: var(--gray-1);
  margin: 0 0 var(--sp-2);
}
.journey-score {
  display: inline-block;
  font-size: .75rem;
  font-weight: 800;
  color: var(--dark);
  background: var(--yellow-l);
  border: 2px solid var(--dark);
  padding: 4px 14px;
  border-radius: var(--radius-s);
}

/* Horizontal scrollable island strip */
.journey-map-strip {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--sp-5) var(--sp-4) var(--sp-6);
  gap: 0;
  -webkit-overflow-scrolling: touch;
}
.journey-map-strip::-webkit-scrollbar { height: 4px; }
.journey-map-strip::-webkit-scrollbar-thumb { background: var(--gray-4); border-radius: 2px; }

/* Dotted path between islands */
.journey-path {
  flex-shrink: 0;
  width: 32px;
  height: 2px;
  border-top: 2px dashed var(--gray-3);
  margin: 0 4px;
  align-self: center;
}

/* Individual island card */
.journey-island {
  flex-shrink: 0;
  width: 100px;
  scroll-snap-align: center;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease;
  padding: var(--sp-2);
  border-radius: var(--radius);
}
.journey-island:hover { transform: translateY(-3px); }

.journey-island-art {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-2);
}

.journey-island-label {
  font-size: .65rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 2px;
  line-height: 1.3;
}
.journey-island-book {
  font-size: .55rem;
  color: var(--gray-2);
  margin-bottom: var(--sp-1);
}
.journey-island-bar {
  height: 4px;
  background: var(--gray-5);
  border: 1px solid var(--gray-4);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}
.journey-island-fill {
  height: 100%;
  background: var(--green);
  transition: width .5s ease;
}
.journey-island-count {
  font-size: .55rem;
  font-weight: 700;
  color: var(--gray-1);
}

/* Island states */
.journey-island-conquered {
  border: 2px solid var(--green);
  background: var(--green-l);
}
.journey-island-current {
  border: 2px solid var(--yellow);
  background: var(--yellow-l);
  animation: journey-pulse 2s ease-in-out infinite;
}
.journey-island-locked {
  opacity: 0.55;
  cursor: default;
  filter: grayscale(0.5);
}
.journey-island-locked:hover { transform: none; }

/* Flag on conquered islands */
.journey-island-flag {
  position: absolute;
  top: -4px;
  right: 6px;
  font-size: 1.1rem;
}

/* Mario on current island */
.journey-island-mario {
  position: absolute;
  bottom: 2px;
  left: 8px;
  animation: journey-mario-walk 1.2s ease-in-out infinite;
}

/* Lock on future islands */
.journey-island-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  opacity: 0.5;
}

/* ── Conquest celebration overlay ── */
.journey-conquest-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  z-index: 9800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: gm-pop-in .4s cubic-bezier(.22,.68,.36,1.2);
}
.journey-conquest-overlay.journey-conquest-out {
  animation: journey-fade-out .35s ease forwards;
}
.journey-conquest-modal {
  background: var(--surface);
  border: var(--px-border);
  box-shadow: var(--px-shadow);
  border-radius: var(--radius);
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  max-width: 360px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.journey-conquest-island {
  margin: 0 auto var(--sp-3);
  animation: journey-island-pop .6s ease;
}
.journey-conquest-flag-rise {
  font-size: 2rem;
  animation: journey-flag-rise .8s ease .3s both;
}
.journey-conquest-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--dark);
  margin: var(--sp-2) 0 var(--sp-1);
}
.journey-conquest-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green);
  margin: 0 0 var(--sp-2);
}
.journey-conquest-body {
  font-size: .8rem;
  color: var(--gray-1);
  margin: 0 0 var(--sp-1);
  line-height: 1.5;
}
.journey-conquest-detail {
  font-size: .65rem;
  color: var(--gray-2);
  margin: 0 0 var(--sp-4);
}
.journey-conquest-cta {
  min-width: 160px;
}

/* Confetti (CSS particles using box-shadow) */
.journey-conquest-confetti {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.journey-conquest-confetti::before,
.journey-conquest-confetti::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  animation: journey-confetti-fall 2s ease-out forwards;
}
.journey-conquest-confetti::before {
  left: 20%;
  background: var(--red);
  box-shadow:
    30px -20px 0 var(--yellow),
    60px -40px 0 var(--green),
    90px -10px 0 var(--blue),
    120px -50px 0 var(--red),
    150px -30px 0 var(--yellow),
    -20px -35px 0 var(--green),
    -50px -15px 0 var(--blue);
}
.journey-conquest-confetti::after {
  right: 20%;
  background: var(--blue);
  box-shadow:
    -30px -25px 0 var(--green),
    -60px -45px 0 var(--red),
    -90px -15px 0 var(--yellow),
    -120px -55px 0 var(--blue),
    -150px -35px 0 var(--green),
    20px -30px 0 var(--red),
    50px -20px 0 var(--yellow);
}

/* ── Journey keyframes ── */
@keyframes journey-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 184, 0, .4); }
  50%      { box-shadow: 0 0 0 6px rgba(248, 184, 0, 0); }
}

@keyframes journey-mario-walk {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(6px) scaleX(-1); }
}

@keyframes journey-island-pop {
  0%   { transform: scale(0.3); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes journey-flag-rise {
  0%   { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes journey-confetti-fall {
  0%   { transform: translateY(-30px) rotate(0); opacity: 1; }
  100% { transform: translateY(300px) rotate(720deg); opacity: 0; }
}

@keyframes journey-fade-out {
  to { opacity: 0; }
}
