@charset "UTF-8";

body.popup-open { overflow: hidden; }

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  overflow: auto;
  padding: 24px 16px;
  background: rgba(17, 21, 34, .72);
  backdrop-filter: blur(4px);
}

.popup-dialog {
  width: min(100%, 1082px);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 2px;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
}

.popup-all-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  color: #1d2430;
  background: #fff;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
  font-weight: 800;
  cursor: pointer;
}

.popup-all-close span { font-size: 21px; line-height: 15px; }

.popup-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
}

.popup-card {
  position: relative;
  flex: 0 0 min(350px, 100%);
  width: min(350px, 100%);
  aspect-ratio: 350 / 450;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .33);
}

.popup-image-link, .popup-image, .popup-image-link img {
  display: block;
  width: 100%;
  height: 100%;
}

.popup-image, .popup-image-link img { object-fit: contain; }

.popup-card-close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #26303b;
  background: rgba(255, 255, 255, .96);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .18);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.popup-ad-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 7px;
  color: #333;
  background: rgba(255, 255, 255, .93);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 750;
  pointer-events: none;
}

.popup-all-close:focus-visible, .popup-card-close:focus-visible, .popup-image-link:focus-visible {
  outline: 3px solid #ffe06c;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .popup-overlay { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
  .popup-dialog { width: min(100%, 350px); }
  .popup-list { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; }
  .popup-card { grid-area: 1 / 1; width: 100%; max-width: 350px; }
}
