.zine-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 64px var(--pad) 40px;
}


.view-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
}


.toggle-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
  user-select: none;
}

.toggle-label.active {
  color: var(--fg);
}


.toggle-btn {
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: #2a2a2a;
  border: 1px solid var(--border);
  cursor: none;
  position: relative;
  transition: background 0.3s, border-color 0.3s;
  flex-shrink: 0;
}

.toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.toggle-btn.active .toggle-thumb {
  transform: translateX(22px);
}


.zine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
  padding: 0 var(--pad) var(--section-gap);
}


.zine-card {
  width: 100%;
  aspect-ratio: 1 / 1.414;
  cursor: none;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #1a1a1a;
}


.zine-card .card-cover {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}


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

.zine-card:hover .card-cover img {
  transform: scale(1.04);
}


.zine-card .cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}


.zine-card .card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top,
      rgba(10, 10, 10, 0.92) 0%,
      rgba(10, 10, 10, 0.5) 40%,
      rgba(10, 10, 10, 0.0) 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.zine-card:hover .card-overlay {
  opacity: 1;
}


.zine-card .card-number {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.zine-card .card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
  letter-spacing: -0.01em;
}


.zine-table {
  position: relative;
  width: 100%;
  min-height: 85vh;
  overflow: hidden;
  margin-bottom: var(--section-gap);
}


.zine-table .zine-card {
  position: absolute;
  width: 190px;
  height: 269px;
  aspect-ratio: unset;
  touch-action: none;
  cursor: none;
}


.zine-table .zine-card.is-dragging {
  z-index: 999 !important;
}

.zine-table .zine-card.is-dragging .card-cover img {
  transform: scale(1.04);
}


.hidden {
  display: none !important;
}


.zine-card.flip-animate {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) !important;
}


.flipbook-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zFadeIn 0.25s ease;
}

.flipbook-overlay.hidden {
  display: none !important;
}


@keyframes zFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


.flipbook-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 960px;
  padding: 2rem var(--pad);
}


.flipbook-header {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}


.flipbook-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.02em;
  font-family: var(--font);
}


.flipbook-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: none;
  font-size: 13px;
  font-family: var(--font);
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flipbook-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--fg);
}


.flipbook-stage {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: center;
}


.book-container {
  border-radius: 2px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
}


.flip-nav {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: none;
  font-size: 1.4rem;
  font-family: var(--font);
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flip-nav:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--fg);
}


.flipbook-counter {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font);
}


@media (max-width: 768px) {
  .zine-toolbar {
    padding: 40px var(--pad) 24px;
    flex-wrap: wrap;
    gap: 16px;
  }

  .zine-grid {
    gap: 12px;
  }

  .flip-nav {
    display: none;
  }
}