.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 20px;
}

.seg {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: #fff;
  cursor: pointer;
  font-weight: 820;
}

.seg.active { background: var(--ink); color: #fff; }
.gallery-count { color: var(--muted); font-weight: 760; margin-left: auto; }

.raw-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.raw-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(27,31,42,.07);
}

.raw-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #eee9df;
}

.raw-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .22s ease;
}

.raw-card:hover .raw-cover img { transform: scale(1.035); }
.raw-badge, .raw-multi {
  position: absolute;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}

.raw-badge { left: 10px; top: 10px; background: rgba(32,35,42,.86); color: #fff; }
.raw-multi { right: 10px; bottom: 10px; background: rgba(255,255,255,.92); }
.raw-info { padding: 12px; }
.raw-title { min-height: 42px; font-size: 15px; line-height: 1.38; font-weight: 850; }
.raw-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.raw-pill { border-radius: 999px; padding: 4px 7px; background: #f3efe6; color: #555b66; font-size: 11px; font-weight: 760; }
.raw-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.raw-actions button, .raw-actions a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fff;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 820;
}
.raw-actions a { background: var(--ink); color: #fff; border-color: var(--ink); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(18,20,26,.78);
}

.lightbox.open { display: flex; }
.lightbox-dialog {
  width: min(1120px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .52fr);
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
}
.lightbox-media { display: flex; align-items: center; justify-content: center; background: #11141a; }
.lightbox-media img { max-width: 100%; max-height: calc(100vh - 56px); object-fit: contain; }
.lightbox-side { padding: 20px; overflow: auto; }
.lightbox-top { display: flex; justify-content: space-between; gap: 12px; }
.lightbox-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.lightbox-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0; }
.lightbox-thumbs button { border: 2px solid transparent; border-radius: 8px; padding: 0; aspect-ratio: 1; overflow: hidden; cursor: pointer; }
.lightbox-thumbs button.active { border-color: var(--red); }
.lightbox-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.origin-link { display: block; border-radius: 8px; padding: 11px 12px; background: var(--red); color: #fff; text-align: center; text-decoration: none; font-weight: 850; }
