/**
 * Tampilan galeri publikasi — gaya kartu & grid modern (hanya halaman cat=flip)
 */
body.flip-gallery {
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #e8edf3;
}

body.flip-gallery .mmenu {
  background: rgba(15, 23, 42, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

/* Logo header: gerakan halus + halo (preset lebih tenang; sesuaikan di bawah jika perlu) */
body.flip-gallery .mmenu .logo {
  animation: kmc-logo-float 7s ease-in-out infinite;
  transform-origin: center bottom;
  transition: transform 0.28s ease;
}

body.flip-gallery .mmenu .logo::before {
  animation: kmc-logo-halo 5s ease-in-out infinite;
}

/* Konsep badai (dekoratif): awan + hujan + kilat — hanya galeri flip */
body.flip-gallery .mmenu .logo-storm {
  position: absolute;
  width: 60px;
  height: 60px;
  top: -21px;
  left: -5px;
  border-radius: 30px;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

body.flip-gallery .mmenu .logo-storm__cloud {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 24px;
  background:
    radial-gradient(ellipse 14px 9px at 28% 55%, rgba(148, 163, 184, 0.55) 0%, transparent 72%),
    radial-gradient(ellipse 12px 8px at 48% 52%, rgba(100, 116, 139, 0.5) 0%, transparent 72%),
    radial-gradient(ellipse 11px 8px at 68% 56%, rgba(148, 163, 184, 0.45) 0%, transparent 72%);
  opacity: 0.88;
  animation: kmc-storm-cloud-drift 14s ease-in-out infinite;
}

body.flip-gallery .mmenu .logo-storm__rain {
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 0;
  height: 34px;
  width: auto;
  background: repeating-linear-gradient(
    105deg,
    transparent 0,
    transparent 3px,
    rgba(186, 230, 253, 0.42) 3px,
    rgba(186, 230, 253, 0.42) 3.5px
  );
  opacity: 0.62;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 100%);
  animation: kmc-storm-rain 0.55s linear infinite;
}

body.flip-gallery .mmenu .logo-storm__rain--back {
  height: 28px;
  opacity: 0.35;
  background: repeating-linear-gradient(
    95deg,
    transparent 0,
    transparent 4px,
    rgba(147, 197, 253, 0.35) 4px,
    rgba(147, 197, 253, 0.35) 4.5px
  );
  animation-duration: 0.75s;
  animation-direction: reverse;
}

/* Kilat: satu denyut singkat tiap siklus (tidak berkedip cepat) */
body.flip-gallery .mmenu .logo::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  top: -21px;
  left: -5px;
  border-radius: 30px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at 42% 34%,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(186, 230, 253, 0.5) 28%,
    transparent 58%
  );
  mix-blend-mode: screen;
  animation: kmc-storm-lightning 9s ease-in-out infinite;
}

@keyframes kmc-storm-cloud-drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(2px);
  }
}

@keyframes kmc-storm-rain {
  from {
    transform: translateY(-6px);
  }
  to {
    transform: translateY(10px);
  }
}

@keyframes kmc-storm-lightning {
  0%,
  100% {
    opacity: 0;
  }
  8% {
    opacity: 0;
  }
  8.6% {
    opacity: 0.95;
  }
  9.8% {
    opacity: 0;
  }
  10.4% {
    opacity: 0.22;
  }
  11.2% {
    opacity: 0;
  }
}

body.flip-gallery .mmenu .ml0 > li:hover .logo {
  animation-play-state: paused;
  transform: translateY(-1px) scale(1.03);
}

