body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: #d3d3d3;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

.links {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 84px;
}

.panel {
  display: block;
  background: #fff;
  border: 1px solid #111;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0.8;
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.panel img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 520px;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) brightness(0.72) contrast(1.3);
  transform: scale(1);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.panel:hover,
.panel:focus-within,
.panel.is-active {
  opacity: 1;
}

.panel:hover img,
.panel:focus-within img,
.panel.is-active img {
  filter: grayscale(0) brightness(1.03) contrast(1.15);
  transform: scale(1.05);
}

.panel--unity img {
  filter: grayscale(100%) brightness(0.78) contrast(1.4);
  object-position: center;
  transform: scale(1.1);
}

.panel--unity:hover img,
.panel--unity:focus-within img,
.panel--unity.is-active img {
  filter: grayscale(0) brightness(1.08) contrast(1.24);
  transform: scale(1.14);
}

.panel-btn {
  all: unset;
  display: block;
  width: 100%;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  z-index: 50;
}

.modal.active {
  display: flex;
}

.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid #111;
  border-radius: 10px;
  padding: 18px;
  box-sizing: border-box;
}

.modal-card h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.modal-card p {
  margin: 0 0 14px;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions button {
  border: 1px solid #111;
  background: #fff;
  color: #111;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.modal-actions button:hover {
  background: #111;
  color: #fff;
}

@media (max-width: 760px) {
  .links {
    grid-template-columns: 1fr;
  }

  .panel img {
    min-height: 220px;
  }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  html,
  body {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body {
    padding: 6px;
  }

  .links {
    width: min(680px, 100%);
    max-height: calc(100dvh - 12px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
  }

  .panel {
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
  }

  .panel img {
    height: auto;
    min-height: 0;
    max-height: min(58dvh, 235px);
    aspect-ratio: auto;
  }

  .modal-card {
    padding: 14px;
  }

  .modal-actions button {
    padding: 7px 10px;
    font-size: 0.84rem;
  }
}
