:root {
  --bg: #f7f9fc;
  --ink: #0b1220;
  --muted: #5b6b82;
  --card: #ffffff;
  --accent: #1d6eea;
  --accent-2: #1bb1a8;
  --ring: #d9e3f2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Kosugi", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  position: relative;
  min-height: 100vh;
}
.site-header {
  padding: 48px 20px 24px;
  text-align: center;
  animation: fadeUp 700ms ease both;
}
.site-header h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.04em;
  font-family: math;
  font-weight: 700;
}
.header-link {
  display: inline-block;
  font-size: 20px;
  color: #9aaec7;
  text-decoration: none;
  padding: 30px;
}
.header-link:hover {
  text-decoration: underline;
}
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 80px;
}
.year {
  margin-top: 48px;
  animation: fadeUp 700ms ease both;
}
.year h2 {
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}
.year h2::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.thumb {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--ring);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
  transition: transform 200ms ease, box-shadow 200ms ease;
  position: relative;
}
.thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1 / 1;
  opacity: 0;
  transition: opacity 220ms ease;
}
.thumb img.is-loaded {
  opacity: 1;
}
.thumb.sensitive::after {
  content: "Sensitive";
  position: absolute;
  inset: auto 10px 10px auto;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
.thumb.sensitive img {
  filter: blur(6px);
  transform: scale(1.02);
}
.thumb.private {
  display: none;
}
.debug-private .thumb.private {
  display: block;
}
.thumb.selected {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.thumb.selected::before {
  content: "Selected";
  position: absolute;
  inset: 10px auto auto 10px;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 32px 12px 64px;
}
.empty {
  color: var(--muted);
}
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.is-open {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 25, 0.65);
  backdrop-filter: blur(6px);
}
.modal-content {
  position: relative;
  background: #f8fbff;
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--ring);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  z-index: 1;
}
.modal-image {
  display: block;
  max-width: 100%;
  max-height: 70vh;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: #0b1220;
  color: #fff;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.modal-sensitive {
  margin: 0 0 12px;
  padding: 12px;
  background: #e4efff;
  border-radius: 10px;
  font-family: sans-serif;
  font-weight: 700;
}
.modal-sensitive p {
  margin: 4px 0;
}
.modal-reveal {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.debug-panel {
  position: sticky;
  bottom: 16px;
  margin: 16px auto 0;
  max-width: 1120px;
  background: #0b1220;
  color: #fff;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.3);
}
.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.debug-count {
  color: #9cc4ff;
}
.debug-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.debug-btn {
  border: 0;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  background: #9cc4ff;
  color: #0b1220;
  font-weight: 600;
}
.debug-output {
  width: 100%;
  border-radius: 10px;
  border: 0;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
