:root {
  --bg: #05070d;
  --card: #0e1420;
  --line: rgba(160, 178, 255, 0.12);
  --blue: rgba(104, 155, 255, 0.42);
  --violet: rgba(132, 116, 255, 0.34);
  --speed: 0.2s;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, var(--blue), transparent 28%),
    linear-gradient(225deg, var(--violet), transparent 34%),
    var(--bg);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}
body.age-locked {
  overflow: hidden;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #eef3ff;
  background: rgba(5, 7, 13, 0.94);
}
.age-gate[hidden] { display: none; }
.age-gate__panel {
  width: min(480px, 100%);
  padding: 30px;
  background: #0e1420;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.46);
}
.age-gate__domain {
  margin: 0 0 8px;
  color: #6ca7ff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.age-gate h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}
.age-gate p {
  color: #9aa8c4;
  line-height: 1.6;
}
.age-gate__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}
.age-gate__actions button,
.age-gate__actions a {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font: inherit;
}
.age-gate__actions button {
  color: #06101f;
  font-weight: 800;
  background: #6ca7ff;
  border: 1px solid transparent;
  cursor: pointer;
}
.age-gate__actions a {
  color: #9aa8c4;
  text-decoration: none;
  border: 1px solid var(--line);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.x-shell {
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 80px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.45vw, 22px);
  align-items: start;
}

.image-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1.618;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--speed), transform var(--speed), border-color var(--speed), box-shadow var(--speed);
}

.image-card.show {
  opacity: 1;
  transform: translateY(0);
}

.image-card:nth-child(8n + 1) { transform-origin: 61.8% 38.2%; }
.image-card:nth-child(8n + 3) { margin-top: 34px; }
.image-card:nth-child(8n + 5) { margin-top: 55px; }

.image-card:hover {
  border-color: rgba(135, 158, 255, 0.52);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.52);
  transform: translateY(-4px);
  z-index: 2;
}

.image-card a,
.image-card img {
  display: block;
  width: 100%;
  height: 100%;
}

.image-card img {
  object-fit: cover;
  transition: transform 0.22s, filter 0.22s;
}

.image-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.03) contrast(1.02);
}

@media (max-width: 1180px) {
  .image-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .image-card:nth-child(n) { margin-top: 0; }
  .image-card:nth-child(6n + 2) { margin-top: 24px; }
}

@media (max-width: 560px) {
  .x-shell { width: min(100% - 18px, 1440px); padding-top: 10px; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .image-card:nth-child(n) { margin-top: 0; }
  .image-card:nth-child(4n + 2) { margin-top: 18px; }
  .age-gate__actions { grid-template-columns: 1fr; }
}