body.flip-gallery .mmenu .ml0 > li:hover .logo::before {
  animation-play-state: paused;
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.35),
    0 0 20px rgba(37, 99, 235, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.flip-gallery .mmenu .ml0 > li:hover .logo::after {
  animation-play-state: paused;
}

body.flip-gallery .mmenu .ml0 > li:hover .logo-storm .logo-storm__cloud,
body.flip-gallery .mmenu .ml0 > li:hover .logo-storm .logo-storm__rain {
  animation-play-state: paused;
}

body.flip-gallery .mmenu .logo img {
  transition: filter 0.28s ease, opacity 0.2s ease;
}

body.flip-gallery .mmenu .ml0 > li:hover .logo img {
  filter: brightness(1.05);
}

@keyframes kmc-logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes kmc-logo-halo {
  0%,
  100% {
    box-shadow:
      0 0 4px rgba(56, 189, 248, 0.12),
      0 0 10px rgba(37, 99, 235, 0.08),
      inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
  50% {
    box-shadow:
      0 0 10px rgba(56, 189, 248, 0.28),
      0 0 18px rgba(37, 99, 235, 0.14),
      inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.flip-gallery .mmenu .logo,
  body.flip-gallery .mmenu .logo::before {
    animation: none !important;
  }

  body.flip-gallery .mmenu .logo::after {
    animation: none !important;
    content: none;
  }

  body.flip-gallery .mmenu .logo-storm {
    display: none;
  }

  body.flip-gallery.theme-dark::before {
    animation: none !important;
    content: none;
  }

  body.flip-gallery.theme-dark .kmc-lightning-bolt {
    display: none !important;
  }

  body.flip-gallery .mmenu .ml0 > li:hover .logo {
    transform: none;
  }
}

body.flip-gallery .site {
  background: transparent;
}

.gallery-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  box-sizing: border-box;
}

.gallery-hero {
  text-align: center;
  padding: 2rem 0 1.75rem;
}

.gallery-hero__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 0.5rem;
}

.gallery-hero h1 {
  font-size: clamp(1.65rem, 4.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.gallery-hero__subtitle {
  font-size: 0.9375rem;
  color: #64748b;
  margin: 0.65rem 0 0;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

body.flip-gallery .flipbook-loading {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.gallery-page .gallery {
  margin-top: 0.5rem;
}

.gallery-block {
  margin-bottom: 2.5rem;
}

.gallery-block:last-of-type {
  margin-bottom: 1.5rem;
}

.gallery-block__title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 1.125rem;
  letter-spacing: -0.01em;
}

.gallery-block__title::before {
  content: "";
  width: 4px;
  height: 1.35em;
  border-radius: 3px;
  background: linear-gradient(180deg, #2563eb 0%, #7c3aed 100%);
  flex-shrink: 0;
}

.gallery-page .gallery .rw {
  text-align: inherit;
  margin: 0;
}

.gallery-page .gallery .group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 1.125rem;
  width: 100%;
  vertical-align: top;
}

.gallery-page .gallery .group.gallery-grid--single {
  max-width: 280px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

.gallery-page .gallery .thumb {
  display: block;
  padding: 0;
  vertical-align: top;
}

/* Muncul halus saat muat (galeri cat=flip); stagger ringan untuk blok & kartu */
body.flip-gallery .gallery-block {
  animation: kmc-gallery-section-in 0.55s ease backwards;
}

body.flip-gallery .gallery-block:nth-of-type(1) {
  animation-delay: 0.04s;
}

body.flip-gallery .gallery-block:nth-of-type(2) {
  animation-delay: 0.12s;
}

body.flip-gallery .gallery-block:nth-of-type(3) {
  animation-delay: 0.2s;
}

body.flip-gallery .gallery-page .thumb {
  animation: kmc-gallery-card-in 0.42s ease backwards;
}

body.flip-gallery .gallery-page .group .thumb:nth-child(1) {
  animation-delay: 0.04s;
}

body.flip-gallery .gallery-page .group .thumb:nth-child(2) {
  animation-delay: 0.07s;
}

body.flip-gallery .gallery-page .group .thumb:nth-child(3) {
  animation-delay: 0.1s;
}

body.flip-gallery .gallery-page .group .thumb:nth-child(4) {
  animation-delay: 0.13s;
}

body.flip-gallery .gallery-page .group .thumb:nth-child(5) {
  animation-delay: 0.16s;
}

body.flip-gallery .gallery-page .group .thumb:nth-child(6) {
  animation-delay: 0.19s;
}

body.flip-gallery .gallery-page .group .thumb:nth-child(7) {
  animation-delay: 0.22s;
}

body.flip-gallery .gallery-page .group .thumb:nth-child(8) {
  animation-delay: 0.25s;
}

@keyframes kmc-gallery-section-in {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kmc-gallery-card-in {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.flip-gallery .gallery-block,
  body.flip-gallery .gallery-page .thumb {
    animation: none !important;
  }
}

.gallery-card {
  background: #fff;
  border-radius: 16px;
  padding: 0.75rem;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  height: 100%;
  box-sizing: border-box;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.08),
    0 16px 40px rgba(37, 99, 235, 0.12);
}

.gallery-card:focus {
  outline: none;
}

.gallery-card:focus-visible {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #2563eb;
}

.gallery-card .fb3d-thumbnail {
  display: block;
  width: 100%;
}

.gallery-card .book-thumbnail {
  display: block !important;
  width: 100%;
  text-align: center;
}

.gallery-card .book-thumbnail > span {
  display: block !important;
  width: 100%;
}

.gallery-page .gallery img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 10px;
  vertical-align: middle;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.gallery-page .fb3d-thumbnail .book-thumbnail img {
  border-radius: 10px;
}

.gallery-callout {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #475569;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  margin: 0 0 1.25rem;
}

.gallery-callout code {
  font-size: 0.8125rem;
  padding: 0.1em 0.35em;
  background: #f1f5f9;
  border-radius: 4px;
  color: #0f172a;
}

body.flip-gallery .copyright {
  text-align: center;
  padding: 2rem 0 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #64748b;
  font-size: 0.875rem;
}

body.flip-gallery .copyright .author {
  color: #475569;
  font-weight: 500;
}

@media (max-width: 576px) {
  .gallery-page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .gallery-page .gallery .group {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .gallery-hero {
    padding-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card {
    transition: none;
  }

  .gallery-card:hover {
    transform: none;
  }
}

/* Toolbar: satu baris dalam kartu (mengalahkan Bootstrap input[type=search]) */
body.flip-gallery .gallery-toolbar {
  margin: 0 auto 1.5rem;
  max-width: 720px;
}

body.flip-gallery .gallery-toolbar__bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  padding: 0.35rem 0.4rem 0.35rem 0.65rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.flip-gallery .gallery-toolbar__bar:focus-within {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.08),
    0 0 0 3px rgba(37, 99, 235, 0.16);
}

body.flip-gallery .gallery-toolbar__search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

body.flip-gallery .gallery-toolbar__icon {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}

body.flip-gallery .gallery-filter {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.65rem 0.55rem 2.15rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #0f172a;
  background: transparent;
  border: 0;
  border-radius: 12px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease;
}

body.flip-gallery .gallery-filter::-webkit-search-cancel-button,
body.flip-gallery .gallery-filter::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

body.flip-gallery .gallery-filter::placeholder {
  color: #94a3b8;
}

body.flip-gallery .gallery-filter:focus {
  outline: none;
  background: rgba(241, 245, 249, 0.65);
}

body.flip-gallery .gallery-toolbar__theme {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

body.flip-gallery .gallery-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #334155;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
  -webkit-appearance: none;
  appearance: none;
}

body.flip-gallery .gallery-theme-toggle:hover {
  background: #fff;
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

body.flip-gallery .gallery-theme-toggle:active {
  transform: scale(0.98);
}

body.flip-gallery .gallery-theme-toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

body.flip-gallery .gallery-theme-toggle__icon {
  font-size: 1rem;
  opacity: 0.9;
  color: #475569;
}

body.flip-gallery .gallery-theme-system {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #334155;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
  -webkit-appearance: none;
  appearance: none;
}

body.flip-gallery .gallery-theme-system:hover {
  background: #fff;
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

body.flip-gallery .gallery-theme-system:active {
  transform: scale(0.98);
}

body.flip-gallery .gallery-theme-system:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

body.flip-gallery .gallery-theme-system[aria-pressed="true"] {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(219, 234, 254, 0.65);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

body.flip-gallery .gallery-theme-system__icon {
  font-size: 0.95rem;
  opacity: 0.9;
  color: #475569;
}

@media (max-width: 480px) {
  body.flip-gallery .gallery-toolbar__bar {
    padding: 0.3rem 0.35rem 0.3rem 0.5rem;
    gap: 0.35rem;
  }

  body.flip-gallery .gallery-filter {
    padding-left: 2rem;
    font-size: 0.875rem;
  }

  body.flip-gallery .gallery-toolbar__icon {
    left: 0.45rem;
    font-size: 0.875rem;
  }

  /* Satu baris: teks tombol disembunyikan, label tetap dari aria-label */
  body.flip-gallery .gallery-theme-toggle__text,
  body.flip-gallery .gallery-theme-system__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.flip-gallery .gallery-theme-toggle,
  body.flip-gallery .gallery-theme-system {
    position: relative;
    padding: 0.5rem 0.65rem;
    min-width: 2.65rem;
  }
}

.gallery-filter-empty {
  text-align: center;
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1rem;
  padding: 0.75rem;
}

.gallery-filter-empty[hidden] {
  display: none !important;
}

/* Mode gelap (kelas pada body.flip-gallery) */
body.flip-gallery.theme-dark {
  background: #0b1220;
  color: #e2e8f0;
}

/* Kilat langit (posisi pusat dari variabel JS, acak tiap sambaran) */
body.flip-gallery.theme-dark::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse 145% 95% at var(--kmc-flash-x, 50%) var(--kmc-flash-y, -5%),
    rgba(224, 242, 254, 0.62) 0%,
    rgba(96, 165, 250, 0.28) 32%,
    transparent 60%
  );
  mix-blend-mode: screen;
  animation: kmc-darkbody-lightning 11s ease-in-out infinite;
}

/* Petir layar penuh: tekstur referensi (cabang rapat, biru–putih) + variasi acak dari JS */
body.flip-gallery .kmc-lightning-bolt {
  display: none;
}

body.flip-gallery.theme-dark .kmc-lightning-bolt {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background-color: transparent;
  background-image: url(../images/kmc-lightning-texture.png);
  background-size: cover;
  background-position: var(--kmc-texture-pos-x, 50%) var(--kmc-texture-pos-y, 50%);
  background-repeat: no-repeat;
  transform: scale(var(--kmc-texture-scale, 1.08)) rotate(var(--kmc-texture-rot, 0deg));
  transform-origin: center center;
  filter: brightness(1.12) contrast(1.15) saturate(1.2);
  mix-blend-mode: screen;
  animation: kmc-darkbody-lightning 11s ease-in-out infinite;
}

@keyframes kmc-darkbody-lightning {
  0%,
  100% {
    opacity: 0;
  }
  4% {
    opacity: 0;
  }
  5.1% {
    opacity: 1;
  }
  6.6% {
    opacity: 0;
  }
  7.2% {
    opacity: 0.28;
  }
  8.4% {
    opacity: 0;
  }
}

body.flip-gallery.theme-dark .site {
  position: relative;
  z-index: 1;
}

body.flip-gallery.theme-dark .mmenu {
  background: rgba(15, 23, 42, 0.98);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.flip-gallery.theme-dark .gallery-hero h1 {
  color: #f1f5f9;
}

body.flip-gallery.theme-dark .gallery-hero__eyebrow,
body.flip-gallery.theme-dark .gallery-hero__subtitle {
  color: #94a3b8;
}

body.flip-gallery.theme-dark .gallery-block__title {
  color: #e2e8f0;
}

body.flip-gallery.theme-dark .gallery-card {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.2);
}

body.flip-gallery.theme-dark .gallery-card:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 16px 40px rgba(37, 99, 235, 0.15);
}

body.flip-gallery.theme-dark .gallery-toolbar__bar {
  background: #1e293b;
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

body.flip-gallery.theme-dark .gallery-toolbar__bar:focus-within {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.28),
    0 0 0 3px rgba(59, 130, 246, 0.22);
}

body.flip-gallery.theme-dark .gallery-toolbar__icon {
  color: #94a3b8;
}

body.flip-gallery.theme-dark .gallery-filter {
  color: #f1f5f9;
}

body.flip-gallery.theme-dark .gallery-filter::placeholder {
  color: #64748b;
}

body.flip-gallery.theme-dark .gallery-filter:focus {
  background: rgba(15, 23, 42, 0.55);
}

body.flip-gallery.theme-dark .gallery-theme-toggle {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-color: #475569;
  color: #e2e8f0;
  box-shadow: none;
}

body.flip-gallery.theme-dark .gallery-theme-toggle:hover {
  background: #334155;
  border-color: #64748b;
}

body.flip-gallery.theme-dark .gallery-theme-toggle__icon {
  color: #cbd5e1;
}

body.flip-gallery.theme-dark .gallery-theme-system {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-color: #475569;
  color: #e2e8f0;
  box-shadow: none;
}

body.flip-gallery.theme-dark .gallery-theme-system:hover {
  background: #334155;
  border-color: #64748b;
}

body.flip-gallery.theme-dark .gallery-theme-system[aria-pressed="true"] {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(30, 58, 138, 0.45);
}

body.flip-gallery.theme-dark .gallery-theme-system__icon {
  color: #cbd5e1;
}

body.flip-gallery.theme-dark .gallery-callout {
  background: rgba(30, 41, 59, 0.85);
  border-color: #334155;
  color: #cbd5e1;
}

body.flip-gallery.theme-dark .gallery-callout code {
  background: #0f172a;
  color: #e2e8f0;
}

body.flip-gallery.theme-dark .flipbook-loading {
  background: rgba(30, 41, 59, 0.9);
  border-color: #334155;
  color: #e2e8f0;
}

body.flip-gallery.theme-dark .copyright {
  border-top-color: #334155;
  color: #94a3b8;
}

body.flip-gallery.theme-dark .copyright .author {
  color: #cbd5e1;
}

body.flip-gallery.theme-dark .gallery-filter-empty {
  color: #94a3b8;
}

body.flip-gallery.theme-dark .fb-text-modal.fb3d-modal .fb-text-modal__body {
  background: #1e293b;
  color: #e2e8f0;
}
