/* ===== SCREEN 3 : LION MODAL ===== */
#screen-lion {
  background: transparent;
  pointer-events: none;
  transform: none !important;
}
#screen-lion.active { pointer-events: auto; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61,43,31,0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
#screen-lion.active .modal-backdrop { opacity: 1; }

.modal-panel {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 14px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
#screen-lion.active .modal-panel { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.modal-icon { width: 48px; height: 48px; object-fit: contain; }
.modal-title { font-size: 1.25rem; font-weight: 900; color: var(--brown); }
.modal-subtitle { font-size: 0.9rem; font-weight: 600; color: var(--brown-light); margin-top: 2px; }

.modal-grid-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}
.modal-grid-wrapper .grid-5x4 {
  max-width: min(90vw, 380px);
}

.modal-footer {
  display: flex;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Lion grid specials */
.grid-cell.lion-active {
  border: 3px solid var(--gold);
  background: rgba(233,196,106,0.2);
  box-shadow: 0 0 0 2px var(--gold);
}
.grid-cell.lion-target {
  border: 3px solid var(--teal);
  cursor: pointer;
}
.grid-cell.lion-target img {
  animation: pulse-teal 1.2s ease-in-out infinite;
}
@keyframes pulse-teal {
  0%, 100% { filter: drop-shadow(0 0 4px var(--teal)); }
  50%       { filter: drop-shadow(0 0 10px var(--teal)); }
}
.grid-cell.lion-dim {
  opacity: 0.35;
  pointer-events: none;
}
