/* ══════════════════════════════════
   RESCUE / MILESTONE MODALS
══════════════════════════════════ */
.modal-static-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-static-overlay.active {
  display: flex;
}

.modal-static-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 460px;
  padding: 2rem 1.75rem;
  background: url('../img/Fondo_Pergamino.webp') center center / cover no-repeat;
  background-color: #CE9D66;
  border: 2px solid #C19A6B;
  border-radius: 20px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: #1a0f0a;
  text-align: center;
  animation: popIn .22s ease-out;
}

@keyframes popIn {
  from {
    transform: translate(-50%, -50%) scale(.85);
    opacity: 0;
  }

  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.modal-static-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--wn-orange);
  margin: 0 0 .75rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.modal-static-desc {
  font-size: .95rem;
  color: #5c4033;
  margin-bottom: 1.25rem;
}

.modal-static-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-modal-action {
  padding: 9px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  transition: transform .1s, opacity .1s;
}

.btn-modal-action:active {
  transform: translateY(2px);
}

.btn-modal-cancel {
  background: rgba(139, 90, 43, 0.15);
  color: #5c4033;
  border: 1px solid rgba(139, 90, 43, 0.35);
}

.btn-modal-cancel:hover {
  background: rgba(139, 90, 43, 0.28);
}

.btn-modal-confirm {
  background: #c62828;
  color: #fff;
}

.btn-modal-confirm:hover {
  background: #d32f2f;
}

.btn-modal-success {
  background: var(--wn-orange);
  color: #fff;
}

.btn-modal-success:hover {
  background: var(--wn-orange-dark);
}

.modal-static-game-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  text-align: left;
}

.modal-static-game-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(139, 90, 43, 0.25);
  font-size: .95rem;
  color: #1a0f0a;
}

.modal-static-game-list li:last-child {
  border-bottom: none;
}

.modal-static-game-streak {
  font-weight: 700;
  color: var(--wn-orange);
}

.streak-milestone-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: .5rem;
  display: block;
  animation: milestone-pulse .5s ease-out;
}

@keyframes milestone-pulse {
  0% {
    transform: scale(.5);
    opacity: 0;
  }

  70% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Rescue CTA bar */
.rescue-cta-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: url('../img/Fondo_Pergamino.webp') center center / cover no-repeat;
  background-color: #CE9D66;
  border: 2px solid #C19A6B;
  border-radius: 30px;
  padding: .55rem 1rem .55rem 1.1rem;
  margin-bottom: 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: #3d2210;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.rescue-cta-btn {
  background: var(--wn-orange);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 5px 14px;
  font-weight: 700;
  font-size: .8rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(255, 107, 0, 0.35);
  transition: background .15s, transform .1s;
}

.rescue-cta-btn:hover {
  background: var(--wn-orange-dark);
  transform: scale(1.04);
}

@media (max-width: 600px) {
  .modal-static-content {
    padding: 1.4rem 1.1rem;
  }
}

/* ── Tutorial overlay (shared) ── */
.wn-tutorial-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.wn-tutorial-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.wn-tutorial-swatch.correct {
  background: url('../img/Fondo_Pergamino.webp') center / cover no-repeat;
  background-color: #a0d4b0;
  background-blend-mode: multiply;
  border-color: #3c7355;
}

.wn-tutorial-swatch.partial {
  background: url('../img/Fondo_Pergamino.webp') center / cover no-repeat;
  background-color: #f7b47e;
  background-blend-mode: multiply;
  border-color: #b85718;
}

.wn-tutorial-swatch.incorrect {
  background: url('../img/Fondo_Pergamino.webp') center / cover no-repeat;
  background-color: #eaa4a8;
  background-blend-mode: multiply;
  border-color: #a83f47;
}

.wn-tutorial-swatch.unknown {
  background: url('../img/Fondo_Pergamino.webp') center / cover no-repeat;
  background-color: #b0aaa6;
  background-blend-mode: multiply;
  border-color: #8e827b;
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.tutorial-overlay.active {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.tutorial-content {
  position: relative;
  background: url('../img/Fondo_Pergamino.webp') center center / cover no-repeat;
  background-color: #CE9D66;
  color: #1a0f0a;
  border: 2px solid #C19A6B;
  border-radius: 18px;
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 0 50px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: wn-pop-in .22s ease;
}

@keyframes wn-pop-in {
  from {
    transform: scale(.92);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.tutorial-content h2 {
  font-size: 1.4rem;
  font-weight: 900;
  color: #4A2E15;
  margin: 0 0 18px;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.tutorial-content::-webkit-scrollbar {
  width: 6px;
}

.tutorial-content::-webkit-scrollbar-track {
  background: transparent;
}

.tutorial-content::-webkit-scrollbar-thumb {
  background: #C19A6B;
  border-radius: 3px;
}

.btn-close-tutorial {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: #8B5A2B;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color .2s, transform .2s;
}

.btn-close-tutorial:hover {
  color: #4A2E15;
  transform: scale(1.15);
}

.tutorial-desc-block p {
  font-size: 0.87rem;
  color: #5c4033;
  line-height: 1.6;
  margin: 0 0 8px;
  text-align: left;
  font-weight: 500;
}

.tutorial-hr {
  border: none;
  border-top: 1px dashed rgba(139, 90, 43, 0.4);
  margin: 16px 0 14px;
}

.tutorial-choose-text {
  font-size: 0.9rem;
  font-weight: 800;
  color: #4A2E15;
  margin: 20px 0 12px;
}

.tutorial-swatches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  text-align: left;
  margin-bottom: 4px;
}

.tutorial-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-tutorial-level {
  background: rgba(255, 255, 255, 0.4);
  color: #5c4033;
  border: 2px solid #C19A6B;
  padding: 10px 26px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 0 rgba(139, 90, 43, .35);
}

.btn-tutorial-level:hover {
  border-color: #8B5A2B;
  color: #4A2E15;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(139, 90, 43, .35);
}

.btn-tutorial-level:active {
  transform: translateY(2px);
  box-shadow: none;
}

.btn-tutorial-level.current {
  border-color: #8B5A2B;
  color: #4A2E15;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 0 rgba(139, 90, 43, .5);
}

.blur-background {
  filter: blur(4px);
  transition: filter .3s ease;
}

@media (max-width: 600px) {
  .tutorial-content {
    padding: 26px 18px 22px;
  }

  .tutorial-content h2 {
    font-size: 1.2rem;
  }

  .btn-tutorial-level {
    padding: 9px 18px;
    font-size: 0.85rem;
    flex: 1 1 auto;
    min-width: 80px;
  }
}
