:root {
  --bg: #fbfbfc;
  --panel: rgba(255, 255, 255, 0.82);
  --text: #141416;
  --muted: rgba(20, 20, 22, 0.62);
  --shadow: 0 14px 30px rgba(10, 10, 12, 0.08);
  --shadow-strong: 0 18px 44px rgba(10, 10, 12, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'PingFang SC',
    'Hiragino Sans GB',
    'Microsoft YaHei',
    'Noto Sans CJK SC',
    Arial,
    sans-serif;
  background:
    radial-gradient(1100px 600px at 20% 0%, rgba(255, 223, 235, 0.28), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(205, 235, 255, 0.22), transparent 55%), var(--bg);
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(251, 251, 252, 0.78), rgba(251, 251, 252, 0.58));
  border-bottom: 1px solid rgba(20, 20, 22, 0.06);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 18px;
  text-align: center;
}
.brand-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: 0.18em;
  font-weight: 700;
}
.brand-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.site-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 16px 56px;
}

/* Masonry via CSS Columns */
.masonry {
  column-gap: 16px;
  column-width: 290px;
}
@media (max-width: 640px) {
  .masonry {
    column-width: 170px;
    column-gap: 12px;
  }
}

.card {
  break-inside: avoid;
  margin: 0 0 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid rgba(20, 20, 22, 0.06);
  transform: translateZ(0);
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease;
}
.card:focus-within {
  outline: 3px solid rgba(120, 175, 255, 0.35);
  outline-offset: 2px;
}
.card:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
  border-color: rgba(20, 20, 22, 0.1);
}

.card-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.thumb {
  width: 100%;
  display: block;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.thumb.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 14px;
}
.tag {
  font-size: 12px;
  color: rgba(20, 20, 22, 0.72);
  letter-spacing: 0.06em;
}
.idx {
  font-size: 12px;
  color: rgba(20, 20, 22, 0.38);
  letter-spacing: 0.08em;
}

.site-footer {
  padding: 22px 16px 26px;
  text-align: center;
  color: rgba(20, 20, 22, 0.45);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(6px);
  z-index: 10;
}
.lightbox.is-open {
  display: flex;
}
.lb-stage {
  width: min(980px, 92vw);
  height: min(720px, 84vh);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}
.lb-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.02);
}
.lb-caption {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  font-size: 30px;
  line-height: 44px;
  cursor: pointer;
  user-select: none;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.lb-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.lb-close {
  top: 22px;
  right: 22px;
  transform: none;
  font-size: 28px;
  line-height: 42px;
}
.lb-prev {
  left: 18px;
}
.lb-next {
  right: 18px;
}
@media (max-width: 640px) {
  .lb-prev,
  .lb-next {
    display: none;
  }
}
